From 8d579aacb836e4061632268401ff5052b8ff7d9b Mon Sep 17 00:00:00 2001 From: klessard Date: Sun, 25 Apr 2021 22:09:16 -0400 Subject: [PATCH 01/60] Move NdArray library to subfolder --- ndarray/pom.xml | 68 + .../tensorflow/ndarray/BooleanNdArray.java | 108 + .../org/tensorflow/ndarray/ByteNdArray.java | 108 + .../org/tensorflow/ndarray/DoubleNdArray.java | 108 + .../org/tensorflow/ndarray/FloatNdArray.java | 108 + .../ndarray/IllegalRankException.java | 27 + .../org/tensorflow/ndarray/IntNdArray.java | 108 + .../org/tensorflow/ndarray/LongNdArray.java | 108 + .../java/org/tensorflow/ndarray/NdArray.java | 302 ++ .../tensorflow/ndarray/NdArraySequence.java | 67 + .../java/org/tensorflow/ndarray/NdArrays.java | 495 +++ .../java/org/tensorflow/ndarray/Shape.java | 447 ++ .../java/org/tensorflow/ndarray/Shaped.java | 51 + .../org/tensorflow/ndarray/ShortNdArray.java | 108 + .../org/tensorflow/ndarray/StdArrays.java | 3809 +++++++++++++++++ .../ndarray/buffer/BooleanDataBuffer.java | 165 + .../ndarray/buffer/ByteDataBuffer.java | 232 + .../tensorflow/ndarray/buffer/DataBuffer.java | 324 ++ .../ndarray/buffer/DataBufferWindow.java | 93 + .../ndarray/buffer/DataBuffers.java | 457 ++ .../ndarray/buffer/DataStorageVisitor.java | 147 + .../ndarray/buffer/DoubleDataBuffer.java | 165 + .../ndarray/buffer/FloatDataBuffer.java | 165 + .../ndarray/buffer/IntDataBuffer.java | 165 + .../ndarray/buffer/LongDataBuffer.java | 165 + .../ndarray/buffer/ShortDataBuffer.java | 165 + .../buffer/layout/BooleanDataLayout.java | 65 + .../ndarray/buffer/layout/ByteDataLayout.java | 65 + .../ndarray/buffer/layout/DataLayout.java | 129 + .../ndarray/buffer/layout/DataLayouts.java | 96 + .../buffer/layout/DoubleDataLayout.java | 65 + .../buffer/layout/FloatDataLayout.java | 65 + .../ndarray/buffer/layout/IntDataLayout.java | 66 + .../ndarray/buffer/layout/LongDataLayout.java | 65 + .../buffer/layout/ShortDataLayout.java | 65 + .../ndarray/impl/AbstractNdArray.java | 92 + .../tensorflow/ndarray/impl/Validator.java | 55 + .../impl/buffer/AbstractDataBuffer.java | 182 + .../impl/buffer/AbstractDataBufferWindow.java | 48 + .../ndarray/impl/buffer/Validator.java | 132 + .../adapter/AbstractDataBufferAdapter.java | 68 + .../adapter/BooleanDataBufferAdapter.java | 116 + .../buffer/adapter/ByteDataBufferAdapter.java | 135 + .../buffer/adapter/DataBufferAdapter.java | 47 + .../adapter/DataBufferAdapterFactory.java | 142 + .../adapter/DoubleDataBufferAdapter.java | 116 + .../adapter/FloatDataBufferAdapter.java | 116 + .../buffer/adapter/IntDataBufferAdapter.java | 116 + .../buffer/adapter/LongDataBufferAdapter.java | 116 + .../adapter/ShortDataBufferAdapter.java | 116 + .../impl/buffer/layout/Bfloat16Layout.java | 54 + .../impl/buffer/layout/BoolLayout.java | 47 + .../impl/buffer/layout/Float16Layout.java | 119 + .../impl/buffer/layout/StringLayout.java | 48 + .../impl/buffer/misc/ArrayDataBuffer.java | 126 + .../impl/buffer/misc/BitSetDataBuffer.java | 183 + .../buffer/misc/BooleanArrayDataBuffer.java | 176 + .../buffer/misc/MiscDataBufferFactory.java | 40 + .../buffer/nio/AbstractNioDataBuffer.java | 41 + .../impl/buffer/nio/ByteNioDataBuffer.java | 185 + .../impl/buffer/nio/DoubleNioDataBuffer.java | 147 + .../impl/buffer/nio/FloatNioDataBuffer.java | 147 + .../impl/buffer/nio/IntNioDataBuffer.java | 147 + .../impl/buffer/nio/LongNioDataBuffer.java | 147 + .../impl/buffer/nio/NioDataBufferFactory.java | 61 + .../impl/buffer/nio/ShortNioDataBuffer.java | 147 + .../buffer/raw/AbstractRawDataBuffer.java | 94 + .../impl/buffer/raw/BooleanRawDataBuffer.java | 146 + .../impl/buffer/raw/ByteRawDataBuffer.java | 185 + .../impl/buffer/raw/DoubleRawDataBuffer.java | 149 + .../impl/buffer/raw/FloatRawDataBuffer.java | 150 + .../impl/buffer/raw/IntRawDataBuffer.java | 149 + .../impl/buffer/raw/LongRawDataBuffer.java | 149 + .../impl/buffer/raw/RawDataBufferFactory.java | 148 + .../impl/buffer/raw/RawDataBufferWindow.java | 19 + .../impl/buffer/raw/ShortRawDataBuffer.java | 149 + .../impl/buffer/raw/UnsafeMemoryHandle.java | 195 + .../impl/buffer/raw/UnsafeReference.java | 64 + .../impl/dense/AbstractDenseNdArray.java | 163 + .../impl/dense/BooleanDenseNdArray.java | 91 + .../ndarray/impl/dense/ByteDenseNdArray.java | 91 + .../ndarray/impl/dense/DataTransfer.java | 136 + .../ndarray/impl/dense/DenseNdArray.java | 63 + .../impl/dense/DoubleDenseNdArray.java | 91 + .../ndarray/impl/dense/FloatDenseNdArray.java | 91 + .../ndarray/impl/dense/IntDenseNdArray.java | 91 + .../ndarray/impl/dense/LongDenseNdArray.java | 91 + .../ndarray/impl/dense/ShortDenseNdArray.java | 91 + .../ndarray/impl/dense/Validator.java | 49 + .../impl/dimension/AbstractDimension.java | 45 + .../ndarray/impl/dimension/Axis.java | 61 + .../ndarray/impl/dimension/Dimension.java | 36 + .../impl/dimension/DimensionalSpace.java | 224 + .../impl/dimension/IndexedDimension.java | 69 + .../impl/dimension/ReducedDimension.java | 62 + .../dimension/RelativeDimensionalSpace.java | 32 + .../impl/sequence/CoordinatesIncrementor.java | 38 + .../impl/sequence/FastElementSequence.java | 81 + .../sequence/IndexedPositionIterator.java | 28 + .../IndexedSequentialPositionIterator.java | 51 + .../impl/sequence/NdPositionIterator.java | 70 + .../impl/sequence/PositionIterator.java | 42 + .../sequence/SequentialPositionIterator.java | 55 + .../impl/sequence/SingleElementSequence.java | 71 + .../impl/sequence/SlicingElementSequence.java | 77 + .../org/tensorflow/ndarray/index/All.java | 57 + .../java/org/tensorflow/ndarray/index/At.java | 74 + .../tensorflow/ndarray/index/Ellipsis.java | 48 + .../tensorflow/ndarray/index/Hyperslab.java | 90 + .../org/tensorflow/ndarray/index/Index.java | 131 + .../org/tensorflow/ndarray/index/Indices.java | 363 ++ .../org/tensorflow/ndarray/index/NewAxis.java | 53 + .../tensorflow/ndarray/index/Sequence.java | 52 + .../org/tensorflow/ndarray/index/Slice.java | 89 + .../tensorflow/ndarray/index/SliceFrom.java | 86 + .../org/tensorflow/ndarray/index/SliceTo.java | 86 + .../org/tensorflow/ndarray/index/Step.java | 83 + .../ndarray/BooleanNdArrayTestBase.java | 57 + .../ndarray/ByteNdArrayTestBase.java | 55 + .../ndarray/DoubleNdArrayTestBase.java | 55 + .../ndarray/FloatNdArrayTestBase.java | 55 + .../org/tensorflow/ndarray/IndexTest.java | 205 + .../ndarray/IntNdArrayTestBase.java | 55 + .../ndarray/LongNdArrayTestBase.java | 55 + .../tensorflow/ndarray/NdArrayTestBase.java | 338 ++ .../org/tensorflow/ndarray/ShapeTest.java | 170 + .../ndarray/ShortNdArrayTestBase.java | 55 + .../org/tensorflow/ndarray/StdArraysTest.java | 211 + .../ndarray/benchmark/NdArrayBenchmark.java | 163 + .../buffer/BooleanDataBufferTestBase.java | 142 + .../buffer/ByteDataBufferTestBase.java | 145 + .../ndarray/buffer/DataBufferTestBase.java | 293 ++ .../buffer/DoubleDataBufferTestBase.java | 135 + .../buffer/FloatDataBufferTestBase.java | 135 + .../ndarray/buffer/IntDataBufferTestBase.java | 135 + .../buffer/LongDataBufferTestBase.java | 135 + .../buffer/ShortDataBufferTestBase.java | 135 + .../BigIntegerDataBufferAdapterTest.java | 67 + .../adapter/BooleanDataBufferAdapterTest.java | 45 + .../adapter/ByteDataBufferAdapterTest.java | 27 + .../adapter/DoubleDataBufferAdapterTest.java | 61 + .../adapter/FloatDataBufferAdapterTest.java | 52 + .../adapter/IntDataBufferAdapterTest.java | 51 + .../adapter/LongDataBufferAdapterTest.java | 60 + .../adapter/ShortDataBufferAdapterTest.java | 45 + .../buffer/layout/Bfloat16LayoutTest.java | 84 + .../impl/buffer/layout/BoolLayoutTest.java | 42 + .../impl/buffer/layout/Float16LayoutTest.java | 90 + .../impl/buffer/misc/ArrayDataBufferTest.java | 265 ++ .../buffer/misc/BitSetDataBufferTest.java | 34 + .../misc/StringArrayDataBufferTest.java | 33 + .../buffer/nio/ByteNioDataBufferTest.java | 29 + .../buffer/nio/DoubleNioDataBufferTest.java | 29 + .../buffer/nio/FloatNioDataBufferTest.java | 29 + .../impl/buffer/nio/IntNioDataBufferTest.java | 29 + .../buffer/nio/LongNioDataBufferTest.java | 29 + .../buffer/nio/ShortNioDataBufferTest.java | 29 + .../buffer/raw/BooleanRawDataBufferTest.java | 28 + .../buffer/raw/ByteRawDataBufferTest.java | 28 + .../buffer/raw/DoubleRawDataBufferTest.java | 28 + .../buffer/raw/FloatRawDataBufferTest.java | 28 + .../impl/buffer/raw/IntRawDataBufferTest.java | 28 + .../buffer/raw/LongRawDataBufferTest.java | 28 + .../buffer/raw/ShortRawDataBufferTest.java | 28 + .../impl/dense/BooleanDenseNdArrayTest.java | 35 + .../impl/dense/ByteDenseNdArrayTest.java | 35 + .../ndarray/impl/dense/DenseNdArrayTest.java | 51 + .../impl/dense/DoubleDenseNdArrayTest.java | 35 + .../impl/dense/FloatDenseNdArrayTest.java | 35 + .../impl/dense/IntDenseNdArrayTest.java | 35 + .../impl/dense/LongDenseNdArrayTest.java | 35 + .../impl/dense/ShortDenseNdArrayTest.java | 35 + .../impl/dense/StringDenseNdArrayTest.java | 43 + .../impl/sequence/ElementSequenceTest.java | 145 + ndarray/src/test/resources/COPYRIGHT.txt | 1 + ndarray/src/test/resources/castle.jpg | Bin 0 -> 436164 bytes 176 files changed, 21797 insertions(+) create mode 100644 ndarray/pom.xml create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/BooleanNdArray.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/ByteNdArray.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/DoubleNdArray.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/FloatNdArray.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/IllegalRankException.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/IntNdArray.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/LongNdArray.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/NdArray.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/NdArraySequence.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/NdArrays.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/Shape.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/Shaped.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/ShortNdArray.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/buffer/BooleanDataBuffer.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/buffer/ByteDataBuffer.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/buffer/DataBuffer.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/buffer/DataBufferWindow.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/buffer/DataBuffers.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/buffer/DataStorageVisitor.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/buffer/DoubleDataBuffer.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/buffer/FloatDataBuffer.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/buffer/IntDataBuffer.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/buffer/LongDataBuffer.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/buffer/ShortDataBuffer.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/BooleanDataLayout.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/ByteDataLayout.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/DataLayout.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/DataLayouts.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/DoubleDataLayout.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/FloatDataLayout.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/IntDataLayout.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/LongDataLayout.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/ShortDataLayout.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/AbstractNdArray.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/Validator.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/AbstractDataBuffer.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/AbstractDataBufferWindow.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/Validator.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/AbstractDataBufferAdapter.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/BooleanDataBufferAdapter.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/ByteDataBufferAdapter.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/DataBufferAdapter.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/DataBufferAdapterFactory.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/DoubleDataBufferAdapter.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/FloatDataBufferAdapter.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/IntDataBufferAdapter.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/LongDataBufferAdapter.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/ShortDataBufferAdapter.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/Bfloat16Layout.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/BoolLayout.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/Float16Layout.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/StringLayout.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/ArrayDataBuffer.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BitSetDataBuffer.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BooleanArrayDataBuffer.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/MiscDataBufferFactory.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/AbstractNioDataBuffer.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/ByteNioDataBuffer.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/DoubleNioDataBuffer.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/FloatNioDataBuffer.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/IntNioDataBuffer.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/LongNioDataBuffer.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/NioDataBufferFactory.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/ShortNioDataBuffer.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/AbstractRawDataBuffer.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/BooleanRawDataBuffer.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/ByteRawDataBuffer.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/DoubleRawDataBuffer.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/FloatRawDataBuffer.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/IntRawDataBuffer.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/LongRawDataBuffer.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/RawDataBufferFactory.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/RawDataBufferWindow.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/ShortRawDataBuffer.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/UnsafeMemoryHandle.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/UnsafeReference.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/AbstractDenseNdArray.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/BooleanDenseNdArray.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ByteDenseNdArray.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DataTransfer.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DenseNdArray.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DoubleDenseNdArray.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/FloatDenseNdArray.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/IntDenseNdArray.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/LongDenseNdArray.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ShortDenseNdArray.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/Validator.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/AbstractDimension.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/Axis.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/Dimension.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/DimensionalSpace.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/IndexedDimension.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/ReducedDimension.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/RelativeDimensionalSpace.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/CoordinatesIncrementor.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/FastElementSequence.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/IndexedPositionIterator.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/IndexedSequentialPositionIterator.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/NdPositionIterator.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/PositionIterator.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/SequentialPositionIterator.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/SingleElementSequence.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/SlicingElementSequence.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/index/All.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/index/At.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/index/Ellipsis.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/index/Hyperslab.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/index/Index.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/index/Indices.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/index/NewAxis.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/index/Sequence.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/index/Slice.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/index/SliceFrom.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/index/SliceTo.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/index/Step.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/BooleanNdArrayTestBase.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/ByteNdArrayTestBase.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/DoubleNdArrayTestBase.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/FloatNdArrayTestBase.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/IndexTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/IntNdArrayTestBase.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/LongNdArrayTestBase.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/NdArrayTestBase.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/ShapeTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/ShortNdArrayTestBase.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/StdArraysTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/benchmark/NdArrayBenchmark.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/buffer/BooleanDataBufferTestBase.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/buffer/ByteDataBufferTestBase.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/buffer/DataBufferTestBase.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/buffer/DoubleDataBufferTestBase.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/buffer/FloatDataBufferTestBase.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/buffer/IntDataBufferTestBase.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/buffer/LongDataBufferTestBase.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/buffer/ShortDataBufferTestBase.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/BigIntegerDataBufferAdapterTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/BooleanDataBufferAdapterTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/ByteDataBufferAdapterTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/DoubleDataBufferAdapterTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/FloatDataBufferAdapterTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/IntDataBufferAdapterTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/LongDataBufferAdapterTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/ShortDataBufferAdapterTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/layout/Bfloat16LayoutTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/layout/BoolLayoutTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/layout/Float16LayoutTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/misc/ArrayDataBufferTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/misc/BitSetDataBufferTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/misc/StringArrayDataBufferTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/ByteNioDataBufferTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/DoubleNioDataBufferTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/FloatNioDataBufferTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/IntNioDataBufferTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/LongNioDataBufferTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/ShortNioDataBufferTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/BooleanRawDataBufferTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/ByteRawDataBufferTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/DoubleRawDataBufferTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/FloatRawDataBufferTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/IntRawDataBufferTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/LongRawDataBufferTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/ShortRawDataBufferTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/BooleanDenseNdArrayTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/ByteDenseNdArrayTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/DenseNdArrayTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/DoubleDenseNdArrayTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/FloatDenseNdArrayTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/IntDenseNdArrayTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/LongDenseNdArrayTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/ShortDenseNdArrayTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/StringDenseNdArrayTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/sequence/ElementSequenceTest.java create mode 100644 ndarray/src/test/resources/COPYRIGHT.txt create mode 100644 ndarray/src/test/resources/castle.jpg diff --git a/ndarray/pom.xml b/ndarray/pom.xml new file mode 100644 index 00000000000..d852f9bcd32 --- /dev/null +++ b/ndarray/pom.xml @@ -0,0 +1,68 @@ + + + 4.0.0 + + + org.tensorflow + tensorflow-java-ndarray + 0.4.0-SNAPSHOT + + ndarray + jar + + Java NdArray Library + + Utility library for N-dimensional data I/O operations in Java. + + + + org.tensorflow.ndarray + + + + + + maven-jar-plugin + 3.2.0 + + + + ${java.module.name} + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.22.2 + + 1 + false + -Xmx2G -XX:MaxPermSize=256m + + **/*Test.java + + + + + + + diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/BooleanNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/BooleanNdArray.java new file mode 100644 index 00000000000..5b4bedb1c84 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/BooleanNdArray.java @@ -0,0 +1,108 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray; + +import org.tensorflow.ndarray.buffer.BooleanDataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.index.Index; + +/** + * An {@link NdArray} of booleans. + */ +public interface BooleanNdArray extends NdArray { + + /** + * Returns the boolean value of the scalar found at the given coordinates. + * + *

To access the scalar element, the number of coordinates provided must be equal to the number + * of dimensions of this array (i.e. its rank). For example: + *

{@code
+   *  BooleanNdArray matrix = NdArrays.ofBooleans(shape(2, 2));  // matrix rank = 2
+   *  matrix.getBoolean(0, 1);  // succeeds, returns false
+   *  matrix.getBoolean(0);  // throws IllegalRankException
+   *
+   *  BooleanNdArray scalar = matrix.get(0, 1);  // scalar rank = 0
+   *  scalar.getBoolean();  // succeeds, returns false
+   * }
+ * + * @param coordinates coordinates of the scalar to resolve + * @return value of that scalar + * @throws IndexOutOfBoundsException if some coordinates are outside the limits of their respective dimension + * @throws IllegalRankException if number of coordinates is not sufficient to access a scalar element + */ + boolean getBoolean(long... coordinates); + + /** + * Assigns the boolean value of the scalar found at the given coordinates. + * + *

To access the scalar element, the number of coordinates provided must be equal to the number + * of dimensions of this array (i.e. its rank). For example: + *

{@code
+   *  BooleanNdArray matrix = NdArrays.ofBooleans(shape(2, 2));  // matrix rank = 2
+   *  matrix.setBoolean(true, 0, 1);  // succeeds
+   *  matrix.setBoolean(true, 0);  // throws IllegalRankException
+   *
+   *  BooleanNdArray scalar = matrix.get(0, 1);  // scalar rank = 0
+   *  scalar.setBoolean(true);  // succeeds
+   * }
+ * + * @param value the value to assign + * @param coordinates coordinates of the scalar to assign + * @return this array + * @throws IndexOutOfBoundsException if some coordinates are outside the limits of their respective dimension + * @throws IllegalRankException if number of coordinates is not sufficient to access a scalar element + */ + BooleanNdArray setBoolean(boolean value, long... coordinates); + + @Override + BooleanNdArray slice(Index... indices); + + @Override + BooleanNdArray get(long... coordinates); + + @Override + BooleanNdArray set(NdArray src, long... coordinates); + + @Override + default Boolean getObject(long... coordinates) { + return getBoolean(coordinates); + } + + @Override + default BooleanNdArray setObject(Boolean value, long... coordinates) { + return setBoolean(value, coordinates); + } + + @Override + NdArraySequence elements(int dimensionIdx); + + @Override + NdArraySequence scalars(); + + @Override + BooleanNdArray copyTo(NdArray dst); + + @Override + BooleanNdArray read(DataBuffer dst); + + BooleanNdArray read(BooleanDataBuffer dst); + + @Override + BooleanNdArray write(DataBuffer src); + + BooleanNdArray write(BooleanDataBuffer src); +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/ByteNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/ByteNdArray.java new file mode 100644 index 00000000000..0e6f118f5ef --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/ByteNdArray.java @@ -0,0 +1,108 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray; + +import org.tensorflow.ndarray.buffer.ByteDataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.index.Index; + +/** + * An {@link NdArray} of bytes. + */ +public interface ByteNdArray extends NdArray { + + /** + * Returns the byte value of the scalar found at the given coordinates. + * + *

To access the scalar element, the number of coordinates provided must be equal to the number + * of dimensions of this array (i.e. its rank). For example: + *

{@code
+   *  ByteNdArray matrix = NdArrays.ofBytes(shape(2, 2));  // matrix rank = 2
+   *  matrix.getByte(0, 1);  // succeeds, returns 0
+   *  matrix.getByte(0);  // throws IllegalRankException
+   *
+   *  ByteNdArray scalar = matrix.get(0, 1);  // scalar rank = 0
+   *  scalar.getByte();  // succeeds, returns 0
+   * }
+ * + * @param coordinates coordinates of the scalar to resolve + * @return value of that scalar + * @throws IndexOutOfBoundsException if some coordinates are outside the limits of their respective dimension + * @throws IllegalRankException if number of coordinates is not sufficient to access a scalar element + */ + byte getByte(long... coordinates); + + /** + * Assigns the byte value of the scalar found at the given coordinates. + * + *

To access the scalar element, the number of coordinates provided must be equal to the number + * of dimensions of this array (i.e. its rank). For example: + *

{@code
+   *  ByteNdArray matrix = NdArrays.ofBytes(shape(2, 2));  // matrix rank = 2
+   *  matrix.setByte(10, 0, 1);  // succeeds
+   *  matrix.setByte(10, 0);  // throws IllegalRankException
+   *
+   *  ByteNdArray scalar = matrix.get(0, 1);  // scalar rank = 0
+   *  scalar.setByte(10);  // succeeds
+   * }
+ * + * @param value the value to assign + * @param coordinates coordinates of the scalar to assign + * @return this array + * @throws IndexOutOfBoundsException if some coordinates are outside the limits of their respective dimension + * @throws IllegalRankException if number of coordinates is not sufficient to access a scalar element + */ + ByteNdArray setByte(byte value, long... coordinates); + + @Override + ByteNdArray slice(Index... indices); + + @Override + ByteNdArray get(long... coordinates); + + @Override + ByteNdArray set(NdArray src, long... coordinates); + + @Override + default Byte getObject(long... coordinates) { + return getByte(coordinates); + } + + @Override + default ByteNdArray setObject(Byte value, long... coordinates) { + return setByte(value, coordinates); + } + + @Override + NdArraySequence elements(int dimensionIdx); + + @Override + NdArraySequence scalars(); + + @Override + ByteNdArray copyTo(NdArray dst); + + @Override + ByteNdArray read(DataBuffer dst); + + ByteNdArray read(ByteDataBuffer dst); + + @Override + ByteNdArray write(DataBuffer src); + + ByteNdArray write(ByteDataBuffer src); +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/DoubleNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/DoubleNdArray.java new file mode 100644 index 00000000000..80e99b01877 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/DoubleNdArray.java @@ -0,0 +1,108 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray; + +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DoubleDataBuffer; +import org.tensorflow.ndarray.index.Index; + +/** + * An {@link NdArray} of doubles. + */ +public interface DoubleNdArray extends NdArray { + + /** + * Returns the double value of the scalar found at the given coordinates. + * + *

To access the scalar element, the number of coordinates provided must be equal to the number + * of dimensions of this array (i.e. its rank). For example: + *

{@code
+   *  DoubleNdArray matrix = NdArrays.ofDoubles(shape(2, 2));  // matrix rank = 2
+   *  matrix.getDouble(0, 1);  // succeeds, returns 0.0
+   *  matrix.getDouble(0);  // throws IllegalRankException
+   *
+   *  DoubleNdArray scalar = matrix.get(0, 1);  // scalar rank = 0
+   *  scalar.getDouble();  // succeeds, returns 0.0
+   * }
+ * + * @param coordinates coordinates of the scalar to resolve + * @return value of that scalar + * @throws IndexOutOfBoundsException if some coordinates are outside the limits of their respective dimension + * @throws IllegalRankException if number of coordinates is not sufficient to access a scalar element + */ + double getDouble(long... coordinates); + + /** + * Assigns the double value of the scalar found at the given coordinates. + * + *

To access the scalar element, the number of coordinates provided must be equal to the number + * of dimensions of this array (i.e. its rank). For example: + *

{@code
+   *  DoubleNdArray matrix = NdArrays.ofDoubles(shape(2, 2));  // matrix rank = 2
+   *  matrix.setDouble(10.0, 0, 1);  // succeeds
+   *  matrix.setDouble(10.0, 0);  // throws IllegalRankException
+   *
+   *  DoubleNdArray scalar = matrix.get(0, 1);  // scalar rank = 0
+   *  scalar.setDouble(10.0);  // succeeds
+   * }
+ * + * @param value value to assign + * @param coordinates coordinates of the scalar to assign + * @return this array + * @throws IndexOutOfBoundsException if some coordinates are outside the limits of their respective dimension + * @throws IllegalRankException if number of coordinates is not sufficient to access a scalar element + */ + DoubleNdArray setDouble(double value, long... coordinates); + + @Override + DoubleNdArray slice(Index... indices); + + @Override + DoubleNdArray get(long... coordinates); + + @Override + DoubleNdArray set(NdArray src, long... coordinates); + + @Override + default Double getObject(long... coordinates) { + return getDouble(coordinates); + } + + @Override + default DoubleNdArray setObject(Double value, long... coordinates) { + return setDouble(value, coordinates); + } + + @Override + NdArraySequence elements(int dimensionIdx); + + @Override + NdArraySequence scalars(); + + @Override + DoubleNdArray copyTo(NdArray dst); + + @Override + DoubleNdArray read(DataBuffer dst); + + DoubleNdArray read(DoubleDataBuffer dst); + + @Override + DoubleNdArray write(DataBuffer src); + + DoubleNdArray write(DoubleDataBuffer src); +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/FloatNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/FloatNdArray.java new file mode 100644 index 00000000000..8d4fbf5c1ed --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/FloatNdArray.java @@ -0,0 +1,108 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray; + +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.FloatDataBuffer; +import org.tensorflow.ndarray.index.Index; + +/** + * An {@link NdArray} of floats. + */ +public interface FloatNdArray extends NdArray { + + /** + * Returns the float value of the scalar found at the given coordinates. + * + *

To access the scalar element, the number of coordinates provided must be equal to the number + * of dimensions of this array (i.e. its rank). For example: + *

{@code
+   *  FloatNdArray matrix = NdArrays.ofFloats(shape(2, 2));  // matrix rank = 2
+   *  matrix.getFloat(0, 1);  // succeeds, returns 0.0f
+   *  matrix.getFloat(0);  // throws IllegalRankException
+   *
+   *  FloatNdArray scalar = matrix.get(0, 1);  // scalar rank = 0
+   *  scalar.getFloat();  // succeeds, returns 0.0f
+   * }
+ * + * @param coordinates coordinates of the scalar to resolve + * @return value of that scalar + * @throws IndexOutOfBoundsException if some coordinates are outside the limits of their respective dimension + * @throws IllegalRankException if number of coordinates is not sufficient to access a scalar element + */ + float getFloat(long... coordinates); + + /** + * Assigns the float value of the scalar found at the given coordinates. + * + *

To access the scalar element, the number of coordinates provided must be equal to the number + * of dimensions of this array (i.e. its rank). For example: + *

{@code
+   *  FloatNdArray matrix = NdArrays.ofFloats(shape(2, 2));  // matrix rank = 2
+   *  matrix.setFloat(10.0f, 0, 1);  // succeeds
+   *  matrix.setFloat(10.0f, 0);  // throws IllegalRankException
+   *
+   *  FloatNdArray scalar = matrix.get(0, 1);  // scalar rank = 0
+   *  scalar.setFloat(10.0f);  // succeeds
+   * }
+ * + * @param value value to assign + * @param coordinates coordinates of the scalar to assign + * @return this array + * @throws IndexOutOfBoundsException if some coordinates are outside the limits of their respective dimension + * @throws IllegalRankException if number of coordinates is not sufficient to access a scalar element + */ + FloatNdArray setFloat(float value, long... coordinates); + + @Override + FloatNdArray slice(Index... coordinates); + + @Override + FloatNdArray get(long... coordinates); + + @Override + FloatNdArray set(NdArray src, long... coordinates); + + @Override + default Float getObject(long... coordinates) { + return getFloat(coordinates); + } + + @Override + default FloatNdArray setObject(Float value, long... coordinates) { + return setFloat(value, coordinates); + } + + @Override + NdArraySequence elements(int dimensionIdx); + + @Override + NdArraySequence scalars(); + + @Override + FloatNdArray copyTo(NdArray dst); + + @Override + FloatNdArray read(DataBuffer dst); + + FloatNdArray read(FloatDataBuffer dst); + + @Override + FloatNdArray write(DataBuffer src); + + FloatNdArray write(FloatDataBuffer src); +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/IllegalRankException.java b/ndarray/src/main/java/org/tensorflow/ndarray/IllegalRankException.java new file mode 100644 index 00000000000..b816d338d7e --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/IllegalRankException.java @@ -0,0 +1,27 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray; + +/** + * Exception thrown when an operation cannot be completed because of the rank of the targeted array. + */ +public class IllegalRankException extends IllegalArgumentException { + + public IllegalRankException(String message) { + super(message); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/IntNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/IntNdArray.java new file mode 100644 index 00000000000..aa2cc652d69 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/IntNdArray.java @@ -0,0 +1,108 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray; + +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.IntDataBuffer; +import org.tensorflow.ndarray.index.Index; + +/** + * An {@link NdArray} of integers. + */ +public interface IntNdArray extends NdArray { + + /** + * Returns the integer value of the scalar found at the given coordinates. + * + *

To access the scalar element, the number of coordinates provided must be equal to the number + * of dimensions of this array (i.e. its rank). For example: + *

{@code
+   *  IntNdArray matrix = NdArrays.ofInts(shape(2, 2));  // matrix rank = 2
+   *  matrix.getInt(0, 1);  // succeeds, returns 0
+   *  matrix.getInt(0);  // throws IllegalRankException
+   *
+   *  IntNdArray scalar = matrix.get(0, 1);  // scalar rank = 0
+   *  scalar.getInt();  // succeeds, returns 0
+   * }
+ * + * @param coordinates coordinates of the scalar to resolve + * @return value of that scalar + * @throws IndexOutOfBoundsException if some coordinates are outside the limits of their respective dimension + * @throws IllegalRankException if number of coordinates is not sufficient to access a scalar element + */ + int getInt(long... coordinates); + + /** + * Assigns the integer value of the scalar found at the given coordinates. + * + *

To access the scalar element, the number of coordinates provided must be equal to the number + * of dimensions of this array (i.e. its rank). For example: + *

{@code
+   *  IntNdArray matrix = NdArrays.ofInts(shape(2, 2));  // matrix rank = 2
+   *  matrix.setInt(10, 0, 1);  // succeeds
+   *  matrix.setInt(10, 0);  // throws IllegalRankException
+   *
+   *  IntNdArray scalar = matrix.get(0, 1);  // scalar rank = 0
+   *  scalar.setInt(10);  // succeeds
+   * }
+ * + * @param value value to assign + * @param coordinates coordinates of the scalar to assign + * @return this array + * @throws IndexOutOfBoundsException if some coordinates are outside the limits of their respective dimension + * @throws IllegalRankException if number of coordinates is not sufficient to access a scalar element + */ + IntNdArray setInt(int value, long... coordinates); + + @Override + IntNdArray slice(Index... indices); + + @Override + IntNdArray get(long... coordinates); + + @Override + IntNdArray set(NdArray src, long... coordinates); + + @Override + default Integer getObject(long... coordinates) { + return getInt(coordinates); + } + + @Override + default IntNdArray setObject(Integer value, long... coordinates) { + return setInt(value, coordinates); + } + + @Override + NdArraySequence elements(int dimensionIdx); + + @Override + NdArraySequence scalars(); + + @Override + IntNdArray copyTo(NdArray dst); + + @Override + IntNdArray read(DataBuffer dst); + + IntNdArray read(IntDataBuffer dst); + + @Override + IntNdArray write(DataBuffer src); + + IntNdArray write(IntDataBuffer src); +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/LongNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/LongNdArray.java new file mode 100644 index 00000000000..3e5be6dc7ec --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/LongNdArray.java @@ -0,0 +1,108 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray; + +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.LongDataBuffer; +import org.tensorflow.ndarray.index.Index; + +/** + * An {@link NdArray} of longs. + */ +public interface LongNdArray extends NdArray { + + /** + * Returns the long value of the scalar found at the given coordinates. + * + *

To access the scalar element, the number of coordinates provided must be equal to the number + * of dimensions of this array (i.e. its rank). For example: + *

{@code
+   *  LongNdArray matrix = NdArrays.ofLongs(shape(2, 2));  // matrix rank = 2
+   *  matrix.getLong(0, 1);  // succeeds, returns 0L
+   *  matrix.getLong(0);  // throws IllegalRankException
+   *
+   *  LongNdArray scalar = matrix.get(0, 1);  // scalar rank = 0
+   *  scalar.getLong();  // succeeds, returns 0L
+   * }
+ * + * @param coordinates coordinates of the scalar to resolve + * @return value of that scalar + * @throws IndexOutOfBoundsException if some coordinates are outside the limits of their respective dimension + * @throws IllegalRankException if number of coordinates is not sufficient to access a scalar element + */ + long getLong(long... coordinates); + + /** + * Assigns the long value of the scalar found at the given coordinates. + * + *

To access the scalar element, the number of coordinates provided must be equal to the number + * of dimensions of this array (i.e. its rank). For example: + *

{@code
+   *  LongNdArray matrix = NdArrays.ofLongs(shape(2, 2));  // matrix rank = 2
+   *  matrix.setLong(10L, 0, 1);  // succeeds
+   *  matrix.setLong(10L, 0);  // throws IllegalRankException
+   *
+   *  LongNdArray scalar = matrix.get(0, 1);  // scalar rank = 0
+   *  scalar.setLong(10L);  // succeeds
+   * }
+ * + * @param value value to assign + * @param coordinates coordinates of the scalar to assign + * @return this array + * @throws IndexOutOfBoundsException if some coordinates are outside the limits of their respective dimension + * @throws IllegalRankException if number of coordinates is not sufficient to access a scalar element + */ + LongNdArray setLong(long value, long... coordinates); + + @Override + LongNdArray slice(Index... indices); + + @Override + LongNdArray get(long... coordinates); + + @Override + LongNdArray set(NdArray src, long... coordinates); + + @Override + default Long getObject(long... coordinates) { + return getLong(coordinates); + } + + @Override + default LongNdArray setObject(Long value, long... coordinates) { + return setLong(value, coordinates); + } + + @Override + NdArraySequence elements(int dimensionIdx); + + @Override + NdArraySequence scalars(); + + @Override + LongNdArray copyTo(NdArray dst); + + @Override + LongNdArray read(DataBuffer dst); + + LongNdArray read(LongDataBuffer dst); + + @Override + LongNdArray write(DataBuffer src); + + LongNdArray write(LongDataBuffer src); +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/NdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/NdArray.java new file mode 100644 index 00000000000..6686abd9148 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/NdArray.java @@ -0,0 +1,302 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray; + +import java.util.function.BiConsumer; +import java.util.function.Consumer; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.index.Index; + +/** + * A data structure of N-dimensions. + * + *

The `NdArray` interface creates an abstraction between the physical storage of a data record, + * which can be linear or segmented, and its logical representation. In general, they achieve + * better performances than standard multi-dimensional arrays in Java by mapping directly linear + * data segments in memory. + * + *

Like {@link DataBuffer}, {@code NdArray} instances support 64-bits indexing so they can be + * used to map very large data records. They also support special coordinates that allow traversing + * their values in any direction or to select only a subset of them. + * + *

Example of usage: + *

{@code
+ *    // Creates a 2x3x2 matrix (of rank 3)
+ *    FloatNdArray matrix3d = NdArrays.ofFloats(shape(2, 3, 2));
+ *
+ *    // Initialize sub-matrices data with vectors
+ *    matrix.set(NdArrays.vectorOf(1.0f, 2.0f), 0, 0)
+ *          .set(NdArrays.vectorOf(3.0f, 4.0f), 0, 1)
+ *          .set(NdArrays.vectorOf(5.0f, 6.0f), 0, 2)
+ *          .set(NdArrays.vectorOf(7.0f, 8.0f), 1, 0)
+ *          .set(NdArrays.vectorOf(9.0f, 10.0f), 1, 1)
+ *          .set(NdArrays.vectorOf(11.0f, 12.0f), 1, 2);
+ *
+ *    // Access the second 3x2 matrix (of rank 2)
+ *    FloatNdArray matrix = matrix3d.get(1);
+ *
+ *    // Access directly the float value at (1, 0) from the second matrix
+ *    assertEquals(9.0f, matrix.getFloat(1, 0));
+ * }
+ * + * @param the type of values to be mapped + */ +public interface NdArray extends Shaped { + + /** + * Returns a sequence of all elements at a given dimension. + * + *

Logically, the N-dimensional array can be flatten in a single vector, where the scalars of + * the {@code (n - 1)}th element precedes those of the {@code (n)}th element, for a total of + * {@link #size()} values. + * + *

For example, given a {@code n x m} matrix on the {@code [x, y]} axes, elements are iterated in + * the following order: + *

x0y0, x0y1, ..., x0ym-1, x1y0, x1y1, ..., xn-1ym-1 + * + *

The returned sequence can then be iterated to visit each elements, either by calling + * {@link NdArraySequence#forEach(Consumer)} or {@link NdArraySequence#forEachIndexed(BiConsumer)}. + *

{@code
+   *    // Iterate matrix for initializing each of its vectors
+   *    matrixOfFloats.elements(0).forEach(v -> {
+   *      v.set(vector(1.0f, 2.0f, 3.0f));
+   *    });
+   *
+   *    // Iterate a vector for reading each of its scalar
+   *    vectorOfFloats.scalars().forEachIdx((coords, s) -> {
+   *      System.out.println("Value " + s.getFloat() + " found at " + coords);
+   *    });
+   * }
+ * + * @param dimensionIdx index of the dimension + * @return an {@code NdArray} sequence + * @throws IllegalArgumentException if {@code dimensionIdx} is greater or equal to the total + * number of dimensions of this array + */ + NdArraySequence> elements(int dimensionIdx); + + /** + * Returns a sequence of all scalars in this array. + * + *

This is equivalent to call {@code elements(shape().numDimensions() - 1)} + * + * @return an {@code NdArray} sequence + */ + NdArraySequence> scalars(); + + /** + * Creates a multi-dimensional view (or slice) of this array by mapping one or more dimensions + * to the given index selectors. + * + *

Slices allow to traverse an N-dimensional array in any of its axis and/or to filter only + * elements of interest. For example, for a given matrix on the {@code [x, y]} axes, it is + * possible to iterate elements at {@code y=0} for all {@code x}. + * + *

Any changes applied to the returned slice affect the data of this array as well, as there + * is no copy involved. + * + *

Example of usage: + *

{@code
+   *    FloatNdArray matrix3d = NdArrays.ofFloats(shape(3, 2, 4));  // with [x, y, z] axes
+   *
+   *    // Iterates elements on the x axis by preserving only the 3rd value on the z axis,
+   *    // (i.e. [x, y, 2])
+   *    matrix3d.slice(all(), all(), at(2)).elements(0).forEach(m -> {
+   *      assertEquals(shape(2), m); // y=2, z=0 (scalar)
+   *    });
+   *
+   *    // Creates a slice that contains only the last element of the y axis and elements with an
+   *    // odd `z` coordinate.
+   *    FloatNdArray slice = matrix3d.slice(all(), at(1), odd());
+   *    assertEquals(shape(3, 2), slice.shape());  // x=3, y=0 (scalar), z=2 (odd coordinates)
+   *
+   *    // Iterates backward the elements on the x axis
+   *    matrix3d.slice(flip()).elements(0).forEach(m -> {
+   *      assertEquals(shape(2, 4), m);  // y=2, z=4
+   *    });
+   * }
+ * + * @param indices index selectors per dimensions, starting from dimension 0 of this array. + * @return the element resulting of the index selection + * @throws IndexOutOfBoundsException if some coordinates are outside the limits of their + * respective dimension + */ + NdArray slice(Index... indices); + + /** + * Returns the N-dimensional element of this array at the given coordinates. + * + *

Elements of any of the dimensions of this array can be retrieved. For example, if the number + * of coordinates is equal to the number of dimensions of this array, then a rank-0 (scalar) array + * is returned, which value can then be obtained by calling `array.getObject()`. + * + *

Any changes applied to the returned elements affect the data of this array as well, as there + * is no copy involved. + * + *

Note that invoking this method is an equivalent and more efficient way to slice this array + * on single scalar, i.e. {@code array.get(x, y, z)} is equal to + * {@code array.slice(at(x), at(y), at(z))} + * + * @param coordinates coordinates of the element to access, none will return this array + * @return the element at this index + * @throws IndexOutOfBoundsException if some coordinates are outside the limits of their + * respective dimension + */ + NdArray get(long... coordinates); + + /** + * Assigns the value of the N-dimensional element found at the given coordinates. + * + *

The number of coordinates provided can be anywhere between 0 and rank - 1. For example: + *

{@code
+   *  FloatNdArray matrix = NdArrays.ofFloats(shape(2, 2));  // matrix rank = 2
+   *  matrix.set(vector(10.0f, 20.0f), 0);  // success
+   *  matrix.set(scalar(10.0f), 1, 0); // success
+   * }
+ * + * @param src an array of the values to assign + * @param coordinates coordinates of the element to assign + * @return this array + * @throws IndexOutOfBoundsException if some coordinates are outside the limits of their + * respective dimension + */ + NdArray set(NdArray src, long... coordinates); + + /** + * Returns the value of the scalar found at the given coordinates. + * + *

To access the scalar element, the number of coordinates provided must be equal to the number + * of dimensions of this array (i.e. its rank). For example: + *

{@code
+   *  FloatNdArray matrix = NdArrays.ofFloats(shape(2, 2));  // matrix rank = 2
+   *  matrix.getObject(0, 1);  // succeeds, returns 0.0f
+   *  matrix.getObject(0);  // throws IllegalRankException
+   *
+   *  FloatNdArray scalar = matrix.get(0, 1);  // scalar rank = 0
+   *  scalar.getObject();  // succeeds, returns 0.0f
+   * }
+ * + * Note: if this array stores values of a primitive type, prefer the usage of the specialized + * method in the subclass for that type. For example, {@code floatArray.getFloat(0); }. + * + * @param coordinates coordinates of the scalar to resolve + * @return value of that scalar + * @throws IndexOutOfBoundsException if some coordinates are outside the limits of their + * respective dimension + * @throws IllegalRankException if number of coordinates is not sufficient to access a scalar + * element + */ + T getObject(long... coordinates); + + /** + * Assigns the value of the scalar found at the given coordinates. + * + *

To access the scalar element, the number of coordinates provided must be equal to the number + * of dimensions of this array (i.e. its rank). For example: + *

{@code
+   *  FloatNdArray matrix = NdArrays.ofFloats(shape(2, 2));  // matrix rank = 2
+   *  matrix.setObject(10.0f, 0, 1);  // succeeds
+   *  matrix.setObject(10.0f, 0);  // throws IllegalRankException
+   *
+   *  FloatNdArray scalar = matrix.get(0, 1);  // scalar rank = 0
+   *  scalar.setObject(10.0f);  // succeeds
+   * }
+ * + * Note: if this array stores values of a primitive type, prefer the usage of the specialized + * method in the subclass for that type. For example, {@code floatArray.setFloat(10.0f, 0); } + * + * @param value the value to assign + * @param coordinates coordinates of the scalar to assign + * @return this array + * @throws IndexOutOfBoundsException if some coordinates are outside the limits of their + * respective dimension + * @throws IllegalRankException if number of coordinates is not sufficient to access a scalar + * element + */ + NdArray setObject(T value, long... coordinates); + + /** + * Copy the content of this array to the destination array. + * + *

The {@link #shape()} of the destination array must be equal to the shape of this array, or + * an exception is thrown. After the copy, the content of both arrays can be altered + * independently, without affecting each other. + * + * @param dst array to receive a copy of the content of this array + * @return this array + * @throws IllegalArgumentException if the shape of {@code dst} is not equal to the shape of this + * array + */ + NdArray copyTo(NdArray dst); + + /** + * Read the content of this N-dimensional array into the destination buffer. + * + *

The size of the buffer must be equal or greater to the {@link #size()} of this + * array, or an exception is thrown. After the copy, content of the buffer and of the array can be + * altered independently, without affecting each other. + * + * @param dst the destination buffer + * @return this array + * @throws java.nio.BufferOverflowException if the buffer cannot hold the content of this array + * @see DataBuffer#size() + */ + NdArray read(DataBuffer dst); + + /** + * Write the content of this N-dimensional array from the source buffer. + * + *

The size of the buffer must be equal or greater to the {@link #size()} of this + * array, or an exception is thrown. After the copy, content of the buffer and of the array can be + * altered independently, without affecting each other. + * + * @param src the source buffer + * @return this array + * @throws java.nio.BufferUnderflowException if the buffer has not enough remaining data to write + * into this array + * @see DataBuffer#size() + */ + NdArray write(DataBuffer src); + + /** + * Checks equality between n-dimensional arrays. + * + *

An array is equal to another object if this object is another {@link NdArray} of the + * same shape, type and the elements are equal and in the same order. For example: + * + *

{@code
+   * IntNdArray array = NdArrays.ofInts(Shape.of(2, 2))
+   *    .set(NdArrays.vectorOf(1, 2), 0)
+   *    .set(NdArrays.vectorOf(3, 4), 1);
+   *
+   * assertEquals(array, StdArrays.ndCopyOf(new int[][] {{1, 2}, {3, 4}}));  // true
+   * assertEquals(array, StdArrays.ndCopyOf(new Integer[][] {{1, 2}, {3, 4}}));  // true, as Integers are equal to ints
+   * assertNotEquals(array, NdArrays.vectorOf(1, 2, 3, 4));  // false, different shapes
+   * assertNotEquals(array, StdArrays.ndCopyOf(new int[][] {{3, 4}, {1, 2}}));  // false, different order
+   * assertNotEquals(array, StdArrays.ndCopyOf(new long[][] {{1L, 2L}, {3L, 4L}}));  // false, different types
+   * }
+ * + *

Note that the computation required to verify equality between two arrays can be expensive + * in some cases and therefore, it is recommended to not use this method in a critical path + * where performances matter. + * + * @param obj object to compare this array with + * @return true if this array is equal to the provided object + */ + @Override + boolean equals(Object obj); +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/NdArraySequence.java b/ndarray/src/main/java/org/tensorflow/ndarray/NdArraySequence.java new file mode 100644 index 00000000000..afb930e278b --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/NdArraySequence.java @@ -0,0 +1,67 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray; + +import java.util.function.BiConsumer; +import org.tensorflow.ndarray.buffer.DataBufferWindow; + +/** + * A sequence of elements of an N-dimensional array. + * + *

An {@code NdArraySequence} is used to traverse an {@code NdArray} in a given dimension + * and visit each of its elements. For example, given a {@code n x m} matrix on the {@code [x, y]} axes, + * elements are iterated in the following order: + *

x0y0, x0y1, ..., x0ym-1, x1y0, x1y1, ..., xn-1ym-1 + * + * @param data type of the array being iterated + */ +public interface NdArraySequence> extends Iterable { + + /** + * Visit each elements of this iteration and their respective coordinates. + * + *

Important: the consumer method should not keep a reference to the coordinates + * as they might be mutable and reused during the iteration to improve performance. + * + * @param consumer method to invoke for each elements + */ + void forEachIndexed(BiConsumer consumer); + + /** + * Returns each element as a new slice. + * + *

Unlike conventional Java collections, elements of a {@code NdArraySequence} are transient, i.e. new {@code NdArray} + * instances are allocated for each iteration. To improve performance, the same instance can be recycled to view + * all elements of this sequence, using a {@link DataBufferWindow}. + * + *

In some cases though, it might be preferable to disable such optimizations to ensure that each element returned is a + * new slice of the original array. For example, if one or more elements visited must live beyond the scope of the sequence + * iteration, {@code asSlices()} makes sure that all elements returned by the sequence are unique instances. + * + *

{@code
+   *     final List vectors = new ArrayList<>();
+   *     IntNdArray matrix = NdArrays.ofInts(Shape.of(6, 6));
+   *     ndArray.elements(0).forEach(e -> vectors::add);  // Not safe, as `e` might always be the same recycled instance
+   *     ndArray.elements(0).asSlices().forEach(e -> vectors::add);  // Safe, each `e` is a distinct NdArray instance
+   * }
+ * + * @return a sequence that returns each elements iterated as a new slice + * @see DataBufferWindow + */ + NdArraySequence asSlices(); +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/NdArrays.java b/ndarray/src/main/java/org/tensorflow/ndarray/NdArrays.java new file mode 100644 index 00000000000..8ad55cae7ed --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/NdArrays.java @@ -0,0 +1,495 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray; + +import org.tensorflow.ndarray.impl.dense.DenseNdArray; +import org.tensorflow.ndarray.impl.dense.IntDenseNdArray; +import org.tensorflow.ndarray.buffer.BooleanDataBuffer; +import org.tensorflow.ndarray.buffer.ByteDataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.buffer.DoubleDataBuffer; +import org.tensorflow.ndarray.buffer.FloatDataBuffer; +import org.tensorflow.ndarray.buffer.IntDataBuffer; +import org.tensorflow.ndarray.buffer.LongDataBuffer; +import org.tensorflow.ndarray.buffer.ShortDataBuffer; +import org.tensorflow.ndarray.impl.dense.BooleanDenseNdArray; +import org.tensorflow.ndarray.impl.dense.ByteDenseNdArray; +import org.tensorflow.ndarray.impl.dense.DoubleDenseNdArray; +import org.tensorflow.ndarray.impl.dense.FloatDenseNdArray; +import org.tensorflow.ndarray.impl.dense.LongDenseNdArray; +import org.tensorflow.ndarray.impl.dense.ShortDenseNdArray; + +/** + * Utility class for instantiating {@link NdArray} objects. + */ +public final class NdArrays { + + // BYTE ARRAYS + + /** + * Creates byte scalar (rank 0) initialized with the given value. + * + * @param value scalar value + * @return new byte scalar + */ + public static ByteNdArray scalarOf(byte value) { + return ofBytes(Shape.scalar()).setByte(value); + } + + /** + * Creates a byte vector (rank 1) initialized with the given values. + * + *

Modifying the data of the returned vector will also impact the values in the array + * passed in parameter. + * + * @param values vector values + * @return new byte vector + * @throws IllegalArgumentException if values is null + */ + public static ByteNdArray vectorOf(byte... values) { + if (values == null) { + throw new IllegalArgumentException("Values cannot be null"); + } + return wrap(Shape.of(values.length), DataBuffers.of(values, false, false)); + } + + /** + * Creates an N-dimensional array of bytes of the given shape. + * + *

All values are initialized to zeros. + * + * @param shape shape of the array + * @return new byte N-dimensional array + * @throws IllegalArgumentException if shape is null or has unknown dimensions + */ + public static ByteNdArray ofBytes(Shape shape) { + if (shape == null) { + throw new IllegalArgumentException("Shape cannot be null"); + } + return wrap(shape, DataBuffers.ofBytes(shape.size())); + } + + /** + * Wraps a buffer in a byte N-dimensional array of a given shape. + * + * @param shape shape of the array + * @param buffer buffer to wrap + * @return new byte N-dimensional array + * @throws IllegalArgumentException if shape is null, has unknown dimensions or has size bigger + * in the buffer size + */ + public static ByteNdArray wrap(Shape shape, ByteDataBuffer buffer) { + return ByteDenseNdArray.create(buffer, shape); + } + + // LONG ARRAYS + + /** + * Creates long scalar (rank 0) initialized with the given value. + * + * @param value scalar value + * @return new long scalar + */ + public static LongNdArray scalarOf(long value) { + return ofLongs(Shape.scalar()).setLong(value); + } + + /** + * Creates a long vector (rank 1) initialized with the given values. + * + *

Modifying the data of the returned vector will also impact the values in the array + * passed in parameter. + * + * @param values vector values + * @return new long vector + * @throws IllegalArgumentException if values is null + */ + public static LongNdArray vectorOf(long... values) { + if (values == null) { + throw new IllegalArgumentException(); + } + return wrap(Shape.of(values.length), DataBuffers.of(values, false, false)); + } + + /** + * Creates an N-dimensional array of longs of the given shape. + * + *

All values are initialized to zeros. + * + * @param shape shape of the array + * @return new long N-dimensional array + * @throws IllegalArgumentException if shape is null or has unknown dimensions + */ + public static LongNdArray ofLongs(Shape shape) { + return wrap(shape, DataBuffers.ofLongs(shape.size())); + } + + /** + * Wraps a buffer in a long N-dimensional array of a given shape. + * + * @param shape shape of the array + * @param buffer buffer to wrap + * @return new long N-dimensional array + * @throws IllegalArgumentException if shape is null, has unknown dimensions or has size bigger + * in the buffer size + */ + public static LongNdArray wrap(Shape shape, LongDataBuffer buffer) { + return LongDenseNdArray.create(buffer, shape); + } + + // INT ARRAYS + + /** + * Creates long scalar (rank 0) initialized with the given value. + * + * @param value scalar value + * @return new long scalar + */ + public static IntNdArray scalarOf(int value) { + return ofInts(Shape.scalar()).setInt(value); + } + + /** + * Creates a int vector (rank 1) initialized with the given values. + * + *

Modifying the data of the returned vector will also impact the values in the array + * passed in parameter. + * + * @param values vector values + * @return new int vector + * @throws IllegalArgumentException if values is null + */ + public static IntNdArray vectorOf(int... values) { + if (values == null) { + throw new IllegalArgumentException(); + } + return wrap(Shape.of(values.length), DataBuffers.of(values, false, false)); + } + + /** + * Creates an N-dimensional array of ints of the given shape. + * + *

All values are initialized to zeros. + * + * @param shape shape of the array + * @return new int N-dimensional array + * @throws IllegalArgumentException if shape is null or has unknown dimensions + */ + public static IntNdArray ofInts(Shape shape) { + return wrap(shape, DataBuffers.ofInts(shape.size())); + } + + /** + * Wraps a buffer in an int N-dimensional array of a given shape. + * + * @param shape shape of the array + * @param buffer buffer to wrap + * @return new int N-dimensional array + * @throws IllegalArgumentException if shape is null, has unknown dimensions or has size bigger + * in the buffer size + */ + public static IntNdArray wrap(Shape shape, IntDataBuffer buffer) { + return IntDenseNdArray.create(buffer, shape); + } + + // SHORT ARRAYS + + /** + * Creates short scalar (rank 0) initialized with the given value. + * + * @param value scalar value + * @return new short scalar + */ + public static ShortNdArray scalarOf(short value) { + return ofShorts(Shape.scalar()).setShort(value); + } + + /** + * Creates a short vector (rank 1) initialized with the given values. + * + *

Modifying the data of the returned vector will also impact the values in the array + * passed in parameter. + * + * @param values vector values + * @return new short vector + * @throws IllegalArgumentException if values is null + */ + public static ShortNdArray vectorOf(short... values) { + if (values == null) { + throw new IllegalArgumentException(); + } + return wrap(Shape.of(values.length), DataBuffers.of(values, false, false)); + } + + /** + * Creates an N-dimensional array of shorts of the given shape. + * + *

All values are initialized to zeros. + * + * @param shape shape of the array + * @return new short N-dimensional array + * @throws IllegalArgumentException if shape is null or has unknown dimensions + */ + public static ShortNdArray ofShorts(Shape shape) { + return wrap(shape, DataBuffers.ofShorts(shape.size())); + } + + /** + * Wraps a buffer in a short N-dimensional array of a given shape. + * + * @param shape shape of the array + * @param buffer buffer to wrap + * @return new short N-dimensional array + * @throws IllegalArgumentException if shape is null, has unknown dimensions or has size bigger + * in the buffer size + */ + public static ShortNdArray wrap(Shape shape, ShortDataBuffer buffer) { + return ShortDenseNdArray.create(buffer, shape); + } + + // FLOAT ARRAYS + + /** + * Creates float scalar (rank 0) initialized with the given value. + * + * @param value scalar value + * @return new float scalar + */ + public static FloatNdArray scalarOf(float value) { + return ofFloats(Shape.scalar()).setFloat(value); + } + + /** + * Creates a float vector (rank 1) initialized with the given values. + * + *

Modifying the data of the returned vector will also impact the values in the array + * passed in parameter. + * + * @param values vector values + * @return new float vector + * @throws IllegalArgumentException if values is null + */ + public static FloatNdArray vectorOf(float... values) { + if (values == null) { + throw new IllegalArgumentException(); + } + return wrap(Shape.of(values.length), DataBuffers.of(values, false, false)); + } + + /** + * Creates an N-dimensional array of floats of the given shape. + * + *

All values are initialized to zeros. + * + * @param shape shape of the array + * @return new float N-dimensional array + * @throws IllegalArgumentException if shape is null or has unknown dimensions + */ + public static FloatNdArray ofFloats(Shape shape) { + return wrap(shape, DataBuffers.ofFloats(shape.size())); + } + + /** + * Wraps a buffer in a float N-dimensional array of a given shape. + * + * @param shape shape of the array + * @param buffer buffer to wrap + * @return new float N-dimensional array + * @throws IllegalArgumentException if shape is null, has unknown dimensions or has size bigger + * in the buffer size + */ + public static FloatNdArray wrap(Shape shape, FloatDataBuffer buffer) { + return FloatDenseNdArray.create(buffer, shape); + } + + // DOUBLE ARRAYS + + /** + * Creates double scalar (rank 0) initialized with the given value. + * + * @param value scalar value + * @return new double scalar + */ + public static DoubleNdArray scalarOf(double value) { + return ofDoubles(Shape.scalar()).setDouble(value); + } + + /** + * Creates a double vector (rank 1) initialized with the given values. + * + *

Modifying the data of the returned vector will also impact the values in the array + * passed in parameter. + * + * @param values vector values + * @return new double vector + * @throws IllegalArgumentException if values is null + */ + public static DoubleNdArray vectorOf(double... values) { + if (values == null) { + throw new IllegalArgumentException(); + } + return wrap(Shape.of(values.length), DataBuffers.of(values, false, false)); + } + + /** + * Creates an N-dimensional array of doubles of the given shape. + * + *

All values are initialized to zeros. + * + * @param shape shape of the array + * @return new double N-dimensional array + * @throws IllegalArgumentException if shape is null or has unknown dimensions + */ + public static DoubleNdArray ofDoubles(Shape shape) { + return wrap(shape, DataBuffers.ofDoubles(shape.size())); + } + + /** + * Wraps a buffer in a double N-dimensional array of a given shape. + * + * @param shape shape of the array + * @param buffer buffer to wrap + * @return new double N-dimensional array + * @throws IllegalArgumentException if shape is null, has unknown dimensions or has size bigger + * in the buffer size + */ + public static DoubleNdArray wrap(Shape shape, DoubleDataBuffer buffer) { + return DoubleDenseNdArray.create(buffer, shape); + } + + // BOOLEAN ARRAYS + + /** + * Creates boolean scalar (rank 0) initialized with the given value. + * + * @param value scalar value + * @return new boolean scalar + */ + public static BooleanNdArray scalarOf(boolean value) { + return ofBooleans(Shape.scalar()).setBoolean(value); + } + + /** + * Creates a boolean vector (rank 1) initialized with the given values. + * + *

Modifying the data of the returned vector will also impact the values in the array + * passed in parameter. + * + * @param values vector values + * @return new boolean vector + * @throws IllegalArgumentException if values is null + */ + public static BooleanNdArray vectorOf(boolean... values) { + if (values == null) { + throw new IllegalArgumentException(); + } + return wrap(Shape.of(values.length), DataBuffers.of(values, false, false)); + } + + /** + * Creates an N-dimensional array of booleans of the given shape. + * + *

All values are initialized to zeros. + * + * @param shape shape of the array + * @return new boolean N-dimensional array + * @throws IllegalArgumentException if shape is null or has unknown dimensions + */ + public static BooleanNdArray ofBooleans(Shape shape) { + return wrap(shape, DataBuffers.ofBooleans(shape.size())); + } + + /** + * Wraps a buffer in a boolean N-dimensional array of a given shape. + * + * @param shape shape of the array + * @param buffer buffer to wrap + * @return new boolean N-dimensional array + * @throws IllegalArgumentException if shape is null, has unknown dimensions or has size bigger + * in the buffer size + */ + public static BooleanNdArray wrap(Shape shape, BooleanDataBuffer buffer) { + return BooleanDenseNdArray.create(buffer, shape); + } + + // OBJECT ARRAYS + + /** + * Creates scalar (rank 0) initialized with the given value. + * + * @param value scalar value + * @param the data type + * @return new scalar + */ + @SuppressWarnings("unchecked") + public static NdArray scalarOfObject(T value) { + if (value == null) { + throw new IllegalArgumentException(); + } + return ofObjects((Class)value.getClass(), Shape.scalar()).setObject(value); + } + + /** + * Creates a vector (rank 1) initialized with the given values. + * + *

Modifying the data of the returned vector will also impact the values in the array + * passed in parameter. + * + * @param values vector values + * @param the data type + * @return new vector + * @throws IllegalArgumentException if values is null + */ + @SafeVarargs + public static NdArray vectorOfObjects(T... values) { + if (values == null || values.length == 0) { + throw new IllegalArgumentException("Null or zero length input supplied to vectorOfObjects."); + } + return wrap(Shape.of(values.length), DataBuffers.of(values, false, false)); + } + + /** + * Creates an N-dimensional array of the given shape. + * + *

All values are initialized to zeros. + * + * @param clazz class of the data to be stored in this array + * @param shape shape of the array + * @param the data type + * @return new N-dimensional array + * @throws IllegalArgumentException if shape is null or has unknown dimensions + */ + public static NdArray ofObjects(Class clazz, Shape shape) { + return wrap(shape, DataBuffers.ofObjects(clazz, shape.size())); + } + + /** + * Wraps a buffer in an N-dimensional array of a given shape. + * + * @param shape shape of the array + * @param buffer buffer to wrap + * @param the data type + * @return new N-dimensional array + * @throws IllegalArgumentException if shape is null, has unknown dimensions or has size bigger + * in the buffer size + */ + public static NdArray wrap(Shape shape, DataBuffer buffer) { + return DenseNdArray.wrap(buffer, shape); + } +} + diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/Shape.java b/ndarray/src/main/java/org/tensorflow/ndarray/Shape.java new file mode 100644 index 00000000000..85a905408c7 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/Shape.java @@ -0,0 +1,447 @@ +/* +Copyright 2019 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ + +package org.tensorflow.ndarray; + +import java.util.Arrays; + +/** + * The shape of a Tensor or {@link NdArray}. + * + *

A {@code Shape} defines sizes along its axes. It may contain an unknown size for one of the + * axes or may be totally unknown, in which case not even the number of axes is known. If the size + * of an axis is unknown, {@link Shape#UNKNOWN_SIZE} should be used as its size. + */ +public final class Shape { + + /** The size of an unknown axis or the total unknown size for an unknown Shape. */ + public static long UNKNOWN_SIZE = -1L; + + /** + * Creates a Shape representing an unknown number of dimensions. + * + * @return A Shape for which {@link Shape#isUnknown()} is true, never null. + */ + public static Shape unknown() { + return new Shape(null); + } + + /** + * Creates a Shape representing a scalar value. + * + * @return A Shape without dimensions for which {@link Shape#isScalar()} is true, never null. + */ + public static Shape scalar() { + return new Shape(new long[0]); + } + + /** + * Create a Shape representing a scalar or an N-dimensional value. + * + *

Creates a Shape representing a scalar or an N-dimensional value (N being at least 1), with + * the provided size for each dimension. A -1 indicates that the size of the corresponding + * dimension is unknown. If no sizes are provided, a Shape representing a scalar is created. For + * example: + * + *

{@code
+   * // A 2-element vector.
+   * Shape vector = Shape.of(2);
+   *
+   * // A 2x3 matrix.
+   * Shape matrix = Shape.of(2, 3);
+   *
+   * // A matrix with 4 columns but an unknown number of rows.
+   * // This is typically used to indicate the shape of tensors that represent
+   * // a variable-sized batch of values. The Shape below might represent a
+   * // variable-sized batch of 4-element vectors.
+   * Shape batch = Shape.of(-1, 4);
+   *
+   * // A scalar. For readability, you should prefer calling Shape.scalar()
+   * Shape scalar = Shape.of()
+   * }
+ * + * @param dimensionSizes number of elements in each dimension of this shape, if any, or + * {@link Shape#UNKNOWN_SIZE} if unknown. + * @return a new shape + */ + public static Shape of(long... dimensionSizes) { + if (dimensionSizes == null || dimensionSizes.length == 0) { + return scalar(); + } + return new Shape(dimensionSizes); + } + + /** + * Returns the total number of elements a Tensor with this Shape would have. + * + *

If {@link Shape#isUnknown()} is true or {@link Shape#hasUnknownDimension()} is true, {@link + * Shape#UNKNOWN_SIZE} is returned. + * + * @return The total number of elements a Tensor with this shape would have if it can be + * calculated, else {@link Shape#UNKNOWN_SIZE}. + */ + public long size() { + if (size == null) { + size = computeSize(dimensionSizes); + } + return size; + } + + /** + * The size of the dimension with the given index. + * + *

If {@link Shape#isUnknown()} is true or the size of the dimension with the given index has + * an unknown size, {@link Shape#UNKNOWN_SIZE} is returned. + * + * @param i the index of the dimension to get the size for. If this Shape has a known number of + * dimensions, it must be < {@link Shape#numDimensions()}. The index may be negative, in which + * case the position is counted from the end of the shape. E.g.: {@code size(-1)} returns the + * size of the last dimension, {@code size(-2)} the size of the second to last dimension etc. + * @return The size of the dimension with the given index if known, {@link Shape#UNKNOWN_SIZE} + * otherwise. + */ + public long size(int i) { + if (dimensionSizes == null) { + return UNKNOWN_SIZE; + } else if (i >= 0) { + return dimensionSizes[i]; + } else { + return dimensionSizes[dimensionSizes.length + i]; + } + } + + /** + * Returns the number of dimensions of this Shape. -1 if unknown, 0 for a scalar, 1 for a vector, + * 2 for a matrix etc. + */ + public int numDimensions() { + return dimensionSizes != null ? dimensionSizes.length : -1; + } + + /** Returns whether one or more dimensions of this Shape have an unknown size. */ + public boolean hasUnknownDimension() { + if (dimensionSizes == null) { + return true; + } + for (long dimSize : dimensionSizes) { + if (dimSize == UNKNOWN_SIZE) { + return true; + } + } + return false; + } + + /** Returns whether this Shape represents a scalar. */ + public boolean isScalar() { + return dimensionSizes != null && dimensionSizes.length == 0; + } + + /** Returns whether this Shape is the shape of a vector. */ + public boolean isVector() { + return dimensionSizes != null && dimensionSizes.length == 1; + } + + /** Returns whether this Shape is the shape of a matrix */ + public boolean isMatrix() { + return dimensionSizes != null && dimensionSizes.length == 2; + } + + /** Returns whether the number of dimensions of this Shape is unknown. */ + public boolean isUnknown() { + return dimensionSizes == null; + } + + /** + * Returns a defensive copy of the this Shape's axes. Changes to the returned array to not change + * this Shape's state. Returns null if {@link Shape#isUnknown()} is true. + */ + public long[] asArray() { + if (this.dimensionSizes == null) { + return null; + } else { + return Arrays.copyOf(dimensionSizes, dimensionSizes.length); + } + } + + @Override + public int hashCode() { + return dimensionSizes != null ? Arrays.hashCode(dimensionSizes) : super.hashCode(); + } + + /** + * Equals implementation for Shapes. Two Shapes are considered equal iff: + * + *

+ *

    + *
  • the number of dimensions is defined and equal for both + *
  • the size of each dimension is defined and equal for both + *
+ * + *

If either Shape has unknown dimensions (even if they are the same in both) or if either + * shape has an unknown number of dimensions (even if both return {@code true} for {@link + * Shape#isUnknown()}), they are not considered equal! However, a shape will always equal itself, + * even if it is unknown or contains unknown dimensions. + */ + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + // Shapes are equivalent if all of their dimensions are equals + if (obj instanceof Shape) { + Shape otherShape = (Shape) obj; + if (otherShape.hasUnknownDimension()) { + return false; + } + return Arrays.equals(dimensionSizes, otherShape.dimensionSizes); + } + return false; + } + + /** Succinct description of the Shape meant for debugging. */ + @Override + public String toString() { + return Arrays.toString(dimensionSizes); + } + + private Shape(long[] dimensionSizes) { + this.dimensionSizes = dimensionSizes; + } + + private final long[] dimensionSizes; + private Long size; + + /** + * Returns a 1-dimensional Shape with first dimension matching the first dimension of this Shape. + */ + public Shape head() { + return take(1); + } + + /** + * Returns an n-dimensional Shape with the dimensions matching the first n dimensions of this + * shape + * + * @param n the number of leading dimensions to get, must be <= than {@link Shape#numDimensions()} + * @return an n-dimensional Shape with the first n dimensions matching the first n dimensions of + * this Shape + */ + public Shape take(int n) { + if (n > numDimensions()) { + throw new ArrayIndexOutOfBoundsException( + "Cannot take " + n + " dimensions, shape has only " + numDimensions() + "."); + } + long[] newDimensions = new long[n]; + System.arraycopy(dimensionSizes, 0, newDimensions, 0, n); + return Shape.of(newDimensions); + } + + /** Returns a new Shape, with this Shape's first dimension removed. */ + public Shape tail() { + if (dimensionSizes.length < 2) return Shape.of(); + return Shape.of(Arrays.copyOfRange(dimensionSizes, 1, dimensionSizes.length)); + } + + /** + * Returns an n-dimensional Shape with the dimensions matching the last n dimensions of this + * Shape. + * + * @param n the number of trailing dimensions to get, must be <= than {@link + * Shape#numDimensions()} + * @return an n-dimensional shape with the dimensions matching the last n dimensions of this + * Shape, never null + */ + public Shape takeLast(int n) { + if (n > numDimensions()) { + throw new ArrayIndexOutOfBoundsException( + "Cannot take last " + n + " dimensions, shape has only " + numDimensions() + "."); + } + long[] newDimensions = new long[n]; + System.arraycopy(dimensionSizes, numDimensions() - n, newDimensions, 0, n); + return Shape.of(newDimensions); + } + + /** + * Return a {@code end - begin} dimensional shape with dimensions matching this Shape from {@code begin} to {@code end}. + * @param begin Where to start the sub-shape. + * @param end Where to end the sub-shape, exclusive. + * @return the sub-shape bounded by begin and end. + */ + public Shape subShape(int begin, int end){ + if (end > numDimensions()) { + throw new ArrayIndexOutOfBoundsException( + "End index " + end + " out of bounds: shape only has " + numDimensions() + " dimensions."); + } + if (begin < 0) { + throw new ArrayIndexOutOfBoundsException( + "Begin index " + begin + " out of bounds: cannot be less than 0."); + } + + long[] newDimensions = new long[end - begin]; + System.arraycopy(dimensionSizes, begin, newDimensions, 0, end - begin); + return Shape.of(newDimensions); + } + + /** + * Returns a new Shape, with a new first dimension added. In order for this call to succeed, + * {@link Shape#isUnknown()} must be {@code false}. + * + * @param firstDimension the dimension to prepend + * @return a new shape with the given dimension first, followed by this Shape's dimensions, never + * null + */ + public Shape prepend(long firstDimension) { + long[] newDimensions = new long[dimensionSizes.length + 1]; + newDimensions[0] = firstDimension; + System.arraycopy(dimensionSizes, 0, newDimensions, 1, dimensionSizes.length); + + return Shape.of(newDimensions); + } + + /** + * Returns a new Shape, with a new last dimension added. In order for this call to succeed, {@link + * Shape#isUnknown()} must be {@code false}. + * + * @param lastDimension the dimension to append + * @return a new Shape with this Shape's dimensions followed by the given dimension, never null + */ + public Shape append(long lastDimension) { + long[] newDimensions = new long[dimensionSizes.length + 1]; + newDimensions[newDimensions.length - 1] = lastDimension; + System.arraycopy(dimensionSizes, 0, newDimensions, 0, dimensionSizes.length); + + return Shape.of(newDimensions); + } + + /** + * Returns a new Shape, with another Shape's dimensions prepended. For both this Shape and the + * other Shape, {@link Shape#isUnknown()} must return false. E.g. {@code + * Shape.of(3,4).prepend(Shape.of(1,2)) => Shape.of(1,2,3,4) } + * + * @param other another Shape, must not be {@code null}, must not be unknown + * @return A new Shape consisting of the given Shape's dimensions followed by this Shape's + * dimensions, never null + */ + public Shape prepend(Shape other) { + long[] newDimensions = new long[other.dimensionSizes.length + dimensionSizes.length]; + System.arraycopy(other.dimensionSizes, 0, newDimensions, 0, other.dimensionSizes.length); + System.arraycopy( + dimensionSizes, 0, newDimensions, other.dimensionSizes.length, dimensionSizes.length); + return Shape.of(newDimensions); + } + + /** + * Returns a new Shape, with another Shapes' dimensions appended. For both this Shape and the + * other Shape, {@link Shape#isUnknown()} must return false. E.g. @code + * Shape.of(3,4).append(Shape.of(1,2)) => Shape.of(3,4,1,2) } + * + * @param other another Shape, must not be {@code null}, must not be unknown + * @return A new Shape consisting of this Shape's dimensions followed by the given Shape's + * dimensions + */ + public Shape append(Shape other) { + long[] newDimensions = new long[dimensionSizes.length + other.dimensionSizes.length]; + System.arraycopy(dimensionSizes, 0, newDimensions, 0, dimensionSizes.length); + System.arraycopy( + other.dimensionSizes, 0, newDimensions, dimensionSizes.length, other.dimensionSizes.length); + return Shape.of(newDimensions); + } + + private static long computeSize(long[] dimensionSizes) { + if (dimensionSizes == null) { + return UNKNOWN_SIZE; + } + long computedSize = 1L; + for (long dimensionSize : dimensionSizes) { + if (dimensionSize == UNKNOWN_SIZE) { + return UNKNOWN_SIZE; + } + computedSize *= dimensionSize; + } + return computedSize; + } + + /** + * Determines whether another shape is compatible with this one. + * + *

+ * + *

Two possibly-partially-defined shapes are compatible if there exists a fully-defined shape + * that both shapes can represent. Thus, compatibility allows the shape inference code to reason + * about partially-defined shapes. For example: + * + *

    + *
  • Shape.unknown() is compatible with all shapes. + *
  • Shape(UNKNOWN_SIZE, UNKNOWN_SIZE) is compatible with all two-dimensional + * shapes, such as Shape(32, 784), and also Shape.unknown(). It is + * not compatible with, for example, Shape(UNKNOWN_SIZE) or + * Shape(UNKNOWN_SIZE, UNKNOWN_SIZE, UNKNOWN_SIZE). + *
  • Shape(32, UNKNOWN_SIZE) is compatible with all two-dimensional shapes with + * size 32 in the 0th dimension, and also Shape(UNKNOWN_SIZE, UNKNOWN_SIZE) and + * Shape.unknown(). It is not compatible with, for example, Shape(32) + * , Shape(32, UNKNOWN_SIZE, 1) or Shape(64, UNKNOWN_SIZE). + *
  • Shape(32, 784) is compatible with itself, and also + * Shape(32, UNKNOWN_SIZE), Shape(UNKNOWN_SIZE, 784), + * Shape(UNKNOWN_SIZE, UNKNOWN_SIZE) and Shape.unknown(). It is not + * compatible with, for example, Shape(32, 1, 784) or Shape(UNKNOWN_SIZE) + * . + *
+ * + *

The compatibility relation is reflexive and symmetric, but not transitive. For example, + * Shape(32, 784) is compatible with Shape.unknown(), and + * Shape.unknown() is compatible with Shape(4, 4), but Shape(32, 784) + * is not compatible with Shape(4, 4). + * + *

Compatibility is not the same as broadcasting. Compatible shapes must have the same number + * of dimensions and for each dimension pair, one dimension has to equal the other dimensions or + * at least one of the dimensions in the pair has to be UNKNOWN_SIZE. + * + *

Broadcasting allows different dimensions, but paired dimensions have to either be equal, or + * one dimension must be 1. If one shape has less dimensions than another shape, the smaller shape + * is "stretched" with dimensions of 1. + * + * @param shape The other shape + * @return true, if the two shapes are compatible. + */ + public boolean isCompatibleWith(Shape shape) { + if (!this.isUnknown() && !shape.isUnknown()) { + if (numDimensions() != shape.numDimensions()) { + return false; + } + for (int i = 0; i < numDimensions(); i++) { + if (!isCompatible(size(i), shape.size(i))) { + return false; + } + } + } + return true; + } + + /** + * Test to see if two shape dimensions are compatible. + * + *

The dimensions are compatible if either dimension is Shape.UNKNOWN_SIZE or both + * dimensions are equal + * + * @param dim the first dimension + * @param otherDim the second dimension + * @return true, if both dimensions are compatible + */ + public static boolean isCompatible(long dim, long otherDim) { + return dim == Shape.UNKNOWN_SIZE || otherDim == Shape.UNKNOWN_SIZE || dim == otherDim; + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/Shaped.java b/ndarray/src/main/java/org/tensorflow/ndarray/Shaped.java new file mode 100644 index 00000000000..fbe19d75623 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/Shaped.java @@ -0,0 +1,51 @@ +/* + Copyright 2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray; + +import java.util.function.BiConsumer; +import java.util.function.Consumer; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.index.Index; + +/** + * Any data container with a given {@link Shape}. + */ +public interface Shaped { + + /** + * @return the shape of this container + */ + Shape shape(); + + /** + * @return the rank of this container + */ + default int rank() { + return shape().numDimensions(); + } + + /** + * Computes and returns the total size of this container, in number of values. + * + *

For example, given a 3x3x2 matrix, the return value will be 18. + * + * @return number of values in this element + */ + default long size() { + return shape().size(); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/ShortNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/ShortNdArray.java new file mode 100644 index 00000000000..f9335b4d5d2 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/ShortNdArray.java @@ -0,0 +1,108 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray; + +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.ShortDataBuffer; +import org.tensorflow.ndarray.index.Index; + +/** + * An {@link NdArray} of shorts. + */ +public interface ShortNdArray extends NdArray { + + /** + * Returns the short value of the scalar found at the given coordinates. + * + *

To access the scalar element, the number of coordinates provided must be equal to the number + * of dimensions of this array (i.e. its rank). For example: + *

{@code
+   *  ShortNdArray matrix = NdArrays.ofShorts(shape(2, 2));  // matrix rank = 2
+   *  matrix.getShort(0, 1);  // succeeds, returns 0.0f
+   *  matrix.getShort(0);  // throws IllegalRankException
+   *
+   *  ShortNdArray scalar = matrix.get(0, 1);  // scalar rank = 0
+   *  scalar.getShort();  // succeeds, returns 0.0f
+   * }
+ * + * @param coordinates coordinates of the scalar to resolve + * @return value of that scalar + * @throws IndexOutOfBoundsException if some coordinates are outside the limits of their respective dimension + * @throws IllegalRankException if number of coordinates is not sufficient to access a scalar element + */ + short getShort(long... coordinates); + + /** + * Assigns the short value of the scalar found at the given coordinates. + * + *

To access the scalar element, the number of coordinates provided must be equal to the number + * of dimensions of this array (i.e. its rank). For example: + *

{@code
+   *  ShortNdArray matrix = NdArrays.ofShorts(shape(2, 2));  // matrix rank = 2
+   *  matrix.setShort(10.0f, 0, 1);  // succeeds
+   *  matrix.setShort(10.0f, 0);  // throws IllegalRankException
+   *
+   *  ShortNdArray scalar = matrix.get(0, 1);  // scalar rank = 0
+   *  scalar.setShort(10.0f);  // succeeds
+   * }
+ * + * @param value value to assign + * @param coordinates coordinates of the scalar to assign + * @return this array + * @throws IndexOutOfBoundsException if some coordinates are outside the limits of their respective dimension + * @throws IllegalRankException if number of coordinates is not sufficient to access a scalar element + */ + ShortNdArray setShort(short value, long... coordinates); + + @Override + ShortNdArray slice(Index... coordinates); + + @Override + ShortNdArray get(long... coordinates); + + @Override + ShortNdArray set(NdArray src, long... coordinates); + + @Override + default Short getObject(long... coordinates) { + return getShort(coordinates); + } + + @Override + default ShortNdArray setObject(Short value, long... coordinates) { + return setShort(value, coordinates); + } + + @Override + NdArraySequence elements(int dimensionIdx); + + @Override + NdArraySequence scalars(); + + @Override + ShortNdArray copyTo(NdArray dst); + + @Override + ShortNdArray read(DataBuffer dst); + + ShortNdArray read(ShortDataBuffer dst); + + @Override + ShortNdArray write(DataBuffer src); + + ShortNdArray write(ShortDataBuffer src); +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java b/ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java new file mode 100644 index 00000000000..7d847bd1a9c --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java @@ -0,0 +1,3809 @@ +package org.tensorflow.ndarray; + +import static org.tensorflow.ndarray.NdArrays.vectorOf; + +import java.lang.reflect.Array; +import org.tensorflow.ndarray.buffer.DataBuffers; + +/** + * Utility class for working with {@link NdArray} instances mixed with standard Java arrays. + */ +public final class StdArrays { + + /** + * Copy an array of ints in a new {@link IntNdArray} + * + * @param array source array + * @return the {@code IntNdArray} copy + */ + public static IntNdArray ndCopyOf(int[] array) { + IntNdArray ndArray = NdArrays.ofInts(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 2-dimensional array of ints in a new {@link IntNdArray} + * + * @param array source array + * @return the {@code IntNdArray} copy + */ + public static IntNdArray ndCopyOf(int[][] array) { + IntNdArray ndArray = NdArrays.ofInts(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 3-dimensional array of ints in a new {@link IntNdArray} + * + * @param array source array + * @return the {@code IntNdArray} copy + */ + public static IntNdArray ndCopyOf(int[][][] array) { + IntNdArray ndArray = NdArrays.ofInts(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 4-dimensional array of ints in a new {@link IntNdArray} + * + * @param array source array + * @return the {@code IntNdArray} copy + */ + public static IntNdArray ndCopyOf(int[][][][] array) { + IntNdArray ndArray = NdArrays.ofInts(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 5-dimensional array of ints in a new {@link IntNdArray} + * + * @param array source array + * @return the {@code IntNdArray} copy + */ + public static IntNdArray ndCopyOf(int[][][][][] array) { + IntNdArray ndArray = NdArrays.ofInts(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 6-dimensional array of ints in a new {@link IntNdArray} + * + * @param array source array + * @return the {@code IntNdArray} copy + */ + public static IntNdArray ndCopyOf(int[][][][][][] array) { + IntNdArray ndArray = NdArrays.ofInts(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy an array of longs in a new {@link LongNdArray} + * + * @param array source array + * @return the {@code LongNdArray} copy + */ + public static LongNdArray ndCopyOf(long[] array) { + LongNdArray ndArray = NdArrays.ofLongs(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 2-dimensional array of longs in a new {@link LongNdArray} + * + * @param array source array + * @return the {@code LongNdArray} copy + */ + public static LongNdArray ndCopyOf(long[][] array) { + LongNdArray ndArray = NdArrays.ofLongs(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 3-dimensional array of longs in a new {@link LongNdArray} + * + * @param array source array + * @return the {@code LongNdArray} copy + */ + public static LongNdArray ndCopyOf(long[][][] array) { + LongNdArray ndArray = NdArrays.ofLongs(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 4-dimensional array of longs in a new {@link LongNdArray} + * + * @param array source array + * @return the {@code LongNdArray} copy + */ + public static LongNdArray ndCopyOf(long[][][][] array) { + LongNdArray ndArray = NdArrays.ofLongs(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 5-dimensional array of longs in a new {@link LongNdArray} + * + * @param array source array + * @return the {@code LongNdArray} copy + */ + public static LongNdArray ndCopyOf(long[][][][][] array) { + LongNdArray ndArray = NdArrays.ofLongs(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 6-dimensional array of longs in a new {@link LongNdArray} + * + * @param array source array + * @return the {@code LongNdArray} copy + */ + public static LongNdArray ndCopyOf(long[][][][][][] array) { + LongNdArray ndArray = NdArrays.ofLongs(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy an array of floats in a new {@link FloatNdArray} + * + * @param array source array + * @return the {@code FloatNdArray} copy + */ + public static FloatNdArray ndCopyOf(float[] array) { + FloatNdArray ndArray = NdArrays.ofFloats(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 2-dimensional array of floats in a new {@link FloatNdArray} + * + * @param array source array + * @return the {@code FloatNdArray} copy + */ + public static FloatNdArray ndCopyOf(float[][] array) { + FloatNdArray ndArray = NdArrays.ofFloats(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 3-dimensional array of floats in a new {@link FloatNdArray} + * + * @param array source array + * @return the {@code FloatNdArray} copy + */ + public static FloatNdArray ndCopyOf(float[][][] array) { + FloatNdArray ndArray = NdArrays.ofFloats(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 4-dimensional array of floats in a new {@link FloatNdArray} + * + * @param array source array + * @return the {@code FloatNdArray} copy + */ + public static FloatNdArray ndCopyOf(float[][][][] array) { + FloatNdArray ndArray = NdArrays.ofFloats(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 5-dimensional array of floats in a new {@link FloatNdArray} + * + * @param array source array + * @return the {@code FloatNdArray} copy + */ + public static FloatNdArray ndCopyOf(float[][][][][] array) { + FloatNdArray ndArray = NdArrays.ofFloats(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 6-dimensional array of floats in a new {@link FloatNdArray} + * + * @param array source array + * @return the {@code FloatNdArray} copy + */ + public static FloatNdArray ndCopyOf(float[][][][][][] array) { + FloatNdArray ndArray = NdArrays.ofFloats(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy an array of doubles in a new {@link DoubleNdArray} + * + * @param array source array + * @return the {@code DoubleNdArray} copy + */ + public static DoubleNdArray ndCopyOf(double[] array) { + DoubleNdArray ndArray = NdArrays.ofDoubles(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 2-dimensional array of doubles in a new {@link DoubleNdArray} + * + * @param array source array + * @return the {@code DoubleNdArray} copy + */ + public static DoubleNdArray ndCopyOf(double[][] array) { + DoubleNdArray ndArray = NdArrays.ofDoubles(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 3-dimensional array of doubles in a new {@link DoubleNdArray} + * + * @param array source array + * @return the {@code DoubleNdArray} copy + */ + public static DoubleNdArray ndCopyOf(double[][][] array) { + DoubleNdArray ndArray = NdArrays.ofDoubles(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 4-dimensional array of doubles in a new {@link DoubleNdArray} + * + * @param array source array + * @return the {@code DoubleNdArray} copy + */ + public static DoubleNdArray ndCopyOf(double[][][][] array) { + DoubleNdArray ndArray = NdArrays.ofDoubles(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 5-dimensional array of doubles in a new {@link DoubleNdArray} + * + * @param array source array + * @return the {@code DoubleNdArray} copy + */ + public static DoubleNdArray ndCopyOf(double[][][][][] array) { + DoubleNdArray ndArray = NdArrays.ofDoubles(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 6-dimensional array of doubles in a new {@link DoubleNdArray} + * + * @param array source array + * @return the {@code DoubleNdArray} copy + */ + public static DoubleNdArray ndCopyOf(double[][][][][][] array) { + DoubleNdArray ndArray = NdArrays.ofDoubles(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy an array of bytes in a new {@link ByteNdArray} + * + * @param array source array + * @return the {@code ByteNdArray} copy + */ + public static ByteNdArray ndCopyOf(byte[] array) { + ByteNdArray ndArray = NdArrays.ofBytes(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 2-dimensional array of bytes in a new {@link ByteNdArray} + * + * @param array source array + * @return the {@code ByteNdArray} copy + */ + public static ByteNdArray ndCopyOf(byte[][] array) { + ByteNdArray ndArray = NdArrays.ofBytes(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 3-dimensional array of bytes in a new {@link ByteNdArray} + * + * @param array source array + * @return the {@code ByteNdArray} copy + */ + public static ByteNdArray ndCopyOf(byte[][][] array) { + ByteNdArray ndArray = NdArrays.ofBytes(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 4-dimensional array of bytes in a new {@link ByteNdArray} + * + * @param array source array + * @return the {@code ByteNdArray} copy + */ + public static ByteNdArray ndCopyOf(byte[][][][] array) { + ByteNdArray ndArray = NdArrays.ofBytes(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 5-dimensional array of bytes in a new {@link ByteNdArray} + * + * @param array source array + * @return the {@code ByteNdArray} copy + */ + public static ByteNdArray ndCopyOf(byte[][][][][] array) { + ByteNdArray ndArray = NdArrays.ofBytes(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 6-dimensional array of bytes in a new {@link ByteNdArray} + * + * @param array source array + * @return the {@code ByteNdArray} copy + */ + public static ByteNdArray ndCopyOf(byte[][][][][][] array) { + ByteNdArray ndArray = NdArrays.ofBytes(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy an array of shorts in a new {@link ShortNdArray} + * + * @param array source array + * @return the {@code ShortNdArray} copy + */ + public static ShortNdArray ndCopyOf(short[] array) { + ShortNdArray ndArray = NdArrays.ofShorts(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 2-dimensional array of shorts in a new {@link ShortNdArray} + * + * @param array source array + * @return the {@code ShortNdArray} copy + */ + public static ShortNdArray ndCopyOf(short[][] array) { + ShortNdArray ndArray = NdArrays.ofShorts(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 3-dimensional array of shorts in a new {@link ShortNdArray} + * + * @param array source array + * @return the {@code ShortNdArray} copy + */ + public static ShortNdArray ndCopyOf(short[][][] array) { + ShortNdArray ndArray = NdArrays.ofShorts(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 4-dimensional array of shorts in a new {@link ShortNdArray} + * + * @param array source array + * @return the {@code ShortNdArray} copy + */ + public static ShortNdArray ndCopyOf(short[][][][] array) { + ShortNdArray ndArray = NdArrays.ofShorts(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 5-dimensional array of shorts in a new {@link ShortNdArray} + * + * @param array source array + * @return the {@code ShortNdArray} copy + */ + public static ShortNdArray ndCopyOf(short[][][][][] array) { + ShortNdArray ndArray = NdArrays.ofShorts(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 6-dimensional array of shorts in a new {@link ShortNdArray} + * + * @param array source array + * @return the {@code ShortNdArray} copy + */ + public static ShortNdArray ndCopyOf(short[][][][][][] array) { + ShortNdArray ndArray = NdArrays.ofShorts(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy an array of booleans in a new {@link BooleanNdArray} + * + * @param array source array + * @return the {@code BooleanNdArray} copy + */ + public static BooleanNdArray ndCopyOf(boolean[] array) { + BooleanNdArray ndArray = NdArrays.ofBooleans(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 2-dimensional array of booleans in a new {@link BooleanNdArray} + * + * @param array source array + * @return the {@code BooleanNdArray} copy + */ + public static BooleanNdArray ndCopyOf(boolean[][] array) { + BooleanNdArray ndArray = NdArrays.ofBooleans(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 3-dimensional array of booleans in a new {@link BooleanNdArray} + * + * @param array source array + * @return the {@code BooleanNdArray} copy + */ + public static BooleanNdArray ndCopyOf(boolean[][][] array) { + BooleanNdArray ndArray = NdArrays.ofBooleans(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 4-dimensional array of booleans in a new {@link BooleanNdArray} + * + * @param array source array + * @return the {@code BooleanNdArray} copy + */ + public static BooleanNdArray ndCopyOf(boolean[][][][] array) { + BooleanNdArray ndArray = NdArrays.ofBooleans(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 5-dimensional array of booleans in a new {@link BooleanNdArray} + * + * @param array source array + * @return the {@code BooleanNdArray} copy + */ + public static BooleanNdArray ndCopyOf(boolean[][][][][] array) { + BooleanNdArray ndArray = NdArrays.ofBooleans(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 6-dimensional array of booleans in a new {@link BooleanNdArray} + * + * @param array source array + * @return the {@code BooleanNdArray} copy + */ + public static BooleanNdArray ndCopyOf(boolean[][][][][][] array) { + BooleanNdArray ndArray = NdArrays.ofBooleans(shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy an array of objects in a new {@link NdArray} + * + * @param array source array + * @param data type + * @return the {@code NdArray} copy + */ + public static NdArray ndCopyOf(T[] array) { + @SuppressWarnings("unchecked") + NdArray ndArray = NdArrays.ofObjects(componentTypeOf(array), shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 2-dimensional array of objects in a new {@link NdArray} + * + * @param array source array + * @param data type + * @return the {@code NdArray} copy + */ + public static NdArray ndCopyOf(T[][] array) { + @SuppressWarnings("unchecked") + NdArrayndArray = NdArrays.ofObjects(componentTypeOf(array), shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 3-dimensional array of objects in a new {@link NdArray} + * + * @param array source array + * @param data type + * @return the {@code NdArray} copy + */ + public static NdArray ndCopyOf(T[][][] array) { + @SuppressWarnings("unchecked") + NdArrayndArray = NdArrays.ofObjects(componentTypeOf(array), shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 4-dimensional array of objects in a new {@link NdArray} + * + * @param array source array + * @param data type + * @return the {@code NdArray} copy + */ + public static NdArray ndCopyOf(T[][][][] array) { + @SuppressWarnings("unchecked") + NdArrayndArray = NdArrays.ofObjects(componentTypeOf(array), shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 5-dimensional array of objects in a new {@link NdArray} + * + * @param array source array + * @param data type + * @return the {@code NdArray} copy + */ + public static NdArray ndCopyOf(T[][][][][] array) { + @SuppressWarnings("unchecked") + NdArrayndArray = NdArrays.ofObjects(componentTypeOf(array), shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a 6-dimensional array of objects in a new {@link NdArray} + * + * @param array source array + * @param data type + * @return the {@code NdArray} copy + */ + public static NdArray ndCopyOf(T[][][][][][] array) { + @SuppressWarnings("unchecked") + NdArrayndArray = NdArrays.ofObjects(componentTypeOf(array), shapeOf(array)); + copyTo(array, ndArray); + return ndArray; + } + + /** + * Copy a {@link IntNdArray} in a new 1-dimension standard array of ints + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-1 or has a shape that + * exceeds standard arrays limits + */ + public static int[] array1dCopyOf(IntNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 1); + int[] array = new int[dims[0]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link IntNdArray} in a new 2-dimension standard array of ints + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-2 or has a shape that + * exceeds standard arrays limits + */ + public static int[][] array2dCopyOf(IntNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 2); + int[][] array = new int[dims[0]][dims[1]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link IntNdArray} in a new 3-dimension standard array of ints + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-3 or has a shape that + * exceeds standard arrays limits + */ + public static int[][][] array3dCopyOf(IntNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 3); + int[][][] array = new int[dims[0]][dims[1]][dims[2]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link IntNdArray} in a new 4-dimension standard array of ints + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-4 or has a shape that + * exceeds standard arrays limits + */ + public static int[][][][] array4dCopyOf(IntNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 4); + int[][][][] array = new int[dims[0]][dims[1]][dims[2]][dims[3]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link IntNdArray} in a new 5-dimension standard array of ints + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-5 or has a shape that + * exceeds standard arrays limits + */ + public static int[][][][][] array5dCopyOf(IntNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 5); + int[][][][][] array = new int[dims[0]][dims[1]][dims[2]][dims[3]][dims[4]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link IntNdArray} in a new 6-dimension standard array of ints + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-6 or has a shape that + * exceeds standard arrays limits + */ + public static int[][][][][][] array6dCopyOf(IntNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 6); + int[][][][][][] array = new int[dims[0]][dims[1]][dims[2]][dims[3]][dims[4]][dims[5]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link LongNdArray} in a new 1-dimension standard array of longs + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-1 or has a shape that + * exceeds standard arrays limits + */ + public static long[] array1dCopyOf(LongNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 1); + long[] array = new long[dims[0]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link LongNdArray} in a new 2-dimension standard array of longs + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-2 or has a shape that + * exceeds standard arrays limits + */ + public static long[][] array2dCopyOf(LongNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 2); + long[][] array = new long[dims[0]][dims[1]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link LongNdArray} in a new 3-dimension standard array of longs + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-3 or has a shape that + * exceeds standard arrays limits + */ + public static long[][][] array3dCopyOf(LongNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 3); + long[][][] array = new long[dims[0]][dims[1]][dims[2]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link LongNdArray} in a new 4-dimension standard array of longs + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-4 or has a shape that + * exceeds standard arrays limits + */ + public static long[][][][] array4dCopyOf(LongNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 4); + long[][][][] array = new long[dims[0]][dims[1]][dims[2]][dims[3]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link LongNdArray} in a new 5-dimension standard array of longs + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-5 or has a shape that + * exceeds standard arrays limits + */ + public static long[][][][][] array5dCopyOf(LongNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 5); + long[][][][][] array = new long[dims[0]][dims[1]][dims[2]][dims[3]][dims[4]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link LongNdArray} in a new 6-dimension standard array of longs + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-6 or has a shape that + * exceeds standard arrays limits + */ + public static long[][][][][][] array6dCopyOf(LongNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 6); + long[][][][][][] array = new long[dims[0]][dims[1]][dims[2]][dims[3]][dims[4]][dims[5]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link FloatNdArray} in a new 1-dimension standard array of floats + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-1 or has a shape that + * exceeds standard arrays limits + */ + public static float[] array1dCopyOf(FloatNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 1); + float[] array = new float[dims[0]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link FloatNdArray} in a new 2-dimension standard array of floats + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-2 or has a shape that + * exceeds standard arrays limits + */ + public static float[][] array2dCopyOf(FloatNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 2); + float[][] array = new float[dims[0]][dims[1]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link FloatNdArray} in a new 3-dimension standard array of floats + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-3 or has a shape that + * exceeds standard arrays limits + */ + public static float[][][] array3dCopyOf(FloatNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 3); + float[][][] array = new float[dims[0]][dims[1]][dims[2]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link FloatNdArray} in a new 4-dimension standard array of floats + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-4 or has a shape that + * exceeds standard arrays limits + */ + public static float[][][][] array4dCopyOf(FloatNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 4); + float[][][][] array = new float[dims[0]][dims[1]][dims[2]][dims[3]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link FloatNdArray} in a new 5-dimension standard array of floats + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-5 or has a shape that + * exceeds standard arrays limits + */ + public static float[][][][][] array5dCopyOf(FloatNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 5); + float[][][][][] array = new float[dims[0]][dims[1]][dims[2]][dims[3]][dims[4]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link FloatNdArray} in a new 6-dimension standard array of floats + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-6 or has a shape that + * exceeds standard arrays limits + */ + public static float[][][][][][] array6dCopyOf(FloatNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 6); + float[][][][][][] array = new float[dims[0]][dims[1]][dims[2]][dims[3]][dims[4]][dims[5]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link DoubleNdArray} in a new 1-dimension standard array of doubles + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-1 or has a shape that + * exceeds standard arrays limits + */ + public static double[] array1dCopyOf(DoubleNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 1); + double[] array = new double[dims[0]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link DoubleNdArray} in a new 2-dimension standard array of doubles + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-2 or has a shape that + * exceeds standard arrays limits + */ + public static double[][] array2dCopyOf(DoubleNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 2); + double[][] array = new double[dims[0]][dims[1]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link DoubleNdArray} in a new 3-dimension standard array of doubles + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-3 or has a shape that + * exceeds standard arrays limits + */ + public static double[][][] array3dCopyOf(DoubleNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 3); + double[][][] array = new double[dims[0]][dims[1]][dims[2]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link DoubleNdArray} in a new 4-dimension standard array of doubles + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-4 or has a shape that + * exceeds standard arrays limits + */ + public static double[][][][] array4dCopyOf(DoubleNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 4); + double[][][][] array = new double[dims[0]][dims[1]][dims[2]][dims[3]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link DoubleNdArray} in a new 5-dimension standard array of doubles + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-5 or has a shape that + * exceeds standard arrays limits + */ + public static double[][][][][] array5dCopyOf(DoubleNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 5); + double[][][][][] array = new double[dims[0]][dims[1]][dims[2]][dims[3]][dims[4]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link DoubleNdArray} in a new 6-dimension standard array of doubles + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-6 or has a shape that + * exceeds standard arrays limits + */ + public static double[][][][][][] array6dCopyOf(DoubleNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 6); + double[][][][][][] array = new double[dims[0]][dims[1]][dims[2]][dims[3]][dims[4]][dims[5]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link ByteNdArray} in a new 1-dimension standard array of bytes + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-1 or has a shape that + * exceeds standard arrays limits + */ + public static byte[] array1dCopyOf(ByteNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 1); + byte[] array = new byte[dims[0]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link ByteNdArray} in a new 2-dimension standard array of bytes + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-2 or has a shape that + * exceeds standard arrays limits + */ + public static byte[][] array2dCopyOf(ByteNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 2); + byte[][] array = new byte[dims[0]][dims[1]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link ByteNdArray} in a new 3-dimension standard array of bytes + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-3 or has a shape that + * exceeds standard arrays limits + */ + public static byte[][][] array3dCopyOf(ByteNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 3); + byte[][][] array = new byte[dims[0]][dims[1]][dims[2]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link ByteNdArray} in a new 4-dimension standard array of bytes + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-4 or has a shape that + * exceeds standard arrays limits + */ + public static byte[][][][] array4dCopyOf(ByteNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 4); + byte[][][][] array = new byte[dims[0]][dims[1]][dims[2]][dims[3]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link ByteNdArray} in a new 5-dimension standard array of bytes + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-5 or has a shape that + * exceeds standard arrays limits + */ + public static byte[][][][][] array5dCopyOf(ByteNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 5); + byte[][][][][] array = new byte[dims[0]][dims[1]][dims[2]][dims[3]][dims[4]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link ByteNdArray} in a new 6-dimension standard array of bytes + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-6 or has a shape that + * exceeds standard arrays limits + */ + public static byte[][][][][][] array6dCopyOf(ByteNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 6); + byte[][][][][][] array = new byte[dims[0]][dims[1]][dims[2]][dims[3]][dims[4]][dims[5]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link ShortNdArray} in a new 1-dimension standard array of shorts + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-1 or has a shape that + * exceeds standard arrays limits + */ + public static short[] array1dCopyOf(ShortNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 1); + short[] array = new short[dims[0]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link ShortNdArray} in a new 2-dimension standard array of shorts + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-2 or has a shape that + * exceeds standard arrays limits + */ + public static short[][] array2dCopyOf(ShortNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 2); + short[][] array = new short[dims[0]][dims[1]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link ShortNdArray} in a new 3-dimension standard array of shorts + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-3 or has a shape that + * exceeds standard arrays limits + */ + public static short[][][] array3dCopyOf(ShortNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 3); + short[][][] array = new short[dims[0]][dims[1]][dims[2]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link ShortNdArray} in a new 4-dimension standard array of shorts + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-4 or has a shape that + * exceeds standard arrays limits + */ + public static short[][][][] array4dCopyOf(ShortNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 4); + short[][][][] array = new short[dims[0]][dims[1]][dims[2]][dims[3]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link ShortNdArray} in a new 5-dimension standard array of shorts + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-5 or has a shape that + * exceeds standard arrays limits + */ + public static short[][][][][] array5dCopyOf(ShortNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 5); + short[][][][][] array = new short[dims[0]][dims[1]][dims[2]][dims[3]][dims[4]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link ShortNdArray} in a new 6-dimension standard array of shorts + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-6 or has a shape that + * exceeds standard arrays limits + */ + public static short[][][][][][] array6dCopyOf(ShortNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 6); + short[][][][][][] array = new short[dims[0]][dims[1]][dims[2]][dims[3]][dims[4]][dims[5]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link BooleanNdArray} in a new 1-dimension standard array of booleans + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-1 or has a shape that + * exceeds standard arrays limits + */ + public static boolean[] array1dCopyOf(BooleanNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 1); + boolean[] array = new boolean[dims[0]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link BooleanNdArray} in a new 2-dimension standard array of booleans + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-2 or has a shape that + * exceeds standard arrays limits + */ + public static boolean[][] array2dCopyOf(BooleanNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 2); + boolean[][] array = new boolean[dims[0]][dims[1]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link BooleanNdArray} in a new 3-dimension standard array of booleans + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-3 or has a shape that + * exceeds standard arrays limits + */ + public static boolean[][][] array3dCopyOf(BooleanNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 3); + boolean[][][] array = new boolean[dims[0]][dims[1]][dims[2]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link BooleanNdArray} in a new 4-dimension standard array of booleans + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-4 or has a shape that + * exceeds standard arrays limits + */ + public static boolean[][][][] array4dCopyOf(BooleanNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 4); + boolean[][][][] array = new boolean[dims[0]][dims[1]][dims[2]][dims[3]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link BooleanNdArray} in a new 5-dimension standard array of booleans + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-5 or has a shape that + * exceeds standard arrays limits + */ + public static boolean[][][][][] array5dCopyOf(BooleanNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 5); + boolean[][][][][] array = new boolean[dims[0]][dims[1]][dims[2]][dims[3]][dims[4]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link BooleanNdArray} in a new 6-dimension standard array of booleans + * + * @param ndArray source array + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-6 or has a shape that + * exceeds standard arrays limits + */ + public static boolean[][][][][][] array6dCopyOf(BooleanNdArray ndArray) { + int[] dims = computeArrayDims(ndArray, 6); + boolean[][][][][][] array = new boolean[dims[0]][dims[1]][dims[2]][dims[3]][dims[4]][dims[5]]; + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link NdArray NdArray<T>} in a new 1-dimension standard array of objects + * + * @param ndArray source array + * @param objectType type of object + * @param data type + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-1 or has a shape that + * exceeds standard arrays limits + */ + public static T[] array1dCopyOf(NdArray ndArray, Class objectType) { + int[] dims = computeArrayDims(ndArray, 1); + T[] array = (T[])Array.newInstance(objectType, dims[0]); + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link NdArray NdArray<T>} in a new 2-dimension standard array of objects + * + * @param ndArray source array + * @param objectType type of object + * @param data type + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-2 or has a shape that + * exceeds standard arrays limits + */ + public static T[][] array2dCopyOf(NdArray ndArray, Class objectType) { + int[] dims = computeArrayDims(ndArray, 2); + T[][] array = (T[][])Array.newInstance(objectType, dims[0], dims[1]); + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link NdArray NdArray<T>} in a new 3-dimension standard array of objects + * + * @param ndArray source array + * @param objectType type of object + * @param data type + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-3 or has a shape that + * exceeds standard arrays limits + */ + public static T[][][] array3dCopyOf(NdArray ndArray, Class objectType) { + int[] dims = computeArrayDims(ndArray, 3); + T[][][] array = (T[][][])Array.newInstance(objectType, dims[0], dims[1], dims[2]); + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link NdArray NdArray<T>} in a new 4-dimension standard array of objects + * + * @param ndArray source array + * @param objectType type of object + * @param data type + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-4 or has a shape that + * exceeds standard arrays limits + */ + public static T[][][][] array4dCopyOf(NdArray ndArray, Class objectType) { + int[] dims = computeArrayDims(ndArray, 4); + T[][][][] array = (T[][][][])Array.newInstance(objectType, dims[0], dims[1], dims[2], dims[3]); + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link NdArray NdArray<T>} in a new 5-dimension standard array of objects + * + * @param ndArray source array + * @param objectType type of object + * @param data type + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-5 or has a shape that + * exceeds standard arrays limits + */ + public static T[][][][][] array5dCopyOf(NdArray ndArray, Class objectType) { + int[] dims = computeArrayDims(ndArray, 5); + T[][][][][] array = + (T[][][][][])Array.newInstance(objectType, dims[0], dims[1], dims[2], dims[3], dims[4]); + copyFrom(ndArray, array); + return array; + } + + /** + * Copy a {@link NdArray NdArray<T>} in a new 6-dimension standard array of objects + * + * @param ndArray source array + * @param objectType type of object + * @param data type + * @return the array copy + * @throws IllegalArgumentException if {@code ndArray} is not of rank-6 or has a shape that + * exceeds standard arrays limits + */ + public static T[][][][][][] array6dCopyOf(NdArray ndArray, Class objectType) { + int[] dims = computeArrayDims(ndArray, 6); + T[][][][][][] array = + (T[][][][][][])Array.newInstance(objectType, dims[0], dims[1], dims[2], dims[3], dims[4], dims[5]); + copyFrom(ndArray, array); + return array; + } + + /** + * Copy an array of ints into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-1 array + * @throws IllegalArgumentException if {@code dst} is not of rank-1 or has an incompatible shape + * with the source array + */ + public static void copyTo(int[] src, IntNdArray dst) { + NdArrays.vectorOf(src).copyTo(dst); + } + + /** + * Copy a 2-dimensional array of ints into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-2 array + * @throws IllegalArgumentException if {@code dst} is not of rank-2 or has an incompatible shape + * with the source array + */ + public static void copyTo(int[][] src, IntNdArray dst) { + dst.elements(0).forEachIndexed((idx, e) -> + NdArrays.vectorOf(src[(int)idx[0]]).copyTo(e) + ); + } + + /** + * Copy a 3-dimensional array of ints into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-3 array + * @throws IllegalArgumentException if {@code dst} is not of rank-3 or has an incompatible shape + * with the source array + */ + public static void copyTo(int[][][] src, IntNdArray dst) { + dst.elements(1).forEachIndexed((idx, e) -> + NdArrays.vectorOf(src[(int)idx[0]][(int)idx[1]]).copyTo(e) + ); + } + + /** + * Copy a 4-dimensional array of ints into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-4 array + * @throws IllegalArgumentException if {@code dst} is not of rank-4 or has an incompatible shape + * with the source array + */ + public static void copyTo(int[][][][] src, IntNdArray dst) { + dst.elements(2).forEachIndexed((idx, e) -> + NdArrays.vectorOf(src[(int)idx[0]][(int)idx[1]][(int)idx[2]]).copyTo(e) + ); + } + + /** + * Copy a 5-dimensional array of ints into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-5 array + * @throws IllegalArgumentException if {@code dst} is not of rank-5 or has an incompatible shape + * with the source array + */ + public static void copyTo(int[][][][][] src, IntNdArray dst) { + dst.elements(3).forEachIndexed((idx, e) -> + NdArrays.vectorOf(src[(int)idx[0]][(int)idx[1]][(int)idx[2]][(int)idx[3]]).copyTo(e) + ); + } + + /** + * Copy a 6-dimensional array of ints into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-6 array + * @throws IllegalArgumentException if {@code dst} is not of rank-6 or has an incompatible shape + * with the source array + */ + public static void copyTo(int[][][][][][] src, IntNdArray dst) { + dst.elements(4).forEachIndexed((idx, e) -> + NdArrays.vectorOf(src[(int)idx[0]][(int)idx[1]][(int)idx[2]][(int)idx[3]][(int)idx[4]]).copyTo(e) + ); + } + + /** + * Copy an array of longs into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-1 array + * @throws IllegalArgumentException if {@code dst} is not of rank-1 or has an incompatible shape + * with the source array + */ + public static void copyTo(long[] src, LongNdArray dst) { + NdArrays.vectorOf(src).copyTo(dst); + } + + /** + * Copy a 2-dimensional array of longs into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-2 array + * @throws IllegalArgumentException if {@code dst} is not of rank-2 or has an incompatible shape + * with the source array + */ + public static void copyTo(long[][] src, LongNdArray dst) { + dst.elements(0).forEachIndexed((idx, e) -> + NdArrays.vectorOf(src[(int)idx[0]]).copyTo(e) + ); + } + + /** + * Copy a 3-dimensional array of longs into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-3 array + * @throws IllegalArgumentException if {@code dst} is not of rank-3 or has an incompatible shape + * with the source array + */ + public static void copyTo(long[][][] src, LongNdArray dst) { + dst.elements(1).forEachIndexed((idx, e) -> + NdArrays.vectorOf(src[(int)idx[0]][(int)idx[1]]).copyTo(e) + ); + } + + /** + * Copy a 4-dimensional array of longs into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-4 array + * @throws IllegalArgumentException if {@code dst} is not of rank-4 or has an incompatible shape + * with the source array + */ + public static void copyTo(long[][][][] src, LongNdArray dst) { + dst.elements(2).forEachIndexed((idx, e) -> + NdArrays.vectorOf(src[(int)idx[0]][(int)idx[1]][(int)idx[2]]).copyTo(e) + ); + } + + /** + * Copy a 5-dimensional array of longs into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-5 array + * @throws IllegalArgumentException if {@code dst} is not of rank-5 or has an incompatible shape + * with the source array + */ + public static void copyTo(long[][][][][] src, LongNdArray dst) { + dst.elements(3).forEachIndexed((idx, e) -> + NdArrays.vectorOf(src[(int)idx[0]][(int)idx[1]][(int)idx[2]][(int)idx[3]]).copyTo(e) + ); + } + + /** + * Copy a 6-dimensional array of longs into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-6 array + * @throws IllegalArgumentException if {@code dst} is not of rank-6 or has an incompatible shape + * with the source array + */ + public static void copyTo(long[][][][][][] src, LongNdArray dst) { + dst.elements(4).forEachIndexed((idx, e) -> + NdArrays.vectorOf(src[(int)idx[0]][(int)idx[1]][(int)idx[2]][(int)idx[3]][(int)idx[4]]).copyTo(e) + ); + } + + /** + * Copy an array of floats into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-1 array + * @throws IllegalArgumentException if {@code dst} is not of rank-1 or has an incompatible shape + * with the source array + */ + public static void copyTo(float[] src, FloatNdArray dst) { + NdArrays.vectorOf(src).copyTo(dst); + } + + /** + * Copy a 2-dimensional array of floats into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-2 array + * @throws IllegalArgumentException if {@code dst} is not of rank-2 or has an incompatible shape + * with the source array + */ + public static void copyTo(float[][] src, FloatNdArray dst) { + dst.elements(0).forEachIndexed((idx, e) -> + NdArrays.vectorOf(src[(int)idx[0]]).copyTo(e) + ); + } + + /** + * Copy a 3-dimensional array of floats into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-3 array + * @throws IllegalArgumentException if {@code dst} is not of rank-3 or has an incompatible shape + * with the source array + */ + public static void copyTo(float[][][] src, FloatNdArray dst) { + dst.elements(1).forEachIndexed((idx, e) -> + NdArrays.vectorOf(src[(int)idx[0]][(int)idx[1]]).copyTo(e) + ); + } + + /** + * Copy a 4-dimensional array of floats into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-4 array + * @throws IllegalArgumentException if {@code dst} is not of rank-4 or has an incompatible shape + * with the source array + */ + public static void copyTo(float[][][][] src, FloatNdArray dst) { + dst.elements(2).forEachIndexed((idx, e) -> + NdArrays.vectorOf(src[(int)idx[0]][(int)idx[1]][(int)idx[2]]).copyTo(e) + ); + } + + /** + * Copy a 5-dimensional array of floats into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-5 array + * @throws IllegalArgumentException if {@code dst} is not of rank-5 or has an incompatible shape + * with the source array + */ + public static void copyTo(float[][][][][] src, FloatNdArray dst) { + dst.elements(3).forEachIndexed((idx, e) -> + NdArrays.vectorOf(src[(int)idx[0]][(int)idx[1]][(int)idx[2]][(int)idx[3]]).copyTo(e) + ); + } + + /** + * Copy a 6-dimensional array of floats into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-6 array + * @throws IllegalArgumentException if {@code dst} is not of rank-6 or has an incompatible shape + * with the source array + */ + public static void copyTo(float[][][][][][] src, FloatNdArray dst) { + dst.elements(4).forEachIndexed((idx, e) -> + NdArrays.vectorOf(src[(int)idx[0]][(int)idx[1]][(int)idx[2]][(int)idx[3]][(int)idx[4]]).copyTo(e) + ); + } + + /** + * Copy an array of doubles into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-1 array + * @throws IllegalArgumentException if {@code dst} is not of rank-1 or has an incompatible shape + * with the source array + */ + public static void copyTo(double[] src, DoubleNdArray dst) { + NdArrays.vectorOf(src).copyTo(dst); + } + + /** + * Copy a 2-dimensional array of doubles into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-2 array + * @throws IllegalArgumentException if {@code dst} is not of rank-2 or has an incompatible shape + * with the source array + */ + public static void copyTo(double[][] src, DoubleNdArray dst) { + dst.elements(0).forEachIndexed((idx, e) -> + NdArrays.vectorOf(src[(int)idx[0]]).copyTo(e) + ); + } + + /** + * Copy a 3-dimensional array of doubles into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-3 array + * @throws IllegalArgumentException if {@code dst} is not of rank-3 or has an incompatible shape + * with the source array + */ + public static void copyTo(double[][][] src, DoubleNdArray dst) { + dst.elements(1).forEachIndexed((idx, e) -> + NdArrays.vectorOf(src[(int)idx[0]][(int)idx[1]]).copyTo(e) + ); + } + + /** + * Copy a 4-dimensional array of doubles into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-4 array + * @throws IllegalArgumentException if {@code dst} is not of rank-4 or has an incompatible shape + * with the source array + */ + public static void copyTo(double[][][][] src, DoubleNdArray dst) { + dst.elements(2).forEachIndexed((idx, e) -> + NdArrays.vectorOf(src[(int)idx[0]][(int)idx[1]][(int)idx[2]]).copyTo(e) + ); + } + + /** + * Copy a 5-dimensional array of doubles into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-5 array + * @throws IllegalArgumentException if {@code dst} is not of rank-5 or has an incompatible shape + * with the source array + */ + public static void copyTo(double[][][][][] src, DoubleNdArray dst) { + dst.elements(3).forEachIndexed((idx, e) -> + NdArrays.vectorOf(src[(int)idx[0]][(int)idx[1]][(int)idx[2]][(int)idx[3]]).copyTo(e) + ); + } + + /** + * Copy a 6-dimensional array of doubles into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-6 array + * @throws IllegalArgumentException if {@code dst} is not of rank-6 or has an incompatible shape + * with the source array + */ + public static void copyTo(double[][][][][][] src, DoubleNdArray dst) { + dst.elements(4).forEachIndexed((idx, e) -> + NdArrays.vectorOf(src[(int)idx[0]][(int)idx[1]][(int)idx[2]][(int)idx[3]][(int)idx[4]]).copyTo(e) + ); + } + + /** + * Copy an array of bytes into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-1 array + * @throws IllegalArgumentException if {@code dst} is not of rank-1 or has an incompatible shape + * with the source array + */ + public static void copyTo(byte[] src, ByteNdArray dst) { + NdArrays.vectorOf(src).copyTo(dst); + } + + /** + * Copy a 2-dimensional array of bytes into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-2 array + * @throws IllegalArgumentException if {@code dst} is not of rank-2 or has an incompatible shape + * with the source array + */ + public static void copyTo(byte[][] src, ByteNdArray dst) { + dst.elements(0).forEachIndexed((idx, e) -> + NdArrays.vectorOf(src[(int)idx[0]]).copyTo(e) + ); + } + + /** + * Copy a 3-dimensional array of bytes into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-3 array + * @throws IllegalArgumentException if {@code dst} is not of rank-3 or has an incompatible shape + * with the source array + */ + public static void copyTo(byte[][][] src, ByteNdArray dst) { + dst.elements(1).forEachIndexed((idx, e) -> + NdArrays.vectorOf(src[(int)idx[0]][(int)idx[1]]).copyTo(e) + ); + } + + /** + * Copy a 4-dimensional array of bytes into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-4 array + * @throws IllegalArgumentException if {@code dst} is not of rank-4 or has an incompatible shape + * with the source array + */ + public static void copyTo(byte[][][][] src, ByteNdArray dst) { + dst.elements(2).forEachIndexed((idx, e) -> + NdArrays.vectorOf(src[(int)idx[0]][(int)idx[1]][(int)idx[2]]).copyTo(e) + ); + } + + /** + * Copy a 5-dimensional array of bytes into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-5 array + * @throws IllegalArgumentException if {@code dst} is not of rank-5 or has an incompatible shape + * with the source array + */ + public static void copyTo(byte[][][][][] src, ByteNdArray dst) { + dst.elements(3).forEachIndexed((idx, e) -> + NdArrays.vectorOf(src[(int)idx[0]][(int)idx[1]][(int)idx[2]][(int)idx[3]]).copyTo(e) + ); + } + + /** + * Copy a 6-dimensional array of bytes into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-6 array + * @throws IllegalArgumentException if {@code dst} is not of rank-6 or has an incompatible shape + * with the source array + */ + public static void copyTo(byte[][][][][][] src, ByteNdArray dst) { + dst.elements(4).forEachIndexed((idx, e) -> + NdArrays.vectorOf(src[(int)idx[0]][(int)idx[1]][(int)idx[2]][(int)idx[3]][(int)idx[4]]).copyTo(e) + ); + } + + /** + * Copy an array of shorts into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-1 array + * @throws IllegalArgumentException if {@code dst} is not of rank-1 or has an incompatible shape + * with the source array + */ + public static void copyTo(short[] src, ShortNdArray dst) { + NdArrays.vectorOf(src).copyTo(dst); + } + + /** + * Copy a 2-dimensional array of shorts into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-2 array + * @throws IllegalArgumentException if {@code dst} is not of rank-2 or has an incompatible shape + * with the source array + */ + public static void copyTo(short[][] src, ShortNdArray dst) { + dst.elements(0).forEachIndexed((idx, e) -> + NdArrays.vectorOf(src[(int)idx[0]]).copyTo(e) + ); + } + + /** + * Copy a 3-dimensional array of shorts into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-3 array + * @throws IllegalArgumentException if {@code dst} is not of rank-3 or has an incompatible shape + * with the source array + */ + public static void copyTo(short[][][] src, ShortNdArray dst) { + dst.elements(1).forEachIndexed((idx, e) -> + NdArrays.vectorOf(src[(int)idx[0]][(int)idx[1]]).copyTo(e) + ); + } + + /** + * Copy a 4-dimensional array of shorts into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-4 array + * @throws IllegalArgumentException if {@code dst} is not of rank-4 or has an incompatible shape + * with the source array + */ + public static void copyTo(short[][][][] src, ShortNdArray dst) { + dst.elements(2).forEachIndexed((idx, e) -> + NdArrays.vectorOf(src[(int)idx[0]][(int)idx[1]][(int)idx[2]]).copyTo(e) + ); + } + + /** + * Copy a 5-dimensional array of shorts into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-5 array + * @throws IllegalArgumentException if {@code dst} is not of rank-5 or has an incompatible shape + * with the source array + */ + public static void copyTo(short[][][][][] src, ShortNdArray dst) { + dst.elements(3).forEachIndexed((idx, e) -> + NdArrays.vectorOf(src[(int)idx[0]][(int)idx[1]][(int)idx[2]][(int)idx[3]]).copyTo(e) + ); + } + + /** + * Copy a 6-dimensional array of shorts into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-6 array + * @throws IllegalArgumentException if {@code dst} is not of rank-6 or has an incompatible shape + * with the source array + */ + public static void copyTo(short[][][][][][] src, ShortNdArray dst) { + dst.elements(4).forEachIndexed((idx, e) -> + NdArrays.vectorOf(src[(int)idx[0]][(int)idx[1]][(int)idx[2]][(int)idx[3]][(int)idx[4]]).copyTo(e) + ); + } + + /** + * Copy an array of booleans into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-1 array + * @throws IllegalArgumentException if {@code dst} is not of rank-1 or has an incompatible shape + * with the source array + */ + public static void copyTo(boolean[] src, BooleanNdArray dst) { + NdArrays.vectorOf(src).copyTo(dst); + } + + /** + * Copy a 2-dimensional array of booleans into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-2 array + * @throws IllegalArgumentException if {@code dst} is not of rank-2 or has an incompatible shape + * with the source array + */ + public static void copyTo(boolean[][] src, BooleanNdArray dst) { + dst.elements(0).forEachIndexed((idx, e) -> + NdArrays.vectorOf(src[(int)idx[0]]).copyTo(e) + ); + } + + /** + * Copy a 3-dimensional array of booleans into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-3 array + * @throws IllegalArgumentException if {@code dst} is not of rank-3 or has an incompatible shape + * with the source array + */ + public static void copyTo(boolean[][][] src, BooleanNdArray dst) { + dst.elements(1).forEachIndexed((idx, e) -> + NdArrays.vectorOf(src[(int)idx[0]][(int)idx[1]]).copyTo(e) + ); + } + + /** + * Copy a 4-dimensional array of booleans into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-4 array + * @throws IllegalArgumentException if {@code dst} is not of rank-4 or has an incompatible shape + * with the source array + */ + public static void copyTo(boolean[][][][] src, BooleanNdArray dst) { + dst.elements(2).forEachIndexed((idx, e) -> + NdArrays.vectorOf(src[(int)idx[0]][(int)idx[1]][(int)idx[2]]).copyTo(e) + ); + } + + /** + * Copy a 5-dimensional array of booleans into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-5 array + * @throws IllegalArgumentException if {@code dst} is not of rank-5 or has an incompatible shape + * with the source array + */ + public static void copyTo(boolean[][][][][] src, BooleanNdArray dst) { + dst.elements(3).forEachIndexed((idx, e) -> + NdArrays.vectorOf(src[(int)idx[0]][(int)idx[1]][(int)idx[2]][(int)idx[3]]).copyTo(e) + ); + } + + /** + * Copy a 6-dimensional array of booleans into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-6 array + * @throws IllegalArgumentException if {@code dst} is not of rank-6 or has an incompatible shape + * with the source array + */ + public static void copyTo(boolean[][][][][][] src, BooleanNdArray dst) { + dst.elements(4).forEachIndexed((idx, e) -> + NdArrays.vectorOf(src[(int)idx[0]][(int)idx[1]][(int)idx[2]][(int)idx[3]][(int)idx[4]]).copyTo(e) + ); + } + + /** + * Copy an array of objects into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-1 array + * @param data type + * @throws IllegalArgumentException if {@code dst} is not of rank-1 or has an incompatible shape + * with the source array + */ + public static void copyTo(T[] src, NdArray dst) { + NdArrays.vectorOfObjects(src).copyTo(dst); + } + + /** + * Copy a 2-dimensional array of objects into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-2 array + * @param data type + * @throws IllegalArgumentException if {@code dst} is not of rank-2 or has an incompatible shape + * with the source array + */ + public static void copyTo(T[][] src, NdArray dst) { + dst.elements(0).forEachIndexed((idx, e) -> + NdArrays.vectorOfObjects(src[(int)idx[0]]).copyTo(e) + ); + } + + /** + * Copy a 3-dimensional array of objects into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-3 array + * @param data type + * @throws IllegalArgumentException if {@code dst} is not of rank-3 or has an incompatible shape + * with the source array + */ + public static void copyTo(T[][][] src, NdArray dst) { + dst.elements(1).forEachIndexed((idx, e) -> + NdArrays.vectorOfObjects(src[(int)idx[0]][(int)idx[1]]).copyTo(e) + ); + } + + /** + * Copy a 4-dimensional array of objects into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-4 array + * @param data type + * @throws IllegalArgumentException if {@code dst} is not of rank-4 or has an incompatible shape + * with the source array + */ + public static void copyTo(T[][][][] src, NdArray dst) { + dst.elements(2).forEachIndexed((idx, e) -> + NdArrays.vectorOfObjects(src[(int)idx[0]][(int)idx[1]][(int)idx[2]]).copyTo(e) + ); + } + + /** + * Copy a 5-dimensional array of objects into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-5 array + * @param data type + * @throws IllegalArgumentException if {@code dst} is not of rank-5 or has an incompatible shape + * with the source array + */ + public static void copyTo(T[][][][][] src, NdArray dst) { + dst.elements(3).forEachIndexed((idx, e) -> + NdArrays.vectorOfObjects(src[(int)idx[0]][(int)idx[1]][(int)idx[2]][(int)idx[3]]).copyTo(e) + ); + } + + /** + * Copy a 6-dimensional array of objects into the {@code dst} {@link NdArray} + * + * @param src source array + * @param dst destination rank-6 array + * @param data type + * @throws IllegalArgumentException if {@code dst} is not of rank-6 or has an incompatible shape + * with the source array + */ + public static void copyTo(T[][][][][][] src, NdArray dst) { + dst.elements(4).forEachIndexed((idx, e) -> + NdArrays.vectorOfObjects(src[(int)idx[0]][(int)idx[1]][(int)idx[2]][(int)idx[3]][(int)idx[4]]).copyTo(e) + ); + } + + + /** + * Copy a {@link NdArray} to an array of ints + * + * @param src source rank-1 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-1 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(IntNdArray src, int[] dst) { + if (src.rank() != 1) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + if (src.size() > dst.length) { + throw new ArrayIndexOutOfBoundsException(String.valueOf(src.size()) + " > " + dst.length); + } + src.read(DataBuffers.of(dst, false, false)); + } + + /** + * Copy a {@link NdArray} to a 2-dimensional array of ints + * + * @param src source rank-2 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-2 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(IntNdArray src, int[][] dst) { + if (src.rank() != 2) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(0).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]]) + ); + } + + /** + * Copy a {@link NdArray} to a 3-dimensional array of ints + * + * @param src source rank-3 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-3 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(IntNdArray src, int[][][] dst) { + if (src.rank() != 3) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(1).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]][(int)idx[1]]) + ); + } + + /** + * Copy a {@link NdArray} to a 4-dimensional array of ints + * + * @param src source rank-4 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-4 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(IntNdArray src, int[][][][] dst) { + if (src.rank() != 4) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(2).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]][(int)idx[1]][(int)idx[2]]) + ); + } + + /** + * Copy a {@link NdArray} to a 5-dimensional array of ints + * + * @param src source rank-5 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-5 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(IntNdArray src, int[][][][][] dst) { + if (src.rank() != 5) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(3).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]][(int)idx[1]][(int)idx[2]][(int)idx[3]]) + ); + } + + /** + * Copy a {@link NdArray} to a 6-dimensional array of ints + * + * @param src source rank-6 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-6 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(IntNdArray src, int[][][][][][] dst) { + if (src.rank() != 6) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(4).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]][(int)idx[1]][(int)idx[2]][(int)idx[3]][(int)idx[4]]) + ); + } + + /** + * Copy a {@link NdArray} to an array of longs + * + * @param src source rank-1 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-1 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(LongNdArray src, long[] dst) { + if (src.rank() != 1) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + if (src.size() > dst.length) { + throw new ArrayIndexOutOfBoundsException(String.valueOf(src.size()) + " > " + dst.length); + } + src.read(DataBuffers.of(dst, false, false)); + } + + /** + * Copy a {@link NdArray} to a 2-dimensional array of longs + * + * @param src source rank-2 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-2 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(LongNdArray src, long[][] dst) { + if (src.rank() != 2) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(0).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]]) + ); + } + + /** + * Copy a {@link NdArray} to a 3-dimensional array of longs + * + * @param src source rank-3 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-3 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(LongNdArray src, long[][][] dst) { + if (src.rank() != 3) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(1).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]][(int)idx[1]]) + ); + } + + /** + * Copy a {@link NdArray} to a 4-dimensional array of longs + * + * @param src source rank-4 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-4 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(LongNdArray src, long[][][][] dst) { + if (src.rank() != 4) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(2).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]][(int)idx[1]][(int)idx[2]]) + ); + } + + /** + * Copy a {@link NdArray} to a 5-dimensional array of longs + * + * @param src source rank-5 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-5 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(LongNdArray src, long[][][][][] dst) { + if (src.rank() != 5) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(3).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]][(int)idx[1]][(int)idx[2]][(int)idx[3]]) + ); + } + + /** + * Copy a {@link NdArray} to a 6-dimensional array of longs + * + * @param src source rank-6 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-6 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(LongNdArray src, long[][][][][][] dst) { + if (src.rank() != 6) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(4).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]][(int)idx[1]][(int)idx[2]][(int)idx[3]][(int)idx[4]]) + ); + } + + /** + * Copy a {@link NdArray} to an array of floats + * + * @param src source rank-1 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-1 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(FloatNdArray src, float[] dst) { + if (src.rank() != 1) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + if (src.size() > dst.length) { + throw new ArrayIndexOutOfBoundsException(String.valueOf(src.size()) + " > " + dst.length); + } + src.read(DataBuffers.of(dst, false, false)); + } + + /** + * Copy a {@link NdArray} to a 2-dimensional array of floats + * + * @param src source rank-2 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-2 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(FloatNdArray src, float[][] dst) { + if (src.rank() != 2) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(0).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]]) + ); + } + + /** + * Copy a {@link NdArray} to a 3-dimensional array of floats + * + * @param src source rank-3 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-3 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(FloatNdArray src, float[][][] dst) { + if (src.rank() != 3) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(1).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]][(int)idx[1]]) + ); + } + + /** + * Copy a {@link NdArray} to a 4-dimensional array of floats + * + * @param src source rank-4 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-4 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(FloatNdArray src, float[][][][] dst) { + if (src.rank() != 4) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(2).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]][(int)idx[1]][(int)idx[2]]) + ); + } + + /** + * Copy a {@link NdArray} to a 5-dimensional array of floats + * + * @param src source rank-5 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-5 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(FloatNdArray src, float[][][][][] dst) { + if (src.rank() != 5) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(3).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]][(int)idx[1]][(int)idx[2]][(int)idx[3]]) + ); + } + + /** + * Copy a {@link NdArray} to a 6-dimensional array of floats + * + * @param src source rank-6 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-6 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(FloatNdArray src, float[][][][][][] dst) { + if (src.rank() != 6) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(4).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]][(int)idx[1]][(int)idx[2]][(int)idx[3]][(int)idx[4]]) + ); + } + + /** + * Copy a {@link NdArray} to an array of doubles + * + * @param src source rank-1 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-1 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(DoubleNdArray src, double[] dst) { + if (src.rank() != 1) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + if (src.size() > dst.length) { + throw new ArrayIndexOutOfBoundsException(String.valueOf(src.size()) + " > " + dst.length); + } + src.read(DataBuffers.of(dst, false, false)); + } + + /** + * Copy a {@link NdArray} to a 2-dimensional array of doubles + * + * @param src source rank-2 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-2 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(DoubleNdArray src, double[][] dst) { + if (src.rank() != 2) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(0).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]]) + ); + } + + /** + * Copy a {@link NdArray} to a 3-dimensional array of doubles + * + * @param src source rank-3 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-3 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(DoubleNdArray src, double[][][] dst) { + if (src.rank() != 3) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(1).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]][(int)idx[1]]) + ); + } + + /** + * Copy a {@link NdArray} to a 4-dimensional array of doubles + * + * @param src source rank-4 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-4 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(DoubleNdArray src, double[][][][] dst) { + if (src.rank() != 4) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(2).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]][(int)idx[1]][(int)idx[2]]) + ); + } + + /** + * Copy a {@link NdArray} to a 5-dimensional array of doubles + * + * @param src source rank-5 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-5 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(DoubleNdArray src, double[][][][][] dst) { + if (src.rank() != 5) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(3).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]][(int)idx[1]][(int)idx[2]][(int)idx[3]]) + ); + } + + /** + * Copy a {@link NdArray} to a 6-dimensional array of doubles + * + * @param src source rank-6 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-6 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(DoubleNdArray src, double[][][][][][] dst) { + if (src.rank() != 6) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(4).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]][(int)idx[1]][(int)idx[2]][(int)idx[3]][(int)idx[4]]) + ); + } + + /** + * Copy a {@link NdArray} to an array of bytes + * + * @param src source rank-1 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-1 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(ByteNdArray src, byte[] dst) { + if (src.rank() != 1) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + if (src.size() > dst.length) { + throw new ArrayIndexOutOfBoundsException(String.valueOf(src.size()) + " > " + dst.length); + } + src.read(DataBuffers.of(dst, false, false)); + } + + /** + * Copy a {@link NdArray} to a 2-dimensional array of bytes + * + * @param src source rank-2 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-2 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(ByteNdArray src, byte[][] dst) { + if (src.rank() != 2) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(0).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]]) + ); + } + + /** + * Copy a {@link NdArray} to a 3-dimensional array of bytes + * + * @param src source rank-3 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-3 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(ByteNdArray src, byte[][][] dst) { + if (src.rank() != 3) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(1).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]][(int)idx[1]]) + ); + } + + /** + * Copy a {@link NdArray} to a 4-dimensional array of bytes + * + * @param src source rank-4 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-4 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(ByteNdArray src, byte[][][][] dst) { + if (src.rank() != 4) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(2).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]][(int)idx[1]][(int)idx[2]]) + ); + } + + /** + * Copy a {@link NdArray} to a 5-dimensional array of bytes + * + * @param src source rank-5 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-5 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(ByteNdArray src, byte[][][][][] dst) { + if (src.rank() != 5) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(3).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]][(int)idx[1]][(int)idx[2]][(int)idx[3]]) + ); + } + + /** + * Copy a {@link NdArray} to a 6-dimensional array of bytes + * + * @param src source rank-6 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-6 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(ByteNdArray src, byte[][][][][][] dst) { + if (src.rank() != 6) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(4).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]][(int)idx[1]][(int)idx[2]][(int)idx[3]][(int)idx[4]]) + ); + } + + /** + * Copy a {@link NdArray} to an array of shorts + * + * @param src source rank-1 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-1 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(ShortNdArray src, short[] dst) { + if (src.rank() != 1) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + if (src.size() > dst.length) { + throw new ArrayIndexOutOfBoundsException(String.valueOf(src.size()) + " > " + dst.length); + } + src.read(DataBuffers.of(dst, false, false)); + } + + /** + * Copy a {@link NdArray} to a 2-dimensional array of shorts + * + * @param src source rank-2 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-2 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(ShortNdArray src, short[][] dst) { + if (src.rank() != 2) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(0).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]]) + ); + } + + /** + * Copy a {@link NdArray} to a 3-dimensional array of shorts + * + * @param src source rank-3 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-3 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(ShortNdArray src, short[][][] dst) { + if (src.rank() != 3) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(1).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]][(int)idx[1]]) + ); + } + + /** + * Copy a {@link NdArray} to a 4-dimensional array of shorts + * + * @param src source rank-4 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-4 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(ShortNdArray src, short[][][][] dst) { + if (src.rank() != 4) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(2).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]][(int)idx[1]][(int)idx[2]]) + ); + } + + /** + * Copy a {@link NdArray} to a 5-dimensional array of shorts + * + * @param src source rank-5 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-5 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(ShortNdArray src, short[][][][][] dst) { + if (src.rank() != 5) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(3).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]][(int)idx[1]][(int)idx[2]][(int)idx[3]]) + ); + } + + /** + * Copy a {@link NdArray} to a 6-dimensional array of shorts + * + * @param src source rank-6 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-6 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(ShortNdArray src, short[][][][][][] dst) { + if (src.rank() != 6) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(4).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]][(int)idx[1]][(int)idx[2]][(int)idx[3]][(int)idx[4]]) + ); + } + + /** + * Copy a {@link NdArray} to an array of booleans. + * + * @param src source rank-1 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-1 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(BooleanNdArray src, boolean[] dst) { + if (src.rank() != 1) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + if (src.size() > dst.length) { + throw new ArrayIndexOutOfBoundsException(String.valueOf(src.size()) + " > " + dst.length); + } + src.read(DataBuffers.of(dst, false, false)); + } + + /** + * Copy a {@link NdArray} to a 2-dimensional array of booleans + * + * @param src source rank-2 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-2 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(BooleanNdArray src, boolean[][] dst) { + if (src.rank() != 2) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(0).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]]) + ); + } + + /** + * Copy a {@link NdArray} to a 3-dimensional array of booleans + * + * @param src source rank-3 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-3 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(BooleanNdArray src, boolean[][][] dst) { + if (src.rank() != 3) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(1).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]][(int)idx[1]]) + ); + } + + /** + * Copy a {@link NdArray} to a 4-dimensional array of booleans + * + * @param src source rank-4 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-4 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(BooleanNdArray src, boolean[][][][] dst) { + if (src.rank() != 4) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(2).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]][(int)idx[1]][(int)idx[2]]) + ); + } + + /** + * Copy a {@link NdArray} to a 5-dimensional array of booleans + * + * @param src source rank-5 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-5 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(BooleanNdArray src, boolean[][][][][] dst) { + if (src.rank() != 5) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(3).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]][(int)idx[1]][(int)idx[2]][(int)idx[3]]) + ); + } + + /** + * Copy a {@link NdArray} to a 6-dimensional array of booleans + * + * @param src source rank-6 array + * @param dst destination array + * @throws IllegalArgumentException if {@code src} is not of rank-6 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(BooleanNdArray src, boolean[][][][][][] dst) { + if (src.rank() != 6) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(4).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]][(int)idx[1]][(int)idx[2]][(int)idx[3]][(int)idx[4]]) + ); + } + + /** + * Copy a {@link NdArray} to an array of objects + * + * @param src source rank-1 array + * @param dst destination array + * @param data type + * @throws IllegalArgumentException if {@code src} is not of rank-1 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(NdArray src, T[] dst) { + if (src.rank() != 1) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + if (src.size() > dst.length) { + throw new ArrayIndexOutOfBoundsException(String.valueOf(src.size()) + " > " + dst.length); + } + src.read(DataBuffers.of(dst, false, false)); + } + + /** + * Copy a {@link NdArray} to a 2-dimensional array of objects + * + * @param src source rank-2 array + * @param dst destination array + * @param data type + * @throws IllegalArgumentException if {@code src} is not of rank-2 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(NdArray src, T[][] dst) { + if (src.rank() != 2) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(0).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]]) + ); + } + + /** + * Copy a {@link NdArray} to a 3-dimensional array of objects + * + * @param src source rank-3 array + * @param dst destination array + * @param data type + * @throws IllegalArgumentException if {@code src} is not of rank-3 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(NdArray src, T[][][] dst) { + if (src.rank() != 3) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(1).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]][(int)idx[1]]) + ); + } + + /** + * Copy a {@link NdArray} to a 4-dimensional array of objects + * + * @param src source rank-4 array + * @param dst destination array + * @param data type + * @throws IllegalArgumentException if {@code src} is not of rank-4 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(NdArray src, T[][][][] dst) { + if (src.rank() != 4) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(2).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]][(int)idx[1]][(int)idx[2]]) + ); + } + + /** + * Copy a {@link NdArray} to a 5-dimensional array of objects + * + * @param src source rank-5 array + * @param dst destination array + * @param data type + * @throws IllegalArgumentException if {@code src} is not of rank-5 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(NdArray src, T[][][][][] dst) { + if (src.rank() != 5) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(3).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]][(int)idx[1]][(int)idx[2]][(int)idx[3]]) + ); + } + + /** + * Copy a {@link NdArray} to a 6-dimensional array of objects + * + * @param src source rank-6 array + * @param dst destination array + * @param data type + * @throws IllegalArgumentException if {@code src} is not of rank-6 + * @throws ArrayIndexOutOfBoundsException if not all elements of {@code src} can fit it the destination array + */ + public static void copyFrom(NdArray src, T[][][][][][] dst) { + if (src.rank() != 6) { + throw new IllegalArgumentException("Array cannot be copied from NdArray of rank " + src.rank()); + } + src.elements(4).forEachIndexed((idx, e) -> + copyFrom(e, dst[(int)idx[0]][(int)idx[1]][(int)idx[2]][(int)idx[3]][(int)idx[4]]) + ); + } + + /** + * Compute the shape of an int array. + * + * @param array 1D array + * @return shape of the array + */ + public static Shape shapeOf(int[] array) { + return Shape.of(array.length); + } + + /** + * Compute the shape of a 2-dimensional int array. + * + * @param array 2D array + * @return shape of the array + */ + public static Shape shapeOf(int[][] array) { + return Shape.of(computeShape(array, new long[2])); + } + + /** + * Compute the shape of a 3-dimensional int array. + * + * @param array 3D array + * @return shape of the array + */ + public static Shape shapeOf(int[][][] array) { + return Shape.of(computeShape(array, new long[3])); + } + + /** + * Compute the shape of a 4-dimensional int array. + * + * @param array 4D array + * @return shape of the array + */ + public static Shape shapeOf(int[][][][] array) { + return Shape.of(computeShape(array, new long[4])); + } + + /** + * Compute the shape of a 5-dimensional int array. + * + * @param array 5D array + * @return shape of the array + */ + public static Shape shapeOf(int[][][][][] array) { + return Shape.of(computeShape(array, new long[5])); + } + + /** + * Compute the shape of a 6-dimensional int array. + * + * @param array 6D array + * @return shape of the array + */ + public static Shape shapeOf(int[][][][][][] array) { + return Shape.of(computeShape(array, new long[6])); + } + + /** + * Compute the shape of a long array. + * + * @param array 1D array + * @return shape of the array + */ + public static Shape shapeOf(long[] array) { + return Shape.of(array.length); + } + + /** + * Compute the shape of a 2-dimensional long array. + * + * @param array 2D array + * @return shape of the array + */ + public static Shape shapeOf(long[][] array) { + return Shape.of(computeShape(array, new long[2])); + } + + /** + * Compute the shape of a 3-dimensional long array. + * + * @param array 3D array + * @return shape of the array + */ + public static Shape shapeOf(long[][][] array) { + return Shape.of(computeShape(array, new long[3])); + } + + /** + * Compute the shape of a 4-dimensional long array. + * + * @param array 4D array + * @return shape of the array + */ + public static Shape shapeOf(long[][][][] array) { + return Shape.of(computeShape(array, new long[4])); + } + + /** + * Compute the shape of a 5-dimensional long array. + * + * @param array 5D array + * @return shape of the array + */ + public static Shape shapeOf(long[][][][][] array) { + return Shape.of(computeShape(array, new long[5])); + } + + /** + * Compute the shape of a 6-dimensional long array. + * + * @param array 6D array + * @return shape of the array + */ + public static Shape shapeOf(long[][][][][][] array) { + return Shape.of(computeShape(array, new long[6])); + } + + /** + * Compute the shape of a float array. + * + * @param array 1D array + * @return shape of the array + */ + public static Shape shapeOf(float[] array) { + return Shape.of(array.length); + } + + /** + * Compute the shape of a 2-dimensional float array. + * + * @param array 2D array + * @return shape of the array + */ + public static Shape shapeOf(float[][] array) { + return Shape.of(computeShape(array, new long[2])); + } + + /** + * Compute the shape of a 3-dimensional float array. + * + * @param array 3D array + * @return shape of the array + */ + public static Shape shapeOf(float[][][] array) { + return Shape.of(computeShape(array, new long[3])); + } + + /** + * Compute the shape of a 4-dimensional float array. + * + * @param array 4D array + * @return shape of the array + */ + public static Shape shapeOf(float[][][][] array) { + return Shape.of(computeShape(array, new long[4])); + } + + /** + * Compute the shape of a 5-dimensional float array. + * + * @param array 5D array + * @return shape of the array + */ + public static Shape shapeOf(float[][][][][] array) { + return Shape.of(computeShape(array, new long[5])); + } + + /** + * Compute the shape of a 6-dimensional float array. + * + * @param array 6D array + * @return shape of the array + */ + public static Shape shapeOf(float[][][][][][] array) { + return Shape.of(computeShape(array, new long[6])); + } + + /** + * Compute the shape of a double array. + * + * @param array 1D array + * @return shape of the array + */ + public static Shape shapeOf(double[] array) { + return Shape.of(array.length); + } + + /** + * Compute the shape of a 2-dimensional double array. + * + * @param array 2D array + * @return shape of the array + */ + public static Shape shapeOf(double[][] array) { + return Shape.of(computeShape(array, new long[2])); + } + + /** + * Compute the shape of a 3-dimensional double array. + * + * @param array 3D array + * @return shape of the array + */ + public static Shape shapeOf(double[][][] array) { + return Shape.of(computeShape(array, new long[3])); + } + + /** + * Compute the shape of a 4-dimensional double array. + * + * @param array 4D array + * @return shape of the array + */ + public static Shape shapeOf(double[][][][] array) { + return Shape.of(computeShape(array, new long[4])); + } + + /** + * Compute the shape of a 5-dimensional double array. + * + * @param array 5D array + * @return shape of the array + */ + public static Shape shapeOf(double[][][][][] array) { + return Shape.of(computeShape(array, new long[5])); + } + + /** + * Compute the shape of a 6-dimensional double array. + * + * @param array 6D array + * @return shape of the array + */ + public static Shape shapeOf(double[][][][][][] array) { + return Shape.of(computeShape(array, new long[6])); + } + + /** + * Compute the shape of a byte array. + * + * @param array 1D array + * @return shape of the array + */ + public static Shape shapeOf(byte[] array) { + return Shape.of(array.length); + } + + /** + * Compute the shape of a 2-dimensional byte array. + * + * @param array 2D array + * @return shape of the array + */ + public static Shape shapeOf(byte[][] array) { + return Shape.of(computeShape(array, new long[2])); + } + + /** + * Compute the shape of a 3-dimensional byte array. + * + * @param array 3D array + * @return shape of the array + */ + public static Shape shapeOf(byte[][][] array) { + return Shape.of(computeShape(array, new long[3])); + } + + /** + * Compute the shape of a 4-dimensional byte array. + * + * @param array 4D array + * @return shape of the array + */ + public static Shape shapeOf(byte[][][][] array) { + return Shape.of(computeShape(array, new long[4])); + } + + /** + * Compute the shape of a 5-dimensional byte array. + * + * @param array 5D array + * @return shape of the array + */ + public static Shape shapeOf(byte[][][][][] array) { + return Shape.of(computeShape(array, new long[5])); + } + + /** + * Compute the shape of a 6-dimensional byte array. + * + * @param array 6D array + * @return shape of the array + */ + public static Shape shapeOf(byte[][][][][][] array) { + return Shape.of(computeShape(array, new long[6])); + } + + /** + * Compute the shape of a short array. + * + * @param array 1D array + * @return shape of the array + */ + public static Shape shapeOf(short[] array) { + return Shape.of(array.length); + } + + /** + * Compute the shape of a 2-dimensional short array. + * + * @param array 2D array + * @return shape of the array + */ + public static Shape shapeOf(short[][] array) { + return Shape.of(computeShape(array, new long[2])); + } + + /** + * Compute the shape of a 3-dimensional short array. + * + * @param array 3D array + * @return shape of the array + */ + public static Shape shapeOf(short[][][] array) { + return Shape.of(computeShape(array, new long[3])); + } + + /** + * Compute the shape of a 4-dimensional short array. + * + * @param array 4D array + * @return shape of the array + */ + public static Shape shapeOf(short[][][][] array) { + return Shape.of(computeShape(array, new long[4])); + } + + /** + * Compute the shape of a 5-dimensional short array. + * + * @param array 5D array + * @return shape of the array + */ + public static Shape shapeOf(short[][][][][] array) { + return Shape.of(computeShape(array, new long[5])); + } + + /** + * Compute the shape of a 6-dimensional short array. + * + * @param array 6D array + * @return shape of the array + */ + public static Shape shapeOf(short[][][][][][] array) { + return Shape.of(computeShape(array, new long[6])); + } + + /** + * Compute the shape of a boolean array. + * + * @param array 1D array + * @return shape of the array + */ + public static Shape shapeOf(boolean[] array) { + return Shape.of(array.length); + } + + /** + * Compute the shape of a 2-dimensional boolean array. + * + * @param array 2D array + * @return shape of the array + */ + public static Shape shapeOf(boolean[][] array) { + return Shape.of(computeShape(array, new long[2])); + } + + /** + * Compute the shape of a 3-dimensional boolean array. + * + * @param array 3D array + * @return shape of the array + */ + public static Shape shapeOf(boolean[][][] array) { + return Shape.of(computeShape(array, new long[3])); + } + + /** + * Compute the shape of a 4-dimensional boolean array. + * + * @param array 4D array + * @return shape of the array + */ + public static Shape shapeOf(boolean[][][][] array) { + return Shape.of(computeShape(array, new long[4])); + } + + /** + * Compute the shape of a 5-dimensional boolean array. + * + * @param array 5D array + * @return shape of the array + */ + public static Shape shapeOf(boolean[][][][][] array) { + return Shape.of(computeShape(array, new long[5])); + } + + /** + * Compute the shape of a 6-dimensional boolean array. + * + * @param array 6D array + * @return shape of the array + */ + public static Shape shapeOf(boolean[][][][][][] array) { + return Shape.of(computeShape(array, new long[6])); + } + + /** + * Compute the shape of an object array. + * + * @param array 1D array + * @param data type + * @return shape of the array + */ + public static Shape shapeOf(T[] array) { + return Shape.of(array.length); + } + + /** + * Compute the shape of a 2-dimensional object array. + * + * @param array 2D array + * @param data type + * @return shape of the array + */ + public static Shape shapeOf(T[][] array) { + return Shape.of(computeShape(array, new long[2])); + } + + /** + * Compute the shape of a 3-dimensional object array. + * + * @param array 3D array + * @param data type + * @return shape of the array + */ + public static Shape shapeOf(T[][][] array) { + return Shape.of(computeShape(array, new long[3])); + } + + /** + * Compute the shape of a 4-dimensional object array. + * + * @param array 4D array + * @param data type + * @return shape of the array + */ + public static Shape shapeOf(T[][][][] array) { + return Shape.of(computeShape(array, new long[4])); + } + + /** + * Compute the shape of a 5-dimensional object array. + * + * @param array 5D array + * @param data type + * @return shape of the array + */ + public static Shape shapeOf(T[][][][][] array) { + return Shape.of(computeShape(array, new long[5])); + } + + /** + * Compute the shape of a 6-dimensional object array. + * + * @param array 6D array + * @param data type + * @return shape of the array + */ + public static Shape shapeOf(T[][][][][][] array) { + return Shape.of(computeShape(array, new long[6])); + } + + private static void dimSize(int arrayLength, long[] shape, int dimIdx) { + if (shape[dimIdx] == 0) { + shape[dimIdx] = arrayLength; + } else if (shape[dimIdx] != arrayLength) { + shape[dimIdx] = Shape.UNKNOWN_SIZE; + } + } + + private static long[] computeShape(int[][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 2); + for (int i = 0; i < array.length; ++i) { + if (array[i] == null) { + throw new IllegalStateException("One of the subarray is null"); + } + dimSize(array[i].length, shape, shape.length - 1); + } + return shape; + } + + private static long[] computeShape(int[][][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 3); + for (int i = 0; i < array.length; ++i) { + computeShape(array[i], shape); + } + return shape; + } + + private static long[] computeShape(int[][][][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 4); + for (int i = 0; i < array.length; ++i) { + computeShape(array[i], shape); + } + return shape; + } + + private static long[] computeShape(int[][][][][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 5); + for (int i = 0; i < array.length; ++i) { + computeShape(array[i], shape); + } + return shape; + } + + private static long[] computeShape(int[][][][][][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 6); + for (int i = 0; i < array.length; ++i) { + computeShape(array[i], shape); + } + return shape; + } + + private static long[] computeShape(long[][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 2); + for (int i = 0; i < array.length; ++i) { + if (array[i] == null) { + throw new IllegalStateException("One of the subarray is null"); + } + dimSize(array[i].length, shape, shape.length - 1); + } + return shape; + } + + private static long[] computeShape(long[][][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 3); + for (int i = 0; i < array.length; ++i) { + computeShape(array[i], shape); + } + return shape; + } + + private static long[] computeShape(long[][][][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 4); + for (int i = 0; i < array.length; ++i) { + computeShape(array[i], shape); + } + return shape; + } + + private static long[] computeShape(long[][][][][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 5); + for (int i = 0; i < array.length; ++i) { + computeShape(array[i], shape); + } + return shape; + } + + private static long[] computeShape(long[][][][][][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 6); + for (int i = 0; i < array.length; ++i) { + computeShape(array[i], shape); + } + return shape; + } + + private static long[] computeShape(float[][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 2); + for (int i = 0; i < array.length; ++i) { + if (array[i] == null) { + throw new IllegalStateException("One of the subarray is null"); + } + dimSize(array[i].length, shape, shape.length - 1); + } + return shape; + } + + private static long[] computeShape(float[][][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 3); + for (int i = 0; i < array.length; ++i) { + computeShape(array[i], shape); + } + return shape; + } + + private static long[] computeShape(float[][][][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 4); + for (int i = 0; i < array.length; ++i) { + computeShape(array[i], shape); + } + return shape; + } + + private static long[] computeShape(float[][][][][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 5); + for (int i = 0; i < array.length; ++i) { + computeShape(array[i], shape); + } + return shape; + } + + private static long[] computeShape(float[][][][][][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 6); + for (int i = 0; i < array.length; ++i) { + computeShape(array[i], shape); + } + return shape; + } + + private static long[] computeShape(double[][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 2); + for (int i = 0; i < array.length; ++i) { + if (array[i] == null) { + throw new IllegalStateException("One of the subarray is null"); + } + dimSize(array[i].length, shape, shape.length - 1); + } + return shape; + } + + private static long[] computeShape(double[][][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 3); + for (int i = 0; i < array.length; ++i) { + computeShape(array[i], shape); + } + return shape; + } + + private static long[] computeShape(double[][][][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 4); + for (int i = 0; i < array.length; ++i) { + computeShape(array[i], shape); + } + return shape; + } + + private static long[] computeShape(double[][][][][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 5); + for (int i = 0; i < array.length; ++i) { + computeShape(array[i], shape); + } + return shape; + } + + private static long[] computeShape(double[][][][][][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 6); + for (int i = 0; i < array.length; ++i) { + computeShape(array[i], shape); + } + return shape; + } + + private static long[] computeShape(byte[][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 2); + for (int i = 0; i < array.length; ++i) { + if (array[i] == null) { + throw new IllegalStateException("One of the subarray is null"); + } + dimSize(array[i].length, shape, shape.length - 1); + } + return shape; + } + + private static long[] computeShape(byte[][][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 3); + for (int i = 0; i < array.length; ++i) { + computeShape(array[i], shape); + } + return shape; + } + + private static long[] computeShape(byte[][][][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 4); + for (int i = 0; i < array.length; ++i) { + computeShape(array[i], shape); + } + return shape; + } + + private static long[] computeShape(byte[][][][][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 5); + for (int i = 0; i < array.length; ++i) { + computeShape(array[i], shape); + } + return shape; + } + + private static long[] computeShape(byte[][][][][][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 6); + for (int i = 0; i < array.length; ++i) { + computeShape(array[i], shape); + } + return shape; + } + + private static long[] computeShape(short[][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 2); + for (int i = 0; i < array.length; ++i) { + if (array[i] == null) { + throw new IllegalStateException("One of the subarray is null"); + } + dimSize(array[i].length, shape, shape.length - 1); + } + return shape; + } + + private static long[] computeShape(short[][][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 3); + for (int i = 0; i < array.length; ++i) { + computeShape(array[i], shape); + } + return shape; + } + + private static long[] computeShape(short[][][][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 4); + for (int i = 0; i < array.length; ++i) { + computeShape(array[i], shape); + } + return shape; + } + + private static long[] computeShape(short[][][][][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 5); + for (int i = 0; i < array.length; ++i) { + computeShape(array[i], shape); + } + return shape; + } + + private static long[] computeShape(short[][][][][][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 6); + for (int i = 0; i < array.length; ++i) { + computeShape(array[i], shape); + } + return shape; + } + + private static long[] computeShape(boolean[][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 2); + for (int i = 0; i < array.length; ++i) { + if (array[i] == null) { + throw new IllegalStateException("One of the subarray is null"); + } + dimSize(array[i].length, shape, shape.length - 1); + } + return shape; + } + + private static long[] computeShape(boolean[][][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 3); + for (int i = 0; i < array.length; ++i) { + computeShape(array[i], shape); + } + return shape; + } + + private static long[] computeShape(boolean[][][][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 4); + for (int i = 0; i < array.length; ++i) { + computeShape(array[i], shape); + } + return shape; + } + + private static long[] computeShape(boolean[][][][][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 5); + for (int i = 0; i < array.length; ++i) { + computeShape(array[i], shape); + } + return shape; + } + + private static long[] computeShape(boolean[][][][][][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 6); + for (int i = 0; i < array.length; ++i) { + computeShape(array[i], shape); + } + return shape; + } + + private static long[] computeShape(T[][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 2); + for (int i = 0; i < array.length; ++i) { + if (array[i] == null) { + throw new IllegalStateException("One of the subarray is null"); + } + dimSize(array[i].length, shape, shape.length - 1); + } + return shape; + } + + private static long[] computeShape(T[][][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 3); + for (int i = 0; i < array.length; ++i) { + computeShape(array[i], shape); + } + return shape; + } + + private static long[] computeShape(T[][][][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 4); + for (int i = 0; i < array.length; ++i) { + computeShape(array[i], shape); + } + return shape; + } + + private static long[] computeShape(T[][][][][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 5); + for (int i = 0; i < array.length; ++i) { + computeShape(array[i], shape); + } + return shape; + } + + private static long[] computeShape(T[][][][][][] array, long[] shape) { + if (array == null) { + throw new IllegalStateException("The array or one of its subarray is null"); + } + dimSize(array.length, shape, shape.length - 6); + for (int i = 0; i < array.length; ++i) { + computeShape(array[i], shape); + } + return shape; + } + + private static Class componentTypeOf(Object array) { + Class componentType = array.getClass().getComponentType(); + while (componentType.isArray()) { + componentType = componentType.getComponentType(); + } + return (Class)componentType; + } + + private static int[] computeArrayDims(NdArray ndArray, int expectedRank) { + Shape shape = ndArray.shape(); + if (shape.numDimensions() != expectedRank) { + throw new IllegalArgumentException("NdArray must be of rank " + expectedRank); + } + int[] arrayShape = new int[expectedRank]; + for (int i = 0; i < expectedRank; ++i) { + long dimSize = shape.size(i); + if (dimSize > Integer.MAX_VALUE) { + throw new IllegalArgumentException("Dimension " + i + " is too large to fit in a standard array (" + shape.size(i) + ")"); + } + arrayShape[i] = (int)dimSize; + } + return arrayShape; + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/buffer/BooleanDataBuffer.java b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/BooleanDataBuffer.java new file mode 100644 index 00000000000..73a570d4fe8 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/BooleanDataBuffer.java @@ -0,0 +1,165 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.buffer; + +import java.nio.BufferOverflowException; +import java.nio.BufferUnderflowException; +import java.nio.ReadOnlyBufferException; + +/** + * A {@link DataBuffer} of booleans. + */ +public interface BooleanDataBuffer extends DataBuffer { + + /** + * Reads the boolean at the given index. + * + * @param index the index from which the float will be read + * @return the boolean at the given index + * @throws IndexOutOfBoundsException if index is negative or not smaller than the buffer size + */ + boolean getBoolean(long index); + + /** + * Writes the given boolean into this buffer at the given index. + * + * @param value the boolean to be written + * @param index the index at which the value will be written + * @return this buffer + * @throws IndexOutOfBoundsException if index is negative or not smaller than the buffer size + * @throws ReadOnlyBufferException if this buffer is read-only + */ + BooleanDataBuffer setBoolean(boolean value, long index); + + /** + * Bulk get method, using boolean arrays. + *

+ * This method transfers values from this buffer into the given destination array. If there are + * fewer values in the buffer than are required to satisfy the request, that is, if + * {@code dst.length > size()}, then no values are transferred and a + * BufferUnderflowException is thrown. + *

+ * Otherwise, this method copies {@code n = dst.length} values from this buffer into the given + * array. + * + * @param dst the array into which values are to be written + * @return this buffer + * @throws BufferUnderflowException if there are not enough values to copy from this buffer + */ + default BooleanDataBuffer read(boolean[] dst) { + return read(dst, 0, dst.length); + } + + /** + * Bulk get method, using boolean arrays. + *

+ * This method transfers values from this buffer into the given destination array. If there are + * fewer values in the buffer than are required to satisfy the request, that is, if + * {@code length > size()}, then no values are transferred and a + * BufferUnderflowException is thrown. + *

+ * Otherwise, this method copies {@code n = length} values from this buffer into the given array + * starting at the given offset. + * + * @param dst the array into which values are to be written + * @param offset the offset within the array of the first value to be written; must be + * non-negative and no larger than {@code dst.length} + * @param length the maximum number of values to be written to the given array; must be + * non-negative and no larger than {@code dst.length - offset} + * @return this buffer + * @throws BufferUnderflowException if there are fewer than length values remaining in this buffer + * @throws IndexOutOfBoundsException if the preconditions on the offset and length parameters do + * not hold + */ + BooleanDataBuffer read(boolean[] dst, int offset, int length); + + /** + * Bulk put method, using boolean arrays. + *

+ * This method transfers the values in the given source array into this buffer. If there are + * more values in the source array than in this buffer, that is, if + * {@code src.length > size()}, then no values are transferred and a + * BufferOverflowException is thrown. + *

+ * Otherwise, this method copies {@code n = src.length} values from the given array. + * + * @param src the source array from which values are to be read + * @return this buffer + * @throws BufferOverflowException if there is insufficient space in this buffer for the values in + * the source array + * @throws ReadOnlyBufferException if this buffer is read-only + */ + default BooleanDataBuffer write(boolean[] src) { + return write(src, 0, src.length); + } + + /** + * Bulk put method, using boolean arrays. + *

+ * This method transfers the values in the given source array into this buffer. If there are + * more values in the source array than in this buffer, that is, if + * {@code length > size()}, then no values are transferred and a + * BufferOverflowException is thrown. + *

+ * Otherwise, this method copies {@code n = length} values from the given array into this buffer, + * starting at the given offset. + * + * @param src the source array from which values are to be read + * @param offset the offset within the array of the first value to be read; must be non-negative + * and no larger than {@code src.length} + * @param length the number of values to be read from the given array; must be non-negative and no + * larger than {@code src.length - offset} + * @return this buffer + * @throws BufferOverflowException if there is insufficient space in this buffer for the values in + * the source array + * @throws IndexOutOfBoundsException if the preconditions on the offset and length parameters do + * not hold + * @throws ReadOnlyBufferException if this buffer is read-only + */ + BooleanDataBuffer write(boolean[] src, int offset, int length); + + @Override + default Boolean getObject(long index) { + return getBoolean(index); + } + + @Override + default BooleanDataBuffer setObject(Boolean value, long index) { + return setBoolean(value, index); + } + + @Override + BooleanDataBuffer copyTo(DataBuffer dst, long size); + + @Override + default BooleanDataBuffer offset(long index) { + return slice(index, size() - index); + } + + @Override + default BooleanDataBuffer narrow(long size) { + return slice(0, size); + } + + @Override + BooleanDataBuffer slice(long index, long size); + + @Override + default DataBufferWindow window(long size) { + throw new UnsupportedOperationException(); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/buffer/ByteDataBuffer.java b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/ByteDataBuffer.java new file mode 100644 index 00000000000..b1cce441b13 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/ByteDataBuffer.java @@ -0,0 +1,232 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.buffer; + +import java.nio.BufferOverflowException; +import java.nio.BufferUnderflowException; +import java.nio.ReadOnlyBufferException; + +/** + * A {@link DataBuffer} of bytes. + */ +public interface ByteDataBuffer extends DataBuffer { + + /** + * Reads the byte at the given index. + * + * @param index the index from which the float will be read + * @return the byte at the given index + * @throws IndexOutOfBoundsException if index is negative or not smaller than the buffer size + */ + byte getByte(long index); + + /** + * Writes the given byte into this buffer at the given index. + * + * @param value the byte to be written + * @param index the index at which the value will be written + * @return this buffer + * @throws IndexOutOfBoundsException if index is negative or not smaller than the buffer size + * @throws ReadOnlyBufferException if this buffer is read-only + */ + ByteDataBuffer setByte(byte value, long index); + + /** + * Bulk get method, using byte arrays. + *

+ * This method transfers values from this buffer into the given destination array. If there are + * fewer values in the buffer than are required to satisfy the request, that is, if + * {@code dst.length > size()}, then no values are transferred and a + * BufferUnderflowException is thrown. + *

+ * Otherwise, this method copies {@code n = dst.length} values from this buffer into the given + * array. + * + * @param dst the array into which values are to be written + * @return this buffer + * @throws BufferUnderflowException if there are not enough values to copy from this buffer + */ + default ByteDataBuffer read(byte[] dst) { + return read(dst, 0, dst.length); + } + + /** + * Bulk get method, using byte arrays. + *

+ * This method transfers values from this buffer into the given destination array. If there are + * fewer values in the buffer than are required to satisfy the request, that is, if + * {@code length > size()}, then no values are transferred and a + * BufferUnderflowException is thrown. + *

+ * Otherwise, this method copies {@code n = length} values from this buffer into the given array + * starting at the given offset. + * + * @param dst the array into which values are to be written + * @param offset the offset within the array of the first value to be written; must be + * non-negative and no larger than {@code dst.length} + * @param length the maximum number of values to be written to the given array; must be + * non-negative and no larger than {@code dst.length - offset} + * @return this buffer + * @throws BufferUnderflowException if there are fewer than length values remaining in this buffer + * @throws IndexOutOfBoundsException if the preconditions on the offset and length parameters do + * not hold + */ + ByteDataBuffer read(byte[] dst, int offset, int length); + + /** + * Bulk put method, using byte arrays. + *

+ * This method transfers the values in the given source array into this buffer. If there are + * more values in the source array than in this buffer, that is, if + * {@code src.length > size()}, then no values are transferred and a + * BufferOverflowException is thrown. + *

+ * Otherwise, this method copies {@code n = src.length} values from the given array. + * + * @param src the source array from which values are to be read + * @return this buffer + * @throws BufferOverflowException if there is insufficient space in this buffer for the values in + * the source array + * @throws ReadOnlyBufferException if this buffer is read-only + */ + default ByteDataBuffer write(byte[] src) { + return write(src, 0, src.length); + } + + /** + * Bulk put method, using byte arrays. + *

+ * This method transfers the values in the given source array into this buffer. If there are + * more values in the source array than in this buffer, that is, if + * {@code length > size()}, then no values are transferred and a + * BufferOverflowException is thrown. + *

+ * Otherwise, this method copies {@code n = length} values from the given array into this buffer, + * starting at the given offset. + * + * @param src the source array from which values are to be read + * @param offset the offset within the array of the first value to be read; must be non-negative + * and no larger than {@code src.length} + * @param length the number of values to be read from the given array; must be non-negative and no + * larger than {@code src.length - offset} + * @return this buffer + * @throws BufferOverflowException if there is insufficient space in this buffer for the values in + * the source array + * @throws IndexOutOfBoundsException if the preconditions on the offset and length parameters do + * not hold + * @throws ReadOnlyBufferException if this buffer is read-only + */ + ByteDataBuffer write(byte[] src, int offset, int length); + + /** + * Return this byte buffer as a buffer of ints. + * + *

The returned buffer provides a different view on the same memory as the original byte buffer, + * meaning that changing a value in one will affect the other. + * + * @return this buffer as a {@link IntDataBuffer} + * @throws IllegalStateException if this buffer cannot be converted + */ + IntDataBuffer asInts(); + + /** + * Return this byte buffer as a buffer of shorts. + * + *

The returned buffer provides a different view on the same memory as the original byte buffer, + * meaning that changing a value in one will affect the other. + * + * @return this buffer as a {@link ShortDataBuffer} + * @throws IllegalStateException if this buffer cannot be converted + */ + ShortDataBuffer asShorts(); + + /** + * Return this byte buffer as a buffer of longs. + * + *

The returned buffer provides a different view on the same memory as the original byte buffer, + * meaning that changing a value in one will affect the other. + * + * @return this buffer as a {@link LongDataBuffer} + * @throws IllegalStateException if this buffer cannot be converted + */ + LongDataBuffer asLongs(); + + /** + * Return this byte buffer as a buffer of floats. + * + *

The returned buffer provides a different view on the same memory as the original byte buffer, + * meaning that changing a value in one will affect the other. + * + * @return this buffer as a {@link FloatDataBuffer} + * @throws IllegalStateException if this buffer cannot be converted + */ + FloatDataBuffer asFloats(); + + /** + * Return this byte buffer as a buffer of doubles. + * + *

The returned buffer provides a different view on the same memory as the original byte buffer, + * meaning that changing a value in one will affect the other. + * + * @return this buffer as a {@link DoubleDataBuffer} + * @throws IllegalStateException if this buffer cannot be converted + */ + DoubleDataBuffer asDoubles(); + + /** + * Return this byte buffer as a buffer of booleans. + * + *

The returned buffer provides a different view on the same memory as the original byte buffer, + * meaning that changing a value in one will affect the other. + * + * @return this buffer as a {@link BooleanDataBuffer} + * @throws IllegalStateException if this buffer cannot be converted + */ + BooleanDataBuffer asBooleans(); + + @Override + default Byte getObject(long index) { + return getByte(index); + } + + @Override + default ByteDataBuffer setObject(Byte value, long index) { + return setByte(value, index); + } + + @Override + ByteDataBuffer copyTo(DataBuffer dst, long size); + + + @Override + default ByteDataBuffer offset(long index) { + return slice(index, size() - index); + } + + @Override + default ByteDataBuffer narrow(long size) { + return slice(0, size); + } + + @Override + ByteDataBuffer slice(long index, long size); + + @Override + default DataBufferWindow window(long size) { + throw new UnsupportedOperationException(); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/buffer/DataBuffer.java b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/DataBuffer.java new file mode 100644 index 00000000000..e62ba87ce6e --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/DataBuffer.java @@ -0,0 +1,324 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ + +package org.tensorflow.ndarray.buffer; + +import java.nio.BufferOverflowException; +import java.nio.BufferUnderflowException; +import java.nio.ReadOnlyBufferException; + +/** + * A container of data of a specific type. + * + *

Instances of {@code DataBuffer} map native or heap memory segments to a linear view that + * supports: + *

    + *
  • 64-bits indexing, allowing to work with buffer larger than 231 bytes
  • + *
  • Storage of object of any types and not only primitives
  • + *
  • Generic types allows to work directly with boxed types as well, which does not require + * explicit buffer types as with the standard JDK buffers. + *
+ * It is important to note that there is no guarantee the memory managed by a {@code DataBuffer} + * is linear, specially when dealing with non-primitive types or large buffers. + * + * @param type of data stored in this buffer + */ +public interface DataBuffer { + + /** + * Size of the buffer, in elements. + *

+ * For exemple, in case of a byte buffer, this value is equal to the number of bytes this buffer + * can hold. For an integer buffer, it is equal to the number of integers, therefore the size + * in bytes of this buffer is {@code size() * Integer.BYTES}. + * + * @return the buffer size + */ + long size(); + + /** + * Tells whether or not this buffer is backed by an accessible array. + * + * @return true if, and only if, this buffer is read-only + */ + boolean isReadOnly(); + + /** + * Reads the value at the given index. + * + * Important: Usage of this method should be limited to buffers of non-primitive types or + * when the data type is not deterministically known by the caller. In any other case, prefer + * the usage of its primitive variant which will significantly improve performances + * (e.g. {@code IntDataBuffer.getInt(idx)} + * + * @param index the index from which the float will be read + * @return the value at the given index + * @throws IndexOutOfBoundsException if index is negative or not smaller than the buffer size + */ + T getObject(long index); + + /** + * Writes the given value into this buffer at the given index. + * + * Important: Usage of this method should be limited to buffers of non-primitive types or + * when the data type is not deterministically known by the caller. In any other case, prefer + * the usage of its primitive variant which will significantly improve performances + * (e.g. {@code IntDataBuffer.setInt(idx)} + * + * @param value the value to be written + * @param index the index at which the value will be written + * @return this buffer + * @throws IndexOutOfBoundsException if index is negative or not smaller than the buffer size + * @throws ReadOnlyBufferException if this buffer is read-only + */ + DataBuffer setObject(T value, long index); + + /** + * Read the references of the objects in this buffer into the destination array. + *

+ * This method transfers values from this buffer into the given destination array. If there are + * fewer values in the buffer than are required to satisfy the request, that is, if + * {@code dst.length > size()}, then no values are transferred and a + * BufferUnderflowException is thrown. + *

+ * Otherwise, this method copies {@code n = dst.length} values from this buffer into the given + * array. + * + * @param dst the array into which values are to be written + * @return this buffer + * @throws BufferUnderflowException if there are not enough values to copy from this buffer + */ + default DataBuffer read(T[] dst) { + return read(dst, 0, dst.length); + } + + /** + * Read the references of the objects in this buffer into the destination array. + *

+ * This method transfers values from this buffer into the given destination array. If there are + * fewer values in the buffer than are required to satisfy the request, that is, if + * {@code length > size()}, then no values are transferred and a + * BufferUnderflowException is thrown. + *

+ * Otherwise, this method copies {@code n = length} values from this buffer into the given array + * starting at the given offset. + * + * @param dst the array into which values are to be written + * @param offset the offset within the array of the first value to be written; must be + * non-negative and no larger than {@code dst.length} + * @param length the maximum number of values to be written to the given array; must be + * non-negative and no larger than {@code dst.length - offset} + * @return this buffer + * @throws BufferUnderflowException if there are fewer than length values remaining in this buffer + * @throws IndexOutOfBoundsException if the preconditions on the offset and length parameters do + * not hold + */ + DataBuffer read(T[] dst, int offset, int length); + + /** + * Write the references of the objects in the source array into this buffer. + *

+ * This method transfers the values in the given source array into this buffer. If there are + * more values in the source array than in this buffer, that is, if + * {@code src.length > size()}, then no values are transferred and a + * BufferOverflowException is thrown. + *

+ * Otherwise, this method copies {@code n = src.length} values from the given array. + * + * @param src the source array from which values are to be read + * @return this buffer + * @throws BufferOverflowException if there is insufficient space in this buffer for the values in + * the source array + * @throws ReadOnlyBufferException if this buffer is read-only + */ + default DataBuffer write(T[] src) { + return write(src, 0, src.length); + } + + /** + * Bulk put method, using int arrays. + *

+ * This method transfers the values in the given source array into this buffer. If there are + * more values in the source array than in this buffer, that is, if + * {@code length > size()}, then no values are transferred and a + * BufferOverflowException is thrown. + *

+ * Otherwise, this method copies {@code n = length} values from the given array into this buffer, + * starting at the given offset. + * + * @param src the source array from which values are to be read + * @param offset the offset within the array of the first value to be read; must be non-negative + * and no larger than {@code src.length} + * @param length the number of values to be read from the given array; must be non-negative and no + * larger than {@code src.length - offset} + * @return this buffer + * @throws BufferOverflowException if there is insufficient space in this buffer for the values in + * the source array + * @throws IndexOutOfBoundsException if the preconditions on the offset and length parameters do + * not hold + * @throws ReadOnlyBufferException if this buffer is read-only + */ + DataBuffer write(T[] src, int offset, int length); + + /** + * Write the references of the objects in the source array into this buffer. + *

+ * If there are more values to copy than the destination buffer size, i.e. + * {@code size > dst.size()}, then no values are transferred and a + * BufferOverflowException is thrown. On the other hand, if there are more values to copy that + * the source buffer size, i.e. {@code > src.size()}, then a BufferUnderfloatException is thrown. + *

+ * Otherwise, this method copies {@code n = size} values from this buffer into + * the destination buffer. + * + * @param dst the destination buffer into which values are copied; must not be this buffer + * @param size number of values to copy to the destination buffer + * @return this buffer + * @throws IllegalArgumentException if the destination buffer is this buffer + * @throws ReadOnlyBufferException if the destination buffer is read-only + * @throws java.nio.BufferOverflowException if there is not enough space in destination buffer + * @throws java.nio.BufferUnderflowException if there are not enough values in the source buffer + */ + DataBuffer copyTo(DataBuffer dst, long size); + + /** + * Creates a new buffer whose content is a shared subsequence of this buffer's content, starting + * at the given index. + *

+ * The index must not be greater than this buffer size. Changes to this buffer's content will + * be visible in the new buffer and vice versa. The new buffer will be read-only if, and only if, + * this buffer is read-only. + *

+ * This call is equivalent to {@link #slice(long, long) slice(index, size() - index)} + * + * @param index index of the first value of the new buffer created, must not be greater than + * {@code size()} + * @return the new buffer + * @throws IllegalArgumentException if index do not pass validation checks + */ + default DataBuffer offset(long index) { + return slice(index, size() - index); + } + + /** + * Creates a new buffer whose content is a shared subsequence of this buffer's content, whose + * size is set to the given value. + *

+ * The new size must not be greater than this buffer size. Changes to this buffer's + * content will be visible in the new buffer and vice versa. The new buffer will be read-only if, + * and only if, this buffer is read-only. + *

+ * This call is equivalent to {@link #slice(long, long) slice(0, size)} + * + * @param size size of this new buffer + * @return the new buffer + * @throws IllegalArgumentException if index and/or size values do not pass validation checks + */ + default DataBuffer narrow(long size) { + return slice(0, size); + } + + /** + * Creates a new buffer whose content is a shared subsequence of this buffer's content, starting + * at the given index and of the given size. + *

+ * The index plus the new size must not be greater than this buffer size. Changes to this + * buffer's content will be visible in the new buffer and vice versa. The new buffer will be + * read-only if, and only if, this buffer is read-only. + * + * @param index index of the first value of the new buffer created + * @param size size of this new buffer, must not be greater than {@code size()} + * @return the new buffer + * @throws IllegalArgumentException if size value do not pass validation checks + */ + DataBuffer slice(long index, long size); + + /** + * Creates a {@link DataBufferWindow} that provides a partial view of this buffer. + * + *

The created window has a fixed size and can {@link DataBufferWindow#slide(long) "slide"} + * along this buffer to provide different views of the data without allocating a new buffer + * instance, like {@link #offset(long)} does. This improves overall performance when this + * operation is repeated frequently. For example: + * + *

{@code
+   * IntDataBuffer bufferA = DataBuffers.ofInts(1024);
+   * // ... init buffer data
+   * IntDataBuffer bufferB = DataBuffers.ofInts(1, 2, 3, 4);
+   *
+   * // Return the index of the first occurrence of bufferB in bufferA using a sliding window
+   * DataBufferWindow windowA = bufferA.window(4);
+   * for (int i = 0; i < bufferA.size() - bufferB.size(); ++i) {
+   *     if (windowA.slideTo(i).buffer().equals(bufferB)) {
+   *         return i;
+   *     }
+   * }
+   * }
+ * + *

The returned object is stateful and is not thread-safe. + * + * @param size size of the window + * @return a new window that starts at the index 0 of this buffer + * @throws UnsupportedOperationException if this type of buffer does not support buffer windows + */ + default DataBufferWindow> window(long size) { + throw new UnsupportedOperationException(); + } + + /** + * Visits the backing storage of this buffer. + * + *

The buffer implementation is responsible of passing back a reference to the actual data + * storage to the provided visitor. The visitor does not have to handle all possible types of + * data storage and can override only methods for storage it is actually interested in. For any + * other type of storage, this call will fallback to {@link DataStorageVisitor#fallback()} so the + * visitor can execute some generic routine if needed. + * + * @param visitor visits the data storage of this buffer + * @param type of value returned by the visitor + * @return the same value returned by the visitor + */ + default R accept(DataStorageVisitor visitor) { + return visitor.fallback(); + } + + /** + * Checks equality between data buffers. + * + *

A data buffer is equal to another object if this object is another {@link DataBuffer} of the + * same size, type and the elements are equal and in the same order. For example: + * + *

{@code
+   * IntDataBuffer buffer = DataBuffers.of(1, 2, 3);
+   *
+   * assertEquals(buffer, DataBuffers.of(1, 2, 3));  // true
+   * assertEquals(buffer, DataBuffers.ofObjects(1, 2, 3));  // true, as Integers are equal to ints
+   * assertNotEquals(buffer, DataBuffers.of(1, 2, 3, 0));  // false, different sizes
+   * assertNotEquals(buffer, DataBuffers.of(1, 3, 2));  // false, different order
+   * assertNotEquals(buffer, DataBuffers.of(1L, 2L, 3L));  // false, different types
+   * }
+ * + *

Note that the computation required to verify equality between two buffers can be expensive + * in some cases and therefore, it is recommended to not use this method in a critical path + * where performances matter. + * + * @param obj object to compare this buffer with + * @return true if this buffer is equal to the provided object + */ + @Override + boolean equals(Object obj); +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/buffer/DataBufferWindow.java b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/DataBufferWindow.java new file mode 100644 index 00000000000..85fc8c43d05 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/DataBufferWindow.java @@ -0,0 +1,93 @@ +package org.tensorflow.ndarray.buffer; + +/** + * A mutable container for viewing part of a {@link DataBuffer}. + * + *

Data buffer windows have a fixed size and can {@link DataBufferWindow#slide(long) "slide"} + * along a buffer to provide different views of the data without allocating a new buffer instance, + * like {@link DataBuffer#offset(long)} does. This improves overall performance when this operation + * is repeated frequently. For example: + * + *

{@code
+ * IntDataBuffer bufferA = DataBuffers.ofInts(1024);
+ * // ... init buffer data
+ * IntDataBuffer bufferB = DataBuffers.ofInts(1, 2, 3, 4);
+ *
+ * // Return the index of the first occurrence of bufferB in bufferA using a sliding window
+ * DataBufferWindow windowA = bufferA.window(4);
+ * for (int i = 0; i < bufferA.size() - bufferB.size(); ++i) {
+ *     if (windowA.slideTo(i).buffer().equals(bufferB)) {
+ *         return i;
+ *     }
+ * }
+ * }
+ * + *

{@code DataBufferWindow} instances are stateful and not thread-safe. + * + * @param the type of buffer being viewed + */ +public interface DataBufferWindow> { + + /** + * Returns the current offset of this window in the original buffer. + */ + long offset(); + + /** + * Returns the size of this buffer window. + */ + long size(); + + /** + * Moves the window at the given position in the original buffer. + * + *

The size of the window remains the same and its offset is set to {@code index}, so that + * accessing the value of {@link #buffer()} at index {@code x} will return the value at + * {@code index + x} in the original buffer. + * + * @param index new offset for this window + * @return this instance + * @throws IndexOutOfBoundsException if the window cannot be slid because it goes beyond + * the original buffer limits + */ + DataBufferWindow slideTo(long index); + + /** + * Moves the window of {@code step} elements in the original buffer. + * + *

The size of the window remains the same and its offset is set to {@code offset() + step}. + * If {@code step} is positive, then the window will slide forward. If it is negative, it will + * slide backward. + * + * @param step value to add to the current offset of this window + * @return this instance + * @throws IndexOutOfBoundsException if the window cannot be slid because it goes beyond + * the original buffer limits + */ + DataBufferWindow slide(long step); + + /** + * Returns the buffer backing this window. + * + *

Each window instance has it's own buffer providing a view onto the original + * {@link DataBuffer}. The buffers are mutated when the window slides to different offsets. + * For example: + * + *

{@code
+   * IntDataBuffer buffer = DataBuffers.of(0, 1, 2, 3);
+   * DataBufferWindow window = buffer.window(0, 2);
+   *
+   * IntDataBuffer windowBuffer = window.buffer();
+   * assertEquals(0, windowBuffer.getInt(0));
+   * assertEquals(1, windowBuffer.getInt(1));
+   *
+   * window.slideTo(2);
+   * assertEquals(2, windowBuffer.getInt(0));
+   * assertEquals(3, windowBuffer.getInt(1));
+   * assertSame(windowBuffer, window.buffer());
+   * }
+ * + * @return this window's buffer + */ + B buffer(); +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/buffer/DataBuffers.java b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/DataBuffers.java new file mode 100644 index 00000000000..a5feb2599d0 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/DataBuffers.java @@ -0,0 +1,457 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.buffer; + +import java.lang.reflect.Array; +import java.nio.ByteBuffer; +import java.nio.DoubleBuffer; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; +import java.nio.LongBuffer; +import java.nio.ShortBuffer; +import java.util.Arrays; +import java.util.BitSet; +import org.tensorflow.ndarray.impl.buffer.Validator; +import org.tensorflow.ndarray.impl.buffer.misc.MiscDataBufferFactory; +import org.tensorflow.ndarray.impl.buffer.nio.NioDataBufferFactory; +import org.tensorflow.ndarray.impl.buffer.raw.RawDataBufferFactory; + +/** + * Helper class for creating {@code DataBuffer} instances. + */ +public final class DataBuffers { + + /** + * Creates a buffer of bytes that can store up to {@code size} values + * + * @param size size of the buffer to allocate + * @return a new buffer + */ + public static ByteDataBuffer ofBytes(long size) { + Validator.createArgs(size, MAX_32BITS); + if (RawDataBufferFactory.canBeUsed()) { + return RawDataBufferFactory.create(new byte[(int)size], false); + } + return NioDataBufferFactory.create(ByteBuffer.allocate((int)size)); + } + + /** + * Creates a buffer of longs that can store up to {@code size} values + * + * @param size size of the buffer to allocate + * @return a new buffer + */ + public static LongDataBuffer ofLongs(long size) { + Validator.createArgs(size, MAX_32BITS); + if (RawDataBufferFactory.canBeUsed()) { + return RawDataBufferFactory.create(new long[(int)size], false); + } + return NioDataBufferFactory.create(LongBuffer.allocate((int)size)); + } + + /** + * Creates a buffer of integers that can store up to {@code size} values + * + * @param size size of the buffer to allocate + * @return a new buffer + */ + public static IntDataBuffer ofInts(long size) { + Validator.createArgs(size, MAX_32BITS); + if (RawDataBufferFactory.canBeUsed()) { + return RawDataBufferFactory.create(new int[(int)size], false); + } + return NioDataBufferFactory.create(IntBuffer.allocate((int)size)); + } + + /** + * Creates a buffer of shorts that can store up to {@code size} values + * + * @param size size of the buffer to allocate + * @return a new buffer + */ + public static ShortDataBuffer ofShorts(long size) { + Validator.createArgs(size, MAX_32BITS); + if (RawDataBufferFactory.canBeUsed()) { + return RawDataBufferFactory.create(new short[(int)size], false); + } + return NioDataBufferFactory.create(ShortBuffer.allocate((int)size)); + } + + /** + * Creates a buffer of doubles that can store up to {@code size} values + * + * @param size size of the buffer to allocate + * @return a new buffer + */ + public static DoubleDataBuffer ofDoubles(long size) { + Validator.createArgs(size, MAX_32BITS); + if (RawDataBufferFactory.canBeUsed()) { + return RawDataBufferFactory.create(new double[(int)size], false); + } + return NioDataBufferFactory.create(DoubleBuffer.allocate((int)size)); + } + + /** + * Creates a buffer of floats that can store up to {@code size} values + * + * @param size size of the buffer to allocate + * @return a new buffer + */ + public static FloatDataBuffer ofFloats(long size) { + Validator.createArgs(size, MAX_32BITS); + if (RawDataBufferFactory.canBeUsed()) { + return RawDataBufferFactory.create(new float[(int)size], false); + } + return NioDataBufferFactory.create(FloatBuffer.allocate((int)size)); + } + + /** + * Creates a buffer of booleans that can store up to {@code size} values + * + * @param size size of the buffer to allocate + * @return a new buffer + */ + public static BooleanDataBuffer ofBooleans(long size) { + Validator.createArgs(size, MAX_32BITS); + if (RawDataBufferFactory.canBeUsed()) { + return RawDataBufferFactory.create(new boolean[(int)size], false); + } + return MiscDataBufferFactory.create(new BitSet((int)size), size, false); + } + + /** + * Creates a buffer of references to objects of type {@code clazz` that can store up to `size} + * values. + * + * @param type the type of object stored in this buffer + * @param size size of the buffer to allocate + * @param data type + * @return a new buffer + */ + public static DataBuffer ofObjects(Class type, long size) { + Validator.createArgs(size, MAX_32BITS); + @SuppressWarnings("unchecked") + T[] array = (T[])Array.newInstance(type, (int)size); + return MiscDataBufferFactory.create(array, false); + } + + /** + * Create a buffer from an array of floats into a data buffer. + * + *

The returned buffer allows read and write operations and share the memory of the source + * array, which is equivalent to call {@link #of(float[], boolean, boolean) of(values, false, false}} + * + * @param values float values + * @return a new buffer + */ + public static FloatDataBuffer of(float... values) { + return of(values, false, false); + } + + /** + * Create a buffer from an array of bytes into a data buffer. + * + *

The returned buffer allows read and write operations and share the memory of the source + * array, which is equivalent to call {@link #of(byte[], boolean, boolean) of(values, false, false}} + * + * @param values byte values + * @return a new buffer + */ + public static ByteDataBuffer of(byte... values) { + return of(values, false, false); + } + + /** + * Create a buffer from an array of longs into a data buffer. + * + *

The returned buffer allows read and write operations and share the memory of the source + * array, which is equivalent to call {@link #of(long[], boolean, boolean) of(values, false, false}} + * + * @param values long values + * @return a new buffer + */ + public static LongDataBuffer of(long... values) { + return of(values, false, false); + } + + /** + * Create a buffer from an array of ints into a data buffer. + * + *

The returned buffer allows read and write operations and share the memory of the source + * array, which is equivalent to call {@link #of(int[], boolean, boolean) of(values, false, false}} + * + * @param values int values + * @return a new buffer + */ + public static IntDataBuffer of(int... values) { + return of(values, false, false); + } + + /** + * Create a buffer from an array of shorts into a data buffer. + * + *

The returned buffer allows read and write operations and share the memory of the source + * array, which is equivalent to call {@link #of(short[], boolean, boolean) of(values, false, false}} + * + * @param values short values + * @return a new buffer + */ + public static ShortDataBuffer of(short... values) { + return of(values, false, false); + } + + /** + * Create a buffer from an array of doubles into a data buffer. + * + *

The returned buffer allows read and write operations and share the memory of the source + * array, which is equivalent to call {@link #of(double[], boolean, boolean) of(array, false, false}} + * + * @param values double values + * @return a new buffer + */ + public static DoubleDataBuffer of(double... values) { + return of(values, false, false); + } + + /** + * Create a buffer from an array of booleans into a data buffer. + * + *

The returned buffer allows read and write operations and share the memory of the source + * array, which is equivalent to call {@link #of(boolean[], boolean, boolean) of(values, false, false}} + * + * @param values booleans values + * @return a new buffer + */ + public static BooleanDataBuffer of(boolean... values) { + return of(values, false, false); + } + + /** + * Create a buffer from an array of objects into a data buffer. + * + *

The returned buffer allows read and write operations and share the memory of the source + * array, which is equivalent to call {@link #of(Object[], boolean, boolean) of(values, false, false}} + * + * @param values objects values + * @param data type + * @return a new buffer + */ + @SafeVarargs + public static DataBuffer ofObjects(T... values) { + return of(values, false, false); + } + + /** + * Create a buffer from an array of floats into a data buffer. + * + * @param array array of floats + * @param readOnly true if the buffer created must be read-only + * @param makeCopy true if the array must be copied, false will wrap the provided array + * @return a new buffer + */ + public static FloatDataBuffer of(float[] array, boolean readOnly, boolean makeCopy) { + float[] bufferArray = makeCopy ? Arrays.copyOf(array, array.length) : array; + if (RawDataBufferFactory.canBeUsed()) { + return RawDataBufferFactory.create(bufferArray, readOnly); + } + FloatBuffer buf = FloatBuffer.wrap(bufferArray); + return NioDataBufferFactory.create(readOnly ? buf.asReadOnlyBuffer() : buf); + } + + /** + * Create a buffer from an array of bytes into a data buffer. + * + * @param array array of bytes + * @param readOnly true if the buffer created must be read-only + * @param makeCopy true if the array must be copied, false will wrap the provided array + * @return a new buffer + */ + public static ByteDataBuffer of(byte[] array, boolean readOnly, boolean makeCopy) { + byte[] bufferArray = makeCopy ? Arrays.copyOf(array, array.length) : array; + if (RawDataBufferFactory.canBeUsed()) { + return RawDataBufferFactory.create(bufferArray, readOnly); + } + ByteBuffer buf = ByteBuffer.wrap(bufferArray); + return NioDataBufferFactory.create(readOnly ? buf.asReadOnlyBuffer() : buf); + } + + /** + * Create a buffer from an array of longs into a data buffer. + * + * @param array array of longs + * @param readOnly true if the buffer created must be read-only + * @param makeCopy true if the array must be copied, false will wrap the provided array + * @return a new buffer + */ + public static LongDataBuffer of(long[] array, boolean readOnly, boolean makeCopy) { + long[] bufferArray = makeCopy ? Arrays.copyOf(array, array.length) : array; + if (RawDataBufferFactory.canBeUsed()) { + return RawDataBufferFactory.create(bufferArray, readOnly); + } + LongBuffer buf = LongBuffer.wrap(bufferArray); + return NioDataBufferFactory.create(readOnly ? buf.asReadOnlyBuffer() : buf); + } + + /** + * Create a buffer from an array of ints into a data buffer. + * + * @param array array of ints + * @param readOnly true if the buffer created must be read-only + * @param makeCopy true if the array must be copied, false will wrap the provided array + * @return a new buffer + */ + public static IntDataBuffer of(int[] array, boolean readOnly, boolean makeCopy) { + int[] bufferArray = makeCopy ? Arrays.copyOf(array, array.length) : array; + if (RawDataBufferFactory.canBeUsed()) { + return RawDataBufferFactory.create(bufferArray, readOnly); + } + IntBuffer buf = IntBuffer.wrap(bufferArray); + return NioDataBufferFactory.create(readOnly ? buf.asReadOnlyBuffer() : buf); + } + + /** + * Create a buffer from an array of shorts into a data buffer. + * + * @param array array of shorts + * @param readOnly true if the buffer created must be read-only + * @param makeCopy true if the array must be copied, false will wrap the provided array + * @return a new buffer + */ + public static ShortDataBuffer of(short[] array, boolean readOnly, boolean makeCopy) { + short[] bufferArray = makeCopy ? Arrays.copyOf(array, array.length) : array; + if (RawDataBufferFactory.canBeUsed()) { + return RawDataBufferFactory.create(bufferArray, readOnly); + } + ShortBuffer buf = ShortBuffer.wrap(bufferArray); + return NioDataBufferFactory.create(readOnly ? buf.asReadOnlyBuffer() : buf); + } + + /** + * Create a buffer from an array of doubles into a data buffer. + * + * @param array array of doubles + * @param readOnly true if the buffer created must be read-only + * @param makeCopy true if the array must be copied, false will wrap the provided array + * @return a new buffer + */ + public static DoubleDataBuffer of(double[] array, boolean readOnly, boolean makeCopy) { + double[] bufferArray = makeCopy ? Arrays.copyOf(array, array.length) : array; + if (RawDataBufferFactory.canBeUsed()) { + return RawDataBufferFactory.create(bufferArray, readOnly); + } + DoubleBuffer buf = DoubleBuffer.wrap(bufferArray); + return NioDataBufferFactory.create(readOnly ? buf.asReadOnlyBuffer() : buf); + } + + /** + * Create a buffer from an array of booleans into a data buffer. + * + * @param array array of booleans + * @param readOnly true if the buffer created must be read-only + * @param makeCopy true if the array must be copied, false will wrap the provided array + * @return a new buffer + */ + public static BooleanDataBuffer of(boolean[] array, boolean readOnly, boolean makeCopy) { + boolean[] bufferArray = makeCopy ? Arrays.copyOf(array, array.length) : array; + if (RawDataBufferFactory.canBeUsed()) { + return RawDataBufferFactory.create(bufferArray, readOnly); + } + return MiscDataBufferFactory.create(bufferArray, readOnly); + } + + /** + * Create a buffer from an array of objects into a data buffer. + * + * @param array array of objects + * @param readOnly true if the buffer created must be read-only + * @param makeCopy true if the array must be copied, false will wrap the provided array + * @param data type + * @return a new buffer + */ + public static DataBuffer of(T[] array, boolean readOnly, boolean makeCopy) { + T[] bufferArray = makeCopy ? Arrays.copyOf(array, array.length) : array; + return MiscDataBufferFactory.create(bufferArray, readOnly); + } + + /** + * Wraps a JDK NIO {@link ByteBuffer} into a data buffer. + * + * @param buf buffer to wrap + * @return a new buffer + */ + public static ByteDataBuffer of(ByteBuffer buf) { + return NioDataBufferFactory.create(buf.duplicate()); + } + + /** + * Wraps a JDK NIO {@link IntBuffer} into a data buffer. + * + * @param buf buffer to wrap + * @return a new buffer + */ + public static IntDataBuffer of(IntBuffer buf) { + return NioDataBufferFactory.create(buf.duplicate()); + } + + /** + * Wraps a JDK NIO {@link ShortBuffer} into a data buffer. + * + * @param buf buffer to wrap + * @return a new buffer + */ + public static ShortDataBuffer of(ShortBuffer buf) { + return NioDataBufferFactory.create(buf.duplicate()); + } + + /** + * Wraps a JDK NIO {@link LongBuffer} into a data buffer. + * + * @param buf buffer to wrap + * @return a new buffer + */ + public static LongDataBuffer of(LongBuffer buf) { + return NioDataBufferFactory.create(buf.duplicate()); + } + + /** + * Wraps a JDK NIO {@link FloatBuffer} into a data buffer. + * + * @param buf buffer to wrap + * @return a new buffer + */ + public static FloatDataBuffer of(FloatBuffer buf) { + return NioDataBufferFactory.create(buf.duplicate()); + } + + /** + * Wraps a JDK NIO {@link DoubleBuffer} into a data buffer. + * + * @param buf buffer to wrap + * @return a new buffer + */ + public static DoubleDataBuffer of(DoubleBuffer buf) { + return NioDataBufferFactory.create(buf.duplicate()); + } + + /* + * The maximum size for a buffer of this type, i.e. the maximum number of bytes it can store. + *

+ * As the maximum size may vary depending on the JVM implementation and on the platform, this + * property returns a value that is safe for most of them. + */ + static long MAX_32BITS = Integer.MAX_VALUE - 10; +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/buffer/DataStorageVisitor.java b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/DataStorageVisitor.java new file mode 100644 index 00000000000..560320cd7eb --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/DataStorageVisitor.java @@ -0,0 +1,147 @@ +package org.tensorflow.ndarray.buffer; + +import java.nio.ByteBuffer; +import java.nio.DoubleBuffer; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; +import java.nio.LongBuffer; +import java.nio.ShortBuffer; +import java.util.BitSet; + +/** + * Visit the backing storage of {@link DataBuffer} instances. + * + * @param value type returned by the visitor + */ +public interface DataStorageVisitor { + + /** + * Visit the {@link ByteBuffer} backing a given instance of a {@link DataBuffer} + * + * @param buffer underlying buffer + * @return any value + * @see DataBuffer#accept(DataStorageVisitor) + */ + default R visit(ByteBuffer buffer) { + return fallback(); + } + + /** + * Visit the {@link ShortBuffer} backing a given instance of a {@link DataBuffer} + * + * @param buffer underlying buffer + * @return any value + * @see DataBuffer#accept(DataStorageVisitor) + */ + default R visit(ShortBuffer buffer) { + return fallback(); + } + + /** + * Visit the {@link IntBuffer} backing a given instance of a {@link DataBuffer} + * + * @param buffer underlying buffer + * @return any value + * @see DataBuffer#accept(DataStorageVisitor) + */ + default R visit(IntBuffer buffer) { + return fallback(); + } + + /** + * Visit the {@link LongBuffer} backing a given instance of a {@link DataBuffer} + * + * @param buffer underlying buffer + * @return any value + * @see DataBuffer#accept(DataStorageVisitor) + */ + default R visit(LongBuffer buffer) { + return fallback(); + } + + /** + * Visit the {@link FloatBuffer} backing a given instance of a {@link DataBuffer} + * + * @param buffer underlying buffer + * @return any value + * @see DataBuffer#accept(DataStorageVisitor) + */ + default R visit(FloatBuffer buffer) { + return fallback(); + } + + /** + * Visit the {@link DoubleBuffer} backing a given instance of a {@link DataBuffer} + * + * @param buffer underlying buffer + * @return any value + * @see DataBuffer#accept(DataStorageVisitor) + */ + default R visit(DoubleBuffer buffer) { + return fallback(); + } + + /** + * Visit the boolean array backing a given instance of a {@link DataBuffer} + * + * @param array underlying array + * @param offset offset of the buffer within the array + * @param length length of the buffer within the array + * @return any value + * @see DataBuffer#accept(DataStorageVisitor) + */ + default R visit(boolean[] array, int offset, int length) { + return fallback(); + } + + /** + * Visit the bit set backing a given instance of a {@link DataBuffer} + * + * @param bitSet underlying bit set + * @param offset offset of the buffer within the bit set + * @param numBits number of bits used to represent the buffer within the bit set + * @return any value + * @see DataBuffer#accept(DataStorageVisitor) + */ + default R visit(BitSet bitSet, int offset, long numBits) { + return fallback(); + } + + /** + * Visit the object array backing a given instance of a {@link DataBuffer} + * + * @param array underlying array + * @param offset offset of the buffer within the array + * @param length length of the buffer within the array + * @return any value + * @see DataBuffer#accept(DataStorageVisitor) + */ + default R visit(Object[] array, int offset, int length) { + return fallback(); + } + + /** + * Visit the raw memory segment of a given instance of a {@link DataBuffer} + * + * @param address native address of the buffer + * @param length length of the buffer + * @param scale number of bytes required to store a single value of this buffer + * @return any value + * @see DataBuffer#accept(DataStorageVisitor) + */ + default R visit(long address, long length, long scale) { + return fallback(); + } + + /** + * Fallback method called if the visitor implementation does not support the type of backing storage + * for a given {@link DataBuffer} + * + *

The implementor of this interface must override the {@code visit} methods for type of storage + * it supports. If {@link DataBuffer#accept(DataStorageVisitor)} is called on a buffer + * using a different type of storage, the invocation will fallback to this method. + * + * @return any value + */ + R fallback(); +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/buffer/DoubleDataBuffer.java b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/DoubleDataBuffer.java new file mode 100644 index 00000000000..f2db925eb78 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/DoubleDataBuffer.java @@ -0,0 +1,165 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.buffer; + +import java.nio.BufferOverflowException; +import java.nio.BufferUnderflowException; +import java.nio.ReadOnlyBufferException; + +/** + * A {@link DataBuffer} of doubles. + */ +public interface DoubleDataBuffer extends DataBuffer { + + /** + * Reads the double at the given index. + * + * @param index the index from which the float will be read + * @return the double at the given index + * @throws IndexOutOfBoundsException if index is negative or not smaller than the buffer size + */ + double getDouble(long index); + + /** + * Writes the given double into this buffer at the given index. + * + * @param value the double to be written + * @param index the index at which the value will be written + * @return this buffer + * @throws IndexOutOfBoundsException if index is negative or not smaller than the buffer size + * @throws ReadOnlyBufferException if this buffer is read-only + */ + DoubleDataBuffer setDouble(double value, long index); + + /** + * Bulk get method, using double arrays. + *

+ * This method transfers values from this buffer into the given destination array. If there are + * fewer values in the buffer than are required to satisfy the request, that is, if + * {@code dst.length > size()}, then no values are transferred and a + * BufferUnderflowException is thrown. + *

+ * Otherwise, this method copies {@code n = dst.length} values from this buffer into the given + * array. + * + * @param dst the array into which values are to be written + * @return this buffer + * @throws BufferUnderflowException if there are not enough values to copy from this buffer + */ + default DoubleDataBuffer read(double[] dst) { + return read(dst, 0, dst.length); + } + + /** + * Bulk get method, using double arrays. + *

+ * This method transfers values from this buffer into the given destination array. If there are + * fewer values in the buffer than are required to satisfy the request, that is, if + * {@code length > size()}, then no values are transferred and a + * BufferUnderflowException is thrown. + *

+ * Otherwise, this method copies {@code n = length} values from this buffer into the given array + * starting at the given offset. + * + * @param dst the array into which values are to be written + * @param offset the offset within the array of the first value to be written; must be + * non-negative and no larger than {@code dst.length} + * @param length the maximum number of values to be written to the given array; must be + * non-negative and no larger than {@code dst.length - offset} + * @return this buffer + * @throws BufferUnderflowException if there are fewer than length values remaining in this buffer + * @throws IndexOutOfBoundsException if the preconditions on the offset and length parameters do + * not hold + */ + DoubleDataBuffer read(double[] dst, int offset, int length); + + /** + * Bulk put method, using double arrays. + *

+ * This method transfers the values in the given source array into this buffer. If there are + * more values in the source array than in this buffer, that is, if + * {@code src.length > size()}, then no values are transferred and a + * BufferOverflowException is thrown. + *

+ * Otherwise, this method copies {@code n = src.length} values from the given array. + * + * @param src the source array from which values are to be read + * @return this buffer + * @throws BufferOverflowException if there is insufficient space in this buffer for the values in + * the source array + * @throws ReadOnlyBufferException if this buffer is read-only + */ + default DoubleDataBuffer write(double[] src) { + return write(src, 0, src.length); + } + + /** + * Bulk put method, using double arrays. + *

+ * This method transfers the values in the given source array into this buffer. If there are + * more values in the source array than in this buffer, that is, if + * {@code length > size()}, then no values are transferred and a + * BufferOverflowException is thrown. + *

+ * Otherwise, this method copies {@code n = length} values from the given array into this buffer, + * starting at the given offset. + * + * @param src the source array from which values are to be read + * @param offset the offset within the array of the first value to be read; must be non-negative + * and no larger than {@code src.length} + * @param length the number of values to be read from the given array; must be non-negative and no + * larger than {@code src.length - offset} + * @return this buffer + * @throws BufferOverflowException if there is insufficient space in this buffer for the values in + * the source array + * @throws IndexOutOfBoundsException if the preconditions on the offset and length parameters do + * not hold + * @throws ReadOnlyBufferException if this buffer is read-only + */ + DoubleDataBuffer write(double[] src, int offset, int length); + + @Override + default Double getObject(long index) { + return getDouble(index); + } + + @Override + default DoubleDataBuffer setObject(Double value, long index) { + return setDouble(value, index); + } + + @Override + DoubleDataBuffer copyTo(DataBuffer dst, long size); + + @Override + default DoubleDataBuffer offset(long index) { + return slice(index, size() - index); + } + + @Override + default DoubleDataBuffer narrow(long size) { + return slice(0, size); + } + + @Override + DoubleDataBuffer slice(long index, long size); + + @Override + default DataBufferWindow window(long size) { + throw new UnsupportedOperationException(); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/buffer/FloatDataBuffer.java b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/FloatDataBuffer.java new file mode 100644 index 00000000000..4961c1b3445 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/FloatDataBuffer.java @@ -0,0 +1,165 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.buffer; + +import java.nio.BufferOverflowException; +import java.nio.BufferUnderflowException; +import java.nio.ReadOnlyBufferException; + +/** + * A {@link DataBuffer} of floats. + */ +public interface FloatDataBuffer extends DataBuffer { + + /** + * Reads the float at the given index. + * + * @param index the index from which the float will be read + * @return the float at the given index + * @throws IndexOutOfBoundsException if index is negative or not smaller than the buffer size + */ + float getFloat(long index); + + /** + * Writes the given float into this buffer at the given index. + * + * @param value the float to be written + * @param index the index at which the value will be written + * @return this buffer + * @throws IndexOutOfBoundsException if index is negative or not smaller than the buffer size + * @throws ReadOnlyBufferException if this buffer is read-only + */ + FloatDataBuffer setFloat(float value, long index); + + /** + * Bulk get method, using float arrays. + *

+ * This method transfers values from this buffer into the given destination array. If there are + * fewer values in the buffer than are required to satisfy the request, that is, if + * {@code dst.length > size()}, then no values are transferred and a + * BufferUnderflowException is thrown. + *

+ * Otherwise, this method copies {@code n = dst.length} values from this buffer into the given + * array. + * + * @param dst the array into which values are to be written + * @return this buffer + * @throws BufferUnderflowException if there are not enough values to copy from this buffer + */ + default FloatDataBuffer read(float[] dst) { + return read(dst, 0, dst.length); + } + + /** + * Bulk get method, using float arrays. + *

+ * This method transfers values from this buffer into the given destination array. If there are + * fewer values in the buffer than are required to satisfy the request, that is, if + * {@code length > size()}, then no values are transferred and a + * BufferUnderflowException is thrown. + *

+ * Otherwise, this method copies {@code n = length} values from this buffer into the given array + * starting at the given offset. + * + * @param dst the array into which values are to be written + * @param offset the offset within the array of the first value to be written; must be + * non-negative and no larger than {@code dst.length} + * @param length the maximum number of values to be written to the given array; must be + * non-negative and no larger than {@code dst.length - offset} + * @return this buffer + * @throws BufferUnderflowException if there are fewer than length values remaining in this buffer + * @throws IndexOutOfBoundsException if the preconditions on the offset and length parameters do + * not hold + */ + FloatDataBuffer read(float[] dst, int offset, int length); + + /** + * Bulk put method, using float arrays. + *

+ * This method transfers the values in the given source array into this buffer. If there are + * more values in the source array than in this buffer, that is, if + * {@code src.length > size()}, then no values are transferred and a + * BufferOverflowException is thrown. + *

+ * Otherwise, this method copies {@code n = src.length} values from the given array. + * + * @param src the source array from which values are to be read + * @return this buffer + * @throws BufferOverflowException if there is insufficient space in this buffer for the values in + * the source array + * @throws ReadOnlyBufferException if this buffer is read-only + */ + default FloatDataBuffer write(float[] src) { + return write(src, 0, src.length); + } + + /** + * Bulk put method, using float arrays. + *

+ * This method transfers the values in the given source array into this buffer. If there are + * more values in the source array than in this buffer, that is, if + * {@code length > size()}, then no values are transferred and a + * BufferOverflowException is thrown. + *

+ * Otherwise, this method copies {@code n = length} values from the given array into this buffer, + * starting at the given offset. + * + * @param src the source array from which values are to be read + * @param offset the offset within the array of the first value to be read; must be non-negative + * and no larger than {@code src.length} + * @param length the number of values to be read from the given array; must be non-negative and no + * larger than {@code src.length - offset} + * @return this buffer + * @throws BufferOverflowException if there is insufficient space in this buffer for the values in + * the source array + * @throws IndexOutOfBoundsException if the preconditions on the offset and length parameters do + * not hold + * @throws ReadOnlyBufferException if this buffer is read-only + */ + FloatDataBuffer write(float[] src, int offset, int length); + + @Override + default Float getObject(long index) { + return getFloat(index); + } + + @Override + default FloatDataBuffer setObject(Float value, long index) { + return setFloat(value, index); + } + + @Override + FloatDataBuffer copyTo(DataBuffer dst, long size); + + @Override + default FloatDataBuffer offset(long index) { + return slice(index, size() - index); + } + + @Override + default FloatDataBuffer narrow(long size) { + return slice(0, size); + } + + @Override + FloatDataBuffer slice(long index, long size); + + @Override + default DataBufferWindow window(long size) { + throw new UnsupportedOperationException(); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/buffer/IntDataBuffer.java b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/IntDataBuffer.java new file mode 100644 index 00000000000..2d660756e09 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/IntDataBuffer.java @@ -0,0 +1,165 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.buffer; + +import java.nio.BufferOverflowException; +import java.nio.BufferUnderflowException; +import java.nio.ReadOnlyBufferException; + +/** + * A {@link DataBuffer} of ints. + */ +public interface IntDataBuffer extends DataBuffer { + + /** + * Reads the int at the given index. + * + * @param index the index from which the float will be read + * @return the int at the given index + * @throws IndexOutOfBoundsException if index is negative or not smaller than the buffer size + */ + int getInt(long index); + + /** + * Writes the given int into this buffer at the given index. + * + * @param value the int to be written + * @param index the index at which the value will be written + * @return this buffer + * @throws IndexOutOfBoundsException if index is negative or not smaller than the buffer size + * @throws ReadOnlyBufferException if this buffer is read-only + */ + IntDataBuffer setInt(int value, long index); + + /** + * Bulk get method, using int arrays. + *

+ * This method transfers values from this buffer into the given destination array. If there are + * fewer values in the buffer than are required to satisfy the request, that is, if + * {@code dst.length > size()}, then no values are transferred and a + * BufferUnderflowException is thrown. + *

+ * Otherwise, this method copies {@code n = dst.length} values from this buffer into the given + * array. + * + * @param dst the array into which values are to be written + * @return this buffer + * @throws BufferUnderflowException if there are not enough values to copy from this buffer + */ + default IntDataBuffer read(int[] dst) { + return read(dst, 0, dst.length); + } + + /** + * Bulk get method, using int arrays. + *

+ * This method transfers values from this buffer into the given destination array. If there are + * fewer values in the buffer than are required to satisfy the request, that is, if + * {@code length > size()}, then no values are transferred and a + * BufferUnderflowException is thrown. + *

+ * Otherwise, this method copies {@code n = length} values from this buffer into the given array + * starting at the given offset. + * + * @param dst the array into which values are to be written + * @param offset the offset within the array of the first value to be written; must be + * non-negative and no larger than {@code dst.length} + * @param length the maximum number of values to be written to the given array; must be + * non-negative and no larger than {@code dst.length - offset} + * @return this buffer + * @throws BufferUnderflowException if there are fewer than length values remaining in this buffer + * @throws IndexOutOfBoundsException if the preconditions on the offset and length parameters do + * not hold + */ + IntDataBuffer read(int[] dst, int offset, int length); + + /** + * Bulk put method, using int arrays. + *

+ * This method transfers the values in the given source array into this buffer. If there are + * more values in the source array than in this buffer, that is, if + * {@code src.length > size()}, then no values are transferred and a + * BufferOverflowException is thrown. + *

+ * Otherwise, this method copies {@code n = src.length} values from the given array. + * + * @param src the source array from which values are to be read + * @return this buffer + * @throws BufferOverflowException if there is insufficient space in this buffer for the values in + * the source array + * @throws ReadOnlyBufferException if this buffer is read-only + */ + default IntDataBuffer write(int[] src) { + return write(src, 0, src.length); + } + + /** + * Bulk put method, using int arrays. + *

+ * This method transfers the values in the given source array into this buffer. If there are + * more values in the source array than in this buffer, that is, if + * {@code length > size()}, then no values are transferred and a + * BufferOverflowException is thrown. + *

+ * Otherwise, this method copies {@code n = length} values from the given array into this buffer, + * starting at the given offset. + * + * @param src the source array from which values are to be read + * @param offset the offset within the array of the first value to be read; must be non-negative + * and no larger than {@code src.length} + * @param length the number of values to be read from the given array; must be non-negative and no + * larger than {@code src.length - offset} + * @return this buffer + * @throws BufferOverflowException if there is insufficient space in this buffer for the values in + * the source array + * @throws IndexOutOfBoundsException if the preconditions on the offset and length parameters do + * not hold + * @throws ReadOnlyBufferException if this buffer is read-only + */ + IntDataBuffer write(int[] src, int offset, int length); + + @Override + default Integer getObject(long index) { + return getInt(index); + } + + @Override + default IntDataBuffer setObject(Integer value, long index) { + return setInt(value, index); + } + + @Override + IntDataBuffer copyTo(DataBuffer dst, long size); + + @Override + default IntDataBuffer offset(long index) { + return slice(index, size() - index); + } + + @Override + default IntDataBuffer narrow(long size) { + return slice(0, size); + } + + @Override + IntDataBuffer slice(long index, long size); + + @Override + default DataBufferWindow window(long size) { + throw new UnsupportedOperationException(); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/buffer/LongDataBuffer.java b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/LongDataBuffer.java new file mode 100644 index 00000000000..f88ae4a80b4 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/LongDataBuffer.java @@ -0,0 +1,165 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.buffer; + +import java.nio.BufferOverflowException; +import java.nio.BufferUnderflowException; +import java.nio.ReadOnlyBufferException; + +/** + * A {@link DataBuffer} of longs. + */ +public interface LongDataBuffer extends DataBuffer { + + /** + * Reads the long at the given index. + * + * @param index the index from which the float will be read + * @return the long at the given index + * @throws IndexOutOfBoundsException if index is negative or not smaller than the buffer size + */ + long getLong(long index); + + /** + * Writes the given long into this buffer at the given index. + * + * @param value the long to be written + * @param index the index at which the value will be written + * @return this buffer + * @throws IndexOutOfBoundsException if index is negative or not smaller than the buffer size + * @throws ReadOnlyBufferException if this buffer is read-only + */ + LongDataBuffer setLong(long value, long index); + + /** + * Bulk get method, using long arrays. + *

+ * This method transfers values from this buffer into the given destination array. If there are + * fewer values in the buffer than are required to satisfy the request, that is, if + * {@code dst.length > size()}, then no values are transferred and a + * BufferUnderflowException is thrown. + *

+ * Otherwise, this method copies {@code n = dst.length} values from this buffer into the given + * array. + * + * @param dst the array into which values are to be written + * @return this buffer + * @throws BufferUnderflowException if there are not enough values to copy from this buffer + */ + default LongDataBuffer read(long[] dst) { + return read(dst, 0, dst.length); + } + + /** + * Bulk get method, using long arrays. + *

+ * This method transfers values from this buffer into the given destination array. If there are + * fewer values in the buffer than are required to satisfy the request, that is, if + * {@code length > size()}, then no values are transferred and a + * BufferUnderflowException is thrown. + *

+ * Otherwise, this method copies {@code n = length} values from this buffer into the given array + * starting at the given offset. + * + * @param dst the array into which values are to be written + * @param offset the offset within the array of the first value to be written; must be + * non-negative and no larger than {@code dst.length} + * @param length the maximum number of values to be written to the given array; must be + * non-negative and no larger than {@code dst.length - offset} + * @return this buffer + * @throws BufferUnderflowException if there are fewer than length values remaining in this buffer + * @throws IndexOutOfBoundsException if the preconditions on the offset and length parameters do + * not hold + */ + LongDataBuffer read(long[] dst, int offset, int length); + + /** + * Bulk put method, using long arrays. + *

+ * This method transfers the values in the given source array into this buffer. If there are + * more values in the source array than in this buffer, that is, if + * {@code src.length > size()}, then no values are transferred and a + * BufferOverflowException is thrown. + *

+ * Otherwise, this method copies {@code n = src.length} values from the given array. + * + * @param src the source array from which values are to be read + * @return this buffer + * @throws BufferOverflowException if there is insufficient space in this buffer for the values in + * the source array + * @throws ReadOnlyBufferException if this buffer is read-only + */ + default LongDataBuffer write(long[] src) { + return write(src, 0, src.length); + } + + /** + * Bulk put method, using long arrays. + *

+ * This method transfers the values in the given source array into this buffer. If there are + * more values in the source array than in this buffer, that is, if + * {@code length > size()}, then no values are transferred and a + * BufferOverflowException is thrown. + *

+ * Otherwise, this method copies {@code n = length} values from the given array into this buffer, + * starting at the given offset. + * + * @param src the source array from which values are to be read + * @param offset the offset within the array of the first value to be read; must be non-negative + * and no larger than {@code src.length} + * @param length the number of values to be read from the given array; must be non-negative and no + * larger than {@code src.length - offset} + * @return this buffer + * @throws BufferOverflowException if there is insufficient space in this buffer for the values in + * the source array + * @throws IndexOutOfBoundsException if the preconditions on the offset and length parameters do + * not hold + * @throws ReadOnlyBufferException if this buffer is read-only + */ + LongDataBuffer write(long[] src, int offset, int length); + + @Override + default Long getObject(long index) { + return getLong(index); + } + + @Override + default LongDataBuffer setObject(Long value, long index) { + return setLong(value, index); + } + + @Override + LongDataBuffer copyTo(DataBuffer dst, long size); + + @Override + default LongDataBuffer offset(long index) { + return slice(index, size() - index); + } + + @Override + default LongDataBuffer narrow(long size) { + return slice(0, size); + } + + @Override + LongDataBuffer slice(long index, long size); + + @Override + default DataBufferWindow window(long size) { + throw new UnsupportedOperationException(); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/buffer/ShortDataBuffer.java b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/ShortDataBuffer.java new file mode 100644 index 00000000000..290e2d57619 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/ShortDataBuffer.java @@ -0,0 +1,165 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.buffer; + +import java.nio.BufferOverflowException; +import java.nio.BufferUnderflowException; +import java.nio.ReadOnlyBufferException; + +/** + * A {@link DataBuffer} of shorts. + */ +public interface ShortDataBuffer extends DataBuffer { + + /** + * Reads the short at the given index. + * + * @param index the index from which the float will be read + * @return the short at the given index + * @throws IndexOutOfBoundsException if index is negative or not smaller than the buffer size + */ + short getShort(long index); + + /** + * Writes the given short into this buffer at the given index. + * + * @param value the short to be written + * @param index the index at which the value will be written + * @return this buffer + * @throws IndexOutOfBoundsException if index is negative or not smaller than the buffer size + * @throws ReadOnlyBufferException if this buffer is read-only + */ + ShortDataBuffer setShort(short value, long index); + + /** + * Bulk get method, using short arrays. + *

+ * This method transfers values from this buffer into the given destination array. If there are + * fewer values in the buffer than are required to satisfy the request, that is, if + * {@code dst.length > size()}, then no values are transferred and a + * BufferUnderflowException is thrown. + *

+ * Otherwise, this method copies {@code n = dst.length} values from this buffer into the given + * array. + * + * @param dst the array into which values are to be written + * @return this buffer + * @throws BufferUnderflowException if there are not enough values to copy from this buffer + */ + default ShortDataBuffer read(short[] dst) { + return read(dst, 0, dst.length); + } + + /** + * Bulk get method, using short arrays. + *

+ * This method transfers values from this buffer into the given destination array. If there are + * fewer values in the buffer than are required to satisfy the request, that is, if + * {@code length > size()}, then no values are transferred and a + * BufferUnderflowException is thrown. + *

+ * Otherwise, this method copies {@code n = length} values from this buffer into the given array + * starting at the given offset. + * + * @param dst the array into which values are to be written + * @param offset the offset within the array of the first value to be written; must be + * non-negative and no larger than {@code dst.length} + * @param length the maximum number of values to be written to the given array; must be + * non-negative and no larger than {@code dst.length - offset} + * @return this buffer + * @throws BufferUnderflowException if there are fewer than length values remaining in this buffer + * @throws IndexOutOfBoundsException if the preconditions on the offset and length parameters do + * not hold + */ + ShortDataBuffer read(short[] dst, int offset, int length); + + /** + * Bulk put method, using short arrays. + *

+ * This method transfers the values in the given source array into this buffer. If there are + * more values in the source array than in this buffer, that is, if + * {@code src.length > size()}, then no values are transferred and a + * BufferOverflowException is thrown. + *

+ * Otherwise, this method copies {@code n = src.length} values from the given array. + * + * @param src the source array from which values are to be read + * @return this buffer + * @throws BufferOverflowException if there is insufficient space in this buffer for the values in + * the source array + * @throws ReadOnlyBufferException if this buffer is read-only + */ + default ShortDataBuffer write(short[] src) { + return write(src, 0, src.length); + } + + /** + * Bulk put method, using short arrays. + *

+ * This method transfers the values in the given source array into this buffer. If there are + * more values in the source array than in this buffer, that is, if + * {@code length > size()}, then no values are transferred and a + * BufferOverflowException is thrown. + *

+ * Otherwise, this method copies {@code n = length} values from the given array into this buffer, + * starting at the given offset. + * + * @param src the source array from which values are to be read + * @param offset the offset within the array of the first value to be read; must be non-negative + * and no larger than {@code src.length} + * @param length the number of values to be read from the given array; must be non-negative and no + * larger than {@code src.length - offset} + * @return this buffer + * @throws BufferOverflowException if there is insufficient space in this buffer for the values in + * the source array + * @throws IndexOutOfBoundsException if the preconditions on the offset and length parameters do + * not hold + * @throws ReadOnlyBufferException if this buffer is read-only + */ + ShortDataBuffer write(short[] src, int offset, int length); + + @Override + default Short getObject(long index) { + return getShort(index); + } + + @Override + default ShortDataBuffer setObject(Short value, long index) { + return setShort(value, index); + } + + @Override + ShortDataBuffer copyTo(DataBuffer dst, long size); + + @Override + default ShortDataBuffer offset(long index) { + return slice(index, size() - index); + } + + @Override + default ShortDataBuffer narrow(long size) { + return slice(0, size); + } + + @Override + ShortDataBuffer slice(long index, long size); + + @Override + default DataBufferWindow window(long size) { + throw new UnsupportedOperationException(); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/BooleanDataLayout.java b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/BooleanDataLayout.java new file mode 100644 index 00000000000..c7092c8720d --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/BooleanDataLayout.java @@ -0,0 +1,65 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ +package org.tensorflow.ndarray.buffer.layout; + +import org.tensorflow.ndarray.buffer.BooleanDataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.impl.buffer.adapter.DataBufferAdapterFactory; + +/** + * A {@link DataLayout} that converts data stored in a buffer to booleans. + * + * @param type of buffer this layout can be applied to + * @see DataLayout + */ +public interface BooleanDataLayout> extends DataLayout { + + @Override + default BooleanDataBuffer applyTo(S buffer) { + return DataBufferAdapterFactory.create(buffer, this); + } + + /** + * Writes a boolean into the buffer at the given index after converting it to the buffer type. + * + * @param buffer the buffer to write to + * @param value the boolean to convert and write + * @param index index in the buffer where the converted value should be written + * @see #writeObject(DataBuffer, Boolean, long) + */ + void writeBoolean(S buffer, boolean value, long index); + + /** + * Reads {@code n = scale()} values from the buffer at the given index and return them as a boolean. + * + * @param buffer the buffer to read from + * @param index position of the buffer to read in the buffer + * @return the boolean value + * @see #readObject(DataBuffer, long) + */ + boolean readBoolean(S buffer, long index); + + @Override + default void writeObject(S buffer, Boolean value, long index) { + writeBoolean(buffer, value, index); + } + + @Override + default Boolean readObject(S buffer, long index) { + return readBoolean(buffer, index); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/ByteDataLayout.java b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/ByteDataLayout.java new file mode 100644 index 00000000000..e4d4bf9c8cf --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/ByteDataLayout.java @@ -0,0 +1,65 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.buffer.layout; + +import org.tensorflow.ndarray.buffer.ByteDataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.impl.buffer.adapter.DataBufferAdapterFactory; + +/** + * A {@link DataLayout} that converts data stored in a buffer to bytes. + * + * @param type of buffer this layout can be applied to + * @see DataLayout + */ +public interface ByteDataLayout> extends DataLayout { + + @Override + default ByteDataBuffer applyTo(S buffer) { + return DataBufferAdapterFactory.create(buffer, this); + } + + /** + * Writes a byte into the buffer at the given index after converting it to the buffer type. + * + * @param buffer the buffer to write to + * @param value the byte to convert and write + * @param index index in the buffer where the converted value should be written + * @see #writeObject(DataBuffer, Byte, long) + */ + void writeByte(S buffer, byte value, long index); + + /** + * Reads {@code n = scale()} values from the buffer at the given index and return them as a byte. + * + * @param buffer the buffer to read from + * @param index position of the buffer to read in the buffer + * @return the byte value + * @see #readObject(DataBuffer, long) + */ + byte readByte(S buffer, long index); + + @Override + default void writeObject(S buffer, Byte value, long index) { + writeByte(buffer, value, index); + } + + @Override + default Byte readObject(S buffer, long index) { + return readByte(buffer, index); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/DataLayout.java b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/DataLayout.java new file mode 100644 index 00000000000..93cc542e07a --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/DataLayout.java @@ -0,0 +1,129 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ +package org.tensorflow.ndarray.buffer.layout; + +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.impl.buffer.adapter.DataBufferAdapterFactory; + +/** + * Converts data stored in a buffer to a given type. + * + *

{@code DataLayout} instances are used to define a custom format for storing and reading data + * of a {@link DataBuffer}. They provide a segregation layer between the type of data stored in the + * buffer (the buffer type) and the type of data manipulated by the end user (the + * user type). + * + *

Since the conversion methods are invoked for every value that is written or read, working + * with data layouts may have a negative impact on the performances so using primitive types directly + * should be preferred whenever possible. + * + *

It is also recommended to implement immutable data layouts so they can be reapplied to multiple + * buffers without reallocating a new instance for each of them. For example: + * + *

+ * class BigIntegerBufferAllocator {
+ *
+ *     public DataBuffer<BigInteger> allocate(long size) {
+ *         return LAYOUT.applyTo(DataBuffers.ofLongs(size * LAYOUT.scale()));  // scale is 1 by default
+ *     }
+ *
+ *     private static final DataLayout<LongDataBuffer, BigInteger> LAYOUT = new DataLayout<LongDataBuffer, BigInteger>() {
+ *
+ *         @Override
+ *         public void writeObject(LongDataBuffer buffer, BigInteger value, long index) {
+ *             buffer.setLong(value.longValue(), index);
+ *         }
+ *
+ *         @Override
+ *         public BigInteger readObject(LongDataBuffer buffer, long index) {
+ *             return BigInteger.valueOf(buffer.getLong(index));
+ *         }
+ *     };
+ * }
+ * 
+ * + * @param type of buffer this layout can be applied to + * @param user data type of this layout + */ +public interface DataLayout, T> { + + /** + * Apply this layout to the provided buffer. + * + *

The returned {@link DataBuffer} instance is simply a wrapper to the original buffer and does + * not have a backing storage of his own. + * + * @param buffer the target buffer to apply this layout to + * @return a buffer with this layout + */ + default DataBuffer applyTo(S buffer) { + return DataBufferAdapterFactory.create(buffer, this); + } + + /** + * Writes a user value into the buffer at the given index after converting it to the buffer type. + * + *

It is the responsibility of the implementors of this interface to write the converted value + * to the given buffer before this call returns, using the most appropriate method. For example, + * for a layout converting a {@code BigInteger} to a single {@code long}, + *

+   * @Override
+   * public void writeObject(LongDataBuffer buffer, BigInteger value, long index) {
+   *   buffer.setLong(value.longValue(), index);
+   * }
+   * 
+ * If a single user value scales over more than one buffer values, {@code index} indicates the + * starting position of the sequence to be written to the buffer. + * + * @param buffer the buffer to write to + * @param value the value in the user type to convert and write + * @param index index in the buffer where the converted value should be written + */ + void writeObject(S buffer, T value, long index); + + /** + * Reads {@code n = scale()} values from the buffer at the given index and return them as a single + * value in the user type. + * + *

It is the responsibility of the implementors of this interface to read the value to be + * converted from the given buffer, using the most appropriate method. For example, for a layout + * that converting a single {@code long} to a {@code BigInteger}, + *

+   * @Override
+   * public BigInteger readObject(LongDataBuffer buffer, long index) {
+   *   return BigInteger.valueOf(buffer.getLong(index));
+   * }
+   * 
+ * If a single user value scales over more than one buffer values, {@code index} indicates the + * starting position of the sequence to be read from the buffer. + * + * @param buffer the buffer to read from + * @param index position of the buffer to read in the buffer + * @return the converted value + */ + T readObject(S buffer, long index); + + /** + * Indicates the number of buffer values are required to represent a single user value, default is 1. + * + *

Scale must be positive and must be an integer, meaning that a single buffer value in a buffer cannot + * be used to represent more than one user value. + */ + default int scale() { + return 1; + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/DataLayouts.java b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/DataLayouts.java new file mode 100644 index 00000000000..8f69168930c --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/DataLayouts.java @@ -0,0 +1,96 @@ +/* + * Copyright 2020 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.buffer.layout; + +import java.nio.charset.Charset; +import org.tensorflow.ndarray.buffer.ByteDataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.ShortDataBuffer; +import org.tensorflow.ndarray.impl.buffer.layout.Bfloat16Layout; +import org.tensorflow.ndarray.impl.buffer.layout.BoolLayout; +import org.tensorflow.ndarray.impl.buffer.layout.Float16Layout; +import org.tensorflow.ndarray.impl.buffer.layout.StringLayout; + +/** + * Exposes {@link DataLayout} instances of data formats frequently used in linear algebra computation. + * + *

Example of usage: + *

{@code
+ * // Storing boolean values in a ByteDataBuffer
+ * BooleanDataBuffer boolBuffer = DataLayouts.BOOL.applyTo(byteDataBuffer);
+ *
+ * // Allocating a new buffer of 256 half floats
+ * FloatDataBuffer halfBuffer = DataLayouts.FLOAT16.applyTo(DataBuffers.ofShorts(256 * DataLayouts.FLOAT16.scale());
+ * }
+ */ +public final class DataLayouts { + + /** + * Data layout for converting 16-bit bfloats to/from short values. + * + *

This format used to be specific to TensorFlow but has now been adopted more broadly in the + * machine learning field. It is optimized for fast conversion with single-precision 32-bit + * floating points by simply shifting their value and truncating the mantissa to only 7 bits. + * + *

Therefore, this is a lost of precision in the fraction part compared to the IEEE-754 + * half-precision floating point specification (see {@link #FLOAT16} but it has a larger range of + * possible values in the whole part as it preserves the 8-bit exponent and uses the same bias, + * (i.e. an absolute range above 0 of approximately [10-40, 3.39 × 1038] + * + *

Some CPUs support the bfloat16 format natively for better performances. + */ + public static final FloatDataLayout BFLOAT16 = new Bfloat16Layout(); + + /** + * Data layout for converting 16-bit half floats to/from short values. + * + *

Half floats are stored in memory accordingly to the IEEE-754 half-precision floating point + * specification, and are converted to/from 32-bit floats in the user space. + * + *

There is a potential loss of precision when converting a single float (32-bit) to a half + * float (16-bit). Absolute range of values above 0 for a half float is approximately + * [5.96 × 10-8, 6.55 × 104] and their decimal part is rounded up + * to a 10 bits mantissa. + * + *

In general, half float computation perform better on GPUs since, in general, CPUs do not + * support this format natively.

+ */ + public static final FloatDataLayout FLOAT16 = new Float16Layout(); + + /** + * Data layout for converting booleans to/from byte values. + * + *

Since there is no Java NIO boolean buffer, this layout is particularly useful for mapping + * booleans values to standard byte buffers. The conversion between a boolean and a byte requires + * explicit type casting. + */ + public static final BooleanDataLayout BOOL = new BoolLayout(); + + /** + * Creates a data layout for converting strings to/from byte sequences. + * + *

This layout requires a {@code charset} in parameter to specify how the strings must be + * encoded/decoded as byte sequences. So a new layout instance is always returned. + * + * @param charset charset to use + * @return a new string layout + */ + public static DataLayout, String> ofStrings(Charset charset) { + return StringLayout.of(charset); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/DoubleDataLayout.java b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/DoubleDataLayout.java new file mode 100644 index 00000000000..efd1e461802 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/DoubleDataLayout.java @@ -0,0 +1,65 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ +package org.tensorflow.ndarray.buffer.layout; + +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DoubleDataBuffer; +import org.tensorflow.ndarray.impl.buffer.adapter.DataBufferAdapterFactory; + +/** + * A {@link DataLayout} that converts data stored in a buffer to doubles. + * + * @param type of buffer this layout can be applied to + * @see DataLayout + */ +public interface DoubleDataLayout> extends DataLayout { + + @Override + default DoubleDataBuffer applyTo(S buffer) { + return DataBufferAdapterFactory.create(buffer, this); + } + + /** + * Writes a double into the buffer at the given index after converting it to the buffer type. + * + * @param buffer the buffer to write to + * @param value the double to convert and write + * @param index index in the buffer where the converted value should be written + * @see #writeObject(DataBuffer, Double, long) + */ + void writeDouble(S buffer, double value, long index); + + /** + * Reads {@code n = scale()} buffer values at the given index and return them as a double. + * + * @param buffer the buffer to read from + * @param index position of the buffer to read in the buffer + * @return the double value + * @see #readObject(DataBuffer, long) + */ + double readDouble(S buffer, long index); + + @Override + default void writeObject(S buffer, Double value, long index) { + writeDouble(buffer, value, index); + } + + @Override + default Double readObject(S buffer, long index) { + return readDouble(buffer, index); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/FloatDataLayout.java b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/FloatDataLayout.java new file mode 100644 index 00000000000..a57f525d69f --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/FloatDataLayout.java @@ -0,0 +1,65 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ +package org.tensorflow.ndarray.buffer.layout; + +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.FloatDataBuffer; +import org.tensorflow.ndarray.impl.buffer.adapter.DataBufferAdapterFactory; + +/** + * A {@link DataLayout} that converts data stored in a buffer to floats. + * + * @param type of buffer this layout can be applied to + * @see DataLayout + */ +public interface FloatDataLayout> extends DataLayout { + + @Override + default FloatDataBuffer applyTo(S buffer) { + return DataBufferAdapterFactory.create(buffer, this); + } + + /** + * Writes a float into the buffer at the given index after converting it to the buffer type. + * + * @param buffer the buffer to write to + * @param value the float to convert and write + * @param index index in the buffer where the converted value should be written + * @see #writeObject(DataBuffer, Float, long) + */ + void writeFloat(S buffer, float value, long index); + + /** + * Reads {@code n = scale()} values from the buffer at the given index and return them as a float. + * + * @param buffer the buffer to read from + * @param index position of the buffer to read in the buffer + * @return the float value + * @see #readObject(DataBuffer, long) + */ + float readFloat(S buffer, long index); + + @Override + default void writeObject(S buffer, Float value, long index) { + writeFloat(buffer, value, index); + } + + @Override + default Float readObject(S buffer, long index) { + return readFloat(buffer, index); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/IntDataLayout.java b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/IntDataLayout.java new file mode 100644 index 00000000000..718deac9b9f --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/IntDataLayout.java @@ -0,0 +1,66 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.buffer.layout; + +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.IntDataBuffer; +import org.tensorflow.ndarray.impl.buffer.adapter.DataBufferAdapterFactory; + +/** + * A {@link DataLayout} that converts data stored in a buffer to ints. + * + * @param type of buffer this layout can be applied to + * @see DataLayout + */ +public interface IntDataLayout> extends DataLayout { + + @Override + default IntDataBuffer applyTo(S buffer) { + return DataBufferAdapterFactory.create(buffer, this); + } + + /** + * Writes a int into the buffer at the given index after converting it to the buffer type. + * + * @param buffer the buffer to write to + * @param value the int to convert and write + * @param index index in the buffer where the converted value should be written + * @see #writeObject(DataBuffer, Integer, long) + */ + void writeInt(S buffer, int value, long index); + + /** + * Reads {@code n = scale()} values from the buffer at the given index and return them as an int. + * + * @param buffer the buffer to read from + * @param index position of the buffer to read in the buffer + * @return the int value + * @see #readObject(DataBuffer, long) + */ + int readInt(S buffer, long index); + + @Override + default void writeObject(S buffer, Integer value, long index) { + writeInt(buffer, value, index); + } + + @Override + default Integer readObject(S buffer, long index) { + return readInt(buffer, index); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/LongDataLayout.java b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/LongDataLayout.java new file mode 100644 index 00000000000..f5c86ddd378 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/LongDataLayout.java @@ -0,0 +1,65 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ +package org.tensorflow.ndarray.buffer.layout; + +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.LongDataBuffer; +import org.tensorflow.ndarray.impl.buffer.adapter.DataBufferAdapterFactory; + +/** + * A {@link DataLayout} that converts data stored in a buffer to longs. + * + * @param type of buffer this layout can be applied to + * @see DataLayout + */ +public interface LongDataLayout> extends DataLayout { + + @Override + default LongDataBuffer applyTo(S buffer) { + return DataBufferAdapterFactory.create(buffer, this); + } + + /** + * Writes a long into the buffer at the given index after converting it to the buffer type. + * + * @param buffer the buffer to write to + * @param value the long to convert and write + * @param index index in the buffer where the converted value should be written + * @see #writeObject(DataBuffer, Long, long) + */ + void writeLong(S buffer, long value, long index); + + /** + * Reads {@code n = scale()} values from the buffer at the given index and return them as a long. + * + * @param buffer the buffer to read from + * @param index position of the buffer to read in the buffer + * @return the long value + * @see #readObject(DataBuffer, long) + */ + long readLong(S buffer, long index); + + @Override + default void writeObject(S buffer, Long value, long index) { + writeLong(buffer, value, index); + } + + @Override + default Long readObject(S buffer, long index) { + return readLong(buffer, index); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/ShortDataLayout.java b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/ShortDataLayout.java new file mode 100644 index 00000000000..89c1fd0dec4 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/ShortDataLayout.java @@ -0,0 +1,65 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ +package org.tensorflow.ndarray.buffer.layout; + +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.ShortDataBuffer; +import org.tensorflow.ndarray.impl.buffer.adapter.DataBufferAdapterFactory; + +/** + * A {@link DataLayout} that converts data stored in a buffer to shorts. + * + * @param type of buffer this layout can be applied to + * @see DataLayout + */ +public interface ShortDataLayout> extends DataLayout { + + @Override + default ShortDataBuffer applyTo(S buffer) { + return DataBufferAdapterFactory.create(buffer, this); + } + + /** + * Writes a short into the buffer at the given index after converting it to the buffer type. + * + * @param buffer the buffer to write to + * @param value the short to convert and write + * @param index index in the buffer where the converted value should be written + * @see #writeObject(DataBuffer, Short, long) + */ + void writeShort(S buffer, short value, long index); + + /** + * Reads {@code n = scale()} buffer values at the given index and return them as a short. + * + * @param buffer the buffer to read from + * @param index position of the value to read in the buffer + * @return the short value + * @see #readObject(DataBuffer, long) + */ + short readShort(S buffer, long index); + + @Override + default void writeObject(S buffer, Short value, long index) { + writeShort(buffer, value, index); + } + + @Override + default Short readObject(S buffer, long index) { + return readShort(buffer, index); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/AbstractNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/AbstractNdArray.java new file mode 100644 index 00000000000..690dedc2042 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/AbstractNdArray.java @@ -0,0 +1,92 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl; + +import java.util.Iterator; +import org.tensorflow.ndarray.NdArray; +import org.tensorflow.ndarray.NdArraySequence; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; + +@SuppressWarnings("unchecked") +public abstract class AbstractNdArray> implements NdArray { + + public abstract U slice(long position, DimensionalSpace dimensions); + + public DimensionalSpace dimensions() { + return dimensions; + } + + @Override + public Shape shape() { + return dimensions.shape(); + } + + @Override + public NdArraySequence scalars() { + // negative if this array is a scalar, should be handled in `elements(dimIdx)` + return (NdArraySequence)elements(shape().numDimensions() - 1); + } + + @Override + public int hashCode() { + return slowHashCode(); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (!(obj instanceof NdArray)) { + return false; + } + return slowEquals((NdArray)obj); + } + + protected AbstractNdArray(DimensionalSpace dimensions) { + this.dimensions = dimensions; + } + + protected void slowCopyTo(NdArray array) { + scalars().forEachIndexed((coords, e) -> array.setObject(e.getObject(), coords)); + } + + protected int slowHashCode() { + final int prime = 31; + int result = 1; + for (NdArray scalar : scalars()) { + result = prime * result + scalar.getObject().hashCode(); + } + result = prime * result + shape().hashCode(); + return result; + } + + protected boolean slowEquals(NdArray array) { + if (!shape().equals(array.shape())) { // this guarantees also that we have the same number of scalar values + return false; + } + for (Iterator> thisIter = scalars().iterator(), otherIter = array.scalars().iterator(); thisIter.hasNext();) { + if (!thisIter.next().getObject().equals(otherIter.next().getObject())) { + return false; + } + } + return true; + } + + protected final DimensionalSpace dimensions; +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/Validator.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/Validator.java new file mode 100644 index 00000000000..285d09966de --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/Validator.java @@ -0,0 +1,55 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl; + +import java.nio.BufferOverflowException; +import java.nio.BufferUnderflowException; +import org.tensorflow.ndarray.NdArray; +import org.tensorflow.ndarray.buffer.DataBuffer; + +public class Validator { + + public static void copyToNdArrayArgs(NdArray ndArray, NdArray otherNdArray) { + if (!ndArray.shape().equals(otherNdArray.shape())) { + throw new IllegalArgumentException("Can only copy to arrays of the same shape (" + + ndArray.shape() + " != " + otherNdArray.shape() + ")"); + } + } + + public static void readToBufferArgs(NdArray ndArray, DataBuffer dst) { + if (dst.size() < ndArray.size()) { + throw new BufferOverflowException(); + } + } + + public static void writeFromBufferArgs(NdArray ndArray, DataBuffer src) { + if (src.size() < ndArray.size()) { + throw new BufferUnderflowException(); + } + } + + private static void copyArrayArgs(int arrayLength, int arrayOffset) { + if (arrayOffset < 0) { + throw new IndexOutOfBoundsException("Offset must be non-negative"); + } + if (arrayOffset > arrayLength) { + throw new IndexOutOfBoundsException("Offset must be no larger than array length"); + } + } + + protected Validator() {} +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/AbstractDataBuffer.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/AbstractDataBuffer.java new file mode 100644 index 00000000000..e5103a2c17a --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/AbstractDataBuffer.java @@ -0,0 +1,182 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.buffer; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.tensorflow.ndarray.buffer.DataBuffer; + +public abstract class AbstractDataBuffer implements DataBuffer { + + @Override + public DataBuffer read(T[] dst, int offset, int length) { + Validator.readArgs(this, dst.length, offset, length); + for (int i = 0; i < length; ++i) { + dst[i + offset] = getObject(i); + } + return this; + } + + @Override + public DataBuffer write(T[] src, int offset, int length) { + Validator.writeArgs(this, src.length, offset, length); + for (int i = 0; i < length; ++i) { + setObject(src[i + offset], i); + } + return this; + } + + @Override + public DataBuffer copyTo(DataBuffer dst, long size) { + return slowCopyTo(dst, size); + } + + @Override + public int hashCode() { + // This hash code computation is generic to all types of data buffers and accurate but not optimized + // for performances, it needs to be improved if there is a present use case for such hash codes. + return slowHashCode(); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (!(obj instanceof DataBuffer)) { + return false; + } + return slowEquals((DataBuffer)obj); + } + + @SuppressWarnings("unchecked") + protected > U slowCopyTo(DataBuffer dst, long size) { + Validator.copyToArgs(this, dst, size); + for (long idx = 0L; idx < size; ++idx) { + dst.setObject(getObject(idx), idx); + } + return (U)this; + } + + protected int slowHashCode() { + final int prime = 31; + int result = 1; + + // First check from the first non-null element if we are dealing with a buffer of arrays + long idx = 0L; + for (; idx < size(); ++idx) { + T o = getObject(idx); + if (o != null) { + if (o.getClass().isArray()) { + result = prime * result + arrayHashCode(idx, o.getClass()); // compute hash codes based on array elements + return result; + } + result = prime * result + o.hashCode(); + break; // continue hash code computation without array type check + } + result = prime * result; + } + while (++idx < size()) { + result = prime * result + Objects.hashCode(getObject(idx)); + } + return result; + } + + protected boolean slowEquals(DataBuffer other) { + if (other.size() != size()) { + return false; + } + long idx = 0L; + for (; idx < size(); ++idx) { + Object thisObject = getObject(idx); + if (thisObject != null) { + if (thisObject.getClass().isArray()) { + return arrayEquals(idx, thisObject.getClass(), other); + } + if (!Objects.equals(other.getObject(idx), thisObject)) { + return false; + } + break; // continue equality comparison without array type check + } + if (other.getObject(idx) != null) { + return false; + } + } + while (++idx < size()) { + if (!Objects.equals(other.getObject(idx), getObject(idx))) { + return false; + } + } + return true; + } + + private int arrayHashCode(long startIdx, Class arrayClass) { + ArrayHashCoder hashCoder = ARRAY_HASH_CODERS.getOrDefault(arrayClass, DEFAULT_ARRAY_HASH_CODER); + final int prime = 31; + int result = 1; + for (long idx = startIdx; idx < size(); ++idx) { + result = prime * result + hashCoder.hashCode(this, idx); + } + return result; + } + + private boolean arrayEquals(long startIdx, Class arrayClass, DataBuffer other) { + ArrayComparator comparator = ARRAY_COMPARATORS.getOrDefault(arrayClass, DEFAULT_ARRAY_COMPARATOR); + for (long idx = startIdx; idx < size(); ++idx) { + if (!comparator.equals(this, other, idx)) { + return false; + } + } + return true; + } + + @FunctionalInterface + private static interface ArrayHashCoder { + int hashCode(DataBuffer buffer, long index); + } + private static final Map, ArrayHashCoder> ARRAY_HASH_CODERS = new HashMap<>(); + private static final ArrayHashCoder DEFAULT_ARRAY_HASH_CODER; + + @FunctionalInterface + private static interface ArrayComparator { + boolean equals(DataBuffer buffer, DataBuffer otherBuffer, long index); + } + private static final Map, ArrayComparator> ARRAY_COMPARATORS = new HashMap<>(); + private static final ArrayComparator DEFAULT_ARRAY_COMPARATOR; + + static { + ARRAY_HASH_CODERS.put(byte[].class, (b, idx) -> Arrays.hashCode((byte[])b.getObject(idx))); + ARRAY_HASH_CODERS.put(int[].class, (b, idx) -> Arrays.hashCode((int[])b.getObject(idx))); + ARRAY_HASH_CODERS.put(short[].class, (b, idx) -> Arrays.hashCode((short[])b.getObject(idx))); + ARRAY_HASH_CODERS.put(long[].class, (b, idx) -> Arrays.hashCode((long[])b.getObject(idx))); + ARRAY_HASH_CODERS.put(float[].class, (b, idx) -> Arrays.hashCode((float[])b.getObject(idx))); + ARRAY_HASH_CODERS.put(double[].class, (b, idx) -> Arrays.hashCode((double[])b.getObject(idx))); + ARRAY_HASH_CODERS.put(boolean[].class, (b, idx) -> Arrays.hashCode((boolean[])b.getObject(idx))); + DEFAULT_ARRAY_HASH_CODER = (b, idx) -> Arrays.deepHashCode((Object[])b.getObject(idx)); + + ARRAY_COMPARATORS.put(byte[].class, (b1, b2, idx) -> Arrays.equals((byte[])b1.getObject(idx), (byte[])b2.getObject(idx))); + ARRAY_COMPARATORS.put(int[].class, (b1, b2, idx) -> Arrays.equals((int[])b1.getObject(idx), (int[])b2.getObject(idx))); + ARRAY_COMPARATORS.put(short[].class, (b1, b2, idx) -> Arrays.equals((short[])b1.getObject(idx), (short[])b2.getObject(idx))); + ARRAY_COMPARATORS.put(long[].class, (b1, b2, idx) -> Arrays.equals((long[])b1.getObject(idx), (long[])b2.getObject(idx))); + ARRAY_COMPARATORS.put(float[].class, (b1, b2, idx) -> Arrays.equals((float[])b1.getObject(idx), (float[])b2.getObject(idx))); + ARRAY_COMPARATORS.put(double[].class, (b1, b2, idx) -> Arrays.equals((double[])b1.getObject(idx), (double[])b2.getObject(idx))); + ARRAY_COMPARATORS.put(boolean[].class, (b1, b2, idx) -> Arrays.equals((boolean[])b1.getObject(idx), (boolean[])b2.getObject(idx))); + DEFAULT_ARRAY_COMPARATOR = (b1, b2, idx) -> Arrays.deepEquals((Object[])b1.getObject(idx), (Object[])b2.getObject(idx)); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/AbstractDataBufferWindow.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/AbstractDataBufferWindow.java new file mode 100644 index 00000000000..55d4fd56021 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/AbstractDataBufferWindow.java @@ -0,0 +1,48 @@ +package org.tensorflow.ndarray.impl.buffer; + +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBufferWindow; + +public abstract class AbstractDataBufferWindow> implements DataBufferWindow { + + @Override + public final long offset() { + return offset; + } + + @Override + public final long size() { + return windowBuffer.size(); + } + + @Override + public final DataBufferWindow slideTo(long index) { + if (index < 0 || index > maxOffset) { + throw new IndexOutOfBoundsException(); + } + offset(index); + offset = index; + return this; + } + + @Override + public final DataBufferWindow slide(long step) { + return slideTo(offset + step); + } + + @Override + public final B buffer() { + return windowBuffer; + } + + protected abstract void offset(long offset); + + protected AbstractDataBufferWindow(B windowBuffer, long bufferLimit) { + this.windowBuffer = windowBuffer; + maxOffset = bufferLimit - windowBuffer.size(); + } + + private final B windowBuffer; + private final long maxOffset; + private long offset = 0; +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/Validator.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/Validator.java new file mode 100644 index 00000000000..8f18e620b90 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/Validator.java @@ -0,0 +1,132 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.buffer; + +import java.nio.BufferOverflowException; +import java.nio.BufferUnderflowException; +import java.nio.ReadOnlyBufferException; +import org.tensorflow.ndarray.buffer.DataBuffer; + +public class Validator { + + public static void createArgs(long size, long maxSize) { + if (size < 0) { + throw new IllegalArgumentException("Size must be non-negative"); + } + if (size > maxSize) { + throw new IllegalArgumentException("Buffer size must be no greater than maximum size allowed (" + maxSize + ")"); + } + } + + public static void getArgs(DataBuffer buffer, long index) { + if (index < 0) { + throw new IndexOutOfBoundsException("Index must be non-negative"); + } + if (index >= buffer.size()) { + throw new IndexOutOfBoundsException("Index must be smaller than the buffer size"); + } + } + + public static void setArgs(DataBuffer buffer, long index) { + if (index < 0) { + throw new IndexOutOfBoundsException("Index must be non-negative"); + } + if (index >= buffer.size()) { + throw new IndexOutOfBoundsException("Index must be smaller than the buffer size"); + } + if (buffer.isReadOnly()) { + throw new ReadOnlyBufferException(); + } + } + + public static void copyToArgs(DataBuffer src, DataBuffer dst, long size) { + if (dst == src) { + throw new IllegalArgumentException("Source cannot be the same buffer as destination"); + } + if (size > dst.size()) { + throw new BufferOverflowException(); + } + if (size > src.size()) { + throw new BufferUnderflowException(); + } + if (dst.isReadOnly()) { + throw new ReadOnlyBufferException(); + } + } + + public static void readArgs(DataBuffer buffer, int arrayLength, int offset, int length) { + if (length > buffer.size()) { + throw new BufferUnderflowException(); + } + arrayArgs(arrayLength, offset, length); + } + + public static void writeArgs(DataBuffer buffer, int arrayLength, int offset, int length) { + if (length > buffer.size()) { + throw new BufferOverflowException(); + } + if (buffer.isReadOnly()) { + throw new ReadOnlyBufferException(); + } + arrayArgs(arrayLength, offset, length); + } + + public static void offsetArgs(DataBuffer buffer, long index) { + if (index < 0) { + throw new IllegalArgumentException("Index must be non-negative"); + } + if (index > buffer.size()) { + throw new IllegalArgumentException("Index must not exceed buffer size"); + } + } + + public static void narrowArgs(DataBuffer buffer, long size) { + if (size < 0) { + throw new IllegalArgumentException("Size must be non-negative"); + } + if (size > buffer.size()) { + throw new IllegalArgumentException("Cannot narrow a buffer of size " + buffer.size() + " to " + size); + } + } + + public static void sliceArgs(DataBuffer buffer, long index, long size) { + if (index < 0) { + throw new IllegalArgumentException("Index must be non-negative"); + } + if (size < 0) { + throw new IllegalArgumentException("Size must be non-negative"); + } + if (index + size > buffer.size()) { + throw new IllegalArgumentException("Buffer view must not exceed original buffer limits"); + } + } + + private static void arrayArgs(int arrayLength, int offset, int length) { + if (offset < 0) { + throw new IndexOutOfBoundsException("Offset must be non-negative"); + } + if (offset > arrayLength) { + throw new IndexOutOfBoundsException("Offset must be no larger than array length"); + } + if (length < 0) { + throw new IndexOutOfBoundsException("Length must be non-negative"); + } + if (length > arrayLength - offset) { + throw new IndexOutOfBoundsException("Length must be no larger than array length minus the offset"); + } + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/AbstractDataBufferAdapter.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/AbstractDataBufferAdapter.java new file mode 100644 index 00000000000..3c9b6df1e93 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/AbstractDataBufferAdapter.java @@ -0,0 +1,68 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.adapter; + +import org.tensorflow.ndarray.impl.buffer.Validator; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.impl.buffer.AbstractDataBuffer; +import org.tensorflow.ndarray.buffer.layout.DataLayout; + +@SuppressWarnings("unchecked") +abstract class AbstractDataBufferAdapter, T, U extends DataBuffer> extends AbstractDataBuffer { + + @Override + public long size() { + return size; + } + + @Override + public boolean isReadOnly() { + return buffer.isReadOnly(); + } + + @Override + public T getObject(long index) { + Validator.getArgs(this, index); + return layout.readObject(buffer, index * layout.scale()); + } + + @Override + public U setObject(T value, long index) { + Validator.setArgs(this, index); + layout.writeObject(buffer, value, index * layout.scale()); + return (U)this; + } + + AbstractDataBufferAdapter(S buffer, DataLayout layout) { + this.buffer = buffer; + this.layout = layout; + size = buffer.size() / layout.scale(); + } + + DataLayout layout() { + return layout; + } + + S buffer() { + return buffer; + } + + private final S buffer; + private final DataLayout layout; + private final long size; +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/BooleanDataBufferAdapter.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/BooleanDataBufferAdapter.java new file mode 100644 index 00000000000..40217b57d6a --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/BooleanDataBufferAdapter.java @@ -0,0 +1,116 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.adapter; + +import org.tensorflow.ndarray.impl.buffer.Validator; +import org.tensorflow.ndarray.buffer.BooleanDataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.layout.BooleanDataLayout; + +class BooleanDataBufferAdapter> extends AbstractDataBufferAdapter + implements BooleanDataBuffer { + + @Override + public boolean getBoolean(long index) { + Validator.getArgs(this, index); + return layout.readBoolean(buffer(), index * layout.scale()); + } + + @Override + public BooleanDataBuffer setBoolean(boolean value, long index) { + Validator.setArgs(this, index); + layout.writeBoolean(buffer(), value, index * layout.scale()); + return this; + } + + @Override + public BooleanDataBuffer read(boolean[] dst, int offset, int length) { + Validator.readArgs(this, dst.length, offset, length); + for (int i = 0, j = offset; i < length; ++i, ++j) { + dst[j] = layout.readBoolean(buffer(), i * layout.scale()); + } + return this; + } + + @Override + public BooleanDataBuffer write(boolean[] src, int offset, int length) { + Validator.writeArgs(this, src.length, offset, length); + for (int i = 0, j = offset; i < length; ++i, ++j) { + layout.writeBoolean(buffer(), src[j], i * layout.scale()); + } + return this; + } + + @Override + public BooleanDataBuffer copyTo(DataBuffer dst, long size) { + Validator.copyToArgs(this, dst, size); + if (dst instanceof BooleanDataBuffer) { + BooleanDataBuffer booleanDst = (BooleanDataBuffer)dst; + for (long idx = 0L; idx < size; ++idx) { + booleanDst.setBoolean(getBoolean(idx), idx); + } + return this; + } + return slowCopyTo(dst, size); + } + + @Override + @SuppressWarnings("unchecked") + public BooleanDataBuffer offset(long index) { + return new BooleanDataBufferAdapter<>((S)buffer().offset(index * layout.scale()), layout); + } + + @Override + @SuppressWarnings("unchecked") + public BooleanDataBuffer narrow(long size) { + return new BooleanDataBufferAdapter<>((S)buffer().narrow(size * layout.scale()), layout); + } + + @Override + @SuppressWarnings("unchecked") + public BooleanDataBuffer slice(long index, long size) { + return new BooleanDataBufferAdapter<>((S)buffer().slice(index * layout.scale(), size * layout.scale()), layout); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (!(obj instanceof BooleanDataBuffer)) { + return super.equals(obj); + } + BooleanDataBuffer other = (BooleanDataBuffer)obj; + if (other.size() != size()) { + return false; + } + for (long idx = 0L; idx < size(); ++idx) { + if (other.getBoolean(idx) != getBoolean(idx)) { + return false; + } + } + return true; + } + + BooleanDataBufferAdapter(S buffer, BooleanDataLayout layout) { + super(buffer, layout); + this.layout = layout; + } + + private BooleanDataLayout layout; +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/ByteDataBufferAdapter.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/ByteDataBufferAdapter.java new file mode 100644 index 00000000000..c120a3ba810 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/ByteDataBufferAdapter.java @@ -0,0 +1,135 @@ +package org.tensorflow.ndarray.impl.buffer.adapter; + +import org.tensorflow.ndarray.impl.buffer.Validator; +import org.tensorflow.ndarray.buffer.BooleanDataBuffer; +import org.tensorflow.ndarray.buffer.ByteDataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DoubleDataBuffer; +import org.tensorflow.ndarray.buffer.FloatDataBuffer; +import org.tensorflow.ndarray.buffer.IntDataBuffer; +import org.tensorflow.ndarray.buffer.LongDataBuffer; +import org.tensorflow.ndarray.buffer.ShortDataBuffer; +import org.tensorflow.ndarray.buffer.layout.ByteDataLayout; + +class ByteDataBufferAdapter> extends AbstractDataBufferAdapter + implements ByteDataBuffer { + + @Override + public byte getByte(long index) { + Validator.getArgs(this, index); + return layout.readByte(buffer(), index * layout.scale()); + } + + @Override + public ByteDataBuffer setByte(byte value, long index) { + Validator.setArgs(this, index); + layout.writeByte(buffer(), value, index * layout.scale()); + return this; + } + + @Override + public ByteDataBuffer read(byte[] dst, int offset, int length) { + Validator.readArgs(this, dst.length, offset, length); + for (int i = 0, j = offset; i < length; ++i, ++j) { + dst[j] = layout.readByte(buffer(), i * layout.scale()); + } + return this; + } + + @Override + public ByteDataBuffer write(byte[] src, int offset, int length) { + Validator.writeArgs(this, src.length, offset, length); + for (int i = 0, j = offset; i < length; ++i, ++j) { + layout.writeByte(buffer(), src[j], i * layout.scale()); + } + return this; + } + + @Override + public ByteDataBuffer copyTo(DataBuffer dst, long size) { + Validator.copyToArgs(this, dst, size); + if (dst instanceof ByteDataBuffer) { + ByteDataBuffer byteDst = (ByteDataBuffer)dst; + for (long idx = 0L; idx < size; ++idx) { + byteDst.setByte(getByte(idx), idx); + } + return this; + } + return slowCopyTo(dst, size); + } + + @Override + public IntDataBuffer asInts() { + throw new IllegalStateException("Byte buffers with layout cannot be converted"); + } + + @Override + public ShortDataBuffer asShorts() { + throw new IllegalStateException("Byte buffers with layout cannot be converted"); + } + + @Override + public LongDataBuffer asLongs() { + throw new IllegalStateException("Byte buffers with layout cannot be converted"); + } + + @Override + public FloatDataBuffer asFloats() { + throw new IllegalStateException("Byte buffers with layout cannot be converted"); + } + + @Override + public DoubleDataBuffer asDoubles() { + throw new IllegalStateException("Byte buffers with layout cannot be converted"); + } + + @Override + public BooleanDataBuffer asBooleans() { + throw new IllegalStateException("Byte buffers with layout cannot be converted"); + } + + @Override + @SuppressWarnings("unchecked") + public ByteDataBuffer offset(long index) { + return new ByteDataBufferAdapter<>((S)buffer().offset(index * layout.scale()), layout); + } + + @Override + @SuppressWarnings("unchecked") + public ByteDataBuffer narrow(long size) { + return new ByteDataBufferAdapter<>((S)buffer().narrow(size * layout.scale()), layout); + } + + @Override + @SuppressWarnings("unchecked") + public ByteDataBuffer slice(long index, long size) { + return new ByteDataBufferAdapter<>((S)buffer().slice(index * layout.scale(), size * layout.scale()), layout); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (!(obj instanceof ByteDataBuffer)) { + return super.equals(obj); + } + ByteDataBuffer other = (ByteDataBuffer)obj; + if (other.size() != size()) { + return false; + } + for (long idx = 0L; idx < size(); ++idx) { + if (other.getByte(idx) != getByte(idx)) { + return false; + } + } + return true; + } + + ByteDataBufferAdapter(S buffer, ByteDataLayout layout) { + super(buffer, layout); + this.layout = layout; + } + + private ByteDataLayout layout; +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/DataBufferAdapter.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/DataBufferAdapter.java new file mode 100644 index 00000000000..de20ab2cfd7 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/DataBufferAdapter.java @@ -0,0 +1,47 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.adapter; + +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.layout.DataLayout; + +@SuppressWarnings("unchecked") +class DataBufferAdapter, T> extends AbstractDataBufferAdapter> { + + @Override + @SuppressWarnings("unchecked") + public DataBuffer offset(long index) { + return new DataBufferAdapter<>((S)buffer().offset(index * layout().scale()), layout()); + } + + @Override + @SuppressWarnings("unchecked") + public DataBuffer narrow(long size) { + return new DataBufferAdapter<>((S)buffer().narrow(size * layout().scale()), layout()); + } + + @Override + @SuppressWarnings("unchecked") + public DataBuffer slice(long index, long size) { + return new DataBufferAdapter<>((S)buffer().slice(index * layout().scale(), size * layout().scale()), layout()); + } + + DataBufferAdapter(S buffer, DataLayout layout) { + super(buffer, layout); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/DataBufferAdapterFactory.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/DataBufferAdapterFactory.java new file mode 100644 index 00000000000..468051e1b46 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/DataBufferAdapterFactory.java @@ -0,0 +1,142 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.adapter; + +import org.tensorflow.ndarray.buffer.BooleanDataBuffer; +import org.tensorflow.ndarray.buffer.ByteDataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DoubleDataBuffer; +import org.tensorflow.ndarray.buffer.FloatDataBuffer; +import org.tensorflow.ndarray.buffer.IntDataBuffer; +import org.tensorflow.ndarray.buffer.LongDataBuffer; +import org.tensorflow.ndarray.buffer.ShortDataBuffer; +import org.tensorflow.ndarray.buffer.layout.BooleanDataLayout; +import org.tensorflow.ndarray.buffer.layout.ByteDataLayout; +import org.tensorflow.ndarray.buffer.layout.DataLayout; +import org.tensorflow.ndarray.buffer.layout.DoubleDataLayout; +import org.tensorflow.ndarray.buffer.layout.FloatDataLayout; +import org.tensorflow.ndarray.buffer.layout.IntDataLayout; +import org.tensorflow.ndarray.buffer.layout.LongDataLayout; +import org.tensorflow.ndarray.buffer.layout.ShortDataLayout; + +/** + * Factory of data buffer adapters. + * + *

Data buffer adapters are used to apply a {@link DataLayout} to a buffer. Conceptually, they act + * as a proxy that intercept each I/O call and perform the required type conversions after/before + * delegating the task to the underlying buffer. + */ +public class DataBufferAdapterFactory { + + /** + * Creates an adapter that applies a byte data layout to the given buffer. + * + * @param buffer the delegate buffer + * @param layout layout to apply + * @param the type of the buffer + * @return buffer adapter + */ + public static > ByteDataBuffer create(S buffer, ByteDataLayout layout) { + return new ByteDataBufferAdapter<>(buffer, layout); + } + + /** + * Creates an adapter that applies a boolean data layout to the given buffer. + * + * @param buffer the delegate buffer + * @param layout layout to apply + * @param the type of the buffer + * @return buffer adapter + */ + public static > BooleanDataBuffer create(S buffer, BooleanDataLayout layout) { + return new BooleanDataBufferAdapter<>(buffer, layout); + } + + /** + * Creates an adapter that applies a double data layout to the given buffer. + * + * @param buffer the delegate buffer + * @param layout layout to apply + * @param the type of the buffer + * @return buffer adapter + */ + public static > DoubleDataBuffer create(S buffer, DoubleDataLayout layout) { + return new DoubleDataBufferAdapter<>(buffer, layout); + } + + /** + * Creates an adapter that applies a float data layout to the given buffer. + * + * @param buffer the delegate buffer + * @param layout layout to apply + * @param the type of the buffer + * @return buffer adapter + */ + public static > FloatDataBuffer create(S buffer, FloatDataLayout layout) { + return new FloatDataBufferAdapter<>(buffer, layout); + } + + /** + * Creates an adapter that applies a integer data layout to the given buffer. + * + * @param buffer the delegate buffer + * @param layout layout to apply + * @param the type of the buffer + * @return buffer adapter + */ + public static > IntDataBuffer create(S buffer, IntDataLayout layout) { + return new IntDataBufferAdapter<>(buffer, layout); + } + + /** + * Creates an adapter that applies a long data layout to the given buffer. + * + * @param buffer the delegate buffer + * @param layout layout to apply + * @param the type of the buffer + * @return buffer adapter + */ + public static > LongDataBuffer create(S buffer, LongDataLayout layout) { + return new LongDataBufferAdapter<>(buffer, layout); + } + + /** + * Creates an adapter that applies a short data layout to the given buffer. + * + * @param buffer the delegate buffer + * @param layout layout to apply + * @param the type of the buffer + * @return buffer adapter + */ + public static > ShortDataBuffer create(S buffer, ShortDataLayout layout) { + return new ShortDataBufferAdapter<>(buffer, layout); + } + + /** + * Creates an adapter that applies a data layout to the given buffer. + * + * @param buffer the delegate buffer + * @param layout layout to apply + * @param the type of the buffer + * @param the type of data returned by the layout + * @return buffer adapter + */ + public static , T> DataBuffer create(S buffer, DataLayout layout) { + return new DataBufferAdapter<>(buffer, layout); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/DoubleDataBufferAdapter.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/DoubleDataBufferAdapter.java new file mode 100644 index 00000000000..253acbac269 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/DoubleDataBufferAdapter.java @@ -0,0 +1,116 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.adapter; + +import org.tensorflow.ndarray.impl.buffer.Validator; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DoubleDataBuffer; +import org.tensorflow.ndarray.buffer.layout.DoubleDataLayout; + +class DoubleDataBufferAdapter> extends AbstractDataBufferAdapter + implements DoubleDataBuffer { + + @Override + public double getDouble(long index) { + Validator.getArgs(this, index); + return layout.readDouble(buffer(), index * layout.scale()); + } + + @Override + public DoubleDataBuffer setDouble(double value, long index) { + Validator.setArgs(this, index); + layout.writeDouble(buffer(), value, index * layout.scale()); + return this; + } + + @Override + public DoubleDataBuffer read(double[] dst, int offset, int length) { + Validator.readArgs(this, dst.length, offset, length); + for (int i = 0, j = offset; i < length; ++i, ++j) { + dst[j] = layout.readDouble(buffer(), i * layout.scale()); + } + return this; + } + + @Override + public DoubleDataBuffer write(double[] src, int offset, int length) { + Validator.writeArgs(this, src.length, offset, length); + for (int i = 0, j = offset; i < length; ++i, ++j) { + layout.writeDouble(buffer(), src[j], i * layout.scale()); + } + return this; + } + + @Override + public DoubleDataBuffer copyTo(DataBuffer dst, long size) { + Validator.copyToArgs(this, dst, size); + if (dst instanceof DoubleDataBuffer) { + DoubleDataBuffer doubleDst = (DoubleDataBuffer)dst; + for (long idx = 0L; idx < size; ++idx) { + doubleDst.setDouble(getDouble(idx), idx); + } + return this; + } + return slowCopyTo(dst, size); + } + + @Override + @SuppressWarnings("unchecked") + public DoubleDataBuffer offset(long index) { + return new DoubleDataBufferAdapter<>((S)buffer().offset(index * layout.scale()), layout); + } + + @Override + @SuppressWarnings("unchecked") + public DoubleDataBuffer narrow(long size) { + return new DoubleDataBufferAdapter<>((S)buffer().narrow(size * layout.scale()), layout); + } + + @Override + @SuppressWarnings("unchecked") + public DoubleDataBuffer slice(long index, long size) { + return new DoubleDataBufferAdapter<>((S)buffer().slice(index * layout.scale(), size * layout.scale()), layout); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (!(obj instanceof DoubleDataBuffer)) { + return super.equals(obj); + } + DoubleDataBuffer other = (DoubleDataBuffer)obj; + if (other.size() != size()) { + return false; + } + for (long idx = 0L; idx < size(); ++idx) { + if (other.getDouble(idx) != getDouble(idx)) { + return false; + } + } + return true; + } + + DoubleDataBufferAdapter(S buffer, DoubleDataLayout layout) { + super(buffer, layout); + this.layout = layout; + } + + private DoubleDataLayout layout; +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/FloatDataBufferAdapter.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/FloatDataBufferAdapter.java new file mode 100644 index 00000000000..69928bf0ccb --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/FloatDataBufferAdapter.java @@ -0,0 +1,116 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.adapter; + +import org.tensorflow.ndarray.impl.buffer.Validator; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.FloatDataBuffer; +import org.tensorflow.ndarray.buffer.layout.FloatDataLayout; + +class FloatDataBufferAdapter> extends AbstractDataBufferAdapter + implements FloatDataBuffer { + + @Override + public float getFloat(long index) { + Validator.getArgs(this, index); + return layout.readFloat(buffer(), index * layout.scale()); + } + + @Override + public FloatDataBuffer setFloat(float value, long index) { + Validator.setArgs(this, index); + layout.writeFloat(buffer(), value, index * layout.scale()); + return this; + } + + @Override + public FloatDataBuffer read(float[] dst, int offset, int length) { + Validator.readArgs(this, dst.length, offset, length); + for (int i = 0, j = offset; i < length; ++i, ++j) { + dst[j] = layout.readFloat(buffer(), i * layout.scale()); + } + return this; + } + + @Override + public FloatDataBuffer write(float[] src, int offset, int length) { + Validator.writeArgs(this, src.length, offset, length); + for (int i = 0, j = offset; i < length; ++i, ++j) { + layout.writeFloat(buffer(), src[j], i * layout.scale()); + } + return this; + } + + @Override + public FloatDataBuffer copyTo(DataBuffer dst, long size) { + Validator.copyToArgs(this, dst, size); + if (dst instanceof FloatDataBuffer) { + FloatDataBuffer floatDst = (FloatDataBuffer)dst; + for (long idx = 0L; idx < size; ++idx) { + floatDst.setFloat(getFloat(idx), idx); + } + return this; + } + return slowCopyTo(dst, size); + } + + @Override + @SuppressWarnings("unchecked") + public FloatDataBuffer offset(long index) { + return new FloatDataBufferAdapter<>((S)buffer().offset(index * layout.scale()), layout); + } + + @Override + @SuppressWarnings("unchecked") + public FloatDataBuffer narrow(long size) { + return new FloatDataBufferAdapter<>((S)buffer().narrow(size * layout.scale()), layout); + } + + @Override + @SuppressWarnings("unchecked") + public FloatDataBuffer slice(long index, long size) { + return new FloatDataBufferAdapter<>((S)buffer().slice(index * layout.scale(), size * layout.scale()), layout); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (!(obj instanceof FloatDataBuffer)) { + return super.equals(obj); + } + FloatDataBuffer other = (FloatDataBuffer)obj; + if (other.size() != size()) { + return false; + } + for (long idx = 0L; idx < size(); ++idx) { + if (other.getFloat(idx) != getFloat(idx)) { + return false; + } + } + return true; + } + + FloatDataBufferAdapter(S buffer, FloatDataLayout layout) { + super(buffer, layout); + this.layout = layout; + } + + private FloatDataLayout layout; +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/IntDataBufferAdapter.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/IntDataBufferAdapter.java new file mode 100644 index 00000000000..052b63fe0f3 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/IntDataBufferAdapter.java @@ -0,0 +1,116 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.adapter; + +import org.tensorflow.ndarray.impl.buffer.Validator; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.IntDataBuffer; +import org.tensorflow.ndarray.buffer.layout.IntDataLayout; + +class IntDataBufferAdapter> extends AbstractDataBufferAdapter + implements IntDataBuffer { + + @Override + public int getInt(long index) { + Validator.getArgs(this, index); + return layout.readInt(buffer(), index * layout.scale()); + } + + @Override + public IntDataBuffer setInt(int value, long index) { + Validator.setArgs(this, index); + layout.writeInt(buffer(), value, index * layout.scale()); + return this; + } + + @Override + public IntDataBuffer read(int[] dst, int offset, int length) { + Validator.readArgs(this, dst.length, offset, length); + for (int i = 0, j = offset; i < length; ++i, ++j) { + dst[j] = layout.readInt(buffer(), i * layout.scale()); + } + return this; + } + + @Override + public IntDataBuffer write(int[] src, int offset, int length) { + Validator.writeArgs(this, src.length, offset, length); + for (int i = 0, j = offset; i < length; ++i, ++j) { + layout.writeInt(buffer(), src[j], i * layout.scale()); + } + return this; + } + + @Override + public IntDataBuffer copyTo(DataBuffer dst, long size) { + Validator.copyToArgs(this, dst, size); + if (dst instanceof IntDataBuffer) { + IntDataBuffer intDst = (IntDataBuffer)dst; + for (long idx = 0L; idx < size; ++idx) { + intDst.setInt(getInt(idx), idx); + } + return this; + } + return slowCopyTo(dst, size); + } + + @Override + @SuppressWarnings("unchecked") + public IntDataBuffer offset(long index) { + return new IntDataBufferAdapter<>((S)buffer().offset(index * layout.scale()), layout); + } + + @Override + @SuppressWarnings("unchecked") + public IntDataBuffer narrow(long size) { + return new IntDataBufferAdapter<>((S)buffer().narrow(size * layout.scale()), layout); + } + + @Override + @SuppressWarnings("unchecked") + public IntDataBuffer slice(long index, long size) { + return new IntDataBufferAdapter<>((S)buffer().slice(index * layout.scale(), size * layout.scale()), layout); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (!(obj instanceof IntDataBuffer)) { + return super.equals(obj); + } + IntDataBuffer other = (IntDataBuffer)obj; + if (other.size() != size()) { + return false; + } + for (long idx = 0L; idx < size(); ++idx) { + if (other.getInt(idx) != getInt(idx)) { + return false; + } + } + return true; + } + + IntDataBufferAdapter(S buffer, IntDataLayout layout) { + super(buffer, layout); + this.layout = layout; + } + + private IntDataLayout layout; +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/LongDataBufferAdapter.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/LongDataBufferAdapter.java new file mode 100644 index 00000000000..aea154d4b9f --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/LongDataBufferAdapter.java @@ -0,0 +1,116 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.adapter; + +import org.tensorflow.ndarray.impl.buffer.Validator; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.LongDataBuffer; +import org.tensorflow.ndarray.buffer.layout.LongDataLayout; + +class LongDataBufferAdapter> extends AbstractDataBufferAdapter + implements LongDataBuffer { + + @Override + public long getLong(long index) { + Validator.getArgs(this, index); + return layout.readLong(buffer(), index * layout.scale()); + } + + @Override + public LongDataBuffer setLong(long value, long index) { + Validator.setArgs(this, index); + layout.writeLong(buffer(), value, index * layout.scale()); + return this; + } + + @Override + public LongDataBuffer read(long[] dst, int offset, int length) { + Validator.readArgs(this, dst.length, offset, length); + for (int i = 0, j = offset; i < length; ++i, ++j) { + dst[j] = layout.readLong(buffer(), i * layout.scale()); + } + return this; + } + + @Override + public LongDataBuffer write(long[] src, int offset, int length) { + Validator.writeArgs(this, src.length, offset, length); + for (int i = 0, j = offset; i < length; ++i, ++j) { + layout.writeLong(buffer(), src[j], i * layout.scale()); + } + return this; + } + + @Override + public LongDataBuffer copyTo(DataBuffer dst, long size) { + Validator.copyToArgs(this, dst, size); + if (dst instanceof LongDataBuffer) { + LongDataBuffer longDst = (LongDataBuffer)dst; + for (long idx = 0L; idx < size; ++idx) { + longDst.setLong(getLong(idx), idx); + } + return this; + } + return slowCopyTo(dst, size); + } + + @Override + @SuppressWarnings("unchecked") + public LongDataBuffer offset(long index) { + return new LongDataBufferAdapter<>((S)buffer().offset(index * layout.scale()), layout); + } + + @Override + @SuppressWarnings("unchecked") + public LongDataBuffer narrow(long size) { + return new LongDataBufferAdapter<>((S)buffer().narrow(size * layout.scale()), layout); + } + + @Override + @SuppressWarnings("unchecked") + public LongDataBuffer slice(long index, long size) { + return new LongDataBufferAdapter<>((S)buffer().slice(index * layout.scale(), size * layout.scale()), layout); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (!(obj instanceof LongDataBuffer)) { + return super.equals(obj); + } + LongDataBuffer other = (LongDataBuffer)obj; + if (other.size() != size()) { + return false; + } + for (long idx = 0L; idx < size(); ++idx) { + if (other.getLong(idx) != getLong(idx)) { + return false; + } + } + return true; + } + + LongDataBufferAdapter(S buffer, LongDataLayout layout) { + super(buffer, layout); + this.layout = layout; + } + + private LongDataLayout layout; +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/ShortDataBufferAdapter.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/ShortDataBufferAdapter.java new file mode 100644 index 00000000000..6b6b1bb24b7 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/ShortDataBufferAdapter.java @@ -0,0 +1,116 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.adapter; + +import org.tensorflow.ndarray.impl.buffer.Validator; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.ShortDataBuffer; +import org.tensorflow.ndarray.buffer.layout.ShortDataLayout; + +class ShortDataBufferAdapter> extends AbstractDataBufferAdapter + implements ShortDataBuffer { + + @Override + public short getShort(long index) { + Validator.getArgs(this, index); + return layout.readShort(buffer(), index * layout.scale()); + } + + @Override + public ShortDataBuffer setShort(short value, long index) { + Validator.setArgs(this, index); + layout.writeShort(buffer(), value, index * layout.scale()); + return this; + } + + @Override + public ShortDataBuffer read(short[] dst, int offset, int length) { + Validator.readArgs(this, dst.length, offset, length); + for (int i = 0, j = offset; i < length; ++i, ++j) { + dst[j] = layout.readShort(buffer(), i * layout.scale()); + } + return this; + } + + @Override + public ShortDataBuffer write(short[] src, int offset, int length) { + Validator.writeArgs(this, src.length, offset, length); + for (int i = 0, j = offset; i < length; ++i, ++j) { + layout.writeShort(buffer(), src[j], i * layout.scale()); + } + return this; + } + + @Override + public ShortDataBuffer copyTo(DataBuffer dst, long size) { + Validator.copyToArgs(this, dst, size); + if (dst instanceof ShortDataBuffer) { + ShortDataBuffer shortDst = (ShortDataBuffer)dst; + for (long idx = 0L; idx < size; ++idx) { + shortDst.setShort(getShort(idx), idx); + } + return this; + } + return slowCopyTo(dst, size); + } + + @Override + @SuppressWarnings("unchecked") + public ShortDataBuffer offset(long index) { + return new ShortDataBufferAdapter<>((S)buffer().offset(index * layout.scale()), layout); + } + + @Override + @SuppressWarnings("unchecked") + public ShortDataBuffer narrow(long size) { + return new ShortDataBufferAdapter<>((S)buffer().narrow(size * layout.scale()), layout); + } + + @Override + @SuppressWarnings("unchecked") + public ShortDataBuffer slice(long index, long size) { + return new ShortDataBufferAdapter<>((S)buffer().slice(index * layout.scale(), size * layout.scale()), layout); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (!(obj instanceof ShortDataBuffer)) { + return super.equals(obj); + } + ShortDataBuffer other = (ShortDataBuffer)obj; + if (other.size() != size()) { + return false; + } + for (long idx = 0L; idx < size(); ++idx) { + if (other.getShort(idx) != getShort(idx)) { + return false; + } + } + return true; + } + + ShortDataBufferAdapter(S buffer, ShortDataLayout layout) { + super(buffer, layout); + this.layout = layout; + } + + private ShortDataLayout layout; +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/Bfloat16Layout.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/Bfloat16Layout.java new file mode 100644 index 00000000000..3f8171088cb --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/Bfloat16Layout.java @@ -0,0 +1,54 @@ +/* + * Copyright 2020 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.layout; + +import org.tensorflow.ndarray.buffer.ShortDataBuffer; +import org.tensorflow.ndarray.buffer.layout.FloatDataLayout; + +/** + * Data layout that converts 32-bit floats from/to 16-bit, truncating their mantissa to 7 bits but + * preserving the 8-bit exponent with the same bias. + */ +public final class Bfloat16Layout implements FloatDataLayout { + + @Override + public void writeFloat(ShortDataBuffer buffer, float value, long index) { + buffer.setShort(float32to16(value), index); + } + + @Override + public float readFloat(ShortDataBuffer buffer, long index) { + return float16to32(buffer.getShort(index)); + } + + // + // FLOAT 32-bit to/from BFLOAT 16-bit conversions + // + // We simply shift the value from 32-bit to 16-bit and vice-versa. NaN special case is ignored. + // + + // VisibleForTesting + static short float32to16(float f32) { + return (short)(Float.floatToIntBits(f32) >>> 16); + } + + // Visible for testing + static float float16to32(short i16) { + return Float.intBitsToFloat((int)i16 << 16); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/BoolLayout.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/BoolLayout.java new file mode 100644 index 00000000000..0358d60d662 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/BoolLayout.java @@ -0,0 +1,47 @@ +/* + * Copyright 2020 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.layout; + +import org.tensorflow.ndarray.buffer.ByteDataBuffer; +import org.tensorflow.ndarray.buffer.layout.BooleanDataLayout; + +/** + * Data layout that converts booleans from/to bytes. + */ +public final class BoolLayout implements BooleanDataLayout { + + @Override + public void writeBoolean(ByteDataBuffer buffer, boolean value, long index) { + buffer.setByte(booleanToByte(value), index); + } + + @Override + public boolean readBoolean(ByteDataBuffer buffer, long index) { + return byteToBoolean(buffer.getByte(index)); + } + + // Visible for testing + static byte booleanToByte(boolean b) { + return (byte)(b ? 0x1 : 0x0); + } + + // Visible for testing + static boolean byteToBoolean(byte b) { + return b != 0x0; + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/Float16Layout.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/Float16Layout.java new file mode 100644 index 00000000000..b19744bbd13 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/Float16Layout.java @@ -0,0 +1,119 @@ +/* + * Copyright 2020 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.layout; + +import org.tensorflow.ndarray.buffer.ShortDataBuffer; +import org.tensorflow.ndarray.buffer.layout.FloatDataLayout; + +/** + * Data layout that converts 32-bit floats from/to 16-bit, accordingly to the IEEE-754 half-precision + * floating point specification. + */ +public final class Float16Layout implements FloatDataLayout { + + @Override + public void writeFloat(ShortDataBuffer buffer, float value, long index) { + buffer.setShort(float32to16(value), index); + } + + @Override + public float readFloat(ShortDataBuffer buffer, long index) { + return float16to32(buffer.getShort(index)); + } + + // + // FLOAT 32-bit to/from 16-bit conversions + // + // The following conversion algorithms are issued from the C++ implementation found in the + // Eigen library used by TensorFlow native library. + // See https://eigen.tuxfamily.org/dox-devel/Half_8h_source.html for more details. + // + + // VisibleForTesting + static short float32to16(float f32) { + int i16; + int i32 = Float.floatToIntBits(f32); + short sign16 = (short) ((i32 >>> 16) & 0x8000); + i32 &= 0x7FFFFFFF; // remove sign + + if (i32 >= (E32BIAS + E16MAX + 1) << E32SHIFT) { + // float32 value is higher than float16 max value (max16 -> 2^15 * 2 -> 2^16) + // - if float32 value is higher than infinite (i.e. s32 > 0), then it is NaN and should also + // be NaN in float16 (0x7e00) + // - else, float16 value is forced to infinite (0x7c00) + i16 = i32 > E32MASK ? 0x7E00 : 0x7C00; + + } else if (i32 < (E32BIAS + E16MIN) << E32SHIFT){ + // float32 abs value is smaller than float16 min abs value (min16 = 2^-14), could also be 0 + // - apply magic number to align significand 10 bits at the bottom on the float and subtract bias + i16 = Float.floatToIntBits(Float.intBitsToFloat(i32) + MAGIC_32_16_FLOAT) - MAGIC_32_16; + + } else { + // float32 value can be rounded up to a normalized float16 value (i.e. exp32 = [113(-14), 142(15)]) + // - rebase exponent to float16 + // - round up significand to the 13nd bit if s16 is even, on the 12nd bit if it is odd + int round = 0xFFF + ((i32 >>> 13) & 0x1); + i16 = (i32 + ((E16BIAS - E32BIAS) << E32SHIFT) + round) >>> 13; + } + return (short)(i16 | sign16); + } + + // Visible for testing + static float float16to32(short i16) { + int i32 = (i16 & 0x7FFF) << (S32BITS - S16BITS); // remove sign and align in float32 + i32 += (E32BIAS - E16BIAS) << E32SHIFT; // rebase exponent to float32 + + // Handle float16 exponent special cases + switch (i16 & E16MASK) { + case E16MASK: + // float16 value is infinite or NaN + // - adjust float32 exponent one more time + i32 += (E32BIAS - E16BIAS) << E32SHIFT; + break; + case 0x0: + // float16 value is zero or subnormal + // - adjust float32 exponent + // - renormalize using magic number + i32 = Float.floatToIntBits(Float.intBitsToFloat(i32 + (1 << E32SHIFT)) - MAGIC_16_32_FLOAT); + break; + default: + break; + } + return Float.intBitsToFloat(i32 | ((i16 & 0x8000) << 16)); // reapply sign + } + + // float32 format + private static final int E32SHIFT = 23; // position of the exponent in float32 + private static final int E32MASK = 0xFF << E32SHIFT; // mask for float32 exponent (== Infinity) + private static final int E32BIAS = 127; // exponent bias for float32 + private static final int S32BITS = 23; // number of bits in float32 significand + + // float16 format + private static final int E16SHIFT = 10; // position of the exponent in float16 + private static final int E16MASK = 0x1F << E16SHIFT; // mask for float16 exponent (== Infinity) + private static final int E16BIAS = 15; // exponent bias for float16 + private static final int E16MAX = 15; // max value for float16 exponent + private static final int E16MIN = -14; // min value for float16 exponent + private static final int S16BITS = 10; // number of bits in float16 significand + + // magic numbers used when converting denormalized values + private static final int MAGIC_32_16 = ((E32BIAS - E16BIAS) + (S32BITS - S16BITS) + 1) << E32SHIFT; + private static final float MAGIC_32_16_FLOAT = Float.intBitsToFloat(MAGIC_32_16); + private static final int MAGIC_16_32 = (E32BIAS - E16BIAS + 1) << E32SHIFT; + private static final float MAGIC_16_32_FLOAT = Float.intBitsToFloat(MAGIC_16_32); +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/StringLayout.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/StringLayout.java new file mode 100644 index 00000000000..51576c0100b --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/StringLayout.java @@ -0,0 +1,48 @@ +/* + * Copyright 2020 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.layout; + +import java.nio.charset.Charset; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.layout.DataLayout; + +/** + * Data layout that converts a String to/from a sequence of bytes applying a given charset. + */ +public final class StringLayout implements DataLayout, String> { + + public static StringLayout of(Charset charset) { + return new StringLayout(charset); + } + + @Override + public void writeObject(DataBuffer buffer, String value, long index) { + buffer.setObject(value.getBytes(charset), index); + } + + @Override + public String readObject(DataBuffer buffer, long index) { + return new String(buffer.getObject(index), charset); + } + + private StringLayout(Charset charset) { + this.charset = charset; + } + + private final Charset charset; +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/ArrayDataBuffer.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/ArrayDataBuffer.java new file mode 100644 index 00000000000..676e291357a --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/ArrayDataBuffer.java @@ -0,0 +1,126 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.buffer.misc; + +import java.util.Arrays; +import org.tensorflow.ndarray.impl.buffer.AbstractDataBuffer; +import org.tensorflow.ndarray.impl.buffer.Validator; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataStorageVisitor; + +class ArrayDataBuffer extends AbstractDataBuffer { + + @Override + public long size() { + return length; + } + + @Override + public boolean isReadOnly() { + return readOnly; + } + + @Override + public T getObject(long index) { + Validator.getArgs(this, index); + return values[(int)index + offset]; + } + + @Override + public DataBuffer setObject(T value, long index) { + Validator.setArgs(this, index); + values[(int)index + offset] = value; + return this; + } + + @Override + public DataBuffer copyTo(DataBuffer dst, long size) { + Validator.copyToArgs(this, dst, size); + return dst.accept(new DataStorageVisitor>() { + + @Override + public DataBuffer visit(Object[] array, int arrayOffset, int arrayLength) { + System.arraycopy(values, offset, array, arrayOffset, (int)size); + return ArrayDataBuffer.this; + } + + @Override + public DataBuffer fallback() { + for (int idx = 0; idx < size; ++idx) { + dst.setObject(values[idx + offset], idx); + } + return ArrayDataBuffer.this; + } + }); + } + + @Override + public DataBuffer slice(long index, long size) { + Validator.sliceArgs(this, index, size); + return new ArrayDataBuffer<>(values, readOnly, offset + (int)index, (int)size); + } + + @Override + public R accept(DataStorageVisitor visitor) { + return visitor.visit(values, offset, length); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (!(obj instanceof DataBuffer)) { + return false; + } + DataBuffer other = (DataBuffer)obj; + if (size() != other.size()) { + return false; + } + return other.accept(new DataStorageVisitor() { + + @Override + public Boolean visit(Object[] array, int arrayOffset, int arrayLength) { + if (offset == 0 && values.length == length && arrayOffset == 0 && array.length == arrayLength) { + return Arrays.deepEquals(array, values); + } + return slowEquals(other); + } + + @Override + public Boolean fallback() { + return slowEquals(other); + } + }); + } + + ArrayDataBuffer(T[] values, boolean readOnly) { + this(values, readOnly, 0, values.length); + } + + private ArrayDataBuffer(T[] values, boolean readOnly, int offset, int length) { + this.values = values; + this.readOnly = readOnly; + this.offset = offset; + this.length = length; + } + + private final T[] values; + private final boolean readOnly; + private final int offset; + private final int length; +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BitSetDataBuffer.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BitSetDataBuffer.java new file mode 100644 index 00000000000..5b5ec15294b --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BitSetDataBuffer.java @@ -0,0 +1,183 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.misc; + +import java.util.BitSet; +import org.tensorflow.ndarray.impl.buffer.AbstractDataBuffer; +import org.tensorflow.ndarray.impl.buffer.Validator; +import org.tensorflow.ndarray.buffer.BooleanDataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataStorageVisitor; + +class BitSetDataBuffer extends AbstractDataBuffer implements BooleanDataBuffer { + + @Override + public long size() { + return numBits; + } + + @Override + public boolean isReadOnly() { + return readOnly; + } + + @Override + public boolean getBoolean(long index) { + Validator.getArgs(this, index); + return bitSet.get((int)index + offset); + } + + @Override + public BooleanDataBuffer setBoolean(boolean value, long index) { + Validator.setArgs(this, index); + bitSet.set((int)index + offset, value); + return this; + } + + @Override + public BooleanDataBuffer read(boolean[] dst, int offset, int length) { + Validator.readArgs(this, dst.length, offset, length); + for (int i = this.offset, j = offset; i < this.offset + length; ++i, ++j) { + dst[j] = bitSet.get(i); + } + return this; + } + + @Override + public BooleanDataBuffer write(boolean[] src, int offset, int length) { + Validator.readArgs(this, src.length, offset, length); + for (int i = this.offset, j = offset; i < this.offset + length; ++i, ++j) { + bitSet.set(i, src[j]); + } + return this; + } + + @Override + public BooleanDataBuffer copyTo(DataBuffer dst, long size) { + Validator.copyToArgs(this, dst, size); + return dst.accept(new DataStorageVisitor() { + + @Override + public BooleanDataBuffer visit(boolean[] array, int arrayOffset, int arrayLength) { + for (int idx = 0; idx < size; ++idx) { + array[idx + arrayOffset] = bitSet.get(idx + offset); + } + return BitSetDataBuffer.this; + } + + @Override + public BooleanDataBuffer visit(BitSet dstBitSet, int dstOffset, long numBits) { + for (int idx = 0; idx < size; ++idx) { + dstBitSet.set(idx + dstOffset, bitSet.get(idx + offset)); + } + return BitSetDataBuffer.this; + } + + @Override + public BooleanDataBuffer fallback() { + if (dst instanceof BooleanDataBuffer) { + BooleanDataBuffer booleanDst = (BooleanDataBuffer)dst; + for (int idx = 0; idx < size; ++idx) { + booleanDst.setBoolean(bitSet.get(idx + offset), idx); + } + } else { + for (int idx = 0; idx < size; ++idx) { + dst.setObject(bitSet.get(idx + offset), idx); + } + } + return BitSetDataBuffer.this; + } + }); + } + + @Override + public BooleanDataBuffer slice(long index, long size) { + Validator.sliceArgs(this, index, size); + return new BitSetDataBuffer(bitSet, size, readOnly, offset + (int)index); + } + + @Override + public R accept(DataStorageVisitor visitor) { + return visitor.visit(bitSet, offset, numBits); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (!(obj instanceof BooleanDataBuffer)) { + return super.equals(obj); + } + BooleanDataBuffer other = (BooleanDataBuffer)obj; + if (size() != other.size()) { + return false; + } + return other.accept(new DataStorageVisitor() { + + @Override + public Boolean visit(boolean[] array, int arrayOffset, int length) { + for (int idx = 0; idx < size(); ++idx) { + if (array[idx + arrayOffset] != bitSet.get(idx + offset)) { + return false; + } + } + return true; + } + + @Override + public Boolean visit(BitSet otherBitSet, int otherOffset, long otherNumBits) { + if (offset == 0 && otherOffset == 0 && numBits == otherNumBits) { + return bitSet.equals(otherBitSet); + } + for (int idx = 0; idx < size(); ++idx) { + if (otherBitSet.get(idx + otherOffset) != bitSet.get(idx + offset)) { + return false; + } + } + return true; + } + + @Override + public Boolean fallback() { + for (int idx = 0; idx < size(); ++idx) { + if (other.getBoolean(idx) != bitSet.get(idx + offset)) { + return false; + } + } + return true; + } + }); + } + + BitSetDataBuffer(BitSet bitSet, long numBits, boolean readOnly) { + this(bitSet, numBits, readOnly, 0); + } + + private BitSetDataBuffer(BitSet bitSet, long numBits, boolean readOnly, int offset) { + this.bitSet = bitSet; + this.numBits = numBits; + this.readOnly = readOnly; + this.offset = offset; + } + + private final BitSet bitSet; + private final long numBits; + private final boolean readOnly; + private final int offset; +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BooleanArrayDataBuffer.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BooleanArrayDataBuffer.java new file mode 100644 index 00000000000..f8d033519ec --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BooleanArrayDataBuffer.java @@ -0,0 +1,176 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.buffer.misc; + +import java.util.Arrays; +import java.util.BitSet; +import org.tensorflow.ndarray.impl.buffer.AbstractDataBuffer; +import org.tensorflow.ndarray.impl.buffer.Validator; +import org.tensorflow.ndarray.buffer.BooleanDataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataStorageVisitor; + +class BooleanArrayDataBuffer extends AbstractDataBuffer implements + BooleanDataBuffer { + + @Override + public long size() { + return length; + } + + @Override + public boolean isReadOnly() { + return readOnly; + } + + @Override + public boolean getBoolean(long index) { + Validator.getArgs(this, index); + return values[(int)index + offset]; + } + + @Override + public BooleanDataBuffer setBoolean(boolean value, long index) { + Validator.setArgs(this, index); + values[(int)index + offset] = value; + return this; + } + + @Override + public BooleanDataBuffer read(boolean[] dst, int offset, int length) { + System.arraycopy(values, this.offset, dst, offset, length); + return this; + } + + @Override + public BooleanDataBuffer write(boolean[] src, int offset, int length) { + System.arraycopy(src, offset, values, this.offset, length); + return null; + } + + @Override + public BooleanDataBuffer copyTo(DataBuffer dst, long size) { + Validator.copyToArgs(this, dst, size); + return dst.accept(new DataStorageVisitor() { + + @Override + public BooleanDataBuffer visit(boolean[] array, int arrayOffset, int arrayLength) { + System.arraycopy(values, offset, array, arrayOffset, (int)size); + return BooleanArrayDataBuffer.this; + } + + @Override + public BooleanDataBuffer visit(BitSet bitSet, int bitSetOffset, long numBits) { + for (int idx = 0; idx < size; ++idx) { + bitSet.set(idx + bitSetOffset, values[idx + offset]); + } + return BooleanArrayDataBuffer.this; + } + + @Override + public BooleanDataBuffer fallback() { + if (dst instanceof BooleanDataBuffer) { + BooleanDataBuffer booleanDst = (BooleanDataBuffer)dst; + for (int idx = 0; idx < size; ++idx) { + booleanDst.setBoolean(values[idx + offset], idx); + } + } else { + for (int idx = 0; idx < size; ++idx) { + dst.setObject(values[idx + offset], idx); + } + } + return BooleanArrayDataBuffer.this; + } + }); + } + + @Override + public BooleanDataBuffer slice(long index, long size) { + Validator.sliceArgs(this, index, size); + return new BooleanArrayDataBuffer(values, readOnly, offset + (int)index, (int)size); + } + + @Override + public R accept(DataStorageVisitor visitor) { + return visitor.visit(values, offset, length); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (!(obj instanceof BooleanDataBuffer)) { + return super.equals(obj); + } + BooleanDataBuffer other = (BooleanDataBuffer)obj; + if (size() != other.size()) { + return false; + } + return other.accept(new DataStorageVisitor() { + + @Override + public Boolean visit(boolean[] array, int arrayOffset, int arrayLength) { + if (offset == 0 && values.length == length && arrayOffset == 0 && array.length == arrayLength) { + return Arrays.equals(array, values); + } + for (int idx = 0; idx < size(); ++idx) { + if (array[idx + arrayOffset] != values[idx + offset]) { + return false; + } + } + return true; + } + + @Override + public Boolean visit(BitSet bitSet, int bitSetOffset, long numBits) { + for (int idx = 0; idx < size(); ++idx) { + if (bitSet.get(idx + bitSetOffset) != values[idx + offset]) { + return false; + } + } + return true; + } + + @Override + public Boolean fallback() { + for (int idx = 0; idx < size(); ++idx) { + if (other.getBoolean(idx) != values[idx + offset]) { + return false; + } + } + return true; + } + }); + } + + BooleanArrayDataBuffer(boolean[] values, boolean readOnly) { + this(values, readOnly, 0, values.length); + } + + private BooleanArrayDataBuffer(boolean[] values, boolean readOnly, int offset, int length) { + this.values = values; + this.readOnly = readOnly; + this.offset = offset; + this.length = length; + } + + private final boolean[] values; + private final boolean readOnly; + private final int offset; + private final int length; +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/MiscDataBufferFactory.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/MiscDataBufferFactory.java new file mode 100644 index 00000000000..84cfce6bc66 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/MiscDataBufferFactory.java @@ -0,0 +1,40 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.misc; + +import java.util.BitSet; +import org.tensorflow.ndarray.buffer.BooleanDataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffer; + +/** + * Factory of miscellaneous data buffers + */ +public class MiscDataBufferFactory { + + public static BooleanDataBuffer create(BitSet bitSet, long numBits, boolean readOnly) { + return new BitSetDataBuffer(bitSet, numBits, readOnly); + } + + public static BooleanDataBuffer create(boolean[] array, boolean readOnly) { + return new BooleanArrayDataBuffer(array, readOnly); + } + + public static DataBuffer create(T[] array, boolean readOnly) { + return new ArrayDataBuffer<>(array, readOnly); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/AbstractNioDataBuffer.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/AbstractNioDataBuffer.java new file mode 100644 index 00000000000..82bc981ad46 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/AbstractNioDataBuffer.java @@ -0,0 +1,41 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.nio; + +import java.nio.Buffer; +import org.tensorflow.ndarray.impl.buffer.AbstractDataBuffer; + +/** + * Base class for all JDK-based data buffers. + * + * @param type of elements (or values) stored in this buffer + */ +abstract class AbstractNioDataBuffer extends AbstractDataBuffer { + + @Override + public long size() { + return buf().capacity(); + } + + @Override + public boolean isReadOnly() { + return buf().isReadOnly(); + } + + abstract Buffer buf(); +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/ByteNioDataBuffer.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/ByteNioDataBuffer.java new file mode 100644 index 00000000000..5ede97cef78 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/ByteNioDataBuffer.java @@ -0,0 +1,185 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.nio; + +import java.nio.ByteBuffer; +import org.tensorflow.ndarray.impl.buffer.Validator; +import org.tensorflow.ndarray.impl.buffer.adapter.DataBufferAdapterFactory; +import org.tensorflow.ndarray.buffer.BooleanDataBuffer; +import org.tensorflow.ndarray.buffer.ByteDataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataStorageVisitor; +import org.tensorflow.ndarray.buffer.DoubleDataBuffer; +import org.tensorflow.ndarray.buffer.FloatDataBuffer; +import org.tensorflow.ndarray.buffer.IntDataBuffer; +import org.tensorflow.ndarray.buffer.LongDataBuffer; +import org.tensorflow.ndarray.buffer.ShortDataBuffer; +import org.tensorflow.ndarray.buffer.layout.DataLayouts; + +/** + * A buffer of bytes using a JDK {@link ByteBuffer} for storage. + */ +final class ByteNioDataBuffer extends AbstractNioDataBuffer + implements ByteDataBuffer { + + @Override + public byte getByte(long index) { + return buf.get((int)index); + } + + @Override + public ByteDataBuffer setByte(byte value, long index) { + buf.put((int)index, value); + return this; + } + + @Override + public ByteDataBuffer read(byte[] dst, int offset, int length) { + buf.duplicate().get(dst, offset, length); + return this; + } + + @Override + public ByteDataBuffer write(byte[] src, int offset, int length) { + buf.duplicate().put(src, offset, length); + return this; + } + + @Override + public ByteDataBuffer copyTo(DataBuffer dst, long size) { + Validator.copyToArgs(this, dst, size); + return dst.accept(new DataStorageVisitor() { + + @Override + public ByteDataBuffer visit(ByteBuffer buffer) { + buffer.duplicate().put((ByteBuffer)buf.duplicate().limit((int)size)); + return ByteNioDataBuffer.this; + } + + @Override + public ByteDataBuffer fallback() { + if (dst instanceof ByteDataBuffer) { + ByteDataBuffer byteDst = (ByteDataBuffer)dst; + for (long idx = 0L; idx < size; ++idx) { + byteDst.setByte(getByte(idx), idx); + } + return ByteNioDataBuffer.this; + } + return slowCopyTo(dst, size); + } + }); + } + + @Override + public IntDataBuffer asInts() { + return new IntNioDataBuffer(buf.asIntBuffer()); + } + + @Override + public ShortDataBuffer asShorts() { + return new ShortNioDataBuffer(buf.asShortBuffer()); + } + + @Override + public LongDataBuffer asLongs() { + return new LongNioDataBuffer(buf.asLongBuffer()); + } + + @Override + public FloatDataBuffer asFloats() { + return new FloatNioDataBuffer(buf.asFloatBuffer()); + } + + @Override + public DoubleDataBuffer asDoubles() { + return new DoubleNioDataBuffer(buf.asDoubleBuffer()); + } + + @Override + public BooleanDataBuffer asBooleans() { + return DataBufferAdapterFactory.create(this, DataLayouts.BOOL); + } + + @Override + public ByteDataBuffer offset(long index) { + Validator.offsetArgs(this, index); + return new ByteNioDataBuffer(((ByteBuffer)buf.duplicate().position((int)index)).slice()); + } + + @Override + public ByteDataBuffer narrow(long size) { + Validator.narrowArgs(this, size); + return new ByteNioDataBuffer(((ByteBuffer)buf.duplicate().limit((int)size)).slice()); + } + + @Override + public ByteDataBuffer slice(long index, long size) { + Validator.sliceArgs(this, index, size); + ByteBuffer sliceBuf = buf.duplicate(); + sliceBuf.position((int)index); + sliceBuf.limit((int)index + (int)size); + return new ByteNioDataBuffer(sliceBuf.slice()); + } + + @Override + public R accept(DataStorageVisitor visitor) { + return visitor.visit(buf); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (!(obj instanceof ByteDataBuffer)) { + return super.equals(obj); + } + ByteDataBuffer other = (ByteDataBuffer)obj; + if (size() != other.size()) { + return false; + } + return other.accept(new DataStorageVisitor() { + + @Override + public Boolean visit(ByteBuffer buffer) { + return buf.equals(buffer); + } + + @Override + public Boolean fallback() { + for (int idx = 0; idx < size(); ++idx) { + if (other.getByte(idx) != getByte(idx)) { + return false; + } + } + return true; + } + }); + } + + @Override + ByteBuffer buf() { + return buf; + } + + ByteNioDataBuffer(ByteBuffer buf) { + this.buf = buf; + } + + private ByteBuffer buf; +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/DoubleNioDataBuffer.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/DoubleNioDataBuffer.java new file mode 100644 index 00000000000..bddc5db1e3f --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/DoubleNioDataBuffer.java @@ -0,0 +1,147 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.nio; + +import java.nio.DoubleBuffer; +import org.tensorflow.ndarray.impl.buffer.Validator; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataStorageVisitor; +import org.tensorflow.ndarray.buffer.DoubleDataBuffer; + +/** + * A buffer of bytes using a JDK {@link DoubleBuffer} for storage. + */ +final class DoubleNioDataBuffer extends AbstractNioDataBuffer + implements DoubleDataBuffer { + + @Override + public double getDouble(long index) { + return buf.get((int)index); + } + + @Override + public DoubleDataBuffer setDouble(double value, long index) { + buf.put((int)index, value); + return this; + } + + @Override + public DoubleDataBuffer read(double[] dst, int offset, int length) { + buf.duplicate().get(dst, offset, length); + return this; + } + + @Override + public DoubleDataBuffer write(double[] src, int offset, int length) { + buf.duplicate().put(src, offset, length); + return this; + } + + @Override + public DoubleDataBuffer copyTo(DataBuffer dst, long size) { + Validator.copyToArgs(this, dst, size); + return dst.accept(new DataStorageVisitor() { + + @Override + public DoubleDataBuffer visit(DoubleBuffer buffer) { + buffer.duplicate().put((DoubleBuffer)buf.duplicate().limit((int)size)); + return DoubleNioDataBuffer.this; + } + + @Override + public DoubleDataBuffer fallback() { + if (dst instanceof DoubleDataBuffer) { + DoubleDataBuffer doubleDst = (DoubleDataBuffer)dst; + for (long idx = 0L; idx < size; ++idx) { + doubleDst.setDouble(getDouble(idx), idx); + } + return DoubleNioDataBuffer.this; + } + return slowCopyTo(dst, size); + } + }); + } + + @Override + public DoubleDataBuffer offset(long index) { + Validator.offsetArgs(this, index); + return new DoubleNioDataBuffer(((DoubleBuffer)buf.duplicate().position((int)index)).slice()); + } + + @Override + public DoubleDataBuffer narrow(long size) { + Validator.narrowArgs(this, size); + return new DoubleNioDataBuffer(((DoubleBuffer)buf.duplicate().limit((int)size)).slice()); + } + + @Override + public DoubleDataBuffer slice(long index, long size) { + Validator.sliceArgs(this, index, size); + DoubleBuffer sliceBuf = buf.duplicate(); + sliceBuf.position((int)index); + sliceBuf.limit((int)index + (int)size); + return new DoubleNioDataBuffer(sliceBuf.slice()); + } + + @Override + public R accept(DataStorageVisitor visitor) { + return visitor.visit(buf); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (!(obj instanceof DoubleDataBuffer)) { + return super.equals(obj); + } + DoubleDataBuffer other = (DoubleDataBuffer)obj; + if (size() != other.size()) { + return false; + } + return other.accept(new DataStorageVisitor() { + + @Override + public Boolean visit(DoubleBuffer buffer) { + return buf.equals(buffer); + } + + @Override + public Boolean fallback() { + for (int idx = 0; idx < size(); ++idx) { + if (other.getDouble(idx) != getDouble(idx)) { + return false; + } + } + return true; + } + }); + } + + @Override + DoubleBuffer buf() { + return buf; + } + + DoubleNioDataBuffer(DoubleBuffer buf) { + this.buf = buf; + } + + private DoubleBuffer buf; +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/FloatNioDataBuffer.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/FloatNioDataBuffer.java new file mode 100644 index 00000000000..06a9a31b56a --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/FloatNioDataBuffer.java @@ -0,0 +1,147 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.nio; + +import java.nio.FloatBuffer; +import org.tensorflow.ndarray.impl.buffer.Validator; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataStorageVisitor; +import org.tensorflow.ndarray.buffer.FloatDataBuffer; + +/** + * A buffer of bytes using a JDK {@link FloatBuffer} for storage. + */ +final class FloatNioDataBuffer extends AbstractNioDataBuffer + implements FloatDataBuffer { + + @Override + public float getFloat(long index) { + return buf.get((int)index); + } + + @Override + public FloatDataBuffer setFloat(float value, long index) { + buf.put((int)index, value); + return this; + } + + @Override + public FloatDataBuffer read(float[] dst, int offset, int length) { + buf.duplicate().get(dst, offset, length); + return this; + } + + @Override + public FloatDataBuffer write(float[] src, int offset, int length) { + buf.duplicate().put(src, offset, length); + return this; + } + + @Override + public FloatDataBuffer copyTo(DataBuffer dst, long size) { + Validator.copyToArgs(this, dst, size); + return dst.accept(new DataStorageVisitor() { + + @Override + public FloatDataBuffer visit(FloatBuffer buffer) { + buffer.duplicate().put((FloatBuffer)buf.duplicate().limit((int)size)); + return FloatNioDataBuffer.this; + } + + @Override + public FloatDataBuffer fallback() { + if (dst instanceof FloatDataBuffer) { + FloatDataBuffer floatDst = (FloatDataBuffer)dst; + for (long idx = 0L; idx < size; ++idx) { + floatDst.setFloat(getFloat(idx), idx); + } + return FloatNioDataBuffer.this; + } + return slowCopyTo(dst, size); + } + }); + } + + @Override + public FloatDataBuffer offset(long index) { + Validator.offsetArgs(this, index); + return new FloatNioDataBuffer(((FloatBuffer)buf.duplicate().position((int)index)).slice()); + } + + @Override + public FloatDataBuffer narrow(long size) { + Validator.narrowArgs(this, size); + return new FloatNioDataBuffer(((FloatBuffer)buf.duplicate().limit((int)size)).slice()); + } + + @Override + public FloatDataBuffer slice(long index, long size) { + Validator.sliceArgs(this, index, size); + FloatBuffer sliceBuf = buf.duplicate(); + sliceBuf.position((int)index); + sliceBuf.limit((int)index + (int)size); + return new FloatNioDataBuffer(sliceBuf.slice()); + } + + @Override + public R accept(DataStorageVisitor visitor) { + return visitor.visit(buf); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (!(obj instanceof FloatDataBuffer)) { + return super.equals(obj); + } + FloatDataBuffer other = (FloatDataBuffer)obj; + if (size() != other.size()) { + return false; + } + return other.accept(new DataStorageVisitor() { + + @Override + public Boolean visit(FloatBuffer buffer) { + return buf.equals(buffer); + } + + @Override + public Boolean fallback() { + for (int idx = 0; idx < size(); ++idx) { + if (other.getFloat(idx) != getFloat(idx)) { + return false; + } + } + return true; + } + }); + } + + @Override + FloatBuffer buf() { + return buf; + } + + FloatNioDataBuffer(FloatBuffer buf) { + this.buf = buf; + } + + private FloatBuffer buf; +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/IntNioDataBuffer.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/IntNioDataBuffer.java new file mode 100644 index 00000000000..cea729e86a7 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/IntNioDataBuffer.java @@ -0,0 +1,147 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.nio; + +import java.nio.IntBuffer; +import org.tensorflow.ndarray.impl.buffer.Validator; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataStorageVisitor; +import org.tensorflow.ndarray.buffer.IntDataBuffer; + +/** + * A buffer of bytes using a JDK {@link IntBuffer} for storage. + */ +final class IntNioDataBuffer extends AbstractNioDataBuffer + implements IntDataBuffer { + + @Override + public int getInt(long index) { + return buf.get((int)index); + } + + @Override + public IntDataBuffer setInt(int value, long index) { + buf.put((int)index, value); + return this; + } + + @Override + public IntDataBuffer read(int[] dst, int offset, int length) { + buf.duplicate().get(dst, offset, length); + return this; + } + + @Override + public IntDataBuffer write(int[] src, int offset, int length) { + buf.duplicate().put(src, offset, length); + return this; + } + + @Override + public IntDataBuffer copyTo(DataBuffer dst, long size) { + Validator.copyToArgs(this, dst, size); + return dst.accept(new DataStorageVisitor() { + + @Override + public IntDataBuffer visit(IntBuffer buffer) { + buffer.duplicate().put((IntBuffer)buf.duplicate().limit((int)size)); + return IntNioDataBuffer.this; + } + + @Override + public IntDataBuffer fallback() { + if (dst instanceof IntDataBuffer) { + IntDataBuffer intDst = (IntDataBuffer)dst; + for (long idx = 0L; idx < size; ++idx) { + intDst.setInt(getInt(idx), idx); + } + return IntNioDataBuffer.this; + } + return slowCopyTo(dst, size); + } + }); + } + + @Override + public IntDataBuffer offset(long index) { + Validator.offsetArgs(this, index); + return new IntNioDataBuffer(((IntBuffer)buf.duplicate().position((int)index)).slice()); + } + + @Override + public IntDataBuffer narrow(long size) { + Validator.narrowArgs(this, size); + return new IntNioDataBuffer(((IntBuffer)buf.duplicate().limit((int)size)).slice()); + } + + @Override + public IntDataBuffer slice(long index, long size) { + Validator.sliceArgs(this, index, size); + IntBuffer sliceBuf = buf.duplicate(); + sliceBuf.position((int)index); + sliceBuf.limit((int)index + (int)size); + return new IntNioDataBuffer(sliceBuf.slice()); + } + + @Override + public R accept(DataStorageVisitor visitor) { + return visitor.visit(buf); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (!(obj instanceof IntDataBuffer)) { + return super.equals(obj); + } + IntDataBuffer other = (IntDataBuffer)obj; + if (size() != other.size()) { + return false; + } + return other.accept(new DataStorageVisitor() { + + @Override + public Boolean visit(IntBuffer buffer) { + return buf.equals(buffer); + } + + @Override + public Boolean fallback() { + for (int idx = 0; idx < size(); ++idx) { + if (other.getInt(idx) != getInt(idx)) { + return false; + } + } + return true; + } + }); + } + + @Override + IntBuffer buf() { + return buf; + } + + IntNioDataBuffer(IntBuffer buf) { + this.buf = buf; + } + + private IntBuffer buf; +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/LongNioDataBuffer.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/LongNioDataBuffer.java new file mode 100644 index 00000000000..7231ee7d408 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/LongNioDataBuffer.java @@ -0,0 +1,147 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.nio; + +import java.nio.LongBuffer; +import org.tensorflow.ndarray.impl.buffer.Validator; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataStorageVisitor; +import org.tensorflow.ndarray.buffer.LongDataBuffer; + +/** + * A buffer of bytes using a JDK {@link LongBuffer} for storage. + */ +final class LongNioDataBuffer extends AbstractNioDataBuffer + implements LongDataBuffer { + + @Override + public long getLong(long index) { + return buf.get((int)index); + } + + @Override + public LongDataBuffer setLong(long value, long index) { + buf.put((int)index, value); + return this; + } + + @Override + public LongDataBuffer read(long[] dst, int offset, int length) { + buf.duplicate().get(dst, offset, length); + return this; + } + + @Override + public LongDataBuffer write(long[] src, int offset, int length) { + buf.duplicate().put(src, offset, length); + return this; + } + + @Override + public LongDataBuffer copyTo(DataBuffer dst, long size) { + Validator.copyToArgs(this, dst, size); + return dst.accept(new DataStorageVisitor() { + + @Override + public LongDataBuffer visit(LongBuffer buffer) { + buffer.duplicate().put((LongBuffer)buf.duplicate().limit((int)size)); + return LongNioDataBuffer.this; + } + + @Override + public LongDataBuffer fallback() { + if (dst instanceof LongDataBuffer) { + LongDataBuffer longDst = (LongDataBuffer)dst; + for (long idx = 0L; idx < size; ++idx) { + longDst.setLong(getLong(idx), idx); + } + return LongNioDataBuffer.this; + } + return slowCopyTo(dst, size); + } + }); + } + + @Override + public LongDataBuffer offset(long index) { + Validator.offsetArgs(this, index); + return new LongNioDataBuffer(((LongBuffer)buf.duplicate().position((int)index)).slice()); + } + + @Override + public LongDataBuffer narrow(long size) { + Validator.narrowArgs(this, size); + return new LongNioDataBuffer(((LongBuffer)buf.duplicate().limit((int)size)).slice()); + } + + @Override + public LongDataBuffer slice(long index, long size) { + Validator.sliceArgs(this, index, size); + LongBuffer sliceBuf = buf.duplicate(); + sliceBuf.position((int)index); + sliceBuf.limit((int)index + (int)size); + return new LongNioDataBuffer(sliceBuf.slice()); + } + + @Override + public R accept(DataStorageVisitor visitor) { + return visitor.visit(buf); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (!(obj instanceof LongDataBuffer)) { + return super.equals(obj); + } + LongDataBuffer other = (LongDataBuffer)obj; + if (size() != other.size()) { + return false; + } + return other.accept(new DataStorageVisitor() { + + @Override + public Boolean visit(LongBuffer buffer) { + return buf.equals(buffer); + } + + @Override + public Boolean fallback() { + for (int idx = 0; idx < size(); ++idx) { + if (other.getLong(idx) != getLong(idx)) { + return false; + } + } + return true; + } + }); + } + + @Override + LongBuffer buf() { + return buf; + } + + LongNioDataBuffer(LongBuffer buf) { + this.buf = buf; + } + + private LongBuffer buf; +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/NioDataBufferFactory.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/NioDataBufferFactory.java new file mode 100644 index 00000000000..4e84fc9bc17 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/NioDataBufferFactory.java @@ -0,0 +1,61 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.nio; + +import java.nio.ByteBuffer; +import java.nio.DoubleBuffer; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; +import java.nio.LongBuffer; +import java.nio.ShortBuffer; +import org.tensorflow.ndarray.buffer.ByteDataBuffer; +import org.tensorflow.ndarray.buffer.DoubleDataBuffer; +import org.tensorflow.ndarray.buffer.FloatDataBuffer; +import org.tensorflow.ndarray.buffer.IntDataBuffer; +import org.tensorflow.ndarray.buffer.LongDataBuffer; +import org.tensorflow.ndarray.buffer.ShortDataBuffer; + +/** + * Factory of JDK NIO-based data buffers + */ +public class NioDataBufferFactory { + + public static ByteDataBuffer create(ByteBuffer buffer) { + return new ByteNioDataBuffer(buffer); + } + + public static DoubleDataBuffer create(DoubleBuffer buffer) { + return new DoubleNioDataBuffer(buffer); + } + + public static FloatDataBuffer create(FloatBuffer buffer) { + return new FloatNioDataBuffer(buffer); + } + + public static IntDataBuffer create(IntBuffer buffer) { + return new IntNioDataBuffer(buffer); + } + + public static LongDataBuffer create(LongBuffer buffer) { + return new LongNioDataBuffer(buffer); + } + + public static ShortDataBuffer create(ShortBuffer buffer) { + return new ShortNioDataBuffer(buffer); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/ShortNioDataBuffer.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/ShortNioDataBuffer.java new file mode 100644 index 00000000000..776faa103c2 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/ShortNioDataBuffer.java @@ -0,0 +1,147 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.nio; + +import java.nio.ShortBuffer; +import org.tensorflow.ndarray.impl.buffer.Validator; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataStorageVisitor; +import org.tensorflow.ndarray.buffer.ShortDataBuffer; + +/** + * A buffer of bytes using a JDK {@link ShortBuffer} for storage. + */ +final class ShortNioDataBuffer extends AbstractNioDataBuffer + implements ShortDataBuffer { + + @Override + public short getShort(long index) { + return buf.get((int)index); + } + + @Override + public ShortDataBuffer setShort(short value, long index) { + buf.put((int)index, value); + return this; + } + + @Override + public ShortDataBuffer read(short[] dst, int offset, int length) { + buf.duplicate().get(dst, offset, length); + return this; + } + + @Override + public ShortDataBuffer write(short[] src, int offset, int length) { + buf.duplicate().put(src, offset, length); + return this; + } + + @Override + public ShortDataBuffer copyTo(DataBuffer dst, long size) { + Validator.copyToArgs(this, dst, size); + return dst.accept(new DataStorageVisitor() { + + @Override + public ShortDataBuffer visit(ShortBuffer buffer) { + buffer.duplicate().put((ShortBuffer)buf.duplicate().limit((int)size)); + return ShortNioDataBuffer.this; + } + + @Override + public ShortDataBuffer fallback() { + if (dst instanceof ShortDataBuffer) { + ShortDataBuffer shortDst = (ShortDataBuffer)dst; + for (long idx = 0L; idx < size; ++idx) { + shortDst.setShort(getShort(idx), idx); + } + return ShortNioDataBuffer.this; + } + return slowCopyTo(dst, size); + } + }); + } + + @Override + public ShortDataBuffer offset(long index) { + Validator.offsetArgs(this, index); + return new ShortNioDataBuffer(((ShortBuffer)buf.duplicate().position((int)index)).slice()); + } + + @Override + public ShortDataBuffer narrow(long size) { + Validator.narrowArgs(this, size); + return new ShortNioDataBuffer(((ShortBuffer)buf.duplicate().limit((int)size)).slice()); + } + + @Override + public ShortDataBuffer slice(long index, long size) { + Validator.sliceArgs(this, index, size); + ShortBuffer sliceBuf = buf.duplicate(); + sliceBuf.position((int)index); + sliceBuf.limit((int)index + (int)size); + return new ShortNioDataBuffer(sliceBuf.slice()); + } + + @Override + public R accept(DataStorageVisitor visitor) { + return visitor.visit(buf); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (!(obj instanceof ShortDataBuffer)) { + return super.equals(obj); + } + ShortDataBuffer other = (ShortDataBuffer)obj; + if (size() != other.size()) { + return false; + } + return other.accept(new DataStorageVisitor() { + + @Override + public Boolean visit(ShortBuffer buffer) { + return buf.equals(buffer); + } + + @Override + public Boolean fallback() { + for (int idx = 0; idx < size(); ++idx) { + if (other.getShort(idx) != getShort(idx)) { + return false; + } + } + return true; + } + }); + } + + @Override + ShortBuffer buf() { + return buf; + } + + ShortNioDataBuffer(ShortBuffer buf) { + this.buf = buf; + } + + private ShortBuffer buf; +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/AbstractRawDataBuffer.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/AbstractRawDataBuffer.java new file mode 100644 index 00000000000..c6050385b77 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/AbstractRawDataBuffer.java @@ -0,0 +1,94 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.raw; + +import org.tensorflow.ndarray.impl.buffer.AbstractDataBuffer; +import org.tensorflow.ndarray.impl.buffer.Validator; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBufferWindow; + +@SuppressWarnings("unchecked") +abstract class AbstractRawDataBuffer> extends AbstractDataBuffer { + + public long size() { + return memory.size(); + } + + @Override + public boolean isReadOnly() { + return readOnly; + } + + public B read(Object dst, int dstLength) { + Validator.readArgs(this, dstLength, 0, dstLength); + memory.copyTo(UnsafeMemoryHandle.fromArray(dst, dstLength), dstLength); + return (B)this; + } + + public B read(Object dst, int dstLength, int offset, int length) { + Validator.readArgs(this, dstLength, offset, length); + memory.copyTo(UnsafeMemoryHandle.fromArray(dst, dstLength).offset(offset), length); + return (B)this; + } + + public B write(Object src, int srcLength) { + Validator.writeArgs(this, srcLength, 0, srcLength); + UnsafeMemoryHandle.fromArray(src, srcLength).copyTo(memory, srcLength); + return (B)this; + } + + public B write(Object src, int srcLength, int offset, int length) { + Validator.writeArgs(this, srcLength, offset, length); + UnsafeMemoryHandle.fromArray(src, srcLength).offset(offset).copyTo(memory, length); + return (B)this; + } + + @Override + public B copyTo(DataBuffer dst, long size) { + Validator.copyToArgs(this, dst, size); + if (dst instanceof AbstractRawDataBuffer) { + AbstractRawDataBuffer unsafeDst = (AbstractRawDataBuffer)dst; + memory.copyTo(unsafeDst.memory, size); + } else { + super.copyTo(dst, size); + } + return (B)this; + } + + @Override + public B slice(long index, long size) { + Validator.sliceArgs(this, index, size); + return instantiate(memory.slice(index, size)); + } + + @Override + public DataBufferWindow window(long size) { + B windowBuffer = instantiate(memory.slice(0, size)); + return new RawDataBufferWindow<>((AbstractRawDataBuffer)windowBuffer, size()); + } + + protected final UnsafeMemoryHandle memory; + protected final boolean readOnly; + + protected abstract B instantiate(UnsafeMemoryHandle region); + + AbstractRawDataBuffer(UnsafeMemoryHandle memory, boolean readOnly) { + this.memory = memory; + this.readOnly = readOnly; + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/BooleanRawDataBuffer.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/BooleanRawDataBuffer.java new file mode 100644 index 00000000000..e7e825ea505 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/BooleanRawDataBuffer.java @@ -0,0 +1,146 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.raw; + +import java.util.Arrays; +import org.tensorflow.ndarray.impl.buffer.Validator; +import org.tensorflow.ndarray.buffer.BooleanDataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataStorageVisitor; + +final class BooleanRawDataBuffer extends AbstractRawDataBuffer + implements BooleanDataBuffer { + + @Override + public boolean getBoolean(long index) { + Validator.getArgs(this, index); + return memory.getBoolean(index); + } + + @Override + public BooleanDataBuffer setBoolean(boolean value, long index) { + Validator.setArgs(this, index); + memory.setBoolean(value, index); + return this; + } + + @Override + public BooleanDataBuffer read(boolean[] dst) { + return read(dst, dst.length); + } + + @Override + public BooleanDataBuffer read(boolean[] dst, int offset, int length) { + return read(dst, dst.length, offset, length); + } + + @Override + public BooleanDataBuffer write(boolean[] src) { + return write(src, src.length); + } + + @Override + public BooleanDataBuffer write(boolean[] src, int offset, int length) { + return write(src, src.length, offset, length); + } + + @Override + public BooleanDataBuffer copyTo(DataBuffer dst, long size) { + Validator.copyToArgs(this, dst, size); + return dst.accept(new DataStorageVisitor() { + + @Override + public BooleanDataBuffer visit(boolean[] array, int offset, int length) { + memory.copyTo(UnsafeMemoryHandle.fromArray(array, offset, length), size); + return BooleanRawDataBuffer.this; + } + + @Override + public BooleanDataBuffer visit(long address, long length, long scale) { + memory.copyTo(UnsafeMemoryHandle.fromAddress(address, length, scale), size); + return BooleanRawDataBuffer.this; + } + + @Override + public BooleanDataBuffer fallback() { + if (dst instanceof BooleanDataBuffer) { + BooleanDataBuffer booleanDst = (BooleanDataBuffer)dst; + for (long idx = 0L; idx < size; ++idx) { + booleanDst.setBoolean(getBoolean(idx), idx); + } + return BooleanRawDataBuffer.this; + } + return slowCopyTo(dst, size); + } + }); + } + + @Override + public R accept(DataStorageVisitor visitor) { + if (memory.isArray()) { + return visitor.visit((boolean[])memory.object, memory.arrayOffset(boolean[].class), (int)memory.size()); + } + return visitor.visit(memory.byteOffset, memory.byteSize, memory.scale); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (!(obj instanceof BooleanDataBuffer)) { + return super.equals(obj); + } + BooleanDataBuffer other = (BooleanDataBuffer)obj; + if (size() != other.size()) { + return false; + } + return other.accept(new DataStorageVisitor() { + + @Override + public Boolean visit(boolean[] array, int offset, int length) { + if (memory.isArray() && memory.arrayOffset(boolean[].class) == 0 && offset == 0) { + boolean[] thisArray = memory.array(); + if (thisArray.length == array.length) { + return Arrays.equals(thisArray, array); + } + } + return fallback(); + } + + @Override + public Boolean fallback() { + for (long idx = 0L; idx < size(); ++idx) { + if (other.getBoolean(idx) != getBoolean(idx)) { + return false; + } + } + return true; + } + }); + } + + @Override + protected BooleanDataBuffer instantiate(UnsafeMemoryHandle memory) { + return new BooleanRawDataBuffer(memory, readOnly); + } + + BooleanRawDataBuffer(UnsafeMemoryHandle memory, boolean readOnly) { + super(memory, readOnly); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/ByteRawDataBuffer.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/ByteRawDataBuffer.java new file mode 100644 index 00000000000..b4b490e98ed --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/ByteRawDataBuffer.java @@ -0,0 +1,185 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.raw; + +import java.nio.ByteBuffer; +import org.tensorflow.ndarray.impl.buffer.Validator; +import org.tensorflow.ndarray.buffer.BooleanDataBuffer; +import org.tensorflow.ndarray.buffer.ByteDataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataStorageVisitor; +import org.tensorflow.ndarray.buffer.DoubleDataBuffer; +import org.tensorflow.ndarray.buffer.FloatDataBuffer; +import org.tensorflow.ndarray.buffer.IntDataBuffer; +import org.tensorflow.ndarray.buffer.LongDataBuffer; +import org.tensorflow.ndarray.buffer.ShortDataBuffer; + +final class ByteRawDataBuffer extends AbstractRawDataBuffer + implements ByteDataBuffer { + + @Override + public byte getByte(long index) { + Validator.getArgs(this, index); + return memory.getByte(index); + } + + @Override + public ByteDataBuffer setByte(byte value, long index) { + Validator.setArgs(this, index); + memory.setByte(value, index); + return this; + } + + @Override + public ByteDataBuffer read(byte[] dst) { + return read(dst, dst.length); + } + + @Override + public ByteDataBuffer read(byte[] dst, int offset, int length) { + return read(dst, dst.length, offset, length); + } + + @Override + public ByteDataBuffer write(byte[] src) { + return write(src, src.length); + } + + @Override + public ByteDataBuffer write(byte[] src, int offset, int length) { + return write(src, src.length, offset, length); + } + + @Override + public ByteDataBuffer copyTo(DataBuffer dst, long size) { + Validator.copyToArgs(this, dst, size); + return dst.accept(new DataStorageVisitor() { + + @Override + public ByteDataBuffer visit(ByteBuffer buffer) { + if (buffer.hasArray()) { + memory.copyTo(UnsafeMemoryHandle.fromArray(buffer.array(), buffer.position(), buffer.limit()), size); + } else if (memory.isArray()) { + buffer.put(memory.toArrayByteBuffer()); + } else { + slowCopyTo(dst, size); + } + return ByteRawDataBuffer.this; + } + + @Override + public ByteDataBuffer visit(long address, long length, long scale) { + memory.copyTo(UnsafeMemoryHandle.fromAddress(address, length, scale), size); + return ByteRawDataBuffer.this; + } + + @Override + public ByteDataBuffer fallback() { + if (dst instanceof ByteDataBuffer) { + ByteDataBuffer byteDst = (ByteDataBuffer)dst; + for (long idx = 0L; idx < size; ++idx) { + byteDst.setByte(getByte(idx), idx); + } + return ByteRawDataBuffer.this; + } + return slowCopyTo(dst, size); + } + }); + } + + @Override + public IntDataBuffer asInts() { + return new IntRawDataBuffer(memory.rescale(Integer.BYTES), readOnly); + } + + @Override + public ShortDataBuffer asShorts() { + return new ShortRawDataBuffer(memory.rescale(Short.BYTES), readOnly); + } + + @Override + public LongDataBuffer asLongs() { + return new LongRawDataBuffer(memory.rescale(Long.BYTES), readOnly); + } + + @Override + public FloatDataBuffer asFloats() { + return new FloatRawDataBuffer(memory.rescale(Float.BYTES), readOnly); + } + + @Override + public DoubleDataBuffer asDoubles() { + return new DoubleRawDataBuffer(memory.rescale(Double.BYTES), readOnly); + } + + @Override + public BooleanDataBuffer asBooleans() { + return new BooleanRawDataBuffer(memory.rescale(Byte.BYTES), readOnly); + } + + @Override + public R accept(DataStorageVisitor visitor) { + if (memory.isArray()) { + return visitor.visit(memory.toArrayByteBuffer()); + } + return visitor.visit(memory.byteOffset, memory.byteSize, memory.scale); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (!(obj instanceof ByteDataBuffer)) { + return super.equals(obj); + } + ByteDataBuffer other = (ByteDataBuffer)obj; + if (size() != other.size()) { + return false; + } + return other.accept(new DataStorageVisitor() { + + @Override + public Boolean visit(ByteBuffer buffer) { + if (memory.isArray()) { + return buffer.equals(memory.toArrayByteBuffer()); + } + return fallback(); + } + + @Override + public Boolean fallback() { + for (long idx = 0L; idx < size(); ++idx) { + if (other.getByte(idx) != getByte(idx)) { + return false; + } + } + return true; + } + }); + } + + @Override + protected ByteDataBuffer instantiate(UnsafeMemoryHandle memory) { + return new ByteRawDataBuffer(memory, readOnly); + } + + ByteRawDataBuffer(UnsafeMemoryHandle memory, boolean readOnly) { + super(memory, readOnly); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/DoubleRawDataBuffer.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/DoubleRawDataBuffer.java new file mode 100644 index 00000000000..680d9565184 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/DoubleRawDataBuffer.java @@ -0,0 +1,149 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.raw; + +import java.nio.DoubleBuffer; +import org.tensorflow.ndarray.impl.buffer.Validator; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataStorageVisitor; +import org.tensorflow.ndarray.buffer.DoubleDataBuffer; + +final class DoubleRawDataBuffer extends AbstractRawDataBuffer + implements DoubleDataBuffer { + + @Override + public double getDouble(long index) { + Validator.getArgs(this, index); + return memory.getDouble(index); + } + + @Override + public DoubleDataBuffer setDouble(double value, long index) { + Validator.setArgs(this, index); + memory.setDouble(value, index); + return this; + } + + @Override + public DoubleDataBuffer read(double[] dst) { + return read(dst, dst.length); + } + + @Override + public DoubleDataBuffer read(double[] dst, int offset, int length) { + return read(dst, dst.length, offset, length); + } + + @Override + public DoubleDataBuffer write(double[] src) { + return write(src, src.length); + } + + @Override + public DoubleDataBuffer write(double[] src, int offset, int length) { + return write(src, src.length, offset, length); + } + + @Override + public DoubleDataBuffer copyTo(DataBuffer dst, long size) { + Validator.copyToArgs(this, dst, size); + return dst.accept(new DataStorageVisitor() { + + @Override + public DoubleDataBuffer visit(DoubleBuffer buffer) { + if (buffer.hasArray()) { + memory.copyTo(UnsafeMemoryHandle.fromArray(buffer.array(), buffer.position(), buffer.limit()), size); + } else if (memory.isArray()) { + buffer.put(memory.toArrayDoubleBuffer()); + } else { + slowCopyTo(dst, size); + } + return DoubleRawDataBuffer.this; + } + + @Override + public DoubleDataBuffer visit(long address, long length, long scale) { + memory.copyTo(UnsafeMemoryHandle.fromAddress(address, length, scale), size); + return DoubleRawDataBuffer.this; + } + + @Override + public DoubleDataBuffer fallback() { + if (dst instanceof DoubleDataBuffer) { + DoubleDataBuffer doubleDst = (DoubleDataBuffer)dst; + for (long idx = 0L; idx < size; ++idx) { + doubleDst.setDouble(getDouble(idx), idx); + } + return DoubleRawDataBuffer.this; + } + return slowCopyTo(dst, size); + } + }); + } + + @Override + public R accept(DataStorageVisitor visitor) { + if (memory.isArray()) { + return visitor.visit(memory.toArrayDoubleBuffer()); + } + return visitor.visit(memory.byteOffset, memory.byteSize, memory.scale); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (!(obj instanceof DoubleDataBuffer)) { + return super.equals(obj); + } + DoubleDataBuffer other = (DoubleDataBuffer)obj; + if (size() != other.size()) { + return false; + } + return other.accept(new DataStorageVisitor() { + + @Override + public Boolean visit(DoubleBuffer buffer) { + if (memory.isArray()) { + return buffer.equals(memory.toArrayDoubleBuffer()); + } + return fallback(); + } + + @Override + public Boolean fallback() { + for (long idx = 0L; idx < size(); ++idx) { + if (other.getDouble(idx) != getDouble(idx)) { + return false; + } + } + return true; + } + }); + } + + @Override + protected DoubleDataBuffer instantiate(UnsafeMemoryHandle memory) { + return new DoubleRawDataBuffer(memory, readOnly); + } + + DoubleRawDataBuffer(UnsafeMemoryHandle memory, boolean readOnly) { + super(memory, readOnly); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/FloatRawDataBuffer.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/FloatRawDataBuffer.java new file mode 100644 index 00000000000..43bd370a88b --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/FloatRawDataBuffer.java @@ -0,0 +1,150 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.raw; + +import java.nio.FloatBuffer; + +import org.tensorflow.ndarray.impl.buffer.Validator; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataStorageVisitor; +import org.tensorflow.ndarray.buffer.FloatDataBuffer; + +final class FloatRawDataBuffer extends AbstractRawDataBuffer + implements FloatDataBuffer { + + @Override + public float getFloat(long index) { + Validator.getArgs(this, index); + return memory.getFloat(index); + } + + @Override + public FloatDataBuffer setFloat(float value, long index) { + Validator.setArgs(this, index); + memory.setFloat(value, index); + return this; + } + + @Override + public FloatDataBuffer read(float[] dst) { + return read(dst, dst.length); + } + + @Override + public FloatDataBuffer read(float[] dst, int offset, int length) { + return read(dst, dst.length, offset, length); + } + + @Override + public FloatDataBuffer write(float[] src) { + return write(src, src.length); + } + + @Override + public FloatDataBuffer write(float[] src, int offset, int length) { + return write(src, src.length, offset, length); + } + + @Override + public FloatDataBuffer copyTo(DataBuffer dst, long size) { + Validator.copyToArgs(this, dst, size); + return dst.accept(new DataStorageVisitor() { + + @Override + public FloatDataBuffer visit(FloatBuffer buffer) { + if (buffer.hasArray()) { + memory.copyTo(UnsafeMemoryHandle.fromArray(buffer.array(), buffer.position(), buffer.limit()), size); + } else if (memory.isArray()) { + buffer.put(memory.toArrayFloatBuffer()); + } else { + slowCopyTo(dst, size); + } + return FloatRawDataBuffer.this; + } + + @Override + public FloatDataBuffer visit(long address, long length, long scale) { + memory.copyTo(UnsafeMemoryHandle.fromAddress(address, length, scale), size); + return FloatRawDataBuffer.this; + } + + @Override + public FloatDataBuffer fallback() { + if (dst instanceof FloatDataBuffer) { + FloatDataBuffer floatDst = (FloatDataBuffer)dst; + for (long idx = 0L; idx < size; ++idx) { + floatDst.setFloat(getFloat(idx), idx); + } + return FloatRawDataBuffer.this; + } + return slowCopyTo(dst, size); + } + }); + } + + @Override + public R accept(DataStorageVisitor visitor) { + if (memory.isArray()) { + return visitor.visit(memory.toArrayFloatBuffer()); + } + return visitor.visit(memory.byteOffset, memory.byteSize, memory.scale); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (!(obj instanceof FloatDataBuffer)) { + return super.equals(obj); + } + FloatDataBuffer other = (FloatDataBuffer)obj; + if (size() != other.size()) { + return false; + } + return other.accept(new DataStorageVisitor() { + + @Override + public Boolean visit(FloatBuffer buffer) { + if (memory.isArray()) { + return buffer.equals(memory.toArrayFloatBuffer()); + } + return fallback(); + } + + @Override + public Boolean fallback() { + for (long idx = 0L; idx < size(); ++idx) { + if (other.getFloat(idx) != getFloat(idx)) { + return false; + } + } + return true; + } + }); + } + + @Override + protected FloatDataBuffer instantiate(UnsafeMemoryHandle memory) { + return new FloatRawDataBuffer(memory, readOnly); + } + + FloatRawDataBuffer(UnsafeMemoryHandle memory, boolean readOnly) { + super(memory, readOnly); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/IntRawDataBuffer.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/IntRawDataBuffer.java new file mode 100644 index 00000000000..1c905e2756d --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/IntRawDataBuffer.java @@ -0,0 +1,149 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.raw; + +import java.nio.IntBuffer; +import org.tensorflow.ndarray.impl.buffer.Validator; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataStorageVisitor; +import org.tensorflow.ndarray.buffer.IntDataBuffer; + +final class IntRawDataBuffer extends AbstractRawDataBuffer + implements IntDataBuffer { + + @Override + public int getInt(long index) { + Validator.getArgs(this, index); + return memory.getInt(index); + } + + @Override + public IntDataBuffer setInt(int value, long index) { + Validator.setArgs(this, index); + memory.setInt(value, index); + return this; + } + + @Override + public IntDataBuffer read(int[] dst) { + return read(dst, dst.length); + } + + @Override + public IntDataBuffer read(int[] dst, int offset, int length) { + return read(dst, dst.length, offset, length); + } + + @Override + public IntDataBuffer write(int[] src) { + return write(src, src.length); + } + + @Override + public IntDataBuffer write(int[] src, int offset, int length) { + return write(src, src.length, offset, length); + } + + @Override + public IntDataBuffer copyTo(DataBuffer dst, long size) { + Validator.copyToArgs(this, dst, size); + return dst.accept(new DataStorageVisitor() { + + @Override + public IntDataBuffer visit(IntBuffer buffer) { + if (buffer.hasArray()) { + memory.copyTo(UnsafeMemoryHandle.fromArray(buffer.array(), buffer.position(), buffer.limit()), size); + } else if (memory.isArray()) { + buffer.put(memory.toArrayIntBuffer()); + } else { + slowCopyTo(dst, size); + } + return IntRawDataBuffer.this; + } + + @Override + public IntDataBuffer visit(long address, long length, long scale) { + memory.copyTo(UnsafeMemoryHandle.fromAddress(address, length, scale), size); + return IntRawDataBuffer.this; + } + + @Override + public IntDataBuffer fallback() { + if (dst instanceof IntDataBuffer) { + IntDataBuffer intDst = (IntDataBuffer)dst; + for (long idx = 0L; idx < size; ++idx) { + intDst.setInt(getInt(idx), idx); + } + return IntRawDataBuffer.this; + } + return slowCopyTo(dst, size); + } + }); + } + + @Override + public R accept(DataStorageVisitor visitor) { + if (memory.isArray()) { + return visitor.visit(memory.toArrayIntBuffer()); + } + return visitor.visit(memory.byteOffset, memory.byteSize, memory.scale); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (!(obj instanceof IntDataBuffer)) { + return super.equals(obj); + } + IntDataBuffer other = (IntDataBuffer)obj; + if (size() != other.size()) { + return false; + } + return other.accept(new DataStorageVisitor() { + + @Override + public Boolean visit(IntBuffer buffer) { + if (memory.isArray()) { + return buffer.equals(memory.toArrayIntBuffer()); + } + return fallback(); + } + + @Override + public Boolean fallback() { + for (long idx = 0L; idx < size(); ++idx) { + if (other.getInt(idx) != getInt(idx)) { + return false; + } + } + return true; + } + }); + } + + @Override + protected IntDataBuffer instantiate(UnsafeMemoryHandle memory) { + return new IntRawDataBuffer(memory, readOnly); + } + + IntRawDataBuffer(UnsafeMemoryHandle memory, boolean readOnly) { + super(memory, readOnly); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/LongRawDataBuffer.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/LongRawDataBuffer.java new file mode 100644 index 00000000000..724868fe81f --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/LongRawDataBuffer.java @@ -0,0 +1,149 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.raw; + +import java.nio.LongBuffer; +import org.tensorflow.ndarray.impl.buffer.Validator; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataStorageVisitor; +import org.tensorflow.ndarray.buffer.LongDataBuffer; + +final class LongRawDataBuffer extends AbstractRawDataBuffer + implements LongDataBuffer { + + @Override + public long getLong(long index) { + Validator.getArgs(this, index); + return memory.getLong(index); + } + + @Override + public LongDataBuffer setLong(long value, long index) { + Validator.setArgs(this, index); + memory.setLong(value, index); + return this; + } + + @Override + public LongDataBuffer read(long[] dst) { + return read(dst, dst.length); + } + + @Override + public LongDataBuffer read(long[] dst, int offset, int length) { + return read(dst, dst.length, offset, length); + } + + @Override + public LongDataBuffer write(long[] src) { + return write(src, src.length); + } + + @Override + public LongDataBuffer write(long[] src, int offset, int length) { + return write(src, src.length, offset, length); + } + + @Override + public LongDataBuffer copyTo(DataBuffer dst, long size) { + Validator.copyToArgs(this, dst, size); + return dst.accept(new DataStorageVisitor() { + + @Override + public LongDataBuffer visit(LongBuffer buffer) { + if (buffer.hasArray()) { + memory.copyTo(UnsafeMemoryHandle.fromArray(buffer.array(), buffer.position(), buffer.limit()), size); + } else if (memory.isArray()) { + buffer.put(memory.toArrayLongBuffer()); + } else { + slowCopyTo(dst, size); + } + return LongRawDataBuffer.this; + } + + @Override + public LongDataBuffer visit(long address, long length, long scale) { + memory.copyTo(UnsafeMemoryHandle.fromAddress(address, length, scale), size); + return LongRawDataBuffer.this; + } + + @Override + public LongDataBuffer fallback() { + if (dst instanceof LongDataBuffer) { + LongDataBuffer longDst = (LongDataBuffer)dst; + for (long idx = 0L; idx < size; ++idx) { + longDst.setLong(getLong(idx), idx); + } + return LongRawDataBuffer.this; + } + return slowCopyTo(dst, size); + } + }); + } + + @Override + public R accept(DataStorageVisitor visitor) { + if (memory.isArray()) { + return visitor.visit(memory.toArrayLongBuffer()); + } + return visitor.visit(memory.byteOffset, memory.byteSize, memory.scale); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (!(obj instanceof LongDataBuffer)) { + return super.equals(obj); + } + LongDataBuffer other = (LongDataBuffer)obj; + if (size() != other.size()) { + return false; + } + return other.accept(new DataStorageVisitor() { + + @Override + public Boolean visit(LongBuffer buffer) { + if (memory.isArray()) { + return buffer.equals(memory.toArrayLongBuffer()); + } + return fallback(); + } + + @Override + public Boolean fallback() { + for (long idx = 0L; idx < size(); ++idx) { + if (other.getLong(idx) != getLong(idx)) { + return false; + } + } + return true; + } + }); + } + + @Override + protected LongDataBuffer instantiate(UnsafeMemoryHandle memory) { + return new LongRawDataBuffer(memory, readOnly); + } + + LongRawDataBuffer(UnsafeMemoryHandle memory, boolean readOnly) { + super(memory, readOnly); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/RawDataBufferFactory.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/RawDataBufferFactory.java new file mode 100644 index 00000000000..7253b239af2 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/RawDataBufferFactory.java @@ -0,0 +1,148 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.raw; + +import org.tensorflow.ndarray.impl.buffer.Validator; +import org.tensorflow.ndarray.buffer.BooleanDataBuffer; +import org.tensorflow.ndarray.buffer.ByteDataBuffer; +import org.tensorflow.ndarray.buffer.DoubleDataBuffer; +import org.tensorflow.ndarray.buffer.FloatDataBuffer; +import org.tensorflow.ndarray.buffer.IntDataBuffer; +import org.tensorflow.ndarray.buffer.LongDataBuffer; +import org.tensorflow.ndarray.buffer.ShortDataBuffer; + +/** + * Factory of raw data buffers + */ +public class RawDataBufferFactory { + + public static boolean canBeUsed() { + return UnsafeReference.isAvailable(); + } + + public static BooleanDataBuffer create(boolean[] array, boolean readOnly) { + return new BooleanRawDataBuffer(UnsafeMemoryHandle.fromArray(array, array.length), readOnly); + } + + public static ByteDataBuffer create(byte[] array, boolean readOnly) { + if (!canBeUsed()) { + throw new IllegalStateException("Raw data buffers are not available"); + } + return new ByteRawDataBuffer(UnsafeMemoryHandle.fromArray(array, array.length), readOnly); + } + + public static DoubleDataBuffer create(double[] array, boolean readOnly) { + if (!canBeUsed()) { + throw new IllegalStateException("Raw data buffers are not available"); + } + return new DoubleRawDataBuffer(UnsafeMemoryHandle.fromArray(array, array.length), readOnly); + } + + public static FloatDataBuffer create(float[] array, boolean readOnly) { + if (!canBeUsed()) { + throw new IllegalStateException("Raw data buffers are not available"); + } + return new FloatRawDataBuffer(UnsafeMemoryHandle.fromArray(array, array.length), readOnly); + } + + public static IntDataBuffer create(int[] array, boolean readOnly) { + if (!canBeUsed()) { + throw new IllegalStateException("Raw data buffers are not available"); + } + return new IntRawDataBuffer(UnsafeMemoryHandle.fromArray(array, array.length), readOnly); + } + + public static LongDataBuffer create(long[] array, boolean readOnly) { + if (!canBeUsed()) { + throw new IllegalStateException("Raw data buffers are not available"); + } + return new LongRawDataBuffer(UnsafeMemoryHandle.fromArray(array, array.length), readOnly); + } + + public static ShortDataBuffer create(short[] array, boolean readOnly) { + if (!canBeUsed()) { + throw new IllegalStateException("Raw data buffers are not available"); + } + return new ShortRawDataBuffer(UnsafeMemoryHandle.fromArray(array, array.length), readOnly); + } + + protected static BooleanDataBuffer mapNativeBooleans(long address, long size, boolean readOnly) { + if (!canBeUsed()) { + throw new IllegalStateException("Raw data buffers are not available"); + } + Validator.createArgs(size, MAX_64BITS); + return new BooleanRawDataBuffer(UnsafeMemoryHandle.fromAddress(address, size, Byte.BYTES), readOnly); + } + + protected static ByteDataBuffer mapNativeBytes(long address, long size, boolean readOnly) { + if (!canBeUsed()) { + throw new IllegalStateException("Raw data buffers are not available"); + } + Validator.createArgs(size, MAX_64BITS); + return new ByteRawDataBuffer(UnsafeMemoryHandle.fromAddress(address, size, Byte.BYTES), readOnly); + } + + protected static DoubleDataBuffer mapNativeDoubles(long address, long size, boolean readOnly) { + if (!canBeUsed()) { + throw new IllegalStateException("Raw data buffers are not available"); + } + Validator.createArgs(size, MAX_64BITS); + return new DoubleRawDataBuffer(UnsafeMemoryHandle.fromAddress(address, size, Double.BYTES), readOnly); + } + + protected static FloatDataBuffer mapNativeFloats(long address, long size, boolean readOnly) { + if (!canBeUsed()) { + throw new IllegalStateException("Raw data buffers are not available"); + } + Validator.createArgs(size, MAX_64BITS); + return new FloatRawDataBuffer(UnsafeMemoryHandle.fromAddress(address, size, Float.BYTES), readOnly); + } + + protected static IntDataBuffer mapNativeInts(long address, long size, boolean readOnly) { + if (!canBeUsed()) { + throw new IllegalStateException("Raw data buffers are not available"); + } + Validator.createArgs(size, MAX_64BITS); + return new IntRawDataBuffer(UnsafeMemoryHandle.fromAddress(address, size, Integer.BYTES), readOnly); + } + + protected static LongDataBuffer mapNativeLongs(long address, long size, boolean readOnly) { + if (!canBeUsed()) { + throw new IllegalStateException("Raw data buffers are not available"); + } + Validator.createArgs(size, MAX_64BITS); + return new LongRawDataBuffer(UnsafeMemoryHandle.fromAddress(address, size, Long.BYTES), readOnly); + } + + protected static ShortDataBuffer mapNativeShorts(long address, long size, boolean readOnly) { + if (!canBeUsed()) { + throw new IllegalStateException("Raw data buffers are not available"); + } + Validator.createArgs(size, MAX_64BITS); + return new ShortRawDataBuffer(UnsafeMemoryHandle.fromAddress(address, size, Short.BYTES), readOnly); + } + + /* + * The maximum size for a buffer of this type, i.e. the maximum number of bytes it can store. + *

+ * As the maximum size may vary depending on the JVM implementation and on the platform, this + * property returns a value that is safe for most of them. + */ + static long MAX_32BITS = Integer.MAX_VALUE - 10; + static long MAX_64BITS = Long.MAX_VALUE - 10; +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/RawDataBufferWindow.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/RawDataBufferWindow.java new file mode 100644 index 00000000000..dc18a6caa6e --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/RawDataBufferWindow.java @@ -0,0 +1,19 @@ +package org.tensorflow.ndarray.impl.buffer.raw; + +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.impl.buffer.AbstractDataBufferWindow; + +final class RawDataBufferWindow> extends AbstractDataBufferWindow { + + @Override + public void offset(long offset) { + windowMemory.rebase(offset); + } + + > RawDataBufferWindow(R windowBuffer, long bufferLimit) { + super((B)windowBuffer, bufferLimit); + this.windowMemory = windowBuffer.memory; + } + + private final UnsafeMemoryHandle windowMemory; +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/ShortRawDataBuffer.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/ShortRawDataBuffer.java new file mode 100644 index 00000000000..80f9c289852 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/ShortRawDataBuffer.java @@ -0,0 +1,149 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.raw; + +import java.nio.ShortBuffer; +import org.tensorflow.ndarray.impl.buffer.Validator; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataStorageVisitor; +import org.tensorflow.ndarray.buffer.ShortDataBuffer; + +final class ShortRawDataBuffer extends AbstractRawDataBuffer + implements ShortDataBuffer { + + @Override + public short getShort(long index) { + Validator.getArgs(this, index); + return memory.getShort(index); + } + + @Override + public ShortDataBuffer setShort(short value, long index) { + Validator.setArgs(this, index); + memory.setShort(value, index); + return this; + } + + @Override + public ShortDataBuffer read(short[] dst) { + return read(dst, dst.length); + } + + @Override + public ShortDataBuffer read(short[] dst, int offset, int length) { + return read(dst, dst.length, offset, length); + } + + @Override + public ShortDataBuffer write(short[] src) { + return write(src, src.length); + } + + @Override + public ShortDataBuffer write(short[] src, int offset, int length) { + return write(src, src.length, offset, length); + } + + @Override + public ShortDataBuffer copyTo(DataBuffer dst, long size) { + Validator.copyToArgs(this, dst, size); + return dst.accept(new DataStorageVisitor() { + + @Override + public ShortDataBuffer visit(ShortBuffer buffer) { + if (buffer.hasArray()) { + memory.copyTo(UnsafeMemoryHandle.fromArray(buffer.array(), buffer.position(), buffer.limit()), size); + } else if (memory.isArray()) { + buffer.put(memory.toArrayShortBuffer()); + } else { + slowCopyTo(dst, size); + } + return ShortRawDataBuffer.this; + } + + @Override + public ShortDataBuffer visit(long address, long length, long scale) { + memory.copyTo(UnsafeMemoryHandle.fromAddress(address, length, scale), size); + return ShortRawDataBuffer.this; + } + + @Override + public ShortDataBuffer fallback() { + if (dst instanceof ShortDataBuffer) { + ShortDataBuffer shortDst = (ShortDataBuffer)dst; + for (long idx = 0L; idx < size; ++idx) { + shortDst.setShort(getShort(idx), idx); + } + return ShortRawDataBuffer.this; + } + return slowCopyTo(dst, size); + } + }); + } + + @Override + public R accept(DataStorageVisitor visitor) { + if (memory.isArray()) { + return visitor.visit(memory.toArrayShortBuffer()); + } + return visitor.visit(memory.byteOffset, memory.byteSize, memory.scale); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (!(obj instanceof ShortDataBuffer)) { + return super.equals(obj); + } + ShortDataBuffer other = (ShortDataBuffer)obj; + if (size() != other.size()) { + return false; + } + return other.accept(new DataStorageVisitor() { + + @Override + public Boolean visit(ShortBuffer buffer) { + if (memory.isArray()) { + return buffer.equals(memory.toArrayShortBuffer()); + } + return fallback(); + } + + @Override + public Boolean fallback() { + for (long idx = 0L; idx < size(); ++idx) { + if (other.getShort(idx) != getShort(idx)) { + return false; + } + } + return true; + } + }); + } + + @Override + protected ShortDataBuffer instantiate(UnsafeMemoryHandle memory) { + return new ShortRawDataBuffer(memory, readOnly); + } + + ShortRawDataBuffer(UnsafeMemoryHandle memory, boolean readOnly) { + super(memory, readOnly); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/UnsafeMemoryHandle.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/UnsafeMemoryHandle.java new file mode 100644 index 00000000000..bd61e53a128 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/UnsafeMemoryHandle.java @@ -0,0 +1,195 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.raw; + +import java.nio.ByteBuffer; +import java.nio.DoubleBuffer; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; +import java.nio.LongBuffer; +import java.nio.ShortBuffer; + +final class UnsafeMemoryHandle { + + static UnsafeMemoryHandle fromArray(Object array, int length) { + return fromArray(array, 0, length); + } + + static UnsafeMemoryHandle fromArray(Object array, int arrayOffset, int length) { + long scale = UnsafeReference.UNSAFE.arrayIndexScale(array.getClass()); + int baseOffset = UnsafeReference.UNSAFE.arrayBaseOffset(array.getClass()); + return new UnsafeMemoryHandle(array, baseOffset + (arrayOffset * scale), length * scale, scale); + } + + static UnsafeMemoryHandle fromAddress(long address, long byteSize, long scale) { + return new UnsafeMemoryHandle(address, byteSize, scale); + } + + long size() { + return size; + } + + byte getByte(long index) { + return UnsafeReference.UNSAFE.getByte(object, align(index)); + } + + void setByte(byte value, long index) { + UnsafeReference.UNSAFE.putByte(object, align(index), value); + } + + boolean getBoolean(long index) { + return UnsafeReference.UNSAFE.getBoolean(object, align(index)); + } + + void setBoolean(boolean value, long index) { + UnsafeReference.UNSAFE.putBoolean(object, align(index), value); + } + + short getShort(long index) { + return UnsafeReference.UNSAFE.getShort(object, align(index)); + } + + void setShort(short value, long index) { + UnsafeReference.UNSAFE.putShort(object, align(index), value); + } + + int getInt(long index) { + return UnsafeReference.UNSAFE.getInt(object, align(index)); + } + + void setInt(int value, long index) { + UnsafeReference.UNSAFE.putInt(object, align(index), value); + } + + float getFloat(long index) { + return UnsafeReference.UNSAFE.getFloat(object, align(index)); + } + + void setFloat(float value, long index) { + UnsafeReference.UNSAFE.putFloat(object, align(index), value); + } + + double getDouble(long index) { + return UnsafeReference.UNSAFE.getDouble(object, align(index)); + } + + void setDouble(double value, long index) { + UnsafeReference.UNSAFE.putDouble(object, align(index), value); + } + + long getLong(long index) { + return UnsafeReference.UNSAFE.getLong(object, align(index)); + } + + void setLong(long value, long index) { + UnsafeReference.UNSAFE.putLong(object, align(index), value); + } + + void copyTo(UnsafeMemoryHandle memory, long length) { + UnsafeReference.UNSAFE.copyMemory(object, byteOffset, memory.object, memory.byteOffset, length * scale); + } + + UnsafeMemoryHandle offset(long index) { + long offset = scale(index); + return new UnsafeMemoryHandle(object, this.byteOffset + offset, byteSize - offset, scale); + } + + UnsafeMemoryHandle narrow(long size) { + return new UnsafeMemoryHandle(object, byteOffset, scale(size), scale); + } + + UnsafeMemoryHandle slice(long index, long size) { + return new UnsafeMemoryHandle(object, this.byteOffset + scale(index), scale(size), scale); + } + + UnsafeMemoryHandle rescale(long scale) { + if (object != null) { + throw new IllegalStateException("Raw heap memory cannot be rescaled"); + } + return new UnsafeMemoryHandle(null, byteOffset, byteSize, scale); + } + + void rebase(long index) { + byteOffset = baseOffset + scale(index); + } + + boolean isArray() { + return object != null; + } + + @SuppressWarnings("unchecked") + A array() { + return (A)object; + } + + int arrayOffset(Class arrayClass) { + return (int)((byteOffset - UnsafeReference.UNSAFE.arrayBaseOffset(arrayClass)) / scale); + } + + ByteBuffer toArrayByteBuffer() { + return ByteBuffer.wrap((byte[])object, (int) byteOffset - UnsafeReference.UNSAFE.arrayBaseOffset(byte[].class), (int)size); + } + + ShortBuffer toArrayShortBuffer() { + return ShortBuffer.wrap((short[])object, (int)((byteOffset - UnsafeReference.UNSAFE.arrayBaseOffset(short[].class)) / scale), (int)size); + } + + IntBuffer toArrayIntBuffer() { + return IntBuffer.wrap((int[])object, (int)((byteOffset - UnsafeReference.UNSAFE.arrayBaseOffset(int[].class)) / scale), (int)size); + } + + LongBuffer toArrayLongBuffer() { + return LongBuffer.wrap((long[])object, (int)((byteOffset - UnsafeReference.UNSAFE.arrayBaseOffset(long[].class)) / scale), (int)size); + } + + FloatBuffer toArrayFloatBuffer() { + return FloatBuffer.wrap((float[])object, (int)((byteOffset - UnsafeReference.UNSAFE.arrayBaseOffset(float[].class)) / scale), (int)size); + } + + DoubleBuffer toArrayDoubleBuffer() { + return DoubleBuffer.wrap((double[])object, (int)((byteOffset - UnsafeReference.UNSAFE.arrayBaseOffset(double[].class)) / scale), (int)size); + } + + final Object object; + final long baseOffset; + long byteOffset; + final long byteSize; + final long scale; + final long size; + + private UnsafeMemoryHandle(Object object, long baseOffset, long byteSize, long scale) { + this.object = object; + this.baseOffset = baseOffset; + byteOffset = baseOffset; + this.byteSize = byteSize; + this.scale = scale; + size = byteSize / scale; + } + + private UnsafeMemoryHandle(long address, long byteSize, long scale) { + this(null, address, byteSize, scale); + } + + private long align(long index) { + return byteOffset + index * scale; + } + + private long scale(long value) { + return value * scale; + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/UnsafeReference.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/UnsafeReference.java new file mode 100644 index 00000000000..7b95eac7349 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/UnsafeReference.java @@ -0,0 +1,64 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.raw; + +import java.lang.reflect.Field; +import sun.misc.Unsafe; + +final class UnsafeReference { + + static boolean isAvailable() { + return UNSAFE != null; + } + + static final Unsafe UNSAFE; + + static { + Unsafe unsafe = null; + try { + Class clazz = Class.forName("sun.misc.Unsafe"); + Field theUnsafe = clazz.getDeclaredField("theUnsafe"); + theUnsafe.setAccessible(true); + Object instance = theUnsafe.get(null); + if (instance.getClass() == clazz) { + // Validate that this Unsafe instance exposes all methods we need + clazz.getDeclaredMethod("getByte", Object.class, long.class); + clazz.getDeclaredMethod("putByte", Object.class, long.class, byte.class); + clazz.getDeclaredMethod("getShort", Object.class, long.class); + clazz.getDeclaredMethod("putShort", Object.class, long.class, short.class); + clazz.getDeclaredMethod("getInt", Object.class, long.class); + clazz.getDeclaredMethod("putInt", Object.class, long.class, int.class); + clazz.getDeclaredMethod("getLong", Object.class, long.class); + clazz.getDeclaredMethod("putLong", Object.class, long.class, long.class); + clazz.getDeclaredMethod("getFloat", Object.class, long.class); + clazz.getDeclaredMethod("putFloat", Object.class, long.class, float.class); + clazz.getDeclaredMethod("getDouble", Object.class, long.class); + clazz.getDeclaredMethod("putDouble", Object.class, long.class, double.class); + clazz.getDeclaredMethod("getBoolean", Object.class, long.class); + clazz.getDeclaredMethod("putBoolean", Object.class, long.class, boolean.class); + clazz.getDeclaredMethod("copyMemory", Object.class, long.class, Object.class, long.class, long.class); + clazz.getDeclaredMethod("arrayBaseOffset", Class.class); + clazz.getDeclaredMethod("arrayIndexScale", Class.class); + unsafe = (Unsafe) instance; + } + } catch (ClassNotFoundException | NoSuchMethodException | NoSuchFieldException | SecurityException | IllegalAccessException | ClassCastException ex) { + // Do nothing, keep unsafe as null + } + UNSAFE = unsafe; + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/AbstractDenseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/AbstractDenseNdArray.java new file mode 100644 index 00000000000..0497095116e --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/AbstractDenseNdArray.java @@ -0,0 +1,163 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.dense; + +import org.tensorflow.ndarray.NdArray; +import org.tensorflow.ndarray.NdArraySequence; +import org.tensorflow.ndarray.impl.AbstractNdArray; +import org.tensorflow.ndarray.impl.dimension.RelativeDimensionalSpace; +import org.tensorflow.ndarray.impl.sequence.FastElementSequence; +import org.tensorflow.ndarray.index.Index; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBufferWindow; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; +import org.tensorflow.ndarray.impl.sequence.SlicingElementSequence; +import org.tensorflow.ndarray.impl.sequence.SingleElementSequence; + +@SuppressWarnings("unchecked") +public abstract class AbstractDenseNdArray> extends AbstractNdArray { + + @Override + public NdArraySequence elements(int dimensionIdx) { + if (dimensionIdx >= shape().numDimensions()) { + throw new IllegalArgumentException("Cannot iterate elements in dimension '" + dimensionIdx + + "' of array with shape " + shape()); + } + if (rank() == 0 && dimensionIdx < 0) { + return new SingleElementSequence<>(this); + } + DimensionalSpace elemDims = dimensions().from(dimensionIdx + 1); + try { + DataBufferWindow> elemWindow = buffer().window(elemDims.physicalSize()); + U element = instantiate(elemWindow.buffer(), elemDims); + return new FastElementSequence(this, dimensionIdx, element, elemWindow); + } catch (UnsupportedOperationException e) { + // If buffer windows are not supported, fallback to slicing (and slower) sequence + return new SlicingElementSequence<>(this, dimensionIdx, elemDims); + } + } + + @Override + public U slice(long position, DimensionalSpace sliceDimensions) { + DataBuffer sliceBuffer = buffer().slice(position, sliceDimensions.physicalSize()); + return instantiate(sliceBuffer, sliceDimensions); + } + + @Override + public U slice(Index... indices) { + if (indices == null) { + throw new IllegalArgumentException("Slicing requires at least one index"); + } + RelativeDimensionalSpace sliceDimensions = dimensions().mapTo(indices); + return slice(sliceDimensions.position(), sliceDimensions); + } + + @Override + public U get(long... coords) { + return slice(positionOf(coords, false), dimensions().from(coords.length)); + } + + @Override + public T getObject(long... coords) { + return buffer().getObject(positionOf(coords, true)); + } + + @Override + public U set(NdArray src, long... coordinates) { + src.copyTo((coordinates == null || coordinates.length == 0) ? this : get(coordinates)); + return (U)this; + } + + @Override + public U setObject(T value, long... coords) { + buffer().setObject(value, positionOf(coords, true)); + return (U)this; + } + + @Override + public U read(DataBuffer dst) { + Validator.readToBufferArgs(this, dst); + DataTransfer.execute(buffer(), dimensions(), dst, DataTransfer::ofValue); + return (U)this; + } + + @Override + public U write(DataBuffer src) { + Validator.writeFromBufferArgs(this, src); + DataTransfer.execute(src, buffer(), dimensions(), DataTransfer::ofValue); + return (U)this; + } + + @Override + public int hashCode() { + if (dimensions().isSegmented()) { + return slowHashCode(); + } + final int prime = 31; + int result = 1; + result = prime * result + buffer().hashCode(); + result = prime * result + shape().hashCode(); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (!(obj instanceof AbstractDenseNdArray)) { + return super.equals(obj); + } + AbstractDenseNdArray other = (AbstractDenseNdArray)obj; + if (dimensions().isSegmented() || other.dimensions().isSegmented()) { + return slowEquals(other); + } + if (!shape().equals(other.shape())) { + return false; + } + return buffer().equals(other.buffer()); + } + + protected AbstractDenseNdArray(DimensionalSpace dimensions) { + super(dimensions); + } + + abstract protected DataBuffer buffer(); + + abstract U instantiate(DataBuffer buffer, DimensionalSpace dimensions); + + long positionOf(long[] coords, boolean isValue) { + if (coords == null || coords.length == 0) { + return 0; + } + Validator.coordinates(dimensions, coords, isValue); + return dimensions.positionOf(coords); + } + + @Override + protected void slowCopyTo(NdArray array) { + if (array instanceof AbstractDenseNdArray) { + AbstractDenseNdArray dst = (AbstractDenseNdArray)array; + long offset = 0L; + for (NdArray s : scalars()) { + dst.buffer().setObject(s.getObject(), offset++); + } + } else { + super.slowCopyTo(array); + } + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/BooleanDenseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/BooleanDenseNdArray.java new file mode 100644 index 00000000000..0764146f962 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/BooleanDenseNdArray.java @@ -0,0 +1,91 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.dense; + +import org.tensorflow.ndarray.BooleanNdArray; +import org.tensorflow.ndarray.NdArray; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.buffer.BooleanDataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; + +public class BooleanDenseNdArray extends AbstractDenseNdArray + implements BooleanNdArray { + + public static BooleanNdArray create(BooleanDataBuffer buffer, Shape shape) { + Validator.denseShape(buffer, shape); + return new BooleanDenseNdArray(buffer, shape); + } + + @Override + public boolean getBoolean(long... indices) { + return buffer.getBoolean(positionOf(indices, true)); + } + + @Override + public BooleanNdArray setBoolean(boolean value, long... indices) { + buffer.setBoolean(value, positionOf(indices, true)); + return this; + } + + @Override + public BooleanNdArray copyTo(NdArray dst) { + Validator.copyToNdArrayArgs(this, dst); + if (dst instanceof BooleanDenseNdArray) { + BooleanDenseNdArray booleanDst = (BooleanDenseNdArray)dst; + DataTransfer.execute(buffer, dimensions(), booleanDst.buffer, booleanDst.dimensions(), DataTransfer::ofBoolean); + } else { + slowCopyTo(dst); + } + return this; + } + + @Override + public BooleanNdArray read(BooleanDataBuffer dst) { + Validator.readToBufferArgs(this, dst); + DataTransfer.execute(buffer, dimensions(), dst, DataTransfer::ofBoolean); + return this; + } + + @Override + public BooleanNdArray write(BooleanDataBuffer src) { + Validator.writeFromBufferArgs(this, src); + DataTransfer.execute(src, buffer, dimensions(), DataTransfer::ofBoolean); + return this; + } + + protected BooleanDenseNdArray(BooleanDataBuffer buffer, Shape shape) { + this(buffer, DimensionalSpace.create(shape)); + } + + @Override + BooleanDenseNdArray instantiate(DataBuffer buffer, DimensionalSpace dimensions) { + return new BooleanDenseNdArray((BooleanDataBuffer)buffer, dimensions); + } + + @Override + protected BooleanDataBuffer buffer() { + return buffer; + } + + private final BooleanDataBuffer buffer; + + private BooleanDenseNdArray(BooleanDataBuffer buffer, DimensionalSpace dimensions) { + super(dimensions); + this.buffer = buffer; + } +} \ No newline at end of file diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ByteDenseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ByteDenseNdArray.java new file mode 100644 index 00000000000..172432b5939 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ByteDenseNdArray.java @@ -0,0 +1,91 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.dense; + +import org.tensorflow.ndarray.ByteNdArray; +import org.tensorflow.ndarray.NdArray; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.buffer.ByteDataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; + +public class ByteDenseNdArray extends AbstractDenseNdArray + implements ByteNdArray { + + public static ByteNdArray create(ByteDataBuffer buffer, Shape shape) { + Validator.denseShape(buffer, shape); + return new ByteDenseNdArray(buffer, shape); + } + + @Override + public byte getByte(long... indices) { + return buffer.getByte(positionOf(indices, true)); + } + + @Override + public ByteNdArray setByte(byte value, long... indices) { + buffer.setByte(value, positionOf(indices, true)); + return this; + } + + @Override + public ByteNdArray copyTo(NdArray dst) { + Validator.copyToNdArrayArgs(this, dst); + if (dst instanceof ByteDenseNdArray) { + ByteDenseNdArray byteDst = (ByteDenseNdArray)dst; + DataTransfer.execute(buffer, dimensions(), byteDst.buffer, byteDst.dimensions(), DataTransfer::ofByte); + } else { + slowCopyTo(dst); + } + return this; + } + + @Override + public ByteNdArray read(ByteDataBuffer dst) { + Validator.readToBufferArgs(this, dst); + DataTransfer.execute(buffer, dimensions(), dst, DataTransfer::ofByte); + return this; + } + + @Override + public ByteNdArray write(ByteDataBuffer src) { + Validator.writeFromBufferArgs(this, src); + DataTransfer.execute(src, buffer, dimensions(), DataTransfer::ofByte); + return this; + } + + protected ByteDenseNdArray(ByteDataBuffer buffer, Shape shape) { + this(buffer, DimensionalSpace.create(shape)); + } + + @Override + ByteDenseNdArray instantiate(DataBuffer buffer, DimensionalSpace dimensions) { + return new ByteDenseNdArray((ByteDataBuffer)buffer, dimensions); + } + + @Override + protected ByteDataBuffer buffer() { + return buffer; + } + + private final ByteDataBuffer buffer; + + private ByteDenseNdArray(ByteDataBuffer buffer, DimensionalSpace dimensions) { + super(dimensions); + this.buffer = buffer; + } +} \ No newline at end of file diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DataTransfer.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DataTransfer.java new file mode 100644 index 00000000000..d3afa223231 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DataTransfer.java @@ -0,0 +1,136 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.dense; + +import org.tensorflow.ndarray.buffer.BooleanDataBuffer; +import org.tensorflow.ndarray.buffer.ByteDataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DoubleDataBuffer; +import org.tensorflow.ndarray.buffer.FloatDataBuffer; +import org.tensorflow.ndarray.buffer.IntDataBuffer; +import org.tensorflow.ndarray.buffer.LongDataBuffer; +import org.tensorflow.ndarray.buffer.ShortDataBuffer; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; +import org.tensorflow.ndarray.impl.sequence.PositionIterator; + +final class DataTransfer { + + @FunctionalInterface + interface OfValue> { + void copy(B srcBuffer, long srcIndex, B dstBuffer, long dstIndex); + } + + static > void ofValue(B srcBuf, long srcIdx, B dstBuf, long dstIdx) { + dstBuf.setObject(srcBuf.getObject(srcIdx), dstIdx); + } + + static void ofByte(ByteDataBuffer srcBuf, long srcIdx, ByteDataBuffer dstBuf, long dstIdx) { + dstBuf.setByte(srcBuf.getByte(srcIdx), dstIdx); + } + + static void ofInt(IntDataBuffer srcBuf, long srcIdx, IntDataBuffer dstBuf, long dstIdx) { + dstBuf.setInt(srcBuf.getInt(srcIdx), dstIdx); + } + + static void ofLong(LongDataBuffer srcBuf, long srcIdx, LongDataBuffer dstBuf, long dstIdx) { + dstBuf.setLong(srcBuf.getLong(srcIdx), dstIdx); + } + + static void ofDouble(DoubleDataBuffer srcBuf, long srcIdx, DoubleDataBuffer dstBuf, long dstIdx) { + dstBuf.setDouble(srcBuf.getDouble(srcIdx), dstIdx); + } + + static void ofFloat(FloatDataBuffer srcBuf, long srcIdx, FloatDataBuffer dstBuf, long dstIdx) { + dstBuf.setFloat(srcBuf.getFloat(srcIdx), dstIdx); + } + + static void ofShort(ShortDataBuffer srcBuf, long srcIdx, ShortDataBuffer dstBuf, long dstIdx) { + dstBuf.setShort(srcBuf.getShort(srcIdx), dstIdx); + } + + static void ofBoolean(BooleanDataBuffer srcBuf, long srcIdx, BooleanDataBuffer dstBuf, long dstIdx) { + dstBuf.setBoolean(srcBuf.getBoolean(srcIdx), dstIdx); + } + + static > void execute(B srcBuffer, DimensionalSpace srcDimensions, B dstBuffer, DimensionalSpace dstDimensions, OfValue valueTransfer) { + if (srcDimensions.isSegmented() || dstDimensions.isSegmented()) { + int segmentationIdx = Math.max(srcDimensions.segmentationIdx(), dstDimensions.segmentationIdx()); + copyByElement( + srcBuffer, + PositionIterator.create(srcDimensions, segmentationIdx), + dstBuffer, + PositionIterator.create(dstDimensions, segmentationIdx), + srcDimensions.get(segmentationIdx).elementSize(), + valueTransfer + ); + } else { + srcBuffer.copyTo(dstBuffer, srcDimensions.physicalSize()); + } + } + + static > void execute(B srcBuffer, B dstBuffer, DimensionalSpace dstDimensions, OfValue valueTransfer) { + if (dstDimensions.isSegmented()) { + long elementSize = dstDimensions.get(dstDimensions.segmentationIdx()).elementSize(); + copyByElement( + srcBuffer, + PositionIterator.sequence(elementSize, srcBuffer.size()), + dstBuffer, + PositionIterator.create(dstDimensions, dstDimensions.segmentationIdx()), + elementSize, + valueTransfer + ); + } else { + srcBuffer.copyTo(dstBuffer, dstDimensions.physicalSize()); + } + } + + static > void execute(B srcBuffer, DimensionalSpace srcDimensions, B dstBuffer, OfValue valueTransfer) { + if (srcDimensions.isSegmented()) { + long elementSize = srcDimensions.get(srcDimensions.segmentationIdx()).elementSize(); + copyByElement( + srcBuffer, + PositionIterator.create(srcDimensions, srcDimensions.segmentationIdx()), + dstBuffer, + PositionIterator.sequence(elementSize, dstBuffer.size()), + elementSize, + valueTransfer + ); + } else { + srcBuffer.copyTo(dstBuffer, srcDimensions.physicalSize()); + } + } + + private static > void copyByElement( + B srcBuffer, + PositionIterator srcIterator, + B dstBuffer, + PositionIterator dstIterator, + long elementSize, + OfValue valueTransfer + ) { + if (elementSize == 1) { + while (srcIterator.hasNext()) { + valueTransfer.copy(srcBuffer, srcIterator.nextLong(), dstBuffer, dstIterator.nextLong()); + } + } else { + while (srcIterator.hasNext()) { + srcBuffer.offset(srcIterator.nextLong()).copyTo(dstBuffer.offset(dstIterator.nextLong()), elementSize); + } + } + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DenseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DenseNdArray.java new file mode 100644 index 00000000000..819d95de2fc --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DenseNdArray.java @@ -0,0 +1,63 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.dense; + +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.NdArray; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; + +public class DenseNdArray extends AbstractDenseNdArray> { + + public static NdArray wrap(DataBuffer buffer, Shape shape) { + Validator.denseShape(buffer, shape); + return new DenseNdArray<>(buffer, shape); + } + + @Override + public NdArray copyTo(NdArray dst) { + Validator.copyToNdArrayArgs(this, dst); + if (dst instanceof DenseNdArray) { + DenseNdArray denseDst = (DenseNdArray)dst; + DataTransfer.execute(buffer, dimensions(), denseDst.buffer, denseDst.dimensions(), DataTransfer::ofValue); + } else { + slowCopyTo(dst); + } + return this; + } + + protected DenseNdArray(DataBuffer buffer, Shape shape) { + this(buffer, DimensionalSpace.create(shape)); + } + + @Override + DenseNdArray instantiate(DataBuffer buffer, DimensionalSpace dimensions) { + return new DenseNdArray<>(buffer, dimensions); + } + + @Override + protected DataBuffer buffer() { + return buffer; + } + + private final DataBuffer buffer; + + private DenseNdArray(DataBuffer buffer, DimensionalSpace dimensions) { + super(dimensions); + this.buffer = buffer; + } +} \ No newline at end of file diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DoubleDenseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DoubleDenseNdArray.java new file mode 100644 index 00000000000..f54b8d0347a --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DoubleDenseNdArray.java @@ -0,0 +1,91 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.dense; + +import org.tensorflow.ndarray.DoubleNdArray; +import org.tensorflow.ndarray.NdArray; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DoubleDataBuffer; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; + +public class DoubleDenseNdArray extends AbstractDenseNdArray + implements DoubleNdArray { + + public static DoubleNdArray create(DoubleDataBuffer buffer, Shape shape) { + Validator.denseShape(buffer, shape); + return new DoubleDenseNdArray(buffer, shape); + } + + @Override + public double getDouble(long... indices) { + return buffer.getDouble(positionOf(indices, true)); + } + + @Override + public DoubleNdArray setDouble(double value, long... indices) { + buffer.setDouble(value, positionOf(indices, true)); + return this; + } + + @Override + public DoubleNdArray copyTo(NdArray dst) { + Validator.copyToNdArrayArgs(this, dst); + if (dst instanceof DoubleDenseNdArray) { + DoubleDenseNdArray doubleDst = (DoubleDenseNdArray)dst; + DataTransfer.execute(buffer, dimensions(), doubleDst.buffer, doubleDst.dimensions(), DataTransfer::ofDouble); + } else { + slowCopyTo(dst); + } + return this; + } + + @Override + public DoubleNdArray read(DoubleDataBuffer dst) { + Validator.readToBufferArgs(this, dst); + DataTransfer.execute(buffer, dimensions(), dst, DataTransfer::ofDouble); + return this; + } + + @Override + public DoubleNdArray write(DoubleDataBuffer src) { + Validator.writeFromBufferArgs(this, src); + DataTransfer.execute(src, buffer, dimensions(), DataTransfer::ofDouble); + return this; + } + + protected DoubleDenseNdArray(DoubleDataBuffer buffer, Shape shape) { + this(buffer, DimensionalSpace.create(shape)); + } + + @Override + DoubleDenseNdArray instantiate(DataBuffer buffer, DimensionalSpace dimensions) { + return new DoubleDenseNdArray((DoubleDataBuffer)buffer, dimensions); + } + + @Override + protected DoubleDataBuffer buffer() { + return buffer; + } + + private final DoubleDataBuffer buffer; + + private DoubleDenseNdArray(DoubleDataBuffer buffer, DimensionalSpace dimensions) { + super(dimensions); + this.buffer = buffer; + } +} \ No newline at end of file diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/FloatDenseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/FloatDenseNdArray.java new file mode 100644 index 00000000000..196b5ef8b11 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/FloatDenseNdArray.java @@ -0,0 +1,91 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.dense; + +import org.tensorflow.ndarray.FloatNdArray; +import org.tensorflow.ndarray.NdArray; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.FloatDataBuffer; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; + +public class FloatDenseNdArray extends AbstractDenseNdArray + implements FloatNdArray { + + public static FloatNdArray create(FloatDataBuffer buffer, Shape shape) { + Validator.denseShape(buffer, shape); + return new FloatDenseNdArray(buffer, shape); + } + + @Override + public float getFloat(long... indices) { + return buffer.getFloat(positionOf(indices, true)); + } + + @Override + public FloatNdArray setFloat(float value, long... indices) { + buffer.setFloat(value, positionOf(indices, true)); + return this; + } + + @Override + public FloatNdArray copyTo(NdArray dst) { + Validator.copyToNdArrayArgs(this, dst); + if (dst instanceof FloatDenseNdArray) { + FloatDenseNdArray floatDst = (FloatDenseNdArray)dst; + DataTransfer.execute(buffer, dimensions(), floatDst.buffer, floatDst.dimensions(), DataTransfer::ofFloat); + } else { + slowCopyTo(dst); + } + return this; + } + + @Override + public FloatNdArray read(FloatDataBuffer dst) { + Validator.readToBufferArgs(this, dst); + DataTransfer.execute(buffer, dimensions(), dst, DataTransfer::ofFloat); + return this; + } + + @Override + public FloatNdArray write(FloatDataBuffer src) { + Validator.writeFromBufferArgs(this, src); + DataTransfer.execute(src, buffer, dimensions(), DataTransfer::ofFloat); + return this; + } + + protected FloatDenseNdArray(FloatDataBuffer buffer, Shape shape) { + this(buffer, DimensionalSpace.create(shape)); + } + + @Override + FloatDenseNdArray instantiate(DataBuffer buffer, DimensionalSpace dimensions) { + return new FloatDenseNdArray((FloatDataBuffer) buffer, dimensions); + } + + @Override + public FloatDataBuffer buffer() { + return buffer; + } + + private final FloatDataBuffer buffer; + + private FloatDenseNdArray(FloatDataBuffer buffer, DimensionalSpace dimensions) { + super(dimensions); + this.buffer = buffer; + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/IntDenseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/IntDenseNdArray.java new file mode 100644 index 00000000000..a7af498dd6f --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/IntDenseNdArray.java @@ -0,0 +1,91 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.dense; + +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.IntDataBuffer; +import org.tensorflow.ndarray.IntNdArray; +import org.tensorflow.ndarray.NdArray; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; + +public class IntDenseNdArray extends AbstractDenseNdArray + implements IntNdArray { + + public static IntNdArray create(IntDataBuffer buffer, Shape shape) { + Validator.denseShape(buffer, shape); + return new IntDenseNdArray(buffer, shape); + } + + @Override + public int getInt(long... indices) { + return buffer.getInt(positionOf(indices, true)); + } + + @Override + public IntNdArray setInt(int value, long... indices) { + buffer.setInt(value, positionOf(indices, true)); + return this; + } + + @Override + public IntNdArray copyTo(NdArray dst) { + Validator.copyToNdArrayArgs(this, dst); + if (dst instanceof IntDenseNdArray) { + IntDenseNdArray intDst = (IntDenseNdArray)dst; + DataTransfer.execute(buffer, dimensions(), intDst.buffer, intDst.dimensions(), DataTransfer::ofInt); + } else { + slowCopyTo(dst); + } + return this; + } + + @Override + public IntNdArray read(IntDataBuffer dst) { + Validator.readToBufferArgs(this, dst); + DataTransfer.execute(buffer, dimensions(), dst, DataTransfer::ofInt); + return this; + } + + @Override + public IntNdArray write(IntDataBuffer src) { + Validator.writeFromBufferArgs(this, src); + DataTransfer.execute(src, buffer, dimensions(), DataTransfer::ofInt); + return this; + } + + protected IntDenseNdArray(IntDataBuffer buffer, Shape shape) { + this(buffer, DimensionalSpace.create(shape)); + } + + @Override + IntDenseNdArray instantiate(DataBuffer buffer, DimensionalSpace dimensions) { + return new IntDenseNdArray((IntDataBuffer)buffer, dimensions); + } + + @Override + protected IntDataBuffer buffer() { + return buffer; + } + + private final IntDataBuffer buffer; + + private IntDenseNdArray(IntDataBuffer buffer, DimensionalSpace dimensions) { + super(dimensions); + this.buffer = buffer; + } +} \ No newline at end of file diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/LongDenseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/LongDenseNdArray.java new file mode 100644 index 00000000000..cd56dadfb2b --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/LongDenseNdArray.java @@ -0,0 +1,91 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.dense; + +import org.tensorflow.ndarray.LongNdArray; +import org.tensorflow.ndarray.NdArray; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.LongDataBuffer; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; + +public class LongDenseNdArray extends AbstractDenseNdArray + implements LongNdArray { + + public static LongNdArray create(LongDataBuffer buffer, Shape shape) { + Validator.denseShape(buffer, shape); + return new LongDenseNdArray(buffer, shape); + } + + @Override + public long getLong(long... indices) { + return buffer.getLong(positionOf(indices, true)); + } + + @Override + public LongNdArray setLong(long value, long... indices) { + buffer.setLong(value, positionOf(indices, true)); + return this; + } + + @Override + public LongNdArray copyTo(NdArray dst) { + Validator.copyToNdArrayArgs(this, dst); + if (dst instanceof LongDenseNdArray) { + LongDenseNdArray longDst = (LongDenseNdArray)dst; + DataTransfer.execute(buffer, dimensions(), longDst.buffer, longDst.dimensions(), DataTransfer::ofLong); + } else { + slowCopyTo(dst); + } + return this; + } + + @Override + public LongNdArray read(LongDataBuffer dst) { + Validator.readToBufferArgs(this, dst); + DataTransfer.execute(buffer, dimensions(), dst, DataTransfer::ofLong); + return this; + } + + @Override + public LongNdArray write(LongDataBuffer src) { + Validator.writeFromBufferArgs(this, src); + DataTransfer.execute(src, buffer, dimensions(), DataTransfer::ofLong); + return this; + } + + protected LongDenseNdArray(LongDataBuffer buffer, Shape shape) { + this(buffer, DimensionalSpace.create(shape)); + } + + @Override + LongDenseNdArray instantiate(DataBuffer buffer, DimensionalSpace dimensions) { + return new LongDenseNdArray((LongDataBuffer)buffer, dimensions); + } + + @Override + protected LongDataBuffer buffer() { + return buffer; + } + + private final LongDataBuffer buffer; + + private LongDenseNdArray(LongDataBuffer buffer, DimensionalSpace dimensions) { + super(dimensions); + this.buffer = buffer; + } +} \ No newline at end of file diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ShortDenseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ShortDenseNdArray.java new file mode 100644 index 00000000000..291c01ac8e1 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ShortDenseNdArray.java @@ -0,0 +1,91 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.dense; + +import org.tensorflow.ndarray.NdArray; +import org.tensorflow.ndarray.ShortNdArray; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.ShortDataBuffer; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; + +public class ShortDenseNdArray extends AbstractDenseNdArray + implements ShortNdArray { + + public static ShortNdArray create(ShortDataBuffer buffer, Shape shape) { + Validator.denseShape(buffer, shape); + return new ShortDenseNdArray(buffer, shape); + } + + @Override + public short getShort(long... indices) { + return buffer.getShort(positionOf(indices, true)); + } + + @Override + public ShortNdArray setShort(short value, long... indices) { + buffer.setShort(value, positionOf(indices, true)); + return this; + } + + @Override + public ShortNdArray copyTo(NdArray dst) { + Validator.copyToNdArrayArgs(this, dst); + if (dst instanceof ShortDenseNdArray) { + ShortDenseNdArray shortDst = (ShortDenseNdArray)dst; + DataTransfer.execute(buffer, dimensions(), shortDst.buffer, shortDst.dimensions(), DataTransfer::ofShort); + } else { + slowCopyTo(dst); + } + return this; + } + + @Override + public ShortNdArray read(ShortDataBuffer dst) { + Validator.readToBufferArgs(this, dst); + DataTransfer.execute(buffer, dimensions(), dst, DataTransfer::ofShort); + return this; + } + + @Override + public ShortNdArray write(ShortDataBuffer src) { + Validator.writeFromBufferArgs(this, src); + DataTransfer.execute(src, buffer, dimensions(), DataTransfer::ofShort); + return this; + } + + protected ShortDenseNdArray(ShortDataBuffer buffer, Shape shape) { + this(buffer, DimensionalSpace.create(shape)); + } + + @Override + ShortDenseNdArray instantiate(DataBuffer buffer, DimensionalSpace dimensions) { + return new ShortDenseNdArray((ShortDataBuffer)buffer, dimensions); + } + + @Override + protected ShortDataBuffer buffer() { + return buffer; + } + + private final ShortDataBuffer buffer; + + private ShortDenseNdArray(ShortDataBuffer buffer, DimensionalSpace dimensions) { + super(dimensions); + this.buffer = buffer; + } +} \ No newline at end of file diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/Validator.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/Validator.java new file mode 100644 index 00000000000..b0bcae252fb --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/Validator.java @@ -0,0 +1,49 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.dense; + +import org.tensorflow.ndarray.IllegalRankException; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; + +final class Validator extends org.tensorflow.ndarray.impl.Validator { + + static void coordinates(DimensionalSpace dimensions, long[] coords, + boolean isValue) { + if (coords.length > dimensions.numDimensions()) { + throw new IndexOutOfBoundsException(); + } + if (isValue && coords.length != dimensions.numDimensions()) { + throw new IllegalRankException("Not a scalar value"); + } + } + + static void denseShape(DataBuffer buffer, Shape shape) { + if (shape == null) { + throw new IllegalArgumentException("Shape cannot be null"); + } + if (shape.hasUnknownDimension()) { + throw new IllegalArgumentException("Dense arrays cannot have unknown dimension(s)"); + } + if (buffer.size() < shape.size()) { + throw new IllegalArgumentException("Buffer size is smaller than the shape size"); + }; + } + + private Validator() {} +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/AbstractDimension.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/AbstractDimension.java new file mode 100644 index 00000000000..f2a0fb05b6e --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/AbstractDimension.java @@ -0,0 +1,45 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.dimension; + +abstract class AbstractDimension implements Dimension { + + /** + * Dimensions are known to be equal if they have the same number of elements + */ + @Override + public int hashCode() { + final int prime = 17; + long numElements = numElements(); + return 31 * prime + (int)(numElements ^ (numElements >>> 32)); + } + + /** + * Dimensions are known to be equal if they have the same number of elements + */ + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj instanceof Dimension) { + Dimension otherDimension = (Dimension) obj; + return numElements() == otherDimension.numElements(); + } + return false; + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/Axis.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/Axis.java new file mode 100644 index 00000000000..91973c752a1 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/Axis.java @@ -0,0 +1,61 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.dimension; + +final class Axis extends AbstractDimension { + + @Override + public long numElements() { + return numElements; + } + + @Override + public long positionOf(long coord) { + if (coord >= numElements) { + throw new IndexOutOfBoundsException(); + } + return elementSize * coord; + } + + @Override + public boolean isSegmented() { + return false; // all axis are continuous + } + + @Override + public long elementSize() { + return elementSize; + } + + @Override + public long physicalSize() { + return elementSize * numElements; + } + + @Override + public String toString() { + return String.valueOf(numElements); + } + + Axis(long numElements, long elementSize) { + this.numElements = numElements; + this.elementSize = elementSize; + } + + private final long numElements; + private final long elementSize; +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/Dimension.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/Dimension.java new file mode 100644 index 00000000000..cbae2d897a8 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/Dimension.java @@ -0,0 +1,36 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.dimension; + +import org.tensorflow.ndarray.index.Index; + +public interface Dimension { + + default Dimension withIndex(Index index) { + return new IndexedDimension(index, this); + } + + long numElements(); + + long elementSize(); + + long physicalSize(); + + long positionOf(long coord); + + boolean isSegmented(); +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/DimensionalSpace.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/DimensionalSpace.java new file mode 100644 index 00000000000..7d0f0222bbe --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/DimensionalSpace.java @@ -0,0 +1,224 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ + +package org.tensorflow.ndarray.impl.dimension; + +import java.util.Arrays; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.index.Index; + +public class DimensionalSpace { + + public static DimensionalSpace create(Shape shape) { + Dimension[] dimensions = new Dimension[shape.numDimensions()]; + + // Start from the last dimension, where all elements are continuous + for (int i = dimensions.length - 1, elementSize = 1; i >= 0; --i) { + dimensions[i] = new Axis(shape.size(i), elementSize); + elementSize *= dimensions[i].numElements(); + } + return new DimensionalSpace(dimensions, shape); + } + + public RelativeDimensionalSpace mapTo(Index[] indices) { + if (dimensions == null) { + throw new ArrayIndexOutOfBoundsException(); + } + int dimIdx = 0; + int indexIdx = 0; + int newDimIdx = 0; + int segmentationIdx = -1; + long initialOffset = 0; + + int newAxes = 0; + boolean seenEllipsis = false; + for (Index idx : indices) { + if (idx.isNewAxis()) { + newAxes += 1; + } + if (idx.isEllipsis()) { + if (seenEllipsis) { + throw new IllegalArgumentException("Only one ellipsis allowed"); + } else { + seenEllipsis = true; + } + } + } + int newLength = dimensions.length + newAxes; + + Dimension[] newDimensions = new Dimension[newLength]; + while (indexIdx < indices.length) { + + if (indices[indexIdx].isPoint()) { + // When an index targets a single point in a given dimension, calculate the offset of this + // point and cumulate the offset of any subsequent point as well + long offset = 0; + do { + offset += indices[indexIdx].mapCoordinate(0, dimensions[dimIdx]); + dimIdx++; + } while (++indexIdx < indices.length && indices[indexIdx].isPoint()); + + // If this is the first index, then the offset is the position of the whole dimension + // space within the original one. If not, then we apply the offset to the last vectorial + // dimension + if (newDimIdx == 0) { + initialOffset = offset; + } else { + long reducedSize = dimensions[dimIdx - 1].elementSize(); + newDimensions[newDimIdx - 1] = new ReducedDimension(newDimensions[newDimIdx - 1], offset, reducedSize); + segmentationIdx = newDimIdx - 1; + } + + } else if (indices[indexIdx].isNewAxis()) { + long newSize; + if (dimIdx == 0) { + // includes everything. Should really include future reduction (at()) but that doesn't seem to cause issues + // elsewhere + newSize = dimensions[0].numElements() * dimensions[0].elementSize(); + } else { + newSize = dimensions[dimIdx - 1].elementSize(); + } + + newDimensions[newDimIdx] = new Axis(1, newSize); + segmentationIdx = newDimIdx; // is this correct? + ++newDimIdx; + ++indexIdx; + } else if (indices[indexIdx].isEllipsis()) { + int remainingDimensions = dimensions.length - dimIdx; + int requiredDimensions = 0; + for (int i = indexIdx + 1; i < indices.length; i++) { + if (!indices[i].isNewAxis()) { + requiredDimensions++; + } + } + // while the number of dimensions left < the number of indices that consume axes + while (remainingDimensions > requiredDimensions) { + Dimension dim = dimensions[dimIdx++]; + if (dim.isSegmented()) { + segmentationIdx = newDimIdx; + } + newDimensions[newDimIdx++] = dim; + remainingDimensions--; + } + indexIdx++; + } else { + // Map any other index to the appropriate dimension of this space + Dimension newDimension = indices[indexIdx].apply(dimensions[dimIdx++]); + newDimensions[newDimIdx] = newDimension; + if (newDimension.isSegmented()) { + segmentationIdx = newDimIdx; + } + ++newDimIdx; + ++indexIdx; + } + } + + // When the number of indices provided is smaller than the number of dimensions in this space, + // we copy the remaining dimensions directly to the new space as well. + for (; dimIdx < dimensions.length; ++dimIdx, ++newDimIdx) { + Dimension dim = dimensions[dimIdx]; + newDimensions[newDimIdx] = dim; + if (dim.isSegmented()) { + segmentationIdx = newDimIdx; + } + } + return new RelativeDimensionalSpace(Arrays.copyOf(newDimensions, newDimIdx), segmentationIdx, initialOffset); + } + + public DimensionalSpace from(int dimensionStart) { + if (dimensionStart > dimensions.length) { + throw new IndexOutOfBoundsException(); + } + Dimension[] newDimensions = Arrays.copyOfRange(dimensions, dimensionStart, dimensions.length); + if (segmentationIdx > dimensionStart) { + return new DimensionalSpace(newDimensions, segmentationIdx - dimensionStart); + } + return new DimensionalSpace(newDimensions); + } + + public Shape shape() { + if (shape == null) { + shape = toShape(dimensions); + } + return shape; + } + + public int numDimensions() { + return dimensions.length; + } + + public long numElements(int i) { + return dimensions[i].numElements(); + } + + public long physicalSize() { + return dimensions.length > 0 ? dimensions[0].physicalSize() : 1; // dimensions.length == 0 for scalars + } + + public Dimension get(int i) { + return dimensions[i]; + } + + public boolean isSegmented() { + return segmentationIdx >= 0; + } + + public int segmentationIdx() { + return segmentationIdx; + } + + public long positionOf(long[] coords) { + long position = 0L; + for (int i = 0; i < coords.length; ++i) { + position += dimensions[i].positionOf(coords[i]); + } + return position; + } + + /** Succinct description of the shape meant for debugging. */ + @Override + public String toString() { + return Arrays.toString(dimensions); + } + + DimensionalSpace(Dimension[] dimensions, int segmentationIdx) { + this.dimensions = dimensions; + this.segmentationIdx = segmentationIdx; + } + + private DimensionalSpace(Dimension[] dimensions) { + this(dimensions, -1); + } + + private DimensionalSpace(Dimension[] dimensions, Shape shape) { + this(dimensions); + this.shape = shape; + } + + private final Dimension[] dimensions; + private final int segmentationIdx; + private Shape shape; + + private static Shape toShape(Dimension[] dimensions) { + long[] shapeDimSizes = new long[dimensions.length]; + int i = 0; + for (Dimension dimension : dimensions) { + shapeDimSizes[i++] = dimension.numElements(); + } + return Shape.of(shapeDimSizes); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/IndexedDimension.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/IndexedDimension.java new file mode 100644 index 00000000000..2b609bc3535 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/IndexedDimension.java @@ -0,0 +1,69 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.dimension; + +import org.tensorflow.ndarray.index.Index; + +final class IndexedDimension extends AbstractDimension { + + @Override + public long numElements() { + return numElements; + } + + @Override + public long positionOf(long coord) { + if (coord >= numElements()) { + throw new IndexOutOfBoundsException(); + } + return originalDimension.positionOf(index.mapCoordinate(coord, originalDimension)); + } + + @Override + public boolean isSegmented() { + // TODO (karllessard) for now we consider all indexed dimensions as segmented but might depend + // on the actual index + return true; + } + + @Override + public long elementSize() { + return originalDimension.elementSize(); // indices do not change the size of an inner element + } + + @Override + public long physicalSize() { + // TODO (karllessard) we consider this dimension takes the same amount of memory that the + // original one but might depend on the actual index + return originalDimension.physicalSize(); + } + + @Override + public String toString() { + return String.valueOf(numElements()); + } + + IndexedDimension(Index index, Dimension originalDimension) { + this.index = index; + this.originalDimension = originalDimension; + this.numElements = index.numElements(originalDimension); + } + + private final Index index; + private final Dimension originalDimension; + private final long numElements; +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/ReducedDimension.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/ReducedDimension.java new file mode 100644 index 00000000000..4b5cb1adcf8 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/ReducedDimension.java @@ -0,0 +1,62 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.dimension; + +final class ReducedDimension extends AbstractDimension { + + @Override + public long numElements() { + return originalDimension.numElements(); + } + + @Override + public long positionOf(long coord) { + return originalDimension.positionOf(coord) + offset; + } + + @Override + public boolean isSegmented() { + return true; + } + + @Override + public long elementSize() { + return elementSize; + } + + @Override + public long physicalSize() { + // We simplify the computation by assuming that a reduced dimension takes the same amount of + // memory than the original one + return originalDimension.physicalSize(); + } + + @Override + public String toString() { + return String.valueOf(numElements()); + } + + ReducedDimension(Dimension originalDimension, long offset, long elementSize) { + this.originalDimension = originalDimension; + this.offset = offset; + this.elementSize = elementSize; + } + + private final Dimension originalDimension; + private final long offset; + private final long elementSize; +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/RelativeDimensionalSpace.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/RelativeDimensionalSpace.java new file mode 100644 index 00000000000..4259bbcf76e --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/RelativeDimensionalSpace.java @@ -0,0 +1,32 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ + +package org.tensorflow.ndarray.impl.dimension; + +public class RelativeDimensionalSpace extends DimensionalSpace { + + public long position() { + return position; + } + + RelativeDimensionalSpace(Dimension[] dimensions, int segmentationIdx, long position) { + super(dimensions, segmentationIdx); + this.position = position; + } + + private long position; +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/CoordinatesIncrementor.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/CoordinatesIncrementor.java new file mode 100644 index 00000000000..8c9c9f86f4c --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/CoordinatesIncrementor.java @@ -0,0 +1,38 @@ +/* + * Copyright 2020 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.sequence; + +final class CoordinatesIncrementor { + + boolean increment() { + for (int i = coords.length - 1; i >= 0; --i) { + if ((coords[i] = (coords[i] + 1) % shape[i]) > 0) { + return true; + } + } + return false; + } + + CoordinatesIncrementor(long[] shape, int dimensionIdx) { + this.shape = shape; + this.coords = new long[dimensionIdx + 1]; + } + + final long[] shape; + final long[] coords; +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/FastElementSequence.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/FastElementSequence.java new file mode 100644 index 00000000000..92cebeb2338 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/FastElementSequence.java @@ -0,0 +1,81 @@ +/* + * Copyright 2020 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.sequence; + +import java.util.Iterator; +import java.util.function.BiConsumer; + +import org.tensorflow.ndarray.NdArray; +import org.tensorflow.ndarray.NdArraySequence; +import org.tensorflow.ndarray.buffer.DataBufferWindow; +import org.tensorflow.ndarray.impl.AbstractNdArray; + +/** + * A sequence recycling the same {@code NdArray} instance when iterating its elements + * + * @param Type of the elements + * @param Type of the {@code NdArray} with this sequence + */ +public final class FastElementSequence> implements NdArraySequence { + + public FastElementSequence(AbstractNdArray ndArray, int dimensionIdx, U element, DataBufferWindow elementWindow) { + this.ndArray = ndArray; + this.dimensionIdx = dimensionIdx; + this.element = element; + this.elementWindow = elementWindow; + } + + @Override + public Iterator iterator() { + return new SequenceIterator(); + } + + @Override + public void forEachIndexed(BiConsumer consumer) { + PositionIterator.createIndexed(ndArray.dimensions(), dimensionIdx).forEachIndexed((long[] coords, long position) -> { + elementWindow.slideTo(position); + consumer.accept(coords, element); + }); + } + + @Override + public NdArraySequence asSlices() { + return new SlicingElementSequence(ndArray, dimensionIdx); + } + + private class SequenceIterator implements Iterator { + + @Override + public boolean hasNext() { + return positionIterator.hasNext(); + } + + @Override + public U next() { + elementWindow.slideTo(positionIterator.nextLong()); + return element; + } + + private final PositionIterator positionIterator = PositionIterator.create(ndArray.dimensions(), dimensionIdx); + } + + private final AbstractNdArray ndArray; + private final int dimensionIdx; + private final U element; + private final DataBufferWindow elementWindow; +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/IndexedPositionIterator.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/IndexedPositionIterator.java new file mode 100644 index 00000000000..30ece1599b6 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/IndexedPositionIterator.java @@ -0,0 +1,28 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.sequence; + +public interface IndexedPositionIterator extends PositionIterator { + + @FunctionalInterface + interface CoordsLongConsumer { + void consume(long[] coords, long position); + } + + void forEachIndexed(CoordsLongConsumer consumer); +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/IndexedSequentialPositionIterator.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/IndexedSequentialPositionIterator.java new file mode 100644 index 00000000000..80b3de681bd --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/IndexedSequentialPositionIterator.java @@ -0,0 +1,51 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.sequence; + +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; + +class IndexedSequentialPositionIterator extends SequentialPositionIterator implements IndexedPositionIterator { + + @Override + public void forEachIndexed(CoordsLongConsumer consumer) { + while (hasNext()) { + consumer.consume(coords, nextLong()); + incrementCoords(); + } + } + + private void incrementCoords() { + for (int i = coords.length - 1; i >= 0; --i) { + if (coords[i] < shape[i] - 1) { + coords[i] += 1L; + return; + } + coords[i] = 0L; + } + } + + IndexedSequentialPositionIterator(DimensionalSpace dimensions, int dimensionIdx) { + super(dimensions, dimensionIdx); + this.shape = dimensions.shape().asArray(); + this.coords = new long[dimensionIdx + 1]; + //this.coordsIncrementor = new CoordinatesIncrementor(dimensions.shape().asArray(), dimensionIdx); + } + + private final long[] shape; + private final long[] coords; +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/NdPositionIterator.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/NdPositionIterator.java new file mode 100644 index 00000000000..789474c58ae --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/NdPositionIterator.java @@ -0,0 +1,70 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.sequence; + +import java.util.NoSuchElementException; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; + +class NdPositionIterator implements IndexedPositionIterator { + + @Override + public boolean hasNext() { + return coords != null; + } + + @Override + public long nextLong() { + if (!hasNext()) { + throw new NoSuchElementException(); + } + long position = dimensions.positionOf(coords); + increment(); + return position; + } + + @Override + public void forEachIndexed(CoordsLongConsumer consumer) { + while (hasNext()) { + consumer.consume(coords, dimensions.positionOf(coords)); + increment(); + } + } + + private void increment() { + if (!increment(coords, dimensions)) { + coords = null; + } + } + + static boolean increment(long[] coords, DimensionalSpace dimensions) { + for (int i = coords.length - 1; i >= 0; --i) { + if ((coords[i] = (coords[i] + 1) % dimensions.get(i).numElements()) > 0) { + return true; + } + } + return false; + } + + NdPositionIterator(DimensionalSpace dimensions, int dimensionIdx) { + this.dimensions = dimensions; + this.coords = new long[dimensionIdx + 1]; + } + + private final DimensionalSpace dimensions; + private long[] coords; +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/PositionIterator.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/PositionIterator.java new file mode 100644 index 00000000000..83ed940563c --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/PositionIterator.java @@ -0,0 +1,42 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.sequence; + +import java.util.PrimitiveIterator; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; + +public interface PositionIterator extends PrimitiveIterator.OfLong { + + static PositionIterator create(DimensionalSpace dimensions, int dimensionIdx) { + if (dimensions.isSegmented()) { + return new NdPositionIterator(dimensions, dimensionIdx); + } + return new SequentialPositionIterator(dimensions, dimensionIdx); + } + + static IndexedPositionIterator createIndexed(DimensionalSpace dimensions, int dimensionIdx) { + if (dimensions.isSegmented()) { + return new NdPositionIterator(dimensions, dimensionIdx); + } + return new IndexedSequentialPositionIterator(dimensions, dimensionIdx); + } + + static PositionIterator sequence(long stride, long end) { + return new SequentialPositionIterator(stride, end); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/SequentialPositionIterator.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/SequentialPositionIterator.java new file mode 100644 index 00000000000..65c6fc966cc --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/SequentialPositionIterator.java @@ -0,0 +1,55 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.sequence; + +import java.util.NoSuchElementException; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; + +class SequentialPositionIterator implements PositionIterator { + + @Override + public boolean hasNext() { + return index < end; + } + + @Override + public long nextLong() { + if (!hasNext()) { + throw new NoSuchElementException(); + } + return stride * index++; + } + + SequentialPositionIterator(DimensionalSpace dimensions, int dimensionIdx) { + long size = 1; + for (int i = 0; i <= dimensionIdx; ++i) { + size *= dimensions.get(i).numElements(); + } + this.stride = dimensions.get(dimensionIdx).elementSize(); + this.end = size; + } + + SequentialPositionIterator(long stride, long end) { + this.stride = stride; + this.end = end; + } + + private final long stride; + private final long end; + private long index; +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/SingleElementSequence.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/SingleElementSequence.java new file mode 100644 index 00000000000..59525bf486b --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/SingleElementSequence.java @@ -0,0 +1,71 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.sequence; + +import java.util.Iterator; +import java.util.function.BiConsumer; +import org.tensorflow.ndarray.IllegalRankException; +import org.tensorflow.ndarray.NdArray; +import org.tensorflow.ndarray.NdArraySequence; +import org.tensorflow.ndarray.impl.AbstractNdArray; + +/** + * A sequence of one single element + * + * @param Type of the element + * @param Type of the {@code NdArray} with this sequence + */ +public final class SingleElementSequence> implements NdArraySequence { + + public SingleElementSequence(AbstractNdArray ndArray) { + this.ndArray = ndArray; + } + + @Override + public Iterator iterator() { + return new Iterator() { + + @Override + public boolean hasNext() { + return element != null; + } + + @Override + public U next() { + U ret = element; + element = null; + return ret; + } + + @SuppressWarnings("unchecked") + private U element = (U)ndArray; + }; + } + + @Override + public NdArraySequence asSlices() { + return this; // no need to slice, as there are only one element + } + + @Override + public void forEachIndexed(BiConsumer consumer) { + throw new IllegalRankException("Single element has no coordinates to iterate on, use forEach()"); + } + + private final AbstractNdArray ndArray; +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/SlicingElementSequence.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/SlicingElementSequence.java new file mode 100644 index 00000000000..6fe8398ea70 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/SlicingElementSequence.java @@ -0,0 +1,77 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.sequence; + +import java.util.Iterator; +import java.util.function.BiConsumer; +import org.tensorflow.ndarray.NdArray; +import org.tensorflow.ndarray.NdArraySequence; +import org.tensorflow.ndarray.impl.AbstractNdArray; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; + +/** + * A sequence creating a new {@code NdArray} instance (slice) for each element of an iteration + * + * @param Type of the element + * @param Type of the {@code NdArray} with this sequence + */ +public final class SlicingElementSequence> implements NdArraySequence { + + public SlicingElementSequence(AbstractNdArray ndArray, int dimensionIdx) { + this(ndArray, dimensionIdx, ndArray.dimensions().from(dimensionIdx + 1)); + } + + public SlicingElementSequence(AbstractNdArray ndArray, int dimensionIdx, DimensionalSpace elementDimensions) { + this.ndArray = ndArray; + this.dimensionIdx = dimensionIdx; + this.elementDimensions = elementDimensions; + } + + @Override + public Iterator iterator() { + PositionIterator positionIterator = PositionIterator.create(ndArray.dimensions(), dimensionIdx); + return new Iterator() { + + @Override + public boolean hasNext() { + return positionIterator.hasNext(); + } + + @Override + public U next() { + return ndArray.slice(positionIterator.next(), elementDimensions); + } + }; + } + + @Override + public void forEachIndexed(BiConsumer consumer) { + PositionIterator.createIndexed(ndArray.dimensions(), dimensionIdx).forEachIndexed((long[] coords, long position) -> + consumer.accept(coords, ndArray.slice(position, elementDimensions)) + ); + } + + @Override + public NdArraySequence asSlices() { + return this; + } + + private final AbstractNdArray ndArray; + private final int dimensionIdx; + private final DimensionalSpace elementDimensions; +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/index/All.java b/ndarray/src/main/java/org/tensorflow/ndarray/index/All.java new file mode 100644 index 00000000000..9d3139f3248 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/index/All.java @@ -0,0 +1,57 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.index; + +import org.tensorflow.ndarray.impl.dimension.Dimension; + +final class All implements Index { + + static final All INSTANCE = new All(); + + @Override + public long numElements(Dimension dim) { + return dim.numElements(); + } + + @Override + public long mapCoordinate(long coordinate, Dimension dim) { + return coordinate; + } + + @Override + public Dimension apply(Dimension dim) { + return dim; + } + + private All() { + } + + @Override + public boolean beginMask() { + return true; + } + + @Override + public boolean endMask() { + return true; + } + + @Override + public String toString() { + return All.class.getSimpleName() + "()"; + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/index/At.java b/ndarray/src/main/java/org/tensorflow/ndarray/index/At.java new file mode 100644 index 00000000000..31ce021ddc8 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/index/At.java @@ -0,0 +1,74 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.index; + +import java.util.StringJoiner; +import org.tensorflow.ndarray.impl.dimension.Dimension; + +final class At implements Index { + + @Override + public long numElements(Dimension dim) { + return 1; + } + + @Override + public long mapCoordinate(long coordinate, Dimension dim) { + long coord = this.coord >= 0 ? this.coord : dim.numElements() + this.coord; + return dim.positionOf(coord); + } + + @Override + public Dimension apply(Dimension dim) { + if (!keepDim) { + throw new UnsupportedOperationException("Should be handled in DimensionalSpace."); + } + + return dim.withIndex(this); + } + + @Override + public boolean isPoint() { + return !keepDim; + } + + At(long coord, boolean keepDim) { + this.coord = coord; + this.keepDim = keepDim; + } + + private final long coord; + private final boolean keepDim; + + @Override + public long begin() { + return coord; + } + + @Override + public long end() { + return coord + 1; + } + + @Override + public String toString() { + return new StringJoiner(", ", At.class.getSimpleName() + "(", ")") + .add("coord=" + coord) + .add("keepDim=" + keepDim) + .toString(); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/index/Ellipsis.java b/ndarray/src/main/java/org/tensorflow/ndarray/index/Ellipsis.java new file mode 100644 index 00000000000..d4085735df2 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/index/Ellipsis.java @@ -0,0 +1,48 @@ +/* + Copyright 2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================================== + */ +package org.tensorflow.ndarray.index; + +import org.tensorflow.ndarray.impl.dimension.Dimension; + +final class Ellipsis implements Index { + + static final Ellipsis INSTANCE = new Ellipsis(); + + private Ellipsis() { + + } + + @Override + public long numElements(Dimension dim) { + throw new UnsupportedOperationException("Should be handled in DimensionalSpace."); + } + + @Override + public long mapCoordinate(long coordinate, Dimension dim) { + throw new UnsupportedOperationException("Should be handled in DimensionalSpace."); + } + + @Override + public boolean isEllipsis() { + return true; + } + + @Override + public String toString() { + return Ellipsis.class.getSimpleName() + "()"; + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/index/Hyperslab.java b/ndarray/src/main/java/org/tensorflow/ndarray/index/Hyperslab.java new file mode 100644 index 00000000000..55c4e510748 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/index/Hyperslab.java @@ -0,0 +1,90 @@ +/* + * Copyright 2020 Matteo Di Giovinazzo. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.tensorflow.ndarray.index; + +import java.util.StringJoiner; +import org.tensorflow.ndarray.impl.dimension.Dimension; + +/** + * A hyperslab is a rectangular pattern defined by four arrays. + * + * The {@code start} defines the origin of the hyperslab in the original coordinates. + * The {@code stride} is the number of elements to increment between selected elements. + * A stride of '1' is every element, a stride of '2' is every second element, etc. + * The default stride is 1. + * The {@code count} is the number of elements in the hyperslab selection. + * When the stride is 1, the selection is a hyper rectangle with a corner at {@code start} + * and size {@code count[0]} by {@code count[1]} by ... + * When stride is greater than one, the hyperslab bounded by start and the corners + * defined by {@code stride[n] * count[n]}. + * The {@code block} is a count on the number of repetitions of the hyperslab. + * The default block size is '1', which is one hyperslab. A block of 2 would be + * two hyperslabs in that dimension, with the second starting at {@code start[n]+ (count[n] * stride[n]) + 1}. + * + * @see https://portal.hdfgroup.org/display/HDF5/Reading+From+or+Writing+To+a+Subset+of+a+Dataset + * @see https://portal.hdfgroup.org/display/HDF5/H5S_SELECT_HYPERSLAB + * @see https://support.hdfgroup.org/HDF5/doc1.6/UG/12_Dataspaces.html + * @author Matteo Di Giovinazzo + */ +final class Hyperslab implements Index { + + @Override + public long numElements(Dimension dimension) { + return count * block; + } + + @Override + public long mapCoordinate(long coordinate, Dimension dimension) { + return start + stride * (coordinate / block) + (coordinate % block); + } + + @Override + public Dimension apply(Dimension dim) { + return dim.withIndex(this); + } + + @Override + public boolean isPoint() { + return false; + } + + Hyperslab(long start, long stride, long count, long block) { + this.start = start; + this.stride = stride; + this.count = count; + this.block = block; + } + + private final long start; + private final long stride; + private final long count; + private final long block; + + @Override + public String toString() { + return new StringJoiner(", ", Hyperslab.class.getSimpleName() + "Hyperslab(", ")") + .add("start=" + start) + .add("stride=" + stride) + .add("count=" + count) + .add("block=" + block) + .toString(); + } + + @Override + public boolean isStridedSlicingCompliant() { + return false; + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/index/Index.java b/ndarray/src/main/java/org/tensorflow/ndarray/index/Index.java new file mode 100644 index 00000000000..617ca4d474b --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/index/Index.java @@ -0,0 +1,131 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.index; + +import org.tensorflow.ndarray.NdArray; +import org.tensorflow.ndarray.impl.dimension.Dimension; + +/** + * An index used for slicing a view out of an N-dimensional array. + * + *

A slice, i.e. a reduced view, of an N-dimensional array is obtain by calling + * {@link NdArray#slice(Index...)}, given a list of indices that select which elements on a given dimension should be + * included/excluded from that view. + */ +public interface Index { + + /** + * Returns the number of elements that can be retrieved using this index on the given dimension. + * + *

An index that maps one-by-one all elements of the dimensions will return a value + * equal to {@code dim.numElements()}, while an index that only maps a subset of these will return a smaller value. + * + * @param dim the indexed dimension + * @return number of elements accessible + */ + long numElements(Dimension dim); + + /** + * Transforms an element coordinate to a new coordinate by applying this index to the given dimension. + * + *

For example, if the coordinate is 0 and this index flips the {@code n} elements on this + * dimension, then the returned value will be {@code n-1}. + * + * @param coordinate coordinate to transform + * @param dim dimension the indexed dimension + * @return transformed coordinate + */ + long mapCoordinate(long coordinate, Dimension dim); + + /** + * Applies this index to the given dimension. + * + *

When accessing the elements from the returned dimension, this index will automatically + * apply and may transform the original position. + * + * @param dim dimension to apply this index to + * @return an indexed dimension + */ + default Dimension apply(Dimension dim) { + return dim.withIndex(this); + } + + /** + * Returns true if this index is a single point, reducing the number of dimensions by one + */ + default boolean isPoint() { + return false; + } + + /** + * Returns true if this index is a new axis, adding a dimension of size 1 + */ + default boolean isNewAxis() { + return false; + } + + /** + * Returns true if this index is an ellipsis, expanding to take as many dimensions as possible (and applying all() to + * them) + */ + default boolean isEllipsis() { + return false; + } + + /** + * Get whether the Index supports strided slice style indexing (using start, end, stride, and flags, i.e. TensorFlow's). + */ + default boolean isStridedSlicingCompliant() { + return true; + } + + /** + * Get the start of the index, for strided slice style indexing. + */ + default long begin() { + return 0; + } + + /** + * Get the end of the index, strided slice style indexing. + */ + default long end() { + return 0; + } + + /** + * Get the stride of the index, for strided slice style indexing. + */ + default long stride() { + return 1; + } + + /** + * Get whether the Index should start at the beginning of the dimension, for strided slice style indexing. + */ + default boolean beginMask() { + return false; + } + + /** + * Get whether the Index should end at the beginning of the dimension, for strided slice style indexing. + */ + default boolean endMask() { + return false; + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/index/Indices.java b/ndarray/src/main/java/org/tensorflow/ndarray/index/Indices.java new file mode 100644 index 00000000000..346ab705595 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/index/Indices.java @@ -0,0 +1,363 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.index; + +import org.tensorflow.ndarray.IllegalRankException; +import org.tensorflow.ndarray.NdArray; +import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.buffer.DataBuffers; + +/** + * Helper class for instantiating {@link Index} objects. + */ +public final class Indices { + + /** + * A coordinate that selects a specific element on a given dimension. + * + *

When this index is applied to a given dimension, the dimension is resolved as a + * single element and therefore is excluded from the computation of the rank. + * + *

For example, given a 3D matrix on the axis [x, y, z], if + * {@code matrix.slice(all(), at(0), at(0)}, then the rank of the returned slice is 1 and its number of elements is + * {@code x.numElements()} + * + * @param coord coordinate of the element on the indexed axis + * @return index + */ + public static Index at(long coord) { + return new At(coord, false); + } + + /** + * A coordinate that selects a specific element on a given dimension. + * + *

This is equivalent to call {@link #at(long)} but where the value of the coordinate is + * provided by an N-dimensional array. + * + * @param coord scalar indicating the coordinate of the element on the indexed axis + * @return index + * @throws IllegalRankException if {@code coord} is not a scalar (rank 0) + */ + public static Index at(NdArray coord) { + if (coord.rank() > 0) { + throw new IllegalRankException("Only scalars are accepted as a value index"); + } + return new At(coord.getObject().longValue(), false); + } + + /** + * A coordinate that selects a specific element on a given dimension. + * + *

When this index is applied to a given dimension, the dimension is resolved as a + * single element and therefore, if {@code keepDim} is false, is excluded from the computation of the rank. If {@code} + * keepDim is true, the dimension is collapsed down to one element. + * + *

For example, given a 3D matrix on the axis [x, y, z], if + * {@code matrix.slice(all(), at(0), at(0)}, then the rank of the returned slice is 1 and its number of elements is + * {@code x.numElements()} + * + * @param coord coordinate of the element on the indexed axis + * @param keepDim whether to remove the dimension. + * @return index + */ + public static Index at(long coord, boolean keepDim) { + return new At(coord, keepDim); + } + + /** + * A coordinate that selects a specific element on a given dimension. + * + *

This is equivalent to call {@link #at(long, boolean)} but where the value of the coordinate is + * provided by an N-dimensional array. + *

+ * If {@code} keepDim is true, the dimension is collapsed down to one element instead of being removed. + * + * @param coord scalar indicating the coordinate of the element on the indexed axis + * @param keepDim whether to remove the dimension. + * @return index + * @throws IllegalRankException if {@code coord} is not a scalar (rank 0) + */ + public static Index at(NdArray coord, boolean keepDim) { + if (coord.rank() > 0) { + throw new IllegalRankException("Only scalars are accepted as a value index"); + } + return new At(coord.getObject().longValue(), keepDim); + } + + /** + * An index that returns all elements of a dimension in the original order. + * + *

Applying this index to a given dimension will return the original dimension + * directly. + * + *

For example, given a vector with {@code n} elements, {@code all()} returns + * x0, x1, ..., xn-1 + * + * @return index + */ + public static Index all() { + return All.INSTANCE; + } + + /** + * An index that returns only specific elements on a given dimension. + * + *

For example, given a vector with {@code n} elements on the {@code x} axis, and {@code n > 10}, + * {@code seq(8, 0, 3)} returns x8, x0, x3 + * + * @param coords coordinates of the elements in the sequence + * @return index + */ + public static Index seq(long... coords) { + if (coords == null) { + throw new IllegalArgumentException(); + } + return new Sequence(NdArrays.wrap(Shape.of(coords.length), DataBuffers.of(coords, true, false))); + } + + /** + * An index that returns only specific elements on a given dimension. + * + *

This is equivalent to {@link #seq(long...)} but where the coordinates of the elements in + * the sequence are provided by an N-dimensional array. + * + * @param coords vector of coordinates of the elements in the sequence + * @return index + * @throws IllegalRankException if {@code coords} is not a vector (rank 1) + */ + public static Index seq(NdArray coords) { + if (coords.rank() != 1) { + throw new IllegalRankException("Only vectors are accepted as an element index"); + } + return new Sequence(coords); + } + + /** + * An index that returns only elements found at an even position in the original dimension. + * + *

For example, given a vector with {@code n} elements on the {@code x} axis, and n is even, + * {@code even()} returns x0, x2, ..., xn-2 + * + * @return index + */ + public static Index even() { + return step(2); + } + + /** + * An index that returns only elements found at an odd position in the original dimension. + * + *

For example, given a vector with {@code n} elements on the {@code x} axis, and n is even, + * {@code odd()} returns x1, x3, ..., xn-1 + * + * @return index + */ + public static Index odd() { + return sliceFrom(1, 2); + } + + /** + * An index that skips a fixed amount of coordinates between each values returned. + * + *

For example, given a vector with {@code n} elements on the {@code x} axis, + * {@code step(k)} returns x0, xk, xk*2, ... + * + * @param stride the number of elements between each steps + * @return index + */ + public static Index step(long stride) { + return new Step(stride); + } + + /** + * An index that returns only elements on a given dimension starting at a specific coordinate. + * + *

For example, given a vector with {@code n} elements on the {@code x} axis, and {@code n > k}, + * {@code from(k)} returns xk, xk+1, ..., xn-1 + * + * @param start coordinate of the first element of the sequence + * @return index + */ + public static Index sliceFrom(long start) { + return sliceFrom(start, 1); + } + + /** + * An index that returns only elements on a given dimension starting at a specific coordinate, using the given + * stride. + * + *

For example, given a vector with {@code n} elements on the {@code x} axis, and {@code n > k}, + * {@code from(k)} returns xk, xk+1, ..., xn-1 + * + * @param start coordinate of the first element of the sequence + * @param stride the stride to use + * @return index + * @see #slice(long, long, long) + */ + public static Index sliceFrom(long start, long stride) { + return new SliceFrom(start, stride); + } + + /** + * An index that returns only elements on a given dimension up to a specific coordinate. + * + *

For example, given a vector with {@code n} elements on the {@code x} axis, and {@code n > k}, + * {@code to(k)} returns x0, x1, ..., xk + * + * @param end coordinate of the last element of the sequence (exclusive) + * @return index + */ + public static Index sliceTo(long end) { + return sliceTo(end, 1); + } + + /** + * An index that returns only elements on a given dimension up to a specific coordinate, using the given stride. + * + *

For example, given a vector with {@code n} elements on the {@code x} axis, and {@code n > k}, + * {@code to(k)} returns x0, x1, ..., xk + * + * @param end coordinate of the last element of the sequence (exclusive) + * @param stride the stride to use + * @return index + * @see #slice(long, long, long) + */ + public static Index sliceTo(long end, long stride) { + return new SliceTo(end, stride); + } + + /** + * An index that returns only elements on a given dimension between two coordinates. + * + *

For example, given a vector with {@code n} elements on the {@code x} axis, and {@code n > k > j}, + * {@code range(j, k)} returns xj, xj+1, ..., xk + * + * @param start coordinate of the first element of the sequence + * @param end coordinate of the last element of the sequence (exclusive) + * @return index + */ + public static Index range(long start, long end) { + return slice(start, end); + } + + /** + * An index that returns only elements on a given dimension between two coordinates. + * + *

For example, given a vector with {@code n} elements on the {@code x} axis, and {@code n > k > j}, + * {@code range(j, k)} returns xj, xj+1, ..., xk + * + * @return index + */ + public static Index flip() { + return slice(null, null, -1); + } + + /** + * An index that returns elements according to an hyperslab defined by {@code start}, {@code stride}, {@code count}, + * {@code block}. See {@link Hyperslab}. + * + * @param start Starting location for the hyperslab. + * @param stride The number of elements to separate each element or block to be selected. + * @param count The number of elements or blocks to select along the dimension. + * @param block The size of the block selected from the dimension. + * @return index + */ + public static Index hyperslab(long start, long stride, long count, long block) { + return new Hyperslab(start, stride, count, block); + } + + /** + * An index that inserts a new dimension of size 1 into the resulting array. + * + * @return index + */ + public static Index newAxis() { + return NewAxis.INSTANCE; + } + + /** + * An index that expands to fill all available source dimensions. Works the same as Python's {@code ...}. + * + * @return index + */ + public static Index ellipsis() { + return Ellipsis.INSTANCE; + } + + /** + * An index that returns elements between {@code start} and {@code end}. If {@code start} or {@code end} is {@code + * null}, starts or ends at the beginning or the end, respectively. + *

+ * Analogous to Python's {@code :} slice syntax. + * + * @return index + */ + public static Index slice(long start, long end) { + return slice(start, end, 1); + } + + /** + * An index that returns every {@code stride}-th element between {@code start} and {@code end}. If {@code start} or + * {@code end} is {@code null}, starts or ends at the beginning or the end, respectively. + *

+ * Analogous to Python's {@code :} slice syntax. + * + * @return index + */ + public static Index slice(long start, long end, long stride) { + return new Slice(start, end, stride); + } + + /** + * An index that returns elements between {@code start} and {@code end}. If {@code start} or {@code end} is {@code + * null}, starts or ends at the beginning or the end, respectively. + *

+ * Analogous to Python's {@code :} slice syntax. + * + * @return index + */ + public static Index slice(Long start, Long end) { + return slice(start, end, 1); + } + + /** + * An index that returns every {@code stride}-th element between {@code start} and {@code end}. If {@code start} or + * {@code end} is {@code null}, starts or ends at the beginning or the end, respectively. + *

+ * Analogous to Python's {@code :} slice syntax. + * + * @return index + */ + public static Index slice(Long start, Long end, long stride) { + if (start == null && end == null) { + if (stride == 1) { + return Indices.all(); + } else { + return Indices.step(stride); + } + } else if (start == null) { + return Indices.sliceTo(end, stride); + } else if (end == null) { + return Indices.sliceFrom(start, stride); + } + + return slice(start.longValue(), end.longValue(), stride); + } + +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/index/NewAxis.java b/ndarray/src/main/java/org/tensorflow/ndarray/index/NewAxis.java new file mode 100644 index 00000000000..a68b1ed9ad1 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/index/NewAxis.java @@ -0,0 +1,53 @@ +/* + Copyright 2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================================== + */ +package org.tensorflow.ndarray.index; + +import org.tensorflow.ndarray.impl.dimension.Dimension; + +final class NewAxis implements Index { + + static final NewAxis INSTANCE = new NewAxis(); + + private NewAxis() { + + } + + @Override + public long numElements(Dimension dim) { + return 1; + } + + @Override + public long mapCoordinate(long coordinate, Dimension dim) { + return coordinate; + } + + @Override + public Dimension apply(Dimension dim) { + throw new IllegalStateException(); + } + + @Override + public boolean isNewAxis() { + return true; + } + + @Override + public String toString() { + return NewAxis.class.getSimpleName() + "()"; + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/index/Sequence.java b/ndarray/src/main/java/org/tensorflow/ndarray/index/Sequence.java new file mode 100644 index 00000000000..5b93e434e54 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/index/Sequence.java @@ -0,0 +1,52 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.index; + +import java.util.StringJoiner; +import org.tensorflow.ndarray.NdArray; +import org.tensorflow.ndarray.impl.dimension.Dimension; + +final class Sequence implements Index { + + @Override + public long numElements(Dimension dim) { + return coords.size(); + } + + @Override + public long mapCoordinate(long coordinate, Dimension dim) { + return coords.getObject(coordinate).longValue(); + } + + Sequence(NdArray coords) { + this.coords = coords; + } + + private final NdArray coords; + + @Override + public String toString() { + return new StringJoiner(", ", Sequence.class.getSimpleName() + "(", ")") + .add("coords=" + coords) + .toString(); + } + + @Override + public boolean isStridedSlicingCompliant() { + return false; + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/index/Slice.java b/ndarray/src/main/java/org/tensorflow/ndarray/index/Slice.java new file mode 100644 index 00000000000..1be4368261c --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/index/Slice.java @@ -0,0 +1,89 @@ +/* + Copyright 2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================================== + */ +package org.tensorflow.ndarray.index; + +import java.util.StringJoiner; +import org.tensorflow.ndarray.impl.dimension.Dimension; + +final class Slice implements Index { + + Slice(long start, long end, long stride) { + this.start = start; + this.end = end; + this.stride = stride; + + if (stride == 0) { + throw new IllegalArgumentException("Can not have a stride of 0"); + } + } + + @Override + public long numElements(Dimension dim) { + long length = end(dim) - start(dim); + + return (length / stride) + (length % stride != 0 ? 1 : 0); + } + + @Override + public long mapCoordinate(long coordinate, Dimension dim) { + return start(dim) + stride * coordinate; + } + + @Override + public long begin() { + return start; + } + + @Override + public long end() { + return end; + } + + @Override + public long stride() { + return stride; + } + + @Override + public String toString() { + return new StringJoiner(", ", Slice.class.getSimpleName() + "(", ")") + .add("start=" + start) + .add("end=" + end) + .add("stride=" + stride) + .toString(); + } + + private long start(Dimension dim) { + if (start < 0) { + return dim.numElements() + start; + } + + return start; + } + + private long end(Dimension dim) { + if (end < 0) { + return dim.numElements() + end; + } else { + return end; + } + } + + private final long start; + private final long end; + private final long stride; +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/index/SliceFrom.java b/ndarray/src/main/java/org/tensorflow/ndarray/index/SliceFrom.java new file mode 100644 index 00000000000..c968a325cf7 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/index/SliceFrom.java @@ -0,0 +1,86 @@ +/* + Copyright 2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================================== + */ +package org.tensorflow.ndarray.index; + +import java.util.StringJoiner; +import org.tensorflow.ndarray.impl.dimension.Dimension; + +final class SliceFrom implements Index { + + SliceFrom(long start, long stride) { + this.start = start; + this.stride = stride; + + if (stride == 0) { + throw new IllegalArgumentException("Can not have a stride of 0"); + } + } + + @Override + public long numElements(Dimension dim) { + long length = end(dim) - start(dim); + + return (length / stride) + (length % stride != 0 ? 1 : 0); + } + + @Override + public long mapCoordinate(long coordinate, Dimension dim) { + return start(dim) + stride * coordinate; + } + + @Override + public long begin() { + return start; + } + + @Override + public boolean endMask() { + return true; + } + + @Override + public long stride() { + return stride; + } + + @Override + public String toString() { + return new StringJoiner(", ", SliceFrom.class.getSimpleName() + "(", ")") + .add("start=" + start) + .add("stride=" + stride) + .toString(); + } + + private long start(Dimension dim) { + if (start < 0) { + return dim.numElements() + start; + } + + return start; + } + + private long end(Dimension dim) { + if (stride > 0) { + return dim.numElements(); + } else { + return -1; // it's exclusive + } + } + + private final long start; + private final long stride; +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/index/SliceTo.java b/ndarray/src/main/java/org/tensorflow/ndarray/index/SliceTo.java new file mode 100644 index 00000000000..761d1d52a3a --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/index/SliceTo.java @@ -0,0 +1,86 @@ +/* + Copyright 2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================================== + */ +package org.tensorflow.ndarray.index; + +import java.util.StringJoiner; +import org.tensorflow.ndarray.impl.dimension.Dimension; + +final class SliceTo implements Index { + + SliceTo(long end, long stride) { + this.end = end; + this.stride = stride; + + if (stride == 0) { + throw new IllegalArgumentException("Can not have a stride of 0"); + } + } + + @Override + public long numElements(Dimension dim) { + long length = end(dim) - start(dim); + + return (length / stride) + (length % stride != 0 ? 1 : 0); + } + + @Override + public long mapCoordinate(long coordinate, Dimension dim) { + return start(dim) + stride * coordinate; + } + + @Override + public long end() { + return end; + } + + @Override + public boolean beginMask() { + return true; + } + + @Override + public long stride() { + return stride; + } + + @Override + public String toString() { + return new StringJoiner(", ", SliceTo.class.getSimpleName() + "(", ")") + .add("end=" + end) + .add("stride=" + stride) + .toString(); + } + + private long start(Dimension dim) { + if (stride > 0) { + return 0; + } + + return dim.numElements() - 1; // it's inclusive + } + + private long end(Dimension dim) { + if (end < 0) { + return dim.numElements() + end; + } else { + return end; + } + } + + private final long end; + private final long stride; +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/index/Step.java b/ndarray/src/main/java/org/tensorflow/ndarray/index/Step.java new file mode 100644 index 00000000000..c9a21c507b6 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/index/Step.java @@ -0,0 +1,83 @@ +/* + Copyright 2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================================== + */ +package org.tensorflow.ndarray.index; + +import java.util.StringJoiner; +import org.tensorflow.ndarray.impl.dimension.Dimension; + +final class Step implements Index { + + Step(long stride) { + this.stride = stride; + + if (stride == 0) { + throw new IllegalArgumentException("Can not have a stride of 0"); + } + } + + @Override + public long numElements(Dimension dim) { + long length = end(dim) - start(dim); + + return (length / stride) + (length % stride != 0 ? 1 : 0); + } + + @Override + public long mapCoordinate(long coordinate, Dimension dim) { + return start(dim) + stride * coordinate; + } + + @Override + public boolean beginMask() { + return true; + } + + @Override + public boolean endMask() { + return true; + } + + @Override + public long stride() { + return stride; + } + + @Override + public String toString() { + return new StringJoiner(", ", Step.class.getSimpleName() + "(", ")") + .add("stride=" + stride) + .toString(); + } + + private long start(Dimension dim) { + if (stride > 0) { + return 0; + } + + return dim.numElements() - 1; // it's inclusive + } + + private long end(Dimension dim) { + if (stride > 0) { + return dim.numElements(); + } else { + return -1; // it's exclusive + } + } + + private final long stride; +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/BooleanNdArrayTestBase.java b/ndarray/src/test/java/org/tensorflow/ndarray/BooleanNdArrayTestBase.java new file mode 100644 index 00000000000..6426ff5a1c2 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/BooleanNdArrayTestBase.java @@ -0,0 +1,57 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray; + +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.tensorflow.ndarray.NdArrays.vectorOf; + +import org.junit.jupiter.api.Test; + +public abstract class BooleanNdArrayTestBase extends NdArrayTestBase { + + @Override + protected abstract BooleanNdArray allocate(Shape shape); + + @Override + protected Boolean valueOf(Long val) { + return val > 0; + } + + @Test + public void iteratePrimitiveElements() { + BooleanNdArray matrix3d = allocate(Shape.of(5, 4, 5)); + + matrix3d.scalars().forEachIndexed((coords, scalar) -> + scalar.setBoolean(coords[2] > 0) + ); + + assertFalse(matrix3d.getBoolean(0, 0, 0)); + assertTrue(matrix3d.getBoolean(0, 0, 1)); + assertTrue(matrix3d.getBoolean(0, 0, 4)); + assertTrue(matrix3d.getBoolean(0, 1, 2)); + + matrix3d.elements(1).forEach(vector -> + vector.set(vectorOf(true, false, true, false, true)) + ); + + assertTrue(matrix3d.getBoolean(0, 0, 0)); + assertFalse(matrix3d.getBoolean(0, 0, 1)); + assertTrue(matrix3d.getBoolean(0, 0, 4)); + assertTrue(matrix3d.getBoolean(0, 1, 2)); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/ByteNdArrayTestBase.java b/ndarray/src/test/java/org/tensorflow/ndarray/ByteNdArrayTestBase.java new file mode 100644 index 00000000000..407efffda94 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/ByteNdArrayTestBase.java @@ -0,0 +1,55 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +public abstract class ByteNdArrayTestBase extends NdArrayTestBase { + + @Override + protected abstract ByteNdArray allocate(Shape shape); + + @Override + protected Byte valueOf(Long val) { + return val.byteValue(); + } + + @Test + public void iteratePrimitiveElements() { + ByteNdArray matrix3d = allocate(Shape.of(5, 4, 5)); + + matrix3d.scalars().forEachIndexed((coords, scalar) -> + scalar.setByte((byte)coords[2]) + ); + + assertEquals(0, matrix3d.getByte(0, 0, 0)); + assertEquals(1, matrix3d.getByte(0, 0, 1)); + assertEquals(4, matrix3d.getByte(0, 0, 4)); + assertEquals(2, matrix3d.getByte(0, 1, 2)); + + matrix3d.elements(1).forEach(vector -> + vector.set(NdArrays.vectorOf((byte)5, (byte)6, (byte)7, (byte)8, (byte)9)) + ); + + assertEquals(5, matrix3d.getByte(0, 0, 0)); + assertEquals(6, matrix3d.getByte(0, 0, 1)); + assertEquals(9, matrix3d.getByte(0, 0, 4)); + assertEquals(7, matrix3d.getByte(0, 1, 2)); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/DoubleNdArrayTestBase.java b/ndarray/src/test/java/org/tensorflow/ndarray/DoubleNdArrayTestBase.java new file mode 100644 index 00000000000..d4f98e2caa0 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/DoubleNdArrayTestBase.java @@ -0,0 +1,55 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +public abstract class DoubleNdArrayTestBase extends NdArrayTestBase { + + @Override + protected abstract DoubleNdArray allocate(Shape shape); + + @Override + protected Double valueOf(Long val) { + return val.doubleValue(); + } + + @Test + public void iteratePrimitiveElements() { + DoubleNdArray matrix3d = allocate(Shape.of(5, 4, 5)); + + matrix3d.scalars().forEachIndexed((coords, scalar) -> + scalar.setDouble((double)coords[2]) + ); + + assertEquals(0.0, matrix3d.getDouble(0, 0, 0), 0.0); + assertEquals(1.0, matrix3d.getDouble(0, 0, 1), 0.0); + assertEquals(4.0, matrix3d.getDouble(0, 0, 4), 0.0); + assertEquals(2.0, matrix3d.getDouble(0, 1, 2), 0.0); + + matrix3d.elements(1).forEach(vector -> + vector.set(NdArrays.vectorOf(5.0, 6.0, 7.0, 8.0, 9.0)) + ); + + assertEquals(5, matrix3d.getDouble(0, 0, 0), 0.0); + assertEquals(6, matrix3d.getDouble(0, 0, 1), 0.0); + assertEquals(9, matrix3d.getDouble(0, 0, 4), 0.0); + assertEquals(7, matrix3d.getDouble(0, 1, 2), 0.0); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/FloatNdArrayTestBase.java b/ndarray/src/test/java/org/tensorflow/ndarray/FloatNdArrayTestBase.java new file mode 100644 index 00000000000..55f05ae3de1 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/FloatNdArrayTestBase.java @@ -0,0 +1,55 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +public abstract class FloatNdArrayTestBase extends NdArrayTestBase { + + @Override + protected abstract FloatNdArray allocate(Shape shape); + + @Override + protected Float valueOf(Long val) { + return val.floatValue(); + } + + @Test + public void iteratePrimitiveElements() { + FloatNdArray matrix3d = allocate(Shape.of(5, 4, 5)); + + matrix3d.scalars().forEachIndexed((coords, scalar) -> + scalar.setFloat((float)coords[2]) + ); + + assertEquals(0.0f, matrix3d.getFloat(0, 0, 0), 0.0f); + assertEquals(1.0f, matrix3d.getFloat(0, 0, 1), 0.0f); + assertEquals(4.0f, matrix3d.getFloat(0, 0, 4), 0.0f); + assertEquals(2.0f, matrix3d.getFloat(0, 1, 2), 0.0f); + + matrix3d.elements(1).forEach(vector -> + vector.set(NdArrays.vectorOf(5.0f, 6.0f, 7.0f, 8.0f, 9.0f)) + ); + + assertEquals(5, matrix3d.getFloat(0, 0, 0), 0.0f); + assertEquals(6, matrix3d.getFloat(0, 0, 1), 0.0f); + assertEquals(9, matrix3d.getFloat(0, 0, 4), 0.0f); + assertEquals(7, matrix3d.getFloat(0, 1, 2), 0.0f); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/IndexTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/IndexTest.java new file mode 100644 index 00000000000..6f92dab9b99 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/IndexTest.java @@ -0,0 +1,205 @@ +/* + Copyright 2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================================== + */ +package org.tensorflow.ndarray; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import org.junit.jupiter.api.Test; +import org.tensorflow.ndarray.index.Indices; + +public class IndexTest { + @Test + public void testNullConversions(){ + assertTrue(Indices.slice(null, 0L).beginMask(), + "Passed null for slice start but didn't set begin mask"); + + assertTrue(Indices.slice(null, 0L).beginMask(), + "Passed null for slice start but didn't set begin mask"); + + assertTrue(Indices.slice(null, null).beginMask(), + "Passed null for slice start but didn't set begin mask"); + + assertTrue(Indices.slice(0L, null).endMask(), + "Passed null for slice end but didn't set end mask"); + + assertTrue(Indices.slice(0L, null).endMask(), + "Passed null for slice end but didn't set end mask"); + + assertTrue(Indices.slice(null, null).endMask(), + "Passed null for slice end but didn't set end mask"); + } + + @Test + public void testNewaxis(){ + IntNdArray matrix3d = NdArrays.ofInts(Shape.of(5, 4, 5)); + + matrix3d.scalars().forEachIndexed((coords, scalar) -> + scalar.setInt((int)coords[2]) + ); + + IntNdArray slice1 = matrix3d.slice(Indices.all(), Indices.all(), Indices.all(), Indices.newAxis()); + + assertEquals(Shape.of(5, 4, 5, 1), slice1.shape()); + assertEquals(0, slice1.getInt(0, 0, 0, 0)); + assertEquals(1, slice1.getInt(0, 0, 1, 0)); + assertEquals(4, slice1.getInt(0, 0, 4, 0)); + assertEquals(2, slice1.getInt(0, 1, 2, 0)); + + IntNdArray slice2 = matrix3d.slice(Indices.all(), Indices.all(), Indices.newAxis(), Indices.all()); + + assertEquals(Shape.of(5, 4, 1, 5), slice2.shape()); + assertEquals(0, slice2.getInt(0, 0, 0, 0)); + assertEquals(1, slice2.getInt(0, 0, 0, 1)); + assertEquals(4, slice2.getInt(0, 0, 0, 4)); + assertEquals(2, slice2.getInt(0, 1, 0, 2)); + + IntNdArray slice3 = matrix3d.slice(Indices.all(), Indices.newAxis(), Indices.all(), Indices.all()); + + assertEquals(Shape.of(5, 1, 4, 5), slice3.shape()); + assertEquals(0, slice3.getInt(0, 0, 0, 0)); + assertEquals(1, slice3.getInt(0, 0, 0, 1)); + assertEquals(4, slice3.getInt(0, 0, 0, 4)); + assertEquals(2, slice3.getInt(0, 0, 1, 2)); + + IntNdArray slice4 = matrix3d.slice(Indices.newAxis(), Indices.all(), Indices.all(), Indices.all()); + + assertEquals(Shape.of(1, 5, 4, 5), slice4.shape()); + assertEquals(0, slice4.getInt(0, 0, 0, 0)); + assertEquals(1, slice4.getInt(0, 0, 0, 1)); + assertEquals(4, slice4.getInt(0, 0, 0, 4)); + assertEquals(2, slice4.getInt(0, 0, 1, 2)); + + } + + @Test + public void testEllipsis(){ + IntNdArray matrix3d = NdArrays.ofInts(Shape.of(5, 4, 5)); + + matrix3d.scalars().forEachIndexed((coords, scalar) -> + scalar.setInt((int)coords[2]) + ); + + assertEquals( + matrix3d.slice(Indices.all(), Indices.all(), Indices.at(0)), + matrix3d.slice(Indices.ellipsis(), Indices.at(0)) + ); + + assertEquals( + matrix3d.slice(Indices.at(0), Indices.all(), Indices.all()), + matrix3d.slice(Indices.at(0), Indices.ellipsis()) + ); + + assertEquals( + matrix3d.slice(Indices.at(0), Indices.all(), Indices.at(0)), + matrix3d.slice(Indices.at(0), Indices.ellipsis(), Indices.at(0)) + ); + + // newaxis interacts specially with ellipsis (since it doesn't consume a dimension), test this + + assertEquals( + matrix3d.slice(Indices.all(), Indices.all(), Indices.newAxis(), Indices.at(0)), + matrix3d.slice(Indices.ellipsis(), Indices.newAxis(), Indices.at(0)) + ); + + assertEquals( + matrix3d.slice(Indices.newAxis(), Indices.all(), Indices.all(), Indices.at(0)), + matrix3d.slice(Indices.newAxis(), Indices.ellipsis(), Indices.at(0)) + ); + + assertEquals( + matrix3d.slice(Indices.all(), Indices.all(), Indices.at(0), Indices.newAxis()), + matrix3d.slice(Indices.ellipsis(), Indices.at(0), Indices.newAxis()) + ); + } + + @Test + public void testSlice(){ + IntNdArray matrix3d = NdArrays.ofInts(Shape.of(5, 4, 5)); + + matrix3d.scalars().forEachIndexed((coords, scalar) -> + scalar.setInt((int)coords[2]) + ); + + IntNdArray slice1 = matrix3d.slice(Indices.all(), Indices.sliceTo(3), Indices.all()); + + assertEquals(Shape.of(5, 3, 5), slice1.shape()); + assertEquals(0, slice1.getInt(0, 0, 0)); + assertEquals(1, slice1.getInt(0, 0, 1)); + assertEquals(2, slice1.getInt(0, 1, 2)); + + IntNdArray slice2 = matrix3d.slice(Indices.all(), Indices.all(), Indices.slice(1, 4)); + + assertEquals(Shape.of(5, 4, 3), slice2.shape()); + assertEquals(1, slice2.getInt(0, 0, 0)); + assertEquals(3, slice2.getInt(0, 0, 2)); + assertEquals(2, slice2.getInt(0, 1, 1)); + + assertEquals(slice2, matrix3d.slice(Indices.all(), Indices.all(), Indices.slice(1, -1))); + + assertEquals(slice2, matrix3d.slice(Indices.all(), Indices.all(), Indices.slice(-4, -1))); + + assertEquals(Shape.of(5, 4, 0), matrix3d.slice(Indices.all(), Indices.all(), Indices.slice(1, 4, -2)).shape()); + + IntNdArray slice3 = matrix3d.slice(Indices.all(), Indices.all(), Indices.slice(4, 1, -2)); + + assertEquals(Shape.of(5, 4, 2), slice3.shape()); + assertEquals(4, slice3.getInt(0, 0, 0)); + assertEquals(2, slice3.getInt(0, 1, 1)); + + assertEquals(slice3, matrix3d.slice(Indices.all(), Indices.all(), Indices.slice(-1, 1, -2))); + + assertEquals(slice3, matrix3d.slice(Indices.all(), Indices.all(), Indices.slice(-1, -4, -2))); + + IntNdArray slice4 = matrix3d.slice(Indices.all(), Indices.all(), Indices.slice(null, null, -1)); + + assertEquals(Shape.of(5, 4, 5), slice4.shape()); + assertEquals(4, slice4.getInt(0, 0, 0)); + assertEquals(3, slice4.getInt(0, 0, 1)); + assertEquals(2, slice4.getInt(0, 1, 2)); + } + + @Test + public void testAt(){ + IntNdArray matrix3d = NdArrays.ofInts(Shape.of(5, 4, 5)); + + matrix3d.scalars().forEachIndexed((coords, scalar) -> + scalar.setInt((int)coords[2]) + ); + + IntNdArray slice1 = matrix3d.slice(Indices.all(), Indices.all(), Indices.at(0)); + + assertEquals(Shape.of(5, 4), slice1.shape()); + assertEquals(0, slice1.getInt(0, 0)); + + IntNdArray slice2 = matrix3d.slice(Indices.all(), Indices.all(), Indices.at(3)); + + assertEquals(Shape.of(5, 4), slice2.shape()); + assertEquals(3, slice2.getInt(0, 0)); + + IntNdArray slice3 = matrix3d.slice(Indices.all(), Indices.all(), Indices.at(-3)); + + assertEquals(Shape.of(5, 4), slice3.shape()); + assertEquals(2, slice3.getInt(0, 0)); + + IntNdArray slice4 = matrix3d.slice(Indices.all(), Indices.all(), Indices.at(-3, true)); + + assertEquals(Shape.of(5, 4, 1), slice4.shape()); + assertEquals(2, slice4.getInt(0, 0, 0)); + } + +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/IntNdArrayTestBase.java b/ndarray/src/test/java/org/tensorflow/ndarray/IntNdArrayTestBase.java new file mode 100644 index 00000000000..1a3c7cb1a12 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/IntNdArrayTestBase.java @@ -0,0 +1,55 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +public abstract class IntNdArrayTestBase extends NdArrayTestBase { + + @Override + protected abstract IntNdArray allocate(Shape shape); + + @Override + protected Integer valueOf(Long val) { + return val.intValue(); + } + + @Test + public void iteratePrimitiveElements() { + IntNdArray matrix3d = allocate(Shape.of(5, 4, 5)); + + matrix3d.scalars().forEachIndexed((coords, scalar) -> + scalar.setInt((int)coords[2]) + ); + + assertEquals(0, matrix3d.getInt(0, 0, 0)); + assertEquals(1, matrix3d.getInt(0, 0, 1)); + assertEquals(4, matrix3d.getInt(0, 0, 4)); + assertEquals(2, matrix3d.getInt(0, 1, 2)); + + matrix3d.elements(1).forEach(vector -> + vector.set(NdArrays.vectorOf(5, 6, 7, 8, 9)) + ); + + assertEquals(5, matrix3d.getInt(0, 0, 0)); + assertEquals(6, matrix3d.getInt(0, 0, 1)); + assertEquals(9, matrix3d.getInt(0, 0, 4)); + assertEquals(7, matrix3d.getInt(0, 1, 2)); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/LongNdArrayTestBase.java b/ndarray/src/test/java/org/tensorflow/ndarray/LongNdArrayTestBase.java new file mode 100644 index 00000000000..b91c19d6557 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/LongNdArrayTestBase.java @@ -0,0 +1,55 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +public abstract class LongNdArrayTestBase extends NdArrayTestBase { + + @Override + protected abstract LongNdArray allocate(Shape shape); + + @Override + protected Long valueOf(Long val) { + return val; + } + + @Test + public void iteratePrimitiveElements() { + LongNdArray matrix3d = allocate(Shape.of(5, 4, 5)); + + matrix3d.scalars().forEachIndexed((coords, scalar) -> + scalar.setLong(coords[2]) + ); + + assertEquals(0, matrix3d.getLong(0, 0, 0)); + assertEquals(1, matrix3d.getLong(0, 0, 1)); + assertEquals(4, matrix3d.getLong(0, 0, 4)); + assertEquals(2, matrix3d.getLong(0, 1, 2)); + + matrix3d.elements(1).forEach(vector -> + vector.set(NdArrays.vectorOf(5L, 6L, 7L, 8L, 9L)) + ); + + assertEquals(5, matrix3d.getLong(0, 0, 0)); + assertEquals(6, matrix3d.getLong(0, 0, 1)); + assertEquals(9, matrix3d.getLong(0, 0, 4)); + assertEquals(7, matrix3d.getLong(0, 1, 2)); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/NdArrayTestBase.java b/ndarray/src/test/java/org/tensorflow/ndarray/NdArrayTestBase.java new file mode 100644 index 00000000000..26ac533daa8 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/NdArrayTestBase.java @@ -0,0 +1,338 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.fail; +import static org.tensorflow.ndarray.NdArrays.vectorOfObjects; +import static org.tensorflow.ndarray.index.Indices.all; +import static org.tensorflow.ndarray.index.Indices.at; +import static org.tensorflow.ndarray.index.Indices.even; +import static org.tensorflow.ndarray.index.Indices.flip; +import static org.tensorflow.ndarray.index.Indices.sliceFrom; +import static org.tensorflow.ndarray.index.Indices.odd; +import static org.tensorflow.ndarray.index.Indices.range; +import static org.tensorflow.ndarray.index.Indices.seq; +import static org.tensorflow.ndarray.index.Indices.sliceTo; + +import java.nio.BufferOverflowException; +import java.nio.BufferUnderflowException; +import org.junit.jupiter.api.Test; +import org.tensorflow.ndarray.buffer.DataBuffer; + +public abstract class NdArrayTestBase { + + protected abstract NdArray allocate(Shape shape); + + protected abstract DataBuffer allocateBuffer(long size); + + protected abstract T valueOf(Long val); + + protected T zeroOrNull() { + return valueOf(0L); + } + + @Test + public void shapeAndSizes() { + Shape scalarShape = Shape.scalar(); + NdArray scalar = allocate(scalarShape); + assertEquals(scalarShape, scalar.shape()); + assertEquals(0, scalar.rank()); + assertEquals(scalarShape, Shape.of()); + + Shape vectorShape = Shape.of(10); + NdArray vector = allocate(vectorShape); + assertEquals(vectorShape, vector.shape()); + assertEquals(1, vector.rank()); + } + + @Test + public void setAndGetValues() { + NdArray matrix = allocate(Shape.of(5, 4)); + assertEquals(zeroOrNull(), matrix.getObject(3, 3)); + + matrix.setObject(valueOf(10L), 3, 3); + assertEquals(valueOf(10L), matrix.getObject(3, 3)); + try { + matrix.setObject(valueOf(10L), 3, 4); + fail(); + } catch (IndexOutOfBoundsException e) { + // as expected + } + try { + matrix.setObject(valueOf(10L), -1, 3); + fail(); + } catch (IndexOutOfBoundsException e) { + // as expected + } + try { + matrix.getObject(3); + fail(); + } catch (IllegalRankException e) { + // as expected + } + try { + matrix.setObject(valueOf(10L), 3); + fail(); + } catch (IllegalRankException e) { + // as expected + } + + NdArray matrix2 = allocate(Shape.of(3, 2)) + .set(vectorOfObjects(valueOf(1L), valueOf(2L)), 0) + .set(vectorOfObjects(valueOf(3L), valueOf(4L)), 1) + .setObject(valueOf(5L), 2, 0) + .setObject(valueOf(6L), 2, 1); + + assertEquals(valueOf(1L), matrix2.getObject(0, 0)); + assertEquals(valueOf(2L), matrix2.getObject(0, 1)); + assertEquals(valueOf(3L), matrix2.getObject(1, 0)); + assertEquals(valueOf(4L), matrix2.getObject(1, 1)); + assertEquals(valueOf(5L), matrix2.getObject(2, 0)); + assertEquals(valueOf(6L), matrix2.getObject(2, 1)); + } + + @Test + public void iterateElements() { + NdArray matrix3d = allocate(Shape.of(5, 4, 5)); + + matrix3d.scalars().forEachIndexed((coords, scalar) -> { + scalar.setObject(valueOf(coords[2])); + }); + + assertEquals(valueOf(0L), matrix3d.getObject(0, 0, 0)); + assertEquals(valueOf(1L), matrix3d.getObject(0, 0, 1)); + assertEquals(valueOf(4L), matrix3d.getObject(0, 0, 4)); + assertEquals(valueOf(2L), matrix3d.getObject(0, 1, 2)); + + matrix3d.elements(1).forEach(vector -> { + vector.set(vectorOfObjects(valueOf(5L), valueOf(6L), valueOf(7L), valueOf(8L), valueOf(9L))); + }); + + assertEquals(valueOf(5L), matrix3d.getObject(0, 0, 0)); + assertEquals(valueOf(6L), matrix3d.getObject(0, 0, 1)); + assertEquals(valueOf(9L), matrix3d.getObject(0, 0, 4)); + assertEquals(valueOf(7L), matrix3d.getObject(0, 1, 2)); + + long value = 0L; + for (NdArray matrix : matrix3d.elements(0)) { + assertEquals(2L, matrix.shape().numDimensions()); + assertEquals(4L, matrix.shape().size(0)); + assertEquals(5L, matrix.shape().size(1)); + + for (NdArray vector : matrix.elements(0)) { + assertEquals(1L, vector.shape().numDimensions()) ; + assertEquals(5L, vector.shape().size(0)); + + for (NdArray scalar : vector.scalars()) { + assertEquals(0L, scalar.shape().numDimensions()) ; + scalar.setObject(valueOf(value++)); + try { + scalar.elements(0); + fail(); + } catch (IllegalArgumentException e) { + // as expected + } + } + } + } + assertEquals(valueOf(0L), matrix3d.getObject(0, 0, 0)); + assertEquals(valueOf(5L), matrix3d.getObject(0, 1, 0)); + assertEquals(valueOf(9L), matrix3d.getObject(0, 1, 4)); + assertEquals(valueOf(20L), matrix3d.getObject(1, 0, 0)); + assertEquals(valueOf(25L), matrix3d.getObject(1, 1, 0)); + assertEquals(valueOf(99L), matrix3d.getObject(4, 3, 4)); + } + + @Test + public void slices() { + NdArray matrix3d = allocate(Shape.of(5, 4, 5)); + + T val100 = valueOf(100L); + matrix3d.setObject(val100, 1, 0, 0); + T val101 = valueOf(101L); + matrix3d.setObject(val101, 1, 0, 1); + + // Vector (1,0,*) + NdArray vector10X = matrix3d.get(1, 0); + assertEquals(Shape.of(5), vector10X.shape()); + assertEquals(val100, vector10X.getObject(0)); + assertEquals(val101, vector10X.getObject(1)); + + T val102 = valueOf(102L); + vector10X.setObject(val102, 2); + assertEquals(val102, vector10X.getObject(2)); + assertEquals(val102, matrix3d.getObject(1, 0, 2)); + + // Vector (*,0,0) + NdArray vectorX00 = matrix3d.slice(all(), at(0), at(0)); + assertEquals(Shape.of(5), vectorX00.shape()); + assertEquals(val100, vectorX00.getObject(1)); + T val200 = valueOf(200L); + vectorX00.setObject(val200, 2); + assertEquals(val200, vectorX00.getObject(2)); + assertEquals(val200, matrix3d.getObject(2, 0, 0)); + + // Vector (1,0,[2,0]) + NdArray vector10_20 = matrix3d.slice(at(1), at(0), seq(2, 0)); + assertEquals(vector10_20.shape(), Shape.of(2)); + assertEquals(val102, vector10_20.getObject(0)); + assertEquals(val100, vector10_20.getObject(1)); + + // Vector (1,0,[even]) + NdArray vector10_even = matrix3d.slice(at(1), at(0), even()); + assertEquals(vector10_even.shape(), Shape.of(3)); + assertEquals(val100, vector10_even.getObject(0)); + assertEquals(val102, vector10_even.getObject(1)); + + // Vector ([odd]) from vector (1,0,[even]) + NdArray vector10_even_odd = vector10_even.slice(odd()); + assertEquals(vector10_even_odd.shape(), Shape.of(1)); + assertEquals(val102, vector10_even_odd.getObject(0)); + + // Vector (1,0,[flip]) + NdArray vector10_flip = matrix3d.slice(at(1), at(0), flip()); + assertEquals(vector10_flip.shape(), Shape.of(5)); + assertEquals(val100, vector10_flip.getObject(4)); + assertEquals(val101, vector10_flip.getObject(3)); + + // Vector (1,0,[from 1]) from vector (1,0,*) + NdArray vector10_1toX = vector10X.slice(sliceFrom(1)); + assertEquals(vector10_1toX.shape(), Shape.of(4)); + assertEquals(val101, vector10_1toX.getObject(0)); + assertEquals(val102, vector10_1toX.getObject(1)); + + // Vector (1,0,[to 1]) from vector (1,0,*) + NdArray vector10_Xto1 = vector10X.slice(sliceTo(2)); + assertEquals(vector10_Xto1.shape(), Shape.of(2)); + assertEquals(val100, vector10_Xto1.getObject(0)); + assertEquals(val101, vector10_Xto1.getObject(1)); + + // Vector (1,0,[1 to 3]) + NdArray vector10_1to3 = matrix3d.slice(at(1), at(0), range(1, 3)); + assertEquals(vector10_1to3.shape(), Shape.of(2)); + assertEquals(val101, vector10_1to3.getObject(0)); + assertEquals(val102, vector10_1to3.getObject(1)); + + // Scalar (1,0,0) from vector (1,0,*) + NdArray scalar100 = vector10X.get(0); + assertEquals(Shape.of(), scalar100.shape()); + assertEquals(val100, scalar100.getObject()); + + // Slice scalar (1,0,z) + LongNdArray z = NdArrays.scalarOf(2L); + NdArray scalar102 = matrix3d.slice(at(1), at(0), at(z)); + assertEquals(scalar102.shape(), Shape.of()); + assertEquals(val102, scalar102.getObject()); + + // Slicing the 3D matrix so we only keep the first element of the second dimension + NdArray matrix_X0Z = matrix3d.slice(all(), at(0)); + assertEquals(2, matrix_X0Z.rank()); + assertEquals(Shape.of(5, 5), matrix_X0Z.shape()); + assertEquals(val100, matrix_X0Z.getObject(1, 0)); + assertEquals(val101, matrix_X0Z.getObject(1, 1)); + assertEquals(val200, matrix_X0Z.getObject(2, 0)); + } + + @Test + public void writeAndReadWithBuffers() { + DataBuffer buffer = allocateBuffer(15L); + for (long val = 0L; val < buffer.size(); ++val) { + buffer.setObject(valueOf(val), val); + } + NdArray matrix = allocate(Shape.of(3, 5)); + matrix.write(buffer); + assertEquals(valueOf(0L), matrix.getObject(0, 0)); + assertEquals(valueOf(4L), matrix.getObject(0, 4)); + assertEquals(valueOf(5L), matrix.getObject(1, 0)); + assertEquals(valueOf(10L), matrix.getObject(2, 0)); + assertEquals(valueOf(14L), matrix.getObject(2, 4)); + + matrix.setObject(valueOf(100L), 1, 0); + matrix.read(buffer); + assertEquals(valueOf(0L), buffer.getObject(0)); + assertEquals(valueOf(4L), buffer.getObject(4)); + assertEquals(valueOf(100L), buffer.getObject(5)); + assertEquals(valueOf(10L), buffer.getObject(10)); + assertEquals(valueOf(14L), buffer.getObject(14)); + + try { + matrix.write(buffer.narrow(10)); + fail(); + } catch (BufferUnderflowException e) { + // as expected + } + try { + matrix.read(buffer.narrow(10)); + fail(); + } catch (BufferOverflowException e) { + // as expected + } + } + + @Test + public void ndArrayCopies() { + NdArray matrixA = allocate(Shape.of(3, 5)); + + long value = 0L; + for (NdArray s : matrixA.scalars()) { + s.setObject(valueOf(value++)); + } + NdArray matrixB = allocate(Shape.of(3, 5)).setObject(valueOf(100L), 1, 0); + matrixA.copyTo(matrixB); + assertEquals(valueOf(0L), matrixB.getObject(0, 0)); + assertEquals(valueOf(4L), matrixB.getObject(0, 4)); + assertEquals(valueOf(5L), matrixB.getObject(1, 0)); + assertEquals(valueOf(10L), matrixB.getObject(2, 0)); + assertEquals(valueOf(14L), matrixB.getObject(2, 4)); + + NdArray matrixC = allocate(Shape.of(3, 4)); + try { + matrixA.copyTo(matrixC); + fail(); + } catch (IllegalArgumentException e) { + // as expected + } + } + + @Test + public void equalsAndHashCode() { + NdArray array1 = allocate(Shape.of(2, 2)); + NdArray array2 = allocate(Shape.of(2, 2)); + NdArray array3 = allocate(Shape.of(2, 2)); + NdArray array4 = allocate(Shape.of(1, 2, 2)); + + @SuppressWarnings("unchecked") + T[][][] values = (T[][][])(new Object[][][] { + { { valueOf(0L), valueOf(1L) }, { valueOf(2L), valueOf(0L) } } + }); + + StdArrays.copyTo(values[0], array1); + StdArrays.copyTo(values[0], array2); + StdArrays.copyTo(values[0], array3); + array3.setObject(valueOf(0L), 0, 1); + StdArrays.copyTo(values, array4); + + assertEquals(array1, array2); + assertEquals(array1.hashCode(), array2.hashCode()); + assertNotEquals(array1, array3); + assertNotEquals(array1.hashCode(), array3.hashCode()); + assertNotEquals(array1, array4); + assertNotEquals(array1.hashCode(), array4.hashCode()); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/ShapeTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/ShapeTest.java new file mode 100644 index 00000000000..d2e3e432a2c --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/ShapeTest.java @@ -0,0 +1,170 @@ +/* +Copyright 2019 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ +package org.tensorflow.ndarray; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +public class ShapeTest { + + @Test + public void allKnownDimensions() { + Shape shape = Shape.of(5, 4, 5); + assertEquals(3, shape.numDimensions()); + assertEquals(5, shape.size(0)); + assertEquals(4, shape.size(1)); + assertEquals(5, shape.size(2)); + assertEquals(100, shape.size()); + assertArrayEquals(new long[] {5, 4, 5}, shape.asArray()); + try { + shape.size(3); + fail(); + } catch (IndexOutOfBoundsException e) { + // as expected + } + assertEquals(5, shape.size(-1)); + assertEquals(4, shape.size(-2)); + assertEquals(5, shape.size(-3)); + try { + shape.size(-4); + fail(); + } catch (IndexOutOfBoundsException e) { + // as expected + } + assertFalse(shape.isUnknown()); + assertFalse(shape.hasUnknownDimension()); + assertFalse(shape.isScalar()); + } + + @Test + public void hashCodeEquals() { + Shape shape1 = Shape.of(5, 4, 5); + Shape shape2 = Shape.of(5, 4, 5); + Shape shape3 = Shape.of(5, 4, 5, 6); + Shape shape4 = Shape.of(5, 4, 1); + + assertEquals(shape1, shape2); + assertEquals(shape1.hashCode(), shape2.hashCode()); + assertNotEquals(shape1, shape3); + assertNotEquals(shape1.hashCode(), shape3.hashCode()); + assertNotEquals(shape1, shape4); + assertNotEquals(shape1.hashCode(), shape4.hashCode()); + + Shape scalar1 = Shape.of(); + Shape scalar2 = Shape.of(); + assertEquals(scalar1, scalar2); + assertNotEquals(scalar1, shape1); + + Shape unknown1 = Shape.of(-1, 4, 5); + Shape unknown2 = Shape.of(-1, 4, 5); + assertNotEquals(unknown1, unknown2); + assertNotEquals(unknown1, shape1); + assertEquals(unknown1, unknown1); + + Shape sizeUnknown1 = Shape.unknown(); + Shape sizeUnknown2 = Shape.unknown(); + assertNotEquals(sizeUnknown1, sizeUnknown2); + assertEquals(sizeUnknown1, sizeUnknown1); + } + + @Test + public void testShapeModification() { + Shape one = Shape.of(2, 4, 6, 8); + assertEquals(one.head(), Shape.of(2)); + assertEquals(one.tail(), Shape.of(4, 6, 8)); + + Shape two = Shape.of(5); + assertEquals(two.head(), two); + assertEquals(two.tail(), Shape.of()); + + try { + Shape.of().head(); + fail(); + } catch (IndexOutOfBoundsException e) { + // as expected + } + + assertEquals(Shape.of().tail(), Shape.of()); + + Shape three = Shape.of(2, 4, 6); + assertEquals(three.prepend(5), Shape.of(5, 2, 4, 6)); + + assertEquals(Shape.of(5, 2, 4, 6), two.append(three)); + assertEquals(Shape.of(2, 4, 6, 5), two.prepend(three)); + assertEquals(Shape.of(1, 2, 3, 4), Shape.of(1, 2).append(Shape.of(3, 4))); + assertEquals(Shape.of(1, 2, 3, 4), Shape.of(1, 2, 3).append(4)); + assertEquals(Shape.of(1, 2, 3, 4), Shape.of(1, 2, 3, 4).append(Shape.scalar())); + assertEquals(Shape.of(3, 4, 1, 2), Shape.of(1, 2).prepend(Shape.of(3, 4))); + assertEquals(Shape.of(4, 6), three.takeLast(2)); + assertEquals(Shape.scalar(), three.takeLast(0)); + assertEquals(Shape.of(2, 4), three.take(2)); + assertEquals(Shape.scalar(), three.take(0)); + + try { + Shape.unknown().append(Shape.of(1, 2)); + fail(); + } catch (NullPointerException e) { + // as expected + } + + try { + Shape.unknown().prepend(Shape.of(1, 2)); + fail(); + } catch (NullPointerException e) { + // as expected + } + + // changing the values of the array returned by asArray should not mutate the shape + long[] internalShape = one.asArray(); + assertNotNull(internalShape); + internalShape[0] = 42L; + assertEquals(2L, one.size(0)); + } + + @Test + public void testShapeCompatible() { + Shape a = Shape.unknown(); + Shape b = Shape.of(2, 2); + assertTrue(a.isCompatibleWith(b)); + assertTrue(b.isCompatibleWith(a)); + + a = Shape.of(2, 2); + assertTrue(a.isCompatibleWith(b)); + assertTrue(b.isCompatibleWith(a)); + + a = Shape.of(2, -1); + assertTrue(a.isCompatibleWith(b)); + assertTrue(b.isCompatibleWith(a)); + + a = Shape.of(-1, 2); + assertTrue(a.isCompatibleWith(b)); + assertTrue(b.isCompatibleWith(a)); + + a = Shape.of(-1, -1); + assertTrue(a.isCompatibleWith(b)); + assertTrue(b.isCompatibleWith(a)); + + a = Shape.of(1, 2); + assertFalse(a.isCompatibleWith(b)); + assertFalse(b.isCompatibleWith(a)); + + a = Shape.of(1, 2, 3); + assertFalse(a.isCompatibleWith(b)); + assertFalse(b.isCompatibleWith(a)); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/ShortNdArrayTestBase.java b/ndarray/src/test/java/org/tensorflow/ndarray/ShortNdArrayTestBase.java new file mode 100644 index 00000000000..f9043fec4f5 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/ShortNdArrayTestBase.java @@ -0,0 +1,55 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +public abstract class ShortNdArrayTestBase extends NdArrayTestBase { + + @Override + protected abstract ShortNdArray allocate(Shape shape); + + @Override + protected Short valueOf(Long val) { + return val.shortValue(); + } + + @Test + public void iteratePrimitiveElements() { + ShortNdArray matrix3d = allocate(Shape.of(5, 4, 5)); + + matrix3d.scalars().forEachIndexed((coords, scalar) -> + scalar.setShort((short)coords[2]) + ); + + assertEquals(0, matrix3d.getShort(0, 0, 0)); + assertEquals(1, matrix3d.getShort(0, 0, 1)); + assertEquals(4, matrix3d.getShort(0, 0, 4)); + assertEquals(2, matrix3d.getShort(0, 1, 2)); + + matrix3d.elements(1).forEach(vector -> + vector.set(NdArrays.vectorOf((short)5, (short)6, (short)7, (short)8, (short)9)) + ); + + assertEquals(5, matrix3d.getShort(0, 0, 0)); + assertEquals(6, matrix3d.getShort(0, 0, 1)); + assertEquals(9, matrix3d.getShort(0, 0, 4)); + assertEquals(7, matrix3d.getShort(0, 1, 2)); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/StdArraysTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/StdArraysTest.java new file mode 100644 index 00000000000..b7b41564c33 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/StdArraysTest.java @@ -0,0 +1,211 @@ +package org.tensorflow.ndarray; + +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.fail; + +import org.junit.jupiter.api.Test; + +public class StdArraysTest { + + @Test + public void vectors() { + IntNdArray vector = NdArrays.ofInts(Shape.of(2)); + + StdArrays.copyTo(new int[] {1, 2}, vector); + assertEquals(1, vector.getInt(0)); + assertEquals(2, vector.getInt(1)); + + try { + StdArrays.copyTo(new int[] {1, 2, 3}, vector); + fail(); + } catch (IllegalArgumentException e) { + // as expected + } + try { + StdArrays.copyTo(new int[] {1, 2}, NdArrays.ofInts(Shape.of(4))); + fail(); + } catch (IllegalArgumentException e) { + // as expected + } + try { + StdArrays.copyTo(new int[] {1, 2}, NdArrays.ofInts(Shape.of(2, 2))); + fail(); + } catch (IllegalArgumentException e) { + // as expected + } + + int[] array = StdArrays.array1dCopyOf(vector); + assertEquals(1, array[0]); + assertEquals(2, array[1]); + + array = new int[3]; + StdArrays.copyFrom(vector, array); + assertEquals(1, array[0]); + assertEquals(2, array[1]); + assertEquals(0, array[2]); + + try { + StdArrays.copyFrom(vector, new int[1]); + fail(); + } catch (ArrayIndexOutOfBoundsException e) { + // as expected + } + try { + StdArrays.copyFrom(vector, new int[1][2]); + fail(); + } catch (IllegalArgumentException e) { + // as expected + } + try { + StdArrays.copyFrom(vector, new int[2][2][2]); + fail(); + } catch (IllegalArgumentException e) { + // as expected + } + } + + @Test + public void matrices() { + IntNdArray matrix = NdArrays.ofInts(Shape.of(2, 2)); + + StdArrays.copyTo(new int[][] { + {1, 2}, + {3, 4} + }, matrix); + assertEquals(1, matrix.getInt(0, 0)); + assertEquals(2, matrix.getInt(0, 1)); + assertEquals(3, matrix.getInt(1, 0)); + assertEquals(4, matrix.getInt(1, 1)); + try { + StdArrays.copyTo(new int[][] {{1, 2, 3}, {4, 5, 6}}, matrix); + fail(); + } catch (IllegalArgumentException e) { + // as expected + } + try { + StdArrays.copyTo(new int[][] {{1, 2}, {3, 4}}, NdArrays.ofInts(Shape.of(3, 3))); + fail(); + } catch (IllegalArgumentException e) { + // as expected + } + try { + StdArrays.copyTo(new int[][] {{1, 2}, {3, 4}}, NdArrays.ofInts(Shape.of(2, 2, 1))); + fail(); + } catch (IllegalArgumentException e) { + // as expected + } + + int[][] array = StdArrays.array2dCopyOf(matrix); + assertEquals(1, array[0][0]); + assertEquals(2, array[0][1]); + assertEquals(3, array[1][0]); + assertEquals(4, array[1][1]); + + array = new int[3][3]; + StdArrays.copyFrom(matrix, array); + assertArrayEquals(new int[] { 1, 2, 0 }, array[0]); + assertArrayEquals(new int[] { 3, 4, 0 }, array[1]); + assertArrayEquals(new int[] { 0, 0, 0 }, array[2]); + + try { + StdArrays.copyFrom(matrix, new int[1][2]); + fail(); + } catch (ArrayIndexOutOfBoundsException e) { + // as expected + } + try { + StdArrays.copyFrom(matrix, new int[2][1]); + fail(); + } catch (ArrayIndexOutOfBoundsException e) { + // as expected + } + try { + StdArrays.copyFrom(matrix, new int[2]); + fail(); + } catch (IllegalArgumentException e) { + // as expected + } + try { + StdArrays.copyFrom(matrix, new int[1][2][2]); + fail(); + } catch (IllegalArgumentException e) { + // as expected + } + try { + StdArrays.copyFrom(matrix, new int[2][2][2]); + fail(); + } catch (IllegalArgumentException e) { + // as expected + } + } + + @Test + public void objectMatrix() { + NdArray matrix = StdArrays.ndCopyOf(new String[][] {{"ab", "bc"}, {"cd", "de"}}); + assertEquals(NdArrays.vectorOfObjects("ab", "bc"), matrix.get(0)); + assertEquals(NdArrays.vectorOfObjects("cd", "de"), matrix.get(1)); + + String[][] array = StdArrays.array2dCopyOf(matrix, String.class); + assertEquals("ab", array[0][0]); + assertEquals("bc", array[0][1]); + assertEquals("cd", array[1][0]); + assertEquals("de", array[1][1]); + + array = new String[2][3]; + StdArrays.copyFrom(matrix, array); + assertEquals("ab", array[0][0]); + assertEquals("bc", array[0][1]); + assertNull(array[0][2]); + assertEquals("cd", array[1][0]); + assertEquals("de", array[1][1]); + assertNull(array[1][2]); + } + + @Test + public void cannotInitDenseMatrixWithRaggedArray() { + IntNdArray matrix = NdArrays.ofInts(Shape.of(2, 2)); + try { + StdArrays.copyTo(new int[][]{ + {1, 2}, + {3} + }, matrix); + fail(); + } catch (IllegalArgumentException e) { + // as expected + } + } + + @Test + public void computeShapeDense3DMatrix() { + Shape shape = StdArrays.shapeOf(new int[][][] { + { + {1, 2, 3}, {4, 5, 6} + }, + { + {1, 2, 3}, {4, 5, 6} + } + }); + assertArrayEquals(new long[] {2, 2, 3}, shape.asArray()); + } + + @Test + public void shapeOfRagged3DMatrix() { + Shape shape = StdArrays.shapeOf(new int[][][] { + { + {1, 2, 3}, {4, 5, 6}, {7, 8, 9} + }, + { + {1, 2, 3}, {4, 5, 6} + } + }); + assertArrayEquals(new long[] {2, Shape.UNKNOWN_SIZE, 3}, shape.asArray()); + } + + @Test + public void shapeOfEmptyArray() { + Shape shape = StdArrays.shapeOf(new int[2][2][3]); + assertArrayEquals(new long[] {2, 2, 3}, shape.asArray()); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/benchmark/NdArrayBenchmark.java b/ndarray/src/test/java/org/tensorflow/ndarray/benchmark/NdArrayBenchmark.java new file mode 100644 index 00000000000..fb7022bc830 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/benchmark/NdArrayBenchmark.java @@ -0,0 +1,163 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.benchmark; + +import static org.tensorflow.ndarray.index.Indices.all; +import static org.tensorflow.ndarray.index.Indices.at; + +import java.awt.image.BufferedImage; +import java.awt.image.Raster; +import java.io.IOException; +import javax.imageio.ImageIO; +import org.openjdk.jmh.annotations.Benchmark; +import org.openjdk.jmh.annotations.BenchmarkMode; +import org.openjdk.jmh.annotations.Fork; +import org.openjdk.jmh.annotations.Measurement; +import org.openjdk.jmh.annotations.Mode; +import org.openjdk.jmh.annotations.Scope; +import org.openjdk.jmh.annotations.Setup; +import org.openjdk.jmh.annotations.State; +import org.openjdk.jmh.annotations.Warmup; +import org.openjdk.jmh.runner.RunnerException; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.FloatNdArray; +import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.StdArrays; + +@Fork(value = 1, jvmArgs = {"-Xms4G", "-Xmx4G"}) +@BenchmarkMode(Mode.AverageTime) +@Warmup(iterations = 3) +@Measurement(iterations = 5) +@State(Scope.Benchmark) +public class NdArrayBenchmark { + + public static void main(String[] args) throws IOException, RunnerException { + org.openjdk.jmh.Main.main(args); + } + + @Setup + public void setUp() throws IOException { + BufferedImage image = ImageIO.read(getClass().getClassLoader().getResourceAsStream(TEST_IMAGE)); + + int numPixels = image.getWidth() * image.getHeight(); + pixels = NdArrays.ofFloats(Shape.of(numPixels, 3)); + channels = NdArrays.ofFloats(Shape.of(3, numPixels)); + + Raster imageData = image.getData(); + float[] pixel = new float[3]; + for (int y = 0, pixelIdx = 0; y < image.getHeight(); ++y) { + for (int x = 0; x < image.getWidth(); ++x, ++pixelIdx) { + imageData.getPixel(x, y, pixel); + StdArrays.copyTo(pixel, pixels.get(pixelIdx)); + StdArrays.copyTo(pixel, channels.slice(all(), at(pixelIdx))); + } + } + batches = NdArrays.ofFloats(Shape.of(BATCH_SIZE, 3, numPixels)); + firstBatch = batches.get(0); + } + + @Benchmark + @Measurement(batchSize = 2049 * 1537) + public void getElementAtIndex() { + pixels.get(0); + } + + @Benchmark + @Measurement(batchSize = 2049 * 1537) + public void slicing() { + batches.slice(at(0), all(), at(0)); + } + + @Benchmark + public void readingAllPixelsChannelsBySequence() { + pixels.scalars().forEach(pixel -> pixel.getFloat()); + } + + @Benchmark + public void readingAllPixelsChannelsBySequenceSlices() { + pixels.scalars().asSlices().forEach(pixel -> pixel.getFloat()); + } + + @Benchmark + @Measurement(batchSize = 100) + public void readingAllPixelsChannelsByIndex() { + long[] shape = pixels.shape().asArray(); + for (int i = 0; i < shape[0]; ++i) { + for (int j = 0; j < shape[1]; ++j) { + pixels.getFloat(i, j); + } + } + } + + @Benchmark + @Measurement(batchSize = BATCH_SIZE) + public void writeFirstBatchChannels() { + firstBatch.set(channels); + } + + @Benchmark + public void writeAllBatchChannels() { + batches.elements(0).forEach(batch -> + batch.set(channels) + ); + } + + @Benchmark + @Measurement(batchSize = 2049 * 1537) + public void writeOnePixelBySlicing() { + batches.slice(at(0), all(), at(0)).set(pixels.get(0)); + } + + @Benchmark + public void writeAllPixelsBySlicing() { + batches.elements(0).forEach(batch -> + pixels.elements(0).forEachIndexed((coords, pixel) -> + batch.slice(all(), at(coords[0])).set(pixel) + ) + ); + } + + @Benchmark + @Measurement(batchSize = 2049 * 1537) + public void writeOnePixelsByIndex() { + batches + .setFloat(pixels.getFloat(0, 0), 0, 0, 0) + .setFloat(pixels.getFloat(0, 1), 0, 1, 0) + .setFloat(pixels.getFloat(0, 2), 0, 2, 0); + } + + @Benchmark + public void writeAllPixelsByIndex() { + batches.elements(0).forEach(batch -> + pixels.elements(0).forEachIndexed((coords, pixel) -> { + long pixelIndex = coords[0]; + batch + .setFloat(pixel.getFloat(0), 0, pixelIndex) + .setFloat(pixel.getFloat(1), 1, pixelIndex) + .setFloat(pixel.getFloat(2), 2, pixelIndex); + }) + ); + } + + private static final String TEST_IMAGE = "castle.jpg"; + private static final int BATCH_SIZE = 60; + + private FloatNdArray pixels; + private FloatNdArray channels; + private FloatNdArray batches; + private FloatNdArray firstBatch; +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/buffer/BooleanDataBufferTestBase.java b/ndarray/src/test/java/org/tensorflow/ndarray/buffer/BooleanDataBufferTestBase.java new file mode 100644 index 00000000000..3f6df8aa1ce --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/buffer/BooleanDataBufferTestBase.java @@ -0,0 +1,142 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.buffer; + +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotEquals; + +import java.util.Arrays; +import java.util.BitSet; +import org.junit.jupiter.api.Test; +import org.tensorflow.ndarray.impl.buffer.misc.MiscDataBufferFactory; + +public abstract class BooleanDataBufferTestBase extends DataBufferTestBase { + + @Override + protected abstract BooleanDataBuffer allocate(long size); + + @Override + protected Boolean valueOf(Long val) { + return val != 0; + } + + @Test + public void writeAndReadFromArray() { + BooleanDataBuffer buffer = allocate(10L); + boolean[] values = new boolean[]{true, false, false, true, false}; + + buffer.write(values); + assertTrue(buffer.getObject(0)); + assertFalse(buffer.getObject(1)); + + buffer.offset(5).write(values); + assertTrue(buffer.getObject(5)); + + boolean[] read = new boolean[5]; + buffer.read(read); + assertArrayEquals(values, read); + + buffer.write(values, 2, 3); + assertFalse(buffer.getObject(0)); + assertTrue(buffer.getObject(1)); + assertFalse(buffer.getObject(2)); + + Arrays.fill(read, false); + buffer.read(read, 1, 2); + assertFalse(read[0]); + assertFalse(read[1]); + assertTrue(read[2]); + assertFalse(read[3]); + } + + @Test + public void equalWithBitSetBuffer() { + BitSet bitSet1 = BitSet.valueOf(new byte[] { 0x01, 0x01 }); + BooleanDataBuffer bitSet1Buffer = MiscDataBufferFactory.create(bitSet1, 12, true); + + BitSet bitSet2 = BitSet.valueOf(new byte[] { 0x11, 0x01 }); + BooleanDataBuffer bitSet2Buffer = MiscDataBufferFactory.create(bitSet2, 12, true); + + BooleanDataBuffer buffer = allocate(12) + .setBoolean(true, 0) + .setBoolean(true, 8); + + assertTrue(bitSet1Buffer.equals(buffer)); + assertTrue(buffer.equals(bitSet1Buffer)); + assertEquals(bitSet1Buffer.hashCode(), buffer.hashCode()); + + assertFalse(bitSet2Buffer.equals(buffer)); + assertFalse(buffer.equals(bitSet2Buffer)); + assertNotEquals(bitSet2Buffer.hashCode(), buffer.hashCode()); + } + + @Test + public void equalWithBooleanArrayBuffer() { + boolean[] array1 = new boolean[] { false, false, false, true, true, false }; + BooleanDataBuffer array1Buffer = MiscDataBufferFactory.create(array1, true); + + boolean[] array2 = new boolean[] { false, false, false, true, true, true }; + BooleanDataBuffer array2Buffer = MiscDataBufferFactory.create(array2, true); + + BooleanDataBuffer buffer = allocate(6) + .setBoolean(true, 3) + .setBoolean(true, 4); + + assertTrue(array1Buffer.equals(buffer)); + assertTrue(buffer.equals(array1Buffer)); + assertEquals(array1Buffer.hashCode(), buffer.hashCode()); + + assertFalse(array2Buffer.equals(buffer)); + assertFalse(buffer.equals(array2Buffer)); + assertNotEquals(array2Buffer.hashCode(), buffer.hashCode()); + } + + @Test + public void equalWithBooleanObjectBuffer() { + Boolean[] array1 = new Boolean[] { false, false, false, true, true, false }; + DataBuffer array1Buffer = MiscDataBufferFactory.create(array1, true); + + boolean[] array2 = new boolean[] { false, false, false, true, true, true }; + DataBuffer array2Buffer = MiscDataBufferFactory.create(array2, true); + + BooleanDataBuffer buffer = allocate(6) + .setBoolean(true, 3) + .setBoolean(true, 4); + + assertTrue(array1Buffer.equals(buffer)); + assertTrue(buffer.equals(array1Buffer)); + assertEquals(array1Buffer.hashCode(), buffer.hashCode()); + + assertFalse(array2Buffer.equals(buffer)); + assertFalse(buffer.equals(array2Buffer)); + assertNotEquals(array2Buffer.hashCode(), buffer.hashCode()); + } + + @Test + public void notEqualWithOtherTypes() { + BooleanDataBuffer buffer = allocate(2) + .setBoolean(false, 0) + .setBoolean(true, 1); + ByteDataBuffer byteBuffer = DataBuffers.of((byte)0, (byte)1); + + assertFalse(buffer.equals(byteBuffer)); + assertFalse(byteBuffer.equals(buffer)); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/buffer/ByteDataBufferTestBase.java b/ndarray/src/test/java/org/tensorflow/ndarray/buffer/ByteDataBufferTestBase.java new file mode 100644 index 00000000000..777368466f5 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/buffer/ByteDataBufferTestBase.java @@ -0,0 +1,145 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.buffer; + +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.junit.jupiter.api.Test; +import org.tensorflow.ndarray.impl.buffer.misc.MiscDataBufferFactory; +import org.tensorflow.ndarray.impl.buffer.nio.NioDataBufferFactory; +import org.tensorflow.ndarray.impl.buffer.raw.RawDataBufferFactory; + +public abstract class ByteDataBufferTestBase extends DataBufferTestBase { + + @Override + protected abstract ByteDataBuffer allocate(long size); + + @Override + protected Byte valueOf(Long val) { + return val.byteValue(); + } + + @Test + public void writeAndReadFromArray() { + ByteDataBuffer buffer = allocate(10L); + byte[] oneToFive = new byte[]{ 1, 2, 3, 4, 5 }; + + buffer.write(oneToFive); + assertEquals(2, buffer.getByte(1)); + + buffer.offset(5).write(oneToFive); + assertEquals(2, buffer.getByte(1)); + assertEquals(2, buffer.getByte(6)); + + byte[] read = new byte[5]; + buffer.read(read); + assertArrayEquals(oneToFive, read); + + buffer.write(oneToFive, 2, 2); + assertEquals(3, buffer.getByte(0)); + assertEquals(4, buffer.getByte(1)); + assertEquals(3, buffer.getByte(2)); + + Arrays.fill(read, valueOf(0L)); + buffer.read(read, 1, 2); + assertEquals(0, read[0]); + assertEquals(3, read[1]); + assertEquals(4, read[2]); + assertEquals(0, read[3]); + } + + @Test + public void equalWithByteNioBuffer() { + ByteDataBuffer nioBuffer1 = NioDataBufferFactory.create(ByteBuffer.wrap(new byte[] { 0x01, 0x10 })); + ByteDataBuffer nioBuffer2 = NioDataBufferFactory.create(ByteBuffer.wrap(new byte[] { 0x01, 0x11 })); + + ByteDataBuffer buffer = allocate(2) + .setByte((byte)0x01, 0) + .setByte((byte)0x10, 1); + + assertTrue(nioBuffer1.equals(buffer)); + assertTrue(buffer.equals(nioBuffer1)); + assertEquals(nioBuffer1.hashCode(), buffer.hashCode()); + + assertFalse(nioBuffer2.equals(buffer)); + assertFalse(buffer.equals(nioBuffer2)); + assertNotEquals(nioBuffer2.hashCode(), buffer.hashCode()); + } + + @Test + public void equalWithByteRawBuffer() { + ByteDataBuffer rawBuffer1 = RawDataBufferFactory.create(new byte[] { 0x01, 0x10 }, true); + ByteDataBuffer rawBuffer2 = RawDataBufferFactory.create(new byte[] { 0x01, 0x11 }, true); + + ByteDataBuffer buffer = allocate(2) + .setByte((byte)0x01, 0) + .setByte((byte)0x10, 1); + + assertTrue(rawBuffer1.equals(buffer)); + assertTrue(buffer.equals(rawBuffer1)); + assertEquals(rawBuffer1.hashCode(), buffer.hashCode()); + + assertFalse(rawBuffer2.equals(buffer)); + assertFalse(buffer.equals(rawBuffer2)); + assertNotEquals(rawBuffer2.hashCode(), buffer.hashCode()); + } + + @Test + public void equalWithByteObjectBuffer() { + DataBuffer objBuffer1 = MiscDataBufferFactory.create(new Byte[] { 0x01, 0x10 }, true); + DataBuffer objBuffer2 = MiscDataBufferFactory.create(new Byte[] { 0x01, 0x11 }, true); + + ByteDataBuffer buffer = allocate(2) + .setByte((byte)0x01, 0) + .setByte((byte)0x10, 1); + + assertTrue(objBuffer1.equals(buffer)); + assertTrue(buffer.equals(objBuffer1)); + assertEquals(objBuffer1.hashCode(), buffer.hashCode()); + + assertFalse(objBuffer2.equals(buffer)); + assertFalse(buffer.equals(objBuffer2)); + assertNotEquals(objBuffer2.hashCode(), buffer.hashCode()); + } + + @Test + public void notEqualWithOtherTypes() { + ByteDataBuffer buffer = allocate(2) + .setByte((byte)1, 0) + .setByte((byte)16, 1); + LongDataBuffer longBuffer = DataBuffers.of(1L, 16L); + + assertFalse(buffer.equals(longBuffer)); + assertFalse(longBuffer.equals(buffer)); + + try { + IntDataBuffer intBuffer = buffer.asInts(); + + assertFalse(buffer.equals(intBuffer)); + assertFalse(intBuffer.equals(buffer)); + + } catch (IllegalStateException e) { + // some byte buffers cannot be converted to ints, ignore the test in that case + } + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/buffer/DataBufferTestBase.java b/ndarray/src/test/java/org/tensorflow/ndarray/buffer/DataBufferTestBase.java new file mode 100644 index 00000000000..9a023915735 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/buffer/DataBufferTestBase.java @@ -0,0 +1,293 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.buffer; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertSame; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; + +import java.nio.BufferOverflowException; +import java.nio.BufferUnderflowException; +import org.junit.jupiter.api.Test; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBufferWindow; +import org.tensorflow.ndarray.buffer.DataBuffers; + +public abstract class DataBufferTestBase { + + protected final boolean enableLargeBufferTests = System.getProperty("testLargeBuffers") != null; + + protected long maxSize() { + return DataBuffers.MAX_32BITS; + } + + protected abstract DataBuffer allocate(long size); + + protected abstract T valueOf(Long val); + + @Test + public void bufferSize() { + DataBuffer buffer = allocate(10L); + assertEquals(10L, buffer.size()); + + buffer = allocate(0L); + assertEquals(0L, buffer.size()); + + if (enableLargeBufferTests) { + buffer = allocate(maxSize()); + assertEquals(maxSize(), buffer.size()); + } + } + + @Test + public void offsetNarrowAndSlice() { + DataBuffer buffer = allocate(10L).setObject(valueOf(1L), 5); // 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 + assertEquals(10L, buffer.size()); + assertEquals(valueOf(1L), buffer.getObject(5)); + + DataBuffer subBuffer = buffer.slice(2, 6); // 0, 0, 0, 1, 0, 0 + assertEquals(6L, subBuffer.size()); + assertEquals(valueOf(1L), subBuffer.getObject(3)); + + subBuffer = subBuffer.offset(2L); // 0, 1, 0, 0 + assertEquals(4L, subBuffer.size()); + assertEquals(valueOf(1L), subBuffer.getObject(1)); + + subBuffer = subBuffer.narrow(2L); // 0, 1 + assertEquals(2L, subBuffer.size()); + assertEquals(valueOf(1L), subBuffer.getObject(1)); + try { + subBuffer.getObject(2); + fail(); + } catch (IndexOutOfBoundsException e) { + //as expected + } + try { + buffer.slice(2, 12); + fail(); + } catch (IllegalArgumentException e) { + // as expected + } + try { + buffer.slice(-1, 3); + fail(); + } catch (IllegalArgumentException e) { + // as expected + } + try { + buffer.slice(2, -1); + fail(); + } catch (IllegalArgumentException e) { + // as expected + } + try { + buffer.offset(-1L); + fail(); + } catch (IllegalArgumentException e) { + // as expected + } + try { + buffer.offset(11L); + fail(); + } catch (IllegalArgumentException e) { + // as expected + } + try { + buffer.narrow(-1L); + fail(); + } catch (IllegalArgumentException e) { + // as expected + } + try { + buffer.narrow(11L); + fail(); + } catch (IllegalArgumentException e) { + // as expected + } + } + + @Test + public void putAndGet() { + DataBuffer buffer = allocate(10L); + + buffer.setObject(valueOf(5L), 5L); + assertEquals(valueOf(5L), buffer.getObject(5L)); + try { + buffer.setObject(valueOf(10L), 10L); + fail(); + } catch (IndexOutOfBoundsException e) { + // as expected + } + try { + buffer.getObject(10L); + fail(); + } catch (IndexOutOfBoundsException e) { + // as expected + } + try { + buffer.setObject(valueOf(-1L), -1L); + fail(); + } catch (IndexOutOfBoundsException e) { + // as expected + } + try { + buffer.getObject(-1L); + fail(); + } catch (IndexOutOfBoundsException e) { + // as expected + } + } + + @Test + public void copyToBuffer() { + DataBuffer srcBuffer = allocate(25L); + srcBuffer.setObject(valueOf(5L), 5L); + srcBuffer.setObject(valueOf(10L), 10L); + srcBuffer.setObject(valueOf(15L), 15L); + srcBuffer.setObject(valueOf(20L), 20L); + try { + srcBuffer.copyTo(srcBuffer, srcBuffer.size()); + fail(); + } catch (IllegalArgumentException e) { + // as expected + } + DataBuffer dstBuffer = allocate(30L); + srcBuffer.copyTo(dstBuffer, srcBuffer.size()); + assertEquals(valueOf(5L), dstBuffer.getObject(5L)); + try { + srcBuffer.copyTo(dstBuffer, dstBuffer.size()); + fail(); + } catch (BufferUnderflowException e) { + // as expected + } + try { + dstBuffer.copyTo(srcBuffer, dstBuffer.size()); + fail(); + } catch (BufferOverflowException e) { + // as expected + } + } + + @Test + public void createFromVarargs() { + DataBuffer buffer = DataBuffers.ofObjects(valueOf(1L), valueOf(2L), valueOf(3L)); + assertEquals(3, buffer.size()); + assertEquals(valueOf(1L), buffer.getObject(0)); + assertEquals(valueOf(2L), buffer.getObject(1)); + assertEquals(valueOf(3L), buffer.getObject(2)); + } + + @Test + public void equalWithObjectBuffer() { + DataBuffer buffer1 = allocate(2) + .setObject(valueOf(0L), 0) + .setObject(valueOf(1L), 1); + DataBuffer buffer2 = allocate(2) + .setObject(valueOf(0L), 0) + .setObject(valueOf(1L), 1); + DataBuffer buffer3 = allocate(2) + .setObject(valueOf(1L), 0) + .setObject(valueOf(0L), 1); + DataBuffer buffer4 = allocate(1) + .setObject(valueOf(0L), 0); + DataBuffer buffer5 = allocate(3) + .setObject(valueOf(0L), 0) + .setObject(valueOf(1L), 1) + .setObject(valueOf(2L), 2); + + assertTrue(buffer1.equals(buffer2)); + assertTrue(buffer2.equals(buffer1)); + assertEquals(buffer1.hashCode(), buffer1.hashCode()); + assertEquals(buffer1.hashCode(), buffer2.hashCode()); + + assertFalse(buffer3.equals(buffer1)); + assertFalse(buffer1.equals(buffer3)); + assertNotEquals(buffer3.hashCode(), buffer1.hashCode()); + + assertFalse(buffer4.equals(buffer1)); + assertFalse(buffer1.equals(buffer4)); + assertNotEquals(buffer4.hashCode(), buffer1.hashCode()); + + assertFalse(buffer5.equals(buffer1)); + assertFalse(buffer1.equals(buffer5)); + assertNotEquals(buffer5.hashCode(), buffer1.hashCode()); + } + + @Test + public void bufferWindow() { + DataBuffer buffer = allocate(20); + DataBufferWindow> bufferWindow; + try { + bufferWindow = buffer.window(4); + } catch (UnsupportedOperationException e) { + return; // skip test if this buffer does not support windows + } + assertEquals(0, bufferWindow.offset()); + assertEquals(4, bufferWindow.size()); + assertEquals(4, bufferWindow.buffer().size()); + + for (long i = 0; i < buffer.size(); ++i) { + buffer.setObject(valueOf(i), i); + } + assertEquals(valueOf(2L), bufferWindow.buffer().getObject(2)); + DataBuffer windowBuffer = bufferWindow.buffer(); + + bufferWindow.slide(10); + assertEquals(10, bufferWindow.offset()); + assertEquals(4, bufferWindow.size()); + assertEquals(valueOf(12L), bufferWindow.buffer().getObject(2)); + assertSame(windowBuffer, bufferWindow.buffer()); + + bufferWindow.slide(-2); + assertEquals(8, bufferWindow.offset()); + assertEquals(4, bufferWindow.size()); + assertEquals(valueOf(10L), bufferWindow.buffer().getObject(2)); + + bufferWindow.slideTo(16); + assertEquals(16, bufferWindow.offset()); + assertEquals(4, bufferWindow.size()); + assertEquals(valueOf(18L), bufferWindow.buffer().getObject(2)); + + try { + bufferWindow.slide(1); + fail(); + } catch (IndexOutOfBoundsException e) { + // as expected + } + try { + bufferWindow.slide(-17); + fail(); + } catch (IndexOutOfBoundsException e) { + // as expected + } + try { + bufferWindow.slideTo(-1); + fail(); + } catch (IndexOutOfBoundsException e) { + // as expected + } + try { + bufferWindow.slideTo(17); + fail(); + } catch (IndexOutOfBoundsException e) { + // as expected + } + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/buffer/DoubleDataBufferTestBase.java b/ndarray/src/test/java/org/tensorflow/ndarray/buffer/DoubleDataBufferTestBase.java new file mode 100644 index 00000000000..4dee064968c --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/buffer/DoubleDataBufferTestBase.java @@ -0,0 +1,135 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.buffer; + +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.nio.DoubleBuffer; +import java.util.Arrays; +import org.junit.jupiter.api.Test; +import org.tensorflow.ndarray.impl.buffer.misc.MiscDataBufferFactory; +import org.tensorflow.ndarray.impl.buffer.nio.NioDataBufferFactory; +import org.tensorflow.ndarray.impl.buffer.raw.RawDataBufferFactory; + +public abstract class DoubleDataBufferTestBase extends DataBufferTestBase { + + @Override + protected abstract DoubleDataBuffer allocate(long size); + + @Override + protected Double valueOf(Long val) { + return val.doubleValue(); + } + + @Test + public void writeAndReadFromArray() { + DoubleDataBuffer buffer = allocate(10L); + double[] oneToFive = new double[]{ 1.0, 2.0, 3.0, 4.0, 5.0 }; + + buffer.write(oneToFive); + assertEquals(2.0, buffer.getDouble(1), 0.0); + + buffer.offset(5).write(oneToFive); + assertEquals(2.0, buffer.getDouble(1), 0.0); + assertEquals(2.0, buffer.getDouble(6), 0.0); + + double[] read = new double[5]; + buffer.read(read); + assertArrayEquals(oneToFive, read, 0.0); + + buffer.write(oneToFive, 2, 2); + assertEquals(3.0, buffer.getDouble(0), 0.0); + assertEquals(4.0, buffer.getDouble(1), 0.0); + assertEquals(3.0, buffer.getDouble(2), 0.0); + + Arrays.fill(read, valueOf(0L)); + buffer.read(read, 1, 2); + assertEquals(0.0, read[0], 0.0); + assertEquals(3.0, read[1], 0.0); + assertEquals(4.0, read[2], 0.0); + assertEquals(0.0, read[3], 0.0); + } + + @Test + public void equalWithDoubleNioBuffer() { + DoubleDataBuffer nioBuffer1 = NioDataBufferFactory.create(DoubleBuffer.wrap(new double[] { 1.0, 16.0 })); + DoubleDataBuffer nioBuffer2 = NioDataBufferFactory.create(DoubleBuffer.wrap(new double[] { 1.0, 25.0 })); + + DoubleDataBuffer buffer = allocate(2) + .setDouble(1.0, 0) + .setDouble(16.0, 1); + + assertTrue(nioBuffer1.equals(buffer)); + assertTrue(buffer.equals(nioBuffer1)); + assertEquals(nioBuffer1.hashCode(), buffer.hashCode()); + + assertFalse(nioBuffer2.equals(buffer)); + assertFalse(buffer.equals(nioBuffer2)); + assertNotEquals(nioBuffer2.hashCode(), buffer.hashCode()); + } + + @Test + public void equalWithDoubleRawBuffer() { + DoubleDataBuffer rawBuffer1 = RawDataBufferFactory.create(new double[] { 1.0, 16.0 }, true); + DoubleDataBuffer rawBuffer2 = RawDataBufferFactory.create(new double[] { 1.0, 25.0 }, true); + + DoubleDataBuffer buffer = allocate(2) + .setDouble(1.0, 0) + .setDouble(16.0, 1); + + assertTrue(rawBuffer1.equals(buffer)); + assertTrue(buffer.equals(rawBuffer1)); + assertEquals(rawBuffer1.hashCode(), buffer.hashCode()); + + assertFalse(rawBuffer2.equals(buffer)); + assertFalse(buffer.equals(rawBuffer2)); + assertNotEquals(rawBuffer2.hashCode(), buffer.hashCode()); + } + + @Test + public void equalWithDoubleObjectBuffer() { + DataBuffer objBuffer1 = MiscDataBufferFactory.create(new Double[] { 1.0, 16.0 }, true); + DataBuffer objBuffer2 = MiscDataBufferFactory.create(new Double[] { 1.0, 25.0 }, true); + + DoubleDataBuffer buffer = allocate(2) + .setDouble(1.0, 0) + .setDouble(16.0, 1); + + assertTrue(objBuffer1.equals(buffer)); + assertTrue(buffer.equals(objBuffer1)); + assertEquals(objBuffer1.hashCode(), buffer.hashCode()); + + assertFalse(objBuffer2.equals(buffer)); + assertFalse(buffer.equals(objBuffer2)); + assertNotEquals(objBuffer2.hashCode(), buffer.hashCode()); + } + + @Test + public void notEqualWithOtherTypes() { + DoubleDataBuffer buffer = allocate(2) + .setDouble(1.0, 0) + .setDouble(16.0, 1); + FloatDataBuffer floatBuffer = DataBuffers.of(1.0f, 16.0f); + + assertFalse(buffer.equals(floatBuffer)); + assertFalse(floatBuffer.equals(buffer)); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/buffer/FloatDataBufferTestBase.java b/ndarray/src/test/java/org/tensorflow/ndarray/buffer/FloatDataBufferTestBase.java new file mode 100644 index 00000000000..49c4f15b808 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/buffer/FloatDataBufferTestBase.java @@ -0,0 +1,135 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.buffer; + +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.nio.FloatBuffer; +import java.util.Arrays; +import org.junit.jupiter.api.Test; +import org.tensorflow.ndarray.impl.buffer.misc.MiscDataBufferFactory; +import org.tensorflow.ndarray.impl.buffer.nio.NioDataBufferFactory; +import org.tensorflow.ndarray.impl.buffer.raw.RawDataBufferFactory; + +public abstract class FloatDataBufferTestBase extends DataBufferTestBase { + + @Override + protected abstract FloatDataBuffer allocate(long size); + + @Override + protected Float valueOf(Long val) { + return val.floatValue(); + } + + @Test + public void writeAndReadFromArray() { + FloatDataBuffer buffer = allocate(10L); + float[] oneToFive = new float[]{ 1.0f, 2.0f, 3.0f, 4.0f, 5.0f }; + + buffer.write(oneToFive); + assertEquals(2.0f, buffer.getFloat(1), 0.0f); + + buffer.offset(5).write(oneToFive); + assertEquals(2.0f, buffer.getFloat(1), 0.0f); + assertEquals(2.0f, buffer.getFloat(6), 0.0f); + + float[] read = new float[5]; + buffer.read(read); + assertArrayEquals(oneToFive, read, 0.0f); + + buffer.write(oneToFive, 2, 2); + assertEquals(3.0f, buffer.getFloat(0), 0.0f); + assertEquals(4.0f, buffer.getFloat(1), 0.0f); + assertEquals(3.0f, buffer.getFloat(2), 0.0f); + + Arrays.fill(read, valueOf(0L)); + buffer.read(read, 1, 2); + assertEquals(0.0f, read[0], 0.0f); + assertEquals(3.0f, read[1], 0.0f); + assertEquals(4.0f, read[2], 0.0f); + assertEquals(0.0f, read[3], 0.0f); + } + + @Test + public void equalWithFloatNioBuffer() { + FloatDataBuffer nioBuffer1 = NioDataBufferFactory.create(FloatBuffer.wrap(new float[] { 1.0f, 16.0f })); + FloatDataBuffer nioBuffer2 = NioDataBufferFactory.create(FloatBuffer.wrap(new float[] { 1.0f, 25.0f })); + + FloatDataBuffer buffer = allocate(2) + .setFloat(1.0f, 0) + .setFloat(16.0f, 1); + + assertTrue(nioBuffer1.equals(buffer)); + assertTrue(buffer.equals(nioBuffer1)); + assertEquals(nioBuffer1.hashCode(), buffer.hashCode()); + + assertFalse(nioBuffer2.equals(buffer)); + assertFalse(buffer.equals(nioBuffer2)); + assertNotEquals(nioBuffer2.hashCode(), buffer.hashCode()); + } + + @Test + public void equalWithFloatRawBuffer() { + FloatDataBuffer rawBuffer1 = RawDataBufferFactory.create(new float[] { 1.0f, 16.0f }, true); + FloatDataBuffer rawBuffer2 = RawDataBufferFactory.create(new float[] { 1.0f, 25.0f }, true); + + FloatDataBuffer buffer = allocate(2) + .setFloat(1.0f, 0) + .setFloat(16.0f, 1); + + assertTrue(rawBuffer1.equals(buffer)); + assertTrue(buffer.equals(rawBuffer1)); + assertEquals(rawBuffer1.hashCode(), buffer.hashCode()); + + assertFalse(rawBuffer2.equals(buffer)); + assertFalse(buffer.equals(rawBuffer2)); + assertNotEquals(rawBuffer2.hashCode(), buffer.hashCode()); + } + + @Test + public void equalWithFloatObjectBuffer() { + DataBuffer objBuffer1 = MiscDataBufferFactory.create(new Float[] { 1.0f, 16.0f }, true); + DataBuffer objBuffer2 = MiscDataBufferFactory.create(new Float[] { 1.0f, 25.0f }, true); + + FloatDataBuffer buffer = allocate(2) + .setFloat(1.0f, 0) + .setFloat(16.0f, 1); + + assertTrue(objBuffer1.equals(buffer)); + assertTrue(buffer.equals(objBuffer1)); + assertEquals(objBuffer1.hashCode(), buffer.hashCode()); + + assertFalse(objBuffer2.equals(buffer)); + assertFalse(buffer.equals(objBuffer2)); + assertNotEquals(objBuffer2.hashCode(), buffer.hashCode()); + } + + @Test + public void notEqualWithOtherTypes() { + FloatDataBuffer buffer = allocate(2) + .setFloat(1.0f, 0) + .setFloat(16.0f, 1); + DoubleDataBuffer doubleBuffer = DataBuffers.of(1.0, 16.0); + + assertFalse(buffer.equals(doubleBuffer)); + assertFalse(doubleBuffer.equals(buffer)); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/buffer/IntDataBufferTestBase.java b/ndarray/src/test/java/org/tensorflow/ndarray/buffer/IntDataBufferTestBase.java new file mode 100644 index 00000000000..f3642e88ef8 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/buffer/IntDataBufferTestBase.java @@ -0,0 +1,135 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.buffer; + +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.nio.IntBuffer; +import java.util.Arrays; +import org.junit.jupiter.api.Test; +import org.tensorflow.ndarray.impl.buffer.misc.MiscDataBufferFactory; +import org.tensorflow.ndarray.impl.buffer.nio.NioDataBufferFactory; +import org.tensorflow.ndarray.impl.buffer.raw.RawDataBufferFactory; + +public abstract class IntDataBufferTestBase extends DataBufferTestBase { + + @Override + protected abstract IntDataBuffer allocate(long size); + + @Override + protected Integer valueOf(Long val) { + return val.intValue(); + } + + @Test + public void writeAndReadFromArray() { + IntDataBuffer buffer = allocate(10L); + int[] oneToFive = new int[]{ 1, 2, 3, 4, 5 }; + + buffer.write(oneToFive); + assertEquals(2, buffer.getInt(1)); + + buffer.offset(5).write(oneToFive); + assertEquals(2, buffer.getInt(1)); + assertEquals(2, buffer.getInt(6)); + + int[] read = new int[5]; + buffer.read(read); + assertArrayEquals(oneToFive, read); + + buffer.write(oneToFive, 2, 2); + assertEquals(3, buffer.getInt(0)); + assertEquals(4, buffer.getInt(1)); + assertEquals(3, buffer.getInt(2)); + + Arrays.fill(read, valueOf(0L)); + buffer.read(read, 1, 2); + assertEquals(0, read[0]); + assertEquals(3, read[1]); + assertEquals(4, read[2]); + assertEquals(0, read[3]); + } + + @Test + public void equalWithIntNioBuffer() { + IntDataBuffer nioBuffer1 = NioDataBufferFactory.create(IntBuffer.wrap(new int[] { 1, 16 })); + IntDataBuffer nioBuffer2 = NioDataBufferFactory.create(IntBuffer.wrap(new int[] { 1, 25 })); + + IntDataBuffer buffer = allocate(2) + .setInt(1, 0) + .setInt(16, 1); + + assertTrue(nioBuffer1.equals(buffer)); + assertTrue(buffer.equals(nioBuffer1)); + assertEquals(nioBuffer1.hashCode(), buffer.hashCode()); + + assertFalse(nioBuffer2.equals(buffer)); + assertFalse(buffer.equals(nioBuffer2)); + assertNotEquals(nioBuffer2.hashCode(), buffer.hashCode()); + } + + @Test + public void equalWithIntRawBuffer() { + IntDataBuffer rawBuffer1 = RawDataBufferFactory.create(new int[] { 1, 16 }, true); + IntDataBuffer rawBuffer2 = RawDataBufferFactory.create(new int[] { 1, 25 }, true); + + IntDataBuffer buffer = allocate(2) + .setInt(1, 0) + .setInt(16, 1); + + assertTrue(rawBuffer1.equals(buffer)); + assertTrue(buffer.equals(rawBuffer1)); + assertEquals(rawBuffer1.hashCode(), buffer.hashCode()); + + assertFalse(rawBuffer2.equals(buffer)); + assertFalse(buffer.equals(rawBuffer2)); + assertNotEquals(rawBuffer2.hashCode(), buffer.hashCode()); + } + + @Test + public void equalWithIntObjectBuffer() { + DataBuffer objBuffer1 = MiscDataBufferFactory.create(new Integer[] { 1, 16 }, true); + DataBuffer objBuffer2 = MiscDataBufferFactory.create(new Integer[] { 1, 25 }, true); + + IntDataBuffer buffer = allocate(2) + .setInt(1, 0) + .setInt(16, 1); + + assertTrue(objBuffer1.equals(buffer)); + assertTrue(buffer.equals(objBuffer1)); + assertEquals(objBuffer1.hashCode(), buffer.hashCode()); + + assertFalse(objBuffer2.equals(buffer)); + assertFalse(buffer.equals(objBuffer2)); + assertNotEquals(objBuffer2.hashCode(), buffer.hashCode()); + } + + @Test + public void notEqualWithOtherTypes() { + IntDataBuffer buffer = allocate(2) + .setInt(1, 0) + .setInt(16, 1); + LongDataBuffer longBuffer = DataBuffers.of(1L, 16L); + + assertFalse(buffer.equals(longBuffer)); + assertFalse(longBuffer.equals(buffer)); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/buffer/LongDataBufferTestBase.java b/ndarray/src/test/java/org/tensorflow/ndarray/buffer/LongDataBufferTestBase.java new file mode 100644 index 00000000000..e0d8b1b4539 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/buffer/LongDataBufferTestBase.java @@ -0,0 +1,135 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.buffer; + +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.nio.LongBuffer; +import java.util.Arrays; +import org.junit.jupiter.api.Test; +import org.tensorflow.ndarray.impl.buffer.misc.MiscDataBufferFactory; +import org.tensorflow.ndarray.impl.buffer.nio.NioDataBufferFactory; +import org.tensorflow.ndarray.impl.buffer.raw.RawDataBufferFactory; + +public abstract class LongDataBufferTestBase extends DataBufferTestBase { + + @Override + protected abstract LongDataBuffer allocate(long size); + + @Override + protected Long valueOf(Long val) { + return val; + } + + @Test + public void writeAndReadFromArray() { + LongDataBuffer buffer = allocate(10L); + long[] oneToFive = new long[]{ 1L, 2L, 3L, 4L, 5L }; + + buffer.write(oneToFive); + assertEquals(2, buffer.getLong(1)); + + buffer.offset(5).write(oneToFive); + assertEquals(2L, buffer.getLong(1)); + assertEquals(2L, buffer.getLong(6)); + + long[] read = new long[5]; + buffer.read(read); + assertArrayEquals(oneToFive, read); + + buffer.write(oneToFive, 2, 2); + assertEquals(3L, buffer.getLong(0)); + assertEquals(4L, buffer.getLong(1)); + assertEquals(3L, buffer.getLong(2)); + + Arrays.fill(read, valueOf(0L)); + buffer.read(read, 1, 2); + assertEquals(0L, read[0]); + assertEquals(3L, read[1]); + assertEquals(4L, read[2]); + assertEquals(0L, read[3]); + } + + @Test + public void equalWithLongNioBuffer() { + LongDataBuffer nioBuffer1 = NioDataBufferFactory.create(LongBuffer.wrap(new long[] { 1, 16 })); + LongDataBuffer nioBuffer2 = NioDataBufferFactory.create(LongBuffer.wrap(new long[] { 1, 25 })); + + LongDataBuffer buffer = allocate(2) + .setLong(1, 0) + .setLong(16, 1); + + assertTrue(nioBuffer1.equals(buffer)); + assertTrue(buffer.equals(nioBuffer1)); + assertEquals(nioBuffer1.hashCode(), buffer.hashCode()); + + assertFalse(nioBuffer2.equals(buffer)); + assertFalse(buffer.equals(nioBuffer2)); + assertNotEquals(nioBuffer2.hashCode(), buffer.hashCode()); + } + + @Test + public void equalWithLongRawBuffer() { + LongDataBuffer rawBuffer1 = RawDataBufferFactory.create(new long[] { 1, 16 }, true); + LongDataBuffer rawBuffer2 = RawDataBufferFactory.create(new long[] { 1, 25 }, true); + + LongDataBuffer buffer = allocate(2) + .setLong(1, 0) + .setLong(16, 1); + + assertTrue(rawBuffer1.equals(buffer)); + assertTrue(buffer.equals(rawBuffer1)); + assertEquals(rawBuffer1.hashCode(), buffer.hashCode()); + + assertFalse(rawBuffer2.equals(buffer)); + assertFalse(buffer.equals(rawBuffer2)); + assertNotEquals(rawBuffer2.hashCode(), buffer.hashCode()); + } + + @Test + public void equalWithLongObjectBuffer() { + DataBuffer objBuffer1 = MiscDataBufferFactory.create(new Long[] { 1L, 16L }, true); + DataBuffer objBuffer2 = MiscDataBufferFactory.create(new Long[] { 1L, 25L }, true); + + LongDataBuffer buffer = allocate(2) + .setLong(1, 0) + .setLong(16, 1); + + assertTrue(objBuffer1.equals(buffer)); + assertTrue(buffer.equals(objBuffer1)); + assertEquals(objBuffer1.hashCode(), buffer.hashCode()); + + assertFalse(objBuffer2.equals(buffer)); + assertFalse(buffer.equals(objBuffer2)); + assertNotEquals(objBuffer2.hashCode(), buffer.hashCode()); + } + + @Test + public void notEqualWithOtherTypes() { + LongDataBuffer buffer = allocate(2) + .setLong(1L, 0) + .setLong(16L, 1); + IntDataBuffer intBuffer = DataBuffers.of(1, 16); + + assertFalse(buffer.equals(intBuffer)); + assertFalse(intBuffer.equals(buffer)); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/buffer/ShortDataBufferTestBase.java b/ndarray/src/test/java/org/tensorflow/ndarray/buffer/ShortDataBufferTestBase.java new file mode 100644 index 00000000000..f3269e85a8f --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/buffer/ShortDataBufferTestBase.java @@ -0,0 +1,135 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.buffer; + +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.nio.ShortBuffer; +import java.util.Arrays; +import org.junit.jupiter.api.Test; +import org.tensorflow.ndarray.impl.buffer.misc.MiscDataBufferFactory; +import org.tensorflow.ndarray.impl.buffer.nio.NioDataBufferFactory; +import org.tensorflow.ndarray.impl.buffer.raw.RawDataBufferFactory; + +public abstract class ShortDataBufferTestBase extends DataBufferTestBase { + + @Override + protected abstract ShortDataBuffer allocate(long size); + + @Override + protected Short valueOf(Long val) { + return val.shortValue(); + } + + @Test + public void writeAndReadFromArray() { + ShortDataBuffer buffer = allocate(10L); + short[] oneToFive = new short[]{ 1, 2, 3, 4, 5 }; + + buffer.write(oneToFive); + assertEquals(2, buffer.getShort(1)); + + buffer.offset(5).write(oneToFive); + assertEquals(2, buffer.getShort(1), 0); + assertEquals(2, buffer.getShort(6), 0); + + short[] read = new short[5]; + buffer.read(read); + assertArrayEquals(oneToFive, read); + + buffer.write(oneToFive, 2, 2); + assertEquals(3, buffer.getShort(0)); + assertEquals(4, buffer.getShort(1)); + assertEquals(3, buffer.getShort(2)); + + Arrays.fill(read, valueOf(0L)); + buffer.read(read, 1, 2); + assertEquals(0, read[0]); + assertEquals(3, read[1]); + assertEquals(4, read[2]); + assertEquals(0, read[3]); + } + + @Test + public void equalWithShortNioBuffer() { + ShortDataBuffer nioBuffer1 = NioDataBufferFactory.create(ShortBuffer.wrap(new short[] { 1, 16 })); + ShortDataBuffer nioBuffer2 = NioDataBufferFactory.create(ShortBuffer.wrap(new short[] { 1, 25 })); + + ShortDataBuffer buffer = allocate(2) + .setShort((short)1, 0) + .setShort((short)16, 1); + + assertTrue(nioBuffer1.equals(buffer)); + assertTrue(buffer.equals(nioBuffer1)); + assertEquals(nioBuffer1.hashCode(), buffer.hashCode()); + + assertFalse(nioBuffer2.equals(buffer)); + assertFalse(buffer.equals(nioBuffer2)); + assertNotEquals(nioBuffer2.hashCode(), buffer.hashCode()); + } + + @Test + public void equalWithShortRawBuffer() { + ShortDataBuffer rawBuffer1 = RawDataBufferFactory.create(new short[] { 1, 16 }, true); + ShortDataBuffer rawBuffer2 = RawDataBufferFactory.create(new short[] { 1, 25 }, true); + + ShortDataBuffer buffer = allocate(2) + .setShort((short)1, 0) + .setShort((short)16, 1); + + assertTrue(rawBuffer1.equals(buffer)); + assertTrue(buffer.equals(rawBuffer1)); + assertEquals(rawBuffer1.hashCode(), buffer.hashCode()); + + assertFalse(rawBuffer2.equals(buffer)); + assertFalse(buffer.equals(rawBuffer2)); + assertNotEquals(rawBuffer2.hashCode(), buffer.hashCode()); + } + + @Test + public void equalWithShortObjectBuffer() { + DataBuffer objBuffer1 = MiscDataBufferFactory.create(new Short[] { 1, 16 }, true); + DataBuffer objBuffer2 = MiscDataBufferFactory.create(new Short[] { 1, 25 }, true); + + ShortDataBuffer buffer = allocate(2) + .setShort((short)1, 0) + .setShort((short)16, 1); + + assertTrue(objBuffer1.equals(buffer)); + assertTrue(buffer.equals(objBuffer1)); + assertEquals(objBuffer1.hashCode(), buffer.hashCode()); + + assertFalse(objBuffer2.equals(buffer)); + assertFalse(buffer.equals(objBuffer2)); + assertNotEquals(objBuffer2.hashCode(), buffer.hashCode()); + } + + @Test + public void notEqualWithOtherTypes() { + ShortDataBuffer buffer = allocate(2) + .setShort((short)1, 0) + .setShort((short)16, 1); + LongDataBuffer longBuffer = DataBuffers.of(1L, 16L); + + assertFalse(buffer.equals(longBuffer)); + assertFalse(longBuffer.equals(buffer)); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/BigIntegerDataBufferAdapterTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/BigIntegerDataBufferAdapterTest.java new file mode 100644 index 00000000000..4bb86fe3f33 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/BigIntegerDataBufferAdapterTest.java @@ -0,0 +1,67 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.adapter; + +import java.math.BigInteger; +import org.tensorflow.ndarray.buffer.ByteDataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBufferTestBase; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.buffer.layout.DataLayout; + +public class BigIntegerDataBufferAdapterTest extends DataBufferTestBase { + + @Override + protected DataBuffer allocate(long size) { + return LAYOUT.applyTo(DataBuffers.ofBytes(size * LAYOUT.scale())); + } + + @Override + protected long maxSize() { + return super.maxSize() / 3; + } + + @Override + protected BigInteger valueOf(Long val) { + return BigInteger.valueOf(val); + } + + private static DataLayout LAYOUT = new DataLayout() { + + @Override + public void writeObject(ByteDataBuffer buffer, BigInteger value, long index) { + byte[] bytes = value.toByteArray(); + buffer.setByte(bytes.length > 2 ? bytes[2] : 0, index); + buffer.setByte(bytes.length > 1 ? bytes[1] : 0, index + 1); + buffer.setByte(bytes[0], index + 2); + } + + @Override + public BigInteger readObject(ByteDataBuffer buffer, long index) { + byte byte2 = buffer.getByte(index); + byte byte1 = buffer.getByte(index + 1); + byte byte0 = buffer.getByte(index + 2); + return new BigInteger(new byte[] { byte2, byte1, byte0 }); + } + + @Override + public int scale() { + return 3; + } + }; +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/BooleanDataBufferAdapterTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/BooleanDataBufferAdapterTest.java new file mode 100644 index 00000000000..a15e8f388a8 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/BooleanDataBufferAdapterTest.java @@ -0,0 +1,45 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.adapter; + +import org.tensorflow.ndarray.buffer.BooleanDataBuffer; +import org.tensorflow.ndarray.buffer.BooleanDataBufferTestBase; +import org.tensorflow.ndarray.buffer.ByteDataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.buffer.layout.BooleanDataLayout; + +public class BooleanDataBufferAdapterTest extends BooleanDataBufferTestBase { + + @Override + protected BooleanDataBuffer allocate(long size) { + return LAYOUT.applyTo(DataBuffers.ofBytes(size * LAYOUT.scale())); + } + + private static BooleanDataLayout LAYOUT = new BooleanDataLayout() { + + @Override + public void writeBoolean(ByteDataBuffer buffer, boolean value, long index) { + buffer.setByte((byte)(value ? 1 : 0), index); + } + + @Override + public boolean readBoolean(ByteDataBuffer buffer, long index) { + return buffer.getByte(index) > 0; + } + }; +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/ByteDataBufferAdapterTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/ByteDataBufferAdapterTest.java new file mode 100644 index 00000000000..8a6287601f5 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/ByteDataBufferAdapterTest.java @@ -0,0 +1,27 @@ +package org.tensorflow.ndarray.impl.buffer.adapter; + +import org.tensorflow.ndarray.buffer.ByteDataBuffer; +import org.tensorflow.ndarray.buffer.ByteDataBufferTestBase; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.buffer.ShortDataBuffer; +import org.tensorflow.ndarray.buffer.layout.ByteDataLayout; + +public class ByteDataBufferAdapterTest extends ByteDataBufferTestBase { + + public ByteDataBuffer allocate(long size) { + return LAYOUT.applyTo(DataBuffers.ofShorts(size * LAYOUT.scale())); + } + + private static ByteDataLayout LAYOUT = new ByteDataLayout() { + + @Override + public void writeByte(ShortDataBuffer buffer, byte value, long index) { + buffer.setShort(value, index); + } + + @Override + public byte readByte(ShortDataBuffer buffer, long index) { + return (byte)buffer.getShort(index); + } + }; +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/DoubleDataBufferAdapterTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/DoubleDataBufferAdapterTest.java new file mode 100644 index 00000000000..8dfee1182b1 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/DoubleDataBufferAdapterTest.java @@ -0,0 +1,61 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.adapter; + +import org.tensorflow.ndarray.buffer.ByteDataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.buffer.DoubleDataBuffer; +import org.tensorflow.ndarray.buffer.DoubleDataBufferTestBase; +import org.tensorflow.ndarray.buffer.layout.DoubleDataLayout; + +public class DoubleDataBufferAdapterTest extends DoubleDataBufferTestBase { + + @Override + protected DoubleDataBuffer allocate(long size) { + return LAYOUT.applyTo(DataBuffers.ofBytes(size * LAYOUT.scale())); + } + + @Override + protected long maxSize() { + return super.maxSize() / 3; + } + + private static DoubleDataLayout LAYOUT = new DoubleDataLayout() { + + @Override + public void writeDouble(ByteDataBuffer buffer, double value, long index) { + long bits = Double.doubleToLongBits(value); + buffer.setByte((byte)((bits >> 56) & 0xFF), index); + buffer.setByte((byte)((bits >> 48) & 0xFF), index + 1); + buffer.setByte((byte)((bits >> 40) & 0xFF), index + 2); + } + + @Override + public double readDouble(ByteDataBuffer buffer, long index) { + long byte7 = buffer.getByte(index); + long byte6 = buffer.getByte(index + 1); + long byte5 = buffer.getByte(index + 2); + return Double.longBitsToDouble(((byte7 & 0xFF) << 56) | ((byte6 & 0xFF) << 48) | ((byte5 & 0xFF) << 40)); + } + + @Override + public int scale() { + return 3; + } + }; +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/FloatDataBufferAdapterTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/FloatDataBufferAdapterTest.java new file mode 100644 index 00000000000..82b8ee947dd --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/FloatDataBufferAdapterTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.adapter; + +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.buffer.FloatDataBuffer; +import org.tensorflow.ndarray.buffer.FloatDataBufferTestBase; +import org.tensorflow.ndarray.buffer.ShortDataBuffer; +import org.tensorflow.ndarray.buffer.layout.FloatDataLayout; + +public class FloatDataBufferAdapterTest extends FloatDataBufferTestBase { + + @Override + public FloatDataBuffer allocate(long size) { + return LAYOUT.applyTo(DataBuffers.ofShorts(size * LAYOUT.scale())); + } + + @Override + protected long maxSize() { + return super.maxSize() / 2; + } + + private static FloatDataLayout LAYOUT = new FloatDataLayout() { + + @Override + public void writeFloat(ShortDataBuffer buffer, float value, long index) { + int bits = Float.floatToIntBits(value); + buffer.setShort((short)(bits >> 16), index); + } + + @Override + public float readFloat(ShortDataBuffer buffer, long index) { + int i = buffer.getShort(index); + return Float.intBitsToFloat(i << 16); + } + }; +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/IntDataBufferAdapterTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/IntDataBufferAdapterTest.java new file mode 100644 index 00000000000..9c00f92b00d --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/IntDataBufferAdapterTest.java @@ -0,0 +1,51 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.adapter; + +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.buffer.IntDataBuffer; +import org.tensorflow.ndarray.buffer.IntDataBufferTestBase; +import org.tensorflow.ndarray.buffer.ShortDataBuffer; +import org.tensorflow.ndarray.buffer.layout.IntDataLayout; + +public class IntDataBufferAdapterTest extends IntDataBufferTestBase { + + @Override + protected IntDataBuffer allocate(long size) { + return LAYOUT.applyTo(DataBuffers.ofShorts(size * LAYOUT.scale())); + } + + @Override + protected long maxSize() { + return super.maxSize() / 2; + } + + private static IntDataLayout LAYOUT = new IntDataLayout() { + + @Override + public void writeInt(ShortDataBuffer buffer, int value, long index) { + buffer.setShort((short)(((value & 0x80000000) >> 16) | (value & 0x7FFF)), index); + } + + @Override + public int readInt(ShortDataBuffer buffer, long index) { + int i = buffer.getShort(index); + return ((i & 0x8000) << 16) | ((i & 0x7FFF)); + } + }; +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/LongDataBufferAdapterTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/LongDataBufferAdapterTest.java new file mode 100644 index 00000000000..40bc4c55b3e --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/LongDataBufferAdapterTest.java @@ -0,0 +1,60 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.adapter; + +import org.tensorflow.ndarray.buffer.ByteDataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.buffer.LongDataBuffer; +import org.tensorflow.ndarray.buffer.LongDataBufferTestBase; +import org.tensorflow.ndarray.buffer.layout.LongDataLayout; + +public class LongDataBufferAdapterTest extends LongDataBufferTestBase { + + @Override + protected LongDataBuffer allocate(long size) { + return LAYOUT.applyTo(DataBuffers.ofBytes(size * LAYOUT.scale())); + } + + @Override + protected long maxSize() { + return super.maxSize() / 3; + } + + private static LongDataLayout LAYOUT = new LongDataLayout() { + + @Override + public void writeLong(ByteDataBuffer buffer, long value, long index) { + buffer.setByte((byte)(((value >> 56) & 0x80) | ((value >> 16) & 0x7F)), index); + buffer.setByte((byte)((value >> 8) & 0xFF), index + 1); + buffer.setByte((byte)(value & 0xFF), index + 2); + } + + @Override + public long readLong(ByteDataBuffer buffer, long index) { + long msb = buffer.getByte(index); + long midb = buffer.getByte(index + 1); + long lsb = buffer.getByte(index + 2); + return ((msb & 0x80) << 56) | ((msb & 0x7F) << 16) | ((midb & 0xFF) << 8) | (lsb & 0xFF); + } + + @Override + public int scale() { + return 3; + } + }; +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/ShortDataBufferAdapterTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/ShortDataBufferAdapterTest.java new file mode 100644 index 00000000000..3c11d3a46ad --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/ShortDataBufferAdapterTest.java @@ -0,0 +1,45 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.adapter; + +import org.tensorflow.ndarray.buffer.ByteDataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.buffer.ShortDataBuffer; +import org.tensorflow.ndarray.buffer.ShortDataBufferTestBase; +import org.tensorflow.ndarray.buffer.layout.ShortDataLayout; + +public class ShortDataBufferAdapterTest extends ShortDataBufferTestBase { + + public ShortDataBuffer allocate(long size) { + return LAYOUT.applyTo(DataBuffers.ofBytes(size * LAYOUT.scale())); + } + + private static ShortDataLayout LAYOUT = new ShortDataLayout() { + + @Override + public void writeShort(ByteDataBuffer buffer, short value, long index) { + buffer.setByte((byte)(((value & 0x8000) >> 8) | (value & 0x7F)), index); + } + + @Override + public short readShort(ByteDataBuffer buffer, long index) { + int b = buffer.getByte(index); + return (short)(((b & 0x80) << 8) | (b & 0x7F)); + } + }; +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/layout/Bfloat16LayoutTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/layout/Bfloat16LayoutTest.java new file mode 100644 index 00000000000..48ddeb1c56e --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/layout/Bfloat16LayoutTest.java @@ -0,0 +1,84 @@ +/* + * Copyright 2020 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.layout; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +public class Bfloat16LayoutTest { + + @Test + public void testFloat32to16() { + + // Zero and subnormals + assertEquals((short)0x0000, Bfloat16Layout.float32to16(0.0f)); + assertEquals((short)0x8000, Bfloat16Layout.float32to16(-0.0f)); + assertEquals((short)0x0001, Bfloat16Layout.float32to16(1e-40f)); + assertEquals((short)0xC000, Bfloat16Layout.float32to16(-2.0f)); + assertEquals((short)0x0000, Bfloat16Layout.float32to16(4.59e-41f)); + + // Infinite and NaN + assertEquals((short)0x7F80, Bfloat16Layout.float32to16(Float.POSITIVE_INFINITY)); + assertEquals((short)0xFF80, Bfloat16Layout.float32to16(Float.NEGATIVE_INFINITY)); + assertEquals((short)0x7FC0, Bfloat16Layout.float32to16(Float.NaN)); + assertEquals((short)0x7FC0, Bfloat16Layout.float32to16(Float.intBitsToFloat(0xFFFFFFFF))); + + // Normalized + assertEquals((short)0x3F80, Bfloat16Layout.float32to16(1.0f)); + assertEquals((short)0xBF80, Bfloat16Layout.float32to16(-1.0f)); + assertEquals((short)0x42C8, Bfloat16Layout.float32to16(100.0f)); + assertEquals((short)0xC2CA, Bfloat16Layout.float32to16(-101.0f)); + assertEquals((short)0x3F8F, Bfloat16Layout.float32to16(1.1171875f)); + assertEquals((short)0x4800, Bfloat16Layout.float32to16(131072f)); + assertEquals((short)0x7F7F, Bfloat16Layout.float32to16(3.3895314e38f)); + assertEquals((short)0xFF7F, Bfloat16Layout.float32to16(-3.3895314e38f)); + + // Rounding up + assertEquals((short)0x3FCF, Bfloat16Layout.float32to16(1.6191406f)); // 1.6171875 + assertEquals((short)0x4780, Bfloat16Layout.float32to16(65600.0f)); // 65536.0 + } + + @Test + public void testFloat16to32() { + + // Zero and subnormals + assertEquals(0.0f, Bfloat16Layout.float16to32((short)0x0000), 0); + assertEquals(-0.0f, Bfloat16Layout.float16to32((short)0x8000), 0); + assertEquals(9.18355E-41f, Bfloat16Layout.float16to32((short)0x0001), 1e-8f); + assertEquals(-9.403955E-38, Bfloat16Layout.float16to32((short)0x8200), 1e-8f); + + // Infinite and NaN + assertEquals(Float.POSITIVE_INFINITY, Bfloat16Layout.float16to32((short)0x7F80), 0); + assertEquals(Float.NEGATIVE_INFINITY, Bfloat16Layout.float16to32((short)0xFF80), 0); + assertEquals(Float.NaN, Bfloat16Layout.float16to32((short)0x7FC0), 0); + assertEquals(Float.intBitsToFloat(0xFFFFFFFF), Bfloat16Layout.float16to32((short)0x7FC0), 0); + + // Normalized + assertEquals(1.0f, Bfloat16Layout.float16to32((short)0x3F80), 0); + assertEquals(-1.0f, Bfloat16Layout.float16to32((short)0xBF80), 0); + assertEquals(100.0f, Bfloat16Layout.float16to32((short)0x42C8), 0); + assertEquals(-101.0f, Bfloat16Layout.float16to32((short)0xC2CA), 0); + assertEquals(1.1171875f, Bfloat16Layout.float16to32((short)0x3F8F), 0); + assertEquals(131072f, Bfloat16Layout.float16to32((short)0x4800), 0); + assertEquals(3.3895314e38f, Bfloat16Layout.float16to32((short)0x7F7F), 0); + assertEquals(-3.3895314e38f, Bfloat16Layout.float16to32((short)0xFF7F), 0); + assertEquals(1.6171875f, Bfloat16Layout.float16to32((short)0x3FCF), 0); + assertEquals(65536.0, Bfloat16Layout.float16to32((short)0x4780), 0); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/layout/BoolLayoutTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/layout/BoolLayoutTest.java new file mode 100644 index 00000000000..6ba903cadec --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/layout/BoolLayoutTest.java @@ -0,0 +1,42 @@ +/* + * Copyright 2020 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.layout; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import org.junit.jupiter.api.Test; + +public class BoolLayoutTest { + + @Test + public void booleanToByteTest() { + assertEquals((byte)1, BoolLayout.booleanToByte(true)); + assertEquals((byte)0, BoolLayout.booleanToByte(false)); + } + + @Test + public void byteToBooleanTest() { + assertTrue(BoolLayout.byteToBoolean((byte)1)); + assertTrue(BoolLayout.byteToBoolean((byte)127)); + assertTrue(BoolLayout.byteToBoolean((byte)-128)); + assertTrue(BoolLayout.byteToBoolean((byte)255)); + assertFalse(BoolLayout.byteToBoolean((byte)0)); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/layout/Float16LayoutTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/layout/Float16LayoutTest.java new file mode 100644 index 00000000000..7bc430ac4ba --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/layout/Float16LayoutTest.java @@ -0,0 +1,90 @@ +/* + * Copyright 2020 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.buffer.layout; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +public class Float16LayoutTest { + + @Test + public void testFloat32to16() { + + // Zero and subnormals + assertEquals((short)0x0000, Float16Layout.float32to16(0.0f)); + assertEquals((short)0x8000, Float16Layout.float32to16(-0.0f)); + assertEquals((short)0x0001, Float16Layout.float32to16(6e-8f)); + assertEquals((short)0x8200, Float16Layout.float32to16(-3.052e-5f)); + assertEquals((short)0x0000, Float16Layout.float32to16(6e-9f)); + + // Infinite and NaN + assertEquals((short)0x7C00, Float16Layout.float32to16(Float.POSITIVE_INFINITY)); + assertEquals((short)0xFC00, Float16Layout.float32to16(Float.NEGATIVE_INFINITY)); + assertEquals((short)0x7C00, Float16Layout.float32to16(65520.0f)); + assertEquals((short)0x7C00, Float16Layout.float32to16(165536.0f)); + assertEquals((short)0xFC00, Float16Layout.float32to16(-65520.0f)); + assertEquals((short)0x7E00, Float16Layout.float32to16(Float.NaN)); + assertEquals((short)0x7E00, Float16Layout.float32to16(Float.intBitsToFloat(0xFFFFFFFF))); + + // Normalized + assertEquals((short)0x7BFF, Float16Layout.float32to16(65519.0f)); + assertEquals((short)0x3C00, Float16Layout.float32to16(1.0f)); + assertEquals((short)0xBC00, Float16Layout.float32to16(-1.0f)); + assertEquals((short)0x5640, Float16Layout.float32to16(100.0f)); + assertEquals((short)0xD650, Float16Layout.float32to16(-101.0f)); + assertEquals((short)0x3C7E, Float16Layout.float32to16(1.123f)); + + // Rounding up + assertEquals((short)0x3C7E, Float16Layout.float32to16(1.1235f)); // 1.123 + assertEquals((short)0x3C7F, Float16Layout.float32to16(1.1236f)); // 1.124 + assertEquals((short)0x4000, Float16Layout.float32to16(2.0009f)); // 2.0 + assertEquals((short)0x4001, Float16Layout.float32to16(2.001f)); // 2.002 + assertEquals((short)0x5C00, Float16Layout.float32to16(256.125f)); // 256.0 + assertEquals((short)0x5C01, Float16Layout.float32to16(256.126f)); // 256.3 + assertEquals((short)0x5C01, Float16Layout.float32to16(256.30f)); // 256.3 + assertEquals((short)0x5C01, Float16Layout.float32to16(256.374f)); // 256.3 + assertEquals((short)0x5C02, Float16Layout.float32to16(256.375f)); // 256.5 + assertEquals((short)0x5C02, Float16Layout.float32to16(256.51f)); // 256.5 + } + + @Test + public void testFloat16to32() { + + // Zero and subnormals + assertEquals(0.0f, Float16Layout.float16to32((short)0x0000), 0); + assertEquals(-0.0f, Float16Layout.float16to32((short)0x8000), 0); + assertEquals(6e-8f, Float16Layout.float16to32((short)0x0001), 1e-8f); + assertEquals(-3.052e-5f, Float16Layout.float16to32((short)0x8200), 1e-8f); + + // Infinite and NaN + assertEquals(Float.POSITIVE_INFINITY, Float16Layout.float16to32((short)0x7C00), 0); + assertEquals(Float.NEGATIVE_INFINITY, Float16Layout.float16to32((short)0xFC00), 0); + assertEquals(Float.NaN, Float16Layout.float16to32((short)0x7E00), 0); + assertEquals(Float.intBitsToFloat(0xFFFFFFFF), Float16Layout.float16to32((short)0x7E00), 0); + + // Normalized + assertEquals(1.0f, Float16Layout.float16to32((short)0x3C00), 1e-1f); + assertEquals(-1.0f, Float16Layout.float16to32((short)0xBC00), 1e-1f); + assertEquals(100.0f, Float16Layout.float16to32((short)0x5640), 1e-1f); + assertEquals(-101.0f, Float16Layout.float16to32((short)0xD650), 1e-1f); + assertEquals(1.123f, Float16Layout.float16to32((short)0x3C7E), 1e-3f); + assertEquals(1.123f, Float16Layout.float16to32((short)0x3C7E), 1e-3f); + assertEquals(-62.34f, Float16Layout.float16to32((short)0xD3CB), 1e-2f); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/misc/ArrayDataBufferTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/misc/ArrayDataBufferTest.java new file mode 100644 index 00000000000..1c43a3e3638 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/misc/ArrayDataBufferTest.java @@ -0,0 +1,265 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.buffer.misc; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.math.BigDecimal; +import org.junit.jupiter.api.Test; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBufferTestBase; + +public class ArrayDataBufferTest extends DataBufferTestBase { + + @Override + protected DataBuffer allocate(long size) { + return new ArrayDataBuffer<>(new BigDecimal[(int)size], false); + } + + @Override + protected BigDecimal valueOf(Long val) { + return BigDecimal.valueOf(val); + } + + @Test + public void byteArrayBufferEquals() { + DataBuffer buffer1 = new ArrayDataBuffer<>(new byte[][] { { 0x01 }, { 0x03 } }, true); + DataBuffer buffer2 = new ArrayDataBuffer<>(new byte[][] { { 0x01 }, { 0x03 } }, true); + DataBuffer buffer3 = new ArrayDataBuffer<>(new byte[][] { { 0x02 }, { 0x03 } }, true); + DataBuffer buffer4 = new ArrayDataBuffer<>(new byte[][][] { { { 0x01 } }, { { 0x03 } } }, true); + DataBuffer buffer5 = new ArrayDataBuffer<>(new byte[][][] { { { 0x01 } }, { { 0x03 } } }, true); + + assertTrue(buffer1.equals(buffer2)); + assertTrue(buffer2.equals(buffer1)); + assertEquals(buffer1.hashCode(), buffer2.hashCode()); + + assertFalse(buffer1.equals(buffer3)); + assertFalse(buffer3.equals(buffer1)); + assertNotEquals(buffer1.hashCode(), buffer3.hashCode()); + + assertFalse(buffer1.equals(buffer4)); + assertFalse(buffer4.equals(buffer1)); + assertNotEquals(buffer1.hashCode(), buffer4.hashCode()); + + assertTrue(buffer4.equals(buffer5)); + assertTrue(buffer4.equals(buffer5)); + assertEquals(buffer4.hashCode(), buffer5.hashCode()); + } + + @Test + public void intArrayBufferEquals() { + DataBuffer buffer1 = new ArrayDataBuffer<>(new int[][] { { 10 }, { 30 } }, true); + DataBuffer buffer2 = new ArrayDataBuffer<>(new int[][] { { 10 }, { 30 } }, true); + DataBuffer buffer3 = new ArrayDataBuffer<>(new int[][] { { 20 }, { 30 } }, true); + DataBuffer buffer4 = new ArrayDataBuffer<>(new int[][][] { { { 10 } }, { { 30 } } }, true); + DataBuffer buffer5 = new ArrayDataBuffer<>(new int[][][] { { { 10 } }, { { 30 } } }, true); + + assertTrue(buffer1.equals(buffer2)); + assertTrue(buffer2.equals(buffer1)); + assertEquals(buffer1.hashCode(), buffer2.hashCode()); + + assertFalse(buffer1.equals(buffer3)); + assertFalse(buffer3.equals(buffer1)); + assertNotEquals(buffer1.hashCode(), buffer3.hashCode()); + + assertFalse(buffer1.equals(buffer4)); + assertFalse(buffer4.equals(buffer1)); + assertNotEquals(buffer1.hashCode(), buffer4.hashCode()); + + assertTrue(buffer4.equals(buffer5)); + assertTrue(buffer4.equals(buffer5)); + assertEquals(buffer4.hashCode(), buffer5.hashCode()); + } + + @Test + public void shortArrayBufferEquals() { + DataBuffer buffer1 = new ArrayDataBuffer<>(new short[][] { { 10 }, { 30 } }, true); + DataBuffer buffer2 = new ArrayDataBuffer<>(new short[][] { { 10 }, { 30 } }, true); + DataBuffer buffer3 = new ArrayDataBuffer<>(new short[][] { { 20 }, { 30 } }, true); + DataBuffer buffer4 = new ArrayDataBuffer<>(new short[][][] { { { 10 } }, { { 30 } } }, true); + DataBuffer buffer5 = new ArrayDataBuffer<>(new short[][][] { { { 10 } }, { { 30 } } }, true); + + assertTrue(buffer1.equals(buffer2)); + assertTrue(buffer2.equals(buffer1)); + assertEquals(buffer1.hashCode(), buffer2.hashCode()); + + assertFalse(buffer1.equals(buffer3)); + assertFalse(buffer3.equals(buffer1)); + assertNotEquals(buffer1.hashCode(), buffer3.hashCode()); + + assertFalse(buffer1.equals(buffer4)); + assertFalse(buffer4.equals(buffer1)); + assertNotEquals(buffer1.hashCode(), buffer4.hashCode()); + + assertTrue(buffer4.equals(buffer5)); + assertTrue(buffer4.equals(buffer5)); + assertEquals(buffer4.hashCode(), buffer5.hashCode()); + } + + @Test + public void longArrayBufferEquals() { + DataBuffer buffer1 = new ArrayDataBuffer<>(new long[][] { { 10 }, { 30 } }, true); + DataBuffer buffer2 = new ArrayDataBuffer<>(new long[][] { { 10 }, { 30 } }, true); + DataBuffer buffer3 = new ArrayDataBuffer<>(new long[][] { { 20 }, { 30 } }, true); + DataBuffer buffer4 = new ArrayDataBuffer<>(new long[][][] { { { 10 } }, { { 30 } } }, true); + DataBuffer buffer5 = new ArrayDataBuffer<>(new long[][][] { { { 10 } }, { { 30 } } }, true); + + assertTrue(buffer1.equals(buffer2)); + assertTrue(buffer2.equals(buffer1)); + assertEquals(buffer1.hashCode(), buffer2.hashCode()); + + assertFalse(buffer1.equals(buffer3)); + assertFalse(buffer3.equals(buffer1)); + assertNotEquals(buffer1.hashCode(), buffer3.hashCode()); + + assertFalse(buffer1.equals(buffer4)); + assertFalse(buffer4.equals(buffer1)); + assertNotEquals(buffer1.hashCode(), buffer4.hashCode()); + + assertTrue(buffer4.equals(buffer5)); + assertTrue(buffer4.equals(buffer5)); + assertEquals(buffer4.hashCode(), buffer5.hashCode()); + } + + @Test + public void floatArrayBufferEquals() { + DataBuffer buffer1 = new ArrayDataBuffer<>(new float[][] { { 10 }, { 30 } }, true); + DataBuffer buffer2 = new ArrayDataBuffer<>(new float[][] { { 10 }, { 30 } }, true); + DataBuffer buffer3 = new ArrayDataBuffer<>(new float[][] { { 20 }, { 30 } }, true); + DataBuffer buffer4 = new ArrayDataBuffer<>(new float[][][] { { { 10 } }, { { 30 } } }, true); + DataBuffer buffer5 = new ArrayDataBuffer<>(new float[][][] { { { 10 } }, { { 30 } } }, true); + + assertTrue(buffer1.equals(buffer2)); + assertTrue(buffer2.equals(buffer1)); + assertEquals(buffer1.hashCode(), buffer2.hashCode()); + + assertFalse(buffer1.equals(buffer3)); + assertFalse(buffer3.equals(buffer1)); + assertNotEquals(buffer1.hashCode(), buffer3.hashCode()); + + assertFalse(buffer1.equals(buffer4)); + assertFalse(buffer4.equals(buffer1)); + assertNotEquals(buffer1.hashCode(), buffer4.hashCode()); + + assertTrue(buffer4.equals(buffer5)); + assertTrue(buffer4.equals(buffer5)); + assertEquals(buffer4.hashCode(), buffer5.hashCode()); + } + + @Test + public void doubleArrayBufferEquals() { + DataBuffer buffer1 = new ArrayDataBuffer<>(new double[][] { { 10 }, { 30 } }, true); + DataBuffer buffer2 = new ArrayDataBuffer<>(new double[][] { { 10 }, { 30 } }, true); + DataBuffer buffer3 = new ArrayDataBuffer<>(new double[][] { { 20 }, { 30 } }, true); + DataBuffer buffer4 = new ArrayDataBuffer<>(new double[][][] { { { 10 } }, { { 30 } } }, true); + DataBuffer buffer5 = new ArrayDataBuffer<>(new double[][][] { { { 10 } }, { { 30 } } }, true); + + assertTrue(buffer1.equals(buffer2)); + assertTrue(buffer2.equals(buffer1)); + assertEquals(buffer1.hashCode(), buffer2.hashCode()); + + assertFalse(buffer1.equals(buffer3)); + assertFalse(buffer3.equals(buffer1)); + assertNotEquals(buffer1.hashCode(), buffer3.hashCode()); + + assertFalse(buffer1.equals(buffer4)); + assertFalse(buffer4.equals(buffer1)); + assertNotEquals(buffer1.hashCode(), buffer4.hashCode()); + + assertTrue(buffer4.equals(buffer5)); + assertTrue(buffer4.equals(buffer5)); + assertEquals(buffer4.hashCode(), buffer5.hashCode()); + } + + @Test + public void booleanArrayBufferEquals() { + DataBuffer buffer1 = new ArrayDataBuffer<>(new boolean[][] { { true }, { false } }, true); + DataBuffer buffer2 = new ArrayDataBuffer<>(new boolean[][] { { true }, { false} }, true); + DataBuffer buffer3 = new ArrayDataBuffer<>(new boolean[][] { { false }, { false } }, true); + DataBuffer buffer4 = new ArrayDataBuffer<>(new boolean[][][] { { { true } }, { { false } } }, true); + DataBuffer buffer5 = new ArrayDataBuffer<>(new boolean[][][] { { { true } }, { { false } } }, true); + + assertTrue(buffer1.equals(buffer2)); + assertTrue(buffer2.equals(buffer1)); + assertEquals(buffer1.hashCode(), buffer2.hashCode()); + + assertFalse(buffer1.equals(buffer3)); + assertFalse(buffer3.equals(buffer1)); + assertNotEquals(buffer1.hashCode(), buffer3.hashCode()); + + assertFalse(buffer1.equals(buffer4)); + assertFalse(buffer4.equals(buffer1)); + assertNotEquals(buffer1.hashCode(), buffer4.hashCode()); + + assertTrue(buffer4.equals(buffer5)); + assertTrue(buffer4.equals(buffer5)); + assertEquals(buffer4.hashCode(), buffer5.hashCode()); + } + + @Test + public void objectArrayBufferEquals() { + DataBuffer buffer1 = new ArrayDataBuffer<>(new String[][] { { "10" }, { "30" } }, true); + DataBuffer buffer2 = new ArrayDataBuffer<>(new String[][] { { "10" }, { "30" } }, true); + DataBuffer buffer3 = new ArrayDataBuffer<>(new String[][] { { "20" }, { "30" } }, true); + DataBuffer buffer4 = new ArrayDataBuffer<>(new String[][][] { { { "10" } }, { { "30" } } }, true); + DataBuffer buffer5 = new ArrayDataBuffer<>(new String[][][] { { { "10" } }, { { "30" } } }, true); + + assertTrue(buffer1.equals(buffer2)); + assertTrue(buffer2.equals(buffer1)); + assertEquals(buffer1.hashCode(), buffer2.hashCode()); + + assertFalse(buffer1.equals(buffer3)); + assertFalse(buffer3.equals(buffer1)); + assertNotEquals(buffer1.hashCode(), buffer3.hashCode()); + + assertFalse(buffer1.equals(buffer4)); + assertFalse(buffer4.equals(buffer1)); + assertNotEquals(buffer1.hashCode(), buffer4.hashCode()); + + assertTrue(buffer4.equals(buffer5)); + assertTrue(buffer4.equals(buffer5)); + assertEquals(buffer4.hashCode(), buffer5.hashCode()); + } + + @Test + public void nullableObjectArrayBufferEquals() { + DataBuffer buffer1 = new ArrayDataBuffer<>(new String[][] { null, { "30" } }, true); + DataBuffer buffer2 = new ArrayDataBuffer<>(new String[][] { null, { "30" } }, true); + DataBuffer buffer3 = new ArrayDataBuffer<>(new String[][] { { "20" }, { "30" } }, true); + DataBuffer buffer4 = new ArrayDataBuffer<>(new String[][][] { { { "10" } }, null }, true); + DataBuffer buffer5 = new ArrayDataBuffer<>(new String[][][] { { { "10" } }, null }, true); + + assertTrue(buffer1.equals(buffer2)); + assertTrue(buffer2.equals(buffer1)); + assertEquals(buffer1.hashCode(), buffer2.hashCode()); + + assertFalse(buffer1.equals(buffer3)); + assertFalse(buffer3.equals(buffer1)); + assertNotEquals(buffer1.hashCode(), buffer3.hashCode()); + + assertFalse(buffer1.equals(buffer4)); + assertFalse(buffer4.equals(buffer1)); + assertNotEquals(buffer1.hashCode(), buffer4.hashCode()); + + assertTrue(buffer4.equals(buffer5)); + assertTrue(buffer4.equals(buffer5)); + assertEquals(buffer4.hashCode(), buffer5.hashCode()); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/misc/BitSetDataBufferTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/misc/BitSetDataBufferTest.java new file mode 100644 index 00000000000..ec5c513869a --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/misc/BitSetDataBufferTest.java @@ -0,0 +1,34 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.buffer.misc; + +import java.util.BitSet; +import org.tensorflow.ndarray.buffer.BooleanDataBuffer; +import org.tensorflow.ndarray.buffer.BooleanDataBufferTestBase; + +public class BitSetDataBufferTest extends BooleanDataBufferTestBase { + + @Override + protected BooleanDataBuffer allocate(long size) { + return new BitSetDataBuffer(new BitSet((int)size), size, false); + } + + @Override + protected Boolean valueOf(Long val) { + return val != 0; + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/misc/StringArrayDataBufferTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/misc/StringArrayDataBufferTest.java new file mode 100644 index 00000000000..3e9c3c0cdbf --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/misc/StringArrayDataBufferTest.java @@ -0,0 +1,33 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.buffer.misc; + +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBufferTestBase; + +public class StringArrayDataBufferTest extends DataBufferTestBase { + + @Override + protected DataBuffer allocate(long size) { + return new ArrayDataBuffer<>(new String[(int)size], false); + } + + @Override + protected String valueOf(Long val) { + return val.toString(); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/ByteNioDataBufferTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/ByteNioDataBufferTest.java new file mode 100644 index 00000000000..28ff5a6c104 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/ByteNioDataBufferTest.java @@ -0,0 +1,29 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.buffer.nio; + +import java.nio.ByteBuffer; +import org.tensorflow.ndarray.buffer.ByteDataBuffer; +import org.tensorflow.ndarray.buffer.ByteDataBufferTestBase; + +public class ByteNioDataBufferTest extends ByteDataBufferTestBase { + + @Override + protected ByteDataBuffer allocate(long size) { + return new ByteNioDataBuffer(ByteBuffer.allocate((int)size)); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/DoubleNioDataBufferTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/DoubleNioDataBufferTest.java new file mode 100644 index 00000000000..7a4d39dce94 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/DoubleNioDataBufferTest.java @@ -0,0 +1,29 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.buffer.nio; + +import java.nio.DoubleBuffer; +import org.tensorflow.ndarray.buffer.DoubleDataBuffer; +import org.tensorflow.ndarray.buffer.DoubleDataBufferTestBase; + +public class DoubleNioDataBufferTest extends DoubleDataBufferTestBase { + + @Override + protected DoubleDataBuffer allocate(long size) { + return new DoubleNioDataBuffer(DoubleBuffer.allocate((int)size)); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/FloatNioDataBufferTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/FloatNioDataBufferTest.java new file mode 100644 index 00000000000..08089e76ad8 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/FloatNioDataBufferTest.java @@ -0,0 +1,29 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.buffer.nio; + +import java.nio.FloatBuffer; +import org.tensorflow.ndarray.buffer.FloatDataBuffer; +import org.tensorflow.ndarray.buffer.FloatDataBufferTestBase; + +public class FloatNioDataBufferTest extends FloatDataBufferTestBase { + + @Override + protected FloatDataBuffer allocate(long size) { + return new FloatNioDataBuffer(FloatBuffer.allocate((int)size)); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/IntNioDataBufferTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/IntNioDataBufferTest.java new file mode 100644 index 00000000000..00a993e42ed --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/IntNioDataBufferTest.java @@ -0,0 +1,29 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.buffer.nio; + +import java.nio.IntBuffer; +import org.tensorflow.ndarray.buffer.IntDataBuffer; +import org.tensorflow.ndarray.buffer.IntDataBufferTestBase; + +public class IntNioDataBufferTest extends IntDataBufferTestBase { + + @Override + protected IntDataBuffer allocate(long size) { + return new IntNioDataBuffer(IntBuffer.allocate((int)size)); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/LongNioDataBufferTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/LongNioDataBufferTest.java new file mode 100644 index 00000000000..5922d2b922c --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/LongNioDataBufferTest.java @@ -0,0 +1,29 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.buffer.nio; + +import java.nio.LongBuffer; +import org.tensorflow.ndarray.buffer.LongDataBuffer; +import org.tensorflow.ndarray.buffer.LongDataBufferTestBase; + +public class LongNioDataBufferTest extends LongDataBufferTestBase { + + @Override + protected LongDataBuffer allocate(long size) { + return new LongNioDataBuffer(LongBuffer.allocate((int)size)); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/ShortNioDataBufferTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/ShortNioDataBufferTest.java new file mode 100644 index 00000000000..c76191fbcf1 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/ShortNioDataBufferTest.java @@ -0,0 +1,29 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.buffer.nio; + +import java.nio.ShortBuffer; +import org.tensorflow.ndarray.buffer.ShortDataBuffer; +import org.tensorflow.ndarray.buffer.ShortDataBufferTestBase; + +public class ShortNioDataBufferTest extends ShortDataBufferTestBase { + + @Override + protected ShortDataBuffer allocate(long size) { + return new ShortNioDataBuffer(ShortBuffer.allocate((int)size)); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/BooleanRawDataBufferTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/BooleanRawDataBufferTest.java new file mode 100644 index 00000000000..1f09d76055d --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/BooleanRawDataBufferTest.java @@ -0,0 +1,28 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.buffer.raw; + +import org.tensorflow.ndarray.buffer.BooleanDataBuffer; +import org.tensorflow.ndarray.buffer.BooleanDataBufferTestBase; + +public class BooleanRawDataBufferTest extends BooleanDataBufferTestBase { + + @Override + protected BooleanDataBuffer allocate(long size) { + return new BooleanRawDataBuffer(UnsafeMemoryHandle.fromArray(new boolean[(int)size], (int)size), false); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/ByteRawDataBufferTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/ByteRawDataBufferTest.java new file mode 100644 index 00000000000..4a415aff49f --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/ByteRawDataBufferTest.java @@ -0,0 +1,28 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.buffer.raw; + +import org.tensorflow.ndarray.buffer.ByteDataBuffer; +import org.tensorflow.ndarray.buffer.ByteDataBufferTestBase; + +public class ByteRawDataBufferTest extends ByteDataBufferTestBase { + + @Override + protected ByteDataBuffer allocate(long size) { + return new ByteRawDataBuffer(UnsafeMemoryHandle.fromArray(new byte[(int)size], (int)size), false); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/DoubleRawDataBufferTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/DoubleRawDataBufferTest.java new file mode 100644 index 00000000000..df845092dd1 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/DoubleRawDataBufferTest.java @@ -0,0 +1,28 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.buffer.raw; + +import org.tensorflow.ndarray.buffer.DoubleDataBuffer; +import org.tensorflow.ndarray.buffer.DoubleDataBufferTestBase; + +public class DoubleRawDataBufferTest extends DoubleDataBufferTestBase { + + @Override + protected DoubleDataBuffer allocate(long size) { + return new DoubleRawDataBuffer(UnsafeMemoryHandle.fromArray(new double[(int)size], (int)size), false); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/FloatRawDataBufferTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/FloatRawDataBufferTest.java new file mode 100644 index 00000000000..bc453d79f37 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/FloatRawDataBufferTest.java @@ -0,0 +1,28 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.buffer.raw; + +import org.tensorflow.ndarray.buffer.FloatDataBuffer; +import org.tensorflow.ndarray.buffer.FloatDataBufferTestBase; + +public class FloatRawDataBufferTest extends FloatDataBufferTestBase { + + @Override + protected FloatDataBuffer allocate(long size) { + return new FloatRawDataBuffer(UnsafeMemoryHandle.fromArray(new float[(int)size], (int)size), false); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/IntRawDataBufferTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/IntRawDataBufferTest.java new file mode 100644 index 00000000000..1142f19131d --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/IntRawDataBufferTest.java @@ -0,0 +1,28 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.buffer.raw; + +import org.tensorflow.ndarray.buffer.IntDataBuffer; +import org.tensorflow.ndarray.buffer.IntDataBufferTestBase; + +public class IntRawDataBufferTest extends IntDataBufferTestBase { + + @Override + protected IntDataBuffer allocate(long size) { + return new IntRawDataBuffer(UnsafeMemoryHandle.fromArray(new int[(int)size], (int)size), false); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/LongRawDataBufferTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/LongRawDataBufferTest.java new file mode 100644 index 00000000000..af86d64a414 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/LongRawDataBufferTest.java @@ -0,0 +1,28 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.buffer.raw; + +import org.tensorflow.ndarray.buffer.LongDataBuffer; +import org.tensorflow.ndarray.buffer.LongDataBufferTestBase; + +public class LongRawDataBufferTest extends LongDataBufferTestBase { + + @Override + protected LongDataBuffer allocate(long size) { + return new LongRawDataBuffer(UnsafeMemoryHandle.fromArray(new long[(int)size], (int)size), false); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/ShortRawDataBufferTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/ShortRawDataBufferTest.java new file mode 100644 index 00000000000..1ce1f25391b --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/ShortRawDataBufferTest.java @@ -0,0 +1,28 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.buffer.raw; + +import org.tensorflow.ndarray.buffer.ShortDataBuffer; +import org.tensorflow.ndarray.buffer.ShortDataBufferTestBase; + +public class ShortRawDataBufferTest extends ShortDataBufferTestBase { + + @Override + protected ShortDataBuffer allocate(long size) { + return new ShortRawDataBuffer(UnsafeMemoryHandle.fromArray(new short[(int)size], (int)size), false); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/BooleanDenseNdArrayTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/BooleanDenseNdArrayTest.java new file mode 100644 index 00000000000..36540104eb7 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/BooleanDenseNdArrayTest.java @@ -0,0 +1,35 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.dense; + +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.BooleanNdArray; +import org.tensorflow.ndarray.BooleanNdArrayTestBase; +import org.tensorflow.ndarray.NdArrays; + +public class BooleanDenseNdArrayTest extends BooleanNdArrayTestBase { + + @Override protected BooleanNdArray allocate(Shape shape) { + return NdArrays.ofBooleans(shape); + } + + @Override protected DataBuffer allocateBuffer(long size) { + return DataBuffers.ofBooleans(size); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/ByteDenseNdArrayTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/ByteDenseNdArrayTest.java new file mode 100644 index 00000000000..2e5d1939bc3 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/ByteDenseNdArrayTest.java @@ -0,0 +1,35 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.dense; + +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.ByteNdArray; +import org.tensorflow.ndarray.ByteNdArrayTestBase; +import org.tensorflow.ndarray.NdArrays; + +public class ByteDenseNdArrayTest extends ByteNdArrayTestBase { + + @Override protected ByteNdArray allocate(Shape shape) { + return NdArrays.ofBytes(shape); + } + + @Override protected DataBuffer allocateBuffer(long size) { + return DataBuffers.ofBytes(size); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/DenseNdArrayTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/DenseNdArrayTest.java new file mode 100644 index 00000000000..375f7643875 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/DenseNdArrayTest.java @@ -0,0 +1,51 @@ +package org.tensorflow.ndarray.impl.dense; + +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import org.junit.jupiter.api.Test; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.IntNdArray; +import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.StdArrays; +import org.tensorflow.ndarray.index.Indices; + +public class DenseNdArrayTest { + + @Test + public void arrayEquals() { + IntNdArray array = NdArrays.ofInts(Shape.of(2, 2)) + .set(NdArrays.vectorOf(1, 2), 0) + .set(NdArrays.vectorOf(3, 4), 1); + + assertTrue(array.equals(StdArrays.ndCopyOf(new int[][] {{1, 2}, {3, 4}}))); + assertTrue(array.equals(StdArrays.ndCopyOf(new Integer[][] {{1, 2}, {3, 4}}))); + assertFalse(array.equals(NdArrays.vectorOf(1, 2, 3, 4))); + assertFalse(array.equals(StdArrays.ndCopyOf(new int[][] {{3, 4}, {1, 2}}))); + assertFalse(array.equals(StdArrays.ndCopyOf(new long[][] {{1L, 2L}, {3L, 4L}}))); + } + + @Test + public void equalsAndHashCodeOnSlices() { + IntNdArray vector1 = NdArrays.vectorOf(3, 4); + IntNdArray vector2 = NdArrays.vectorOf(1, 2, 3, 4); + IntNdArray matrix1 = StdArrays.ndCopyOf(new int[][] {{1, 2}, {3, 4}}); + IntNdArray matrix2 = StdArrays.ndCopyOf(new int[][] {{1, 0, 2, 0}, {3, 0, 4, 0}}); + IntNdArray matrix3d1 = StdArrays.ndCopyOf(new int[][][] { + {{1, 2}, {3, 4}}, + {{5, 6}, {7, 8}} + }); + IntNdArray matrix3d2 = StdArrays.ndCopyOf(new int[][][] { + {{1, 2}, {4, 5}}, + {{3, 4}, {6, 7}} + }); + + assertTrue(vector1.equals(vector2.slice(Indices.sliceFrom(2)))); + assertTrue(vector1.equals(matrix1.get(1))); + assertTrue(vector1.equals(matrix2.get(1).slice(Indices.even()))); + assertTrue(matrix1.equals(matrix2.slice(Indices.all(), Indices.even()))); + assertTrue(matrix3d1.get(0).equals(matrix1)); + assertFalse(matrix3d1.get(0).equals(vector2)); + assertTrue(matrix1.equals(matrix3d2.slice(Indices.all(), Indices.at(0)))); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/DoubleDenseNdArrayTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/DoubleDenseNdArrayTest.java new file mode 100644 index 00000000000..9810a744c50 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/DoubleDenseNdArrayTest.java @@ -0,0 +1,35 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.dense; + +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.DoubleNdArray; +import org.tensorflow.ndarray.DoubleNdArrayTestBase; +import org.tensorflow.ndarray.NdArrays; + +public class DoubleDenseNdArrayTest extends DoubleNdArrayTestBase { + + @Override protected DoubleNdArray allocate(Shape shape) { + return NdArrays.ofDoubles(shape); + } + + @Override protected DataBuffer allocateBuffer(long size) { + return DataBuffers.ofDoubles(size); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/FloatDenseNdArrayTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/FloatDenseNdArrayTest.java new file mode 100644 index 00000000000..efee2bf2cb8 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/FloatDenseNdArrayTest.java @@ -0,0 +1,35 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.dense; + +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.FloatNdArray; +import org.tensorflow.ndarray.FloatNdArrayTestBase; +import org.tensorflow.ndarray.NdArrays; + +public class FloatDenseNdArrayTest extends FloatNdArrayTestBase { + + @Override protected FloatNdArray allocate(Shape shape) { + return NdArrays.ofFloats(shape); + } + + @Override protected DataBuffer allocateBuffer(long size) { + return DataBuffers.ofFloats(size); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/IntDenseNdArrayTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/IntDenseNdArrayTest.java new file mode 100644 index 00000000000..712f6f44333 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/IntDenseNdArrayTest.java @@ -0,0 +1,35 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.dense; + +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.IntNdArray; +import org.tensorflow.ndarray.IntNdArrayTestBase; +import org.tensorflow.ndarray.NdArrays; + +public class IntDenseNdArrayTest extends IntNdArrayTestBase { + + @Override protected IntNdArray allocate(Shape shape) { + return NdArrays.ofInts(shape); + } + + @Override protected DataBuffer allocateBuffer(long size) { + return DataBuffers.ofInts(size); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/LongDenseNdArrayTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/LongDenseNdArrayTest.java new file mode 100644 index 00000000000..346e3845080 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/LongDenseNdArrayTest.java @@ -0,0 +1,35 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.dense; + +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.LongNdArray; +import org.tensorflow.ndarray.LongNdArrayTestBase; +import org.tensorflow.ndarray.NdArrays; + +public class LongDenseNdArrayTest extends LongNdArrayTestBase { + + @Override protected LongNdArray allocate(Shape shape) { + return NdArrays.ofLongs(shape); + } + + @Override protected DataBuffer allocateBuffer(long size) { + return DataBuffers.ofLongs(size); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/ShortDenseNdArrayTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/ShortDenseNdArrayTest.java new file mode 100644 index 00000000000..6f845c7c65d --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/ShortDenseNdArrayTest.java @@ -0,0 +1,35 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.dense; + +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.ShortNdArray; +import org.tensorflow.ndarray.ShortNdArrayTestBase; + +public class ShortDenseNdArrayTest extends ShortNdArrayTestBase { + + @Override protected ShortNdArray allocate(Shape shape) { + return NdArrays.ofShorts(shape); + } + + @Override protected DataBuffer allocateBuffer(long size) { + return DataBuffers.ofShorts(size); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/StringDenseNdArrayTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/StringDenseNdArrayTest.java new file mode 100644 index 00000000000..5afc1420ab2 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/StringDenseNdArrayTest.java @@ -0,0 +1,43 @@ +/* + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +package org.tensorflow.ndarray.impl.dense; + +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.NdArray; +import org.tensorflow.ndarray.NdArrayTestBase; +import org.tensorflow.ndarray.NdArrays; + +public class StringDenseNdArrayTest extends NdArrayTestBase { + + @Override protected NdArray allocate(Shape shape) { + return NdArrays.ofObjects(String.class, shape); + } + + @Override protected DataBuffer allocateBuffer(long size) { + return DataBuffers.ofObjects(String.class, size); + } + + @Override protected String valueOf(Long val) { + return val.toString(); + } + + protected String zeroOrNull() { + return null; + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/sequence/ElementSequenceTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/sequence/ElementSequenceTest.java new file mode 100644 index 00000000000..bad78404e9b --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/sequence/ElementSequenceTest.java @@ -0,0 +1,145 @@ +/* + * Copyright 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.ndarray.impl.sequence; + +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.fail; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Test; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.buffer.DataBufferWindow; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.buffer.IntDataBuffer; +import org.tensorflow.ndarray.IntNdArray; +import org.tensorflow.ndarray.NdArraySequence; +import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.impl.AbstractNdArray; + +public class ElementSequenceTest { + + @Test + public void iterateVectorsWithIndex() { + IntNdArray array = NdArrays.ofInts(Shape.of(2, 3, 2)); + + NdArraySequence sequence = new SlicingElementSequence( + (AbstractNdArray)array, 1); + List coords = new ArrayList<>((int)array.shape().size()); + sequence.forEachIndexed((c, e) -> coords.add(Arrays.copyOf(c, c.length))); + + assertEquals(6, coords.size()); + assertArrayEquals(new long[] {0, 0}, coords.get(0)); + assertArrayEquals(new long[] {0, 1}, coords.get(1)); + assertArrayEquals(new long[] {0, 2}, coords.get(2)); + assertArrayEquals(new long[] {1, 0}, coords.get(3)); + assertArrayEquals(new long[] {1, 1}, coords.get(4)); + assertArrayEquals(new long[] {1, 2}, coords.get(5)); + } + + @Test + public void iterateScalarsWithIndex() { + IntNdArray array = NdArrays.ofInts(Shape.of(2, 3, 2)); + + NdArraySequence cursor = new SlicingElementSequence( + (AbstractNdArray)array, 2); + List coords = new ArrayList<>((int)array.shape().size()); + cursor.forEachIndexed((c, e) -> coords.add(Arrays.copyOf(c, c.length))); + + assertEquals(12, coords.size()); + assertArrayEquals(new long[] {0, 0, 0}, coords.get(0)); + assertArrayEquals(new long[] {0, 0, 1}, coords.get(1)); + assertArrayEquals(new long[] {0, 1, 0}, coords.get(2)); + assertArrayEquals(new long[] {0, 1, 1}, coords.get(3)); + assertArrayEquals(new long[] {0, 2, 0}, coords.get(4)); + assertArrayEquals(new long[] {0, 2, 1}, coords.get(5)); + assertArrayEquals(new long[] {1, 0, 0}, coords.get(6)); + assertArrayEquals(new long[] {1, 0, 1}, coords.get(7)); + assertArrayEquals(new long[] {1, 1, 0}, coords.get(8)); + assertArrayEquals(new long[] {1, 1, 1}, coords.get(9)); + assertArrayEquals(new long[] {1, 2, 0}, coords.get(10)); + assertArrayEquals(new long[] {1, 2, 1}, coords.get(11)); + } + + @Test + public void slicingElementSequenceReturnsUniqueInstances() { + IntNdArray array = NdArrays.ofInts(Shape.of(2, 3, 2)); + NdArraySequence sequence = new SlicingElementSequence( + (AbstractNdArray) array, 1); + List elements = new ArrayList<>(); + sequence.forEach(e -> { + elements.forEach(tmp -> { + if (tmp == e) { + fail(); + } + }); + elements.add(e); + }); + } + + @Test + public void fastElementSequenceReturnsSameInstance() { + IntNdArray array = NdArrays.ofInts(Shape.of(2, 3, 2)); + IntNdArray element = array.get(0); + NdArraySequence sequence = new FastElementSequence( + (AbstractNdArray) array, 1, element, mockDataBufferWindow(2)); + sequence.forEach(e -> { + if (e != element) { + fail(); + } + }); + } + + private DataBufferWindow mockDataBufferWindow(long size) { + return new DataBufferWindow() { + + @Override + public long offset() { + return offset; + } + + @Override + public long size() { + return size; + } + + @Override + public DataBufferWindow slideTo(long index) { + offset = index; + return this; + } + + @Override + public DataBufferWindow slide(long step) { + offset += step; + return this; + } + + @Override + public IntDataBuffer buffer() { + return buffer; + } + + private long offset; + private final long size = 2; + private final IntDataBuffer buffer = DataBuffers.ofInts(2); + }; + } +} diff --git a/ndarray/src/test/resources/COPYRIGHT.txt b/ndarray/src/test/resources/COPYRIGHT.txt new file mode 100644 index 00000000000..5e7bd50bb48 --- /dev/null +++ b/ndarray/src/test/resources/COPYRIGHT.txt @@ -0,0 +1 @@ +All images in this folder and its subfolders are free of any copyright. \ No newline at end of file diff --git a/ndarray/src/test/resources/castle.jpg b/ndarray/src/test/resources/castle.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c5b07b4bc2a47a14c91184211a08fda45a2d79d9 GIT binary patch literal 436164 zcmb4ri9-|T`n6_Z2}TGc6jMY%;6i{ZHL=zf8z8aBq6thQM5!8;hCy3#>8(_68x#zK zSg}HB>Jn0x$*@?&xKL}g8e8>ZK@wc*wH7zT_V%jKYTMg>XXyR?0iPmZmYK=>p7%WG zInVRXpI838IW8b$?!39<#*ZI2Zan^u`}5mzTgUl$c?JCSM~EN7i9-CDIBDXI<9&U7g?>VRq0m1@5+I5B z|Nism$#Ehdukk+Px#LCSIHK`f(fB{lj0?pz^2f86`hS0T>uv9AUrpYCkl*6;-`28MQWElU*auJHBZf{X^_n5JY`(l_kD0w+QZy+W&e3b zPV9G-mYsQN>T%0N> zg*SGlRP&$L#!X;fAmWO~y)tfi-D@9mdbquF$gRSZa8syMmTyZnpR(uyZm*0_$oLwWy=8~B-tkHM`5wxmIF^4VPydOmUSAVPTBLMy`fmdtx$@ed z@5+`Z?Xc2A&GmWB^_z0Dk_@D=B5UEi{7*evL0KxbFV<3Ft20TWyM;vndG|4rdMp+xP&Y&u4pv!fc3XW}6Z!(7ojxASq zDsK`3^Y|1pI=lFp#<0O-H$L7|xkGlZxH(9mVl3?u^-Y4riCVeu;-S0~pI!meQ{o)BrK|dd3B8F#V9&}7bG4RJoNgqWlpYn?qzJgF%~maWMq<6bSh%kJjLYbpD3g~i z1+Lb};#@0pdejNMz@F8sN9?FobaK~&oFtOpn#HVJWN}m%?e=A?#Kc%f zp{*n(nmj+Wm2_2~KPo*t)8N<=uXw!gQIB%iljaWOm<7IEWfu!ftJ%eWuUFPMOCIQD z+ga+JYi$^cl6iYEjY8oZrlL8FiIP&A37=$9xQFNLokcPmNN<0DUb+(iuG zGIc9+g((ScKiy&+W)mjaMg)2R)))Y(_g~lr*xf>FL!tSx3fIh-hk#%u9gG*0rP4Zp zd$?TL1$=L#qpiN0gkD*Lh6S}(B;9_iHGZboijG~K#tF_1NnSgS$nqS!oOC6i8!t?L zUw2COP8hQ{X<^oMgMF^0jp`*M9dnCIsL+9{bMaAoRlVWtDjV&6?fv{u)z)1;o}3sU zdY0V$Se;pr6{v5b>PW%YOhs?(rrZSX<|FOvRu!I8zMR+5-x5DT<`+z@jg2p4c3)+x zre+PSCRM*v`z}yTS-M(ltFAcUrkika4_Xh}_r_EN7$W<$pKvvc1MQ8$WeH9-zgTOn z($|D~R(hAZw|gddnzeen#mnAe-TmTHe!8a3b9s{ftfdlT?d1v>O|{o@jacwXdYe5| z8Yj}sj17Cw!e7qZ|EFo1iJejU?OMZK_wZ2;kXnM}L zH{`NEE;%Y{6l*T!=A262khFgLZal7YU80+;{FHDqAzfM>Z8eg7x`=FO6i&ZHA8hk# z%Bx+OMOs8Uk&93b>^xhUtrM69eqw!b3F$N*`c(gHB~?8|0j8o#DV=!4h3WO`QC@8g zaJ8nd)|Ko{B9B_linc-^XvH<=Ok{DMwY^mTpvu_>i|ncd{!be8itAOBn*T094;X+h!s#cOkDTH(=Nu zsJGRVafN0tKr=wWJ7r6uqoie}?a%#xo$ z@se3`Kj5B^Q*nCKvIr^5yjH&QDfj_g-kT}+k^1(^ylvp4VQ#W^xs%471&BR~lW0pR-;)-_p75(f#JoX!)5*va{NxftvgbH|=QEio5h5(ZTI= z$%DnKY-;Wp^?T8gYL3B=o6G&sX4z$_>t4FljSET%bmz<~(Vy|0SiL~kU(6C~v$V2Q z@UN8ixx^vkp=D)#)2sO_iw)b-i)ZedP$BzDcPT|0FCCE8O()O0wx4SVzr1naSl-*a z>UI()Z}RM+Ldp8+2Jc7Z+<@3;IhI}4xE`KiClhuggt>OOr=g%VX9ja&;3EZhu*@UR znU>4n*pn~v0{R%K*$9;3;|m(3UbeaHD1gI;o)rf^s?J_4@-ue!FYaTmb||hT_-W_W z(M>MB#*diA4wZMTOn{iBSiB{8d_I`9xt-rfw{D4iHc6bqL`rvZTum zs(w)@CTk`+7$q!p)f%lAXYOO_`?|DRMSinOD|KvD>$NUoW^AaS?39+?MO`Q{DfZ-6 zwB0h);dOumL6obL)iVA<;woK~8+Y1~k`l8%av zR*rI*kX{^ZOobGhhe9Yb<#DH}3sUII6UGZ3&Qx?^7zjhwW?@S@T z-8+}AlG0{H8i_!{PBLG4rdMxZrdp3~mDc}l(v2oXOPGplD=PSfuWw_m;jpP4cz>Hxa4Pn=3zA6t zB&J-I#8iNIwGa_%8BGY;&l_f2L&}V08zhk)vAL;|r%qgZy!&E#{6NyNdDb#7CS0wt zKnZp&49Z&3EOqR2PMz8My#Dscv!YHJ}l9S5|J2%AKj-Izy!hU@GV^vqsj? zshX;EN1U{+Qz!I6-9;#`+6W(wEN++=E8+Br=_v}17b22$Q(uOK^kSM+>C%e|2RB#R zf4BL${fZ>Hi}}7erlOWma5c%ia`hZi;UJr(Ye?g;p>?K0wsat&ILC{9=`#zg^+k`f z6q9vp+?k#lxfAT}$;wtaSqX7HTWNKGVV1{!urT1MP2Gv>*vm78nWcOs*xtK`TWIl9 zJp3;2scn;cqL6nQSe?Sk&i{+-e8!UB9CwPTBy9$oRQ4uosvt-2mSv0t3W0L&mK2${ zP&q<$snV^|HS8g}l;1OcGn7y17B8wEV%WCEO$<%JIt9$5#Q|1 zFc;!4#K26P7)J^e3(P~Inq*Bmj_g%NfcgN_HP8^|$4XBs%eoqw?|9`CTd9R)%wmy3 z%hk#1G6taY+;m%e(e8Y5IDC0~Mh~^3;z<0=_($c%xdFSTkzMvjllsZ~@%!Q#2~Hm+ zL_J~7lN^WAO# zzEd}m&!?SLi)u`5Ouk(tC)TMFJnEIj>6?fZXFR8guRV@QnzM&2!>y4;n2W^qrxrO$ zl`}JQQB4&wL;tXPF1<< zAXArBz(P-ne@Sv6aUpL*Zcw^&u^cg9T@AIZI9kC9?6d`G*~&rlxn{4PB)Oxi#jCzM zA5yWXumcH^aMSApbHJ)mLTv&|W%a$6yeb-Fqhdp?JSjcbTv%Tz@D}?i(zc{bAMw#- zNu{iI2lyCYq-D@B?%XX{QNWLqWy(!`6T?7^_$n&}QL2*xTO?&dtSg9Ov42XUjw4iO zD!3FN=_LFLxD~c_SSh7mF(6yO5Hc66HqzS#c`%m1F?gI60{;`fkg-Z!M<%e^r8%t= z+42}m4Oml@*+fR#owO@W(wuQ9{7c4ouvYVt%zS6Zk)FbnIbRhtt)(r)emtEbJz5@F zVGVJ##u@9{=gKBA7EfTB=C$UoYL(gcI!Oz3FSehR4NX;IeYRyjB4UVWyn?M|YmXVF#!9$% z>HM)2+AgIlfyk8L9UWcNYqINYS7_?mRNV(6Lgf)fGTyra{xNziuX8^2?JOOSj^e9d z)TVpQ96ffe^n?6O(sv_EpM50%<(2J&{o-GeCoENLexC>x8Mf;T!wr#zb#2dt=5-V- zoX7w2rG@c^ni&B)k&U+}d@}ncu9?=1Se$uT8$zo$g|)S669!^jbw)j)RQ>$SSeI{ZoQes$QrC z30Lc{R&ZP#Nh+A`SqayjJk5l{JgHG4Pnt+cXtmVJ*kqAO*( zDPSz?_U)Yo?HL7HjEW7T2vuE~fo@{TmeEDSe5-jV+DfhQq}{cLD%9!P9DjsmUvFea z-d=VDekf}iI(3%ZZeZeEM5aPKiWSdIZ}Hj<-vvGu(l>8t0^~Y?Re-%Q7P2N8!5yK4 z&G|7_r650`lZ`V#V>IhxY5g!pI)CLA+bZpZ3wolVvFciPhRa<2X8zQLT0t+N3enp& z7m>F&I*S5@T74WnZO6+4iKK6ydfm@&2F1$ALB8xh^)*tW!;+(4Z(P>%hQ9Q@+eeaH z8}EPP*6o=y`pt=t@73H;mwf)xvM&kumoE7%iDJzi*|2ef?0lW~`t}EZOHt>Mg8T<> z?>>Is_$-p7ou$i|8yN?qA%oJ-Zi_rJiMgV`nse7VHF(?KJ9Z_Jb>#K!@i7cBk11zA z0~0sA%?7iAHkvH#a>G1t!h~xgbOIajpc9uvtSXr}up=R`kQCvMr6*-dEy!08yhS#n zNfO`|Fty-EP9#nE^eO_}6Uhc52k``hRSn|f0Kkwq9*!-Q)`>l7kch)^8d(I9!;)e$ zhi>T!z&~!GnU-igT%@EqJxJ)&GUX@T*)o0>JIp{YGiENj<`h-zmrpPOR%XmkIY^5k zz^`_Rrc2F|bC=qG$)wS5Fm)CJA!`$^Zx--sB z4zOB}9*aEX-folWQt9vudaW1blo`7wgPZirTYsqUp7mav;ox&UE4xIh z@K^_*4y6QFi*ve+VFd+QFMPN#Yo@jPB5(ilf)|Yr$??}S98FBU)i`qIb6L@Yb#>Fy z+n}(vUK)SH`Oi${h3L0x&iCGVu*x<@HH6HIWglpo?$QW4S5v`~1y+XuFtAI+bUC3& zNze(XP4GZiGgzCBs3XGk0wDI z@b)_WdgGxZ$xnW6{rA4sGsdn~i=tlsOY;0g{({>}avqVtwJP|mH^}L&<%VPBd_7kOI*LF(=>OL^+C*w!wE@-KCfMEmE?!JoKyEQ z+iSnjC+1wz-!AkdCKh}4rreHkPMu9ds3ZSoZT<*2qGQM@hx>rYM42Im2!H$lGT?iLL;6Gt1AAc1J(!#H zX20;pPUVP@kO7l8L@GTOqDnI-R!ZptMsjR9ET==8E4UOQwY%E-65#7&@w;*HJcehAB+oS5SsUMyw1fWpzV7*pf654bTrhQJ zg}0>bb^UO&H278M^0c6WsS?g;BMj1-DxLKDN)B0JBl%d`!LkM;Mh%1R!uaw`Qj3nD zrS>p*PV2xITA_MQYz2%mvH>q z%1Zmk3N9iVCK_6Ul|ymtSzuxTbNnm;P4X~0HX_H4pe1H7?N%uTDvMUb+VJU3_}>dr zn!#z1K0;)1TpAi;tXIJ@9bBDJF|HYhCla*jtPLVV0D#&C#W8$k;-(J=ven$Jwh~o> zW~y2-z2EKM>}csvNmPgrfm1@GiFASQ79ua$Qlh-6Nl)b0!*I8)IW$p^YhFbV!hkFG zU6lR2Su-Coh;VAu)hPk+hp>7JP% zYt6UU02$CVPw7S>Zwp&$i-bffV*@3E6{Pk}M4ldwkYKAicmPhtEEY?B7-T7YBou4{ zJURB_tWT`;Dt8Wpyrs-TQfo~i(y~7ApUm#X$jE+0ruDjdgR0jZ>;*jK^kCsB&(f>< zgS3|y24(iNR(#ahSV?}gi2N?8N}2xc<+tw?c`?@Zr>&w;oobToOv8;C1<~u6N%2~$ zjp~n;x>f%JhnmA|b16GnF^uRiF__M?<$)!PY*2_8k5pIlB4UWW7Lo+x&sQfyG-F0k zd;q^gAK*7BmNL~Kkm`icz?u<%nBLV~?E*G6!%`n34NN@NenThz1EK?8RA>81(%|qT zm??mflkeGx+(BB0U-1t15tf_G0`}-*-U6-zj)#=SqVR}E{3K(ri<3qGM92XFl2TkS zPOQzyQ9BAN{Y`8&_uHc;}P!*gdS9PgVs`a|M_Q>erK~flN4`|A(Sjim&VR^H3#BE<|Srbp?ZlJ^Eie9m;i_Z5{_J8#t1_R zYpTUvN)Oiqs*9i{YK3NmeY^Fq;1yus4-F70@5S3$q_Hq#F~pE;28+YcEv$Y9PZDfe zHHH~>N&OFR4Co6elC$q_vCXv*W5VUErIeM)ETN@K`5+NOCV20_u3x{h?G&q+ZC>_0 z5YIL!?@$4s@{P6CNK_fUvuw2igJtKvdU$;dM?^cMWl_Da$|W;2N%o!cG^5>$#WIZ4 z2x+<0OxkM{0p;SG?jSEHCX)j(MIjzE58)}cl#i))A)AawdRazH6l$KrsAsjVX^KvK zvu~pCnFXvnYA!^0K|o@oc$czEmCV(#bV9JMBc45F+pI$fLv@lRqPu481R>9C)2UdE z?LKXyj~dAOof0+%SK0%x%2ZDN{87gwXMX9888nK_X40MgszT$U14v(rszo;7&vf`C zfj_pD-k%!WS`-fp{Gg{T`_+QQ@@k?#NEL31NIKbiK_1#((728X8Mxw>*)vnT7|QCL zq(t1t_=9f+Wf_OG{8vA1BL@#_f6Pwumvz)1o62cEz%1iuFMc&!er7VHu}<0_>k-M* zbVArP8kq$V1T(0Sned$uFmSagH%bqwwn~fNR zzrd`E^@U?tnBt4Yt2@hL#3h7O5HZ@ZIN(Yk_ENV{C310M0lr33|of)&w{S>N9tz^bP z=iVHY(r1u|cR9BYcO@<%P#8Gl&de2tdsMDM=A_9{2=uup9BrS!;p5(U&lMk-^FsW! z4@wq|y#B96S+a{cBa{FA-`2K=$8MZ^;~(S_7(fq`jgQ>JqPhdjZz1#JhV~6zm|48| zab>B`kJkG;-fB%WoL&8@E=dtSy2kAX&&_%%(jFhi794L!{m)6 zM}QA>&tLq;?H%)gaB##eG*RGXNn=7>gf0&xONcjl$dvH*q2O4N4H*;;O$ywX&uv~_ zXIs7A$BA71ZrPQg1aTlpzf$H7=G&~V5?M`LpP_`jq0q0i{&)H`@hL*NUp9A(W&w+X zP8D&wR2E|{Pf3*fiBmb0s&_7iZ6aU!1mG9=jt7nC-~g~*RvZA9G8_ErYgV)23Z}M# z2mKArN_4T<+eWwGQXy~ATEN=n(N=Fd03jMAG7Gfd!0^a}708$%aPpA?MikPkb!++` zG)oPRiv7AQML1i|(zwkunS$Cs7%`aP863@?EcrErp6KE4nQMlFGf4aBrMVk2liv(+ z=AL7#8V}l+&#vn>-uLRsQW&j0WTG~2wMoKND5~ra(!L zb$3{2=dY{@tn?Q>$#w%;X&wQ4T-GO2aPSs%6XCx@U@zHNW{%^h;;fiD9v_&A8)~AS zM>QtQ?BHI481`a5rE@8WCA=YbNyMn7cWy^Tb5(2>7P1cur#6g@gmpG`; z>Kmny2XqpiX_3}t$Gc5vo}mw@H7=RpUw9o=Blgj#2W+k4iFSIg@(c_I=zDJ$4407J zaIn1j6r0Z{bKMj8yoYScfE4Q_z$GXH9}iM+vsn}Qv2ql-xe}_~1#=Z;-IA0Dbvgk$ zGY)i1Ovz>a4sRCeAcuxzGCZFtW}lw1LHW)zA{eG=f`r78? zpeuilt8Z!eq2!gGWPjsh$Iv^W3l^kZjfgh7eny3;Af;!qT zIj?>0YSmftf$VFAv1n_3Yh`O)M$a9GI_iq#{G;zW{~R|x?*783-0b!7EpuLY?)ZDx zZe6*&uW*wa=)Q_OCF(_K;Au zupX|_jjxq0b$^okqYY@w3zc4@BI zHo=CTB8CM$1_li+$&iEthrs4mQzK5m!guVwW9~KkqA_{R{_ii@g@g||I)KC~HDvIv zfKEi+WUe5>_}A%{mhhi*rZJfL;Mj0=%A!P$AF)8fMfJc6l4mJ$5E2_n1RNpc_*7Xj z!eB79Ni$2rgA|Li*hSzfAdIhBAZ9(mu~rbQD|LpAP|*(UeDog-!k`H=pR`BuCE>U} zdP+90tapypr+(NT9cORO7-)`+wfJpb0f>>pmaTfP2|nVUW5p8I?I{E{kN{6ME-arFm!l{2uogd*dr zF~e;7>%~kFkC`D5kq8F%02=|1OKRU&=7j>d%h&=JqgIZ`5W0_0Bb7>WZ@N#kR_>`pv`$;F?F7p=k=Cx||?noEyD0kRT z?)IeAS*e2f9P_`5(`m}57bo-Z@-&Hx)JQD8BD&~M?>&6jV0Jzz( zXvT1}SFLoXGEL}Az^A}BHasP>!Wxzjt{xDBl?OQvgTW#hhYIV5=QK|%Xa|VK0 zYFR2MhV3`AAs;cd07&Ve9=O#TZM&$lKFvHe-)?V~dE+#xHqy(5B-WB=t4b`$8Y>ID zrfF`XUYq=2U2{q9x779fNm)C8biT3PW&XS5(sV9{9qVfsB}OffwKJ?!9k777!I)96Q4aL_Zl$|J=1 z%KiUpYq5YospU$h0dvoeX>Gs=F3sCkjVuZ)wTbe!rCRc65qgCXO3JNxOafzy?T|AjjeIi z*XTD$Wh%sMaROielS#-_KuK)E&l9sZXE~3q z6v&|9LSUsvK+thhR>A;qsq$hI4b-PvJxx2tYyBynp0VpKl?Y;R>=A!wnk-I2uPzEG z?UdDZ)Ra%$@=N=9SI&(y`dhMsXdQa>f8+EA?SXfpy%mT%lr#=`_r|2CU$6lm}!u5);bu2YWW88FXtc zsjE>?oyBVt@>*vesg&5-2ih`d>UtrqI4o4nW#b%+IbiaMjS!)d1$%8e&aW(o8UlR` z;YdwZUTgpoISYGI_6<6&6jz2kj3pvg!Qd;6#RaaZWvs@IbZsjPXsp6gTny5iKG;fv z{Nh{14?b4QXBm8Hn=`ic69b3SySTG=@l?8%L#P=iik7nsvNHy2>o_{be$cT+GgX(g zi0W-B7jcyy^&8H{96b|kHSHAlUV~4sc~z3yue8`IWaSiktk@`stRjhS(h1eG#6bvc zs9Q!V`*K*@@09H$ka3F(gHH9%WNo68KuIH?*U8E~t2b&F(91BfbduS;Sk$2?U#e{V zM4@D@lsY6m-zXHZ-9lkyN5m@9;exHO)+s-eA?>a=R#=TuI``?V&GoMpByU%pTCjdp z8zt%AcjfrjU9*4sX8v2;(g&f#b?slx4$gQG!n9_gfS_*8a>rJn_klGZtNAN*Dzc$E z01W^Em~9j*kdm@SZyf}|SV;Fqq`~NePm;M(Y;Isei5wRP@EjS59=U#8{SR56_`ji$yD$sZ<0s2O9WbHeEA?AwVIw zLPd_pXm0k-hX*9{MxQCJ%~&?u6e{rMP*5}gJ$Qo6oLJcgzb9Rj%r8Tfs)uEnP5SBW zZ4zF&1RpGImaSEyaudPkd}m`Ps4CZJHc2KV%BOb{Gp&)r;NslI&NRb7OU-`ek>Kz@ z#|?BpytD4X*^rT+N+0}w@$Y8?AGiE?Wa^R6H#~g0__v2$e~x?Z9ctva^N(*N%r$)~ zd))ubo{8%9%Yr4Ubkr6!v+U7Ix>0YBU)iprYhb*w-U=&h0i|cfY{=)h@J&1lCkCxC z%qBvJf)dhWbQxjous}k@WhsSTu9_L!grd(_J%~+JSS+G4G0Q-x*Q_g>_~N*K!}T_z z!Ujpy0#XK$CXx^;iv1f#rjBpv95$yJ+?^cR@G{m1#L>(Tl~-8%EEaHqDuJ{B+eOB< za1as$3@CJoRQQl0F_bBS5|%cbqR9Xs0<{TXOv)q6DLewdiRD`OO>B09(E!Yt3NR%C zB7CD{1#$W8=Jn;EgjwJxyInEFF4un%y>G)+9=JZo=&n$ ze)zECAD8$4Yt-xTgK}SJG$53tKA+iLQ%G`HPSh$GdFSdMVlUdypb}?pe4^Ka2H+K?!+BAmbJ^((V*+{ya)>IZDHX!?^M2eyXRxbr%5Ks{)?C)$_>^9sqzOo_-@ zBmoKd#?n!wEL@X>)d+$|rUf519WHAYk&7a_Spy>oW;7Bsd=?Z(L1?m=o#@o?Mx>`$ zvzzTn)mHET$1XuzmC@XphGmU0 zkJG4N4CkRrun7wa+%rag=z~UD466h}3Stj4^eoVugXkHgx)?um@LZeML+2sw#e2U$ z$+Mrl-uXlEH+LVcC_O%Ba`&SL4~`k$>`4+vd~or_TXQ^vw|Yi@I`PW;i~jRd!84z3 z>|Q@RVAp}3&CkW(*|_oirO56FHAwhJgj58gRe<<+ZTy?gwV%(PpLq_f7WvZ4kDcot zoU6Vl?^&AM^S9bJwfwR>bCwd$J4(dkK&w2kZCr;Au}xN0*NaU|O5 zwRLqew{s1ZYdAd~)pJQmN5O1$^Fd}(lA(5wHuCbkJSIQ;&AidMjK~nOTHOCk)6w59 zztq1r#wfmav}w>q>Jv0y9zHvjkTq0eZjfd|DGUOY$S8(_O*9~p2KEQk*!s(8DtM7b zrvR)|q$l`9U@M=o#)L5vX6;W<5`rHBAr)6dA6>KC9g|@~&LZ}=H#5wWZ#tB^K%2F9 z@m?nOYgbCs8@0g`ay3=hIAW4$7#7g(9Qg#YK{HckpAd@x-e77jztf-EmmTPvofDre zsZpsY9}&7Aatx6!c_7Wy3*bc*NF>b_{Rk@)`RbXmAykCewh~#s%m>OWCbp%AE$U*| z7p9xY?M)U1Vf@f$s#XMHk0sV&B|;yzEikaG*!Cd+*;tl}4oegTv3Ez2LQ2bA3dvFh zVs|)-Jn-VDps^DrV)ic`<^Ul`L_sO4sztRIE8c$4*p^2(tshA3nWDICz2`2>*cS8o z%a=dyNUQCzo;v=)f)%6FE_i-kkh^hx{{+(B+^$N+mf5u4C84~_b3QwJZ+6uB;d{Sd z+<(U0DLHUw!L1orew=q_+V&awH3fgGz4&B%;FOW;F?yizP5zxJ%NLls zK6ri#Ie*ug?4l14mV727^||aE*S963FTcE^;HFu4XQbp}dI~*sky~@J1K5x}G zjcx$89|ubV+6Z+md#z?PmN09Jq!GFtaNSs0lgkF~F+l-JVk0m1y7^PG3@5*#c(!|+ zi13`2G}n{e6;O~FhQHl$|2%!tft|m)Qj$`_W2aG+EJ#CsJ5a1Kw4?dVG8Z{ITdJ4( zpfZXGi&mT`wlz*p98@D($o5loV{fF)elRuy+}1^`2y(0xQI!f34qt$%D|7~5ZiR&>-0V6XGc z_GWf_TKZqx-GlV@_FT5dH!&Bj7VOK|a4z%A!~y5PTX){p z-5&V->Yjx3_!pW#ms|)I7VoP+-eB)&EWcwdvedSd5;Qw~&&EqB>Q4x+s32i8u^Xl5 zai1?ZJ@db*GbWtpihh65{chl#(Yueov5x#X?)@9<|8wNf^u^h4{BUsN^YVWf|1CZ7 z>Ib7g&-!iho8NECdhcKV{OLH|(C+^E7sbdcu0O}!frxtU_pcmD2R3c$(oF}N;QN@> z^W{CSGnc2YTC_0iME8O%Q(x?O;ntB?a#lFv^V&aAY~J3UHHLKgr`Sau1D zC*mgqxeCF$Nt3D0CQi0J$azlPX1HDzLcr`$MH6R^cUzC{O3c)&uNBX}@qFhJ#YoPh zp-M)Rt*4y92mQ8c4Tqi9Pm=O;IMz_g=RT|_w(bH6C8SW=p(|ihY4Tzlvw3U{X^WI@ zqaa$OWnH=nCL{+a=}TF$p_yx06B|vL`OKs`++bi;Zz^`n^rh=yclQaZDzPuM7i|=M z{^$#0J78Hyg>CmW4?T-^M>IU5V-1DAU{g%b8x{@RTlzrXm_xs?ZUFD{iGtc#8O za_5&7!dKUn+-NB&N~eBf zV`AaM@$-xezWA}=UfrvHx6&S|-je@O@cNT~u6;@RSX_DCkcZ@F8;Gv7M zodcgJ#>pD1#yMIo9~;Tvz8`9`yU6vfJAv_ri_$RzG>tVH#_}RmCQv5+`oy%1&wjdJ zZQ*|4EP1?S$BjvUeDiUHaYgNCA1&VXkI{$6zxeN*%kMut()aHbhpm2JJeTboY)JjJ>{BN!On^J=z2gdC=#A6B*)>0ArPf{L(O!Zva>up1fq$}i2x^M;yP zg@q`G{S>g}$+$5Vb2KJ%IOc~ie*95Ug$u`Ki!poLOnCJ2MXm3LMKq1w zo!02TmfyfsdtF=p9k=JKM)LT^9qN#dsg)aQ2;z6f?-Rq8)a!#?1}XM|vo^v=Z=zfj zSr&zb1se**3oLjv!O4Ae0^1e=y#;uWWOt|qC^T2?Um^)c&Nwr+nJGs<#S=Qj>LaDM z2z;bItT$!ZDbM|YErkSnp;Y6qnq~hOt;bk7Ln5?bnF$~CN+T*3I7R zY)KN@HX=}C_H97V4mQQ|2J9_XY;ahBSC8$+&L4}3esXN~DKu*{EIPKf+9W?6!kn)U z%PhTq|KcOgqUFDI{QmQujhdhLOD=7kbUZv^fwTB&{U1?-2Y+#FYF{ArUw-1cZePxm zt>0d|xp2PB<@X2tq5 zA-W6;vklvE38I$t8%H-an-38pm&U@>)9f7#7B=>0&5>>6n4d4S<}C}0`=Q<#Co?v0 ze@A~W>(@_iPjfCIOJ(mU-@bO_ZGya+HJ5}gR$8H*kCble0F6+!*9Dc|HT5+z>4*Xhk=-|<#8o$Wf-35cfMG%siEfER}`1`#~d5Ib#iss=(Y8ChPUn3{oH_1D5BT!Djp3nMDeN+3gy>YU<$rbU9uM4f(D6%fFYWv+|m(%yI z%$gq;LAIc-U}&>mdRE8F)Zxw^*bp95QHTA4=oYh5j`E@pc&(1D#^#Plm^WzFklANJ zU5E6}b_XZIBcrD?mO%!k99Z&ZILCR|3+skoKepj6fL*pWvcX7gBII}At@yNaI8>e0 z8Wm`Mm=cKg05NkAMsvXTrkGCLMx=`|PPXhGoL*=Rb6A88}dXvD2a3sm*IewAIt zKQA^WzP;~MtW!)BYfwd2wQZ0ncGxQ`Wtw!u`9|bnxYLrY(zZn_!bVhgE?Yt<^|@=? zsYt`#CS|3~%vh}82e@lql@=XJGbS`ez%gUn%9Tzyl4tq?@NR97C`cWlVhhV?l7bTr z`Hh`$xoD}IQowx%22?X{^Mo(f2|LBG_cEDdifS%9iH0eevNx~UhLvl^H_3D~fMVwf z+h2u+u1Ua#CO)V~`pCkk zhIjT=Mju6Z`|!^2JNq1#lFWevOpl`Ww6P*Gr=vNfowwdoHk*8a%Eo=_+U)LnY-`6R znPhYf!nX59Mu80$l#$JX>D6)p``c69h9s_#T)%9)V)F;0q}*Ilziv9cYBxsqj*ZhsK)V7$++ zO`);l9&H|e=XTP8%iT}jx$;KhX?}Jr^Vy7BdruS}sru$Y-cPO{Cx2D(ML?iB?rmPy zl+-UyY<@8G@a}g9_TT<<+?2_;XI^`6Sw+tCJ~uCC-r4cW*+cp7lixg=X20!hd+pmj z^2qmAJ2(FNZzcRQ_n^j2-%nDBT+}KU}k0J=k8=kL@%wITQ z@SlpVZTAcV?v_yzV=*flaaR%RYC;ii>fWiS%|yW!Tkv@gwYqN4c27dQ$;_P7v89n5 zj;&rSlH+yDRY(0jvub&zC*ByfdWOV&!J?|vq_khu;6m0eGRW~P>_QuSr4 zSVINX?Z5U4pqx+Am2wedkzz->3LBq`?>sp?pw^t6;*IeXNu9 z1im~rY{a2?#yiHMM9((r_e$I`g(u_=vkyY=q5)e3!$we+nUX}{7F>_9DUtu4J17^) z1=T6FH^<^WE^M=Hs(Bc$YB|cjxLpdn0Tw+-EQl9S*x7*93tfUdK8={j-l_|(hewqy zlF}sVq{ln6r=N{jm@APmmb-_xhSetsb7A(N6?Y^TO=SvnSD=0bxieEn{ZqF=^yt2Q z8F|0l-dtZ5o!@79D*k!;cE#&iH;DQY*PB<9yezuC(bPW`$NHby`bwg6$@&rh#EOpZ zmM^+@Vf%)`f#Q*$zavK;-+e#%KR0teKibjdSbQK@wB7S_d3m-~uw-J@v*r!5xh1tns^`4-ZvDXW z(rvl-*Nhf=#pOJ^bNbLN=^w=h!ZI(+G=){&T6E*%m(pHLl>WN@`GA&ZS1dg8e!@?q zcYgYE^c&%m!`Gg2r}EZyQmNd+?j^tf`hDSS9fiBK)vWD^-+Q?Go2m!0wXrf2s#u@S zh+e-p$@sZq^L9hc!0P;$m4kdeFF**4L}7_9#!9z$d-L zP>FuiTfwbwwPTlfmqE3g$cvG<*4`gTP)O2HrnVJlwZ?SJ$hNlGvkBZY0L`#d;5)lr zmlCtG!`-KIJXr;^O6wg#TI`ExQVBdOCo5FP4_Nn|4UbP}H;V+RlvcPpFlk^`vK{JU zot|N~RXQI5yF+SwEw-)To-DlgP{ra?#R|F}3s=+p+_sG~&<(5Y(FUnzqQ1=6fWKWC zJ?-g=;G@?bL@w2D_{5&O@R>+`BB>q>9hjDP*|E>9+qX$}5A}#t5+%{KjK3jr|rkw(|jd zC1^Ik#Evjff(t>j7IBOEREj&^puiD=9t8H9>3llG>d@joZ60iZ@8Jfi=eGVon$83s z>bCp;vS;5$$dWY%l`;z1jWrBr>{~>P7HgtKh?wjmO^C@d#!|>yDrGBKGlW)KA$M6r zrT_VQe*ahZ^W67yzn%)YuIrrh`F!3-9uHCtHr|-#(I{H*Ygu+jsthmdMa^kfMqxvomG(L`FTd;eIQFWbN9rmzs%d$l z=TowByQ$1$>-w(Y=eTxiiIK3$jS!(44l~=Wr^*s*8BaCW9~`frKbmhhBkVt@x_DaU zLTBc&k55fEb*APo9_x1ZRsHcF_v4zB3@78y=j9{iqiS9{uW=TThvYOMqyGqnx^|-(H zMMJAud;ylB$;OW7jZLd_=#omPPUwr!cgO8stekkP)gsM&<@p2CwElb5S1!(6@DTXp zdFr(%Bc2cS{AJ9ta_icUm6@Q`wM*PLY!kjPr#FS4%t$r;*zA0I{`CQf#PE_iUUQW0 z$x%GXEF|#O3RO$bzRRTT-D1{j`UV`7CDpkBNi-rCWYVTB=9KfVja57fp^;ri)BlI+h-w6~060eA zyLrtB&x_SDkVg#l_4a$L$R~?EN(G9L5CurJ8j2PCff#Jpu4?zN1x*1~<+~TjUC#Ah z*DX4#GlfaSNqVnerM6Oe4Nj(#0vRagk_ut(!spoD$byXYmt91Xjx_2nAqs+KBs75$ z@!%gqEM?@FB$|wsfdB;WA$u*1OmT$$<9D2LAbvtDn3;eNHZ}#RFENEtCYFUrfoG4% zs?LSA6=Q|t3nu`+>2U@r%mJW#tAk_fo46RWq7+8axfswkv$1l+oXC(T3n73&4ju^@ zA>c|G=pnHtZ$9;U-Gg;Z+6?jZunWDp^nnf7T>Oi*3N$#8QldFoPA7P-$+GMR~%Y zqdlJ*hjkX+eqz*o;%K%4$7oB`4f3eYv#7cLEb*-=eXH}S*od#Ms&#^RERDLivp?OF zO>-m0@mKv;TevO@qlPZksoxXbER?Y(hy3xwLa}3An8}sR5XZ8YQ(Ncm_>YWCDrl8> zdpJnEdXVwyDt+zZ9TA<=FV7e>8HUH@EBAk_Qx40)&+}DPy=0%U|8|Rk)6r~pdSA}D z?BD~pOoMajGls9yf`8F;WQ#VgTZ((;lHZxj5SM+}a2vmeU)s-098i)ocjsh2W+JOM zQdD_Y`EiAm*5u5ahezg|+J+;h7Gtn%pBR{{s|6eB~v=D241cG$FTg>H_bRz z|M}tc=l`*5R*of=6N_40=15nqrJ8vDO(5CE{9LH3GM(GsNH2Y-qUwYmf|y!*@Qa!)w4(f=8Fah)gJj zZy1d02=NRKWgTJ(yH-eGgvPPM!3NZbc9@?*y3GOrKR7g8*xv?eyLTDul3Pk;Kr=6< z6gKm~*cYv-oSj-*>W1%FCv4t#9Mp;LP=IMg&*fD)vDw7~rIK~tRSv!09ZCFHyiXPJ zg;eFxBBng#oSkA4c2b32e2C^dKDA4MrF zegNS_*$P6oi^vL%uc9;woU%e(SfGFY@+Pp-NVi4um7=LZ5HD|J7T+>D{_%wc(vZV~#) zSpc*k3L&J{H=%unhqlAu5Cq>z5AhUdaD(gMkarQfPcWDvfEoxEfVXL z3eRHfxp4OOV9hVL>)>WN7uL5IWr$o8!w}eJF%aB&$^izr378r?6!S<4o~E<{PCG=X zfsywxl;RYH#H6ajN$M6U0Zi|)bbTrU1+4Vv5d64@!Wz?CI8%Jk>!d34WQ)@&W=>sFaT zM8VMn2huUex99G>o~r%(?V-Ak%ic{6_wk2Lp-G~zH;uLrwxasOAFw=enT@l2u1CsD z_`tUB@?>LwMCL22FVEVwD-=SjO1Wcg(~2D*+*6s4u1oVc`e-AtYyEc29;Z}4w_M1p zl(=@>^GVs5uW@!h;V(kw_yAZ;Te@o}HxMhU$l&HIB+ZFB(5bx+Vin3q5HbUFfDfN9 zo4RYx^;a8djXJwk!u{zhknNRuAOJfj5n5lvFd~+4(u^eT*C>!6iyG1_q!*i_Y(W}C z2F_qdClO(G3Z5e%rP#6FH-W;)7%c|X5?F#e!8}hlq?UqvijR^yLrDOnSlr zaT#dOzQMes9;ZQr{t5B5F;ZlR3DCi+3~~X_!)O4!E6|f-jR)b$Lv z*b!$8!PttKod(R|-OyMe;GDB~euY>JBc_msu$V*P?M9wFD{!*VL5b2~8r)IVfgCYt zS7=Cq7Y{8%Fb2MY(tHxYj=`UD0zrX5!XIP}9x>o&i3RzW?C6sSfEa!dP*AwTf1Dt1 z3!@q^Pa#hG|5?9S;rZKJ47p2@Do^-}B`pV1|~nmdC(BgQGqS-WVXL_{-weC^CU&F|^mL)SDbsNv9Qe%}S^K z$GgQIW%6Yd4*z$FW8rwJV^{sOuKcBQ4~F+S$z32Fdq(=~b>@=e-JY4KCs&W!Okd~Z z@)^2@j`5I)GOdi#ml}yRmyDbmr2$H$3U0Z#kP(pVT zHF^&-b5OVM{)>C0+rn+q_co?HGW#NI??tUzZ~j>8c_4XJ=hFR++My*&BlL{5g!Q;p z;7FIUTBS?wYc6G5@f)Peek#@b;!N%z*sb|X>tc0YsFqK;PZ@7IZ&ROA@_YkvM1j)l zV9fKwHG>pe??Qg!;Gza_H9G*TvXEu&$gtKc3p4sw4>iBLIdWfKw1hBTajZO{a+2aw z%|2g|MEh7TO0zmkPQhdNI>D*xM1iLcQW9%BmMtNpK^t(SQc;knM~XQ^IFv{{6^UEz zL@1ENP6}M&h^MFkCNzvPFsShc*DyG<<{=Zth=E!aw1rJ-sXCV;AElJrfLQO>Sr||J z>Jwzq13Jv?gOpd*7qnK4RYSvUFeqd1Cu<)7ALz66jw@9v5sopxz6?dsZf76i09%C1%@7gX1xm29XSK z%*%0u1J(inb$ED)NJ>n&|1rLSqaQ@%#0(=?+8uKMLSR0Iyq79)Mi3J_jCrUD>Ij1d z`JAAT*!i0XiB*QS5BTr^dBUE(r5F!IEi*Tx0&u@!@Eo-R+yi(Sw3G$V5Efp3%al+K z1oO6i!_VvS_I?l>wG|jP5+nekPllK{Ne#-zNV;!iO|=^YzqM0{lwdyd_g4OT`8lie z1^Qt;SrYlR=u)|iUAOWlKCwQ@_av^Gr`%MmnLiG-k)0d2zTh=o%0(K>yuhofdpFjQRebU#_LziBLYOD z?C+cCGP0RB_RejT=6=^Y zIH?q@{r(ZoxG>VT{Z2+&y+F%?WEtwUTzUc_NI&Ce3?Q<5o^fBR#WdzLTK!|FT4U*N ztk-9GX4mx4u<^lW&J~K;ZF`?)KXoU{KZX~=Srfa@_Fz@+wWsb)QosEvI1NNYm*CMW z2bMd+#h+*9JJGW;8Uh<7UG;+=}U>N2ZAKdJo`y?f0un|Gq zJ~yPCuN5Aber&vT&rDZp3Z}u9MsjnQ!q|(A9M1ErJBg;djhyYAl3Zv{@4C=nYMXsa zqRD0S`1helW3=uL>SlH@z${ME^5CZ!xJ>M4OpF3UiZLC-1P_WspxGIymSR;2{77bE zCq#~%KP1Tl1V15oJK%e37#hu;C<^#+SqRod$ZrCkhHePgK2&woVnyiTp!kXc{wdU2 zaG1%7pmI?1IM{^XF{4(Xh{P`_%9q5#@XCP`J^&Rf7M88P(9$iVM*2z*%kaYVKB~j2 zn_^}j7=A&54g822Pl9pDz%h80qon=7jt?ImSbxbZu-X804AO3pAfv#Kq)-U(WRO00 z(#6ym3IJRUNyfH7&BWqTSPneG5{yIfYE)#<(+g$xK6th82!JC8hD=aagG7TIqn%@_ z&TE*>9*jlop-GCAN{A~cpm%dnfMydLW{*VUEU`L#tDNdZkmFkAfzNpba3=yg>{I9* zF$Ra|$aItjv`fSWM}~RoF?C*qG6h+2Z41OJYV55BBwg_R?u7?iWAmAkK?g!`d! z^!z?6Tn82LjewMzLcdJfSRCwRPKa+XJG)^|%w>SID{O>;wh2L6C6TdVwYQ}acy}KWM z>mLKLJf`Kr^LUCe*|b>|+H_N(_=-QvpU+^>$z zvOErY$gph|P?PhUqi>(~1J?PB|E_0R7K(Zkjp_=V&4kB;Y5VDt zdZgfonCf$w$f(B8L+{NpyHB$+%L{zcJh|d&7`|QSsn^rzSbF#e5cH<-o6o;Wq;j99 zr*xbF^vEzeNr}2^3Dxm>Li3SBK;NrkM#tIa@RhZ2j|8B_K4y2>F6cY7=53p!VnK#B}lFDg~%gX1tpOXy`buaZ$W z8c-9$o&seM0kl+!C)!@se7`WpmST054JhXr#Du99Ho2JqwZb!%QfIbdOG(lEo%uB zxg$nkNYOG5w(%L>cGtPh@ARr(vsG63t6VmM$HO%~QZ)?x^ZBBasYY z)d6GdllpIbP?{4`c$kpnAqy`_s7bCb8-ObOc8Ml%#F&F3&SVLK=$w|HVeZ zKM}@J3@}z3i3+-TdaUkY~aiTzz06;9s4Sk$X0j;UTS0s4Fc6Df{`6;OMy(e zu^Mg1L1R$WiGvvv#HIiX1+8)nFdBhR!fgzeS!9R+lPkgrVaQ&PfyR1fKn3hjhHs78 zhPQfKX~Y8jP4qZZ{=|1}nEqqF{8i|j-}dZ%Z{afLcOk_+iT>=Q+oi>cJE`@#uV+k$ z?iW0F+;1=+W1`K0=M23hq+5Op-`&mKtS%nmvZQ{Shs-LI6o)Qwi_0Siq&_QMlWV~( zU8{Q8X)VIv8<76tQe{<>+5_5YHx|#qf>}T&uaq_T%01N1%d#W13)`GbBae%8ROJ2b zz*l|Do(w4D$cz?~Zmjsz@mq{Kw-gvvW}PD&!Xw~IJ#_xKnu_t0Q|UY=Ja+^qW1F;A zd#)E?@^|&!xviqx89PyM=j{Xc;w!-xuga{u?`#x)jk*_8J$b#`*+czgsp7llw*OfC z)t|~fCHc!W31G!fG8*174${85rrw1ed=k95*;_Tt;hjYn`zD{B(t$s{#w+05tE`8<;q#Lzw>Tx?=&uo+T)Ua`WzsC)aX&-ZQ z3tNaezxUCJx|9&cpedbg<?;m6Meuc~&5iB#3emFV@I&9FY&)f%O_VspA+ z!{r~tjSrG@K7o(##vGmHcSgB-2QU5c0VD*01?z&7%X zqn^rG%Eph;K3$o4{tup3!9r&R9<#AWvh4*uYU%gZ=wRM&Q_s&2gg@%M!C7i}@5>Po zf54U*60a+$f1PvV(iNFzz26qA$Ua!I3_U zgkzDG8LkilBdksE-njq6X}(cr{-qP1%Zicp=ANQT2TEk+$RypOul}a+C(PZCm}4#~ zf%leMq6Io?{yrsoqN4?PeGp@dzUz6HZ7Un>e0|@@S7pPI@M351hm@j>i8p%nmkubu zUOfQ0>cpF1J%H;0X4in-0rEA_=IZoksHMH!8vgNQ@YdGj5GS4>3|EnO9Aa1ikraAl zA3O$z#6{m=mdtIyMBwYiQDug)RtAAH94~i@f_%%O+g+jUxnO%E9xNwJ@ zMUv+pZi#g@l3SjZBRbbKW9~YbCagUz%#YeWB64x@%MG445qrNbwubyD^N0*9g0k(p zx4Ibq(kSb=!$TIF_OeZ@ZPLgeeVMcDOnho_ZJXu9u06`fQ*O)OZHVaVIPK!GUc#q4 zrBl=4Y#Kt^ku5)4e5Dfz*nZh1f00ygGV8#sK zLl-K@xPH_qR%o|16cfc*g*d2DF?D!ZWBow_MAwN$^|&Kq9FPqoCc+osrY)a35~vM^ zNE`qw!9W2M#bKoFfSeQ~pd^Bzd)S2pXUKq!X0EXiMx*r!Jc|2a4hIkhBqsg;YcgPJ zf?U4Cpuh{FP;lqKl>$E#CA2!QDj)>?1t48vFrENbN?HzFiGbP*`oAj$35#w*X$7Je z)QAW{g#~Y1B2NB<8`=ubCVs5UfCA4eN#q`9(OC#sys8*+> zysx5tT&gE1a#4>S(AQ3rhEE%LY+Tsiy=oGi_p8dpnRifCNFqf05ZjPO)qT{~*~k1M z5i8>PN>bFRk7W6QKl%*|!4l1}8j0HKLowAh^|t-*H!Aw;b2P;w&z*`k|9h<5Uu@*# z3e`BL1SLRE;^~RY8ZUh`KKF4?><7`U>m;WwAG@(3T{Pa~sT{{mHtTDjql~Ygy%+s= zp0o0gnp~fJbF|vh>S;7@J%hcw#W{6zfnwaTcBQTEO`6m9vZc-J6ITAo5@B8fk>l4> zHMWM%-9x{=HmCa_ZPSXi_iy|&LgV3fTBF7NV`FuT2JJ2$J#YU^T(B4KMXQBel%zKg z4v&_NeH!-=G8}wD6RJHlG0o&Mp(oz*#XBr=aVFEO#Fsbo=4-m#f^ZjAi2Ib(4 zOsDv~R~%#O&>!;V?KO?mMrHJC`ml)!XL9=Cpd%kEsZJFXZ!L0@hco!c35GNjONDb4 z?A_zFXG%hQ&wHHJu>yb;2A|LQFGR|vkmapME+i!NHsBK32ANV zb5z0H1b1(b@JD*z>U(6>n2bX`CD_z?zA{$7`m8rWh>9d%`CO2}Hk?dG40AZaM9bmU zG@L3}%>gyU7&Prl^>}{Tb#RHmjn@IE?#%xZIs_cF2{14Rur5;4LmUo-FV@~2S0!Ev z6l`=6D9FR8dRu46&J#ISU`2x|#+VbQ21Axobp#QCkmq?6A;Mq=nQ`wJzw~1zaOoPu zouI2&R+!-euudw3MIpTkjxDjoV2Cn9D4qdSWnhsYLqTSLm;nO#2gydTXW)TPAcS9# z?g0EkE=Atf4oj^_6yk&95Ajr_wDa~)P=Jf0ZimVWNe}2?2uRw<5D6eT!(8?oqSV)b zTp5KJ(l{t#oI?CSpF!N}?+X1;wjSu*B$t+iw~j{MWU#gaj+jhx@fYXVU8TR$S99NN z8ZDFKcbq|4qoVV8^yGsjbJeP-upuAY08w-OPtl~AQR}=m9of=tLqXxfmF73q$|+&~ ztG{hVB4>!`zLH^M<+PEP`z~D`2pM#(AI|@&TZ+lacW)(88MtpS;0mChyp-AWA3|HoK@#qOx2a!$1y0Q20WI*r zuMUA8!Pk}4bZ)yxr_L^&unPTa-~Rfn-PD_da%G%*rR*+~E2={uT)ZxL=Iot!l!`a5 zu~(iB3k3Fzo!*mf-2JA7uW%woow@8k(_8UMRB zh&P{1`l|A9Ge~JVje2?Zn&l;bG5?VOx$HYHa{BlLt`d13SFFAhJ|c9ui=PQ+d~*Ib zIWD(h{#Sa}j0rxreSYRw1^;~^t7~raA%}Yj`l&@)n*Ng~qtBDhzqn`B|ev%Plr;XPdQ+_xza zN6vo?r5Dw=t<#*kTYgp*SId!6ZrsOgEdDWA^fuJ%s!gln zN7R}gIVcCr!iEFZ4%?7mrz)daN{N0Q0zjsNX9sbt>@G3zL!-Iz_V`n?k6x|V-k(iO zg-vr1K?D;Vh<`eG<3XH445H1+>c4;%2-(-D>wg2`E~^6Fm=Csu!J~g&6|dw622p6w z$R)ZUv%(C5B4fpJf=Gh3H5eu_84xpOV})SlPYkFX@qmw@KrIF{5IYK_L*Z7l>ot%s z%;#I>Q3PBIq@yfiI#6Ks7P1FdtOWw#pjPaHc`4khFo1!(0kn&Bsyqqpg|L81$$PET zj|mNYArkKiaZnKG5Tyhsvnm~jI|0|P{T#y50`i>|-V|ds;$VY^ht`bDcs$~;X+Aj$PY20sHU` zyu`jt&AxY4QKdCoX{2|?z9;1TLx!q1H>%8f^5?e?$S9r@sS(Vqsm&uYW&OrK964ya zBx0F(xw-xYUj1v+2JLWGdq`KP%EKc68CG?ZS8mZG)$ykXf3#khR=4dl>aE!26q;p6 zZ)?~VZ-~FU;>alzGncB9L~W`aS?^=awJ*diBb&Fb)mkb!DaLMZ0cy8vv;%T8{>Tw#b zC5xi}7=G5_-F+e$1!fY{zZ-lK+G90*y&!|i5XmN5SR=)>kRBbyiF)Uil*bpssuUMd z8h-O~mf}HKt|PTy9XkweA516>dTadDL-fwkA+y;V^V@eON76PN17-`w2;IyN{t|N~ zK|I;5aOaGios>gKKf`)OZ)d1mZzH~`F&qC%#ZbqH>DWZWv8qe^t995Y8}mn<+P8c% zjf%UUTB8ZE z3@r2C;Kpb3AQ2Tb}c=?nxFj=ywCFDp*WkN<{yrC9YwBk^Q~?d(VXjLCo)C% z%>VGTZyQ-jle(7@wRYP+;bMD@R&C9`^Q}=nZIK<7yxqS?rr5#9Y*f#{eeRO zH@Q3jB@(g&3dBezJmitdApcw;7{x(0Sqb*XP(;L(1hL38MH&fSje($oWgbw21tzgA z>>0-TbQqO@g%ElSWHJE&C&1F6rQxQ4dIV@bfHkD$amYAibs!CfT+wJY#AJuyFMYz1}@#Ao1BfzJX7ki)$Qn0P$OY{!aRY{|%2f~)a`(t^s z)pK#3eulQYH-9@SLv{FiyD!WVg*^TM9Tx?-JQ+7tn8GWT0Tinm{-4i{0wc`qRdwGV`4{IhxF;D zbk;SB!6$2=mmw-vcKL>SV4}D97(rWFvX?lQ(Mm z_2lfConKL9NfZmkeKlO`g^@m=wr>fhhG^&EM45a3^N$_U=P}huRa95qDvnc@OZGmQ zz!3F}NE*mL`!(Jt(RZ2EIp_tY6Z6Y5r+2tZy5}6~(jNl$)1<~P%b5?9&aq*6Y}?a@r)or+79KFxEw%CSx#cI}#C z=>C31o7|Y?s;Y9)#F058Z+_K5&FODodqUsEKc62kSIq71{-rK1mv-cRFXO_+1NRP9 zZ#gy{TO<)l{}|dFqdfpeww%3N)aw#G|6PN{o94Ma4QDGONwQk?CSz8=M=QFv-BTrP znCAvo4|eQ+`!)o2fwDA(qkc^Fc6n|rMe23dEzRjDS5AB=_ZQd5y5Ye=UVL!S&FN6J z@(G)p4kdvnToRL_ni2)^rM(UoF+kQcrrQ%vA-QL8HUT>Y($xS@rb3O*YXrI={3{NM z6bcXTIXs{!xPFkaEI@S8$p4!YwKLAu{|tu{O;pBIyYQ1%Ru^A)VshSaqf-(`CG#UG zwhQ^GMw|hfzK9#XgZ8S z>_DKh0FEh?D0~pKTm?16QXOHGmG9E8F_1RiS?UWn9T*GC0X|19hjY)T4vAP;EVz3Y zwu4lk-QK~sD&WE?T!QbwI-yyK9C-vTG^K-D!GcwA8)Rx3Nq>%Wc_heM3&bZFe{lH& z|JIgV4*57%g`I76$nE$UBw13fx*%Ng@WCK^7C@wyM!eD@1Hd*OP#NU!b>oOhLOM}r z2q_^1i@icT!m-T{z9hz|)JX43mw1t7H#qqru+y>Ce74r?*2JUn%kB0L**<|N__pkL zW0YfpY@O$4*&{92`l5%LMy&#{XA(J2d~5n-Z4#hqIdu1#psR7qtw%Ig_pIx`hk`C? zdbCdVM40_&tVQu#Zi}WrJ>oc+~<%mUxVO8MdMMwWs~ zW{k_cJ}zqa&PD_+^_-LO9_7wlOxOP^^r+2YTdX4 z*sTactsf#}Z(y>nLUA2W?uxBF^s2wr%2}|v>9IFgsyDrX@mn_~meR*cbdBUL=dKf|Gvm3pN#tn}UiM1m^pZ4o+k4x#Mw{I0 z^y1#j(G#6U(h=HOm9wSvjmq%5JwBygr;@iUx|_Lw52?DU3p+ml%o*?^-h)way(*M` zFDdJH=wH*9qZdwy$xQP}xrr(_wqCmIIpY!ScDX?GZNtz0$us9JR}Aq#q-YAA`4mmu z65re(`qxwM)#tUSL%Xi|N@ph+u*uXb$LE&BpHn07yZRx7CKa59zsP_FI)U~I#*yA6 zCt5rSC=cLPf`vCXFgvVcM9>f+;OPjrVJP`H>G#@F8EbvbEM%=G4s69T-K zf7|a81y&`^_Vq?jms;2wuHx&72sNcGw&wNn>L*J@$8|RD1Vl)d@^Z$N>i68T|25et zD-oPp?{+xBuCgrXbqKcu|EN7T6AU!bXuwv$<`gy|4&YjdB_^rc0V&NC0|ykCVfvrx z0<1_?10!AF0YheB7L110+>G3CEpZYcZZ1qI^Z*gbRNau4_^^-)3y=~q%vMac{4)Q` zC49zNBqA0O*mVWv1kU36u_C)(lswE^Kny}7u>(+(VIT|j5uZ9@6M;R`uov49mgNj{ zz~3IKGQSwcKc^P^13fY^oLVtNseB8Z4ewZaf8|r9Nwl}vSaLasfpNX96D^5^6h&w> zp4%A1auA>{I<{hPtH8$%d{D&FDkSIvDvup9ph0Fy@H;|)K7eDlAJ8t;)cF*sNkr;d zJeLdg`j6|Ov1WFLsn+l9`P;*I+ht|CvkWKArj=tBR}9AGhxkMef4&x3kyOET|Gm8+ zF7TFkZQ93N<-l+M81jRE=pX;!C;wOfPlWnL6VKNU+2|Q}!$s z3y(-IdhNm_4m8f|e*IWCKT@alDebhqe+rt`jhbD)pvW`vmqrL_)KxTy8e$yMKfFh7 zYkhh)vn2UhY}$2+!v>~$MWa*+rBs7Y?!=^>)j=sFT=h+ ztce4EfRMUbC^LW2J4bV$^zaqiC9FOD4=zg~C&iHs{d`^-=hHvA+l}GW1qLs!&jiu_ zsNQ$HQ8Kko%QoYrXq8JiC&7~j`yLs0Frhw0aSEe3bI?tyPH6OkE34nz)c3=0#X?pa zuv6!bSgGB?G(KA`rAEa0e2h(S^QI=HsT*_ok(v)AY7a<>e@^w!eY$_h;FC|@X>yz| zAhEd;89tL@$F@{kyH%1ar1xe^d^_w}`e9e>+#jPP-3TM%qdxOhuM0i8}pJP4XtUtkIZhExf%+v+b-73GN#ngZ&H5mLXaQII`h z&^kc_1*ArJNlSA>9=&BRQGdahAgtIF^vF$D(OZsS91KXxLKEl!ieTyhDk`9xEnwH7 zlVmCSTS;YjkA2BUUmpoyz;yUJ-5rT?8c5Yz8D9+*j<0-_gu*|E{zI7?4jv&V_9#B_ zgz8$fP-&|kN;s9Zurp^sb@{}RKV}wEO_~*~FD(kMIWb;j%d$shP2LnJtJ%Vo-I-I{$ZXOf_*lJYcfUGll3v3XTVk3OAE5YZqwvAjs?maEJhC{pNv#o%$0Yf<#FV|64QtEwJ$ZeDWU7sm|*&MbqL+B4l z`oj+cNc|%IH33!qIK+336f@viVO5AVjKRHCgRhnfRCaJh+FBC$VdtB`FjP=vX8**= z7;o}EtU5v`{fxIC&{e#FV1ao25ymNSvS8B&vYIfV0QQ)|U<}k~cq0(q3E4^DR~QWI zeR#wO9)I*cY6=BpwOM*W>NQ5D693;Uw zJ`hV~Nky=W%=jgkVUaCEy~Ylcl@^5~*NH`9ptsYC>>1&MN6h4fne`UHI?eGH#~eaB zT{e3IBs>F-qC#&-sSx;JVviduv^iX;@&;uxll$3LQf_O=O*|+Q~Z=PRsotmuwliY{> z=>D-Lc^=PkyjlHd^ejea;cD5_jGj)pCO08;$pynJ+pFtkwCq^adDX8umg(`?yHL!uor)`*iS0hO6^|o)X_gfZ%U?( z^%IV6xqd9VCT#g)nK|XzO7xrJInlnZho#l*4L>Wt;_WSJUW$%fxw5TPs?<1_W7|0y z;NdKio}f2~b>Eg|Fius*Z3P+WeubzrW)~Cnqnj4xq694Da@IsgKK46rE0*c(WJF`KOycYEeZpH*wg0r1 zdQd7QcU1(v{I7kT&(sSom}yi;sV7flUVRZOt@oRodDYgQ!IlS$!dSq91LHp}%r!q6 zF)UBb`$cF6U42O0idzQz&UaUiSGnq@(~iFXJ)(1)&DDivzc|@nbumtf8A`iAg@uw+ zXPdjC?sEj%@#rkrUE3cQ{Huyxeea^N0fkDFlqFMS4)cr^QAQR-CUj>LpM)!RY28>f zICI58YUq1$giM@8Pjyt+9j(nP{qq#gCA~yu&OI|88UnJyL5E+yqpNiuwP&8sdXtel zlRHbP-1B-{i#q4z%d69TvDD$}ELF z;iws`l{M{_nEP?Q8V**_$WP5oloTGjE$X{Z?Y=;LlS`yPk4~ z&5o_h-&1|H8=mUwUW=+%{6u%1(ns7qwb)Fb0^OrUk*YrrB?Hisdu3m{r#o;WS z3c>zk;QchIDD$Jf@e98pZRZZgD49&%W0bk@3T#l;OiUVYD+TYPErkD&q8zcN}O z8EsnW*W7$p-N;rgdvr=+_o2gKd8AVLL0gA$zGf!th+owEkj9e%y(~_QJxhPAgv*5l zyUO7Lg$fTEx)t~*xI{VCdH*Mn`ST+;T|lBfo&#h@iWN9}WUPe7C;@&{#Ly=O$ViJ= zpeO-(4*3E1C7KOM5kR^DnT)~pDdE3gKOPEh2rMBN-woECjR1A98u69|%(zO(h^^Wm zWW+WE>Hyw>a%v?d65)|KkYWvpXno*a!x%3YnokG|gwPpLMze+CLV{3W_`IvXat?YzXJr0L@|`R^%7k zfPo2`2p|MxnYtu)KR8no&$*jnRG_@GR$ENv^52NF5ocBO$T7n&i#sz*g|1zEplAKQ z&2!_aPx$8D#5bf}{1f^2J6}BQy^f{p)2WYc*!mb~SM(LmRW2Aa?ThCuCJ2vh zxR_4~JSk3KPM%)Exesc&7djl}qJ1I7@85fAVEFr1vc`}Z;qto)-!5fap^s~;E5?H{ zf-y1q&~?&!TbJZ&)9e>MU1LC*gs$z;N!-*P#u~g^9;4j3eSE;&2ZcJ$^MWRUWugfh zc%{agpm!hl{6(oU`*u)x`ln*-$(sG!*%++rY8LhM$@jy9Mf)v9_U~QqXDyAZ((;af ze=ee{-ipoC|4M_n1K!Y;ynEAMbDtE^fEcrq7DY`?-<~Y&Z+^(8eeTkr)6rJdYs_4q z|5LV0-YitUX2N@hK8zcn<9_T}uV7KjG_euwV9MU0DCeL~#`T{GH89S}wPTQqk{0Ql zxKMbKPn^e}DiWhT;ILueu?zQ2cHjB!TdeIgli;k6an=WFw2i^p+|zmd$@+RfhDG?x z?x8&*|5>5xhg!OFKDwruU0_(>EM=Q--SawI;ii{$WoX%=y}rkhhSzPwd{Kjg@@~Xe zd*eKwEj`I9$b0hSOw^v3C#L&x^(($Nd(h*%nAqWZ*m8K46Mg>9CsFrZr26ljGSa;| zZ--~a?ZTq&V%-mYbjRpe%@E!W&tL)k&t!Gt;H$Trhqf_RL@Y59b9bu43Uw~5zr?|( zDp2y#M|V|E!n2&p-}T?3Uz6{3M~jl*lP*0ddP08s>f7xMpyheqcC=@g#~dQjA!5Wg zM&rXUBE(K6F?NVCpqPm_VCY1GC^o3r|MNk1pj5z3XP}O`yEk?c_`k~|_1ahI(~I+8 zf-yIY)n}^-Mcu9u&z@mVb|WGh>H-ZyxnR8y9obG~Hhy4t0XG`KT)seBSA^PV470-VL>* zR1D}@o3}`P$~ynm1s>Mu7x#6(lAwXPxA@dx)qL=IM%bpt(qE%Bjic2`=XQTfbuvGa zaVIZ#G*&3s$mNv+?LoTr0^k0tpRyN!2~9r^tVz37EFzT;UWm4NOo6_n>}3}?KNnJP-aNCpbJCd^^cI1 z*MuYkFR-YY02$|75=X2Ptqj@c1J}9zz!44^mOxvk8gRryA`1zJkv`BS@x%n+-olz< z7)nY5HX{Mt+&HazxGWX8)hMMY~`%rG{II4XGDQ(8bankq@jlt1@~%qC8gX-EwpZO6uUJ=vHPr3-fbHI@5K=SZ^(6@50=hL|Zvh zh9gTS-PZfX6{@O6UP$N!>aGbbOk+r=yVr{Fb5%B_yN`HDL{~DWkim4d{JU4vR?q~~ zFLh?lBZ~%_vbaNLq8R2l?$`>o4NA3=^gD)US9%Yfa1va5EY&dFPOou6XT|g$k`Q7N z=OQrlzU{M=<%=A+nq_NrNB>y5|G5usg+AT(_ni_@iY|L^D^Yo*D|q+rtU|BpVCM?P)o(e*WVT(m?x*v%dYrlKSpJar z+LNFK7576g)MLNNu?5F1dir$bhdz6M`P1>P3YLm$Wx`cu;Yyp=tYvjhajx|Ivhtkq zs%4cgvZw7gZKmu-_G_O8_OxDdd{WtR*;1mVz0*^ZGLbvAY~=oBr>74;ed%%Bq-|jj zuNGdcveEJ0pkxi1{ctU~pcl{kir*1_i4%sV=jZGvY;Z$qq=nwld348l=l1J37A}w?Zk>!J)AdVt^PVeP9e|EC}wymI=sC0al84hmjAQ9%Q=51}ilX zLRJvkrIx4h(XVQW^~Elx%y*8Q6NAS@#Tb;cTNV`LSp4e6PfwcO6nib7ARf6A%M`tD z3UfRXNAH!UQ1oj_;Tk0k4_~a)c>Rdu*C6N*p8ot&B8$7*>XLH8w zjz6am80N&+w98 z?|$~wjPI2~7>}7~2ZN4JwMf;-q}<9EFHFF?wqH@@GmeQ)75CgZl6irr=MZb4gIv}5 zK9}ev>1|4`f1TTe!HvEn4Ogg|%8eI0CT(Q3n7Ji&TIV@u`lr1;%?{X~>^qV-=q^}$ zoy$2$i1GPi2i|Md<1Q`oT;4Qsn_X{#u(uubTO~pLctoirAU20tSlJ2TG}vDz3C$}W zqM@^hdh34!u2fje%L=S&sMVqQg)2zNP9ZTBE=`!~ib27~La+h=1qV1gxIsFh!Hz*- z=++=^U+{ZKw^4G4tgO@=aCC8TW2JGHKuZC^M1)Mz$2o(j0?t@g(&b@1a>D^5H*~1klD7fViMl*l){p21O^5LaS{Yw1W>R=l@&wn#UU$$m?3UUjlRs^36Zh9Cj@oHEdT%A4BEXf5vi``5HsxY{riqHZ5T>}gz83Am$ z^X})qzIsg^=wrvKiyPjU`)aaV+`w;b2lkAnxtE;_Z4Wi+9-^nXj9~jEIwWCmyA$@DH58{#C3n zj*enftrSfN3LY;hthkypCM)tA{L&hdsiDtMIx#<2>m?dD%W9J?Re0F`D)PjR$Id?D ze2ntU@v1-cNTT1V{^oo(?+Xch`-uB!GJlYCa?O742)e$hX=}l(i9kY%;WWBB8F#LV z%y{V74}F&s7P6u|C06k~vp zZ>_!?8`-E=Nvy|5kNL0WL4_DeUiK7uAiOO<@h(neS9M}{@?XwntJ62No|P?4*|!~a z%rqSO7{F@6%jf3Bv|e3c{*OT>to&rIb2*h@;oQ0)@7T1Z!_%_3?B|D=WJW^)`o^ z(_5pGTU{QSBe|%rQK#HWYusgEx1oD`;fEW)DkGLLUE@EW@p=AZNDMFGoX6ggw*60N z`t3`}>g|yA5ibU&Ylm3Ex^9Mh&<-TbU*LcLV&L^Iws4(+b<9n%e9dn&Im7IyJrAqO z`6k%jXj`Eq!H8GW+)vI(2P3(*Ri&P5yQcpi zNoN@r1-C`vQMwyxq@<;h?(S|-X@>4lK;V;-77&q=9EOq(N$GA-L6B~d7&`75ulk1p z1fF5eK6~%A-sM+mo;Ib__+Qn^E*{BKQ?9&t$jhsNuDgs1#KowOrP~8<)W3z9cDk?^ zI~+=gj4uRl-QLcI2WEK4cR!Xc!_YJ{oY%Wk!;-{3Tfvn1nmTTCr1K)clsN~*)vK6A zf0N5*;WBh_G~6tm8ZUR zRxiMAZR70ozIM|RhYrJk37|fGJ|t~^n7wC`PzXW(=|rh_BI4EosyJlF4Kt7fadhD9 z(|tdENPVIw%XAm7%SjbI&qO9qB6A6#ZQx!Rm7fKM9`>N&hDL%n0H$V=aFi5q;Ov24 z5Dg{sGdNxU5$wS24`~rVs(65gUw#&>ppna61KfAdX5>22O>{ za`^}H$Fc`sM4uF#bpM?Dpoa&O6|^@qhGB4yAaG5_rwUg?J_ZFVs0wBTFeiXL6i6p3 z1Zyor%z7Z+6(XFK6U0R$f;L~4zHmymRZ1|#kK-L$*eu$x3v`GM#n9KNF&!G}QfEfB zrMnpQZe8;(NmaGC7Rjcypk*=D5-^>cd}?m@-9MispH=+*PguT2M`vExi?3{h=XrK- zj{8Gq$!z2^ag1mT9+msx6K3i{&54ybpsR>#mqeGd()}i$8}5_NlIjSOeA<)t1)F+J z4M*9j@c2IMHchDPTtlW`XP>tzI;IevbiJ-eO}}{PXg#6et=tmdZkm_0%HpJH;_5{` zm&a#6Yf|#>xD!s#O@7t69BCFST9kXjsM??99aR>sQV#PES+t~J`mv(d59vzbJRg1D zi(A5%Wcp#5w#<+JY~ad*=zvBgk0!p6Y_P(V>K=kzVn@a(4Cd8w>+;qS_YzJPZ@z(j zom45(MNh~pEr3bfLyr91IhH1?N6NAOu%jDCN!WP6BQ^Epl+yTdJsbKe@pq@r*gNfB zV2MmszR|P=%|ESXUE2)b*a>bB z{o^cL|F~#p9R>D~5Ab52U)y(evOeO1j zoVE3{$SAw*zr1vuG>HeMv6UhpDHGDW)?XP;RJbX)m*W2pm)?>6?rYNX7mM(r+%Em0 z=?D|?ZWqsiPkc!O>SyZRi;5x9L_A-^hUOD{nRX4^z}I||Wp#&Zxww8`UCu>_gVHC5G2>Wn#6I>D~xTTk;}F*aXozSifQ zslLb^IpOxwv2|p1Aq?SQ;+9azW*ALOKN;AdBP?-ge0=Q&%}=D%p3yTYIKfgcl5=Hz zZqsrzjUhktXH6b&pF5X}rM^dV$BxGTtWfR8J%kDHj_2#n;=OVL?HsHF_^1jhX;ZWD2)K)0pRmn4L3x_ zt>B@>&H_X@)-J4M{+~(-wF|~IE7LQnj+AGY835g(x)2$8P*Y|Mv`87*NzE#NGSO=Q zVp{QlQG+ipUZ)QjX2Gv3%m5z%tr@_oDHgzz!0!LYKi3sOCMXdg!y0IT=m5(TG+YBc z`VdR!eAz&pZVonrt68NYsmpRJBjc2Sg1`Cd=6;z=HthPXFQ4^y9GD>7tvp;~A;(-9 ztdO+F4nH$tv|1j*&x24szCK+)hOWRU_+_oVv>)cpIrC$@UahULUf7rw;p81lipkSf*VHnjhP$G{Okm!j%(nY-0;Wd{G%%Y}5m!9LT$ zimL<7pc3W3wpIpSYJWCWW(U@?_sH$Q4N)PIh0X$spXW;t&s&K0JSW{w{1kL_4;ixv zJ;}XwejP$9+<_YzRQMcov*mf8)$v}6_Nb>L8-0)Tu?{trtLzIkEVMk2IwIXR6P&kx zg2bHTUlub%@(W*dbI9ZKmoTPdOzQ+Tu6cp%l?q{zlLXJR!ds`$znw8lc67>PG0{4i zgCY?@ipK2(0Sks-vxtSki)YTT^c78m$H#Y+YcdkQ?;$$Z`Wo7WhLnX!bY_0&706CF<^-zusfcY3fZ^oY}+mJ1HH?6CO~@@mr$u_Zt^J3sfW zpY;c|q*?sp8`|(pZWl0{CjH@?9=%e4DjfQq^whfwrND$@ESAxa zqK@r;YJwAuZ4va}L{N5>enxLz^~R;wgxD`Uc_!*h4F`^ba>y@Jb6>_!8TN*v5H#Gt zGVIMl^)h2(m8x>Pm#OY0w0j-zhIcpS#s0kJxv1ukf23k-Kq(MXU^TeDRdo|s^>&9= zpts?}V~TYvfx`Xnvx?BWW-CuP4Q&@N9Gn9flBVI~3JtX?GF@BW%$7zWDoqYuNul(2 znxt1yN3YarvWzmbF%S?}%wbod1T7|OfEKVomAH8`tKhE~4>D)sW;i})dvOe!yN8CuD3T(BmMlDFB}f?#W?CAVQE!lf0;mNe)LM_QZF+Kjd{#v&#{%bP6@E z_2#D2lS%%(6AIBKZR6Uojx%tK$qlH^Mi}S6q^am> zzO1xz0?+sH^E@02Rsp4cG?iudHoH`pj+3ybEOLwqd>foJ z4`sFv^d<;Yz9@B^e0w`v@eTGZVU}5_WH#7Xc-uQJ{jt%6gMRCAf&bX9FpyQjA@mu| z^~$KS((^>r(Cgb>i0jo%W8P2FV>g3UzguSP*d3SsDT+Cf&Id|ZfBKi|8KH|{Cc(*C zVy^VTn-IN}RJh=0^bhdFP)rhJq6UC%2<}p9?~-bw%|>Z{Jr+C?2$VqW25KuXCjHz? zdI^t24+A0CxNIdLd|d}{&5^rBGE`ttA0>nV@Nh90!onEA`N;@H1EXRjq!lcvzS4HhV7_2M80*1efi9`5-gE#M=chSr}mE3o_*ZEhj=( z9}j6+l|}wnvp{c-g${dyyp2!I%4@>IfZ=vfgXF|19Bp@%(F`2cNrH0Rve@9V4+Gyj zQ7;gF=?H<GbPh38nq~|5Seltz19=BkJJ7T z^WRpty;9#}MN*cGk!q+oB}8N?HAo_x_m#tD)6eZX)3EObio=eQu(H-XHcC^GG3_su zFutq)IEFgwMAX8tBvtHUVD-3%tornX;xfM=m=bchnmbBvr)q57)fMcsPL7&xUZ3ik z=>P5b=83WsCT&A`S^oAHz`pf@jGtteP)zPC~D}T7F9>0WGaF7qH*ZK=;@)> z^P4*Qn~ZzNRMYttY$;LY9+F{XSU_c?dik(KonA2DjrAF5IKeh!&r%{ZO0(nJJp{Sg zxQ8$S@S|@>oa7(byZWv?le?$lY5nJLp@(ZwbbFNLGuRXIuwE37L!*a}X(qhyq;`{K zZA6@WG#PioNUs*b*DF^Ry-=UEakPtBH_RF?wYK?+>&58@H9J)zi=*?rnCrMS7dY@v zJTSdmh=1N~N53+8BMul|&c#e{_O8p`m&MWv#!^cLRi_CH48;X|MBlL;)RHo9#ZllgH?Ts{^m?GEJucG*AN#y$xneF$GtNx?pBid?a1^F*%(KK=Tmjr7s zeFC3Wy1zc+a&;jMFYWI?wA|949f$1`h|lR-XQmacewo|_cpO}i5N@VG$!Rtk%M2X9 z!Vgl7-7Lfms2T=`rwJpb@faP=BB-jz1K=JoMBc{?QK~jKxfL>SFXrB_a7EK`n@p5dq;W#ZxDvF*&>_ghQV%1{Q+SOlZ+h%}H=q3QlO!=J1nL_k-hgCw)1+j>O_@ z@zeqr-A(mR7d|s`dU+Q0dnol#Wpn1fdX%&K%GaBsaZ&=+Lv=rdQ#!t3{}Az>I{f|P zZia>DLpO%EO8x*Fu7+^R}j~cjEH6i8xG8bA^@_0{ZE*I1iT@KIW$xN zh$0Ev0pP-pA|nNp8Ib$}+>-XlCIAI|LXj@XKfwjq{=G%51%fmZ5GI90sK~+r1_p?R z@pRM;fr~>V=pSO{F)%Ob)PsHl>^Adqz_j|`UpTNHkpn*|5i!VEMy3{^1KuzYOzZ+x zGI&J*e>wpGvmo^%$nkwRm`Z_Y)e;c2fWv`qqr+st0g}7-3uMIE>m&UTq^Xr-Snz!dtn#@M%|^><(4> zUp;6>Tvg*#f4PqR7Oy=G-d(D4SIvxEymaAzQGZ;zs6Ul+_heT)V(~SvAIdu#Vv9~6 zX&DZm7TY$5&Fn~d;cn6H)!D$WRQ^2p9{ymU(l3}LaD2@ybc0*Fek`=!=GrHozMCW` z3%nMFq(Up)i@9Ia3pCvxJhxGb`hX+I3?Ca^CUr=d(@{hQO6n>;{3koga3~AH4 zhZHD^Fe+GppM~zT)hk-TiGUEyRgThdc#oP?>zZK1_!Y*gIVVMBl3Li%<#25=V#+I9 z`Ln5&yoZq7N`E6Rr-)<9C!6*F*cYa5Q=KY2JI(cdN4~2>P1B@OW;%n!Ala_PpTE;y zcJ%Kak5KtatSK_d(=EZ!VX|k}Og&@u7la_RaRQ$RM=JBv&Qx8^5LwkS-b3)u7#>?jd_fRo<{AHu(~tKP z_@g>c?Gg%|Dd0S5^z*Wp8QN_jF&WAVt#JPFiRxCMH^k?oPs}|ee95M36%prKM5jW$UfZcT)k3Q%{-H#`$6y&6p@07Bm~c?TTsnWMg+(I#34 z=T*56(UY-nr{Djt=CVD1Mm?Mr-L za{4RV8T3VSW;kkW4G)Kj13lxrFs6AINyVZ!?yy^ro7Xe-uoRJ4MPKR8+{*ymS9gd< zC?As$j}k;lRpyp^aK7?*fQ$JyeaVPh+?PSP_&dL;4>*V~<3iGqM|i%jAs-$+h_8+s z3S<;}FFm3xSm$_Aa_oOA6%h9&g>aB4Y1@`5R>qhMq*FX!Jn+!WA5CMTG`HK zhvF`+`Ha=PpF~hQy+#5p!3{>x&P}gF| zshxvEq$0Mn>3-TU#}kY7C7XSI*;wcn+7@(hane_EM-D2>q0b#6-iYUpqh94ZW1W}c zwz(3OxlrVy-JxdYP1{crvKdz6Oi8{kx=9^DZ>&DfvFyH=i&Nl-r#2;o&~ny+XWp9GJoPHwejA!Kt5p9s2G>5-Ug?){P3TfR@!VTN0^OaZ z7jsb>+XB?_wMVj{TJ0ptDS`tf3T6Aya6Gg}>8mO~Lxzk?2RhN&e5c#E%QHq$E1dVo(1FuV;!@>#$+ieyp% zcrdCXQ|9MgOmOl8*PBS5A<86R7}7e@032AXHI$JV2;tO#v`0q)IQPj=fU21ZtRY3f z)cj!uMm|W82NrZ7E=Iz6b@fQ`bhX&PU>}G@kcNtqymTlA=o^HG;OjQg#+9M_(l=QHyZblGuvhU{=0hCeUragL7~t?$}0C8 z`b2Q?gT+Pr)Uw|w6FOSe;@+_fHx`4Hr+!O4>+vfI?hUdS# z!6}(|%bEKeUKucm;Tgz+0I+JRnG)duOt$D68DI7$Y`MW>bDSPvWLjAXk24ye#M4~ zx|7QtmgQ2h%Z0OmB#qtym6wKZN0JrOcHceT^4=rK4fw>M(qkLjz zQz4Q^g)>5*xM(jHV$&?fW4K6pJ|#7+=OADrWqa%;@f)#Eg#X6tX)Ul{8=H(0Oj(~+ zGkF0VIjRI>e(5m#=?uE!>jejQ5AjKK?!$v~csyP9+!9ZT>P0BXbY(JIY%iq{d@FdV z{PNm>;zI~U8c|7HMmP;@_QXJIx+kSn*Pk%MhW$yR&gF6@w173LC3p;%ID>`DG+n;X zx-w7oHN8I(zxgO>IQJUIrS}<`hJEi;6@DH%dV#=31IAK|O4@9I_TS@8#MI`_?29>y zh&$UnzYDUx%`4?kgT4o)#QE^Y4-A|PY2T`L)c0ycf=?h~aV9pHEfey6!B{i-Pn19F zp@<9upv`Pi*)pt$@)q^F2>|fFO0S{0jfNwD7bb8-=97ak)VGSrt{nUY8Q=iJ@2u-p z^l~De$ei0*9}E4o7`M@KFVS~CS`d5nkYSgD*)Y6W1kMh$Tr}7qA=UK6H+pWvRV9?~ zgU$;{dg!}&;#32Ee5KL&3~xnLZaVJYk4r`QRJ^32Xpf#pna0Z5qz3D@WYH&&+QGJX zI-*E7Iis0zc(NFs1hc#wN0nvhD0kCOd{JK8COm73>w9UBGCT#+z+M}5==Gb<{$ZeK zN^m4Mi4yBer|mi~eG*dm+=?0rwjj~!Jsc{A)~{y)zjoiU!)7`Ho=S4Oo_Ae3ki3mr%CDJ)oW=Gz1=H7iw(mrc(P4VNo@DS_EfE-@MeZ;U$T*I6&9U0xKmcV`2wRT(wqiG zwk#7(mN@hpjlqIG`s$O!u~JOAQkZZ2tiYk^Zi;xw2l96TBq>akW3z#5Db5<-Mil|Y znixIW(*VqAwD1UlQU(}2X2H>l92bE}6p&c6Z!>BV!qLDHo+OA13I$TmM+(&3RAETf zyCe!wL(RxfsznaF*hTm?Qdk#kISHeY-}Jb&&%rPa-?s}pWQ=5`EH@wvx%6u()GT|Uqc9Sefln&g0h)vysNK`pCnr6yurs{^)|Yr zU+4>cv?#Q0hF?L*<|@8g@<<52vR0i|Cz2rdxo-u4Z^)*9hO?DA+o$D%Mv7u{`nM@Rf%5EcmJ8Yc+1>b3JNI8v=$r~V!JR3CJe!1O}}TS;-7Z) z1@s?1q<*ECIZ{5#bZKp+D}88a^?Vh-^qHZLPkb#6M-5Sz)G5_3o^O2ekevOuc6SVe zeM#crnOk*B#Qn>S_=0N?w*C8c@}ZGV=*oGb^wYS;l-iglCTn_LgE?TBwY2x4QqpgO zH2x`k`*)BDR1dS z!|frMhi31r%2xg~`*Of7%!XlcF{eAT=VV+;jXJw?XBWhy*t-io2WC`NScj%MQ%~`EflahmOBg=1XOD|t?$7{zXTh;1O1U7U_*pXgoGc4t z0pV0Y!94J0YuG#4_>tKoOKZ+tE_KQJ`={eUfyjFgxj&2 zQ{_d$NHBe5RXTnf z$YU0vYMz{iiK*5N(GCFQ=3erg_g%I)#iPJYG>Xng1 zyh-vvh5IU9AZ-0^_qYYbB(K|g%9sxGh#qV*3NzjAIGemPxikAcfz+SY}{z0wq%fyJntdxt9J)J6K$%jn01GxvCex(WYLz#?JeGJQ}e&y&j9_ zn)-IeC^|E^(Zpg9mi1uNQ6I~RL7;WLRg%WaFrNN9}95jv603qG^u8|xdJJEj1! zRZdS|8uDJ<#7&m^AKBVoB9*iujpNVJ?$Ca9k=37$$&q?YRZEvpc2-_j4_D0@N9VU> zukQ^qcB1BUQhfB4C_CL+gB}Np^_RS>9^gLwC?V&@oGmeT=aLz~+Nk_~Js1yoh4wqH zm#EHzByvWq{v#sov`G+M>9oUs;Cb_{S!GYpIoqG><4|t(vZ~MC zJB1X*MAdv*US)T5LWnagal*yeUS4s!6rERSrOzO zAn`k(2?+uy&sj30PU-iAx}YX#by)wLA#Uqb9} z5Hl?#}XPr6hEsd?=;`JTE^Wi-tG27`qm0evqSFolr ziHX3)5AtJmhxfzZYOyTq;0IaOu_x@W?ff|{6iiev%fF#t8QRMuSzNZwlAX%^6 z@E(Lc>yUJwPRoxDJSHE+>6EN-6d4|?Vm{g2(hqCtY{txo3*PX}q1BB%6Q0UaB?-y- zQEKS^PD1cy=$LF_53};*k5|A~rT#Ya`(No*l5bO=rlty082fjZc)pxfzQ4`rpzErB z5H;1wpBvF;{moGSTMfG^8MFM5SR`rhJjr|qZb6#G4~?^ZAm*mL!?`i2P+MXSN{{B_Aq-^t%tF!gE_ zNU@y7U-3UH!$q47dal*z*wJ0|RF$2dd?o||8mSo%mh$ud#i(H7sWBo&|N zD8e#ei(;?hxft0K#bs%;(55Pddq@HnXCx#6&w$SiChL@MlFymkP)1UO?PMh2nWKf7EZmZN*~jAE zYg4ZT+WF%20`)GsAN*`_&Y>SFt_0Xrm@DawCPVqpnRkk94!@eet=B(kUS=x%tsqQ? z7_Z{=?qfY(`%-Czn4S#+8KToU9-Cs&)slpIF(A)PceWbbjWpoZ^XRcf(L2>LHNIo3 zjiO8ye{|fV8?-D9t#vl;i@Sx2muWMPa>l`)6n@o! z`V3~TYV$te)p?@(eX1DS1uq7YCyW+kiq6hux>5@XmO4ec)DO@ z&gn&Dl{KdKpOuT_Rdj(4NO#JICF#o>BD-`^gXwlDur{S#-bv`|-T}Mb ze%;f^gGA5KK#6&0E79c5`Ty*+UovJTwmIK~rd9E*{pjdD=(sqzb>80lHnhFEljGH! zvpcgQM1Nx7CFO15O_$DNbR;nD$q;2^7xQB3kw$a?J7Br0GZpUSkS7c+Ty(1XN*9YP z_{fDwN$xzR6kteDn54;#Y02YP zMhz(*EAG3#HsUtf5%bN9b(6sFR~0`w|&R3v>@4C_4mj=e!2}0L#KzhaYjA?H*q_Dxyv0eLPWNJ{oP4IJ4WxZc!!zW6! zlsO(A)-oRW0^_|zm9AgBNL|0o>M)T%V}7ud2ZOKE)DkuIDiTpWv!lC&qNCkI5X`6% z*=%euCY009TMW5z6MAkYx%xyA;nfMy$edH$ZJmcJF;c~FNAvc^T)vy$*FrW<|OP#`hI=5##6{vAd^);cPdwGsQIi<9!{eymz zMgx}LC)e|Q{;TZ&=9;K5%GaI?8e6W=HM-g-Jmns#5pWoJptaO5sPI~Mrs8nK$<<|` zTQup-!y8v!(_gIRb(D?GmO5Knlp)!dmt@j1cPxK%gqF-}DCRZ7&=IAcM1K=kapzoF zvu}KoUn zNwzzG(9EunDcB`M9O+sMhe%{j8%XLcDN@*(XUtFd^&vi)C2uS}U}>4r5Jq=0A=&q~ zd>tBhX*K%FpQg&6!D!xrI=>1?tC>W5Z938ttT>%Sx!0qkbCg-suO3Ep1ZCa2-H_pB zjk49-a}v6*szqzPIyf}{7VKk5@^@!FRdTGrw&?HJo$kex3^A7G+MR(Hbt+q}(Sk98 z(YylR>8=fJ#ZIq3ZJs=(oF3EGcx>AU#8MoFzN$3j&eTqpYT-ihDqQs#M62#S&p0;} zz-UZ5I;9WuG1wBS;Gj~^a(iG>-KEqxEMgu?Zj%M4NT zc8QDoVrEK0XxYMB2CWgP+{_)RBJJ*9bbpR=!~@=C^p&uLCmxz-RXfXn4&YziJbK9~ z$cBSe$X;Vzzx_(w9AE-hEfxGl-&x-|B5u}5vucBaa3%47ydeKZG4fLG%M^M=bH#>@ zj_|i%4?AP4tL`#!ts5!w5w<9Q1kB{^;fDNFi}rAkwNpi;G*`eDI%0JX@dVLyrI9VW zyvlE;6|lZP%`?9;+&VmM{6v)LFfmGF7foq#kolGJTU~OdkUa(KF5PU%6VlN)=4fyB zzh=(Z_v#K%JQP1WH1{gh1nvk8d_3M6O_Ma)iW+NZt*($>0e}w}K7_xOwWdmYF_6>b zOWR!5RW4S>``YkKTmPNK^d*7JxTB&Eh?e$$YyGRO_N?MnUudGSxp{*>2HAKAvwJRW zyzNd@ZpiG$-Uz~bmEv({<+BRkEQ%sa3k7-OACh{!ZTZC&YA{zkpV$Ul5^Nvo`=|9t{^qsvODQyBu?5C?|l<8P=5TPe&&rcxK5wW8e z^Uo|a=%~PNF+uFvuh(T?Reda!v(?!#sH-}H#u^i4cG^WE?Gyv-R6Qf3WRh#pud!L) z{HfTd9hqz!ty>ICD&PS->t5^n;fx(A=H{IbBp+9rGlv4bp2pePVk{oVcko03msJzD9rVnhTGgBBmUel&A;ClIm!r&KN(+A#0}rkaa%mHd+g>%E zOj{-S^fY%r3Ei`_Nh6x9u)?`8HWwGP%Qa?_jMq>$_g%$g$bON!?SwyirM&c&cUF%8 z%_NjRD>l)xv7WMk^#M9{q~nM*ET4vo zU6*7O)%)MrnFVY&K~5odtSN|Rw11^|K@FqPh>(NRNo z>g-{QH~*S+WQ5QrKsIR@kbq&~cc+4cqo^3yg0LcDu6F&GQ^JE7Kbz0yc?9>CW4c~M z|Ad#<@XgWBZiFqISGqRm)UUmZafl4~G1Nm?t&V5PHAzPg3{+Ct}=%8Q4w2l{Yx0g5S;jn~OVk^$wv*_66H1h3yWu;m?!r4qe$ zs?@=7<%~$`Uw}68|9P$NPV?m(KXXHqq^ng5`ieW;{dVhNcGR&!>TXhv_U-Hpyw zr9(WR)$jgm#X0ICCt`6a-w~u9k+pMczuC2J=VX&MYiPdOqV=PCFNESoDR#Rb_qQT@ zA~&DAeDWYT156kFx`c5H`IFP^7O6ID%waF)nK4<)^ZaHsejEn!_W%p_tD&r4zXrOM~!N}HdY^Nz7t}OC}DSc;vB3` zM8Z4F>n6+;n_|82x$?#wt;r{RV&p6@lvod4Dg>HD$I}u>N_FE>wvRheDCQ6#3 z>@iPafP(VPtMWln>hxs3aN_k!EI%;oiI zR;j~KN9Rd-x-+8#*u{$$T2}-AIWf@pC^A1@)gUOY6(3H`avp8Pn5}ek<1w?Hru$+T zdZB#jydbt@GrqA!`^jj@*LE(R7s@a^jb=MnoeA^}@YET6G(i;>O$$CV=*wzZ7bnyD zQZ%Ksv3XNerNVhmOIyO~dGYCh%p!HOq)gnI^KX9}e$MdR?$MrCc=rK1@Rv%XpL@*O zhDsoP=tvWX)WBz2XPnklQ4yLiQdaQa&C52vQ$!s7Nf9Km0kQe#(B%9c63_hLf_u7d zLEAg|Mio~LgGn<;fL~&H9nmJf_f=$hS4O)7y-`YHU#nxKYEAHeFTI$sY=<^D- z->$6>W{i{q=(yyrY$i6@nNd3GC991BqF~NV^$9zb2PM%-tUmZLXZ_-<)lVtrkGRf_ z{fN!EJeMB|RSdPqkZ4_U1UHuM-PVux5v<(a_%(dJ%GGY8*IiOF7XeiiEvMwG@hgc!Y0#L*`jg4K#eLNzYe z1J{+~Q+4LpCNGr%vXx`YD&@qrQTgBNUfN_a(!~|-r=et;la)6|#Oj;osS~4N?U$oL zqL)YGmA(b{kc9^KyK|sG`6kq6bFpBQKIKd8Nit-UGO8*UQvBHe+Nk297BLtQ(tT1J zAs&_@FZ$->QXItGcKj{znKOu+$^8)-R1C}@Jz3V_egH-!@lf=nKHdzj%vK|P@J zImMjO0~Z28Jee6hpfN%sY`{O@F#vaNBz70eVHVg|sz@65{vnZvKa;2fWgoDCFv zAWc;YN6(7~_lkJH2&<6g0GLC@SQi5#A$g>XDNhar1+l>-0Vt$^$3hN< z9Dk6>%<7y1@X`NsO=UjZLfN;O@pO3sXKaQ9Y;wOt@y&adqtmmcY{PZ-_rs107?elt zXZz!QwR>LeRN5b}zgH+Kh!wgrppE2wR@`QqPDlB5W>W3WfIBMr$63h5^}M7TPHpYZ zT<^{N$@e%k!?8>(o*3(RT)*_v5~KX7%8I*LGIL7=P67%%yVGzYJd-BC%nzZlM!Bp{ zE;#A9-B32HcCnuK1Nxs^5R@2Oqvy4&3~u8b#(y8B0^wNULndiYAB!cW3=B8Xdn%Cm zGh52$t7^Z0d|DgwUcqwCeYr&C$h5Ce+wC!`+wd{p60H00)^o|H;$I9qo;@LdG7VEa zR5X$B<}}I3QIBd#vDWyygLNRA>pkPp6plGX%v3ki`+*zwJ}dLhr={GPr{63^Ao=AU zVcU;i#p1ZVW+-GD^~te0WD4l$-$IU+y4Yxa@ zg^gv1msEK+-rPgf=_5>9Q(9t53@9nQe;7t;+E6D_-ndW|)xX#2ewvIW)pT^U4^>69 zdE`*+?l}bG9%SRd#Nsb0D(@lF+5RZ`@~@KZm;$|;-B4n_a(Tm>qvn;G9js41tSZzPe-K&x^&FEv6>rAt66mwzR;&?^4(ks1ND7# zCC#{7{mwmPQ}SJb&ul|Drw@wSV?F7NbD_C=$b6<{mE_T3V(7O&ugiFulPbR!CZ#9v zxV)m;y7_e6M$)(2;vdb(+Z9|jLfnG_r`0T@?4%F+l}j<=*`|MlQ9&6KQ8G*exze51 zb$@SC-R>pICgB-s<1IMuUieEo8hN=OSBNE9~MET6eiIQGIKIPiYq< zcd3mSXsS3}gh)bVhF6;4w@FQ2AnQox)BWtXlWg&->0pHX z5n127>EHuR3zP6#vv6I`Y@cLqp`fI(3|Nr?2S`&C8r^psic{e^eSZpGTMC-# zmHAZAg5gl=v|lc(GU^hUhRR-kmEPHVRvq+#w9+a&%EhJ(2D8PF=P{cX*O=FqzPfbK zxwTJbKdMp;$eiZz4o}<>YPCL|ei%(sv`xPI)!CV}=$q8Y3+JVIP(jcn zSw=DA$us59sP`Tk(9Ng%nXa}0V$D&8iVugo?jNL^`&pnh$>>S^QCY(X!hNMK{z)}) z)75=V%!9ekTJ9z>DBDNNhwMDwjoelE{2T{e;2!eH5MQ#NEZ1LKLmeLQi?xogI#zY< z<;FmPLPuz(S%1|$f41yuI^~io-4owu?9_ywXXmA2ZsUn^N0uMdn`%;a=V3{Ml%Awh z&JJf9w0($XMDDgjWCyA1AFfHadkE`hZ*;aB`X9)T$i9j=eh~ksVCNs{=vp#0M)f00 zoW`Z#99ARp^-rzW+)>|rJR?!*=NCB2*C!TNO*1M|keebf)*Y_p=gw_lCN^ySF{ZCj)i3CqiiN989c^IT1btG8a?IwIA zNEY<`rF5hONilT&7e$*W_j*Fy6%a*B*pHhWT`Zr{ z@h4n=(O@42uZV#8{6OZQ@vs)ubhusWPKx66hQIEK-Ao6!oST8nX^0#Dg{YDX1BwM?Bp?b9$bTbb)+acSG*xgc9wLED9W--y&!Fd~h;gkJZ%%Dm2ipBWLyKWFT4(Fz7&@sx}A#r2(E5az|!zq;dBD z`4tmlu{h))gAj>BMg;*pAbtlpR)D0~Qzl+P36?T}^eLh`QVWq01JmMTwo(HWK?nlyJfK+vWE9|WJW=E} zAb>|B<8{&qPcf;mkVamx9RZL%WG+XTVOXibDLx*!Qv7JTgt2D62*R=l3T7<}h-owg zx7zg$Ok(&*ymvx#`n&0`t2sL(l?2Lb+S{@ZmNtcnqC0KmYq0*!MU_saOa_0Nu)EnY zM1{($kT!Q>jxIOc$qm%__8a?R!Nd#SjmcSdSLVOh53Y65WmkrMT)7zs{>RZ-Mn&0n zQJ4nl?(S}s?nb&(VCY6lLQ=XxLZox(PU-HF20=kuM7nvun{V-pcxGlTW}b7ObN0UW zeh|Ayvw+c3*PB@*W;)d3eI`yvI(cI2-f05K>AdU0ny)1_=_&H8F&z^;>&|D230TnE z`kMF2!!&X6^yt<@P7v`0e4H#er~9~nuU+`3hSa*5WLlVf^F;UA{olQg$TUWRPOOtmzjDt%5za6($i&zTx( z{~nBAdaK!90B820ei{#5=jZDpokE7UH3}^b^w!F+ey7Tbs)X{iVBnMpADi63^AnGk z89iL6>Mb4&1~GoNT{E_A8OTE8%z|UN%menc_iPUUoqYB#mRCUWq9~~W^SezWzp?#&DMa)U05}sgc)ci2_Rp5*J zylt#z98nD81uQvLRzq3EbI!IBgjZ#+K?%xBBc!dbjeC5fslK;iIL z97}=x>0RM~Wy%j`Un`KNDSeukXkld2LUx8Z%^bRF1dwM0vbkH6%r@=ajXRamW|H%8 zpOB&gouKgw*Gq zqmhT@qOHF|_l^MMfg!5Pq*1SAC6uO=U;^`o;8skz{@0m&rpnz}pjw&C#pU4e8`d+}Uq6VVRw9Kjw~MF0KsVJA znyj2a&MFXX2^`aBEq)Q+`P?8AS`yB_3UGXy2v@xTV>b zGL#nnYMLDYN+BHr)3xHtQmN$Zgh3623`V*_lfx(6=e+vDCV~%t#fEf-WzXa|hNFx0 zti-LqNw_xCR5JzLllFYJ*t{gLStQoINlZNO*DF)pui4xdfquVTS{lMEC%y}A-M9t; z&lLA{&Gt6`!C;5~rao%@!hH^jr`G*pqINv=y$Q{OtTz~&6gSdvvpEg~i&XVw;P%$> zIcU-%FHD>^tDq3BpRteX%6zLg1M*WN{@~@^EyH1*(1v~542Y172y6rr?%UBh?4~2EPHYPIU z?rc_%Cqr)M9d7>$t=ul~`8<5!O9+_{67h9)QBwT4y=vAxU`<{fYF^tg+76eI`&-!9l%h$;IY7p{I0O1A|x6B-CoEnFOV1^d~}Ci zuA%tKkIR^oa zlsPm4%;-Vz9}ei$fnNh@&H77d_sf-F+i#dJ1p&uvP+;Dl$7h9n1il46BM#y-*bf+8l`Ey8Fe7$0V z$3TXg410ug>ocW3lYrDm_1e+ZKGrg8G))6WOKy))@6o;dCKcM>#SJuc2$jjnQuVew z51Bj!s7se&{vz+m4k}CGWxN_QBg zWZSw8%&Hh|JHoXM(tB*5l0z1ljK8lFL0k)7XHnsNMW3Kl2-p7h4Zfb&8n7ZD?Z0hX zLJce-E=0;@$GfR0A*c7ypm05zg6T(pizMyFJam(4hd?sLW3X>h8NA@S2}MzHe2o^R&M60W@1 zN)ISr59{dVZYyq#6-!oLVRh-5hPS?LNfei>drwBQwbWl?YF`~c*`s;BaGHQfWR&b_ z{6XKOiu(;03n(~g22ZxbE2JFQ4D@~dRM%#B?NcnA_d zC_E5pBSvZ(m0F@BGB1jZk<(E8NjeqJ@7Gl-pO2&;@DP(Jl!s>!8!K-fve!CT@0?E8 zR_!5w^D8Ji_f|yIk`FiPUlF{+je6(t#KQRH+XWeLmnSGp2ZGZs9BNipDLZy;!-{I4 zH2OxKMaV7cvn?^YDpF4A6gK{e;)X73XZLV@WV+k>@CVP|zce8q)dhOl-!NsT>JQ9Z z`#LTK5kJ13zNS<@N*yPR%J+!rY1%2-BtC4-rJUKrS9j!|@I~ezgD^RqEC+7vKYASJ zR6dH`7Pz|mbDtXtyssn?8TGe?YvsJS-`x^C?6kiP!%~g+gylasFZNx*@-PdmdG5Gv z`=EOD=f^u}L;|rzip8gJGUa+IruNDq@6+r=`GfQyh9|#yOxoI-Q^y^dhO<#m8y|dw zj5pCAr5(pqo928yn1w`bDeCpkBrI1>z4S=zQ=# zkvrSOwPZtpje!n~ktxtpDOn_ays4&>-#nz(7#)`)xAj9)CPl4vnzx&L549G5Oib2B zg1+pbn~Uq+HzB_T88RjD5fc{i#<18MwX!xefAtwO zu3{C=JR!?&-?!g8k=x=KOXP@rygbo0Fg5yn{vmfsaJ2wgeebXHOb+voL{Qd9W$D+l z4;+J(3VVK^_Yu?Q`FV`X#m?RJcudQ}1Mrvr)mXNKdOTZA7WyXs{ZP%9A7Fp$<@BOSz71j-f*o?Lb5xL%!g8*QKe+&b%0`GG-YT)r29yh23GxC4%00w$QOKmP5v=E z%bbn*Vm^JTL&&L!{TrP=w1llFkkpT1up4?o@wEYOj1Ns^ij0QPGYH$;GK>a@7y0S^ zn&Cb?RldFlZrkr!tiwP@npT*A70hYVh9EA)qB2x*B+ioJA*5 zd70K`FhEYcAt-U8HIzY$7`Xx)%vyE`FWIa?YsVWPXU7m+{=`nMVYim|Yvex|YH$-M zoSdZvg(PxOiX2RPUo>N~fSLB3aINi0{L|>aA;tN3ei+UL^#vLl6wsl>3%fv1ms|998yRITuvx} zs16W3@EWWvAak;yw~#!B#WF-ki~oi30jyN0G&q{7pby2q1aV~-a_kF0S$CzWM)~rx zKynWt{Q$YS#vOQmAY}tMh!-TW4cK3UqL)>00e0PJ{NTbq@GAg%2g-O*Qz=6kLm7eY zjx}-!!6+)psNkABNqn!-&jgK2Hzcr3!y_aG=}IhPF>)cm#~D48wpYl!Y+jA+O>=g8 zVEb+U^^FqR;HFs}dWHHK@}tC3{bT&J$s41CT8{;K>?DM|AxaA&NuSO3tEJY-;l!wp zyx*3g(=g*|>Gq8Y4~d%%HEP>uKY2&pD-^~grY>~YybSSMRz;4eN<(>-eMK?CVQ@#) zo{lhx*IBWKSwpPe0-7QGEE(>u9r70*DY&2LxeM6oC;CcT753Gj z+wx=M++H}sI609t{Ul5^iSRqld=6y`N|$Q-k=f)O!RbZwl6%p5lPDJwcs``G z&%62}i*g{#u%UMt5QJiJTXZx08jC4r1DwSQ;7OY&zUb+0U?n^IBxwr+SVwnhPJU54JNBvQ9CV#B) zs+5-qHBGdt=McV#FfdA_%peyUJ5geB;ERj>rx6ola0rHBU3qX@8Kr8f);)CZq zdLD}jR^ib*AKYv0d?`*rnR_``h|y z(bbZK{15mK`%rRN#mV>4>AlE90GGJ%14 z*OAS@=7np2s$XDOEF>QLN#`5RPbK2{R7^F6F8|^j4-gQ^h2MiKDtvIfaKhUlFO{Rc zb7dan=kEH3E#OB&V}BqM&?A`$-*qT_rTi%QRB<)^4%F8jHQ&mB_dAP=nsU(X=4C@% zkD`o{xS*v@fbu(e1V(AJ%E#kJHkyX-2FDZC9y@(UX(OgxZ)d|si;o7cqN*#xl6chp z^_SScYwO8u7evC9hid@lBbX>f2+qt>Th!?roMU4e6sHUA7f5;k z(Yb^mu(Zfyq#Dh!DV;xs7gabyi+Nw0F{XMH=m+XaD&X@<`u8;@$?iTM7BUCMNxWTV zIW1K#EdBS}`DzT10e$0Pmc@`zhK;tjc}A%+^C#OP6if^!yeE;ScqSz_p)KDBd=fIh zbvlvb5!B6!4}O>5&5&t{M5Iv#@+QqLmmm)fa^sUHL{nLcgJeSi3&Ur+MAP^+jEVkn zL%VJGd8_n&)xEAK?p4KaJqs0ixe%(lK{-q&)4deatIK z696`C*Rg7M=E@ayLSW5{jD^-l7ja%oxf|KZKPE5PefvpkwwPUlDb5?J)@x zOJGDSeM_^OS;f(@{AVjeVeDJKXds8)Yg@hgo>xEF#xX2F$!B~vQ@%XPbj}kb5~OK1 zg5m#8=2LjO`ZIe;3V(TeyD|iO2cXwr)E8Zn#V-d%=+S~C`OLdZKJl9LQLQ6YDKnO%kb*n)3ypye z>!Xn7y#*(Ac#d%5K1anZ(ViDjs0f?nVbg+K%?*{DqQ;=u*OPN)u8j{?gt2EmI#R~$4~XrL*CKLUd2 z2qfTk0<{GJ^oW2K^wM_Gyp$pk!Gurp!temU4lE(AN$n$esds}*GjaE;rHB@er(s4BmRud=4ghA zj(SCPZrmbUMB(z*J(B?u8>*ta-?R&4_v;xq_wY-D*>nzYLNpu zLRA+2v4sJLV$5-?=3*7h%ZEz7WM8upS*OS&GXw2vx#QD12bcGPhagGMbs~%M;T;H3 ztnlp)%JeYdcD#?#0dkoP?+}idc8hBT?ksBMV@+--)@oL zNkfN^W9%`)PlN`4l9dIK=1frz3uSePZ#WdB&fR>}^R&mz;;VZO&8qwlh8}Z4PW^jm zPITX1R@Jxe)a;)gs>Hl&Ieou%KO@r%6r*e7!?%syQXKI8^@eOY-TUM-m0glmCK;jm z((A6Y!avNBwdBGlaej-=XZpL0LM^(C6~~{bfVf ziM5U^J+}C1IyuNDJY5Y_h^tqW-cQ`u_fQEGfDcMi?q6RB(|Eexhl_ez=xRfEI)ZeK zCpS98xvxrxjJ+kp=y4Ex@;GYaN$94S=d16pZ<+FRluj-MW9kWuw#s>L&y*4jDK!*v zVDUNHrrymRbYq_}WDjXjG1{6srTqDF3&M<49d8qhMe01MLntN5B5L031k6(Kl|@LJ z^5pqtt&>3w@3ipy=07TBN$SfSF$(cyr?`!O>^gqm2&p{s?)y%c+_BR|k^rWVWn`nI zE3YGwC*u6$&yt}@ixSLPmh&d}{qS7!LgntjD^UEFgb91ntSUW?|a8(lhWH%uQ6 zXbnAzcbL0f@w`2)FJ(+=Ss2h-d~2$rE7_<`q(!y0naTGkv#d3|`j_f`5l-0!Wq;e9 z$jCb?;k(K~vG>MfMuwSzB^=Rb1H*fi6X2<5SSQd`s9Eg7I&&x4|$ zV|DL1>@17dZ20_{c}#sbG;vK1n3DySXod8r z7f*J2%*@^~J#>XvV%*&~DX3dB~A`Z6z4(js}?a^Z7ZVATTpy1mF|E2wm zy&%VhWlz8NStA#Ew&7N5Lx|(1U<)c=D^W zpw;m@7#`T}Vf9ohn0ifcF;~e=>aFLh_f*@^vEy!hwE}ni)Rsy+jqvCXNqK$~0e9Ta zZG@RoamHu(IY24%X({_y7a9ett2-ks&-)k3lczZ(Ym@t}(vCVydo^k{FJP7@=2|M^ zLp5NO{JP(|UnDfVRJ7be(i>yg6P}VP$XoG81-VL4I>||9YP~8MQC~!LWQelh`onSV z7Zz{5j;1gFDlkd$bo#DMU5uk&N!Ja-e0LQ-NPhN^d}nx^vOcuOQ9S)C#9Fgl@~@+q zUi%02L{W3U_yNU=*%49%T@p<9QxkzddqI`1{}L-kZ#eAcr*>7*Q(&r(5KvFWNAkwb zJFrkc$ZyWM3de6|qzEx`%bt`+q-O7IEOVC1OPI+m`}Ldr*f3%B)f}VoOk8X8dk|5- z`aeyow|2prcic?GK#@LJMlmSk#H?G?mt5rdc(v!>JD`3)wd<*NC0-K!qBxIF-LCP9 z9LvMhkOW;?09C{#P*ukxqs!l<8i@o!HG=NQ;}3IncaEJtu2SbG3mMmZe@$dOU5qSP z*V859HF<>aKSKO;sICNWC%!rwn&kd1gR6He-eq%X4dniAEJM1FtjU&`l{->dCTS?+ z=R+b)%uP^ka=(kNmuxZ>?s}(+PX)YmH0te;r-OJ@pb3^D%H(2%<^p@|OYkUYn?OiC z7HF^{31o*rP@jAVEXZKd#gGIF9xyl*gBwC{mlJ2kjX|(0MwF!iJR(*kFm41_8!$(s z7V6*vT`|iM0>G63=FkyRVP+P}EcF8JBCzv>k0h5tOM;61lEIQ3jtHVfPH)Mh!TCG*tJQ)A4AKm3|J`hI z;y%I6w$r8GUaGfQgujiNoU4>+7ULU&Zpu3D6Wbr{CqZZ_o3n?w;{Bn^&@EGRRo=*x70UJ zm2XfMUi9zaG*IcW$ep@u}+phX`u_=OSFD%NQIa2lysp$KQNtmypNXL|%9-`Wk zy5~4E0kbftffpo;q{_{^bsR-M}8Z znMH5%bFz--++{@QwxdcYtnLM^3!&6XVoVrWxdoZx)_yb09QrH~+|T{{IV4f~u+!1P zPZ8t`n(~u}Ovr~q1#x6bqyqN%|G{KX3!Umxr2VlpnAah}Aa>2dvT##$r?+DN{crj zhcdfY%Eoz73SS<)wU#CHkdXawuO@c6NW(M3a_~{Z@q=w)Y|7}rsZfbX z+Bnw7EVjZq7Z=;lgi^E{aCj)`_VmS-Htv0$B=susqeWAwFHn z1JNk)1og$b1fJ`In6gpRQIqvp7CGhe8MhzWlRK-~C}HPEg4PPlW6td;QeLwY*~nip zD4UleUXH9e1g$EKT+>vCAoUFmoX*VzcA0MCf;;=7t0GP z`Spq0n)K}GfBFW5Nmnve>=>4~QvD@!jt!Vw;RTG@c(;3kd^21bksK;Y~m5Bf}8ae`UbO0rI36z&;fZ~tB zQ^>~HOv?t*(HahAhb5-Q`QtE%ln(ofyI$I7UdaxyiZx9N57W|8e)JI!0|$u%Z_!t% z6lI7jc`si6mxh5;Rox|bFA_H!?sYED$fdn3jM#kX>hh2@K-9He3M#?&C0odjhM@uFZ)P1vsYtMZ14UTC zBI$4X*n4_;l0O5dQfVIFS3M3N2TeXh9<6S*<*YB!=1sQ~_T(~g`_Y;wox~dam+Wh) z9+eN5xy_W=uMbf--V_gYvb(Rfy<4u#?OB`+#NRMlkz*LF8()6Ur{JPPh#Kj-?sqCd z8TfbEnS5!9$4n{U%y*I`O}yb(gj>d28cB@NyUkpB)k zF==l*-0-F(Kdb(61IDUouJ&|%#F{XyMLolgb0bE-mbtY4gLxIU@*m8j>%+1h&(zB0 z?JopIC6Pv+jioObz6*5$Z3v-wY-ts;XCPh=DpWi;gCVU#2? z2Vu+guL4u$Y`xS<79sR~2)Oddupu4~dh9Nqze^q!lj;+mr-~4jgJI>V1O>*gtXx#9 z@=&h6RM+SXnkoKhYLcPHRu{af3Gnd(o@TM+#6Z4oEZVL_Mz|x9;hpWMmO)rjb8~xg zP5n7^RYZLvI04Qr#f@a0UOgw9AU*{79w`wAs9uf^h>3imZh%pzI|!VF3pK2GF~=BI zMBDtoxW4FhxeMtDE7G$1ZzW3vXMfrz|#owgP^w;fUV|B9S5UPAl3mt1|e$TJVLxKB-YrB!);dregmAr zNTE95ED@G^rk_aDlw>68wCVYl;ubAAX2h$;rZci{E?IPR8IGCgw!yECk@^p!+Yhhd zp{Cb2Tw=%Hd>6^!N|Ds zQ=%kCqis96j)~(~kb^7X!f+xR*V)@(UdGj7Rdi&F9WP(b0=XDL=c1&d7BMR~M5)P< zokoV@$#ctNLq!cP_|334)gMwX2(Qm*C#~W#+LK$cPKMB5v6*d*XGCQM+)S&TO8?l)xIKYG^ZHL z4jVB=f&F~fIp2xlA{mpqE_vV; zKlW0$8E>Tfq04Y%Weiit_c2uFYRaf*ONZ6qR7HN}o!>CP$IU@3vG%Bl$sf&~It93y0dfBD5+Q1}EDUD7uqeA>0>O(hZ54c$&> zbBiR#6joM}#VSFJKM|)er13wHcA&?2(&IBI{q)xQf48xdMI7JpEzsWwUr(_wIK8_vU_#pFlFm3^do8lp?$`QvkqfBTdp41aw&0y2MY{d>5ec(3wBH;6OKdib^XA09oAWG=tSN5{je8^Q!F zy(kuw{*tKEm|qJWCqo~KFPPbjxt(R1E!rNI_D7VjM6f6*Q|ByN;t0AjOrl7{Xq4_N zZZ_N0-XG5hyUKNUCH#Hx)x)dUQxNaES!-X-Gu|rnbN-BzndSX?&wN*+Y&X-6d^;r+zg(gz zik->1_9Q2*qK+2J#2PnSUFr_lUT)stUI^ArPGDPv0XVFr`Id{aBuCq7*x z*!&oZr1pCJ_Vm_@vko?pU>2uH-pdP@=G$)gyVuxXOcT<)NjRHPk9>|5iwbA6mMhupqspXM$My$@u5Lm|CpKqp)joo@Vrp3=FOaxGF|riN_4 zjB5VxeV&2^-})qNlAYaN+(A%cjCAxtE-#DNj~`QC)n*7YHCt3nukXL<`J0(!%S>7- z_OeeaZ0xlK?Ub1c2O-@$oS&7XY7mNDG@UpxYeuKAxHE zCn%`=UUu0BQ}t7FX3R>?%xRu>w4NyzBst17-D^!LF&$Z@3Z7a%w{3i;3GFW%?$=O9 zdr1v^w<5&~2C(Ej02@zMVm}c1{Yrzi&=S;QQXqyc1Z_D`=}}Ij^W&bbYCF2Kk>)`wV zK$#?EebLqq!7u3azJPr}#Se#{6#{W8QF~yE2|`scNqN zP0x_X;B6Q=6!*-=b_~xv;jC0gsce7sK39#mnA=u@7}}QfPi!(Pt(elpm%FB_lIps! zTpX>9$G4V|UOQ@=D~CGZI$!&PRR1f|L-bETmB;r4f2tuLgk@C3^lWEO$7_Fu_rzMb zkXJgu*{sBH`I9qG`SDa!JFzC%WPL4vx!&eJaYF}ALa$9QagrzQgj|NIS%d$H(^4RK zGXMU|TJUvUw4^hH;l0i*Drcd|Yqz8K;r<$AV7KVPfG9&SycXOi!B0Z;L)s&0p3gQ# z?TR4HgKy_Z{BhQ4eUy^GDOC5P*_Hgqbs94AM2jixAftc9EgB=D2~~{Lb|$;L0NxVYFa5pjp=2y^3y(JCf1r*ViN-XSpGmD&*0WSvRa>$jq7UkEluS zBaX11zz8WMUd5DrZkF^RggKk>YbfHrZ27~dFO}r!-coc!AeM?;s}5f$!M|vd9-Dy3 zZ_;v01_JEs=z&lU{tUdEqO1g+|K_t+JB!`;sDf?E)I|F|Q6lSUtko0zs!P zfwqjMq!*bRZBqJNaxo9dz5`oS$D_n(JY0lu!{k@R)n``=qqt=mrf}yUg{%j2YvG23 za`%DA?bUQ9h6-RHWKay!MC?NEzdkeG7F053X6VYr*iV1o;GBT@3tJhrE8KNHe7>?S zI(mG3A&_n#y-}@Ut9n>&S3kq<$Z(w}tL#Jaqlg3@3NO?C4n<)4uK#X$5}Uo$!8EF{T}Nzh7>C~<4RyF@>GSgfZETex>|JN^&mwZaj>^ibN&RbVv5rMOBC zJFjKXuK42e(C@2`7AM17uN{oH!dA(=V=i$87nNpM*R@5B?SKB=%vAeH38Y)I&nY%z z$aZgMIvACQG`>|;A}xvM#4xBxugENi{}0APo4|Bq8t>MwLENpN?OoQ?ZjJviMqV)c zxaz(P*@WAs)j4eZMK+d&$+!KTTCwB49zws2oCPag7zL+TS8U30wwal=6Wjaa@`KZ7 zl3!Z};yzkFs5~8Ephc8=I{vtIIP;~(w)6w*_4AVb$)F#Nu%{5s?{y|s+XUX@lEY)F zkOr<>mpE8@k5Pu3+uC;?ziY*wd~)Q6NeuPu<_6%33}&X;VoU4%d?Kvt@^mX3*S=Bl zF0MZ|_*dI!n1ggxT{y6tlLf8Pix1-E7OJB+9Ez|6)~{~TQSllJDBAawj+Jmnmu223VDSVk&2Sr>@Ui_JvbA?K5gIX4d*6uISg z$hXtOF;HR74DrDJ`+b1&329TS6&nV)!%^z`?Lljs_4g)j|$P;)!$@qzj7?5h|it z0QMgxRkHqN1`Z{G(t!&R!E;1`P_X|8%YcFm5(B~k*3!+cSQQQfh^l}^2ZXwWfJO8F zn{f77RrM|B>pke*=^0sVAOxzEIcb4SOK8fu^4BpVwM>l;`p9ySuHT}ssYLZ`!8n$8 z#ni&m?|qf2QBjc!tqA8hy)ZRU0}|f;vh zhZ)zetpOny9=>lfE}JE?mJF^=0s3Dn6M?x^6xJ8%E#`cg^^$C6F?8>bpHm~D)~=yC zRP+<-Z1H73!}*txD|=4jw0y2|PlI2kD!htb5XF4nA*Xa|>%~2s)Up5_SOc%Ckm5lb z$p>bM(qQA*^Qmf0&BjXFV79NTc{a)QWANs7uVT^LZ~O8w=0n%L=cS(FCFRE9c*QS? zZ%j1hF30$jP;)rBJ#-10go~{c-h31<#3q~W}@=5VnG(+A4D=Iplm#wMIt|R3-9g%5rowoj8J!>nek4L+3AQ zJ2zF9`M9Cd!pL({RE*Hbv@=ai>e~tqY)v(qA^0dLE>k7H+;^N3kdD7Ae*`jMn&c6h=Pu>p;bE$%EXY#rs*@W?54=v*M%1x0K z5&GN7BFr7~ca6|^vXId<475U#gvX0`5wxbVF$dm**yOJ)^eq{2qZ<5r7k&Ux#2<43 z;&@c~Hr4lkWFmcpNIcDYG{hXz2^`$uq``D5W4hJX{s&WKH}Tr>hSi-lp5xK694TJr zP7Au@S8H%VzPeVF?~%tNUOpo+A3RF!?~YsMOn-4&9t#ddc73N;lme^{wqV< zd|$m6pV-u+Hr!@eV1a$20+AZ=LBm6ga@?gzc*?7KM_RX7qL!S)5$7oViA)(o8J~8W zICwh51W7Z5h7FEl2=)LhYF6rueV)xCF%yWfq%N!Dwj3?+g+T-f%XxT z$B86GnVD7pc%j_0>!OB}k#Gwo(SWTr6M}|4$C;0&`?1vYYll}V-}P*1vEf4UG&f`L zX9U_=F%{4gkF=#&IR5-?u%eWm?2s}|6~81Q5`)`Y;LX1%N<#8ZTzXv*AA}i5GviwG zdSE0RB_+l9TEK9`ted4NZB(D9O=Fts@F`whM)Qm#Zidu!)z3EG?S!Z#$9HDR``?|I z;c1@TA5nsB*^bsIe&{l5-iTDa=~>qGyB^z}G2amt4Pe+O0>^NzDcQ0`DF@Oi2X>@} zdC(a+aBbf@=Bd8FTONAGT3*&$sbg_x_uxUMXAuc|V#^R0y}vZ;S*GCHu_8sx){N(& zw}xn5#yN*P=##xEy`9mwzV(?WoL{3(eWmqbUI`~^AwmB3w)Slvxp0q4foI;ohlgP0 zC@zWUS7fYpyAGS(mNrYS+wT$~t(pj2Uk2FHwVOWN)iRkrdGBX%QSCU7!gCLU5r+}#Knv6_?1--4HPmj<1(XMr>!09PbU554;&bFuhM6PW**B|vMjUn* zK|EOykqA*B-~v4e0k%WB>t(InW1_^nn)&|MuoL7*$zK%esx&kKD(Pjf3F6AZbW{MI z8`%<;Nyx2{JMJf+uFbR4RLg*Wl!XPeZgtw zYU%#um`Conbl>r(lVIUwKUcBVFbt=Lne$aVUO;kK%;jdc;L4@zgy$B3*gsbqd?$}D z;JeSW(ryTnnDR+W|0=QKT>${@e$WfGl5Lerwvl)SUU>sN@&UGDtL^{fQ_@?YQ4gkS0wk6X=xCpCBepNVkB3l&YR;#>7)lFcHsN@8AV zh{*|7P{v|nNO9Xy2_W<#QwQsWlBgqS^$SJ*>*}NDI94Dm)Z$M(pj@rdAE`;L^T~^N zwsMUtjLji=(CHR^=kwVsFx<#2heJ zZ$xM1l{}I<{bzY3i=I>wEqY22F84ycL7EFc#{0~l?;Q||T$oXV|40=^`a8LGwEmnU zFjd_Ro)qu@uw>)&oF*;-7f=u|U%`hwfuBgHc#&l$L<&2RQMtUVH)O(GO z-~8KrM=x+e*XH6*Hy#G}%4P!{{?8jWNeR_%dlC{A;t2xw!0dzt3YJKrLi+lUy22{m zt((dxRMB@%4aW8s+4gkL&C~BHVZ3yNJ6!vF?)A3y5>-j!0{CnyY5Qm2a^Qz95PjMX zeNP~jzE7D(UVmLx$vtY?w61Y7H_)zzZX_cSPgdgy0|&|CKN#r8V=XM+++Sl@ z>6~RW-@;6bEspy41Ud5C+kLa!B=4!r3O^nTz-(@)2hqezrYyFG8VqOt`VS^5&waB2 zrSV`Gd=Pn3q%-|XO;dk;gkoS3bSqiZQkJEr>Kbg)oZ-u`T3Xv<-+7F14(#KTN4`Bw zeW%#%AtFOL#pfFGNBpWB=h%$uppp~{!^(Ij_aDp!RaSaJh|&g5Pr$P9f|cO;@AXD2 zJ!9XpZ6etevSbe^{~Oi3+oX^o*UwceaDx%@8~+NMCWL=YKp`8caw7hP3RByHPA+o035F%{ao2x%llT2DKYW|Hsxkd{jfHVrK{iU0l#HLk8Bpqc z+|st`-c?vrU|0Hyt~7l2yFSLQwl*QFp0k5oMOwT)ZPOxqIAV6V9Epu{FhOp|Q1=SZIXy?$HIMmxgGK_>A*=$FuYxkfMX(xJb*n!A-$JhM1SMPf64IX=ns zvq`rJBEwDHJyzCl*wejv?gu|M3*OvRj)(||94{8#w!2U_#~iH=;uS{`jSI`{2eOIz zin+Ym*m&N-};iIQF0*THJ9to5al~JWiHtz&vtc!plmG7qN z-qAl%@?UM}h{5C33dGT+cm%=yS9Uk-)=to=$}r!b>1L2KlE1~2tD6var+h#6Id^lo zc_j7TtZlW{?O#SLUO9Wsm#9zzjqJMhtmB2T8j0JPf3@*uDq~fg?)wVmMHVgjm^?8a z*Ie%?<^&{gKXQY`BJoQssuLJMl7W#UG&(<4R~AFlu!1z||A-+$*P$8AF&}eEj?Eu& z;V?fU{eErz?V{vt+?ncRxy`#HQ*;*1X8C-#jBpJ(`ODUtSnHY)Xy$RemG5OYmlPTo zGp^t!=Lp?l)g@!40dzzt@hqJbo)ozz+I`?+0WJ{8VLp@>3oe#tKJnx)>_G>PyKEkN zjpkS6RZt!$B2mZk784y}#p!-^XQ#((eWCrk_ny=^98PQN-}3_3LZ|w+4#jJh+>px#?wV$%y3#D433o05H+Rr;pN&rg2sxm|rx^lQ&kxYXcPEqbeF=i?&_ z8Asds_$bd^N@wC}ebocRumGf>0agFgY|yh{`Je7m6{z!W5`Wljm{DO|UbCOKJ{dcf zd%&GMmfWd(d?Bw!#b#(bJRGjrbX-3HX94 zohf#MD5#%o46SD1#h}eibO|WauVKtv0S{jG)vxC)3wc}mF*YL5N}?`RyvVM>Ndo*& zC_{ksnui~@SD-y`tl@E%tRj^6EjA$}oIKBgI7^WjNjpuHl-3s@9B2P%I#%sNwyI9GJ}eom8gOqZO=EcFC3st|&6A@d56Oz@ zf_g6iVxAmWY@!@O{?E2vKzW%RG=gdVOU#A4mPI>of8?1A=~x{>|piy1<$bTl_wSh(i1WMIX7| zm)9)j(lKc-i#SYXux7|lazN^c5z3IAD=vR*V7AaETHWuaePl_Hw|C01gtWI>d;<3H zPGPl8>t#QJ-EuS!oVYjhKab>}j)}5eOl^?h+t%`{SRknlvwW2Oh3Q>%TiX#)(!@3q zwIU0ID6hc2+$eo7xT((a6-+jqD$FLq;rynVLS|wr+Hu;sYlP(MKRH4r~%-RSjMJ+$h(7E5^U=0}o_v(|yuU?;iMWp5EuQh$4~7KTo0*Ev}c<(us!? zkAT`EqL*pJcy%~G@Ju(POPst9S15XaF`~8Z#fLb5rJ-5BO^n%BOB`DkW+yWQ&_vh6Ryy5uE`Dley}sq_VqRmw*4 z7L|6p{Y;i>&QTDEDDJf|Jb7Dq@DZz;8PFnOSnaE>BW0Y() z(|Knu{+4JXUggY7GjL(I=B@~@eeq9OfiQ*@Un#jLRcBH0_gjgK3NFNNP5HKoU%&TB zwq`~fjbKhilMp#Lw-E^<&!pD4AH7!}y`H`1S9_bn9px*t7w#aKKj2Mfz4wSFF9ec< z`mR5~)LkElmfrhce&>%~+?nM44@#GL?DYej>K*ghA*)m;4Mwg&(E$`N>^v;O|M>KH zH>~(F%DeNUL^?a>+oC!t@EHdaE@BlEE@~;mqG?G1<=JA}05bVgVGE9$l@Lc$!Is^q zyM_N&eX@||{8V=v&wc<-2Zh7AeMV?aU9W26{c;F5d6u;yZH~wKd-cDyaS|zAo+&Ya z@bF)>j09H!qZZ`NQpCAF)>wgzv2e7aOS{U zqbpxWKaEa={wH!JW=cAvO%a*EOnwJ5K*bMQ8pR4R-r#V%it{D2<9|>ro(8DTmWCyV zMjXSIr9Q4>14^UMiKD~n#&auBuqI}1=;=*xS%IFb#SItr0>SC9Z(vHnpXmp`x_gIv zrPb$q`qTsdEH(OtNk93j_(6B&c5<+9U0 zBqg;8I8FmDY^zR#Kvj?zkOR;fT4vrRF?%_3tz8VE65QU+C#!vS6F{%`oJRfngSG>0 zrPzPDy!$5Hejyf#hLQZZFXIr3h<(_7>Du%IIdUdKva>X3$mn+KzE*`>G?k1cW!t8K z6!|RkpmXAsOzRom_NzoIDc|PLXpg~a>@FA@)Nq6o3cF-`r9~OgAD{Nv__ksA9O81O zd^!(H7a~&gA3($!U1em~kDUXIO`TeYAXxa}s$Wgw>GkmNP)XZVTphBXSlQf%S70?t z$Ga=sHNh>*Y*<3ZR00t07`SKZX-aQ8KcaW-?f?4c*`0Ej2a46@i$G@j$hoCKW)R$a z$=Uw~lfT?wfmJ$`^T9VA?t_n#bKzsOa4xWVKVhL8BPV=4hulVs%&9`<#f`ezB*yK6 zClQ`T42A3KEcSm&ha$l3lHkV6n72x^Ng+aH`j z6@QsDSY@uRUwH7WJ2rb}z;6 zzeNV|=lD-t5}#sR0q|cHfc_K%upil4%OW{IR~A(baN%=fZ0UqKg=hvQTe}T2M961q=yL* zKY>s-pvM&YA~F5-QQfVNc8twoh@KqjOb7i-${$?U#bDDr+e_p*(e;(BwA2#BXYyFa zSau$%QJ18Fg9fqp3#rNYS?e-&Qw>lDXXsgqfqdKtod#C>>L>{X|Vc4W_`sgsa`fF)B%fFIzQt3i@P3y}<-o$}`bN z65W}>g}f0D$4?wAsmFI*3NAR3dI56yN4%3&W+Cj3d#P8Yte61j)d@{6vw+!}NrVa# zANj_aK>I@L@i9C*_$XCbhayJjl7Fx5hZ}98Mlsss8a?>D)2e>o5gV<039fYh(r@9H zm5G!brIRWJcb+bd*X$~fh}lLP5vk5|rC|VDbt=rtWC$&>`On0X?WLPYhGk#WRt*_C zrineK@mx~R;;tYR?_vUYxK>brAP1R2a<-Ql6cJ;P`Z*IIe^DP64z3K}|tKpO;1FTH`0x?*qaWpj!czcZ4lLD1!E5L5DXI=ZWoqP)AKR zFN;=7cvVD(47m8;_pa0wYX%QTi{z%ow_-Az!aGks?E8oI#t@tjrx$CKNl>X|phjM* zipNV4+{8wM><|N8p{Dn3$n#Dy;NLV(Q;oI+(J=^7`;+++r+uCT#Ea${sUg2o%u}i zD!Z#PezRoHoWw{fQ-gZZ*`>CI{RqCYzpmRf-WCL= zr!j62rif~ZF7TRLj}q;$P<*(HG?ONe&Gl+!v=}B+5#mnxFPUWWotFg=8&63lgt8V7 z|;qGF8z@2U%yrLE!3-p?@n$g)cvS=2g5eEjfnVgOE1^)XkScO zYT}Y4`rk>BeCbalBJN!v81O(x&gG>M)FyTT^_NMFC+89zQE+Le0^OV1oBSF4(}e$n za?m2W5qj9p%=}3jL7W~QomtB|5iR~>8YI^R&#iAgGs{}*cJn_dEIlss5(qXx@*GwN z{mBd)oJHIS%;38)W&q_(_MU8h?!-X-t5im3s{LzpA=okdJPIo;6 zg+ECzIXbe@rRqsgLDUt@Z{DpxBakIJMN4f z#+b_?2n{_EJ6hj92YjC%wJ`1u;CmDi$!R%johx-{9(>bABYqB5pRrqXOWl)HmS)G* zQicJpyKvcvixNOj@PD861ONsZu0_enob4e2BM>r*+yS9j4b8tnh|8%+_bIe+uK0V( z%W&8MTJrZev_BFhe9H0-Utgx?Buru|wqY=@cwM-0eKfq>_eBV;xIt?Op$so#4B=xi z7Grx`M}{otoiAf`jUe?WK@DqN6xi)I6n5&M{EM1Sg&4wsrp9g%-f5t z4A6jt0E_JeU~l{%R1d7d4i>QvpOnV=U_iJ{SF%s`bMBH$B0##tx$AV1KbxZlbSTzJnL3}(9 z9N~%IWfp2gx@uzGi7~+@)wKSRcWiCLk)JnH#DWYXKV4?H`f=`%LDBm8MnPNjyrPV!gS1#zp;QB6h|IAQWvufD7m~UR|)>nfH!Y(`os&n5%89>M0wMz3? zC*9L^b~So_clr>tu2;PW_Q2M_-k6twa}5 ztjfg~=}yZNW+4e(n3%jJA0GwdZ)l9C>6|Wv=5h}=e@_ZrobWh1y~jZD{>E5Jke>0$ z8##^9GmUd)xn$T#sIGsx_K*^2A}fl-Wv3Dwn#G<6{+LY2PIaGH<)0`RR%7Z$XyP5v zTc_PW(lGT3zuCoYmUKNL^0EP|kd2XEXK=1Q2Jov9Uz=sG2&^3x&8bHk&9Dy!0ZpSnNec>lf8p%WXxQJ!q zYb|wIBhz9TI?p-e5Cpe?a0Fqzn#ZX+vu~{kpDBPUDqQY)shAinT&DOmov7qu8f_(8 z=5$N(46~B;1)?QgcSR~nXeabPg9|_)4ozK)-Hd+)Z5&LFO=_n>q>9Q{9{ml_#Qw`` zhya0#h%&V~uA=_JjP!si#IfU?u3`*Nv(F79bXV~#)YFv<$uF9;*;7}U>w9{-TQRLw zef<&NNuCYonDg$WKX|!)o>GJ8{eQ{HLOvilhj!lUiJE=(ksRxsLSb>qqxW^ZUB)&{ zb-7p-A@D(m)d=7~6cf1{V~Lrc%3nw=FZ=8+_UZygOR_KbwLby-T0ra4#H@-al!^If zi-!r0`uksw^gqiKPyxpWXmDx(Xn{@(ki-C#`#oTa<^y6XNqFkhPhBI)_rvkooXm2b zVy?l0OTK3`MpLfBtQWrVLmL{0xO)9qYbB_mi4g9cTTsi%Uake?*@mk0cG0oik;+9_ zl)72KX_VIoHc7}iSbRW+LfOO8NH?DO$jYJ@`mmV6)qw;A#T%4eRq&LKrD2As+`Aj> zmykrU3{N|@M8M}!9-kk&XL!beXT@5QY0ZzMa<-e|gnS0M%{`JqV^JGR$CFd>)*k{bV z!wj-53xx0g74m%8bWIy4ufb{f)Uj9J>^=mp_@fm?()cryCp|HDR zZH#Blzh1|nzE3x%Gk0?VQpbGHh3!q>6^KHxwXM~g6V?`Vop-JlYbMF;;S$}A)#(ua;N!D+8~KTwL5FZqJ0OsF zqxCLz6BA~-z_J|!;}lC`BqH>WAoFny*NF`fXXR2ByPJg+=7LAQh*Uh!^e7@|K1+C- z_}Rovu^o$n-h&ompM z|E#S^+AKNaKN6^{KP4nbzBO&hUU*Wglq%j2!{YE(0K5sJ5!v1W17#Bc@hr}&N9RCT ziJzh*yDWGPp57*lS2vts4;g})_QD;~aoSU_VA4YqhaOQCS{&F5a99VCWL3zy&=4Da zzAvN@KK*t|M!d;KWB;?$`%?Tfsd|9y)nhH?7#nN-PyKdU&gVqV_n@W1&0`aym{Fr; z))ERip>HwcXCFMC^eA5`quw<>+Gg5X#C0PCYSJ~~v5CHAygg+#8SeWpkP*ao(>7DD zuQ7!T8lLQJ`6`CFnGh$;9?kn4N2@i`h!hLz%7d5}DSPg;bw<7>HS_~q8|YTMl?mO) zBt6;6JC>tkmHoF@qQ5Xf~2y9FPMJNMi)-f8OBU|-cN%MjXwfT8Nr%z3!7`mP`Ne?TfWF-7!L2l+E{RF&=HWt zY|6swW;Wq)__P8e?}gIj>T2|$^ukuBJg4ik=;@vos=~4$ZfmU&kL0BIQ%!AT(+T5n zeJz7A!aN0Tgefjdlc&H#{DrJE7abnshsWB9OwQt`UNND{8)_yi#S12^xAGQd9zkam z2%NRNc{ejlcFrw8^r^FVD;L;|-TT))h__D1UX2}?SEV&-J}>az(*H-J#4p$j4?dGi z+ZxJHpX5hyKotrz*#{e2qL2;0-)k)m`XftK$^J>52rKC17L>dN*%}xR3lMf>KU4@d z<~*8nt!CKs*EO8xyZf8aHh(FA2X2lzQtzfav{K^O{!XPjW%ICC!TIWovBRch>+8)L zPA+d8C6v6{1$s{4g={1nb-w962i-(4TAVsiX^S6JCb1EBOfx4^*w6Q!ZoOe%-_E!^ zYQ#&dLnFRZB?hhbwB;V`_XH>oe<4sfol|uSvGA&sD^vM4Jv#qhJt-p0dG52=Xf|ya zpmGl58scuSZau}C_}9sqb!l~>;OoJF4Pz97@5%HsYn`xUrN6TmO}JSfH0^YOkVD5aS+(XVX!Ol@C0P$%1G!-$c>s@PlnYH%K_6fN z6ayXP;>2+OcYd&Uo9@D$Jh&NA)E`Irr4GBFRj5)3Z1*9Xr(F76*;vqgp5rEK@>=oN zH3jTIejcW=Z8sH4X+)szNGUVt!q?@Daqjuin>z+osqclluEai7mPywo+{=SYoChzj zD8-Oizf9Q!Yx!h6^%yty8)GBNV&*S0HfkpqwKkF8aZXj{G3=_SS0SeDx;rHn5eTc% zYV9pnB9=a5{2rvjaLMbD8fsRN?0K2Q#aPCb{buT~C0c-IZzVLev5KFK0OJ0Az8)H? zff{k4^~j`unS#F4?Plu}qDIivhPY7c((zoiOje?v@GJ43|3Lv!)&{?vf4-wS@#|^& zmrx=6hO@|MH}BO(pjyx#B+>G0!%b9xnL7nHTwA{sl>qckgSU1w3YiRKeM&&wZuXOn zG9n^OkB(4--lE`+-ddI)odRt|e9#d*Fiuf^|C^SE1iUd93r`0@uFF2MD@$_YHwfA- zEy`XvvLvj>oLTPYaPDWV&qpSjyBK7Xf$`rhzV%vmCT0exth^g|<7LfP)DZ-CGN`oP z9`@$&S`A=MmuX`_S@ifatn4iM8Hxt3$LX-V6x1P%1SkOtzG^H>IHX!G=PN?YpLdTx z3Ds|`svoZzKu;xJEBAg6=Ln}lW2qc+DHRFxJvpbrVV;tQFhl8yg-~y$zDwC7v$1Qe ze)IidBAE7x+$d6@@8=#NcY#rL9~t}p`&rGKn}jSBwl@p|o*4dDYuR=)VKKy>8-2Al z*UVDuX^UjS?;;SHyfEbC@+9c_j!V1XUA|5lqD6e!Veu+P;woL3r%Ky7Npe!A5fDcz z3!S(N0a`$Z+u-JVo)9OK%GJPT(rv9HCOEuqI9yco^mM6Dfb-PGMKkfc2^^v6hI$t8l|5$GtessHRtL(dJ5fdX3Q3{xIqu^hTGevL-RwkwG=5#6%DeHKzn|bMYZ2P-vmb+~RvC~lDnj|=Td|Ag+)M2f z(;yrd=6>Bau%+>y(D7OA8)Ln~O~&iA4jO^8~18)|M>$S0xikWUV%w z==?(;K_^rlUyTYd3ReK-6}qm79!!2QQPt(^*x96qa?|OLG@IZrU=l7|1JlyZd(xkL z<`-hxfRPDCJaKU*_r#$zf>!YLTOntaTqR*5ZKLTI1cn%rP#%kaAyqNuZ&PPDA@Eh&PUF+Nk()`N?Zv)NQ7%mPyFm4S z0>D@^X9VM%C+R3gh5+lWp_gG6#6pE+c_9DtM|xzo~17I~(!r#m~i zlrfC40x-$WGy>JTY1)dM#XrVbnC#eD{T=7`4!3!MJG31hn;SO`_0f&Yzo795{a)2V zUDoc|jzR3R8!O&i=r51XE$+QG@_S~cPfeGOQ?o|7gnv&yRovFxjL=P;uyQMM z1(VHYCfSQX>h)aDQrV?sWX9H(oEOK5u|00_EUgj!hWIO!J%r}Z#RUDlszcVC(vj@~ z6xNai7i1hKtbXpBdDae%if?BTnyx)Fz!fNdT9x#RS>`3)-)%Ej&y=v`RW-`+e#8#`}U*t z)p6;5`T2UH#oR5sa;}b?9sK-basPlv%~#j=H=UPIH)T16z@5zVu+gY&qiM)!_>hmJ zav%I$ORHFF962@vzLYO+A)i4s4z?N*C;dw`zkz2JAX$TT0K+ZQP;IQmL zsR2Hvc!9|K+Ucyu%Ow$-UmZa4=ry8#zDvz9QdN3jD;9VKm{VL` zx~I_Xts6w85FLHW=xkcigIp)~$C{-MH_^zxs8~|`2Mx5LaBepjm94qbTF~V3dXUOu z1(#iTzK9B%_yI)%Pn+VWKMbmq_*j8Ps66jy1p}|bI z9{05IUDmCG7{iS;w7x*xVKasOaBuCx#F@Dd-9_@o$QT=2mPnJP*iJxKzu!Xq$e43b z(`0joDlpc-ed8(AxG?C5PE(Cp~y89fTJ(jfW7vbh)InpA@<*1$c~q z;^CSyl4o+CZ~G5Kl<`C|1Pt2>n9@Bp%usn4p5vh(*i&i)T=usCrUC-%MxR}5UF6`q zae3UYRm`)w+J5JlVV&MM(tJBc{_Q`LjDi&wn<3yDZOe4kMIND<)hagg;DF#_yUa^1 znAEr+-(t~Sq+Slc!w`%G#BYV4pkV!CpvpVk3>R}Rf?btRs}wH1KkVA4s!F@XdyS(A z=elb3aq(u1kUQvTG(1972(y>yY}TKC(4-4`v07!o2?q<`DN#z@ILP}tTA9%x50?kR zKo8@MuRZ-L8y@`neRgmZaT?dTvHZt*$`b{h_N>jn>n=c2UM){Zm>KxGI?*)6WUHQ3 z`x4KsW9$v|72~@ctZz?D1_%Bw96Uvz*tA-RoA$!WMgwq~Mg}Y+ewj&Bu}bEtdhpSP zAIyCx8iqe3C-q~k$&ku^z81uUnRz=8!T)=!bTbb~@S4qQ5@D?FHr{Terfm(z1mVwl z3ZJl|l85eQ?b_BRzqS8v8Z&iGUMF9iU(+OU(%Gf|NhZ~3)B(ZK7&Len9o#f(Xtoi6 zap2>g9-jSR`$avw0-a`Mai?B^VGSB<{3s{U{zc(8zqyg2gJ{u=JW=1$&fab%$PSgT zsBmxSBQZKk%;<2s{>m^c`M@@gNCBgJt2FDkQoYuEJD*Km|HDi;GocQ zQk9?w-CgbWX>cm$v|ds|G+Szy@TI;^RO5a(08 ziDeU@urh>eip%#FJ#hCZ=`QAs3pIz-FfT9rkvl7Q?h7d|AD$9mZzy?reqg75=mFe|(eFWJtzPhYgS-nB;$>0C z-EaZVft9GG!LcM+@{W|Ky4Ay(I|qp+FRD@4yBMNMQIVn=M>OkxF-NPe%+vm=+X-2V zwBH?BsY4FLIYz33pB{}H+&3Fp1t$xNMG*z!|H?bE>KI9E{Z5glaboZBdUriJDQ}3V z!UVimq+4-9_6SOGoS`i7_d^v3k7ahU!aIpW4?TGnJSnseQ0Rrp1wDGYMac@|KsX67 zKqI6D3M=R=ExT7t)7JMc0t?}b6F`~2Gx#4=s3%8lRPso8+N$*ELjPmEZtA{I?PlUm zZ%XRc))~f^ZiiVZD@dK5^Nefu-A8AjP~cICfyZT;5W!N4aK}uFJinNVB&xg7!Nf)m zQLC|xqGClx#Uzsqi3SonH-EPoJ9B1a0W3rwZ4f*uMPo3v+@DZF4R)&6 zheG1HX&=?%x1uYgxCn}czZTvV*O$8|9L=REl?Y1;kyjeqM{mZv%fzsq0&jn#UMh?1Xy-AUJ_csdI_I{ACP|7`O^u2|9VmOrH>&N?rD4#? z0IwO1(z3bJb@_~YIkj67y_@1~MY1ul*P$$?W{;tQ_fV%o!fcjcCX#ool64S z%_C&+TF{iy)9d_v&SW33r}NxA?0VsQX*UU<$EJN7u1ZS|;8>G$(ek6n&i&)wW(?al zq4`HLX%J;A$nLCWw<0{By2*mp5^FUXUthiw-p5p4)UFdY@6Vi%Z2(GloT%82>^@&|Zs%HG5T1!%J!?R_&IOD!$br7pj`ip*+JD^MO*eC0BLnQqhe2+Uz#I#d zP7#r5))1~p6K5nxtOEPka`2hGDw`WfZgA;6aka`m?9JeW<$Bno@CgoqD{MYN~O<{>AB{b>f@5O6W>&S>ObQ3630tmx8vk=B29X81JM^4Alu9S%W-e#aR9lI&PG^(A?yMzY z(wm!QNIgDxYFK-#fH(Gtr*n(b`b&O+p)qfzq#IKB-H%ifhrNdi5qbTqVY8H$Ib-)f zB6g7gPhAUO_DO(0EtYRvkheepL==Ca69isYrcK*tB821hO3NPE)>Td2&znl($UT>- zV8NE-VtuqqLTIhhTYF1P>?N`VR&A}aOpqirHOL)`Ojc( zvS8R0DALAlO(i!kFAP5ciR=_EhX}F{z78Z;q}s z8|}%c4&7jfYV@g?yJz2*d++Bb$PB8UEM6`(b{YBC^Zs|6&9>dfnQ>+EbJ zUEvF6AS4IUF)_%}buu=#jhs2R;!x_^)M!3Voynq-zP|^>OIVDaSjaeTgRJZC#SL<` zFhLBSZM;N-VoW&KOYKD|*r1vfrBD2$lTuAczz)D2o$VaJW-9)eg&yb5;VmCO5 zBP64jIm}|ACn0BXi>7Skhw}u3?x~9$s!Fje$=h=E=={|B$O(5Vl{Elp`~hTA ze1Wj)e|V=)#dx2%wTYvofQSkg20(>W1vo9>GQg%PCBpb0hyos0D;(e&0}M!BcSQ4a zYuFm~Ut#D^6}m{=d%A(b?PpXh{$U9`Stk0pIKk-l?sP@xsi+VdA;yg72q@m8nc>4k8V9yG+S9^tn}CA(J>1HD27{w3&^kfcZb^>tKtN z>pjZX-8LfElA_q?HBd4!57fMEI9OWNXvxpUq?AlpzGI#aCB| zC|lp&v$pN#h}*br`um2dlv57=u^3r6E6wfoKh_*a8{&|txkG^arnNNHM_A+j&m)s0k+miVJR3PQ2t01I^O*ADNebj8(IcUPo4$qT6K9P}c zhJN#*DEt#OnO}&YGelk&^0-gCDg&uN{F$5^%1K{8QLqHr`Q;}hUKfCsU3~?V+;Kkby}!tZ7dhH2(L? zL49E6W$96$U|t}F2DZbLhmxzVv3jC9YUFeiJCmr+aY=L%+t_6tdE%rKA!=?_lzE&( zP(;yg-KL?q=hN_dnoB%6BAwoT!>c;FfQQC9S5pLWfQkCM-j%+wwU36e(iA;D?6elR@*hw$30^-OM#8c`+?Hzr7wC zw9lRSS#QPS6X|B6V$ZcInp#0|t>`#O3V?Urce%gc_!J$kD)4J)RvL3ZHL z_8T>Ogiamp00XM%9Ja?{EenV!9ztWZMRFg<)&HQfC@thDxQK*h!OEV=-=lU{g#=lT zL=I!xJp|8M3`0n_;i40!THt|W(th@!dXl3wa*;pjoaxhkU>15j%?!I4Q$1P&1eQ(6 zigRBg7IBXj-d$Wv7=G7TtHzK8wCZtlbo*IPvXEK4yIXTOW%+C-AQ1@aAt=% zS6_V5Wrm(Aonn8d^$Y1tCUb1mU#RCA%B zt%`khW{WBh6vLjK)7H>_7* zgI5ffZC$5k;mzxDQ+bGm+9T5nWXnJ7c9yF@k1UEYk`Y#QPNTv8Py<-%WFREa)Eroe z2hPsf)Af7F_$v$X6S){KOS_$_=qB6YqSY4KG4rQO9gz56@uPQY2{yy;d`7E2A)*|9 z-)NOkJ7ALKs{M(U_IrP9N+HjFP5j){y17_QnAUou%lFqS0*t&n_H{iV>M&-s>qKO$ z#h6GJpQSWJ1mXchi~DJcoRPY+On!7lok&7rD0ND00X_FGPVVRNwZlsBVb8M24Eo4z zv+Zn)FKeQ>wv*Xcn~?nKhD zvxCl~KFo8+3un5vMvG@P%uMars#f0hxA`^w)V-fH^VuiZbtm=BsOKtnE46Qm1;GKL?`UrCe5Df6a%&#OG zLX%O24uKs%d0%F=ASz{!-<=QnV+b3#(2^(`N?&zh?>9@xhUB@Fh)6B5+N-T~qyS&iRx` zq9PXy>nA7h4SU>z>PX!mO@#~s=^%*K?b)l&Uu@F$Z~wutzL65|Un~H~Z!8dS*GusG zAC%}q`;SdwtcI5!?gFj9MYn)7t6+^c|0Fs5Xe^vn#4jP9LO{a%&g?#3P-DVdtCuTPas&(;`#ncdNr!>yS%bl8+zkYm_l&=9Ob*@W^mX~tTcXvc5qR>fWO6_%6 zO3cfKL+$MD&;*@i!(6vn;(e_lq>ljMjXY-pfP3?6!H{0WEte}Nisk?;`67=kMA`k) zrMjhM)E`4JLnW!b`rb8=rz24l!>6nTCssDc-S%*;A)Sp&9Qw~lB5xQi7Kv$R=@xbW zgZeGGA^Ik8@5g>RegoyVM3I7O?AEMQTWGO%*mPHQ?AG$jEe-8+)Ty86OJwiocI(dR zjD_9K$m#er8PTYOLH0M|zOnoSeIdC{E4i?QkMFQUrNN>=ae!vY%n@s57M0Sa-tKo% zI|Ux9lS&Gd)Z8<{R6{Ez98QJphQB2$sqy;NOe`rMw9^$(@z=auvttm$oQzC?=VS>Y z2|)}w5eTuzcVrppv_DPxgjerOBX;?+qB_E7 zBK$4BPbb5k?n=Z!%9#mH9Ki*e!Hk!`aHR7rxGlY!KF+sHnt{SD%@PeEy0#<$bC@fI z_ta|8W^J=$b*s8GIup#o)wo{Y0!o_{NgMvKksv*H8c?NQ&8i#m)HX18|BNmg z?QoG5O98SaxWGzXR#o=HbNr2V#p7HkRB|4CjQ zo2`%?qta*;eCrUMD=SUJJ!zG8PLe^IS}ycD?8bL?wtSvk?ace>h4qUQO>Qs9N}&(|2D|V);A5o6gpJ{s zkAJVI0Y?{K0hdOhtGMh@>Yv+as@Kn?3*v-@@bABVDeQx`+{RmhaY*%mLaM|fFtd$lc1axyrydvI%> z+;i0Hf7z=@aK$i9v*;N^*};RNQ_@HlZjCuvdi(Z&+1C>mphzm~av4c%jwux0vSW@N zYIX4D+Q(nky0nw?78j61s$-vaWKuNCu;jnlX_BJ_fu5reGZC0>dEyOoJ?jZl>+5xK zwi_4fzRX(0mr98g)~wmA>)2>JAa7FUJ!ea}hL$GlZss?Twt1UZ8)Ee$O{v-~*Qgkd zSi@O}|AmFLh*o`x92rlS{RQM792@jy$0aai?N9M3vBd{1Dj}g;S z)Tyz7-Q$DZEvqKS@!B(~^r0IrHHgy~o0Y@kiL+7R_T25>RAufX706N4j^S!UlXM-Zoh2X!~3N7Wgx{`4Q?VYwHFR+?p_pUO%c&1 z*&>B+w1C7x9)^e<(rtB^|Md*R%Y|NTcBo`BG+^wA8&6mD^wB&+X^vez+!PFb@lZPi z!h#6;{gL%3MhW?vik4i}1P?)`YFkQ?QKbeSbwp1Ee5(EYh%F&$GRS zes5}M44R%vnTz{;0}l4X%Ip;sVT2=X1e&#->s|tq9Q%YTZWuII28X-)^~D0ZI*RQy?QxhXs3$^|m(24b-4AA= z+BmHwsd0~^eZvZkz@f@(;Ma9RRLuU}nQg+k8pdvCzMg%`N5JbNr2JO}Ty*~!X|l90 z!S*kNJ6(oNw7y#Fgv8-M&fvgr0~TJ%854J+a`X-Jii7#YA;0mGKJ#KraSOU}_QF|* zkaaN7rlv}N*E8J4r*R+c2ZsP;XM>{e!=GS8?TTe6%*74s{LE&F0%Xfr2GLGLr{N)1 zgQTKr4c?j6p^0-(|Ek@ZqYOYu)H>1vB?0-=0enx@fJyIqpQTZ8elTO^1~Wjxj-_Tg zZ;_mTWuxbJ8sX>EdXbTst4>pskmK)(GqkK^zetN-mu%^8DJw|>%XA$@zLTe@TE8y9 zKq&u8KO1TdP6XYdmn<^$KNW_#)vH7o6B`^_!t0PqU?4Lw6AW?6J314W7lGXRBUEb< z8eZqn3ecpkhc-QxraQ}1WX9ER?On55Un`?_IWo|&-8snQfS*;9P}hXf`|qEmk=;MM zRA_`NaR(Ddxn=2=Cdw}6U-Cckz!hem7x?HchCFNQYNwWj#S zk7&kY-gcp7UlBFuolWw~R0sMe>S5v3sR^8XP_*54U7j97kG?CX(PE@}XOj)n91Y(E za9Qb`%DeaTg2YB~(8EF{+O#NVrFq=SE=0)zX!^B|2{e$x46-k!q z>mJDxsFelhyV*t}-^HC_8gqMdt}>w@DH@CLhrLphMG%wm6L3!1O|<7%l5J#Y#qaPn zcjfXVxl%Na)lN(cQ|m>jASYi|P&b8jrY3jmhR2 zVNM^XxbRtN_?Ywwoe=*;PASwXI%9Qlu$(RfLJf2VnET2Xb*?QtiAyc>uI!!RDhBm3 zW1h7xQxYX=habDS?JoiY>0%nR#~Gn0JB#Mz8`mgAzg?$iCWTJ<0^x^#LeE zBHYa3H>9z1zMzH1VA^~gfk=S@=L;jj4lLgH4L5cGC z)I7=oCgpLD2h2f%d&08II(NM3@jPK}F?ui!b$LoP?m9B3Yt_u?2Xfr_rM8lvVcZ)? zQl%3Gn|hoo7ff^n90Yt=p#NDq7o6y|bdZZaMedHC@^Z)*>_}bUbz+o4xfX18+$=tT zPUXo5b_9Q(2(!+8xB7!!oGv+m(^s+CW2~DVP&Zlp6tnb9bYY3jl=r0-QDiaKV3r$3 z1JP)v_%rFpPixV+j%Sg!J^!<9rw)4?Kkkct4K4?Yv1Cny61yptpe2FFkBK+wrI#Sh z6jxZB54TGrV8G{+;LNpnDC>eSj3W5hS$x5HS5P4J*IIJ$R0DmK`IvXEDSw~8&nlrr ziZVgEN^G$kp>yNqm5{is!ek$le$m`*7FoI)g8D^2^oBRhw*zAQ>WVt5Nmw7c=ziTk>O&eT-$49 z`@nh8VPSadZ!_xItysJ&OE-jQ2zM06Ne&O0AJCl=5y`$uROMW)%_ciwucWyL?=QU^ z8S%IOJq}jrYrIreQoYzWjoTyxs5pLO>NK2o@{67eK8rDTpunCFl55_b zofz`G09WoIwb)22Cb^|gab&%L%=0rrp5$?DYe)G;)FKVtKF(tmC%=f+T0`d}B(3$?DV}kEgS)4UvTne6G zn8py0?w-5r=q+MTv+7PbnoP@36vwtudl2OojCVC!mN_{*)sB*zeU1+ir|#~`AkX0u z7A$+RQ>4_{1X1;tWxWuy#&H_8h0Eh^NSjk8qNDn?F=X7nL1feZn`aTqCKv z7FkeF&nJmRzMRW2ue^S>oQ3}|L5z?SPdM_d;_U1hoWviKvdUlqmOp5W=d&KkDXTIU zJ$h4aCY;G-@LVi3aWM3J-&B}|TPEw9LMJ0|VF;r+-%+!oO3rWL z#D;q&^Y)8~1_e3S&N)T6+TX`UJ-^#imuBuw?=R@n9hseYjAm&NDuCE}sN)@n%s)K{ zlMmJ!t~Y<_4xfmZr6KXx1uC)+uSQR~Vt_YcFA2RV=HXUq`)jfSBaL8kBVK;_Nc$Oc z*tKI^gGr4>U3wg*tZ?=C488~CalP@xx@Yx<(J+mJFhO#Ul44O^M;X0PbKOE@Q3ft< z-Ux#wxM4`&DoX{$qQ$*d%mnxNCeV7I>#g0-MlFWf2D7J}mz)=d}5Y=&IceC5A_@A}*6nWu}5v8Uih5FEOKoSL#!&Fz@>)wne4ubbA1`T2Kkb3FBe zrOp(?-*fyVFSs^tDvMu+Q^o1#*7}PGw1*}u)rDmlI%+QK%uMojWMH(1&gH)yGCsfv z-szynAmX!^LBZ^$YGY4fLev`7jo5aDhj#GSeZGBOW*I$&^{g{7+2BjSpVHV+J^RLf zW5Q5~Th9_^$=g5{j_3R&$cR=c&Tw+2Wzr)|(t+xO3rhkkfrvn}8QdTJR{dBQ`k4gW z51gyh^=3`<9TX}*(wrX(tIHt6wzGs3UmY;+)CfL!#QBIuhLtge^29eh`H04Gb)+|{ z$3ARmJs*n&s?qZ>lA0nQXnF4K z=m%qR{e3a*WW;gT3-Ny*y*~~_rJ4p6~qh^i7=it z18vyOG%QJ^V9m(UcJ4X>7B3NuzVzJ@BI`}bO2r@^bWW4a{|8P%vA!$I+-&By!DfMG zfo6ebr42|GP~g-LngyB#nxRz zbJi`Pkz$r;(nlJCy9L|*t37p#CcIax9-({GF51p{85R7qDmh4ke>}41Q$~QF+cl{fJ^uh)u_!da(yDAm0_m%Uu+yz7 zBfK%k6EM=P&IM_ZH~n>GhzT*~DgOX5MmC@p=cvgymJtamG^(J>ADW_Z^lPh}$bAAa zq_p0H_7u@8UYBU7TIxq>578WFVfU!53qH3Xh(T)#q+>dm49MB~rl29SN1=ca48;42^o1Te1vGZdhNHc|CbC7+-T}u#x z`3Pd_RkMw&TFXM&q()YYNnkZ7JK~t6*Z%;RDzdH|Ht&j`gVO&14Z5`P&MX+Cz)_@$ zxMc5&^myx!Z%dbK{p+XenV#WdN0rK|q87_+GupG&#<_gc)$acQGj%Q0>@}Am*bhbq z!xiQ0r=~_L#$|0NHDv62RMQ(){TN2RlEKK`8E{zBP)~;ZNZmF`WDy5<0SX<0ileyj zw@!|Bo2gvDsPevIMhDT3^_x|(J;`<~cp^NJa54wUIG}Toai|)iF1e^EAblAgtDct^QE4T2@@5I0BlVnZOjjvq)$eS>M4F-u+KUw3yK_-p z{{TqwL|$6Qb9ApGdWx0c)^S^qUxjZmbvl*U==Be^N-<@%iZ+t=M)MJUOBXGx=Ah*) z{7#K=HO1LFf@akQ`Uv1v8TOraX(G6QBgrM(f+W;+j2qbo<%hHVTX(Net3z zT{u43{{U*5tNM3?WRV=rCzPq_j20fF?0zYrr0A9rLdhh-<|Gi&`n3EC3+3vzYZ5}1 zzF9OZYCg%VjNT4cj3Y9}6NV_hqvFE-h z2I$gS>2p3o2hyXK`%qJT)Zj^#;ElAV%iC*}|Nsz`MNYwIksG1Dl@d>o)5-?tL zuGCa*27~&0hmo| zAyj5o1AQlNwGpPBb~$v5s8p5MGOZDr)cg+|i{@F$ollaDz|XZ!S3X+u#zhLwpOS&P)v$S!rU;uwl=?99>s_So~-I$*YNJjLx z-?6I_*1uA+)HM!3{-UK=!s^{6x`m_L1_>$<(6QT&)nLc`H0n`B9JW(RMaY@-qvr$- zwm-FM{bsw?i?OVXPNjBZkN`&GI5ib0dV)U0X+JzrUhxC}08vpx$q)4Qr~;nAH^p5U zeM6+F0|R0G>S>G{s}iJp8q}jU;@bq)k)I&#R}dq``~9k-+g^!tFw9XF`97MU=sXy7 zlXEXuo!1`v zBEOlL@W;)JDa>kps5JaLBo^>LP-zU)6nLbyU(>5>pK7rd7=iN`EXliT98sOw(N z=F}{@jB5A+GmzgHqNguX)sM_TgkXTmG?P;eMjIOkz{Js<9Fz3b6;IH*a^qFe1oF5f ziki6B=%0rI^^n`NrVT(zF&b4z$GvVdZasIxe}@)*IhsiI%OMyKHW;VcuCnWMSsrWn z-EQw?5kN>2s33PIVO%@sUHo?*dE!sP`0ebvd!H~~PbQhYUY*9EG4WoX7ZN%5)7|<% zM1~Z$!h<9>>k7(8s~Fy$xytYl#oLX2SeVgKphV8wNI}j`c|HEUQ=g1Jx8g6)NgT}( ziINcu0s67twLeq(183BlIiZp_(9z1Sj5!3BkaSqare*HSv{T4gTEQACy1rED$%5F=bd+NEh#OOiR} zvDep0A2wKYuR847hfN}OSDRKN(x-OMw$+Y4H{^DoiM}niylZ%qluOn$1Ai&6g7GG+AN&8-F z_|4-(ZjsnRaV+2&m~2#M82##VHo9N+j?bldZZGh$W>FVasYWG6%){#b^zzJS$KSR3 z`8TOR*7C^^Ie6qK9S+BQZCLU1uHD>vABn#WKPA%PzLsZ_>Q{`&r|3|_AXYq|6Pv7W z!+X;gQ-K=>8=S#&8+{H4?_Q4__T|gTF}36W001{jo#j+%x_!Z73Vl}O@TdKabIj?f zc0EV%gR6PnF;tLR85%RbPCFXy*Viw~>HI;_E$^W)+#p~^6~@k=Al5S*odNK-OP10v z%ShVQ8N7!d%h(^9-MYv2+^nf$f)3$9B!vT#+X@WXdb_y`YMy3J8fNsxAJ5GIx4s*W zWN*zDxpH!#`cXc@t}eFVK!~WIDyoH591n^mtZy3Gnfh(qU=rS5rBUApHP60vt~$p7 z_&MQ1fv@ElbC{u0H&NWyxR{pgDX%0D*hK^mNe+a-^+ zaqp~e$H%+ozr+s~$<(HK+bI$cF5W!$2cO=!{@1hD*Owp=5H}=qjO|)*r!kLVQ4G;h z4WRp<>T5bZ_oa2qBBY{uKzDQ`$zMm8o}S~a!G;jRB$b9RBMNHbYlFB}w!KLVQ$`Cb zux0+FVz_t5*M5ATG3bBzs@2McX$v=P72lil9&V@I5PGV1Sx^4}Pc^MfWA(nRAykcE zkzLqnB<$Z6mWSGO`=wB?AYJtkJxo3-qF0cl2-6fYl^U?eb5u0FK`t!}(H)50d!hEI z4-#S#Cpd>z58AGykCYjNaH9h)%lVRHgaGFTv#m!@9n6Ap6Oha0fTVm3R^v2W*9yFm zp1^Ze6%9|$RdL7aG!eYNj@mNqoDZc(EmEw3dVFY#_fn7ygILwd4`E1QLalIh$O^&_ z@Z&$P=BirB@#T)V;2`5m;bR|DR}VKbyZC#t$8`R)Ev&>kJaU1BSyu##@a5s{mUPC9 zA2FEYQIlEr=Qym(^}8|M^*)5g2)d1cc-dDo#ToYfK!3G*r1|mX>o@Cb!X74?@Uly! zlwDfF>1yfX?#uPZ%gp|o*Kuo_CEp5s%>Ap?t|KM0MvzKIBwy4!{2G}PYSUD}*VbY{ zHzC(_amb(q^#+*!Uj=32SpeH^^)*qrk~>xyCq#>;L>VXkYRwD7HY*%*I-IPs5{KX# zu&o=L^o)fh7e7p3`i)ePnSU^h39eUA$yneYq}FXJj|pNx8lnyU zf}E{KtVt^QW;Vz10APKpq8)WxOm2tNt}wr)sI3c2Fa(#teF~ap(zr^Jcs!8=?AU>2I%~;)Q@!j;!ksY#tq`ZLwG_B9r zR-|I|GPH)ERZ6Pr_Bc~qtQB*QlTy-08P-1$RZg3A1RR4S*B-pM>(3hC@4AGNv1WFV zp69pPyxn)~>p8_n?9^ zbGRPIy#?Z5kJ!-}ooaRRn>-!1-+HR%ETWNJ8B~%RZ9~&gZ>9vAZZQ_E^)B>PH`BtW zW)7o_ZJG*vi@z++kiU=)?niHWGM&04pqN>;<1DOknxd~FQcCGO<063TZw@;+MkTT` zr8`kwFHi8Ih{u=^uB}YxX8TkIP1mj9DzKrD0i}wZD*dQ4FMMYHXb~txB|vu`q3=?x zZ<~xZTLh3bV}n3swzPsMUx6l)G)xYUkG*s2ylQgu%l@1?-Q4$UA-A_0RXpEQ6YYxg_ujj4%Wl?KZP9IF zZ!Q%Xmf)S{HO9?$mln5-Eug|h8Eoti)2P(+HO+OK!!*FSEZNH|A4>ZQ*Q#EEH;SfG zVM!JkhE#~a&0kYk%h#O9<=v)SU@I}l-im}hLPp34My-)?^`D9&{{Zj{%|bU*7QM-1 zfIjrlM4bXS+($jav_NH~k7qv=P|&5UQZ~&rK>q*@PwM;7O3SFUC7u-0PH^1l6;Wln z++DMO5uB*hz?=$#ix|;v7CF}lav6_f+JKI}6M9Pa>pedABeN94pAZ3BZO*vXe4 z?OeO>TH}`i4ZF_fIPhR2B$2Xx{%ehNbloSzu|%t`HxdamAN+qO;;ySps989MSpowp zM(mdv^nuO=NLDw2`fS&7!#vSq-Vn}ZWf+wI0KI5>1?}gUa5hkO17TRAh%HQq17#bt zR94z3PypZz3L(JnS`jjTQ}5b>_>>Wmzqu3~uTfcMlxPHnZ6#Fv)f;fiQwT<<&j9c} z=!&}MR}d$o4J(~1?3wqa6-i?#MAvY2kP9xHsraZYd&Y>OvKNWDVanCPJBu}7afe3z zCWDXb9RQ|YEO}#Vf+2R-V@2i(3TFLJ9P0)Ogz*R8iL*E2+NAeE^w)wDytVbZ6$E z;w6}@rWqZJ0z+h+W`cLN#UnCnMF8Ui1?sC#&%~WFI1ycBc}n5HT<=t6*md`YVX9b3^Ff{vbb{Xb?V8+5?tDMi*8bgYRSIfmR*#(oeA32O zbsn6OD-s5*3_o#LsvcgLo=^(Du)8qtQ(9s{cI({ZIKdkl4bLU?hGoWg0-&XmfO%r? z{i%Q%?G*AV3~RoRoa29CR#O~Z&HPHwm1ij0bn%~>>nk-V`lA&emxUFxxqbGaM&fzB zEjq>qPMD6I&}X+%gMCcQ!_qaKRaFQtoRJDaiDY1@s1QbeD2|__^clcoJepP}%LUvX z`x+xkZl>48qK-9|4LH*%(jz1FW`THb!ZRhWP<*6`G(sf^zN~|tzpZA~LHfm&y`Z#v zS6K{u%_0q2z4OgjRty*NdOXMT0vxKb$gQzQUG-CQG(W-BplMiP+`UxR#ot4dTKU#j zR`C!CD!Q;e>ouue9fwEgl0;%UOE$pGl$2C$-S{J+{!-nMWim$6Ym3=OwRCd7T^TeD znjk)*V3UPO231{T1LRc2onwOWB(HPUtnI+ecFX5KusqiIUY?3ufApneUNiX5;gYW% z{9|K?W*Cizdpv#bFDt&VxsDj_WQEoViCATB9E#M5Smto#5r9;Ug?91$u6=$! zj`2597Tz3U>0zFYN=9M>`UCp@=N{#~RI#c2BcwEE`HzuOhl{{ZJ$ z>gQO;@l2C+&aEq3lA2%4LHywQi2ndu^M5WqlgI7Ox?dZ9D%;%Hc@ZXLo;^1LMfAb% zk8|x=@BRM(9KC&BMbx}Ibp$b7$!_t&G?5v)9+sei89R7ab&B$f%K| zZYNE&^38e=Zz7{NMJX1Qb4GBZxijyB|NNe-s9?z$}T zB1*}sH%&_M@S_>twd&>W>;C`@d?_96z0|3CZSFNJXsSp2*(09atE8D6`nv2oFXCOz zl%mh8MB#w~JB(nFz;BUFOm_YkdwJ)&xq;GEk<=Mf*V}nc>_ie zLE?6IyA;?M98T+#yC1%_o>&_mn-Mb8*~_Ldf}GlKQ_{L^WHFYWH!h8XEnxWNL>;4pL>q+Fj2xsyO+s7F?ARuRNn&;+? zc)I%XPs4tLYjSR6>I$uI1SLX}LD%t);<3zh^7r=~_lSHAHI!*Nc#KlWe5iHibyK)3 zDOjIe?hZ)7C)jRlCM6nV;qxE9p@USMi~Oax{{R*L0Q?$a`n_+Zb!o&!76{~uGp0L* zQRyE(_3z>3u8*fgnnR-pC+d(5)caPW3+8nonF6o?{X-^}5zX{_b+(y|fk2cow~+py z_KpR7iF-z@5Auvj0ON@9+q zID1JYCr9wf9>SKUGx|C^bo|DVu48e(>pt}(PELOu-a?6QJ-lk9XD1=uemhq#`?1rX z9Id|q^=oOSpZ@?(XTsaW{==|7^*HkFUi?_w>QXJe$ai3<$U|#5-{QR%%y5y;bbl5i zT@-lrLn~r7KU`Tn*DvMz>FM$4Qbc$Dx%jU0t&Ulh!*%|?k21ug%!x?J1JkSTQmk}# z{VO_NVi@2Qh<}!pg$LdWMCwZIVrz1F>g|}k>g1rA!UpPLVr;HT8gUX_s+Kx z1tLh@eAtgFMNwPzc&E^dsbvnijla}X(;64uG)m#u(K3%jgKz6gMhf_$KQIyFe=;!0 z-dNNa)^)6DOZl6OhmN}$hw+5`mtEOH#u>=Tk#kGrr7}i;mh)CmGa}H@wlu0vo*`R z9ebUD`bBW-$!mP^isR`|jctq$+1{|&n`>+WMhC@FXhH!YzTi+K$@$;CMNa@69kbkV zKp#?*N@?|KC(=~&Kt-f(RBGP?k;wbd(lk$~k zDgblqQ@sre*V9}DNTbd-8W(z+xGvwJJi(r6L^?eu%{!A(Q;P1=-40OPOPp@Lf%8Ea zzYwlV1iU+b?5sRSq^OBh zzKk$!mY}+5C!f^(9u$Jn3l1>ROd!)9u_g94XN%hXDH#QCz2sd_N@1rZy_^lO#R0k6?Z3%EgWE z!)vnEK^}B>Sr`b(^~dmQ+vDlx?mF@-vj)uqs2+h(Dg{(32ci~ghoPlFvp~eqI5ZEM z1)2xV1JO!?NN{sRdH(>2OuZ`YZy|E__fAE{vv5sgtBuIKel1(={{WVhZ@&Br=lqes zL;nEw+_dc!gpS11`42=N@pjt>L=qOp!JE@hCL-d<9hgY7>Il&=*k?txBroXlbf-8J7kW7!u{phJr)@Pic3mTN&e5Bk_ zK;2wS%mj}iVnU5X&=J&nGe7~lehC192{ zTyLp=N%{AzUUYP^O%o8R;z;B;B~DzQZ-G-WT&@2AO1{0jn%>>?TEs+W4W$%&e44mB z>4=6X?W5UaK!+Sustpvo1W}eh+Mw6Ak|fL`RA~@qNWt~4ed+>DQ5o)1F{#cnbgK6z zfN8D4E9Mr`+y(trK=Smd5@98@zFLv%jmc#Glms=Fa{9cs1Jvumpd!pJ4i2J53m#1o z6t+eTjH*|hk-mNC2f6AnL{)Ai3f!S#%|P*W1-MrHvm}9jrawsdswjJhjw2?VmHLoy z)J4!vlOT}+Qg$lTS3TAG0BpK?TN|!6YSgJ?l9D0`S5g>rn%w%x{-4y=HXeEj+2>Gd$6=c4fBQOGagY35<8F$ckR`99T^N1)v;#Iv5GYZPw^ zllg+WLIc?Q&~u$*@a|NKTez+g;sA9G!WJ3e`)3#xK~Y>V{i=e+#%c$} z1*;te>L@HwKY9mu18j`@Q5P!Y3JIcM=lf6-`EtjP+M8fT-&{pY@gFzUrkxod+_NoqBY1ke^5y?TWf%nRu?OWDKQ|_S~gdWhE>qzO=GW%5YjgLR$2>jXr#n&Jq}8a)CTnx&OX!`uN?(1 z9Y8z7p49~p2pK0h3Q5H($Bf)vI!@E1B%?^d7D15v*11Y1>!DtNla&Z=8w!iUXW!bj zsNKE%HIZHb3%amDKbC!Do^+3DXx(oB+Y6Ls2_$iVTw_Ybr{CPuMCP`)mUoscki!z( zN%fF6!uwXDFfQ+2;!zAbkr3!7e^AfVYL1ts*(!kydq$+Z()V-RP+io#MFxdWGUDDP z%H|}(R!0kO6unB|LFQ|XSmJgZ4|Dge$eQgx4*viR?M>C%UB8@TAz^`-sKNbPb6a!Q zsdQfgSlP+u!xkjpOEVVJ@G3Ou-L~vUv8XdHx;3<)To9A*pacDC;3g=-s8s+c7z#U8 zM6*D|&_Fd*b2dFI9ZKrt=Xj%y3Hw%|u8UPjGrHGCj_ndTvSV2mLch(9)jdyOUMTR) zSFu~bR0v_27^3VjJ5=;vcPIFf_+4#0Cg#l&3E)6VMgkYg#U z>WUI}3XrA}B^po=F`vC=-)C&ZJSpRE@YU0A2y3U4O3F@Ef&C;`ZaUeIFO!_Q>3?Ol9a;~sCXrYxtk z>Q;kDj%#O7x(fY2810Jb{> z7HQz?+=ECb}?ie5>{{RiWoqql6r|UPL?b!5KZHHdHnaNoM zf5Fx^~uWw|&l$Q{a zbvNsC{{TwgAL|pzcjM7~b>bU1!r9!NUUu?AzNcZvKYHh9wO((l&3qNmC+VF^c^=Z? zB533`$`>Vv)EDoH?alR!cYU3FKa3VFA%^A|?e{3gL8}Mmv$7=R(sX{Y139-@L!Ba6 zoScaP`S%{xzt(dbL{@Y)7YNWoIMqfJ1s=m;R7li6Oa))Wu2;wYD;+v0*<_2(X%{fL z-Gyh{?mKbf_L?WdUNM69C6joIYy*7+{2J+IO>(m?Isz*wY)}h#dSiH(L180l)IUu> zOl5fE!(#f*R8>zsP`olQ-Er#2?_B$s>*MM3)t6qHI3>4{%f?2ONA-w^Jg>2=@z>XG z=f|aVf5hh&vBQ2PwqGkqxQuy^FasNpwQswz%bAZj@bGE6lgDLq}8 zmq}TAmZ^_x@a%twsRcc=BkBIfAt4uto7D6CWN}^{YBDH(Ik=F z9c1}|T|14dGp%bdM}eY?$(fk8p#Ds%`{NsCtV(;!_~(Y^+%VA+;c zXs%*E@9$n~&EmZq?C7WQe0P?D8@SKrVP!E(9^ygs^IboZ*yGoa9PP{IQKYi&rC97m zbKkC#e0pW=q@R|F?k*l#85BhvK8;}i0IhpGcjL?4`m)ETq!6Obq?La)VN;jM_pYoj zxaxDr=^SYAhuE10{{V4BYT8(=Lr6M_Ic9CmRMs4p{{Wc2D}rN*aO@5-@mXonBtQ%S zfHnYEN%5c74~x7qw~>cXKQRc(w;IRtn&af-U3l*V^vfu2Y+;Smf|(f`JVu^AaXaf$ zm#DR>gr8H#jWJ9&Z?jicV@Iah`EiZ&tm`Cky%NWi_{#bJ0K{ZOFB+nt9#JY-`|VzT zH(2lDlDjUO;s^YR8nsT2B3)nRV;@nic>30Q<6&9%(CeUTsmnV6&A1R_iC%BEH}%#{((zV2HG-75GWf#7{l^tFzM(zPb0we0$IFl0i3axlzyV_TCGbWjygFHoGS;dggBPzuco(%eHHl0XC0%-ae< znQ`KkB&DovaUkHR{vYmrsiOw-!naQ-y}0tpBze}bDFjXHO6Y4QjE7*?&kH zv-9&w8nvQW=DK5>%sgi@^vl@qE#_64M#R=_>I8fK^~1igzGkIA;*9L45yHBMrI#eF za{gxj0F8lr<14B3t4db~VxE#~7t7OAhy{zt#IrLoH)4gn(P29 zIVOWY{9Qc2RDsz;Z;CDjist9ck=M<`9VL-Yo%>YO!GpuMDm5}`5)c7q{{UKQiGK`2 zgEL-6MmXLDBUNx6&lHWm`pt;K%$j5CRX}QDdLE@b-unnqJ-)m7!M(J0BRnu`p{+dZwn*DR17+th8@jH zvCi}!xiz_HSe=_-+kx;a8m~o_MDZk%{aDnP{^F`U%cyi?YjYLq%E=M99(t}pi+(ZO zS8pFobH4EGFhk=YK58x%>=VVHfn{M1)3(G zRZz82Pe8LkfuMZULd{h;Y6s0g`KmeJ6nM%z28CSvlX5vck{$*ZW5=%})JbKD}J-JU-G z0BSBRhD#_VCrpkWJW%`Q&E{D z(nUA%k(7nhp~mEU)zEKAnaYQbR##>^R2m@bKNH>Bw3=H4?I6Hx{M1qQUx*KkJYmly z_ofT(e-qjW*d!>Dvf(8=>G`RHr|?IIL~;Ic<}=N7n%VyVO6Po39cVuF6colSVWi6y z-~p6cqMothi+B}5VI#4^Mw_4C+JjkFQYj+^loO8BLp)xbayk3ZArg;J7~6^kYRe-P z86Mdj(0Ts=;zhz2iXF?QS=-oqR3e|l{{RrfZRWu_2$C>p#)Eag@C=-%46w?~8bdi!q!{)PSH~c(pQCEM5iU2P9VBC+`P-Mvl`;1i- zJUFT=WT33aMON|E6+8g*ih}6UG~Y=lwkR(b5q_m?_TGrT-Wa6%TS@*_qK^{Js!^OW zb_8!gLfb_wcvRCd+kQUu0o?RCp!EmFFm*29wG2u=wXsWxgR5gFNYCD?2D(;3)j?NG-zbJ8v?2+F#%0O6D3uBC%|uZd>r5r}4G(;9+|KvpM=)}lI3!~Xyl zED0A)l^APhDR5iS@IKWn(dumm0Nb}}=Z$E2WBPs?iX!=bpMGi}7LI}jIx3S5KsDLG z38b-qPT!~IqO#!W@w%9NwR?2c=FPImr=23Slzb5lh*b&~O}(_AR!8cn%E(!abI#%(<7%MiG@uXx~iopGTN`lUk5*om%J3l-tAt#=fO>KUd9Y7hz_{D;Z$B zd9yI8H7_p}BGLqk5Q5Jd@+df7rFAXDg3{T{$twm`BOB8ay$hvyZ7pI%jC!!GJD=9x z+4dEi)+~v2J9LYv*k3f>N;8P&B;f`IE3b?FqaDn9N=&Yyl!j6=tfwH=vnoo98j6N$ zqB)>?q9%xg8ltcU=eg#HRaDeM%?v3c4vvS1Qm6N<^*x&7uUE~!JN!Dj>4;}6j}yvQ zTzsy5>(8FG>gTU#4I&*H)Zvtd2kl$ur!M)|u6Xmr_MJzhSiEu}yN^I?bvmY84K0v9 z*{yfZr;DtwJ@CIz7uP9fMhy80FaH1w9qXrykL|xFZ*u%6@U`zvlI9DHG%VVpkv@m{ z#c#`gI7_wRzCKrrsopH0>M}ELUM?fkYPh^Ja}|>HHzFuxkR&)KT)#VgtF5@?Hp9a$ zdu=V>n9Vd3Cz)@tc8`+Y=BGDG=zkFWPixd#-E3f$*46-?XhJm)Z9RZJ>RxHg*QNdq zS-N!T7T}dunUxXSU=G;DZ@_-CaLE*_G}h!cy|ofH z+h|JP0vo`9#~|1@{4I`a&(}6P^VYl!O?P7{hC?J%K_;-RkO#>4 zH8}ERZ?1kl_rP8)d&_Y5KAAIxkS>_z`&Xvp&g+e16wKHeJOPquid3YjvC1&Ur8P!( zO_pfgpq%O)!7mC&^8M(oE6de_DQ97oiZ+msd{#TSymPhkpIqxQ-rY-aF(kV&L6T7i zU@Mn0+V}IE$Fu$n+w19!Bv8?r-^! zHN(l%d~)z>R3(|%<%^diuqS%NYpSY8p6XE;GE1W^*7Xn7rB=`qFD!-8r8Xzz z)NcGvdo7fxvB9`%=QLt#IdQx{(C;trJZqP#>b@SSn7 z+dmcb>*gcVy65KL3>Qp=j8Z5)$0oC;2>l_N;S1>#nn-H^F2Oj>_u|Cx_j&kaU*$}WdJZew-t}=XXDd4 zPeYpFV7QWBE;WnGg%{Lu?_S>=`11FDx)?fiFot{*LXu^W<-XO?fSohUos7;f7b4#^ zU}$>C(>I%hk`hLqHGGPfy!~0u(0vc6#-zg}Eot7iLk0jka)Wq^!Ab6in@T zZwicr#LhGGn#HTkcBbK6E2{z+dTV^MLSD_G3Gc#>b4o@<%CC|EzjDw60WxC@kVkNEI4=Fs+-iMebw0X>%X?W^yd)Un!DAzLIIMeXSU$t6t@&elI@_X=n_zLT-k#W=uA;{7 z$rnr#TgJS4NCf@r`^5E3b*o{M`G~gI<*NI`(z)Be5LsJJvm@k4bk4E;KYUdFNY+rD zQ}I3+%LrpK5%jS*%|DhO#`2F6^*L|uP0Jw%N})v?AQk8Dt##*|L#DfoA&rP9e2?#3 z+ij;zOzL8G`g2TVaE(w5kTb9~a8zy~52c)*`j@p7Jl$mhBN~7>1oCJAkHlkBP|DG5&c^Gz81luY`G6);MwL(tv?VhKHnGT*PHJ49YW< zclMyCru6$pM>EJ{b=U*GY6j_Dek*2h@re-UK?8cA5!c!|UQ1wN)-i*=DgiEfjIxqs zI*B}*xG07~n}8@RlHr>Kf$dNcXLF~IPzO;)K9f{#&(s#_V~9r_IBc=b)D>M>OJwNL zNE=uz6?YU5HSM*=MchUyNZNE5{pbUm!?Q*Nmh7{s{zJO`#Xvo$SI4C4SJmq6gGF|o z8^^M%2$+XWJipcZ8Y8sn{c_&reJ4X_1s(TUiW`xFO5;AC$R+1LGbKW_1&b@gg z4v6cWE}@2gYt_eE^Ysl|Ld^orR6PS`h*_$oL@EcMR1(bspi~Pq3p5IfmS`LrqbI~( z7`MNL?rft8u( z!!F36XI)~tORGOCY-1$I-gYvI2czt2E~Oc>Soc|)e0rE{l)-G>VjnC=6{<$r8l^v5 zR1m%EQ?N}z5Fo;7Ok?JP6Tx!viJ6_yjOr~_5$W~|DzixHrA`2D{{S@=U4)TF@8=C` zrwSH|piHYEkpbA{RPjMMWoe0W0)gC6U2)UcrnHdAJA=rmtYEwEt0RzkqA!jk$P@&u z2iyA7MaI#<3;`eUR&{aG!xVGFu)!l5yMt3zMX!cP2UdUKrltskq(+%7kG)MB{X3vW zRb{tLc6$AAC zwHoTwrzc=dP*fJE%EY+abs6T0g}IVHTxFNAJ*YGXTvm~R4gQ6 zrZ-*IqQ{tDO3ubfn3jB;pKoewOzCcrcGdT*5oB>|T|i?sVmmIKlLj`V-&|Z9l`D@p!<8|mDFC3J~6On+@(wy-ABW0?KGB%8UHZ>sw)$!_)6Mk5@5$HZL1xh;MEhh@gGrw_BiKQTG~PBS0BPf1C>7X6(>RIJyPaI zx1Lm(mu7@7`J{ITu%P6wd@XqqkUhJq#MozVr{L$kK^3t$8-4Lj8djYvRtDgj&Z|EA zqDa%IjSDDk*!QN52z(hM&g|@|9*vK`#WcrP)B0$RH9#^{V6pE_21jj!zBZzX5mXi| z6h+1zstQ`)ZYZqzdV1uX4`4m2jJf)09B-b&sxw+Ij`*Od;;jmrI)b?&%>!x06;nk) zM3Dag?kWk}^+}N9I*@R!y-}*2Ra@yT8+OG3zvHry18HzQ#^#2up5`l}i?k(vqJ6$7 z1?n9YqATUIHldKqL{8VN$q~fs<|qX~Z>cDhB>o$K!8D2h57) zBV!zLc0X#@u<5!7;)Ku$;+PquSJLd?S`UNqPl)u+o#Jadq(cnqSiX@PdS5=(iyECb zZ{Q#d?b@=s2Td?Hmrz1ervMDO`cvMD$^IF6*UZDmq};x827gGYA|0dIU6qvq#4)Eb ze45rEZl``?3IIuNCCV94=gA(!=8_D#rw~F~;zm_Nti-Gg(tYZT3$C{>P;ml)mT&(6 z4hYBd5mpP}=wK?xfus|vaD7f^<(Qb>Grq3d zR;1Lm=spMVdfKA9jNG`y$FxB9A2oXT%d~rC(p7jHisOE_9KVSAVq98H8-h$~(?myN z1#8EBYT5DE{u=fBdy6=tiOF~(M44NVYtz*J+$YNGSk@av(Gj3Vsv=sbtePRJhM-gp zK;nai{A!Jxq>?yUk(#{TU)O&V=U9jE{{U>#H+giwg#CKf!>Ac9$D&ADDBn)7gptVk zuTMW?hjSjSWB7Tas!P;ufk>G|*2=gFOAW?7t9;*Ij(e{~g86kSIngFE$awvYW2U5h z>G+)*^**wxW<1SaR4(W?$k?B-_pEsN+UwU@9*y|5&_rDt+B6=ER*Voh;~D<7$Io*7 zPZjpB4U?-&5<0@{o^q^mY1yCRuZn8-@$?_zXMm%#u_k0cn7WJjNHJ(L^)Z!ApgTDDb=DgRfdgm^5Ib?QbW@iMnjB@SsQ=ihk=fGYvc)C1u zT|z_<##T9@-#9qjcCTHU@pbZ_z;@T(Owyvm0$p4^(2`G7gfY(*t1)fX#pi<-NnyJ# zX1s;N>XT$}KTbPWJMnqH)5$*?{AAZtCAOB0E%%l-=U;!guRra2B+srVs`P1XObajp zrhzUIeSzYvx0ChPeirrL%HFq|IELNgCRKCje0KZSY2L>!xq7dK{BilK^KEUVt&v_* z{lL!Ezg>)OFg$JGc{-iV)$g8>#SA(iAwly>=VS5nUT(R{>(5O80KqHsAi1)X4lC2g*Pd|e%Jp8AVHK6CMlg}X5H5QRZcS?abGKAk^cz2-g9K&tYDFCvLn) zgY}-VHRRrFYmlmWXb2>tk9y=9BTNGCq|n+sk+ksG*T#mprLF8os*|*+kH~EOJP!kxUCj{{YSh zwLN~fD1Xby(X_r?oQ*V{mOBj&sMM?HI=Me)QpQ52DccO>Zwc$YoJ zKbKx><7QdhiyMcM6nBM}L#qRYIo*M-ldWR%-MQ(K$VJOc1Z{>19{3-6(=6{2^$6`^ zD=chLmp0ci47#_oR%*s9cORXC3u{-^EU%k`@$>esZkpfgUKNVg&`AN&ac%^rZt@Yi z2D(l&>z%su?-2E=FJzA5L<@+PJTBw!Ts)QP@pB+ZkRACI%F69AcTBRlxS2!|iIyhw zULtV2d)B%C0M{T~=HeKe^4izZ zK_78g_4?^A$FxT@VhEgKIJ~6Nzst83>f`a}>+}jo`J9#vu&LQkrI^-{q*+E3VLv_@s z1D?3O|5EC}6Qc41zZ4Pq>j%EAk+QQRTTy~hs2 z-lZd&znXNM8CpVyUny==Ilw;E&erkVbrA&6GkJ@qHPo{Ytq2vZ_{5)Hd(mg}JmJvJk(Z40D5-Xxqoi4q4~(5or8%8MkQ4@37zYtu67QJ z-R{^-`HB&=Y5L#hh%)*hv0+BYb&r3&X&GH}t-}Pi(@a}SBNPZSN&8nmy2j@^$Lc*| zQ$L@md1!&7RP0Xx*AD#O9*#U(#I@x^v7i^@+=+K5p9a$q&nc1Iy@xIEDQ+3BH=o3k-W!&TM;vk}jO#gYJ(uRW+pWot!@?iok)o^(7@PpI zneneU-*ZVy^1iJZ7n7@G=$($GIRs|7c`K(JgEskcL2U)N&2!r6>b_egBoO*X7$&dL zUDPWX0KQH^z~YED8~bnyFdK}lnBedoD2>?aseQ6kJ$A>xA7 z>UKdPCy0>2|xDojwhnI{1Mo1pjKnCVs z&cGki2?Bx|OLNoOK*n&TGwaMrhhC!bO4Ypl6x?sS2yAh55{$@i~K+{Yd3R_7PSFh2JyY!&A_yt zH3B&FdKXDuBN;X7@$}*3<>+oPUWs+V8mMg0EYK>baA+QZP$~sL^a_YnQq2R3DH;g_ zK(j#L&?)VrnM`xWlE%l>jxsAYY$eBxUH%z==PnVQE#TFz-J5X0_8)5Tcg5GMj@aE> zq{C(k7iqtiWf)QMS;qaN7pL5WlT+c)jnLJ^PpC|e+L0MoW2976uX_8;6&VyLAbLg( z1Iaw00*7q?Y@><{?IfJ*5xokIXi;1Muo3k zbkZeNkyPbFjp~ZmquJe=3Nu3{b*eVWni$Q#=~s5lHDIiZlrf!3ek!F6VbvKFs4T8q z)#@vQ_M$qtd}VsNRc1OpWI(|h#%y^#l zW>mF|Y9d8ubK4!OHK@hwof;O12?zx~h8up>ooU6~+r*m>U;Mk)rAq0)z?C3LPNmd= zw4Jf>Ta}he#aj?)s4J2V+Zw3S=w2Y6$&Q1r7W(0R*X})yOdg5T`ivLLsv=d?dZTOy zU;2t8AFK2YYrt0rA%_j{X{I@An>LK$fgdKWqMLiEB5hHzQbq_I8mPYN*3NiJ2$nmN zawQvTH5JZvPYv8z`EM{rMr@5IR&l-!MQmC4!fB;NGcCMhl8b<#cBU(+>D_YPUosG8 zxpV3a7N!lE!z^&SplIURm9SfS4Ce6kalGP zTt}=w4`7X-nxi&OlaBjU z&;*v)?e?t!{GMnaVyLQ`FX=&BB>M%lqy;2~ zuQGZiQ6j0`AAK}McikS+@H0k4Gm;LIvV77GZ>V^FYgq|UStG-VlOPJ#jjomWnR{-& zT&K@Mz>hR$MIOR~()u@w?5?sRl%Wa^C&Fhvg-gn7ZgZm_sJ8%aKJ|+l)@%`m519$o zsaj#_asL1c)E+g|y1)2GQee8Liy+Sot*O8}@AF&cC3jKyp4wQ?P)TKIwFsn(7_$Tw#Gy6 zL<4d0u=9D&^Jn#zKaG(Q;~!S7T509$jO66)}D?x{Vwh=Fw~`7XNz z9^Y#9aecXQ?qk^ArX;GE(5MqYwN)x6h-xWSLZFQU&?-TZ;|`KQ_6!_`G^Lwc6T3k8XvTMbHLGusi$%S-(l~hvVLc{U+`!n;b?6P_7#~ zn;YbO);aIi<9DBE^xlWpq3fM8Xk4n#6$vCX__0x$SYu9>rP??_Y z;tQwA3ncQPT%G`~IgdubAh5(tjE#-NidDb8C+j^|N7B4@*8M&DTSNp?O@_ER^a4h9 z{j1f*d3)vbcS#BPXndwuj6{nYuM7a#*6-ID1xDM7&r{=b_48Na7l-a2uCz%RmFAIU zhBN;Fs5!^>uRkwEyB7W>^*6ej+E;*Eh@lqRbp|9!Evp>?>QN9S2SxY3SA2gQ3Q$CllCy@jMg5fA{x$$~l54<@nSE6vA_ z&(q}SU0q%!EpIt(Bb=!_kJ_F$Zm!3&I9XG0869(jzcs7+;Tb~SdqB+yGr%`66PXk3 zS+!)=M}quMZ!~vo11yo;HmIKhN6!Nk)x6?2Jx+M-u5YeN<_%2+j-WLAX1VuT<~$#% zb?L9?mg06K%f5xqgxeSc_O3hi+de&W@XyEE;}&-c7s*9Pr9rj;zztr$ZpW9X=>Gr{ zuFQQZW=0>xD;Q-xiL73}x^WqOKd;5o`W38)9&5w=DEKZ(=k~4InB{yw_^R;gj!0vZ z&2UxN`iUo&KGmI7KZ`bAh~{g7J-}_?w?X-M7vFDsp-Sd9Pnv*S-J~ zH$}IVOF?aJ>v7w@aDMe9Z`?=YL_`a~w(hF}tbKt@b|k!_!!u{{Ysvg?w1?kICLb-brSU%_u{s-n;S7tCv?@4W0Vh zNNr|0wUiTQbIOnSN$p!>1@!3BOtkt8XvJYy!AJR^#_JvsjthwH?c{5G$P9}f(Z}*R{95Y9%C{G2(d9M$X zt?BFHWN6RRF6{9Q%uc1qbt-kC&0_fNu9L|l)4DDqw~jbfn6S)}5u^fr>)GPtBgy6K zYfj$KDb!A@m&19WN*jL zg76#`K*-bmm}D-jDxQ==ePd4#Mh(UYSFe%`PMYl){gxO z=<;J2=Q0YYr~EMKW@%#ufAq=qH3jz87KSj=+_JgmAh|10LUprEK1)pguUK)6iVF?m z2U#Gs*?Cs=p{S#6F7D+mBnXj^Fy2rUMRtFhx-K5&lSbq>r#sO?TUbCRDRSPN9LO8{ z&^pZo5{DXQha?pvd{9+;)}u14utZ}j*-@R1Q68t_8EzR%swrQmK*dE1cYiFpe8*=h zFbSdu!RID{EJBK~M?^oB@j+;aQ&nlRJ8W=!ikgDs=`W`tN%^LYJ8upaP0z2LH7`qz zj+@W|{acbTip{Mwq3EiL!%rg&O(jbl#otOQ%rTLi16?(YWy#ae&OPV>lH7uO)LjhG ze_AR#jq-nbBSO=zO&8L{1F`n1H6rSE?-@fF4tSEH6ZDsf1kuhnI|%#yQB(f_8P*D2 z!Wmd&%?pPV12=}!Z~o+zV2qgMI5kFFdG^e@)?E>U8*^humYAmcQ})=!B#ea@ts+bcX_mPUx_GLQGG&BU&sz#b!6Z9-j77@SH` zQQP>3?_RDudHdzpu&&a%8mbVc1ym{rpm9K`6#}4o1wiAPsp!7W8^j-k7PFr+(nD(f(T2E>+uE^wZBHZ4 z`rm;%ji0IE^J4!1;=}77y>h%d&fMUTX9Q^@Vh+Z!Wo}nV(BfGE&ndUwx!a9IPlw;l zK9ivE!m}#KJ|7A(U^9`O>gdbrmv-?MhB(?u18EF9pK7{@+}m9&IW~N=b|YMs_r?Snfj^6y?d(=iJl>B+Dv~SVNuHJ^kwzH7lX;{qu)gcJ-;;Ir@cS zwXVS;tc#+H48M9NsOyntXwS$M8;IQjnNR-!lgIX?EF06K{tRF8irbwO5`tK&2!VDr zq$WxVS~`MF>L`M4<+HlfWsAv~h$dw}-h!*21y7MBtgAYe{Uioj3~4Xq z8bpACj8&A5;;4+b@krl51bR(WM)KSZBoIj6gV8)U_=uiJj_b{15DJok$o9n*xz>DZ z5I~lvTQDEQBhtSWiv&6(I)|A509oADF}-VD^thzi&@kr)rY55YO@#-dD97DF{{ULJ z9^%Y6A-4vqGe?JF894oq6|Z9yLE+V0>M<{@9x!z&9@VWt zmW9_2j8VtZ%gs^T^luoW;ybkp*#TxBN&AX}X7{Cs2W53Xzweq3F8iUd*6X-a^!}=& z9Is+9erllDdZQ^pDD&Y%pDFjn0=?)EUrn2Gmf2jCEA^U#nqzfgEU}<U#fIth7n69_4SKvf0k+K8>8qRJNX+%n+t zsAN`1%(UsKv&eTNvVM_8SJpEU89>Mf1aX={o71|GnBXB(`jnkjY7U#Hf;Sk=O-6kE zCmHRw)vZ=!mfr@dhj{x?P|?s-V;#SGB8P;YNAEx_-JxY6ai5wi86YY`xZIr3YFWE4 z(98$6cB+-CT(IANdLsJ^xuQSAVm;UNnu^o5>XzqFo+k4g`k(Z-{U{T7aJrdM(@y18 zPXJXwmi<;})T;vVor=GIiV0mTD_d8wyaX!~NCsdQf% z-CI7dG2IR|MK0m7^V+EN9+%@gdCG}G$1n`br)W@n{F|=h?JDG7=14ifr%f!8``q2rS1@5NOVQ3 z9$aGpADYgtIe!p!g+ku7e=O=q&d$Ko2P|&xZ=^6=tc6?*$I7S4KGnGywdlSS@M>D) z0cE*hH8~kbz806`E!*D`T3R=h?9V6uua-4w_|0P7YDULSnmd?;k&~s4!?^p@6Q18j zA9I2M6&h94q9g)18=8w8cZ^FSTVF*Qyta>$SZ8DJ@m)N9Vs|y^o)hs4Us^?S(U{AP z*SGCm`i>LhT$;+7sEMFsR4N9dl@TOgumEI}+NHRDxP$nC=ie=zlwM#AMANs@pmIeg zTDCW@*5O<|vm=1N#g0ShZ?$O@bUzqFGl-;FAefyYWEfXJ2D94o@PEX0fOR{Sg^308 zAjhQ}xE14(>)(!AXpWpN{mv_-b48+u%LFqCv+4(m-k*+_@ax9|rd^kkJ#or~B+>@I zf-7^UE~c&VSBhHx=1YeHG{%@92W10-eouPge_eT1_~NMDbnx zb&n+1t^OVLdlj`p(%Yll&n$u#U`Qpgj8|)qKi6N@yhk0W5diW|B9VNGw77sEl!V$nH`q!Ub=hrP_ zjntmor-K9pD;1r_Oo!OlZd|&9ItPqzx(&6NX?u@dxOF(?vM?)`QMuKREBs6F>Lj;k2T^6ajZ-@* z*zNZf=jwfT=KOiJjjFts-~p+pKp30>y>;+@v*i4JY!DSyI3UIp`yH#()62`A=+150 zdug3?LZ)_LKTB{Z+PjYy!nfFdEHT(nNiDiO2zM=eke=9|`w40P) z=J>9bIo^YHufwetw;z#2x)RDBCjS7`w;9fn?~0hZ=`K7Q8}!6Q)eMUY$vUqy5H|*{ zGRFKxNPod?q>eCzG;!p8Lv6-u&)d<&V*U^KH6}0At`s^%%^kEya9DEK_^(eq1g#L?M zecgRQ_-pY5TVe_F@e`2$0IDyansM8wlgG2;xV*IzD7m*QGRQFT>{em%^IooQymorm z6?f5^b}-sZsc$A)YkB=&mO10!dRC)%!&4#u0Lfi0nd1KdCtsx|9f+h#+3WHZh^7HD z{{RRn`P!{!Eb#Lci^*Z7;n?H#4|=e#KKx*_MSFRIfg`Jl8Ftr>GhDpRz9#`~GVItp z44U#i8uafDU)kD41pa9AjqZLq-ivO^OUV(HLX^NBwKaK~omZ!LV#eBN zSTQ2vLAa1;kuk_F~A!kJ7m@?OwSbfd-8T9#&RW@1joKTzSYOeKi6G+eK34A(M{az z7}_+_^D*oz&En@>dcPevjC^0~OItS5kc}@Sdu0CrDEO~M@_PJ?bHl6fuSPLMC6^{? zKw+K2gI&CG->yDPfxKTab8iCfWS7*Zh95Q7xUsxT(u+$Ct*lC3I13PmPCM5t9V1`C zj}Mikg11U^xPPl36?o?ktELHx?B?dYr?Q!(T~BEo?^kITG_>JgA+ zEBcnIW18``>fC->OEQwkpvYuR^bccL>gveG>sRtzc`Q*@G&)_Q&RFBUa_P5I({DVx zJje=uT!|M}#n<2a*5$&%7ydbn=vz42;#a}OlZ35%GmII$G1TuQ4SE5IzL>8@0JFU77BuB$%Fs|j96 znRGmTyEv^#mJgt8RUTdVin74b+pFfPK(yUSB`s(cuZ<9}~f2=CrXik`eq3 zJLBTG`1;7{-#Wwb2Z*G-ndXoP&H}7U*n51{@2p-pmEZmub$eHhpz`C2c*e6M0jf{m z;n++e=i&O>&HyX?*hvQ({i$|a>rhhqPSzOvpT0uNP?7|W(Vp}eM?HEb!ToN zStFF03H3yKQ4qCzUn#u6;%xc|85L1GZm$wU<-8i-)C8M%sH!adLnJ8CqN!FSoqebS zhpSH>e77hV`mx@CSxYwMn4af6)Kr!~e4YEy5iSk@7y_uP%b=En+N zV$EVlGy%P?c&aJ#4*3)nG&rb>V7z$9!8iv#;;Oa(0LGSWB7K7QL5d4x>1!*G%P<2O z1e_euNOe1ii$^jE)9GY!$L~Z`dTo`%4GwJ>f(o|iPikq5-lfs6Ex>Z2qYZ%Qbp!KM zXjpi;kw>YEgSxkGiXw~K4>m=(w{Rq8^9p|{=C!z%Jrkz>CJZXw+p>{`X`n^ovI388ROi92}+FSY>>pYHkhJk?n{zY$D#cY+WLpucpi2wnXCtxTc1nTM; zcL#$(WdqPE1wf4hiYe$CpnTN|pi~Nh#RRBf3J1+Kabn6xeZ8uFuj3P~cs|1SCU_J% z81tg^IQiR}#o=de4)gHzS-v8john;QQ4J!2LEkq`B%+#Hfx-K%{z9cOs^s9}sm5iCN}FZ_DG$KEPJFsOLJ@ zKx9Z|NrS8GM|AI95tx@4^z3kPwE--E;Ej(U)WvDpb*G9|X3{b+Bm?NI-dA0(NAYwn zxRtPTq%a$O&2q7=btxYV2w|}dry$f-S9az{4aN>Ytm4j&Y;&FWBYM^+u(+bY1F#sX z%0+60rmO|THmZqfpo2$2TgOmP(a~8xBZ15Z%SMpuQp&rWR%*v7(qfI|EQ_T70P3p_ zDl4M@01Sf(sBk0(Pb&C#jox6{FRun0iVKvP$+ zr}&YdswX>r#RqB9dX2r}lNka-lF+u!KkHBr)jT?nl17%s1CA+2DS6UlkCCW$W#W>I z^S1fH&e*CodT(Bm5LMA-Mg$VyRRBxjTU(f!(pD4h%L`y{?ND>QQ=(qO7-?gXVg~_< z$_fIl{B1G_Vt^z;2n@h#FYZoguFBWOmc~IF`Ln!$C}1?HH3pfSK7dSdylh!jh%HcO z9|y*6(&{X+Vq9w8J%0ZHYN8z%s&y!?=lts_f+cs9vgdBvDT80ao+h@uX#_%Ox1G43EOQ=yfzw$bT@~#v6TNx720n6GyqO zc%h!(Gy+Z2#t+YGx-#xMSO9EKxu&Z!do4cZs2j@os){5^0gNAQ84|YKJ!$Hm!!v2>Ks&BCdy*@>gM2WH6EXU8kD!B)K@Ro{9850r2tiR0HUr~A8=}6qB<{tuI{ld!7xMy?KjrL*b2DK zuS)2B8aU9!XCIV=W@(#tf8Lvj8?AVqAyaQ?L6q#%jllN<=DFUrzIkykXjke7Exu3c z`KaDH&jNMDw_^;%BFJ`;kELp}d2QWzx-)QN8^A$BDEI6~#X}pA4N;XmfrCl=n9l^0cxSfo1fD-HUzwtJQu-3;Mh97x50t-dQZp@CKpe83 z^k2bG3?$DWaHPNRp+8nBh{||Ce2j+9bt%CWeW{VN)4WM_X>gZ`BgrC>tV+fF(Z&vI ze0dAY=HJ5QabXaR;9)-*J0xi5J%Lk?XDyNFW>^+Z68d_{KlJ%NPol68$U_>&!Ogy zSn&*Du&Dn4%xkCeC#Jh=&m7BpWgO7o$8UIw&i3j;Yxw)tI=bI7M-5~6g*m$X#n1j{ zHqu(MvB3cB5A9jaYx`j>s8t${l?N-n^?12f&3iZDm*OR%w-&cE80L+LMwpy9?Y(+$ zTJzr)R)6C!RfU8i(&#kOe+uRpNM&T_E$zK|d+FDik1*+W4=v0PKnazkTonBuKecr5 ze*I^<`X{aRr?3$&^SO)oncbHI>i)IcskO_Qu7ASjTZFv6atjEZA=Eyi26BEYIq|!H zrw{m<;%_qFr&(i5MxJcst}u829^$xHUL|l*WaQ)0Hu*Ih#n4BnfV`8odsOPBjRtp! z1i&oKrCoP5e1B^l*Q|9b3o+2r-VHM|IMP^RLg#XK-n~+NaMyFvBPneHHZrjyk&U>m zGN-1h#?nNm7;i8Sy+u!~Toi%Ak>*G|s1%>Aj>4x^W5|CJ`qqm`dSrjZFocr+R2r5R z<4${TT=QMIxa@xjw2qv@GR8kW%9a>8?_KMMe`~4gR-`M<9(4%Y&4hgujBsm*TJg+&|yD|+Nq{?%7exiQ;Z zNW87QnosSD=jHrshsyr|;@2PiX+Qib^1UW=s~lu;O?CZu{t&$CF~I2&h2a3U81A2M zYVYIe=JLheE@|zY++ABqx$hegX5sum7wt?HM z%jZFDd=+GlK{v;!dGAP?X&? zawWd43P?U${ARq~UafjOa}`)wv&{-c8I#ltDDEqd5x$#h?vEhG3LH}wI;DSYV`G} zd_5hVw1G)!NY^B--27Lgo?NX$IK}Hmt>_U(tYuxK&%vtAasD9a_b^WJ#s2`AGLJE2 zb_*uPvDI|tqtv`n40h^0GF=d{%L^{ZJBr2YRzaQ%>7cZ}ZMwuJK=G;lBjeh&%sQ&P zSq!p7wr#wgYP3VNgMq)rPb~I}X>i5=1vdPZd0kV&Z_s`6DuiD^zL)4XS_Bon0Uny~%oYd;9 zjjst|7>!S@0oq8rhai&B%Wl!Zb zSx!__l{h+q1$&wm%-!`tU>X~gGTSmRg@)wk^pR7lv6bPThizvWyPb;1Gir(>kcbJ` zHFMUnm)H8FaWwG6sKK2kghWFCbDSD1g68O#T|riB;w_;?{t`w#Z<>nhye-iMoCQJD z&UNZx>QU`oIgDDNJ6`ys+PhatUt(aiWB%2!gA8}Hy> z#M{_sx{LDT0vNQ&r984Xt@$Uz!&v?vz7So(AzXmqF!u*)JZ*u{8VWEO+-0}`(qvGsoBC?C$R2nh&MbEGlE9~gKwtvaVA?W0e%fWR0XcK{zN6wPud7p~1yS7nf8>B~(eH+NuU< zs)61LplNMCdJN0nk*E`Z3E+{%T}Lz3tQI8=kO6HY??IgQ*%d&o2mb(JpcSC~g+M%! zRS`+uHw64pYFhY-muCU<$vn^<40h6^HnJqfLY^oTab4RWb!^5@(B7mu_@KGEg_Y3) z^4+3vH2LstpOaMrp9{z^_R~i=&K5LmOOJ9W1)HkNAEIO`z~HQljL=CI7h{I<#Q-Jao<|m_}{6i3S?5b`kezB*YY#y(&_zf=cvyetmG_Z ziGL|{>HueY*FH;Xb;dn0AyidF7*!fnSE@Ku)kA?m)Dp!5R8qxI_^24s3W`8bJp<4o zK`M%IK&TO*aYGorZ8Gcdwc_)=J|+)e>VneQrz@*T3ajo-aE{JO!sq;M<{fZ^irIBY z7dU^6)T6V$VD7fC0I{m+V81{f)fIWOK^nq9FpY|z)m9~PU3bI2OKU}GEzhZwx_nmU zX2&1adUSqon{5+$MHIASau0gi1pLrED-UpJFILF?_^2;}9hk%CJ9+TrpCcu<=41Sj8C;jSruDW9$z>F0mD$BSvoC!rx`e+apV33m) zQF^rmg64yl@fVF@vzN+fZz=8ZZLCVC(cOKx=Ol+{h_NoV# z(Hl8c$>f29Ob{0M01d$7G{IZJ{{XcB)7h(FFvtfWRRLUd4{Fw?HEjB7#yul)FwNZ7YPC`>DgxzQ{{U(T1)yy-2nqyJf{Uv) zkO1Q#9Eu1pPe2G%QSt`$K-XO@TxmQSM01zE6>ZA8k=rAB+@>%t>|F^ADX0xCw2;b3 zAmv$hHAhX;ykzNwxdueo2~-VZ@9$7`DI7DdsGV6z+ynljwLyc_d^n5-k)eUcdo>3) zchjVg>QV>u52mhwojdpU6;N{ZiHeA&K6E3PpTF-!Uw>y|c(KPCrJRAiOjHFw6)Q}B zui%+&UNdgZK1M-|dXWCr25qg(wwE4d%tfRKNJ+Du_RST$(0pp;r2NdmBMJO8jXURx zBdF-UCywa5Buorr4AK##kD9OtWz(RQZX$+2sW@O>9f&^PYEhljtuFdqwDLo$S+W5R zHAaIxg*?@f8eKofn6(n##?d#Kgj;cqfAJC8rB_+fdh~Y?32ohF0OC!4hF^-t4Yj*K ztElNLKI8h-!GDyP8gcSziXP@XWA9R|RT)HPc^xA`%SgdTA2pVrI`wxCbum+@G}0A5 z``2C=qI@?APN8T>(V3KLZ%F31QS>GBK}lvRtDmTl1#z*h4AJfWhNcP{DvGPh{{Y&G z%$hJs1aNUc4Ba;;Ab=|93T~f+$L~!U?+MNT&1nL(8_-hGRTR8*1F~~a4dw4ZY;fba z6h*S=7|X6tYAQDKC_1BkEDqQ>px7O4osiuDA}QD^;MEtsj8{?%qgTb&T4G1Q$ZTYG9@JRnY;DZsgc&2= zsZ&VsN??Mg1RmI;yB`eoa&)8WEPX8IjC9uOaOpYYwPv+GxKABe%nVoXNKvC`;gn>J zv(MVQ_T+IO+)pXXO4<8%0j&SODtLV?!YNuXaApWhYJN`@ zEX0+k;hwJc4D#T~6RsZLSyY$XKWa|Sx!<9DQQ{eIrxVJGq(-r-#=eyUjMO*!W<*Al zj`cwiMd`uz+|)5EbOp3$)5)ufew?f3$i_12qbD4w_oRtUa~wuOVc9h5C%q`CiE=yR zidSAqZ38gK@BJ!Ty$zM4h!sz)jo9vMGC0?+ein5el@+jPFx^D1nO0x(T<3-O`&X-s zdHUB)H%)1#@=FrVJlmQ3#y|LCwrCF?^&5VksF1gm^F~piLFsklj@8euojH#${6p&t zcJ^jCW=QSr{J9LNq-5>|bLrccHv*O^8Vt0KsH5(2S(9saD^E1M@dccOV7}V}uREH~p*C;^Q7}`q!ZNr=%uD>}mwCvb(7ITn~!v z_``DA@J$*@y9pF99@GL|TIiK-R1(`qB8~L}Qq_+%@rPQvz3QuJV}h^*3o4yU5hHic z#Z1!Nb?@MK;OUo^;f&MVBTF^Ik6es5sbMCeZ6fA+SA{{W9%JzkGz2NP*IcEO_% zv@dYQX2~;xVv9T+_7yMvXfIyz9o5?iWmS;E+H~6=M4up5J@?~RmrZr!+Y@Hib6MR% z8$=Osm|a-^0Igdki7(d~;Y7JJ>9>)Pl*E##1fu)b9%t7}_}9DYjnb#n1=zS*N11Vj z^yHjwJ?mP|H#!f7QKrNz3wCT`C2D;+{ zBI{4k+EXDk=H)%K6Q`s*rLd&a(Czk5zoeJ+9 zM`ri}x%JbhFfU7wH%otaY~PidYzN1uJ&)Rw7QIKSTnNll<#Yqc{bS;~$i-*%h5Y1t zVngZmEz1H5cfh5DuReZ|_fkg`X#QrbJd8=wJM&yR(;TNv`5uw;L^Zv(x!U7V z^1xuZ;E#H0R|Vof5Zm6~M*~QyYYS!N?*8Jr_gm%x@i&U(mKL>&Km4Y(Snf&^SOd2F zS3POabUz7OMXqFXFc!>N>+uF4UN6?Iy5XAC<<;F1>{{Z5An%6Npt+uYyhh+TGneD#XWM~+(smk ze!RM=%P9A(-j+up)6BQC%Pqapx3|@&b_PTCA2rRf4d9DKk~1lC&n6qqeVlh{wi@X! zd@*No65c4n+oNVzQgokz^G{ui?e*s$k+|tyPfSRz1L}nvb&*Nfed~u@<$5LdjSs~O zsO6H_`BFi0HknvqNccVK_xO1JGW;>nn(po>z&cdxkdDH+`1#u3ldq3B8S8;9~Sq}^_Nal+IbeF=ISbCv4bNs{Jsx(7U0(CBx4a_eD$}~8}r2sPg zik52Y$hwE&Y{?|4Ya>cgL&lAOSbJyQx%K08=chT;ygPSlizUPl8Z&4Nag6-e8^w;3 zvG#o%%#1pMOK{($S1WP9(aYhifyno%s-vshM{cp9<-V_xNkw+OEXj;13Pw^i=1-c^ zFfQ-2A&nEu3ffsuITcaW^q&#O8ibtyPCV5cip7n`Yh?s-pmQyi35cM;$)^pX@fI+mrYj*f2* z5TUgLkPb-a=BKh)$++p{XJdi-t6GftZK{B!hNu~$_@Jl)I45q^L6LR25CGn#?5A-- zr*qa4bwQ+jTu3ng0M@9W*jP*#%92ZI zN%bt=r27gAfy^b<42DbaOr^913cdDWOm*2cV89g+(d_iV0$Y zVxpdidMT(Lfxw{1>g*Mn*b=D`at9|B;q$#-Cz9Uy%1)vUh=EtlnF6w%L;!#LGh7{A z@8zSjiEXWwM2rHqKBJMzs0y*N5U!l%$jq(&)KNC-q-t^k@T%Ktpp=MX%W{X`{VJoD zz3}^LYl~ttokkEnKQ*aY$0a9B7g8`X2qY(lTngN%z<=Q}Nf;8Ou2*n=YKg@#9<@F3 zih!GW#F-2RISo-m&ZRM>n*i)PQ5!uU##b;971*Y7V|~=rv8i5}(L8BwbA)f;ORyo2 z@X7WDv5MT8U0WJPKbtiau~r~?4)vrH8*xBwxXI4g8={`Y-=lr$GF?ydKtx8$-(6H+qBhud*k7(GYBQMT$z9Bc>EO-yswJt|nq1#&-_ zaa)}rBAMiFIjSzUx|$*yIT=Xc=RdVdt%29#mBZcJB%}=@Mdg2LfJrI-muz3k9q+5e~2fwh2V)srX;kQa_D&5+Jk4N_|;;z{v%5@ z&fp`TK?mH`9Rplh&t#8wu|%?;LaSxL_a4=n1M0pPS*;;U8H%iI%&IbieEj>+Q`K*; z>@A^=+(=Mh&m)gF4WFm&P!rU=a`tgst;_~Xi5JX$EKn%_0Iggjp}+BEXRwk8D-Zn{i@BcH_9JjOilytpH^m zs3|E>RPlrHK}m}q=h~_&c>CgjY2w@M-io>lrx*n1;LsMXav4ch92Mq>*XjLsXtR`A zK^(W#DT3>JTUjHK+Cr0Lx0l=ODgh$1xPW=7sR#1|xAdwDezKDxOPEo~z%q9qHB4t+ zcs?n7$t@(^Fj67SH5~2LrQM;@>mrPaNe9#W_N%5lE{FJw2mvml4XQ;^Dhz2KZuCc_ zTTgFrN9E;55uGf9V!suO8XJ3HBwY@mjxg1nSzNzH=t~Kc1AS+o)Ap%o7q0ZYA2~-G zNuTws&YJ;j+8J1Fk}yYV+^pHI?GK#}c{syooYkz$j45qWRC{?q(CSd<^q$6?-1^g- z{6Fh)bgQX4bju@4HNaGueHbHctKH4^<>%|1`u3w->O*FVRRdKGMJ&~fxj)3~hL5I6 zr)^BC-)i#t{{UUQZ<>&7eo3c|)4KKl0KvOMKSko6uE`9TC+PVg6_;cx#qid_Pn#@b3H?+CBKD8QW(o3 z$su2IasI-&cg{L<*VZ@TKjC!JG+jn_FobaSk?G4h9oTzUNzcYQ>+1*cbEnTAQfZ~P z@={d+WKGgsZJhhp8tW^Dc|afO^G;@#Uk~7!=-n#l@o$Z_A zK7(`9XE0qW01J6j5$Tk6BC#jd{{W}6{ulKqKfx}RSk=}ME6A;at_UWz=9wJ${dm07 z26a_j4Mc_PqdZrWpVy-NgDrZhM{9Wr0LeQlu15m9S2-9kE;j8&Xvjv8JNKxm+F0pB zHlS3J0PjjgeJiLK+He#RDrg|~`J^ZqlSV+RL=sXPowL0bR?kk3H*k_jV^=yvgY=We zYG$up1nZqDYdOppDp7zAkNRW>h6b&e#OSQ9q>5CQ*_ceHRBagbgO1gCxSew=+^qiq z5$$a3p_2`Bc`E9-L+N1M%NpNaOmdz*uO0E1iRHbyYq}X zI?o+netzoOXgsqeQWT`AOWMI}`ou z6{yPmG4Peumz3tNb@1;WatEQU-fGUt4I)-O%^ z=zhQBd&|S+bckhW$O221L8~X&_N?mq<1If9S|v9fU#NL0fXy0AOs(;s`U(}Z;a;z3 zE~SRe?j*JrQaCP7lE7{=R@9Ng{{Z6={{X}P0Q9RH8uf7?*PZDXZ*Wj;-;D8AQif?5 z62}Fz$7AtbCr)>lUq4Z{xq{w1bNOq6Ld}tdKN;^`XHHj?I^T-!qPCN#xQ+F$gE8Io zp4B?P2^qc?wR>?L>u&^4rSRBr52rugv&ZXQMz@H(ZxhKPvLyEUac-n(Z2tf;t=h&i zd>7Ih;zk~S<^W##wq&U@{<2~z_a~(MP^eY&xqlO!c z1_)pwr-k1P*yo>m-;1_9oHYDJ)$PnncWpW(#}3y208yXdk8xg&amOFldfMMh9IFV0 zqd>DWwpIRX9al*kJtq1jgIIKTRz8;{l@GwKe%RJCth!X!_aNt9PGu+4k?m4_tJKK! zd;XhoJVx2Yyl@p&!hJ&(>gG6F!s%Keo%(&@X#vtLC1OI1_N5(NjQT@B#D|SrMt@Kp z=*u^x+k+RM7CgmwBM0jD6&4G-@f-+&wQ6=7Lc6woja@N|)w)!Y#x8E0t{Hr|SLjer zdWzV!mf}ZNLKfOJPzdGlHxv!wi-65`0LSsQf!vRJxK@?*zPQ=FSX~9phJG!3A7R zZXy6MpeXFCu&WuhiQ;~N`Jof2B4}I`b>|tZ^&97~zla?h^EQBh46tF*@xREd-gY<7 zcqhR<6>Y6mwlYiu$isiwQ;sn2y>viVMcShV)%|{_~)6ryfjY32=R9*#myt6CQ!#k{B!)G2} z)a)@71L|Y$ek(1xE`iWrsLbt}Em>Kv4(ie! zI<>!_^&IZ4T16T^hCs+ zyI`=F^3}?nmlPwW>1Q_ZoMSO2-rI3j6jqw3d{qk-P>7-+6LI&dJmbXnlS$NE#xkNb z1XSvZCGeYE#VK&nltyJdmHfXdL%ZG#}r7umBUI@d5`xs>E>gPS4II^WcZ*&P%0@x9+Mbr*5$)454(XG=hm}W@_@n3PCP*eo9xo~uzIVZgYZn|{N6D=0pFSRh#?iFE) z<(Z_BA_bX8`&AsIJ~Du@cuS@>c%@tkKHoGNlG)mI2+3bW$}(30WgkBxtf^eh*GrPo zSWODZtO)Z!2Nk_cb3?;&v@bMI8CA*hnBqhGQ${P_Fi{y81ojv;QLZndMMd>$Bh{J$ zWziz4u+!aGZAA>WQbm%4Nxn^H!LibOYjXf>voOddWhI47U3a}7$JUdm^IOQ1zJJR< zy)f3oNFUUUtc2{!aw_63jj^}-)EJ+Ly+z>Za$cSykp48WWmQ9}L>*}wRE$mb~~ z$q|m@8ybUK#GN4|v%XRQ9$QF0+~@=aW4_qpgF-S$1dM!DMS*F8SfFsULx`v!%b;T&K;Tsq z=8AB?{fBA_CA^7#sT3Z=IWz&kT!)3$=h;-%481~T`d}m2$Y?8g?$6gELA(r7sA{rj!ffHjK%)|YQ_!8ErSe#uDpzH zDT>Oy=n=?uV5|4juxg_U^TQKHeK>XJoy9dVmn0ZCAcNcyS4>u5?@b2U^^1spi3wB6 zx2PIu(6jMGDy*{Fpw<{O#)Bt3&twq-@Wzz2MBqlU*9mI@5{WvGNs5^$} z{WqnRl42flrI7*D`S-;Yo#S4DCPCC~&amN3nti>^HxnGMhir`ZwrGs1=4B1@q z8a&NOoP{+3(p_83h=`tCrNCl-kUsQPJx8X!vnh$omhT@mMbUNH05ROetgJBE9=udQ zw>}oNxeWG>BV}CqFX<%J7&jd@^3yCesb$n;jfvuj>H06?^}=m+7`TjSRdMN&duQgD zJrAOFyGylW1b{Fgx=Vy%n$6^BUv%IwF_2e$@N1Qr=_`c0w9wBP+XpIY!MWkSp_8GH z)#*9+6}Bket8Ic9ZP?ajR}15aJeIfWQAQeQBnDDOP~(DY(cOD)roqg}@qPcWb zXUHnM4YscRM+xz`YZ0?mLZ}r3RT+LM=>qP`;vPwfnFq)jt{z@>zZHC%{W9T$>54`O zbh{`gN#lCHE^*tu$I?H9UKf6!Vf<74TaqSp{!ERB-n~8jc{l0P@S~=g8cCyRS)H7M z`cre9U{@(I()aPEd;!wHC-Sj{L7%9Aqu#4C>mKfFGj3psb@cX_A(alH6q)1gLtVUh z2!U~+AP86K#w$#K>%9sa_zkq~^Y*OY-C~~XL z{`fU~Qx7Lv_wJe0;E{0yMx&oB0TEw~HM-{_j}v%$->BQQy~^Yr(pATq8TSUUd35Ke z&;5JB*ZmyIn&f*acJpKUAO2z5xOZ%I=j)ZWe94`#2Gz~FuG|AY8|gXCZ4YpoTmiVw z=7^olgByQZf)F;8Ad~JFG_6EzBOzWxup22o>avVpz4s$Kkx z-nYVEvF=uL+4Z{^p}mcuo(v+~h5jB#r)K%~uDx@wKIL=Yh#niVvYOBGY!+~Y%&|VD zIM_GAJJ+ATj{MgtcP2^qJCj^~*GT4WhPDVYNnol6bDH*eIdbyfkFB~adTlM?k#qk5 zmPq7{zT8)TEZ3LCa=v@s6`1>z_paFUZ_{*t5ZsX>PY$ySl$E2}U-`866?7LbiKAH-Fg5v%p#tp7la1;s z9wo7o4D}0bB3KZaqivF5j{g8Pp0D(=!gxJo>zB>cuMl|%gWV)VDwR4fvS?M-V zAMH$Od>DRnobg&>(J4Go$c9+UCVfZ_llKO-D++p%S!OaOp$Gs+<{Y(J6@p7}e=id; zQosZ!37>kf>E3k@0rdL|R+8>hEyE~Sm0uV?1HEm{sQ_EMNaDEi5Gn$&LH>MzarUiB z&5mEKbknXqHfw6B9+XK3@n!!2i2Kv7J)7ga04=1nxDZ^%ry*oh$Z%`T)b)BL_H_L^ z?$!e&h>@89*Ay}?QbF8(>#rT_&)*ox@ZU;X>!}uR;Ut>m(zslF3g1kuwy_3wv|W)V zWqC&A0C~-08lUy)J{;&~-0LLZj6@IDk8@qP;m@x3<8n!Yg3Lf2$>O@O=6qvj9ysn- z2g*Chr?Kz*R(fhV?xo{IXq7W6Uc@v)pB<|I07&HF zpYkkjn1dRiONA%ZgWOj+*VdW7BK%PU0>MiVJyJ-Y=qmdrIj)W2=LRt0RKxo;j8qd1DZn(o)V$h)TxCxUOxqJTKRJv@stlHj*Qj0%46m zBB^6nrp?s)n3M~Yfn(Y7xF_IZnwARa{{V(oj~IKGmPr|#AzMOy>s<4!+R*5J66x{F za;*xorT}SMR*{O9Ea|i1nUF@&#<&RWp@-5&ed}D~HngX?R91I5RT(G!tEFX?XA4|6 zpD1OFAK*rN{F;i|%~Uv`aA=51nw6JhsYt=%qJ-#j4=tnM#N|lrC{~f6ibxJ{LB}}l zK_)wAoNu)iO{LmO3r5+&!vnJq+JcUKi-3YwD43d9G6!zJcPR#(S0o-`TNpTu5YT^ zLmY}?Syf2&MJ7o~+^ne*p~jK-#Rb}N#Tq$%TO1R{d)91SZFD}hGy%fO4#UwdTl!Zn zqfzP>6EnpdxB;0#AaPI>o0<B^gx@R57GO){ubQR2+v&gh|wHpE&?&1NlfbI#}vVSXRIrgP-YH zYCQh{@X8Uc_Xqy~RlPXlbG>RMcYak?RXju5qN;dv+Nd5|O#J*%V_vif3G-qk95RLk z(OL8Kv~UOm2XTs;jEl~ULmeY3Yf_Af>{&?+4r_9t3#hbU@((po8)+M_?^QLiW8tg2 zsEn~d?-~M3gM*H7?^biCvwOk6htgj8jd1eY#+VC~!@2$IT==z%+jFG;6SBbgts-aa?KvhwIqhKqnnB{JwYkHV$ zR0@F+K(RpBpje=AC>&J_6bwZIpnOz90*XXc4T=W>fx2Zle}d`bENwtAX$DR8`b`DHN(@vtX=7+FK}Uj$^6Yym0A)zoBPcxpc=Nfp4A#>O+V3ZMy6CI&b0>-j}$6WKeR& z4v9bMLCSc?tF`UMzfg-G!Gxdk$Nf!A9WUWeT5EZYw6dyNy0n30I8fge2cmT@r)@2@ z*p7IZ`4WNy4Dng9UMtZ&aXpQ>wY5*eD!BjFZTJ+!XW3@>M4goFdxq&o@-h;G~JnkdJ8 zAZCgdcwiaxu8U)p54ZHB6H-+du6Wy;v>x(Ks_u~@l?34OY9pPw>o>kkbLv%! zSMtsm)SKz5t0w7k8<`-McVHkBM8oxbR2^4OTtgW4Knbdg$f~F?qG}2%35BAoWT*s| z+#T^$V_$fATOVIm@ z9d}LfwYzry>!QYi?4GT+qn?f3U$m4?xypNU7 z@_>8LYJE^gqA z#;c|@Do8mSZ9&vpcqY;-b!+DfAv)w@-mL!sFU@At629?sh>SKdDn_ZLU5BU-fl*u~ zvPk-*Xy=*O;oX$K_n_%~6V?9!D$bGzFuB9VG2Js`e`c*oti45}7z7YO84NcDvzW0~gPu0`tW^bh9&~@rS!hEg zMT%NI#YJ5@WC2wHyfsln!|^~gkpBQmx-;&&Xl_8>u8d2LkE2rol>p}*siTXSE~VQU zBp;pYT7oYk+-;9)pja4^+wgdxG(|xcPw%m+GbQONH$p~ENTMYblYQ|}Y1>$~I|28g zx5)us53#E*HsSm$)a2=1NW*z6$7&J8Ve|=M zR3K_2hWuFZF}Af9(XbL+f*AKv{{VXP_utp2$K&|te-8ShCrpw%)`}}XG1N-O4RGDcY~%blkh>&`NbQU^hC`(BFNkpj5HBgZ!C%<>$(u>OUH&te+Ki zaW#d-ywOhsy6G80@%{A*<>ZmRE5*9chHcT5^yg_7Bp;kIwi#QtE6;1Qn6wAZ(%^zg z+}5I2mFy=@!x%X~HBp|i7F>*+b^|7*R=-K`(Y*5Gf@s9At5}otf$>zecT1IR?ju5|?_RG?)&$Gu6;HLkbt zkHINB8|mE)cJ4f=LCX`)rXJPm@%(xGwe2^(Y8WCnGdM`b>#Jhl0=3snPFS87w1!k` zt#MBCN@e6bL+m~(#kJ8BR-+TH+e##k^4w~cA);7^GcWyXEipVr)U4)@&1kNz?o-th zh)#750qko!vN)d={wCc?W%)LVM6-a6aGbc$x4ma~>saaUJZWpv>@DqVv`KO0Czvsn zgprb4=QWQfllpI;7QEW;#uwKDK{dpMSYee;ly8hz9s22*z`GyABj0mZo0Q#pH{sV? zfqG(FNjOQK{{Rsq9BCOF*RP(n=kJ$s<8Kkk(u8yB6GbBk{FWR2!K>|z&RU%t#Fp3b z6K6Vk+A<=4tqwTFPQJo^yl2OLA^gmUC$#b}p<@-q;N#6vuo`R2)cW-Q06@Gc)$J{0 zpYu^GtgD!xKyrk3{p(!(W2v;dzm0Etgt5dVXkunqA%Z3$dDD~cTITyw^Er-#{{XbT z-~Rx7C-<)2v5j(lQ=;8kz~!1>%Da^gzeJe+VcNOhAFOV9HP1qF0)T$vxX;%0sc&cz z8fK6#2c|av0Mz?cX3$rCL8d^WEP=kE&0occqLQOlp^wsPqgKx7099FGR={@ew|Yuu zgS(K*U%FedbnPfbkCuRoTCk6 zx{U8$erK(A?(AvxO9#J|+R`#oBpS$XEc@oYAFn^-r|?%qTX>?q1hTs_%B{HP8U3ox zQrDw1YTO)y>Q)`=ymDvXI6uPJu^N~k(mm;HhBz-1_4c0@Rs_h3ujlz=XZw5#<<-{Y zLf63u%Zg7l%R8>7i9phW9B15CXDe%^@PANfV-dcQ1G|JLV;T81zG7CVQ&zeD6ga}R z^PU0tt+KDf*?FH(R4@%L817HKVygqk{xL%vS=#1Voau8G<$edvXRe`@%=GUC-`$lL zZ6XaLN;B$q82;G#tTgm)lhQ2uObwQVIa0;n1>61+n%o?3RPnv4MJMIrSuUHfZ#Cz{n0pRdAQ@l*ecCm$REfkJfhCT+>aUEYp{5`a{ zP-a!RlNo1~eGB_lz-86y%7zPQ0SD8lAV`-LaM5r<9FY$;G-ixxd<=0(6IhqFqBx%G zr-K8g(nJQNly}?SrHd<1!o5juAOk7prhL=~kDs+U>l3bA*G);KzrONhLl`7Tuj4}soQ$2 zrj1k!ebz1Q*%oOQFEeCk*-!6KW%x$jS*~V`hYu+lkm_2^YC0B8oBmV&m6)$Q{4ok8 zy#wm=POolFYBOE&O4=aFQBY){%8IkffUbIQBMb+)G|>wm!{~0-UouG}D$AvpkLg{w=h@G` zvDQQ3TQ#*?Muj9r-&s%`pL+F9G3WMabh}iyh(id`8j?bfn${XDxBmcOs>(T_mTC!5 zDhQgPVu50TP(COd6c368K=cn(F%%7of%MfA2~fnE9CLyH05;V2i;TXb;tMNc1lKVs zBRWCUNA#@T;`+RY@e9QdcXtw4ODiO53}!G>)y;YQo?Uh4hVO=~p3*nFza_4v*#w7N zgnZYRtFJ_jYb#cjg!Aslc;Y-IWoq87)x59a$LgK^DhKG#dL{?x-U?7emk!S0>Ix61 zJpS}uX!XvFuOuuzBsz=^2&y^X5qLyNJ>;P2D5%P#>EpFEG1YX=nvmN@v49VhtnH25 zk19#J-kov%Idp6)z9PQVJCbwfHl%#htHwXT-6-VM_ zY(;$tO!DPRA^VC5^&bVpJ|wnvQH{zRq4xV#MkiP4w~B%(m(7R~g1)TcuA?KWTG=#c zvBcK%2E#GmBD6EQpN2euk|n}UUwtZfN&p!r3=5+G4=q$^PbBEMbx@>werf?t&KEhr z#^R!fw+(S5a6|RTbn0)@^H4uiv1?gc-cn4l>0rZxDxmABqg!mFv7Sa53;G3IHLdta z&-v+`s+95=NX!9cJ+VqXXY)MPQ1EpGB!a<6{%xq#Unf+zKugaO;AHxSYbH4#8Tg*k zNTH57R!`%j$`?B*=A%)8;tsdde5PA%Wu#y*ROvxl#%q`8eO0V(8sgYwvX#=`P7Pcm za`W*QsLG{7BuaKV6f1vPVXkwkUQIX)G|wOdATyT5TppSDGj*F=h=@=kpE~=tM|zeH z?pxTGI;35>19Mpe{{W1~oFI}ten>dnmk3ExW0Av=cw3EDt zzDeGIXY00ct4OgH35=aN12hwpug$ImSP~&|yexMOL>trMnr}2sBO#7W7>{ZwE~n5) zxwisIOj0me0d4;D6kBvS)%u)dY6%H=i*8WkB7p9L0P-v!05C!c0|fktn-!qbv>t^X!m2LQL6zc8sBLYeoG5JsdQDUl)28!b zieNUDHIRH{XB8As6%`g*qCQcN9iPQ1H-`81&Cgjy|e` zFnEQ1L-=KZISBbEJ;?*{ref(-3(ccQPgM>o*uzl-D z#Ohu&X>AfDXBPzGWsH&V}PxZEfR;plwPHSwO>YR*{+FNq@v;M}{9MRy{hL1=M-Y z)fJP_`ukctLpqj(lB})1kC9XZ;-3L!Ma`CFj#62Xah1=tB`V(t{vq7kv{v(y@J6hS z8+~IP^H$WyuJlh3TV6&ahDG%jQ5zgSN5y8rJE%_EaC2PjYAjU9qM*?owy0|9Q)(bq zN}{%of{7!b9pa)X^6}fBdMgX4cv=}wpt=|xL6)wLf2(+YVSl z8Khk3W?YOigR!939ak|3o;4px)}yz*MMCeQKth-t$n17QRTYbyt4t{*sTc^yQlE+o zW&DlaJm~z10%%rUl>F5gH@*d(eNhydbe7hq9B)C7an`2TO7ji0p)7HMwL#qYE5`B0 z;u+Y0z%IYhpL1Hzj6EBvSn2`Ls}6F9ITgz?w;Vr?yeuzZGJ-_b@%ljhYxNOZd|Tlh8CAX_$t z$w^Gk$`}xj_B>am#=Gdc;`zQ@kxdp(72Q1t_Z6E`O=0!##0X)ziq_pt+^j%#gz5|N zn$JD0m?OpBEqe=An0{T^hLpBrmjw5&K2F;4$Igv3ml8=c96XF@Y^%Mx_i#BD#3_+MQR@ zJujid(rw|M$y!Eu)6I>)%(}?>z4or2Nb~c4ypyeT`**mO>Uq4G4cK{Ljdx6)@%vXU zemmc>-uR8JdfYHaWi*CMU|CFveLxIjC%)CH#9@9X^_cE$x?Eav$*Cm-dX z-wq}vaAdDgtXJd$bRmi-c2Xq@KM4^HD7d)B8~&6w2cc60Q* zg}<;_(#k-R4PL0ut;!!^?Ol0tuS)42H2mx$TWdL+eJ`nkqMqY5(xAyMx`s3Pdw56l zOE(|VvSOt-q^iqxXn~lhNa765_RV6qBgCcYl1l z9LX-Q5yP^|7u+5zmTh*IBV>3|anqyfLE|vHXfU0m8|lxn;;&q}PPLa6n_SNYtZs<& zFhI_5qwh|6UBkZ6 zBq<1OQ!{epa4VO7O?2m+amMYF(wQZ;z#6NZjoQDc^lONgHo09sU?w0=%Tk$tq zJrAar^joXXGYo}Ou=lGbp4fZaDb`aA@w8Hf3=yyc{f$e`H9D2h{vY&sE-qR*q7DpX z6@C=^)0wSnl{WrdlSjBIG>N|>dgt87x5s`2^6+wSed;-Nez*D*RuTq^?c{<+-V1@e zL*R`d zyrvj4AnXNa*(7rvXT)>L=G{EVV<%Rr!AV#jbM08QxgGaSw6*Eh#r4Knq07jO8Klp* z^{XmazoK73Z*8p{%=79XujnUid{*N%jFT<6NUvN+7=JLvexeTfskpe_>K;9@f*@dT zG~>{UFh0hm@?v_tYpL~_C6Y;uj;%A6XyPaOS1)T_B#88>E@E|_J9~sN9cv>-bp6h0 z>sMpF>D?c#-YK8X5hT0i-%dxsuAIj@B45KI&WkPU$nCq~aues8-=jL{`aej1p1xSM zg5^ek^Gks%4{{HBVrx)!soZ8eS3Q9)0IlM)Zf@@*lg(HoK;SHlTTmY+st-1E$?2X* z{J*PA8*8A^MF0Sx1sedhSzzCFWU-jZHcT_^mE55p70tn^& zKUn=n?rE8zwId*DmT%IZ8Lc3Wi{a?4M&7wwc_eMdekmea)vCz~De4S%xm3Izvk@*& ze`=Pf%NW>`GwjW>4`Eatngyze9{n{&8C?^_ zHZfdWG_sJ(=}@4RbKf7*v#sMlt9YNNPj5Hntq8Y~nGDVWb_Z-}r(cI3FV`c|y4}Tu z%vDun3IoMFdWJd94S8?+*Rv;a>-`?$EA$h7V9%rmXq8GL9C2Oc*z)zqtyg(}94OMt z!B8E|dHSDPm*a=)@Ws_`AzNvVfP~AO;1BxNZE4YTevTqR1Z0#4GCOUWir-)W0Biuj ztAbImVT13%pyhm1;f0bsqLBKs#Xnf~HK|#zH0qr(V0_ zRis^H*~Sk6{ip`Iwvr|qy+CfPD;T=AYx!ph6WmO(4@d!tR24B@Uqk#ev6)1I@$ND8 zq+>x}_pG$*Ec^r0;{O29*S>Qr7O59omex?jF&t4K_(4@PPNH_t+J>l9U`|*cYz$RI z=mmH6W8$>R(9{`zBk;r>LN$(J%2efKL%Ps#$H9G9rZIk-J53qfpxK-5r(;Z&WfNog zxbZNHsM)eV4JrbJ{{Zxw&Ex(nd%;&0a!Wb2k}_Y_r|EOwy=D%nl;?`*$%vqdS`Kf= zdOs%VAs|S~fUiFP0PRJNccl0{gBGSHGNFhZAByJQ0_#?bXVq<)0Mj;sqm3KstBJ2l zy0_fow8&P2?NDg+IPfI)$gfxU@#pfiTvx5f42!i*5}wDg}xKK-3S4p}?S6 zpje<-pm4QBglE{)Q#n-`XN^GQvw@0gV-EMmy*dy}+^HitR0WGxFKx~oz5f8?3@X3C zw~|KSd7hOYHH+qIc--Gp{8_%4bi|Qce>8w)>y`4iJZ^WW^~=k$KQVPPfxr!*e`?RY zYt}Opr(u;H!W-)SM#Uc z`AEM?4%HV{^**R$A}GCcw!jVae9;B;PJy5qSn8d(V%@$43tLeGjq#t3DzYD~T?9oc zrdb0GF|Q}@S*=D5k6E~RF2%*GMHdsRv;21RL<#6J`Z$v*)01l3k=R=2faR&x${U|0vDICmDYNLt$MqS&&5mS43{ zb+?V6WIEN%i?-iG{ME)-7yc@WReV5#OlesT4%MN7bJY_^(4mJ6IG_gSuQ`mVIUH;^ zss^@s?lBZ$i=U-WYJ+R0cwO_R=*JXFa^=_te}P$1k$8&6!I;`aXONs~Z=ijR0cm+< z)wAaVZF{3i$)DlAI219KJ|FQLS;*2L1is9tf+~^d_TDA8 zk(GSaS7i;P{VSf?sfy(KrR~EzW^hwe02F#ise>rmE_r4>$u%)bUY{Rj^?Q?7)e&xp z4heDz?TXYvP;|)l3|L@iP&glIp*K&9b~(r2iV2%2Ho}ba%>i8=;jJVu5XfQ+#808B z4@2nwBDcCaQU#7-%yKu^@~6FGsK@G8Ol4T&Me>GZ^zc3^C})o4#0+IRC&(d23Q%nH z&XlMeKk*x0%-ii$QPet2f1b8wQN|g6OH=^b!n!)T;As=E(~XAQP&~*1=?n6I(um)) z-b;`EZ~Ijc>SOr!-}8zn2*>fdr~d$(AO8SWpj`=n^0r^{)f@VKFaH23pyoQj#gt$E za-aUSKxN|p0Qkf2WGFQ)SJ1y|sI`ayvm7V|nU7#7Jb%YNIg)5(wJ|E8kUCBd?x5|r z%~8|-7xeqst}rnf60#v7P)4Rz&j6fMRTEyut)QGAf73uK^<+|g zC6sW;bDC%bb(T3$5txE~Ck&(QRYFU0;ZK<;SjQ$^zr8R4)Vj^RvLue~=_$lPJz>5_ z#Y{8@Q}H;0NTVsAI4dDP!zvAH6Iq>O#*GEofn<-#T|Q)lYtBYa{{R#mM@HOC&LhYg_0i|&Mfr_Znw(wP@wBBU% zqrwNKJy|S%ekg)1C+XI*ywOI|$i(?zk4g_=MJ4e=AYpF=Fl%j1k5>Nm0P`EGg(cob z0Ayg1L03fS=_59Z8<0d>Wt*jp7My8_+{WP97%Q ze%{m?y-TE7^%#rW>5AmOO0ms5r1iU7ouHLnw1#NT&Xqk)X*5UJ)+|*A8}}oTQB*v*BzDIX1J4=Q z@s4N*me3qzu~KuDW4Z+SbN3{`?d3NgQ zgl0)Ljn}{4tcVp-8H=lVW2q2XUUWTCmdPJ-#3!wA6PNx`82!41qlxXY9W8RbnBL-i|p@V9U-LX}rl!Cd#E zGVXi;t?IR%9BC|7{;}LsaTr!zcKXD=Jjl$LQ?EL9KQ*LxJtOfhGyeeHNvB}C;@oHC zR&dr&jyyK8Ot*MRyI-2#L2Kc%Tr3q+t28bY$Uy--{tF>}( z8jGgQK>46qplr}8ztEcF4W2Zd{jps9pN(?){{X<=68!H~mTkqYt;;#j>N&_-o-RH* zc{_SX;`c?0TL~^!B=f=Zx1cFUr0fuM@apsEUN92IY1&&ULQVV>d$j$@a#3 z*0}v=r>^)qXzXpR?0SmDqUoAjS6)+5<(sv8UP`y|FRtBmsG@?}aUxwTfefqWJRpB7 zeCD`!)3=Y8ne;?dwU+bGDRT^?%20i7dCg<-dWiM!6E*8cJctF(ofDPXC&s{m*w#9l zvSTV1(j1+($o8a$mq+mB?ci3nft_9170${?+=}l!Y+l{RfIkm|L)2uvj~5Y-D%~Gu zjlY@{JAZJ2HEZdgs^1`TFPWWoJHAfP#pmUR#)9Sr`g%YP4o?+{UJ^}l6&^6i7TAzXo@4Y2O4m$-Lg5X{{U@3H&&#Sg>cNw zp)hu1T|9kdPUF0=BAAD*bdX-}%%yL0yW0S^eEf;+r6mWCSX}F)Rv+(}_@fq!pBi|gS~un98jw%7<(s))b4k{wE$Ai1yY&m_yPn~lS{PqYjg;@G z<7(9-tg!0Kb#U!8i{#tdy~JOmByasiWzt6{;0ybhqv|r-0Pi4Y-8DJf;D+shYE_@F zIk=FL+VaJmw1o1+oSMXRt!|;#rIILZ^`FbaGYlZ%RQvpz)SBmhJp;f!6(zTtIV=#) zJ#o!GV{!=CkFl=PjB~xTI-gDIki-7~nTc;Bi`Ni=%TFFS$?ht3@Q*i>#gg1Za}2SJ z%_emnjCk!{e)@IBcTVZ^Npo)u0Qt`%h}ljG{QlLi59^;C|YeH|_OL=na_It$5vE!ANWMv(bvvHt)IaO!KM z=NY$M2Z^GB;_4XWMR?Qv$xd>a`KyT>=UeG5YjBr6C^1!1w+zjyG1{23rz7IeC8Q4< zH|8AbyC0yOax2f|{d)Xed`52xGg{l+MCAFB6uAfKi+znb<4(KEv&9yz1UB$V82}wo zPp2MWKJ|L%8RqR~*~OMcRx6eOve!BFzUD`}czdBmX$tvRW|2cYzV+6W9gi|~3yBURjP zKT?Ru{{VWw#-7g0r*vyO7{Z96Eu8Cg4DNq=>(3a)=x|4y223nq=g7y^_pM@ULr}m2 zUF-p4dd>HfJYkqDb1O#7cu$&&(CBa&q0^|gT(ED7AgSZl ztfz(;pbw?Xn96>rn8w1IP}3traFXPh-}r8)wJP%S4;OU;_w$A)5s-+zvCsS0&hy&( zei<=|WoBo%L?8N$6aiTA^Q`$g$Fg;w2iVPSA(Al?#5IZHAzcU?oY&Cw`SszROKZX! zIM!KKBj!gOrDB-!;CHVlcQ41UnenkR>xg7;?_A|>y8i&f-w)iFo&3`cw4Rbvcb6aO zUcU_2lg(a@ZETSsjxnW2KJ0zXdY)yp3W|CmP;*aiCh96x)sZ9hfO0<7n_7|6lm7r} zsA>lSssrksN-KET0Ra2Ow;Ah^FV>Y?(#NP}Xg#6?~_|YzzV^RKM`~Agp z@^P--FE6N%!^nRv)1GNP8kyYc>;S36^^4`}*~|4m65I7CzbzU_Bx!vl@HghTc{=)Y z8@(gL(c1wXxXZBqEX}$3{i~a9iYP)T0PHzF^|UR_^tP(@@J!RD!s zQ^Y+XzcCxfznHA9rE`y()U4R^8=j9OK4WD-Mm~};pS5iPrRJ@&Gwo4YP|nImp{aN( zPG}`1pl?)o9m*cnF;eOMPHSiLAvzdrYZsN*p!83~SlK|k8e3o_jeS43tm5mmLLEb+ z2Sd8DoY6{wjZ{{~sxyq)WA~yDfye3@6-DPAxT=W;pcAO{=q^`H#4$=e-F;uznu_Bu zKMNoXC9;}ZcLzRO5?7qy9%)xy)OpgOxe67JzTD9dK(Rr{{vbc5)iJ0%%cy?;0QaX< zj*8X*x^O;`fn1w#-aY_z9-MFvN`wCZ;Z}#CPMiMKrc^X}pgO^Dt&e*3_&*+hD)!>N zAJd6MatCjUf^<^F1BxN&q$nPNs-eKBr_)48Aw7))x&;|x6nnA2rp3lzQSl{}zC7EQ zMtdu2Kiacxk^5FJm9OJrUH&c3PHpXDQNoE%rmlC&)bY8? z&l~kALuTN|mdgn7f$%Fo$k*|?yNRAab2PGUO9o@jPj5>+RwZ+q}h|url=e={a ztZelDmfF1AkK#^u0Pz>VsL^#Es#N(f4Rb!(UG!8M9TUUi0jbWZn|U1XkAYPyZAJxF zQc;YYa0?&XdMsdcJGWsZ?HdMp*r*=EVOdt>v#Hk1!9$F`qgNAHT~n!AGHBHtne_Tp zF<;-cTulcziy*Z`g;Av_xb(LbWHbZ#{#M!ulw)_)bBefY2J^-javeTsP4ZN6Pg7WJ z*XNPTG}4lw>Gfk3aR3gaSTTH-#>`tZ0z=er8zda}_No*&1g@10t&SCcQJ^9ofqGlY zFvuir!6RiJ^+vjQ8_Qw&yO@#?GUPX}KG>)r(RAy1wW~>RtA>s>9*q2&3Z(H{nNQ{7 ziUxC~SPZ=s4_C3d1U&krE`FkF4L=I_e#Us@H@82Rb!{ks<50&u8VdUFhppk780@Dv zLPadh572v16(3%j0xj;qxrktxnEKc3Xb5i(+21=gtil%4pCN|e)ki&d)2FqQ_|Xug zX$O@*G!;YCKi3}uu9z-6+%O!2xgF}_4bF1h4#d+D5p+Po8+*|~++E=Fka)!a=H<6s z?t2;rg=8w+<#)%w+L|OfiwqD?wms?tSF4>QkQLPBT~3!uQRsdM{6I-WklskCE5=nO zZG@X+2D6Iq4Xz@z#t7ArS8-Vc#ywB}05w%nc0cnleX~$wLO+Mq{%)K7C>nJBFG(K_ z{*)_j%zEel0OtPywNy7!U*g*z{{Sc|03wh705R0T?{EJA^3X1Zzxi7&zfBdtjho~U zDyFfox@nT#BF>VtEQdb_IH;p!>A|NHFpmzZNH#b0i*PIz=Xk*zyHx4|nLd&-plFM#xAIEy|rmhCQiKIr^iJs?MYV zjY@Q}`_^$;uhj>eMyXO`JX1|%&bA5xqQkST;=!{UhAJCmHIuA^a5VA_oK64|c>`$=x zs0y2{*@TWbtrh&C>1jPb*WQ7o@lE8I(Ha0YT?vvXGVU%WkpBP{SqpGfwlPH)Cx_fd zWMVJ|bd$YQKTAtsfu>~*sO2gEZ&?cf;6NY0pDQ{j3LScNK&z!fj19LxHAW=8Mph?% zB%HRN)$>qPS+Tn@%`j|q<-}v;=71@#4|d}n2L7ZWURA;E?AWj@)gUUhZQG;P2KBYd|8vt}-!8CRXPe&V3DQ_@3Y{{W__ zhy&6_2^^N>)d`Rm!N~`557U|fq>DU&7<+G;AX)5{hT!8pw$t{i1DB=57(S3353F)( ziqZyMMOY9)#=XF%8j2F|x=9+oFk|w@hiU-i>6Y@uWK6)(lCEbP{i=ZOyf*q#2j+yk686CI&J;r9eTwh-^Xo zRT7GL59=sQa8C6qU66&K2oW6VAN)ERfZ8dxO)7Gl9eWqJEh zUV7=qi?|j{ZJo6*%@W3a*Mu#uNNZV@JwCKyl22`_>5hK#&i2WSY?5h_2x6qNu2h4%MQAV@NigTKj`is9@&5o^e7$^q6?fpfIpVjD=07mopp6(YUB7DdU&od_hw*=> z`4^V9@fle>ptkY57SWT83iEpHdgov2Zyt1sYOXvfbC6fk>mS&Yrc~$!>(kB6vV^)$lLi%dHl0oIQZ~>ivWLf0bYKn9$3b(&;QxpTAgz%q29Fn55Mu!r~*(s(1w~rh5tlz0!Cxp5h z-d%qaBG%b_`;x1uupBS%UHn|*k5%lw2k{cZ?WDB|V$iIM9KZnJZI6$&bn2%u=N=}x zexHkPE(bHmA$?h9j1#sGZL6N+w1GNrja#Plr-l%XJo7jVck@hZcFuB7 z19EdynXPqk>pz8_7PY#H?QRu?$kGr<2r!P!2fl03&p7k<*1JodvexAm;OLs)2^$@S z)O=)ps_Q?k-x2th8w)dZ?VV|hbzWp7WLGZwb>o-M7xUXSymCfc^O8!^+z-;ZIl!(L z>%9@-PO#BmTF44VAb&5+kY+p{b6fG;aqerh{73PCy<^kknlWt~2`9K!%R6(VeW}&f zxR~=RHDJf}6kyA%hR3~Qakout-%f_!FD=UJ1J5Oha(>mR);aYY-;6qhFElZE5x@aoGT}(n>Q5&h9`%mD z*}i5w8(Yg*l|_Z+tRX;IURKDI_BgHcF*^F@F1%9;UNpdJ{u4(z)tznGm*SVB8{BbScZM(XG39o)RDz?xXt9tCB43cSc10$ zUOU&Dzt^XWk=A%es#~q2Ey-0D>~RPlxd%DNdh6r)9J;$$y?dkGbtIDU+(B&!CfX(k z);jC&4&NjIQWqm4yh0~o!fn2!f>!*F}cQW;ZY+f6UP{i45WnZk0;=MbM zJ~>MshTTr#+B{pL{ZbvL zZEJ~HNi$p$Ne8e7v*hWnd12i6>iCexK$>Infl=H3waRqqjD(8jVA6=LW&?MZ1;^ht zb5q+L&xO1@(!$3*&DWbD_5N6{0v}>IHPen6y*pc8xUDDf;Bu-zf~uMq@9|w^k&P8) z)NU>vlxU4t>L6zoQK4_sl?i4hNB(EuA8H`n6WcV+MOcY*fCxGEsz(drzYj-rhUyZiV~o7>Z~SjyK5K`Q$1A@c zOAYvGV2DM;sxu%f13w6TzV(kE7l^y?Oq@4?w^Ary&3@D0PZnUK9>A@mxQh%YbaJ02SR@mJ{~fC#e4iyBg5qTTJ_b) zss_zfQFDD9So0VlW26?~njv1xra1{D0ECtusecdc!+snBZYPj2!BeSQlatMHm+Q8C zdL?ynAi1Kj`p1glwr?#zk8zJoDZW1Dv3kXk&vfquNqHk(-$(+M)GecYviHIEtp2p> z#p*;B-qtlZ7y(9@*Y0b0&8~CBKb!snw1W~%pur!~27T%g+?5Iffq)bM1!*+QGOdx3 zr0O2xl#eQp@f?vgkha$wYlbG_lpjv@=kL6B=4(fzbQqyX#7I2iGV-0+SDM{*pB+uL zxJBFl0I839U{b`*gOC(&y%ZJ9tspR%_Xi<|2Bv}pQiSw?AB6|ns8LN56A_gJn8U8D zI5lVj)^`_-2{J~Bp=4Y#r+w=>F6(^;JDBhS=Q@%516!Rlk2Uc(honZ0aT4kO0M%8; z^{r|#E}?i%9ng#n6*;OPlIH|B9@GY;!M1<@00?tIOxD=lPNC1*vtsD3m*QFNjv|r3 z&Pp7WKecBUUB^!G;B^8}frucKKAM=VyI&BY01^l%0MQ4pP(z<#RA!@PkIAZ)rx~JX zq%}p@pje`wff@$IK+UjY+$#`1aa4~dlkpfm#A$m0i^`FJkw$d<;-#9g>D?=+TilIS z^Tja72*X$Ou5CFl9@t85`g^Jp6@Vuj4^>6SZ!rG=L0w}Cw9y4y4^Qu2&ky6zjYURy$pV^S3(mV|3u%_-6mD=>8qMi_SQp=kojxMK z8Dt~rXxAw9i{)Qd71!e1kVIC5AJXjE0MO+tK+B(R? zNf;P9sfMnDrxB=@3zMBAy)e}O04lh~o=vxqQPYhOk=Q#1c7w4*!o8q&2!fAtJ8Wwgcm1NhbBo|{i-NQdXro+j@KG^ zdE5P{t)7+9k_F0)yANEA$)rW?)h*Qwo@x~YfN{(=KZF z@h(XbqKY7oAS$j;&^y$`)?EHDxDg9~HDki*1y|I6dbqmBpTrDGq^~P&jH%kLATRMT z=4b=ao!Aqo)xl5r#+Pg#fP2sZ4bj%lO8|dX`_LL}E{>97d`YxN8@*iyTzD$xF&Sn| z$Z+1j^5_bi!`6`$2J98j{$K-_{i+3XFH1*OhAE^9a#ZZ6`qUG<@p1D6ky^rz7YbQD zL;6uwbsn+QWB|zQfQ+t>NBUJ6_We8+EpacX;O8)>;u^oi~flhOioaEF|(Df389Ag|ZY(){J)2J4s@*Y4y&8^!s!kngB^$Hr<=p>xx^W!Z2`Sxt|jy(^!;dP*^`ycKh91iqP5 z8h?b@Ve?nnF@VBF1z0-Z=SyT7*Ro+rcgG|V*lkS*bnbyXxD2KwW05QUIHs$iPLu#D zv5APlS#eWQbiF3*V2E*r*panmag{x}T=~}c^=j1^#wn&7{1zG9c@t^#2dQQogH17$ zanWuf8lE%ds}(XX>zboWqj>J_(R9ZnI;-kf<;yDk4{8r(@VAZaZ$xMqM{^?TFrByd z6_L4p7A~L!VCghg956SP)bI&rxos=msG}$8&eB*o9+*^_54J}XMy0i>R*>_p^$&`p zGp1e}rgF=q!En*0pVf}$pwx=l1d=x1WQ&OxJcngzDX>qt& zHV5~ifoAIN>M*((eMcIU(E-iWi7L_(FfbYepWhX%0L|3WO-&69o#ZJ5=NH#bfloDkn&0U)DphB>Jv)0=?0BtEGmnf4hGa0H-T?e z)%B{G!80&zIsx2@XeqoEWfaQKavC)nnl~d`ANo;J7acMgjM2p;t&O8ArZoEs2am-j zGXDUTwu&Ie4%wDvEv7P*C@Bztrr0GI2#$qJW!u zv}24DiURJT?me<-jDn;!P*0b&O&X9Vq#M1SHb z&Nn3wBBl#j@^IMFMpv<{ie62CQb7lOTu`RCom7oLoQ>Hx6+qJ61DrCE*?2Wj2x7pW zQfb_S#Zd9e&5S53A~u*iT<3D<5K71siCfXH9E=Vu89tGsni!gwL?(x z2S|d#0{1sR`KB3$);u77^0 z&P;%U3IN0fKWf@zuj&0*NJ4&fVJFn$QL*?2p^fRfk5CA(MgvM8Qq8N<$&NOvmMW9P zeL^@7n1yb9?GY&@Vvu|0nwS-QS#>3p@*I9@E0u|2895#BJJhXXGHZCnG#fgx)shDKGB`EpaBOu8B%T=|kwYYlq^bV^TIbg~*F9sB@c#he zg`5{sPRJQ_2<_rNuP8@@(emxI>NtVB?0fTXP)jC+yvlU*fZ-F5wM#WvQO z43DTZo>?&sdOl5QBv*am_-`(3@3O8S1ja|GK6tEVH@_Zn_}k*x=Vp zvpiGAG&>!;@l4X(YF&6Ista!~{65Gk#?7iJLrTY-kD4PR!(JgvpZvAlR}sl*zreh< zkNDR3*z2Ouy<4XL0Epdr@-#8Vk(i!%1|Cv4XCCLdtk|*5r&qYQNo~Z8=&z}CXGuMn zdsMW>(sjpcAsJ;V&8kOoTH`$9H7dp*L+H|V3+S!TNWqwEEXN3$+|-j=za7_(I<=jq zEP8Ztn8KKECL>lz{!{PHYoAqQdHmMF2*Jo8Ff|&+gI*hi2;(INK^=umFjqmh4j$EK z@}ig3JgzdUjwmwvm4d)RB#H);|rrRbgdmDl)K<8CrJbG-9JeQfIOLldIT;wheGhSPD?dP0Y?v=>Gr$ejUd;erD(Rk%B@(8#=Mv z*0{=@>~_~)6zQNBYe<5q$qVVtdM`NR?B#lQ;r*PE&mlPz)k10;s-{QBJ%%LXn47N8w2m;7r z(JV|uCVLekvAEKpg62k>sLeIGC-@5S5TD;*DyB6c@%6M3yE1B+e+eRo>0kymXXdB0 zi<3YXvzlKplV%00o z=0GGuG{y6Z?L1OB-kz1^s-THg5-_?#j3}++^fU=DrH%~34SbKWCKqeq@8il`WLErLE)iw_(x9lSRonnnq!@^g^i z^r$T8-EQ7dAu=jt@cxw};PGDEC^s;9AKxpbcB-%z-~rrD$fx06ec(hNsyy49^B9q8YI9%fCv*F zV&etADx;I@9cn02>eEDqV<0djX`b63+Ob-nTK*ruw1U`~l2Y!3+U`vHR+x=59M9f z?S;I8_5=zB1=MNjS044!a?R^o(M+zZA{?WrWi?q)*Qz8~jzcgdPh*bMMfjittlI~H z!yuCbQjXyJiVWVPcmDvDw~jNY+z}3=zLDQGn|?JTFT!0>7XISb$^icWmad#_&-JcS zeQ&SFL*g#69iT%bikWTH?#w>b)7g(#FVwt8aeNBe=F-?~*An_!{?&_HoUrY>43Iv% zSsHtWR$PVFH{_CPX05pE{59a|t;00;48~EJV^%x-6I$n-V%>F7#;P!YDEO|7fP^dD zvk)80Tnz33rVV8py|Q=&<25hO)Ai)tYsURdUQGqCI#9G>Rxu{r5^K-o@@M0(9JRU~ zkd6@;KxdHZow1x|yw>ZkI%_*Y8sn4to8EwKrPQK;2ARZYP81$mrL9LV)V~l~OhsoC z1~CFq4jy}!DMDq<0Tn#gnRE$brwE6xrn1YD$$>*RAX1j_N_#BHaB+H$*w&wfx0jn z)8LBJIOe*ig8-4Hia5%J$B^5DRC)XKH!UU_D0JlcPmq4XsxlJyK9ih{s)Hk#3|K6uBpcP&iftfIBTTo^9Nl^ zzW6mjek}1T*uxv5DQO=_FTkpfi=y7V*6~Xuep|YREB^HciqJ?=PDKKsSf~)HGjDoj zrRtF^P|OsSEu?B+v8Xt1t@u)6e>GH)D`}g9=~$Sy(f8gR9w^IGZ}1 zbua$_hAS7De;U`RczeXK^$3iyD<+esL~Zn%)Mm9ns)8coy`CS(o6Gv1n(V%lD)~bayi1*4`fD9lqp+Io=jTPOpx84oS7A|Nsr+AIYK*b5 zkgDfQV>*w^RL0!R$Kolw#4QMoNy!Sw*YIi>rhghs8WfFUia(@ba>M@hXDO`yqvAV* z4jNfX$+iPxwd&5YTH`_@smaf)CayD8Pkn|OPLrGxJJBRlaK~0j$UG5B+~-8aZ!E!? z6u5{DSo(z}FF4SH!j~-{o#|fckFyc)M8OjHV%9jslHLWGzNLtV1NN$k%_mD(l>~B3 z;O^__X8EY7-T03xsJ4+RNB&WD%MY5N#YAUA6HMpMoxlSjn3F*t zCf+y8KDfr`PtHUR>Nf+3I%U)1br$_j+T}GA!r&6jIsNJY@BAACo~ZCOZZw<~ zs4y-%HSMT651S5mjmA&(sxz(@&h5vVhSFU+NdpMS$uhd2hGx zK}?-$Pewn4+4T}NBT*bI(#$%W#F9LDe>zVs{{V-u&i?>UE9b{C#7&J3-ShpaiVv@Nncz0axA5*9Y98slWh=H zZ!gp(ILW3XpXr`0@-Jk$WR^(Z%rK^KyYW;9(wmzAl0v9FMUEkZ7&)pVDbmEXPsL9~48XP)sEh{$IrtMqA6a z4?i>j$q%d$KJ`_3jldcZsX%>DEk{=gIjWVT7y5S*@=iRkU+u_`e*?Bp-r=& znl6m9fPyd>leZKa>t`Syr6P!&OB;H1D1Vc^6?}~%jU||_FjqMg1U1|Z7(pJHHeB}m z&_e$JplCrLkao_RfvkGv-LL@VqdY5&hW+S+?pvo{Ff*ZwQkpgWEB^r4C}WuFzlYZm zsx`YU%DEtj_tWfaQ5m*=AiA}DE6Wi;V==eTdtifF9k)mPL_S<;C|yj)_>J_a_M%ru z)4WQvt4kZKfHsL@913D;@qF8=u8m%ypH)mKhv<6|hBbtIyISd20rNKH_P)agA zNK~K$R<6`U#J-c=acvL ztpa=_0hg&6=DAfxFFUizfs@*m8NNU2iFbW8sk~|gF}L#p+*6j4@V&DL8MnhXq}IAf z(ULQY!lbXEc**Q2q`h8W5Ez*gCb`9*`#tK+<>E3R(+~$2Ssc61;9ydO<<4_@-sIv1y9>bRXuVh>wRnQ+jS;v$89XG~>~aFmskY z>(R&O*B+k#03(D=a2ZE$XF6I|9)$T7C2Fz1 z89J=+TH4w?nx~ui(#V)iI6Mq|*E`qyH_t5p0K+b`3|2A=r%BdpmPfaLRER&De#X5M z>~p`al{($0O&1c{$t9XXowe+Bq9=c`F2#*nbIt>)Y@?oM|1 z=CL^Vx3)izyfWQB_3fjQNsuZ!I}Ie{WQxT3Tm6qm{1EC^_I4N3&ghJe9knnHzz#pH zdVA~R%jKJ%_*VP?4Wu(yw~O#FC@h*vX}REJ_QE=YTmhQ*|%H{;Le4 z7Z3$+QMw=GrE)LMRIZ%0 zIu~6%J)aRrI!eHmlzk+3&1Xx?0{ZC5JIcXFnB|V0fcUE;H3{97feciUjEdVh+q&^& z^V-L0DyEpoK5C6ECOFMzj&|x(kb7rwSCOS_*JX++79tc#xON=Yr|9%=!hz>0jw^Ug zxL^Ft^AK(sk6<~)dU^bL`)hcQz#c>Xdez=T6Kk5$o7boQ6U}q#oXv9`fAIt=s@Suc zB}3=T`PC0?Bj@J1_jTKjap%l34G`US6Ko_xO8`d)`Kl-{B2Qyf$63`Cdd>7JZ6A;rPxl8J%u&h!TaykJ`1*n_26{j?bq?BZNC)S5C4| zVe?((aIxhUoqcVmx-qY!a>6AI^yKF?&h_=uM&k4v%ec|ym-5!(JwMDx+upUBAHv=V z$&|~2qah^}oHKfN))HnCjg2U*jtA3^dg<~rYtC$MZyHvP)tTc~e;}XIzWMg9J#^fP z`maH>i&Ng;x8^h!@{`}T^_v@Wm)K8?h$^ zlzJEUsW`nZWEmJN`Y%qjFYeuL6<=qG2O{o$CE%b+z}L3q7UFVYHL1ZbcLY?}=@!ZZR#4svbQ+HkQu( zjq9EAV$MKac*tD5Z)t4FiOMv{=Cbyujh~=i<6X2E%cA zENJQ>i&FC5tzR`jmwgWIXN{z|hxlhIs-BknikNFQYk869(Ic3V8K>V$6OJ)g4F%EQ z>E24mb1og7nmF0Y0h7gY>#S~br@Tu@XNoA@W$tVlzOGVm0(bu=|#!?>58|dh4N!ziKS)rNy%T2+Mr!S zsU?graV9k#l}9dn3SWooH^bvESDrCC>qp()2#~u1RB{J3yhQCq_C5Ey5;@ zk^nlK{{XF9N1k*}t8Wz7hDp@N0B5%?usiMm_pVpA=QWMfdgSxoqxAJrF-G$qKs0^- z0BX%?u?K^pm`QikZl#fx*f3Vog!=>k0BQ|BmC@m4(-OSON1{1jDFFM{r!4zAzL(R| z-89AkExWMq@%FBgV;1Pl)kPP#LO9vU;9yV&FCn#wUgAZM%{sL=a(h;7#gXS8FP3}j z1Qdt4^J%weY`kzZ{Ckt+#ab?LuJ#}Jh zW5OOO5+lcS{#&EsC708;ai5CRDn2IaQQV)(L=_F9w*QWE)qQ;VyM-(>1pJmXhNZJg1xIzn&mo=g(ZQ^)`gIdPzrrQw3;ubc=bo7 z`5HDGd8nsJ`-%?@|5BI7pkgS;p8SjdMCc(iBykj7PMHAEd z)yxH*T&VAz!J-7}y+Y%tzp0FYL1j)AK0v6h@4$XDMTFa5NXYT9TX%4AjxbNfLFfx{ z7ipm&@I#I02J5|ED=19TkVoi6KBxE;0xyXatWvCOW05s!KU&mMvFq{NPRkqVjwSUg z>{$C$_FQde{{XO6)CtrsbS{<2l0l^ubH3T2mrm)+0%#c|?;{@OiYpW`8Nee+0IB6z zWEy}gO9-IPl^k&gI+<6}82iugf7Y=?rxcPB%40(DcK( z#+~^z2g%XX0IY|8;8oO4TPVN;ih}q;g(Y#$;EEW1L!4mHRIW*?8bO``A2kJpy8sAP z!P$oOSIvBGeD78OA_7&{oBGI3!g7SVd}@h%6<^KTgZ`tc@e$$s~?Md0R@2 zv$<-PD-`vUp|Ubg%aTYHD}2E7f(ACrE=Uy}0|?0~pfGU21;!42s->+s`W?;2QDb#0 z>UNM70;`sZv*W(@{G+zMC34nB<+< zH>{1*;89t~43X^#028I~cBtPqU9pxX*Ap_6vlTpwjbEeI7LlS)uoVpJ@O zz=Moqky6p3-6RA$22Pxe^HWzDcD9NLX3pKKS|>Y}J@Hb}lXY$FO$j06ocvV;Evp{X zK{l4R5in$SkL6yV^uC?qh*sQ}xYaC4>R0;YKEj3tgYhCAKDZ?Z8QAAEOlI{T#Obyc z&?INPlAV9hRaXPm@8`Lb%(#){Z0s2N7wjk_6hoW}fSBRW{ir%`2X(V=Fp6xow9FKP z{{W_a#X;(`^xQcyv0RSBDrx|)F5203TmWJ_d8fDSMFo4%Ew3XD7>)a@Dc-7AF+Wb8 z%oyMJ_KetMZ_`C#_@~0aqh4AS@)bioBW91>(owt6e18nl#T1bdGMM3wqBt+xCbY|1 z@5EYqidp(M3+7899*wehpvAZGvMuexw2Um%%n>iwk_HF$Ije&YqIjId*OD?cmlrBl z-?&_#YL)>kE$=QOYbA?qW@cstF!;?dYA=Vnh3p9oj3bWJ6ontttKy23UJ{5zTI%fu zz&?T>TA&@OitbmWq-h%&Bye>!sJLhNpepaiHtppIte5ydr`{MHxfw3S7Oe0EXSG-ufx74wt~uASs+*>^5`vC=&6{;wko1wC@m3GQ|LM4KGaNDEzh2bHa)1S9y3HxVc$61cc3XQ-F}=8+M=krx}CpS)A2wP!{5KZ zdJ8PNoUxKJ9dn&8y#|TD5&%jCKNUhrSYt~ajzXQqL9+d1N~;{vg#-1k28gcrqsGdf zLGu~U)87>oFqZ1cl!tT~*)x?jbRNBO*6B=lkSdbFywzS!T}F3M{6AS1No=N90P2ns za(+cUlE*0a_jV3LhL1RNjvMB+?9Mmr{{RprD16n8n^NhJ9V8EIP<@JA!jS#mcbKN}uObf+&rCQo>pl-Y4X;wcY%Ztx(hM0~N{Cn1IYCxVA=~h8Rms!+KP;a6B^{AG#dXG)%B^>$B z6BCf}sX9MuYDP_^t(vnICgR!j#rc{MAwBACum@ z{{T)n^WPt}&sM%m3q3|SMkSEsL=SRJbI-1uj=QGx?w{f7Mv=&AO6A<+&6xWy#b>_o zlWW2}Z{o-5cP(Yty1h;*F(~GRRp$ZTAAboqw;# zpLVPKQR(0QEoF*0P%8#I1Ykem`QE&}Pp?NmBaraV;?h~#rMucLV?ePOTm^rY9`(KW z#pmmv@nz-bSXd{~X9!t5v~5_E1mkn;E0mjC+=~2V;TtRmzn&w3fa07;q{%yG5 zwOUNHPvPH+X6dF`76~pan`xRj$z(p@{{X0}m-WZo&m7ZDI-yvkmE}<1R_8dZe{Ex{ z{3o)pp7wEi6sp2r6qU5XJ<08`uKeGQJ;9wv#=nx9TYEN!_ow7Aj%bE3c~w8}S@&vk zFQ@og4!Y(`1r`xPp>6^7<&NV>&l^_Rb6zOvSG_sJR|-M{{41nBm-fLNABvH;N7K6X z<3noQL`gSI^9b0Da&{Vs+<{e<9cS?33%m9I011*aZzMi^@ssJdKHmHLRxE2=M^Ndi zier{JVVPfG%2!a%JM&qsMl9Vhs|8XUJPs-er1}m9bq$$XjSPz5YF6DJILBjIu-qHe zWx^eS$*lUddI@O?G;b@Dg*Xa3n$|I)CAbG0d<@Z2S;5Xbb6KkoZy1()c#jg?MH>Om z3jtf^Gt;X4LGZ+O7rsg z5R4}PY_3>PT3yg+K6v7{{S(ohP_+B9vgV0 z{NT>7{WLoV73%SG@#gY%_11NSw7<5NE1V%kGGVro5(gr?cg)8=db;sBE#|dl8kcjf zCtMw4wrl5i&#n0PbA6}RTYusnq17Xf))>O53MKNv^^x43!n^qT_KqF%mATQn5?EX; zWm4*Qhp!FQd(y21lCjR_T^~UBJXU$1^|nt{=_MV! z`BrIL)_pe!6=|_1>A%qPMp45kLh_w#MzA z_3P)HjvaNY`g7`wLEJ85IqoW=zM8~l79%Q2kK|BUbA6}MgIk@3Hv+5}J}0?~(!$`% za`LVfM=ZyW=~JtXan9F`CBw?V%yp6ijErdmfnPhm_P&JUBh)_+{5u;#G|r)k!bP9c zj`ivA&yOFH{dH+?9o$Aa&=VQbGxaV8#=Q3t<^;*L~Z zEu%L_J22;Zk!uIWzC4G^{Jo^0$sqO5!p1$m^~=fR&&OXMkAGa(L-1U4BFl3!yh!?< zG}!6x#Md4>xAoh;J!i((iTpJcm*wtk9!P_d6d}~45uA^`dLD1B-jm^1mN56mR>{>I zI#BZM-6Sd) znN%!ow!ZbAx{;|h!*zb7y>44{R4@qC`G;1j@^|IeemKU@MDXwBizF^vSOQ5KYys_D z9e*40+(&EzC;5%J&ii|sQhj9I-m&y1Nn?g#&)TBq4(Z+-MH!Jna&p=FMKF_D)Ajb2 z;ccwWoG?!?4*BizTH23v{G@B?%c+tdhS_N@#L z7Ia8tf=ML8uwSeS4qC=L+X&KFa?vmhV?L}W3Qeie@3 zh9gXahaA&KA=i8xF=fheRhyZTDftR3Fpe zm6KSJRda)@wM9ba;aAefP|oCVY8a~486{$ERK`?fkxNBzOc=7vNSh}F@J$Adjk|hv zF=p+KdLODJIMb4<~JYk4{8Fa92%5y-X`%3(L2Q% zKuW0&+cJHtEn|?p@d;>5bKNw)ynwq(58PvFsT};*>8A-BvE;Oy;8l>IOoW0?oO=${ zq*-qZu*eL<*l|Q$I$>?_K|P7ys%rTgIx(4z0bnpm@^*ApXXJ4mIrG7#g#w zdoZFZpRB4X;0Xg9V~sRW^7VqF&{XGqAM~gOyX(v}g*py5$8$gv^%Cw$EKV?6u%NLa zn<2z<=|4#deN@q)d?kE9e=h;|0JaMK=%VHDXpcs_s6w6QC5BVrd(;5+o}XzG#x3RZ zQIz?ElBeFX>&g&Zq-Z~eWN|2DbHEbJA8Mx3I_ zki-C^9@PMH^yH0%W?)k}Y(CTyx`y0i%F6-u6F}D;PBMiSB~ySk{;C1ju1%xM8dWi; z08wH#vyj+45m~K8cM*N@Rx@Blh<^Fzs4mg8?bw!ubL@Dm>a-#0 z+Hybx_U5LjnJvi1LZ7;df$eO)TMV3Y*i{4EbTrmnu1+vVY5^wbi@5_CAJVAj?|K6S zbAWw_s0`^oA0Aj~IX>O0>NBscl^BK3J?l_pT^7y@5<6qHR9j_c803wIdSKFM$6>WF z)@N5ziWzw)iVTx=k~M5;gHGO9vAHMUP#G6cNXMo!bNt4jqUWoz;S_I>M=L?x*#0QX z`9l$n8ssL3r|bv09`!L?mB&+->j`xT~Aq-i6)2Y!8}GfHEM91O?$^Yi;u)h@Tu zZDR;646h=&5-W0X!4)(e&^&2)w@NN9riL&yznHuM#@MPo3O=E2)S#9hJ=o_A$TYvf z`&336^qD$7scnSQw5z3cf0ZBH4ov}2br>&fr2haBiW^Tc{Ir}X8r$3sMF$V!Kf?)N zPt2stJU-UzmQmR4Mb{1H%?=rrf|G?TF{*&X>v;;8FCsJ^iRF zo2m{LATiwYK_u&ofF(jU-PWKo*n{i0lMFk9y;WcSF($S1)JhN$j{g99n1ZE(8>s+@ zsxFMMI~@B^W=~@!yo5&X4$bH%`_Qczyi~+AS8$}L%cY#Jtco&C;QpO?gKpka2+m^% zAKI?20_pz%g%<=F4CW@)gwjsq-y*K16XFOjx^=#nm-A7|rZCJ8nF;p>l8%3)_}=CN z8aw%sh6?E*^<&#LxQ@@Kej!0Ch~-9!br6R-mNED5P;DoRY|9Nd5p$ra*q@r1ER(O< z#>^VwM%!vTEe2fPEw?kRv2w1_7KY&u@Q&FAsN=_9exq*oR|I}z&nDhh`0Q$6v!rwt zju%_SSCM1_7?*O`syAk|yqg+8g#v|C2OCrXPvHBVj-_+|0L(cR6`v)A<*~@~Mn3G6 z(Ies)DkHgtWL)Yj7yHvpS8>rSuC*B4$0HCzlciVorkKa-UJ<&s%P11Ym|)0qD_USE zyg?!zEwR)x8GBKd-M3PTQb6=zf$Hz}tBa}LTM>_J)^Iehfr0J0pbHg4BVhgbstA>J z50SkC!8Up4ilOe}+(-uFnt+AsimB#1>IgHWoS(I3tZ~rAJ@wdF(_GU&lu@uz?fX^d zpJnRf)TaD8y;YCXZoyP$6qDEX71r_nIQurbEVh=QCC!A9x!Ai$<|Sv*zh>pHg)A8* zcw-8;5tP9hRL|-Iv96r*=XwtpPx2#6d0CIpPDPlKNIcmu5SZ9y~v2+ZDRvi&Nt$?-Zk5sfqFmTmrz+_cDD>wM8+wYD($!i zx5V{hyRSvM@n=-PSuEwWRTya^kIvQh-)h~u=RPXx*HDWIZl%q`tVc|DPE?^gXHUI( zyZG{cqj6V3>-Sa@ zdA72&dWIc2NBfH3Ju#0$=>GtTk=)7$R#lLVG225NU&CT{EJk^*oc*kI@DJigNuQ^& zmfksIvzG=m2V7B{WbOKMSnlO(i>@Q4^{I7W=B*KYcPTCKnh`DA2QMJ+6V<8zO-Sv8%; zL_q*xs~}|_qQg!pW;Z^R7tsa7E~f`^o@!%Slyf_}$rZfC20<~#TR**7%bn?M)y6h> zfCAeBlVy-V?_^<0i$Pnb&_`i^$ROZ1-wq-ai+)#>-`Sgpz+T?pij{UoD@(s*op z)zzqV8;ItTNkWB^M#)6kYU2P}$bcLvCr~7ORl%qEn{WR0KhVBHtv1vr1Ad%)^9@Ej5(FP z88q?TW6Lqq^gf^DO2O4b6#f|;3hyJ1wl3w35sa>}sTj+gW|opM;p%A(tGdXp<5Nbe za^D}dXW6M3odQ&nb(Z2IG?Sdhap)f;RwvfK9WRM5${3Slszo|~NCLX#{+QOw8nK;a z!#c$*q1yq-WgqmVSjg&@w>OTf8wi#&t89iN+clP*7fxVP00ngP$UEoWwHdD|{7~xt zb<9@Fg0U{Q`u3WBVJwA0rttoc)90m)z!%MKAf#!>2BCD=>eE` z&wBbibCKZhudR5SOyq6+M94n)t+3?(01;th`Aq{78JH`NN#kwn9W@5@&WjDyWh4b% z2>i)ksoR``?MVs`$2ZbiTL_t>mMKVyOrtWz^Yedz6HDOMo{cW|fu>z8%YmxERe90H~Vjj+lu~%~1&S#9E(wV&e3 zz#L~+HK_{AldF==lb^peKuLDw7}ZJEc3*QreYKRQF*BHf`t@)sHG(X}Fi3pTW>sH6 zUKrAc{{Y33qw0YoiGNgQ2VdTz4Vuy$z-CWG*aeWB4AB`PX(A*_7^&NOx>z@%$dJz+ z+67@7<)Ux(sba@*)$XIaka<@UM|?vuNNt&qg!cYr68(0i|O{^)T&Gb%*}|hVA3m>qp#> z0QDtm0NUC$Ag)+r2Uq%5kwu?RT$aE9HcGJA(G!;8P!c@~4sbZCh?mu*slhvfC@hB{ z?s9$2P(s`4T#e3nqAF;Q$Uf8)f(H9z`KW27L|;^rXea3hhM}tFxllsj79){CN_Ci( zjBckR^)G5DU-8YIN}&TfSbajM%!jOzsx5j%C0(YNAsO=3c_eo=G+Ax=Ary-)xnyDJ zWnZW5O))E8vm8-*QCcZta#~+eV@)t^&xvoeg>5k|0;p8tnwZa++%N^M9fo~FS=x(+ zx#_TJ$dQ@OK1sX-@GWzwp-)BWlTZ6-1^>KHi41B%lom^KdP zpwAJHZ@Hi@%1t@X9q2EX&sJP;c%Ttt_o-EOjBY4KsI@MG10)J91f4naxS|jL00EGJ zj196eO$S+6$&W3R5_qPd%U=tHAe@n%)YR2!uZI&kz!eM?4?~DB{utcuYHF8R>7pDs z1gSV6cBX(*89eVKs6t`$RGs#wn0}3GBfL^R-nIpP$C|oht}y&oa7`c`>fldpp47x! zYi)vl-Rhc@w$x1u_P=_{gPzP_=Z@lv2Km5UDgXnVcdG|0acW5|^IM3{>ODN2I(GM~ z5usm#|%i4f@u9&i}hb#|fUPWYK-S}!%`c%jWd<6sVP$o~L}nkpA+-0Xd+f&s`Okl=%mXfz86M&k|q!``4a*4{}FrjsC1x%Q~I z+33A);@JSy0w!>zbMR}OuKf7EIy*ayuB96>SW+zP*!7d|Ryp65jVDi%^Ya#y?=&$J zZSS`Led|ov;h;xyQP87D=_+<371A=!U`zA3Y*j~LYuD}7gSEc537~Knj&V={A6R&$ zX`u?4$kKNM;+TLsr-^PSz>tOm>A?DFf~zZ;T>71e$9k$H#y%(=R8U#dI&xjl9kLeJ zBmV#s94d{?O&-5t(4v7qEpL$?a_ml7zD;9PCsFXayNMw_RLVANdR+X|M}?RBSmcv+a2hwD_)de zx9?fB9T!7x`|rh1Wx>nR1~$Mw@+qLmtNo} zG(^0SL2AS}$j`QSs*BPwiVDnC1#b-$4b6(TBOhuEtFD+w8;YYkTM{=Sng(dSs*3!h zL0iW`OGQCbB?T7{`cL<$DYi``(nvYZM%6~LF(Z7FO%_8A<9#Qw;M5v+*V4em;5a;o z-2VVt3n4IEIWsqw#QI0+{LSoF&WQ9JLQ;gIW*!A1Q{u;{oQ-BB!il!%X<6E6x zT(Qt)EzR3CFBe177n$!Tva&n+xH)bF?Z zP+jKq`@($q%1l#0W9i4Y#?`GxA5-u&u_<^T^9Tl@0K--GOlMeiwnZy0tm@leBB^Hr+p^#}cZw#L|y8 zVmH`l)A3$@{{UV1ngj4hqe$~hct#?POen-|N%pT-j(W!*EqZrV=@Km8o41lfB9B$O z63Zy|9@VEdwUzQ*#u#9pB#FI653!~y@R-;D2e8_RjL`>DjJlNari#mxqemFba<#b` zA&X@{aB2+q@sdDQZW(65^v?*-?}{on{{V>=5gfBzIU^%PEPuTblK%jT`oZ!oI+&gJ_ch7VoW4#R ze&>o9sI~{%g66`A}=(2SQ3PJ)jXdX!jB~)h{*G_o&&FD{D@chM=Dw7=tVx9dMt2(H!xmE8Yg?(J zxm*V`CLn*cDXw8{jAVuZw6Rd%rM^XHrlefbDFt-rCb6rG`6C*zyA!b$rmSh$sEz`% zjDsdL{{X#K72NdoUsOPojDh^L8<%|=%kofNB#dUxn~0xsPsg??eiQ2&@f2y&0)jKO zPuB6$cnZ&{H0^WK);ID1icu*6PIt%luUC(sk2jLNL&jbjTgwviLlifoNoI)pbHN*P zQ?65v+=b6Wvgy`qX>|;5EyA{M(*@Hzhw>jU`w?7`E4^ruUI@w;|%8~Jf^6+MJkJNis{iiJDuQ|TzGIa}; zlHtTiSVl+iVoA=XTa zqDb`WM*U|C`_}6Y8vCiscRp_PM;*RY`FSxmf9qUrb&VO?$zcr>C}|Fc(sx1J;*i$m zjgW>ori|qfbJ(fxT4sp7(;)M9C`zKZ`hN9gjN@rWKp^B}k+`kQOmdUl8=KE96iMg;xmUT0W?&SdCL_ljiuXK! zsweBQi%9Mn(^M>}BB{&!RI1Cm@eEg2FvwM!&L;Gdr*n$Rw0hmm$NvCzS-@iQRg1Kk z3n2SYWb~eqCsrc%@aaH&xM5srIQTVW(%f{((Nf*K%Vs$n$qDsqAMH#*k#%1=w7@q5 zGKU{Q_N#ynnd2B`oZCvR1mTLPW0iC5S-pC$e{rWjOT>mq*`ko`Asegx#cq9!TfYX6 zpKa>Melq%NX}FyU0Z0x$DQ*+%&AfBtvnxCn&e6iTR*_B&hyIo4@5%oF9l7KFuJ8|l z(&0_b7kHIAak#gf9-(xDF|83H+1W*l=; zb&33X_GtRr&1d=50Y;p%H)HKy-yf4>&)*o#zVQ^1*tOFlM#E%RKVR5Ywj|}lH;aDu=_+O~+wRhq^f0}Ir*SukF$s9@_GB7h^Z!A{v$Xwru7U-c;HheCX zCt>%ih`@)(GnZ^2p$Q3Yk{Wq+`a6g83#&FvcL}tt4xV+bd>Q+;v zmKa~XX2pyv-w?553$rN%m5~m{r>g57?&!&lj<9z>&053*aKyK$;Nyy+fcNd~T18j0 zfDu9Zm?){!T*U7zbtH(SYtVG3>Z=o_JwHd3fHoxyx}I}YlK%h^h0dInarJv-Q4|ie zr&B1<%g3>x3hTr&x)wMNIAx}o7VD}@A|PgBbDvMO7ZQ;rpH6`Ch=!)d`UOofqyGSh z?xjOKY5Xzd;0$b22xtR_!_5TGa6<#I zXVsb?ifmQ{E$8ZCoFEkzO-gCf)NBOI#9H0se#E~in^<u1K}VDPRXxNybB@@e zhO@RAi<9blsM_*si$rx%AstaTE3j{Wy#NwiJZvMDGFY4`9qFbIeu*P#VmaRf{VP(KJNzBC+qV^U z5?+pJpy>KKj1o7;dYTGLB^+&0RNUDHlR)mO!*=+rUY7&e^%>H6S3r+!Pa6zz+)~!L zf#;W71}Y9g+s;Mk`KQ57B;a-@uE9N_!W8L1yog8DW$QZ=(Tt8?Yx zevrMW47KasKKAjVYeo{5Wm#}A*xM{W>p)a~86?WdG!mi$P(|uy{{V;YQmL(NHaJo- zvt(lx&a}NC0@e79yDk4$jnYo zz;>%4UaTVL?@<*rbQQF90C%f^KJ-xg_Y_q!TB-Q^)Ie8O9BBjQu8i632y9^e>gWzg zsi>)=s;ZhFih`M7*wImfB~iG|5NusZP+=nn+_eU6{maSD1~|sl16y?oqd3*5dp`6U zg6v7k;PSh9Lf^iK-@-*MI~p|YK^FpM(jxYRYOB_ zE`exZz0|;rmMQvx=7o9(O|-MQh;Wst7gYE=ouO z5;K<={`D1w*1Q~!x}pOoa(Km2fF!%IU=Q(P1L@~a-kO-w5ZLuaCPfj>spW=Ui1t4< zba1^#q1@O@<*~vx2$>1fAgxNxbY2zkkm`*iEUJ;iA}ok=t-%@EyYNFWBzW`*K$9E>R zCft1E_@Cl=I)&IoAHs#q5Gda{JlB`U{@p#6dh+*A33OGlvVz@4;RDEh*o>22+VNV~ z)lnI@T^(J#$lc+P{Y??TZ;~pipUGZlYo#mOF^tp_UYRq0n{^=_mM{=dSe+IiL2XhW zc^I_;D{C0yIEViLK&p!jYy6Sp+d!a@z~CtM0YIYGH;g9m% zXlpyhM2^nFHE$|4jqY3glp~+H?_2(vzppm@Wa-Tbv@+aDG|~oV2WZrB=@sPe{d#%) zd6Z`iM{}^vAdz+lPMt%!J*hb~Y+WW_FV8VdZO-0!Q{?{uT6Hkp3vuO;G?u~sf}(ym zybXxb?1$)v@ereAasU^~CBIM$+2n%C?nW6&C$GA(Ckn zj(=gu6|C1U#s@~|ohBVO7azuwOrOceu!*yrF!=e}x@JZ#ZS{DEQHW2j)+=}e;@L1} zz#aQ`uRoE~hlt!=hLNyaPNEQZ#bw__TO2yFkZ{={yVYk(`E^a^00vGUPM;*gaDOj23`hr3FwQpp>%Sei_r|-fx%iJ|J+rJPWstCF^1G5Mb<;faj2{PH z+g-a|br~(tBeJwNL}BnY3O*_9wln_#5xTvnn-J-`5hIUOjSr$XIoM*j_gmwa5qAvo zKc6D1WkywY+us!$k!f_sg!GS|O=h(gIUx?mVa-U>86ni$4fC4otP21$4Ml?fpuE%u z+w`k~8hdky;@O{GhhMcd5d6%a{qu4E0O6WyV^%K|OK;{|G%!l>NXn9(!hhDadd8<3 z=cb+An^O`CYcYf92jEt3THie2i+M0Zaf6XjdaVd8XT6upw*bi7oSm`U)|@ract+yV z!sbZtkUWTVtiXAZA^TRP#%$K7i$4*3-{4w;5FcEu2dsP#YTtc)_;KU=^~77-31-uh z3kGKL*HQkJ%k8e#NglP~{{RTu{$3}N1(HTw>S6x?*}Z!B;z;s$*Vd%^AyOiR81sY! z(_6Kesd|5z3rwy=tc0wY#*#Y@M4dl&5GX)`6v7yfS<73lfe0{+l+p^tHi!7#P@K(1Nn-u z2^8co#`v#4ee1Uzw>&NQZEqB5HQM=-uvbWr(H`B!UO4{%sn>t;*F$(i`7&u8;bF3{ z_OAJ#j#|O-wY;}Bmk?Wk#4f2b+zs$PYd7p`pOxcR9WrQw2~$L^ADE~}C70g3ee;#; z=dXa+nH^PCixLz7q>_EB7`EfDoAB=V2!LpO=_4{2TcTI4 zVzF8r{W?_!?*WSq1|l$2a19Z+an&H{_R%RT<`vW<8|o)~(EWM!qINh#AwyRLmLyF zi(^YxhX>WJOxF@hzy^@zfZ=NwmwtP}adid2QNY`3=XrX0?_dkNnA9^f;jxuk?aX-m zm+LAXq@yg^E>1!1T60Ezt*Nt|6Wg^^N-n1`$wgqJV&O?z1ok&lk2$wqH8-ZJ8g7cn zs`5z@)wY#vu%NMQ?NygDyorzEDs4m$Ie}mJ3i>iVFUd4kh`OFUvcj?FxLniR1gXMs0MpDifS{HCq7Wl^ix{AD6QtkU60a1`e+BR>Wu?4Myr#ySZ5U~qb=cg z)ZiSSQ39o{Nvm|{=x}}yHIHXcK&Y5ws1xm5mCL?;LWK1b-!--bNpRS~8i_a_^%bt? zR3a}*ka8Qn0F4<6PUH=V6dEgc8$uRH6+t^V7-K<9y%`&LBn^>}t+5o*p7PBe%nkv; z+iIyqT6Kpng3P23P7f6jb=B!`2_(OEZcSJXj_GuPpI-pxm?AowE=g>%@;&K_8~k=R z1;E3n3g51n2D|I|jaVp0ErtVeRTNLu71{>I3bvvLdc|%kzrALdva1jW)VbQMOA)iR zxRHw_Y;^jL*fi9}n)o{CddY-&o3M7nNB5?JTf?@oFb{Z)oXV@aAAyQ#h!*Lw${7UH zMg~MjWnb&f6>XneNZr~CP+77;ZS)UdC>5txxpL_O#~E)^1wbkRkLH?1j#-@nJCJaK zsG{?x#*U-S^Aw*^&(lENL2X7nlGz8rmC)&V6J794Vk>P z&tNL()PtslU_yQZO&vLnCV;vS%OD|xcJ~INDu&Q6J%F z`BkJ3)Gov#GE|>3K^Vuq0kE#)jDzZ2?^22Nh`~Yks3<55tMLUC9h_Um{{S?VQLbY( zL&mjHGPOmqvLd{a5V6Lk-H%`>j|cHjiEZw>tamD}`BauAa(<=&?nPKV>1K{(NuglT zNTH))+)z=rNbV{CWU^g)umRsBcdT@*uA^uPivVO3`&M

9xXu2LpQ4sa5`7w#gVi zCQvrtWGCi;IQ1Ya*O6c}f$y<7%p1Tca5m zKEUwD-iXb9j1;L0xnKrA*0XC-&@^cRhGrT-*q?gH^1i*+Jlm-q3BejkJ?nU~tD4s+ zu9?&ZTCA8}wQAi70^oYP)kf^zE|Otw)5uZ`$>+$&fDaTwJzJo?#Ko+@@?t)xC($zw z%i4&^>J~QF1yrkA+^NIr*&F7XGw%E)bqHdq=AxZmY-c$iYSgI4n&V56hF!Q}im0>C zjDe|1$;Ls(C?_hT4=qat8~sOmqWc+4NiqOPku-u1>V4>r%kcK<-Y900R)|U%DDyF^ z801!J$8XW@;hjveNF+HZ*!?w%(D#?rs4!WEK<|ozxGz&vM8M=9QywTI)FgOR$qM<1 zo~MlcSoo?TYkO^em>OJ<{U^YY5Bt>|*I4jt#zdChpbz;ixvEz;)a{n;WfBFpbs8ig za2Wg5Ml@#b&PkTkyAm`su%Tm*iVbfL_{c#Fo`0Pz<@H1h`Ul>aj_;@SpE}tkm_ZCu z9Y|zw5A9T5wwCP8JZA=2%uOU~w)+#BgAb$lYJQ&AQbn0%@_@8vY%3m4-t-XZUNg8b zT)p~bAz*{cj3k=9s#t4pqV+g0A!oK=9T;m_w#UY69*46;!axj1-$$qlmzJeXP#@ol zik^ysL28E!K;dXJd{xvXwX&9IwvYf7v7I^FHK?xzw(9c1Fu9G{W(}`d-&T1C?_Ig& z&h+|T$d`sW7!0~AoNR6`^rVb^fE7?9_{{I+z&O~*c=@2`x`$G`o9mg1fAH7RwJS_?w$MrL zXe$Gn2T?&>iNDPSQeC>_0&zfRN9z(pD#*o%)CmK%RIg;R>Q?ij%Ckhd8DwV)R-nkc z@gGcPc;;}-4v@i457^dKiryqhoFq}mBhE&%okFPGifC>&&Kns4v7fii2P@TlD#+#I z!kpzm`WycB0lhx`ZX#=2r6e-wB>ibsD~0M7Hyt+V0urhmJaVpdxXyR^uTP7=>Bqh| z>)m<}h#5v_nO?qt4t~35LO=V0C0R3X{Luqp<1cZUe1HRSE%lPZ#pI#OC zW8u?#cxRDw1-ol}@XU7to-ZG)*H1Tp)94u_$^QUK>t1Dfsu48;2B3V^8C@mZG_lCU z$g&mzj`%!cgG|v1gD1pYWLm|Q!JW#iF>=gF_M<_ew7R;|*F?b>Pz|(44CnqMM6K&v zbd7MKV~GY>@Txv*9rclU=Gytw@ei%F{rry``H@D#IC1nS9FbmK+VxM7&zoWDY`&A2NXk$(_eyx=0HB>Q6YAF3{{V;B*0&P#uCt?fo;ygT z{{YLa)YAH-h^hV><8saW)$7Q|qnYcb-enh7zxj42`1XO$0sjDmdsi*jSr&K;tJ_)K zwATn+x)_l{hSRHT?^ZL=ZnfcirMS3wZD#T{w2QXLIi@VEt5J_r1OEUBsf}vLpHfH; z&8sV(!l)|R#$;0=jr_8?5@XZ%s*IT+D$4MkEy?(#E2Z$?ilmB1@=S5N$K}k-x${0M zvcbK#D9x|AED!IRk-yQsFrj2EGNK^VNg3bTstW2h^2?dLl`$WtVSufU_^GLkqY!Wu za>ND2Mf?|ZNIDqg=?YCoqKRQ$BOAB9WlBeMUO@z4gWi!X!1kpu**IgsHM+jW)41OU zK9-{++To(fV9bm##Wn-xh>w|R{O$h$;LrmVrUu#1IjHHR@M%8&^=q z{{V=R(W84YiGmc7h{)V;fm)6?;J%08EBoBbAr|q-#mtioyXUwSzvI;Rz&<1J>ex<@ ziu`=*fojvwb#h?J6{j=Qko{c5vM94 z!|Z-**~jC@*Xg40C|u(D=oUGAeyZQDv#dW8bf~P=QLZPIpE@J+G!;FVf!eus^YOSh zrgWRDe=1kJ2q#QBNScsifNCoH{{Rc!YV(Bgjr9qkToG3jR$bZNU_Hge(^|5fZ3Y#G z+*L;tXA&8;9KE=gL1_-A)1GUMw_A@(vgmg4M(G?WiG~Xh7?69{erB;(^xlHj%c9=l zgkcnnh2=YAsXjw~d6Axoqv0MFS)g~e}8dwl~$o(Y+YC)0Ix>x1V zJh|OexF;hmpL$@@ho?y2$C}}_>BppC1*(Op))!~U59k9`pvF}pV#~*iVaPkYuBEp%} zM5Ox2?0(gbzO@})tdYWJd6{&?zH;jA@mc&g#Z8dSaTi`D>K##}wz5Ky6N2G%upjX? zP4-;I_lLg^VzinkZ{oTprgQXa`+QWKC%d$sURj6$ZcA(hbY+KqX7{5^WF%nfSxDW_ z#Whz!)O@gQiUD$fD#SRO=AQ>C-qxaq~Nd%=DyOCLMU zfhJ&Zj=0nh-n{(vj<#qnv*W3*?iOhy3Xz6b;8q}jetqh7-nYjL+jzvf$kQ0zy=Q;x zSZcfel2!|NqYVceRcKC3oF8=^N)HR#c{CP7%@fD3u%FLYO+O>l^ z9;Nw}0N`K^+jcmqhOCpTMysYaagE6Oa%qOLrRw>?CnRl#-mU?s>N=zZ40><}Z2Q#3 zRc6homt(f;S#*(NO3X<2;Pk(80;x6;LU`_x5O9v74e9vK!zL8t(I zNA|0uFv}(ez@7*nRclNa4~DNB2g)EZz{vv@G{&3wAIfDCT*c*)nHUkNPr#;_XXyPt zGwQi%Pz|G1Jk-+)*7nLGN?WwK;L35Pin?DB$f#B;Xre>DS#^H&170=oMVK~}$0>ku zL{SZ~kqf-dtA9%|-l&C~R-s$ZBuSr1Q9)g=SB3(_sgRwNV_`tLe^lMxAQY3jpY#+| z9{NC7k4rZtcA_(8xRHs=xAmfo>BP8|G20%HXd%=r zw;N+TQDA8zD5UMZMx?}gT&%1%ARY&F))jf<4)n+gO8iZ+B9cLL45Bk-WF>gzXIAOywYn4fI-0#}0s^_im zyqOGcL&vL24t723oo(qp9_V5SFbHoj`Ko&Wc&iz$Cbajefcl;EcCndQGq5^VBpGHj z93NKk)Uw85G5G|xSne2)Y#NQo)9Igyh@v=Uw^0}YJlLCY@P&jC)T1KUc--S04?D;gT4VE)E3!8jFGlvVrVP8vM{U72*@Wh!Z>gEg#mVeGTX9l z3bO(J)m0l9zMqzAM5{Vw_nPyeO)U#)Iqp5{Y_WW2(yk0oJaQ8pSe2puNsjA9L-5rl zkte#FQE8>q8?odLf4xE1bz(G({{TwJ3Q5#S?hIN+H|<42&Nj?r2h*sMYQ$@V%~VWB z+Ne?{l`O<6j#!)usPg{+9r&(kT-n+(yiS@XEBcS$+O8(J7-5bbP|Kt- zjcoE93PEQ})x04c;f)vn=L}@ z+%~!2CPv4y=Ax{d#qvXE9JjW_%*O*pQE~2lkHt(`T5oe)b?Ex06}5^8_{B#P!>H{1Oi6} zgGHq*pd923Rlr59`CI}H0Q8Z_syiN&)>cIcF6wp+dC$E{fqLIZF}amVECv~e>mKLr zS=OS-ti}DS+mne^Lqx}&x4`?>rOMA=9Pi=xibb2Pkbn~`?j@7;=l<32;_P{Roa5Nq zjOrlKLiLM(HrjZ9_^`4M+*HM#U=IrP1hTb`1s<=eR_^50iPu`$CaM-_x>=}&nyNt5 zPwmNF*~tA$Nz!yrDilzKfGywpQaV{Nt~^s{RFfzUGpaQOn?Ay>Fs>f0H2(no&mWXA zktN2?N4Q!6E_xC`Bbh_XEOPmh%Ohmq^Zh9x=~sVNKvKH(9suVxo7OCk5Bx>^L6Y&> z(%6)?M$pB6xrjLJ+Pt>jo%x=xKWR*Pj4L4ut3P8>>qo*+w6~GMs?25%jH9r@ z-nw%&o~|1I0IABv+B~daf^7+`VPfAI$HiaM@zZs`!i%WIyIMHD^M*?z2*PA!9(XyW z<(_-jCwtN+ibsM#=6L?7qaJ2E_N?Q2&3nac1;`*^mK)O*sw_;=s6b>oOERz4v{05- zWF2fs1JV@pQlzH5eCIp+QUmo#qB$Ny`d3V0+dg0IOHnSD)E?eLBECxk9S-W_*wz#i zkt?wURDxS>DypB$>N^praO1U9u9`0z-$4)Mo^az%7e1z3{Lv!`?%bg+SI~J;??pTL zZkkl&ox?82>}jC6I@IkN+cb<~QH6|bDXPjO{{XfHO;s{koQ6+H=O^B-vtveEpz5Lb zW&Kr53=>0)fWVM`4F>O9>Nt%ef!II*Cfx9*v1_-B$L!~#bEpt-*~*U8ojP~n#+zLR zVjKd*aw}Ek#S%bIaf+DesO;KF&f8{~l;#8qKpLE!mh8V2WlC?5z>(R9Y72#otO-`s zzQE8?`7`{d`c{)h#9mKKYq%b!KT6QFRGuGYfoExzo!<)p8{^)tlBwx^0_N^P9l9}W z`klQfpCs0~;?{ca9)Zw&BL#z_-IbPn=NJYx73t@UalPxTyuW!s5o%R!wUMO#g>-VY z=Dt7ZKbD#a0W2j_AK6ddy#8)A=<#=rF97&eCug~xL&BMfQ2wLu`&N8BFPFD=I((6U zAe4m%(-gj>$KJh?W6hvCr-^2?MtN;jurMTz{Tc09@AKl%wZnLQ%(MP-;gQIcYFW6! z_RqC>`ThFqen(T|Zj*5%MfqY%IpG$MMSWTUQv_N zCqGE3&Bg9ITkfoknh=zgj+c%7G9_=S=OZJiI)MZy2wr6-Wgfr1C0g0*9Z@WmGK}He zCa&Y=wu&z2^IiuEe2rj&->!hm%lyXpT|U1n6iT*knjYN12vSqh$Fb(FGpv6F-5gv+ zDkza(Nh`#d7_7#J!FZOfB1lyu(q@g1fA~dfuCUE=T?!Prxt8i;G>6K-n}_&670>mr z$4@j)^D0PvEgQ0`@V?cd!`$7TqjL?g3_O-(yI^n%sod8qT8^G;w4Fp2;Y!AQm?0lS zYke}aVe0kK=2S3BcjbuS+^#yrIS7&}7|=k95I zr}2xM@h0q|C9S%|in@J6QK#}Aj(P8|9$|3uKb$ub6ZF=7>dpeqZ1)ptmS%P%Q%J`+ z_^e*7ZrH81W)kH#gA5aBICxYGRsoPnxkS3*5`iVFKh$4Fg49e1}1BPDo722CsXY)jk z0RA4H=9aE4wYp3d3L8=3zM)yQ)^KjCAD5&IZZnSJq-Y+Ug9Etacd26`&U;W#vQXkv(q9DFx>VBy%k?j>6%y(oF3Swie|NC#>5hE z1vF_`*tAT1~qn7$;0Gp;5n@kQ#Y@H-* z2fk>Sqo?%rFXv9mBT`0|KUx0(rAn|R<(o?@3uGcP+qoK0eX7riexy7;>+(+~wW!RN z$m`RN4*8~o($_%LXfp4ZpRqd%DdC3$ImgQW+*H+M{#SBywrDMi*?|lJ_Y@m&#FC-avttM1rlJ;J z8<6${a;@=A1uullZ>)kh7#vj9OQ^)~Mhu!99h8r%rRk{}R=yGwT8(ECO{LYbodepM zmaezxi!G;;RBMh`NaY-YDWj=l&$niN6iJ&PFgtUDiNZ%5lM~@Z2hT- zGpygTxVE)XCDV=1=zt&8O%*8i{c zw$Z|`D<~@(mv>>D;AV|T<~%iGZl<34>e&dHe7HQt*+BLm(wMr{xbRm`a!Iv}6Ukh! z`_VSE`hQN21z4gQP#lH!sA!I`m`}JOqJg)Fg9!GF&|7Gpk^cZQP!%u%5A?-BjFz95 zc-|wGWn&~PeLMFa)m1*1)S{9>7$sO1^tRcgN++(Ykd(QFGQqUmC?Do8zwKLPq*-Kz znQ+m`3w(kx#TAv|5~j{A7{D&OcHXizW{;L5CmUyRP*Z46>j()rUIhTxz9+MR!c8(O z9>C<*q!{-wtW9$_pNi9J9$aXubBy|$n2tZHc&_GWI^~e5KTb}K z`(m|-s^6yFyk=O3@WW$2Nk1Zqjb5MO%Sj?+xVnvQ-zFt5ogW5@$O7)tSfm=^bR1R+A4-X`PhscZ$V~`Dl3`snJW|{jZ!v$rFs00{wAk^)CdN^cO+K)Y#So>X+P%YGHLW%jW}VxzW)Hysx&UF^(ojKjF8ov7hL2R z0Imizk52}&(>C$|_Yp)mKxJ?CsbCi8qX}*z1)J(5sP^`xO65FvWWwmf5oZXB&Vc^_ zm9=z>85Z}FEP7*doBD^p%~iu&-cF}0EP;q1m0~mTMk?!hWVOVR%E;j4DxQAzP<7vp z@8^rjl10#1Gct`V-v{D=AMp)NuO=T(1_uWe4<+noe=*dE$^QT?ds9$#hfG_Eiit(4 zozTb#H7d2Pe+zFSk~T|~nipjZ%EUH4+2W>;OqAPL#7ZKl0BBxVoP5-@$DZ|Gt0mN# zIUww-S!?hU*^qFO+d7xarEc$}wN-^Y> z!b-FleMiBvCeX-TF_MxW?Ndx)b&FEUu+Iv^q=L+ehN^&XJS!Mz#gxv@+cA-}XrX|f z%I~J!1_4aLa;(3^Q<}Oh=-w!3Cz5-iEY8T@T00P`-uU*Q>3lu-g4$-5?qIqAF+mu^ zOYlC`5x3F2Qw`)765K3l6ih=bxNTc!096#tH%`8=Y37Zhg5C6jqYkIoedsbewY99> zDmg7)Xj0jV=otlx+a`opdDSP2rCUvBa>XK$t;@DN!rt5D;8a{?c(cbw>e|*cXAZeH zDx(0LZNGYo1E%OEC-p@<0v07-vcM6}@K0Oc&QN^#~{P3(nUF-edZS$*ptv&3!|1GIB=b4F3R1 z=T8I zM3z0OhK(3!9`t2v#ov=eOj~cJCl$P0-8Cw?664Vw)J!fY)<(gilK$L0~p$(gq1MBc0K5Wp|r@zWgm0B zP-67nM0;0%4{Y_$yUz^uhP$A^!jNfO&$QRC}7w7!+Dpz<2v`GHe-$ou~Qt#Hh) z((H786Y1V#P=wC%$%0I#)1qN!uYsC)W=sx+;v84A3IL~cO+k9w|j{bt%F zm6F|y#-I@GzD_rzQC*C&taACFu`7hf0*hj+Kmf?t_M+m=0D6hR?NA%itnv)34v>5D z)r(r@A#%Fds_YL38w!%TdVrNV9OL`e<#XyD#^f;a+aAL`t4?VTNyZx^-lwatkICw5 ziFi22wLM+B^JtwRN0=~n^$M>&Rcr$ma8Da4J5y4wKnCPw_V}z?DwXgFzyqDCN+KK6 zw!wx-ss&O(Brylv8X|h7{{Z4OYf~D1QWb({hAn8I4QkD(=i0h;8RSn+>F&Zakb*}M ztdEnRXPUh6sd~q*^v;cOYYM|1#AOEHi1&Y-*SC&xJl)+<)Os1gm@`Q-;GJJaJ}H_s z>@vzEeVFVNa0OZMnh(Vmi8a5H${E~)7rKynrJ72gLX99qwNP@2mSOZ~{!?*9X zP-lo`mPLXXq92)#W!6`7k?rwO8r@PBGTXH5tW}ks5IqU=TQq-Hm`M?M_>F@O!)mOC zjzcWbqTt5Lvoj9Zs+F~IK7d>RaCkMT8T@jcKJ!Z5O{9Yy`q{f+^IZD4-#=7!8`!#? z%n-y#i4IJpV7bOf9~IAa(nn_VKc!y7S8x zwYsNJF&NbXv%7($_8#@Tb2o_k)OJ?yD>CcR{3yv9oYs2l8XSTPKTwuJj z#7;@?y?Oe&={^ML*0#+4ZRvRxwHX0ovJ>;(xmQ{AO4`~yj1-iNvGSFeog?O={so>m z!xfBWM%(Y2G%=DL14;nc-#gJhf>}bHhCTjh+~Uzubs0&-eY;ax^~Dl?W7JMgcOV_8 zfZ$Vul16zIn$$6jlh4@JWL+6zQ$fpVAmI1SX%i+BoV$bDNZ8dyimVg-p(s1+AEtt8 z(#pFks7~WzCeO`by$QchuyaLu%aISKA~MVK3f5Ny$=nJ*w!!m3>F=KwMB9 zP+oxJaf3mj)6_92eYP|Kbt^q2i~@ct=n*0~&Ylh_sMWM3NLdC4Z18Gcmla=hjZy-b z3Qky#7M{t2Kk)uQ#xd_rSiaw-$r0yLk@VJW27XZv<{|QGXt4x9X#sv0lUGqhR;cpF zfq+~jhk^E~qp=nt2v7h6U|FdVfbjNp;xz2ql20rjr2rdL^)=7+4-#BT z+MY=m_S3Nb)vr@kt(4QQsN!b>c9R@@Rm51mGUcNsomMs9Ll7D2qO^wCMp@mw@6w7r zH3gA%1khthRI`4!=7R2}4bnmktjieyDj~q%wG?EZg_r(FoGe;Au`wFIhz2wLXqcp5 zPZVnu>*m9d%B{{m4HY@Mb+yS)$~cMGVn}7;h|Hg++}jdNYy?MBI&K%|H3qLs@%8j_ ztcGTgF8)-ESzqF&E5Gpn0OGPwBemg6Xu^e6j1~-OgV7@@>K->q5r(B?AmmjG8&nJi z;-yvxje29vZmk%}gqa8)*ukzHbFSQVi##&=ETaQwmn)O=TjS$B{Tp>M+C`slOiTKl zn&}vuM@X12xf z9ot-)O9>ixZ>t`Z9@PeyQtL6>%EmG#x>YeGBY#o%`%)u`ytS4Y539|&n0dEMJ7@IQ zNk&b|v0@BmNErloqf)Mlbc!P6YLJ{L_NvE8Uif0uc4Wwb$I3Md-1a-ceuWc$3 zv0UJMZ$ZY-;m1*KP!`n_WP4(@DPx~D>;z{712Ivbaa|Z`72NInR8$dkok~hK8kFGC zTir9p*AU@k#PN-=-&pC~)fM0DtIH~|&!<%XDo-=fjle*f+k2Pwep0V(x5?)+d zo0bUxeG&`;Z3W^QcbITf-lakN#XR zdRel0G#5kRey3o6Gvqpm_mGcJVaW&Lr5E)+mk&@=b7}(JV^olnyM3t@%RzF`%@a!= zS_wmxeYoviCrnwdc<8=4x4%Yo#4;;|F-qetpK6_bB*w>5fazVoP|b3&zH0VPKEk0w z+^?caD3}-cL+wNi$y7kC1Pag%a|j>;G6@-|prEwG(q|Y70*`74T&|pFf^nLPj4>BD zUC$@tnun6hkbkX3XWn#x;3*s&=iZ==r$_@@mClo~HFRh%N>j>%w`yuKZ@M-CBY&T2 z+@mH-A~qoL-nJ_?tTDDScB;xtZgH^hgFs|mJe<_DYFhMsoypi%J(n7((^J#wQdD=| zvawop2=GD60@=Ye1v7M~j59*|arDG@27&_hl<1i>ww+#$#welsmrq#+LEjry9OTx; zP6+Rc*;GBYdv8PuFHV2bGC$I$t2*Y;jzJy1DWJ}gHnlO5NgQUXHLTw{qHf$#R&=Qf zNsj7uDw-pyhr~?mpvDvvg22{LUr~ege^XhlMHiM)-C4?#C}xEoNd58#MQ@sw&wd;D z%6aA%Ef{E0FX6JT8Z3L)zsG%}&EGFeHKq$RLmCB|2h9SYVrUj<8#MsemMJpnah!b& zIYaM23^(#ypDu9nC;pu1GlA^X12Y^kAXqKsDz6MH zmm{3EJ*$_e*Gbc}@P|Z(&ek|>@Yw;Sd<{(4-!;*THJ{>J?wrl#%%S+ z{)TWfpQKh>#deXnEJ$EawG`@IoG)hY>YD%42mzAr8`k~5`oG_*r;`kzn zt2;5m?icy~D&ehLh|G}3DR9x9yphU$RIwcD=Ok_hO&eQ{zB|(mO_LY{zj{@lR7)9W zRmnP-4Et6!taVfW01h!2-vb|d=UV0lMF1QP$mX*2$?=7(t9*l9xp@4at1hfVk1+@i zcM*-ru9428Z+ssDO`IHO+K4i8i^$0%(%q=K3S5O7>`o0!@pUv{s;WKttY4s}lOOL~ z)kNcM`_|x8XpDn@F_h%y)e6vl4sLOc`$h z11lAwXURffzyd(|97vjvtolS{l)GL~OszSYC4^}a-P zcUz4x#h}he101iuYO75x)$QIi0vnrk+%Km;KOoZ)4wuvl+P@DnzLOa5nhPR@UdC9a z2sH;?B;$VA`K$dWXO{>gJC0)LxJ*%Jg)`_y}lKy#Tx&;Iw;8_46WFX@| zy%tANfy6hHO_STme%58TnK?Gk+IwpQ%6I6 zDg308unUOHoA#}4M9r@yhsAF^4Q`;Rd3DNHmLA5u-rHTLIPb(LA-0OjHc~xiLNqrU zoSNyM70P&PpiOmkBTn*paXTA_m5P(`T)(!hiB8b?62ML1wt!1Vhn_O4rNrem+N@vlv^F+l^ci2*V)DZ`(h`_`j1!*%wG z>f&plvZQRdU)RIt*ApX8<4azMp!*CUS$nQ~cGzWiC&uW#^j7TWP za8J!;>Agt}>LBSG<9uyaN0+X(LTYRc*XK1@5jCa=%L2X1&_#qJ^*7pzfoS#mHECc6 ztKNe}?!6%jAOnI1^%0(LU0ABK0C@oIKtykVcRXhTfEdt_PTQQEP(>Ff=88TD)rYIF z+JiRdA^0GEoYy{{&ke$Hk^!S#QPaoh&vo2px<`|$x^A516~;6&AWR-6vW3Wi6qm6EIlAmD_TB-9mK^|NY^yi;2&0oPt>NafqFC%U8!YU+!rXI{U|;0@l!_8 zv9+}&Wtau>&cNzzU$sHV^}eqhf+(OyGUTerM$ewrM)yPfJ(VNH&D4q;)NSEDpWo(# zp|$X(v_oLdedIZy*jP3gzyM$YQ4S)i6Wf#R^YK74LqG>tjl8g`H_p{6#vx)d91)MG zjw&dF(b>>Hqyjw|;6BTq$L6oH<4^wp3Q4&V06^3jaZ}lG4vo>|W->a4^EM>*6*V!qJUtQH zPa^>PRMo{@KEym_WB{1tWZZA}pwV7|5sZyHfslKC^c+k0n1?ZWYn7ABEuJ^UHF41| zOqHh6&HON{D!3p1jTvuAWTrRB$EO<#44Yn$7KqA?)@^#v)%L0h{{RU_GcOwC3|kwi z_@X5R|kFh;Ec@2mDl4@Pur3#~_Xk5F8y57Uk}T*CJ^k_U(~FQkvpmcg*$GAxUR-1X4n?}1vVFeQbyM)&jhr^^ zIuAX8%(qi14D5MT%@Vo`SYu^ZXk(4rEUHJV?^2DF2TA_`l++lJ#u+YEfGWwMf#8F+ zO3)6I;rn|nUP6^JB8M#6sS4>4FbCSVtTK9ps~y}DNI;Ek2Z@!`{kN#w-TWKkk<{&c;(;ZNys42+LEDk{qnA;!B&eXX zx~h%Xlf^_~^)C`yC{iv^4CE?$nZKn>HJNkxk7y8;5*Hszk$}{kqX(#dCrV=;Txk>M zIX=9PYS*a1x$(sJ1~+mNSpNXac*#WvJ?i?XOV1V0I09MQD91@tgr}*j-|+_|YRtaF zR!v+>R@%ipvJn(yvE@j@rCdPQHnI&`u)0o`pd!Pg!bYj?GdOyQxKQ z8I7T4lMW1kjj>Qito1nN14L^UlaNNuR8e=;rnyx|a>{@OP%yi9`_OB_<4&Tn`6A@# z(dC7IQ3KkbtaZ;Zqx|Cei5|=4?fqzpN7G}umO~4yajNQ7J2CrEL#OrYgjY!MBt($t z>#QH%fXQwwE(Bo4Z6yZ`>N1V-KpppmoNEyvuNt#_-6|x@=VE zPuPkNMd<$ki{xt;(HA4=XaG_^;-Wjgo8ntLl#WQJkNAVr8yzwO?TVH)8rrrw2Lutn z6^vNHip8Y4js#;Ia4D6UM?r#TN;Dys#8ESGbSHJJeN z;LmbuD>^R?Nod0bCcT`tp5+NSEktbe-wUJ}X$hKV8J0%weXDU9-BZKrNGZ2sxT+)J z?u@B1c0@j$0_*gjdM38|o&0RK5adZD3FbPVr4BMTqP*(cu20m0Sh6mslopr+g#-SS zM`O{vITucL@?GYY*UQNm2r61SC~UAY-l-1dy}l|bullmvuG(4q59O$mYmK_NdEfOh zE$IhyS#L4Y^p1id0iOm!H$ThqQ5%aFf9*janV`zL>E!-lfEjo+3ZRae2?~IX#A*-5 z)Irw}N5pVXP$=B}7JUX{~e zkT$26MhQjVQRkYPqa^W9sJ*?aLdRh%k5)g@pr+C(@8u~a%QihsiLxyK{voxN!wV3I zEB!8T(ojD`>N7ym+@V*PXFAS#+Y~X;-2Nrq${G*K#>Pb`La{gpY8b$qqTE{na~LtW zZ0HB+sG>x+{XrTzg2Q%kqD}*!y&^fjt>OENN78kWnp{eN>8)vwm!tkCT_HYs^U+jk zM%lluEJ*bZkK-#Vu@FgBW{_jaY=RH9EH$xp3DG9i&a7Dq{{Res%R+}KTSRowK&?ep zGV%WaFs!I?AMs!9wLtF>AOrl=6!geId9nP%_N=PuV&15!;^RGyWG^RnKIb@~zBsE< z70YdrR0}^(87xLloM+mufn(_d17n_PrYugD21YqKG}8tpn8yQZ7`-6eoN~C$L1>Ps zaUUOgftoDm?@&`DJ2t~4Y)uu1J+#q<&L!2(owU$n-$f$fod%NFTyt8KTW@O<_rd;N z^t8c8rVL`UqaydC`;3fsrmK~b)u5GFXBxdj;POvnx|oK>46Ws2f!R*Ff5+5o!ghh(Od; zHus47f}H4WE(oBMY8N_HS3KcBsv~z3$e~h3jOQhXC*q}75#w1dVlhQ$BK~ey3gQ>R z!Px2*8vGy7d^>T|QJq!`smkh=iO|6FfKO^Ox*2cfl0$tpo4ks2TB;GDM||g>y+v5v zQub+p$t;`oQ~uVdZVG~Jrdh_lpBU8FEqy^KV!u~z)j>B^Sx^IWT>tVd#?0l@4ysVi14lH_O_N#h4R=B-Eu8T3gT z9avcbY#bbBtShMT9MI0nZQuyXHAx`-VwB>tBZE^6Y`DueVNx~M(_GFN=}-zUAN8%d zmAk5=fv7Pct~eA}B-)=OORG`Uq^Ydc2ZNp0SA20&RVi)(8=+DUYQL-ay4py!D=wmQ z`narFjZ3X7*@+^#J91@jN#l*`9lMQS3C%g6lZ`c{$ZePaB`6eu#@gXPT- zQrZs$0bajXnpVGtEW|L$6A>N46FF0bVmZZX6jF6)F{Z$Cgv9g-xBJvgdq%P8{0f&Ea_Nd+jz3M_~;)ka^sFDpb;2a;f+PPl7 zwT_n0rKp`07jYQNJCb!8?abFMhIQ_?E#r5=cLO0u71G>HS<)qr=G7$GgZ}`S2kAc5 zo_f;EQ)?^w?UaM3AUXCut5@PruQ|TzR`z{GJeHN?i2nfQK{?dj@%?Md-*aA$c)0BP z6GHb-bh=d}Tq7~Y=C{q)KE4I(Y+<^Rc$~B70io?D{57hBJQE_%=Ufy4!)ekuPl}68 zJ)wJ@BMhk`vof85_N!T7w_29Zs$HOnx8}5}1>_uH5m`~4Tcf?Gg{P3n8MQJV5c7(+ znzFj?kr48{z~VyZI)`tH>BM8TT}t&WO3fzGvBRI5b<~MD*C%h%UgCC@_8h*;R^na`v#AM7ig?`w0M9nezR8)dR4++2y+Oj`puJml4v zD%c~fc;*Ohm@2fwI54IxXfN&dt9wZt74L{Ac;;zkF{JETNaOUWKHqB2t_<+i?@NZw zjMBNC+gXWE1aXSLgDx(=BsVK{5@-RntVEKP&i3D{R`0F#Zl>(eq?#0IWw*j2kGbZ$ zPVIBE4IhJS<6N`d%Q+zF03gq|dbh`^?CH8!;nJ28T=|NChD&oHc5j1P=f;<(Yj16C zHb@`=eK_*R^scj(HRrx9nqHT89M<7~D>v0{${IZPU*ENPe7_#A7yHJf()8=`ZE%+A z(<#zz&;{K7miNVGS=21N);EkgBE*X)DLe{8KG#_Px9E~ z*S2bUu7bC|Wn2S~f+}IE^*P|+Q5B@bHs>QaG*QmGWN>N$w0wQ&B=KVeZ@(StD8!7& z0grvR9q5X#Y|qq22;@*#B-k0}wE-5LIW$N~I>-blI|>4z=+YG|bcF*XvBqdEw&*jy z94?d|txvFQQ9<>GGJ&N4@{Xr&FIyY6KS=x59Xjh;U2pQMsC{yg zj3M+TUuPU-H&;Giln;5Fon`^JDOJb;i=*7ux`<#xRfD;E`uJ=DE6r;_s%Snz^f{mWs%o1 zY8h?xdwuInN@zSFv9yy#BgYD^!cVCC?^73DNB$?UwN=$9Z$Q$qdYI81Bwi$$uBVpX z2a)C^MgS+v9DiDxV7tV>Xx1@e$gFbmHXYdi0JQ*b;j6oJYm#0d2w4C+9|vu*MRh$Z z!I3iS^Ssn_)JpD0d}g3~u8$L5+N5fTkVodZA5+yD*L_BLq!8JlJD)b;$Dw`!s+GAE z7yx9F1`8hN-h#m$1jIa_U`Z!|^HwtQ-v?YtH&vJkU4Sx|-zeZ7DMzHs2IiuIyNhA+ z*sRu|X0!wqBW&&OSy8ja=pFDd0IH1t04L(8Ai#Sxux(nE|AboT17dWawTN8W;BWu6d`HcNjE#|%BqQL481000000g58Q6%n5lMJ`!S(JJZ$`_)}* zPjwZ%EhNkp03+p(u&HhmYs~r&gTFLox|qChnU9pK^}bI(wM}Z=bx~aYPH!gRnWKFR z1;@63Nv$((x>-|7oRBlHC%pz8&9lH`o;OiK^@iVYhwu5}^GyX8;&RYs#m2r57; z-Azsv-49@;)jJYjzBZ>T;|y4O{^9mr4s4|jU&7JVwNKv;*j$*XE*bKOJnR@HMH5z8t1eB5b5J}Wk?-ZQ1;jaXo5EGtnSdDr^=yuDrxbAxLV zE}*|cu=Qi-err)jbx$Ak`5B{oM4BEo6ab%^wKeAo;U<&I07m5KQ~E*eS#{^>x?fnH z&`TULvI$AnqrF(2MUwSgrj?c3JIR(id{xIa4=j!4fe8SdsUYf*(*ZXZT=g;pRqBEzCGSQz_M^fi;zq$fI16LIzw7i8NUkto9;MQXDQYs>fh`%}Uhe zIXvf-tWicaZVHTP9`uzu4X+^&aMlpa|6LeVTyy^oT;^x2Xr26QydU}D2%Jlopo=J@wgGPgDP?Gb3xQ}kHj0>IWo>Jm7^Jo zL$}{Osw=DTpW-E;63=wc9mT}Om;sp4dt#;z)2s_?i)M2qZUSqG(ZOI(AMHVdVd5{! z8+%)bSqrElVm_izHJGD(QPc&U#4}|_oQ(7{{8Miv$Kw7wJtw7c^Z&q z&gEAfd#BfZinlUy;C>dv8vSn00~G)E0%ISQ$F$<(kqfW0cExoQP23E zc&+0}B`y=p(!oBa+c>7HiRqpay1V}X%p`_8d8H+_G1kkU?@b<(kRVl#-4#M8jLH-S zAZ!@Gu1Ysf@et5!_zdMQ9^;Ffo)kV+J=XCR%TPfdL5@-iY zb~y{EWDM7ZNI{V0_$qzj}($>zx|WZPI9`G7>`iPV9a0 z+Jc^))vs-%CP>WI&NS(iWd77Cp31`WK#7gKm_A@}ja5;FebBCLjdJBr5ZY)fXy_p#ardm%iUNNX{=%}WbaD5fs>(m&N%D8Bs&1Q_3gnL%`_Ls%RGA*s zQ4pnAlw$3sE z-)zuj-1KB{!x~FAqU*DLs3ex2Sioj)`MXg=O>~Od8GvFk0q;>6{Y#`QtChhx*owM2 zI4%rXh4ZIZq@U68TZ2l{a5Ecj57KI)cJdgXLCFN=NbNzt)4GS3AO!kf(%#>Cl@jq4 znOsPqlBXmO)GHOJ&gwI*{hJ|=ROmBqN7S`+#}&~!y!|?JA_5(-lccNl4A-Z}<;NcQ z*R=G$yKQ-&%g7k08kddnz^_c|R~ya^VU4&x$C|$xsFOs}qMC?VqMKC$4M4S28B@vm zc^UMR6oW3xGE~(yqib-IfXM1W_c*C)=DE(l;z^&(w&{!K%!+?AaKBBr+uYP$#y?Bx zNYh6&E_I}8*Ah*Usk`oJpgy(Y2}zU5l$iBs5+i+n;~ds?XDu`0m>S8JQqa1UL<`>? z>8WD-4-7?h405%^rcGMC5A+V(R*{e5?+;IFZ1cl)DNxy!Nh)#gwQ}#{e7QR=y=xKz z(aR)+V3`{r`{KCT)MoX2*rs`9MKLKrs)yiKYkdB&?4V}>g0YQQd5!@pzjH|!uJ+?GEG?!x5>-gSYPE{gni3-Nlz^jlZtYmLSaMp(idzRr zIMr5kVt<$zPzJzn^IFss9makKwPLCUVo2Y<)N4<5@9~3HDO#%SzBkCJXuA663;`VX ztYfb|E`_qK?iALYG!$TV#@yDUg$(KmAmd|N)+nnBB6Sp;#OgnWr|Ex+-k~0~J_<-9 zd>te*>2Ra9LhoUuQsQpJ^J#kpM) zu1V#GVOZBp(Dx@_uWk9QMl8i1QL2wrw~?m4d;3;IglR`+9->IxEE7yJ1&`fAw@HfAh!CL zV^(X`)&^ zV?)IV&|18Z9S<1P8^6tOzs5NIcy3Gj`6QBlYvuKJzKow8uR^;qz+`C8mb)@B!{qSF zJ*(5j$l=u5?R+bAt!|%~hyf!vmvPQ_#{Sjl=IhVYXLPGct@?zPq19rz%z>BHr~!~i z%}vTbE%> zKM*F;$eKoD^1&mGv0U#~H|eatg(RyqLfC&DoCwdktnvE2H@Z)PZZD^~d8AZjkgUy( zTl^1d^iFoT-m%aR!n;KENqaJZ&M=EzdhuhQK1K&b@Pgf5$d=M9)|T!Wq?~F;_}d)U z8_qg=Hatngzb(wt>&|=u7~(_zJ zOIA5A7vrc|&S8o{`A0H|8|i&K{{U+9`M$@e!}7SF2lcq^r4mXU#LI>#GRgk{5EbL% z<$Jr6s3QBXo9npcxRXRE!BCBYC^-l2d)GZ z&F04ENkGRV%SMrN+Ozn&(Mw6?K8OnT_3c^JUl)U}*|N_X`wwb+3h%l!_GMj(^4#e% zNBU`_Q~v-DhEF@pl34IO#vG{kpodiOq(jJ9C3k70A5jEj-kL3c3TnJ)Bbm`v6@#$V zlaHpFih9RQjt25>8fK8FBg%ZCrmDMr(-K_Vpk1RzT!tRiG+kxTF75*~L3A99Kc!#o zQK@l{9mMwLTVa)EVzMG`$F?gKzhM!0TJ)%s^74qVSf1k>wWn6Mku~qrhonjFrIm1HDaZ0_goOrmLB*Byte?Y|0-o&&^F~ z&|Y}OK_8QV#JIs@9+URPV%GTNUrq6#I9b({=RRWR2llBd^~0|~k}ggpjn}`Z5No4@ zo9UiigtNd~_zfFN6F$d2)EQnJu#)C?xSKJi z{{S%$0a($lX196=Sc>ulmMyUCvP4c=Gwf)+OjTj7ZLB~vEY_I^_tX9+#_dUAd9 zO-u*UYzvJtNIgDps8CTo-K5@1mHfPg z@hqLOK|8++I{BgvHxZ9qZW}L;Y7916VJW1@ny^OYKp^K82UOpPGER*Z;w;XZ4ZPzB z@R9zs8{H?bTXk#5&rp$6Mgm#e9iou)mNhVXz)d3v5n~4dV#a~}D>a~zvGYf^c{R@! zed7ARYSIK~#RW|rQI*#^Of$w3Vd)L15zPe<#i>>}#)xBGDhAXVF+ve}3X8dB*id=* zj6V?(SV3=+pyFu<>-ZH^Z-%wYt|vshk1BZlNjIZ@Fhl1+IC z8~&B7O=5Kq#Wq{zSll&;AUj04W*FysvLm0L@doGfrsY~jhfxv2$4U|HR|aLLS-y(p zu8=y*F>nil!_~G1XcG8-`Z+>+qBE;%lU5Xixy@00o)i&CsU^fdNg0wreP3)-RPkAK z_@^Yu(!{??sLrpw0X8?*@XYeVYSL$D!+ww2iKiWQXqn1E9l4O?`f&6bKjA$55+;0(Bh*c66FXe@hl+(UF z=!^>vrz{frv4z!w06TyvtGcI%E-pY>SZU5esMt^i9C#mF0o((%K$+oQOECWchJu6D zqt28=f^Z9SL3v`^U}Lr_j*=d+D7O~+Q_BmdC+hd805@V4)JEK3a%co!DpQp@81^(3 zU09KgvOXxPZSD+A8B{R`AzO-re(S|8bqd2GtVA#^BJosP)VfWw+bprlC6KUOFF!j_ zRc|HaQRhpTP8g)4Dn$_P);A>UQ*PRD3jHR7GpKl4WD4}S z6%qdc$!*uz6|QC7NcY6kM^g`;-;s3wb5D$tu6sDnfPlnGLlap)&F_kWt-H8ETf`+_mX zYoZ7vJpTY%BKYLS2Wk$drQP|dI;%z3QXIosH!vY5*l!V{bg^wd#3TEgF|#2Hve zbQb{o=i?Q=e46Li z81FhyjoRVh1|chgkO#S-U+M2qGdh9lWeRpB zzM7V-jyta3THMR|8*F)vk22vKL`&ZT9qSV7d5tR`o&Fnc-clF+Qj&1)ee+9ko`2e~ z`j6rjyF}`d>6i5RgE9Q)70UMMIdlC(sN4CL(yx-z=MycqbPcvRsqDDZ>GqI3uJ;;J zL4v5~D#PCub($Ngc$C^SZDu!Ve5riJz{kaIR%^8Do+yq4jx%p9!J09tLS$|!-_ktO z#NHX16>j8;IHDv3g@5#c<5$gj`i;uxTHJXq;go{AueC`Qb@i{&d{+&pPis_+PG{6) z4TT6#`ife)_gK*wRdU%nmkvKjHI|uk28e(PvOm+OeKn;S1ff%BEPI3cX{l97ETMz! z!@7NwyH^Fcj4x3R@Wu?cq={pyG) z!TZrQYsyZ{KH27&zR5vwS0HW(rZ+nc87Zr6nAJ=}9G>-A#n#P-8RMF0d+TLa4hbsf zC*rP{gtl91RyiYOsqDDA)<}Yo$P9;ITer<`S*j&%^s)Z{mA$?w2#WCION^29nhgtU z<=j8?_pIJsJ(=?W2^b(BP^5`&p|`y;G3x#g>BmHn+mhtIOSk!IJ?quQdF*wI&`}|l z85}c|W?7q&++w=0;lIUVfjrsdxSiA#F@j2-*w0~E>8@t}xoP}QJL*|IaPA|Gi6S6) z{p*G9$D^Md7t_2`b8QTeK)^>X<+l!=_^f{;r|<>nP=nul|!CT79ab{+dI_=7J8kCj)Yy6=OD+ zRq5$862~KHMuqi1^6kw|@p%1w@8vW^uK7|*IT#J|Uo*eg(&O>jUSBQMu(*}tj%biV zv8#WY2YgpvZ^thG09u_V$M%p|i)mw)N5iRA9)b^i*Gbcdan5wUr*f{dTfuVVYK|6V zE~DU7`a#`u#NA_5ADE6<7&aj-7Lera{cCyxvG6BRmUs09nUu>TyqZbR&1W^KS3%&h z1=_{bSfZ3N`H{Au{{R`S&Kc{sThsgrVRI`oBc-~g2A4XV`|nzuGwfa^7Z%Zuoe+-U zW>A*Msq2UXoFAHX&Xczl*7`7lD8t)L9n_Lw88!rQwQ;^Jbe=}vO7P{?yV}aIIF!B{ z&Hn%|ek$|g`gP=Wei-R5EVqtkXvmvH(LzS&oafrR%Z@ke8^?Wi%GMbmjfKt2f}W-> zBkWFn>po95MdODV;HwU$GRqB#WsX3i;q?Rned~u8+PYbfQ}D0h)HYdp%y$Y>!W0!n;JtphIb|l8JK>$V? z#F3~Vj@9g$UQ4lcgzp?i*rJwK(x|EcEALAUVBPpiJFcPS&R0Xi84(5@G1{}&IWI6+3FhYE*On4|cb>m#54@038kbTmJxh&XzIV03^ zM>wR3T9={*2qRJok*Z$rT``Spo~H~g6t<((%cf;N?^v;PRg}%tBrv-sjAu&vbsoa9 zuA16MfO$n6GGGjPmlc)K5#GiDc8&tXfLRq~SoqCAY8WLBe{a|UnmTa|)8RkUR$l43Ns%KrehQRor$$fME#3I@mt z*a|YXYv@pgd1F#{3Rq^UF|RytXA?4NXJPzEDO`FSbZcyshQoi$^gzR?lPYSjL_0)w2+; zm}UBdDaazR)L0#48Q)@02C}2B7t$)g6DDXWG4JtGs$pw2Q&{Q?f>2qHN&8S{s(MfS z)u9P)P)N#HDOC(}w%+s?!pguhFl9V4?hR2-Qi$jdtEr=4$_KZ4r~>5;+lgW%!vcAc z57z}oiN9aD(&{yU1jD&qi%6@jDe{U=BZ$;O6BR*9vS)T`zbAkOU zIO%%$^a*YYDFIlL+2gfo7~sod%<476G1}d?kx#$csvE?eB3XKM)ShA%WfL%6_8+E; z&&u{*_sn_kT z=2?SZLi zlmNb4f=r%)Cw)xdAQjVGjJ_RFD16us!d{6~6L~Z`G2*;7V4NA>2bnm&^ioW}&l?3+p_o=7|Ly?SARc)fOx{?n# z&%H}bZ*?w~94TA?In8I-^#T45_XE8>*VIg1Ep{06_cfno#?*Fzs6mpWfNFa#B|l5l zm>U7LT`&#Bu@UH9hw3!c#vGk7hTvwk?0Scm3=EO`R;4V#_B}MX1RbkPp?M)A%NPJ1 z$mGyvtax+I-`0pOC1Kr;dm4(iTTaYSmh zqrzkSw5=hNd_;e>1$W(6O+q`U!O^}krNN-8!=pugBabz0&OHj;wE+D?!#6PvOumTQ zNtF-xpg*GcuJ+NLV3mj~mPtKpk9-=;@nITFCt*&uxF3xPujEUy7UV^r*Cu# zx44RI4Z^s{sp^Z~5;>*{%F#jf2-8UO7$WK$vA`$VfCJa;BbjZUa3sgjqtZSJrVc-= zc(&5^XSDMqhA7JxcVMXatxipGy$`EdBi%HSA!Lo3)ukH49s=UJV>-Uy@g{L+ECq2h zU_m@UAVJ)J(x<4(J|nxH)Y;}q6wBt8B($GzwJ~&{it_Fhw$5U;)=^k#3!Z-T!E}8Z zd85@V`h1b1DCK=y4#U_~4xJ*@KugXHM};MNTFkoaiu_H`J$Vn^jYtfnB2Ay;D=+i5tn^pw(^MGgAGGd zDaa!<8=XRamLg#ezcemTg(M%0&}aC6#X{6b30O7< z%|JL`YAWQIkJR721@S=5*!%BL8U7N)WMKSJ0~C19!vt_@t6EvyDKPA6XOz zUPols>G^QRT|gat)DS&7?#(>l+7oY1twVYQy;j;_QsyuikW8^I{{VWrVu}17lIwd( zm6uLc9QwibsiP5^>e;mr@UcR=lPjzGR;5Q-(Ek7xE~79I6Xv%9U?fcaW6$HooRSdnV2WdwvxqwP!1UwI+8n8{$tQR=Zh^24JVzTY0i1nf0R_dWBA-ph<_18 z(MM-u7#Sp0dF9yewgo4XR`HIrr*)LEkIK26PU^S`5|VT6@m+Px2Td)_?Ynsk6hV}L zk`T_r+dKnV>b1+upp_t!OJ-864pvYw%HGw+blsZtF9Y={uA-ja=m`W^Rb%zIJ-=%0 zCb-{>9})f%h6U{8k)$lnVw8Y`zB63<;~hBd<#PF{tOPO15h6_bN|14i=lJPnkz9$WiY=qUU;n@LMY2kOr?rbJHyFbu7?{{W=4 zP}erir_u|1Fy@P^Z0~%)BXQ~*Za1Qc{F-}@>ro!r;lB=kQKN`l$^^0NZ9pq2_OD+q zHni`0GP{P4%#%s}Be^)oaa-3mT*BHJTH0tM7MD$pZH*{#?^)`#KK?l09ZzF#7_hS_ z!Q>N9C~aYJ!sfVnEO+r+9CO`8vWH)4;g0vn?>rmgE|G49CIGXIO({)dKGolgk1vz! zrjN#5ETcx#jR5M5lp`N%>->&hjQPJ3tbB)3Wp^Hw!ja~D*1g%BusVO@n#3g2YplBh zfls7u+*J2pP(6Rf{YLUEM`t8(vBs!ja$n;(taoc%#y3srlHaisw5ZVli4sJ0S2@SC zwC^LZ=%0o5*=Vl}{%bFp6UQc%1MTl!`SCb)-}8CG%XxAQ8<_ui%+4w^y6yQNCfd6zfXsFo)orv;V-jdPRO zS3hOI)=*sA887Z9K|G3d#iLf7_BpMiXQA{7CUv~Mb0Hq6kH1#fiYF@Gvop`K$X7X!^8V8t7a>TS&9Ix`ZIQ4r#!p*jtmM5mY}FM9mmG1a8wEhMsmm7C z<%#DtaW$RQNWx@i*0jZyPf(03t0-`!u9eQfk=WKNaTUHkOBDdfNm7ILcBvOl(K=KX zD&YtXE?!h8InQ7{sp~5L03~z1bMVIA?+19M8*9pQ672Yo}OU2OT>^X6x6EQ0#~(cb9VPF)NVDhv64nrB0P)% zwH4`o6QV~8%p*V-$_ivVk?*}sLrvnlIAGpocTBIAyR#aYI2Y^k&vMrae=bUSSX0RN zrU9?Ih{)GAqmD~vwW;a~OTCL@J-{5AX^h30Gkc`UM+=e(F^;n`VuMhc65sZVMS2ea( z%!NS;a9D4ORgtmbuA-L5EyJ?$iqo1fOCS?eNmq$P3U2LVja7u1k;bM$!q7#!xKO9d8kK_s!kU9#FBO}WFM$R8pjoI4L6SAh_p+lX@d|?5l8<3TDZE;vGL4E9hq87gOFU~PCbXk zFxG9~jNFms#)#X8k5{5lc?4C%e(Q|0yz-`LQ%r1yo-x@Eu&1l1UQL)Eso%8U#*$eJ zk-p~#9gS-obwdHASYst}NbO8nM_Y8;nUhp-vm%Y(>DBh82;X$6AdMuDg)$s03-y8S zXp5lfa2QOoPF7s)2pOelt!K6TyCI53kg+Q+c>e&kO1#zfy+NRiFXiH6okCetCp9EG zy4n2v^QW5Z11gXeR4ypX8XHEMHj(aFu+Efb-)hq#?5*vywl$RdL}QIS;s-JeXkD+;bK0%SFC>OB+i1@tb+9hB%T zh0SZ3jy+vb9hOE_PtA1J5{xu#2nXaI4OME-(}lvT#tuotFSSh%CqN@t7*!`~YGX5{ zbh(_X<3i<`S+>q9S~ZzWqj9i3`_?UM6^kwS6+M>^C5R&cVDhxp^*y!oHWh|II#~Nw zaKW+p2sB2o+qv}(f59KvYW?uAG++!!Vv7*N@dnSYB zAoY`ieX2KxYXPvvcHGsB->BI_#7P`u={}$F=^J4&1oeM)F1{ZiU(B6xhJL7=oBtM5Q5@ZgX$ zTgZ%vawBb|Z;C56;>v4z2GT+qa;`En@tTO;=)Z|QLfSPN#LukEmlLR9q3$EoZoQjLc&r zb{|PJ74?3KZJAZwTsq|lKkGrK(~nFLk1_Ef2VNAh2B6F7y=iUbcG6}-3Z{0=1p3Ec z{LYOKtU5ipY6~Ut738W_qyb3MLZ}&_&Im{9ARa(C%@Ej(a&z%TL-PsQF;q%7)y@aE z%|Lu`Y2V(6X%x{zIG_??gFz(z^cDr6Kw#u-eZ>KhU%1%s@@R{02BDr$Y*ARVHiNI9 ziX(E+76HA+XsC4)j3_+rMF^_W*I&RKnu;w9BOs|HcOB>}o2e=cEGm9lf`;lcKeB(q zyi^Yqk}nS2=i-RekE`Sbk}yYh9Mx0J91J}TgY!Y2(UtmJ`cwv|T9-n{A!#F1odnby zQuP~o;#lK~IGB(bum&oKU-*CW$s5HhGr8hF`&1U5uXPrYa}voP{7N!^??4QlF3R8& z3mbV^_Krj76?GXMQ^VH~>QFVP!+DWzrmU(fqWI44)tIEuf}<-ht$)2|s;xew__Nd| z{{SUogA0dr87_VPE1U#)cdK>V@>beSY7Uo{Oe(4So@;ZIdS6AB;@pc{<`PSv;oPXi za(r*zrGtH!4Buf;MMY{AXceYY@BaYPP(%(WrpNlwI1~#X=|G2Sf;j>B2Rg-ikzj zr2}dI07`-yb{~2O<74-!f-Jilf})@4P*o&(Km9cqS-0?KN4Psw#-4Ndfzv=_lLHJ0 zZ*xdE+jvIU&U3c)+A&(_I0TYt3W^oT1+q#z3v0B1jybF}Ht;2kG)UiIzV{n7SN}SbJ5`CXr*bSdftKDH0Ek)kVfvx3_3O zjl|gX{Y5eDN%a`8p;@4ATg^-lbDk@=jgH?z^^07@C6XYL9V+oC2cMelT)C{igVFrU zdF|PmS!LA|s}YQhjQiGWPdV{#PPl^a$d%ScDx}Jw@!NXy{{U`{&jZh@PcB=bZeTyb z;CZ?1Nv{0$j$L!EldX9DtX-9oJB+SlWN%J;XB9j0FFd&}o#OS<-wZxDt$47+Oew4x3n@hmH--?cdbf-O$BEG5+*` zh*XRzIqpHAX%h$UL_tFm6dliMiZWF4)wK`_TndWMvtLbG9%F+@6ixGkR}k)Tj2x5g zRTH?3fVtm0(YaKw_x7mTMu;jE#^C+wQB~XE>KkNW(hKZy=_lV9pbx3VqGt4vr*$WT zT8z~Wx_RW*kifFxl>NmNTHMIMX&A>i8&DYp=tF7&W#MJ)D6wDU{{Z7(>qUB(iGLIA z9zfR0&NYXBGi>AA;MZ?w84COHR`z8HYh=*}T_A|rv!9$|r?pIQy>33K8Y7BHL;cl59XVI$3ZMsGy7JjEMA(uFTs{7 z>f+r>M0DINgtq?x6|6~JO4&oY!2~gVk{8{73pHf?32&4owi>Yofcm1mM<^KSL=l-#8d|%YMpYS3_(sZwrYNtr} zCbK%VtIUm#kN7>`^e~Bjf-1hdT zTw-%|+w>0+!*OdHmLb$=bO4?^*1TOq$uMZQY5t&6Ebsi!UW;5ri*UOR2EbBQKy?T( zV|*V&<6_v9@WPyU#0<5@4j{5%a}(d+q9;JZ^X| zp~9fvxeqLbiW9_D&MkFtNROzih9Kdw+O>?Kdpg9ro9wIIjcW%t)w({mTie2d2$yST z85lqBRB%?;ko5caDX3e>HK|`yAUoo!8^nG$S%^z@m_!bvjkTYeD+<=$dDybXpcA%e zFTUs|1oLE_4p@H)A1zU+20JjvTxv@9BxF`AaBOifR(xbA!K)doB*fAA#%C6~(Vv%xkuEAd|+N(9`S3Uu^!srYbjau`* z^{C}szlc0FBrdrPIANq6?{=yhat?S zJY_TwQ8h!`Uqu@}m;-~d84l_wVy`{Npnnf1RTV2yt;BN7%DLT%%8CSyZyfAfRPl_3 zIL3Zxi~3(uvRkH-=Ge<`<&Yr*Ru8=j(du(_*(8bWp_bV|%&Vu;{{Xd023Q=swYVWv zJ8s z0&qU{a8Yv75r9IjJxz`1jQDIrf;`C?bG|(yim$0#MH~~dl`YgQ*;e*Q|EEh&cq>)z>SlB<89S|97e@rT zLwRl$junXdjRAA`dh#s=^e>o3J!8}Nsx6np${j?PNu>V(nCt3g`%_hsIv{t^mO%PY zo>+U-cAWfa*j^-3E38OJ7zrloD!9}wrz>&IHuP+u%@pK()*hnJAoJv5Q4AADC`dBa6)PQYgzk=mLs zh65X^AmE%IidAi1^dl$@9uD51f7Yg;NW2xV0G0&yru9j{kq=1 zHoA0i&ODX}N{p)FwXR~nARv`hmodsQ8U9o3YUtFLq9X#Vibp(eO&EuyOJx3Pe-mpTc=Cr2;wLFvi_XZ=#6hCxw^Z z)S&u~H6DJ#jaG;FK#0ezof8c*kUc2fs<~E&hI(0ZERE_4-d5ZUQ5`gP1F*oT3XaHg zLt1e}G3-67LPh{XWMl;=`&6qxUUlKFj`t>emKgPwj32)AjrG^Tmz^Y!jB{0n99A+# ze{K+;E_Tx0v+-Jt*8c!phf^C!hGlK!fBq1vj0Wi`XK*8LS~~v#36En%O8V89XHFM5 z8Sg}6UG&nq%I%EgRfxz-T)M}Pt9sDXxG}(lu>j)%e^H?4WSyUpq-TNNrVF7$I3#_l zgW`#w=j7B;P+UADg^;G9f&u1$yIYh<-ChwPU`oh21kggp!5$`)&Iuy%7Id0`xbJS2 z5v2lHRQi0u{irE*v!7US*6c=552G{y-uQMv6{9I2I}nF)Kr+v9Y#BpK3CPL@Dn9fb zIq|Gd<;Qtz4b))v11u1P33r z6_q@19#TjcH}jB90d}2k>M#O&Ko|syfMzaOxpEn|Vh#zTT6J9VS&z9nqACufJ8wZG zI*u_wa@sQEBN^NSK{ij?prPnc@~s0PsvL?7qn+1+aqMUdOZH7=J!(gBL7CNU@!M(*`ztf$BLHwlXrX4eGD=hq2Iin9;w>qm zb~xP8S!)Xpf2{>qD?tbb)d3(-UY5*wR{oR)$I_qJ0q%C7X`_xmt-(Iay+H6>+sHJM zLCynWf#vCheFQh#nxZguDdNTsG@Z3?iVbi4O%&{c?N}=JPBZRnAdAkE4a~W<(o;y( zM#D8l7fE$w-cVrLlRjV8F;EG0b8k6c%)-$XTxA9`Oh#+?T1JS@l13t2kTq|Qnv>$& ztm`hTJ+mXlE5>7ONEGe;E2px4J2?LU7A_t=GshgVDb*CG&`|xVSg%U(*NyEjlj~Tg zR9`wd4vPCO$om;EpQdT96f~5VcVf2a1YdHa~iSW1qDY{@-dThiU|W-k@SP zKWeC7^q^kU3_sq1h}-w5BI9QJR8%zo0Q$M8D`o!xN{R;VJm|;0MR9&UwI(>p0F6vD zNYwmrmhc4RXZ@?QnBUG3^s0gLM8G#LWH~fV-9}U(2K0^r-hlrA&KU;k0nZ|U z`1+K_KP0;t`>5p9phP-WiPyb`obA6lPM zu-bwTD}#VQ?lH|#V}iq0Gl99HDP|gRzr|it@b<7VWFsY&gRVKqIjzp{vtEzVzY*k@ z&WiYqvH<~9(dzbU-|}l7n9}gai|v((xR@lnsfiS}zTAp?nB{zP;zf3NqJ3JNJ2o?c z?V96jamOU&@7s*`q%cg*a1mIrKBf)5P&L%Y%h>O$ikPa=zyl;?jp)vav`w?PAL~QX@mAdY_Yhex@-noXJ5te&$Rc zVUbcQ)rVYa3t`5<9`#W}#L2n9J*c6~ncjfQRvKH}@lh8>P+**g91&5dyf~0xfKGeX zYW|0k5QOi6-mFXT6SySck~&6Kywn1m9B@x+4Aw%-M&*gX#cNP&8v8$+`=9BqNRoA88c$1|v56kqmib34AMQU`$J8|Oq zE^Q#tk;F*}BC6v?HUyg7Om()MDhQ(nO%m%|yUT_LKGo7=73b0=wWZvU6nLVX<{Oa2 zY0qIwM_m_%08KGTa6!+h@OB`JmOay&6_E0JeXJ{{R^Gt0{~x7JBX=gSjB%<29R1b@K&9 z+<+7SO?2j^VnIA(%(;-2P)Y)R)h|oTc)wn`Ypa)n<~; zDLkcke8rMdTLp(#l65IQ#Mf>(&(}V#{yiqorODHw2@~7s2LSn6WN(5; zHQHkzN5KHnCYg)lECCo*{i@4{>Yo#7xasqehC>-Ck>0c2)1Qo=!uwLT(gGBK!9m9P z701QRj-F4h&&#h)xL|A6D2%`YRA&aYDq}SMVr3cxN{&5D+=|z+i~4&VB_9Fe^szsz zd(%)K<~*j>Mw@mzKm&aH)X)!DjKd(fjj^qBgTs7P_Aw6>^-&ad&y`nl96NA5>R!pp z`{na(guZ-?BvK*~>AKhWkvzYh3%3671l7|JYCmevUFu8L}J;uPo-NQ zR%<>>k-r~1UQZpB<>UGzo>0uph!B*?{?+rl+WH*X%U09EP8clgk-l)y1M5@leXEV( ztK`?B!Qxvr5ke$L1WE*pAlTq=4|>#$RSR$PjB=JtD*mKc1% zbqHW&EgF2EnxJnJ$JJ&*J?xQ38yqA7v8U{{QONnEu=<>Vfq|M1o1!5q#u#3G+rbz}holql?khOH zz#&4>ExdVoB$Zew_7p92{yDpi;DuNPkyvQR^ir|$nvJ;pEjEI_V&RB8 zC)HO_aPWMNpfu8zAEkXYHE~B*@T_+5`K{(TED;stCnWq+Mez78I4sPwNmtLCK`W{%=@>d`q+Ov6GbsaPD zO7s*`>nJUZI&S{}8Lax6+v`7x6GlR;aRw?F5_JLbQ_$8l{{V;=axOf?T#OK_SJ8Eq zCyK5!yp5y}q-~S$TJ=q2-1U}x>Mxc)qDkJbsv#7z5;Ut4evn4yt_v+XeD3~OT?FNu z%=DJ7pU&UZH?((r*nSH1c|1RErB7-ng*@N9`zl6r=VVRF&ZYFI&ISkzs`N?x!Tc(q_mdCIj~*P znY8viimbDI9-0eB!b-ksgUBoCBB1JuRly}n3M_7%+)E1$f`^HRaY3o4ApDFP0Y4@p zg@j9;3eKoMQRaXSpEP%H>loAynIrvCpK7C!@v4~Qg(DhAi8M` zvRp>3Aw8&+-X!UQTXube!~8`j<9twK$$RG6`NIq_G6w*SsHunkz>G%WgaJ_ay5=9(pX!9i36 zV{D2m452NPl4uNpPIf2y&=k;)Nm254puQXIpo`2ULC90|&=q@pvIx=R2o;8@6LP|V z?kwXHMz*q<3k={Nr29}6b$>KOrNn6=DW@c5u|xq4rK^bl0El9hTYoTmNcN}%xaczZ zvMfPn7}lh8gTW=SRdkSqlN&{1VhzMhG$ff&dM=?MNw~b zj>TRDOpNLWYGAH*Re|)V1=|_!D6B~6FNw;K!;oq#Ky@8Q)J}eAqKtuuVty(jmy0wg zSy!5(q)G{Cpje=AFh|~?)J4ucu|y9v8_+OH35fgeL3D8EwFJekcEP5sf*`YaWCsMJ zeMc2Niw9rXi5Gr*RMp0$apE}Cev|^5Vu)Y^TOLmssh|nao#~>3Z{Pb?kQMJ3$9<@( zAxaG^OKl@te%Yvq%X=pHYjE& zh&RSLJ5g2}DWf2%Wx>cQ#8es z#n7Y^7~znZ@#+Dyn$GEm>9)R4s^T4GfMr9LwwOe>2w{=fsb$_V^IAuBYbs2- z;&hQSjYz=J52k_jRK+b^{i+EsYKme0^a~&BK#wQwK!^KKFdR@sf4u@d>IOaj)DBnu zDk`>*kF`PqxlC#M)K@LzsDFUJ{K`i8a3(71#Z=KzHC(W5Q3FS9zWWNJN(kZ{vBzvs zWpzHjfarx;G@LWPEl@NbDR8)z7D3sE)F^|xKaGq`OlVPaxI2SUYL60LwcN`*Yln3S zBKBXJBbvGCQYq9%!0yJNHq!UXQyv3(hn{d~G`dBlq}ht&_-vm`DZ!GGfiK}Ua)6|= z^0IdOQ}q01^_l#_9Dp;7k-@7bCAyDIajP1F1ItxGHdaPSOmT&BPFcHS-heBZyqR4+ zED^WTa;B=Fmt~j%=>+jgi?60eTq@~d$^L3VUrUZD7EO6BxX`_i%}UgoE_t}l*cbp* z#;+^}-Tc5ZcU4OAJ_Fwv~b*yxc4 z+D#RotNzqPGdMcNL%Y7}*GDQWjp4?DhEPNV*t0};2{=`(VV@BrPWkdYH zWos+?=VC*?cn1c%GMcbEcFz<=tsV}*ue# zoNmUr>C)SE109=}^Aj^kCJ9{D@5WvIy^_SbM&$18{Kww9a>WaMX^-N7319O8;z9FO z9Fd4cIB1$rDUP*axI%wV+Oum>7;hq*sfj=*L^#Gfjkc_6{=Ti(XDu?~+s~Mo< z(ov!+9G7oF8OP7@EKQ1Xuz2i^61V1&S5QkG*u~#f;va$4~J0__-GMSdyqTVOvZK6 z^*3EQ3Yi`EL>&F<>SH^nTQp7<=#$l(9 zcI~w^#T^r;Ev>kZ{vynN^#k4Y02xv;x{1MK^sQ@C7hZx83}m(x)z(qEPc9+@Y0?HN z>5gNp^&|!+E-{S`!}WKrJ$Bzbjh&WA5F~D?oo83ow|eO=#woP&bx$6tPySe|jYH?{UYXo+^>H_G$8erwOpiE`Q&?|YnBWS>yQibjY~pZ<9A+3Y zptDNAyPoE?J7V(5>ay8bx|_Lt*xY1c@=*PUYS;2&PaeGg0LR`xvYleLvy3{VzH3Uz z6-EXz^IUuKYp*qk0Hp@^gkaS2tZ{-&dUX->d(>4uGWJ^wi6U(2e5hgH zerPnVdeoMZYPXR|ajH;8pvHp_t95B-Z!$(K_`t^6N3{kp3^zUa%>lhDs7VaVDv((+ zKyE(OF=cxPOg24A1ZjMd$iKynn@h*;eep)4$M2FMbvU=r<;0{!3C`6q*F)aU!wZZ9 z-`=c@+67m7s39Ra`%#K2IWy^Dk=l%_wY{3%^9-*ZPH?Bve&f9dSU(VM9xp0*<9-jC zqf7q)(urApQ>Z}fvsD6U;Uq)8 zPUeG_>fR)|xs@c5uwprhS7cwDP*wgfb1^FONW+q(?MzsB8(vpAB83le4l+3Z0D2;n z82i;xy(NP?DLBa6KJ^3j3vv~)u?HEZjf=ZM9h_$vUbR1IDwb<-M9`8jcY;OR_NthNlO4`WA1ebY zd8UhF>9)%m{v*7@f(N3atbfZ0#$j(X0jfgBO;JqY+f45gtY85U$2CEbMKr)ntcp}& zMs&3_u`5eul}k%-Rr91P9%zAKwuo!6khdTJo>Yrb3sb$WdxGI4Jt{_J}7{$CU7&8>^>=mm87yM*N|7ZZuAc~p1?mjC}WO%O6OGi53Y62++cgWz@dXC;cu}c=7J7CT{vnQ0~b~)QM zV?D2ZF*`!)OCi&(b|SRqvOc;KIgcYd9MKZ#y?$cs0K&NSd25#dZ?#2t{XSKeHIZ|M z93QBB8iW+F9PveE-}TFQWHGs7$}-_bLVOy{>3v7^%c!mpyi6Daf)30-YO?D#V8b8p z?^PV%QR&Rm%3yXu9A)K>H!8eP*A3J9>%k_A&*R$6aQp{u&D8D0iZx;&$qxjJe)_ddUim^lVI3&KB;_5|F1L7q+YXE+c_wQ9TqtdNJ z4>hnq!(ZaVtMr5Ve`<(_U)sv#j2}h;&fD#pqsh8`D3Q*%Dd;v`g!aJ+A^A3ohEZPP=Z9z@v zhT}}WSo@Pr0(lq&Mlx}NeW|F-xaq8`mgBx^=)`+n@;L28XbUY09POR}qOva|IVA6% zJ}RJiBF@5#gW`p_+|(0&F^y%wE4V6sRY6u=WrK-9SxzygZSzqC3z#I4n&C?7`c-~` zL3c{&lRHS(vMPknEsT$93LmKXk(i{39W`n)0fqs3~a91^E2eroDaEh7L!t0QA0P{E*3vJ)D+;a$B%pQq-6&Z3Z`>4l5qm+WYvXd0rO zK^uZW_o4_BKfmu#C)8-EMw?YlTc(1~D>(M;K!uq+aX?Li{Yp;ics=R^+SD+}=Zw_R zb+<`B1b3;X4*viNQ;cVR^*xsd!_rYlzqvIu69tYA!}qCb!A93RVy3i{*o<$FzAEY* z^zo-^Xr+319lxzX3HoyBI2-q>GOjvt0Gu3FrA9sVt`M9Y0li%i>9$4j?cCJ_-ZpZh zfwe#nl|Tf}%y*O55EOlS2}0n2W^xA&mUwFFJ(fE&wf>0yym2V>JbOBSMMhg&hpf93ea zQAbgR-^iNi$Tut_RU3oYR2-*3=~ueHF$6Bkas-UNnu;dk2i2-Y3%M+NQ$;_LjmEg- z1ZMzu&2A$2FK%qZD!j20R!j#g{i{(cx9DGuG6KTxFEv7drZJ)O^IB%TBck}W&htQu zR9PK0c`m>>sfgKV$nE>ov2?)VrUwm7Q-infP&@K|)fF6Z_MlV^kM*E-;Lt#K`%od< z?NLqbP!Bo-f_ojR3{MnU`H%tJFd~gg^Xcu1oDsOKr3Eq^9V@8z6lI$vmmT5&4(nAB zg6CGu2sy?vQA9K#eYv0(TS#QiKx2-5s557=(u8&gZ1YeD6ipUdMZ%M{2BdcyMzlQk zq6g~NhE)Izle=$O7?A>`9FdBkzda0_oNC9Y@F{}%ou$g;$f_!%D6k~1cJ@80pqOD$ zI2b*RK=#>2I5^Y@45x~qA)Jw({2I`9x4{IRHAR9%&cLz9dV=UC-(jQ;$Q2d@xVg)c zr2K>0tc4C3)|pN+aB;_a2_%^~Cnp{2DzHWla&e9539yqf%((54O;cHtPEYCMYN=AU z$o23>;)*k=N*JrQ%v5eaRREq-A67y8R6#H^6(I6B%|#1s8)|P)+?puZE;Rl4HI)rB zfJg^9-yYSW0S?*6ClpLr&A20gF^Vs$`&q_F&Nt3|>MjOjmwa#RYL!-o+~DoGKGj(< zlRt6ZsH`B)NYB5`PrM;-m@isgZhCss-|=R>a=iHGR?gl_`C^IFM2a0{{#Nb)>p z-M&CIoW{3H!=gm$GDk5dD(Pz~ zx89}bk(J`hxoirU6&g3)mG{$9)}T)W%wlJnXvA^dHX(DqlkNM~V%JqSRz7HoD4J4! zrsGfEx-s|)+U;%Um8a4dPN$Tdd0+OaPuHIQA^s?%0dHc>sa!YaS8RQ&9d@|#*rJx= zU2{28F=jV21ExYNjr!})$7A4s1VeCIYl+as6Y27k>T}!nr045az2d~8M3CDkRZs?0 zX;EF|$l-2`x3>wN?0057)`ovsmmX4$-JdG8Em815BFnkUo!!rGfl*fwvL@pyM-4%U z3qz=o&2A6y*zcq7OGwkQxXf#$YA4h&#U(1{wJtqPfO%D|BMYWmnQj~qJg7-4j{g99 zgJ7;)xg$c3PXey9j(@LTnNaCNor-;=0d~&bcdIp=h@kER(_lWGH3;Fz<@RSm%Ee{7YkX(-t_T zSuPe-D;n|#dY854JgVKmRoI-3jdFD{P)II7!O7oxzf%@n^=S3x9a{hg!S|x-scvqk zU|vQ(#oXqssa0H9Y4tp;#C9g7y3|}JO(9k^)PGUtu;{d3$cke!GO7BJb`@k|(APIQ zqtXBXHg$fgm10p}O`t>!jK8G;B!5bgY)}=OD~%^OAnl6VIM(UjABmNo;$avA2&#Qd zed;4qqqE454XehHApR`vfYezVojNHkAu6{vg+VeE3z;PNpyd2P)}*-_S~#N-$>s-B zzuJHVZ9o<~<6}@%K;PU@4I$3^{i=qAPBX^zNV;SM0=Wkp)?Imu?Gw^*{V3@}u{put z2CEAMc>e&c0nu9$0U4>RRNCJIeZKXm%AX@X$L4_*BaQv@L^DQvP}Nu*H}6yrJPHUY zkTd&K1kD)Jk-pRdEQ~n9`_REwP>^+v_sRLJwT2UqFt^e>h$@mgN5c4;wGuhz|P3I9M!BvPKSd=VS3vSM@vC zTquSRj6S9v>Wn$=OW{fMgO zsP2DrR2;Js03ZUq5kxh_8)_Sl^a4gR#Riv4i#cE46cN6GRe&C%c~RP^&Qq2;x52`hn`1S5RKas1GWV*T67PY^b zrW61ydS4$-cmkuBwz}?`QX44RVi94BFP=wy54}cMcGhyTjOoE0zWPH@+eE$Glhgn7P!NAJOg-H9? zN04{`9ZkR*iK&X?I*2VK?<*MOkv!;MIMkzHKecWSHbm5}%_?dOkRAE^Qj*}#gVVn@ zW3`S!hiy|}5Kw{5OfA=YY`$!4jSOb;1ZY`E0p$Z=e$`RIO<{E3m|r3^5vrMhU_xiu z`_OdW6!6^8$td%{lgma@7ct=WYJ-2I-z-u~YbaRGvgs=S0F-mv;)>O{xznmOaFaTb z12@u7y$1(t;4Y&fVJy(Z8Hsm3w|)8Av3P6W9Y09$Octk7%RG`}1@;dt&*4u@cC)yV-I5bFLay5IH>+W-e-7I${$i@K+xg7yfB2rtKi-&V+sgs@xb3ae z%2OVzqN}zKAL&(=m-uwH+42<026AoN>ratI9cOb4s9j`DwvkzYc+asFoERQ9Yf0>8 zU(7?UJWC#u8L~IP`|&|q{v}x~Q4q4b7}PR>r$GZ4-mU-}@l_SmQ~_Zp*1@wTJ;!PZ z&G?^YZX6m>(-y)#vEidh+Qt{6lBB7D}SSSYM zkwMIK_}i*VW^z`_85wQk$NAlf%~&79_bm+b+la`tX~=?4B1!`1c-&nE&3i30xT|l-r zCCCF~@7kKHI-yuWjaw{!qC0$0U`ZZoq2rJ4KGYfpJqecYz@Qd6+p%TN$4SK%rDx(f zVu|4hjE)F7Utaz5L|nJlt!}HOmggWAZPV{SdFbT2M+CZwK_igfg{TDTT}F6YRM9M@ zJsO=o82i&jHvLk~qjj3plIJnJM+Q2&G9rhze#FpO<w95=wg-BexV3F+0!6>Y1&aV2P+YLp5;0I-A^!kMqNj#}riW^P zc`fr)XLT-|85nR%>}WCo=s*|0p|oT`sxooD)pWp8*|6US=QVW!`A6+k2YVJbC%y#( z+uP?DpfcoX^p9=m0d%MWm3?0x)kX2H)E5QF%>~h0vv3YQ=z`<1W7`AV(N)QD92nVT zCm`vdniwWuNz(m++NBg-^k*OiAdcW2stqe&7TiG?h=pj?e6XZrNUYj8zN>ulwvci% zbcO9w4u_=pO5^gP=Tu=-YgoTo!REIrf$GpqP)hlAJF!1fRg|#(1EM9uGx_Trnu@AF z2DPkWR~-W8-%IFhoQ07$)%_~zjlP5UiG6BOSoo z3XvHE5^#9~y)`f}OmX{GwUwZI^FTtr*#5N?GqKP5P)p{BBGODNXSg^NR(gs9x! zBxeI^m8j@{EGrt`Jto%n@(G&Ts5={3HxkG)%s2;bE7$n*Hf*iZCXV7JSGGyCf^nVp z&U@AU9k*A*N3J(bNHrviM%AduUZ2!8;LJkEtAIb8d(e4j;$(La+(UMnj7uP7)%7VG z{{Tw1Bo*QgqvqIJ-LsfxGJ&o#a-fazT-_{n-W0p@?Z7}(4VvZof3*KE|#OT=4$@MN}o4D5EH% zC5;zvxvr8kYoZ?j0qi!dBDt;t44>G0)Ewf?Ae7t{40UNm8~)XtR^)o$EjS3As-3^B zP%YJp0^2-pivJsKnCb46rxS55B3NkWw#YWe!hh|_% zMq)YCz+#$YuG?d1#UJRS`Ow@!jL&ZFw>Pz!rzQ&A&f!5!(Kboxj2 zp%YLTdmL@^QPY)C?U7N@Owk-82 zphn;@0BTT2#cEd?=Pvv($^KsBI3V#|H5gABNlGvvk9uf{MlFCg?rOwQeQL{wDng&t z+LkP;g`1enn*;|1Pu2IStx2t9=|n^cW!z+Y{i`>o{{W06ohSt)o&`-$Rn{*bmIDxj z-@Rtl#-tYt{)h_Ta!)3jo}v1Uri3qsEDt88k~Hii*AhQ+FEAw*qp_klEW9TA6gX6N84I20j9#KVsmxJj zf0s>{ZM9WQL#8|y?jB@iGC4$??-2h0?Dwfj9kiB; zQb5>bXqzLk80Mn69)aOCxap_MZ8Hg_bavsfwv+n`)TX&u=SX81COegpgEIFX)mGIP zeMS;v(wHVxX(TO^fOn!T@h@I$+0=kzhA@h#!yaZkkzD$??c?Lw>0Tc31b2~yz)7P} zj}ZD;agp&-Q_02zznjR0Yk3Eu$q|w=t`8&cTCv7ZUJmf%THQ_@kRByy0XZZSnwZ~R z>~(!s*EaHuh0?xersHFpzm9TijOrdWGYH^@GBvboBOTqh++wG*UakJS&=%@I&a8qc zG^jsZo%r^x#$0zw=+^Sv-AG~q<78FT*wOD*9dC!Mw)l30vKL|`U! zk?&HJXNuIv65OgQXdxw58x=cHQ+?AUK&-0L!pI~+%iC?8s0-=7A&u>s+1Jd7=+IB9 zPhtfV8urS}ieF|UBymJ@J~^gm?vqfrHZ??jzC+=lr%B)d1iMi=gg567SsPJc>#E9+j%jvS;cS4<@h_Z*04l+J!R-|>_75qb%)l%0A=!>Nz zW#jj#xaw?tT?CfQq_lIazGxWAw)w!S&2QaX$9pO%3d(JK#60j+c9JCzq{3jhF#0H$M~|)7S-2 zplk;{%|JZ1Dt<6ANHZ?FNM$)6zrV#TF^hB4{IwcJocH#r?6~GHI#Dc1I*BrToR|>zckYscl|$D(l$BBt!iM1Ednla zzAESzNVAe?2a+$|gErzXR~VqSDEo6jUERroJxZ#_xFUln_=;&T0SS)ED1>gMZ>mN; zs;NgE1?Zpq)C55@FAPR2G-7p2=XTHu%O6p!V7l5hiFnH$vs8meQ@wy7K*0{`8`QNm zwO4*1V;dy7c_lc?>=b>gQE{skmAYFbk+6|K{vjs}4QY&4z9g0)1acSlMjDh>bzJT3 z;gQQ9she;nR1zkE0sfRy#Y_kam05RJ z5maqK z*2#s{{ZEjv06ky5OATgTS~6*8&RArFPy+G}2NXpPea=0NZX&f|pPzcTCLwI+IX?6k z+Yqm*fx#I2eAKZ=bDjqNoi)C2Sts_NXlcV5u1d=M@D{ZU*@pPXdaZWDYQD2WkHRWAjB58|q#6AZ%(1 zB9}`NeX&GA6qe+WcP4`N^c)kAcr+27EH0(occR5G5=c16s@8~_K>UCY85A@-rkn$V z@+z}a^8WzrDx&`YFK=&ZfO$}#xT31g-)bV*2FKj-QmUN}PUEqesr zUf`{&O14pu(iUTjKDuVsqBG_fB{du%sII5- zg}0dbo%DWzL7C8PAa6JLX{Iq`Thz3|^AF=lpt2LkfbG>Hl^jo`o zm{^!DgEY}Mx#t4B{d{-k`#lJCguTReq@73}SqBI`zV*I))^9k_wy=iTSTmp`dY)Da zaaz`1H{wqb#ck9Udr6hVW7KkV6P?9!>a`hX@h#eCmPIp(HZjMLquX(slGU+c{6y*QqS#Pf#D{Ps9DKvG%)B`{H&@4IK~0^KQ%eJSBv$3!`qu{(QMMHtDR8H zbD)oJy-y^?=cPSI!^Y7603Pj%o=O9^-m&`ICNi3eti{*#kWEV0KTobAbV^t$YU<{BHPPti^21W>WE($O;Cn>n(NozJC}M zeA%-kM{^Xs16pC7)O<}Vu9)!vU_`AM`t!{&1ot}85#370Jpn~AL%S~efh*2whKjS0 zH>fFYz#eE+E~51uf}Qb-x{Iy)Q(S_Og)9cIQPNFkL0%rPS!FQEA&Jw|f;l6#G;8(F zk`_oHT%Ap+iT0_g%IfwD3t@0WZaymeER6dup7Y33GBO6EnwsC>c~p*eIU^KqT|#wW z7j4_IrjoQe7lf{EpDP&=r`0QZRQ;+m*Kb0!c-Apxc^blT{3ahnqu)OC$33kMn=yGL zi_ldU_+@u2D9D+h3JV`d8=TgnJoChwnq(~=lq!6a{NFW3=Z9sANR}rNiIn3>8?g7O ztATu3V!my?tZa&9I;IRpgvTG&nzNRD{{Tl3Po*akp+H$iFb}n6*Ipw(s@#MDLG>Mn zu&lauaTx3jh)R;jPD?Ss9~Gw!NqP!2D9HGboE3BFKLVf@=cC+3xs2>GT0TW)w;G-v z>e`sw&w?0fLgNfRDh`s%r3iu^H4wP@54WxR|hXhqbkTk|SpzLF}D1k!d zbKKD#UCpve1MI+#dmoykpT6kW&Yb@BD(jW%7BZtND9S0spmr4%2eZ!mka%iJj9;j2rx0IYbhq4GN&BX z7#=0)=)qbADI>T{aEIosMSW+kIF1fd<`7|*_U}^HPC3>;hq`iHJkn2cU{yJ32iGAy zjMjB~k=Q{zcJV4fZ0j7Y<$iKenHZh3O>=3dg5WWu*d^r%?U@MH$w*5w%GVFpmm^zOOm??z;JrRBpGFWuyCO=>q{ z77!`9fNh4jj5?m0AOugx{ptavifD)MKm&@!v|5G+wFr~ zkSn*Wl`Ymp8mW&9c9l$$a{i>(yp8Q7Y#5{ItaUO-5 zRvfWB3ddExW1jGzhc51%+}gTCZRKAr??W-_ix_wG$J zdDM6Iw$WbM`QfzOM$x$6%w4wqt3$2u$5W2xONk=RfMY?ZV}Vp`^;p9}A~y~KeY3V` zj9(92Nd%2yI}+#v+P-pSQ``2StEu>ZUrKQ4VYf|8 z&SYTVHwo}7D(vN7^r9(fGeJw+^HRl(&ZlLn5(&TB0>Y3z=6#@yzp5=%bhRn){~ zR0>tKVC{q%HFU#Ucrwy;^vxi1u^RsX+LNOZf5O?u(OnF7S4>v@*~S-C==V0dQs&&U zgOMz2s1f%R)W(dS6h?vW?QSxWrlyKb*Khpx}-5cQhRrguQmb+bm0*vF5W?(4-#~g<7`R_@KO7k7^0|6#*8IpD}UoK~IX{ z%(lS)06+WH0vmDuF+atZ`%_SNMT-j;zckTJy}mB)4ta`3Khlt}58?H;EgbQx=2Q3H ztw|j|ij6LfXp0pnCKiFhQ5GuDITc0FuJuLCv=uZ|6&UI&mWGI>p!TAn<ybi7`UhmR75-E{7^!Bn!tWE~}xCP^3aMFQNV=+1xCCY5cs74pp~6e)R`k6Dz1_*0zgi2`_vc0z>E?12C}GW z8TK8hEx;oUkA|SBNnN=ejX+2t*G>Q~g4*85B&*vz5+2w>1=BQtDzDgwG>f5U93G!6)8{7=3@mPkbQr zP@|@x@Ug-%9sdA&#p$Uv!1cba)67byjf7$`zZ+K`x^$Bshu~krryyQl#&jx~Bei~5 zjlnh3iLQNDLcfT%Rz7M*HEQ+41WV}$f)BNCah%ti*jh={uOypCl@rOXW{e#uJ~PRw zn%3jj`c&~-#~ND}OK@`|NVs4#xi!`@QSmz_^j!TjA3S zTgNN3qGpunSmHTsf3;6_^>~MhJWSVeA#;?CNP9t<_>0Y|`aJ z3<4ATZ&{NT-EH)*3w3U#E3ERB3xgxb`hd^cwI;Fn>g_)WZK7c$lF4ur21wWdjq$Z^ zaL&8?UX5uKfBAcBbPT%{jApkvO%~(KjAKZ39+m)QNUMgq4zJWDyV*lW96G%BC!c}$ ztA>v7-GThE5hs!*)LKG4XYE%+nc+7L%#7_*_Cv5M{a+B*+XW|0J@g_H!B~u9l zINy5h*E+{FOwhd12(RF_NaanY5#@OOUdE?9NVd4&6n+;ckk?l8K!z3cgpW#02XDPj z`PJvFaJL>3>I(!{O>AB{gJa6|vSZwQ*D2#}`5f$-^E|djjmIeJREm~j%d1Vl!6u_r z_L7Ax8-wjiu#!#4Ui)P6T1F0 zl^R|il~vBIurddFlxxQt+)hdQQ*ut)zV**lxoy#6k@B-D%%d@t^q@6m7(OAjV%~ZF z4cu7PpZs7raaA>;;D~=eEb`nIW>iq8I0H2mmEyaIjn9<=kdcolwsWl3Ykay1ye$o# zsz|ahzI-xolEnUyJ*%e^;~jPN!Q8WIVBm=q`jqkwO6kb{qtYabTVp8==At@<{UDwy zF1@Bj#B1d!WK>-$oE@m;T+dawONh*Fs0coS#}1!0M01JDl`_^U}4MB0MNa*U@cLBXzex^v4*pj_Gq zmV4xRN!l~JW8~D0SR=%JPTZJexAMegPo^=3U-`aj)#u{7FAWKk&3PllgE0*5KJ<}} zy3u1K5CkNJcRm&opD0wbT9N2!;l)UGTd^*Qt-t)C#}%l>ay?hC zWs}k)k~YXEoYv7?eQHaYQW+#g-^>JzD8}^-Wp&=NZtfa!5k(qem4~S^205j4@%4ke zBCT;WR@hx0X_1aMz}$meo9*a6C+a~=ctY^o$gOZtY@ehL?^|%hu6#<2M0QGUW|4Mb zv~g#-KNUq?FT)aBMIe^s0WMy7B2VIE_RUpuy)UB?Y}YE}eoEnvKUAtWIi@MRad2m} zwV%t=mUdH|t*g^$8&+G**IK5bklDcN81` z2lHc=<|k!&TSu2GHdKWez@{4M`j1U%5roo(QZ%qpfJe14HH$ZZ?2PC?Lk*p zw=sz(15|IMOoNsG0FU;dzE% z)~D3J19dM4+(2!f+?$guM(0W=@gf6rs8>nLm%F?0zh2V=Ufn4eUnD#lv< zGoaqwomVKf@gL$OWbeNFic!@?(IZ?Fmtl-Ea6ZC@yzB8B!S6lwv%(MlYY@m(eI$4O znXK5<>DXOaMFK(7&;hM9D;_X6C+}L3n?v}n^53S}w2lCOEX8Vr>SK!5vyN}@bHdA^ zx|HKwj?A{Y_ba~b_cT|j%P9ey*b-_CMp&b^GRT0b%#wO?cdmU!m1j+eX%a+8S070j ztopU=)2+r$ilNYNP}sPj=cJ5n&-&11vY4AuOqB$c_Z3t< zuT$yM5Ow}uP;gcK7@|6uEiO=IDHcWN4nt<3(2K5V{{T7{MaQjz>rd%TN1J&1ki(~VOfC*wpRnSN*af8hV zqIh4S7_CB{8E+OCj{en9b*wr@qB-Cm)c{Qy z$=^9SpdR6UEPaO*R!W1NyYg!^N?d`)H|Dd9pd=&c7$=iP;)$0z9FxhdMy)Q9;sXKl z=Rq_%#+K!NMQ=8IXIsnB; zNgoETm=fc{OhZX;B1pQhs1L90S4;_E)vqjFN<7gtXF3TwKG@=}raS(J_{PCP-bdyV z`17Oml?URriH}6-9wfB81j91q9W0W19+-_bjE>bXL~T%Gc!u)= zB_&ZOpEsE0GKs(fqTmPd6j86J7IF0|jw_c{V~pz8T`)&9$rPej$keJr#839AD%UF4 zwz0;NAWUJI(~yiTOGk3lZ*~3A=rYzp4C-+mkLzyMle9;pv=I=2OXCAXYin1*&(LBKfo`K=%rd`4R8-^fCTxQ=|2Ta~ZfU%MxNWQ{T308s0KIPuC61;!meY)8(o3t!C0eJ{h!` z=3gowIzptPjqrW{0BYws+TFh%zZ&(Yv?hDlAOTxi$b(XW?nQbz`5Y_GEc$hfw~20U zipQVgTrm32Cm;2!-?gar4zG1(1)#RJWnqD*$@MqiKQ-1*j9aXK3w0^MXf7?KC5Q05 z;h|i69Mr;B8Pl(BV7e@-J5+B6dSgqxNtGbjvOoP%% zJ&t&;ceh!?kLrJjx~*^j9RIR$^EbGEF2x@Y)@S(#yLoj6?Tmp)Jf;CH0e zZT|rFry^*9xM?F}rfF3OjZd{}(Vu5y(Yj|&vY$b>CQvp3e9-v)K=!McyRB}!;uz;K zC|Oc4;QB_FbHSfl zipP}YC-FhG4#;O1&Rnwn(=)mZ1Oo-_s0?4>!JF8SzJz>&hWM)yA z%Q*bJr08#vOdStIzl^AYKSRX2S{CGg)}~9On zb7L39UJ;L`q;lI%E)@D_MjDxR-L~zTmye4&aF=jonUn$!zzv0RwbB7;LCtfnu@-|n z@&5I=#a#}=6u(HmI13H-$=l|xvYOZo5_Te`s;xrjQ6&f-miMJhc0L>G7Q)}vk3GvP zF&z6>I@5O2C}WH%h)BnB;|8uJt~bVZ#Y!+QgRl&8K=#dU5;D9u*Iw1%LHg9IuVYfe zE9q9kONi0jBD|S-59t}sYGYdKy2YuvoGqW5D1azyqH?SApNiaJk>fuPi%B7rNYaVM zr;&!)6`rGf^ynv*mF=7=w4PGN6}?IW4r()NtLgnNdr(;zO3l2M`NDhperP=F#y4nP zq)_q6uMZTPX{!;-L|NSwkOMeU-Gx!;{Wj_wMmDoTw-&@}TcClSBaTf68PpTbnTe3R zXzU{`zS*qxTjm;bk`Nl^>T9n`fHvC(sLvjpYzWi|9`#vvzu}%*#VqUOTFyW$r%_M( zR-=_i#JwU2;);7#EgLb7%H?R1%*3pDY4aDbfE)obs?0@M&q0(%wq){c&SoM0A-Z6$j>`hpeF0tV_t^j2% z4Dp=9I-ghA){)Lb;`yO#tlBfQY8F-fDtOf22Blc#FZvWW`lho)f^8+GwFgX0f8qA5 zYoPDLpBJU4pJ{l-6lLQQXVAm+{8p^~(>2B2UOmLKTuJpv?BDjIr!yU=fg@YHYnvv( zl^4#of7ZSBKH10htlFMlaa4ACEu(2j*3-Jk+?}?n;H#*tzEq5)#~O_+3CEZy)M|Jt zLktF402a=~yq)7CZ|_BCTnVq`d%Yl8#>D}Vv?d4o)U_k2u;|NiYzs{0H(fETew9I* z&b3>X)`=RdXaWGBVRp~W6GbFDb^vlt!m2T3>Oy%#IeUHF*#`qxR7Jep9AK#1_wu&dGPAM{xTLHy-ORF>z*y@G1(xI8$|Dq zDi!)9_bffA#g8WO0gCx9{kiC*I$pQ z^%hIVg@jTot+s{VO73?50D99g%ylPUCLq67TVB;=X=j9B)qQ3NBnyNj0rQ&AU3{w} z=&q?_=K?dPMQu<^-ZP){G>mJ_{8iKSN+$(ky2wl0UOem^>mJ~WnAfwn==L9&iRW-) zY2)&sMcCT`up{q8{jOH$#ExxlEbbJ&%u=dbvVvKNJQ~Kj-yg?A(L5~$v_j(PbzI5= zO_Q>d`T(uS=Uji{PgjwAt5qIC$P2V7=_Pv>KR(pz;>H@m`AZKpp%Yz`9k^k_4qNx_ zT-E6R0Ee9wck2CFS;E*d>4 zbEV;Yc~?j_e_+%abJ!$_<+ue1%Hy}%sOH`W>9d)EX>6rXlMmMk?0#rAZ?2<~-&!~$ zTt|ON=8Ah|^QQAiK3peEKF)iZsaQTP>Qh-vmsYW<3XS*HcijHjs5g3zxDAF-V3gtU^+er>s0rzF`pvA^X7bLKKTODW{46>FdKnGw4e)NO9@O`p78<@O2zy>y@J*&$GMSF(+dDJ4?E7ZPb+T=u6CJ9d_yCtDkf*)C9v ziO~(6vJH6+z|U^mS8C>~@W-PDxRdjOPd?q+Xf0*PMAhomgIQOsNOH$M^cfeOdI+R= zq$OD+^9Fc-f%8x_*6%zK&Z<&a{{W8~H#~9uD?^m(y>8y-Kh3o37vL$j8g=wfjoN}oh%EEE1PR2fDy*^P$ZVU`_&meL#FV{ zyA8=S9&6)|58;K%F4Ao(fwG@}-jGq!dZds>f;W)}+~K_~_Z6&7bygpUvW=&OWnbo8 zBYnN8>YC>s(Jn4sp>H5DESdiRO4NuI#Gz$ZjbuV}ysSOD=ClNB8)-^_8WW5&at#2_ z(I$^FsaIIrk-lo`D7Wfz!d$CK8#k+BMN18JmLG_c0Rl{s$_djWk4u4Ayso;N4-;BU zuHI*qQS_C5YdF@n#907>7!i|11puC3{{W4yJ}f~$ z(zFcdaqSQyN2{I!0rJLxc{=lB>P795y$}uOSHkZjzE0pAVuKp<#A=}WSb^Qz zs^hBZ{S{`4DRtw_K;R5wn1Jr@MZBgt0|GEsME3Wf+_dVXfORa3*yq($8y(^|KA*io zX^Z+$R>?tGN(fCJ)depe0Q*!>mrLl7ah0I6rbmcCsHSM@#8&ZVwNy~n!yHpUca}Lu zVnTqqIi`+jW9~cFfa%i7lUoc9#+r%Ug2#=9)l>Pnt*n%w4Kbs3MBlRiblRqlAVeypC zx-KGFSKk<6^Gh0ml4#xcW22oXmH498tdaR(8AiKz^x;pcJol)~XG}~*ksn-V)f?2t zolUP_oJ6UwQZfKlxZB!{*wsB&+GxD98p7j9SsUp-^^_~G5BWAEEv$Sx!pM8rgtd&#ejlxT=oc2T1^E-Z=po1qf}u>R}x3 zQRvK?^cN{7*2Lh)-nm{{WZd7|MdigISj!xKV;Z%7^@_4NZo6k`Di|WY%F5t{MGceA zTiT@MYmMuj0vmNyjr{A7bxc?2)9fpw6`#?1$+xggNKEX4R3Q(V|e2O5hzs37XAqn{zSTso0za_N{UOcJ%;z zo$F}Pmro1Fa4G?qdWr4rRRUZuu{h@ySxOhcKK}GEa>bwbqMc4L?OCe6OKuAHtj@Bee`kdQ|c*QZs|WCjqMIf}`j+dO#>JPQy^8>JlS2hi?>T$^>Jx z0%}g7jQe|e8bJ<{vNLH4;~1@`G-c^B!dYFE7|*PZ589%q4V<#3V^N@;K500nq1(gF zsYKHa90M56DWa~Y(c^_w$16xl!31$lR$h~^!O5W3h75uv1QFZ41nlO9En1^l0pnL9 zg1`K;WTZ@|xz5xEL((I{u_sp}910+Qq2c)m^AXFoc8?s2x}m>6asL3`{{a60%C3)Z z>99SmrQN9u=i41nlDXESe2;wBqa3YM;m;TTT0b&OxROE|5wTP6L{ru}Nsx=^ijpMr zn?d!c9jc^hb=!!qV}@H-D|6{bE(l+-`KRhPx=&md-}!se1mQvRlXaWeed@xzr|~u^ zWW4j<0}yDxgmnYv0o>MmYnb70x~y!ArZtVg(#)sp{i}|;5AdgiXT6oQu49Qj$q7GK z!1<{rroCIjJ`auv%+bnHX9gTigC_TiIi2(o()|H9g13u3G3m=kaF8>M1mhzLEPeC#sgb+Qby4&fVIE9TM;VNQ z#x1ph?tSZ|<<8dq*IS0#*t~^JsZy%RyCKI1=QXSI=_c2f_!jcwOUE(D!y(xWtE>Ue z54P3h_x9=6sgd5w!CpJb0dS9|U;*7iC!vfjk0N8SU(r_v&Aqxtijk-Y2HJR_%Io>WI5@=V{Rm{@ zg#ap0kX?UR_Nc8Tx?6i;B&6w8Bzu})pGTH;?;k}fmbHdscc_@%GQLjyoO4_{@_T%B zoZ}nA{v49x?O&+0&>Mt#qnWTg)9s$$YIDUp?bzRSXv!Wb z>&tvp;#=usw~R!Ig!1G16W!ARt3l!>1YJei;0=c@=A>>wgd^pW9R0# z%r%M9VJ6}PJQ+|C@tT+7$GG^K#?mO8R7^57B0_NPaZw&uchiloGC|gw)qTDzHPf08 zrWSTA!x$T8u-fa+aCqi}I!OT|8Q9S)(=Qf9=_-B156r591HzII9+1t|rK8LNSip(!CSxb)SbfLK~ZjpFUhx%pJhW=OY96 zu62(sbln@nxRAS&>|>JQ5w}S7dWBb%1~&2Sp-1X!l#aGpt?b}mF_tKhX-&Sbf%92cE}k@qW3vlcYn=tazPTCarsMBMhT`NU% z9h6hd>=cQK13~UdHKtsDh=Y)}(jiG>V$yJPp82aOj(WxhS(i@itQcqFujuKz*IGAM zVp#wnd1;_=f!KZOVp4vJuDHBgp1M0a%F)yn&jJ!K-^vASkuHHOaYjLH68XzBqplfr z?~mSvZ`@p5T3TFn2KA1h9wv+r@^Ub)54I|5Fgyj}sXCMExsl%5(@bGl{b!v&Z+fZt z^$w*Q8>=)jBru4jSk-W=u-t!2elP3Fde>36f?1=tg&$1CQe(b%+yPj4>--hd zF73&D-{zip}t$t5B09R-Ep%V*NS>eUiBy~KoR+H zGrh|FOsBW~DMrst>OYiavbb3Zhye}CjH8a(`%sQ6#xuta`H}_=of61b)Tq_VsP%Dv zJs#5Cr4d|CLpvg}M!)5!&)&MnpRd;w;$I6tQtL>WD+G4YdGdPzNx=CvI)tuIuFm(} zMmSU`jyZ*l5vK~Oahm6@nepxO>4q`}0z)1L>?^Z}_Rr|nifux=h7y*M)c48F55TO^ zSg)5e17#s9f&EPxJ-*clqo(y#NX(GGonjcSq6m@#4*c>dtB!(b(pXNCvPCN3GM!36 zsyNQC8h&1DNzR*y6&?p3lPZ(9-{zt-&yJ+Fw}#DP3v#6*d7m0EPdNA9r?Yd0_07ho zic*5&&OhKwjn$m;`0fR7SY!^I)_qurB+`>b=0mLIB>w<_pT5F~?rm<8;av#w0Kh;$ zzvRJ5p*ymCk8wf8_^+-k5KU(}ad?_djM3*Zf_6FWwt1lQ*e>OB2TYJEq_=A{;SZk+! z)Ox8~X0+CAXV7Cu8)^f%`K>dKAv^;dFZi@P_mNlHrTVT~gHrM|NrI$L}D=4tO+ z3@yO^8VqUE`vYAzF^w*#;@dUqc2|iZD=a1%!h@6?jQ;>rSnI6(YI5x@{7Y*zjG@XL z<$TXhs>kvz;5T3CNpU@-Y`Gw`tn0p4*!*UNAnF7~FpgN^Sd%vwE%YECqOy=j|cnEX)6LU2rG}PKAH^k))2|%L=295{U|Cbf0dQ9 z=1YP6v5bFuD41dh02v^A?r1DEPzz{x(8zK)e$|^AluAX9`_z!NWl*I0err81AkA`> z(N|Zvbo{wPg?W`FKL)oM9W+!x(!-I8s^|KzO$>~TGL6XgsINZivD(Bm$Elkn7Cn!( zZZTZc?#=KAVOnKhp6kIoahj?oF1+PhHy8|kMR=kOlc+}VENHkPhNi~#G+A|SspX_n zGZ*@^^w2%Rv~ns<63W4Hp+@8y4B7f!yJrRBeOc0YUy28B4crY&6D+FhskEK;sH&{G z#l^g#)ucnDrU^Kv4ep!xjc}2-n32tg8D~0Q9@wdiE4}GnFtdAvjI%;oAt*ABN82@v z8fo>z9FK0%$sCH)C{m0LXrbC4{{R}?H?@+2J@%k`S^TJ#_S95_4cwX|nv+$$rQNdb zz_A_4qB@AoN*+%6?Y&e{i>rw#6Azbc@}GHhh|j(ti041ANYpq)vgF4fK&kYD3il#-IrIS~4~{QT~z- z#|EI0kK&@JkvOQKE~E6wPq!5W>|*{H{?$V?bwmtw5HW2;4S8-I8BYXnii*OArmEb4 z2`Qs>BaOMHh+o1`GhpBxQ$P^LBy9i?$9*leT}8*E91wZ3$VNOD~0;aUx zw7FM8Tel$8OiIG;aQfk9K) zs@oGpQ4|*tyQEGW1C94apr+z@CLm7&sa4QfJ5xXs_&mP$@}z)*NIsH2D^sRyXW3m| zT00n|o;D){M*AApj`ybiFS`E#2Ko;+GZq^_(CzYbS)(#v6WQF#%257Y$k391nHSD$ zHZG}u3qZQs8|b2xwqr>c1Y!60se_K{mdg_z5*NBZ;L$7=23+Tm<$XwPLH6Y-&4#PWc=fBB>mJM&#p@ z+KLuCMs+9Y1B~~rN+Ke4!gn|uRYCnnqL?EL(yK8b1z&0a)tF-d6G2#*u{yRnz!gMg ziT5Y>pszs16HHfdbGHOl2SFkOxY!M;MH=$?8)s$DYAWdqpvWiZJXE5jl%G*29>$=# zTnuLz&fR0jB|S{rWsZQ8k_Pi+`JW0C;af!?a2cNUxwb;jGH z)kLg%qeQ?lCNBQ~@YJzgEx%cXmuCQhk*cwIX-s`qJz9$}ApPm;0F$dD-5K$b8e%+* z5^JX{u`i~1rDE)TMU($s(BYV(K>RA|U?&>W=3%>v=@Q%BjyARqLdX zH$?G)>Cox4x{2CA49g^0&~c5cI@W3(H}NprNYeRhJkOlTD`W%kD*LVBlh*$L5-)D0 zSwpmJnFu2qRcjZraKf5vnaj&0n%wTqA>FC1db$pk;HhM2MbxcqCS6fGC@J=>da&ES z@QU=L^DkkwyArTSK$wOd^NO-1biN(&A(*0DbnAGCTty)sl>PC&cITHqt0Tr=>zwMnJ#ikt;SRn;Uz5IuM4iu>6o=Gg)HWyDy*yWsxaa=>5xRJSB#Sc{ zq>vblM^sY|`5xlBcR$sRZdR}1m88*XGOmc-Kq%{`L;nB}u0B2_`rnhUj;qBpc0UE_#IItyFH7zD_Y1y=t6g#6MDhU=;=xct4snFA)6^sY;ca79nS#`u4x z+;rQOnc`J~=0;G8+Ptt%MQ7JOwCZ}qCiYPTOhhT_na96jTh*hn=h6U(o*m z#7o;{NETL5%Q`So*mwI^r>i+~lU&z|JaQ$uk_$K%bNO);R}A<_$rvqbT3x7M+Cjn24QE|F6kqjF>|08x8z^3DQ|q5o19dL3 zB=M?9*$8q8=B=2-x;woGd5xSBKfXu5R=_*dFHV)LJcfB6# zrrF&WBS4u5^Iz7APc;pB*&+_3FOuX&(>In>=?tXtRbHLbW)~Mm-r-|Nrv^~-9q~L zoZH*HXjki#W>M}l!J<6pt_fD)q`LJgfV#K+>ovGHrb(6Gk;W?(xkN!>CCtJo)68ZE z2o4FPEoIMS(Mu$33NjorH|ecnYkL0vD8DVQEQp$jR@4~#Vzna_3V5VsBh{zkw9c-w z@r%PJ@gmfNWh?q>;&0Y;*C_8JMtvme1KTx=9-eQ;_eZ$$x@E~2K77co4?7x`Irnwn z_+P9bxAQI-Mpyt{zKj8YDml4ig4%nj^hj5yi52All{0&R_cT{Ya~dHR6QWz%K^a?H zX26nB*y4jXp!GXwQSW7UmgU1nkf=D*$R5=cFG#-~PUM@yrC}MjvR#$Q{{ZaXpzIf> z#bXTDhA5UmnF?{CeUyCCt~}$f`10c9X>Bn=NBJqkea&Z7Z-u-yY-9ZIP?-`8<|s8_ zz7Hq9J}QmaKM-voo_2~C@??ou2%$1Y*~hgEdHk16ERst6$mERvk=Rz09ju`z^A6!b zBv(#Sj_EK7W-^Beu^%{--{4V(M_THSbvbu3NPd;uf!I}KS4OgsyDKiAGzful#%MZ^ z8F+3kn-pOWm?vE<9QxJAEIunWxzeu+bccSM)L55~(ypb`3gJeq4E?G|x2+lC9~Hgd zO}C8-M<1p+;|DT1QL+0{#DTvIEfKH8k0eO8>R2p{6{II&jQ;f@UESA$VQaar^c=F6 zjTdD`$JO_)jO&T&3I71%>vxtl^JJbWBOKT z?*9M{E!Nwn8KxpA{R$bKMrfo>#QTQ?HKWLJ(%9cah&srEFrsRwuq z!_ZqvaW7B-ZY_u~!y^K`XHXr@Bwnkb>i#;GT*YY%`Gs=wFx8}eyH>1XToCrFXVV&K z;*M-Dn()YU63y5*KQ$!9-FaV6@m<6Y^2FLClQ=Jz&^rK6wM$(m4?^hPJ8P>+nd48+ zT0^MFNYgHM2OsT8S-j((xQb?jPvxaD+@CsTE53R3jzFt~>mIYx?xL0mj4TSIYK*_B z2pAxW)MBoR5WZt5^*Xkr-0ihWj~x6xu`+c<$T)?jne*6#xA(46eRb=vk5ut1=H168 zM?_KYlU=Xlg#BpcV@*!M5fB%4;dZ9{T-x(4r{Yw->b9zye=h@-SAV7U-HmgdeRaHK z8E?{D+RbeY<$pIc%@~jch5rEIU%o4BK);7Dx%|bbo@ghDiSquWI5;B*=Al}CJLuQ5 z+s82$`t4brrVLU>Uu;tRhaYQ$u(f;Zm?CE-=U^H`$QaIlpsrl~uSZ`a+T%owi#X7E zQNk68A0O-9y$>sk@zTp5<=_gh=D15~NBM)Q^lyRvH_a8H)%+zVRO)h1 z6OYNTg_`5s1ptNlsbbEXo<6sWr}Weo%8-!WRC|9B@;5p6?^&aa@V8Hj{?Y#cGji)Z zM5Vhk9In~H_Y{??>McA;1rA9}XyIFbB8w}|=PTg!CnQVVtZ zV;pbo^I5fIdBxY}Ep8U<>5fUHGq0EQq0VuN#=5%hqt#oeG;eYc0Uz*@JNuf?wM=LA z{+y3&N+O9NI-@JG$9hT^O}$y8OdU_8YChDw>r#)i>sJdf5J*N-%8~x91KOO+6R8;< zE9>ccBI&k>_!D`TQsHK) zPCsgzG@2|Lq47gY6$q~2og@x$ah@wZHOr8P$2Q8%9oAu$TS#72zH6R0RdvrA*v$h( zB`Y8*@s-AMH?7FcPSeIy0KRN%A{7N)eJzjotAlFS#8$H42PnkjLyQ`Li>S6WDCD}o zhog}RR2sn8fxA_STs)l_fH_=y8s4zZo2R$89qUV=QqwP|7|!{iCRl=uF6V+pFbXDQ z#u$utH55&ciCP&$kgUL97T**HS#>B~rg>A%c|A+pL7lX%wJ{E?RPcAsDhXKl`bi`RmbuQr0!}C|m+<=5Ner?pvoX|Fn_-^R21DUX zSOH~$0PaZGe_9FM+lb)}3Py#TD>=gHr3a0%XeX{c3v{!|ET0JwER*Y(hTSXdGkr6xDMVeKV+7&*a5$mjO@% z9K$+AG;G`T888VRUNNaucFOf+r@Ef^8|7er%scBP*XpNyupDOT()v| z{irJc02R?GpFqf5eW{>Mq2uH$p(D`bgReQ-sHr-#GOOy&PMjWdOhs2b_5kn&Agrm< zdkk`FfMB@89eBnLmgcItW+hqn%9bS6Dx3`Fh^TF!nxJXl7_Dl-RzxV*-0f0}p5*PP z0QV-6E{y2$hS!`DJwR4^8XZnCGO5@w*}$wyu|>q1f}(J%i3sggb)nK`T_O{+F5}t0 zYNZd>9hXQefLms64NU|K*pve2x70h;O94sZ*G%YA25Z+K3Zm;(E%cl>`qZ@sLkL}^@31S{vsBleIF$w? ztY>xaQ3FJ}au^Wa)lqZmQMkrN*{GlG)qmZxEU3tpv!4KMJcg5uO+fF#R-20i?*l z@3j+JVs=H+PFF`2mTMTkqD^TMmEAxff;gh0jt(==da5=i;}y<^x?CbDd#-zSaO zW{If3sFHo^Ad47CZDbNL={TzusSKJ)W47B9N-^$c)h2rboK!U>e45fKmQ#=h2%wV6 z%6%tEJk<=nM27V$l6@e7y#;`-cgWv;stI05!9ocODfI!I;*G{no%gENzK82R4YQVX zkV`CXRfMdqldIgL8LhMrRNrO>aF@RS=hXQ zLYF7_kgUKlaqYi)Uy)_n<&=UMm<>nNa524k?fUPZ0s;vGINq-}Yc=TJBJmBPbm;9P zoAYzBrk5DgZU-YZ*RHZB9D7l}hZa`%I=?s!{#qX-%*Ddzo@wE_dHMB@&gR-HRWYC~ zZuuui*9XWo?96y|=5Y9aSG%~oh=+pNyx%_Xz7sB_=BabwZs=9K`GUi59^K*?gwh`TwGs^yi+^eNMMlpF$DqRAdSZ7 zKGo;yREui zLIc}^52sq6?_0!`lj8d$1+V5}as(k<#K$Ur1!tv?8u4d|#oXxeMq*J4Mq&++NZ(f9 zdinkJuWuax0IRm?e~fPhyikiJ%xDpq$+Kg=D_nPsb>n7ur|}NX?$SkQPv+)i8*U*0 z``1g}#wQpu+TPJEk~xeC(A+ctmV_O2K8+5quKMs$H>S7)3M%uxCx6f_l|h-I1s zZX)v}D}u}I?rJSU*P+|b8HQ4ACrp(tFtZ-RH3$mJqBP)@5yr6svPiA^?7I5j>4)q9=&HgHw9;mtFAXi%w%>T`%y*o-mK6} zlK>?nZ88#bMOW9ZeCwGdWH9-JHP0t=P=^QrV-g=3tRdhfvYB%tdpp{x!OX zh+;rIkfa?f+K^=k_N>zzo)YS|@}#XcUg}mmBAr;qH~6V3VB2{T-r8$>tfRWh*3!2R zo(8Xa(mbxp!gmhwM(?DPAYIL87hNxhB?rjEsH%lESc5{uG>QO5L+L~BS?RuGSEO3IuxrxNjUk{6<@IKw zbm@)AjxvHXCESY1Yh@Z^$pn2=MxTZ}BrTB1BtTp~?KR72^8OT7Yfe|j4zD`H9n_Mh zbxg~bg%7YF6)E@=Ri(T#M6sKTi4>ug#+8U3<24ucgj59qi6I8rIRc8^=$;RfdwFi< zNkl?6Yh_K0nC^Zne8Sf|1cb+*>MKk7(eTfPr0NdQ!oe62WoO+Gd(~&AP23Fx(^{7Y z%aq3QN5RK&O3T|iF|vxuCyw0`HHZ*h0e3$6`872PKA##}$#HfNJg3bB;4%U9sQIlU zp6k=aHH6nv!tzYRL|OVR@OcKJujqa&>DNgVR}xAJMyf5@3fr;9F}F2f^M1c&`Fp8R zVUiS)wcEum?i8KBV_B_7rAhctYbCTMIV6JT$qe!zQZXYtkNQ>SGiZOq-l=(QDYdy0 zPj1ff#VY1Pgl(Mr8q!xC;$F1!y!QA4C~l>Ag8H;%Pf#R})-zg)FcUO&) zNYkq%eeqfxzli$f%-FDSn6d^vFlR)V;f+jJUE$u0mo~{95qWB1VAo8!lV8E@y$x01 zZw<$A*I%5~H1_g&O035O4YdyDi0bdHQq>YTRUubxQ?nd4fypHARB?VM@d92QLTHlC zGvvh^pIe^pNBUH&9(Q!8K?}e>gYG@+HQSmK%p(j70<5L9oMZz-sjsHGca`NsaT{mN zfg8_rg5w|Bw&T~vT($`-JoZi!RBSen@}(oO6h@av>T5VVXqGdH;XJAT0Hs88{uSt7 zm%Zu|V`prq?sXsasUp_5P>0Q$-YgQT-fRBcR++~M_>beo)i+LwNI=US%-zZ7NUZhv z>&HJ_Rh8UU&*o{=qB0OR<3BaapVxl>03DsLik|pEGcdvBv!a$4u(%otmoL8mSW4U)2cnfT3iX0u48yzVwx;AosR4(b@d|@uLSUU-fUsn&zv2CkbS<@+H~{YT+fes{2pz* zaXeB<8S{MAZAl5>e)X-?$0)sY2<2UJ=yvlit`K5bPhh98rlTLi_tHahZf*8-1(jdv zVeD%+rlfTKBk_V{QhDJw@MQa3@B43J8nq@U)gYgpnu zL)Im^U>->vAuKhVjGtjpX!IGvTRuokwnKiSNHPtx&7UvRf=QK!HBvec4_czDYySW} zeN4~JJ}VW{E$a>Wn1pdCBtA>F+J4oQPoP@5p%W<%r%D6uQChMlHEp(r2Rv~|mBI8Z zwy4yV#EdrQ726rn{YR{RUN(XOs#%VLN7l5#tKrU-`B=y#8KmB3?mywIb=I{H)}oli zUM7?zXZW65A5MGyt1&3g0r<-5HkuYMKDdE{TWS%J{?)s2iO#xvKOM-odS-|+JVRKI z>QXz@=c?CSH~NQ;tYeATJ4q&=LYqYLejxWLX($5idZ!5D*%o+EE4s(zC)zo?g zpH7fBn>?lF#xx=R6l2&51E?c3x)I;`RJZo2)mH@mGQ1f&kg3kaYlphIIpPc%vxh8L zkG}PFT`x}Y^pHUuZyLEp(xkVozV)wT1t;Q~Hp11FfXOW56!twzOI6Hxi}E+^sa4WUV^a)jqPcs&1Vk02^MZsKVs`?ytee8!Iml^R z<;+NQqH-Vp)hOGCsmE^OR*%gf`eV+TgF;`#yQu*QZwjdTn*@~NHBtv%hIQqS+dn+&Uh^*LAfCdk}T^cd;^f(H4BPTtnqHk6gD0p5U1-l-6|4RE;(0-zsC<80Gc4vf{@vbEC0#0l+!0_RkszEgIUcyEYlI4z70%fQm8L6cVL>09*kl7fp7jSjJVh(N{$4eSmpXUf?^go1>+7mUy)ya7hu!Ij z-n^a&!fKW<83QTKb5H{xQ$Ro(2s|;O!D$#^Nzy^@wMAZfgIP!Un^IAgf-oC~&%H4f zLDimTGcheJgH)~Bt|GxFnVmTpI3l1d&FBD}U}FNJqa4a`pl)&rB8n2yFDg+cqJ}f6 zO7}Gv9l7!R5k!AA9J=Hm!!a&Z{{ZP#9Cu&wWH(nav?(e^u=#9cT`ipFZ;H5p6615F zh|j%1U8Tcm#&UC<&{J|rZ0A1p6&94$7ef5xV(!$L&BIjHOEV z?kF+=BP5Npim6qW;)W}dJx6{AVOotyWp>60!0qm8g3$=TWg|Vvp^JJeVq(7F;MO`# z5fd;n@3Nlti49Q&@rj!w((!^u5|XKpi$Nt)yYs4kRnvB?)qjH3hLH+8O zGAWDfPujC!cy44vtJQ#Um8J;8Gc=6E6dRzPL!k~kRv05P>N2&`9};+TqA0BuXp zv7+gm=XN}BD*CgeBnO}AK^Yh}0005WqNun#kAbynRTCY)My%itMQJL(J0$ag!0ae3 zk@fZfjw%SK7~J6Y9`qEXWl7G&&`KEqIL^n4m|{0)Kex461T9k`v&XekMQSWfk>)nBlhB|r}-gN*Q0fx#J0>|me59@XPW1F*0G<`x>%lAu5Dwvfz~PJRrL&O`x@UoVqTk{iSSy-c??#m z8Z0oBnPN;0S;)>i;GA7nL5^QR zjPA}o#d`go8OxaQJWSS!Z_~AyCS7+WS0n@P?V8V5el;djbRPm)*_f^iHN&6`>fjjj z@%F59#EzYJ^BW(E9w9K<1&x3=9+lJCd)E577@w@4!svqAy0Vb6k{ejvhA~|DpIh(o zx6y1BWw?z|WJFyOz~?W5coo&j(A(Zg6{EM7>z07zGza+)y?MNkM~;N)5WI7w zW#LUk25FC>LGPNJex1D%7^NY2FIGgq5!dNN0}_*0;@kd4IYAetRb9tUySy?!Y3 zc`IV#Vfj0aBsY{9$Q+N#@?)(a86}?E&Ep{!u9Cw)-|_Bxl4s`w?W+T?d(Nq8U7oJG`mqG znqmt2oSi#VYPJ~3c_^|;1Hf5~5-{~IzWmlI%Gv1M8G3w;Y|=*0ILt2FAOnzoYQ?p< zoqwm=!pRiKOnRG2jO%ax>rt0IZPt2V4RJc_x{wyo>RmzX2WqVAi17zhmg-?N!4&Aw zs~6IutQGij;y5lASp%{m)Ixn(?O5u!CbWEAZ$0BJ*^O2a=~OEh_Zi7NsUy@&9hdXEDs_H%=npbEQv`AG-22XEuMAvoUp9=KXvGeX3ivq#@WdvUU z4r-t~yAGQ)OAWLVM{>+UODmA0=YD?GD7(RvnC_&uxIS#Ee5fv5<|x1$fu1T3=E5J# znU$AZs;?w+AEo>06;b2nOTMpqMhTFeCj-#}jjNUCTAv*UM)1wD^%q6d(b_|qB@K;I zW1RdR)w#|Z%JFl{9O^DcnOZL~WZMoqRk72WN2 zodce<#~gd-?^eXuSJ58Q%Ecs5B1KgbJ~ckB2tU0fOI$Br>0h0i zTdPRGjv$QW4FSmH8l`(s+Ke{Kuu=M$(Hy}tUfljqr?2o#nv+)A0NAl7+JmO+o&}D^13%_Vl^?_m zKrVfjqfa@($RrJ0d4A-}l4nUd2iSM;x7T#K$D_N(Bp*~vb3Sm)``&Fmw z$gVFMMrmX@c?owvdX0W32SK@>+FP_k`FKdw$C)?Z1HLNAYtj54Zf3F4#!&4Oc}ip< z9exFL8Bp9x;acPUUHf_`kvaD3-zJc*2&J9UiaK+!0cj>f8SS3EjbJFJ+AR za-6aKX`TyvW}^+hnc`cEi(6YrVAfzDYuuw?<4<& zEPlIceqBn*krtu9i{_QxW{bKj~DCGCrhbyN2TB z+4RpJnp=GVTYx>jD-Au{s`dW>HWqtR8l#aPojD1lA7S>b#w>BYf5bMnkQ+-W!^p@? z_c0wr{{X@dY|$L2LA|qr7}bNzB-bIYQBbi&2Vke?y(sTIMfi%QCxYJIbe>f5lg#wA zVC}~_#}pi&LFpGZS4$Pmt77&Nu(LSHIL|-pQyS41SG`-J?&=oWc3`MTkyQQ1(rQs< zk5s&#F?Rz6^3+2hiw10Gk}7I6?5rc|mr9za^5c(P(3V2Y&(gns^|*^Vhl1<}RDvdn zg{X^LC}X8b;4${vhKu}A@T^~xTdQc6H?$gAA^}m5o^kO~#<=O^D<0X%-FK`z>(zWA zI$m_CZ6qwOXj(;Z+ky21_8e8_xpg(xbc1bUX$X>NqE{OA$k_8q?kifxFS+UKa76a9 zs!pTPDsGZ|H@K^&AE4iPuOw2aitSD$i16TkrTC~&iPhtZd#66Rkcgs)9k%!V>8m)e z2I{gjlU%%;$kVen*xxlRc9Fl}-k6izK=&Wytf6$DqC@O!Db;qqA-GjZMwK~TyU19Yeyz<-mYyc+<`GncP=S@x3lNpwtDZ7R*%ZZ!FAg+R-k`FZf zKLA?ZW($}yFvnV{tLmQ2`&;lMSlLMDTP||Kr=h8>zJ}JId2Br+zwcU;85eX}QDH#2 zorVGD6ts~EESf14D;-Jo0k%iAWu~pv=_)ek0F9J=OGr7smmonZF=D7mMeUz+TEs$m zK{*GJQxtp_q`|623aZ|f2i5nW)#<`H)fN)jR`us<&7>LDEmknDfSCtl+*VpiUNI0k z$Ysj~`jFEXRe?IFlk<9``bJlJdZx49>gmzE$I53)fw64&tLkVE6A^1H8a6Ee)(0o= zU1UawhI(XpH!?Uk41EenAqUURW3R$A*yL}MUr7GC0P+N z-r4^3WW~2x{T@Hd$>u=|yXj;rA=8TKSf3e_T+cMlKq0}>S}&!3Gf5*>x^E8jlNMdf zWVZUw@0v0@rg(wuq_`;|Do(#7jH4R5zO4@rc-f`6mRpGQM(V0GZW9$f((>-0yM|nO zQX^+@GwQ8Q*}Q}C9L6h2nDSRj=iKd1x=eYp+80dc8&?R^C60{e83%mU!gn&g4F#!W$=XJ+zCI3xobU>?SemurEWODTc;1kQi~zRBb($ zb{XGrO#rWutf%cz1q!J<_B&MvgbV7(Rqn@%C|kax5^iKeo(i1PMn6*NznXZ&EHz^+ z&A^}`EvCaliWsQ%FyPc#S%yYJPLdsdrK(nxolRvimDvCWMLgz+*@i_UA(wsuIH(AL z3l28UGfEysz#}V@+fb+>Wd;t_=YOI~x(>0iy1BQ~WK@A)0T&vWiVC{7h6HZ1#Ln%cWk=KqtElErQ;@Mzs&~U` zUBz4*eK*6DmX3z+!`AYkjx_SfIS-tXSk;bt_rsIHfb7H_(Up#p zD5ZSNfmAb?u&hw;_p5`W=~wVNJ1ZywLWDauYEebi{{WN%s(@JTedsN_M+!9HuFPA# zK~1&pBwfK7^?XrQ^()2D`v#EgioaLhm}?*WGV)|e8c+b;BW_pkTEw+3x77hLppBK# z0MCz25eV3xPJU`A+g_q0*y+cRlvVBVr^w=i0R_MRx0Q()m*939Z zEsv!zEM0=-w1xdfvIy}HNror`Mp(EbSpOdMT!lVsN89s(UD9XTTXa>?>Nz*Op9d zS3Q9g6vfnA>10MHU`EEO8G?_gTOjT!sCH<`^fnK()M(<=`-~mQrYbT3NC0uLHE>Sg zvB2N~jl0!}RkT1T!32|%C@)1)2dQ(xUiC~4*2RHvc0;)DP*(FEIUe*>LhYye8lj_y zoSFzW)j}#)8RXPm8*dmWQ-XKT%|+0{)R{D#>^)R!_wgBEA;43ewxb9(c*YG>sfY)@ z{l!g9TElOODw}>s-)hh{{Z~Q3%ZzL*AbWUDk^M;apsAZYam5i4DIfHzi_2WzIhyBs8P$9( z4VBWsZcL*Isz5y|Pc^&AE31pby*J5`&CI57KZJ4q)Wmfb{eBtk#kJ!ITt=cDBT#$| zo9|ji$4G`-t5s=S1_Zyj}9L@g# zSPhF_o~+VHe6w)i=uGlO6@q#k)>6d{^pneO`EYH?C^5}scaL*!5;)ZnBVaT{6n|Er z<9t(eZSSC4RFY?fJl2REXoja>C&lLLC&S$;?fmYdp)zG};K;h(LV3s9xk*|B z$T89ZK4~UwzmbhXL;Sey&2D^S+gvM0b3MvUc9X{&&FB)T^3Z32n#bDHvGIS4+RoxD zSYt*;iC$OE3ykAPt=_RD)LX@g1;9&)riKYo83T>u$mbo!B}{bb(c-!h zIQ9m&tb_4ajje1{D8#dA+Bm?_p4l~yy2htE;W`goyz}JhBlR6qC^(FOF<71JcZ_qr zU#uCfB%O+xBz;6E*+*em?zQ8M{{REW4aCOQc*6;a{wNud4mQWdUmg0MSoKbu1We!I z^5ng~H00pO2YU72$CbqRl?->SX=8Np#^_$)E8zj|4Ri8WP9~eBc*ZMek`=cPBvLV! zK)Hp+dC08uR`SsC$BNw&-7UqseqtjmlEvy|9BKH?XTK&j#~RQ4JMfR4Fu0Z_k_65* zpQ*j^-m~ML&3P}V?xEpiw(4J-xQ-UIo<<%}8%40j-?etWEOF<_uCu}xDvxjo1$AqL zG1Z_GupZUEJ~P{u{7!jnv2$$ft1veAP=TsE5y=(5Ey&M~ZFy|+iQNyDsIkY7PWrxU z=k?atzn*>vyOeK$a0hD4Znt~`YaF*Qyrm3YV90OL@@sL+y7nI)S;sSkeF%mZMRvf! z?0;(CRmw+`bT1moZEGY9hD|K%3ukmb_07@C&(vj-LnNnDvCA>VK5~0Le;<(jtjq zl$@)lxur;}sQ9gAE}``KL(I31G}L4x-1erJzp7l`-gNUQjyr!W3H28`-%j~oYQL#o zUE;2=Zsv;Vyp?8+Vk;i(H0_qA3CCd)pkY2sE=ce8pev)^>6Dct%SF|t{*p(ysctNe z%GaSu)hwE9fjD>aKpGI^wKr1yaTjr1*~+%pIEXj#03npK}ibq^L?G%0S*N{MxT zU@>89cwA2Kji&-s(N6}epR*E`^;Ezt_j?q#@>^Dc^ovQKTl ztwG0rEcJNqZ&%4Wk{E(&924Ar)u#E3ewA+O(TI*7LIVBH*sM2RgVVe$(z_-e+o{67 zahSfOmmR-gPCA#Cn@5!(i?;hMqxKI>8{&1dDjjNimS9}C9o z`_z@IF~@Zdo_{fM8^jgW$Ymd+;;!M0*cqcGMsvVle~Opr_3r_76tIlJeQqtJmlDG< zU1nf?{%Jlj)3vCzee%-7#f~4Wd#GW|KQ(H5I9A;DoXR^Bqs})40n= zY`Wb+?0eMJ#TGsQmhM+rQQrMkGtGJJ)oIzI^bDXiy`;%yR$j)+Sx{{Zs=QKxNj z9EFzV5=({NFQsK4KO&;Ie;fELU4wUKfJ_E%twtAC2h=`lQdeEzyM~viTbBn~DUI{a z#-T%a&LR0(#&A{>Czsj2Xh)U!d!P%3jpxc)`JrW#R-F8OzG%Ajce=EKF>KOAEsA0g z7&7VO6hIR7n+TOwIZmioF)D+&=T3fWa+>hF>%%OCS_uhwpei4ImoK6%fmhqXSS25UFvIChPdG_Ri?(-6vk~6 z;U5IY)ovx2DT2l~$CQoyM?cCvzD*I>&n#Bc4xQ3sg=b-z<-n6i{Kww3jh=_$Xzh=i zCMUZjnJ!y=d@?n2X5ytvs@{?XEvB)8kEx znRTW=PkhlUZeFsTNedV9WQyC%oS**yTlb8au7zJ?zT@JmHNQL`ASepMD~>7vrRowH75t+9T7*Ksr{=Sb zH0Hi-Yby*k0AW#JUZ4nJBAgO(Q{t?E2K2~CAc+?z;QLmQQ>jy^h5#LgD>jYppJgi} zHhtmO|)8~lmLr1 z<}?2Fq}4EL^HpviPndN^hhdXN!QLah7O57%yFQ?&*iu2rG;ceZrENu@Di42;wQEPB zzlWg-9H9!hQ1U7rjdQfYy&BpEj^;>}Nb;N1%j#XYs9=7D*F~c0k^~?O2~cU2{Cw3J z&pelsNLMgM?VU&b!|_BLZ)fGMgdhRm8=4xkP8TdoW3?5Vbp~ckkc#P@KWd8Bz!(Ez zjBQ-&qG%4p5(wa~)eK$K{7;Ak7ZMVM@)-J@V|vtL#sYYcP%4BXahDsK(;$EhN!5{_ zO$N=a^gspNX&CsXrWo9>uLn6hR91S{hn7zAv`gIPvx>M2sd z;DMT}9Dj)~PoE2><}kVTuAHrOy%{{fW|)mEew=+kd(n_)?lfr%E3&hC6b*o=tCOmF zH2F-YIVHHEhP9ZxHb*;cQKk<JrX4>s`_!Qb!q-u$mD!k7=~qG zoIH4Nr@dH}m(nhA9-aVWq<0mjTK0WFt7{ZSa~kOQv)hQUbQpdq4og3cTvQL_I4H^mjW zy+IZgc~HZva0vR(#X(EY<`Ci?L5G&id8%s?*QJz^+{Q#Y%BjxPqyXALCBLCAI&9Lj zVH`xcD$7bh*3EO~#|%@jLUF6Ied+NV@c3d)$DIot{{Wa<6_rf*Vo<;vkh^3uwouen zmv-|&L7&W(ap`ErL7=5>A$)nBVD6E&RDJ7F1YUK8g&Em3hEj>A^i)=VOYsvexrrm( zl2y-a)%-zLeOQ7uDaiVq?NG-wZeje)+VP>=W*_TaCHR=?`fEiP3YY+mUSa)J&aO3~ zf7OwIdsGL=(MX=RToLq>xTrXuuO@~G$<>r3Y{Inw()5uaEC5HwK~qas7rj`N`t^ARLss60d4Q)ILj56SzL<3h$1=SuIS%DcR zWnsvo;_i>rL`$eD-or zpL)ErXlpC-n8*$9A^NLgcO6~@*egjP+#hNpnXh%JMi~vw0ELtd3IQXQJ*t7FP6Y(S zL@P3o0bCq&T2OI$YmGxW8O~~$8Vn74@=hpJ?a3r<$2F8Zry!r43JahdG-Rux3=h3l zgWVY=n6!u1+md_MqAj+Ruhsfa2&rMMFub?vVY1dNN}?MzKu9E#cF(u9D^h9_oZt>K zxT0B$?q|?|<9y&$!*!YGv$1o@tw@*Rt9kI}9mWl6#&mQx#lc`QJ%weg2dS1#4V>~m z)pO>cq>zU!HaMusrX`M}pOZydEaLzGN4_W`lVlCH8&tzrK0w@W+Np?_*c0!Hpa`~d zes-+_mQPkm+vmMRGuta2h!jx}#xtNDkG&Kz!V(zav#_EEy1pdoAgCN;y-<;`1_wRO z1+glf@HKnUL_}Fh#>c*RGyzHo%P7i|f(L4%(wN5iC;L=bX_Srg@jwDO)HArw^`K*E zcN^hqAefgO#ycF=M49uD4*ks$K~e}HWR57YTQ*Ke-l)a7LBl8{;A~F9f~g{G@N?}!ZNfZippZ435#Fk#l9A~< zj>fZKx(Iy63JAd5)F{iDl`;nxpJ|JY8MolNcV9 zUG-GG5j$Rh7-mz2-$)$RecHu;;Lv}?{b~G^$Gr91c!66!ooN(o$1%(@ss|@(_0NwZ zGWyH^04F89&_(%!GKRV5Ui%PvrTVcxh2hw3%!zjrynrmQ&5~Ch)f#m^Cb6=*wLv1Q z1;If8{v!76Tahcstgj~M_ibx5(xtTdWPRCicx?NQ_0Oq|Pp)so_w!!e4RU#eFp4K9 z(nkQ-HltSW!P&=6JGfQnVkkL42SK=rX@UAG%x`&Onx{bYE%!_9Ljbc`pE z=0D7GG=rQGOU{zu^Jbk-B6!D<6n>dh?hkw#!q2ZbzVR*1u$sadkL3%nQhu^N4{X*g z#^)}3s79exgKA^-0&+!iw_PO0*Mz!F#n2I!mOEVk02r?g@IGs=i=A`wb@9~xBv>W2 zm9$a9AcbYXI2z>Jl53}vhd&=*S)Yf!c-vm63l^Di9;r6d`}VFrKi7XJO*>GP{atVUNtj3H(_nUs`>#D}8j&Jm5polCnP*u_XUPIa z1o|}hA8(2dlf>RLw|jVGw^$kTkPvAx4hTDMNey$B--sPbc$(4_g^`iapD%P=ZZlW$ zD4vnvd8V;%;#*tmVidj!n2yD}Q$}}$uHv@1YfIRaFl`1yzm$LIXaZQm%{l|AL%xO` z#&$I?)t4T>_;GrVW~r488$PuM1Pt>}#J^l0k5Ws)J-~=87L2R;gUjUO0-Y~EE0MOz z38Z9#3WMIcNbT3-X6vb4^$DP{^ne^_glvjyqn14fsrAL_RwfBdYkB3cw$QoPowJ{c zMU!4FI^<_^Ny*PS=8l-zwCPud6u62fF`?G7p&49vsE*gA^_ebhq`sPES*^~5bo92| z0zPw7@iSaMSn6`zOm3tg%J>dIz}sO{^{Fwd;l8&OqnXOIl9A{OvX6sT@jqGJd#kn8 z%$EQN%z;#*o-y91>gFi${p3*IK`p|WBaOpIfMl?%QRx0N@$HrD1}LMD$gHwODFe_( z;8m5I13~z!DT#Gkqc|F61+b0tj8deZb-`XtXO>ynLV1!FD4PY(wPMGsk0ksNYbij$ z0U%}5{8C#VYRtA*ez={_gL+NXwDX1PQ^^c5#e|L@Ky&O!uJf;tpWlzxh+9h=+vvm= z&2Q7<8fKM223#EFk8IS|F}>pMsrgs8TL|Dt0uu?1b-5>PyXKnIf;=nWDdv=2-;AmC zh+OKHL)%xiLDfZ-xH4d@WO*$S+d=F=_NX@9aBz9-D6V6ub*Q>@x|#JyBOf;1PGv*x z2em{2)ISg)+FNL)^FiNM0CDVSGGOt|!Pdjdf->5?u)BlzrZpHoA@NI0`B~YImSS}u zNe8ts2HjDN1|hPl><`i?GwmF^12X>a9v7jX#BP;y0Sg1IF>qYhu5#J<$~Tjkq%U>ZP)?79`#wlxBe7UdF5VD zad2e;mO=bHw;WJiec=?cytg3$hCMR0vLCDixS~3%i&TE6Zs>^7c_u(W%AAgBLbH5V z_FXgD?IhC4lOw+BzS-|m)yB2g;=GtTV2p3JSh1|?`mp+s z;x+uKgk*_H%NWKTzB5xy1us>S+Gws~cFc%BGOP5C+56Sg8khY_ON0=~JkrM|94Xu$ z`K+cnd&?({)F3+ppo65fTpd4!Od`>zn5u-4nZY~ccEvHLKW%neS!I_fvXa`dzB>wF zB^oIRFoA^JoNj1<{6lsp(5Z;$Iwr!E0qPF3T=%COhfl9AFQc);@I$ zZE9y!MrKVd>R$f#I3)d2 zH)`CB)JkbG1G&%DL{&AZ^7Sw~ovK>06`jVMA>a8;O)y+U#!e1(9Q;)2(~dPMCC)W_ z~rry z&GoltxFS)8jY6K>ccXHKluy(oFO0`+5Colo6|KmSq6C$|8xU}{n_H3UwuCY#IB3G0 z*F0g%Mc3ZVr?-G4pt~+g>dt;@jHu$AIvKEIB;XUYbw<11{{Rvr8v0{Wj(?lxrmhQ1 z)h9cR@x3Kx^1l1gpn?tllSy1hqW%tL;Ss1Cq6nnEQWMhULRYreW{HB$8710UO9ua}} zqJh8g`n+oPml$0+%X+i_07^(Xi@W>VQWjOhpQXb3ALJVA=`Z4Hhw%%sO=<}T(~qjB zsjaI|5K6}mCUjm@52m@`BImEBpqOxnatPj}ist&7w602Loq^{S*O95wI>W^i#U=pG zRGsNo$4?(piDOe6MIa06)NnzpBPv_pI|YaUA4-j=tCn|6XpE45P#K~CewQ<5NEatL zeewHIHL=pVef!7%0GO1+5aK`mN2yI4Zv;!LE9L>mo9ZY72Z*G7ho5Cxu_}W_tvnq%OQyw-%<4B(?&;EOJ^t| zl(t(f9AK_$iyx)7gP<~yG7ucpQJpoW2sP@*=?zdu>IIp`v4Ow?V^$T*c$226aF+5r zFES@O4R4fl>3s0zN7xg^bj?cW`e#ACoPBYOuCL-Y2KA1zET@;j7XxC}`S@d5_Ex>G zLzt$Sf~zR>yk}4%mZqwfPaqH(na2v-e)yd&`K=+= za@ho&6P$Lf3LiNbCz^v=%1nG_h$dU5$vWZtPq;zE~fovZF3X zsF8vW;EpN*CbBM6>tF`t1A$Z#dmuX;oGy?K;-Kc*!Y%zf?s6)%6X_j3J!P0NVm%`} zEmYRtKec5Q-b}g~xMdp?P-4$|s+rZP&(aSStYwoW*0H($s>qseI}6VJ#a58CkwGMk zu{(TFPD_F_kG5zkw>Z>KJ?e{_jQfqMjQdMa(r9TI2iY)iGg>vj(t2ER$)0{1yM$CE2nknv6%k=OF$UgKyvZ>LUB^A@t3JK)#MS*T4%(y@OBvzn+e#bvG zL9KLl2Y@g!S+Go8?fdtv*1UJ>%Z1aVjt)1hYrlNVRn+9jRREnkwgz!p<>&kZ4=31- zt7d6*%UyDj{{RkgRTrq6i@+7#^0z6d_W+k~b6#5a(*5Z!=^9N%;1lpPP<7uxf@|l+KbH zQ9Czk5gYZ=SA67ViJ^>s)COByE;8B388tLgqo2OiYAs0uAo&NyqiYQg>pL(HD< zKqoqXN}q~>tRgeBC}6BNA2h>4^$TW4Q0291!3|Uq8;xa1%8ufqm8N{dr-8Z7)dOD2 z9m{Ng(vk%OZO+}rQADwvk~bd|6v=K$A3xfl&}bJ50053i?^H=`Sx$8f9r7p*hp6C> zFqc(URaU8r%!*QnBxGk+J5(JfM!PaI3=9#Gn&;C|r5=rXG?S6A_O5GIe}WI?YN++` z(xpkGxO17L$?`|ifQ~K`?znDbx9G|=|3dP)apPv=bb`&N9FcyWCb!xCIY zEx=*~B|t&-K6l9bS3V}T_FoG4ZU;hPja_7eL(Mnw9Z4APU85Fb&r!j(M0k=!KxgtrQ*2f|h-4uVdSy{%s{Vo{o zWDYawC&~@M_!Ja)W2gu%AJ0BnjhL#o?Tlnqh#$dTAC1hnudh_j+EkxTGf{8DU-(1w z_l8M}BoJX^LEn7R%}HGsQ;Fg7_OC0{)tkkWO$>I^Vn|~+LVwHy z?^~TQcyFH{Ttxs0EOIDii7n(G#R@y*RrhDmO^=V{l5r&F#XPFU#k8m-%kTWHvk_&PLUl8qmLa{@fdLjnl)_^mnWR`B5l{PHSPA8!a{-(%Xdt=@Gcwm?q5QS57fu1cgNp~Db&MjQ7VRcA!ojZ6Vx zqur}DbZxXN9o#AADMxh%UIq;rcK#~6vbD6H+1NCUHCqV(0L(e>k=l@Qeh%=YcPlox zcy1Oj_VKvVl6;VP6;NM@`ke79+K5)%`Cv%Oqc<4+K#tWqSsEQRUAi2KLooA6gB!B8 zdr}p`N7F6}J<&#J<2asN>L_^My;KupI{BF(l^|-M?;*KFYgnw5lI{e|z^Xob6YWH5 zej#5ijiT6$G`B}vvkyuP=l=j|&rNe4XKQ&BD*AyhqfA)iHJKafcSeRd6Z2-_qPmT> z!o2G~)ufX_b?*>O)Fu}fML|^w9BMGADz`o()UAYT9vnWj)I#!~6$$mZW7cPA652UD zxX8f^vv1C8I#>g#*?9*-6Xmc3x^i5K1~3BS|4*L|N2wDgy0%d3S26vJ`y- zOl>I1G{MVU_>m=dd6ik&$@2-tTooRq!&ZO*#ztt=fbK5deISFd`d7cr8pFfWT%So) z+w}^#&7!2Ud;zU^!_*?%TM-d0t2r0|R9p+xi(@2%pQRU(T8V+;1TUzK_#Nn>riXFg zJXKSa#@NO?8iW_pZY7RYc$_1y=)h#HMr&^W0IgifG*YzgUNQ>10i4xgsn&c|adV;O zWF|E#6-E)W&+kkWczecD!nz_WsAMZYsE@UCvm4E2b*{Z}JdO5FD80b_yKY2u>jyKgT8SUCgzY6`!@ z*B+2UlaZQe*tnJ?jgf#1(G^m7YJ;1w>Lpr%I4O^>58qx&2+Fl}RzROnPr$4F$U^tg6^xbN>Kp zuMa~%#E5e1oWG|X!K;kuo}~;c3Pu9F@0Mpn>(4ct8s@SsE(0>FfIvH|aZ#)F(@WB1 zm4Ak)a5L!JNUJ(?vCi6Cwz96@s{{?rYSJ|PQIQ-`0fIeWIIK4u^L-<2{{X#d7u!fl z8P3OwomXxe4~EXgn;w-MlUV2Kc@USQTsQF!6%=}u?OiqJ#0Hi|Qb{3L0LNigG`FQ) zyV`_y3luMd{LXpBX2lT=liY4)R6uhaYEZAb_R&8rsH>Odt7ojR{kell;|@mun^%YC1qZ zqx;d*emis2Ww=c?_=*6!8b$`6@PgvHMqXn)iRNStDS*7)=JR0m%Em3|N7fhA zx{eroR-M13?D}LF8OiQc9jg|(R+XeNiIqUe<&>P(Qr49Ha!A~)K~aB{(O^{S@+%1j z*l@%F=`>2|C+ZI>`GW@|AXZ4viZ=>bhRk!3#RCZaX{0d(5ZI!NxVE&49WDr$R#l1L znjwHz^$pr{%a$#ptTJ}X(O+UUJr z{^>MB6miEM6Z1N9RF9fWpXh+N?l*KK?o9E)#JX7$TX2N;^l!wNO6X&{Ws+ zrT{E4#(AiXbnA@4Ln+h-8P5ia3i@}E)nhq5wD$R=D{>Bp3L$48NJp+#`di@BQOZx@ z`+1~&a%fO}EWCY%be#h%qzk1L^#wW=>pc#VD6`1@&2t3729inOdW|&45#n1(t|d1R zrphouIMhBXeA)esMO%p;DB3rTb&UFct?OSE=nW>FxyS<*jTT5SzZ{TiD=y{{TuN zo~5i}OLtKuUZLFW*iZ{3^IR%PJNb@ImB_}53*&hc)06h7p!$X5D~y%{8NlyMOG$d> zvJmVC2AEET#~2`-+$1ax`U+>f03;SQi(JK~mhE_p2i| zszqE7at<~%rc{7NF}UwRVlJj1)}n~epy%7LqJfr7oP6X}fOup&k9?i$Sk^Q|-_oEC z=`)kxIT)&qbn0583os0&KwNC#j`am3gccUEpLVTE%Q|TZTo6IV z2qP3h(A#QKLBLeWs4&4_H9d@gAGK;Vel+*k=XO6 z)ALFXyaAV1aCv?cIJY`pVNcR zYGJCzNg8%Jpw}Zx?}FIm)K)a5i*k4Ntwbna9OTti!IwD-LH9HkJA$RXA(U-Z0xX$2 zpL2`~B51?yQmWLD)KXRW$)JNi-|InOD~*BUy+KPuoPGBdQ8|4l+;%mkR?!wYITQ(( za4>Lt)UXs{P<bBSB7_HmQm825OIb0MRWBb!}XU5f) z{mrY3W--jF0k?O`kSf3riLNeuiEiVXIA*qQIAm$_0Oe^%k@bG9b=EFKu2rRAsF5bf zgW|YbYjR`MyglGci0vINt_&b9p%t(i+iv97PB~)NN8v9BmA3O1>U4H2z^i&!;EL?c zy5M>@OiB8r%XbspvzGOv5HdClf2Cr@+--Q`>iPzXC~f?>+X6o*WU_^+KC}nU`baf@v@J1_I%#KFm!g4{X;zna@shOi+^Py6Iy;!1p zmz>c=_KYoAMnOKGIdRGDpS>@_M;mS9nJw=B05Nh_<(?B5bij4T0ON|~txjA`#mSN6 zkc}osEV6{EZkEXyjc`21=U3XZsX5xar+C`(6iAX~D1ePFfwhlg?@xN^ z=_@Ai`OMEIUD)aj$2xuo#ZPNj(lds~7#PkgTE&w9-zJ zSqSu#%?5SN#(#&#`lE2{19aIN)u%Yq3{Rs&VWZD=F~oI=2oB*8rKRTp1$cn$m!7bRq566wYUeXAC?BSXZ# z9k#Y_CS1oGmNvHlwC69915X;vW@Q-$s0ecU*X zqkxL4ZGW%of0bgQAer1^k!TE z(^pF;oCsDMX*<_D8kbt#M$}Hsda!80RVg7jVk+i2 z#&lB+ zILm2K??u(uQ2A)1^*1~l z>OHn1nX5X%&=8C!)CfOHj%vw=U1s-XwI68EZAZG=0xCfe5jb4w`5;&M>XONtrQJRZZ zbeLl|OlAOrg|xQ8Pqk*%)|^r@6(|8N#X_H=vrs+th3vBVUT&rl>LCtMihSJ1Yy+xQsk_1Z^S{y4FEGBKF=%3}v&GU_%TF4C!nNK;V^S^9TeTs=?3Q zukhJH1UB1ONXqV)c#8rneM(tyJN(qJP8*dBB$0xJ+%9Ti)o70pS~kkkIXs0;g=-wc zT=T!p8k`HDvjwPxErGH>n)SJ5O~dQ zM0FhxrNty+!^^E#EsvxhVOgU4yCw<@Wy@!CsMb{0-8Lo!i5#|lVOzaiMrVpG;e}HQ zOow-4>f7eG6<>!f*KKKnMpsbSj>eX+v!VQ=w%QXTx~?lIrtWCrjNwtAI4r+d_^5`9 zr^n=eVr48z)tuu4+Jhcjq*gjZeqUBdBRXiUzMp!oGK#`HdQ0u9vJAVO!z^*CG8N9} z>7dK%P+nwcnPY{H2vLUv-lz)a!}{VSB$eC|q_NIw;DU8lhC$|yDd|>EY7LH|)E7vS zEtj$Pq5`+^1o9E&#!j7`iuzih&AIU0j%2uWA+-|g`f=}DoqtP$dS6?3P(u?0j1t9t z>3*Z4vyr4w`N$`bcCK|mdDkZCAE=CEhBXrwbaai-tD==V9QOI3!ncS=H1_M0gQ_xl#b|58aVZ0lje{D_ zE-vbwM3fM#4>k0M$FZ#7KIS!8;*D|)V;-(e1||ISgBV25t0hP3_^YAh>gv}fHc=5& z1eQDJ+JN(OsdmZjk;O#-7kZ5*ywyP6XGD=`4XRA#6n=`|F`HSC+OPmHEADF4m15b; z%Es(FGL4Nz3q8c3lCjBwvld(hG)0LkfvuYv?L;eSKx~%)XE{Bnsr62-ny`(KKTz*X zOF_+)zbh3=+9Q@G3lE7dR2l9%BlwE1!$mLHU)x%cF)_mB??xdbZ#-=W^ zSyv;Ev8sYv+hg2;nxI6K(*w8QUlQD^XM_#z)R;PNLx(XZi}2 z&!uxo>H>l8h}#@xE`OH%6>8@w+Ix52Q7wP>spG7 z9^=}mGpAhWT&M-Jj2>$k-?K?#Sulj?bH1Q>rDYDPSIN;Ue-T>&hjH&njA4LA4spR1 zLCUJbD%o!8d90;Z86c2;{{U);jE5%x&=Y8-SS*2~ErA;_!tdUwAH*?B19=X?!2y;* z-mF%9YqtE^V`E5&!47c8eDg}E zT|h&SHy-_{gJMYIRmMz&<%#_@D#R`>HEq5HOjQcm$sLB(q*M)2AoK~2q5$A?^Hfa7 zov4Tf!NH~}!QcDVRd<<>-)bFs&9P)%Q7r#KkSY6nPF zcjx`6G%YQN{vpGSI8*IFJg!I2dMJG)_s7KrgEa-W2OxY30hEsQMbXIF!umnjv7nXB zvZgzp>?jy~aYYHFmmA>cV^npQ{v=maNg-B|R416&!R=hAAMz3Z0Pv#zv{!%P#DX{) zC3bKMn|QEu^ZQq-#~E0?F4ji=J&a5YE2>0a7U3~KI$W1HuC>8wi%^y+$bR;FL(A zOolfka+y!?rRQz!zer3e*IBh(w3)Ns7v#CXSi@kLz~!BdXMy%0g1cPA7lz?T4P&iDg6^HRNj zFQ~}aA(W6m;i($($X54DtdKF0gH`0gbKRtCj!EEFn5@2&14%16P*7(%svhhHm|y?^ z+lLWcxjL11#yB;Y z)n#4`l^dP+HPN5NjG*CFOCA7G>Z2Fyt>`@x-V(2PKz3cDZUFxPtyBlrdW11eD%uwH zX~7$+`{IBupW+!})sBI ztJ}HnS*^-CewreQWY?Ew#s>nWY6FeQ=e4CH6e;u&N|y-#W9{Z$ia47OvZ|!u{$XQ*3?!`K-D`S{;o|Yt=gv#e`YNCm^2H zrZon9O3T9T0r{pHta5%RY4Uc!8O||8qvU|c>A-myU?T5VSyc~9pHWwjMv?byS32vz6O&W3y9@ww0pIqcP$M>e1q5*4PCY%3de^f!lD?ep`&Mlgy}M&pK^)?$ zty^GSN&}^rzhhQZ9Tc#}2qBAmtu4ZHs6!~jX*g1Tl6R{vmz-qF={awqj{=RzBK1@x zWp@W`_p2PbY09sqLXZ>zkhNH4UrG<5a?C~#dI>{hQaqezxIEB?g5c-xwPwcJ3drG< z=NfnW)rn$=ZkeJ~z}b#l^%~Dja}M6?}{djX>FXtlF@z*u08^w*rUbW6X)-z+DbDApXCa zjri-FyNgLa$BM6B{BQKR!&PO7pYEwEjkeL{MPl#7h1*o7<(F;n8mhqS6_m{`42(~b=lEf{T1ZtAyh^TIk~Ews?rU)X^bU?BR=K!g97+j{ll2kt zT0~<R7(3vkT%#>V|>7UD&&?( z$Qay*HKV?9tJ9@sd5_ZZkh!d}r@snaA4=-_WmC9nC>uyTiM-?huHmEm)WshvWR}1g z^&D-AxPWdt)KU5dxpTIN_p2fRx3RgIn?fuj1cK*$e0qrXQX;olU$n-##_U@UDbjrkJ={lN&VksG;SmqlpJp<{i)m-x^!hoVP$OCE#UR$gA zZ5hBrgCFT4phhK#`Z7avlbldjeI~Db0iT+qSENF%5N*I9nwkMnWJBlM!nk9k5tctD zfS4r&0LqvL2sG>{qvVX0*nmBhVuLE{sT4+6*f*nkuyU80Q~ackT=U%4gx%%0(rvuO z5-z9nevh^)U!z;3_^l#Uj_xLiWa4yOt5$tYbSc#Bp8_f3B#h*?oK(d^Iq=yhR`?os zpvUTcKuK^DNyK9fpVVrgtJ_HA36NAM^o81hXu5o3BThjaw>3dYX%>K*NL=!#)%|EP z?3+c@kd@djQJ;3j0rxHlWgBO>ptq&2j3CDRlkZS-9y^{`t`cNA8%~BPur<@iB^g&8 zURfes$)APVt>o8J()t8aK!u&d6P;`IeXEy4bNneZs+lEXH!RKSHIaF>jf#Q~r;Huw zIXnJ@(>(LUtWZc5f!;;=tx6s)og`Q*bfrlEs0Si~({U!Uqyho@*XcDqTGTEkEOa9P zPQ{M`wK-NOYJ_ZxGup-yDUAe>`tjwpwc zG6J%k5!`p6EtzB*{{UVvu`mq7X4AeRi)4F>zu*&6l2CEU*EU6@ZO~Pykq1(6E(WepDY<#v{H<`Y~ z9atXJTv-Gw8tNk?jtxWt@?hlW2a3}*QPq-8>PFS1S&hB`-im-f(t;OqYE8ebSO|b= zMb0ygv012TPC(K==895A1~7RW=BTVMG!+HLYKb6Rfw`c2m@&TJVN^mPwGlEXDm03+ zCjC2Zb|#ccbB(sob5jIO!N4aO0~8U|dEaxjRcS|NG3#ahs-G%`pIp1oS zAYxK74nFh@z~iwW6bK_Q#@X$YK{)MLZMJHfgtm?jaCYt~i=rfjo78czuf#j~ zEe*#=c%zXuq_%T8^~4zPKYZ2dqnGL)7r3(!#W0Ii&{mA8$pHJ-KUC3!{#hj_#uQy+T{)J_N&!N7#uaVmS;HhrtQnbrQ6cO=99EJ>pM$(x4XcrIWHFewZ0jV_b&Kn*PM`RT zDy*^TMp<s18WGcF0!|N&k0NL$N(=o#Mlf>d%bJO-B zD~(=v0rAKB*Dm_UZxnNuw(>~gIMLmS0}-iz^sapJ>DO;jzVL_T(g3qHoR4pbP`XrSq73i(FeKCV8ZYg3~D^#1??Ty-EOL>5pK+Zop}_xn@y+;cD0 zulgm+TgL5$aUn**Nk0Dodd0r0p3Hw9b@;l4%H2l?knIwz>zwOh-lw*&6BuaTpSNm` zwOTf!dwuAOV?WcjXeRBC_NxsijIakIJ@Zo!1-A`Bi^W_!OgYpywNkLj1|2rLvdhv{$S`KSiGouzGZGdrDw9^VvI7U2=p z$Xie9)AdxNqv^eF+F-Ww#uhOD0K;Lvz5CFNyUTTs=499+9DseR80)_PbRMbX-3ydW zVkRY2{XW#`i1m95^y*-$sY1WRVtGUED?F9Qb^eU<+(?qi98$u$GL!!R-6Ie49T<3byVyo3=o6TGQ?!iMcqU}KizAbuD8eV9;5r#qnlLqB#taD3o_xstw_zF zEn9q{J9C~Y;U4g9-Aaneq zwM}XVo;HnwxWQ!%wK2I>N}32|Z&q?gwQC&Gxf#O&+a`?Kt3Uugey-I)9WpGjY=BP7 znhhSDzD>Y01_nP-2BIT3RFY|BbjBn)PIuaY)+JG}I=h;JLd7P@X$ln{oO4A|uo%Y2 zeoGGZN~%fq4JURdZ<--Br$^NFgM7c&CYlE+NusMg&mGFimJNG=Sf_FvD&PHiQFk{?n&5tQ!y%5{WvyH znV^A?4P4fJuqDAdL3|KSDmrm>I262j+Yz>KYU@40Q`{3C5E6MHRgP4;bZZ_78l-Md z^88kjE7?eAUw%F+QZwPQW+w-Y$vvwrR+Wn6AA^Q9P$kr$G10K^Shb|#l(@joLD`2j zV%q3zqk=LV706HG>fPAYVAD?=vB*>qfa+ZP(*}Fa(iJK_T5zMaW~uG^R>JT2`bgTPYZ{hUC)mhPiu-aK}>mM1M|sYTQaP!sAw=4wAzRy~*~aAgfCyM%Lpm&KtF1 zptt=z8-yt97?bKb#*L}6};Y2tK zv0e3i)l67yU(Al(vKaj+PRc##3X0XDk%mSGq#!#rO0ira;*iRWzGQoa2U6qOvtq{8 z-P>JT>rgj2C^=F&6_-wHKcd_**AT#VY$v6NHv0z-=;mzSUW-pvtEh-%!YJ=BZI!Nu2G+y+AGO_yl8YZ(4}YALK{@ zU>xkr^$O4e-u3i_BPB*R??V^Ib)4#48)h{JH`W!_;bHzHZ{{Yri)S^cI~gtDL6(gefB-GK8f!Sq znjt6XSkqQWQG#lwApZcDwbO8@#g(w?r*{U62e(s(<~?u*0SRdp_8|LKY*1D=9&iMx z0I>jlstrFiV+D>CP-K(E0Crtw+Eph|MlFm!!2Hoi$!1EDG_c0S4xvG@(robxsr^bx z{{V)fIeweh1DAq-Oo;3dxW||)SgmL+6oBeU-x=*$Ak}@3_n}zcD^>ileK;k8f=@MK zu(}sZSWrsDNi4tR#6L)_T8#_aXK4~PeCzcU1Lz*rHxP8z_VOXOk+ua(MXW&Fow>~f46eg4fN|Zn6rWLvebVl38Pe&%Dw^X9 zxjw?TE)0&D(;6pKo-zZUNj>XVtw(9m1{Jr;tLatlE00RrEs>~m?O9b)&ms+B3jhl? zJ5XkHo~n%-d2)#7d7QLe#ZZexxeh^n^HgEpbuz?87fOS`?^}qqU?c(t#;%yU3nQJy zK(8h88F3lUb|-2guBFsS^4>F~=M3G&Od0d_*;!sPK?n68s+gJrFHrV1aW#3jE3+PV z=V}FcV8dh~#*o?n0BW#Mxe5n-;IFk+Q#+He9CM0dDKWM<+rPb3R);4X8VNw)A6NCD zA*E0b7<^L@$mEU16Ebt%-R`&6;JJ^`I@NY83UH8>}98rL9=i4~=l2&T!%8xy?+$O{rc+;Q_$ zL=$%)jXPk20N_9$zeQK>j#ibV}=E}(YU914`el0ps?kC8-JSYT@X z>WgQyQh}qB)OKWVY5<4cidg2cBE^zHNQQ&iVcgiRpjiQLtRVVr3Id(}e|R5Xdk z27U2G4##oM+zO~Z9-Az?oFK>6#(i^U~%qh2!uYZjyM%nIOV_!K`ZawXdP`xQWp%QXXH^Cp-4Y!v}nY3 z&uYddC_-O5`j?NI)Qbsb-v?vuL2HmcccQFmSKseJP;tHv)D5V1{C3^Z5);o_WO6H<2kHut<@p8oJt}HG3tzP z#<702K0PgZ)xS;Y@!i`(A-K67P>GbBW4O;A_0oKE{c>&M5pE+_ zy#qwPj1PQ*ITS#b5;>3uEX4A}?rSyC+gx?)R)sD6w24tb4<0q0yVS-(^q&zun`^hj zb~?U>{i@?Nsp1~4^V@4-YL4equM;1ELB$CfurR6sz#@u7ayhCjxru@T8y@RLz^=`< za85a+q~SqqYiZttW>7Gyw9sSC%3grNy>dRXD-7Z%UNo~ z*5zJxFP#hZW4&0GDe8Cn<{?1GW;}sQaofe?(DN?ieC@fUtL5=$)!i+EGb3Pv2~vAj zVM*_RI7l%@*0CNqXg}+ttF|9 zo_@g76tj`Hzcrwm*z&-URW+)L6<1(=vr)>`9d^-7LO?(vhLrwlS5F;dTgXVzqd6dL zQPauz*R$!b8Et3Q1_}E_f9+e-TM!iz?s@?YC;w zV*OVe9nShm=Cjpm8hH4u#+KR4v65KeVwz$6sqR>L7V}8Cz$&K=T_khSq1G^CkhE+Y zOT^!#(5TzpY19Y+hQL1*!&(n^zm$D{JdR1Km+H8q zz{nXVmaO92gD!ezVKT&Z?Ux_QJJmH%L72>7x`p)vuqWD;C2Kv*VFM^3@rH>0n!-n z;xG_}aUx;;*0RuPt-xl9v8ZvUd{&bH+uk&6Q#mBzSKgvn)#=?fN#t!rM}_qh^$*&K ziN|FRmdHaH3t-50(~6du7HDIJOL?Lski<;Ahs|mUNqBX$09dikJ*i@AGVR%(Jxh$X zHB%Qw+MN?_Sa!p=6>)uq zTUqJfa&eGz%|z6J8jc2#K`oky0(;XU7}h+l0f2Lfu;)U|A$Vr_9C;6dk6x zRJy)YWch8yFcQ~5rv1pNe3OyxSO^RGe(t=7Ft|(1j;#>;+avb$F6dht!fL;n!kE zwH7(zmR~B^sBferf7R3{faKC4L)^nyl4N?tA-H#6ZdHX@QKT zh{-40G{EUOQ|V$cwFFx49FPg`-l&X>cE)$^C?}}URPz9L=i-95kb7o=EgnH2RYFNv zZQt5}l#t^jR8p4(alTJ++JXy^xHvyG1boIA{=$O8BeC0K-22d80q%Fj1SB5x62^DQ z`%zSqSKNFG2Z#a=t$?biMsh|wnj&`_9AbizIR}i2s}~~?xHwb3Dl~s1R_Bj;nwAQ+ zfRIQ2ndH-2<_BwKQ-st;X{}hBuu=xY-xOtC?4iK)>1F*(%T}~qZEW%{U`KY_G-pW( zAF;(^w4y>8vELMfU!~ZU)#hXd8B#mZG}jRbeMABq={TsYxT0n!7$oj%NUX0p`w?1X z(L@&`ed-CX+X9NSR|h#G>G-N7E*P8*jyY}UE0AY9?>tKNWXfJ-hn$;Dg;-P){33mm^E z;*kKe`g4O?21nBzfN}sMInMMgbnlT=YZQj$S~vhjgT6nP!8Pu{KxIaL_Q zE&QUOstwMk;BY7oOklS-=CM;0mIUXDMJeSN09J)*MMyav$oo|l%WyJ7jgJfm6hk+p zXFi7RDT<+>Bh-f@oQkNHe9wj)=e6q<55w4)HwTjNf#H%8-cPhAI6$y z@A13hKMlhe^Dd5P(`e}h z_>xQceAe_tgG?|E5PSXV)RP&VDsZd`P})YphH1=Rt3~E>lcW{++O*95XSDp0f$?0k zUB4ojU};WONg2T_+O;DVr{!oa6ow#o?^|b8SlzlS5%0J?stV1~8E|k(;BA^NDMuuq za(JxRE=I=3Z1CUhRv|Nxae+a2kxs|@cA%87=b5K!vc1n#vebi#8q9!;b9Bo1jiy@Q(4%i%Kn$3!@E=JcT&i4U6m}II?ARVB)1Eilta-hD zp^Zc+?s1yZ_3|}(i}^96S<4Zft2Lf})@(7CU=JPZ5z_o>U0elSBW}X9$QapxEHH8J zOYwQmM;|$An9Wfl`l_$26+c ziHv|a&!}o7?rRo`y0oAoqAP1=-H&nYS5*iCy#=>%%H%k}9Awm^JE$K}@3swCs}x~I27UI;X(*`M1Re*;#b%LjQR?7EK~M_} z1IRUbio%WfI66mvdUYG(h+Lh(+uZS4k-JsC1_o4@vT@IGj=;)pGq&Ct6s8+_5y^{u!RM8J~T z$ioIX{pwL!h493)r=-+(o(&FIHXGUpC5JD`dzA9+XY$V8XyV>@RSd#t?4H^@&1L< ze?4}oDUhS;lIB%DrQ7PM&1=7n9=qXbI%`JmR_@8$(K>Da0Mg$z)z5XGC4_e~Ml98p zG!~c>od%zzW?kBqEuG#szyso@V{)&1t!MxRbFs}>gX3M5RBWTadPvXcPw^&iZCfOIj)h`#jXjNSR#w^|M`Qtf z#v{}?Ux8JcZl!WT5acl*QRf+{Yh3aaYyj;>uw1NyIOAOE3|X5yP>KU(g6StG0RI5J zMuJ`ftQR}#-~P3z#YXW;bGYnkz*VeFgIVVv3(nmEkgSuiU zxt2D_^A&=hnn!pcL#k;&#Prbf}E z3}DtRMJ6|gMuV)m($FsMzcn$rS}CqTe5hUBc~Cg2#b=~fIn?k;>N->%j%uJ8I=cx> zOpb>-NjsIRpEPJ+^wShAi6bi9=sTJU?XF73F#K!|YE?|%i4?0~k;4j#Gon~YDPt3a zc$ZqS8U3nMsq~K$$pMjFJmTcBQL$4~)g3oTxMmrcjYrj_aFw4?ZNE^8SCLiMOnVs{ zWN)=B7F=}94OvD~HDy?0ka9kMojg&y0IcOgjsW+qwS%v1k~zG!e@Pi!{*&!enCK#~ z(245611!gi%Pv>M-6vjeAOk?cOB${={%Wz;j+y=&zC~v;k1)yf<;_5 zgU{NmD7kz}#e#(~<7e0P13<1ip8;@2GRNMS2mI!|jlk@*!KrOFn1W$Wt%zZfih|2| z651<*6nSz+LnCf8iej+(H(9xc+CiaK92H#hN%pIWTm3rITnJ+(IPsQFS&wsAu!_yZ zaOz|L=VjkHH6&;pz8;X_)y7{hAU~qFjOYt!7h4jgqyq)Ls*MA5eeyW2$_pM^?L{}0=7*T`Y+-A2TYi9oG zB!(tkB})u~IHI0jfg5GqwlE5+n#~il>SalVQ2GY?y9%DBv!v@s%#u+PGe$J4C?zS1 z&gpa99-y}dBOrM6vHC)7&2Rcfmx%g}+5*u$ObcmPkZOOuNHF5){(c1C!*VrAA>93_ z50|9L2G+@{B0WrfPHCuaoqHN(N)sSrNh9g|QBmq{kCKYSk-m|=409JU9l<9xxWx|4 zb{VZA=po4?IjAK(dUnXB28T%*Ip=x?nL#+leX&4TI#gf}zj}g_ydRzFYT$`L1JVXa z@4Yn{u>z!mGD)kV&nWJA_@JCo4e~ebKt_U8jyKIf*7m5%;fYoQQhOhYph*cB&w2m7mZR5#_0Fn1@o?NMT=cP1tqk5Zq1id7W|)JPj?9qTO= zh4uvCdk*weUAys$GiX-&m)(tORA|Z5)jeg#KT7wh?7Gjo>IWl8!ts$>lTuaop{6=h zbKIUQHKq4fDHaJOr1;{Zwqv|sENX5BMrtD#eyC(Pz&JjU+Ng2VdGr8C!73`CeTi{Mlsl6@kJ<6o=qq>(V7T2(%MM`j&VUC-2BiD0x%BI zjY_BZhuWwsqFXG|6h31Dx`0op)J45md0)Wtd5Wdng>lFbGhzCL2+%jDo?negi)WUalskprYdqqdjpf&n2M#3 z7$gxzNT3+TcNxtAaYEVzgexl@BOH&t5q!``qjkt(jky(8D2~NYYYN2<%wKh>pm|}9 z7!}U_f!eNzQvqygaQ^_!nhA(kI4^1Da!iSi*yPX+=?#X-2lWaImK$Ndw?70` zMTY7%158;xiJ+}|oQuF!Jm*b8O#M<>F{#PN9~2Uhl?j$4u+(yRqO6uB(l!{!ZfF3* z4DpYe(7GGKHrV`Ph$H+!fAGijs6BJX--(v@w(DtZj>b~0ER3aaM)(4?d)7Tu@TY>T zrv_P~o<<6|AAE+_ zuRl@WnxSt7Fe4mblSY@vZyo{E#j%`JR$|~WE$>ijwiJ7kG6e=~vyx7x*nKr{TN&FU zgHTV)QV!==VcLRL!P6%gKO%y}zikOe`=`4GM)ZT_@hWF=j~7uhzT6+-hyP0eBz0TZ|$`S375FujpD<=*o^zp z65C$j-!fq6D~{NW&up3}@beS>)4@4sB>`G!Ei6Di8Ue zrmS)5{byL@IL~8R{W`xIBU`cC{{U*wQI8$^BG?7XAGKlV=p>-ICvZDe)_H`8!B6t% zbMs2=<63a4Naq!oqpM=5csA>npvTTCt39!KcrDLplpl`RYITmyPDEyMr9?k0LkAJP$#EEuc>k} zbCLAW94-*!4W7(D-liJJk}SwT+!IV{RghjfGe;VRCt^s>D$wTC53RDteI)T&#PyS=B2AL z2wSy@@T4$5P&?G9SA8-p`RVCgYG}tFwK=I-GTcizD+;qHI4%aly16v19yn1@D0vCM zVap$ymbD&KC-m1ZW~^r4N&H97SnA4-_^y(HXA0Qg7#J(wu8L!jjk|-f z_^c}TRblEswLvfn3=KdX$ZlvDu6XC#gImJgQcG*3L5&v#1|(-e_a8LRh!3n@vrROT zw2r~bgDYxq2LiC|Bd75E?_p;=l0p>TC`FP_tp*Qon(NHR9%;Cj?!9lrG`8QNQR-`twVt6C=7SH`u*I3)L}IT|*%0b`Mo z2c#A(+~&4(&ej|cxpTQ=o%_~Z?8v;!rFYzuoK~EK%2Ucl$k+PRR#y!irFR>GD4;JJ zQk)M`okaH)ymO-?0HA3{ryc4jsOJ&Nj-bc_Zi1i^dv=kSoF;b&Dk<%*{P_%%}4Zx`6AtpVU9=MinntGBE(KJ;C>? z1GMUJ#_b%17DC5aku$5~G#PT0Ea5<8)J|9F0*y4G>UOB3_+nPZ;0lP$hoH?Ww6UWq z7Gg8niq+`Ti&$CM=1Ch!LHe=Yn1JJd{N}A9KQ#*l>^^8VnmJC#03S(Z_Mq2;rAMGg zfWx^Jk;nBrB(#~*Ii`I>Az8gEnypC7>EXo6{lUm@YOP~#+C+JzjzjhOR#yEcvt797 zTD?Q8Po*s-jYv`mnGPCd9`uu3JDEf!?4{aB;yyr&%MohW?YT6}NaLhb^Sq=V<}&FE z!i?@KSan@o_wc~w0$~*Z3m@t@qYNjNCy;sU>k|5v2K)Tcp?6nNk);rg#vBc?SreMx zD7>aw2+7O*(F*PpIRph;9n~NO=2E zanM_I<(G6g1L_^cH5XsrMGSgD#H0MQ139QUJFc^Jb0R>&BN+v-IUe6>x}CfO1B1_)pOBUFXjfECzrD-@J(+~w=5BZrAP#f zkx&VI0wXymNFJgG6d16@B;!@S`gd;CVkn9MGx=iN4JTBNrnZd+we$o|446^aRI1yW zLlTcMvw#AqIVa+=Ms(0L?9K_cQo2hWwV#@*qo-M2K_bJfnB+Mv7|NfTXd!Hp;&)Fn zNQ6M^9hlQbX(Bc{4lr?^^oy+sZqb3x#~9ze88=E2E8&U8tc~ckZOxRjPb)_n5OxkR zy$BA%K^T`Lh6>uzhT@o&$UMGgr2uoCRnkUjTE`gAm`>aQ-mOLPL}Dv0l45g!)s|#@_X$OkID|G{EG8??F?5-kwkCrievsRE=XK@F}J=m-u6B20W2jYw$Pao_4@F z{{U(=`qsI!Na6~gP~FMzS>LXnzZh(zJPqrn{CVv9d1EAC3J64mZGt{%F7mg*86Oo* zIMTch{2HQK+#gc~Q@+${2YavL0v9Ss0G>q_j+%INA1(0Ts1eO)6HLlT2Y|i(>MT%w zTYH)URwP57NF17$pbNRR9(L_k0a>xe{jpmeECFrd$iR6AsDHI$)r?klY`Hvbrjc}1 z6PXp1i~zaCFa(K$HmZ#{Zp2TPP{`|orm85CEk9y%v=%Z)rAQfk?^e{!Xk6IE8my5_ z#iSp_kFwW0U3uY!bq-hr+>?P?<$LE7x74yLDZx>s)|`XMoo?;R9MuI&Wg&#f2H4I! z;)tuE>On5BLP;4JHE4%Lz5KkT!75iF8``3azVTd>I4+3gc2>sqQCj$dQbQdIt(B z2MfO9nk*3vZ~f>a<&N1N^+c3ohBX9y)8BF28Y<*=ap^!uwF0)i5tdd~P4Gp$kM{Ms+4SGL_M`bt_V?xiV1w=v{ zQq6(CxTUR5b!<_we=a!G5xX;X9`u!O13ZYo`0M>Ctooa$NM2};3GJ}&RX-m?cy1?- zKP{qI6vSAW91?csy2#^h*O_=y-q!1@$R;JzTbS4rxg1wH{{Yip)41`}iE9ax2vtge z-gCFC{4ICC9H-jgZoG2w+sG}+N4UwHFwUHeY-^S2(>1{xf^Z4Q?V9Cox=)B)5BqfMF^6JDea$MAvN0t`+cbeq3WW=tx4&<-R7M>48w$->x))H}_n^6^Y#s6r zz#0J&6qB6i+JNbBK=fg8$)F>nz@_x+#C);N4GIR~Rb^nLl*tNBR$0uukUi+4BZQnN z8oOh}zizU4vvBu-LtkN1tzpY`W_lJ54TqK{wNZkk^%6%r9imzi> z3=H#Il`z*X000fSr?Gid)1bx%=jsi`YB56GD}o5Y zT;yV^4GpPs1`aqiDG_+c131scOlwuH{BONQO6GP0PM&+>w8EIJ*zUvy`8(A_WV!dA^n zQBpU~dx6Dc)!*4vmpR6odY;Q+y2@$Ce3Mege+THff6F_4t1;>FW;3B-kc1Ma>aMu? zeb(eMM}nXQQ@973y5hghSx`g~bAzeR)lF6}OOz~)8+t~f2^BDFT014u`A5tpHutGn zYTm~tbuy9P6d8AO24EC!2dIjw8d)*6*fl^>U8*nu??7rU<>Vm&87w>1SQT$_8_QD~ zkE%oUwMM9TZJu&OL;wL|&UZ9HFK#1@XX+;y98+4bjLa}d$OB;9R->3_ke1fi!59nv z^(&`6EwXSMI2_>SxmRr1)`k%8x%7dO1#h3PKU*2sf*hRyh6jIYSWcJp`^{d0a;>p7 zpImEJ!857yt%sSFEqcd^;09pyaeL(vh(L~M}iF1u3VTy>mr`n@FXVxPNkQbIU zVjrnT<%E?93#-uItt(ivgbF0d)u@w`pQ!xQ$4_RrhPCkJA`6l#1? zY@yBoz#QkAH*Tf3sCLdMhk$?r;GObGsfs3l(~jdNvlUco0Vf$a(nWM}s#fWg7_bOz z<5wwCsHEwWB6bRJOR39L*5pDs_t}ZxlUTL6&ZX5C%XsCCZg8#zT}#dh>-K9TK65x( zBhmu@06jTko2NnfgvK-~uH=5B@mgVLOt4L4%5e;T<})4XtkZRixbC$jq)Qx74SK-C zxvDENp|(2kUrsQ?)tWUU7T+wvUmykLX;rNnk8MBSn18iUy#74EN~B`DcIC&ucG8vj#7#aa1ISM&k-e)JYl&9wM=&7 zy!}g~U6^Od0m(wCp42>?wqdd<7O0t|kdn-wq-5^ zXM2=GAs@jGlofQw!9*H8M`Tg{wH2jzW~%!luGwsHP&n$c$r}jrs25AP+XIR!`&PCn zs*H`LaKVP)(^DB;QqZihwtXRh1oMgw>7oVjt)G1-YLpQq>kLLo3x!YR?t2PII9t1e zE@p42vD@OVHx|I-Vrn{K)j(M1ZG0M))5lk{v0qWikJ69v?N&MYV{fHh>5n82Ud4&p zwff`u#skOKqRP$zz&Od|3e*+Eb+gEGmOh`g zN(+ME0i<)C{i`%=MIgX97!?G}ig(X`2WkwiscA5{H;bj?K$_5>RyZ|A$Cs`#K0$zt zhR*_~2v~LdJcvZNW4L0cNA;}US5{ng8MpG@Cm{VD$IT>7WSC@TEXPYZ%Mn@z+O%PW zdYH+KoX}{S;R?Krp@J?#AJ%=U4s)a}-NVYLs}h{ZR4Gj7ur;WQE$$|Tzb_HK2NJMQxS-4EF0w^%+Z|IjO%;uIVp)!lRu69VV6xkzyAkFqMgY!F6dG@0 z@gq!5!AMej(1AQL*5Hmg75u?2y+n+#Z?#I&zY+s6j!R*$QsPBEgGkMCl62|Nu=4WS zcU3vsy6XWgqhj0zAYiPNv~;#@EQz8pm{Eq-IQbQYQGIanr)t0i&@vAH5n(up0rB+|&_m@HfeziHxZs zyKDt$RN=o!$f_k7EwCp()hN_~RyF!VvFGBks~~Z8>pKoVr4>~3lGxmzVOB5eqUiQ2 ziK`x>a%(oabIKh-^2~qX#YUJy*e3ZWy=qrJxjJ0uY#+UC%EYtDBxB-$X1PD4ANh|J zQo(SLptAtY*i^OCjzLe7a(D0csViMfHM?rb94_S6-2VVWi=469dFQVOEwem1R0EPxD#_B>ReyUUX)8Q2QSm~o7L^`J9KRj@ca z8mNY{r#yp1Xfufr4{hqInXZqdaz@n!ml|*x7>4e>s^JW`2OIwYTE*qsb%71$h7G>k zsRK3Bo>=Rx7S}IwL0J5~BX-6CtBz_O6;cB}wmd3&jRohaF&Y3Upl`2g4B2j7$QrZT zBZ_FXEtGNzKRi}-OcZB;J8e{2k?*B>JW&V!RpbF#RZ5I(cWMf*ED9-S+aAYy5tOa5 zJcIL^sxsEypRfa*(Uc~*D8wMn*eq#8P!qY&+}3qab<}Xby)?pP!4yRCp8Qo+au1rQ zxHdqdBA5q#&*@q!D!QZ!NC5Yu(eTV8$WgF8`_Td3Ck>32JAp+LGALC5gSJTSwUq?O zF_X@4Dxyywa5RE{m~%x!OHtU6MyuLvZpvF8~v*-FSH@SRs?$*Dz=LU7&{uGQ5-h=0z1@I zx^a`5DiS_%_vVOFXCv76ppaen{nt-ck9nKHGwGh+7+JW7>mga)F5c7?yh?9}_saKVNjBap6 zM?)=24vsvbI6H4!<&Kdy_&TsgX+Y;EBfqr(vN0PB@5rJFh5!>i^SJk*A}QY*NC0E^ ztXSVBmQ_KGIVbv3Emp0a@qya3%Krd4fGfZ}?NpOg!6{ZHP8)(nX4Nqp{{X#ms!?Y+ zT#|Oct08Ezj0dZc{i@=?1<8FXc{`tKG|^N5d=5#XgSl--1A)a@ods--n{4r0$0VYZ z=j}j9VZPYzXo$1pu_A_)QsnKV5x!_Db2P+(zMkV@RS;kRAe@kQ-l&2w$iUy;r6WQy zmKmtfXw<7V`()r$py-qll^(2MliHB1wKzvzwFl0stckR`lhUd+6R;JQgw1T~ePc)` ze~KE4+vI`{MtKxex{ct-3I-Vc+E7e+q4f%c$Q z{W=g-GL3n_Vt%Rt`kW}PLvXwEMPklgTm;HRoNC6#s@AMF5w4J|#DSK^!n139s=DYj7v;TJhkhicxi(zmmS2)yDHhQ_1DE1l_ME2u;gc>)kroT(cM%hABgM<5+L zXJSuk)VR-+mSw^nc*t$}UJY;c#=%pfE&wVHF{O8+8aUqvLm0vO*lgcwixUvWi|8b= z`k3!jO4B*t_O4wix}J1^2n3!DNmf9y+_?lf1TUmk*8@!ZU~xJ*a=pQ-0J~BIb13uxsUaPW8;d%G z$*5^MmqpsptzxR`W6B}0 zG&a~g)kPD=a0;ox-zJL`X(0VAQyn0M1+!756UU8S;B!QyE&haT=WkVEg}30iSBz{9 z>)y2%Dr8}a5CCz8PkOkt@sUdm`Jmnh; zf=>B8sMOe*%I)f71 zZ=LFk6$EkW125m=rCBunKI6;>1S=`dpL&VcDz7HIw~72gqsfd7WNq#Ds~$Ttv-(#|F3i$6GC9a6-l`AQa&=&oI#^?4Pyu;sp~R^sfOpa= zI!GqfBz%^WN&%lSx6j2~X4O{xVni(nE1~x?d(>E~toku5d=&w-{{XEb&x_~l3oV*O zr!wjplRdLlmX()Ph7?p$B$+B%zn9{ei1?$c3D?Snm_!#cDg9=Edl({;0O-L=jS?$y zL6-`aV3`=zjYEu9T{q*Q>UQ75R8{q3Dn}>gjPc*C3Xy4oSlHo;WCAy<7rwo#FQzoF z{20M)Lnj=l?nP;u=%2)pM)Ab4$g#w_T(_j=rXYACmht40CJ7px1ue(TW{afgFfQI~ zjM&|V%bJ*O0=wz{Qj@8(*_7>8MAeD|G%UfuB+$fGrkbUYSNvwGpsI0kRY_k0BYKuC&59Qlx zKtP>T9PZy06kmw%g~5){t1gxWm~IB#RShJ5Ok|>;ENsLMK4>}iw2_z~Tp1fyPQVX( z+O%Pet9eO`k))Bn2fbp{S8;I~5gRE-U9kd{?q za(*f(ZnNSi(2r}C3!gbp1XBTB6{5MfVInIAZBD#msCYzH>dOZXeOu&I6ise0aLgF* zmE~%xiELew|x+aU=bs!V?szfan;V9x6^VS!iN z?p12YC)4`6DxF1yoN6^t7h9END#LStG=Yuk4I6Dx#g@P%WZ>lI+Jg(INLlreMn@;T zSZIGVfyUKQQJCi)s^E9ipL|pmxH^W%7~+Cx*v=>=Yc3n(h931OG{_Sy2dMG!Q9|P& zmLn&6)DTIrk-_a%7ey!oVY%dr%~+E&4%?muMuHf~JA=DjQa#jErwt822uyOl!Ud z*aaL6Q~|T(?cC9+aI#K79~ES0tEfnu6hW~$YT6lWM?7P4DOd7N1+JV75Kc3-XB7vNj@78L8H%$mNEkUj)p2Z3sau5#=m`g$ zZYarErZ97{Iie{iTM`uEPUfh&G?oLmaw=A#Eu+3w6p@{Y;*u7LX;u-82Yv|bD{KU~ zxt2kVT37iKY71cMvBUs|AZFmdG!{Vsl4X+Z!ztw#(~1doyI5juMS!Pu-!*^$ZK$Ww z-0?^&ErXo>u~!i>cKGxL1b(Ab6qc=lB=aE;vqVp*3JISlLo6|8AFR*-WRgrMViX@% zDq4$XglF3ojTOnb`1q)?AfZ%ak~yl@DCVkR$jRG(wN$2-6Ydw^HKZuz#>=@ssL)bL z)swmIYO3-9-1g$2xXF$%LF9L!uGZ%aNZcKOG@)dYeaWecl+m03cE1 zsoRRGCTk$7ubhLvDkWB@KWZTEo?`X+qx75+L7I>e9;1!P$Gucn3~Q5;Mn=SKL3$*i zNe-nmj4|GtA?E5J=@|!dv_yo6*#&^#Dh*XyykPP>j`UG*M4=0xYzob5nyoGT(dod( zNy(_*gZ!}f6dJb|u}d~%jKZZrc+~Cpu93=xWkVu{W(r&>EOJn1aw@T2i`9osduY-t zh>$>}Dyn}TZ@xLMn8S#=@g2vaBF7cRBz%TAi4OO6i{pu;9g|ogutgB8aKpM1=I0V%JmO6>f+1MJatLgDZ?%rW4r*K6B z-o%m1rZQa$=Pl3Lh*7>y%-?DXWF+TuFlvPh_x+6)9wpRGWw}?Xm%@RT_7ug|ox7C; za@=CK9O>?+asuN3@0twzvIaEnN7P3Z6eYYSMkH^icA^T@S8R9AC@Y@mvkZ+m*lF)s zt;Nwqg-LRA`czaXl(cV2C_=FGpRY%KY(TIvohy>RUaIKv z(LF9k1zSSu2hyi-Xo92bPLjAPx+FMwzd%0}3hq-Ji7J4nj4#vns>lyCM{pdBE1kjO zl#NL(m9kTA_^hIcr2vq`?YJ~m-e@>%qdBH&KE1|rbIW{D zTA|F!Fcu_Dl}8_XDn4d_aB^{ged{%-9x2EVfvL#I6oqJ5!8nNsP!*V$AFubNWli1Q ziIqwR3x*-MHJ?=pe|hFeTqsa@QQDR|@mDjppXDCIlTt>g283^ha^Bsmr1;`0*9rk3 z1_wDKH8m6R9!4fMCp(bb8lJ>k4X&Z3wIS|SniJbBOstH=aN4UjEDzM>^^6ckob60% zD@5Ee&Yu3pwT%>ut3Fu3135kGON07CDIt^$pGz;jHOr`RYi=bX?jk23si*>5O@igMqB@D2ny9Dq0`x<{VT0_PEsxFqZV{{ULjP%_3O1jtEXxK%s~i-K+X zn?1U~LXoR?{X-q7i&89(a0e%~HK-kB#(keW@2zO>>6Qx$a9=lTb-Ar&dVSla6YMJ-lRxe5_-ACzqg)_<j z$4e?#TmJwOL9Bto4{yBzxAJNTB0!oKP6yP(-m}uhKx+XtX<{-n?^u!3*`L%V*Nl%^ z`dNp1->K{#+3;{q0pQe8vB*(_1A?bH619P8xJoaN4>xi8}bB!k_ilOb@l}n9-ZJLd8aSotzc0B(8)}w!@!9S;ruwp2a z;L@6a+jI2+M)WKa7+r|NXXz(=d{uGjsRZHoI3FvvK58*wdy%6)tyw!ab6Kr($W(~A z14(n7h4-r(>8B;BkZ6<$kQ{_ly=lRj)NF)q0vx8CkBW}GuIbp*AaVq3nn^rSD>e&# zEsj(jkMjzu(UFw1s$o@erF)vwE3C*sP6L+NgMOOI;@hdwS3nBBW;LDy)K5`yEEC{G zkYh|10|4z&e*@ZG+^T+KPPo(?ro^dGe_%|g*6l}KZi z;8kYKE9C{_f+iTz>NHg%FsxHyr;|Y$<HJHD>LywU*4 z+zQl-hfBF;B?OETUCMT=fNQI~AhMafnr^95A$UotKe2_72L+t z7LrgA!sv`+Y<$$jW4}O<9IKbxBoFkfiWV-dJ-ZNANc$dX>;C|zwt9P{iqdK)d^0yW zqct_RIRBP;`HviC`{(71Myc zVzYw=eyq?!3WYBt?thl7il)xmc}SLIc}o2WH_$$DTGVL^667?13>}qr3sUqW)u)Bx zbX_Yd5O~3A$Sk(F&>ewA^!w0i^eaf4R8Ja}VT@v~mCN`-CiCv%Wdb;z(>dVej8*>t zh%#F+tU~8bb5K=1vvQ4}aYax%fJmJVU7uxIsLi|S#xS#b#DmmS?TQTx?xzSyTUjq6 zYGq!>*wsfo0_rS#oZ^VJijBw{a40Rey31$FQ;z4g6l7QMr}@C?ZVK`y1+f}4~INEzFMNDNq%Dja%<$u%m#l3Zk*cBCj(VgU3&3%^hMn$j&;z&r9gnhO!V zsscoxx$J2hgDw<)SseX-X$*bpQ~>8c^{B0$nQ`bK?rSxvL-h;HoCAaLNej>h8}GU9 zd)A{S7zAgJY6;F&j>;5{;;0?wI}M2THABSt&!lbbRTUee7~p9YRz>llKBd^uie$KK zZTr*%o&NxOsIbUDB8q!-GGJ~#1x3WAfT71e;MHYV$92H(iY_ej#(#!?Y7ofTI!MoA zD&u^at#D2^9OjGBpq-TRbpHS;;*Kk&l=cBfxT}Vm-9s=Dhb%s#IHE6tNRnss0m84+ zyX4aqT>V-{`c8z-0IH|%_^XMjqu_0~&w2*ak&-sgCW0!Ua6fvY5*_M?2akG+iRb;O4CuWu+(_uIs8w|+ zZXe=;5=KL+1o<$K_D6p9;<7MXqYI@q8XRkkYla6#z??CQj6e~7X^qo{Ug0V&3YM$ z5d{Qb)kSkDBmAVt^LMI>0DO%nzo=Ewp*;CzkAMfL)LBrDP#+3*;}snx75QOCnqDig zg3|9zv2ukqvcD)#VO#6<#(in{D(cEPWtQeRNZlPG;>J%R65bs>1sJ|yv!6RHbq z7_CTP#!`!~Z){e2^6JkPIsUQYtDCh{pF=EXA(cX!%&lHnt#0kOQb6u1>SEZz18@jE zk2R)oOT_4PZb9G;>IQOttvvDw;(&7J+AW~wvdIKl7jL3H^b5ENp9F#-r-&oo5kU`fuz@3mD9fT`I_4`Ejjd{F0h zA$#flRWW5)FA_2eA=RGr4|jI&mt_b!^idg7%2~6Q$NWZ$n3n+Kzr6t+Iz26t4*bwG zuG)@$_Mk4t$UAOIjQX3}qN|w#Ir7`g3fnUdYGUg`Tf2d#X%DE3CVr4U1yro&$zsj9 zCnmFFryXJ170#wOZUXl-!>*3E3!D%^u70WPjFTed@_P#D%wo{4=1ddm0PHH&m2B4o zAwVPnwMMlAzT&1O=@V*LY(UQyV>XA9*^}x&(zcOhy8;Ntd*YzJHW>$j-h$AhKOL(U zx6D@XZU{L2@kvgh%$V7TC)`%p7YPfw1-AV(6*a*-ss$eOR7K{;87zC67#W!Rk~8l? zXt>e{(hhme5IwtKu`9kZ1q3H=PNB|fqfe(yt^kpkFK`WIq%PqZ!UrSYn$9(&AiG#o zD4?@*p7g?fWKTOuF1I;2!1iB?t^O6z*nRh)u0yF+2kw39i>@0^6m}H|ygsGK`heV2 zYe(Hj8rze@Fb8h+TM8 zCJeQZC|@)UImp|3)MQSe`ihT8+zvB91oLF^jku{}Qm?g4GT@I_I5lEcv)q->$LSPh z&x^?=b|psbjE=&ri>qTQTimbo6^@-eb5fE__9PBS;8tT@^tLn{jq2LwcZ?8fE;Mb3 zPyyIudYWPvHw(E&%MZ|_da|YjjYBraITZBo64Ux+pDp;6^R*FFH>P8;DJ+s=hV*4dh^GJO_FQ+@!Y;JU+NMZw=FMRD% zM*8dG$RIOo0EB`+sm~|ieAh<>Ep8VKgp77>^)F3GuguO!939m2R(&tUy%}RSA}7=m zKy;PmTCOMRiP__k;nk3=LC1P5TPo=Qp8MjXTBRjA^(gfB2lY{lQG0+G=*U($Aolp8 zG@(+UBH$7?X5{=*(HI$jh+7#003P*3EyAK@hp3#Yf4vq1xjMIF#{U2nQ}K1OVSK{7 z0hqz>P=T#o=4O%Dk`En)ODh~@hDn0k4Xn!tn2r! zAPcAlPK@Kedsb_5p&W#bJ;}yvFzK%)x{Rt4KvATft4u&;%6f?_gRvDFwO3NU*N^7F zUAxs~sV%7TB9&Ev#)*OCA9~GLYaki){1dC%qkhbp3YKsVcQsvky3*)@Jc$bi)~*7u zJ5;V+{2S9?DoaVFixIIIz^krx3+OZ%G5%ZbzXpwSS=!0Mj>HO;=$4Sc%da=UapzS)C5(OcECm(vYd`%y5CQdtNU~8MAaYZ1}a-U3c z0BW;WbvyARhTIdzJJsbRXUJPo?s49?V{tnhRc|m!tIN@;Ks*}C)gkeWoB{Oaw8Ks- zbn?v1NoF`vL9*Fx#_Y%;FgwH>@uT?`jqRjN&ZN~jutnAWw&xt%k*70;IP ztigQA{{V>@_W1atCYKtUxz6;0mz%e4^+tPnk+!(Q5O-{EQpTrE%PyjmCB0`$1SURn$N3J%$00~Rnzo6XZX{iWL;xa%42DS-HDTs?M_^CI0i6c^7H>{5k4~zc z3$Jk+v$m6|y$Ri^$QiF@RTzuQ$-vaLLGbj51aipQ-cmALoG3LFpMMC7NH&OyIjXPE-swK$yJ7$OnsPwg$NYXMrI+tdmf$;ij zo=Dxb7?(n0iVnA@pi(<}xiu)^?=G1-jnc#eB&;)|gWn>wjbrAB!#WfM;YsAs33(Yv z^}a!Ekw+~>RnV=NIFZMzI}X57qi3jF{$LeiG=N!%=AiTWu20kHz$69(n%^l@q3(IA zg5a}uUo%56B(4WPdV+SUx{8H;VC1buO5~09z#OTd4&vRBLv5suOM_GjX3iVrRYyy2 z)bycHONIkT&NNnN!;vOdG6J~Hc0ARAt*7;d(lUQxR6OuGZ=r#Iq#xDxpqwb`N=gc{ z{VUv5Q9dB(j}pT+Q$*k>17Z#;z^wXO$0SB{CLl8}m%g0wOGej;It*-MbR!O!T|9pE zjaCf3Gs+&O8o!iwtL&J2YX@*7Ac%59I{iY5yQkU-VwXz0Xp8T5O-#uj((1=WW>Y^FcR>7bZ`uvZobv1?LuE7%f%13&6UJ+L5R?q65wC`B)J2fl?ao`id(jn=K_ds))DzooC@Hv&Lu%Ac zc*hh~F57KHKsGybL4TMqKhlEI`(lE%s3E4Rnl=H(c&Z-YdWr0KsG_}u;? z&A$@KaF+(sXn|fe4f8^VmQW4=B%Qz&rYeIYqh~lIQ4o^p^Q%!l`Jk9+WcrVk+-e(xK!hP1 z8iQx)Z+a@b)B~LA{?r!>T&Aq&;-cbqcDnW;f$!~EwQ)Bq7%HbdvsOf))yUve6)f*T zYXP8Roc5~8v*|x>O%YH{hG-bXPaUYM(ld?DKGjgzUN=8_ig4~WUA=<=cYDb=e1jsW+lt6peSZGfdsb^uVq9n#CnWJz5rs0t zCzH>$0TP#uie%vap~0ddtL^uws}&98r2J6V{qA}sy=I9R$a9pZYv(^g>;DEXJQ7% zr0pyNJ@HVWjnRW7o&MF*bb6jZ<&5NDG08QyYBPbAz{oxMqG+if5Xc7Pkanp>Ffc$K zObm}oo=r%!){!;C>5L5WLu>%0tAej=8Wi<1jGhHaQm=!<=R!*Ep-$m_#b{?~63HNj zBd8oIq4bZMBAG5(G6@C2(!)6dioVtsnS^%WfsDy1`c|`PCa<}-ScjFdaCdI)Sl3>D zJHHQjaUz2yR!JpYQfu5Nz^yp-(>JPkPB4Z@oW|hglay-BYntZKM}E~E72QpN_t;Ya z-8y3%ogfxrg2(jLk)D?-oa$A}1HM01RwZr?GQcnnV{PH?DmN$BJJhfk5HJYhwDf*M zKz1$I3{`Wr3w6|S*ibd>o8Wd88ED(Vhy<>67Hun&kO#d)7_sS44wJVdy-j2fQq&X6 zEBI0NZXWQOd>@-%Hnm2k}!RAAgFvK#*rvqNIVdFK}xO=&Os?Wf3aqPf$$06YK?Ll<;iwG{UVD*^lp~Z$XDq=Gb5hDj8j}*YX;Q_SdrNpTx|RE zRhLQOzL7Pga(@v+xg-!Xw_{S>N(MO$lC+W?QW2*nvsai8tL2pA=|VLM%y!0~O|bJk zw^F`X#;r}HFU4uksH?^BDbpght$)M9?t>K_JU0Yc+KK$ATM6aIlECLzwH*AHdSl&; zF^z!}BVh>rLbT2`qWr5B8DQi9!28hv+(CvQ00wX~-l*2;cI<(8CvvEHA2pj0@K42MD?%x%28odYUmaxO-t>`MVp)kr6zmjRJ=suGR zM+}q0BI^aCmNw=ilT>-oPttb-;7@?C4tCFRP!nlk8J^%=%8FP3RgOP;gBrs5p`DRW zn4yXzc40xMB=fUriDd`~C2`5716A&nHj7txI}b6mg{+J>GTTY4Mdit)k~5t~gH{g{ z+j(L~X&z#vG&)F7eW*GA01v`U(-w46Riun+#xvMfk+0Oc;c;yoT1!T7+M8xSG*+1M zNe?uU88Na3%17`jP=vOsaBiVfjN>%}-``uMw5*fF< zUvCzd8p?y&4?lXS(fpxQnf&XBT^HrL>94O&yooSl|liZd7kX1=1 z-mFHCON5yGwpUS-rGfOC&~FXc$Y-7i=4j(wJL8t^RTy`V{CU$kD*8ilnko#$jOQS2 ziU`D|j+7Za{wgjt`dmqGsLi3ApHFhN1`WhRQvt)aN5yP9!=z(5`Jh(uhjE?;^tS=` zw*f%!*j6XiXWTi|q<7~PwpTvHciS`;{Y$@YDxek{`ub9hK_xg1Nzj!5w`iq*w)Z}mB~?u0oNGbssz2lGO`RI-I9Q%>MlXh zzFP6=s42aTl~tLw5_TM#VfdOx!8IL*HwT&@s$se(bp&?J6;z6IzxSZ27;92^2YQ2P z?bZEAMlpiF%~2T&+9ca;`1Y+UUC3n(+|(3lApPl3o=gHZ-<;G9Zy?CR7&A z0p6qlPjRc#g9C!z^|0$|#c->~aZAz}S^hyA9jT~xB!iMkG!%Mpa(Bkm7F)u^g~rXe z&1XfIwz>`mHXGussuZ^sP>cW^=Rax-6{r$(x%*U8%yEs!+NvnH>_>h@6n{#H$lpk8 z52xOMsHD=wfuXajuTm522cwtf;Os$89 zk@pnVxws0~q)#E!pvFI%U4<`A`wZ!wa!Wl{^TrA>*~f33_pAEnt!|ZJZ7Fv+kdweT z#YAGs(;5LI{+(n1I}X)QAemYsGyx$#m+mSHX6rH-LzCWc!KV7(quO^b;QGm8%ExE_F~_Kox(tW%+J&@+xM(;buroX9;4A#%2@2;D>JTujJ~x$&0VKXKU_CW>B}h~ zu~G)Wd)F?yb?2HBt1H6(Tkdg{Zp2mQr%|4xzIUy;ndB!K$uvZhpKpo?O&X8;)fDPH z`*A^J{07N6=Aw#Qwg4yt2Wri3GzL~ZBXh~Ai>!@V&itCzGep}S#1Df|R5mT2eW(bw z#;g&Xjm>G5cPaqZP0)OIaA}Xzl38Ef&KGYX1VZQ#=Mae&v#xsg3k^A{m3*G{$@rb05QSaYND-ZgbrWaZUtu5L|XH&n`)%#YWUfx{hri{sNBHmiVoQ|VI!V+$dS-w0LRM*u&rxX zf`-}2)5dpVdsVTG5i5YcQecewo4GVWcJSmb*^N#l`Jj(bi35fi8psHP{Y?Q2Yz9jZ zSPpZ=E2k{0yRBrRZ~V-7q-Uyl*UKw_02}W{VmCum91o~u0Yyn70|z{ED>c3v_ICba z>wJI@rnz37)kz`(#N!}kecG(7QVlw zj@=9F0?HSRdsbE?E~1hAlNpStz|P;jPsd3C%;wdORLBU(3%RXNu6;~W@R@Oppd(oK zs+s}pE<kRs`g4;cAf_ce8jvc~D>CsdDw^r{Y99ji5D8yn@AlnTIazH1fM2A8K!@wBn&C{7Az)_%gN zYZFsCd08v!>`1D%{Af<17z81Vj1H`w^povX$q3|S0}Q~BH6QkYRVWe%9h79 zsErFN;9aATE;NF(6~PDQqAR_-i3ue6j2AJ4IT`t&)A01UQ#8$oaiv$V9~BH;)C!<3 z;eZEb$25bLU}e=Zs}~2;q-O%C>iSlRB3EokKt5u(=|0sF$aLf_EV@Y%t1-#@)}poT z?F;u{g!-8C_7zh@-9;11>h2LEKq6tk_4lQ3p7EDuE=f`k!6Rc_>#Vxl38^%fokJK^PLs6rni^!+N;7$Ld{2&y!L{suzv0F;v#=uZL#3iDqenp*leOd{%E*%4uL? zEPX`KKCF%5S9q0KGw9Md*w!pU;0Wl0ADdWywA0 zR`twLgmm(w8A5UtW}xLQx?0Z?#To{>c?pGq#(+7^Sw}q=M`UuRUSE|c%EYS6wy{9hxPi;e^0%C&;6%)O1e#acPrY8LAzaAWZCKVa8ysX;JZOJG>-La^ z)LA41nKcZop8~a&2K4Th%_NrsMi4s|SdVH#G6AbR)Tr9nAzkF1X2Ilfa-7I9L*P$IVk3y*lPN zk;x#I7}Jd6rB-x`IbDZ4)kFkEvxD1$Xo_PjGybNiF4;BXAN^EKDNtu5>^_y|icqmT z42AAa!iEtZV_*i;bm^zp|u(-LrT+M3d+VackAwYL73Am@rAB~E== z$>h;iG=zFieZ@f?YqjC)fBb6puW^=TWQdIyb$+j>PPKg`Ao zk{4{1=CFy~fWR{E?t7X*I@<$`><@g^)GLc<*92}ezG`T{^O@N|0CDkA0!sM=@D$-&0)HXG(Rd+CyZ9I(ZX(}O_p+3|WL`FewI|D&vkgFX#k76hUM3NWWvYy9` z)%dZp;K&qr&P#jNRDVs^8?Ue5>^wqbQr84yJg*|9fUd11D{fiB%B~2AY*|h=G>u5+Pfjsg$8iMZoc{ou8jtep za;7bQxg*8pOQ%cV>jTwQnz9%oF#20E2FUwRW=Pp)IL1#E5j1i7hQMqGdV(cJ_#bKq z&+zxoNyY_TL&p07+NCPuM?xz-AT+v)DLxn6FiimmTdOX(n-<8CWG^4~U#>yj6Z3C71G;-?GLb49Xp zIU8cS#|kCJP?f+Va!phN9_N1aLXmZGxfEPBoC+8tq_EedkE^kw!BfMgL$(JXRI#Ws z#{M&q_!#<0?^#L*sapkaP6#`ID@2Ozk-Lxw%@JXiG;OlXdmpBVO{tDa3I}1e0Cy1$ zS;5b9R8CQX0`ZRZ5e)Cm5JEO~??n|12Y$yK)e(v?&4cgF172MIfsBo@?L|e91=dEx z+r0%6BC*PCw&JP;jm~?54k{>sa&)lVQ3-)lkLg87Mo8Pg6%a_1Knskwe9%VWC+4Crj%|p=F;#$Sh3B7aiW;^Ub#bxwpnYl>2F~2#g1d{r z$I^rWwrDFrr?DsJiX|Nh&IhGO1mc=Ox7KmQ$Rm+v1$DD1*?uUXB#^N^iK-wQO90*X zsfLvIjKt#sc*S49IcFXA_7tI!GJBd+MTYk6Q4;O@)D_Jy9s5-ktRRzv+tZ4wi%iRu z!kxD?Sp@XB@(PihbDG8JdE{jB1yhZ?3e2v&z!2;SJf8KY)Vz4)^Hw?ZHrC;h3V^uJ zaaroK2Xxs$^syjzVcL+P=WQ&^Twwtr9c=v=U2@YU7f#}MABr&yNvKi?L-}8pt+EctAg0zeT792BM=@! zj1---+M`<6wCQt89%3pmn#nwUvstR=g}bvIGQ4Dx7^@r_OO0buXF3)#Nz?k9c50Or z%!3*4Kopk%cf}$sv$c7Fe32OC+lr!Apd%c}PWS^P~7N>bVJ z$a9S+7|GiwwN+@tWRQUAI>^L&kPbd7vwnt>SC=G!2-!s%%xYQLVm#?N##yU2r5@ce zGz~WhWO2MFVwIgjwCZSxQbY@<($1sO{{S=@-B>w6s|0fsaB*6T%}|gmu?A)aPBJQL)pq~=u`i67}w#<}QCh3}adCjwN?uaQ~&bn0l>U<{?OHyIVJ zaK+a5v4~4-%ubM_kwgx3oE-M`13{Z8%8(98J7Tp0g4n#UM#t-Ln|)NPE-LX?M2gbu z%8EvimDIt9`F|B7Q|L&Jpf#N+yq|j0N=@>!6^vs8&=hS%qPlgXWJv5u&IDtMtklFN z86BLAmcR?zu-vNe*lJZf>%nXuDIsWk+s#s}aW1VOE|nRrV-~b-Q&MAtfw8Cw=~0$a z?e)gmN|CS?8LaiYBIVh3Ru}sj^O&qIVEwL%dB+vBwO3-#-avPagx-IU0<$B z+-Q-cU^0ZcU%hJ&Wi~74Tyj7ea%h&7>kWHu1MUZUjYmt==YU&@8zgDd7Crr{u*>}D zn@5=*kQYc8#=6oixV*Q}WBi&1I|%{$erjT|=W>G?-FHBErXcC%y}5`9W{b+kbS^Wu zy)e<1mlqL4vA36{w$l*x5%OwPWhK+4#E_!}Sxy|E(^OBULm82wj1Wr_WGB)$b%(EdI0(}!d6i-60@C3!*-6Li+ZJlGzt(a`DailJxV@noo}Cvy9=#gj^mok zw4w#VqlpOA2E|8u)H*ucmdI@52S9FCx?|2h8|@K*BT`Uo#;R)_C6u|BBUs;2+J>)+ z&U=rDfki_N>{f1vSKz zxEN^RBMY|Xl3}Es9tcTw1=w$;yVW&~)VhK(Az}cYR4DXSikC@`O9FA07*_6;q)FjL zl1S%II!6BhB&p*(RKbZ7O%2|yQ{7U2a3%} z8-GSgUHy*qP?DA{lDiseE9y4!HMECGX#rpUftsl2?mARz5u=!bSY=yb{c4S9dO>XO zge&z8>42fp;uh=?3rMFZ-OWS^(z;k<=19a7`f9W`bLE0b!mkW!A>68>Iv`SaC*FfO zx@@w_UN%)Y;P7goOP-vqx}PTUEbLG4<@gkoGdQ@3aJn8jSI<+o-jr(fXreb3#auLT zrhnzzim<}yeMifdTX{h-w4P)#_Q~y7>S)~YA4Y|(+2tyj7*{8QQ=f|-ec_I|9iW{h zS8*$PSvfy7+poCNxnEwVRb`C6+2m)nW=3k6IySGUfC&R`MQ?FkABLoH6!xXHG*Sje zKGlkhZnhpvkd2*6pq%y}As;Rs{71N*IngqL(EuK3X z(pA=sbd2wVQi;w98w``h0F47E^#VTiWmT5{0NRxoGgJ%;_iR;4oR<3r)v@E=st8E} zE-~tF?NZYWvIQXEAA?zLL@p;X9s+^bZAGEH{3%heCv)7^-1P(>(xS!6r<@atnz9;3 z!2_}9G}Xn{ZUcjy0C%k=J>CPBU50s~734Q3=QKrfDI1a)1F-K!5b}m!NWtz0H4y|t zIoodZ1I;FOUJk_35=QdacNoFV1YdSKcsvRVBbctlY-=Jeh$MmA15&%IXVZ~Khe<(V3`%r*!TGdbT%*1XsIX@M3E2UPq zb=NAZX#sFHHJU)OO&QBZ6>vQO&}LoBCBan-mq1@(zAD9wdK}uEWR18VG_Z7+atSp0 zNoCow$*yX~n$2~S9DodEk-nkvT8hDy^%I|cg=kLL?smw=NUD_bFed|19>mrwrz`BQ zS`t7556Y2{X(`;n9b=`sMzgV2NB&*3A8Ol>ew$|uk-n#Nl?GP_X85aW;+WC5I5_N2 zdWnJs?phv|KV2c=Gx{dMPq9}^ta>Q-Ez|#YHubk)@JTc(a#XFM6 zI|Gi?73)6qQ3!x!<9~XVyM8I0jz_-rEN*stIdnK92YwraNfWyUbs5#PvP6*(a&&jC zSm!H7;_p;RjB&ZF$&S#h^~0%^eYnZTV^xG^RYv0gay{upG!9hlo+~Pw zw;R<|RQiEGv7!u>jD(EjxN0@!G40NEmWM zY$(dY*v?LUs-S!yFnbzW3%QIFoZx|s3eL6a6_kI|6xH<=0x0A#Kh5n|Qu4BCGqRn# zn$rdj(E+w|-ii|S#-QLG{=86VO(L{Fd{h~W8BAwmR93ksKRnSB(p;WK2WlwA!72#O z2lb*aOm^CXJ!SPaa!+b0oEAHsstF<%5Lz8s&+IA!7H>`tGuRH*RL2SdJA6>U zmlFo{a93a|7;Vn#Gn%NjI0^6f%|$fDRE!*+`0Yv^vNyrO?^6*a)N%rn4|?!8CK~h=KB=vs0C*Sf5DA8<9wK*NWa3fV1b#?~}z^#%mrW)=u~Xf$ve%FmQrc z&=VNJK9)PyrDE27>pJB^w0gH-K9;J3Ec%NqDu{80+>Z4ta-(&ZC7r!0HXXA?tkWrD zw&#kjb$SsP8)eDKKGjfiUXvR$C}K9r=kHZON(KV~&d27Udp0q+)G!ZYKvmtt@trH% z9q22b&@4*(muDFV^ok(KF4vNB0N7MCB17hrCJ&SjHyoOV2x;>llBhr@APS-uxQv#O z3o48SKK}Gmb-B#3heFDr{{WVMSIrs}_cBKeB^k6h#LgrYXGl0t$+|^;sUR<~W06<9c z7$Nkrqj5^aP=kO;+ymOG>0QoP07=GkipnPi-UtVST8M?jg}DP6+v2F96Myuo3$%+< zV4Mz3OkF=xO)fF?k+my27B$NS&N6wd#fuu$qi>BI>g;P{OQl*Yh4%;*H2^!&5r)i` z)Z0d> zv#tr}2M1t#Rm8nCdIhjml4Br485%)24r@|5+5@RbzG0Pea@v};hNB!FX14zT(<_ni zYM|KdHK4)Ls5Un%}RRQ#tEVztX8Gp@u-rp@9P=jB!w{zXbGe;v0!cXHtBkew7~o0D4rhlj1I-v)#!s z1R%m>^4RZM<~11?ucs>PP2`IV3nYJoz&o*jOXo5 zaj|8!>`&)Bz-K?gKr%`9pyw}{laMA%}XBFDDlI z4Xl&4aoV!hw0iu}Jj)tw8WF7*>CbxGm05WD#usG+)1K5L8heKN6b2{%08`qki|Mw< z)Cz}eV^Q3Sf~b0Wi3oi|OL~B)t$X|N0)jNLai%2{!HETnd2&iuAx>tOmeSpwvJAn&Nupy+j5r)vGl~J zxUAypFX45F0|cIH9oParLYUV*GP;NeKsZuxahklv>!bzKV3bhA?X9?4>gK+6W94%(lUE#>Yv&xP#5l)nAZ0%llOU z-2P>uNbW7fVm1dP?%%agSDQRwK7!E?=(Prnax2?B#077p4DJmG=V9r^7&D#QeXCJg zDQLOZje+KxGNj7fBPh;TX!$fpQ7lOyk)(z_Y%t8=8k#tsjp5lPns3XwNaF;vgMi)i z{MPiutvZPSmQ$)GJD;T1XzVV0LRQeWOGzYn&OV&>6@llX-H8q)!Bxlv?^@Ga{t_kp z!ImIll;@9%okLpo{{Wbbvw$5Lw(|{SSp8!k<`|>&D{7> zR&)7zndHZ*U(&7dn&~KUe+-eNZ6A|y6KI%!ITcZ(Z`DkL%4CcT5QiI&nu9h^46}{y zWso7%%OiSm@$*wi&haZoV~R+VL5TT#3~C=W)1SW-MVQPXws8Ke4#(P`h}DCpw5Tx~ zY9s4jD;J<2hGP%ZCW%?U%56vAPc^CdGVVH(z09(nH$@}9HlkKoY?JRnDUKK9(L{8t zDmS_0)@W!>ShH}vPz`k{CjgVE)fTx3nC^C~{93iy{MjoB%Vu0}01%#avZahdM~( z6cXvGzF=qEF5!DI_CFM=oy?k8k^l}#!tg07A#E`k&M};ynzUUd*zBP9-k56JE~d*a zwM8sOoOZ$5sjT9r+T+$Y3>+uldbM@Z&DU^OL~0H)*{)b?D*AP2)~k$+HvQ_wWHR8I z+Tg1nLDWV;7{wW;x^>842p#G#Jz|ihj&g9j=A?~YwXS;KnGu1&D0?1r?^3 z%Bri&DD|37zN0kS$GA;Ox!Hipt%qo)h=Ku;Txx`pt06bAvpw<)#RDr~G3?mi}7-{=ZL-HT-3Mwr1hf6`vFjL!pMRZ{!5jslo zjMc^ZDknTQ2W+0z6ii4_g8fQ(BYajXuRSAw0M(@9=Ciofnw;G)3JgbZGC`})Z1v*C zb<~Q>!PdJz)!X&wvlLmQ6M&?S^_vxa#l8sCLV|ejNG2LEKmfOFwFQY0a&(fU42*a9 zpr+k*hCAw0gPN7DXVGE389eb(=(i(0=j~c~x)Xtc-)-oJSpGi7h>1ACsHQQN;-hd> z79n?IlTlUN&Nv%YiE2@WjddN#;cIcunkIM2$QbNu1nr<_QnAm{C@q%tR1Bs;8Orfg zQFQ2V#1II;pc>sjefAU@Xv#tKfJng|=!hz!gOkrDpr%4ja1J{)O=?9xP+j?IYT_H5 zk=*Vnq8?ivhI3UcTOGL=ByZm|WYS54j(!%XV60AX6nl3x7OZQXi6^);MNvw19@SN2 z9gaEeP*P_&!Nz^X0=83=?LcbUk~z{n%@GHg6Y0r0-I}9PAIfISV?M%ym~9C@tm8Z4 zs43vV^p(@d-iUuVZ=9ciD5~-X>IVJIK=NL(8<26p#Z4p(ZV$T;^sMVxXN0yi?tQCD znL==_+mI?Br%QDVGFSn)#Q{>zPZ`H-)-j;bvCassFEwKzJki$-%aMl8pL%PRiX>ks z<8r5UG-a#P?mVzq0CF*t+MkR1u6N|;8n-n4U&Fd8f!G`!RK{&@M8^djuhFs2RMo_D zZ818~<&Fph_7$W;!GlGNaK|l7HB8qzIutWx<4S_W(KTV=RZ{ec20m{##919 z9FtTEFO;#!BPR?%^eqHrwbVe>-wRMaJiNy~Ngw5r+KPA|P+~@=A41Uw8Lk;hv}lS~ z97^RBPUl9T+ng@1dc}(?baaSDOBOGWQC7yE ziiv1@$RdSFjJn9fW2<~nk&6Y@y0A9_Mvn&z9>tAnO={F8nOy2cWkd8UbBa_};-nR4 zaq(0dev`r4suhxgG2M=m)CLP&WeMLIRvge(G+|JZePi^RwE|nPIA&JC+bdQ?wQo^{ zf`X@1WMnY?KL)2wb5z+Ru0V_G2RT1a?@~3>XF^QmOvEz%OBwW1#uucKMUsJm!B9Wm zx!AF1PP7F}o$`Csja09uSd&_?Spy9?tsKVphOL=Cabhr~s6R$qGr>9^TYy z1y{z^T1qEfV7_z@s18jMh`dDAl?749rB5P^T5%ZwcPci=6hQWJm1ai3SpnI*9>$F& zWdlbhmjwBqm8{nFp*$KTSW5*B%bpgqjNY+RGsx=-l+g(|W5XZ4X`Njar>aH4I!M4g zP{loRRgHpxq=f{I-)gWz&qBjIk?LYXff?aGMNxX(0}xO~N;x@q`CXna*wv%_NgBE)q+ABT3OK9FHC?&{jX?TykUgtN7^zo~=j&Q3f0$-PjY}v1`Hl}G z+O7<_7hj_X%U{>ss-&YVpw+P8d)7L*^zqK3$-lPs&vo9+i1kTzN6Ga4HPSrYL)djF z}=C(Pt9$9qg8!#ibDh_+8-Tq@juEH=_ z=B^6*Bnu?CU`heV+j_V*ZmeO{9%9libe&DbOk@T1;>I&-jD!qo)v%@z{U4$ugEQ-y z$k|8Jn$7DPXvNVPvK!F7fabIOfctAfY7D3gX&$xxL{jvak4)+!LS+c3GEqSKi1#%r zwSt|Gy+NJgO=1x0NO+twmHMi{B>p9ycy&Fhu2)LRN%bBxS`m-L^L||+7T^LjyrbzN zg1dW&T2it%ml{S`WaClx`_K<0vZCvhdUKS|IPFH{R-IgEZSotB_-I~5+$<{!F(=Fn z3DS4R#S_(6QR=TSF-EMhFkNip4%qggc`+`^A%qxXQL0uOGgh^gP}u9lS^gMs&c~Mc ztlEysJ5HRjql{IkD%yGF zlgySt25^xBg~dgJ<`FR{QCOXeFwQ>IP|pmV_dnZj7l%Wv+EiM57mZOX8hghcL2NBz z#;C1kjaG@+qoh%rh*5jBl-j#SRPjYoYPUrd)#u57@Oj-oeD3?4^FG%#zjQTl%ygX3(@R8wPyYZjWG`vO!pmS=LZ{_5xp|^<$c8(hm<->Go@y)L8QqiTIWvR zI+>zix-5yJCu%#kR|)OlBh~|d$e7=DR=BK7%mgoDC8$$h(7z?&m!fA|*Us z?zxt`de!Q#G%Q(W;j)Y^{(i2eBojTSbrt2T;ck4A)dojWJ+E~)@&q&fDFIb@dUz-b z?`|OOf`}PK1aRRN|3-pp%aDnj8BZ5)ean=SIun5LGN!4kvTUMIHWmuE0~+LzSZ=Ap z842ovn$Xo^6h3uq>3WwO|GqtIe~I^Q4`5!6Lz-(g6(YFgB)3-tb)Bl~(Zo;eMr@w4l0Ji-;M1Dd)JZfVRs|5EQ>MQnd zCWHq?WOHz54>DZG5C|FZdn+{g&{-zsM95)zh#BnQ5G7rKpdHSD(`L|8O$3a z*Jmmq{-fb$k&n(K*px8bfPI_ZtV;E-|A#ByeStO;9Td>uyM0Y3H?wqx~qZ2KZ zAu)W27(m+A1Lk(MfnC6OEb4x@UsR?#3gvYhaFlhZ>jd$7mlwl-!1t3;th?i{CJF72 zaIzl-tmkxsa83-uhMG%m7xlEcxcHnn83a;mjaN^Ii*v??M{(CiPh6B8dLxS7Jv?}7 zl2I%M@OJIltKL}grfuXH)9wl0M|LRKzOvGX3DZ9OA3*v+^!uCOQ>U&`M==#L zCvJGcXIiH*Q7#}H0hSRG0xFwxvAy8BNn_C-9lc5di0)lfq7W@(?NOc(&V#pcg(+LV z2|GfK|IXl<(;*RVo-t{Fhm9<~;lBw968DH0h7kyM6%;V?>GL)tvtxishgWKs;e^Kd$LCl>7!HKRMW?*G=pg04CC;O^7Y&`=HJX$MD z-DcW3fiv#QB*=PI1NniO)F4juGNpZ8P ziZ|yr^Yl+w!sN;8zRVODh&Gm;PFJ&A&;Z%jMarwBT3op!n=5`EX?^VS?fPUYcjF_T zYA&#v(N$Zw5eTI?${I3rI}=shxM{IB9@66?32C$>(_t|LuqVH#Qt-!%lC+$!&CjA2 z_8$&$MDZ^$%Is}6aT1oFJUOtwSGsh&b9b$M`pxX6oq}r18VM(%s_^xNp)=+;h-1IG zo7kIKUtH}DcSsMpkx6H~MnY@me&OD;!iZdi7h~?U6W@tV^)k8>U9=TPo$5zAmbI|5 z*z(3&D!<TbC&I;C~-hd_8IEdIhT9#oiGvW|7>udwAN;4i0v!1iCSw! zzCRKn0NKN+PuAarJ~DGB=7pB<5y%gAWY$Uu_h~8fBG{=2=^qNeIcqM(*S~Zzm#U^0 zFz=J!^1MJ{U8;&yO5(K@x6@Ij2H^$yfD%eYC|8aybGbzvVDyG`JF@uv_Jxfl)X_b3 z1v^s{rs{3MzXtR{29|qoKptcjS?1oOkLHx8 zuSUBwXJqKw%PStZgI<{p?>^eIK6*m$@_Fj{w??(nBm14MMS=ElZu&hgT12j(mTgot zHd~S~$IZ>zn&9f_XNPE~OQB^YHyGd@?x>r63%t*tz#b#<6s5EH&<6KPm+STm)E?%* z;FZQ~=4^Zu&pxG3h9mV8nNYyfi%KViOUUf-cQT6h4UC)BP@Cf3FVYZ1S|k z$Lp`sz|QT5@_&#U@wEPyM-t?S@`HZj zCPerlJxdud`q)Q42T^c_30KDIwlIkpzTk4+6>KQma~Jj=btOGQ`a~r5*p)DGWOn}1 z>52Fxm=qTUxTgHoZ`N6!r7kD{X&GL&{IL34zP_379t1o2n2pReZS;SDd!xe9i-Ec( zP$)cs-QD1#R!~+XL0^Atp_-Tx`6)X;-)kU^r3sKVt@^$8h;_+wA=f7A3 zx&TEle-ZW9_nO$!Qt2b(IJQ6Y3H|r=FI}jZEa(q~wVQuZCw<=w4$|KcIksK)UO5KT zGQ}NtSGq`c>z=6^c0SpmdI6Nnqg@D1+M6<0SDgiuhT+yQnqwj>3BL z!fe-9Vn_=$AFNC-m=xCOCVtATm52;!H}VXt52kmZsC&*FBiRM<=Kn`P-Z>n%v1FEJ zv@dI}cZx0)@&qthFa_JND4Vgi21d|O71_63wHSjdTpgx@f=t5*1-Q=w6-*U*z`Y|< z5$re=d|QYVNobF<%sat7%9IGJO?>GZ#3YG``)zHaf`v(^;&(p`X?C%{02O4IQAzE` z?6Z$!w_;t$EYuZV=e! z1mTzfYn&3MtIt)Gexpy-mSVq!e-CBEAllj4YJj1pWsU_4%(NI{W~)kvFFsl0K91SP zHg4@mh_SN$8=K`_K&{S}abj=XMY%08Nn4CFVT}8kvCdWTX35NcDh(n)OMg<^A!AN# zZ$kbZl^OgKQ}t$To&V5NVNPKs+h_S}L@aUFp7~=ZOYPm@^EUTyCnGNc{rSBXxc3!Z zju05nbLB6#qiC)PWUul9+1cl0>C?N)AfkhNP6T5LJN+JUk8sO?Jiexl*M_@ZCd58e z(2ZVyzMYgD@v)yUGTFI5#0ctI0LBvj_4>&x+RNFCS?Bj%y_2)@qKB`t< zYn~^SFycJ2)QoCbS6+1!dZP2$fh)^s8TPl)G2dTie>bBa6|!r5zQyg@Mtj=izfvSj z|384?UY)$fF4V$QrX6M5y|^b=F#SHhd_f$VowWbZ0P=BioaV*{Lsd(MaC9Ws=VJVb z*)Nt&#lI_h%#Qcbny4}0{T`s-uQJa-GeK~?zNq4?f(_)XLkS|5y-aKI`I34uNfGk! z0BP79pYdI;z@yv2#<^0PMBo<*qL2eM}ODCz^Mop8g1RMKUz{b{HeIWHZ zewk5lbdz56(N7&43BuB!6DvgZiXgt})^YHWu41Tq#qL^3NI>iwQ9}3oI_R~uAuEJ@ zK<&$h1>M_k#xI=Iw$YzxZTp7hKFG643t>x%vW(YgI-wk8#=F-GcPi|Jw^YCDJpaqA zyanPM#L;h)tNugDwmKw0kiH(+IHUXHd&0j}547xj0bl-z5OBXardaMc{ah=V-DCXJ zTN1^BHg}vC%@3|g-Syov(Zsl|GU@`S|6#(WD8+jpZW1KXavxkYK0LT63040LYX9-m z9(Sy9StU5{k+`3wp_0{AHq@9){l`6hC1My?hbC!^f=x?E(862yJ#s0!dHc_y01Wy(*a^OY!9D~ z^%4aq-hk0UPmDxkb#-p!rDeFnj&#pKJY934%+&He%-Oqf#a;3;+S)i)BR-^wBL~ZD zQKK1%@*@H$oDlN@rPC^y=NjrpjwU?tnXZB=v@c4$7IlvPoKzxe1c9 zKWN&5PKBf^WERw{ToLtUWo3$27ebObekriqk5-$0`A3uqg%;{7PDfdnD+uzhLu`kd zysut&%=Mmu_8I?Gfz1H4*t_M>F{lck&v zd6;?;DwxFh{Q?g1`sQI^6=~*CW5~I=-Co(}NAkegr?@s`t0%2(kPbrYO)%~mT(?%@ zsBjLpKt9~v`et{zgL@x;JUvNu(|3dbzH3rc6jgy!y*27%x=;H)lkx0M&)${aXCPN2 z*Mdb;qov@O#EWFbi;*D{E>#OFC3;(~NIXG85M}@=I?dLTXP>O5?{n7<*5L`}D;M9_ zqETV60rg<$zLKhmmY2&vW>taTl80E%>ed*F3!%9|g&3Rr~v^$;2e8 zpaE=W|M9&~FWD)Rb~kIy?-eC?!u|tHRZPW^v+7i>e0}BF+B3iOu=0s*1wa=Uibof^zU>C=HDvi) z{4rqFYO&E|!Y9p5n4B?N`R2fwqKlz4sM@HJcBkAV;&9f=rNBkgM(rF;@P9kmSg@KF z!TD_SvOXx6PC)1EP%WFpTblK&vCT~4ZP};ZNoKUusu5k78iOzm`W^}wCD6O2rEI|G zb-p-uQT?}+A(6-b6K0-ZK{s5F!3n(q3!HF^kY`T~c%%hu)xA!DnFeX#_iB$;Ux}vu zrm8Ip2|DNSpsCh(Kih=Rg6WkWJS$ z69`v-rpF;Ix6gBqbiAf~ZR6`MQDhALb;L}`<>75GqoPPwpjxH>62c@IXl~!#310s8 zA8lG|6=@~f)jUAId%@r=w$xl%;g$0L0QBuPo7jT(Z|2bG-xC`ab)8H~zy9rhYRm0G z1&BV?0qp_RYy~df$u8)`#T@Jy^K&r7A$@n*<@%MJFAr||#X@*w2z@=HX5vY@HdU-F&K+DR$5+>}ahC>KhtnH!WwvYN6R7X07 zV!>H$25+QguuV}18!HS2yZZ~^??X-` zUW(@I)Ae2AyJypa&u|%$2{z^ln4mEBm9>Q9oPhoGj5zWT`(_m z4)`!}iWs;X@)fMF(k#1{gPkr=ubryE15|JZ@l&>)Q(u8(7&WFL@F|7UiZq=dgB=j8 zdLY~VNP7SnnSyB&S}^<6*7?=u>|eoSKKR&*8Cx6I?d2hwe?s`c{a^E8b@niya}M|D zVJEGkCKAVfapk;59^5RhrmDkj{Xkso^+9KSskeKdpQ66r;_h;jV9Q^*&uNnuQ-Xxt z94+uoi_-&Wyl3&BF+sfbgOZLOV;gNo$R4uM8d;0kBtX-PA|wZMUjQ^9iszl zdvq5+=w*-mDSoY&mHu519FxYGR~+R(u9i(0Y?b^+bc(=F$jozHh$meyG}Vt7eXW@- zND?r`Z7+)R!aS3^o3hPoF`iynkc1J z&V4JtpGt$K3Q;F(I2O#%`)Xm1zkk>&tsn?&>o2R6pG20IUhj~2WUc!jRXNu#NtWJ3 zRUU6{HRuV_WHzYa-TwJg`wktE)(VrezMRnMkMR`mJg!D3z5Bp8#k1jyoHW0cmQKR) z%~a+-uskpykWPS>XBO9Cc>bMz>$3Hpr8On`5~hNdKxLGbKSGW+AcNy^>0w6} ziPqmEB2JEMhtFS2*bT&%MKokRPuRtlX#?Zql;5C|WP!SO-S5guThtCW?8F(pl9Ta0 zRIdb_w)c_j;P|GBj~VTo<@c8-$=jFCa8_k9hb7micDA1apRWh$a(ap*A=+}>zKjfx zh6%9MEj|*$mh#4v@7E`oK_@K$*tJcxnAVG)W#ZcKg!7?j{poJ!i}Jjnlz^6{qv2;8 zAfYQO!@AO=z7k^~Jts;C1-QrcVUDP?n_SA}7Q|rKT=h~oo9b+^jY4ZCzOjF%v80At zh@0Dkke{tTOd{;QFjbExvQYfS3*O%4lV7m!@1ww_e>t%{6Dc(7EE5{5P_a-H1EM#>lRPrr5w><^%;-*XU2@y{ssnOQ76Y12DJF!U?UMHUYw{pg= ztsTLSoT2?tE*4|Aw)C)TVqe)iM^>0Vl%qDz-Q;u$x3yejw!>g|iC1vTFicAhUTFuL zi|=wqP$wS25wT|4c*k}d;{N~)5SA?Ir=youXzs|ycTtO(yJ|aVTeY1A2J-QDdlY|( zVF#I=l0`q5To4$9WN)qtcb26M?J~@1$jBivZ8X{waG~PS79$Us)OGN%M(-t`qb!>a*I)q7R(!feJPi z|DKdCoX5Hc$;#FC@CX|K;5lO#WecTBEm<91n{Alo_Ei|RFoT=68(q;Uu|*mQTFp}o z&WcSWOq~uv0w9OW@wD=9{fVK{@@Vs%?UlEs!YN1rwN&@mfyCt&r?SX^#GO=^WvWkH)TV)0*%Ag766{NRm;GWb zlYj#ui^AO)$W3D-zUzLskAq2%KGk-KGH)%mLovM@~%Z1@Xmq^3E%1HL7WK7N=QAR zSGBF@=O3}Dc&-&bBTwzHcFLwHyKYq{XV*GZoH;-e8{)z?v92;XEYRUC031=rD&k0w z+5Th~LNjN&Ji@zhyCuWYiy^H;p7JijCM9=I6z7bkPxHf=aO_Sh&`*e$wEZT&~O zE=pMMzji|&Xy+o=2$1@Qfv>LtC9C1`)9WQu9 zIS1aSRNTu1sO}9OOGO`O#hv0xoE`9Z~(jVtH`Tu3D7U7#;Bz>X=n~sLG{KgaO z4|t1r6fSAXp{fTEfk(@_Asd9}EDZM+Tuk&kw&YhXWxek?@_gpnX`SBxR~^N=_e)5o z@#?g{Hc`nT;qURYHklgTFTJtZKt^5Kw}g#ce(o(IHU(T@_NrH|=%=xd-XMfopFeM! zakv(g7k;OZ{Nz9pRAv8);uZ^=zd2P2_-S++^`u4fv-{IvaV0?Lu3viT8wSo2Kw?w3HJIf}o_*v0B%F08WZAsM0T`$_$5fH^f0N{?`!+2N5LhfHxynP@F|u86>PT?`yNYbIM=vUi{T^a)Ue9c1mP_nm;F$L>UKkGp z(vP(1^2{3zZn}Tk(a?KKGJ*8kAJg8t4Ymuq#k1T|cIUL# zQGXVup)5%1)kz9-@hfj1Qu~WDY#1TN)J4$Xp-AlLueV+d@!9#8azl~=y#h zphngy>I$21zz`xPgQzIB&aLWyeSdOtu4M-*GIU8^MQ5ciN_gmh?eF`QfWdjx2Y>o} zhm#ftLoN#6d#d^q?hg0nG735!4XKFm?U?T%N9X2`|2~l_aoUz>s`&!*PD*--XHUXV z`}$JtCY-}D23eydM2sDh zwZEc3B4q0qwV3bTC1go&w&YQ|ER(Kz zb{*?fbrQpG9ck~}H>Z~w$h!`&wZx7$Dv6%TCyfe1{N*f^9yj_OwX?TAr$S~D6gUXG zihNJzsnVeI`eTYG2<&b{TipJ*hIKy#7qVM-`))PUM7Q^?f9Ecr?H8L`Uzn?OVDM&R<+eS3 zE{7`PhHz?7AQ$6Wv~G|&ex};_e*m_;HzoeBT-~+axL}g5GB?mGFKke?puuE<6bFr4 z;ROT-+k_b`s^BM%_pphwc5zw#&KhL#mg~!emJ?)Q2KJ~v7T11A-S*hlNBiSx*#KA^ zFeOz|ePmH`T*5xg#iv6s;OW?DLN9;#DDP$Zc5+awODP0r?%MC_SC+5XTDwt@?5s_@ zz&-Wv!`FQa0?g{6+ z>_gWj{@eDC-6h!}ze)a1wTS4JCm)6kxBk4c?~G`bl8?s#+XPPo>JM|q+@n#Vu8M5L z3#NGw+vm&EUqfnmrgTnvJSrla0|wKU(kXqo@IaQpYJF0DQp?(Fl(VDX48X5{UsRB=x_*S z2ZdBIsSg+ zR@Nbj@US4za%go!8TBRicogEDCH9EUfPO>=oz*w(4mPRnGL8R*wC>2XZC%G zWN)lN``OLW0P}@V;I0PSNIhz-Ad6?0GEw(4a9-DzZI59DMVq>PVvqRU{`J>WV2+Nh z$7cdW4dW{Y*8drAM`Q?UbH+Jc)e2aThUvMHJWp#?3De}GCl72%7Oe-uBZ`^^r+ z(*fK}wPe11#ws&?wrFwZsD)LZ%PrW1_32|j;jJ$Dg?V|ijJLn#=izf3F^<2hu*r;2 zz;%v^&*}&1FI;3N>E~{YQ@sQJ=cUx8x6`OkrJ@$>V;N;>{*;U5kY4zLLwPA2!WpjK zaXrQW--NEE@VX6;_s&6#xI+_T<_I<z9oTbme>=SAsfhy+ax z&*;V*qPqtnK!Mn(0`aDBa=5yq@dbcXBi=P!)^!7K_=cgT8Zv(tso`!fA^!7}J}naE z;0~+as-Qw7D`~2>m>8z=_W`zlcY-V#{V}yK-;rl_C4~cuktsI)f`<*`I2m^ zgXMS!KybUv7)atC%+~0Jf-iPq=MJ731m)*jYvAl+)aP5Z4h(&g3jvr8Zpja5w>W3v zHhzKUB+=Sg>BLvYs*AfqAD*D@iG=n2dn64$fYy{#Y>>`5ZF3P?4vj<63350yZeVNB z4_wJj?l(>$vcj=2s`7M&8ixd(OWyh)3N?b^c549=rp0Lo{^EWGo`Ex{H0}Rl9;1dr z63_{3K_kxPIo5Y7pJt2wDzc;L|FnuOOL}ZD;{vx{hRO4ev{=2clcL>q)q93&aLK&g zY4L2cECqw)SOKD@YHz2nj)x>>{7Eyo^WsB`n{(xt+yKtj=CrhshCX0A%C%)ZT=@t? zblZGlpS48#YSd@5n0Z0E6p-T-Z)e4g(U1G$uQ3srSll)vQ{<8q^JGPPKx`JwTQ^M; zFl>6OZ0JKiXR8~}1-^5E$c!nAW9rc;Nd}F@KvzJNg1Vv-x8SSR&z+XC5x;tJ%>ln| z<97YxRPpi>DH)71nX*QKI<4Ft*`|ZQqKnv%=y}~=n_e)+(tH&ChlduKgV~IC64t8u zS>mjG0L*%U2%v+Z)h&hoFTG&FgDTF%`%80eQ`$4bdK`6j4X1T{NX0aE`e)2>4j-0t zaKR^~;J2i{Y^#n&gxuIgz2eJLHX}j)kH8lJ5%pvZ=39OpQFjaN1bF= z8~bDOeMnPwX-C$u2X@3P_gChy#}5E`$})#2$(QdVgu=YT!!%sz`s-yUTiZ|BQ*OZq zWQ&p0;1Yay8Kn*XW$JgAzguf%u9pI^$BHxgbuly#MF?@&JJdj7o*{a^-G)5cHv$)0oQ?W8|^Adb>+#c)ms)~2~}>N#=ST*!42TQm`x3Ta~#=ri-*5SFr-h ziH45gJ5czhsV$j@crVvwjYY9vCZU0w+HF4%s zfEcy)Crw8;?qV!@wF9dtC)`}HKp#iF5Q9$-I&W)oX%t0~m)sMY&(L|v_36$79vx>) zoT{WHn_q3u#HHJwXpbi-DvN?E4;1z zZ8$EbeQdGMo!?Jn;mH~Azo@4>=!qo4avAdAeYLj0+Kdys;l!@(>n8{%R@V6IUq0qs zpnh{>3B==l;{YFPT4XnE02#gMEl7TaL#Xds*9XHFKyGXWdb2eE*sbuA!vaP`FO+q= zUu)Q_0J(8|PtaM#!nRUeR0Pkh?{{{62ILXN)6;m82Ni;uxwaTd7XWuqI4p!t_ zPQ>iDPXGN?14c{3aOn$=;W47sD75!EAH-1tc^PYBnC}|Y+ZQylU)QGgwkc7<^sR&# z5g-1i0{p!JzA_2r^0pAS9hN&eLE5Qu2)u*{hwf}Xy!*&fpbxyX`kV0TdqWGIyiv81 zfi?A7Egdq%PE{vHyhlgNXLan`D4o_deUO?rf7NP)MKg;2eQgvP-@T6%EmOf<89-*7 zBDOXd%l#WiZzr&^>Y`*)yIpx$eZKbM77G!6IhnAKA3l(k@Cb_RofGL7xu?+PT2P^_UYMwy$rG6Bz6H}9-^e(GE>j~p}bd<*8E|YbA#*YN3oKc{sa!%r2(o_h;MuqR z3@Hxht7$sP(!Kf~`B1m;)#SO@d=1;b4`|W0y34a{eM$#th-%s$#EshbeU{=_21EZ= zVT=&#EzV!k;1S-wI(IjV4^tJJwStkkLU6_P9j7#EneafV zwit%(`)4VP8oa~+4x&=YyF5P4G*zCXBu%05h0AuhQ)D z`ytC<{=+_h`j5(qM%D9b<-cf61|$VfPa52Pfr7&2@Ky<$oBM~Cc)lDi2YXAR=mnXP zNT%lY>8S-if<30ig5fxYO9iI!R4D|ZaaW@@Gq{bCHYkkC18w;bpEz1ln(=Qz=Wp3V zWhRv1OJ^pl zmG;S04R%X^{Vck1my2 zmEkO0IE1GDvgryEJuck5qj|KJrW@35`tQtJf}Z;t;i2n7qSQXzPyHXj|J+=q%~k%+ z$|PqH87c6->q6$AuPGG}k3kFUp~s4SjeWxkD0w6YPwU742t z%e^xs5;iQBq--wKS<=43<<0*vz^hc0t2jr)#rC;RN%mmmIV0Gs-ffsjDbR5V(ykef zjVLR5zttq~9y-WL!!ar(_?&S4tnIE1d!fdKYOPpiRvf=u6xz9Ea^(i)>XOLPIUMVq zB%sozc#<~6LbH3cbczU=e=#~g(nSI*IeJFU)jhMO?j^p~B27Jl8y#;5DDV8qDhN5B z3L;kxTxQ*V@0@*Xk!rbnS-2gaX3Rc$-paJj)fqz=o zVA!9`DL9YeZ#VMPhAP&=C;YpBOQ(7UXUlRUC-ApJ5AL%Aw${oavT@Go5sEc+b=hAt zI!>(U<%+J04(z8=r3_2SOwA(ez7Em`JOnIChU^v@{cV;h62%;0v)_487j|8U)FHb{ zqhCG>qYe`}5szXnw_XQ5Qel{2l`M9sPnQ9e} ztt)X%)Ug#FUB`;l>)sp~lz!7o;IQto9`=>da3~+rto9i!l^DYr?^Tl!Wuom}%ef3xj9r@DCd@6r> z`4vxXYVmOfHC2<7h{CN+2Clm#u!H4^iN>q;%`bV;v-~bas-I6R+C(a!h$$Xfo_~Ow zKObGtzearg#j8K~($d|Wo08`zj7_R7M@&_cv};@yZ|46D-Y=@ihOm*Y`4S}k5V=;> z9X$SF3iKr;PJzwJN_GPS7!hTYHu;jrtjPb{+HZeE{3maEHzvDDeZa)jEC_{eEAibE zFkQKRb53FM2{uf}JJMM4YUkFvJfbmMt!O%YCJ=$OxiD^!KLo7uip87s16}}H{2hN+ z=qmhnbHnvMGbboSMx_~51H=Y^ZMvS5%N0R#)lkv3q&h4>AWRvcD*ktYD%NB({XW(t z@V)bMY9+bls^kHW!+>`+|FL1kInPOm@|ed)Oep++E$Jdh2~?(0=tLP0ZGmka2ls#W zv<lHI$_9dGf1KYx+cLL78&|EOgX0i{)(VqC{kTQ$yqVGiD5Z3_{$Z#XqmD zAbqCxv(`d3O!k+9{#ow8r=?0qi!iVOGPQ(g6yHT%D%M;L{ml7w(>YwST~ zn5!aHN-E=Q)>SWRkpiYtWt&2YXhZ$^U2Z{!72+${sF9WFrw(O9>GG(}$bzqNIq)XI zZ(I51)xOS&{dilPvCLcLHw!NI?-b{Yz@`rJSxR~}{K907Kws;eXT`4~L}48O8f}5@t9F1Wew?mMv5k z$15i_i~cO`BBgjh-jFvwv&V$jlftjM*C${3$>2!Rab?Ww#L@Z=!1%bwpWAlAlTc>r=XKqo+f+t)q3FU0$(&CJw9+q_RS7~7UY`5lu@ zbIvO>Wi}tcGr+91omJFdy?LBBNYgBpmq%u9=SF>%fzI7&a8#sgH~2{Mv_&#M@ksml zu5rFOYvf4hhDTKQl&UjTjs?FJWWqG;nVi?!FGwXtW+$KVB(g=lsfO~0w7~p

eQu zA{MjP&%Zy8T;x7f_+8&=qm@r9l;D1E0xvKV85i3j+bzyl6GR2YH>w-$`>;l489cyW zc<>TAhuv(HsSLW&JQvGNvr5Bn^|DxOz(BFpbd%twm4@E?`>H0}SFLfk=F?H5m;bHTy?k|< z0zGj^_e!}KW@G|s+T8g@!@-63y|#kWHxc}Sd^_BqsD6sGd`qBuNQG}>$u0K4{np{C7NbOT45OG_KsolNqIrtPbk zeLBzfVVP{1wKy-g{tcc#s)ST0*_HnRPzB&D4W(zLB?^l-S%$!P9L9>gXM)v;)!^8R zzJ)BA@k(=x`;$|ITT@PvLxxc>tgzR4%1Y%}|IcO_wfM=6F5FTLN)QG0PwDV+J7a$M z(5A04t1W;G6wVP3`kSiC)fs?ubR9;W^=07L>))gP+$Ud zi0sF@k9iK>?|1AbzHDdV{y2B3GVj)ANwqa4g%L73uvd)JvS{R3EGb1n6a*yT5|$u~B`^(@wI=dRj<&kk3az9TI)-8URob;U%q!e}V1zvcL z2RahHlUzIQi`hvQp^?2rwkunE;hGp%!z#*(<$2JguIhpvIZL907oxt)w}b5IOyrR1 zbKQXN%Pl>IsZvU*qus4|+K`t20onxWc27<_>-(FKL>AD8moLTR^w{uJ(oTuD;~0aK ztvG8V_m?ntRKL8e_&aNBBYQWms41su$cbX$!H@ClqJLg5O$&FJYbxA4E&a?N{^2g3 zRIfMj4oQoTzbLO{$g$y=^ZOx}aZ$zl@mTUh0*%vYJ`me17s=!!1SW0vuVZZ&4(I=?>>CjScc#Q9e%zL7rtZ{t-d0rzQm#OBJc_F>8 zl(fqgZw)f`RfN_HvR3KO_o519?}=l6sa{((dD<%d(-hV?s$pDe@IO6trAg&!$(nj{ z72I*4n|yY_0o)^n4PWe96gp4_wmhhO37UVi+WoVc<_NVbyTUV2Hi`0qwlps;UFa`HdV+SxrU*H!~IM@}qgn62Mlomllz00}BBu^8t0^1Iq za<7=@*&nP9;U!kV$&)j4c<^j*Yq>pDh(_f9Y1nM@ZlUvfS?JpItTs$e;n<$VGOI6w>9*aK_>9cX8h9-}tEudKSw?Dg=;`2~=|Y z(^^~6wBRLShCQ&`3VmHTVM1+3U990MuO%yO>rcsI%R52V5_el>hvno3k&ut2D~%AC zjaAm734N$1Lzbm|%9qgFTy8wcb6ac8YYe^dBF@|2R{*>w*6M7HUWJ^(Rdol}D^66&WhLztbi+Pcib2ad)#KF1(Dg{b_+)51t9J6oiy`uGb|XbOPYy-J}xy& z`gP_5OV^xe^Xk0HOgXo!oRyt~990=gou zvRS4g1|i?aVdx2yjTHN#K4hT?`a4=-Y91Iq=B zya`!Exat|-lp7T_5Nbogw8sRQsYYcMoM*PW*j^tTwOCIg&HZ??EL8Bqm%W!I~fqLir)UyuWJ(@5D4 z$zrrp8*gGvF%ee1i3TdoDXBZ&r7X+E%!4tF-F-uzO3kszc)wt=@Re` zrFIUfb2)#k^vKq0T8rleO6K#>%;#65w)xVwQb|aAcU)$^ncXVRjW~E?dlUzv+Uk*U zHvpm-Nxk^um-{vX=}xhg=fFc0B(ZWo=+P8c^YdRv9}V^9v(_)l0cDS3Z}rz%mwe|o zNyhQ$x%r>jsts?(z7}bJtU&dJbYcDWMM18n{$A=mNRlz!uKuh1(+cGz(#9@ui_e_f zlFq7PcFgZm(UwDH&Kf>iuSk8@)LM+=Y=lZ<_)Cogt|t3TT8wP&)^No2f*nwkc{*yR z-0h%Z^eIQZ{#0qz7=Swqmw{SH52fPN4=~jPG_AAg1<7l2&H#n(YtR>t%|s@?>BP0$ zeSoiGJ7a;&$xH5W+S5-#TnmwjFb5WCccC_6pEsYEjY{R?yLMjX_J~>ct1HhF-#&|5 z(=r(LI(aJ)q4F1if-N6|9T>h^8a!X&J2 zW48x5YD3bbXNpO+_p;Beri%%FRF`fau{bd&pYzw7f#|f55XcD0@ufFe{9z z-yyka9KoGS9_8@Nak_9IlmHJ{p=Y-BRQ61Slbi9fC&;8PFlPfX@rb-sTFgTVMzMpWa{rn#A{9X9#z@?_lAdHeJCWAGuQVU2N}SJYro=8E@fJirypt% z2@Y&(zz+W5T(6is5(BVSqrrjt@y5R0?%E0KQx+-If}?u z4vIrm*`H0i3!z{ut9Q3&dMMHcqGQkGv$Z11gUYw%6jmMtlXTct4RXyH6;a`(pro=o z%qR0ht1MhXFdE-EUJ=Ej>5?k^P}!dn*qzW9AHPaV9k#lafsN1HQufuOZZnjyHldK+ z{>2oTkVy+L#C6Q+FE`XB|FaFBzQ$SoCIN+fEd>mA6MOuv?-c4^eO4E5b24UOSP*rk zEhdExZL|eq3qlKhkCatPOK5cELH$J^mpAN>Q`b{UkQIQ=Fy|_ zrqSP1w)(Wn=62@NiqO#w>x~6}^u~Aah-+WE%!wVxouRfLeV&~{=6?u~NzpOgYMvwYGdq}fbD}lwFS;+ z8^4|j{15PhK=17)?8f-lx&lR{A0|9#&k(-D!3JKRY;UHTI5O4|u@?5`@)W*?>u~$^ zL)R*wJU8cw=Vld%xj|$FOxDDr9SE*iBzZ@d^cMkzG26yHLs;9h#3h;Gp@SW7I3+{YSPHwlVV!d~krU%huNOUUL*BN* zaF+9P`E`}+M7Yg#nbnrKW>8|9lnjZ0Ih3AL>8G?ekKtU=-Yzq7k|e17GC0 z20WdT(N}+R0%tXc&Oj`N()|AtzC~pr7+3|q#9OXnQ_)pHvL7sV=XAlRfliCCqV$^~ zWB)Uui8(6eQ^T32z8X3knozYD{D7_}NC#&C1-JCNGTdhE_%4uyZRf|Qd&>ILLmS; zLqbEMXSMptiLT|ACM^fB6G2F{v8UhDKIX_C9pf(OiT;{uUV~NQZ{uDSPIt2`2gbg( zC=CH~D3e>%Jb|X?jTCjWIu(#E z>{I-+uEd;K`~3G`kmVoYXUv9^8Mkp9WOn1gSW`KE2Mu z#pKKq*U38c*#rdV3nICXnqY-|OlR%SWaYbG7XrVo% zwvEf~Zti|HY2c$gHi`k_kTLl>Hf_1T0|kn*I5M;9fl-`%zwy$9NfOsgPDDHqU(>3T zlh@LA()B4NK@GYT$kzO6uuGYojlYeeo2s(tf@bjQx(w8cjngOM_(kpn2{s-SsFhfw z$$o`f{Pnb%UvW8sqqc%?tJ`^iX5wHYzg&36kG+cbI=Dp;@!2mpJgr84ktFB?v_xgJ zY1KCBE1qIR)W~)5{9%>W-HYm&46Q5y-lhrIoyaQY{)3_}b;r>1H@OVm5uEfzA1sLA z*hi84&;109oV;3cR>8Ffkx;}w|p63JxFAlGC zB>zr3$OG!IRKe2yv%IVD=HhoP2KI-IRuj+&T@Vt$uPFnwp5)8z_e!>8GMkP4sY4fr zYTZ4{-RgW%X~F^uPwmaV;yNr?>FgPPW_wX_C)918Va3*-C%oX{Yx$mPwU(VCG2=U^ z2Gx^c0C4}sdQXI-(d~|&>R;m-24yVwN`4vxr2RW#i%E> zMV(3ZDPutbDU7S6j+JYFA~kcIJ11+MGB#}>N?l9h-P1`{6%)DpRh9wOr3pd?fm9 z^9TJ{)>uYfK|=#pjcFZ7?$_hzR8_f8vrFc67ma8`MFgn}Dmck=ev$ve^&vC?Ymwz1=Fb?=R#BMg&oj5#>n-+pY?4rf+_=H9Llptm`@1?UY-(i zpN{wtli=o6V%uQ2_HG1Lm+K3Vjil(vE(PeexAqam`k~1t{dI$@H_f-uF8efH;-}AI zQ_lZgsJd#FN%;tUjxw6X@a!qfv@=gN(cWV>RN=%fRW7ALzL!IFQLkyVoS)+Z&+J1E zM#qYeC)7!CXx~Z*M zTT9HxqgHUO5Y>6CabXG`cX0mDl)BNvrR?HRWbvy0drd^=&+x$VutiybepL#sHnO!w z;)TMl52`*U<|c5p4fPf11t3smbpwu0`e(z*8=ap2Kx8$E-C`s)sFiNOoKS4;b-UPEa8JG7pivqR1={S!z7 zG*nJZJ#r-kv8#RAKKg&EEA;p2kgPOX0He#=3VwZw6^`aDsEgMefSj+n>k>mGQxdU* zBzyQj00k3`=raB7oTA2Il%)POy1%X>>g(MIyYS%T4^b!7A{cTgsOA#@-bKU@Q6L0k8W&$a$wBn{1dk9404%>bSsTb4g~7Sri(1QVb{QC}THsTs-2 z(M6HZhI-u%^(kgHnHW;{7I~>}=XLGBmd%7HZ|5W7`i?;-sn|g#tmenKH3f+m)jS-3 zvAjt>Ma}44TF?_SI z5>4=qJgw9&@W|>6?9jp>hjJ@G3a*dEG;=uKLYO<^`t!+0K_D@fkLmjB5D+h1rPOcv zxPa>8g8r*t;>!0}DLK@#P!JiNIyd#$5CwMmABGn+*JN!;^f`295I;p^NVmlKWA({~qWQ)kqlln%XkVna-Fi7+U0FDcHvN z%NJgnm0N6aTP*O0%zJKarPZ2>hR*D8JQRf4e@cp(?GOd!9qrd9t)O`iyey2J(2m}5 z?bf0W)Gj{C=;SJ=w1VksN4C~cQ|SECBHbIx1GrU{jJW5xTG4N)tB3IlX$cz;$h6M| zi@35K)mn=dZwpW?SuY~Qv{}`BEgLHbq=Ef#n{`hG$eUPYh1%f%WU2y#1W}Ct+&^Kq z+r|}>|MUt57UN7U{2Y914ahgLOYF$tD?slKeSe#!1ImXwgRI9n?)-2UZXBmI6b)rNhO!tj0yxqM7UX4*^jO;KvG7a<5AA=p zY--JS-@OvMEl?(oSzRM0*3x+w>{Q;_opnHXrUn|6yUSqPacjZM{8LNN1nqUUc0t zfonE=;hVT`-^PUuZ2TP$d7L3AKH<-C$3^LZ@>cv+9nBL;#5y;v=+vv4RZkZbDpSd6 zZ6DSAS7(u(t&QQWTCE-0Q)pb}fQcn6I$~Z&%Eeh3uvf>@bA3G@6(TK7{1*m)X1Eep zm-uB0&=i@swY1Jeo5v?9m_|3Y5SQBkP7cX;O6yyPk_?Qz3y9St7t$ZLU|h0q(;{&y zq&3)Rg>f&;$C8a&)99w+-mz2!hj9%1@$gg@%&}EJf$|x*Y%wm+ixNVaR-T-xpD^-0 zc1eb?oeKy_@DcP;LM6ix0f(b4vz3!a6ed81l;T|(B(*78YiCyLu3&`<{(aaBX07sy z9^h4P-p3$W=KmnK{@|5d;75;`>D(Y6;!oAlJETFC5W=91%%ekesy@0h08}deI}UXa zft>acdlPzDig8ma}VgnE|>$w7ANZ+Fu<2XjK1c*PN#= z8K;f?)vb2>VkUVhD6f&c^AhAxXXz+XiPe?Vzq1$dgtkJh2E02y@}H#$TJ(UqQ=Me4 zEqK%h8@JG)!s@QYs)Wd9-Dc4#N3pF) z-pdB%`8xkM3$G$2KrKu@X3?R%u{b83I^PK(d)g5*s7lQxVSt0Eleu8Qe+*40(-7$r zI%3_AzVLlq_s7{V!y0tIP9y`eaPhkVr!KZ@AJ*q|2Gud4ihR_rkmNAZFd(qj2kQAA zGSODo^>y+a_!v5ixnE;1?E;jPYo0wNvTdIh{~m(0Xi1TH$$cSSqhPN^MdQHOefbBC zbAP%K!wBYZks-I`$gqDAh+>&665)lE^=eS~H>q~Od>-thaJ`Y_so$l%rP77}^PC$WzDH(pkidP;yqrf>PT#~9;&Wj={>NL?Z}~z- z-TIj|#+guFPVKf|QJSms56n-f~H3DRG&X7ev-rrh{^Bf&PpXeF|qaj*lF|s~(eO+ZLO>=IS%>3yOLhDjKCz8m{rfuA1oXCvqHRQ6vZu~mDeySQO_LrIP zMhcuj9$W`pC$2t@;eEHxlVzd5JzWKl7dA2ind23bSzr;lKcPFk^@)DtVf8yT8j<8A zAAxJ|g0(N21X;8*)hO23pF

xq)NDZ*62#lNngy<5P2w(+bqD4yk@No{rmmD=a){ zx`q9TkAAirFVu|YytNz#HyRE;BN!k?VM0Cc=$K^h+3=%w!sBXx^Ss%K1=s}$LrI+l z;m7)L)hUdGpP;iu7x{I~Ixg9^(^v3~{K~{K(ICc$tV20ZBwAXWOYM~xSNO=zZn_F{ zvCUDQFPmUW?B%S&s!HXP2l z@u#j@+#|^$WX7LhfvGDRwQnbK8oxXsxg2>+DJJk-jy$Uai){3C+<~NfDQ_)h7~;td za)X+#PPA0AIx+)~A2W;71$6`v^p@|zq`mf(RKnQzM?xW^)@KmQrVs8H@q%RQSz4-U z2$~;(1##8w`1w{gA#9~6D<}J8{i{Tzt075dP=UCDly0oyln1F1bqGgDDJ4C7?3fC0 z?rW=^%ly-@luAPVU;~rP5S=o4f!0jHmtAh0ElhDhr8Jr5w_b_v5F0$r2~t1!Rcc$o zC;~^48PShqB9S8#1cYn~7c4yFTc;-4NHkL1SuFZpe6BxISwTYmD%O*^>wYcQ;E9=K z&Em1Fjtt;H`NWRE(}DgI+w`(z)`n^;UzeAm{qGL%A<3y4v{ZI)p;~$qBAaU4v0pXr z;=wk@+7x+d$f;lphoyYA(#hL@71j<8L@~DoFf*^WSS8MrX&IeoECX1I%V{Hug7U-| z9R6p!-is~o{tI+hv-gfaKH&ZlSBe6VDTnAE2Qv>^YICWb+O8E7JtU%@dah$$mB>pv zzJaMVvSmF|W|}j;(0^n@@@hLl{OmN67rt7Rl>9~F{sQGsPeq04p_MYfoi4V@l#8W! zS3;kr$F%c~*MWjwdSl@6i6wFmD8gw;iHjCc_qP_$UolkkP#Pbe_i&65n<~Fw0b{|)Q+FgkO*V4WzFj~v;EIH1&u@2J*7byiK^`&A8duX z1+LFcJLK*KmUxetiijTYgirfu6aAM;E}UV>aGZiKUv4sJu4Bl~NLLalCiS3mzCJ+2 z8p#Y82=J6+#EaCpQuG#e-}n~fD7Y0ovKYVOL{escu3gHkRnIxGM%Z?F9XGQ&*);x* zgubG%iU$yN%O@?$5IKhsa*)EzteYkNVA7k8yF<%NZVHu6q^#Egyty8y%S*8QWH3B8 zyEg&s?3J)loRt1n5?9nGPQw?->zxo%#}Jzxt$g?0Kc^!w$AP|1gtr)17FeO^N2aox z$R(vspEJRUoQ2db>WeS`her{eIDCBsqaxyC(8qUuwYX|9TmIPkK3Uvp^xnzIQ=ugp zj;MDMsVoZ1KGVyTMX>7w`v;*^42g@Rzwu71-MuQm<0U>DO$h9Fa;kB>PX`CH9upr{@Q}$4K_x3RYee=P^vE?t(bx9tpA*Xs6c-P$Um$dYZGQ z$LktFM?rv1zH1l^m|4LFsO_Vcr;45li>SGUm!Bxp0sfVjc5LWbgaC@8JWCwD&yU%3 zla&?nI6W!$S1&sJE~=$@oYHC^U@I8+RvFme4xpWnHWEY;*mFrY*@8O(8e{E@ zzw~OUNAec?Ywt5bPM_!MFzFaR+V|LDW+B7-hx6+#yAhWWY7#5viv}k!KFQs!)Uwij zMTBH9syzq0XM-w%sX@VCNb}RGl7Nzg;rgeexUp$%aWf+~>?=`uXu5td83;_S8i{uT z-L|+0HjTctD?9e)A=d(t{V;fqB=?L-0hRLXt7Dlwv3@Ir1|Gdj4dodbg45Tc3$TPZ z{4OSwdwF9J_(VDn*0vhzV^j~1TDfMh-%sCG&?IynwzGc6S9UBJ!ryY=;WHiAgk8pY z>0TjcI>R>0AG(?gf_5jT@xav{<<0Bqoali^Fs18Sm=Hij)qiGp$-nLihZu!O(FMOC)n%UV4?b_}c*=hktV7%Q%`=E2Y7phe})9@0@(1+%YI7|&C$yjX&-m93GB5oZYG(+1yc~qfsI17EV#u&F*fEtZ&tD&e7xnEeY_bgSw zcz<1U2hSO?^i;;Q?Rv8K?haGq@Z&!AJepbQ1<$a+YA3hn3`B0dCXdyjk&Kd7^MXYV z?hDa)%Z#2j`nCoc;E`{5`LApr1JDvINJ1sgO&StaxFYZLQLGZ&vj<-4aIVu@<;672~Pe-&evZ2$Os#;iUOWee=6_li8s-GL7U*i-B&8L&I63J8QK9~)={ zHmN!FZ#(OUjUk8|zNxSt_qh|)Ob4bHjzlx}5gG2fF)lAQ=lbh5Fo>zf($DdXl%;S1 zXGHm%Xnyhu!IXI8FQRKHNeUbd+{rBHUA9sCwD8p6*7;+z{w-++qRfV&zmS62-+F_d z!;3uWQ>;ce!vU4y23Vu|RaMQZsNAKwIw>ieBmtezuZ3GwewO*28oNe#I##uzDC@*E zZ4?x>*3%%>YQJ}fEs5fO)c8N4y~WbpN@+KXMxoE91)ZS*Q)NK<4}~#5#BKU9tZi>0 zHwILeL%;cWcWxmrTugmAgM2v`;`bM=*zou8j2=S{M)e(dn?1}9^`D0cS_IH$IkMbx zon=(9lqcm+{c;OZLW`L|Z<4%GWlpCHPtSegQJ@-04)m~C~IOFUJ&fPqKQ)L z3=~@gnQJhtLU7bYc`pooFP=r~xw4>(*zs?0?(a+^s`C2id$4_Zh5og9O}=fa*3vRLrP8v_P+Iq86&Q;3}q$}0} zK2s3^E*9{nmPa@JbCh)_0Ty*&3Zj$MUmLR%B#fNE*v}7M7t}SZ-9BljMk%1~TmA;; z`#rI6@GiW?0-JX>Hxk34$r*8u{(T_0UCTG9ADPilL`wx1K0!t03eD%MVi{ocs1ll3 z^rQZIVwqO7*3Puqg6!o4#~i}8p&l+Z`7=!a8At;D5l`hMQ^z0Y{H0MdqicbT+8}|6 zbumXMpBkaEpav!A6MNAM3!$#yEND*XpaPGiam-40g|$3QY~Ua#ER!d$14sGaLAw75 z#Hs9~>y5bp2~=!hE2``k!t#ywTlBU31A~?w-jhOPY_3jsDRU|!R0&qN!JZ%e~=2#bI z!X5Af%oWe9zLTM)FtCYGU@5-=&uU;~^Euqwb?JTmY&@L(l*y4&Qn9z==^YAU4osMs zk2B_HGG24Ky`*MF=s5{rJBB%T1u4fll^K0~(0}EsAw$YL8&yGXKbD9%%?g)0Eey*d z$o*IIG1K#u0*mn+&13RfEu4hTYU2?r8D-_;jRNO$M{CZ@^)E)Y&5UwV0CE#fmlJ6A zO-f$^(M(YbMOp1ykI|8ce-j)`HGb|ztF~@SJ)-GBfr*xCtNtUMU;*W*0*K;LFOUoGZsAvz#w<^??m0&RPV5sa&Qt^pRr?LqVF_vb ztoJPzg_VFvCdQPr&0f&G=mXvz*5xm1Tzo6%05I;S3V;smUM&@tr|npIAJaqn@U- znt$1m1R)VQZU?G^R1Fn%F0&Jdzws6zrX^FEW=HO2#r%*qeX)*^dZ`mXk0Jm$il>lL zR75oa28i`~8}?0$pP@gL>w~_~1^?$E(&w4g@*!V(g_G-W4?A2Ig@s$@Y7-5PcxIRO zEBz$W7zuGHeH&o7_|+rM)EP!@B(b~+!?I;^x^O1!9Bci0bTl!0GY?Y+sAN-^5exE*!1VhYEla4T-Bz#uN(=j76}85p z&0admk1tGHuO#(&yF`?EIUy|ills>12nJH(Vl6`p?cJYdSX$KKfEbBefLNmN&7ll9 zm6da@Om#9mCqa1~SqbYrAc`C#>)S+HeTQV@A%!|%du1N6A zFqa!bWvJdH{Xo^A*P;Y+pt42ErU2C80JUn4&`NJYnZAeE^F7Tm+l3c^q(>@am&FTX zMaxD8uttP}Jmw6JZs^8S0qn%2S@3rOmj{>C!m+PfZ1#*t?b8+Qx~3PbZT7`k-Dpe8W#FJ#U;9sk>#G zSh=xoT5F|l<7~hPi#TF<)V~efWUo5x4MX(3HRaW&BT+Wmz3hY67MFEa%L~e?_G^eQ zQkuHV!G+Y0)F*b1Y7Dd+w{y>Fy1iN%W6t+mpOx@1FlUD+E7Im)k#jH_-4`+53;1a+ zSX5_b_fcDiNo~uuPWf53fwIN-Ou6%0*m{H6XW}gt!5wEr6>Cc&Cu6#w0Uk}+QT%dl zeTY|^W0LoOfC5c_YYGubVTZgIUgO78>@y0W+o;4va|y%|YpQ^Fp0cGV(!Lg*s9nmK z)$mUfWW}WIN8?({BF5hGlDMKXZL9QK$LKm_?R^vH@7?%ihC#^N8}{$qstX^E=HlK6 zxeUOp2sQ=h_zbpr><_=;NcpD>0up3}-pj}OzHZn{XB*IQ zs-^W%ba1eI_3dLpMcSh-mpkFa`}KGjQZk7qoA*@CF7Cyv>-rU!n7=D+H#;tqk`gqY z@`2)Jr{c4G{8|UWw=h3|&?eU?&OSYJi*D`rv=x1Gfr48uxDGha;~a$;bvNoYumYh) zU=R975V|H zU&T1_dij|j*q$ujS~=)YkX5l=q@+Mi=X}V6LBo--#1hPrXT zFisC0uhmz#(*1dJN>(qdSZUdlD1KkEYd5aB!7zG3f60)%KNk(*PNl|8B0?wTGJKRv30=iPtls#6sxCp`I85^?3fnxD{B(FRW=2H?2`cZ zhn=x-jusLZ4$b%Pe~QWpW&e)VyoLDv`m9K@v!B@FIt1+a%U(W}L^MivP(aoA5IYJ; zfhLS}375{K9}vDH@Lcg>p#9B8?%Sa8PBkml1{g5fm8u7{nt0z0erX~Y9 zHl^9?@sYJ^g~PS%o)J^{uhvtYB8Ef_{#HlBP$`L;IMR+za#*a=H}iI)jLCGDnuZnQ zE~g{&cIHB|kUyBDI_J{-@?sUD@vT%EJvmNqFrBQ{F~K)=#Iz;K%5_`NgN=#!_{-E9 z&oDU|`R`osShim?OBVLSrj6S&KRt4FI%;eT>S_O^wi_1>ASlQR7|gC??YeWc zD^}lz3z(&4o?S^pl5?;h>zN7|>qAHwyM4+)Wwo=HZs*$2`dRNNt3zFM6$=KlcwKg5 zAdtw^zqeTW(22FkPIL`9f%V6~CB`+2Sl~~(a~G4);pDzuLQH~`CID_eo-|c{1ODBY z7(mfIHr~`f{Pp!%r^mkOkd(HVe z4XdjN(g3SL##rrtgw`9tYRX14w4ZH)_a~x# z)~@og*&3`OFYD;y{_Cy^(nVU%9TYn<%eYI$;in&BxLr4tP0;af8m4EL89+w1;{0;N zrjwwA$woA%Yt~!$GA1LMdAAPK0j7wjZnfE}tuA$ugXOx>GXri-#JP>~gnQ)b)Tqlj zuAP)w%Tw(*2)_K&FbUlbp1H@$;dqHb`h4v88gRcKF$EUL;{Nl4Fx(Zb%u+v9TVl!} z^FWNZnkl0f#!O94m6%>cBcEOmZXrujVGpxn&6&gQv@XB1VTV))#%Gxi`x9Szek*Lr zorMq7R?`+7s*prS(?p*@3xN_Dt$VGhisjoA+jvQzm?$8wXtGZ*{%qjF{sR znxw8?*4$C9P?T%*R)||hk2`IkX{lmr`~nn-tHqybma>u25tGU3SXZ3o9yFJ>l?lw( zoD^DE2FTL>`-ju}s(9#lxrusFT7h{_KxW=j-&$}=T7Wu>Y0B+;n%m1$|=yj{-D3WfB` zl=mvN#G5{Kgeicz1Tf6lAiQ%I&EJ0crg?6Jhli`TW#{3QLc*YZu29PdxH2(DtYyMK z%^1O(u#IdIeEhktn`V4FA-eE;P+%>s37;Jc2p|;uoDPO%fZ)Q&^D!c>KH;2tw;rKnE$KplK9!x z=9EH@9J^m#p;PrTbOx0dl9GKBy{S;7r6lDT^420q0K^tL+wQ|F0Mr_HeY8(qeSguK zIV`x01aU8;gRGjeUNyuorazI0_wp9P*xQs~66&7BD9UfMmV0X{TKsl1HIG`eCkkzmTBm9a5m{>u2Pmq|G46I!*FWg*m01XVYrn{8smH2m zozk7*H*iY{f6(AI`bPE)g(_fQ$lWsFbNZ|G9hJ5SEqGWLl(^l-7>CgwiaXkPgHncL z^)(xZRucuT`y8_@82A>XHQyuAinf&!Hf6BU!zVm_VwjmsZ{Ku%Fi9#%w6Vc&b&>^W zDW)1CvW?MV>8L6cT@LvClDOH^QsE)HOgy;dbmJn=h%F@$6*}ddzm70yB3F=Ev~F4e ztFz2R*40hn9!MQP)QSl9sqqj04b#gOGE77p1fGDWE4=%_oX&~vy9+~KQ;8J(ys6wR zAIguL{6nYlmruUE_GEpW=`1*k-Vs$+ z^;=Ut_y&JI*AxhoBPgbe3y<678WcR>py|Wq5#no?_j2JK(wc~7m>Bh{K@>0GTy zQqV@_Oga)Bvw_#^>4wteK4leXhZ;r5(amjt0}BXZ4va2KSs)d#+;I^Tc>lD(d(JHv za&c6Vh>Av?UGS*F597CjJJ^Oygvu62R60e@&=#KHyDm8F(tDWA zZmw`=;z+s1#Qy*|&GSV&4Uy{Fh>nV!DX~V4poOQ;%m0iA>67OUw)=O6XD;Pkq|ssY zIAvNUq;jkmKZP`ApaSm9tEUk7Q_ei1_K?kX1b|pdjR;9SR67 zw@_l(o03+6FMC^954}d-8z)=l<@D7v%pDzbvaPU{rVnLZ%&oUs1K}SZm~+)RoaQ{X zB$h$ZPy5n!Z*5~(LRF}v5R@^4mxS=>$0f-=8H;De1cK@@lEM>=N)XvbcfWvKh(6om znkJPqobFZ&0U{}vEY%!uE$q1li8>Do_9b4q+5Y9oI9f_8Zf+;*8F6OP=Q+(L-d zB^oN@3TTp0{<@UP9uz~Qf3DCC4{2Az+}#4?x6*6w+@;mQSiYRGTmWy;<3~`3r>^?Z zoJIdcQ#hy?)tJ~s*vQqP;3C;My?|Q(XgZdO|4+Tvuisl92UyUiGkIT?H~;sj9cH9Q zwA7j%>_;^AVhan6e0DGs=|sF09!t}AfsSbqQWj97*Rx|O%}{g3pgWTTLI>3T;$EOW zBt;7O6H;_&l7i*qqSiiB<{I~3RkhSHdu~FkJmuxYJy36D0O9e|dt>tr{)7xZ-ZR>T zFn#WA2J6RusO6nw>Re&BXFHIGDgnH#QOGXJScss$B9XnCg0#iuj}ML|8M+qc{IL^4 z%S1CuXmWD@{>Z~}nLZpdZ&&$HtaKDeiKz~1c2tlm{uDlN69*4pia|180B@mlmXq&0 zf_Q#-Dwqq}C=1fGW@(K|z^QAtEOgsN&84(hIbOm1q3q}u3CDd*ZVxbb^AT(rljGG% z8Dkq%JoEO>BZb{1<(FC4-8))v1xQ!+EOSybv|6I3?aNy)x-bB88o{v?`eK}r`pM12 zon0}F#1_e;dG|9}%2PHYN4I-m#AlhI+@r1451Sv?xgBltFeMpze<8_pew6NQuV(-Z zBGuY1HSv3GF+09rKD^uQ007VSTGn|7cxmX;946TbB58~Df4uFgFsUHcviI)h#)&Zj z^mllAUnJA$Js}~APLUh7NhmTxiHqeU7 zzs6OutZKl^yVv=z?YYLRu|;rofYRdXdkv`w(X@a^h}q{)U-q-puRFSS46Ih7u9jMU zHYU6EH(fSn4tXtE^urfl$*{;@_o8y(G6`OjF{ zv%atBCcVaCo=CLS^AxpEwWUJ*f2L-BWJA3yG{ulM&yEmhafQYgY4Jgg8OL!Bl9Ajh z`3&~KB#LsWdY;A2L(|*W498|*a#$$qox;YGM7_3`Lvj7>ZkR7(#(yTR6eh}L-8l|K zni@YYAsW)K#0P1CQ2Nuvn=Z8m7T%$MSP$jBW1HqD^Dl1SFgiUq^L!w6o17> zq+WE-G|wBZCLBkDW^AY!0U_(JmgaOT1e|UmmPrqcaNWmH5R5wkYpr+->?JMIc6GMZ zk2X76wxEq$^GD4+WhBD$bd?M7TICIj^tY2pHqsiZEa=NELlb9vnq?G?CQB-B=jeU> zG`C|R)wdbFq!~JykzfPg0w8Z2t|(xOsOWYcOaSuO=p4dBB!FC_0jKVmgMKwMo5M+`ynsG0lF8={>Zlem&V7_!q-x|CDIqTTkUoC^ z&PRfBJR$foPBR1Knsz7}tlQ|Y7rO@!>nQ6JU zcIrAMnljSZ_PO&%WKUF;AF5o|Y}XCA`bOR=yh&-z%c8c6Hqs?ld2ypb1lPRQG{GAk za{J|xoB0k-h)(fQZFNmG-}~zV``zsT#{iWY3$?aeSipWa;4`IGV*w0X^E^ORkI} z|GTn^k@S^TJ|minRM}1${rJoa^7ww03z3=9G#}!j*9<&{_Ay$ft{L-*f-=2P1Cm*} zBMJD`J~2oo&9w8EC>5hJA?>(W!-?7l?_*W>-bjD+U`o)M-`C#- z+POm0zi`G84p*4$ugZDkf^@W7r{ZQBx^LVAbhrdE3i#Kgviuc|OHap0XE-jIwC)~O zP6UQX;-UwHR=O-isb4NEcnG|f@`_{Fb#eRiwq1dE?YyQ-YI4Bc;pCz8iKg{IY_{k!bTcDO9i4ixgETR3XT$O&QJk@c6p^sm5AXM{$`u?J&{X4;rj?HAg z5=w^z9WCQQ6i4Q!^|)@vj;!b|k3R&S!a$g0buJg*VS3e3Hsc3zgG_FXZCQx8)R0EqS9NG7|E05VQY2(Vo?Mm}jxjgs|}$YyiR(AjMQFGCJaN@^3|G@xUc z+%AVc2zA<~C0k`fhU+mWNbL1=4Lr_37i$y zz5q28gJ6}a!J{xfhYk(CoT#3m(#6G-YT%+&)(0_FT20T#-N}g+_G#bhq~h>2>qyV{ z>fbAVE5S^b%ah=uhYE7sv|sBW#ec?RIQa~BcM6vZe;IWF&ksambZto>Q^I+|(&V`D zX|0DaTSrxHnW|1BqRDp1bK^euodveGJX|Lt=PBqqI;PwZ4l=;fUSBnOrsRBAoLj5Q zyB`-rcZ2s-{uci6Uqt=yUE-CCkcKlhj8jT*e9rl61#4XBe3;8G{QwG;)qKx}!y=6p z_&f7liuIVRv~cu1KKF_-&ex~!W#oirW>@J>Rm={F(Ged~R!N1KhHn;5ZxXF0g>fP>mGgcmXMr zXt;tr;(vgI6*AEKI8=&vUnGWo5HFJ>0wSZ`d#RvxI86QjxKHZk<-+4Gw4{mOpXJ?O zq)c}j=a13vrfz~#|CB!gzhW|`wv*wH>Nx&wJ3o#2miqFtyfWx&1VTI}Pd!!ON1yToMQteCoJ4SZsPh!1OksHEl23z6+|rVkkzg|zOR=rsa}f$R8} z9KlcsVE|!dZ@GthE#yBGo}Ie$sKc*HrFO}n%7khyK)s^;gCI`>+e>DW;vK4{3k!WkRq%oOKC(wv+MEnouKz>s3PaJ6PO6$Tz8%~3^Pb;y zF5ph2e}uU|RM7XHtFF#Cu%z8d%Whr%M>?KgVfj5Xq&YwWYDcC=f(lEN-MOlxAD4Gz zAQA*dn=-kXcAqX6X5@_GoC$u8%++^+=tzUC$3WY!f4sIDs~q(;Frr~Wm;Z7g%%!i} zrRf(NS4GAF2k9>{B*hH%_5d=Kfh`M(xrgn*R-*XpiE@zaN!p3^Q>k*YKV0!(7a6}` zUV(H|W{w1hQ@LVN682z0lBfR=)snBe!}$EvoU7m0R^T~Y%1e;tzRE7VpNRHstmgz_ zpTD-nY*Zb_3bZeFJDa+F)s1qGE7JNO;M2=Gkn@M+fwd!xR~Z`}`OmBa;1No_z(*## z30A3CYyNh}d%Oo~lsS;izSrUTh|bkUjs&U#=ip%FEs-cveKY){a58P_0J&ppm^C*U zAv6J%Pv?33U+VNR*fAOqv~`;SVG?52P~M0o16wO1$V>TUZ4T6Eu~wgD(oT>~#%#@- zK3j9o8p&?*LrD=*5+&#lD9+cP$@W|AG7MSK^M-H#<@gslB(9oA++H@Y)K9Fj&XUy; z2_{GQ8Ev%M=QtGP!JE(?+a%#FL8k`2-f#W~kSiXzkK`BNLQCduF21+iX*$t^deEz= zzI(lQ0yCuS=vi2C${6%T=0stNQQ7CG2uX?SpW@2xd+w#w-8%muRts1hKp393r+c|%{w^*zu3WfvB?V^I(9c+-<* zMys;j&i^b{I%Hz-mVHBxxq|Wdb{uYZ2 zO|HS2$nPvY{^FJ@f&VUscudlU9#^InV~5a$*hK4DZ*b0;de&W@dibj!2=_WX@BQvN z2>qwDu;&pDKM#s<&xL zoS~(09^Esa0T%rO8C7-7gvlDIhcvE#_V0vg51bQ65T9j_p1OKkgC4nJeSk8!Lf44Et}TjB-Oc2<#LB2rPgV~+0e`$wE` z1!ffo6es;A&0uM7&zohE#&k35qfZ4?6(4e8l*2qts}+GcR%^}KvHE0V+jR;e6qO)` zKR5X)wUxB2EXv%e-@4^Z$TpfXh@<7w^oyFW>e!rqrd4%w$kamLdx($qU^-|G1uW#} z%=h2S*1JAU$jUe(Fe*G<8=p%s(E8aUk!eqk{@K5QO`e)?7Essvm>vFiIc=>_)IH@! zk`XN`Q9xV?EIc(p|$Yi%e<5s2izs-xh%aQ7v%8n4hL|x*|T5W@XeWGR;+&^^^$b2qlpEP;7_yN zg8Ha3x!qlw7|fSODgB8F)>~^=-Ab_uHEuEHpw7w3#5b|B0g9OExSPlx;~rLE#>9Tx z$UV=9`LNtwf(r*UeIpiE^=o8Zx;8b8ILx(3RH^#KE4jj^5Z=n zO=cJ1AV-0>wR+uvYFxx}SE?@bj(iKJRpc=}n~u~76UwHfe%7!!Y}Tdn&;M`DYGZ02 zcZIh?+8!%YhGFhKj?ELBhO~2&S(j`U6NUV<}SIo=6liN#KT3)^25!@ITrLE>h#=wE!ShPFaLvyn+X;v^wIP* zlIp(JkDpj?#@RO9Z_T6JYm!xD&fQXup=r?iR08vi=ngvMi>H?JT#)0oC^jF!7^nb? zqL+cQc=TrDotL2TfAssp!4G`Vu>3pm+r+j#Vl{5c)BbQ_=?QqodI3mD@p?2948&P8 zdWdtnIqCzs?OM&Oayoe;T(GIxCU!ETTRRa8OCrMg{{w($Jb4;R-b$xq4lexd{(2@= zCii(V9~PFq7N*>ZNG0{nyD$2ySvO`*I>X8ep+bW7&*q7LE-CF5o~MApGq7^ZxLQJu z1{GZ0`bP_b=6aBY@#`O=`eO|4A2}4gfPA;K#vB3s5SU~)_nbnRGal?I?@HimV#isP zVN=+G0I5V3Pb+2g)P*%@X*DKDYw{ykCx)gM?_bI1fN*;%NyO?tdj>p))ChToC3x%j zw>Y;+5e*2Yp%0+C-m5{ec+_BQ(;$Hj6jj9U=4(h!Q}D)RIHpr1YU6_I!H2AxlWvS* zh9Dgiz~PPMOSUxy8ObrY$JPg2hfLMp$0p7u>nZBL?77W%F)`mwrZ3q!xM+F4y$liq#b!H~!CV zMv1r1{VUXEzSeN2!U~sc*Q-;|Q_c9-zF8o}Q(B3>$_m>w+pDjGXt)Tq^#QUtY0R8h2)QsYyzDBm~lACRA(B+q?c*LfaC zp97)IxXK(i&_SOV$-A99-nV%WszWBBxk2IsJN}O4pxEx9o@|t1D{b5Pp17up++q1( zW^E>Pn%{D*>SljF`zs&h8pA}QX1W!Ie$==jVw&YT2_NlOvZE!h{A(hq5&+lw-Sw{d zTvHfj6dxN@Mp$>Pk0cP4vrQSh@3xwhVbSa>^YAW4XWfT7q4*6o%5{5R*ItdA4^ALY z8P{$Z4BycRo?{pM4Rc#i961$l6aMLOf2olX(ZIh$AU~_QDUHh;a9dVHX3{?ls~$F2g8J=zL_7Oz?-$5!pG8Zw0^X!ETsD z1)2+yroE5_Z^qgV8GY6!D%jd}b-+wj&$zE(z{2x$OzZlSkWDYAT%93?B0l~bBBg6e zwFK8l0Ff=T4%`XAGjV6nNizyG&3hz|+qy5kkhknLZTu#Za2#A6Q2bDrcj38r7wUjN z^(kd26!uC5a5;G0gTbml>gs@OsyLONonaZDGcJ~qxcZ6l6H)lmYxO226?0nRh&v;d zX$n&e54PgxI9u|x_GyW1E~!Vnuh(GQs}YbQLEbrms}5n3lu=VxUl;Hd-6u&lmYSGe zHi)_vc*JJ;bG!@ZaL(zWAlbninfYk@(F6D)o?lxvd?N+9k@8XENLM8jl72bq?>va0 zqm_Y4UVl8gH`r?nk>ZVYW!gNpGU1d6A|P&|0@PJ`TW!xhS*tza!SbqLjn=MU#83Al z`3Op%Wu)n^$)`+F;48a8y>cOdD2Y*LsHa4&Y|d7qptko|5a?;3WK8J+I7Bv%Cx?ap z2O;vl(EYs0-#Ksn?#a#Vd*>2>sB`SMOCHIo7SgeIydn%Z1|7S8Nc2Y`PUMTKiwbt3 z-51STXQxj-JUi9?FkVQDaRn$Y!k@m|A>@cvdT1ODJMll=F`pp8m(@tR3*E70P58#( z*0ogSz{n+ZLYXi0bqV$S8&}1f)9Oe3$Adeba7wpuC|1M)Ix56Cf~80NsBdar4#GFq zKkdIX#(ipfvT|r;Zo#$96EAH~aH{U22;QnLCSKM?taZlA1VJ(bNPMIKtNg{>G1X8O z2JFy!{vwa8r*5o zHAoZ*&JFpr3lJ!VhF^VtWOYE~5Hz;d*$avH2hPFcRtzmZu=HIVI-w#hf|znRKSsCm zEHv<$bu*Z5?*1sG{{$28P^)i!4hWDYgZBEm(CIC%AsQsh>(rmZYy;~kek4Ac6h_01 z7(R$>a5XMmWXj&gKR+^FYTMDXP@D9p|qZC-8Z+dWu+S!rQGxF2uo_C zbjbiQ#J}$4qFN}pXlk&iNN|YHx8cpkfDr@~a zT*ONpsMIv@JDF_>@D=@d z4UWVwVYo`}g|iP?3bB&typ{ujw^Y;uck43_QYFSj| zXmWtYJhF-QH(bCrR4LCxf*xGY-=Ny;>aRAATF?5?{&(prjY9f8KNSk$t4%_?-cAL83a-OP*qHgC8fU&n*g3dW4j@BZd}%DrnJertP53H6X)BGv>5iI(9dp{Ak?tX5VOgO73dveJl)<}KVb zFYeSh;Nf?!f3xF%eo0%9vkcXK>ph2i1&D!1gkDxBd%;?*s?@=4%vmcGs~x+3s)-|7eqT%(26QZf2#);pG0z8iRyC>qK=brUl$} zd1a%qxgZ<0adOALkd*&@3?)6fGOp2;pYO8~^9q~mvE}hZ?4%v=WnqV>bWAI*MBz>& zl~>Tj_^|gElQU2xnF)_ZOWeIGw*lP98A?s#0ZnYotQXjs3g9o*b!!!MdO{hc@ZncY ziTbzHuIXME_oLmtM%E?o=cXPIUdzLMhkCSpFR?mH)keW9R-97+ha644G0xY45gTOf zgLMTe7CtPZSaS|mYb1(qh@K9i`SS;!=u`@_e}g;0NY&^W7rpD00a*ZCyMqtD7!`Fb z<(XnyFPvI4!i62xi1sH}t^r)j8G22;EA|tpB~>pN?--N1Q-E!5k70Hd`j>g%(#0&l zSicK*)aFkAEbwh?o<&S?On?}fwej{>uPnsAw*Mw^`4Bp4NRSZ1p?k5Z0*ke8swbuua(A?ndpbVGwzb}Ap-d~J`Zg1p5Fv}oJJ-$DS z_*6#Ngr*1B8QH*xQ^^SnQ~qOR^UUw3xx%wF1;R(_1gr>!N9td!@*R+3*TA81V$S9f zBFTzj`^w5doNk0VAz>9Q6q~Oj8!$4vlvr&}4&F-dV{GY9h(lA3Ej+$YN$)Dpt@7PI zfLFMuy3)n^7h4Jm1(z0$mj(PuOjUK45iRRqRyFYE_2~uD_7zp#~Ondb~k5r(|J@qMp}(pxEc=ed7u*(nf0OZ8~DUACvFW zsn`MaR0D^Wi0Ezp4NTjknZieOBj>OB{~yUHzMQ|tnSK^GeHwxj0z*|%L2l!Fvr9{8(J{gB7Z zYwOD5j30m{1qkUJb4Jd677h{XhaEZ-+voLEjTJVUt*f0F6;Ac*N$aLr6c%h_?f~M{ zsRJ+>^AZV63p>k#(Z2i@7xmacS#=G8RiYQGS*^`#2PToAynJ4frjw=iwS7|8T^F;f z$IJVpQmSNILQL@xiEEDe=F0dVn5UAO6D1WX%p3B6B?M_sZ74=Yh#>H@+qJ%R`vM4; zW202lbfDttkDRrQ|KGzUl_tZ35U5TTgrX#$$bYR}% ziTYpFqOaEZSR}!{CRhmK<;v87e^&JN6DOeUYW)WiiNgTOrV-+Dc}f8FMWUe`Enc7O ze*n7LH$-nQF0T8bmh*NO20^qG+#|i-|NP<0CMBwOhS?wwU9w04(CI6u$iSbBI@_@< z4lTUwFLmOT{EO7M&srHBf|NTV9hj960X|tLL54(%NrqaIO3o4%w~77u=`Ek;H#m^nTEXn zQXldz0qp~9-uG7$u2iO_laNc|oT|J^26gpC^}TJNQ;#h{;{um6xAKycpkS9Itx_Y% zXWO!{-*7Y%;EvK{jBf{d8q}0Q& z5^F%Jwkg{F<&Ue_K6bZc{8RqlzBa=-kEd7LD;u1Ms8ZBr2yNpMb~v^Q?4!Be;q?Ig zQaiVhg2&&wCPB|n%wi-*CbX!j`X2r|Ejqo_K?s+ifWX-W9EtyR(dx!_n^b%Od6Q=* zK->EBjA+z!UIs@7jf1EP@4rILTwD`M7)SZ6Xxtza9KU#<`c8$z0z1Al3Bp+H} zaJVW4HQqp*uW|4d1`m`6`I|OZ-kmWk1qF@Dek5I$qqz9oV4%UirMJJSDwojVxAv1J zRc<+v-~B5-QG1e=tQ%(Rx_Qg~{5Z#AttPq8yXm9eBUp_^lJ2E|Z#Ho6>ng5-jr@6h z#i-V9?c44Du4sj&gsH6@dees49M+1;3D|rd&qdd*Ox(ScwoUethNaXxzu;fnp`DUR z3-ELlfJr-d5MIUp041F4KgV~#yZoc5GDFA>%Pz{_VH*@D^L4XGvMK!mZDiW@BgDHG zh1QWKtQ3gh=dMMlf7iRe`u74@qE5s!2+9%Ttd`*jMhw*5M&o0|AU}2)l z0n(CL)$aBpr_73}kH){X9~&n`yVRE&FZQQ{$g(FGV;^WiFVTQUh4)$HZR)RJ-+Z`|03*~$t8D+*_= zm!X|?75Y~TxhSuA8c|ts6Soq@nYyMgp}M0LPUEP&#Z#%u9V0FVuF{t8F>-p%d3#dh z%BG4fE5H6$sgwT?Ff-ddT`+PlO&amt6t~0Exx1bd(U@f;g|YVwK*dN4WQRBG=W_2yN5=mgO_!9qLUBhG=+Gc$I(!- zwMUW+zm|Y}D|K-Im@O%;&tJ*E%cVKHft_5Li^QZH%eg6Ccr#Kysb5bfYfdZR9hrJ~ zR^2$djVVZ_Nn$#!{TaBp+@O*-y66H{xNL_jFKcf(n5KyRH+128bXuqWwd+^d2-iJi zDZ*<{Te8r4%C4-KuO3K86;UawRR1YI_3^dQzID>Ou>S$lCPAk4pbya%Q|5+91qq)`{(sQ_)S{|r>=4HK?|Hf^AK)?Xp%u5Ek4%eiokta` zQjdh?zC%m>XSRhK4~j4*R_A>_S zNYSxFi`~P(v6Z@E?}0?0NcpO7FGJpaeBeD|;eITzVZ#v?Lx@nx?1QXL8sOd~sUS_I zBun(WzxxL{;kLvS)IfmsKhT;p)&vV3?hVqZp0titBm4AQ(0Gow*B)-5&ld!Sx29HW zX}pZ&=hB)cNS04DjK4CmefploJ?z813oLC>8CTvVyFc0~ zfU%q&7WJwk?1>#s92ajm@a~{?L;o0rv((+Vu{R`&e;&4Q#QknA>aS+tcOWPKZ10Zp zFK+M3S|9a-%T)dK^(BiEB=J;CrE>o3|Oc0eV?_+{zzPO%Q*~jltsGcO)l|)B< zgJd-NqL9s-^i`x*JbBkelbm1FX!;(cbha5m@}yF>jQT)_A@A6HewesNMKCt&aE3(? z!w^nS-u(|?S1W0uac2O-aXh4U1ojpirSa5Gv;kV0{|^6@^@5{GG)(PfUSG%k=mq7v zoo1|gs1ReJ>c*d|w zV}2xBq#)(xa(LopgFfUlz+`laIt;=1gt>qrA&L9|Y~|5WHOi2{pv*RPLec270q}75 z<*uDCXH!&2scbnogH5pT2v_Rj!^)?clwrt%mcqP}kMmjiz zxz?FtN`M}Q`3AO|U95d(OD)D z925rcd>kfI8)s;z;CfQ!_V0oADL`=rk~NzU;zYllZ?5_{-_U1wJpM0EUJ6O)q+CSL z%MDH*R$&VTv;BO-J)ru^DQQlQm;cXdkKai^MOW?(lDo>ty*%Dbx> zHEBv6>slf050dV(yGY^>0pLh^fU7ZIg3F((6@>E&k6M-?SyXXX~dRjh7wd zx7|>e||N*L?qi=Db$7 z55yx!ty4BfGYTgiofQ<*DVhI2$h}tphU^mBG$xge&;fSe|BTW`MFmeAqt>!i<_^L9 zA7{SsMXTzMR*7CkHTPu2MND_dhUsjUP4c}l8ZRp@jbX$!6PB!!0rVL-jNS;bh17N| z7iZdav7KZUwqkf#7#s>$+^kSi%tp@Vej-;qTy1xJtvAL(1LPP!vv%Ex`+HVDcO1T9 z>NEcl&uBaye&r<^z@_*t(k{qZvhF!wi>q> zk8L>sy(mmyLzssn3MFOgfskkaZi5#PcpHYB(?Z-(#E_<8ZkzJdk7C65>jpa#Z*!`A zI?vW8a0G#Ut6kMH=+if-Lcja9m`r$X5XFz?kbEC_k0rEU1IXUgb1#*eB#1+ULbf$? zw6J5V#1^g=KslJm(Y~KxB5+D}8;`DWc$;|27jB@^N?Uy4qga;ucy0B$;|mIa0;$Ud zbc=7jH{5NaCF%zP0V6pgM!!DGtY+s`ym?e2d2Sw^N-LoOlyS~)hG1fXoqyvL&6)16 zw*EyP1innQVncs53@*>780=c>b#fShw{HG+C&!G5*9vJIlsMxqZSMD6G|^QHF)&?u z&cY$7YPUL_Qy88&pVwoin&zuJ3LrzQkdDa9N1L{$e4j}H;$EIY(~;kgiUx3nty*8L z$-IZ2nU;u};hZlj?|MJd>F2Y;T80L+q}bCHWFJTFF)tNE4};_Tyx+5mCHNwPyE>mYdxl08`{Kt{U+#r_)dXYxlWiJOfCTGe@HtW5qYy;I zDw^|ctTw2=1|FwKYUjkU3d9qJ93E@rf;!Wng3d@aKOQ78xuS4>E58vtfBQ0RwH6tx zE2?ce!eC#dHf{>OngdQhYH@GF+|!}oUR;=+>6nf2Jr<(9Ys(Aw9qN7wYx!&e8M2nK ztlE@<5kSwd{{yJPbyqGOjnAbmLYERWlt!`3(S2`_D!*8%OB9O!yUdBMxeTMyQGLbu zXo#{U;I=QkiMW`nQpBL#mZjTRO*LPp*R3uZCq!J>qeadIXm_qzJlSmkB2Zx?N>x$j;uV{*Ch~bGtcivt%B^Itf0<}I;|Q)FXRr*U9_48 zX7u=2BQ{nutU90nc7?SSD^at_*9Md{Z`=t&J1Kqq znPmJmaqT{0q_eeKY2oXm*v&t6OBKyA4Gv1+01Z5i>T*70aVc1^n7If7x$@b1J6V6K zUCHx9PCa-$H}TT3re5gPO}pq)hnud(ClY39?@NP77+|IBidYyD`M!aQEL|c1jrMmq zb&7m?kw$GDiSKiKUF~Yk#o4eXg_MMau#7QOd6cv``1|BhVsI&=a-Fza!LC+hF6lyd zCZP|8|AbfV(8ie>atH?#c+@`c=T@^gd>RsM7u~&+XAwahcrZ#@VM$9dQRjt0)?o(j zp6JX3y3OR#D=Q13uS(_2T>Cb47WxlD|LMfNhle)6$3vJxn3#y6uPiCXetuAlyOXU@ zE@Sa5xoMq=rUdewOYZQG4WlQD-yTdY%-mh?RN!e~+UKC%Y`6U*H_*u^h)ueGyH&N; z-%vh*EOa>>BI~tMAlEW-ED&zEg-wj~pR1!)8u|lmdK4Tmoyht#eM~k2*|^YU?u1=L zbol99Qgm7gMrTl;PSrmx7O;2E9FH9=Rn8}E>yV#!wS{^M+~FQ-GG<0{D=G;6O+uCpG6bwcty zg1RLzZGeyxtsidaG*;6kjzvSFD(m>a(g+<+S|K8PAo_fV)7=%BaL?BQL1;c!(&|fT z9?R=pLVK!mCl3>6Yj7{}Z8#l|gLy#a4n*CjGP(R4g%pIi7H@dl@)a8?r@9{YR0aNo zEY5iHHG$-3<9LDKs=wA3dryx!rN7Dfowdtoz#Qmznys9?12~3~aVr=O3 zkg{wNLTYtchPoOOvX4b-sbf6?w$khE1Wq_;++Kle4Y3>(ehK{g5k0* zhCK^*$uSkmdnz908A*=^8I)#iT|`{{XtX8)ReVvJM9vdzrQe61zN9+c3rtW2t7wW1 zCE3SlK>EtY8RngYG?^wpnj$l&(GtW9V@2Ca`A9&&AzYgokIykOpD(b;ZwZ^;$Yh4Y zLl_-j>Y@)RC%6`GiKw@8TuLpp%^~}lv1r9Y{6SZU@>xV5>wp}l^wL0XEt;gdq7kTD zmFmgZG#4h8U|2}8`?sR@mhPh>-IZ9PVV+s`<;=Y3-@mo0wO>kS=KYqiZaObJD|ub0 z(y#spSV%Z1WBu(7rs7^h()2x2BaqiacY}cSz~>{;SmB3-aAg9gJ~t`+=d-UHmu>OX zf^*JT%q)a}<$&PXkKZsFvc*(K)2?_hNRq!)LRrk^ zMT%t(3m*u>4=zLdbBkNSIZtbtHqIu!Y<64}4?Icg2mrTF&?oFuIaHXY=Vq1P^v6jG zW3AmrYY>fA=Tat;g=9dJ0s4QA>scol6uV}JuY|%SyYgMtHcITtb0e-wXOxSxZ4Z&(4TispjPYI>yh){O-Fj;FPIgR=iR5JCW9bQL$ zeIuGBs^Z{&lWrNGq5ZZ*FFXani=OVdU7S8};~sj3=_7a$2Fsay!*;N3CLR1)#MGqG ztACF%y}q+V1hQO*iFPu$WZIbH26_gZo#gt-J(LW+*w?k)wId``{75gW`HpvpWIFK^ z_abmZa#w7jA}XO+KDCy0LaWzcM>_*27Y)jGxc5#^qF$24_6c#Q;MN#Aaq2I2&gKAc zb7~mxu+H!r+1Mf5R4J3@+!gyppc(wYL_3r2#omL94 z0{FI06l2prMxIoZSa6v1ba5ddxTIZ!Myr8qC;HayW3J6TH6U&qvEz{Xb!6B8?sYL% zK?*o&hU+n)+vtEY^TYIZu`twAx~%nQ(amNCpWpk4*C3oN%u>9-(P`ARq%DL@CoLFh zzx~k>I>E2D8P(`f^ZQ3v0lIS})a7ZjmXMdg%EH%AXzI%>t$G7H3h?$KJ=(y<^S*^; zpQPlG=Tzwq%`OQT9~-rEd(+q$|3AQQhYnZwSN{Xl_&5&Y->;vmM&y1Bb>*2Cwl55j ziLuRaUXo{G7D-?1%5~IKX3T=cz)%ZX1M)Zd4K3sy=X!(ZYx|mC70vWwJh4n76^mie zwV9Bx-lmGFKWm_@vj4`Akn>q-wp_YOdy|HW5R6YY6m(O%d1xG==q;4=aYskm*$@6e zG}wAhHtVNpwh3OX@tvt}C3qWy2dA;^`_)4%GM)&%8C4W?z9elA8*bKMMjT>rrfpC9)cC=FwetH`W zl~K}A9=7G5PpyZgk6M{r&CK@3;~&Y1Ju~*6C&iYeB)Kb$o>Os0Y!V6s^j0~-ZU;S8 zeM9)iNsv7enorU_RXEgxKN6{Y(^)Efi!@v_`SyiXSbFeO9$#B<^iXye=b;D~IE^!$ zUVVp9gGYvVlzcyst9lTOjc(7bQ&kz!5UVX7|0PGE45TRFZ!jT`aLVPYnHplKVzQkP z_!eb7F?es$wNq(u-@eJh;h}%MM2KbhO^27PU8H!SG*T}&ZF*Pxw0qdHrcyf>RA{g! zlD2bM;Pq3M{yCogpA|plI~Y61VnBnr0@%W3(bePthY)YFF}XrP=vf1I?JwNB%r-i~kk+m_ZNGTh ziBye24_E!~PXvKw2*`6gMv!JB#D2#EZ`9%9tXjpe0jL*qQen48WK1B)7)%6yI~=Gs zmxvouJhKzEqb*9@Gg`r|!2mY?C z00rmW3N~N~C!0aNe{&!7qgnaw7we7z3q4480FU5}%=-cid`d@1{wce}O;(;~w^ft_ zU>n&KPXVLXvL6M{C{NK~56h)Rs0PvJ{Mghi@oOzCb@^R+c4oU>z^s$3?m#mVUY#Jc zok80#oo7f=$|LTC9SlOror6`Y{<40+p-xZ+l- zN1J5@9J!X3a$Es|s{quToroIKnEJ4=iQ5dDUF^<`e$Bf-M33olrBBg)MDFIin^je9 zXNzO$*F-eXc;Js%TPnJr-XX-6A^sFl1ofd<3D_ZdG z)qCpViN<-745NB%3E$8LhOc6?m#{73p?UEqtR;*>9ulgQaAi~}vzuYAhXmL5QkAIq zHi+vS(^z^q(#p<3wUngoFfh8jimg{rqdCXS?p&J>3*|ELF`IzYD;st>rISwv^k3XFQuWQ{|1ErP8xVy{mjuP10)@s}C75kh^7iz$ zMGt(F+E=Uq_)Yo}K7Nx{ML z{7%JD%quntBKjkY#kvl3e-1g@^MoFPO>r=4%HGvJ0lpn7nH+s% zekQ3drGjZ!^}ltkDdFG!3NE=l`LgikTa^C;kiY*QV7>Q|FHh9HjPoDJ&Z$jdQB)R* z+L!+AZdEQmTvzPHt-A0VqO2ds^irz_6d~tT^?Msg+iS#2@Po}``GOB!)U)EOpsc)F z@8OHdJjVfC#Kdbfr4>VTm=@tcsv)E0AyM)=6LB{*Np9u z?x{-2VwRxDFpGHKOuBJ^g4Q2scT5@y9TN7vMHjRWO}uwTncu~A=zO{D^5l@`_FbLH z&~|~>GjXQAgOWm<=gp;)AqU?v`6g2)kD|L?Xh8{H3zsiYu3s$daSz9BsAY9V$U8s1 z&j5Q+2Ij6JxuW=(PB0m3w|2mc4RXHe`I2=XCvEf#xn<-20z;Bmt`i38Q(U%+@jCEn zkEL{9FS%2{P%h9}ro=F|@HU(NbF z`2Ym$E*{kucQsKpr+e~z{H^Oju1%UW4Rx_NbliRyu~G6alfQo>*P(%-&aU^Nb)%Q) zcgXd4pra4)UhBQkJPi=C@@E5B#mgs@}XS$Ye?hkl2Ne!*Vn2XBEMvg3qE87Gd_$_7wkW z8fz>YdZJof&jo%Kk%|bm6G+`SE>9e7a^IOF$$J5 z2+*hdH1=;}u8+`wmVYH1@1CK6VJLI91w%oUQhRJTm znm+d|qfs;GEf-IuYhY7DCDr9B6v*#y{4xHUxCoT#eye445Q@k_fDDv+n&WUqEKuCkP< zzfI&G(@atmR9S!xL_yfe8WPJ-k%X!mZ{2_P0~gqZs%CDhx;cyfIqPFC8P8vryjfw| zc{0u2TiiYC8;Sa-^8(Lj4MfG-2Bp{b9lAJQR(x+$qhbe|7=P`yF^Omgn#@ggrr+%a zgR`sd1Dm*itTZU0Qc-)~u#n20lM7N9tixdD3#&?iU75?S{Xzp$3aCjK)d_LxaB!%S z6`LrJD8{R-|AFUL9)Y6u0N~eK*w@QEJG!VhTrXsxzqbDA$wh}$Jo_Qu7=BPLj}iV% zb7CW);!tH_CID|#eSEdW&#_Y< zZ|+GSevy_BOy7Q0$z_p&R^U|}xVO2nXYR)PHZ?AUH~-ocNuXv8MShxb`H(OYpro-_ zIf~LVa18&q;ZjU>q-34p!vEb?F*-Nqr{jfL(mY@L>qfH0SUc@Ga@PGF-hXgW#7z7B zQ`I@cq^c9tGsop8odaO09i7j*m~C!FQz%!h*%3+v3mF}v|LA%CtdvM^K^3Q zW|H!RebN&e=?}M=%6CL@K6vi7ttsQ@e6A{m6Ho7v8qQVuD4v4R$PAK#Za*mxdObvv9^JpT}?s@+o3QdrAFbW z9%1Hi>keK!7nfv_q1-~W4xEB2CjM0Hj%!p1WVN1Pq(_j!Jpf3qCS z(3wflWn$t@>cv);(;+sX(E&F&dq!tCgZkAF2fOg)skx^W~FndE`}|=@PQL{ z3VS=b{{{)td+aZ>uMy-P1AyedCsmT)B*M=y^)w&(vEssO_tN*1hpD=hH-aFFI+D*f zf|PYS$XdZjy5~2AdQWLJ_|RP#&w~8EuiHRGRrvCim2+Nkq8&GUMG%qno&=y%{$pU9 zx3gb@>r-wTj}6uNBqYc!#Q$dr$gWl@LwI?i^Y`w2R{8zl^VoBxQgFD*Osdv+pNK6;^XG0IL0h4E<}oHep1k}}&y2l8D2#{{7vrM8OX0CH%Vx`C0t)@OTEk`OIkjaw&#n2! z1KPwt|I<@Fe3!BODfaHi;Tz6Ng3)W|rQB37lUnoJ6iUtf{xub3OW%bvbN;X&ThjN8 zHBwI+>ujthin_A?1iQPm87QgNc-gempjugZF!)gE(~E+wgky`pjhF9M3vc|C;wZB& zRJ&B`Ma^{v@ALqn_dlag${qo!M#)i3F$*#wpt2*4Gn^_2Ac?>7%ssSmyrsOIr}V5t zBrP_(gn)v{_h(Uu_rlGSc?m(HklKB{>Wu1tuyEq8BKmmWdQxm)VLrGHdd>(JqKD7Po(Z42UnMRc+uq@yX-zQa_OP5H?k#2#7grqHk6hnF|}AZpGqW z*o7FaCZwn1uMVwluji0og~Fg&Y$WBB(I;fWi(IIdJzh&@HMJf7y?BrAjGa?f?lgo( zM&B^rf?s1m^uS3o76$RqqZ8tP?~R!`=7w=ng=pNzVe7X*+FO+sT%cHzU=C@bK|zC@ zlKxc#=gV&0YD`R`IBC(|=x#tYvc#fd=UJpY)Ym9uZ2*rsHiZ^f;7K(M8g0@1Wj*^3jc6rZ;+jZ{*Uxv|y z!bPssd)y%_Y%q42pXt-_2;6W2#VETzm1rsR)y(`;0ACCEKSpzvVPt|5K*9q?;ariM zM3G;L*z>*jUOj2JLde=Sx?1a3f>WKI$KxoL@x0Nh(^y+8tBco{n5Xuma%=lKiUWbY zGGC2U75J9M+-v=y4dZT3lysqMOv@k~;DH#biWp(SJ3| z93HAtcPBf=8K5oYn40zV{PW>b8vz3I5+d2r*bRTnA!_(R2d7}Qsbztz1EhQu5q6)KfB zB8B5Eqv;UK+r5Uci@c_+yEulfm#;`o>bPBK2Vba#$`1YZDgAb*8h4z<>_)H^1#jR@ zM^9uXmCo!~(5icp7bVDtM+@zjumHbwS4ySIZS7m1Z8<)DG47?O$n}|lT(YkzEAz{b zF0vve5<)(>1}BEfe2+h7XnLD>H{#BuqUwWx8uxB;XzI0aH7x9i0S*;Ev1g_mJ2+qb z&iQTQmUekh7YEB{h!QlN+%V4XiARYE8CAxOh%Ex{Qv3*7Br>uCIC`z>=J2KNa~S*Y z?DmZ-8{X|kZoenA1K%tOy~B!Mmi3)C)mg|_*Mp6;v!4e28ufJH1|+Fhm3K6G83FEE z(1OH!IxgpS@9uzyT9)(Ji0av=|KN4=fAHVFwUij26u5ZOz6uu{j+hAVvKvk@j9Q@{ zywhFp`1rA%;x}C`bn;zg9*RH1?u~zkGi&+^(IKWik6&Ee|6ZN(MNhmtLpY#8cD4`t z%#7)xA)aqC+{LRb*M}F>S47@1IbV+sk1w}+tg~%VU_&YBJ@ zL0?^F4j_MxT7By^4e_OrO=h5#9^Zvu?;`I04}kYLDw6SH;n(hQ3O|xYY`l2yYDuss zX+$49@SV-EU|QdI%+Oy!I2$Ebcj}U07mc4^lI}02=wH7?=73J#-VB^S8od*Hy6Kkz zW{O-YE$NnYAcrxKyB6*i>t6BapqLv1%s=wyP$)W_S(dGj%F6%5E0x_RKWdxLy6qlE z)-F&KHx}G(G!S{-IMZw`IePo9E?GMG`CqJ3Gqsaw=rG9Y%%FYqpsJ)}PDMCa?!BJ` z2srh{1Qz)uQ>pDg2vu;w9-ob`m|$cO@5O_l9!qpqT9|u&n96I5f4BX!ZTPpHxXP^O zKbIQ_LL!sm{omYoen(m)3a)$+epQjciAzLdLW z2{Q{WwZa8j-8167o1T1o0vtP6x9;c3^Vwh%BkHg9i=A~ZV%sALk@1rLaO{8vaSJ3Q zUkS0;=9}T43n-kKmU8Wp&VBPm_>7(V{H(7%!76)h4GxAl z{H14r8{}^lzm*!tzDVn$AGrQ2&VwvE`r0v3np)XFPu+b@K1>ZT%e{uZf~P#6F)zvF z#Aha!l1>$flmFOXD=@YvPdII72KR!aFKL6FnNAU6ry*-7e+(krZZbMuF~4A%EGmd|oM}V=dAVn9B%h)70xX&cbK#Fvqugl4 z40sK=kr+b5u)xz-Awpg1YZlw9$#iIF&8$0mv9Vg3C20g9LcL~Y+|7WrC_2oJMh3kO z8O!VD)+}N4udjSEwac|3T@_95ihgMDkc`IxOV*3dgQp2yCX7}xWLM$T{#e-lK~Cbx z_jAiUGHAt;f>+9L10;Q!VV=Yh-eH7LyjtQKpc$Y_lR?;Ir7wY@pZ{SP^p5lD_TE3X zKXLI{9eu1>q~R`O&BI=rebPie`TnU}x=<9>&%rRq$pJkwLtm;Yy?b%+^;&K@@ckD> zE7z1qWpX*v(~S%JYj!0!BDq6sx(t)A5nsOZ{cHEp-~xFd{llc?@~bKGTgX%X?#ouq zGZ<5^2U#LefW8*#@0Ih7*NFIh8yM%VoPf&D`^DOqmctHKaUX36bxh4V<5cX8?edph zMaE?IWyk;C;=gigd3I6IBq1(qlm6|T-(M(C?fCFzO3e8ji1|<(SAZ25TAzXUH!sCY zinLcyWQ(JG`v?5)VmWi|)dX=FT&U*abO+N{w`8%EnT=jLx1dI7dgF*ZZ9T zK4Rer5vNJL+96YzZluk$t9t>2#+dT{s0w?z0lxdp4JM~-!IhXt6Aq!oh4$&J6S_E6 zB}M~X{v;x&f7hw8M2(H9uZ26JP9vpQm9%cCT*B?V0wPJZ#un&%pAMLr#YcryUP0sg zIGn4&bL_@}udv(>Z$Nk}HAY0!Z%V;3I2tV)lubb*Smx@!lmJ(`U z6r$JI$^blUj5PoAPAOvj93j|E%G#rCnXN`wkV!kDvPvfEm`X`U{ah4d!n6vN_B;bc0gTXHAw*+yemO6^35AgK`JdTZEZm=|3Ur*uGTy8|*Fd5sNhC5!CZ`f=f%j6ka0RPS>~Pua3`a0&bJZ@WiF zH>i_!jJEixJ|h-ctX#-1JQH_4)!}C~oLYEY;eJuK-bpWqB%t7A7BS-C5sECk6G2~g zwHaZ74RP0=mpjwil;jj=qjNsD}EX_-Kyo){^`qp9N$$&sYBbD{Mk0* z8>Qq-`89-@25+QyWH<}F+VUjFz`~j_M02P*kt-lbOC^X}8SCsJSBBl58-LPqx1J6V z+>j?@5j|@uRc({%J3!bawXP*A#ro#<+#X4COt?PVA=x6?cCR0drhHDA-EWGotxwY1 zYbCrd4Vrk?VXj)HwYmC#6rG1Z)&Kj(kG+pAduJSyb!1044he^IY$e;VcUBn@$2s;& z#&N9U*ktx0!ZFG|M?w+G$Y>Zv`u@)EUpS9*zuxz_uICk8o8ajIT>}eYn6!18=%h9M z=m*4uo~`89T{*fM)hn{`gto^xM&8Zhdif%=KW`{16dd*6+&{yGFAJJ0OnvuQ{0Rar=IKYhe&Zr*e- zGycw-Qlq~jXInz+=bH1vGGzZaz15*XJ$Py#!_m_(DLIw6kG@2W1tkPJ{w^SF5Njxj za##DrVDZ@IpHOQ;x5NJc*L11wp0;??yrTNW@xf}2L7-7zHbT}iEP<`8N=H<|(q9bk zXOA(@IsC@ZMc2*XtY~iDAXuJijjDfM593VQSBEPpk%Uc)q`XLSB{HApdR3vHLo{I1 z-sCZ^Pr(%Ka4CyLPIu_hTjtz2>=U=?LyB?!GL(;8`C{dG;hnO zq4(EjE=e_@mVLircBB=1^JUR>1ELv>2=cgVa!511}JNNeS_Vs@!=De>q0NC%KXMWdcAQsQu>rr%S zj3lIJ-FBR{fQLq!z$E|4&Qtvpljs(Unmo(s$tq(ZOBT*#4bc-vo|(^D&dH>I zu^)aTjG=4+Rcv(X-?U`gc?Nw&cW4(|BBG&pm4(v|4O7*jT5eEXW<22lkOH6{zYVT( zed(3OXI1gL%Iw&$WmH7V?~Qk4`GoB8j)F|+P?;8z{i_;^yp zP8!|#T|ZG3D$*A!A6X>Hry(=&?dT!xr()Rn>uEc?w{lyz=jPbO$Ulw^#Vo7K$LQRx zu{%lTO1+qqnp&uBe`$(4@j{^Rwc1lgz=InJRwlRYUuH>GIBE+j@2K-PaFykjd8hMz zrLIveqnO{gNs_+`w8BP}7-I30KLsFLLV?_`7S~Kn1!zNj6}w$y)@WuZH?Yw1 zD*`I=$)U0JSg~TCNCq!t++=W(Cs90Fr|b-mJvz$FaR}0&kh0B_Hc3=7p(sf~hJzR^ z-lUAox9Y+;;t`Lc;acN=_e`R*BX`>1Mkn=nyr^7#*=z7Z&fqICxr`p6uI@Y^83Th;MfcezKBk z`rrg7Gexf)UcM{pJ4{s78>4l|?T*sJ*J+6zqa;1)))IE59YmIGC1sD5E3oJjK|jf3*wxJIo+n-it*Gb}?vaX-S{s z)SoEmDCnyRmhFI1q==8#M&`JA7x~yR_hBEy9S8Vj3C69U35}5Gps$^TYojVPKL}>o z$_Y0wQiDr1i!-VNftqWgqjqy%wO@;fR6zA|BTcMALj=1LUEeSIVmEwBo-eA2ciXpG zOX3BT0R`M-64?BCWK4WJBMe?P|Q|=C38TSwmVZwRjPl{aS^d`F4zg1yQ$o-DWyp zPOf=|n7Be(e>*+7agSHt3f_tbo2>@f;wev@~v4UuCMaGo_GSj&MZ+o#PA;(^i#^xph*K=^hb<$ zFsLt5g}+Hi9DOy*+c$cTGk%zxaU`KE%W6zs;2|m}F1iW-;R(7TkB04sz0DAtXZW&M zso#D#SW7^Mt-GlUqhp_$n4^Aa(CNvV&V^}d;TSww%{9jP9}HL< z_7qyn(LC&%1p{m>M;6%e2MKuYH`f9vnI&v0#FTbfDIVIcQe5)rzLb|Rii$<~wk`X^ z(ndkP`N2w9{azs| zKMVk=o#^1w%x0dpRc}Djr!@S}e@|+C=)P48QA5x1y_GL0jq9J4riR4nL4K-XLUmBo z0{g>hTJ?Q#W|pD^h2BXS+$2GCqk>)^sU*m<3EXA=OJ@HQ8D@6lIE&oiNc`CIWl4sV z@^I3nR7T61Xr?ivmVXEjbQ%SFD$lw>$aK_PV=p({j{1>uPp3RL9|8S0Rj7Ff&wNZ=HVUV*%BNqJJL!FFC`6pvxlNtSw@-h2 zDRBnhn7R-~DP?}qrJH5}{{xJqOw0cY-y7h26%;% zKgLZ-h5rK-_u=p+6S{D2mReIv{5EnFt-Sj9!V0W%hZwf36EE1ok{*-5B%pZP`t##c ztQCCkEn~J3U!XvNXt+&|;2PJfEt-|KxlAayZE{GbG%IhTPu8Jkfl1C(ce4(x)b!tL zl82|je4#ih(~ad%`2;yfrR~tE5Do80?A1FPgWC(Tiq(r#0J);0*)`n|^}R8_63M9r z#8b0+`1O~?uzayko!GaR4wLjB(I^7zOu|(Ie!MTIhzfeHb!eh%&kAG^nXD4=vB-Rj zHvfFLjVvUFXa3^P}O0B}4R* z)sa@H5u3hUmD6B+)FFhd`{jYnj{ZlC17bGfzwX%&b}x4jPvgs2cr!A=9r~_*f|VyJZ=9kqoave1 zdVNXqePG__>z(B#h*Eab5*skyey=M9>Pu`y8TKFy5}xJn zGAtA^84xAVj4gNe*{p@}*`-fP=V1&XQWhKeHjr4DALAm0hPb`cWr_O%D>^A27TGA1C-O^S$BG zc*)U7z`s)I-3Lbd3&iXI1C{poDHC9G%+a+-e#S@u`&qT(iwuh$UDk{2F2S)X2AX(Q z_~JD=P<@!*$-E*(deaRwja{Hec)7p3C6dY~>Zvrf^RTk!9Pe-=t4`XD3IVj{ZqDLi zr9>gR+|3h8kT4Lyb-wuhbjwSK``9qPb#FnFhQF!*XWhHcN%|-L#_Qt^DL1_tXiB;3 zs{T_P){CXam^>yBWxMO6awfkJtBM)ys!s*mUx-h(Sk*?YK0I~`=k^N{D5f+2{_d8` zC0yX=+8;G&su3&i#GwK0%`bIRP?A+$(oKh7LY8?H_D6`{$x)qzH>Co1zG4~hk##Z7 zlddM?4c0y~HRjB3tKJ>g7O-`7bdR#fuB9{kK3~gEnK^_IZFlkuhNieE5$YU`feqport!f8iXKHfOG>cH!4+P z?!S=EWJM*}|9<{f$?_iw5}!Lwqr5O~OF`0I@Qi*lPfGb)uS@1z`CxG{ zhtHBG0gkrQ@Hh(nH{+x;+&!7>breIGZ;_%mnUK&1wi+>#wHQP@QkaWpRsKCN=P z3dfs@-xEr#x^r%Y;>^mUBWmh?O@6BoE-@rP+)<|)qhWaT-9UEH&~!l9|z-9yPfL zCk?xAGI!gScdWu4v5V4P&Q|qOg3hI^S0Mee%J?~mSp=H1Z-W`@aLtx(Sh_rMn=E1v zhj2=^Q+=mrASv+W&OoU(3}--N4gdA0CG4jEsn^<`Go3w+rgUg5Mmv->W21*hQrR3( zTIYOL3)@sn_1LG%G$a}?ez=kxdTcD?E~hX}TNu6mI+Ws%Fx-(+NBrvLUkL9$;hZr& zG?$%K=1gUl`qJ6vfJAe%Jm=jYmUEV%Mr!iOIGPLo=ozPcpw2o(p&0WPVg zVQx>^TkTpxH1Rkue&%or0RoxqM{)$yNjI|c9@-4QkGO2rpcCJHZmFzaX0IcNV*4Qd zoRKaXTxJ)3if7r_Uq2O92$LLas3j?l$2Z*f4{^T}V>_WE*wj*qhfYa)6tD`Ic2NyT ziy+5O%63*#@MeF9%QI$?GlYqnxs^7i1^8BJifp4qt^i<}lBS26?A%kEXsKR6+y#kU zSs(x(EYVqF6775AT7(j+mP(z@zd?Q(czW4@{B!kF^(Xf_>4p=|H%m&_+^LqSveZd% znO@Beu>nA-r#*9xeDU7woNrxk>efjPZ_=bxit)|a$sfi{!F&#JH2Khv$k`Ab_GL08 z&f5lpA3cLlOvDmK%Y;tX(BB z>8pYJNaOgNXjy?xT!p5=*2R2_Jq;wyM{|{T27fK#UeEGUpC6J#~Zt!8h+|T^*%WhbQcc9{2HLG56y{VkH!5Qaj(uDV`cU5C_7-F zuD0Fq4nBkwnigx$$YBbGgdUSpnG(W=e67ub44NSzYt4Ho0Q8i~SQpbOp~|>z&A)_U zmWQ=kzookHmG^@R1+jY=QG<8UJMMAfI3Bx$cTP6&@;9wK%_duOG1CTPT^;*d))c!p z-Ie*VGnL@3$uiaY*JkMKzTHsjLiEwgR0-c9R@TeJ=qkEQZwXBokx6hViF;d)fk7uW z8##lgmJ;%Maf$G9az^jKX5DV(>FIJ*(JL62 z`5)l%W8`{mHGn)WRhs2zTv{ftNxRY0GfjW+(SepJTM2q4xq0Jh^~XU!!)w>_Cy|IP zGaj*fLt3GihzyUsT&S*xRAuZgs{dB$Vru5!>8XpCKTLunz4rxKqwhSC<5<3Uf9%+X ze)-&#>cs}yE_C1)>0=I%K@qu$T=kDsj8Fpp$?a)|1m4bjU>&6cjAO>K_=OU5&p!}o zZuCQ1ZF^@z8Zj8Sz@OVUoYAS$H;kx>W7QArrO3Y=yPC*1>d%DiZbZJjRie^m9Fd?p z41Y??7usBQ_PZJS#rIYFHg8UA$%nayGVW5=#+d?FONg{A9H}YB%V(`&&lM90d{i8v zhjAbakrX#DlAv%YH6|wg)~m*vhqErOe9|G5e;`3aS1W=d0-;NYqt*MT07gu@bCNXN zxuDdIfjHbZ)8?Ms!s`xO62yIf=+}!Vkq>L0<-|CVb0^yMNrE{M8D(k zVl}z8kB}tw!fA_EWjh*wQy`mll{L(_Bkk2bJq!mPx(z$WcJTk#L`}sI#^&Ox7&|ir z912koxize_{RgQ!JydglI+P=wPP9&zob{O8BRyCyezvwVVBTgvh1pkV)1;kiC@Dx9 z7S1;3?uMs+-4b6&`zyB_^*EcdRT*+AFMM*(mSN>IeL;#RCnGF;kgRO`P@8zMX~?d7(P*Pq zbYaM|Q&oUCdF^Q8G_q=+S_iS78X;VD*L^AD=%dMk! z^W(z)f^?^DTlqF{;>emJj1KMQOS@IJ*%?Is8=m8;`nFZtlVdd8b^G@Y+0QYuCq1vd zn3kjJw-^|f5=z?1ePP#e*9-N-z-yohlNP!sMB}h`Kxz80AMdQH3J34~D@;E*J#Ac6 zI;wfvKXW^IIKJqsp{vyJ*BynswUa!=ojDJc5qyKr&erD3&7myAls?*Xk^My3)qw4t zSeB{;DP3w1HJFDg3DAbEguQ$&l@*oE*|*UA)0d8ucdbVXnapLDWf?jR^R)jas_Ni* zWWRz{`uW{kjsHgZ+x&j=D0~t5B~mV+?KS~bTTO3)OW#_4DuMwi4umVwY~&~l4cuw} zf^N7BbTao0{$>ET0Wj)X+jl=Y?&5^MwtF;zYw2|9KcbJ3Nik~p@WwH|Sn>ILZF?aM{-6&hYh}On0XyC#t7#k!z*TGH3k(|~}9Z`5`4j-*6 zJbxGMYqg~8Q!G{xcgMn(X8iUAdD!C?ZyD2loG6$SS}LKM+r?9%L8GauE0_#8JT|_r z4!nMbtNt29um80K=fh9bK_yeA{W)8~*BXM2PsquAmZLD*h(GJB1hwvaDkdu}UEbFX zT~8`bXgvvVgwIeyZH*0EsUbg&0K>M^Na^^ZYe}=5A@VF>H+u~ks&g_K= zVhK53uXP-?9!gEH%$vi5P{GZZ4?D271m=oc&A4xw=yvfLE@4b9r?Zd(R zLBhmL_YVd6x8eZ-BLfJI@-W%RcwT{zf-f;O-=MQO6WshX$#R+slYml)H9#>+7-3g% zU(^rbsf2G*WwSHtvHaNqygZ=TSi5V2EJp+67_$O=0{)Vi_;>UM@Dd3{2LA;YQXpcv zUd5J5^}nAjP6X~cWN+`zDA){fqJbxH+WJ8@bz6rn8#AcpHhhuqnO z1^Bl2;j~3iM4WHhScd2}BDHzjc)r$hG$^jLYifz-`>w~~N)@Yh);ieGRTS{fG6eGN zm+=GAb@HB6NVK}ctfxq4X*2)Z?EC}Y^o)+jg`&Tk97qk_f1jAYa{|f<$yyVwV!sLR z|Mk#2!xlXg55iZkBy+rLEEM_mI+n^2#bKy>K|uJ|9`SIfQBnt>gGXX2Ms94Kxzl&; zAaRZ2lR_S)@AYI|s)QW{hDDc~|Me+3r?d_6Z)cq#Zbqk_U!rho{S$`k;%=l-c_EtR zQqb@8#o9+iM+}>71i&?8a@pF^%a@?K-!z^`LQ;4{ZA8Go!ZK@HGw}(QSqcYa*@+|4 z5BT?Zr4~~9@ou@a`2PS;Nlc10BbuHMLKvqF)LvlP45UiwNrgY+NyQkFRE4t!l9(T)f)3pjY)OJRVXnxIQlsaOm-H7Y^{jg~Ai8!|M zYmapDr)@aZ)J8sfqk_$Z=YYBa5Zn%SXNW5zHP(ojQn!Fpjsq*etULj?JXX;5x7kK~ zw6tVn3CnMJ=?1zR;7*#0-9X6cq~rGqf|)q?n+A&Igv9JW;03j2#!OIHU$i2Z=UDxz zPyxje0Gb9RqxRpi<6`-wI1rQpjpS_1h1*7q8%}D?7}m)&p^WDXFIM+?1qpmxh9>#=y#Yc zR>g1gkF$|}X=ziNnrw5-?YFC{Z{(+}^Lkl4Je6SKRgNiP`D?I4;Vq_5_T)6~+ZZy4 zqpIsW|Lg6AygTTRk{j3Jm20HXYmSCrFh8fobUHc}_HshUAQ0xn)ye_Cyxv?%i@>j1 zC)lrv*JaO-K&T_hU*TA)`i{#v1yS78o!2!flXwkr{h+Gysj^Cx0%#Gyv%}WyuXk&F z<$cHAk3SbKoD$SfhJVkAzrk-^nUshw4}w3LO&HH|edU zTPuA$7)_|QVFLjF3O}h0zY6~0wcQlLxPT4l>Qkw7n@6M3zu@y+gG1tOTGGFa3kus* z+GRgw)+H+nZ~LrdG#B02ewQo!g+|^sS*KJYLi}RWA;UgG=1yETGO52dXy z`%yD;N-z6JsHsHx4Q55}NTHw3+LnNSmFlp!w0UEVTC7jEE0L-rdDiMVAqEuVhM-P) zm{*dQ7?wQR%qEqio;B=i>|G3_c}?>*sZYdh^309MBM&RJHPdyrg(bb1KhXxHWPEfx5fE(9>)?4ng+lip6& z!zUdF7bxatu}krf-QyS0*dlQ!HG=)Et?V^(l+XB^Nq%dPhkE7bdjLh1Fs5ydqNly>GX43VNR|IMzJ~^ zrKvX@=fsiWpN?SYJj1m(c&F3OYum99mhD4IuI~N&gSx91*q(xS3|h;maN)mac7>yY z?pYh{602|Xt-$kN7$?gLXDUbn6^=fu6(@qlAahIsfPo&%7j?7NnrnHn<{S&U`$0Xu z#$Hepb17It*IPbyCFRj4LP)w>w93PUl4yKS)EJ`@>|v(=3j@1BjGocOZ6>?lFSVwDfjm z(G{TvY^z_|P2d{*c=oOiTF?CaA<9K~vTt?(#$*~uV3Z8D*2&YrCLwWmBq5d~U7X+t zdnR_1a6_BKEGGCBXD9jy_apa&n#dElsY!=izxg&&1zRvz+m50ZS zV>{dqRA^K-$IGLgMRi!dD>I>j4g&f5erC{`rNGr`8ioIz8rR*YAnf4%&U^W+A&lY+ z86PdcBEoTVHrcNQ@G`w5{XZ1mE5(V_2CT#9%{fR-bIKeru71K*LK(`kV;Szv=p&h+ zp@nD1CMJ^PHX%yO`66*5x48KB!!e(T_(gu<$LfWhw+#EMrPyG( zXAi|c4llL_#o3xq_quplf@x4o&w9`sWvrK^`GnMOCUPNG?IIY%MZ+bWNB!@*JHV;I z>~A*1#WxL@gtPW7`a3FMB$Z!wteF}%7hZO-^~Dr~@kd9KCVqjJ+4$Q}y5LvNX-r(2BuqH6nb$F^RGb#7^-4)ebtCBnZui9E z-e_u#w-FRkyR6AITpE)2D*j}sH0PQ%&w#P=A_yt=j{by@Z^&}RYA=!UjcS@ky_fcQoC4ZmdK(Zerc3s2 z)lPW+WK#!KRr9oWBJ$y3nIQAwL${T5qQ<9Mq@kKq29& z^G5x3=wf}(WCJoiS($29rW1cJ^vjmOy1R+BV^TVMW9}p#Woji{d|MOA_}Nh0GpP-1 z61GPK-ug#2b}Jz=Z*VTpSuXvqYeMgY_^}$tCS5O#(L9FJ&ULG*8XOS`3LF#LURi2` zCv@iOWg8pOxcyr%Mk@G)^X=JKSZmV&I&2e7TQ&_WuP@<&)xp5ke{Yh$&MhwuQ7wld ziQ2Z;cYd-bPCL1&*l*m{+m}n{B<)aT9Ieg?gfwF*Sw?NV4Cl4HjKERP+(Q^FFa7|+ zxGGi30)x7Qe@d=RkFUj*#k+`4s1c%AJx(vDdNKk>pgsR#A&D>JsV-%tx z-IvMeYXCbxAp^OVr?pm!pD_z>u-ww(byrNHzRZgrIyA`%2tpZgH&U|N5}B$=cU$Rt zkK{;=ABF%PvTJZ;`EQctRse!1|98yF*=t4_8zPs8S-eJ0rqW?YrXYAj`)wUA$6vpUB815tAPq-lUdFD0->-W?c4 z__F32(O+yI+RoE-w=lw0ZAUR{J=rAVI-OR}Mx@@>0Q&bddul9R%BIWwwFxa74Cb7A~#8c#fI#pEBEH+rtPruw^0j;%phLhE> z{u);L^6zo;2A1GXq)_x^3?p6tKS zvVeI!jmWp@*Z0?5(|Qa3v`lfOjnVd*Wcb!_Zfagtdtv3ynw?j&eXqyLn3}!EVFIAAOIor2vHyV*=sPRSwt#b5>}F6Mq+jB826INOrBzT`S4`U+VIj zLp!3Uclvt%zWRo;mAA5a{p}723+*5MrQT^Ko-?7_F^i51kn`nQkgXDWIE33x&+1x~ z5E!pbg}gl5HMWtdQ}gKTWt?THRW3o`gu$cOK- zxG4FlhEhz1rB#F&uBtnSSYr1Rr2feSfvhs$I|)Kqb}4dXJ<9#>{Wrdb0%)&*4XEl= zVteC~S<>*@KdJ8wV4-Kfgih*mDWXgD5sP2?DwhDz&E393fg7U)7Ril!6vR9je4Bb; z2n3kfNt$fP`u9J8puOI8oME$*Jdg=PzwJn}frz=7j{4eH8)oq9a22)?v45KfZgG5I880;+|NP?8yBI zqU0x4)nGjaFLNEOcN3@zG%86ZF4uIv*o*!}jaJ%`6O8INGH4scHEC&jTk^D47V<}+ zKNy~BhVZ_vP_V1U#g+W+V{MOVa_1zPeFUnMPW7<>^M0CDK}E~+ zxUV5)!NhxWIN#5Y#n>Xds=!nHVtuo9f9hSYZf@@R*SZ_uoNf91rTF0D!75hqWKVW0 z%-?J^yOoy|AL(s5r9T4d)MLs5N8z7vunYmfJ-m{T&E+=2xb?U+`j=~$igj&!7D&!! zS&SZE2M!8}*b#gMXN2;S)0e7-JsIepb@2{_hI_-+9n*{WA)-~rMh%nAi4&R+%+7Hm z5t)1Lj>)VFXg=b`9DVms&vu)kvV3EoKm8?@9!V%B=+)%!gYAMc3S%l%XrX6@q=OJ91tX9$w-hEHc>n3 zd>u?Hv(9iq<}D;#7a1n9ix9-KgDXIYbnUHkY)05Cs>*OUA~_Dh*K{LG<-BQyku8y` zX*XCS9b&XPKo!-2XLV+v+0)wxpvU7e850EI3AM7oLlaBApHV{_(bx=^Eg|7UYb!{Y znb3hB3JW!mx?HMOpHOq+4A?1Ub~!G^eS5_EEbv(${<^M=8aky%5@lU>jQNF1e$@hP z1neu^F+{R#S$^DScs_Y@nCJ__-+a0u2)cj2`d?iwUf!98hIcj+{{MkLU6R-ZPvEFs zJKwTPNxj)EB37^<@KHJJ2;7)9B_ANtsNx7qAGux9G}Kzp5Krbz3<%LV0KtsdCe9i; zOu9Z*us3d@>U!M%D^udEmOdH{dQ9eF`(>t-GiLc)lOOD!vTuh|E;W-bAFh6^RrktT zk|8fjrl$Fv2--C}E%RCFaZx~gUdjRpCg-V58)o_|*;*P5OMiWtq4*^Xy7XTx1=74) zvk*k!iMnA^LP-W>(vB3MA31As`Zh+4NTf=ctnqI-WtYAL`^{Pw1NC$gE@A8v|LRw2 z3AL900|c3P`i@pDCgp^g4$!GljJv|3rdJT&*kEaF z`K5OD$SVTKDu7>f<6kRMa+k??VY;zRuOV5rg+69{Zwrh^Nk>J#Nqmh2)pz~;qop~C ztvX_Oc!rk@V%j<5t@1QCn?*9$6@I!WF7mn-&dbHYu5)Neqvk6Y0tv@o!D-%VCks#>C-sIifX!{R~%S(S+9z%gb05hUKv3rL* zk7z6)o(OCbr815T9G4y*1;*_OFdR+**FB0K|PzldImu1o5s|teTm- zZ20=84D%CJjF`Ymit4h+uiV2f`q~;yG6%K!#$N<$(egx?hCqO|J#znp@uWxo0OO;h zGHODikNZxT+*01E2Wfk6hG81aNBj)jpqnA$ct7?ow`^0!E6`gA<8Y0{9rXVBZ$e_- z^A_Qrg_Ij{)*i2i-g=`_03SFEDjl$0PUxi+OU!lFRW9nX12sY&*hxO*r|51< z;Jr@-_5R0CbDcJtai~)h1Pe!y07PcZ4+!P>R0NWPgV#s z@k`WLOy9AwoC?!FVOwfh@!Ni$)hVO;Xu~}dmA7Dw@%GYpK_i6Pn@EufG$UMV&Mb*j zJQFb3pw3d@$mxss+K}f9T*;~otqfXX(@s0`yFlTT`@pnRH z+PF9yet#kQ;R3T0F$>uNYe9L| zyHrhip@(o{f$yL-F*5BmYq=%C{{EvmSHmzP_Ag@|t~JE>&;C=tGKCwCx?f*9@DJ;a z5guJi`?LvlN%O4%K|i;}G}}G83j8o-CS7q&T=19U=}9fc?e<{vhUy+@ST(XEW&d}} zntpU%*I%vofuC;%h7crWr!lB)3R1c31m6AqosvunRX$zx&^WlL3s@eTnlCFL+7&*g z!e61#|EuL?6|Ed6_CEVG(#T+z$rKU58rjrsr>dL*X<%qHLPU~5qw ztt;7($HQ@V|I{-FZaNrV&v^fjtnTqB>*o`&O@JERhr~vn`KIc-)W5w>&aUup>%Ip> zE#4>43ZSl)LTB;jkY%k)l3hfOsb6%Yf4HD2@1}q?VPE5etY89RAJDsdEHVn?%&~=A z-r`~pzsEcMkSTRrS{mmHDlbg|$+ubNzZM|iCt|$C#bT?qbwvDS1C40aDUF zDW7nPePyjRqx8|X7OwWe!Zq{{_tbX~-4)j5NCmz7rWNk)ax zW=+Y!N94<@Ee9LM93~2E_S;Hj*2BO4As;X^^~KCWvS1&QyII&f`r6^Mrqiikkd^yq zvS;Azaa;sD-b_M*^G<^ntIm7N$Gs=*I0^dXu|?85g@A_aM%|xD3Vu`(MduC4_MwR( zH5IGY^d7W{QAA?mb1CaIaG;UE@Yjwt;c}RJmfR*)M@g<@)U;n#vGYkxq}QE6LwCS3 zd~`t7`x$A3UrXXymmjUmql!(P(4hW1A;RnrR#NUO70Z-t-zdye-q;E5;;l?5X;bCN z&l_5V9FAukKF^r1HxP?x#aCT`Y^Ol zigNb-yWF81!Tq|6$EvcCdC04ml2}R#YO>>^$619StN3Q)lg4N|&~B7rn6Z29N}X>w zrp9m8GFtRRrN?VQ5)Pbd@}w=2^}=h#btJpjT+mQluLxh)Ey<3|5Kp?WC!ZTQ8|FUv zkT9yFLqV-=$R=z@3~=9hF_};wiEo0^mu2ULBbW-J1#nHy9!Xh$nHl**AkZC3q7b1; z73d4dlYI5}5YE4}k{I&EQdtGT4XxFo2gZ5hS~I>-bs0m6{8?lRZ_VX7*C4CBp}+wH zZIO0EcTbzDuLnqwwi(Zyzi};Z0pQN(X9M>PzA*(a-eWNo(r+cIG{tytI{Rn!auXkwck%ChcJCmS8+0PpbzP6}sT z?a~-lUXV?C@iGt4)`mR!NtdK9T1BJf_@zMGS7*F#kAP|w$cRQ3JKpP+qRYq5>4X5S z6Sh}zrLU9M_6&zL*Ec)+LESssWn}K>ZR=g;4J+q=Hs)B@%Kn|YDsHp`AdXqJ%Z9OHxyydPj?IW7K+#=)eDv=1<(oQ?= z$$VY-vJ;DjHd$if4MHi0#%_9QNnIl9w`XUM^;z+ZYl40+=8qmJKdYIc36@ozg9yh+X#e7{omMr zFu>>aGy=YoK~y_LF?Mdi9Z<|PxB|LG%&ZJv)Q8oO2EgiGR|0EsU=6TR7rALO;1GD{ zsjCeu_d4=M80W`Aj|#>{{<^%dM>C+&dF>EXc>elk;h?rdUXBsa#QmR6klnyZGBk-2 z9R?;oesx3?mX$5t{}Iu@=>`y)c~eJkBIQwbKJCIYt2_2G5wInNY$_EB13DZZfb6hC zS3TlqOZ z0+e~$^vK04eP<=3>UcAXnDc1u43FgekSftVu`LSP+>L82@OjIjF|+`}b%tkGXO~hp zA6v+i2YK62GEZSW$9Uz+;q~AqZTMdH1 z4PEGWYTbIB5M-x6nx<@yGtjd%F~Q;3;Mf~|VI3QuXoh3^+dsZH>h=1?O7duby0M2e zmorTE$x118-@wz{Jrdl_E%2TrP35GDga0HKhXS?s)1bsou}8qp_KW7Nvr`?4N;fxiiKd30uP@@B=vdt#-GIq`S^ zO`Bu~L!r9xMoJ}uzKmN+ZUJa2`>8MTek(h_-wUyz(+dCBzU%jKILRY+d^Yk}^yXA; z|0}wMlz2bU%|^aMaE}RBo0?1bU{09xW+^79W==YEgu}pk2Xsqztu#eHuKonev_Fm~ z@k9y@-Fd@nbn{Qvz%Id!UQ#%8cv@M^KZ>W_+nwrZ*|{G!k)~Gb!7xWZ`d<6w zckg;bdS_2xgF>tAW0rlGQ{^NcJuX{HdlUr``PSMw`CgN~;df--$77z>yv3KH4Ik5I z)SS>NshJZ1K*c5Ef%jq8ui94z^Pkmysd{Mi#-}ZOoXcg2D!A)?R`QZ)&;$^>9e4FD z+XXD3_hd9v=TD|+o|H<1$E*0I-#aX)Qv`*LEs_@RhtzAKoiyDevABv#ITy-(u+|Y= zGvnYXCwghG7rjGl>Q-?o%&In@j>zHPX!}=K7a|;2* z(spsRHGS)aB&~a*8>?p&xK4JMFUU1P+mL_l$63>T(b+FEuJ!i{H;kln^V^s?!?1|# zo36ey*}+~Bc}?@99dGg96rMc@ysd7k#*pgqD@Z)gPpU|w<%X=^HGzL!o)D{Tm2%?( zz&^{2f`h-tl9wY507{!GvQK@}!!zODf6o}$##b7!-n}~8Y*x!5T`-%~?=JZVa=`K| z8UXe8J0w_xFcrWip14kfVlps}%@n4tjXM5eXfjYYa85-fYq!4AX)J>NS7>iL6sQef zP_X>8?;j%>gB!Z9@nH{!jW^ZN3gvf5@pKFQ?oYYf>sJwcDneB1nM8HwY0St1TPoX< zJK1CuZuNd2Z+{ZAZ|J@n-|5c30)gnqQhA%7cb@MpNTd?|BXnzy)k+>gg#$G`Ocv}OvOHU7ysEh;lToG5Lm2c-md%O%{#T{KY1U6I8ANZDwwFv ze`xB|q=!9?o0mK0j!JQ+$>)JxiG6R<$X(YUH--^3&}BE3ZBpkw z7PdZb#RI5YX#SY&FkMMC0O|%*L%rX%Us5%Z^b-1A?Q-`oWhk8f;sZ^KA~v;XERH#< z+;Egm)Bk%$;8N5MLv-cib77`8HuD%+YCPhD4QEe1aAEKZ;h&EP1p##C9Cy-0uJ#pi z*e+JWAB&rNdb>``djqg}2#;UDKI}9O;gy-N=%^;AMH)+=rB2Rd=>iJmsQO71pnsV# zCGdOyX@yEF;s}l(a@6W zg53&(|2V_WIz$Fps+?>lH?%nP-W;qj{l(1o$g}&=#|hsxkEsW-rRaHy<4^e1N!h)t zT?tlW%-I;9UD^8u#?VzedXT~mTf1$awNlbu$hZ!KK9PdE%#+d=S{fk_OCbrRQ!2@- zw=J6|aN?_&cI&(Kj*y>(X(`2+)7);7;kA$2nqNF<(e64@DwB2SGqC|$@ELXT%|T*f zZc^f{RV2>8yuDpyS3?`TkZjRM(JOAIRK9kBF4Gu#U{TB|Zq{&QGHVLJ<4NokM@EUy zYS&$a`&d$nHBS*9+%nU!`%h@n~47T~xD9#pZdvEOfafJ_YpJ+oPdeoZ=#*q`!jI46kT5_ijs z0)+W$WLq&N_M4S?y=?h*-ZWn@!@|Whjx=$UzMpjdl|W6M9E0^GTB=>n(^dl_lFs!{ zQ6lR?h+G8SFv) zLRUN~mvQFQU_^5%s&yfcf3toq^dyU94ZPqTQeu`)*Wr}SX2AL2sNxJ&B)J5ty3f_v zNHg+JgyXVWfW`{+Yf;bJXQ{kGvRs%*cULC6szpUJ1cbQ^Ey5R3w#l}Awaq=sN_e>J z_xnX@49Pt6pH=*(27kshSa5dXq~g`BYaOzq=C+=_cVP*KcaFw0WQ>UZlnGRVDO;>K366-p%t^p|If9X?*wt(#da zwTq{)Y;Zi*PfNE`pSM5qdYa8~bFI04J+=DD4c^(NQfEc_W`Cn0801T&7T+3Y$lE$X z5UTvcA6Z8EdlI4Yi67tW_Oi{L+LF}}%A%h|Ot$ZH3iqub-dNf&pQ(9kfx6LWo*_la zcg#T~OwNZW1ome`W&vH%^PgUZNgX2KU8gXhv6l3ZYWn^iTk5Gps8@dt`M-}Vq`b`YEy2%v3**XmDI)upAqt9n<-%BIK^<6nH;kjmE{-(p43*~QL{)PfJyS-Ro z@6rscGrcLerx6ix&U>k3=_V5>SZ>W^zsfP?AALF4#>@kke0s+9LM|QM^zIHk6(;&z zTb~sBJX1gohb=euA2;i!_^P7T0bwLrDTKVs{;S=&(te6h@R39Wmc?$BoU%qn<-n4M zlz8_c?_@jf{NK71d6^_lcY_n&2$$B86&NC!gBqXbmd88082{Y$o&i=hHs=h>v)K>U z-+zG5(i&q8ug;NrON(7+xGtP%%wgcw799$xy(U#Cv%aTLE!iZ2jzdx|Mi@Hxauf8> z_EHtiUppK0;2lUZ!4%@%+F^v5*!}$_GDq4Y)i=pH)j@`X3R919HJj%4i=Z9cdq~5Z zu8WW|;t>_uvS2nIlUmXv;l08OohJt5+Yfn)QJCsOOMGNRV_up3@jS|i;N&cj}G6c&vk4l)XJ(zLO zcp+Q-0K19O^D50zU!{DrEKW8NnD@O!d90w@o05k2+OqD&P=dS?Y^3$gx1J*&5J)faI`pK5i#UD8Y0GBVQiCXBAC2fid~Y zuOIEtVNx1Kon>0;q;f3Hcb8W?gU-X;-vyB$c02C%_6U1}y%u@X{hqy;l8Hf{F7>ln zq%b$y2n4d76#n3|ce9=-)6R`&yu{PJbDb%M#x0X&TQ78OKNIDq_emoJm4Tz^4}U|3 zAgC;jZi)K({^^E25qbOoGQ2@vjKIMoEw}B_WlrCzo-`kE=g;iD2${5)0k0Bu{?Xs( zS!KlMnfvC4De8H>X~ju5;?65y1F}~6TA?P!U_Peq$6d#JQR1IVK2PY->R=UUw_B7* zv!}*RT@TH2HsR5F-!6jv>ef+3RwYt1ufqK4oBFpWEfY27T}gx9k!@Gx$jN=YR~liX z+W2ywp%M)Zcu%xQ_XYLuX`bTly^e_259QgbMp!jD+h=%g$fz_duNb?!S#fiscs7@C zv?q17soK??N&mkoab#7RFN7Z??49nf^GC4f{T<(W(`MFLPTDd(Zhx%x%`=^J#-V8? zgS{G~I}P@y@^`P$X?p%KogqV)S*Z=gP_MwK^;5J#P^GTE1@Nsstglz;0FGL_ta-Qu zhcOwzC<_yWHwRdiW(T@5NVsWnslnoLjO2k5-oc);L4_US?72!zAiS`ibtc(rHC6i_ zZt_nJ$?d&>u^W8yP?Nrp!DR_J>OFW*mdShC*Z#6+G49H@l;VvTp+!vUBX+PYvhJnr zn0}5vxEWrFBueK7lcff^O0K(XEZuF>L9F%#^enxVjQO-OXOv{~2QaH~d7_uRlD5`V z`>>K3Fgig=;N_q;*K-lTid}r3iI~4l{liJ6BC$b;9 zA2eqI@iN@mU!NaYa4(eGeUvUkA=dZF#BGKoT@Bdok#pD`oaoHwr@f1RR~)B~m#W8* z=7byTQPaN-Dt*B1;_+M>9A0P(bS}QE!D(fG>NBLNdvaMW*Ck{#3er0!iK`XnCj0Hq zwa;b_2W!)STW)j^oU5K`ak(c5^FRYm)eEe$fKP|-$JifF@)~$k^^)%G>#0s#EOZTI zETm`Avr1+Dz*MW=<+jyZ)iRiO$qH`}%ETmZ`b9X6;HPCmxs`rarONjXyZHsS zt!{$(|48qoDx}>`QjaA7R1;uY#V2h_KwWU`3jd#J2^ns5Ve(rn$0#SyPW7`w2_nrq z3@A@Z9Jbul+0-qlxW|BtvX=|#4tBXXIq#DOHvDY`8YDA3JH=WbEa57YM-C7=j4`dG z`a|;+=^cIL;`41KUnWIa{BFLB3CA0}T<)g$4`8PL4tWd3b6!rLwr7XIkp7rINytU? zhGU%qV+csr(4P=8c5jkH%!GC>F;t8p9_z;a8zQ!mOa3#I9Hy->gg$I8myl5UcS>({ zu7r)vRUR2V&@~!U8W{@E(bvfSu!2My`1jv<#(!Dly%6cvF+X;WS&E}J110o$;=gAM z^LImS56{oB4fTk0eFtLTb?tq#Fgr*r&@z#Y!gfU{&BHvL;vFh66kSn58Sp0zM=o=# zcdDD*$^pr4n?G4KiP#0TLc4B4%wy?u^uS;=%yFciJIe0>8U!%_shtxS4M^-miKco% z!416leC9QbIh{DwF-H2zq6=|>rwGHfb8OTMogAxWHC2XMsrLo0hDAn|e*GK^v6a;l z|8R1*mBM(K;{a}+sCqq(xYN(Fyjl>?w&33OX<`-Wx(IS2tjiOK-RbD9x&%p@ayiRejpthD~Wg*vOcqy0FQLEm! z^3jXoC`7~fZTHGHw#_zOgKn|Zs_jw>m!##LwhfVE&>~^Rq=ocp7R^rvgoRH?Z>d=n zSGo5~IsM9lg!!!Y!C_j4R{$jLmK*PW`D}VZHt}50_N_?*V&nA2dbnG+ zltQof7Xuf5x#sGnXyoHMHu`((ds!|4A3Sj%K2ZgOcoQi^qC2kV8Jqd%+Qb#&bAC%x zUva2my6AGIDMoxAE@D}LO@;)3k{t3``bo#)^t`{!{hUBQ@h~|;gS@hTx$DjtRc>-$V! z(b3d|M>>*kH^F!&s>L1NNwtXb_C!>?<1%v!7p_(mqE`5K8q{B&eylYJdf@@C^x+sC zCPX3~nZ^u36q5T>oaJ2xf2I0#o~F6cLhf`;cmDn;Z~}((lQ9$zx~HjrPP|vv2WGa+ zh30yN;1n|9RLXL+Pq4>6#h@me@?{{B0Tw}YdAu(_< zx{8BH|E26b?ACoK(SA0zcUV&hhVxcFYWUrGGr|7$pz)v_a)cA)zEglc(&5%j7Y>&n zD>lLk~9)wmggf1EaC(;NTGOPjy2cal*f9Lp8n2V%)rPuYkc zQ0DBVT7(&yonh&>L$4O6ZE~otK&6GG8|iP0l}A=^Y+5aP!MI7XqHJjOF-5Ngnh5BX z>pjXh&iX=*Ud5N)^6=?Z{u7O(nhlI}*-5c{hYOn2Cd((wg}Pb3ySJ`W$jn31FAtZu zh)r8F-KGL&9me$}g0E+s>MW7yqQ=nP8oM7g>Jb?k-}ih@Y9C;>!-oB~A4fm|u5ZpZ zx`toWy>;yVW>+7OF*X4>`C2>mf>V64olPt0Ymq{A-xlLX%%KYZ(}OQ8i#dJwU9v0x z%@^y1+I;_apA&)0Kz+n%lwBhe_5FjrOWx?+eD-x|ewe(XYJ^9a6(Vk#$HkUV3n6{xnwA($sl$`_TI0 zklTLzC{{?87vL>p&qHR6KK+H(8eh`l;QZz3{2miW+=>TQd|T#tsQno1XkE5x2#Wr` zYisYoU>~VW-auU)jH_0#9Qa&#n{rH*xGnqb@O~RG08Wx$09G#q^rlHH1n5Fcv z`-L`;YA@!xM_EnYhK(_}szS{dAZf^y!&<#^EY8S~q7Si>PGi~!pf^50sU{H4b}QkT zxSRNMpjN1?U+zUO7PGn;YqsddCc}wB+3kHK7LnqSYCmmxk6`KOX~_kFRqv|NH8MKw zH`{NyYpFo~ACnS-`T)0%O<+#8HTwmbtrUTk4zb|J!_IxUO1bp+?dTHiEv}@hfPjzG zpKi6~bO5+`k?Sl14+zBUl*tEP7Z-o&d@}DM9!DWSY7(cVyOYoxn)uu-W?e&DkCMk#c$Rl zhO1r!|GADw|487ociEhS`cqKkEPW}WP!Yat?5qQNo>4w39 z-s%G17GkNM{s$oDP&3mS0&e95#j$Mq40SS}Q+3vmtL!MWVNqZl`N0wljjXpy&SlQ&ccO zF^5ZdM5^nB8dA>e!JZ?`2$VA(h~6%tq^IS$6o6`M_OYN#?%t`8DdGX@!AFw4Siod1;5JEGX@kDmb3eYj!re< z;_cC$WQS0rHq{vu`b1OcZZkIf@#MOPFuop5?0J)`?`7%vd#12LC}r=GWh0qAA^{pZ zn74_&%4;2LZ0V!R7ubf}4-*uwiW3xl&G8yvuyG*D!v zpfj5iEY16_knZgOHz%mgUD5?P!hL(+FhcWmCHF3{(RK$n?&6L&d#S000DxvInE-d` zK7@Ah@DQPtmKD%L>F)thS|dUv7!R^2sjslwYFQ-w-EdiZ?wdia>ZlW_s!fZoE-bwd313Wj|EjEkC$xiNkanDa$ z5z=h8j+0m4lr$cDF3r&I)JItOX;k1ci|y4?to&{?p|zz~WK* zgfTCb(LDG`nggq?ss-2WtAL_}qO==)`K#m`RiC&VPaKCUdEz8fH--5=0jdn@HZKlE ziJYe6S?_TZD~KQs-tTpC!g|@cpKAbt5KC3hT;J5dQEp!GQ9s;_pP~F4(s4!3ofKgB zvy~aB@gvlaO5UL|jJpuW^X+#RS9O2~SALF#H1?zMsu^f4Km9#PrBFbg{oBlX0(U@I zG>Bwzgl19F0Pm+J35LJQ;{HT6U;pjj~lvB(U-(rGeCGU-`6Sc{TpHu-%-7?@X6J&&ia8s^dUMIGN=G$fpC#vLRM-ieNQ9 z7*(UiHT$?IjlyV#zT)a$d*{fRw@~`hVv;FWS4O_+6X_Y*onUdUr!X2#d~<`-yX1HV zh-?h}ygHjQIdODIv)lI$(uZ;T9m9T0^^N?C$W(Dy z9&>8gOjAGk1r+0{d?l=l;|$?gTY7s^m$jEAqcp5s7d!kz_ua^VxAbbZF)&4{ks69) z?B$|m=+cvUBeVT{_Z-h_qd^V2hBMnfwfhD=%+*2u6TQJWZ}}k)?nKjQ9v^t=@7dWbLLl=hoZjiksG|1xw7lNcQ$q0$G-@7$o}&`B#;jl&cu<%yhtO6*X;dp{snSYf$AFJ^x5xQ3|&2Ht)#>?eOc1)fPa*@vr5|K^dBH)Si+K(m8F$5 zmeTROI>S)%Yz1!%e#|mO`~w7Hg(E0I~gWxwN3)Fnx(UJUj)CjleX`@`7SC$p(^d2Zu_LL zE(Jn%QI4~{C!T2EyRwTBrruX*77|RKD$W6$_U|P7z9gJ#ym#2^XSyhN5HEU@Z+|f& z$6hu`Bck4Spv&&_^+9$fY*IrMtnETizw4Q9z-|~DGT%g*>TEvC@tDl#q**@I|7`lA zTgBGFI@zfovbjg3AJ}|W_fjl+Y^&Q=K9Cc=kG&KuB{@zcS<^(Cz|8I5808d@`Mg_b zMUCv+%H-7agjK%@_P|&Q2q~2OtdN%{uQ7ynGSvI+Z(!JW_CAcksMVkQ6>@ZKj1O}V z)J@gzcl|}c*}qzUHVTMk!Cb>-x(Sj46(@z$+CYSOU?f~T`#pyQl$@74{e$=MO#DDB zvb!TgB5fntZuI-QeSE@k!zWUO*fO zVuyjaiGXZ_k-ECzHBx+IhO2X*{XSVK9!Tz!K`npF`gLe-_UKP>crj}GN~5$J>3+JJ ztxoXmi)KmNS1WBLxlu=ggya`*bi4Q6WoN}Lyi`Y)e%Wz+ODm%O_rzWKr3D9VV1OR> z^S(wbH9>1Ax|X$<|CN$j(e*-e?vhRY)2kdHjFFVS%>$b(DS1KuU^lzCmS}1CYx{m| zi-McNXS?=yVS9P_@o@4M3&pO0+oAbF^Q}4h*=)JA^}E$UoSf(N`*eHJBwX4hUO+(3 zL~|WpvHCPsVWFk&-ZLfdqHGIzF`-Ki{*KMuQH|y7?u0#qqksNqnK7{YjO?C9R$n63 zqnO$Hv+yad$^p#u^Y5K$f#>fl-@9xIp!@173KII~>N9?}NXW!5qLUnd zQ2-R$&?DgNTL|4#%HUD(Ioq`EXQN;(w?q!9MbwJLVlR4BBxjBe#q2hA!tCAM$Rn*$&`{?0 zfj;B;RcTH#fAl?(o_9WK=LnLNxk>uep=r+R_Y$`DNTM<-b|B@ku3G=zN5O`v%1W$@ z12M;{Acf^yNPpMvm!R42)T;5(CMT8_%p+9A`m6EfV@X3(rT+nFr>lJZDY;sIK zZIp^mjQY;7#`q@{MeHFV@EU#`Vt`a7@N1VC*yUUE8SONkHO0YvaUMTFhDfnr*UayP z1O`;DZzM=E*X0l87B{z&$Uc-&yUT&C-45>ibU373b;~w?gkW$nC=ky4n)`x{R@5ah zXwRIoVIQ;m!cY&sueK3q%;vHCFqpL)UzlSsa%I=nu-r|qlHU6~qIZOY;{fIvM9j2b zy8qqo*gc_=LHZ;|k(x2~KR`KF_UkkyC!f=?dr~-CnKb~iR(Wg!Pma}j%|b@eDm>42 z{#h$L!s;sdPcGjn7w_Y5Rg44AvZSg7qF{mWGlmCM&2^|=dL;XV!)&utA2+u+5;@+b zHO$c`ge|wy3y#Y~>*$H}jxI+Oq?qoTVT+t2Xi>0&+0e9j)@;L}I9aGb^tog6 zA`c5vpWM==4?vPoa%NqolK4jADNB*B+}wQ$iT?mp{~+QIG)lQdj_j@bzCn-!w)J37 zAW)0%V>K;z-8(mbk^?gf6W+gmdD%}$4w1Jy+A;EvB$_1x(M#CIFt#DvGcpYQ%!ix( zG8|a6W?o0=Eq(J&JRvsi;u>Crn<{9EQA9NB7*E?WrfH(l>u-awViuIJLNd9xxT|8$bgKA(lY0o zJmQ#SgqUVF@?~md5L)64-rOahw~wGlOSZP)02Ibapnc&t@KMQXs~*#8Wj_oDSR7Ic z2QAJ(_sdl>awAF7|88&vcEMD(4eAv$Jin7ariF5@hcpbiGrv5zn1K6KlDe_D&^K{q zdOi=ef3UMU!7gr1I?A=ZwOvF&1=m=4Ef?g6Sg|##4RWrnzNvV91Z=2!uUnH>8CZ}Z z`-KpFgi32H-LP^@1X7>KoJ#c;PR4dsO>AGh;I@fH>>EaI9>Sbg8%91?8yYbgr~Em; zXdrPktTg9+Tdg`HUDlEezQLnIirc|$N!`d znAlfWIDh;|hR={=k1FShxRy(}V^*JRp6g=WlR~R*bEqRw& zRfdKqnd81=(z9g{Ng|@mCGO-eD0}p>T$r<4usOF`2-C5ohb=0$J3#6O`KC(FT?L5V zP1lkc@&t6vrw$7yg~9E)y=3##4U^3N4!hKc!?!_ z+|g2(o@a8tp@GgRh=*NH@8aR!`9hl)kItw>4(Y5kQQ_S|@wO{fzyY^OS}^c?4( zd%f|@I-7TlUi2XaCtYx~Z(nAfV0IFT+T97OF?H`bGRCW+e}%%i#=jzbSO$(a4xC6=DT?iyGzn80B9YJEvLMr&-SNJ1?bZr(Z>{_c6Pu%pfPUJ|w)%Bf zD$eBu8FGJ=BJvSjS}jMoV+MXNkr1ty;`Fu%=%;8sG+yI~bQ)8&vWf`K*f*@s zm+Ew<{U#jc9~}5>qe_o0-}B&~KSYD^3=!(^ZjTH=JF(s9E3e}B@K`ThsyCoxsq^8( z#;Ewae(S}i_rXPVES;CNg7dE7vdq-nj0TM@&QtUBm32iY6EejNA<)3xjzK#U1aBl) z$0y?}o@s1NsS^3opgZa{F^Gutpn+}^E@-%TJ)K=4oy3ydClv$VLJ<1DoW53`o?Nvv z4jfk|#eK28^a+-H+hW8_F7?3_J@G(!um`+Hz6oCUzo%;%u8={T0}_*inXesqC%sU& zPQ4*L4)et#9rgM~8Va}i7YA~P;d%1jtM$m%DauEukxJ_rTkDrqdB3MOU3h<}Oo}ii zs_orAo~43dCtlCh99SZ$Y^^F?v!oE~2}f2f?GmoTQLh7rlE1v&GfA*u{p?s(4x^O_ z2$UJLw)(6n(PtOeAp#pj%|tE`Xxs9Km?l^&T|!1LwnF5!yY}$s;(3jDY#5}`X-$P5A5_*a#5n9h!bNjFp znqlvda!hMlADSmMp^ZiZOHxj?Z&s~0TUo2jfiLu5ktQeUxxsmUk%=W*blhoLbivH% zgrZ14OU#4JI%yev@I8XP#`;Ml@}tyZxE~)LF+Om2Y(TMDOy3YzWpUrL;kaEed6({&V_H z!9nugWz4e}5|^adwys$< z=I=kd6TVJtiYY&9Wt=kB9ZV5buKUDMJc~IGTt@^j&w8TF+pHx>Uc~U7+JOz7ua>!u z#VdzyB!>`dBM9_ji193|h)WQ(zFXK)2ZWAXaN?4w!#D6)(Uk1rb~F^d>>SU1uv88S zi#;q2I6%SzRgsLqU3U6-^nwL=+5L&o3@W4 z2}H0`lRKc1x~G$ce_A`Iu`cX5XYG?(y;pkp$tTsm^OTZb`&5fuu90$_>Z6=x)xCqv z-*m~XXba@Jd}jBk*Lf%N54A4DD_KTVr(H+h%>!%yz12-Vqe$nR;yFUXUFF!9Voix< zNcV$Odw>WPs2K-w*0DqwQT>@#>B|wV1E-1g-b_&ZmX`d`E>GSVXbVbnus}ku))uFs z8{|=ckuwc*%Uq_E{QzQo$a1eOLF=as67eE4XZ;3uM{>3Z&>Jg*&=&6?oDdrmvdW|V zU4bJ^vhY_B_#o|P=;ltWVMJy97#XXUl9^w(9mPwv_ioX@y~N8gq?HLH|6kJ5fS=1z zEK6f_!{HdQK8}C$MPA6@mjiR*Da>JgQ0TZg2OX9!Qu+9DFS zdl1o(=IR{Qbl(}y{d%>fVd^j3`;o!RIDVteS$9k|W<58CTbm^stSQT=*#IAU)Yj$! z#QgAne}9kPv!eDlehJE%P2i3BRZ{L)ch#Sv9h-chMNS4?=%3vlwN1%;a}}FSTv) zMLv6CMjS>|{{44q@$4s!CMjmR>5UV&lRQ1CrxVg-Hb>1Xs^|vP%@Xy(pulRHw|!*7 z$XMG#kVlAYnQabuCrdTwiAP<02sx00EY5@ly1$v*AvZgCVGj9&aBvGaG|{meu5nmu zUW-FX%2B+jlC{c!P^V-DBu!FZl&7bEHmh{Fz)L97*T$`^7bZ7~nDUNH31di&cy0#; zPcvF-!s}DHep&lB>upI5=v3~@=?Lu2swK%1i32M+MNyly{PDqW)^`b~5 zYWTs2=Jsrt;JjQEZO4KM74)uM`wROo={76;QnOhRJ*#|3xh5_(HeWgPy@8A0I@?;4&W=nO&4Utct9~;p#an}bb zc`#}w-|mUV_4^IogiHdBY^5{sa>XDQkhfd6oh6e*VBT0UZ75A)T?Mi5MG09_WbtPC z)c++|+xGWU%FY_qjAgkxrFR?ZE|?4!=+D|wY~PouNmv&Z3v|=B*(c=?_k#(`F`B@8OqW z_FVpY9!jV8QL|ZodPSs>2~87$`zj~as}3nu6qL3wb1Ke;PcO0+7Vyr?=(Kf0Yc$6} z*08t3#>>W-R2vCV=RVDD+flp=bi%bk&S5tYQc=4I14cuz0s$7d2so->CM&rg;qlZy*j<+SR@`Wn zjh9uBg4X>u#nl!E<#NHe*?_ubXWe1Lg)X$d$4U8t!^&FR2@Hb6czA3#)y>Uv=%=FL*|uFi7I-dm}wkJ@}2d?5aXnjEIF1UoIh3J zTB_+Fo{Msb(#?0zts;lW>3>5uN?U1LpQTEAg!@jG{sbpvI$Gzw8+vo6!)279KNzyT z{mX&rh?1c=BYeVRayAzyxcK@M{|R?s{OnR+q^pfUq3QX(L5&430cPId_cZRsZ@d|4o6V1X_3+p@t;aK zkoph+1HM!6yDr}u;SK$^2XrXhPySCrSMgSvm$%bU_(T_BAvIrx^Upf zKmPm~p-_i0DS!Pv`MX5d`iq*N%U_ZxtFiFKfw+ue-e#-1gS;0^)w-Y3Mb|%7SNiol z_QLM-KAEJizmr$F>c(Fi(0kR;p=>Srcwc3e&0d-w9P_6#@^2y5Jt8#gkJQub?fdcl z^gTn#QcUdme0H6|7S-xaGA9Et})xIguXbqol7sI_6fsOq!HSO$2XMI z%Q-VFmE$|oR}65LEbHSM1ikyghT!yBVewo1=8C=qoA1BWczHsO9^@GK$2FqvPyKD> zbPx8T!C2wK)bdL-r4)>f85QP_P#H;KzZ^fy7eQ^w>=q>j-W7l+p8L+r z1l5;s9n*P(EUVXm#QJdZ$be^!irK^ir;L|WrGn`gEUm3bk19+Igz$L~klw^3 z54iPJ!CwocOo?lAGUObRA@27!k>zuaa4J`qS4Q`3?%?E#egQPDs&t&6*)oR=2Mp?> zoH#)pc=0@c1MX?_^@BF5Zn)^Wgg^DB>b&kbRydgcAPqq)dgdZbsW@TJQn;(dWvc&! zs2Y7RCAnir%$jF>8OkL#pT?)fR|az(4YGBTC1dTx-|grMd}hja3^=eLm&h)-{n)2- zt+0HCHg{<8Q0pk`sWi;WmpIgS@9+RFnPm9a!AK-}9Yg_<^X#_6bshW>)P`-)g99jn zyfL8os+@;af%i(D0ve8e=s0za?A`HOycm>WdoxFxn1U5%wY=EDzUSFhMc8YND-yvF z%#Tj-LL-4@A4ubSr4?=l$pjat@5nJ=PnP0_h~sIjhu(jH16@NVVu*``Xn)CHn6y2A zAVjEJj-hhK!s=ucYdmPWJV&9uUg8n&zEX;z%5aiZ)|4lE!zJYTjPn30Y#gsIu*t@d zqZ#Ar;1tsUckP&5B;Qn>L9{fDLI&LS$sDyN(qly;D5~S`!EW)m@t_BRx6L~y6_v_4 z7>*Xxztg-8%d>?Mg^s22w<@=7ljQU6*ttBuO$O%o?2z$|NEitmC+GKPdXvLJ@{=B-FppCTNj7)WM!aUCHe=g7I}8OhCBH??Z!YNhZQjJ@9aLD{7rG( z>j zF=+TLqrd^y0jW^Z1YK+z@9$_l&hTKmEg-GP2L_vLBPT8*ZSi$C?jvE1ibBxg8vZeJ(QC_O=JCGxte_ahLCD+3?=hRUtRsJg zGAn?Xrn@ilG!|D|mL<#Ywv(xSHnsaB*3t+ha$WW(Ap{eN1V4%OYnDzd==i+&l=3hQ}QXsuzV`s?YT5H6DZ1D?@&uq$`Hg8DsQ*beX@_t*mV)BehY>*#db^&J-_XXXC;TKtyW}Nc8%7sMFsgg`$AK-=N#Cf^(KIO*R zh&MC0nsY1rDc&P?*54}ow82xkWV7Ov(>;UzguFER_Qh+stJ8Dwp72T=QX+i-1XL1` z(k6-p^t1_Ye=KA}ucE1I1(T_eYwf}n#!6L?0q0r7pG-EORoU4dMMfx*K_=BT#W(528xe%1yd%w1gq~Kyu-^f2Cj#38`^|7<>0I8`x=KE1o zdY%58Ww#Y2#7y|DoJ2!P?_w++v#GfFyw_>ZE3bgss$!q0iuh+S(oygvzum=r_)$VB?x$Z9x?+~(pt>NMx&Xzg%@~RB zvg}YEF%QMJ75}n|Hvmxq_)gKik6!s)GkKQ31amB9+H~H~Q^ks9J&!FEkraRM*vQ@|w&~=#a8+(rNbS@b# zP+_h4y7>f{t=htudpL11{_V!GZeT8l-)pdpQwTo(mlVGNVPH2R0pg)}S_}3oEPK3t zF`}h(P)KyTNu{vRWHD`|NF)CdNLSdSjoI`nf3*Tw`=zkV43i{kv=!kh+DqYR@V8w; zRpmp_n{VJWgv%72BTfdIdm47?Uo>R49Yq+He zA30Wr+hS!oGCjHf0a^_|e|{JhvGrGZ;ZD4;7Ut8ILkZ%uL4J%uaAZ;lZGsW-EUpJ{ zFuB%$8Mws$N_YHWNYxxy4%9*?xLXk$lOR*PMQ)hroO!H=zP>icYLtfl6GTTweX?ej zkgiBeBPu>WugW;OAOB%Tr7b6K`&78_WkpZux&&!5*%|p0DY1+{(M^13_%WNENh6P~ z)Dyv8V!ph$<~gpeWHz`}kra`0C)c!f2@1DdlJFnncww=uvS0k%ucKV{u%ThIc%pWm zMsSm=J&KF*bJ?=|1|3l@#QKPPrzS2vxBpBRgVDd!B{4yP&2cyU_#Z$Nw3Fp=x;S?K z-k(j#_%EIiP=I;t`@0*`gY~~}Qz>M~$`cnC3KMP*gq7TEru_arM2A~!{srkP6h2-_ z2kcX5x0B)l`+;RNo=>G2b|%OA{sSc8-~QE|cPLRc3WLYS`Uxs6{wu6tJR0%I@b|}Z zk*UaM*wt4U_GP(!h{(rSvl=ynQ}IfZ)kq~(bA}Jxt5B8RY+f5@3fh0UC%S2o9d<+9 z_jv$S&816KT)!{l?=)MPd^oy+N>Ptg*S*LF44?3h9w5oBzH%&>I0p95Mq;Q>drEhd zDc)|mG5qP7Cx89(eG!PHBxE(#!{-yuu|vG>07`A7OxHvX&zd8pA&cUnM^Y}QRqWq@ zQ0`o}wYpMzMOHD4e_)Tyx3-)~akah%su-b}K<=505Fj$TwT?z6AxnB5{-Aeo#OHS; z?2$M9dg6vw6eG=mGi_!3U; zm2)p=^-O1@XC+m82q)+R1O`nK5gJ>v&| zwSxI$7mLL6;R#Pr_PeY)2F-xN=`_)a9OYl0qKiVx+_z3Jg^bqGcVcE^LzOn=$nBQ* zXo>q-xfukmZpemHk2@kukW@E2SPD|*8Hb+iG{tFBB1FPRjZL9pYL92(M(mg zO(SDP#w9k47kK5+vohOP{f4xIVc2t0z6@KeBwYWvexLn;<@lOU5~M_M_hSe~Zyky0xjB~a>7ng-b;=;J8Xk|?o z+2+Vwo>Gk~1**%WpCJ7uc%KKFdCF6MU2&uPTS2u`p;e)**>mcK&+Uo#H_aWns9?53 z=UK$zSbBGA-4SWIAD$3gymiDWhE}*L#FHGC;Y-+PD_6%J?zn%?QS(!#S+5I^lKa*e znz5fgoh$R*)JcB&uBN##aChJ8iMrDQUN5>{8gQ9`|B=VOr@acOjRtt+^#{}dG$t$-%I$I#!#7_*R;xL<5t ztYh#K(PqUEi|^=}sE7+{;&gl$=6&(qgaK8d0St~>btN`RlQQFF!|zs zZ!6BH#=XK};`JEgS3GIN`+(uQ`7Ku+$P+8yuI@x6f55zuSMXD)sDqxXix74=e^uv> z6>yT~QG~o`hu?zy9GlhSKPk!+GKI7Um2RH}QI3OlcLt=s6iC&({9+5x>-+;uQm$}{ zaG9=8cB7x6-$yEm_~7qw2TPVMjBx|>e-qjs%;Y1?w|r#|Fja}djfle&orS_)9x;F$ zUv(MYV0x2>x2_caIU^}iSRpW!TlAtKfb;mqO%;?bS$f*gS!$~Akg}JUXmsBj)qZMbR(ov=F{OPg~HEQ-+#~&KYv{oK1SHv>OFws&2zWpLPHY;nA5(v0VF|U|{@z3hP$UZR5%sBi`l&GjF*d%1bkM?KF4wjjHw5uNCGNAi z6hX!1=xw&yUE3XoR%^;bnuKR)zeN^;lt_6q8n~ z;|#9sGu{@vD}KW!bBrJlp{qWXF>-XXR9wDA_WioRx2LpvzF1*+!#iJ4Au3TiS)(Pc zyU!a4jV}7>L3uJ#ZvsLU?NWE`130Bf&TEg&s2Dn=rB6%vkG+}Gq8@7=#(F#oRa*l= z`2MIb;HXjHEt$|~dfXS9b~YmH$&1WO+UXZ8}V3e-Yw-(gVr zQ?VQ|yLP>4MMS>`zKEKRbxPjB>vQIUpk!7QYyvc!W~SAjdI0EIUQlF=v!8(GYMfXDl`gpWNI*X47QsrhS$Fx4GE zhDsY&8!78t{U_ioNco$q`X`52&6n6F-L*I_Pn8*rUxsvlRy875=(&tEjYx14<|&vrn*}f^}bO}23n|d zeis}{!B+Zu2)<5mf}QHKu?>lmqj<~|R|28lBJ+hup7*;;lmbiihWksa!-D`MBpi4k z9rTE>6;78?$LkLb$ikm&_?=TeGoUgv3e-|qj+%jw1)so`)B)-3BH*L*Q)WVwG5$}U1yWJ0%8C$(<{jKz*Qs{ge8;#{N?#`}b!SVoBY3-do-v>L zY;Ebelrr4nKLGX^ZaK?&JcShLTE}DJr4=4W@RFtb{^7#jfi?|#XnK?WonhojMyI40THJ?Cl2B7~aavl+sfU&z_hKdLcefpcA zMOYsjq38;^0-^LFm_AT$Li>#3h8&T6z_AQzWbk3DsDkemDI*nxRhuHN&s=@cqhoro@S8L)wH)EOX7 zO#Kf)mn)|al$~i_BN3!;*R+d%SX-`y{e(1e)g?HoWH3h+f!?x4Ng_4-QO>0!iA$>t zMp9yFXOeg_7?p}?un*6eb-;${T-Tq5{Qj(9;YN)+r^ec!_cYl9LK-biv8>?c@L_EZ>oW$}CV}o1S!G4>VxMd&9j0Wk-O`fIXrO5fyF%dW6 z3rjIGe%cSKSvdjreqlVI5cVE<*XgA=cbD`yOPUlvZn-Rl#TUX%^bv?5PafebEaS74 zd781!BTBZF8w8mapJrxln*97AN!wDIKF5u(O=-9-EvfPCv{=i4S z04!2o4?ym>9Bt7=i`A@~At>@ciDsXD0LuDaq~}%c<4rcH22&*Hd{Sn#cQ(GRa3H_ zm%rBvXNt2tThWIJgJ3b!O5~)nGY;R?yEH|RTf73#1LA*W;E0l-BTcdsFil|mq3sGQuoh(mzh z<)=2;t&R~6=LF|O@rp$fjVqxG|4zTO+De+Pupxv6Wumcj29x1t;;_N0xY7GfHwE#* z7l!#MzMhcd^&?)IS7xYW-h)=wFIseh zC|-w%oru4q5%=DTfA&auekNA}5uz7l?USrLFZaweebyuY#Zhw!_TRk4g~MRs=fq8& zRhTbd?0Gcq;lvAz+zTHWlg*v zS3G?(=;zl6N28aAmg&2(wmT2}RJC8}(S(8>#mrk~Ta(v;jsem-o>*h=rl26INebl4 z97AHr%HeRk!2S8lj?57`Ce4I+3ZRzu+uCo|u>txxumWlNZ1Fkp^)wv|yY8$A?$NQ8 zdOHpEDXk{=M#Qk`l63=?6|w|q9BreGbm?K@Qk`IUH1|drazLJ?bw1Aa< zQ?BmP^qZw{C~{L2kKW%+ef-`EkO&anx8(3g0no*MuA$C0DU)Gx0gqkSMYBxE18lnM z=TVz)wG|dPmO&Oo_7_B%eXQW^SW}qdBdTj0_Q2#7n*gCl7TqQ5hFlhvx`&zkdI*&> zmk$#bR^-CnGsQ2czRU`o05HC9NdoUVOoroX&kqoIo72EPxq_C?XHpGPu@67~wNexh zy^Y)Mc=~IyKb4cHu-$i94U1a%UWwl_ASqfFKD3N-FR$KH%BSY~87&xOA{~CWt z^k_SMY@^rK{kW2Dt%rRp<$G!sD%9P4_g7nl?uQ&WEUJ>4JG59=05!Q#G5A$hI^^5 z%F~M)j*I0x(L=fWr&Jq6l7U6Cx+Tkx?~JFob!U)6taKzfI0E6cVFAsp+MHT_>mHx& zOO}%N#otRl0P_q!E!76_5CYD>%azD}9nLqWp5_e>{0E@dKH?M}xp7WqjrOScW^nos z`As;mW#yx6tm;B_9T;aX-Yl}v=={mJLDt{{k3wmG!I3kmf)dL!$pCGFG@yeeky=$L z(ewEiKl#a`Q-lr~D0<2&*MWLTif2|M)>HZcadslxQ6NMdb`;LNh^uP~9d%0BCoUCi z+*%t~9{`i;Pk6B7wMV6{HP(HsI2I~|+TP|ce0LrSzkTAG1arR?QG=|a8jf5o;_Hs+ z} zHNp{mF|HeqBD`s1`eb2OtJUmrmOOPzX#pa4^rl7lT0X7UR^o_{1lO#=(aEdrq=!vo zxJm|AB+33D+$%&jkyD&+T=L@XkJzp#bul|Oh&e?a;20Gv#4E&5>s-lsS?X8xr7Vps znNMF68E*1Nod+b^d|mY?TrQVwXlFH(_@faTFuE2MAc_gE83M2;FO&2TzZ?nUjT?$I zqmTha>jocctMq7C!njKre5g34nFW8w6iP@IJpLyNmUbKWZ4!38XS5{cs}V<#ZrC52 z8l6O0{V@qFyqpmBih`mDx1pWYPO+lzU{=)^a>8Q1c_v|tm=_*3Ce9}{Y&=U%yA34~ zS~ZycGU?4jD3{H0kAqgl@rjkq`&SuVKLORvPc3(K9!`22Ju*bVCBf>uo^>Q)r55r! z(YUy|h&v6B**hkUA+JUWO;X-p@elv?;vqsz4PDF4rTG!@(|GL{tq8LTExm3WPKe}s z9=Ly5I$cQdTrC>1j*7M3a_TTq#Zp@l3{&xZ=w(R9HwNj#>kE=!MH{|hs2Cn2QtCI8OQfcuZNHSCMk z8;FQ`18ZBJeJ`zojPlIJQ}(&CQ;`d!X#%0)N}VeI0UAgR&3FmhDx~NuW;sVSu_i2# zeh)#}CA|EjfD*Otn8?OOXj$3TmF3~}NKh2|fUyl(;4Y7xmO_1-aMgK&^5(UR!)EXz zyka_n$EvCGQ=lvNsp!_)kv9qYLk8QHBPHEdVmM(rbUgT=9(PknVw0BB{^h-h@B1Da zH!J&*;pFrV?>7(B5o6zM+kE%UE0o<6do=qPvwa4?%+=j1zF@1kJ~ryeF?f&UIX93O z(+cdE2*eo%@n@;mh(m@)DvTq&nSnZlYbsX9vYjpPo3n7F?%&sg1G#wE0%16MOV{v-%A??m9R$P7YB8Uhc*(RPBfq4r-eeaDlYWXL;U zhpr#-hFC`Qn+X1|8#KZF1hoe6mxHt;V`iZ{j{S##`+1~m1KENmR6t~uRS}C_HL^)+ zV#R{li((Z>k35^qnw__p7a-q~KtQeBQP#OP7ToXvkrB7#poiddJj^SFoQucoAFS(7 zsdrj)fb-w?Rp{`4-0icvOE^*r-Y8!!$lDV%AzNM6D$OKQbEj@8{(zodbr>tD#YVPr zcv)da^G#GMTa)fz)<0pRzOw7hSu{x7rl!$dBr6S?( zI$I}KAyFGZzzsWQuhs#!qR^a?aCk#QW-MTRL*Ql}x_#1?JdT7bKWK;0^ySX~3=+jA z#C#jlTLvQ?%P)^?h+miwbdjJE-1jFbozURs!dN%oM{&jTBz70R)G!wXr~T}9NqVnP z#_<#qc}nw@`}UB|&WS?uFMKOa$J+i+t@>gj{vkK(Bm#23H<_;esH&*W)NLmH6(Rn!*LPkxd>xAStj*PO`H@s_F7?TuQBswRmWB#<~Oc7a&i6%F0)f8LE3IM6i|2=hhX{o#O84pLvZ#4gOOz> zc3h(3Z3fa7s|N&8Q^yBDYxZd^wN1^|3aC_>;18uNz;&c zN)_(g{i=lQvRBie6XFW*4T{Z=& zk$ieQ_NBB0SEwua_bawQ}t6H(QYNmj%SmUss2iIWC_5GOnHQV#n2PJIjCTY|j zU9}kZcWmDp!GFg`{sZJ?Anml38P9Cyq>3l**GsS1?O_6QUvvpIR>belG0U`N#(U6a z4pFV~w~dFM)!2KY{Y4Yv2hQ=9d8P-(E~3}Nd3-Qw#-g5G<+{iOu@uza@E_z;@M?8@ z!&?GcK_GrGNMQ;j8~(+r6{%AdHF10(!;yWm5NrfLsM-pwMgNj(9zC}yYQ%8JKO8Kj#{u5Gf@ap;&5yvJGBP!I@jpRUpQ!G-Df3@7UZMM z>%Lw{1Y^Jx?I3Zz3Y*uNcbHdb@U&Y7Ay+!eY15*4mC|U*iVXXk zAj~o&pAYIf%d1nB+=_6JwR~;0`nslz9|_b4I0=IR_D`>_hv#|A#oEbQK=TA0TuK5? ziG&&OiTQ&I)V?_`5v=@Eq^#0+Qdbzs|H>{7O??kVP`e#!(5K?n%1V%1F7v}4EF|#( z+D6EWR|%Qt4rGhyY3s^Ox6W&XJgGUgE?t5RM(yT_IQB zrXUJr{Cr8mFtUJ|ZwE<~E-($nFsh43-tO}2+?ZJp{1e}3H{dtHqpG^u)(a8jUPA*; zXvSkL_*m~c50Zl9r#2MO{d+>&kOG5!{*{9;s-i|GND{P-SzV*>%wM`U4&k~85@HdC z9sW3$;W>1%G4biCO#c-&(UIcWDz3bS(@a5@`Cjo&+E6?(D)#~=vdnpW2K8$`o{$~P zT*+bA8=>%zc-!SE!62U{JsI%f*F5{<_2Z*99TEak6`9j9X{!L4k6)H1`PZJo)ia}^ z$9aXlpTT%QVSY8m--;Q_(wV?0uAzpMf-kE7-OJbVU6jBia9eL|ce1?~>F7!GxFbeP z2hv1%aOD{uyz#GIg3xGs+B|f+!j5ZPUjr?}h0$mRX0gFy5Dxo*TCmzHlcDz5 z)mQU^Gg&)kWbkYQbdRt=$4?WRbfK12(N~b$JsKjh%Z7GFOi+wSc@^02H;A#;mx%Ge zshM@Ht08D-K3HZ5G{PAq+Df)KITqA4vR-iCfiL{Agz0Fl7lj_SYv}h+Z>bMvUzl7i z)6I15Dreq`IJFEoWhjgQp#}i%9Zvjw-{&@b?QoMK;D+6cMKid@xpb$8EZe9jX*DIe zY)XYr6txN=-{3vHSJu#$h)+`XV=tf$6_*+A6@i>+=?^L65qY9G2*+U$6}(@Wq#3*n z0{Wtr)<}!`6+vwJKVQ+A1Qru^+Fa&ZK_doP0KTMoR8B4McS8MWfQvhkk$0sdB1J>& zu%JFmjZ!%h6+iUOr!YuI9w)Ely6a*+pd=;GYE?6o z^jXQMART-8r@VWO#a`!3Ez71Aqk|n}jHeiu)p_wAjng5|l5dcLFYYdc#P=18f@-`t zV;b%e*34dUyr~erF9Jmvkmfg<3^?rx7GdvY?7^&AWNV`X{r3#TpH`wAkBu`4SI1S6 zX*)LOdI2)S1bJqml|-`FaqzFvuWv<56%Jo5Ye-bAq>+(#8h2pGS)E1)Wc*PGgR?5r z`n}8oH7I7J-nw=WUn#)wdGWD$_9*vIRs2KI*`JF5I=gn8G26R>N%Kq@N4oP%?O>(h zcZHt}5~{is8ql>u_qzp3f+5kx!~{~&g14Eomi4;te}IP(Bkc|Ge!mq6g&c2~z`O`A z0HpwGFz`;A#wLB?Qy_}gT99jC@t$+-?1rkialXk1tE}Vk*tO5DnX&f%v1HnD6|G^U zap$M>av`Q+V7=6CK62^s251q`aU`y{2+~dwHmww8Zv1?qGU7dfKmmt764*D#zIvpS zqeofw=Vq3UT|`oUQd&Wd>sci`XVYX~G4deKf-Ap0Yek$NVhJahEox(L7DR>*iX_EE zYaO3Qg!s+FGVZS_&=8P_gI-#!Uldp3jIX`jATeeV=CZ0Qoe&Mm@X zdm_~Sx1KePGhHgfk)RGWaOkgsg*ejCiuC}@4en(24m<0dBN6ODn@74rHKwMCZ3Rr9 z;=1OtBB?)N!fWeyFobP^Q@UQmmpqb{(T3D#2C?C52Iw&5`Pj+Ve&y0X!+l>E>hb?O zm?i!h-GeiDI~Bi4(lxqnnKj>H{ZNquT^L&aX$Hz}dQn^Fq8CzYzIHkm$fh{8PvGF& z^hs8)ogP6eQw;y=LsieLPJrX{QrUaIiLvw(S-wf&HDu}Yy=18!8OO6y4Q*>O)H_ zW#H0MR#`%eFlp^lgP2A6laZ)*A7?7F1tQAMVhSTs^_K7=X&xa4I2Cc$Wbe84NDjLY z*{It(J8E(N;jwhB)pz2($9e>imP8HBHFz$o58csoRf`Fh<;%2oH@P7>G=FzCGMV$G zs!fULjE@8Nf$Fl>B|Uim-@6~-4-n1}Fj`Vjb!rql5qJOaS6?&P(6A|TnH9hHPxzTs zMKW<}Ywq!7g(bTeI5YokZWue9sAVS8d%@2+w)(w-1AqrPf%wLL>+;Ga?3sif{>39X zct1UJi2X`SV{S03)i4ie7M%62#q&ymuM512^(+@vwI(g<#otva)29y3Bm}-Kv!p&= zUX{KWYbn+nSwgL*9sdUq&m9$^hDzV#a7Rsd^kjrf(TnQ!Q`e=%Y`36aG@~Eu^UbhB*~;%JFA>m7(|@EE^iW5MH>upZdh zdv`@(7x;cbMSa`TEnn)dW1AkUEfT%?LjVuH1P^`1(n;^UFu`QD@A-#tlN+g0-%97e z-hC18yPi}RF5DaKWKv}mPW#)j?Y^D%oI428r2rj{>l+xHjpg{Nw0+D|`MMhj;ltqq z`Glzjz(Q>h;Uv=(h$!9(83!4lO9*SFU+SeI+J55*Rbv7}yWMSrvXllGm z<&)-{8^n+qLWL(rlo(1-hwd@6aQ_GB5UB$D_KJ}AP0riswe#sUMmoP~WqG*)Q8=DN zE)^$@aN#uZ-F4Msr%j=XAe+J1b?THvY33%NlnRaG4p94{l*FK^@0q0_=^o-Gw6s~E zJavI`<5>hL{W(s?!(Ixavua!WlWOR5;BKnSeZZy~W|A`A7tOLdoL~r0u|kkuyxWjD_pWX7_n+<4c`? zFOwW=D?W?U5?2a76-LZ zlgEk2+ukXLkgqM2K6fqJPx&cI#ir1=jVqstx;>DuPkD&UG-o@u^?y~z1XA84r*QU$ z757s9-TW|hyWccM^5LSsK6Tb$+*;~~PO7z!($BGHR!gyR*{obRlJD`lj$oQkT=8c% zjeqrKcUA8ykC&0AO=pXp1gA#-fvevZ?PECptiM8(qjkn4_sPk4$0P!nW9b6V zEHj@1B*JbirMl?suXq&d_;(2+Slhq0LW1S+v4o}_Icl}jlVrGQ6BB37qFLiwb9irQUa z`FdU%F0x}j$d;I zj*@clR6j-U4mBG#QV-T+2Um{}u{+a1FhCbjkP9x|E295wBj6YZcCbGp$dWnp^ngG# z<`OSL-M#-Wh%^(-9`g$5DT>?G?G3s00SbJffJ_NT z6`;r^S=VW@5xV@%K5BqRn!Z{#(Xx6oqnvSW7KIW&lDV%M*z92Dro$0fOZiy`DTjNk zgk#QRCd9}xXlO|8X~#|kwd;P+`kP-vROW#QvsA2+Bx#(ERQ8}N`IUu`o?xB|mf$jc zbL}t|d!{Sv#Y<-RvjI^6;-%IMPROjBB|k_hV#2heK@E6x7qbP~q;w$60f1qdmFkQb z1nSe|FZ9PJV02K`@)8H^o4E>0`SC{$pH0lVeI)d&xP;?;SdAn$A^d1&&emwa4Z-_Y zee%HKA&Yu`DjZWHAzg9s2lOO(Xe(!&tMDO~Cqm3wqOoE=A@dy#LI+WKC^Lef8Wl+U zh-J59bI!a&b0BO|a$Z;c_9z87&a7Hlz?vnIkl6$xxd@Z7qmq4&c`T%JU8N2b49eEW z?%Y_4z5fiFt3o(iyApLZC|oWj)F*G`jcj7Z(Jj$9YqVHzy{jl&3a_v2C-|3`BJc-+ zUfm?dm*AWozW^JwmE@${(KJhT$=h-{=?C> zchy{9{6KRl%uA53Q|qlo?>~IQV6W57dxQ@n!By9Oh9=SFXbO?82ysyPS�#xGDS3a~ON|BEVnc%DxEReie|3kB($kbmtB9zadU&u>4N zL_>l^%Xbf51bl}TWi@EzLIM63R_vC^tSs(#;`aW?Ra$X2)TT1X4=G@6iFdGjYK1QU z$8yn39`{mmx>vvyN@4Lqdev|B-ZzFX@*wp>wDkrzNG^0jRZnb#W#!iyCW8PInil$y zwV2Q{{+~>JH-6A#y%^E==?O z=WJi7&?HzXHbpF+?x(g+LFkDTq>r&v?flbh+6L)eQjDhg%`wdXi}nxY#YN!^;$d;G zZ7pR++u&A`HQRc#VQG7@ChC?xc{hq%WDE1emvsL*2-(>)ARh-&$!e^0VwZMr{+u_znf(%QAlc6)gM7;4n+p zhRA%T2*PY+1~Y2ecCL374l$h-U2jClDDlU$po=}@H=AG_I>7hqKdqurGr1kGO`bjS% zaj9?kDS`BLxnPt~tcSp~1Mt1aPtS6fHi6u+*oT0t(klD5SL$^>)WohB3v(v=8h4{f-%J1buLgEJHEV^V&^r5q^QW50`}Z`nJM-QWrv7GwgAf4Jnd5 zqb4AHst0z*k%|AL$p(02eXIE+Ij4|(!y=a)61*=*o>OD0S-Yb?Kw^M9HSKX2Ao}*m zu2s}7mq!^5aBAoknkgS$FjKdk%aNnjuGld?6_BR&eq$z1Xl$HPc31$-)z%|ef4jr|7aM!TgypEW1@ zN@J)P$VUH%xoUcknY=QLt^pls#`)@S5MWieUye(|!J;@LPs~zAeVa*-9+t;imL-%q zYr}cNd6r7+XBf##6EM31PfJ69@Mg$&tN>t`H+q-Lm|XP{SuMM<~b^l$? zL^$-VCJN0sC6n@)^2b*%;ZjqG0L8DW@*ObAiKm16c&nJ0P2H%ztdbI#V?toxi2$uWUT8m!Ejs{B&7goj2`A zS?#i2t2}XGX5oxQbGtMJq&u*X=Mp#nxR zi}RDyWC2DA9U)}ty>F)eW(pHtFCU#Cbe3=6gVRFaw*#8%^oAXQ?j@=+YIcscU-JgxAJWrEZ5&`g`}f23|vr-^-x&BH_sLH zJ{;6_LViq6IJBdg%|6*on|I-3-F(*WMR8s?|GYJa=93e_Yj!6rtWlHKOlB-iRQ!1!QP<+U z&bJR5^T;p6h_OP}DWL>%N?06Uic@cb(cRbaL}rroY8M5~b<@|ZFAuVuD8EZeTjL#k zekW87c=?YO*yvX4C<`wlGGAZpth!&cr6S^3*93lQgQk~PJ>x3Ikve|LPkCfvR|_9!a_qF0k_ce&5`W1vUFyoszi_LNVA*?aVr3A6_4No0Q}-Ks`@W{{ zo0MBE(hqBmsOCTFtF;diV}|z|PAB3TzMlyYUD@9%?)+$AFG9}pF?wcZ=9y6NEwSV+(sH8*xI|QE+Zw!i)k%94hC>N=_6xEQs@`2@6;Xvp zBFPic;z?9&0s+iX(;D7}?E|uIGJS-zw1LR{uTP(=HUqjG9$8=Gyodw};5z{nRoNd-{s969 zWYH!$J^^~`^BTD;KCJ6;OYs#L#1l>T2Z;u%M;h-M(MPN6hzNQh zC4?o1mf*x%m=i--^X%J@jyHmx0oO+8P<6S<^RBNwzqT{Vr(k)H40lW@R*MJH4!D%` zs-AAKQ(hoB5_C;8hVKsdSmxP`spa`99~LN{XB3KMbh}Lw@t4cj*QD#P^(jtXpvsie z%}FWeSSJnBOb4}H^o5U)Q7eX45R3iENUuv=ysxVi)5y;|7;%cgL)#aS{z*bsQjW6z z3|$Bx(B^Q1)v0sf2j`h-T-u=qBV~^X2mz`S+f3lnB$jfs*ce9jAZ+m#NB!wJI_j!A zQ^A?-!jEFFGS%}dIbCU`$iEzMK~KBZmb+RQX4X;V0*yrLM+AT(1<5?-Lj;_9VexD8 z4Pp>)ygwuvHpK(7p-I%&pKIc=;Kox6PzOPR|JI;lFNFih)bz-fs>f~;ufkR&#ZXx8ANKO-Bf1|ILH+j<`$?RZQmlp!>RUMh-NQX> z^^vc0LxmOC&QXJDSsNx}pI^*pS0(=Rw*R!hfAB)@{IDT;EN$NAuK}xuZaq=M=7r)d zcnRgt>;UCWPPEK4$(@!ImHQmL&1F&=Q!&WV@U^fyM=gWJ3HHLvFAFJnzUyG1yZ^ha z^oevyz|%S=lwD{B2qFILJ8lBOk;BV{Dg>#_WE(4dsXtCwt@74iwoBx?vGnzRg3E^Ia4T;m(4VSGW>0x z0tM&v6pp5Qco@VL9YaZYV*1QXCX3TOWTOy{z;a(3n--lHbsU?00KG@Dk|{w!uN~e; z?bo_HT>t{tdIUpyAEb;nnGX~VK1mnc5sgpHUjBiz)@Ox%P+XQ{fJD`*tUITc&7M&| zNq_^QH@uyC-xF{v->+}Pt@^fl(N&!s& zHnvg^%AVpjxgUu~EX_Wo!#!jhMvD0lSkz|~8L|n0W(U-}$}LT;(Bh|}XweQSh;Y8{ z;yg2`058+7gKs8Ok+mhAAru74_?y@as0ww&o0gqI#vxIspGmoa1>OcW`YO&TsmzKi zc+=YY*MAWMrs%Lqq>F9Ya63}U;)V1xBx38S6WZz_JU~w%Ktw{@$Thn#Km^AYJoFI< zf3C^7)1#F!c+yGSDA$GEEJ;VUC@$BzM8O!&C}Pfm22ZEOf|~L2S>%s>3g!x!Ukq6l zFIE^>%B!X!y%P8c42$SyV^#Pn-&~>Zu~w6~UCC9Q1;tAaZoOmc_U^I4Ldw(Bli*>M#0O*}y43=rky??To?=%0H-}m#A?!hPe^y{-i9w+oT)RRs&w3b^KD0wY*}@TV7lmBC zL-Dr10lyyNYAj$>Tjhe-jck;tQi$&%Bv&=v#{x#n$`N>su+Ra2kYx@XT0TC6vc^ts zC_6Gk#!5SG=p(2%*^Y-kV&CY9+<%csi4`O$(@1$Dunp1#mJ$^z2L3CQ^b(6Jlyt5k z9QQWAHX-Xx+wW#t#7!!*3xEGR^aq!AD9#s<{1)!T=5{?1e#KQE{0;dvXWV6$F2ndq ziH*mgqA*!9C*XYvs>0;ktlR=;UE*-w%Kw*GX>0wlCN0L|&ChjMpBMTcA!S@jTMo*@ z0xBrqQ79v8Yti&9A%h~m3l7R#!)!O~h)fKRZj+RFYM|&Od60BJ#@Z6Jmed#|{EA&+ zv_JSC;pMSF<1nx^gSaS}gQq~ERq4fuxU3K0U;8t%TjfeBO0V?NUv(D*v1j1)3xAsmHk@y{=dyPcm@J=Q1w7+fu(; z*_XM!ue?X1Vs73&S?gb|85f5}?J*jcZ@r8x+Eo&JtVZIJyh#`*BKa-?FH@J$BwWxXBZRMtRWy&@PadAT@FP+_lChZ|N-z}A zG;-uszUQ!rpLR&HF8|lF3XqR5r3AO$@%WdAKAOJ zQ4Q8ss{4(d6(@2d38(dI{c|;YEA&2iox2$|pY-TDPJ3m5i5ctskI!M2Bj#EQso ztS6VXJ=au^7V@e4XX60IWW=<-KQbp|cGZ5EGbYz5nB#{K#Q~43m~i6-qkv~4eZhuB z@u$BqC+O^OR;wW|u_7$0Wx1&qY}u~jgg@NG@W%pNG6k|8M|Xj`S%bfPGqud95hiiN zk$ABZ6F9ar@bHs#Y++O|^a){4spn_E;V!m&GXnyT^v5cI11g*#+8>NU&29SpXV|Y_ zVTGE@G>D5__Fdo-IrRBIyLpK&=lw6c93Sz`qLy55-ag;@?qg$qq}zVuy^QpSWdZ-r)y zMfu?F$sJJbnC)DL-n6%|0Opl#dn^fiRsi{qvIT?odjmO=!)93oeE=|XQhA0Ua%)TX zqP%tWXY*#!S==DhcYaQi!-rf(o4heHAz>8<^Y-Pyq!21hEaX*uOM^*w>ImSc#>9a# zyZopj_cMc%@13)>P%*k<2|FRV6eoLzgm7bm#^OHb1OEpKfS+IMYHir4tEEj6y13`1 zbKh;yFVCyvzR9LlBD8E51KkL(A@t92rA3&e2kNd*x;r2_Kau8YP<&Bx~ z13rta^y0K-OtxK^am(xeV4s>EtndYXdh3H4V8lhkF^q2wKcJdK9$wg1WlCWg6+bXl25i-HgBe>!f9TB`$m;T zj1cI{%jM^sPM_iP%*QBku$;bon1DZ+5denrY9LR5Fk(9af)Ya(MX3WXCLZ4zuW;ZL4?%`M7@wjQk zVg~|ZtrwXxvRVY@xVkKjcM5*TnMRK!9}b8)2g#Q1h~=&$Xo2Ahju31eJK5yd{{Z`k z(2BXnzfFK?>LP>RYlp_ft0rzao4jt5dYmxL4SpOi3#edCc=QH^sq@nrs!k=93wb?? zVr*Vk-QRaMiX#M9Z%_JL^E5fsd+^_*8Us>T~-*>TL5J3unk>wv$DwSr<(u-+^h5NDo9zG zB1(Nx<1ksaQtulGwq8+~ypz*Y0Xt@d*8oyZn~p6KNRma#BxpPXE{SnF?gUc)a(z8) z5T;7f`|pB<%8@IDFgYJ;NyysIgEWyM#0er|j^y{u-!2E@^e4#`aNN>5@)J;a%IK}uVVY>aV1`TY%Cs8%WUZYM z+%zmlLe)GRjZ5+vQQ(P)d)^I*gu&c5RJ#UY-tu8rrLOh~$4haU()2D%$qg^#5at2T z+DR+WJgB&$z<)1k(otm>SEWvglfPvVy)F#E^^N%O(zic86-fkEUh8w=aCr$7)cU1O zS{rwAlwIkO*u+}Z-0HfTUt>bHI?rqyM@+98S@+ELvt@5YJ|>R-A&mO!ANOd)w=!v# zS&j1ha5+;KBap5jR!Nt-JJ-S1d%bY&?NUh6pNW>LODR^UwYqUH zTHv$f3{jDoMjaBv~)b@6j`R} zXLo3*e^JY64WOG((m#=;?-8c~;CaePT&BBDc zDjc4$!Y1dN?@ySt*+mZNJ-&|G(ZfiJoJc}$YHaeA|F$ucpQZxEp}`x-!OTZU zIuGOy$60Bl<$X?q7~43bdnSu&C=xLr#`U1ux*zG3nL7HUz}@qUg`k{N-|CW~@4XiT zBBU=DB&|c`DuJEg@$VsADaTL){N4VblkBqOk^cVe@}iaO+?{qqK#?aC9CP~aN9UMX zs5F`5Cy#a*?y#h$_W}e<^|iV1*p&lCLUEEh!(CXM2OL6PpFILJv|We}{M$;-S;k8J z?Vo5%%DW;va>>ec0~BCluzy4xFomV_lzSVECI-un?&$3p!LrZ);^7gWN4F{sh+IZ^ z%CTZq5HqI$s>c@W$vNk!|50=nZcX-YA0CYE8r{u6rAEg_k8*>JR_T~@3W(A%8U%SJ z;3yd*q)SPqrH3LQARq{Whyp4I@4Me$u=_Z6-`}{d>vNtwfG-(GuqQt+EYv7yMPlYA zqE}29@SDP>7|hn+N`Y;6wM$Za-n^N~VA(k&+c(tQ&2@6vMC6?^wT~%WChe#x-z#UE z>81xe2N^> zhg3UC?&|nYHTd6-A$g}}Bzir5wz1oe&1V>=@fE2vhclLDg&2eUiQ*Cuv#(DFAKEEp z-c#HhcjmjkjdiCe7XsH(?QHJ#!3@<$>5dTWi{IOoMB|rNcMI5zmp*$G^OpqMpDv9S zfv40i66l8lmuy}HR0r#P9AJOAbh< z*R+Pq%rUJSXMC5LXgM=>8x%gm$7Y(JtC&4v$5?Y0&J_A2OLgJUJ7`WfzLL=S-{5>6 zMSyWjzhC@B;Ep7p2-2GV*p^D_Kv@qm8B&^jNbU`7880@rhL;}tCCZc7+}cWyYga09 zzZ=p<0fUFKvV{#d0St_fDjyK}o!6*6H?JNI(%)ja{Q z-(PJU1NFC^!ovLZ%EtEg@@@MkDT&{gYq;;6!YiP^n5p}V$l^!tc#5pRC}Jf;Kq{GX zO(j8fe40I8S$R@E=+TKmc#S;&F_fGaQmoa9CqjyB#U@;bxhyW->UBb4a9Bz z_GM6*D83^ja+iFmb}6b3s;)9ZtGik`xQE=d9z+`#j;_)Km?q?qsD+E@p$=X{zgM|H z)0l+tZ9d^*0=}wa@DropPg#cU{g!C(XEUwlH)uMVPk;$NUJVe$?veZLYYB=&*+c~n zKd)?VJF7r0_z_x2|C+uuI;V>`syk(-sCNogZ@$fBKKj5%a;G}3AA{Kzy(f+TY4qmP zlO+|_h$V52g;v%AwaQvXqc6}r&aC~dv@M?Volb)tiqa%w^Wks&@e>$Dg@&0Yq-~ z(S2ElZ|_YW(3TIkPsraiDF=+LW8nf7hg>JQODNMxU<4Ig=-|90TR?d!Sis)H zvC&+~LcBPX?n*Yg(kWwriV`3YWY2ZpRQoWg|Nj6Y5Y{(m>G8$N@yT8vUnw=bubq2( z(=cg6fE2!a@iKb$i88{TA7alhFz_1lU2cEg^ zzv2DQabH#5Q@%3^ZEV&%6^Of4_sk{z$$be6%?%70d2yR)r*L^ePQ%=nU2oQO@z8;A zajtomit%aVT*bA$?#KYjqmGQ6Y;_Llcd>QCDg@!Mcw=^s_)TEKbHY4#K(=V2c0SCu z@~B#*bndSBB!&t@OMM$d1g%j5*2>8^EDz0z5w7H+=rx}X>MjWhrJRq_>D+QZP4Hvz zX|90dUpF_eERGE1tp@{+Ex}!()mi?r^AJdSehYbA$k3W~+Pn7`GcLcTPFhW3ab^iz z`%*%esG$F0d<8c^(8X(G0I^Z^@;piV3zVrOJz3(8%egk<#+XPSN(rN4qp7oG=!(#q zgsmQuleOk;_D7CRM0eevRv2ZcwrK@NTUv}1!uq}?#!onk(4vMM)sMMhM{O58f`M?N z8#*{l$a93{ALM(bM7G?Awk&at8n`&ZW47i>E>7*E%!K4}kJkD6GDB()w ze|hm)>A`frHxc3uYT7_@0Zk7>oYs8>gh{)wK8{I98==bc{FStl$U1O_&*Ur*L%r~T z-Fx=So_ZW65|b#&raQC>F;X<9PJ9^n7{j>PJ-VkMBNfXpn;Mdb?9{K${yJZyu^G0W zE@BbOkAIt;z*KvEmTUKgTzi)+#}7fju*OXPk?R+eq?b06(0cM+78`i+;N!Mb-l0+t zp;!6HU6G)$U+qb$GBAP)3V+THSCC^M{zv(hqcC@E9>@9ebkwEcDWwl%L2a_$QgE33 zV}+2CGfuuQ@MXJNuy7D!RXe-=yWf)1$|Ipq&MV*YtA6A zOd?ye4*hW>LiX^3GRNB{B<(kdq}QZ=j?Y>8yaXvS(7~=~dOFylwBVh!g|L-_*q63| zu|C9$Jkf>Mzafr3Q*xK&(C*A0w#f5+DV@?GwU@O(nDKnbK&{*OP!05PvG+r2jj_5E zqj}^M9yBz;yPp2Qb0NZ&{g<%`y!8Q}ZVCg!IaS7%8hK^K=X6qerNAF=32Zqwo3rCx z-NW^+IhcghUo4SYWDPOb!g1OMca7z5B>OqYvh?N*az0;s5AJ=GIlrC9)!m&d;XY|F z&(|-}?Cf5-u=y%<`Hf#?k1#&aTiUU79OYpfhFvdWv^qJAuDrQuUOkF0^~-~6v*=+M zzDqMClc^DnKa28OU6=TMe?C#DOR@Uz62-4}R|Myxnj^tPVY~M4eUJqx!kJaO5qd;3k=)DtU7X|qMK1efbGAZ+3o;JcMw z#gPjSqwwRPC8X0rxT&#( zI4X`>@MLe&we)j;+dE+1l>)=s6<9f6x;La$#ROCo1ivcTGd4=LkwkUVf7E)gEsr=MF~U=W0|3h3>F!V zNa0=MQ1+$q8(b#lAFmU*jGEq3+V@%6{U5;kK%9m~C6R~saEbbpVf|DjNSc9I-3)$x zeQE+ULZ=JFM-!`V+9D=twPTiZ%}HEb)R8i1)ioGg?-G4)iFio2wq43_Q+W6P0If&= zNS;)o#c^c(tohS}scdE&9}B?t-`gM+{yyKHrf0Bm3Ur)kWL25x%35cKOeibFp2~_n zDgY`wi@7Njzy_=djV8sS-Zz_Z`T>;kL>8fkYiHbD2QnpRq}YNAAdtq0QOGnrJ^ z=<4be{vnzQ)8o$(cKRN_-tkT8jp|*0FRFWYi`MdO8gNe?Pi*hjWgrX^I@oHLWQOW) z7JF#TR>OlC2AdX4R*BhZ>rEUjH8%)#f=V`ee*De0uc+zJ!6v4Ce({!*wflfeY~tIZ zZYpxC!uIfyDHRGi5nQRv2jPgqNQ=JY<2UpA+o=3U(r(^pa@~z8FPIr)7qi3Mm`rGtd_<_70e_W$1%s7hMG+$i&+o*{(Z2QO(`CeBz8ntG~@fQ>4l#}O+5wa2IGwBeE8Wtqtrn7^aR))TN z=SYe2vE)sk?p9~U`0FQrR}n?lYzu%pA$BG2QB+mR-BTb5V90O0S0PLkSS+yf3#vNQ z*1h~gHnW@qpb$*+hl>lYBCIRX^4(X;A74uL>ts{yCD=Ip4DC&AKm?t!|X=C71%8(uWPCBX!r;sAUrp7D@0EZi7MS3CIJ$XoBZp+HB094gw1REWGusfx(-Bo~;f;d{ zp=MOu2~gEM_KEQ$$ByVPD6A<4x1au2pnFhcy>iP4Y4f4$5(!U5<#&xh=hp=NWiiWN zfLf`0u9%x;hbOhLi9pl>mlCO#Hf!^J35SU(7n%aL+Q-p^K0*Uqj!gW#GYH&zyCuC( zXH^+A)ip&Zv;SwY62r*P$WD$t=&<7&CWq}olxxF2I~)-xO0Omi(0)4aF! z-=}R2yh|uOF4qHZYk9gpkT~?qs0D^us;=aMLT>1g1$Wq5jB;_W7!YOH`H*{({`A1Y`pawq(0A;eWJ~(6=eBizsZ&6=^iIZK)+}Qak^pgp2%} zD;eaJREW*~Qw}mAhvC)dSBq@1@1Dvi7om}@FQthzSSlHc70KD9Aued!9WI&o3rw5Z zf`v|bgRNEs*Fg9(niTZM+ALuAgQ7yOW1M!8OrLvGhV?5W7gj$DdtXzm)4pXb3S2PywcUWp5#HA z1o(`WdFRfYR4Ca1KwOi+5!g7=B0U zm0)C}O1g`YJEdjPz$u|6?2Z^xI#QP?%h=TPGX~+W#(MHat&*CkC<6wSxqU`H{tE6nJl9dgXC1432)51=&BCJ5~`|DWABYOFiT4 zpKydk_VpVO+07&hmXOrRMKf;`3j0slqm^I9rGE#B}C^}bej=Yf~8rbNiTM4v;eW^9`G zC|ox+7JZ)sxR|?dfGx{Z^;L?mLN=P-Ojhv-_@M!@0haqKt>u}@bntsmt69^0A|`!K zGvE2W^BafOr5V%#59L6(8!LDx!V>5kK~KQx)QX{~s#Dw5q$SY};Y<>q+LFXq+bJj=!uNP>L(u022r`0SCo?;Y0y-S8E3!9)hefW^x z8Td_WRzYxF8)8@u&s67XeOXpt-4qG-(Ve0DuF>z=!5OmA;@!+ozQ&B3Csu!-52 zBCqgrz5$1E`5?);;fJGi|M|}L$07)K&P;HoWv@R;R+((9vvEWlLUvU;LqlPny$PN+HfDRjdQ0F3D`vXU ztVK+daiat7^jf}LT!0q1)lqjq-&RhyQD|ks{Wl9fv>~u0{$or8GZK;NN4^4yuLfek z{Dl9-`Dv3MAHjlfz3~#i@tttCt4sb&B9tPDvow;XNxJ^Yp8mt7EHttOWaT7%X!@O+ zSv5Dij?V}o&85U4%U1b$GO9A)Wpl21MZb}gk&7kASjqY&E}_j5a<^el0m%WtspdIh zy&K2(me8uM*`4C;yG-*D5^}#Qs(kdk3tq9|*|bTZJy%u_BfaGBnbdQg4d7h9s(wLHLcFUk2Rsu)>7qB?*w0&a@^@%t@I%k7KYt?vbk)qlz8PRo!nP zlcc~={rnSD~WY8kB?Ajl%)uU!F==jbm?B0UPaCznroQiIJb}bBOXJ?FTU!vR(6sj zTg8ZCiy&vF^f5%ztAwJZ%nS(gau{yv!N9~{8FJYnpeWq6vr-w|O=#BEkP&24Cx~{f zD5?SnR5OhFu06m|{v5dezLTfq%evqyeM~O{_h+PPJ-1BgVD3uN-K}v+`LgO82aG+S zf;J!DMF~oSH-#&NsbT}|fa@oq`{SzY&V1JNc67JjKY$<~=G3=dW#E~~vt%r}HOeVb zyd-5jX_3b)R6D>Vzu?RT?XDw+{PK_Td<1y>gZ6 zB1YZ+;)^V6x2bRP-N5RLBKv)=^u1e+;omiBsUNSm%TUkOnm}juPK^_SBVRD=<%eYj z9YY1#c>?$VKAJ>TH!WqAAM_1GJ1TnAxI@;SS;PCPC?brh#Gkk1yZW>u^7AXBV)w>u z29*PyIlr?uZmJMJT6+S;2(mPUzenF%UFe{7wD^nlNgZ&n4<)czXuc;(vx5`W&fIZ% zN$Qz-9z#ps>n#r)=t*DoDt^cjzjCjyQb9vRerlXupA|92d^TaxJTh`$!}#yppz=Ft z?E{)*&xjdDzRJ!ie?YPe`;_t}%cF*7tCPtwReu_sv+3_K-R5}x!^|~6%G_sBW?D)( zj(O3ogT3IL*%7XB%Pun1`U__~L`9gIV<|uUKiWo8`jFV|Uudu9z$e3E(W*!L=B=Uv zaxS^IY{tZs(ge8gVdjLl>nao=LD^FO2Y9wcm{2y+H`9mMva-(-0DuiE3h}e$M9M_H zQWja+vS;>n88RU-orD(4%Y0a9gHOcrzhAJ5y-Mjkz>Twc-b(kzB5j|Lm4s@sj7^S6 zF7&;(B+8_MNMIiY;`En%Vg1zNYy2Y|@TSnCC(G>pn#6>3?V$W+gmfwJ;JSz^@K#v! z7M6ZbcN%Cam=&D<&iaxezWuAcrLwq&;2zGOVl3!DUOw94A}I_N9{FBL%*2?fq4!DW z<*O zC4E*p1m6qHe<=cZmhPP6Dd7=vhO^+uWNLK~AA)DTk^5R2Kj?lGO0#Kv9MH(Jw%3^fb!eV z0SShN8D_u@0TjgTp=&}Z);;#7XCA=p^!$b`&+?s*U;vB&VkRKwaHK3B&7D}(+_>s- zb}k=Lgik`pM}wGoRPELXf~aJX?UM|ice4BygTs*a$(wtRgD~`xQmcFv86RVDH6}rX zTUwEWm4@X}d)*M#;T$y<2qlkQm@~w)xF8x=3gF#UwA2xh0!jHYMTv?_Wln6}^xDC0zve)!T`xX4Y(NyIb5Y}mikj&QBp&y1$q%Qb-I zw9*!M`Y=ZGcAqrr>_S6nD7QM?=}L(5o`C7j7wgR=Z^yBu{6vij!l(LS&*y!1Y_S0+ zoxTcc)t(#_LMi4g0}BtWq+Ux?p{LYp@_r70XyqSE=zRH@sj2tkZzI&^4mSne_L;C1 z%8|PHk#$JR-BZN}`|l3~;ItAEapa*RoXRc#cDL<8n_%}Vh?lLgCdnj`j!)um3On}! zM#Dvd zS=l41PH1Edw@+8VRGiebA6h}o!pH8JZx-kpUE{E;t>2I>(>0XYfXosCp!|U z0M*||8GxAc9GXnX!Aj&vLQ)@@Iec4)$oOA4)1E}n3&!u>Pp6m@14=)eg!YK+qd8j3 zjk7;8R@k=OX@TVtW*mzw*b8gJK zbq408_IgLw{#*R{O6p4%zy@~84QJj^{gHR(;}#)EeYYg@#ywltLv5VM?AF+w=S*Td<^@L;O(l~oNO`BJtV%a5(AoHZgQ z4v7weT1tNt*M_aDv*3N=0bm~@0`9>jG)GCs{jLyd&t0PEPC!m9iP~6tSspiy*e(ZG z&MIu@A0r&Ne(!OCT1$OaadZa)f_u8eL=PaXKZ$8u5X)#|8B8I(M16Z`Rp~6a7T?k0#&8Hd&cd`seu+?AWTN<5||PP zdH=l;WiF*V=`-(^f9FoqsR0D)*542?JH7%ZtY}rf-3GBC(Haw@pNQhibBFX=aDg0* zQ}6lRXY*SH8pBP)5Ya3B_c;+ecVfP4-mFn-D_Lr<2#nmV3T=}L=#<>URW#0=!dmW> z<~PBTI{!>7IrW);^g{MaqL%76whAQvi<QOV#oP+uAMNV3z-MnA3k)DagS0Ucw`$G2^4bFF)`Y?M%tekmKuj+0k&*YX=ab}g z?lJwz0SKt-{^ENMuO|&z8h4>DDla=|^cB@uBJW{}+|zF@(Y#SGp+B#7sx%(G$m9rx z)o0c5XvZtF;1$8ltKXzx|M*JuXu2m(`O#jdO^v#xjgqj4BH5Kx#BN*kg5=G;ZjW6T zMcPotO`EVxv?{W0ahJ7w{bk)DSP!4aYQa5olyeqxgYi~|mnJVotlW`3d%nWEcMgRG zVb3vDHj{6^D(qz6ec~Q90+l)<8t>b{k8yK!$4Jvve_6@QROZotNU8`%uLUXQQuR}! z6f=2sDy? z2NMn0C(G}~b$g5L^yOOLg+leM%p8P&E=l|M%DE~!Fdx*=2lw(Jt(RAIiIuNPcmsoD zw-O^;0T!HOa7felnh5$D^F6Is*eBl4QmGQMU;QR5^lbEpb#CFchJTI!tetCsYnYJj zrzmyX1Mkltzc4l&_C_LPDLmzqRx$~*d5^Xsh${cRWxFbnp_(2k@q7LvZp+J9<2!wg zkYJ~QeEN=o#c1$tS7RU4C)4`&#lJcAMJ_@DG$S5 zSAjxbDV5p+VSwYpX^J@$T%71moDswp zs6C~Td$_)NVSESrTiv*%XM*&RTpz(7((Dq&#M}LIA|)}%6Ld)Q0h2m^*zt=DSHGqV zO^v^hVAAVf_%9g~r%9-}?6_4_d5NL@46E)#e z&Yn_fx*>8#n1t1o@Ii!cmW_fdrbGdP-wyi-wyW!=!f?_;tpGVty=&jE7Y#*xoIgtgJk1 zl@232M~6tJC~X_`2+TBK{Jfq}Kf~C+yN!jX z_uw=C2iQmPgi-l7inBawjz#kxjO}Yv#-9AHWZu7{=O?+ypxWRd8&XELKOnnqL7g=R zGG)s2o~xK$(D*9k5;a}NsKaXEYbdS_XSxZT_yO-B!v*XQ1kfi@mn5C~iz&I_?GG@7 zu`zJ-8-G{86IU;>2VNSJ=I}nw(Vy%CtA$o)|KX(m(k;hZ| z8v^Y&&mKX8gw1~{twON-(n8*2qU1KoVtMh6$$z<+8Lik6WtYe1-P8LvQ~8%s^%81C zdyuU)93M#)c8TJ?b%}s_44mW3VatzW#OZXuR^KCMa77@9R+T;~$+19LKKN=kmqFx4 z7Qz%c>t<-rsBB`Qgf6p7vmX0BVi{Cugt!hN3FX2qdql&IMFFFqDwq%0N z>g&=OjW-K%n3x(t>aansg%MUU+QnmZ(ZSzCy%0+@k=m<@uv-PE{$J9bLly*yvsHe) zl5LhX@IDdX{|Hl&?1``!^O$xRgTJl5ik~@iSu`fGXounGX#UhE`d>c$&GmN4b;SaNn-E?mWcU>Zb;qm3t zVBl+Ja(~y@Z2VOq>kvV{STWc>2rK^0k&Uu}1%5%0`#G^(cInecwHbGMsK^4xr$q@PjuGy$kSa zmK>TxqsDG2~BDnjSF1QzQW$riuieVv^kq&}Z=9t*^0g&^$F39eML z+bnR_IKn;=X!Kx;8W%2vJr4&rulKGD7uK_6Uk)wvP=uO5&zkh#J+# zrt7U8$Y-(ff}Ex$7GlOS#SqL772I&muV^a|4xe+<@_(mS>O+=VBm_3#gfghgp*wb| zPLmY+`%qZF#@=r{ah6$hVpV%i`1~6o&qNyq8V%{*#rCg#6J?9i&L>ajsX0^Got8m! zuE;T?mvB4Y|FQehBmD#(#?@O#q=YL+NtW*HCi(@BS5pGS34AOL_hqO~Y=)NKRB&2? zL1t5WnpfW>q>mQiZ}6{zwZ9L9q*%Q^@mf zykZ`K#SAI(EeV^=FjEID?D)rgpbe{yq5W6W8V4)=F=jU!ul=e7ro{tn-s56#+qaz% zSfeXlt^FXa2EvR#vBTKf?fhi6SPWIyx|fuEaz9$N@RV@mcw1^B`Mzt?eey(OI+eO`tm{P6S)l;pN^n6cm5 zgGUywv^dGrr!t*j%qT{(nf+!#oy@|g+!6C;tMo{3@aKrYu=O`fanv3NR&MOHInLM+~?}PbPRqax8 z4SRZA-Uw*bE!_5BdP^O3|I1H%F>JGK=|dDcc)F~uth2&?I%uEC5w7hgRFBNd78Q8x z)SXar;My}>*dvs3Z}^oyYxr=k;Dlf$PjIG0@OIV*y*l8`FyjQf%LK1GeZaU(*AX1> zbO-F|$}P$Lr*U)KSVr45w*1Waaf!=AGVTK8;Z4tai*NE}pI06A8Q;4cWfO8g3k0p) zY??~=ZbpzRFtCP8l3XlIXfSV`xg6KX(bjbH>oxBLxB&Y;)#Vn}GySXnJ60~wKU9=G z+Yd>jHFp;G4neg~cNdfQ$#b_8hxpNrU@S#~7_n{h6k?vakB9|I|aQ z01my$`vVM~5bsJfjx5jxB+j#E zK(FeTv0Z0g9p!M1={vJ_Wf9-bBOKnOFOLoAvtf6J3|+sSEg7#(eUDfp zB=lPSK3Aw@*8JWdY<*hpbqCEooBbo9ajjNfdI)=Bm@zUUc-QJAq5lmRy7QgGPugIo zCmN}?;4+ID;5iq!d7zJx94@v&;oBW|U=~!7Jxm}{Jm1V2&ZG2IcXm@2 zw#r12oAAPfdP*?)3kqTH-&>Y2S$LWR4O`jn-)_e9TXm_%i}yyY9;4aq6yi=sP%iVH zu18jZ&=<<;(vz%)J|GK_9 zo*<`A3zW!L@J}dHx6Z4tauQVk`04+4@IOg@b*Of13GqCzX2{RQ7_|#*ir8Ur_cL0d zca^Ya)5JmYfwq@M^n3N?R;FmN%gOHsdpI3`wi_op1Om(2Va2A(&kj%~KDgdiWwO@X zN=V9GX`dml9mZjzV=W*L2rs8Zo}Rq*{UToG6PP104Y@YQLoZl(xga`=HL8+VLDdqDgxR?721- zP%sQlF%?!|>VW_pXXRWG_~q?_f_1;DR-_zep{cDHAQbj3la*8yd5F1S&Hg z9Wq-W>jgp|*ZA0SkMWzYc!kEZT0HKMu-VkkydhHO;Ny?J7XU45$z4xR$fVs($QX;M z9LcqRI8QxHxtXddG=>?!W8fXh|4b4KPPGFBboJSx{w7JRu49*5d8ZCew|Vg|zR)m^ zjy<=T^Kr4rqecj3J5hzliKD%T5K#^Db)-D``v!ahDLU9mYAX#*!E>SGOJ5=3 z)~#x9wfOP_G>yR`&QX9&8UUHa;~kM&+K#Y}TA`&2Z9{n~sVd1Q zvn25Shx1ojf6{-vTej`gt+$au&lzts!gw9>JFXjD;tno)Uhg$dO7`TBF@>t!(Pz_< zBj>F?oH9oE3T}~o$$k!GT|)Z#A8*as`sa^v;9`F={H6S{b?H^MACQ{d(=y4P8-4E2 zgg{F69HETz5w?<_QumeveN`2-s0uFD{wlFp#F-v~eZOi2rB)32j9Ut6jlbW3Kwul; ze+&}2d?YEEjcGxd9)7Bx-@)lF+HaxbA)nGzZRKoJS9KDjL9~WJ3m?p)n>r=zQZ~*Z zinb&zES#q}7@$r}D)?qEE66Y}jjSM5JdOT96A9TPtq%*@Fe=gL{e9rB+Jt%BQN^Bdf@?{ms_UKx-)x8X(wp)4#IS)5QDt`~B@x#! z=eKj6bM4jfimzMrmLzYO@9sm{O)5}=o}qi|^`g&3w}az|soqy#drLJ$%MVmKn9)IE zg@_HEtVK2>ZXDbvPjt+!5a!9&dBi)u*-~#8#}4_Pe#%+!K;AL%pEu~v0CL7D>t?F= z#Lv-fH(ZC}9CWsnV56?!d-Erkhk`@Sn3BL1zeN1S@$4MOMAedWx2B5xW`IrTxL1Wfjp*Fl*xRf!up*` zk`-5GcU6!9kN!K-oUH?2i^M0YhcTRC)hNKa0xTH&<&9fePQ<@?yOsFNg8D-8Z9Mt) zYzuW7fg>a<2x-D8HM#7i{2ieVVPiietFVUT zIdU2}b~8?fj^&LI0XuT|{vAw{wq-Qj1V2)Aa@D@!;=8g=}tC1mGPAwf@XH3Q=YAx1jQ%Tyj4E2)Ae z>9^xrmDV#^3aSDKb>}+B9#rcl`I~AXo1ImgHJ2Zv^x1Efuc9rip%MVrK8RwmC@ndq zWf+Z%)Q;kEdFzC{oR6S;VJf70J2T zeFrtx>eKQXQ60?LCT&e^$x{1dNcQtYxx@an2ha_nSE$7$PYu!Y-}QB=EHs}E?6&y+ zR#q+m$h1Zm_ciH2GD#@p+58;FWnMSW*gwqjp4Y_C_>4BLJC@%^z|}*5390%=JMwR3 z{ZrRivO?_zvU!wZH0szXbV;O4`{<+(BzAM1WP}Sk#apS*3L;Pi#{*p4qW21a$YMPc z`f@0iNt{{CL&wnFM5Jk19}!bn!!{B*0;K!O@ypnWQ=0`NM)!N{5s8~V>P?p76^h4# z#bnK+1Mp1@S>?}9V>EUQ^ToLKegXoIvk4m%P5O&{{AQ)wl7%_G(?+$wtEh6b#K|pQogcBte~RhfiHX$>YWAtZ{^dsS!pGS$8tlD=M5mS!q`wV*LUTrqknmKhBkC_cdPkdL zEQWr?QPaK$Dm(JlIvFF{`(=u0QL3q+t9swA@t9Y|K2 zqA}^`3|6Y-lSbe+1RVvoHu+SSanLA9S#M!#gL0iHgC5}+j(b0m{!%eo({?U-@s+%JbY=?w{Awr1<~zNW#vnfSRfP&?Dboe)$g!mk z$sNmCUHEU9C~MDPvb+&y1pofinq|||J>D&Jt*q}C%<{unLTTh!46*ue7TuX^pfS5? z@%oaixW;ogE1P0U&7gf-Lo43{8pGq>oiNy3`2PW@+7yC9z{8TCJZ_^(enTP{34h$g z@~SNt5|v+$-1ZPqyUPOZ@9}_|I52MkMVa?)XV9gsFYMY za;C_5Umbkic3>M(Iw0G#kFAV9u(f+C{LidxFka1hd%y0^MhYk(pxi*}m*)nQHe{t| zerDrLaUnI|n)f0vEEmJPIzTsmBKiJv@rvz!3hMRt@yQ)2^BwOldO4^7IK00ik+s9$ z=PuzFi!6sUSTvb7t2CCZjlVF{>tmnLaTS)Cr{v&wk5@WyX=s-JPV+LVYtL` zS1OLbW5C;*__fykwzt*Q3_U}?q=kv)qmZT;iCu+vKiiXe=!aRcv(0UFr?N+Zs&I+k zUh+*iQSZzY65HnLBl^pvnmx#0C=|YY+=m)0VCq4xt`~3Z)<81-bOIcH2hF1*e=>nw zZ}XE?x9+tHU+El+X7p`B--zKa z`^aQ3VkUrfr^Uq)$H#dJAvNsx0T;Qa1ch!2v%hP0A@smlCTo^H71iD26!96FEvxg=*P?oCW^?bm0&xJw-BB$9Vq$7uT ze>b!@n-aFS{n5q&Pb7eUlA6~E;xi-F0byz>v~hQ?WwRNZ>X@P(5=66HnF^tRo`>1Z zbeq3mOrF_}t4Y^Od2vO9aIPYz|K6~i+M9+4)cpLM!^!V+L+;|>1=TmT$mT&+3!>En zp!ODaaKCd(;Uw+-+<~yK?ZJpX!?%Y4A%W#iPL-Zx1@o*3;g59}S$dfdFIpAp_~A8~ zb}qv+Uz&qi_IC5`vpoM&IUQ^;mfbd0KFCl+72&4-M6l~Ag-fztfo=k!$*pld{=GHD zI3Kan=hb9loSCAD8I2ec85P2qc zWXnbPFl`|zY}pQ;QJiIV|JZ$Krky4Br#=&1Z*-s|W0nWE$GAY0e%XRwA5`=@nOm`J zrwXeD8|XcpfdEf&EuWQ0K(~?87dQ&t%}bKQBUS8a&S3N^VmX$bz2o{pG4}k_nN9BFh|o7xP}(zU5X`o7A*+ zz|`>Y$I{_?5FOC%%9=E^@KQ`(n!Sp(Co zp%MZ38P=YE_^iItcwT3Xctbxwi)cz2LE=gz6W8$Di2w@%)3h5oAlZt|2nxfN=$W&) zd$sU9Oz3uQ2_6J^364{^WC!*d-ckY&8i?JCq)YG=Kv9{4e1hWNlYdS+Cb7$ZF+uC{ z?#uEMs&6?}Og~E3h@6xDjS;ExO3CCU2gNc)lFvW+%4f;iseiDD2`FIxvk$o!hsT%F8&>6ixoahGo4!_mqH2>}qK)tIgy zOwLA%FS!5llg!wq(1T2T{m$mtJpgh^IoWVCauFjeS0*^n(nr38tjz438~+Ygo41jLHpX)1t}A^el>{wvou5`GR?NZ1 z{P!2zpFk0Zhp5W5aIj|h3q!46fDr8E_fK7i-Pbz@LH6XWmVfXe0%`HtF#)|!`;1wX z6-8z5v^xQXa1BzhIJ~W!(mm|1hft~`cfG=g`XAw?pMA*CbT7g1n&3XUQ61=@1vh4+ zXU0W}hdukYUyDwOqUCSXl9ahS=Dy$DdMN!cf2Q?{+})sCG7NRUv<`i!Vad#HWv5wy zs!&GIJ~*po!mQgomF}9lk=cn(2%BzYAYHrOD$#eI1332ad&uId55)UeqpEvy> zX=>hg^ZD$TYhbCsV|WmI(oKIf8fNu*@oQG)V{3uP`SGX88m(~0t&Hdm3@*Vm^8yop zAVz#o&O8Iy6fUNacv#=gVk7nNY_%W<6>unu@S060jv26Co7fXt{A^ZaEXm?Q(K6iY zctp5-+kPmQN>mm$Up|f*w>1*`?9S&tjZzu4`=l2iW#= z4|y1H&&=Ts^SRAma8bu3n0tf}zSt1`de559akZT-DIV}JY`H9D(Bex4v8|y+18Nke zWh>|QGH(+qfgCYkdK1<>srCSxdyFGQpnL9Hp5UO;(2todp02FwNfU2de96%HL|6Ov zj}1IDhU!bCOOhaM#*Mwlb5+rVYqD61{89>3Fa2LeYyvYCVuFCp(pzz;XBfy*p%?z{ zVK*=|`a_fE%7I>VJ~)1*J@s?$-zK`H7ZPj8Dnqr#)X{f^S^@0_%`a7fzzl1eknD2J zeI$>+f08@ZM%o?-%k-f9|K~gU-S_1ESnpjH)wMaf!Tf^@q!{+tSG7N?kSTT9^mzI zB6kvt2T&r~7sdX$3mBLXXgDLsL>p+$styxzf&Brw-?U~nE6Xxrp$%J7Y4k9Rf01lN z8;CI1Dp}4^C6`GF&pZUSa1(!TA#KEhbDZL6>5K*R*qoM~E+m*r{t&At`9=S+|-%@?RJCv2wJ#!YH`T{YP zHow-+yAPzNoJ+m8DVa%BJ1w|+XXziVO*s~5OwINAXaX|IEq6jv43zciyIFL(WN}B7 zIb(IslKU=h%6n87v6a9S@O2#C<38vp%DN;`GHD*H;=A=G4<`2Xuw%Zu{)^hHnwAU& z`lkJcXw-e*j|Qqu_7acV4e5VVTD}j2+cv6FDy(753w?wT%8Y6~9%9l>(agj=-5J zV+q1=WL#F=tW%}&nYi5$nDrF!kDlVCoOtmy(J=Q3vL6(C-Nx}hdLK| z*u69&AnGyy5XXJ`6S@{#DgOa4RGN|b>z#DEtlX>HRa2jnLduW1FZqulA{-DA7aVP1 zukL%r7H?MkHk4qYRJR^ykJt)**f%uHM?y=HY)zhE!D?iNHD)G%d`NyP=xB(DtrLoHuziO1L63^`tLPH1*>U?OZMS~^T2)DRmJm1K(%B?9neigr^|`cy4K-C5EpC)= zm0ro=^V7%ndw@kU3vY{$qwlyqUQVz%{|px ze&ZFC?&8p{M&@?1R7HXMrt6&X$?q zGu~sJC8~%|} z>DDZ9SXU+8kL#FJ!6`Gw2Fae=0<-N9alxZY>Gb`rz9EZi{kZB0eRfg#32KzCe#S<| zfoH-^+ioCzkP-s-3TM81uiTJ+Tr@XpVcfiR&1rxUg5;y796W`#Xb!W{*Q91b zD&Tl-)9BKAa)e21E^cN7xseDFP$O^-SwL^EkTF}S6ntkO4YbYKmQj1)&@+t&yy%l~ z@-;k`cZcf~`%ZK7&b_*Ylt|&@G-JT6nrJUf@Tw2Y0lGi=X?QTs254?AI6aA%^wb6PrFvhI53D}C@TE4!Ii)y8_J zYmKM}Ezc2>mDQgx_-dKZ9`GQ=>ff8cCHkx%%4JkMB=4Q1$q9Up$&v?I*5=+4s)+fm zY?x=Y={cknvwFbh{VcW%=uh+uDqsImm zbrcp_MATNyEBj<6eUAXhDrlP0^o`d<_*FrP@vd#dFt46yoN`Tw@=%*p+xMgzvNu^MuorVl>nbtcOGLLTpUNYMpo6q+P|#L z%x_tg2^DKna)k|os%CwepVk!F?0~h9RaP?3MrMQojO{nz6oFcabjrAiz}0<7X!R2X zTQ!E;5B4tz9LH}gHKh19b0R-|?E6X0I=&q7tJPRZNP;?RAM%}}Ou=UZmKK8GXh;iL z+dRW(IllaJHkrvL_yNBE?5gYyt3ytZqG9PPHoMYSe4{F@j&MW<+`QDy&l7Ksw7HvF zYCPUYHug4|@~D7aDYPgf*q?%q`c4}g?%`>Ay1hL^ zYTg3%*^hC+GLmAC_lR(SaQ2K*QOCfcRfEOQ<_Ci$Tj|BuW&Jo=??femI~o%C3Llrb z3*bNChCDf}EJ<7kwd2uu z&e`^oy#h=k-N2bC-YE5BG;pdIKuEXDk-h26=&r^ybC}c4A^! zHe3SpDY=bOH3(`UU$@xaxczLR>DT*l=zET8i$_$xljOB`!(J&LqRZ(wBN{}Vqc{G< zp67Tc-XKloKO3S_JYd6os)O0@Jz&x1i z$U_7223LnzSkTd|E1)bX5uc9k7g>Kj@+Ne+KE7`afyf;dPmrRqFz(~cH#6~Sff@n! zQG!o-+$2oTVW;(fT4itqmex`n7s2~Z6MNwR51VCcrC@nZR0X4Iz+ubo1P;@47xVijebON?UXfCBI)V^8z`!=pKSNm4=Sjb*W z+~+C;VICx-v`)?YBRjf&=Epw9xYt>tB_spZVif?5LD@CzuYG#8Ba^}VTN-5QQ2J|R zM0whr_%1guuq+AWZ>o4d7e;_GA_cr>H<5yX0J35R#1ql!ld<7;sK>BtKqE4vļ zOYfB&R>wOIyT~+<`7JJG&%d@($J7 zWhRx~Cg}hzCtW`2lUPzdk)M&$&eXl+Hu~c8;JHfJpvSLS<$WJ~fc7hMr$Mu&seh{I zk)d6Td$!MXlhhX4%bRap^P!~uV!Mqx82*yU%AU}E6r^Uwu96;I~C}{ z&d+QwkH#N-F|Ub9Qr0NV#-ui3Cwa**TFb3pS0^#~M4@Z0D!fdDnV{E0oIVNC-gjS= z%QJ&QWo^)HE(ErF`*0;W9SB(qo`4vNB@kMkJQA;|7IO-pcr*@OHx-E9V7Ho_pS^*6 z{whIUb&WW5>j96u|G50qktl?bglV3^5ep^F$8eR2xlJT5#nF)Th!D6>LV~xT$#`7( zGZPu^!L2iB4=p@5UP!uOf99s2JF>~Gcg%AH-nS)IJeani`3NjW+hyb8@qDP}W)($6=Aeqrf_SA0z=&rSW%e^7$j4HXyJ%O&kbVU4E%|S= z&3(zS24+Rs>?4-@fh&z&9qLD&T4&9_f0UW2{v8MM2Ok=k?dc;DQ`1n$SZ6o}PK9b|63lZ*U95~M_^e+UL%QZdZr8U!57<9XFpsED1zcOtKC z5EDBVa5wq1T)MSlOAigKYD_gHyZp@Kit}kC zbTOr-HM1pZN`NOm=}u4-()zBH{}M*b<0;^btdkU#Q)t;AH<+mi;#r34_EOt2&}a{< z7{>aaG*RUrj?*RI1D&&ByM4X-CC z7{1%bdQju)@0#MCj7UGHykk4g!uNSq02DwoS;CZ3w*+@lwMVB-=u+A$gI zkg@11(IuRA4THcXeOH-IZ6v8e`NKF)t+~EPj++4=n`Th|^@mL)bHIwT}*w z%AIx#5oanWePc`Ugh~Rg*NI}>wUf!6R$vj+^v!P>QKEWXbh^yQUd`nZ$Zk4eTdm4H zMJSuFk7(kY>3Q;53x}cr6h^4kUbg|H{K;!}B*`3;J)LopPjoj7uDm9gjH*$ygdJ>M zAco!Eg%z?jEx$A<7&9eoBuP(6CnB+uTD`Otc2(e}%$_=3$^s1s<7Hnxz8j`? zwvPGn_SSTsN8UQ(pW0OcFS*)ocWv}KiG8u9H(=vDRB+drJt@$eZ1xfEv2h3sGiglL z{ao#ik3mf|ItK@-us`A2;C-gk1C2N5&I5}IZUmP;Or723qZ=dT+v&GRop6tHzmxs0 z8g}|CBG#+;s>7|977Ut8oLp7rEUzJrI8_8FN-F#QvzX3Qz?WVcp3R)K+7q@fRiZpQGSbwvluw z_-`2bv00UTpyZo+bV=rzplaW$#qGvLf>gYIVn_HQE_1vp^`yXs>zmW1ib2yu&&i*V zTU!Ornz`lXwB|FBPBLhGR`jq&t?1fi1BjJ0{V|<4<9fucgtQi)Gx0Wp&thBl#)OS> zpF+dq&R(|etXFfQCGhW!R*DAx8NlC?(9lV%awid%fZ!t-_aM-gDl+@NqxGv@-h-$p zIL4ri6suCQ`}S5ill##J(4*sT$s5}lc1*PGd0s+64P2r_JFZ6U3~pMHrqVmmsygjK zG+oPLqJG_Q4jmOhA%CUv)^3^I;xenafuC|KFuNoj)6@7Nf~aT@5W9D|3%Jep*FC~4 zs4ggqXbAoDCdHk>HviB@%9AGp=gMj^;66M+8Mxb$p{EoLG>4S%z>gCU4acMHsp1U3s! zCtE3$y4HA?w>9`%Ga3QAfht87=YLjGa4Q@buKY2!Z>(jp%?nl8q^tUGyEjL@{6Gs9 zK)GRMh4DO?y6E9(6OFixQzZI!m z_zBpfsm87BkD2Q0N^8&0g8o@U>1((xJw_v9su+J;^4K^G28UH%$yh}(9NH)mIm4+w z>E`xP2iIuhTdEzu>kgdoQljzSZ$k7I`uUa;9SjlmzVQN@MAkf&yB4)t0_cfmUZ-05 z&>IE_C8$M=k#;ZsiA07Q>uvIZTfIS%SX%&qhr&>)Vz=Z|xp7G5t0RcMlVY5Tz~bw) z!JvTzrYN#&AjT-?eLKi|nMAD|N81^R7Ea@!Y50VtIiKg`33xcaina^o=2r^N>Yc388fX@KO(fvh1A0~>E&fj8fo5s zmmt{0ZSTsnM5o<@SUISk<8Nj?&}an$*q{U2^%r9 zFJ!`)+NSj>HgNFdw!K_wlPnoWC5ze;Pe5xZN|*=smB-8@@ODCRoiHNtT`7GHyc}9L zM<=*v6s+rjjUfO4ODn0RkzGSyN7vxc2=|!M`s-~jzu@$nSB-0dCS6A&yVTXgb=>sxnn7OCh9CJlb+j|mo`bK|nYb7{&hR3Cc@u1)z`usny-G-jzOPO$ z+gSTSgd=YW-7tq^c6TM6AVX$nCAKB=XmmZE{qD7^0`9cxI0l!Bl8HATiBn}Ku|#@* zWhTfDI=1l--bnPqnvHl%=s&=V1`!UD0<0pt*DKA;uKZ3DbbVxufiKC>ZpI^zd9fJH zR=KhKFVIE_U8GYQq~zdUV5lI}ijZe^TEmt@cG5E{ zMEmL+n`w8}O0?DcT_eX)ZNcpbhx)W9Aoe8oKRBG?v}95=c?3Bp-`M+bXv?ym7lh(+ z7Rp{}7JKo{+>x<$e!9&5uLZN;@r+&pU_;rV;dB4cwaLg?jak2jS|M)ArmxvF-RC_P z3uEAeh$dIB1F>a_c^BfthD;baW3ryQ*unkOWiviOM)-C||AzGKr+(?@sizH}zUW}j zxb_|I%Mvdo`sX?xT7=z;+#(L!A3sWCH6D^zS4j)S-Vas1eMZw`yoFXYb6g8VBC8V= z4tp7WmZ75bP(@?ldQBH0-mgit)5o}Lk}ANPle9MGF+s8j9P(D16qJx3 zI2)-C_X5)bv$GE&5~chU*m}|vsPwfOs(*Vi-}x1%vL0HbY+UU;NmM3pTs=*jee?h@6&WAVkUBnJ96`2eUz`q z{1(Rrg-Y{P6#>dp% zX0LSQS&mhFyK`|x~(H;na1^y{7E4tSw_O`Tpk7qO1Mn>^H}N1H)){?{>M1iCHFo;*y=2*#5RvsuTc?7 z`VUYaE8{T6FOvPE7Zn=I_rv=JU@*gj1X<}m8M8`x>#yO(tI)5L6Vuy($mJ8L(K`5~ z9M47A%A%3-jCx)#lK;np8=5n}*w(^uq|}Mq%hdgA&AW2u&@S?RYI)?}D*l{UrjQk0Y?4N3TU`&Ky-Ul4B7lO~kYXnLc2 zb}MP%ra^GWS8mrAm;(I)?&6+>-RWh6D`ZX?cc}OM#kid|uX}o`$PC5PdnF79#WpiP zKOQ)!YQSd46~Z^HKMD&|SiS$5JMQEf+kNq_PPru1*cg&@)}Zd}ksqI(B4h$9*MDw?ezmm?iUOxnjv{M-_ zDabkog#&#EhGnp?vBJb<0|;vD?=<; zZMH+Hlwk_G_zh~72pHy{%PwKay|Hx!^f-CXH`5MkyjV@HHs2eC4I9qb8 z>nm&%4nNA#u4jw$0;nH4KwlkS)MUCxRN)U%XO%y9bmqC89k%foAhM|>5b7Bu0N*%)Sj}W;m?@C8`$O(VB9{0elutL9Aejp*|&nEksG4%AV)jS>b#hEKg~I zjE%m-t+{H6KpbP6x3q0%1W)*?ip!)O*I`Akf{I|EHP6$}7v$5%>y{M04*G7I7=nww z1Bm^HqXTU`#}mdS>cQr6q%LFrNMN;fW$Pfd_8HAh78m8BBHhBtSk!pdBbW2vwx0$ zp)O{qsOen9RBq`4$|Uv;AX{k|kX4OEWnF+L{qqK$O+Ysn0PcSCb#~tP>K$8U;=uEMkMLXQ-F&?ZbniqJ&!W&rn*wh=SK#V=s~w{QLjxJl8n zXz8id*B}}((|_g3+(CjMi1`%rN;eHyBHh_?WeuycVFWJL#((g*8`p7)GMhei?I4Fuo&wcs_4}(MoYS*_jwIe?b`PeVW{VMP^-l>o5^Mp58A1 z9KLU6ZaO}0LTCV~j=O$=sTk|$w>x{V{l0pP#=Ck7;WKvMF500lb=RvLJd>IJ**t4? zdLxiAEj+q4dcwP}H??_`iQfQ8mL4csa~F6NYi7)H!iN_2$(P4$?i+{5={)&+@6>QT z0>0l1YZ!{}AHh98(3fUr_ufa{<@BOz&6L%CQ}RXGHtHGY`1Oo3MM;k>8#ZHL zLPSkBN6_~fL2P6PF!1i<#l6q(-;4_SFLq9%eyV zPF@{zrjz-Iz0QNIpd_X~7ye)fa%w{`mVgrS6qUT;xD$PuMBVuRVBj?~8bul%X?nVG z>Q;friwPGIuXi*PbzwE{j&b~5|@ZRTEWfW(^`5P^DNa#6@_ci z<$XhEEOSjZJI8Q{sx4UHvpPuktZ=1rBvk5j-!=d!P7Fs?c`7$I2lrK}$UJ`{=~J97P!sTvZ3m(ICIXO| z>3Uib~CUqbFw26bc%}6qn?Yk3VXZJxl8*0) zHTUM}zr5Zs?k$+drosYY?kQ1n_P6}`CREHjtu`|VHqC!naa!*!_|n&~<9?xQeccot z5oQaVf7HI2{rflFF>WTWqJfgkJtO*VXl#7Rd5n2^p3+i@;)^2tQR5kVpq$BpKU4yF zN1t|&if;aLV45Lo^lB@6?Uw@~^5r}1KqvWqL-=chrY6y6AE1iE-3vye*yT4rXZyF} zC7v|}4IkH^f@F!5*QEx~T$d7<372OByc=9ilug1XG!p>LY0j@3<2UO=k`5y9)c>Z4 zIWQFX{`|DQX+S6q9c_!BltJEsbsn1_tvI$4cGsGu$wWD2?(Y8WIr%W~=iqjsqB=dz zKzEg?kdg1R^0cq!6;(;3PW)R(szI@WGaA{fj+>7nD%O_GB%{@1`bA;DJY@@kM9tBev>JRo)*?^pOCQ!6^NHY-H zI_q$Ep*XNwbnK00(5i68{PxS2AKMBAEN8lR4pD`nyMm|7z9^cIC|rVK zP2|D20ECOmh5v*-dL<{-cK56C7EZaT`gPE_th*xCuIiq##PS@$1dqQ-{0h-sCm6^-~n<&rz!(U zxe`*3%vKmcQ)NmBT2&Ui2-HdNsL#s2}oj+bcGe3h5n7Ld*9(7;re za6uPV2Lrcf@k5)5In4ybaw4kaOdW?Ha?|o)LQ2 zXo2jh!|qqATrRm?P11iNF@u7()T!rzk$_+U`q`?gb*< zb&s;`WZBCYB820fWTv+b{gVsYiKJly9F}k6b57x+JJJwBUAGjy@G7=^O*MiW*!NlW*_qc}C|w8Z?3k zbMS1s%_GsGu>Qk+y_7s*o#rc|>%A0PKGMdGMmrY13;O$!vn-m3GN|pbXWx$4dlXWS z>kDk6IgH(X21=Qy7{2XUa|pFT|Zz672m z-=xfhWEVf)MKl>0SYCb~UG^FZzd)Jbq2wTn#;y0q_~bCkVszlLoaT0wLl2xO|3H$a z*dy~7s^kH$$62N5R@B3I!O1(l>@%u?S=u-x#UN6-jV+k$m1N6o>H9a+=-qsA^`{xs zsyY`REYhi2iSh;x6AMJCl4MFXF6P!F@o(EvF@f@)P9(UxCFWjB>aw%@{fNVInHv>N z@Y5-_0YSg0xs!CxWjVXU7Bw)w?b~_M`=aW^rw>N%Up>7^%R8tDr4ymzBUfYHRZf%u zs<^QA8X3L8ek$LRjo8i+zm|8^f0|4A00nK{RdmX40Fa4@O3}^S65)}b$es7(-n5Ww zkY(HY7et>AcQb{`zw{s6GRJlm^TIGkx!fo+;eO{(Fw$Cyf3=(a+N%!DBM3N~9aN-j zkVIVq)rrAz9_pSet<)e*{6`jXJ|36^VE0dsNV7UBolYbGa1+WNXSMlm9;bck~3yKl* z^xC=Mx5u@)m3=WS#x$c&h33-2jNPqnxsl*_3bL(I+}KpM;k^Ed=2DhlmdpCP%_A>yhj) zAurs}pK2zcMs>U;PdTZpS{QM=5?tzySvetAEY!L)6r}+Uc%I)y9MzV}t}0f_h3eov z$=54NB<64`C3D&$;eGbLOYeP*tjjS?yhoO4vapy&@vXVQzGlCInb4OU^Pe5f>w_Th ziIAOn;txiW|zZob-(otH?PiVOO=Si%zuxel0Om^ivJeHJ&9_L@I2x9 z3CPxzoB=etg>3-J$>*~n+X}HS<6G#!2MNcbR%Qz=4-z;x%an4q$)7V z07E~#y`83?1r+e2`MzI>dO%2-K|LSduIJ<+B}jDFU$cdcDo-ds;j%$dWcZtp5+$8R zT7PrF4D`^f{V0@0mtOPY!b;)GM<0!hDFua*5ewAovxbQKnpZfn8LmR#6NSc+#)U7I zvuB_H9aD-UGpYXo;z2-p_+ylf;b%8`5N$)|-D3(T-LVNWBME6J<=p$7eMgzhNR(8S zjh4|Y{`?WbUL_;r-?_9Mm+s{Fs^OOQ*M2KJq zrrQW6S$$+EQ+9@aRcs7S(8)ndcN5%f16x5jyNNuLIrXMwHmGCP0xr>jL_?uAXcs3Z zXZe0HfkpRsspROH7QKwQMx;^a-|VcYn=I2pH?uBD(r1R&oy2moKh-MFC-eWDDotlj z8IrS!d~G{eNJMoQaH^sbz&mR;iA^lsu={q434{9< zDtu&U91^TzhdS?`pJvO6t3Jv`H%J%P68c;*1RL2NX17*l5M7^yY}lSAVXhidGtuXQ zBn}F1<&;SV(F8jdU|vq`(`Qr%~O z`0f6$#$Y_gz`T?yIzN6FE9A=;WX~gVJPnuI+<{FlCYX|IVOlaii!CQVhhk)v2BR}G z{kjx?5cY5%Vi1NUQ6~?Jmk5dVFnHw}i$qVEAMXw!^AvJ*MHUjPQ{a%3>6nsBJ#95s ziaO)|voqxf7}CP0Un^LmDFLr;Am8iM%QV1cm%EV3y1K*laA)ORXsH z98cXnOGf`slu(Q?e)X)4dU99ZLLJL{H-Da9>Pze~gC+T%xqh`}XB!h^u=cR>Q}-9+ z6Nda{q_>S0l^ZW>z9~mY{+&8gw~b{hr7sX<_Ug*(?UIi9tJjRV85$Xf08~H)YRJ*+COAG zPhkaJ6T)t#4&)Dd5_2cFS_D0KU-q)N7k;?sB$%xE+9-RmvLWLL93lqGU!gPv`Pg29kCj#v@n6lbNjE7_zEl0|TTJum#%WZ}-b)s*<3n&FC){ zZrUhgDAf3mN{2LO1XyR8JC$E1`5=fayKaA)C5a=QRf2O)1zM`4|ES$r!L%tEIP$9t z{!>9*d$76~|117%1@rRmMc_)pjA~`Q7sVM(YCJnL7~2x(nPPWD{=22EULY#m`mp@w zXIR~G0@Fj0Ww`!lzKbIyC%Pn@CmCC_;Y+yKhnO0yZP1=#-^#730BM%kfojV{R%M!y z3ugJl<1BA&Cwo5G@K^`WyMPb*i(RYD84(Ali5#B05n9~K4{OwBzb}_**;IP#?D?qg zL@p|SqaCHCoo9YrV!*t6f0=vS-m?0!iW@gU@26%ys^|M*ZBX2m6ZC~%@*cX?j$uHZ z=VDr=%6n$BJCOZ)enz3DykpnY)yNN^yA&#azT$H@skmfH($4VaWT<~ zPO;%Zsm{aTD$`$e+pqK$`Uu^$^GK8U;?~g#=*1L&Q6q$6BCtz~TjCTj6m?`DewClr z`vZ|xIqU+JF_V!1(bPOuODe7J=VG{H?xf4gu(|2huB&F2X9;wXuHV#(a!t)JgY+G? z;`oM`mwG{FiK~f7fp4*SMYkz<1*BrE3U+|)kd?0vOZ7#+v5M>;1j*n|O zY2OE0SH`{w4%{5VV;LLrJ2zcSRjaxuPG*cWL)~f>63;-@%2vDT+J7n$bNP&raM~PZ zng%r{&+9M=*W36Eqs_~UX>ad3&c3O@`P`KnT1&sfSAnrtZ;@(-%@*ku2ug&LosIo)g((w%!NT9ibTh>=x>Tnnh z&21Xov!4A-gZ;!s%tXOYb5`rIviI%m&UxgIM{RRpM-<%iu9L+GaAc2mrfT;dhT-ff ze~@Jm`nnI+r)an)Onn{m&NN8_3J~1PMX??+1;%M^r#UdA69gBR5NjT27UjmkY|LO7 zLEII4D;mM>EdiErD-CO?PZ#2M131z%Q7fOAJYrW}P}|W$We{Ry*KWk!9`1EWwXCtv zl2>Y{W|Z24)zW5~=Ew&yZPzlD?+m(qVv#lF)%R7{Z`hnew@?k(1ny4g&B)zQEL;PG z0T$em{Ocnm2m z=;hq^x$z%xPs&Ts>T%Qkx9E^w#vz7@ko)f~C%mm*xdoo1db^0C39tbB9M*Vpyx#q* zb9F1pNd`zBFt}Ol!m( z$>$%|obk~oF?5oh_X5OVl7~F(eSrG3l?CWKYl2EEezZ`SM;V@;b~(MFp1eMRZ%AV$ zBTGG^iNMC1dFe}|ctc_1`6Ke>4ENJ-cvsToL>N#sgF^*3uIsUTvjsee^tgSps!3!^ z3(le0^pVc3_b+9P&TO>{DbgJmK}%zUQJ7{sCzk}6#QlA92;$>F7*J=ugp9;q(t=Aa zL5)svX%UNAj^zMcIyY~!+9*&EPVqN`EOb~t#e*k2#eK6%$;BSJL&Sfqj~(!!h%mmV zjYn@N!m4>>R4?Bk0;cbNuHv3&y4Xi4glOA5n12V++>=as_WTEoH=DqW2CV$;A5n2d z1)b3Pcz|g&-VhB}OD9ElGI2dqtt2iA`%$xB%Lv_j6Dnm?Yd_I09159}$5=lyUNzPH z{Yq+kvt68G*gF2DWA8i96vsW@%uM#ee;M&DTJbBDDK`BhciK5^+DC`_n1duSW_2rR z4Q^eU3}m`pgL}R@SdACM&E9QIhF>dJyeFqq4TDevOhIbcH2S`)OMxgAkGF{V+@HFTWy+sKoDE{h51yJ|gzIPW)C*lc

zYY%&=%Si zE}X>XL$2)yENoKbd19KK>V4XnTo`zJYEBV=NZ#Eh5Z z*z2VAP&HYKk-LW8(C6Uh2VZz)16x_^s!{BY%gZ|l|kBW}y+%VMH z@Xx&yu~JohSZUe|6e{ZmVB^b5nkD^kcVJnE4pCPlxRmMNlvW^v|2S2Guc7JKQadYU zm54GbD0fLT3T`22=NF*ki553H)0wYCOIrq;-Hl4<`ul~6< zbHC`ACot7Sky{^?hO+)Ow>3EAxev;u$;l(~Y1(Vx>M2Mi;IXMMOw_;+iYz~|26WAy z(Ne*mh-%JqT4h<`!$vi44Jtg>lh^)^A*J9&Ia2eQrD>JvRaePdI{Q?g&5A^FNcNWd zmmedviS|vR_^zR??8tNuJ$nlv>oTi3YQ{1T{CBNIU?qbXo_lV=1la)DGqtTT?_%(! zRyX=4BG@_T^vaB3B4M=crYg;TOr2d`EzhMrh*>AuLtAscGf82H>SmO4-*1Ea25_uI;+&k=p++-nP~XiWimsh_q*pJ&r;!4%`=Ndw0j|Fe2vQ8} zP^+x}eQ&Y&7O^^UIHtStc5}hG@8(Z%;cbpjJ?-iP0;Q-2$!(QGdKs_wVEekK&JXQ~ z8_<~)x6I35{GLEirSOxs*gGw_vs_R@{t%dDSRznqpgcV@Z1XO9(aw#t3|D_#f^<(Hyrz=yB0SqLu#Q&pMp~RlKOmrO7`RlX)U<%o1nt6(^QrBq{p^8 z8!9MQdq|r?s|M5T1jZ!fEV|2E5D~u^9uwWp#?zgv|9)v(`;B?Kez89h@cX+^!Lc6t zKW$0KPfzw!u5M1%@82%xEJyWFA)1<%9e>Juz^m}R${I()Kr85tHWj%;?l&IwSM?Fi z&OdVSd1KK@S=WYu<-886YIIUEFOo*REiHGvcy=lHE9qtF9dB4B_1C*tzJed{G$=aZ zw3bs0ic0>z`-~zyI5Za<0Myg1!gTqH0e^DX^qZ;_RwJ@(SeJ!w~6XvN?&N>X1Vh3Ir9H&-#~CE z63Z=z$g45(3C-C?J#l2El0~DHRBB7Q#W=cyp~Z)P#G_4Ja1t%wxVfXE4VGbdaSMO$ zJl=i`Q`BtY^S%)G+hS(K;YOB>t{(_=GLBM{431)G(kQu+$*Z-|jgCNN^J zdP`Ktc%O*k7jquOy*=m9hu@mPCe&L~!}f_VU&cen_zi1*Mz~*L>L-FTu1o#(7~RF& z1!Y@mIm!3NzL&(1dp#@UuTK$SDFCRLgGPr4MHzK`C1((Wv`?B0y59K?uHg%8w>0m> zP6BI5`5n<)2kG1eKfEnmnjc}`KD z9rwJ>dqt)H?95l)owe0`e1c7N%VrBMc+uziXu0Q*5-ditz<{0wXA+$tDQmSeB+ykOcK;vGptp-q$1LhOSO9c$tNsHqwFlrCZY2L59L=<7N4b6FV-R9L}A*iq37f% zzN=OVpCbJ08qw1W^~v=}5IB7v<*1wyPI~nG!F(1M!z(zeL53z@tv&?>e*rkoEj^}! znW5H$=x@3e9cAoSlWJHCTQJUdZvQ=RG5z6u3CbypbQa&BB}+)C+DJUJ+~cOt&{*}J zt5`@|Xr2JsQk^2k>gsZifcuO92m3gx=m}b;FjcBMaXKS{oKhhT*TVyeI{`_;QEBV# znMS||0Jd+bOawMXj^D2{u8K7Xk%}rC3|7dd-10E3-}k8oxFX^Q`I+d6_)w0(5Sa(T z{TnW~>*DFA79&?>h`Bzp;zVa+BxKC`3>srZHEa1PHS#rMGZX^3^N7h}~KL6m>AiAi8JOxd*$W+wb`X3b}1!hYY;8DApBhqPMk zSC%P8*>4{E!fs$$pVn4ZtUnEURZ+42v3$FtQfe7+XXY+g1dnGWOV=)xFR)}`jj-{s z``uE_Av@2QKbR*3_S|=GHGqw1<-I0*>Qh)h%U-jO#Z_~Bd{~71as8G@oy!um+hC`0 zb;h2&mD=3bBhw+AWTY1bD1ic+e`+5wo7eMeKjWSr;aaI+QUkU#xaF8jQoMLdRZ<>mTO##p8pP@QWHNzshfJ3icY?!y$eXGrzsR*YFJ0 zJFR-0+sxl%j9Yoe^?tvLvFW+=Z~1tdpFGLK&n*l<%(%DFjjnRC0W%?&FzN_?q6yNG!8&k$9)>4jzsLcVn(A*srXD?c;a)aaYa zZ^OG>7}v4IROGD(zkqT)^g0>6oq@c}NPNFV|J`=N>|LoP< zB`2^!k2xBOHV}h%z}k~hD9+IUguG;gtEbTwU8b8&QyKSMqdH`}JhyJAEeGW$=^Ywu z7eiSTFUroKoO!1gQXjtbAcp$UK4F`trATuWY`rKff1-A9;+dM&PmiEdhQa9dp7@W) zOg|nA_EfVWG;XN|hXxkUlB%sidm7N5d6pjOMhJmnmZ8< zK0@$ll%X^m+L-ioW};RgCg8mkF|4Uw`v`5)4TmysUbB`4B@fgPr`TMqa_DO0ZB} zPMRHpW0kXs2p0tTX$Je4-t{XGd#gSzN*fpB|6Ahj1f9?dTYhv8UwfC^3D09mHIE#) zi@mx(c`~l*KRz6ZDU2LA+~`!dB@AB1yxFVnS^SE2si{f`N$c|O8*pYaf3Rs+m7;#v z9M^B|gwz@uz&J^WwfT+XVE22ft-2nr+NiKi2kTD_?;dJ=4 zmXc#{In;d~kQXhYH#d#60aoIjRMsw$rtO3%plT6y_3m`Rr&3{+nxK=MjO)F^)G+hR z!OX&uElYk$PNKA%XS|E?*@yjn-D5^xk5Ozd*coj{dDcjAy%ElNOQIQU-+UAuU3*sz zCy1K2zeKXO>(!Ea&KL`L!NqrkO@-r^Zu@br*8B3M2a@{_>rvwqa9?T8ZcF#dc?Z9M zZ>el7Pt7Jl}$a*9j}tjO)rT}IGd7!`AM(#-fXVy15s%e-f} z=TWAz-zwR2>g)Pt1-9`Y#Q7cau8?oAJV*zz^R&V^_Zkg%DpT=3gMq~|yJZqbceC>k z(uj%8BWBL>+;$Q+h~sr%kLi1(-*oA3^eeUMd7E{nR~M4ll7@SWptXPWPjC{m6#-tN z%9KA}!8UP_@|7~Bsyj~gF+`qvv4~X{t@pBe8vx`=bqPDV-#2x=_m%KtosjMUN8Lf? zbuonJoQ1DQT&%UwZ6&|<5BZF-N6cnE_wL+Ma(zFl#_ZWlUs%?ifGdShu8GqY*LSI@ z50-#~67JV)eQQ!*b^#o!vuYLC|e_``PtLPMxD@@ERrS)=$?&n1)DFD z((0y4nNO}IbjxfJ`YJPz0M5+JLe;) z3y4o=)f2AednLv3jN#d?XnB{f5RZfmFrFL|b>2*Ifx5%i8)8AgiZ2{LA(jrL;w6Ak z7VMBN#&LvDir}su3bljg90s@}4#mS43Inyl{$#e)AK9TEFh>7By>J|ICnK(T9x`!@V9(1@wy_sy=U~D5oLyljuIYm<8l%SBUef#>8Z6Irt|Od3$u-G zyF9al?%=p1+)?(UIXM^9faU$1dTaDgcx8G)ue<~g%p|9qW7B0))BUXl)e@{1MIciG zOKtTw2&t5jnfK*DzOvC(w3u0m^zE6bVH=zLx3{Q=Hen8eF7c&5R|Opgb7-p~>_k?# zkPc?2AJ=9ntS?KwLKOyCCwMflS(8+DzAQtR_c$N5AEdrVqlw}~U7C=i+K-?DYqW?A zCf|>XIb@(Aer9O|<4Yp-W4X#9kqSM;bonIWZDMsApB{lt0U*_q1qrOf z>L@KA87}a!iZ)4*Zj?fLL1D~bLuS`8tQnkwpy+(0nr>nuHhX@=RuDc*DosJ=-*J^^T(nd};4w9M<=&hHVh3YW6Nk|0f}_HGFrWQ~-%o zpPQ;f2ga-(+V3#-nZ$grw4cwZ%o%(|``t60=!mLGmT(K0TObEwIbe(?32+qn59J#Kf_sy57K`V zY4JL;*t{J1+fvOv2=8c6+4l75ZTx#{-V1S|^V~ayU$5`PkuV*BRVAxnJ%{q{^S@P+ z8w_98LhW*vYZe1>_3?usG%Dx5 zp$3Zyh>DQNPP;)vXIczbxFUAKcZof(*koP}d1B5A^?6UC1ul?%KChoVV{Dyd+Ug*c zT@(A60A)b#i45DxqRQ>o`H4cReR!050}^N$Vz!x1Wm8>TNN$$DiSxfu0XD(;Jg>vO~M zg}02p5n_}sE}1;ytCnJeeQo{C0fr#;cAJd8kc>|EM=S}U0y+KGFP!k_q6dsF3}#FU z0dq5_)W6H@8t)XjS%5v%mus43ivqMSQc;uWS%Hys}hJtzGW zGwtzl+^PcM_s6zF^ImEeP2u36D1j4v-Y#(nDvX3{%hi_UJ(~Hl(YizM2y<}hK^e(4 zl_)8G2sMXsR|UuT`bxdv@-o(YdE`)HmR$6K6Z6h7DByjG=xV&nYMCF#PX@)o$wPM; zV~R1s3&2I02duHRP62(q<}#bs$m4Ry`_dR!PTp+MRDEBxbCt5PXvSNs&iM}o@>);h zE#Q%FMVq zDEfJLa4_+V5RyB)-V0ll@uRhFaKpB9{Me-W`c(*_^3k_@cwt(xg5c6t>(PjZnzwZ0 zP-G)l{o`wtRnV6Gc-xX9kj_Qs?iNldr`(h28SJ(H%rBZ+e;yIT9dmr;qBCYO?X1St(?9Mam2FRQy zlbi=gZ^;`+4F2{9MtYw1Az)X7Q%TlMRGPKl=M3N4z*&I{$#y3B8R5GXxcPcV>EUwQ zFh-I+R07X?#V_R0hv$kiV|G?xNIjHoL-;ba)BE-kntvdm^esJCcOLcWO3v4HYm4GF zphf+)`^b-1GQnaZ!4w`M24psJ^~uiw)F5JU!x|JJI2a}|pJ?wOY-t1ft&9F>RBt*G zc9s2YX8uVLR?}|`#25#kBIK%;^S^-jLCqLF5C%!6y_G{&B_B+ z;gVh#&ifPPK)sjTxmc@5P`WAV9thtfSIXpZ+lsPF$YozFj7&2nST`*FhO{`L_kuZm zK31KA&UkSth*Ax6->p`WtCzAZOg)6&DP|aZ)4Ld+x1P@u7*nucgY0{w%AWZ5T>>)& zr4lBTGM@XrdM=u7eaq(ZXvgzWj{P{@rIhEmVa@x%%&GLeZ z)~4REPp?7YRTIV6iamSBPeFVvP21Z+`!AjhxCFccgJSnlZu=ozWsYtC>+ znTFD;F!7DQeH9|WQcJ#*VU)}BE%r=-KGz|fq70SNE9A6AAsKn0VQ7DA;5)Au;W~KM zXTIn(?_7f&a_Z9xgd9YUKrW?Y{1a?N!mCZyuGQ^v%yHH8uK6amo`Pmjx>o9Ifg=**lmj9b)P%m%EaJ)%2)iC+}QZe~|{jK6&zfx0v0=(LCx6;i4Ff#$TUzuAN5a zA`A)bBXRxp$OWb8L@E$ao04LMJ~n~fhcDpKcE~A)9!YblCsp&U|Dp(<3PSvz;>D8% zu=$}ZyUtaBX)E#|F+YpD9piv!T~Lq~WKL?3&d?__IB&iWnk7~7yxKIwE-$Sf<2ddg zlO;o`Ap=gy(;%eNtMr``A*LS}xbsF?*bBJ$6sn=$m!4R{X}lXp?9K6Bt?p|uff;sK zqNHB-CQ6CMLtsW}@qp~cyQs8z%+Ho??FrbrD+ADcYK62u|`4l(Fx^f5=`r?d~l zpxX*U(E#c`ikE;)V(yhyPjHl2r_SM;dDgWcBgN-CwGW7-t+J0G zs& zv>YSP`KF0eFjw;F+Hagf%`I2qU@(tkFR{m09ShZXF&%;t3J6^W$8noSl3SD!b~X&% zjERy-%n=8al&aGE9s8OJ3X9o}e%LM=E1W)H*7aWx zq8m3L_17FX2s<;7_Q;tJW15{>&&(I!FiEZ~dN(ejeui}hOM{35#I_dH{oePtx)1yW z`Q|h(Fl9#tpxZ{99y|P;UQ~LVT6?k6-`&uj^XTFo(H$Y~Rr*z4ncb6j{A$7^9FN%G zXAP^bZ{jmmVyc$DinrZ(E%2imKeb(B)IO7H`#2gmA#8u1AFrMh9AOxA?N;d9#eCHt zSE4Xud@9~>RJ-Vp2xwy$reW3{R&Gh{XrRbrdy+I8oR}X*ynj=?XfDA=A&)nh8<2KTozl;3Iz_`630Oy-KU}t6hfh~o zKob9izy6X|Qnt-w&{Y|w{WIEGygeFQeB`FDM}w*+}d2O$WYBCLXd$aqdAB4ve`lg!&9lP`UFI(LNfU<37t zVtk$Y{fZ57(y_(clRrXp*YvumrV@Jx6~#BUUIUVx##8eH3w~dyX4z%z`ap2UHzPL{ zD?E-OKC1>=49SY7a2eDw_KL>bz)Q^8%4Ry@@@7&gR~d#pQ_XRLZgy@KF1nElwjFd#Ka`@T{qefe4^UAp0q!K0x_@^IsS z3sbdc;Njp0(dTiLq3jA)YF>Zk+5B{7e%t+b@nB1teO=}aqn^P<1?fl9L8gdm71dlO zI++ls;4W#yZTn^=AuOo;q|B1qPe)togm_B<+;O&r*XtUF9mztzndxenu=4r7j3~x? z`Db06NLHmc{d0C?50RD{rry~GwR0Zw@}atyH&W#v=Ea|aT;lp8-l&DK6yJxCulauF z{4oTCdzRWj=nu7+qQo3Jh+MjseqZUa^kkD0_Vjt$tHVh&C)Rb`I@J2 zeUfxwaf{hRnb;3SL6Gm<(umNxbD0s8tlFm#+A4mS+Log9<)Y98Yjz-r3TXj32KF!C zVV^}Au86ZyYO|$r9q=AHy6mIMxrfQ05@JY5YX=jjofNlmp+D?#QRgG$wrC$8-c+iz zOgoCRjU2$Ki;68}OPtO8LoGqsTU`r@PX|@2d0!9ck=8D|tUcBdA_XoNG+2zRh-jxb z$!yKy*%DUWbh$xOMB2O76gz9HQLAaBEi0_ldHnT4XbSXR@|X>1&R}U=h{PK{7^7&0 z^w~^n5L;&;tQlzwxy9n-*>3d?IM}~?l)q-C6!B^Ipu*FxUg;uMP%rH{*U#jDV;`6C zwT4{FONEhjR@K?d=VSBjovDwLBmZ7aVQ#K+s8|OnClZuZUy?!1Mz`fW2AYcE43)W6 zGkD-ti!QCRZZGB>OX8T%LKS(Mc1xY42R<#~!IKUy+-;qKTIl>+znPuVp4h~lSLzR25Tlzo0{jfhWnX^b($Gz^%uG@0q zi?h|8bnKGzH{&^5b$Yq{Z)@uqw_da*hen8#?(V)(MYfZjYc4po3QCfo8>UlLRlEia=b~JW~ouH zdc8dzqVY_vX%UKY?L1&*qvnh<3)vynf(@7jFzbW1vAD~9%3<9*)#e7-mVNUH(eDbl zFnU>)X;dCR6m}_$Nfc1&`EMnz>Cug_#X5&Hf2u8%-%nMAdqb)sD9w;O%s#QX2=_cf z7vFjECL_u_2z9O0_7^HT&FEs^+16FDE)<8RQ`c2tGKQ-)B#Xy`ivjJr@fdZ|d2F1T zpCP#;%}{u(K7cSOx`8zCk)|YAP1Bq{UP&ylMrK=vavp_j+G2Oj(qpIcQl$A>_&*Ne z|Dn(P?Vd_tk~X{|e&_VlTB`;Ud>i7&AQ_ZJ@<$y9MDo;*B zpF3qRl3rRIuM3(XRw^E%&@R#Jey9?IUOtjeY>KWJ=%PaKUf$N%u~tkC$tXx@a+o zBzBqYSj|ci0f4BzLvXDP!+9F5S}_FgL2}9h?`rT6-ByF6M%cS|cnD|(17b^E3q!bV ziH}hG3=Mhr^>L+%@mPf#-akPje-DcKs&${CmG?5;zZ@;uuT3~{WzQgtPio4`<4p zT#!rMqR2bzdZiqo)eN8=`8H|ju##|Q>fH4N1KQb!o0d%Y^lh_NC(>K4b5GU`(MQ96 zuF+SV0XzEiZxRqbryzX?W3yR`Y$4s5l0p_wuyjG7vHXRvcZqz4U(QEz zO$ThndYWQ`4grdNr5W#p#aeUhL2NC_@nY2f|L9=bFSCIAi>IJw_fyc8&naj$S@{%n z3i>v3{L5<5KJ|&K?c@F9E>pLixvj!KxMApPX}VK2^8K|#&k{wUeag^ogUy_~OJu}9 zD+8W?^@2Y|PC+f^%1_03&B`xgT#kQP_{d*;xu%K4FCmoQ&3*aI1cf=(00Qa^?1z?XZ)cRFni9R zq6?344x*u}6LVX_sTJg6otp>$#cnY>RqQ7M_i_8^={B+VPg^AE_(yGk%Nok4W6lH zIM)B<-pzlV!1I-+#hz{JdwU9c)pm?VtnB^+zJfH!wb-m3hlKN1BM{e9Q05WFLI0I8 zNAsaQ-3*|!*?RAk|J!x~w4PH?L8;GBm$W7())A=A7X|IaY~LD~rW-xaJ;K)H=V9?! zyAW))oK%AEVcV(;WL@-xCVcZ0WGyg56FN4@w5pAamLgTYOl7!z*oIRyp8Hq4TY}UD z1{$YouVG9gBwRsUSluI&=&d=Fp0iWMS11a?9KZkn`dDBUE#HqF(Rgiqp2*AICwdw^ zCqRe|24)cKh~ZHd@Z2kpVVr_7*=A?QV*3fi0bH?T`6(zjc7?1Q1H8tBVg`f4lVU5) z*R73)%Pyd{lcJv`Z7cPBufLvxj#7C}0Hwx?`-Zal?7Ku^;<+1!hvYYkTNrY0FQxY) z-}QVfG>jyhp9=eIB{9z5k5R{(4&m58jGWYD@qQNtu!62X#4sYxLOaa4rD%H^^1Gk*oC#X=Ll6pj6Kqe zUT?DfD*k;JIelvCq48xD+9-MP1BzTlZ4Q-Mndnol>TVieX2S9t1gv>B-j=h;52GoJgla50`eyxYia< e1Osmlp;GE*{4VJ%+RSA8ga+pJNx_^y{q{d%y%R+M literal 0 HcmV?d00001 From 3f9d689ccef4d7ffeebdba6ecd26f57b039f4451 Mon Sep 17 00:00:00 2001 From: klessard Date: Sun, 25 Apr 2021 22:27:28 -0400 Subject: [PATCH 02/60] Add missing dependencies --- ndarray/pom.xml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/ndarray/pom.xml b/ndarray/pom.xml index d852f9bcd32..af863042f57 100644 --- a/ndarray/pom.xml +++ b/ndarray/pom.xml @@ -36,6 +36,29 @@ org.tensorflow.ndarray + + + org.junit.jupiter + junit-jupiter-api + test + + + org.junit.jupiter + junit-jupiter-engine + test + + + org.openjdk.jmh + jmh-core + test + + + org.openjdk.jmh + jmh-generator-annprocess + test + + + From edfc4d6eb15d49eea7bb6a83de013ed6689cd2c6 Mon Sep 17 00:00:00 2001 From: klessard Date: Sun, 25 Apr 2021 22:43:32 -0400 Subject: [PATCH 03/60] Fix settings.xml path --- ndarray/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ndarray/pom.xml b/ndarray/pom.xml index af863042f57..3a8ba7189f4 100644 --- a/ndarray/pom.xml +++ b/ndarray/pom.xml @@ -27,7 +27,7 @@ ndarray jar - Java NdArray Library + NdArray Java Library Utility library for N-dimensional data I/O operations in Java. From 2fe76c0f4ddec7b00ca9c202030cb25fe915433d Mon Sep 17 00:00:00 2001 From: Ryan Nett Date: Tue, 18 May 2021 16:07:36 -0700 Subject: [PATCH 04/60] Kotlin friendly names (Shape.get) --- .../java/org/tensorflow/ndarray/Shape.java | 75 ++++++++++++++++--- .../org/tensorflow/ndarray/StdArrays.java | 4 +- .../impl/dimension/DimensionalSpace.java | 6 +- .../tensorflow/ndarray/NdArrayTestBase.java | 18 ++--- .../org/tensorflow/ndarray/ShapeTest.java | 30 +++++--- 5 files changed, 96 insertions(+), 37 deletions(-) diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/Shape.java b/ndarray/src/main/java/org/tensorflow/ndarray/Shape.java index 85a905408c7..d8bb2bb5c38 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/Shape.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/Shape.java @@ -17,7 +17,9 @@ package org.tensorflow.ndarray; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; /** * The shape of a Tensor or {@link NdArray}. @@ -74,8 +76,8 @@ public static Shape scalar() { * Shape scalar = Shape.of() * } * - * @param dimensionSizes number of elements in each dimension of this shape, if any, or - * {@link Shape#UNKNOWN_SIZE} if unknown. + * @param dimensionSizes number of elements in each dimension of this shape, if any, or {@link + * Shape#UNKNOWN_SIZE} if unknown. * @return a new shape */ public static Shape of(long... dimensionSizes) { @@ -108,13 +110,34 @@ public long size() { * an unknown size, {@link Shape#UNKNOWN_SIZE} is returned. * * @param i the index of the dimension to get the size for. If this Shape has a known number of - * dimensions, it must be < {@link Shape#numDimensions()}. The index may be negative, in which - * case the position is counted from the end of the shape. E.g.: {@code size(-1)} returns the - * size of the last dimension, {@code size(-2)} the size of the second to last dimension etc. + * dimensions, it must be < {@link Shape#numDimensions()}. The index may be negative, in + * which case the position is counted from the end of the shape. E.g.: {@code size(-1)} + * returns the size of the last dimension, {@code size(-2)} the size of the second to last + * dimension etc. * @return The size of the dimension with the given index if known, {@link Shape#UNKNOWN_SIZE} * otherwise. + * @deprecated Renamed to {@link #get(int)}. */ - public long size(int i) { + @Deprecated + public long size(int i){ + return get(i); + } + + /** + * The size of the dimension with the given index. + * + *

If {@link Shape#isUnknown()} is true or the size of the dimension with the given index has + * an unknown size, {@link Shape#UNKNOWN_SIZE} is returned. + * + * @param i the index of the dimension to get the size for. If this Shape has a known number of + * dimensions, it must be < {@link Shape#numDimensions()}. The index may be negative, in + * which case the position is counted from the end of the shape. E.g.: {@code size(-1)} + * returns the size of the last dimension, {@code size(-2)} the size of the second to last + * dimension etc. + * @return The size of the dimension with the given index if known, {@link Shape#UNKNOWN_SIZE} + * otherwise. + */ + public long get(int i) { if (dimensionSizes == null) { return UNKNOWN_SIZE; } else if (i >= 0) { @@ -177,6 +200,24 @@ public long[] asArray() { } } + /** + * Returns a defensive copy of the this Shape's axes. Changes to the returned list do not change + * this Shape's state. Returns null if {@link Shape#isUnknown()} is true. + */ + public List toListOrNull() { + long[] array = asArray(); + if (array == null) { + return null; + } + + List list = new ArrayList<>(array.length); + for (long l : array) { + list.add(l); + } + + return list; + } + @Override public int hashCode() { return dimensionSizes != null ? Arrays.hashCode(dimensionSizes) : super.hashCode(); @@ -186,6 +227,7 @@ public int hashCode() { * Equals implementation for Shapes. Two Shapes are considered equal iff: * *

+ * *

    *
  • the number of dimensions is defined and equal for both *
  • the size of each dimension is defined and equal for both @@ -236,7 +278,8 @@ public Shape head() { * Returns an n-dimensional Shape with the dimensions matching the first n dimensions of this * shape * - * @param n the number of leading dimensions to get, must be <= than {@link Shape#numDimensions()} + * @param n the number of leading dimensions to get, must be <= than {@link + * Shape#numDimensions()} * @return an n-dimensional Shape with the first n dimensions matching the first n dimensions of * this Shape */ @@ -252,7 +295,9 @@ public Shape take(int n) { /** Returns a new Shape, with this Shape's first dimension removed. */ public Shape tail() { - if (dimensionSizes.length < 2) return Shape.of(); + if (dimensionSizes.length < 2) { + return Shape.of(); + } return Shape.of(Arrays.copyOfRange(dimensionSizes, 1, dimensionSizes.length)); } @@ -276,15 +321,21 @@ public Shape takeLast(int n) { } /** - * Return a {@code end - begin} dimensional shape with dimensions matching this Shape from {@code begin} to {@code end}. + * Return a {@code end - begin} dimensional shape with dimensions matching this Shape from {@code + * begin} to {@code end}. + * * @param begin Where to start the sub-shape. * @param end Where to end the sub-shape, exclusive. * @return the sub-shape bounded by begin and end. */ - public Shape subShape(int begin, int end){ + public Shape subShape(int begin, int end) { if (end > numDimensions()) { throw new ArrayIndexOutOfBoundsException( - "End index " + end + " out of bounds: shape only has " + numDimensions() + " dimensions."); + "End index " + + end + + " out of bounds: shape only has " + + numDimensions() + + " dimensions."); } if (begin < 0) { throw new ArrayIndexOutOfBoundsException( @@ -423,7 +474,7 @@ public boolean isCompatibleWith(Shape shape) { return false; } for (int i = 0; i < numDimensions(); i++) { - if (!isCompatible(size(i), shape.size(i))) { + if (!isCompatible(get(i), shape.get(i))) { return false; } } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java b/ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java index 7d847bd1a9c..249e69af0d6 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java @@ -3798,9 +3798,9 @@ private static int[] computeArrayDims(NdArray ndArray, int expectedRank) { } int[] arrayShape = new int[expectedRank]; for (int i = 0; i < expectedRank; ++i) { - long dimSize = shape.size(i); + long dimSize = shape.get(i); if (dimSize > Integer.MAX_VALUE) { - throw new IllegalArgumentException("Dimension " + i + " is too large to fit in a standard array (" + shape.size(i) + ")"); + throw new IllegalArgumentException("Dimension " + i + " is too large to fit in a standard array (" + shape.get(i) + ")"); } arrayShape[i] = (int)dimSize; } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/DimensionalSpace.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/DimensionalSpace.java index 7d0f0222bbe..93270131e38 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/DimensionalSpace.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/DimensionalSpace.java @@ -28,7 +28,7 @@ public static DimensionalSpace create(Shape shape) { // Start from the last dimension, where all elements are continuous for (int i = dimensions.length - 1, elementSize = 1; i >= 0; --i) { - dimensions[i] = new Axis(shape.size(i), elementSize); + dimensions[i] = new Axis(shape.get(i), elementSize); elementSize *= dimensions[i].numElements(); } return new DimensionalSpace(dimensions, shape); @@ -189,7 +189,9 @@ public long positionOf(long[] coords) { return position; } - /** Succinct description of the shape meant for debugging. */ + /** + * Succinct description of the shape meant for debugging. + */ @Override public String toString() { return Arrays.toString(dimensions); diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/NdArrayTestBase.java b/ndarray/src/test/java/org/tensorflow/ndarray/NdArrayTestBase.java index 26ac533daa8..ec020f4f59a 100644 --- a/ndarray/src/test/java/org/tensorflow/ndarray/NdArrayTestBase.java +++ b/ndarray/src/test/java/org/tensorflow/ndarray/NdArrayTestBase.java @@ -24,10 +24,10 @@ import static org.tensorflow.ndarray.index.Indices.at; import static org.tensorflow.ndarray.index.Indices.even; import static org.tensorflow.ndarray.index.Indices.flip; -import static org.tensorflow.ndarray.index.Indices.sliceFrom; import static org.tensorflow.ndarray.index.Indices.odd; import static org.tensorflow.ndarray.index.Indices.range; import static org.tensorflow.ndarray.index.Indices.seq; +import static org.tensorflow.ndarray.index.Indices.sliceFrom; import static org.tensorflow.ndarray.index.Indices.sliceTo; import java.nio.BufferOverflowException; @@ -132,15 +132,15 @@ public void iterateElements() { long value = 0L; for (NdArray matrix : matrix3d.elements(0)) { assertEquals(2L, matrix.shape().numDimensions()); - assertEquals(4L, matrix.shape().size(0)); - assertEquals(5L, matrix.shape().size(1)); + assertEquals(4L, matrix.shape().get(0)); + assertEquals(5L, matrix.shape().get(1)); for (NdArray vector : matrix.elements(0)) { - assertEquals(1L, vector.shape().numDimensions()) ; - assertEquals(5L, vector.shape().size(0)); + assertEquals(1L, vector.shape().numDimensions()); + assertEquals(5L, vector.shape().get(0)); for (NdArray scalar : vector.scalars()) { - assertEquals(0L, scalar.shape().numDimensions()) ; + assertEquals(0L, scalar.shape().numDimensions()); scalar.setObject(valueOf(value++)); try { scalar.elements(0); @@ -162,7 +162,7 @@ public void iterateElements() { @Test public void slices() { NdArray matrix3d = allocate(Shape.of(5, 4, 5)); - + T val100 = valueOf(100L); matrix3d.setObject(val100, 1, 0, 0); T val101 = valueOf(101L); @@ -318,8 +318,8 @@ public void equalsAndHashCode() { NdArray array4 = allocate(Shape.of(1, 2, 2)); @SuppressWarnings("unchecked") - T[][][] values = (T[][][])(new Object[][][] { - { { valueOf(0L), valueOf(1L) }, { valueOf(2L), valueOf(0L) } } + T[][][] values = (T[][][]) (new Object[][][]{ + {{valueOf(0L), valueOf(1L)}, {valueOf(2L), valueOf(0L)}} }); StdArrays.copyTo(values[0], array1); diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/ShapeTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/ShapeTest.java index d2e3e432a2c..c1247aba4e9 100644 --- a/ndarray/src/test/java/org/tensorflow/ndarray/ShapeTest.java +++ b/ndarray/src/test/java/org/tensorflow/ndarray/ShapeTest.java @@ -16,9 +16,15 @@ */ package org.tensorflow.ndarray; -import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; -import static org.junit.jupiter.api.Assertions.*; +import org.junit.jupiter.api.Test; public class ShapeTest { @@ -26,22 +32,22 @@ public class ShapeTest { public void allKnownDimensions() { Shape shape = Shape.of(5, 4, 5); assertEquals(3, shape.numDimensions()); - assertEquals(5, shape.size(0)); - assertEquals(4, shape.size(1)); - assertEquals(5, shape.size(2)); + assertEquals(5, shape.get(0)); + assertEquals(4, shape.get(1)); + assertEquals(5, shape.get(2)); assertEquals(100, shape.size()); - assertArrayEquals(new long[] {5, 4, 5}, shape.asArray()); + assertArrayEquals(new long[]{5, 4, 5}, shape.asArray()); try { - shape.size(3); + shape.get(3); fail(); } catch (IndexOutOfBoundsException e) { // as expected } - assertEquals(5, shape.size(-1)); - assertEquals(4, shape.size(-2)); - assertEquals(5, shape.size(-3)); + assertEquals(5, shape.get(-1)); + assertEquals(4, shape.get(-2)); + assertEquals(5, shape.get(-3)); try { - shape.size(-4); + shape.get(-4); fail(); } catch (IndexOutOfBoundsException e) { // as expected @@ -133,7 +139,7 @@ public void testShapeModification() { long[] internalShape = one.asArray(); assertNotNull(internalShape); internalShape[0] = 42L; - assertEquals(2L, one.size(0)); + assertEquals(2L, one.get(0)); } @Test From 210f8e00bb5d6f97436084fd8c4b03051ff9af90 Mon Sep 17 00:00:00 2001 From: Karl Lessard Date: Tue, 27 Jul 2021 17:33:25 -0400 Subject: [PATCH 05/60] Fix bug when slicing on a segmented dimension (#2) --- .../impl/dimension/DimensionalSpace.java | 2 +- .../tensorflow/ndarray/NdArrayTestBase.java | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/DimensionalSpace.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/DimensionalSpace.java index 93270131e38..71d16776687 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/DimensionalSpace.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/DimensionalSpace.java @@ -144,7 +144,7 @@ public DimensionalSpace from(int dimensionStart) { throw new IndexOutOfBoundsException(); } Dimension[] newDimensions = Arrays.copyOfRange(dimensions, dimensionStart, dimensions.length); - if (segmentationIdx > dimensionStart) { + if (segmentationIdx >= dimensionStart) { return new DimensionalSpace(newDimensions, segmentationIdx - dimensionStart); } return new DimensionalSpace(newDimensions); diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/NdArrayTestBase.java b/ndarray/src/test/java/org/tensorflow/ndarray/NdArrayTestBase.java index ec020f4f59a..c44db8d7ec5 100644 --- a/ndarray/src/test/java/org/tensorflow/ndarray/NdArrayTestBase.java +++ b/ndarray/src/test/java/org/tensorflow/ndarray/NdArrayTestBase.java @@ -34,6 +34,7 @@ import java.nio.BufferUnderflowException; import org.junit.jupiter.api.Test; import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.index.Indices; public abstract class NdArrayTestBase { @@ -335,4 +336,26 @@ public void equalsAndHashCode() { assertNotEquals(array1, array4); assertNotEquals(array1.hashCode(), array4.hashCode()); } + + @Test + public void iterateScalarsOnSegmentedElements() { + NdArray originalTensor = allocate(Shape.of(2, 3)); + + originalTensor + .setObject(valueOf(0L), 0, 0) + .setObject(valueOf(1L), 0, 1) + .setObject(valueOf(2L), 0, 2) + .setObject(valueOf(3L), 1, 0) + .setObject(valueOf(4L), 1, 1) + .setObject(valueOf(5L), 1, 2); + + NdArray slice = originalTensor.slice(Indices.all(), Indices.sliceFrom(1)); + assertEquals(Shape.of(2, 2), slice.shape()); + + slice.elements(0).forEachIndexed((eCoord, e) -> { + e.scalars().forEachIndexed((sCoord, s) -> { + assertEquals(valueOf((eCoord[0] * originalTensor.shape().get(1)) + sCoord[0] + 1), s.getObject()); + }); + }); + } } From 01dfc1e41b4e88c11d5e4d01e2d7a552264fc0fe Mon Sep 17 00:00:00 2001 From: Jim Clarke Date: Wed, 4 Aug 2021 13:15:40 -0400 Subject: [PATCH 06/60] Sparse tensor (#3) --- .../java/org/tensorflow/ndarray/NdArrays.java | 426 ++++++++++++-- .../org/tensorflow/ndarray/SparseNdArray.java | 50 ++ .../ndarray/impl/AbstractNdArray.java | 55 +- .../impl/sparse/AbstractSparseNdArray.java | 525 ++++++++++++++++++ .../impl/sparse/BooleanSparseNdArray.java | 428 ++++++++++++++ .../impl/sparse/ByteSparseNdArray.java | 418 ++++++++++++++ .../impl/sparse/DoubleSparseNdArray.java | 419 ++++++++++++++ .../impl/sparse/FloatSparseNdArray.java | 417 ++++++++++++++ .../ndarray/impl/sparse/IntSparseNdArray.java | 432 ++++++++++++++ .../impl/sparse/LongSparseNdArray.java | 417 ++++++++++++++ .../impl/sparse/ShortSparseNdArray.java | 418 ++++++++++++++ .../ndarray/impl/sparse/SparseNdArray.java | 397 +++++++++++++ .../ndarray/impl/sparse/Validator.java | 46 ++ .../impl/sparse/slice/BooleanSparseSlice.java | 139 +++++ .../impl/sparse/slice/ByteSparseSlice.java | 138 +++++ .../impl/sparse/slice/DoubleSparseSlice.java | 140 +++++ .../impl/sparse/slice/FloatSparseSlice.java | 140 +++++ .../impl/sparse/slice/IntSparseSlice.java | 140 +++++ .../impl/sparse/slice/LongSparseSlice.java | 140 +++++ .../impl/sparse/slice/ObjectSparseSlice.java | 115 ++++ .../impl/sparse/slice/ShortSparseSlice.java | 140 +++++ .../impl/sparse/slice/SparseSlice.java | 145 +++++ .../tensorflow/ndarray/SparseNdArrayTest.java | 191 +++++++ .../impl/dense/FloatDenseNdArrayTest.java | 76 ++- .../impl/sparse/BooleanSparseNdArrayTest.java | 314 +++++++++++ .../impl/sparse/ByteSparseNdArrayTest.java | 305 ++++++++++ .../impl/sparse/DoubleSparseNdArrayTest.java | 305 ++++++++++ .../impl/sparse/FloatSparseNdArrayTest.java | 314 +++++++++++ .../impl/sparse/IntSparseNdArrayTest.java | 312 +++++++++++ .../impl/sparse/LongSparseNdArrayTest.java | 311 +++++++++++ .../impl/sparse/ShortSparseNdArrayTest.java | 315 +++++++++++ .../impl/sparse/StringSparseNdArrayTest.java | 341 ++++++++++++ 32 files changed, 8376 insertions(+), 93 deletions(-) create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/SparseNdArray.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/AbstractSparseNdArray.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArray.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArray.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArray.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArray.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArray.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArray.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/SparseNdArray.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/Validator.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/BooleanSparseSlice.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ByteSparseSlice.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/DoubleSparseSlice.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/FloatSparseSlice.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/IntSparseSlice.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/LongSparseSlice.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ObjectSparseSlice.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ShortSparseSlice.java create mode 100644 ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/SparseSlice.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/SparseNdArrayTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArrayTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArrayTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArrayTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArrayTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArrayTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArrayTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArrayTest.java create mode 100644 ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/StringSparseNdArrayTest.java diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/NdArrays.java b/ndarray/src/main/java/org/tensorflow/ndarray/NdArrays.java index 8ad55cae7ed..64ab7eb3f0d 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/NdArrays.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/NdArrays.java @@ -1,23 +1,21 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray; -import org.tensorflow.ndarray.impl.dense.DenseNdArray; -import org.tensorflow.ndarray.impl.dense.IntDenseNdArray; import org.tensorflow.ndarray.buffer.BooleanDataBuffer; import org.tensorflow.ndarray.buffer.ByteDataBuffer; import org.tensorflow.ndarray.buffer.DataBuffer; @@ -29,14 +27,22 @@ import org.tensorflow.ndarray.buffer.ShortDataBuffer; import org.tensorflow.ndarray.impl.dense.BooleanDenseNdArray; import org.tensorflow.ndarray.impl.dense.ByteDenseNdArray; +import org.tensorflow.ndarray.impl.dense.DenseNdArray; import org.tensorflow.ndarray.impl.dense.DoubleDenseNdArray; import org.tensorflow.ndarray.impl.dense.FloatDenseNdArray; +import org.tensorflow.ndarray.impl.dense.IntDenseNdArray; import org.tensorflow.ndarray.impl.dense.LongDenseNdArray; import org.tensorflow.ndarray.impl.dense.ShortDenseNdArray; - -/** - * Utility class for instantiating {@link NdArray} objects. - */ +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; +import org.tensorflow.ndarray.impl.sparse.BooleanSparseNdArray; +import org.tensorflow.ndarray.impl.sparse.ByteSparseNdArray; +import org.tensorflow.ndarray.impl.sparse.DoubleSparseNdArray; +import org.tensorflow.ndarray.impl.sparse.FloatSparseNdArray; +import org.tensorflow.ndarray.impl.sparse.IntSparseNdArray; +import org.tensorflow.ndarray.impl.sparse.LongSparseNdArray; +import org.tensorflow.ndarray.impl.sparse.ShortSparseNdArray; + +/** Utility class for instantiating {@link NdArray} objects. */ public final class NdArrays { // BYTE ARRAYS @@ -54,8 +60,8 @@ public static ByteNdArray scalarOf(byte value) { /** * Creates a byte vector (rank 1) initialized with the given values. * - *

    Modifying the data of the returned vector will also impact the values in the array - * passed in parameter. + *

    Modifying the data of the returned vector will also impact the values in the array passed in + * parameter. * * @param values vector values * @return new byte vector @@ -90,13 +96,51 @@ public static ByteNdArray ofBytes(Shape shape) { * @param shape shape of the array * @param buffer buffer to wrap * @return new byte N-dimensional array - * @throws IllegalArgumentException if shape is null, has unknown dimensions or has size bigger - * in the buffer size + * @throws IllegalArgumentException if shape is null, has unknown dimensions or has size bigger in + * the buffer size */ public static ByteNdArray wrap(Shape shape, ByteDataBuffer buffer) { return ByteDenseNdArray.create(buffer, shape); } + /** + * Creates a Sparse array of byte values with a default value of zero + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D ByteNdArray of shape {@code [N]}, which supplies the values for each + * element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code + * values=[18, 3]} specifies that element {@code [1,3]} of the sparse NdArray has a value of + * {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3}. + * @param shape the shape of the dense array represented by this sparse array. + * @return the byte sparse array. + */ + public static ByteSparseNdArray sparseOf(LongNdArray indices, ByteNdArray values, Shape shape) { + return ByteSparseNdArray.create(indices, values, DimensionalSpace.create(shape)); + } + + /** + * Creates a Sparse array of byte values + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non default values. + * @param values A 1-D ByteNdArray of shape {@code [N]}, which supplies the values for each + * element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code + * values=[18, 3]} specifies that element {@code [1,3]} of the sparse NdArray has a value of + * {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3}. + * @param defaultValue Scalar value to set for indices not specified in 'indices' + * @param shape the shape of the dense array represented by this sparse array. + * @return the byte sparse array. + */ + public static ByteSparseNdArray sparseOf( + LongNdArray indices, ByteNdArray values, byte defaultValue, Shape shape) { + return ByteSparseNdArray.create(indices, values, defaultValue, DimensionalSpace.create(shape)); + } + // LONG ARRAYS /** @@ -112,8 +156,8 @@ public static LongNdArray scalarOf(long value) { /** * Creates a long vector (rank 1) initialized with the given values. * - *

    Modifying the data of the returned vector will also impact the values in the array - * passed in parameter. + *

    Modifying the data of the returned vector will also impact the values in the array passed in + * parameter. * * @param values vector values * @return new long vector @@ -145,13 +189,51 @@ public static LongNdArray ofLongs(Shape shape) { * @param shape shape of the array * @param buffer buffer to wrap * @return new long N-dimensional array - * @throws IllegalArgumentException if shape is null, has unknown dimensions or has size bigger - * in the buffer size + * @throws IllegalArgumentException if shape is null, has unknown dimensions or has size bigger in + * the buffer size */ public static LongNdArray wrap(Shape shape, LongDataBuffer buffer) { return LongDenseNdArray.create(buffer, shape); } + /** + * Creates a Sparse array of long values with a default value of zero + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D LongNdArray of shape {@code [N]}, which supplies the values for each + * element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code + * values=[18, 3]} specifies that element {@code [1,3]} of the sparse NdArray has a value of + * {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3}. + * @param shape the shape of the dense array represented by this sparse array. + * @return the long sparse array. + */ + public static LongSparseNdArray sparseOf(LongNdArray indices, LongNdArray values, Shape shape) { + return LongSparseNdArray.create(indices, values, DimensionalSpace.create(shape)); + } + + /** + * Creates a Sparse array of long values with a default value of zero + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D LongNdArray of shape {@code [N]}, which supplies the values for each + * element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code + * values=[18, 3]} specifies that element {@code [1,3]} of the sparse NdArray has a value of + * {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3}. + * @param defaultValue Scalar value to set for indices not specified in 'indices' + * @param shape the shape of the dense array represented by this sparse array. + * @return the long sparse array. + */ + public static LongSparseNdArray sparseOf( + LongNdArray indices, LongNdArray values, long defaultValue, Shape shape) { + return LongSparseNdArray.create(indices, values, defaultValue, DimensionalSpace.create(shape)); + } + // INT ARRAYS /** @@ -167,8 +249,8 @@ public static IntNdArray scalarOf(int value) { /** * Creates a int vector (rank 1) initialized with the given values. * - *

    Modifying the data of the returned vector will also impact the values in the array - * passed in parameter. + *

    Modifying the data of the returned vector will also impact the values in the array passed in + * parameter. * * @param values vector values * @return new int vector @@ -200,13 +282,51 @@ public static IntNdArray ofInts(Shape shape) { * @param shape shape of the array * @param buffer buffer to wrap * @return new int N-dimensional array - * @throws IllegalArgumentException if shape is null, has unknown dimensions or has size bigger - * in the buffer size + * @throws IllegalArgumentException if shape is null, has unknown dimensions or has size bigger in + * the buffer size */ public static IntNdArray wrap(Shape shape, IntDataBuffer buffer) { return IntDenseNdArray.create(buffer, shape); } + /** + * Creates a Sparse array of int values with a default value of zero. + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D IntNdArray of shape {@code [N]}, which supplies the values for each element + * in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code + * values=[18, 3]} specifies that element {@code [1,3]} of the sparse NdArray has a value of + * {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3}. + * @param shape the shape of the dense array represented by this sparse array. + * @return the int sparse array. + */ + public static IntSparseNdArray sparseOf(LongNdArray indices, IntNdArray values, Shape shape) { + return IntSparseNdArray.create(indices, values, DimensionalSpace.create(shape)); + } + + /** + * Creates a Sparse array of int values + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D IntNdArray of shape {@code [N]}, which supplies the values for each element + * in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code + * values=[18, 3]} specifies that element {@code [1,3]} of the sparse NdArray has a value of + * {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3}. + * @param defaultValue Scalar value to set for indices not specified in 'indices' + * @param shape the shape of the dense array represented by this sparse array. + * @return the int sparse array. + */ + public static IntSparseNdArray sparseOf( + LongNdArray indices, IntNdArray values, int defaultValue, Shape shape) { + return IntSparseNdArray.create(indices, values, defaultValue, DimensionalSpace.create(shape)); + } + // SHORT ARRAYS /** @@ -222,8 +342,8 @@ public static ShortNdArray scalarOf(short value) { /** * Creates a short vector (rank 1) initialized with the given values. * - *

    Modifying the data of the returned vector will also impact the values in the array - * passed in parameter. + *

    Modifying the data of the returned vector will also impact the values in the array passed in + * parameter. * * @param values vector values * @return new short vector @@ -255,13 +375,51 @@ public static ShortNdArray ofShorts(Shape shape) { * @param shape shape of the array * @param buffer buffer to wrap * @return new short N-dimensional array - * @throws IllegalArgumentException if shape is null, has unknown dimensions or has size bigger - * in the buffer size + * @throws IllegalArgumentException if shape is null, has unknown dimensions or has size bigger in + * the buffer size */ public static ShortNdArray wrap(Shape shape, ShortDataBuffer buffer) { return ShortDenseNdArray.create(buffer, shape); } + /** + * Creates a Sparse array of short values with a default value of zero + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D ShortNdArray of shape {@code [N]}, which supplies the values for each + * element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code + * values=[18, 3]} specifies that element {@code [1,3]} of the sparse NdArray has a value of + * {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3}. + * @param shape the shape of the dense array represented by this sparse array. + * @return the short sparse array. + */ + public static ShortSparseNdArray sparseOf(LongNdArray indices, ShortNdArray values, Shape shape) { + return ShortSparseNdArray.create(indices, values, DimensionalSpace.create(shape)); + } + + /** + * Creates a Sparse array of short values + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D ShortNdArray of shape {@code [N]}, which supplies the values for each + * element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code + * values=[18, 3]} specifies that element {@code [1,3]} of the sparse NdArray has a value of + * {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3}. + * @param defaultValue Scalar value to set for indices not specified in 'indices' + * @param shape the shape of the dense array represented by this sparse array. + * @return the short sparse array. + */ + public static ShortSparseNdArray sparseOf( + LongNdArray indices, ShortNdArray values, short defaultValue, Shape shape) { + return ShortSparseNdArray.create(indices, values, defaultValue, DimensionalSpace.create(shape)); + } + // FLOAT ARRAYS /** @@ -277,8 +435,8 @@ public static FloatNdArray scalarOf(float value) { /** * Creates a float vector (rank 1) initialized with the given values. * - *

    Modifying the data of the returned vector will also impact the values in the array - * passed in parameter. + *

    Modifying the data of the returned vector will also impact the values in the array passed in + * parameter. * * @param values vector values * @return new float vector @@ -310,13 +468,51 @@ public static FloatNdArray ofFloats(Shape shape) { * @param shape shape of the array * @param buffer buffer to wrap * @return new float N-dimensional array - * @throws IllegalArgumentException if shape is null, has unknown dimensions or has size bigger - * in the buffer size + * @throws IllegalArgumentException if shape is null, has unknown dimensions or has size bigger in + * the buffer size */ public static FloatNdArray wrap(Shape shape, FloatDataBuffer buffer) { return FloatDenseNdArray.create(buffer, shape); } + /** + * Creates a Sparse array of float values with a default value of zero + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D FloatNdArray of shape {@code [N]}, which supplies the values for each + * element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code + * values=[18, 3.8]} specifies that element {@code [1,3]} of the sparse NdArray has a value of + * {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.8}. + * @param shape the shape of the dense array represented by this sparse array. + * @return the float sparse array. + */ + public static FloatSparseNdArray sparseOf(LongNdArray indices, FloatNdArray values, Shape shape) { + return FloatSparseNdArray.create(indices, values, DimensionalSpace.create(shape)); + } + + /** + * Creates a Sparse array of float values + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D FloatNdArray of shape {@code [N]}, which supplies the values for each + * element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code + * values=[18, 3.8]} specifies that element {@code [1,3]} of the sparse NdArray has a value of + * {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.8}. + * @param defaultValue Scalar value to set for indices not specified in 'indices' + * @param shape the shape of the dense array represented by this sparse array. + * @return the float sparse array. + */ + public static FloatSparseNdArray sparseOf( + LongNdArray indices, FloatNdArray values, float defaultValue, Shape shape) { + return FloatSparseNdArray.create(indices, values, defaultValue, DimensionalSpace.create(shape)); + } + // DOUBLE ARRAYS /** @@ -332,8 +528,8 @@ public static DoubleNdArray scalarOf(double value) { /** * Creates a double vector (rank 1) initialized with the given values. * - *

    Modifying the data of the returned vector will also impact the values in the array - * passed in parameter. + *

    Modifying the data of the returned vector will also impact the values in the array passed in + * parameter. * * @param values vector values * @return new double vector @@ -365,13 +561,53 @@ public static DoubleNdArray ofDoubles(Shape shape) { * @param shape shape of the array * @param buffer buffer to wrap * @return new double N-dimensional array - * @throws IllegalArgumentException if shape is null, has unknown dimensions or has size bigger - * in the buffer size + * @throws IllegalArgumentException if shape is null, has unknown dimensions or has size bigger in + * the buffer size */ public static DoubleNdArray wrap(Shape shape, DoubleDataBuffer buffer) { return DoubleDenseNdArray.create(buffer, shape); } + /** + * Creates a Sparse array of double values with a default value of zero + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D DoubleNdArray of shape {@code [N]}, which supplies the values for each + * element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code + * values=[18, 3.8]} specifies that element {@code [1,3]} of the sparse NdArray has a value of + * {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.8}. + * @param shape the shape of the dense array represented by this sparse array. + * @return the float sparse array. + */ + public static DoubleSparseNdArray sparseOf( + LongNdArray indices, DoubleNdArray values, Shape shape) { + return DoubleSparseNdArray.create(indices, values, DimensionalSpace.create(shape)); + } + + /** + * Creates a Sparse array of double values + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D DoubleNdArray of shape {@code [N]}, which supplies the values for each + * element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code + * values=[18, 3.8]} specifies that element {@code [1,3]} of the sparse NdArray has a value of + * {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.8}. + * @param defaultValue Scalar value to set for indices not specified in 'indices' + * @param shape the shape of the dense array represented by this sparse array. + * @return the float sparse array. + */ + public static DoubleSparseNdArray sparseOf( + LongNdArray indices, DoubleNdArray values, double defaultValue, Shape shape) { + return DoubleSparseNdArray.create( + indices, values, defaultValue, DimensionalSpace.create(shape)); + } + // BOOLEAN ARRAYS /** @@ -387,8 +623,8 @@ public static BooleanNdArray scalarOf(boolean value) { /** * Creates a boolean vector (rank 1) initialized with the given values. * - *

    Modifying the data of the returned vector will also impact the values in the array - * passed in parameter. + *

    Modifying the data of the returned vector will also impact the values in the array passed in + * parameter. * * @param values vector values * @return new boolean vector @@ -420,13 +656,55 @@ public static BooleanNdArray ofBooleans(Shape shape) { * @param shape shape of the array * @param buffer buffer to wrap * @return new boolean N-dimensional array - * @throws IllegalArgumentException if shape is null, has unknown dimensions or has size bigger - * in the buffer size + * @throws IllegalArgumentException if shape is null, has unknown dimensions or has size bigger in + * the buffer size */ public static BooleanNdArray wrap(Shape shape, BooleanDataBuffer buffer) { return BooleanDenseNdArray.create(buffer, shape); } + /** + * Creates a Sparse array of boolean values with a default value of 'false' + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D BooleanNdArray of shape {@code [N]}, which supplies the values for each + * element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code + * values=[true, true]} specifies that element {@code [1,3]} of the sparse NdArray has a value + * of true, and element {@code [2,4]} of the NdArray has a value of true. All other values are + * false. + * @param shape the shape of the dense array represented by this sparse array. + * @return the float sparse array. + */ + public static BooleanSparseNdArray sparseOf( + LongNdArray indices, BooleanNdArray values, Shape shape) { + return BooleanSparseNdArray.create(indices, values, DimensionalSpace.create(shape)); + } + + /** + * Creates a Sparse array of boolean values + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D BooleanNdArray of shape {@code [N]}, which supplies the values for each + * element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code + * values=[true, true]} specifies that element {@code [1,3]} of the sparse NdArray has a value + * of true, and element {@code [2,4]} of the NdArray has a value of true. All other values are + * false. + * @param defaultValue Scalar value to set for indices not specified in 'indices' + * @param shape the shape of the dense array represented by this sparse array. + * @return the float sparse array. + */ + public static BooleanSparseNdArray sparseOf( + LongNdArray indices, BooleanNdArray values, boolean defaultValue, Shape shape) { + return BooleanSparseNdArray.create( + indices, values, defaultValue, DimensionalSpace.create(shape)); + } + // OBJECT ARRAYS /** @@ -441,14 +719,14 @@ public static NdArray scalarOfObject(T value) { if (value == null) { throw new IllegalArgumentException(); } - return ofObjects((Class)value.getClass(), Shape.scalar()).setObject(value); + return ofObjects((Class) value.getClass(), Shape.scalar()).setObject(value); } /** * Creates a vector (rank 1) initialized with the given values. * - *

    Modifying the data of the returned vector will also impact the values in the array - * passed in parameter. + *

    Modifying the data of the returned vector will also impact the values in the array passed in + * parameter. * * @param values vector values * @param the data type @@ -485,11 +763,55 @@ public static NdArray ofObjects(Class clazz, Shape shape) { * @param buffer buffer to wrap * @param the data type * @return new N-dimensional array - * @throws IllegalArgumentException if shape is null, has unknown dimensions or has size bigger - * in the buffer size + * @throws IllegalArgumentException if shape is null, has unknown dimensions or has size bigger in + * the buffer size */ public static NdArray wrap(Shape shape, DataBuffer buffer) { return DenseNdArray.wrap(buffer, shape); } -} + /** + * Creates a Sparse array of values with a null default value + * + * @param type the class type represented by this sparse array. + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D NdArray of shape {@code [N]}, which supplies the values for each element in + * indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code + * values=["one", "two"]} specifies that element {@code [1,3]} of the sparse NdArray has a + * value of "one", and element {@code [2,4]} of the NdArray has a value of "two"". All other + * values are null. + * @param shape the shape of the dense array represented by this sparse array. + * @return the float sparse array. + */ + public static NdArray sparseOfObjects( + Class type, LongNdArray indices, NdArray values, Shape shape) { + return org.tensorflow.ndarray.impl.sparse.SparseNdArray.create( + type, indices, values, DimensionalSpace.create(shape)); + } + + /** + * Creates a Sparse array of values + * + * @param type the class type represented by this sparse array. + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D NdArray of shape {@code [N]}, which supplies the values for each element in + * indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code + * values=["one", "two"]} specifies that element {@code [1,3]} of the sparse NdArray has a + * value of "one", and element {@code [2,4]} of the NdArray has a value of "two"". All other + * values are null. + * @param defaultValue Scalar value to set for indices not specified in 'indices' + * @param shape the shape of the dense array represented by this sparse array. + * @return the float sparse array. + */ + public static NdArray sparseOfObjects( + Class type, LongNdArray indices, NdArray values, T defaultValue, Shape shape) { + return org.tensorflow.ndarray.impl.sparse.SparseNdArray.create( + type, indices, values, defaultValue, DimensionalSpace.create(shape)); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/SparseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/SparseNdArray.java new file mode 100644 index 00000000000..ab91d1c1448 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/SparseNdArray.java @@ -0,0 +1,50 @@ +/* Copyright 2021 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ +package org.tensorflow.ndarray; + +/** + * Interface for Sparse Arrays + * + * @param the type that the array contains + * @param the type of dense NdArray + */ +public interface SparseNdArray> extends NdArray { + /** + * Gets the Indices + * + *

    Indices are a A 2-D long array of shape {@code [N, ndims]}, that specifies the indices of + * the elements in the sparse array that contain nonzero values (elements are zero-indexed). + * + *

    For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * coordinates {@code [1,3]} and {@code [2,4]} have nonzero values. + * + * @return the Indices + */ + LongNdArray getIndices(); + + /** + * Gets the values. + * + *

    Values are a 1-D array of any type and shape {@code [N]}, that supplies the values for each + * element in indices. + * + *

    For example, given {@code indices=[[1,3], [2,4]]}, and {@code values=[18, 3.6]} specifies + * that element {@code [1,3]} of the sparse array has a value of {@code 18}, and element {@code + * [2,4]} of the sparse array has a value of {@code 3.6}. + * + * @return the values + */ + U getValues(); +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/AbstractNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/AbstractNdArray.java index 690dedc2042..cf0d9f1596f 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/AbstractNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/AbstractNdArray.java @@ -1,30 +1,38 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl; -import java.util.Iterator; import org.tensorflow.ndarray.NdArray; import org.tensorflow.ndarray.NdArraySequence; import org.tensorflow.ndarray.Shape; import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; +import java.util.Iterator; +import java.util.Objects; + @SuppressWarnings("unchecked") public abstract class AbstractNdArray> implements NdArray { + protected final DimensionalSpace dimensions; + + protected AbstractNdArray(DimensionalSpace dimensions) { + this.dimensions = dimensions; + } + public abstract U slice(long position, DimensionalSpace dimensions); public DimensionalSpace dimensions() { @@ -39,7 +47,7 @@ public Shape shape() { @Override public NdArraySequence scalars() { // negative if this array is a scalar, should be handled in `elements(dimIdx)` - return (NdArraySequence)elements(shape().numDimensions() - 1); + return (NdArraySequence) elements(shape().numDimensions() - 1); } @Override @@ -55,11 +63,7 @@ public boolean equals(Object obj) { if (!(obj instanceof NdArray)) { return false; } - return slowEquals((NdArray)obj); - } - - protected AbstractNdArray(DimensionalSpace dimensions) { - this.dimensions = dimensions; + return slowEquals((NdArray) obj); } protected void slowCopyTo(NdArray array) { @@ -77,16 +81,19 @@ protected int slowHashCode() { } protected boolean slowEquals(NdArray array) { - if (!shape().equals(array.shape())) { // this guarantees also that we have the same number of scalar values + if (!shape() + .equals( + array.shape())) { // this guarantees also that we have the same number of scalar values return false; } - for (Iterator> thisIter = scalars().iterator(), otherIter = array.scalars().iterator(); thisIter.hasNext();) { - if (!thisIter.next().getObject().equals(otherIter.next().getObject())) { + for (Iterator> thisIter = scalars().iterator(), + otherIter = array.scalars().iterator(); + thisIter.hasNext(); ) { + // Use Object.equals to handle nulls. + if (!Objects.equals(thisIter.next().getObject(), otherIter.next().getObject())) { return false; } } return true; } - - protected final DimensionalSpace dimensions; } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/AbstractSparseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/AbstractSparseNdArray.java new file mode 100644 index 00000000000..daffad90256 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/AbstractSparseNdArray.java @@ -0,0 +1,525 @@ +/* Copyright 2021 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ +package org.tensorflow.ndarray.impl.sparse; + +import org.tensorflow.ndarray.IllegalRankException; +import org.tensorflow.ndarray.LongNdArray; +import org.tensorflow.ndarray.NdArray; +import org.tensorflow.ndarray.NdArraySequence; +import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.SparseNdArray; +import org.tensorflow.ndarray.impl.AbstractNdArray; +import org.tensorflow.ndarray.impl.dense.AbstractDenseNdArray; +import org.tensorflow.ndarray.impl.dimension.Dimension; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; +import org.tensorflow.ndarray.impl.dimension.RelativeDimensionalSpace; +import org.tensorflow.ndarray.impl.sequence.SingleElementSequence; +import org.tensorflow.ndarray.impl.sequence.SlicingElementSequence; +import org.tensorflow.ndarray.index.Index; + +import java.nio.ReadOnlyBufferException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.LongStream; + +/** + * Abstract base class for sparse array. + * + *

    A sparse array as two separate dense arrays: indices, values, and a shape that represents the + * dense shape. + * + *

    NOTE: all Sparse Arrays are readonly for the {@link #set(NdArray, long...)} and + * {@link #setObject(Object, long...)} methods + * + *

    {@code
    + * FloatSparseNdArray st = new FloatSparseNdArray(
    + *      StdArrays.of(new long[][] {{0, 0}, {1, 2}}),
    + *      NdArrays.vectorOf(1f, 2f),
    + *      Shape.of(3, 4));
    + *
    + * }
    + * + *

    represents the dense array: + * + *

    {@code
    + * [[1, 0, 0, 0]
    + *  [0, 0, 2, 0]
    + *  [0, 0, 0, 0]]
    + *
    + * }
    + * + * @param the type that the array contains + * @param the type of dense NdArray + */ +public abstract class AbstractSparseNdArray> extends AbstractNdArray + implements SparseNdArray { + /** + * A 2-D long array of shape {@code [N, ndims]}, that specifies the indices of the elements in the + * sparse array that contain non-default values (elements are zero-indexed). + * + *

    For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * coordinates {@code [1,3]} and {@code [2,4]} have non-default values. + */ + private LongNdArray indices; + + /** + * A 1-D array of any type and shape {@code [N]}, that supplies the values for each element in + * indices. + * + *

    For example, given {@code indices=[[1,3], [2,4]]}, and {@code values=[18, 3.6]} specifies + * that element {@code [1,3]} of the sparse array has a value of {@code 18}, and element {@code + * [2,4]} of the sparse array has a value of {@code 3.6}. + */ + private U values; + + /** + * Scalar value to set for indices not specified in {@link #getIndices()} This will default to + * zero, false, or the empty string depending on the data type of the values. + */ + private T defaultValue; + + /** + * Scalar NdArray to use for indices not specified in {@link #getIndices()} This will default to + * zero, false, or the empty string depending on the data type of the values, otherwise it will + * contain the defaultValue. + */ + private U defaultArray; + + /** + * Creates an abstract SparseNdArray + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D NdArray of any type and shape {@code [N]}, which supplies the values for + * each element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter + * {@code values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse NdArray has a + * value of {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.6}. + * @param defaultValue Scalar value to set for indices not specified in {@link #indices} + * @param dimensions the dimensional space for the dense object represented by this sparse array. + */ + protected AbstractSparseNdArray( + LongNdArray indices, U values, T defaultValue, DimensionalSpace dimensions) { + super(dimensions); + this.indices = indices; + this.values = values; + setDefaultValue(defaultValue); + + // sanity checks on shapes, indices (shape = {@code [N, ndims]}, where N is the number of values + // (shape = {@code [N]}}. + if (this.indices.shape().get(0) != this.values.shape().get(0)) { + throw new IllegalArgumentException( + String.format( + "The number of rows in indices (%d) does not match the number of elements in values(%d).", + this.indices.shape().get(0), this.values.shape().get(0))); + } + + // sanity checks on shapes, indices (shape = {@code [N, ndims]}, where ndims = the number of + // dimensions in the dense shape. + if (this.indices.shape().get(1) != shape().numDimensions()) { + throw new IllegalArgumentException( + String.format( + "The number of columns in indices (%d) does not match the number of dimensions in shape (%d).", + this.indices.shape().get(1), shape().get(0))); + } + } + + /** + * Creates an abstract SparseNdArray + * + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + protected AbstractSparseNdArray(T defaultValue, DimensionalSpace dimensions) { + super(dimensions); + setDefaultValue(defaultValue); + } + + /** {@inheritDoc} */ + @Override + public NdArraySequence elements(int dimensionIdx) { + if (dimensionIdx >= shape().numDimensions()) { + throw new IllegalArgumentException( + "Cannot iterate elements in dimension '" + + dimensionIdx + + "' of array with shape " + + shape()); + } + if (rank() == 0 && dimensionIdx < 0) { + return new SingleElementSequence<>(this); + } + DimensionalSpace elemDims = dimensions().from(dimensionIdx + 1); + + return new SlicingElementSequence<>(this, dimensionIdx, elemDims); + } + + /** + * Computes the coordinates based on a relative position to the beginning of the dimension space. + * + * @param dimensions the dimension space + * @param position relative position to the beginning of the dimension space. + * @return the coordinates + */ + // TODO should have automatical access to the coordinates from which this position is coming from. + // But that will require some refactoring even at the dense level. + protected long[] toCoordinates(DimensionalSpace dimensions, long position) { + long[] result = new long[dimensions.numDimensions()]; + long p = position; + + for (int dim = 0; dim < dimensions.numDimensions(); dim++) { + Dimension dimension = dimensions.get(dim); + result[dim] = p / dimension.elementSize(); + p = p % dimension.elementSize(); + } + return result; + } + + /** + * Converts the given set of indices coordinates to a long array of coordinates. + * + *

    The shape of the NdArray is {@code [ndims]} + * + * @param l the LongNdArray containing the coordinates + * @return the long array containing the coordinates. + */ + protected long[] getIndicesCoordinates(LongNdArray l) { + long[] results = new long[(int) l.size()]; + for (int i = 0; i < l.size(); i++) { + results[i] = l.getLong(i); + } + return results; + } + + /** + * Converts this sparse array to a dense array. + * + * @return the dense array. + */ + public abstract U toDense(); + + /** {@inheritDoc} */ + @Override + public NdArray slice(Index... indices) { + if (indices == null) { + throw new IllegalArgumentException("Slicing requires at least one index"); + } + RelativeDimensionalSpace sliceDimensions = dimensions().mapTo(indices); + return slice(sliceDimensions.position(), sliceDimensions); + } + + /** {@inheritDoc} */ + @Override + public NdArray get(long... coordinates) { + return slice(positionOf(coordinates, false), dimensions().from(coordinates.length)); + } + + /** {@inheritDoc} */ + @Override + public T getObject(long... coordinates) { + if (coordinates.length != shape().numDimensions()) { + throw new IllegalRankException( + String.format( + "Length of coordinates (%s)%s does not match the rank %d", + coordinates.length, Arrays.toString(coordinates), shape().numDimensions())); + } + long index = locateIndex(coordinates); + if (index >= 0) { + return getValues().getObject(index); + } else { + return defaultValue; + } + } + + /** {@inheritDoc} */ + @Override + public NdArray setObject(T value, long... coords) { + throw new ReadOnlyBufferException(); + } + + /** {@inheritDoc} */ + @Override + public NdArray set(NdArray src, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + /** + * Creates a dense array of the type that this sparse array represents. + * + * @param shape the shape of the dense array. + * @return the dense of the type that this sparse array represents. + */ + public abstract U createValues(Shape shape); + + /** {@inheritDoc} */ + @Override + public NdArray copyTo(NdArray dst) { + if (dst instanceof AbstractSparseNdArray) { + AbstractSparseNdArray sparse = (AbstractSparseNdArray) dst; + LongNdArray indicesCopy = NdArrays.ofLongs(indices.shape()); + this.indices.copyTo(indicesCopy); + U valuesCopy = createValues(values.shape()); + this.values.copyTo(valuesCopy); + sparse.setIndices(indicesCopy); + sparse.setValues(valuesCopy); + } else { + U dense = toDense(); + dense.copyTo(dst); + } + return this; + } + + /** + * Computes the position within the dense array given by the coordinates + * + * @param coords the coordinates within the dense array + * @param isValue indicator whether the coordinates represents a value or higher level dimension. + * @return the position within the array + */ + protected long positionOf(long[] coords, boolean isValue) { + if (coords == null || coords.length == 0) { + return 0; + } + Validator.coordinates(dimensions, coords, isValue); + return dimensions.positionOf(coords); + } + + /** {@inheritDoc} */ + @Override + protected void slowCopyTo(NdArray array) { + if (array instanceof AbstractDenseNdArray) { + AbstractDenseNdArray dst = (AbstractDenseNdArray) array; + long offset = 0L; + for (NdArray s : scalars()) { + dst.setObject(s.getObject(), offset++); + } + } else if (array instanceof AbstractSparseNdArray) { + AbstractSparseNdArray dst = (AbstractSparseNdArray) array; + indices.copyTo(dst.getIndices()); + values.copyTo(dst.values); + } else { + super.slowCopyTo(array); + } + } + + /** + * Gets the Indices + * + * @return the Indices + */ + public LongNdArray getIndices() { + return indices; + } + + /** + * Sets the Indices + * + * @param indices the Indices + */ + public void setIndices(LongNdArray indices) { + this.indices = indices; + } + + /** + * Gets the values + * + * @return the values + */ + public U getValues() { + return values; + } + + /** + * Sets the values + * + * @param values the values + */ + public void setValues(U values) { + this.values = values; + } + + /** + * Gets the values index by coordinates + * + * @param coordinates the coordinates to locate + * @return index of the coordinates, if the coordinates are contained in the {@code indices} + * array; otherwise, {@code (-(insertion point) - 1)}. The insertion point is defined as the + * point at which the {@code coordinates} would be inserted into the {@code indices} array: + * the index of the first element greater than the key, or {@code indices.shape().get(0)}; if + * all elements in the array are less than the specified key. Note that this guarantees that + * the return value will be {@code >= 0}, only if the coordinates are found. + */ + protected long locateIndex(long[] coordinates) { + long size = indices.shape().get(0); + LongNdArray coordArray = NdArrays.vectorOf(coordinates); + return binarySearch(size, coordArray); + } + + /** {@inheritDoc} */ + @Override + public int hashCode() { + if (dimensions().isSegmented()) { + return slowHashCode(); + } + final int prime = 31; + int result = 1; + result = prime * result + indices.hashCode(); + result = prime * result + values.hashCode(); + result = prime * result + shape().hashCode(); + return result; + } + + /** {@inheritDoc} */ + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (!(obj instanceof AbstractSparseNdArray)) { + return super.equals(obj); + } + AbstractSparseNdArray other = (AbstractSparseNdArray) obj; + if (!shape().equals(other.shape())) { + return false; + } + if (!indices.equals(other.indices)) { + return false; + } + return values.equals(other.values); + } + + /** + * Performs a binary search on the indices array to locate the index of the specified coordinates. + * The indices array must be sorted by coordinates, row major. + * + * @param toIndex the index of the last element (exclusive) to be searched + * @param coordinates the coordinates to locate + * @return index of the coordinates, if the coordinates are contained in the {@code indices} + * array; otherwise, {@code (-(insertion point) - 1)}. The insertion point is defined as the + * point at which the {@code coordinates} would be inserted into the {@code indices} array: + * the index of the first element greater than the key, or {@code indices.shape().get(0)}; if + * all elements in the array are less than the specified key. Note that this guarantees that + * the return value will be @{code >= 0}, only if the coordinates are found. + */ + private long binarySearch(long toIndex, LongNdArray coordinates) { + + long low = 0; + long high = toIndex - 1; + + while (low <= high) { + long mid = (low + high) >>> 1; + LongNdArray comparable = indices.get(mid); + int rc = compareCoordinates(comparable, coordinates); + if (rc < 0) { // less than + low = mid + 1; + } else if (rc > 0) { // higher than + high = mid - 1; + } else { // match + return mid; + } + } + return -(low + 1); // no match + } + + /** + * Sorts the indices and values in ascending row-major coordinates. + * + * @return this instance + */ + @SuppressWarnings("UnusedReturnValue") + public AbstractSparseNdArray sortIndicesAndValues() { + + // indices will contain the indexes into the indices and values ndArrays, resorted. + List indexes = new ArrayList<>(); + // create a range for the length of values + LongStream.range(0, values.size()).forEach(indexes::add); + + // then sort this range based on ascending row-wise coordinates. + indexes.sort((a, b) -> compareCoordinates(indices.get(a), indices.get(b))); + + LongNdArray newIndices = NdArrays.ofLongs(indices.shape()); + U newValues = createValues(values.shape()); + // used the sorted indexes to set up the sorted Indices and Values + for (long i = 0; i < indexes.size(); i++) { + long moveIndex = indexes.get((int) i); + newIndices.set(indices.get(moveIndex), i); + newValues.setObject(values.getObject(moveIndex), i); + } + indices = newIndices; + values = newValues; + return this; + } + + /** + * Compares its two arguments for row major coordinate order. + * + * @return a negative integer, zero, or a positive integer as the first argument is less than, + * equal to, or greater than the second. + */ + private int compareCoordinates(LongNdArray a, LongNdArray b) { + int rc = (int) (a.size() - b.size()); + if (rc != 0) { + return rc; + } + + for (long i = 0; i < a.size(); i++) { + long l = a.getLong(i); + rc = (int) (l - b.getLong(i)); + if (rc != 0) { + return rc; + } + } + return 0; + } + + /** + * Scalar value to set for indices not specified in {@link #indices}, defaults to zero, false, or + * the empty String depending on the data type. + */ + public T getDefaultValue() { + return defaultValue; + } + + /** + * Sets the defaultValue + * + * @param defaultValue the default value + */ + public void setDefaultValue(T defaultValue) { + this.defaultValue = defaultValue; + defaultArray = null; + } + + /** + * Creates the NdArray with the default value as a scalar + * + * @return the default NdArray of the default value as a scalar + */ + public abstract U createDefaultArray(); + + /** + * Scalar NdArray to use for indices not specified in {@link #getIndices()} This will default to + * zero, false, or the empty string depending on the data type of the values, otherwise it will + * contain the {@link #defaultValue}. + */ + public U getDefaultArray() { + if (defaultArray == null) { + defaultArray = createDefaultArray(); + } + return defaultArray; + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java new file mode 100644 index 00000000000..f9e41bfa970 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java @@ -0,0 +1,428 @@ +/* Copyright 2021 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ +package org.tensorflow.ndarray.impl.sparse; + +import org.tensorflow.ndarray.BooleanNdArray; +import org.tensorflow.ndarray.LongNdArray; +import org.tensorflow.ndarray.NdArray; +import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.StdArrays; +import org.tensorflow.ndarray.buffer.BooleanDataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; +import org.tensorflow.ndarray.impl.sparse.slice.BooleanSparseSlice; +import org.tensorflow.ndarray.index.Index; + +import java.nio.ReadOnlyBufferException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.atomic.AtomicInteger; + +/** + * sparse array for the boolean data type + * + *

    A sparse array as two separate dense arrays: indices, values, and a shape that represents the + * dense shape. + * + *

    NOTE: all Sparse Arrays are readonly for the {@link #set(NdArray, long...)} and + * {@link #setObject(Boolean, long...)} methods + * + *

    {@code
    + * FloatSparseNdArray st = new BooleanSparseNdArray(
    + *      StdArrays.of(new long[][] {{0, 0}, {1, 2}}),
    + *      NdArrays.vectorOf(true, true),
    + *      Shape.of(3, 4));
    + *
    + * }
    + * + *

    represents the dense array: + * + *

    {@code
    + * [[true, false, false, false]
    + *  [false, false, true, false]
    + *  [false, false, false, false]]
    + *
    + * }
    + */ +public class BooleanSparseNdArray extends AbstractSparseNdArray + implements BooleanNdArray { + + /** + * Creates a BooleanSparseNdArray with a default value of false. + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D NdArray of Boolean type and shape {@code [N]}, which supplies the values + * for each element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the + * parameter {@code values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse + * NdArray has a value of {@code 18}, and element {@code [2,4]} of the NdArray has a value of + * {@code 3.6}. + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + BooleanSparseNdArray(LongNdArray indices, BooleanNdArray values, DimensionalSpace dimensions) { + this(indices, values, false, dimensions); + } + + /** + * Creates a BooleanSparseNdArray + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D NdArray of Boolean type and shape {@code [N]}, which supplies the values + * for each element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the + * parameter {@code values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse + * NdArray has a value of {@code 18}, and element {@code [2,4]} of the NdArray has a value of + * {@code 3.6}. + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + BooleanSparseNdArray( + LongNdArray indices, + BooleanNdArray values, + boolean defaultValue, + DimensionalSpace dimensions) { + super(indices, values, defaultValue, dimensions); + } + + /** + * Creates a BooleanSparseNdArray + * + * @param dataBuffer a dense dataBuffer used to create the spars array + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + BooleanSparseNdArray(BooleanDataBuffer dataBuffer, DimensionalSpace dimensions) { + this(dataBuffer, false, dimensions); + } + + /** + * Creates a BooleanSparseNdArray + * + * @param dataBuffer a dense dataBuffer used to create the spars array + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + BooleanSparseNdArray( + BooleanDataBuffer dataBuffer, boolean defaultValue, DimensionalSpace dimensions) { + super(defaultValue, dimensions); + // use write to set up the indices and values + write(dataBuffer); + } + + /** + * Creates a zero-filled BooleanSparseNdArray + * + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + BooleanSparseNdArray(DimensionalSpace dimensions) { + this(false, dimensions); + } + + /** + * Creates a zero-filled BooleanSparseNdArray + * + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + BooleanSparseNdArray(boolean defaultValue, DimensionalSpace dimensions) { + super(defaultValue, dimensions); + } + + /** + * Creates a new BooleanSparseNdArray + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D NdArray of any type and shape {@code [N]}, which supplies the values for + * each element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter + * {@code values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse NdArray has a + * value of {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.6}. + * @param dimensions the dimensional space for the dense object represented by this sparse array. + * @return the new Sparse Array + */ + public static BooleanSparseNdArray create( + LongNdArray indices, BooleanNdArray values, DimensionalSpace dimensions) { + return new BooleanSparseNdArray(indices, values, dimensions); + } + + /** + * Creates a new BooleanSparseNdArray + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D NdArray of any type and shape {@code [N]}, which supplies the values for + * each element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter + * {@code values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse NdArray has a + * value of {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.6}. + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensional space for the dense object represented by this sparse array. + * @return the new Sparse Array + */ + public static BooleanSparseNdArray create( + LongNdArray indices, + BooleanNdArray values, + boolean defaultValue, + DimensionalSpace dimensions) { + return new BooleanSparseNdArray(indices, values, defaultValue, dimensions); + } + + /** + * Creates a new BooleanSparseNdArray from a data buffer + * + * @param dataBuffer the databuffer containing the dense array + * @param dimensions the dimensional space for the sparse array + * @return the new Sparse Array + */ + public static BooleanSparseNdArray create( + BooleanDataBuffer dataBuffer, DimensionalSpace dimensions) { + return new BooleanSparseNdArray(dataBuffer, dimensions); + } + + /** + * Creates a new BooleanSparseNdArray from a data buffer + * + * @param dataBuffer the databuffer containing the dense array + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensional space for the sparse array + * @return the new Sparse Array + */ + public static BooleanSparseNdArray create( + BooleanDataBuffer dataBuffer, boolean defaultValue, DimensionalSpace dimensions) { + return new BooleanSparseNdArray(dataBuffer, defaultValue, dimensions); + } + + /** + * Creates a new empty BooleanSparseNdArray from a data buffer + * + * @param dimensions the dimensions array + * @return the new Sparse Array + */ + public static BooleanSparseNdArray create(DimensionalSpace dimensions) { + return new BooleanSparseNdArray(dimensions); + } + + /** + * Creates a new empty BooleanSparseNdArray from a data buffer + * + * @param dimensions the dimensions array + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @return the new Sparse Array + */ + public static BooleanSparseNdArray create(boolean defaultValue, DimensionalSpace dimensions) { + return new BooleanSparseNdArray(defaultValue, dimensions); + } + + /** + * Creates a new empty BooleanSparseNdArray from a float data buffer + * + * @param buffer the data buffer + * @param shape the shape of the sparse array. + * @return the new Sparse Array + */ + public static BooleanSparseNdArray create(BooleanDataBuffer buffer, Shape shape) { + return new BooleanSparseNdArray(buffer, DimensionalSpace.create(shape)); + } + + /** + * Creates a new empty BooleanSparseNdArray from a float data buffer + * + * @param buffer the data buffer + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param shape the shape of the sparse array. + * @return the new Sparse Array + */ + public static BooleanSparseNdArray create( + BooleanDataBuffer buffer, boolean defaultValue, Shape shape) { + return new BooleanSparseNdArray(buffer, defaultValue, DimensionalSpace.create(shape)); + } + + /** + * Creates a new BooleanSparseNdArray from a BooleanNdArray + * + * @param src the BooleanNdArray + * @return the new Sparse Array + */ + public static BooleanSparseNdArray create(BooleanNdArray src) { + BooleanDataBuffer buffer = DataBuffers.ofBooleans(src.size()); + src.read(buffer); + return new BooleanSparseNdArray(buffer, DimensionalSpace.create(src.shape())); + } + /** + * Creates a new BooleanSparseNdArray from a BooleanNdArray + * + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param src the BooleanNdArray + * @return the new Sparse Array + */ + public static BooleanSparseNdArray create(BooleanNdArray src, boolean defaultValue) { + BooleanDataBuffer buffer = DataBuffers.ofBooleans(src.size()); + src.read(buffer); + return new BooleanSparseNdArray(buffer, defaultValue, DimensionalSpace.create(src.shape())); + } + + /** {@inheritDoc} */ + @Override + public BooleanNdArray createDefaultArray() { + return NdArrays.scalarOf(getDefaultValue()); + } + + /** + * Creates a BooleanNdArray of the specified shape + * + * @param shape the shape of the dense array. + * @return a BooleanNdArray of the specified shape + */ + public BooleanNdArray createValues(Shape shape) { + return NdArrays.ofBooleans(shape); + } + + /** {@inheritDoc} */ + @Override + public BooleanNdArray slice(long position, DimensionalSpace sliceDimensions) { + return new BooleanSparseSlice(this, position, sliceDimensions); + } + + /** {@inheritDoc} */ + @Override + public boolean getBoolean(long... coordinates) { + return getObject(coordinates); + } + + /** {@inheritDoc} */ + @Override + public BooleanNdArray setBoolean(boolean value, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + /** {@inheritDoc} */ + @Override + public BooleanNdArray read(DataBuffer dst) { + return read((BooleanDataBuffer) dst); + } + + /** {@inheritDoc} */ + @Override + public BooleanNdArray read(BooleanDataBuffer dst) { + // set the values in buf to the default, then overwrite with indices/values + Boolean[] defaults = new Boolean[(int) shape().size()]; + Arrays.fill(defaults, getDefaultValue()); + dst.write(defaults); + + AtomicInteger i = new AtomicInteger(); + getIndices() + .elements(0) + .forEachIndexed( + (idx, l) -> { + long[] coordinates = getIndicesCoordinates(l); + boolean value = getValues().getBoolean(i.getAndIncrement()); + dst.setObject(value, dimensions.positionOf(coordinates)); + }); + return this; + } + + /** {@inheritDoc} */ + @Override + public BooleanNdArray write(BooleanDataBuffer src) { + List indices = new ArrayList<>(); + List values = new ArrayList<>(); + + for (long i = 0; i < src.size(); i++) { + if (!src.getObject(i).equals(getDefaultValue())) { + indices.add(toCoordinates(dimensions, i)); + values.add(src.getObject(i)); + } + } + long[][] indicesArray = new long[indices.size()][]; + boolean[] valuesArray = new boolean[values.size()]; + for (int i = 0; i < indices.size(); i++) { + indicesArray[i] = indices.get(i); + valuesArray[i] = values.get(i); + } + + setIndices(StdArrays.ndCopyOf(indicesArray)); + setValues(NdArrays.vectorOf(valuesArray)); + return this; + } + + /** {@inheritDoc} */ + @Override + public BooleanNdArray write(DataBuffer src) { + return write((BooleanDataBuffer) src); + } + + /** + * Converts the sparse array to a dense array + * + * @return the dense array + */ + public BooleanNdArray toDense() { + BooleanDataBuffer dataBuffer = DataBuffers.ofBooleans(shape().size()); + read(dataBuffer); + return NdArrays.wrap(shape(), dataBuffer); + } + + /** + * Populates this sparse array from a dense array + * + * @param src the dense array + * @return this sparse array + */ + public BooleanNdArray fromDense(BooleanNdArray src) { + BooleanDataBuffer buffer = DataBuffers.ofBooleans(src.size()); + src.read(buffer); + write(buffer); + return this; + } + + /** {@inheritDoc} */ + @Override + public BooleanNdArray slice(Index... indices) { + return (BooleanNdArray) super.slice(indices); + } + + /** {@inheritDoc} */ + @Override + public BooleanNdArray get(long... coordinates) { + return (BooleanNdArray) super.get(coordinates); + } + + /** {@inheritDoc} */ + @Override + public BooleanNdArray setObject(Boolean value, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + /** {@inheritDoc} */ + @Override + public BooleanNdArray set(NdArray src, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + /** {@inheritDoc} */ + @Override + public BooleanNdArray copyTo(NdArray dst) { + return (BooleanNdArray) super.copyTo(dst); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArray.java new file mode 100644 index 00000000000..540c79f7de8 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArray.java @@ -0,0 +1,418 @@ +/* Copyright 2021 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ +package org.tensorflow.ndarray.impl.sparse; + +import org.tensorflow.ndarray.ByteNdArray; +import org.tensorflow.ndarray.LongNdArray; +import org.tensorflow.ndarray.NdArray; +import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.StdArrays; +import org.tensorflow.ndarray.buffer.ByteDataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; +import org.tensorflow.ndarray.impl.sparse.slice.ByteSparseSlice; +import org.tensorflow.ndarray.index.Index; + +import java.nio.ReadOnlyBufferException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.atomic.AtomicInteger; + +/** + * sparse array for the byte data type + * + *

    A sparse array as two separate dense arrays: indices, values, and a shape that represents the + * dense shape. + * + *

    NOTE: all Sparse Arrays are readonly for the {@link #set(NdArray, long...)} and + * {@link #setObject(Byte, long...)} methods + * + *

    {@code
    + * ByteSparseNdArray st = new ByteSparseNdArray(
    + *      StdArrays.of(new long[][] {{0, 0}, {1, 2}}),
    + *      NdArrays.vectorOf((byte)1, (byte)255),
    + *      Shape.of(3, 4));
    + *
    + * }
    + * + *

    represents the dense array: + * + *

    {@code
    + * [[(byte)1, (byte)0, (byte)0, (byte)0]
    + *  [(byte)0, (byte)0, (byte)1, (byte)0]
    + *  [(byte)0, (byte)0, (byte)0, (byte)0]]
    + *
    + * }
    + */ +public class ByteSparseNdArray extends AbstractSparseNdArray + implements ByteNdArray { + + /** + * Creates a ByteSparseNdArray + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D NdArray of Byte type and shape {@code [N]}, which supplies the values for + * each element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter + * {@code values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse NdArray has a + * value of {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.6}. + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + ByteSparseNdArray(LongNdArray indices, ByteNdArray values, DimensionalSpace dimensions) { + this(indices, values, (byte) 0, dimensions); + } + + /** + * Creates a ByteSparseNdArray with a default value of zero. + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D NdArray of Byte type and shape {@code [N]}, which supplies the values for + * each element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter + * {@code values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse NdArray has a + * value of {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.6}. + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + ByteSparseNdArray( + LongNdArray indices, ByteNdArray values, byte defaultValue, DimensionalSpace dimensions) { + super(indices, values, defaultValue, dimensions); + } + + /** + * Creates a ByteSparseNdArray + * + * @param dataBuffer a dense dataBuffer used to create the spars array + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + ByteSparseNdArray(ByteDataBuffer dataBuffer, DimensionalSpace dimensions) { + this(dataBuffer, (byte) 0, dimensions); + } + + /** + * Creates a ByteSparseNdArray + * + * @param dataBuffer a dense dataBuffer used to create the spars array + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + ByteSparseNdArray(ByteDataBuffer dataBuffer, byte defaultValue, DimensionalSpace dimensions) { + super(defaultValue, dimensions); + // use write to set up the indices and values + write(dataBuffer); + } + + /** + * Creates a zero-filled ByteSparseNdArray + * + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + ByteSparseNdArray(DimensionalSpace dimensions) { + this((byte) 0, dimensions); + } + + /** + * Creates a zero-filled ByteSparseNdArray + * + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + ByteSparseNdArray(byte defaultValue, DimensionalSpace dimensions) { + super(defaultValue, dimensions); + } + + /** + * Creates a new ByteSparseNdArray + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D NdArray of any type and shape {@code [N]}, which supplies the values for + * each element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter + * {@code values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse NdArray has a + * value of {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.6}. + * @param dimensions the dimensional space for the dense object represented by this sparse array. + * @return the new Sparse Array + */ + public static ByteSparseNdArray create( + LongNdArray indices, ByteNdArray values, DimensionalSpace dimensions) { + return new ByteSparseNdArray(indices, values, dimensions); + } + + /** + * Creates a new ByteSparseNdArray + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D NdArray of any type and shape {@code [N]}, which supplies the values for + * each element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter + * {@code values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse NdArray has a + * value of {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.6}. + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensional space for the dense object represented by this sparse array. + * @return the new Sparse Array + */ + public static ByteSparseNdArray create( + LongNdArray indices, ByteNdArray values, byte defaultValue, DimensionalSpace dimensions) { + return new ByteSparseNdArray(indices, values, defaultValue, dimensions); + } + + /** + * Creates a new ByteSparseNdArray from a data buffer + * + * @param dataBuffer the databuffer containing the dense array + * @param dimensions the dimensional space for the sparse array + * @return the new Sparse Array + */ + public static ByteSparseNdArray create(ByteDataBuffer dataBuffer, DimensionalSpace dimensions) { + return new ByteSparseNdArray(dataBuffer, dimensions); + } + + /** + * Creates a new ByteSparseNdArray from a data buffer + * + * @param dataBuffer the databuffer containing the dense array + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensional space for the sparse array + * @return the new Sparse Array + */ + public static ByteSparseNdArray create( + ByteDataBuffer dataBuffer, byte defaultValue, DimensionalSpace dimensions) { + return new ByteSparseNdArray(dataBuffer, defaultValue, dimensions); + } + + /** + * Creates a new empty ByteSparseNdArray from a data buffer + * + * @param dimensions the dimensions array + * @return the new Sparse Array + */ + public static ByteSparseNdArray create(DimensionalSpace dimensions) { + return new ByteSparseNdArray(dimensions); + } + + /** + * Creates a new empty ByteSparseNdArray from a data buffer + * + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensions array + * @return the new Sparse Array + */ + public static ByteSparseNdArray create(byte defaultValue, DimensionalSpace dimensions) { + return new ByteSparseNdArray(defaultValue, dimensions); + } + + /** + * Creates a new empty ByteSparseNdArray from a float data buffer + * + * @param buffer the data buffer + * @param shape the shape of the sparse array. + * @return the new Sparse Array + */ + public static ByteSparseNdArray create(ByteDataBuffer buffer, Shape shape) { + return new ByteSparseNdArray(buffer, DimensionalSpace.create(shape)); + } + + /** + * Creates a new empty ByteSparseNdArray from a float data buffer + * + * @param buffer the data buffer + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param shape the shape of the sparse array. + * @return the new Sparse Array + */ + public static ByteSparseNdArray create(ByteDataBuffer buffer, byte defaultValue, Shape shape) { + return new ByteSparseNdArray(buffer, defaultValue, DimensionalSpace.create(shape)); + } + + /** + * Creates a new ByteSparseNdArray from a ByteNdArray + * + * @param src the ByteNdArray + * @return the new Sparse Array + */ + public static ByteSparseNdArray create(ByteNdArray src) { + ByteDataBuffer buffer = DataBuffers.ofBytes(src.size()); + src.read(buffer); + return new ByteSparseNdArray(buffer, DimensionalSpace.create(src.shape())); + } + + /** + * Creates a new ByteSparseNdArray from a ByteNdArray + * + * @param src the ByteNdArray + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @return the new Sparse Array + */ + public static ByteSparseNdArray create(ByteNdArray src, byte defaultValue) { + ByteDataBuffer buffer = DataBuffers.ofBytes(src.size()); + src.read(buffer); + return new ByteSparseNdArray(buffer, defaultValue, DimensionalSpace.create(src.shape())); + } + + /** + * Creates a ByteNdArray of the specified shape + * + * @param shape the shape of the dense array. + * @return a ByteNdArray of the specified shape + */ + public ByteNdArray createValues(Shape shape) { + return NdArrays.ofBytes(shape); + } + + /** {@inheritDoc} */ + @Override + public ByteNdArray slice(long position, DimensionalSpace sliceDimensions) { + return new ByteSparseSlice(this, position, sliceDimensions); + } + + /** {@inheritDoc} */ + @Override + public byte getByte(long... coordinates) { + return getObject(coordinates); + } + + /** {@inheritDoc} */ + @Override + public ByteNdArray setByte(byte value, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + /** {@inheritDoc} */ + @Override + public ByteNdArray read(DataBuffer dst) { + return read((ByteDataBuffer) dst); + } + + /** {@inheritDoc} */ + @Override + public ByteNdArray read(ByteDataBuffer dst) { + // set the values in buf to the default, then overwrite with indices/values + Byte[] defaults = new Byte[(int) shape().size()]; + Arrays.fill(defaults, getDefaultValue()); + dst.write(defaults); + + AtomicInteger i = new AtomicInteger(); + getIndices() + .elements(0) + .forEachIndexed( + (idx, l) -> { + long[] coordinates = getIndicesCoordinates(l); + byte value = getValues().getByte(i.getAndIncrement()); + dst.setObject(value, dimensions.positionOf(coordinates)); + }); + return this; + } + + /** {@inheritDoc} */ + @Override + public ByteNdArray write(ByteDataBuffer src) { + List indices = new ArrayList<>(); + List values = new ArrayList<>(); + + for (long i = 0; i < src.size(); i++) { + if (!src.getObject(i).equals(getDefaultValue())) { + indices.add(toCoordinates(dimensions, i)); + values.add(src.getObject(i)); + } + } + long[][] indicesArray = new long[indices.size()][]; + byte[] valuesArray = new byte[values.size()]; + for (int i = 0; i < indices.size(); i++) { + indicesArray[i] = indices.get(i); + valuesArray[i] = values.get(i); + } + + setIndices(StdArrays.ndCopyOf(indicesArray)); + setValues(NdArrays.vectorOf(valuesArray)); + return this; + } + + /** {@inheritDoc} */ + @Override + public ByteNdArray write(DataBuffer src) { + return write((ByteDataBuffer) src); + } + + /** + * Converts the sparse array to a dense array + * + * @return the dense array + */ + public ByteNdArray toDense() { + ByteDataBuffer dataBuffer = DataBuffers.ofBytes(shape().size()); + read(dataBuffer); + return NdArrays.wrap(shape(), dataBuffer); + } + + /** + * Populates this sparse array from a dense array + * + * @param src the dense array + * @return this sparse array + */ + public ByteNdArray fromDense(ByteNdArray src) { + ByteDataBuffer buffer = DataBuffers.ofBytes(src.size()); + src.read(buffer); + write(buffer); + return this; + } + + /** {@inheritDoc} */ + @Override + public ByteNdArray slice(Index... indices) { + return (ByteNdArray) super.slice(indices); + } + + /** {@inheritDoc} */ + @Override + public ByteNdArray get(long... coordinates) { + return (ByteNdArray) super.get(coordinates); + } + + /** {@inheritDoc} */ + @Override + public ByteNdArray setObject(Byte value, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + /** {@inheritDoc} */ + @Override + public ByteNdArray set(NdArray src, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + /** {@inheritDoc} */ + @Override + public ByteNdArray copyTo(NdArray dst) { + return (ByteNdArray) super.copyTo(dst); + } + + /** {@inheritDoc} */ + @Override + public ByteNdArray createDefaultArray() { + return NdArrays.scalarOf(getDefaultValue()); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArray.java new file mode 100644 index 00000000000..27a083227ba --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArray.java @@ -0,0 +1,419 @@ +/* Copyright 2021 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ +package org.tensorflow.ndarray.impl.sparse; + +import org.tensorflow.ndarray.DoubleNdArray; +import org.tensorflow.ndarray.LongNdArray; +import org.tensorflow.ndarray.NdArray; +import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.StdArrays; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.buffer.DoubleDataBuffer; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; +import org.tensorflow.ndarray.impl.sparse.slice.DoubleSparseSlice; +import org.tensorflow.ndarray.index.Index; + +import java.nio.ReadOnlyBufferException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.atomic.AtomicInteger; + +/** + * A sparse array for the double data type + * + *

    A sparse array as two separate dense arrays: indices, values, and a shape that represents the + * dense shape. + * + *

    NOTE: all Sparse Arrays are readonly for the {@link #set(NdArray, long...)} and + * {@link #setObject(Double, long...)} methods + * + *

    {@code
    + * DoubleSparseNdArray st = new DoubleSparseNdArray(
    + *      StdArrays.of(new long[][] {{0, 0}, {1, 2}}),
    + *      NdArrays.vectorsOf(new double[] {1, 2}),
    + *      Shape.of(3, 4));
    + *
    + * }
    + * + *

    represents the dense array: + * + *

    {@code
    + * [[1, 0, 0, 0]
    + *  [0, 0, 2, 0]
    + *  [0, 0, 0, 0]]
    + *
    + * }
    + */ +public class DoubleSparseNdArray extends AbstractSparseNdArray + implements DoubleNdArray { + + /** + * Creates a DoubleSparseNdArray with a default value of zero. + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D DoubleNdArray of shape {@code [N]}, which supplies the values for each + * element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code + * values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse NdArray has a value of + * {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.6}. + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + DoubleSparseNdArray(LongNdArray indices, DoubleNdArray values, DimensionalSpace dimensions) { + this(indices, values, 0d, dimensions); + } + + /** + * Creates a DoubleSparseNdArray + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D DoubleNdArray of shape {@code [N]}, which supplies the values for each + * element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code + * values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse NdArray has a value of + * {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.6}. + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + DoubleSparseNdArray( + LongNdArray indices, DoubleNdArray values, double defaultValue, DimensionalSpace dimensions) { + super(indices, values, defaultValue, dimensions); + } + + /** + * Creates a DoubleSparseNdArray + * + * @param dataBuffer a dense dataBuffer used to create the spars array + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + DoubleSparseNdArray(DoubleDataBuffer dataBuffer, DimensionalSpace dimensions) { + this(dataBuffer, 0d, dimensions); + } + /** + * Creates a DoubleSparseNdArray + * + * @param dataBuffer a dense dataBuffer used to create the spars array + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + DoubleSparseNdArray( + DoubleDataBuffer dataBuffer, double defaultValue, DimensionalSpace dimensions) { + super(defaultValue, dimensions); + // use write to set up the indices and values + write(dataBuffer); + } + + /** + * Creates a zero-filled DoubleSparseNdArray + * + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + DoubleSparseNdArray(DimensionalSpace dimensions) { + this(0d, dimensions); + } + + /** + * Creates a zero-filled DoubleSparseNdArray + * + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + DoubleSparseNdArray(double defaultValue, DimensionalSpace dimensions) { + super(defaultValue, dimensions); + } + + /** + * Creates a new DoubleSparseNdArray + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D NdArray of any type and shape {@code [N]}, which supplies the values for + * each element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter + * {@code values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse NdArray has a + * value of {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.6}. + * @param dimensions the dimensional space for the dense object represented by this sparse array. + * @return the new Sparse Array + */ + public static DoubleSparseNdArray create( + LongNdArray indices, DoubleNdArray values, DimensionalSpace dimensions) { + return new DoubleSparseNdArray(indices, values, dimensions); + } + + /** + * Creates a new DoubleSparseNdArray + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D NdArray of any type and shape {@code [N]}, which supplies the values for + * each element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter + * {@code values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse NdArray has a + * value of {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.6}. + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensional space for the dense object represented by this sparse array. + * @return the new Sparse Array + */ + public static DoubleSparseNdArray create( + LongNdArray indices, DoubleNdArray values, double defaultValue, DimensionalSpace dimensions) { + return new DoubleSparseNdArray(indices, values, defaultValue, dimensions); + } + + /** + * Creates a new DoubleSparseNdArray from a data buffer + * + * @param dataBuffer the databuffer containing the dense array + * @param dimensions the dimensional space for the sparse array + * @return the new Sparse Array + */ + public static DoubleSparseNdArray create( + DoubleDataBuffer dataBuffer, DimensionalSpace dimensions) { + return new DoubleSparseNdArray(dataBuffer, dimensions); + } + + /** + * Creates a new DoubleSparseNdArray from a data buffer + * + * @param dataBuffer the databuffer containing the dense array + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensional space for the sparse array + * @return the new Sparse Array + */ + public static DoubleSparseNdArray create( + DoubleDataBuffer dataBuffer, double defaultValue, DimensionalSpace dimensions) { + return new DoubleSparseNdArray(dataBuffer, defaultValue, dimensions); + } + + /** + * Creates a new empty DoubleSparseNdArray from a data buffer + * + * @param dimensions the dimensions array + * @return the new Sparse Array + */ + public static DoubleSparseNdArray create(DimensionalSpace dimensions) { + return new DoubleSparseNdArray(dimensions); + } + + /** + * Creates a new empty DoubleSparseNdArray from a data buffer + * + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensions array + * @return the new Sparse Array + */ + public static DoubleSparseNdArray create(double defaultValue, DimensionalSpace dimensions) { + return new DoubleSparseNdArray(defaultValue, dimensions); + } + + /** + * Creates a new empty DoubleSparseNdArray from a double data buffer + * + * @param buffer the data buffer + * @param shape the shape of the sparse array. + * @return the new Sparse Array + */ + public static DoubleSparseNdArray create(DoubleDataBuffer buffer, Shape shape) { + return new DoubleSparseNdArray(buffer, DimensionalSpace.create(shape)); + } + + /** + * Creates a new empty DoubleSparseNdArray from a double data buffer + * + * @param buffer the data buffer + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param shape the shape of the sparse array. + * @return the new Sparse Array + */ + public static DoubleSparseNdArray create( + DoubleDataBuffer buffer, double defaultValue, Shape shape) { + return new DoubleSparseNdArray(buffer, defaultValue, DimensionalSpace.create(shape)); + } + + /** + * Creates a new DoubleSparseNdArray from a DoubleNdArray + * + * @param src the DoubleNdArray + * @return the new Sparse Array + */ + public static DoubleSparseNdArray create(DoubleNdArray src) { + DoubleDataBuffer buffer = DataBuffers.ofDoubles(src.size()); + src.read(buffer); + return new DoubleSparseNdArray(buffer, DimensionalSpace.create(src.shape())); + } + /** + * Creates a new DoubleSparseNdArray from a DoubleNdArray + * + * @param src the DoubleNdArray + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @return the new Sparse Array + */ + public static DoubleSparseNdArray create(DoubleNdArray src, double defaultValue) { + DoubleDataBuffer buffer = DataBuffers.ofDoubles(src.size()); + src.read(buffer); + return new DoubleSparseNdArray(buffer, defaultValue, DimensionalSpace.create(src.shape())); + } + + /** + * Creates a DoubleNdArray of the specified shape + * + * @param shape the shape of the dense array. + * @return a DoubleNdArray of the specified shape + */ + public DoubleNdArray createValues(Shape shape) { + return NdArrays.ofDoubles(shape); + } + + /** {@inheritDoc} */ + @Override + public DoubleNdArray slice(long position, DimensionalSpace sliceDimensions) { + return new DoubleSparseSlice(this, position, sliceDimensions); + } + + /** {@inheritDoc} */ + @Override + public double getDouble(long... coordinates) { + return getObject(coordinates); + } + + /** {@inheritDoc} */ + @Override + public DoubleNdArray setDouble(double value, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + /** {@inheritDoc} */ + @Override + public DoubleNdArray read(DataBuffer dst) { + return read((DoubleDataBuffer) dst); + } + + /** {@inheritDoc} */ + @Override + public DoubleNdArray read(DoubleDataBuffer dst) { + // set buf to the default values, then overwrite with the indices/values. + Double[] defaults = new Double[(int) shape().size()]; + Arrays.fill(defaults, getDefaultValue()); + dst.write(defaults); + + AtomicInteger i = new AtomicInteger(); + getIndices() + .elements(0) + .forEachIndexed( + (idx, l) -> { + long[] coordinates = getIndicesCoordinates(l); + double value = getValues().getDouble(i.getAndIncrement()); + dst.setObject(value, dimensions.positionOf(coordinates)); + }); + return this; + } + + /** {@inheritDoc} */ + @Override + public DoubleNdArray write(DoubleDataBuffer src) { + List indices = new ArrayList<>(); + List values = new ArrayList<>(); + + for (long i = 0; i < src.size(); i++) { + if (!src.getObject(i).equals(getDefaultValue())) { + indices.add(toCoordinates(dimensions, i)); + values.add(src.getObject(i)); + } + } + long[][] indicesArray = new long[indices.size()][]; + double[] valuesArray = new double[values.size()]; + for (int i = 0; i < indices.size(); i++) { + indicesArray[i] = indices.get(i); + valuesArray[i] = values.get(i); + } + + setIndices(StdArrays.ndCopyOf(indicesArray)); + setValues(NdArrays.vectorOf(valuesArray)); + return this; + } + + /** {@inheritDoc} */ + @Override + public DoubleNdArray write(DataBuffer src) { + return write((DoubleDataBuffer) src); + } + + /** + * Converts the sparse array to a dense array + * + * @return the dense array + */ + public DoubleNdArray toDense() { + DoubleDataBuffer dataBuffer = DataBuffers.ofDoubles(shape().size()); + read(dataBuffer); + return NdArrays.wrap(shape(), dataBuffer); + } + + /** + * Populates this sparse array from a dense array + * + * @param src the dense array + * @return this sparse array + */ + public DoubleNdArray fromDense(DoubleNdArray src) { + DoubleDataBuffer buffer = DataBuffers.ofDoubles(src.size()); + src.read(buffer); + write(buffer); + return this; + } + + /** {@inheritDoc} */ + @Override + public DoubleNdArray slice(Index... indices) { + return (DoubleNdArray) super.slice(indices); + } + + /** {@inheritDoc} */ + @Override + public DoubleNdArray get(long... coordinates) { + return (DoubleNdArray) super.get(coordinates); + } + + /** {@inheritDoc} */ + @Override + public DoubleNdArray setObject(Double value, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + /** {@inheritDoc} */ + @Override + public DoubleNdArray set(NdArray src, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + /** {@inheritDoc} */ + @Override + public DoubleNdArray copyTo(NdArray dst) { + return (DoubleNdArray) super.copyTo(dst); + } + + /** {@inheritDoc} */ + @Override + public DoubleNdArray createDefaultArray() { + return NdArrays.scalarOf(getDefaultValue()); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArray.java new file mode 100644 index 00000000000..11a3b05a4c0 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArray.java @@ -0,0 +1,417 @@ +/* Copyright 2021 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ +package org.tensorflow.ndarray.impl.sparse; + +import org.tensorflow.ndarray.FloatNdArray; +import org.tensorflow.ndarray.LongNdArray; +import org.tensorflow.ndarray.NdArray; +import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.StdArrays; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.buffer.FloatDataBuffer; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; +import org.tensorflow.ndarray.impl.sparse.slice.FloatSparseSlice; +import org.tensorflow.ndarray.index.Index; + +import java.nio.ReadOnlyBufferException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.atomic.AtomicInteger; + +/** + * sparse array for the float data type + * + *

    A sparse array as two separate dense arrays: indices, values, and a shape that represents the + * dense shape. + * + *

    NOTE: all Sparse Arrays are readonly for the {@link #set(NdArray, long...)} and + * {@link #setObject(Float, long...)} methods + * + *

    {@code
    + * FloatSparseNdArray st = new FloatSparseNdArray(
    + *      StdArrays.of(new long[][] {{0, 0}, {1, 2}}),
    + *      NdArrays.vectorOf(1f, 3.14f}),
    + *      Shape.of(3, 4));
    + *
    + * }
    + * + *

    represents the dense array: + * + *

    {@code
    + * [[1, 0, 0, 0]
    + *  [0, 0, 3.14, 0]
    + *  [0, 0, 0, 0]]
    + *
    + * }
    + */ +public class FloatSparseNdArray extends AbstractSparseNdArray + implements FloatNdArray { + + /** + * Creates a FloatSparseNdArray with a default value of zero. + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D FloatNdArray of shape {@code [N]}, which supplies the values for each + * element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code + * values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse NdArray has a value of + * {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.6}. + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + FloatSparseNdArray(LongNdArray indices, FloatNdArray values, DimensionalSpace dimensions) { + this(indices, values, 0f, dimensions); + } + + /** + * Creates a FloatSparseNdArray + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D FloatNdArray of shape {@code [N]}, which supplies the values for each + * element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code + * values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse NdArray has a value of + * {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.6}. + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + FloatSparseNdArray( + LongNdArray indices, FloatNdArray values, float defaultValue, DimensionalSpace dimensions) { + super(indices, values, defaultValue, dimensions); + } + + /** + * Creates a FloatSparseNdArray + * + * @param dataBuffer a dense dataBuffer used to create the spars array + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + FloatSparseNdArray(FloatDataBuffer dataBuffer, DimensionalSpace dimensions) { + this(dataBuffer, 0f, dimensions); + } + + /** + * Creates a FloatSparseNdArray + * + * @param dataBuffer a dense dataBuffer used to create the spars array + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + FloatSparseNdArray(FloatDataBuffer dataBuffer, float defaultValue, DimensionalSpace dimensions) { + super(defaultValue, dimensions); + // use write to set up the indices and values + write(dataBuffer); + } + + /** + * Creates a zero-filled FloatSparseNdArray + * + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + FloatSparseNdArray(DimensionalSpace dimensions) { + this(0f, dimensions); + } + + /** + * Creates a zero-filled FloatSparseNdArray + * + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + FloatSparseNdArray(float defaultValue, DimensionalSpace dimensions) { + super(defaultValue, dimensions); + } + + /** + * Creates a new FloatSparseNdArray + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D NdArray of any type and shape {@code [N]}, which supplies the values for + * each element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter + * {@code values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse NdArray has a + * value of {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.6}. + * @param dimensions the dimensional space for the dense object represented by this sparse array. + * @return the new Sparse Array + */ + public static FloatSparseNdArray create( + LongNdArray indices, FloatNdArray values, DimensionalSpace dimensions) { + return new FloatSparseNdArray(indices, values, dimensions); + } + + /** + * Creates a new FloatSparseNdArray + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D NdArray of any type and shape {@code [N]}, which supplies the values for + * each element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter + * {@code values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse NdArray has a + * value of {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.6}. + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensional space for the dense object represented by this sparse array. + * @return the new Sparse Array + */ + public static FloatSparseNdArray create( + LongNdArray indices, FloatNdArray values, float defaultValue, DimensionalSpace dimensions) { + return new FloatSparseNdArray(indices, values, defaultValue, dimensions); + } + + /** + * Creates a new FloatSparseNdArray from a data buffer + * + * @param dataBuffer the databuffer containing the dense array + * @param dimensions the dimensional space for the sparse array + * @return the new Sparse Array + */ + public static FloatSparseNdArray create(FloatDataBuffer dataBuffer, DimensionalSpace dimensions) { + return new FloatSparseNdArray(dataBuffer, dimensions); + } + + /** + * Creates a new FloatSparseNdArray from a data buffer + * + * @param dataBuffer the databuffer containing the dense array + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensional space for the sparse array + * @return the new Sparse Array + */ + public static FloatSparseNdArray create( + FloatDataBuffer dataBuffer, float defaultValue, DimensionalSpace dimensions) { + return new FloatSparseNdArray(dataBuffer, defaultValue, dimensions); + } + + /** + * Creates a new empty FloatSparseNdArray from a data buffer + * + * @param dimensions the dimensions array + * @return the new Sparse Array + */ + public static FloatSparseNdArray create(DimensionalSpace dimensions) { + return new FloatSparseNdArray(dimensions); + } + + /** + * Creates a new empty FloatSparseNdArray from a data buffer + * + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensions array + * @return the new Sparse Array + */ + public static FloatSparseNdArray create(float defaultValue, DimensionalSpace dimensions) { + return new FloatSparseNdArray(defaultValue, dimensions); + } + + /** + * Creates a new empty FloatSparseNdArray from a float data buffer + * + * @param buffer the data buffer + * @param shape the shape of the sparse array. + * @return the new Sparse Array + */ + public static FloatSparseNdArray create(FloatDataBuffer buffer, Shape shape) { + return new FloatSparseNdArray(buffer, DimensionalSpace.create(shape)); + } + + /** + * Creates a new empty FloatSparseNdArray from a float data buffer + * + * @param buffer the data buffer + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param shape the shape of the sparse array. + * @return the new Sparse Array + */ + public static FloatSparseNdArray create(FloatDataBuffer buffer, float defaultValue, Shape shape) { + return new FloatSparseNdArray(buffer, defaultValue, DimensionalSpace.create(shape)); + } + + /** + * Creates a new FloatSparseNdArray from a FloatNdArray + * + * @param src the FloatNdArray + * @return the new Sparse Array + */ + public static FloatSparseNdArray create(FloatNdArray src) { + FloatDataBuffer buffer = DataBuffers.ofFloats(src.size()); + src.read(buffer); + return new FloatSparseNdArray(buffer, DimensionalSpace.create(src.shape())); + } + /** + * Creates a new FloatSparseNdArray from a FloatNdArray + * + * @param src the FloatNdArray + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @return the new Sparse Array + */ + public static FloatSparseNdArray create(FloatNdArray src, float defaultValue) { + FloatDataBuffer buffer = DataBuffers.ofFloats(src.size()); + src.read(buffer); + return new FloatSparseNdArray(buffer, defaultValue, DimensionalSpace.create(src.shape())); + } + + /** + * Creates a FloatNdArray of the specified shape + * + * @param shape the shape of the dense array. + * @return a FloatNdArray of the specified shape + */ + public FloatNdArray createValues(Shape shape) { + return NdArrays.ofFloats(shape); + } + + /** {@inheritDoc} */ + @Override + public FloatNdArray slice(long position, DimensionalSpace sliceDimensions) { + return new FloatSparseSlice(this, position, sliceDimensions); + } + + /** {@inheritDoc} */ + @Override + public float getFloat(long... coordinates) { + return getObject(coordinates); + } + + /** {@inheritDoc} */ + @Override + public FloatNdArray setFloat(float value, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + /** {@inheritDoc} */ + @Override + public FloatNdArray read(DataBuffer dst) { + return read((FloatDataBuffer) dst); + } + + /** {@inheritDoc} */ + @Override + public FloatNdArray read(FloatDataBuffer dst) { + // set the values in buf to the default, then overwrite with indices/values + Float[] defaults = new Float[(int) shape().size()]; + Arrays.fill(defaults, getDefaultValue()); + dst.write(defaults); + + AtomicInteger i = new AtomicInteger(); + getIndices() + .elements(0) + .forEachIndexed( + (idx, l) -> { + long[] coordinates = getIndicesCoordinates(l); + float value = getValues().getFloat(i.getAndIncrement()); + dst.setObject(value, dimensions.positionOf(coordinates)); + }); + return this; + } + + /** {@inheritDoc} */ + @Override + public FloatNdArray write(FloatDataBuffer src) { + List indices = new ArrayList<>(); + List values = new ArrayList<>(); + + for (long i = 0; i < src.size(); i++) { + if (!src.getObject(i).equals(getDefaultValue())) { + indices.add(toCoordinates(dimensions, i)); + values.add(src.getObject(i)); + } + } + long[][] indicesArray = new long[indices.size()][]; + float[] valuesArray = new float[values.size()]; + for (int i = 0; i < indices.size(); i++) { + indicesArray[i] = indices.get(i); + valuesArray[i] = values.get(i); + } + + setIndices(StdArrays.ndCopyOf(indicesArray)); + setValues(NdArrays.vectorOf(valuesArray)); + return this; + } + + /** {@inheritDoc} */ + @Override + public FloatNdArray write(DataBuffer src) { + return write((FloatDataBuffer) src); + } + + /** + * Converts the sparse array to a dense array + * + * @return the dense array + */ + public FloatNdArray toDense() { + FloatDataBuffer dataBuffer = DataBuffers.ofFloats(shape().size()); + read(dataBuffer); + return NdArrays.wrap(shape(), dataBuffer); + } + + /** + * Populates this sparse array from a dense array + * + * @param src the dense array + * @return this sparse array + */ + public FloatNdArray fromDense(FloatNdArray src) { + FloatDataBuffer buffer = DataBuffers.ofFloats(src.size()); + src.read(buffer); + write(buffer); + return this; + } + + /** {@inheritDoc} */ + @Override + public FloatNdArray slice(Index... indices) { + return (FloatNdArray) super.slice(indices); + } + + /** {@inheritDoc} */ + @Override + public FloatNdArray get(long... coordinates) { + return (FloatNdArray) super.get(coordinates); + } + + /** {@inheritDoc} */ + @Override + public FloatNdArray setObject(Float value, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + /** {@inheritDoc} */ + @Override + public FloatNdArray set(NdArray src, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + /** {@inheritDoc} */ + @Override + public FloatNdArray copyTo(NdArray dst) { + return (FloatNdArray) super.copyTo(dst); + } + + /** {@inheritDoc} */ + @Override + public FloatNdArray createDefaultArray() { + return NdArrays.scalarOf(getDefaultValue()); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArray.java new file mode 100644 index 00000000000..f822a425dc1 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArray.java @@ -0,0 +1,432 @@ +/* Copyright 2021 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ +package org.tensorflow.ndarray.impl.sparse; + +import org.tensorflow.ndarray.IntNdArray; +import org.tensorflow.ndarray.LongNdArray; +import org.tensorflow.ndarray.NdArray; +import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.StdArrays; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.buffer.IntDataBuffer; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; +import org.tensorflow.ndarray.impl.sparse.slice.IntSparseSlice; +import org.tensorflow.ndarray.index.Index; + +import java.nio.ReadOnlyBufferException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.atomic.AtomicInteger; + +/** + * sparse array for the int data type + * + *

    A sparse array as two separate dense arrays: indices, values, and a shape that represents the + * dense shape. + * + *

    NOTE: all Sparse Arrays are readonly for the {@link #set(NdArray, long...)} and + * {@link #setObject(Integer, long...)} methods + * + *

    {@code
    + * IntSparseNdArray st = new IntSparseNdArray(
    + *      StdArrays.of(new long[][] {{0, 0}, {1, 2}}),
    + *      NdArrays.vectorOf(1, 256),
    + *      Shape.of(3, 4));
    + *
    + * }
    + * + *

    represents the dense array: + * + *

    {@code
    + * [[1, 0, 0, 0]
    + *  [0, 0, 256, 0]
    + *  [0, 0, 0, 0]]
    + *
    + * }
    + */ +public class IntSparseNdArray extends AbstractSparseNdArray + implements IntNdArray { + + /** + * Creates a IntSparseNdArray with a default value of zero. + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D IntNdArray of shape {@code [N]}, which supplies the values for each element + * in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code + * values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse NdArray has a value of + * {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.6}. + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + IntSparseNdArray(LongNdArray indices, IntNdArray values, DimensionalSpace dimensions) { + this(indices, values, 0, dimensions); + } + + /** + * Creates a IntSparseNdArray + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D IntNdArray of shape {@code [N]}, which supplies the values for each element + * in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code + * values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse NdArray has a value of + * {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.6}. + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + IntSparseNdArray( + LongNdArray indices, IntNdArray values, int defaultValue, DimensionalSpace dimensions) { + super(indices, values, defaultValue, dimensions); + } + + /** + * Creates a IntSparseNdArray + * + * @param dataBuffer a dense dataBuffer used to create the spars array + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + IntSparseNdArray(IntDataBuffer dataBuffer, DimensionalSpace dimensions) { + this(dataBuffer, 0, dimensions); + } + /** + * Creates a IntSparseNdArray + * + * @param dataBuffer a dense dataBuffer used to create the spars array + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + IntSparseNdArray(IntDataBuffer dataBuffer, int defaultValue, DimensionalSpace dimensions) { + super(defaultValue, dimensions); + // use write to set up the indices and values + write(dataBuffer); + } + + /** + * Creates a zero-filled IntSparseNdArray + * + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + IntSparseNdArray(DimensionalSpace dimensions) { + this(0, dimensions); + } + + /** + * Creates a zero-filled IntSparseNdArray + * + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + IntSparseNdArray(int defaultValue, DimensionalSpace dimensions) { + super(defaultValue, dimensions); + } + + /** + * Creates a new IntSparseNdArray + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D NdArray of any type and shape {@code [N]}, which supplies the values for + * each element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter + * {@code values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse NdArray has a + * value of {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.6}. + * @param dimensions the dimensional space for the dense object represented by this sparse array. + * @return the new Sparse Array + */ + public static IntSparseNdArray create( + LongNdArray indices, IntNdArray values, DimensionalSpace dimensions) { + return new IntSparseNdArray(indices, values, dimensions); + } + + /** + * Creates a new IntSparseNdArray + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D NdArray of any type and shape {@code [N]}, which supplies the values for + * each element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter + * {@code values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse NdArray has a + * value of {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.6}. + * @param dimensions the dimensional space for the dense object represented by this sparse array. + * @return the new Sparse Array + */ + public static IntSparseNdArray create( + LongNdArray indices, IntNdArray values, int defaultValue, DimensionalSpace dimensions) { + return new IntSparseNdArray(indices, values, defaultValue, dimensions); + } + + /** + * Creates a new IntSparseNdArray from a data buffer + * + * @param dataBuffer the databuffer containing the dense array + * @param dimensions the dimensional space for the sparse array + * @return the new Sparse Array + */ + public static IntSparseNdArray create(IntDataBuffer dataBuffer, DimensionalSpace dimensions) { + return new IntSparseNdArray(dataBuffer, dimensions); + } + + /** + * Creates a new IntSparseNdArray from a data buffer + * + * @param dataBuffer the databuffer containing the dense array + * @param dimensions the dimensional space for the sparse array + * @return the new Sparse Array + */ + public static IntSparseNdArray create( + IntDataBuffer dataBuffer, int defaultValue, DimensionalSpace dimensions) { + return new IntSparseNdArray(dataBuffer, defaultValue, dimensions); + } + + /** + * Creates a new empty IntSparseNdArray from a data buffer + * + * @param dimensions the dimensions array + * @return the new Sparse Array + */ + public static IntSparseNdArray create(DimensionalSpace dimensions) { + return new IntSparseNdArray(dimensions); + } + + /** + * Creates a new empty IntSparseNdArray from a data buffer + * + * @param dimensions the dimensions array + * @return the new Sparse Array + */ + public static IntSparseNdArray create(int defaultValue, DimensionalSpace dimensions) { + return new IntSparseNdArray(defaultValue, dimensions); + } + + /** + * Creates a new empty IntSparseNdArray from a data buffer + * + * @param shape the shape of the debse array that this sparse array represents + * @return the new Sparse Array + */ + public static IntSparseNdArray create(Shape shape) { + return new IntSparseNdArray(DimensionalSpace.create(shape)); + } + /** + * Creates a new empty IntSparseNdArray from a data buffer + * + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param shape the shape of the debse array that this sparse array represents + * @return the new Sparse Array + */ + public static IntSparseNdArray create(int defaultValue, Shape shape) { + return new IntSparseNdArray(defaultValue, DimensionalSpace.create(shape)); + } + + /** + * Creates a new empty IntSparseNdArray from a int data buffer + * + * @param buffer the data buffer + * @param shape the shape of the sparse array. + * @return the new Sparse Array + */ + public static IntSparseNdArray create(IntDataBuffer buffer, Shape shape) { + return new IntSparseNdArray(buffer, DimensionalSpace.create(shape)); + } + + /** + * Creates a new empty IntSparseNdArray from a int data buffer + * + * @param buffer the data buffer + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param shape the shape of the sparse array. + * @return the new Sparse Array + */ + public static IntSparseNdArray create(IntDataBuffer buffer, int defaultValue, Shape shape) { + return new IntSparseNdArray(buffer, defaultValue, DimensionalSpace.create(shape)); + } + + /** + * Creates a new IntSparseNdArray from a IntNdArray + * + * @param src the IntNdArray + * @return the new Sparse Array + */ + public static IntSparseNdArray create(IntNdArray src) { + IntDataBuffer buffer = DataBuffers.ofInts(src.size()); + src.read(buffer); + return new IntSparseNdArray(buffer, DimensionalSpace.create(src.shape())); + } + + /** + * Creates a new IntSparseNdArray from a IntNdArray + * + * @param src the IntNdArray + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @return the new Sparse Array + */ + public static IntSparseNdArray create(IntNdArray src, int defaultValue) { + IntDataBuffer buffer = DataBuffers.ofInts(src.size()); + src.read(buffer); + return new IntSparseNdArray(buffer, defaultValue, DimensionalSpace.create(src.shape())); + } + + /** + * Creates a IntNdArray of the specified shape + * + * @param shape the shape of the dense array. + * @return a IntNdArray of the specified shape + */ + public IntNdArray createValues(Shape shape) { + return NdArrays.ofInts(shape); + } + + /** {@inheritDoc} */ + @Override + public IntNdArray slice(long position, DimensionalSpace sliceDimensions) { + return new IntSparseSlice(this, position, sliceDimensions); + } + + /** {@inheritDoc} */ + @Override + public int getInt(long... coordinates) { + return getObject(coordinates); + } + + /** {@inheritDoc} */ + @Override + public IntNdArray setInt(int value, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + /** {@inheritDoc} */ + @Override + public IntNdArray read(DataBuffer dst) { + return read((IntDataBuffer) dst); + } + + /** {@inheritDoc} */ + @Override + public IntNdArray read(IntDataBuffer dst) { + // set the values in buf to the default, then overwrite with indices/values + Integer[] defaults = new Integer[(int) shape().size()]; + Arrays.fill(defaults, getDefaultValue()); + dst.write(defaults); + + AtomicInteger i = new AtomicInteger(); + getIndices() + .elements(0) + .forEachIndexed( + (idx, l) -> { + long[] coordinates = getIndicesCoordinates(l); + int value = getValues().getInt(i.getAndIncrement()); + dst.setObject(value, dimensions.positionOf(coordinates)); + }); + return this; + } + + /** {@inheritDoc} */ + @Override + public IntNdArray write(IntDataBuffer src) { + List indices = new ArrayList<>(); + List values = new ArrayList<>(); + + for (long i = 0; i < src.size(); i++) { + if (!src.getObject(i).equals(getDefaultValue())) { + indices.add(toCoordinates(dimensions, i)); + values.add(src.getObject(i)); + } + } + long[][] indicesArray = new long[indices.size()][]; + int[] valuesArray = new int[values.size()]; + for (int i = 0; i < indices.size(); i++) { + indicesArray[i] = indices.get(i); + valuesArray[i] = values.get(i); + } + + setIndices(StdArrays.ndCopyOf(indicesArray)); + setValues(NdArrays.vectorOf(valuesArray)); + return this; + } + + /** {@inheritDoc} */ + @Override + public IntNdArray write(DataBuffer src) { + return write((IntDataBuffer) src); + } + + /** + * Converts the sparse array to a dense array + * + * @return the dense array + */ + public IntNdArray toDense() { + IntDataBuffer dataBuffer = DataBuffers.ofInts(shape().size()); + read(dataBuffer); + return NdArrays.wrap(shape(), dataBuffer); + } + + /** + * Populates this sparse array from a dense array + * + * @param src the dense array + * @return this sparse array + */ + public IntNdArray fromDense(IntNdArray src) { + IntDataBuffer buffer = DataBuffers.ofInts(src.size()); + src.read(buffer); + write(buffer); + return this; + } + + /** {@inheritDoc} */ + @Override + public IntNdArray slice(Index... indices) { + return (IntNdArray) super.slice(indices); + } + + /** {@inheritDoc} */ + @Override + public IntNdArray get(long... coordinates) { + return (IntNdArray) super.get(coordinates); + } + + /** {@inheritDoc} */ + @Override + public IntNdArray setObject(Integer value, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + /** {@inheritDoc} */ + @Override + public IntNdArray set(NdArray src, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + /** {@inheritDoc} */ + @Override + public IntNdArray copyTo(NdArray dst) { + return (IntNdArray) super.copyTo(dst); + } + + /** {@inheritDoc} */ + @Override + public IntNdArray createDefaultArray() { + return NdArrays.scalarOf(getDefaultValue()); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArray.java new file mode 100644 index 00000000000..3385022fe53 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArray.java @@ -0,0 +1,417 @@ +/* Copyright 2021 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ +package org.tensorflow.ndarray.impl.sparse; + +import org.tensorflow.ndarray.LongNdArray; +import org.tensorflow.ndarray.NdArray; +import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.StdArrays; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.buffer.LongDataBuffer; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; +import org.tensorflow.ndarray.impl.sparse.slice.LongSparseSlice; +import org.tensorflow.ndarray.index.Index; + +import java.nio.ReadOnlyBufferException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.atomic.AtomicLong; + +/** + * sparse array for the long data type + * + *

    A sparse array as two separate dense arrays: indices, values, and a shape that represents the + * dense shape. + * + *

    NOTE: all Sparse Arrays are readonly for the {@link #set(NdArray, long...)} and + * {@link #setObject(Long, long...)} methods + * + *

    {@code
    + * LongSparseNdArray st = new LongSparseNdArray(
    + *      StdArrays.of(new long[][] {{0, 0}, {1, 2}}),
    + *      NdArrays.vectorOf(1L, 256L),
    + *      Shape.of(3, 4));
    + *
    + * }
    + * + *

    represents the dense array: + * + *

    {@code
    + * [[1, 0, 0, 0]
    + *  [0, 0, 256, 0]
    + *  [0, 0, 0, 0]]
    + *
    + * }
    + */ +public class LongSparseNdArray extends AbstractSparseNdArray + implements LongNdArray { + + /** + * Creates a LongSparseNdArray with a default value of zero. + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D LongNdArray of shape {@code [N]}, which supplies the values for each + * element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code + * values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse NdArray has a value of + * {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.6}. + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + LongSparseNdArray(LongNdArray indices, LongNdArray values, DimensionalSpace dimensions) { + this(indices, values, 0L, dimensions); + } + + /** + * Creates a LongSparseNdArray + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D LongNdArray of shape {@code [N]}, which supplies the values for each + * element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code + * values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse NdArray has a value of + * {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.6}. + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + LongSparseNdArray( + LongNdArray indices, LongNdArray values, long defaultValue, DimensionalSpace dimensions) { + super(indices, values, defaultValue, dimensions); + } + + /** + * Creates a LongSparseNdArray + * + * @param dataBuffer a dense dataBuffer used to create the spars array + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + LongSparseNdArray(LongDataBuffer dataBuffer, DimensionalSpace dimensions) { + this(dataBuffer, 0L, dimensions); + } + + /** + * Creates a LongSparseNdArray + * + * @param dataBuffer a dense dataBuffer used to create the spars array + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + LongSparseNdArray(LongDataBuffer dataBuffer, long defaultValue, DimensionalSpace dimensions) { + super(defaultValue, dimensions); + // use write to set up the indices and values + write(dataBuffer); + } + + /** + * Creates a zero-filled LongSparseNdArray + * + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + LongSparseNdArray(DimensionalSpace dimensions) { + this(0L, dimensions); + } + + /** + * Creates a zero-filled LongSparseNdArray + * + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + LongSparseNdArray(long defaultValue, DimensionalSpace dimensions) { + super(defaultValue, dimensions); + } + + /** + * Creates a new LongSparseNdArray + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D NdArray of any type and shape {@code [N]}, which supplies the values for + * each element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter + * {@code values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse NdArray has a + * value of {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.6}. + * @param dimensions the dimensional space for the dense object represented by this sparse array. + * @return the new Sparse Array + */ + public static LongSparseNdArray create( + LongNdArray indices, LongNdArray values, DimensionalSpace dimensions) { + return new LongSparseNdArray(indices, values, dimensions); + } + + /** + * Creates a new LongSparseNdArray + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D NdArray of any type and shape {@code [N]}, which supplies the values for + * each element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter + * {@code values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse NdArray has a + * value of {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.6}. + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensional space for the dense object represented by this sparse array. + * @return the new Sparse Array + */ + public static LongSparseNdArray create( + LongNdArray indices, LongNdArray values, long defaultValue, DimensionalSpace dimensions) { + return new LongSparseNdArray(indices, values, defaultValue, dimensions); + } + + /** + * Creates a new LongSparseNdArray from a data buffer + * + * @param dataBuffer the databuffer containing the dense array + * @param dimensions the dimensional space for the sparse array + * @return the new Sparse Array + */ + public static LongSparseNdArray create(LongDataBuffer dataBuffer, DimensionalSpace dimensions) { + return new LongSparseNdArray(dataBuffer, dimensions); + } + + /** + * Creates a new LongSparseNdArray from a data buffer + * + * @param dataBuffer the databuffer containing the dense array + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensional space for the sparse array + * @return the new Sparse Array + */ + public static LongSparseNdArray create( + LongDataBuffer dataBuffer, long defaultValue, DimensionalSpace dimensions) { + return new LongSparseNdArray(dataBuffer, defaultValue, dimensions); + } + + /** + * Creates a new empty LongSparseNdArray from a data buffer + * + * @param dimensions the dimensions array + * @return the new Sparse Array + */ + public static LongSparseNdArray create(DimensionalSpace dimensions) { + return new LongSparseNdArray(dimensions); + } + + /** + * Creates a new empty LongSparseNdArray from a data buffer + * + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensions array + * @return the new Sparse Array + */ + public static LongSparseNdArray create(long defaultValue, DimensionalSpace dimensions) { + return new LongSparseNdArray(defaultValue, dimensions); + } + + /** + * Creates a new empty LongSparseNdArray from a long data buffer + * + * @param buffer the data buffer + * @param shape the shape of the sparse array. + * @return the new Sparse Array + */ + public static LongSparseNdArray create(LongDataBuffer buffer, Shape shape) { + return new LongSparseNdArray(buffer, DimensionalSpace.create(shape)); + } + + /** + * Creates a new empty LongSparseNdArray from a long data buffer + * + * @param buffer the data buffer + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param shape the shape of the sparse array. + * @return the new Sparse Array + */ + public static LongSparseNdArray create(LongDataBuffer buffer, long defaultValue, Shape shape) { + return new LongSparseNdArray(buffer, defaultValue, DimensionalSpace.create(shape)); + } + + /** + * Creates a new LongSparseNdArray from a LongNdArray + * + * @param src the LongNdArray + * @return the new Sparse Array + */ + public static LongSparseNdArray create(LongNdArray src) { + LongDataBuffer buffer = DataBuffers.ofLongs(src.size()); + src.read(buffer); + return new LongSparseNdArray(buffer, DimensionalSpace.create(src.shape())); + } + + /** + * Creates a new LongSparseNdArray from a LongNdArray + * + * @param src the LongNdArray + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @return the new Sparse Array + */ + public static LongSparseNdArray create(LongNdArray src, long defaultValue) { + LongDataBuffer buffer = DataBuffers.ofLongs(src.size()); + src.read(buffer); + return new LongSparseNdArray(buffer, defaultValue, DimensionalSpace.create(src.shape())); + } + + /** + * Creates a LongNdArray of the specified shape + * + * @param shape the shape of the dense array. + * @return a LongNdArray of the specified shape + */ + public LongNdArray createValues(Shape shape) { + return NdArrays.ofLongs(shape); + } + + /** {@inheritDoc} */ + @Override + public LongNdArray slice(long position, DimensionalSpace sliceDimensions) { + return new LongSparseSlice(this, position, sliceDimensions); + } + + /** {@inheritDoc} */ + @Override + public long getLong(long... coordinates) { + return getObject(coordinates); + } + + /** {@inheritDoc} */ + @Override + public LongNdArray setLong(long value, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + /** {@inheritDoc} */ + @Override + public LongNdArray read(DataBuffer dst) { + return read((LongDataBuffer) dst); + } + + /** {@inheritDoc} */ + @Override + public LongNdArray read(LongDataBuffer dst) { + // set the values in buf to the default, then overwrite with indices/values + Long[] defaults = new Long[(int) shape().size()]; + Arrays.fill(defaults, getDefaultValue()); + dst.write(defaults); + + AtomicLong i = new AtomicLong(); + getIndices() + .elements(0) + .forEachIndexed( + (idx, l) -> { + long[] coordinates = getIndicesCoordinates(l); + long value = getValues().getLong(i.getAndIncrement()); + dst.setObject(value, dimensions.positionOf(coordinates)); + }); + return this; + } + + /** {@inheritDoc} */ + @Override + public LongNdArray write(LongDataBuffer src) { + List indices = new ArrayList<>(); + List values = new ArrayList<>(); + + for (long i = 0; i < src.size(); i++) { + if (!src.getObject(i).equals(getDefaultValue())) { + indices.add(toCoordinates(dimensions, i)); + values.add(src.getObject(i)); + } + } + long[][] indicesArray = new long[indices.size()][]; + long[] valuesArray = new long[values.size()]; + for (int i = 0; i < indices.size(); i++) { + indicesArray[i] = indices.get(i); + valuesArray[i] = values.get(i); + } + + setIndices(StdArrays.ndCopyOf(indicesArray)); + setValues(NdArrays.vectorOf(valuesArray)); + return this; + } + + /** {@inheritDoc} */ + @Override + public LongNdArray write(DataBuffer src) { + return write((LongDataBuffer) src); + } + + /** + * Converts the sparse array to a dense array + * + * @return the dense array + */ + public LongNdArray toDense() { + LongDataBuffer dataBuffer = DataBuffers.ofLongs(shape().size()); + read(dataBuffer); + return NdArrays.wrap(shape(), dataBuffer); + } + + /** + * Populates this sparse array from a dense array + * + * @param src the dense array + * @return this sparse array + */ + public LongNdArray fromDense(LongNdArray src) { + LongDataBuffer buffer = DataBuffers.ofLongs(src.size()); + src.read(buffer); + write(buffer); + return this; + } + + /** {@inheritDoc} */ + @Override + public LongNdArray slice(Index... indices) { + return (LongNdArray) super.slice(indices); + } + + /** {@inheritDoc} */ + @Override + public LongNdArray get(long... coordinates) { + return (LongNdArray) super.get(coordinates); + } + + /** {@inheritDoc} */ + @Override + public LongNdArray setObject(Long value, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + /** {@inheritDoc} */ + @Override + public LongNdArray set(NdArray src, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + /** {@inheritDoc} */ + @Override + public LongNdArray copyTo(NdArray dst) { + return (LongNdArray) super.copyTo(dst); + } + + /** {@inheritDoc} */ + @Override + public LongNdArray createDefaultArray() { + return NdArrays.scalarOf(getDefaultValue()); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArray.java new file mode 100644 index 00000000000..50793b994d7 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArray.java @@ -0,0 +1,418 @@ +/* Copyright 2021 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ +package org.tensorflow.ndarray.impl.sparse; + +import org.tensorflow.ndarray.LongNdArray; +import org.tensorflow.ndarray.NdArray; +import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.ShortNdArray; +import org.tensorflow.ndarray.StdArrays; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.buffer.ShortDataBuffer; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; +import org.tensorflow.ndarray.impl.sparse.slice.ShortSparseSlice; +import org.tensorflow.ndarray.index.Index; + +import java.nio.ReadOnlyBufferException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.atomic.AtomicInteger; + +/** + * sparse array for the short data type + * + *

    A sparse array as two separate dense arrays: indices, values, and a shape that represents the + * dense shape. + * + *

    NOTE: all Sparse Arrays are readonly for the {@link #set(NdArray, long...)} and + * {@link #setObject(Short, long...)} methods + * + *

    {@code
    + * ShortSparseNdArray st = new ShortSparseNdArray(
    + *      StdArrays.of(new long[][] {{0, 0}, {1, 2}}),
    + *      NdArrays.vectorOf((short)1, (short)256}),
    + *      Shape.of(3, 4));
    + *
    + * }
    + * + *

    represents the dense array: + * + *

    {@code
    + * [[1, 0, 0, 0]
    + *  [0, 0, 256, 0]
    + *  [0, 0, 0, 0]]
    + *
    + * }
    + */ +public class ShortSparseNdArray extends AbstractSparseNdArray + implements ShortNdArray { + + /** + * Creates a ShortSparseNdArray with a default value of zero. + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D ShortNdArray of shape {@code [N]}, which supplies the values for each + * element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code + * values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse NdArray has a value of + * {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.6}. + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + ShortSparseNdArray(LongNdArray indices, ShortNdArray values, DimensionalSpace dimensions) { + this(indices, values, (short) 0, dimensions); + } + + /** + * Creates a ShortSparseNdArray + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D ShortNdArray of shape {@code [N]}, which supplies the values for each + * element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code + * values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse NdArray has a value of + * {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.6}. + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + ShortSparseNdArray( + LongNdArray indices, ShortNdArray values, short defaultValue, DimensionalSpace dimensions) { + super(indices, values, defaultValue, dimensions); + } + + /** + * Creates a ShortSparseNdArray + * + * @param dataBuffer a dense dataBuffer used to create the spars array + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + ShortSparseNdArray(ShortDataBuffer dataBuffer, DimensionalSpace dimensions) { + this(dataBuffer, (short) 0, dimensions); + } + + /** + * Creates a ShortSparseNdArray + * + * @param dataBuffer a dense dataBuffer used to create the spars array + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + ShortSparseNdArray(ShortDataBuffer dataBuffer, short defaultValue, DimensionalSpace dimensions) { + super(defaultValue, dimensions); + // use write to set up the indices and values + write(dataBuffer); + } + + /** + * Creates a zero-filled ShortSparseNdArray + * + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + ShortSparseNdArray(DimensionalSpace dimensions) { + this((short) 0, dimensions); + } + + /** + * Creates a zero-filled ShortSparseNdArray + * + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + ShortSparseNdArray(short defaultValue, DimensionalSpace dimensions) { + super(defaultValue, dimensions); + } + + /** + * Creates a new ShortSparseNdArray + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D NdArray of any type and shape {@code [N]}, which supplies the values for + * each element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter + * {@code values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse NdArray has a + * value of {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.6}. + * @param dimensions the dimensional space for the dense object represented by this sparse array. + * @return the new Sparse Array + */ + public static ShortSparseNdArray create( + LongNdArray indices, ShortNdArray values, DimensionalSpace dimensions) { + return new ShortSparseNdArray(indices, values, dimensions); + } + + /** + * Creates a new ShortSparseNdArray + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D NdArray of any type and shape {@code [N]}, which supplies the values for + * each element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter + * {@code values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse NdArray has a + * value of {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.6}. + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensional space for the dense object represented by this sparse array. + * @return the new Sparse Array + */ + public static ShortSparseNdArray create( + LongNdArray indices, ShortNdArray values, short defaultValue, DimensionalSpace dimensions) { + return new ShortSparseNdArray(indices, values, defaultValue, dimensions); + } + + /** + * Creates a new ShortSparseNdArray from a data buffer + * + * @param dataBuffer the databuffer containing the dense array + * @param dimensions the dimensional space for the sparse array + * @return the new Sparse Array + */ + public static ShortSparseNdArray create(ShortDataBuffer dataBuffer, DimensionalSpace dimensions) { + return new ShortSparseNdArray(dataBuffer, dimensions); + } + + /** + * Creates a new ShortSparseNdArray from a data buffer + * + * @param dataBuffer the databuffer containing the dense array + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensional space for the sparse array + * @return the new Sparse Array + */ + public static ShortSparseNdArray create( + ShortDataBuffer dataBuffer, short defaultValue, DimensionalSpace dimensions) { + return new ShortSparseNdArray(dataBuffer, defaultValue, dimensions); + } + + /** + * Creates a new empty ShortSparseNdArray from a data buffer + * + * @param dimensions the dimensions array + * @return the new Sparse Array + */ + public static ShortSparseNdArray create(DimensionalSpace dimensions) { + return new ShortSparseNdArray(dimensions); + } + + /** + * Creates a new empty ShortSparseNdArray from a data buffer + * + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensions array + * @return the new Sparse Array + */ + public static ShortSparseNdArray create(short defaultValue, DimensionalSpace dimensions) { + return new ShortSparseNdArray(defaultValue, dimensions); + } + + /** + * Creates a new empty ShortSparseNdArray from a short data buffer + * + * @param buffer the data buffer + * @param shape the shape of the sparse array. + * @return the new Sparse Array + */ + public static ShortSparseNdArray create(ShortDataBuffer buffer, Shape shape) { + return new ShortSparseNdArray(buffer, DimensionalSpace.create(shape)); + } + + /** + * Creates a new empty ShortSparseNdArray from a short data buffer + * + * @param buffer the data buffer + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param shape the shape of the sparse array. + * @return the new Sparse Array + */ + public static ShortSparseNdArray create(ShortDataBuffer buffer, short defaultValue, Shape shape) { + return new ShortSparseNdArray(buffer, defaultValue, DimensionalSpace.create(shape)); + } + + /** + * Creates a new ShortSparseNdArray from a ShortNdArray + * + * @param src the ShortNdArray + * @return the new Sparse Array + */ + public static ShortSparseNdArray create(ShortNdArray src) { + ShortDataBuffer buffer = DataBuffers.ofShorts(src.size()); + src.read(buffer); + return new ShortSparseNdArray(buffer, DimensionalSpace.create(src.shape())); + } + + /** + * Creates a new ShortSparseNdArray from a ShortNdArray + * + * @param src the ShortNdArray + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @return the new Sparse Array + */ + public static ShortSparseNdArray create(ShortNdArray src, short defaultValue) { + ShortDataBuffer buffer = DataBuffers.ofShorts(src.size()); + src.read(buffer); + return new ShortSparseNdArray(buffer, defaultValue, DimensionalSpace.create(src.shape())); + } + + /** + * Creates a ShortNdArray of the specified shape + * + * @param shape the shape of the dense array. + * @return a ShortNdArray of the specified shape + */ + public ShortNdArray createValues(Shape shape) { + return NdArrays.ofShorts(shape); + } + + /** {@inheritDoc} */ + @Override + public ShortNdArray slice(long position, DimensionalSpace sliceDimensions) { + return new ShortSparseSlice(this, position, sliceDimensions); + } + + /** {@inheritDoc} */ + @Override + public short getShort(long... coordinates) { + return getObject(coordinates); + } + + /** {@inheritDoc} */ + @Override + public ShortNdArray setShort(short value, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + /** {@inheritDoc} */ + @Override + public ShortNdArray read(DataBuffer dst) { + return read((ShortDataBuffer) dst); + } + + /** {@inheritDoc} */ + @Override + public ShortNdArray read(ShortDataBuffer dst) { + // set the values in buf to the default, then overwrite with indices/values + Short[] defaults = new Short[(int) shape().size()]; + Arrays.fill(defaults, getDefaultValue()); + dst.write(defaults); + + AtomicInteger i = new AtomicInteger(); + getIndices() + .elements(0) + .forEachIndexed( + (idx, l) -> { + long[] coordinates = getIndicesCoordinates(l); + short value = getValues().getShort(i.getAndIncrement()); + dst.setObject(value, dimensions.positionOf(coordinates)); + }); + return this; + } + + /** {@inheritDoc} */ + @Override + public ShortNdArray write(ShortDataBuffer src) { + List indices = new ArrayList<>(); + List values = new ArrayList<>(); + + for (short i = 0; i < src.size(); i++) { + if (!src.getObject(i).equals(getDefaultValue())) { + indices.add(toCoordinates(dimensions, i)); + values.add(src.getObject(i)); + } + } + long[][] indicesArray = new long[indices.size()][]; + short[] valuesArray = new short[values.size()]; + for (int i = 0; i < indices.size(); i++) { + indicesArray[i] = indices.get(i); + valuesArray[i] = values.get(i); + } + + setIndices(StdArrays.ndCopyOf(indicesArray)); + setValues(NdArrays.vectorOf(valuesArray)); + return this; + } + + /** {@inheritDoc} */ + @Override + public ShortNdArray write(DataBuffer src) { + return write((ShortDataBuffer) src); + } + + /** + * Converts the sparse array to a dense array + * + * @return the dense array + */ + public ShortNdArray toDense() { + ShortDataBuffer dataBuffer = DataBuffers.ofShorts(shape().size()); + read(dataBuffer); + return NdArrays.wrap(shape(), dataBuffer); + } + + /** + * Populates this sparse array from a dense array + * + * @param src the dense array + * @return this sparse array + */ + public ShortNdArray fromDense(ShortNdArray src) { + ShortDataBuffer buffer = DataBuffers.ofShorts(src.size()); + src.read(buffer); + write(buffer); + return this; + } + + /** {@inheritDoc} */ + @Override + public ShortNdArray slice(Index... indices) { + return (ShortNdArray) super.slice(indices); + } + + /** {@inheritDoc} */ + @Override + public ShortNdArray get(long... coordinates) { + return (ShortNdArray) super.get(coordinates); + } + + /** {@inheritDoc} */ + @Override + public ShortNdArray setObject(Short value, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + /** {@inheritDoc} */ + @Override + public ShortNdArray set(NdArray src, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + /** {@inheritDoc} */ + @Override + public ShortNdArray copyTo(NdArray dst) { + return (ShortNdArray) super.copyTo(dst); + } + + /** {@inheritDoc} */ + @Override + public ShortNdArray createDefaultArray() { + return NdArrays.scalarOf(getDefaultValue()); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/SparseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/SparseNdArray.java new file mode 100644 index 00000000000..2c69fc9e865 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/SparseNdArray.java @@ -0,0 +1,397 @@ +/* Copyright 2021 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ +package org.tensorflow.ndarray.impl.sparse; + +import org.tensorflow.ndarray.LongNdArray; +import org.tensorflow.ndarray.NdArray; +import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.StdArrays; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; +import org.tensorflow.ndarray.impl.sparse.slice.ObjectSparseSlice; + +import java.lang.reflect.Array; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Objects; +import java.util.concurrent.atomic.AtomicInteger; + +/** + * sparse array for the any data type + * + *

    A sparse array has two separate dense arrays: indices, values, and a shape that represents the + * dense shape. + * + *

    NOTE: all Sparse Arrays are readonly for the {@link #set(NdArray, long...)} and + * {@link #setObject(Object, long...)} methods + * + *

    {@code
    + * SparseNdArray st = new SparseNdArray<>(
    + *      StdArrays.of(new long[][] {{0, 0}, {1, 2}}),
    + *      NdArrays.vectorOf("first", "second"),
    + *      Shape.of(3, 4));
    + *
    + * }
    + * + *

    represents the dense array: + * + *

    {@code
    + * [[true, false, false, false]
    + *  [false, false, true, false]
    + *  [false, false, false, false]]
    + *
    + * }
    + */ +public class SparseNdArray> extends AbstractSparseNdArray + implements org.tensorflow.ndarray.SparseNdArray { + + private final Class type; + + /** + * Creates a SparseNdArray with a default value of null. + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D NdArray of Boolean type and shape {@code [N]}, which supplies the values + * for each element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the + * parameter {@code values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse + * NdArray has a value of {@code 18}, and element {@code [2,4]} of the NdArray has a value of + * {@code 3.6}. + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + SparseNdArray(Class type, LongNdArray indices, U values, DimensionalSpace dimensions) { + this(type, indices, values, null, dimensions); + } + + /** + * Creates a SparseNdArray + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D NdArray of Boolean type and shape {@code [N]}, which supplies the values + * for each element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the + * parameter {@code values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse + * NdArray has a value of {@code 18}, and element {@code [2,4]} of the NdArray has a value of + * {@code 3.6}. + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + SparseNdArray( + Class type, LongNdArray indices, U values, T defaultValue, DimensionalSpace dimensions) { + super(indices, values, defaultValue, dimensions); + this.type = type; + } + + /** + * Creates a SparseNdArray + * + * @param dataBuffer a dense dataBuffer used to create the spars array + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + SparseNdArray(Class type, DataBuffer dataBuffer, DimensionalSpace dimensions) { + this(type, dataBuffer, null, dimensions); + } + + /** + * Creates a SparseNdArray + * + * @param dataBuffer a dense dataBuffer used to create the spars array + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + SparseNdArray( + Class type, DataBuffer dataBuffer, T defaultValue, DimensionalSpace dimensions) { + super(defaultValue, dimensions); + this.type = type; + // use write to set up the indices and values + write(dataBuffer); + } + + /** + * Creates a zero-filled SparseNdArray + * + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + SparseNdArray(Class type, DimensionalSpace dimensions) { + this(type, (T) null, dimensions); + } + + /** + * Creates a zero-filled SparseNdArray + * + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensional space for the dense object represented by this sparse array, + */ + SparseNdArray(Class type, T defaultValue, DimensionalSpace dimensions) { + super(defaultValue, dimensions); + this.type = type; + } + + /** + * Creates a new SparseNdArray + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D NdArray of any type and shape {@code [N]}, which supplies the values for + * each element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter + * {@code values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse NdArray has a + * value of {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.6}. + * @param dimensions the dimensional space for the dense object represented by this sparse array. + * @return the new Sparse Array + */ + public static > SparseNdArray create( + Class type, LongNdArray indices, U values, DimensionalSpace dimensions) { + return new SparseNdArray<>(type, indices, values, dimensions); + } + + /** + * Creates a new SparseNdArray + * + * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the + * elements in the sparse array that contain non-default values (elements are zero-indexed). + * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of + * {@code [1,3]} and {@code [2,4]} have non-default values. + * @param values A 1-D NdArray of any type and shape {@code [N]}, which supplies the values for + * each element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter + * {@code values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse NdArray has a + * value of {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.6}. + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensional space for the dense object represented by this sparse array. + * @return the new Sparse Array + */ + public static > SparseNdArray create( + Class type, LongNdArray indices, U values, T defaultValue, DimensionalSpace dimensions) { + return new SparseNdArray<>(type, indices, values, defaultValue, dimensions); + } + + /** + * Creates a new SparseNdArray from a data buffer + * + * @param dataBuffer the databuffer containing the dense array + * @param dimensions the dimensional space for the sparse array + * @return the new Sparse Array + */ + public static > SparseNdArray create( + Class type, DataBuffer dataBuffer, DimensionalSpace dimensions) { + return new SparseNdArray<>(type, dataBuffer, dimensions); + } + + /** + * Creates a new SparseNdArray from a data buffer + * + * @param dataBuffer the databuffer containing the dense array + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param dimensions the dimensional space for the sparse array + * @return the new Sparse Array + */ + public static > SparseNdArray create( + Class type, DataBuffer dataBuffer, T defaultValue, DimensionalSpace dimensions) { + return new SparseNdArray<>(type, dataBuffer, defaultValue, dimensions); + } + + /** + * Creates a new empty SparseNdArray from a data buffer + * + * @param dimensions the dimensions array + * @return the new Sparse Array + */ + public static > SparseNdArray create( + Class type, DimensionalSpace dimensions) { + return new SparseNdArray<>(type, dimensions); + } + + /** + * Creates a new empty SparseNdArray from a data buffer + * + * @param dimensions the dimensions array + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @return the new Sparse Array + */ + public static > SparseNdArray create( + Class type, T defaultValue, DimensionalSpace dimensions) { + return new SparseNdArray<>(type, defaultValue, dimensions); + } + + /** + * Creates a new empty SparseNdArray from a float data buffer + * + * @param buffer the data buffer + * @param shape the shape of the sparse array. + * @return the new Sparse Array + */ + public static > SparseNdArray create( + Class type, DataBuffer buffer, Shape shape) { + return new SparseNdArray<>(type, buffer, DimensionalSpace.create(shape)); + } + + /** + * Creates a new empty SparseNdArray from a float data buffer + * + * @param buffer the data buffer + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param shape the shape of the sparse array. + * @return the new Sparse Array + */ + public static > SparseNdArray create( + Class type, DataBuffer buffer, T defaultValue, Shape shape) { + return new SparseNdArray<>(type, buffer, defaultValue, DimensionalSpace.create(shape)); + } + + /** + * Creates a new SparseNdArray from a NdArray + * + * @param src the NdArray + * @return the new Sparse Array + */ + public static > SparseNdArray create(Class type, U src) { + DataBuffer buffer = DataBuffers.ofObjects(type, src.size()); + src.read(buffer); + return new SparseNdArray<>(type, buffer, DimensionalSpace.create(src.shape())); + } + /** + * Creates a new SparseNdArray from a NdArray + * + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} + * @param src the NdArray + * @return the new Sparse Array + */ + public static > SparseNdArray create( + Class type, U src, T defaultValue) { + DataBuffer buffer = DataBuffers.ofObjects(type, src.size()); + src.read(buffer); + return new SparseNdArray<>(type, buffer, defaultValue, DimensionalSpace.create(src.shape())); + } + + /** {@inheritDoc} */ + @Override + @SuppressWarnings("unchecked") + public U createDefaultArray() { + return getDefaultValue() == null + ? (U) NdArrays.ofObjects(type, Shape.scalar()) + : (U) NdArrays.scalarOfObject(getDefaultValue()); + } + + /** + * Creates a NdArray of the specified shape + * + * @param shape the shape of the dense array. + * @return a NdArray of the specified shape + */ + @SuppressWarnings("unchecked") + public U createValues(Shape shape) { + return (U) NdArrays.ofObjects(type, shape); + } + + /** {@inheritDoc} */ + @Override + @SuppressWarnings("unchecked") + public U slice(long position, DimensionalSpace sliceDimensions) { + return (U) new ObjectSparseSlice<>(this, position, sliceDimensions); + } + + /** {@inheritDoc} */ + @Override + public NdArray read(DataBuffer dst) { + // set the values in buf to the default, then overwrite with indices/values + @SuppressWarnings("unchecked") + T[] defaults = (T[]) Array.newInstance(type, (int) dst.size()); + Arrays.fill(defaults, getDefaultValue()); + dst.write(defaults); + + AtomicInteger i = new AtomicInteger(); + getIndices() + .elements(0) + .forEachIndexed( + (idx, l) -> { + long[] coordinates = getIndicesCoordinates(l); + T value = getValues().getObject(i.getAndIncrement()); + dst.setObject(value, dimensions.positionOf(coordinates)); + }); + return this; + } + + /** {@inheritDoc} */ + @Override + @SuppressWarnings({ + "unchecked", + }) + public NdArray write(DataBuffer src) { + List indices = new ArrayList<>(); + List values = new ArrayList<>(); + + for (long i = 0; i < src.size(); i++) { + if (!Objects.equals(src.getObject(i), getDefaultValue())) { + indices.add(toCoordinates(dimensions, i)); + values.add(src.getObject(i)); + } + } + long[][] indicesArray = new long[indices.size()][]; + // unchecked cast, suppressed. + T[] valuesArray = (T[]) Array.newInstance(type, values.size()); + for (int i = 0; i < indices.size(); i++) { + indicesArray[i] = indices.get(i); + valuesArray[i] = values.get(i); + } + + setIndices(StdArrays.ndCopyOf(indicesArray)); + + // unchecked cast, suppressed. + setValues((U) NdArrays.vectorOfObjects(valuesArray)); + return this; + } + /** + * Converts the sparse array to a dense array + * + * @return the dense array + */ + @SuppressWarnings("unchecked") + public U toDense() { + DataBuffer dataBuffer = DataBuffers.ofObjects(type, shape().size()); + read(dataBuffer); + // unchecked cast, suppressed. + return (U) NdArrays.wrap(shape(), dataBuffer); + } + + /** + * Populates this sparse array from a dense array + * + * @param src the dense array + * @return this sparse array + */ + public NdArray fromDense(NdArray src) { + DataBuffer buffer = DataBuffers.ofObjects(type, src.size()); + src.read(buffer); + write(buffer); + return this; + } + + /** + * Gets the class type for this sparse array + * + * @return the class type for this sparse array. + */ + public Class getType() { + return type; + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/Validator.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/Validator.java new file mode 100644 index 00000000000..2fa77366c9d --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/Validator.java @@ -0,0 +1,46 @@ +/* Copyright 2021 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ +package org.tensorflow.ndarray.impl.sparse; + +import org.tensorflow.ndarray.IllegalRankException; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; + +final class Validator extends org.tensorflow.ndarray.impl.Validator { + + private Validator() {} + + static void coordinates(DimensionalSpace dimensions, long[] coords, boolean isValue) { + if (coords.length > dimensions.numDimensions()) { + throw new IndexOutOfBoundsException(); + } + if (isValue && coords.length != dimensions.numDimensions()) { + throw new IllegalRankException("Not a scalar value"); + } + } + + static void denseShape(DataBuffer buffer, Shape shape) { + if (shape == null) { + throw new IllegalArgumentException("Shape cannot be null"); + } + if (shape.hasUnknownDimension()) { + throw new IllegalArgumentException("Sparse arrays cannot have unknown dimension(s)"); + } + if (buffer.size() < shape.size()) { + throw new IllegalArgumentException("Buffer size is smaller than the shape size"); + } + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/BooleanSparseSlice.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/BooleanSparseSlice.java new file mode 100644 index 00000000000..24283dbd41e --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/BooleanSparseSlice.java @@ -0,0 +1,139 @@ +/* Copyright 2021 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ +package org.tensorflow.ndarray.impl.sparse.slice; + +import org.tensorflow.ndarray.BooleanNdArray; +import org.tensorflow.ndarray.NdArray; +import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.buffer.BooleanDataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; +import org.tensorflow.ndarray.impl.dimension.RelativeDimensionalSpace; +import org.tensorflow.ndarray.impl.sparse.AbstractSparseNdArray; +import org.tensorflow.ndarray.index.Index; + +import java.nio.ReadOnlyBufferException; +import java.util.concurrent.atomic.AtomicInteger; + +public class BooleanSparseSlice extends SparseSlice + implements BooleanNdArray { + + /** + * Creates a BooleanSparseSlice + * + * @param source the source Sparse Array that this object slices. + * @param sourcePosition the relative source position into the source + * @param dimensions the dimensional space for the window + */ + public BooleanSparseSlice( + AbstractSparseNdArray source, + long sourcePosition, + DimensionalSpace dimensions) { + super(source, sourcePosition, dimensions); + } + + /** {@inheritDoc} */ + @Override + public BooleanNdArray toDense() { + BooleanDataBuffer dataBuffer = DataBuffers.ofBooleans(shape().size()); + read(dataBuffer); + return NdArrays.wrap(shape(), dataBuffer); + } + + @Override + public boolean getBoolean(long... coordinates) { + return getObject(coordinates); + } + + @Override + public BooleanNdArray setBoolean(boolean value, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + @Override + public BooleanNdArray setObject(Boolean value, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + @Override + public BooleanNdArray set(NdArray src, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + /** {@inheritDoc} */ + @Override + public BooleanNdArray read(DataBuffer dst) { + // zero out buf. + Boolean[] defaults = new Boolean[(int) shape().size()]; + dst.write(defaults); + + AtomicInteger i = new AtomicInteger(); + getIndices() + .elements(0) + .forEachIndexed( + (idx, l) -> { + long[] coordinates = getIndicesCoordinates(l); + boolean value = getValues().getBoolean(i.getAndIncrement()); + dst.setObject(value, dimensions.positionOf(coordinates)); + }); + return this; + } + + @Override + public BooleanNdArray read(BooleanDataBuffer dst) { + return read((DataBuffer) dst); + } + + @Override + public BooleanNdArray write(DataBuffer src) { + throw new ReadOnlyBufferException(); + } + + @Override + public BooleanNdArray write(BooleanDataBuffer src) { + throw new ReadOnlyBufferException(); + } + + @Override + public BooleanNdArray slice(Index... indices) { + if (indices == null) { + throw new IllegalArgumentException("Slicing requires at least one index"); + } + RelativeDimensionalSpace sliceDimensions = dimensions().mapTo(indices); + return slice(sliceDimensions.position(), sliceDimensions); + } + + /** {@inheritDoc} */ + @Override + public BooleanNdArray slice(long position, DimensionalSpace sliceDimensions) { + return new BooleanSparseSlice(this.source, position + sourcePosition, sliceDimensions); + } + + @Override + public BooleanNdArray get(long... coordinates) { + return (BooleanNdArray) super.get(coordinates); + } + + @Override + public BooleanNdArray copyTo(NdArray dst) { + return (BooleanNdArray) super.copyTo(dst); + } + + @Override + public BooleanNdArray createDefaultArray() { + return source.getDefaultArray(); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ByteSparseSlice.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ByteSparseSlice.java new file mode 100644 index 00000000000..a8ced3b762c --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ByteSparseSlice.java @@ -0,0 +1,138 @@ +/* Copyright 2021 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ +package org.tensorflow.ndarray.impl.sparse.slice; + +import org.tensorflow.ndarray.ByteNdArray; +import org.tensorflow.ndarray.NdArray; +import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.buffer.ByteDataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; +import org.tensorflow.ndarray.impl.dimension.RelativeDimensionalSpace; +import org.tensorflow.ndarray.impl.sparse.AbstractSparseNdArray; +import org.tensorflow.ndarray.index.Index; + +import java.nio.ReadOnlyBufferException; +import java.util.concurrent.atomic.AtomicInteger; + +public class ByteSparseSlice extends SparseSlice implements ByteNdArray { + + /** + * Creates a ByteSparseSlice + * + * @param source the source Sparse Array that this object slices. + * @param sourcePosition the relative source position into the source + * @param dimensions the dimensional space for the window + */ + public ByteSparseSlice( + AbstractSparseNdArray source, + long sourcePosition, + DimensionalSpace dimensions) { + super(source, sourcePosition, dimensions); + } + + /** {@inheritDoc} */ + @Override + public ByteNdArray toDense() { + ByteDataBuffer dataBuffer = DataBuffers.ofBytes(shape().size()); + read(dataBuffer); + return NdArrays.wrap(shape(), dataBuffer); + } + + @Override + public byte getByte(long... coordinates) { + return getObject(coordinates); + } + + @Override + public ByteNdArray setByte(byte value, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + @Override + public ByteNdArray setObject(Byte value, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + @Override + public ByteNdArray set(NdArray src, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + /** {@inheritDoc} */ + @Override + public ByteNdArray read(DataBuffer dst) { + // zero out buf. + Byte[] defaults = new Byte[(int) shape().size()]; + dst.write(defaults); + + AtomicInteger i = new AtomicInteger(); + getIndices() + .elements(0) + .forEachIndexed( + (idx, l) -> { + long[] coordinates = getIndicesCoordinates(l); + byte value = getValues().getByte(i.getAndIncrement()); + dst.setObject(value, dimensions.positionOf(coordinates)); + }); + return this; + } + + @Override + public ByteNdArray read(ByteDataBuffer dst) { + return read((DataBuffer) dst); + } + + @Override + public ByteNdArray write(DataBuffer src) { + throw new ReadOnlyBufferException(); + } + + @Override + public ByteNdArray write(ByteDataBuffer src) { + throw new ReadOnlyBufferException(); + } + + @Override + public ByteNdArray slice(Index... indices) { + if (indices == null) { + throw new IllegalArgumentException("Slicing requires at least one index"); + } + RelativeDimensionalSpace sliceDimensions = dimensions().mapTo(indices); + return slice(sliceDimensions.position(), sliceDimensions); + } + + /** {@inheritDoc} */ + @Override + public ByteNdArray slice(long position, DimensionalSpace sliceDimensions) { + return new ByteSparseSlice(this.source, position + sourcePosition, sliceDimensions); + } + + @Override + public ByteNdArray get(long... coordinates) { + return (ByteNdArray) super.get(coordinates); + } + + @Override + public ByteNdArray copyTo(NdArray dst) { + return (ByteNdArray) super.copyTo(dst); + } + + @Override + public ByteNdArray createDefaultArray() { + return source.getDefaultArray(); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/DoubleSparseSlice.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/DoubleSparseSlice.java new file mode 100644 index 00000000000..596be18fc99 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/DoubleSparseSlice.java @@ -0,0 +1,140 @@ +/* Copyright 2021 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ +package org.tensorflow.ndarray.impl.sparse.slice; + +import org.tensorflow.ndarray.DoubleNdArray; +import org.tensorflow.ndarray.NdArray; +import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.buffer.DoubleDataBuffer; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; +import org.tensorflow.ndarray.impl.dimension.RelativeDimensionalSpace; +import org.tensorflow.ndarray.impl.sparse.AbstractSparseNdArray; +import org.tensorflow.ndarray.index.Index; + +import java.nio.ReadOnlyBufferException; +import java.util.Arrays; +import java.util.concurrent.atomic.AtomicInteger; + +public class DoubleSparseSlice extends SparseSlice implements DoubleNdArray { + + /** + * Creates a DoubleSparseSlice + * + * @param source the source Sparse Array that this object slices. + * @param sourcePosition the relative source position into the source + * @param dimensions the dimensional space for the window + */ + public DoubleSparseSlice( + AbstractSparseNdArray source, + long sourcePosition, + DimensionalSpace dimensions) { + super(source, sourcePosition, dimensions); + } + + /** {@inheritDoc} */ + @Override + public DoubleNdArray toDense() { + DoubleDataBuffer dataBuffer = DataBuffers.ofDoubles(shape().size()); + read(dataBuffer); + return NdArrays.wrap(shape(), dataBuffer); + } + + @Override + public double getDouble(long... coordinates) { + return getObject(coordinates); + } + + @Override + public DoubleNdArray setDouble(double value, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + @Override + public DoubleNdArray setObject(Double value, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + @Override + public DoubleNdArray set(NdArray src, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + /** {@inheritDoc} */ + @Override + public DoubleNdArray read(DataBuffer dst) { + // set the values in buf to the default, then overwrite with indices/values + Double[] defaults = new Double[(int) shape().size()]; + Arrays.fill(defaults, getDefaultValue()); + dst.write(defaults); + + AtomicInteger i = new AtomicInteger(); + getIndices() + .elements(0) + .forEachIndexed( + (idx, l) -> { + long[] coordinates = getIndicesCoordinates(l); + double value = getValues().getDouble(i.getAndIncrement()); + dst.setObject(value, dimensions.positionOf(coordinates)); + }); + return this; + } + + @Override + public DoubleNdArray read(DoubleDataBuffer dst) { + return read((DataBuffer) dst); + } + + @Override + public DoubleNdArray write(DataBuffer src) { + throw new ReadOnlyBufferException(); + } + + @Override + public DoubleNdArray write(DoubleDataBuffer src) { + throw new ReadOnlyBufferException(); + } + + @Override + public DoubleNdArray slice(Index... indices) { + if (indices == null) { + throw new IllegalArgumentException("Slicing requires at least one index"); + } + RelativeDimensionalSpace sliceDimensions = dimensions().mapTo(indices); + return slice(sliceDimensions.position(), sliceDimensions); + } + + /** {@inheritDoc} */ + @Override + public DoubleNdArray slice(long position, DimensionalSpace sliceDimensions) { + return new DoubleSparseSlice(this.source, position + sourcePosition, sliceDimensions); + } + + @Override + public DoubleNdArray get(long... coordinates) { + return (DoubleNdArray) super.get(coordinates); + } + + @Override + public DoubleNdArray copyTo(NdArray dst) { + return (DoubleNdArray) super.copyTo(dst); + } + + @Override + public DoubleNdArray createDefaultArray() { + return source.getDefaultArray(); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/FloatSparseSlice.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/FloatSparseSlice.java new file mode 100644 index 00000000000..5e6094d763e --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/FloatSparseSlice.java @@ -0,0 +1,140 @@ +/* Copyright 2021 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ +package org.tensorflow.ndarray.impl.sparse.slice; + +import org.tensorflow.ndarray.FloatNdArray; +import org.tensorflow.ndarray.NdArray; +import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.buffer.FloatDataBuffer; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; +import org.tensorflow.ndarray.impl.dimension.RelativeDimensionalSpace; +import org.tensorflow.ndarray.impl.sparse.AbstractSparseNdArray; +import org.tensorflow.ndarray.index.Index; + +import java.nio.ReadOnlyBufferException; +import java.util.Arrays; +import java.util.concurrent.atomic.AtomicInteger; + +public class FloatSparseSlice extends SparseSlice implements FloatNdArray { + + /** + * Creates a FloatSparseSlice + * + * @param source the source Sparse Array that this object slices. + * @param sourcePosition the relative source position into the source + * @param dimensions the dimensional space for the window + */ + public FloatSparseSlice( + AbstractSparseNdArray source, + long sourcePosition, + DimensionalSpace dimensions) { + super(source, sourcePosition, dimensions); + } + + /** {@inheritDoc} */ + @Override + public FloatNdArray toDense() { + FloatDataBuffer dataBuffer = DataBuffers.ofFloats(shape().size()); + read(dataBuffer); + return NdArrays.wrap(shape(), dataBuffer); + } + + @Override + public float getFloat(long... coordinates) { + return getObject(coordinates); + } + + @Override + public FloatNdArray setFloat(float value, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + @Override + public FloatNdArray setObject(Float value, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + @Override + public FloatNdArray set(NdArray src, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + /** {@inheritDoc} */ + @Override + public FloatNdArray read(DataBuffer dst) { + // set the values in buf to the default, then overwrite with indices/values + Float[] defaults = new Float[(int) shape().size()]; + Arrays.fill(defaults, getDefaultValue()); + dst.write(defaults); + + AtomicInteger i = new AtomicInteger(); + getIndices() + .elements(0) + .forEachIndexed( + (idx, l) -> { + long[] coordinates = getIndicesCoordinates(l); + float value = getValues().getFloat(i.getAndIncrement()); + dst.setObject(value, dimensions.positionOf(coordinates)); + }); + return this; + } + + @Override + public FloatNdArray read(FloatDataBuffer dst) { + return read((DataBuffer) dst); + } + + @Override + public FloatNdArray write(DataBuffer src) { + throw new ReadOnlyBufferException(); + } + + @Override + public FloatNdArray write(FloatDataBuffer src) { + throw new ReadOnlyBufferException(); + } + + @Override + public FloatNdArray slice(Index... indices) { + if (indices == null) { + throw new IllegalArgumentException("Slicing requires at least one index"); + } + RelativeDimensionalSpace sliceDimensions = dimensions().mapTo(indices); + return slice(sliceDimensions.position(), sliceDimensions); + } + + /** {@inheritDoc} */ + @Override + public FloatNdArray slice(long position, DimensionalSpace sliceDimensions) { + return new FloatSparseSlice(this.source, position + sourcePosition, sliceDimensions); + } + + @Override + public FloatNdArray get(long... coordinates) { + return (FloatNdArray) super.get(coordinates); + } + + @Override + public FloatNdArray copyTo(NdArray dst) { + return (FloatNdArray) super.copyTo(dst); + } + + @Override + public FloatNdArray createDefaultArray() { + return source.getDefaultArray(); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/IntSparseSlice.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/IntSparseSlice.java new file mode 100644 index 00000000000..067c64b223d --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/IntSparseSlice.java @@ -0,0 +1,140 @@ +/* Copyright 2021 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ +package org.tensorflow.ndarray.impl.sparse.slice; + +import org.tensorflow.ndarray.IntNdArray; +import org.tensorflow.ndarray.NdArray; +import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.buffer.IntDataBuffer; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; +import org.tensorflow.ndarray.impl.dimension.RelativeDimensionalSpace; +import org.tensorflow.ndarray.impl.sparse.AbstractSparseNdArray; +import org.tensorflow.ndarray.index.Index; + +import java.nio.ReadOnlyBufferException; +import java.util.Arrays; +import java.util.concurrent.atomic.AtomicInteger; + +public class IntSparseSlice extends SparseSlice implements IntNdArray { + + /** + * Creates a IntSparseSlice + * + * @param source the source Sparse Array that this object slices. + * @param sourcePosition the relative source position into the source + * @param dimensions the dimensional space for the window + */ + public IntSparseSlice( + AbstractSparseNdArray source, + long sourcePosition, + DimensionalSpace dimensions) { + super(source, sourcePosition, dimensions); + } + + /** {@inheritDoc} */ + @Override + public IntNdArray toDense() { + IntDataBuffer dataBuffer = DataBuffers.ofInts(shape().size()); + read(dataBuffer); + return NdArrays.wrap(shape(), dataBuffer); + } + + @Override + public int getInt(long... coordinates) { + return getObject(coordinates); + } + + @Override + public IntNdArray setInt(int value, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + @Override + public IntNdArray setObject(Integer value, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + @Override + public IntNdArray set(NdArray src, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + /** {@inheritDoc} */ + @Override + public IntNdArray read(DataBuffer dst) { + // set the values in buf to the default, then overwrite with indices/values + Integer[] defaults = new Integer[(int) shape().size()]; + Arrays.fill(defaults, getDefaultValue()); + dst.write(defaults); + + AtomicInteger i = new AtomicInteger(); + getIndices() + .elements(0) + .forEachIndexed( + (idx, l) -> { + long[] coordinates = getIndicesCoordinates(l); + int value = getValues().getInt(i.getAndIncrement()); + dst.setObject(value, dimensions.positionOf(coordinates)); + }); + return this; + } + + @Override + public IntNdArray read(IntDataBuffer dst) { + return read((DataBuffer) dst); + } + + @Override + public IntNdArray write(DataBuffer src) { + throw new ReadOnlyBufferException(); + } + + @Override + public IntNdArray write(IntDataBuffer src) { + throw new ReadOnlyBufferException(); + } + + @Override + public IntNdArray slice(Index... indices) { + if (indices == null) { + throw new IllegalArgumentException("Slicing requires at least one index"); + } + RelativeDimensionalSpace sliceDimensions = dimensions().mapTo(indices); + return slice(sliceDimensions.position(), sliceDimensions); + } + + /** {@inheritDoc} */ + @Override + public IntNdArray slice(long position, DimensionalSpace sliceDimensions) { + return new IntSparseSlice(this.source, position + sourcePosition, sliceDimensions); + } + + @Override + public IntNdArray get(long... coordinates) { + return (IntNdArray) super.get(coordinates); + } + + @Override + public IntNdArray copyTo(NdArray dst) { + return (IntNdArray) super.copyTo(dst); + } + + @Override + public IntNdArray createDefaultArray() { + return source.getDefaultArray(); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/LongSparseSlice.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/LongSparseSlice.java new file mode 100644 index 00000000000..ea182b7fdf3 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/LongSparseSlice.java @@ -0,0 +1,140 @@ +/* Copyright 2021 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ +package org.tensorflow.ndarray.impl.sparse.slice; + +import org.tensorflow.ndarray.LongNdArray; +import org.tensorflow.ndarray.NdArray; +import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.buffer.LongDataBuffer; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; +import org.tensorflow.ndarray.impl.dimension.RelativeDimensionalSpace; +import org.tensorflow.ndarray.impl.sparse.AbstractSparseNdArray; +import org.tensorflow.ndarray.index.Index; + +import java.nio.ReadOnlyBufferException; +import java.util.Arrays; +import java.util.concurrent.atomic.AtomicLong; + +public class LongSparseSlice extends SparseSlice implements LongNdArray { + + /** + * Creates a LongSparseSlice + * + * @param source the source Sparse Array that this object slices. + * @param sourcePosition the relative source position into the source + * @param dimensions the dimensional space for the window + */ + public LongSparseSlice( + AbstractSparseNdArray source, + long sourcePosition, + DimensionalSpace dimensions) { + super(source, sourcePosition, dimensions); + } + + /** {@inheritDoc} */ + @Override + public LongNdArray toDense() { + LongDataBuffer dataBuffer = DataBuffers.ofLongs(shape().size()); + read(dataBuffer); + return NdArrays.wrap(shape(), dataBuffer); + } + + @Override + public long getLong(long... coordinates) { + return getObject(coordinates); + } + + @Override + public LongNdArray setLong(long value, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + @Override + public LongNdArray setObject(Long value, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + @Override + public LongNdArray set(NdArray src, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + /** {@inheritDoc} */ + @Override + public LongNdArray read(DataBuffer dst) { + // set the values in buf to the default, then overwrite with indices/values + Long[] defaults = new Long[(int) shape().size()]; + Arrays.fill(defaults, getDefaultValue()); + dst.write(defaults); + + AtomicLong i = new AtomicLong(); + getIndices() + .elements(0) + .forEachIndexed( + (idx, l) -> { + long[] coordinates = getIndicesCoordinates(l); + long value = getValues().getLong(i.getAndIncrement()); + dst.setObject(value, dimensions.positionOf(coordinates)); + }); + return this; + } + + @Override + public LongNdArray read(LongDataBuffer dst) { + return read((DataBuffer) dst); + } + + @Override + public LongNdArray write(DataBuffer src) { + throw new ReadOnlyBufferException(); + } + + @Override + public LongNdArray write(LongDataBuffer src) { + throw new ReadOnlyBufferException(); + } + + @Override + public LongNdArray slice(Index... indices) { + if (indices == null) { + throw new IllegalArgumentException("Slicing requires at least one index"); + } + RelativeDimensionalSpace sliceDimensions = dimensions().mapTo(indices); + return slice(sliceDimensions.position(), sliceDimensions); + } + + /** {@inheritDoc} */ + @Override + public LongNdArray slice(long position, DimensionalSpace sliceDimensions) { + return new LongSparseSlice(this.source, position + sourcePosition, sliceDimensions); + } + + @Override + public LongNdArray get(long... coordinates) { + return (LongNdArray) super.get(coordinates); + } + + @Override + public LongNdArray copyTo(NdArray dst) { + return (LongNdArray) super.copyTo(dst); + } + + @Override + public LongNdArray createDefaultArray() { + return source.getDefaultArray(); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ObjectSparseSlice.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ObjectSparseSlice.java new file mode 100644 index 00000000000..be7f9f49ff9 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ObjectSparseSlice.java @@ -0,0 +1,115 @@ +/* Copyright 2021 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ +package org.tensorflow.ndarray.impl.sparse.slice; + +import org.tensorflow.ndarray.NdArray; +import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; +import org.tensorflow.ndarray.impl.dimension.RelativeDimensionalSpace; +import org.tensorflow.ndarray.impl.sparse.SparseNdArray; +import org.tensorflow.ndarray.index.Index; + +import java.lang.reflect.Array; +import java.nio.ReadOnlyBufferException; +import java.util.Arrays; +import java.util.concurrent.atomic.AtomicInteger; + +public class ObjectSparseSlice> extends SparseSlice + implements NdArray { + + /** + * Creates a BooleanSparseSlice + * + * @param source the source Sparse Array that this object slices. + * @param sourcePosition the relative source position into the source + * @param dimensions the dimensional space for the window + */ + public ObjectSparseSlice( + SparseNdArray source, long sourcePosition, DimensionalSpace dimensions) { + super(source, sourcePosition, dimensions); + } + + /** {@inheritDoc} */ + @Override + @SuppressWarnings("unchecked") + public U toDense() { + DataBuffer dataBuffer = DataBuffers.ofObjects(getType(), shape().size()); + read(dataBuffer); + // unchecked NdArray to U + return (U) NdArrays.wrap(shape(), dataBuffer); + } + + @Override + public U setObject(T value, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + @Override + public U set(NdArray src, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + /** {@inheritDoc} */ + @Override + @SuppressWarnings("unchecked") + public U read(DataBuffer dst) { + // unchecked Object to T[] + T[] defaults = (T[]) Array.newInstance(getType(), (int) dst.size()); + Arrays.fill(defaults, getDefaultValue()); + dst.write(defaults); + + AtomicInteger i = new AtomicInteger(); + getIndices() + .elements(0) + .forEachIndexed( + (idx, l) -> { + long[] coordinates = getIndicesCoordinates(l); + T value = getValues().getObject(i.getAndIncrement()); + dst.setObject(value, dimensions.positionOf(coordinates)); + }); + // Unchecked cast ObjectSparseSlice to U + return (U) this; + } + + @Override + public U slice(Index... indices) { + if (indices == null) { + throw new IllegalArgumentException("Slicing requires at least one index"); + } + RelativeDimensionalSpace sliceDimensions = dimensions().mapTo(indices); + return slice(sliceDimensions.position(), sliceDimensions); + } + + /** {@inheritDoc} */ + @Override + @SuppressWarnings("unchecked") + public U slice(long position, DimensionalSpace sliceDimensions) { + // unchecked ObjectSparseSlice to U + return (U) + new ObjectSparseSlice<>( + (SparseNdArray) this.source, position + sourcePosition, sliceDimensions); + } + + @Override + public U createDefaultArray() { + return source.getDefaultArray(); + } + + public Class getType() { + return ((SparseNdArray) source).getType(); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ShortSparseSlice.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ShortSparseSlice.java new file mode 100644 index 00000000000..16aa5612c7f --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ShortSparseSlice.java @@ -0,0 +1,140 @@ +/* Copyright 2021 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ +package org.tensorflow.ndarray.impl.sparse.slice; + +import org.tensorflow.ndarray.NdArray; +import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.ShortNdArray; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.buffer.ShortDataBuffer; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; +import org.tensorflow.ndarray.impl.dimension.RelativeDimensionalSpace; +import org.tensorflow.ndarray.impl.sparse.AbstractSparseNdArray; +import org.tensorflow.ndarray.index.Index; + +import java.nio.ReadOnlyBufferException; +import java.util.Arrays; +import java.util.concurrent.atomic.AtomicLong; + +public class ShortSparseSlice extends SparseSlice implements ShortNdArray { + + /** + * Creates a LongSparseSlice + * + * @param source the source Sparse Array that this object slices. + * @param sourcePosition the relative source position into the source + * @param dimensions the dimensional space for the window + */ + public ShortSparseSlice( + AbstractSparseNdArray source, + long sourcePosition, + DimensionalSpace dimensions) { + super(source, sourcePosition, dimensions); + } + + /** {@inheritDoc} */ + @Override + public ShortNdArray toDense() { + ShortDataBuffer dataBuffer = DataBuffers.ofShorts(shape().size()); + read(dataBuffer); + return NdArrays.wrap(shape(), dataBuffer); + } + + @Override + public short getShort(long... coordinates) { + return getObject(coordinates); + } + + @Override + public ShortNdArray setShort(short value, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + @Override + public ShortNdArray setObject(Short value, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + @Override + public ShortNdArray set(NdArray src, long... coordinates) { + throw new ReadOnlyBufferException(); + } + + /** {@inheritDoc} */ + @Override + public ShortNdArray read(DataBuffer dst) { + // set the values in buf to the default, then overwrite with indices/values + Short[] defaults = new Short[(int) shape().size()]; + Arrays.fill(defaults, getDefaultValue()); + dst.write(defaults); + + AtomicLong i = new AtomicLong(); + getIndices() + .elements(0) + .forEachIndexed( + (idx, l) -> { + long[] coordinates = getIndicesCoordinates(l); + short value = getValues().getShort(i.getAndIncrement()); + dst.setObject(value, dimensions.positionOf(coordinates)); + }); + return this; + } + + @Override + public ShortNdArray read(ShortDataBuffer dst) { + return read((DataBuffer) dst); + } + + @Override + public ShortNdArray write(DataBuffer src) { + throw new ReadOnlyBufferException(); + } + + @Override + public ShortNdArray write(ShortDataBuffer src) { + throw new ReadOnlyBufferException(); + } + + @Override + public ShortNdArray slice(Index... indices) { + if (indices == null) { + throw new IllegalArgumentException("Slicing requires at least one index"); + } + RelativeDimensionalSpace sliceDimensions = dimensions().mapTo(indices); + return slice(sliceDimensions.position(), sliceDimensions); + } + + /** {@inheritDoc} */ + @Override + public ShortNdArray slice(long position, DimensionalSpace sliceDimensions) { + return new ShortSparseSlice(this.source, position + sourcePosition, sliceDimensions); + } + + @Override + public ShortNdArray get(long... coordinates) { + return (ShortNdArray) super.get(coordinates); + } + + @Override + public ShortNdArray copyTo(NdArray dst) { + return (ShortNdArray) super.copyTo(dst); + } + + @Override + public ShortNdArray createDefaultArray() { + return source.getDefaultArray(); + } +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/SparseSlice.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/SparseSlice.java new file mode 100644 index 00000000000..e0db8398fe6 --- /dev/null +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/SparseSlice.java @@ -0,0 +1,145 @@ +/* Copyright 2021 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ +package org.tensorflow.ndarray.impl.sparse.slice; + +import org.tensorflow.ndarray.NdArray; +import org.tensorflow.ndarray.NdArraySequence; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; +import org.tensorflow.ndarray.impl.dimension.RelativeDimensionalSpace; +import org.tensorflow.ndarray.impl.sequence.SingleElementSequence; +import org.tensorflow.ndarray.impl.sequence.SlicingElementSequence; +import org.tensorflow.ndarray.impl.sparse.AbstractSparseNdArray; +import org.tensorflow.ndarray.index.Index; + +import java.nio.ReadOnlyBufferException; + +/** + * A sparse window is a view into an AbstractSparseNdArray. It is used internally by the slice + * methods. + * + * @param the type that the array contains + * @param the type of dense NdArray + */ +public abstract class SparseSlice> extends AbstractSparseNdArray { + protected final AbstractSparseNdArray source; + protected final long sourcePosition; + + /** + * Creates a SparseSlice + * + * @param source the source Sparse Array that this object slices. + * @param sourcePosition the relative position into the source array + * @param dimensions the dimensional space for the window + */ + public SparseSlice( + AbstractSparseNdArray source, long sourcePosition, DimensionalSpace dimensions) { + super(source.getDefaultValue(), dimensions); + this.source = source; + this.sourcePosition = sourcePosition; + } + + /** {@inheritDoc} */ + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + source.hashCode(); + result = prime * result + (int) sourcePosition; + return result; + } + + /** {@inheritDoc} */ + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (!(obj instanceof SparseSlice)) { + return super.equals(obj); + } + SparseSlice other = (SparseSlice) obj; + if (!source.equals(other.source)) { + return false; + } + if (!shape().equals(other.shape())) { + return false; + } + return sourcePosition == other.sourcePosition; + } + + /** {@inheritDoc} */ + @Override + public T getObject(long... coordinates) { + long position = dimensions().positionOf(coordinates); + long[] sourceCoordinates = toCoordinates(source.dimensions(), sourcePosition + position); + return source.getObject(sourceCoordinates); + } + + /** {@inheritDoc} */ + @Override + public NdArray get(long... coordinates) { + long position = dimensions().positionOf(coordinates); + long[] sourceCoordinates = toCoordinates(source.dimensions(), sourcePosition + position); + return source.get(sourceCoordinates); + } + + /** {@inheritDoc} */ + @Override + public NdArray slice(Index... indices) { + if (indices == null) { + throw new IllegalArgumentException("Slicing requires at least one index"); + } + RelativeDimensionalSpace sliceDimensions = dimensions().mapTo(indices); + return slice(sliceDimensions.position(), sliceDimensions); + } + + /** {@inheritDoc} */ + @Override + public NdArraySequence elements(int dimensionIdx) { + if (dimensionIdx >= shape().numDimensions()) { + throw new IllegalArgumentException( + "Cannot iterate elements in dimension '" + + dimensionIdx + + "' of array with shape " + + shape()); + } + if (rank() == 0 && dimensionIdx < 0) { + return new SingleElementSequence<>(this); + } + DimensionalSpace elemDims = dimensions().from(dimensionIdx + 1); + return new SlicingElementSequence<>(this, dimensionIdx, elemDims); + } + + /** + * Converts the sparse window to a dense NdArray + * + * @return the NdArray + */ + public abstract U toDense(); + + /** {@inheritDoc} */ + @Override + public NdArray write(DataBuffer src) { + throw new ReadOnlyBufferException(); + } + + /** {@inheritDoc} */ + @Override + public U createValues(Shape shape) { + return source.createValues(shape); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/SparseNdArrayTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/SparseNdArrayTest.java new file mode 100644 index 00000000000..43779b3c4ae --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/SparseNdArrayTest.java @@ -0,0 +1,191 @@ +/* Copyright 2021 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ +package org.tensorflow.ndarray; + +import org.junit.jupiter.api.Test; +import org.tensorflow.ndarray.impl.sparse.BooleanSparseNdArray; +import org.tensorflow.ndarray.impl.sparse.ByteSparseNdArray; +import org.tensorflow.ndarray.impl.sparse.DoubleSparseNdArray; +import org.tensorflow.ndarray.impl.sparse.FloatSparseNdArray; +import org.tensorflow.ndarray.impl.sparse.IntSparseNdArray; +import org.tensorflow.ndarray.impl.sparse.LongSparseNdArray; +import org.tensorflow.ndarray.impl.sparse.ShortSparseNdArray; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + +public class SparseNdArrayTest { + long[][] indicesArray = {{0, 0}, {1, 2}, {2, 3}}; + LongNdArray indices = StdArrays.ndCopyOf(indicesArray); + Shape shape = Shape.of(3, 4); + double epsilon = 0.001; + + @Test + public void testBoolean() { + BooleanSparseNdArray instance = + NdArrays.sparseOf(indices, NdArrays.vectorOf(true, true, true), shape); + assertEquals(6, instance.getIndices().size()); + assertEquals(3, instance.getValues().size()); + assertTrue(instance.getBoolean(0, 0)); + assertFalse(instance.getBoolean(0, 1)); + assertFalse(instance.getBoolean(0, 2)); + assertFalse(instance.getBoolean(0, 3)); + + assertFalse(instance.getBoolean(1, 0)); + assertFalse(instance.getBoolean(1, 1)); + assertTrue(instance.getBoolean(1, 2)); + assertFalse(instance.getBoolean(1, 3)); + + assertFalse(instance.getBoolean(2, 0)); + assertFalse(instance.getBoolean(2, 1)); + assertFalse(instance.getBoolean(2, 2)); + assertTrue(instance.getBoolean(2, 3)); + } + + @Test + public void testByte() { + ByteSparseNdArray instance = + NdArrays.sparseOf( + indices, NdArrays.vectorOf((byte) 1, (byte) 18, (byte) 0xff), shape); + assertEquals(6, instance.getIndices().size()); + assertEquals(3, instance.getValues().size()); + assertEquals((byte) 1, instance.getByte(0, 0)); + assertEquals((byte) 0, instance.getByte(0, 1)); + assertEquals((byte) 0, instance.getByte(0, 2)); + assertEquals((byte) 0, instance.getByte(0, 3)); + + assertEquals((byte) 0, instance.getByte(1, 0)); + assertEquals((byte) 0, instance.getByte(1, 1)); + assertEquals((byte) 18, instance.getByte(1, 2)); + assertEquals((byte) 0, instance.getByte(1, 3)); + + assertEquals((byte) 0, instance.getByte(2, 0)); + assertEquals((byte) 0, instance.getByte(2, 1)); + assertEquals((byte) 0, instance.getByte(2, 2)); + assertEquals((byte) 0xff, instance.getByte(2, 3)); + } + + @Test + public void testDouble() { + DoubleSparseNdArray instance = + NdArrays.sparseOf(indices, NdArrays.vectorOf(1., 1.8, 3.14), shape); + assertEquals(6, instance.getIndices().size()); + assertEquals(3, instance.getValues().size()); + assertEquals(1., instance.getDouble(0, 0), epsilon); + assertEquals(0, instance.getDouble(0, 1), epsilon); + assertEquals(0, instance.getDouble(0, 2), epsilon); + assertEquals(0, instance.getDouble(0, 3), epsilon); + + assertEquals(0, instance.getDouble(1, 0), epsilon); + assertEquals(0, instance.getDouble(1, 1), epsilon); + assertEquals(1.8, instance.getDouble(1, 2), epsilon); + assertEquals(0, instance.getDouble(1, 3), epsilon); + + assertEquals(0, instance.getDouble(2, 0), epsilon); + assertEquals(0, instance.getDouble(2, 1), epsilon); + assertEquals(0, instance.getDouble(2, 2), epsilon); + assertEquals(3.14, instance.getDouble(2, 3), epsilon); + } + + @Test + public void testFloat() { + FloatSparseNdArray instance = + NdArrays.sparseOf(indices, NdArrays.vectorOf(1.f, 1.8f, 3.14f), shape); + assertEquals(6, instance.getIndices().size()); + assertEquals(3, instance.getValues().size()); + assertEquals(1.f, instance.getFloat(0, 0), epsilon); + assertEquals(0f, instance.getFloat(0, 1), epsilon); + assertEquals(0f, instance.getFloat(0, 2), epsilon); + assertEquals(0f, instance.getFloat(0, 3), epsilon); + + assertEquals(0f, instance.getFloat(1, 0), epsilon); + assertEquals(0f, instance.getFloat(1, 1), epsilon); + assertEquals(1.8f, instance.getFloat(1, 2), epsilon); + assertEquals(0f, instance.getFloat(1, 3), epsilon); + + assertEquals(0f, instance.getFloat(2, 0), epsilon); + assertEquals(0f, instance.getFloat(2, 1), epsilon); + assertEquals(0f, instance.getFloat(2, 2), epsilon); + assertEquals(3.14f, instance.getFloat(2, 3), epsilon); + } + + @Test + public void testInt() { + IntSparseNdArray instance = + NdArrays.sparseOf(indices, NdArrays.vectorOf(1, 18, 256), shape); + assertEquals(6, instance.getIndices().size()); + assertEquals(3, instance.getValues().size()); + assertEquals(1, instance.getInt(0, 0)); + assertEquals(0, instance.getInt(0, 1)); + assertEquals(0, instance.getInt(0, 2)); + assertEquals(0, instance.getInt(0, 3)); + + assertEquals(0, instance.getInt(1, 0)); + assertEquals(0, instance.getInt(1, 1)); + assertEquals(18, instance.getInt(1, 2)); + assertEquals(0, instance.getInt(1, 3)); + + assertEquals(0, instance.getInt(2, 0)); + assertEquals(0, instance.getInt(2, 1)); + assertEquals(0, instance.getInt(2, 2)); + assertEquals(256, instance.getInt(2, 3)); + } + + @Test + public void testLong() { + LongSparseNdArray instance = + NdArrays.sparseOf(indices, NdArrays.vectorOf(1L, 18L, 256L), shape); + assertEquals(6, instance.getIndices().size()); + assertEquals(3, instance.getValues().size()); + assertEquals(1L, instance.getLong(0, 0)); + assertEquals(0L, instance.getLong(0, 1)); + assertEquals(0L, instance.getLong(0, 2)); + assertEquals(0L, instance.getLong(0, 3)); + + assertEquals(0L, instance.getLong(1, 0)); + assertEquals(0L, instance.getLong(1, 1)); + assertEquals(18, instance.getLong(1, 2)); + assertEquals(0L, instance.getLong(1, 3)); + + assertEquals(0L, instance.getLong(2, 0)); + assertEquals(0L, instance.getLong(2, 1)); + assertEquals(0L, instance.getLong(2, 2)); + assertEquals(256L, instance.getLong(2, 3)); + } + + @Test + public void testShort() { + ShortSparseNdArray instance = + NdArrays.sparseOf( + indices, NdArrays.vectorOf((short) 1, (short) 18, (short) 0xff00), shape); + assertEquals(6, instance.getIndices().size()); + assertEquals(3, instance.getValues().size()); + assertEquals((short) 1, instance.getShort(0, 0)); + assertEquals((short) 0, instance.getShort(0, 1)); + assertEquals((short) 0, instance.getShort(0, 2)); + assertEquals((short) 0, instance.getShort(0, 3)); + + assertEquals((short) 0, instance.getShort(1, 0)); + assertEquals((short) 0, instance.getShort(1, 1)); + assertEquals((short) 18, instance.getShort(1, 2)); + assertEquals((short) 0, instance.getShort(1, 3)); + + assertEquals((short) 0, instance.getShort(2, 0)); + assertEquals((short) 0, instance.getShort(2, 1)); + assertEquals((short) 0, instance.getShort(2, 2)); + assertEquals((short) 0xff00, instance.getShort(2, 3)); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/FloatDenseNdArrayTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/FloatDenseNdArrayTest.java index efee2bf2cb8..900ba8a78be 100644 --- a/ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/FloatDenseNdArrayTest.java +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/FloatDenseNdArrayTest.java @@ -1,35 +1,77 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.dense; -import org.tensorflow.ndarray.Shape; -import org.tensorflow.ndarray.buffer.DataBuffer; -import org.tensorflow.ndarray.buffer.DataBuffers; +import org.junit.jupiter.api.Test; import org.tensorflow.ndarray.FloatNdArray; import org.tensorflow.ndarray.FloatNdArrayTestBase; import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.buffer.FloatDataBuffer; +import org.tensorflow.ndarray.index.Indices; + +import java.util.concurrent.atomic.AtomicInteger; + +import static org.junit.jupiter.api.Assertions.assertEquals; public class FloatDenseNdArrayTest extends FloatNdArrayTestBase { - @Override protected FloatNdArray allocate(Shape shape) { + @Override + protected FloatNdArray allocate(Shape shape) { return NdArrays.ofFloats(shape); } - @Override protected DataBuffer allocateBuffer(long size) { + @Override + protected DataBuffer allocateBuffer(long size) { return DataBuffers.ofFloats(size); } + + @Test + public void testSlice() { + Shape shape = Shape.of(3, 4); + Float[] values = { + 1f, 0f, 0f, 0f, + 0f, 0f, 2f, 0f, + 0f, 0f, 0f, 0f + }; + + float[] expected = {0, 0, 2, 0, 0, 0}; + + FloatDataBuffer buffer = (FloatDataBuffer) allocateBuffer(shape.size()); + buffer.write(values); + FloatNdArray instance = FloatDenseNdArray.create(buffer, shape); + + FloatNdArray sliceInstance = instance.slice(Indices.all(), Indices.sliceFrom(2)); + // check the values of the slice against the original array + AtomicInteger i = new AtomicInteger(); + sliceInstance + .scalars() + .forEachIndexed((idx, f) -> assertEquals(expected[i.getAndIncrement()], f.getFloat())); + + // check values from elements(0) of a slice against the original array + i.set(0); + sliceInstance + .elements(0) + .forEachIndexed( + (idx, l) -> + l.scalars() + .forEachIndexed( + (lidx, f) -> assertEquals(expected[i.getAndIncrement()], f.getFloat()))); + } } diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArrayTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArrayTest.java new file mode 100644 index 00000000000..bcb7235f72d --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArrayTest.java @@ -0,0 +1,314 @@ +package org.tensorflow.ndarray.impl.sparse; + +import org.junit.jupiter.api.Test; +import org.tensorflow.ndarray.BooleanNdArray; +import org.tensorflow.ndarray.LongNdArray; +import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.StdArrays; +import org.tensorflow.ndarray.buffer.BooleanDataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.impl.buffer.raw.RawDataBufferFactory; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; +import org.tensorflow.ndarray.index.Indices; + +import java.util.concurrent.atomic.AtomicInteger; + +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; + +class BooleanSparseNdArrayTest { + long[][] indicesArray = {{0, 0}, {1, 2}}; + boolean[] valuesArray = {true, true}; + boolean[] valuesArrayDefaultValue = {false, false}; + boolean[] denseArray = { + true, false, false, false, + false, false, true, false, + false, false, false, false + }; + boolean[][] dense2DArray = { + {true, false, false, false}, {false, false, true, false}, {false, false, false, false} + }; + + Shape shape = Shape.of(3, 4); + LongNdArray indices = StdArrays.ndCopyOf(indicesArray); + BooleanNdArray values = StdArrays.ndCopyOf(valuesArray); + + @Test + public void testBasic() { + BooleanSparseNdArray instance = + new BooleanSparseNdArray(indices, values, DimensionalSpace.create(shape)); + assertEquals(indices, instance.getIndices()); + assertEquals(values, instance.getValues()); + assertEquals(shape, instance.shape()); + } + + @Test + public void testRead() { + BooleanSparseNdArray instance = + new BooleanSparseNdArray(indices, values, DimensionalSpace.create(shape)); + BooleanDataBuffer dataBuffer = DataBuffers.ofBooleans(instance.shape().size()); + + instance.read(dataBuffer); + + boolean[] array = new boolean[denseArray.length]; + dataBuffer.read(array); + assertArrayEquals(denseArray, array); + } + + @Test + public void testWrite() { + + BooleanDataBuffer dataBuffer = RawDataBufferFactory.create(denseArray, false); + // use a zero buffer + BooleanSparseNdArray instance = BooleanSparseNdArray.create(DimensionalSpace.create(shape)); + instance.write(dataBuffer); + + assertEquals(indices, instance.getIndices()); + assertEquals(values, instance.getValues()); + } + + @Test + public void testWriteDefaultValue() { + // invert true/false + boolean[] denseArrayDefaultValue = new boolean[denseArray.length]; + for (int i = 0; i < denseArrayDefaultValue.length; i++) { + denseArrayDefaultValue[i] = !denseArray[i]; + } + + BooleanNdArray valuesDefault = StdArrays.ndCopyOf(new boolean[] {false, false}); + BooleanDataBuffer dataBuffer = RawDataBufferFactory.create(denseArrayDefaultValue, false); + // use a zero buffer + BooleanSparseNdArray instance = + BooleanSparseNdArray.create(true, DimensionalSpace.create(shape)); + instance.write(dataBuffer); + + assertEquals(indices, instance.getIndices()); + assertEquals(valuesDefault, instance.getValues()); + } + + @Test + public void testGetObject() { + BooleanNdArray ndArray = StdArrays.ndCopyOf(dense2DArray); + BooleanSparseNdArray instance = + new BooleanSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + for (int n = 0; n < ndArray.shape().get(0); n++) { + for (int m = 0; m < ndArray.shape().get(1); m++) { + assertEquals(ndArray.getObject(n, m), instance.getObject(n, m)); + } + } + } + + @Test + public void testGetBoolean() { + BooleanNdArray ndArray = StdArrays.ndCopyOf(dense2DArray); + BooleanSparseNdArray instance = + new BooleanSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + for (int n = 0; n < ndArray.shape().get(0); n++) { + for (int m = 0; m < ndArray.shape().get(1); m++) { + assertEquals(ndArray.getBoolean(n, m), instance.getBoolean(n, m)); + } + } + } + + @Test + public void testGetBooleanDefaultValue() { + // flip the truth table + BooleanNdArray ndArray = StdArrays.ndCopyOf(dense2DArray); + BooleanSparseNdArray instance = + new BooleanSparseNdArray( + indices, + NdArrays.vectorOf(valuesArrayDefaultValue), + true, + DimensionalSpace.create(shape)); + + for (int n = 0; n < ndArray.shape().get(0); n++) { + for (int m = 0; m < ndArray.shape().get(1); m++) { + assertNotEquals(ndArray.getBoolean(n, m), instance.getBoolean(n, m)); + } + } + } + + @Test + public void testGet() { + BooleanNdArray ndArray = StdArrays.ndCopyOf(dense2DArray); + BooleanSparseNdArray instance = + new BooleanSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + for (int n = 0; n < ndArray.shape().get(0); n++) { + assertEquals(ndArray.get(n), instance.get(n)); + for (int m = 0; m < ndArray.shape().get(1); m++) { + assertEquals(ndArray.get(n, m), instance.get(n, m)); + } + } + } + + @Test + public void testSetObject() { + BooleanSparseNdArray instance = + new BooleanSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + assertThrows(java.nio.ReadOnlyBufferException.class, () -> instance.setObject(false, 0, 0)); + } + + @Test + public void testSet() { + BooleanSparseNdArray instance = + new BooleanSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + assertThrows( + java.nio.ReadOnlyBufferException.class, + () -> instance.set(instance.getDefaultArray(), 0, 0)); + } + + @Test + public void testSort() { + + long[][] indicesArray = {{0, 0}, {1, 2}, {0, 1}, {2, 3}, {1, 4}}; + long[][] sortedIndicesArray = {{0, 0}, {0, 1}, {1, 2}, {1, 4}, {2, 3}}; + boolean[] valuesArray = {true, true, false, true, false}; + boolean[] sortedValuesArray = {true, false, true, false, true}; + + LongNdArray indices = StdArrays.ndCopyOf(indicesArray); + LongNdArray sortedIndices = StdArrays.ndCopyOf(sortedIndicesArray); + BooleanNdArray values = StdArrays.ndCopyOf(valuesArray); + BooleanNdArray sortedValues = StdArrays.ndCopyOf(sortedValuesArray); + + BooleanSparseNdArray instance = + new BooleanSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + instance.sortIndicesAndValues(); + + // should be sorted in ascending row-wise coordinate order based on test values + assertEquals(sortedIndices, instance.getIndices()); + assertEquals(sortedValues, instance.getValues()); + } + + @Test + public void testElements() { + + BooleanSparseNdArray instance = + new BooleanSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + instance + .elements(0) + .forEachIndexed( + (idx, item) -> { + boolean[] slice = dense2DArray[(int) idx[0]]; + item.scalars() + .forEachIndexed((dx, f) -> assertEquals(slice[(int) dx[0]], f.getObject())); + }); + } + + @Test + public void testDense() { + + BooleanSparseNdArray instance = + new BooleanSparseNdArray(indices, values, DimensionalSpace.create(shape)); + BooleanNdArray denseInstance = instance.toDense(); + BooleanNdArray expectedDense = StdArrays.ndCopyOf(dense2DArray); + assertEquals(expectedDense, denseInstance); + } + + @Test + public void testFromDense() { + BooleanNdArray ndArray = StdArrays.ndCopyOf(dense2DArray); + BooleanSparseNdArray instance = + BooleanSparseNdArray.create(DimensionalSpace.create(ndArray.shape())); + instance.fromDense(ndArray); + assertNotNull(instance.getIndices()); + assertEquals(2, instance.getIndices().shape().get(0)); + assertNotNull(instance.getValues()); + assertEquals(2, instance.getValues().size()); + + assertEquals(ndArray.shape(), instance.shape()); + for (int n = 0; n < ndArray.shape().get(0); n++) { + for (int m = 0; m < ndArray.shape().get(1); m++) { + assertEquals(ndArray.getBoolean(n, m), instance.getBoolean(n, m)); + } + } + } + + @Test + public void testElements1() { + boolean[] expected = {true, false, false}; + + BooleanSparseNdArray instance = + new BooleanSparseNdArray(indices, values, DimensionalSpace.create(shape)); + instance + .elements(0) + .forEachIndexed((idx, l) -> assertEquals(expected[(int) idx[0]], l.getObject())); + instance + .elements(1) + .forEachIndexed( + (idx, l) -> assertEquals(dense2DArray[(int) idx[0]][(int) idx[1]], l.getObject())); + } + + @Test + public void testCopyTo() { + BooleanNdArray dst = NdArrays.ofBooleans(shape); + BooleanSparseNdArray instance = + new BooleanSparseNdArray(indices, values, DimensionalSpace.create(shape)); + instance.copyTo(dst); + for (int n = 0; n < instance.shape().get(0); n++) { + for (int m = 0; m < instance.shape().get(1); m++) { + assertEquals(instance.getBoolean(n, m), dst.getBoolean(n, m)); + } + } + } + + @Test + public void testCreate() { + + BooleanSparseNdArray instance = + new BooleanSparseNdArray(indices, values, DimensionalSpace.create(shape)); + BooleanSparseNdArray instanceA = + BooleanSparseNdArray.create(indices, values, DimensionalSpace.create(shape)); + assertEquals(instance, instanceA); + + BooleanDataBuffer dataBuffer = RawDataBufferFactory.create(denseArray, false); + // use a zero buffer + BooleanSparseNdArray instanceB = BooleanSparseNdArray.create(DimensionalSpace.create(shape)); + instanceB.write(dataBuffer); + assertEquals(instance, instanceB); + + BooleanSparseNdArray instanceC = + BooleanSparseNdArray.create(dataBuffer, DimensionalSpace.create(shape)); + assertEquals(instanceB, instanceC); + + BooleanSparseNdArray instanceD = BooleanSparseNdArray.create(dataBuffer, shape); + assertEquals(instanceB, instanceD); + + BooleanNdArray ndArray = StdArrays.ndCopyOf(dense2DArray); + BooleanSparseNdArray instanceE = BooleanSparseNdArray.create(ndArray); + assertEquals(instance, instanceE); + } + + @Test + public void testSlice() { + boolean[] expected = {false, false, true, false, false, false}; + BooleanSparseNdArray instance = + new BooleanSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + BooleanNdArray sliceInstance = instance.slice(Indices.all(), Indices.sliceFrom(2)); + // check the values of the slice against the original sparse array + AtomicInteger i = new AtomicInteger(); + sliceInstance + .scalars() + .forEachIndexed((idx, f) -> assertEquals(expected[i.getAndIncrement()], f.getBoolean())); + // check values from elements(0) of a slice against the original sparse array + i.set(0); + sliceInstance + .elements(0) + .forEachIndexed( + (idx, l) -> + l.scalars() + .forEachIndexed( + (lidx, f) -> assertEquals(expected[i.getAndIncrement()], f.getBoolean()))); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArrayTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArrayTest.java new file mode 100644 index 00000000000..7dd9df277ed --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArrayTest.java @@ -0,0 +1,305 @@ +package org.tensorflow.ndarray.impl.sparse; + +import org.junit.jupiter.api.Test; +import org.tensorflow.ndarray.ByteNdArray; +import org.tensorflow.ndarray.LongNdArray; +import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.StdArrays; +import org.tensorflow.ndarray.buffer.ByteDataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.impl.buffer.raw.RawDataBufferFactory; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; +import org.tensorflow.ndarray.index.Indices; + +import java.util.concurrent.atomic.AtomicInteger; + +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; + +class ByteSparseNdArrayTest { + long[][] indicesArray = {{0, 0}, {1, 2}}; + byte[] valuesArray = {1, 16}; + byte[] denseArray = { + 1, 0, 0, 0, + 0, 0, 16, 0, + 0, 0, 0, 0 + }; + byte[][] dense2DArray = {{1, 0, 0, 0}, {0, 0, 16, 0}, {0, 0, 0, 0}}; + + byte[][] dense2DArrayDefaultValue = {{1, -1, -1, -1}, {-1, -1, 16, -1}, {-1, -1, -1, -1}}; + + Shape shape = Shape.of(3, 4); + LongNdArray indices = StdArrays.ndCopyOf(indicesArray); + ByteNdArray values = StdArrays.ndCopyOf(valuesArray); + + @Test + public void testBasic() { + ByteSparseNdArray instance = + new ByteSparseNdArray(indices, values, DimensionalSpace.create(shape)); + assertEquals(indices, instance.getIndices()); + assertEquals(values, instance.getValues()); + assertEquals(shape, instance.shape()); + } + + @Test + public void testRead() { + ByteSparseNdArray instance = + new ByteSparseNdArray(indices, values, DimensionalSpace.create(shape)); + ByteDataBuffer dataBuffer = DataBuffers.ofBytes(instance.shape().size()); + + instance.read(dataBuffer); + + byte[] array = new byte[denseArray.length]; + dataBuffer.read(array); + assertArrayEquals(denseArray, array); + } + + @Test + public void testWrite() { + + ByteDataBuffer dataBuffer = RawDataBufferFactory.create(denseArray, false); + // use a zero buffer + ByteSparseNdArray instance = ByteSparseNdArray.create(DimensionalSpace.create(shape)); + instance.write(dataBuffer); + + assertEquals(indices, instance.getIndices()); + assertEquals(values, instance.getValues()); + } + + @Test + public void testWriteDefaultValue() { + // change 0 to -1 + byte[] denseArrayDefaultValue = new byte[denseArray.length]; + for (int i = 0; i < denseArrayDefaultValue.length; i++) { + denseArrayDefaultValue[i] = denseArray[i] == 0 ? -1 : denseArray[i]; + } + ByteDataBuffer dataBuffer = RawDataBufferFactory.create(denseArrayDefaultValue, false); + // use a zero buffer + ByteSparseNdArray instance = + ByteSparseNdArray.create((byte) -1, DimensionalSpace.create(shape)); + instance.write(dataBuffer); + + assertEquals(indices, instance.getIndices()); + assertEquals(values, instance.getValues()); + assertEquals((byte) -1, instance.getByte(2, 0)); + } + + @Test + public void testGetObject() { + ByteNdArray ndArray = StdArrays.ndCopyOf(dense2DArray); + ByteSparseNdArray instance = + new ByteSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + for (int n = 0; n < ndArray.shape().get(0); n++) { + for (int m = 0; m < ndArray.shape().get(1); m++) { + assertEquals(ndArray.getObject(n, m), instance.getObject(n, m)); + } + } + } + + @Test + public void testGetByte() { + ByteNdArray ndArray = StdArrays.ndCopyOf(dense2DArray); + ByteSparseNdArray instance = + new ByteSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + for (int n = 0; n < ndArray.shape().get(0); n++) { + for (int m = 0; m < ndArray.shape().get(1); m++) { + assertEquals(ndArray.getByte(n, m), instance.getByte(n, m)); + } + } + } + + @Test + public void testGetByteDefaultValue() { + ByteNdArray ndArray = StdArrays.ndCopyOf(dense2DArrayDefaultValue); + ByteSparseNdArray instance = + new ByteSparseNdArray(indices, values, (byte) -1, DimensionalSpace.create(shape)); + + for (int n = 0; n < ndArray.shape().get(0); n++) { + for (int m = 0; m < ndArray.shape().get(1); m++) { + assertEquals(ndArray.getByte(n, m), instance.getByte(n, m)); + } + } + } + + @Test + public void testGet() { + ByteNdArray ndArray = StdArrays.ndCopyOf(dense2DArray); + ByteSparseNdArray instance = + new ByteSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + for (int n = 0; n < ndArray.shape().get(0); n++) { + assertEquals(ndArray.get(n), instance.get(n)); + for (int m = 0; m < ndArray.shape().get(1); m++) { + assertEquals(ndArray.get(n, m), instance.get(n, m)); + } + } + } + + @Test + public void testSetObject() { + ByteSparseNdArray instance = + new ByteSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + assertThrows(java.nio.ReadOnlyBufferException.class, () -> instance.setObject((byte) 0, 0, 0)); + } + + @Test + public void testSet() { + ByteSparseNdArray instance = + new ByteSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + assertThrows( + java.nio.ReadOnlyBufferException.class, + () -> instance.set(instance.getDefaultArray(), 0, 0)); + } + + @Test + public void testSort() { + + long[][] indicesArray = {{0, 0}, {1, 2}, {0, 1}, {2, 3}, {1, 4}}; + long[][] sortedIndicesArray = {{0, 0}, {0, 1}, {1, 2}, {1, 4}, {2, 3}}; + byte[] valuesArray = {1, 3, 2, 5, 4}; + byte[] sortedValuesArray = {1, 2, 3, 4, 5}; + + LongNdArray indices = StdArrays.ndCopyOf(indicesArray); + LongNdArray sortedIndices = StdArrays.ndCopyOf(sortedIndicesArray); + ByteNdArray values = StdArrays.ndCopyOf(valuesArray); + ByteNdArray sortedValues = StdArrays.ndCopyOf(sortedValuesArray); + + ByteSparseNdArray instance = + new ByteSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + instance.sortIndicesAndValues(); + + // should be sorted in ascending row-wise coordinate order based on test values + assertEquals(sortedIndices, instance.getIndices()); + assertEquals(sortedValues, instance.getValues()); + } + + @Test + public void testElements() { + + ByteSparseNdArray instance = + new ByteSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + instance + .elements(0) + .forEachIndexed( + (idx, item) -> { + byte[] slice = dense2DArray[(int) idx[0]]; + item.scalars() + .forEachIndexed((dx, f) -> assertEquals(slice[(int) dx[0]], f.getObject())); + }); + } + + @Test + public void testDense() { + + ByteSparseNdArray instance = + new ByteSparseNdArray(indices, values, DimensionalSpace.create(shape)); + ByteNdArray denseInstance = instance.toDense(); + ByteNdArray expectedDense = StdArrays.ndCopyOf(dense2DArray); + assertEquals(expectedDense, denseInstance); + } + + @Test + public void testFromDense() { + ByteNdArray ndArray = StdArrays.ndCopyOf(dense2DArray); + ByteSparseNdArray instance = ByteSparseNdArray.create(DimensionalSpace.create(ndArray.shape())); + instance.fromDense(ndArray); + assertNotNull(instance.getIndices()); + assertEquals(2, instance.getIndices().shape().get(0)); + assertNotNull(instance.getValues()); + assertEquals(2, instance.getValues().size()); + + assertEquals(ndArray.shape(), instance.shape()); + for (int n = 0; n < ndArray.shape().get(0); n++) { + for (int m = 0; m < ndArray.shape().get(1); m++) { + assertEquals(ndArray.getByte(n, m), instance.getByte(n, m)); + } + } + } + + @Test + public void testElements1() { + byte[] expected = {1, 0, 0}; + + ByteSparseNdArray instance = + new ByteSparseNdArray(indices, values, DimensionalSpace.create(shape)); + instance + .elements(0) + .forEachIndexed((idx, l) -> assertEquals(expected[(int) idx[0]], l.getObject())); + instance + .elements(1) + .forEachIndexed( + (idx, l) -> assertEquals(dense2DArray[(int) idx[0]][(int) idx[1]], l.getObject())); + } + + @Test + public void testCopyTo() { + ByteNdArray dst = NdArrays.ofBytes(shape); + ByteSparseNdArray instance = + new ByteSparseNdArray(indices, values, DimensionalSpace.create(shape)); + instance.copyTo(dst); + for (int n = 0; n < instance.shape().get(0); n++) { + for (int m = 0; m < instance.shape().get(1); m++) { + assertEquals(instance.getByte(n, m), dst.getByte(n, m)); + } + } + } + + @Test + public void testCreate() { + + ByteSparseNdArray instance = + new ByteSparseNdArray(indices, values, DimensionalSpace.create(shape)); + ByteSparseNdArray instanceA = + ByteSparseNdArray.create(indices, values, DimensionalSpace.create(shape)); + assertEquals(instance, instanceA); + + ByteDataBuffer dataBuffer = RawDataBufferFactory.create(denseArray, false); + // use a zero buffer + ByteSparseNdArray instanceB = ByteSparseNdArray.create(DimensionalSpace.create(shape)); + instanceB.write(dataBuffer); + assertEquals(instance, instanceB); + + ByteSparseNdArray instanceC = + ByteSparseNdArray.create(dataBuffer, DimensionalSpace.create(shape)); + assertEquals(instanceB, instanceC); + + ByteSparseNdArray instanceD = ByteSparseNdArray.create(dataBuffer, shape); + assertEquals(instanceB, instanceD); + + ByteNdArray ndArray = StdArrays.ndCopyOf(dense2DArray); + ByteSparseNdArray instanceE = ByteSparseNdArray.create(ndArray); + assertEquals(instance, instanceE); + } + + @Test + public void testSlice() { + byte[] expected = {0, 0, 16, 0, 0, 0}; + ByteSparseNdArray instance = + new ByteSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + ByteNdArray sliceInstance = instance.slice(Indices.all(), Indices.sliceFrom(2)); + // check the values of the slice against the original sparse array + AtomicInteger i = new AtomicInteger(); + sliceInstance + .scalars() + .forEachIndexed((idx, f) -> assertEquals(expected[i.getAndIncrement()], f.getByte())); + // check values from elements(0) of a slice against the original sparse array + i.set(0); + sliceInstance + .elements(0) + .forEachIndexed( + (idx, l) -> + l.scalars() + .forEachIndexed( + (lidx, f) -> assertEquals(expected[i.getAndIncrement()], f.getByte()))); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArrayTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArrayTest.java new file mode 100644 index 00000000000..437c9dc2904 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArrayTest.java @@ -0,0 +1,305 @@ +package org.tensorflow.ndarray.impl.sparse; + +import org.junit.jupiter.api.Test; +import org.tensorflow.ndarray.DoubleNdArray; +import org.tensorflow.ndarray.LongNdArray; +import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.StdArrays; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.buffer.DoubleDataBuffer; +import org.tensorflow.ndarray.impl.buffer.nio.NioDataBufferFactory; +import org.tensorflow.ndarray.impl.buffer.raw.RawDataBufferFactory; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; +import org.tensorflow.ndarray.index.Indices; + +import java.nio.DoubleBuffer; +import java.util.Arrays; +import java.util.concurrent.atomic.AtomicInteger; + +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; + +class DoubleSparseNdArrayTest { + long[][] indicesArray = {{0, 0}, {1, 2}}; + double[] valuesArray = {1, 256}; + double[] denseArray = { + 1, 0, 0, 0, + 0, 0, 256, 0, + 0, 0, 0, 0 + }; + double[][] dense2DArray = {{1, 0, 0, 0}, {0, 0, 256, 0}, {0, 0, 0, 0}}; + + double[][] dense2DArrayDefaultValue = {{1, -1, -1, -1}, {-1, -1, 256, -1}, {-1, -1, -1, -1}}; + + Shape shape = Shape.of(3, 4); + LongNdArray indices = StdArrays.ndCopyOf(indicesArray); + DoubleNdArray values = StdArrays.ndCopyOf(valuesArray); + + @Test + public void testBasic() { + DoubleSparseNdArray instance = + new DoubleSparseNdArray(indices, values, DimensionalSpace.create(shape)); + assertEquals(indices, instance.getIndices()); + assertEquals(values, instance.getValues()); + assertEquals(shape, instance.shape()); + } + + @Test + public void testRead() { + DoubleSparseNdArray instance = + new DoubleSparseNdArray(indices, values, DimensionalSpace.create(shape)); + DoubleDataBuffer dataBuffer = DataBuffers.ofDoubles(instance.shape().size()); + + instance.read(dataBuffer); + + double[] array = new double[denseArray.length]; + dataBuffer.read(array); + assertArrayEquals(denseArray, array); + } + + @Test + public void testWrite() { + + DoubleDataBuffer dataBuffer = NioDataBufferFactory.create(DoubleBuffer.wrap(denseArray)); + // use a zero buffer + DoubleSparseNdArray instance = DoubleSparseNdArray.create(DimensionalSpace.create(shape)); + instance.write(dataBuffer); + + assertEquals(indices, instance.getIndices()); + assertEquals(values, instance.getValues()); + } + + @Test + public void testWriteDefaultValue() { + // change 0 to -1 + double[] denseArrayDefaultValue = Arrays.stream(denseArray).map(x -> x == 0 ? -1 : x).toArray(); + DoubleDataBuffer dataBuffer = RawDataBufferFactory.create(denseArrayDefaultValue, false); + // use a zero buffer + DoubleSparseNdArray instance = DoubleSparseNdArray.create(-1d, DimensionalSpace.create(shape)); + instance.write(dataBuffer); + + assertEquals(indices, instance.getIndices()); + assertEquals(values, instance.getValues()); + assertEquals(-1d, instance.getDouble(2, 0)); + } + + @Test + public void testGetObject() { + + DoubleNdArray ndArray = StdArrays.ndCopyOf(dense2DArray); + DoubleSparseNdArray instance = + new DoubleSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + for (int n = 0; n < ndArray.shape().get(0); n++) { + for (int m = 0; m < ndArray.shape().get(1); m++) { + assertEquals(ndArray.getObject(n, m), instance.getObject(n, m)); + } + } + } + + @Test + public void testGetDouble() { + DoubleNdArray ndArray = StdArrays.ndCopyOf(dense2DArray); + DoubleSparseNdArray instance = + new DoubleSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + for (int n = 0; n < ndArray.shape().get(0); n++) { + for (int m = 0; m < ndArray.shape().get(1); m++) { + assertEquals(ndArray.getDouble(n, m), instance.getDouble(n, m)); + } + } + } + + @Test + public void testGetDoubleDefaultValue() { + DoubleNdArray ndArray = StdArrays.ndCopyOf(dense2DArrayDefaultValue); + DoubleSparseNdArray instance = + new DoubleSparseNdArray(indices, values, -1d, DimensionalSpace.create(shape)); + + for (int n = 0; n < ndArray.shape().get(0); n++) { + for (int m = 0; m < ndArray.shape().get(1); m++) { + assertEquals(ndArray.getDouble(n, m), instance.getDouble(n, m)); + } + } + } + + @Test + public void testGet() { + DoubleNdArray ndArray = StdArrays.ndCopyOf(dense2DArray); + DoubleSparseNdArray instance = + new DoubleSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + for (int n = 0; n < ndArray.shape().get(0); n++) { + assertEquals(ndArray.get(n), instance.get(n)); + for (int m = 0; m < ndArray.shape().get(1); m++) { + assertEquals(ndArray.get(n, m), instance.get(n, m)); + } + } + } + + @Test + public void testSetObject() { + DoubleSparseNdArray instance = + new DoubleSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + assertThrows(java.nio.ReadOnlyBufferException.class, () -> instance.setObject(2d, 0, 0)); + } + + @Test + public void testSet() { + DoubleSparseNdArray instance = + new DoubleSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + assertThrows( + java.nio.ReadOnlyBufferException.class, + () -> instance.set(instance.getDefaultArray(), 0, 0)); + } + + @Test + public void testSort() { + + long[][] indicesArray = {{0, 0}, {1, 2}, {0, 1}, {2, 3}, {1, 4}}; + long[][] sortedIndicesArray = {{0, 0}, {0, 1}, {1, 2}, {1, 4}, {2, 3}}; + double[] valuesArray = {1, 3, 2, 5, 4}; + double[] sortedValuesArray = {1, 2, 3, 4, 5}; + + LongNdArray indices = StdArrays.ndCopyOf(indicesArray); + LongNdArray sortedIndices = StdArrays.ndCopyOf(sortedIndicesArray); + DoubleNdArray values = StdArrays.ndCopyOf(valuesArray); + DoubleNdArray sortedValues = StdArrays.ndCopyOf(sortedValuesArray); + + DoubleSparseNdArray instance = + new DoubleSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + instance.sortIndicesAndValues(); + + // should be sorted in ascending row-wise coordinate order based on test values + assertEquals(sortedIndices, instance.getIndices()); + assertEquals(sortedValues, instance.getValues()); + } + + @Test + public void testElements() { + + DoubleSparseNdArray instance = + new DoubleSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + instance + .elements(0) + .forEachIndexed( + (idx, item) -> { + double[] slice = dense2DArray[(int) idx[0]]; + item.scalars() + .forEachIndexed((dx, f) -> assertEquals(slice[(int) dx[0]], f.getObject())); + }); + } + + @Test + public void testDense() { + + DoubleSparseNdArray instance = + new DoubleSparseNdArray(indices, values, DimensionalSpace.create(shape)); + DoubleNdArray denseInstance = instance.toDense(); + DoubleNdArray expectedDense = StdArrays.ndCopyOf(dense2DArray); + assertEquals(expectedDense, denseInstance); + } + + @Test + public void testFromDense() { + DoubleNdArray ndArray = StdArrays.ndCopyOf(dense2DArray); + DoubleSparseNdArray instance = + DoubleSparseNdArray.create(DimensionalSpace.create(ndArray.shape())); + instance.fromDense(ndArray); + assertNotNull(instance.getIndices()); + assertEquals(2, instance.getIndices().shape().get(0)); + assertNotNull(instance.getValues()); + assertEquals(2, instance.getValues().size()); + + assertEquals(ndArray.shape(), instance.shape()); + for (int n = 0; n < ndArray.shape().get(0); n++) { + for (int m = 0; m < ndArray.shape().get(1); m++) { + assertEquals(ndArray.getDouble(n, m), instance.getDouble(n, m)); + } + } + } + + @Test + public void testElements1() { + double[] expected = {1, 0, 0}; + + DoubleSparseNdArray instance = + new DoubleSparseNdArray(indices, values, DimensionalSpace.create(shape)); + instance + .elements(0) + .forEachIndexed((idx, l) -> assertEquals(expected[(int) idx[0]], l.getObject())); + instance + .elements(1) + .forEachIndexed( + (idx, l) -> assertEquals(dense2DArray[(int) idx[0]][(int) idx[1]], l.getObject())); + } + + @Test + public void testCopyTo() { + DoubleNdArray dst = NdArrays.ofDoubles(shape); + DoubleSparseNdArray instance = + new DoubleSparseNdArray(indices, values, DimensionalSpace.create(shape)); + instance.copyTo(dst); + for (int n = 0; n < instance.shape().get(0); n++) { + for (int m = 0; m < instance.shape().get(1); m++) { + assertEquals(instance.getDouble(n, m), dst.getDouble(n, m)); + } + } + } + + @Test + public void testCreate() { + DoubleSparseNdArray instance = + new DoubleSparseNdArray(indices, values, DimensionalSpace.create(shape)); + DoubleSparseNdArray instanceA = + DoubleSparseNdArray.create(indices, values, DimensionalSpace.create(shape)); + assertEquals(instance, instanceA); + + DoubleDataBuffer dataBuffer = RawDataBufferFactory.create(denseArray, false); + // use a zero buffer + DoubleSparseNdArray instanceB = DoubleSparseNdArray.create(DimensionalSpace.create(shape)); + instanceB.write(dataBuffer); + assertEquals(instance, instanceB); + + DoubleSparseNdArray instanceC = + DoubleSparseNdArray.create(dataBuffer, DimensionalSpace.create(shape)); + assertEquals(instanceB, instanceC); + + DoubleSparseNdArray instanceD = DoubleSparseNdArray.create(dataBuffer, shape); + assertEquals(instanceB, instanceD); + + DoubleNdArray ndArray = StdArrays.ndCopyOf(dense2DArray); + DoubleSparseNdArray instanceE = DoubleSparseNdArray.create(ndArray); + assertEquals(instance, instanceE); + } + + @Test + public void testSlice() { + double[] expected = {0, 0, 256, 0, 0, 0}; + DoubleSparseNdArray instance = + new DoubleSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + DoubleNdArray sliceInstance = instance.slice(Indices.all(), Indices.sliceFrom(2)); + // check the values of the slice against the original sparse array + AtomicInteger i = new AtomicInteger(); + sliceInstance + .scalars() + .forEachIndexed((idx, f) -> assertEquals(expected[i.getAndIncrement()], f.getDouble())); + // check values from elements(0) of a slice against the original sparse array + i.set(0); + sliceInstance + .elements(0) + .forEachIndexed( + (idx, l) -> + l.scalars() + .forEachIndexed( + (lidx, f) -> assertEquals(expected[i.getAndIncrement()], f.getDouble()))); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArrayTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArrayTest.java new file mode 100644 index 00000000000..f5f6ba422f3 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArrayTest.java @@ -0,0 +1,314 @@ +package org.tensorflow.ndarray.impl.sparse; + +import org.junit.jupiter.api.Test; +import org.tensorflow.ndarray.FloatNdArray; +import org.tensorflow.ndarray.LongNdArray; +import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.StdArrays; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.buffer.FloatDataBuffer; +import org.tensorflow.ndarray.impl.buffer.nio.NioDataBufferFactory; +import org.tensorflow.ndarray.impl.buffer.raw.RawDataBufferFactory; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; +import org.tensorflow.ndarray.index.Indices; + +import java.nio.FloatBuffer; +import java.util.concurrent.atomic.AtomicInteger; + +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; + +class FloatSparseNdArrayTest { + long[][] indicesArray = {{0, 0}, {1, 2}}; + float[] valuesArray = {1, 2}; + float[] denseArray = { + 1, 0, 0, 0, + 0, 0, 2, 0, + 0, 0, 0, 0 + }; + + float[][] dense2DArrayDefaultValue = {{1, -1, -1, -1}, {-1, -1, 2, -1}, {-1, -1, -1, -1}}; + + Shape shape = Shape.of(3, 4); + LongNdArray indices = StdArrays.ndCopyOf(indicesArray); + FloatNdArray values = StdArrays.ndCopyOf(valuesArray); + + @Test + public void testBasic() { + FloatSparseNdArray instance = + new FloatSparseNdArray(indices, values, DimensionalSpace.create(shape)); + assertEquals(indices, instance.getIndices()); + assertEquals(values, instance.getValues()); + assertEquals(shape, instance.shape()); + } + + @Test + public void testRead() { + FloatSparseNdArray instance = + new FloatSparseNdArray(indices, values, DimensionalSpace.create(shape)); + FloatDataBuffer dataBuffer = DataBuffers.ofFloats(instance.shape().size()); + + instance.read(dataBuffer); + + float[] array = new float[denseArray.length]; + dataBuffer.read(array); + assertArrayEquals(denseArray, array); + } + + @Test + public void testWrite() { + + FloatDataBuffer dataBuffer = NioDataBufferFactory.create(FloatBuffer.wrap(denseArray)); + // use a zero buffer + FloatSparseNdArray instance = FloatSparseNdArray.create(DimensionalSpace.create(shape)); + instance.write(dataBuffer); + + assertEquals(indices, instance.getIndices()); + assertEquals(values, instance.getValues()); + } + + @Test + public void testWriteDefaultValue() { + // change 0 to -1 + float[] denseArrayDefaultValue = new float[denseArray.length]; + for (int i = 0; i < denseArrayDefaultValue.length; i++) { + denseArrayDefaultValue[i] = denseArray[i] == 0f ? -1f : denseArray[i]; + } + FloatDataBuffer dataBuffer = RawDataBufferFactory.create(denseArrayDefaultValue, false); + // use a zero buffer + FloatSparseNdArray instance = FloatSparseNdArray.create(-1f, DimensionalSpace.create(shape)); + instance.write(dataBuffer); + + assertEquals(indices, instance.getIndices()); + assertEquals(values, instance.getValues()); + assertEquals(-1f, instance.getFloat(2, 0)); + } + + @Test + public void testGetObject() { + float[][] dense2DArray = {{1, 0, 0, 0}, {0, 0, 2, 0}, {0, 0, 0, 0}}; + FloatNdArray ndArray = StdArrays.ndCopyOf(dense2DArray); + FloatSparseNdArray instance = + new FloatSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + for (int n = 0; n < ndArray.shape().get(0); n++) { + for (int m = 0; m < ndArray.shape().get(1); m++) { + assertEquals(ndArray.getObject(n, m), instance.getObject(n, m)); + } + } + } + + @Test + public void testGetFloat() { + float[][] dense2DArray = {{1, 0, 0, 0}, {0, 0, 2, 0}, {0, 0, 0, 0}}; + FloatNdArray ndArray = StdArrays.ndCopyOf(dense2DArray); + FloatSparseNdArray instance = + new FloatSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + for (int n = 0; n < ndArray.shape().get(0); n++) { + for (int m = 0; m < ndArray.shape().get(1); m++) { + assertEquals(ndArray.getFloat(n, m), instance.getFloat(n, m)); + } + } + } + + @Test + public void testGetFloatDefaultValue() { + FloatNdArray ndArray = StdArrays.ndCopyOf(dense2DArrayDefaultValue); + FloatSparseNdArray instance = + new FloatSparseNdArray(indices, values, -1, DimensionalSpace.create(shape)); + + for (int n = 0; n < ndArray.shape().get(0); n++) { + for (int m = 0; m < ndArray.shape().get(1); m++) { + assertEquals(ndArray.getFloat(n, m), instance.getFloat(n, m)); + } + } + } + + @Test + public void testGet() { + float[][] dense2DArray = {{1, 0, 0, 0}, {0, 0, 2, 0}, {0, 0, 0, 0}}; + FloatNdArray ndArray = StdArrays.ndCopyOf(dense2DArray); + FloatSparseNdArray instance = + new FloatSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + for (int n = 0; n < ndArray.shape().get(0); n++) { + assertEquals(ndArray.get(n), instance.get(n)); + for (int m = 0; m < ndArray.shape().get(1); m++) { + assertEquals(ndArray.get(n, m), instance.get(n, m)); + } + } + } + + @Test + public void testSetObject() { + FloatSparseNdArray instance = + new FloatSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + assertThrows(java.nio.ReadOnlyBufferException.class, () -> instance.setObject(2f, 0, 0)); + } + + @Test + public void testSet() { + FloatSparseNdArray instance = + new FloatSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + assertThrows( + java.nio.ReadOnlyBufferException.class, + () -> instance.set(instance.getDefaultArray(), 0, 0)); + } + + @Test + public void testSort() { + + long[][] indicesArray = {{0, 0}, {1, 2}, {0, 1}, {2, 3}, {1, 4}}; + long[][] sortedIndicesArray = {{0, 0}, {0, 1}, {1, 2}, {1, 4}, {2, 3}}; + float[] valuesArray = {1, 3, 2, 5, 4}; + float[] sortedValuesArray = {1, 2, 3, 4, 5}; + + LongNdArray indices = StdArrays.ndCopyOf(indicesArray); + LongNdArray sortedIndices = StdArrays.ndCopyOf(sortedIndicesArray); + FloatNdArray values = StdArrays.ndCopyOf(valuesArray); + FloatNdArray sortedValues = StdArrays.ndCopyOf(sortedValuesArray); + + FloatSparseNdArray instance = + new FloatSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + instance.sortIndicesAndValues(); + + // should be sorted in ascending row-wise coordinate order based on test values + assertEquals(sortedIndices, instance.getIndices()); + assertEquals(sortedValues, instance.getValues()); + } + + @Test + public void testElements() { + + FloatSparseNdArray instance = + new FloatSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + float[][] dense2DArray = {{1, 0, 0, 0}, {0, 0, 2, 0}, {0, 0, 0, 0}}; + instance + .elements(0) + .forEachIndexed( + (idx, item) -> { + float[] slice = dense2DArray[(int) idx[0]]; + item.scalars() + .forEachIndexed((dx, f) -> assertEquals(slice[(int) dx[0]], f.getObject())); + }); + } + + @Test + public void testDense() { + float[][] dense2DArray = {{1, 0, 0, 0}, {0, 0, 2, 0}, {0, 0, 0, 0}}; + + FloatSparseNdArray instance = + new FloatSparseNdArray(indices, values, DimensionalSpace.create(shape)); + FloatNdArray denseInstance = instance.toDense(); + FloatNdArray expectedDense = StdArrays.ndCopyOf(dense2DArray); + assertEquals(expectedDense, denseInstance); + } + + @Test + public void testFromDense() { + float[][] dense2DArray = {{1, 0, 0, 0}, {0, 0, 2, 0}, {0, 0, 0, 0}}; + FloatNdArray ndArray = StdArrays.ndCopyOf(dense2DArray); + FloatSparseNdArray instance = + FloatSparseNdArray.create(DimensionalSpace.create(ndArray.shape())); + instance.fromDense(ndArray); + assertNotNull(instance.getIndices()); + assertEquals(2, instance.getIndices().shape().get(0)); + assertNotNull(instance.getValues()); + assertEquals(2, instance.getValues().size()); + + assertEquals(ndArray.shape(), instance.shape()); + for (int n = 0; n < ndArray.shape().get(0); n++) { + for (int m = 0; m < ndArray.shape().get(1); m++) { + assertEquals(ndArray.getFloat(n, m), instance.getFloat(n, m)); + } + } + } + + @Test + public void testElements1() { + float[] expected = {1, 0, 0}; + float[][] dense2DArray = {{1, 0, 0, 0}, {0, 0, 2, 0}, {0, 0, 0, 0}}; + + FloatSparseNdArray instance = + new FloatSparseNdArray(indices, values, DimensionalSpace.create(shape)); + instance + .elements(0) + .forEachIndexed((idx, l) -> assertEquals(expected[(int) idx[0]], l.getObject())); + instance + .elements(1) + .forEachIndexed( + (idx, l) -> assertEquals(dense2DArray[(int) idx[0]][(int) idx[1]], l.getObject())); + } + + @Test + public void testCopyTo() { + FloatNdArray dst = NdArrays.ofFloats(shape); + FloatSparseNdArray instance = + new FloatSparseNdArray(indices, values, DimensionalSpace.create(shape)); + instance.copyTo(dst); + for (int n = 0; n < instance.shape().get(0); n++) { + for (int m = 0; m < instance.shape().get(1); m++) { + assertEquals(instance.getFloat(n, m), dst.getFloat(n, m)); + } + } + } + + @Test + public void testCreate() { + float[] denseArray = {1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0}; + float[][] dense2Array = {{1, 0, 0, 0}, {0, 0, 2, 0}, {0, 0, 0, 0}}; + FloatSparseNdArray instance = + new FloatSparseNdArray(indices, values, DimensionalSpace.create(shape)); + FloatSparseNdArray instanceA = + FloatSparseNdArray.create(indices, values, DimensionalSpace.create(shape)); + assertEquals(instance, instanceA); + + FloatDataBuffer dataBuffer = RawDataBufferFactory.create(denseArray, false); + // use a zero buffer + FloatSparseNdArray instanceB = FloatSparseNdArray.create(DimensionalSpace.create(shape)); + instanceB.write(dataBuffer); + assertEquals(instance, instanceB); + + FloatSparseNdArray instanceC = + FloatSparseNdArray.create(dataBuffer, DimensionalSpace.create(shape)); + assertEquals(instanceB, instanceC); + + FloatSparseNdArray instanceD = FloatSparseNdArray.create(dataBuffer, shape); + assertEquals(instanceB, instanceD); + + FloatNdArray ndArray = StdArrays.ndCopyOf(dense2Array); + FloatSparseNdArray instanceE = FloatSparseNdArray.create(ndArray); + assertEquals(instance, instanceE); + } + + @Test + public void testSlice() { + float[] expected = {0, 0, 2, 0, 0, 0}; + FloatSparseNdArray instance = + new FloatSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + FloatNdArray sliceInstance = instance.slice(Indices.all(), Indices.sliceFrom(2)); + // check the values of the slice against the original sparse array + AtomicInteger i = new AtomicInteger(); + sliceInstance + .scalars() + .forEachIndexed((idx, f) -> assertEquals(expected[i.getAndIncrement()], f.getFloat())); + // check values from elements(0) of a slice against the original sparse array + i.set(0); + sliceInstance + .elements(0) + .forEachIndexed( + (idx, l) -> + l.scalars() + .forEachIndexed( + (lidx, f) -> assertEquals(expected[i.getAndIncrement()], f.getFloat()))); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArrayTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArrayTest.java new file mode 100644 index 00000000000..8492493b93c --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArrayTest.java @@ -0,0 +1,312 @@ +package org.tensorflow.ndarray.impl.sparse; + +import org.junit.jupiter.api.Test; +import org.tensorflow.ndarray.IntNdArray; +import org.tensorflow.ndarray.LongNdArray; +import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.StdArrays; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.buffer.IntDataBuffer; +import org.tensorflow.ndarray.impl.buffer.nio.NioDataBufferFactory; +import org.tensorflow.ndarray.impl.buffer.raw.RawDataBufferFactory; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; +import org.tensorflow.ndarray.index.Indices; + +import java.nio.IntBuffer; +import java.util.Arrays; +import java.util.concurrent.atomic.AtomicInteger; + +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; + +class IntSparseNdArrayTest { + long[][] indicesArray = {{0, 0}, {1, 2}}; + int[] valuesArray = {1, 2}; + int[] denseArray = { + 1, 0, 0, 0, + 0, 0, 2, 0, + 0, 0, 0, 0 + }; + + int[][] dense2DArrayDefaultValue = {{1, -1, -1, -1}, {-1, -1, 2, -1}, {-1, -1, -1, -1}}; + + Shape shape = Shape.of(3, 4); + LongNdArray indices = StdArrays.ndCopyOf(indicesArray); + IntNdArray values = StdArrays.ndCopyOf(valuesArray); + + @Test + public void testBasic() { + IntSparseNdArray instance = + new IntSparseNdArray(indices, values, DimensionalSpace.create(shape)); + assertEquals(indices, instance.getIndices()); + assertEquals(values, instance.getValues()); + assertEquals(shape, instance.shape()); + } + + @Test + public void testRead() { + IntSparseNdArray instance = + new IntSparseNdArray(indices, values, DimensionalSpace.create(shape)); + IntDataBuffer dataBuffer = DataBuffers.ofInts(instance.shape().size()); + + instance.read(dataBuffer); + + int[] array = new int[denseArray.length]; + dataBuffer.read(array); + assertArrayEquals(denseArray, array); + } + + @Test + public void testWrite() { + + IntDataBuffer dataBuffer = NioDataBufferFactory.create(IntBuffer.wrap(denseArray)); + // use a zero buffer + IntSparseNdArray instance = IntSparseNdArray.create(DimensionalSpace.create(shape)); + instance.write(dataBuffer); + + assertEquals(indices, instance.getIndices()); + assertEquals(values, instance.getValues()); + } + + @Test + public void testWriteDefaultValue() { + // change 0 to -1 + int[] denseArrayDefaultValue = Arrays.stream(denseArray).map(x -> x == 0 ? -1 : x).toArray(); + + IntDataBuffer dataBuffer = RawDataBufferFactory.create(denseArrayDefaultValue, false); + // use a zero buffer + IntSparseNdArray instance = IntSparseNdArray.create(-1, DimensionalSpace.create(shape)); + instance.write(dataBuffer); + + assertEquals(indices, instance.getIndices()); + assertEquals(values, instance.getValues()); + assertEquals(-1, instance.getInt(2, 0)); + } + + @Test + public void testGetObject() { + int[][] dense2DArray = {{1, 0, 0, 0}, {0, 0, 2, 0}, {0, 0, 0, 0}}; + IntNdArray ndArray = StdArrays.ndCopyOf(dense2DArray); + IntSparseNdArray instance = + new IntSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + for (int n = 0; n < ndArray.shape().get(0); n++) { + for (int m = 0; m < ndArray.shape().get(1); m++) { + assertEquals(ndArray.getObject(n, m), instance.getObject(n, m)); + } + } + } + + @Test + public void testGetInt() { + int[][] dense2DArray = {{1, 0, 0, 0}, {0, 0, 2, 0}, {0, 0, 0, 0}}; + IntNdArray ndArray = StdArrays.ndCopyOf(dense2DArray); + IntSparseNdArray instance = + new IntSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + for (int n = 0; n < ndArray.shape().get(0); n++) { + for (int m = 0; m < ndArray.shape().get(1); m++) { + assertEquals(ndArray.getInt(n, m), instance.getInt(n, m)); + } + } + } + + @Test + public void testGetIntDefaultValue() { + IntNdArray ndArray = StdArrays.ndCopyOf(dense2DArrayDefaultValue); + IntSparseNdArray instance = + new IntSparseNdArray(indices, values, -1, DimensionalSpace.create(shape)); + + for (int n = 0; n < ndArray.shape().get(0); n++) { + for (int m = 0; m < ndArray.shape().get(1); m++) { + assertEquals(ndArray.getInt(n, m), instance.getInt(n, m)); + } + } + } + + @Test + public void testGet() { + int[][] dense2DArray = {{1, 0, 0, 0}, {0, 0, 2, 0}, {0, 0, 0, 0}}; + IntNdArray ndArray = StdArrays.ndCopyOf(dense2DArray); + IntSparseNdArray instance = + new IntSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + for (int n = 0; n < ndArray.shape().get(0); n++) { + assertEquals(ndArray.get(n), instance.get(n)); + for (int m = 0; m < ndArray.shape().get(1); m++) { + assertEquals(ndArray.get(n, m), instance.get(n, m)); + } + } + } + + @Test + public void testSetObject() { + IntSparseNdArray instance = + new IntSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + assertThrows(java.nio.ReadOnlyBufferException.class, () -> instance.setObject(2, 0, 0)); + } + + @Test + public void testSet() { + IntSparseNdArray instance = + new IntSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + assertThrows( + java.nio.ReadOnlyBufferException.class, + () -> instance.set(instance.getDefaultArray(), 0, 0)); + } + + @Test + public void testSort() { + + long[][] indicesArray = {{0, 0}, {1, 2}, {0, 1}, {2, 3}, {1, 4}}; + long[][] sortedIndicesArray = {{0, 0}, {0, 1}, {1, 2}, {1, 4}, {2, 3}}; + int[] valuesArray = {1, 3, 2, 5, 4}; + int[] sortedValuesArray = {1, 2, 3, 4, 5}; + + LongNdArray indices = StdArrays.ndCopyOf(indicesArray); + LongNdArray sortedIndices = StdArrays.ndCopyOf(sortedIndicesArray); + IntNdArray values = StdArrays.ndCopyOf(valuesArray); + IntNdArray sortedValues = StdArrays.ndCopyOf(sortedValuesArray); + + IntSparseNdArray instance = + new IntSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + instance.sortIndicesAndValues(); + + // should be sorted in ascending row-wise coordinate order based on test values + assertEquals(sortedIndices, instance.getIndices()); + assertEquals(sortedValues, instance.getValues()); + } + + @Test + public void testElements() { + + IntSparseNdArray instance = + new IntSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + int[][] dense2DArray = {{1, 0, 0, 0}, {0, 0, 2, 0}, {0, 0, 0, 0}}; + instance + .elements(0) + .forEachIndexed( + (idx, item) -> { + int[] slice = dense2DArray[(int) idx[0]]; + item.scalars() + .forEachIndexed((dx, f) -> assertEquals(slice[(int) dx[0]], f.getObject())); + }); + } + + @Test + public void testDense() { + int[][] dense2DArray = {{1, 0, 0, 0}, {0, 0, 2, 0}, {0, 0, 0, 0}}; + + IntSparseNdArray instance = + new IntSparseNdArray(indices, values, DimensionalSpace.create(shape)); + IntNdArray denseInstance = instance.toDense(); + IntNdArray expectedDense = StdArrays.ndCopyOf(dense2DArray); + assertEquals(expectedDense, denseInstance); + } + + @Test + public void testFromDense() { + int[][] dense2DArray = {{1, 0, 0, 0}, {0, 0, 2, 0}, {0, 0, 0, 0}}; + IntNdArray ndArray = StdArrays.ndCopyOf(dense2DArray); + IntSparseNdArray instance = IntSparseNdArray.create(DimensionalSpace.create(ndArray.shape())); + instance.fromDense(ndArray); + assertNotNull(instance.getIndices()); + assertEquals(2, instance.getIndices().shape().get(0)); + assertNotNull(instance.getValues()); + assertEquals(2, instance.getValues().size()); + + assertEquals(ndArray.shape(), instance.shape()); + for (int n = 0; n < ndArray.shape().get(0); n++) { + for (int m = 0; m < ndArray.shape().get(1); m++) { + assertEquals(ndArray.getInt(n, m), instance.getInt(n, m)); + } + } + } + + @Test + public void testElements1() { + int[] expected = {1, 0, 0}; + int[][] dense2DArray = {{1, 0, 0, 0}, {0, 0, 2, 0}, {0, 0, 0, 0}}; + + IntSparseNdArray instance = + new IntSparseNdArray(indices, values, DimensionalSpace.create(shape)); + instance + .elements(0) + .forEachIndexed((idx, l) -> assertEquals(expected[(int) idx[0]], l.getObject())); + instance + .elements(1) + .forEachIndexed( + (idx, l) -> assertEquals(dense2DArray[(int) idx[0]][(int) idx[1]], l.getObject())); + } + + @Test + public void testCopyTo() { + IntNdArray dst = NdArrays.ofInts(shape); + IntSparseNdArray instance = + new IntSparseNdArray(indices, values, DimensionalSpace.create(shape)); + instance.copyTo(dst); + for (int n = 0; n < instance.shape().get(0); n++) { + for (int m = 0; m < instance.shape().get(1); m++) { + assertEquals(instance.getInt(n, m), dst.getInt(n, m)); + } + } + } + + @Test + public void testCreate() { + int[] denseArray = {1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0}; + int[][] dense2Array = {{1, 0, 0, 0}, {0, 0, 2, 0}, {0, 0, 0, 0}}; + IntSparseNdArray instance = + new IntSparseNdArray(indices, values, DimensionalSpace.create(shape)); + IntSparseNdArray instanceA = + IntSparseNdArray.create(indices, values, DimensionalSpace.create(shape)); + assertEquals(instance, instanceA); + + IntDataBuffer dataBuffer = RawDataBufferFactory.create(denseArray, false); + // use a zero buffer + IntSparseNdArray instanceB = IntSparseNdArray.create(DimensionalSpace.create(shape)); + instanceB.write(dataBuffer); + assertEquals(instance, instanceB); + + IntSparseNdArray instanceC = + IntSparseNdArray.create(dataBuffer, DimensionalSpace.create(shape)); + assertEquals(instanceB, instanceC); + + IntSparseNdArray instanceD = IntSparseNdArray.create(dataBuffer, shape); + assertEquals(instanceB, instanceD); + + IntNdArray ndArray = StdArrays.ndCopyOf(dense2Array); + IntSparseNdArray instanceE = IntSparseNdArray.create(ndArray); + assertEquals(instance, instanceE); + } + + @Test + public void testSlice() { + int[] expected = {0, 0, 2, 0, 0, 0}; + IntSparseNdArray instance = + new IntSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + IntNdArray sliceInstance = instance.slice(Indices.all(), Indices.sliceFrom(2)); + // check the values of the slice against the original sparse array + AtomicInteger i = new AtomicInteger(); + sliceInstance + .scalars() + .forEachIndexed((idx, f) -> assertEquals(expected[i.getAndIncrement()], f.getInt())); + // check values from elements(0) of a slice against the original sparse array + i.set(0); + sliceInstance + .elements(0) + .forEachIndexed( + (idx, l) -> + l.scalars() + .forEachIndexed( + (lidx, f) -> assertEquals(expected[i.getAndIncrement()], f.getInt()))); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArrayTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArrayTest.java new file mode 100644 index 00000000000..0a4b6c66fb1 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArrayTest.java @@ -0,0 +1,311 @@ +package org.tensorflow.ndarray.impl.sparse; + +import org.junit.jupiter.api.Test; +import org.tensorflow.ndarray.LongNdArray; +import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.StdArrays; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.buffer.LongDataBuffer; +import org.tensorflow.ndarray.impl.buffer.nio.NioDataBufferFactory; +import org.tensorflow.ndarray.impl.buffer.raw.RawDataBufferFactory; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; +import org.tensorflow.ndarray.index.Indices; + +import java.nio.LongBuffer; +import java.util.Arrays; +import java.util.concurrent.atomic.AtomicInteger; + +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; + +class LongSparseNdArrayTest { + long[][] indicesArray = {{0, 0}, {1, 2}}; + long[] valuesArray = {1, 2}; + long[] denseArray = { + 1, 0, 0, 0, + 0, 0, 2, 0, + 0, 0, 0, 0 + }; + + long[][] dense2DArrayDefaultValue = {{1, -1, -1, -1}, {-1, -1, 2, -1}, {-1, -1, -1, -1}}; + + Shape shape = Shape.of(3, 4); + LongNdArray indices = StdArrays.ndCopyOf(indicesArray); + LongNdArray values = StdArrays.ndCopyOf(valuesArray); + + @Test + public void testBasic() { + LongSparseNdArray instance = + new LongSparseNdArray(indices, values, DimensionalSpace.create(shape)); + assertEquals(indices, instance.getIndices()); + assertEquals(values, instance.getValues()); + assertEquals(shape, instance.shape()); + } + + @Test + public void testRead() { + LongSparseNdArray instance = + new LongSparseNdArray(indices, values, DimensionalSpace.create(shape)); + LongDataBuffer dataBuffer = DataBuffers.ofLongs(instance.shape().size()); + + instance.read(dataBuffer); + + long[] array = new long[denseArray.length]; + dataBuffer.read(array); + assertArrayEquals(denseArray, array); + } + + @Test + public void testWrite() { + + LongDataBuffer dataBuffer = NioDataBufferFactory.create(LongBuffer.wrap(denseArray)); + // use a zero buffer + LongSparseNdArray instance = LongSparseNdArray.create(DimensionalSpace.create(shape)); + instance.write(dataBuffer); + + assertEquals(indices, instance.getIndices()); + assertEquals(values, instance.getValues()); + } + + @Test + public void testWriteDefaultValue() { + // change 0 to -1 + long[] denseArrayDefaultValue = Arrays.stream(denseArray).map(x -> x == 0 ? -1 : x).toArray(); + + LongDataBuffer dataBuffer = RawDataBufferFactory.create(denseArrayDefaultValue, false); + // use a zero buffer + LongSparseNdArray instance = LongSparseNdArray.create(-1L, DimensionalSpace.create(shape)); + instance.write(dataBuffer); + + assertEquals(indices, instance.getIndices()); + assertEquals(values, instance.getValues()); + assertEquals(-1L, instance.getLong(2, 0)); + } + + @Test + public void testGetObject() { + long[][] dense2DArray = {{1, 0, 0, 0}, {0, 0, 2, 0}, {0, 0, 0, 0}}; + LongNdArray ndArray = StdArrays.ndCopyOf(dense2DArray); + LongSparseNdArray instance = + new LongSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + for (int n = 0; n < ndArray.shape().get(0); n++) { + for (int m = 0; m < ndArray.shape().get(1); m++) { + assertEquals(ndArray.getObject(n, m), instance.getObject(n, m)); + } + } + } + + @Test + public void testGetLong() { + long[][] dense2DArray = {{1, 0, 0, 0}, {0, 0, 2, 0}, {0, 0, 0, 0}}; + LongNdArray ndArray = StdArrays.ndCopyOf(dense2DArray); + LongSparseNdArray instance = + new LongSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + for (int n = 0; n < ndArray.shape().get(0); n++) { + for (int m = 0; m < ndArray.shape().get(1); m++) { + assertEquals(ndArray.getLong(n, m), instance.getLong(n, m)); + } + } + } + + @Test + public void testGetLongDefaultValue() { + LongNdArray ndArray = StdArrays.ndCopyOf(dense2DArrayDefaultValue); + LongSparseNdArray instance = + new LongSparseNdArray(indices, values, -1L, DimensionalSpace.create(shape)); + + for (int n = 0; n < ndArray.shape().get(0); n++) { + for (int m = 0; m < ndArray.shape().get(1); m++) { + assertEquals(ndArray.getLong(n, m), instance.getLong(n, m)); + } + } + } + + @Test + public void testGet() { + long[][] dense2DArray = {{1, 0, 0, 0}, {0, 0, 2, 0}, {0, 0, 0, 0}}; + LongNdArray ndArray = StdArrays.ndCopyOf(dense2DArray); + LongSparseNdArray instance = + new LongSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + for (int n = 0; n < ndArray.shape().get(0); n++) { + assertEquals(ndArray.get(n), instance.get(n)); + for (int m = 0; m < ndArray.shape().get(1); m++) { + assertEquals(ndArray.get(n, m), instance.get(n, m)); + } + } + } + + @Test + public void testSetObject() { + LongSparseNdArray instance = + new LongSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + assertThrows(java.nio.ReadOnlyBufferException.class, () -> instance.setObject(2L, 0, 0)); + } + + @Test + public void testSet() { + LongSparseNdArray instance = + new LongSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + assertThrows( + java.nio.ReadOnlyBufferException.class, + () -> instance.set(instance.getDefaultArray(), 0, 0)); + } + + @Test + public void testSort() { + + long[][] indicesArray = {{0, 0}, {1, 2}, {0, 1}, {2, 3}, {1, 4}}; + long[][] sortedIndicesArray = {{0, 0}, {0, 1}, {1, 2}, {1, 4}, {2, 3}}; + long[] valuesArray = {1, 3, 2, 5, 4}; + long[] sortedValuesArray = {1, 2, 3, 4, 5}; + + LongNdArray indices = StdArrays.ndCopyOf(indicesArray); + LongNdArray sortedIndices = StdArrays.ndCopyOf(sortedIndicesArray); + LongNdArray values = StdArrays.ndCopyOf(valuesArray); + LongNdArray sortedValues = StdArrays.ndCopyOf(sortedValuesArray); + + LongSparseNdArray instance = + new LongSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + instance.sortIndicesAndValues(); + + // should be sorted in ascending row-wise coordinate order based on test values + assertEquals(sortedIndices, instance.getIndices()); + assertEquals(sortedValues, instance.getValues()); + } + + @Test + public void testElements() { + + LongSparseNdArray instance = + new LongSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + long[][] dense2DArray = {{1, 0, 0, 0}, {0, 0, 2, 0}, {0, 0, 0, 0}}; + instance + .elements(0) + .forEachIndexed( + (idx, item) -> { + long[] slice = dense2DArray[(int) idx[0]]; + item.scalars() + .forEachIndexed((dx, f) -> assertEquals(slice[(int) dx[0]], f.getObject())); + }); + } + + @Test + public void testDense() { + long[][] dense2DArray = {{1, 0, 0, 0}, {0, 0, 2, 0}, {0, 0, 0, 0}}; + + LongSparseNdArray instance = + new LongSparseNdArray(indices, values, DimensionalSpace.create(shape)); + LongNdArray denseInstance = instance.toDense(); + LongNdArray expectedDense = StdArrays.ndCopyOf(dense2DArray); + assertEquals(expectedDense, denseInstance); + } + + @Test + public void testFromDense() { + long[][] dense2DArray = {{1, 0, 0, 0}, {0, 0, 2, 0}, {0, 0, 0, 0}}; + LongNdArray ndArray = StdArrays.ndCopyOf(dense2DArray); + LongSparseNdArray instance = LongSparseNdArray.create(DimensionalSpace.create(ndArray.shape())); + instance.fromDense(ndArray); + assertNotNull(instance.getIndices()); + assertEquals(2, instance.getIndices().shape().get(0)); + assertNotNull(instance.getValues()); + assertEquals(2, instance.getValues().size()); + + assertEquals(ndArray.shape(), instance.shape()); + for (int n = 0; n < ndArray.shape().get(0); n++) { + for (int m = 0; m < ndArray.shape().get(1); m++) { + assertEquals(ndArray.getLong(n, m), instance.getLong(n, m)); + } + } + } + + @Test + public void testElements1() { + long[] expected = {1, 0, 0}; + long[][] dense2DArray = {{1, 0, 0, 0}, {0, 0, 2, 0}, {0, 0, 0, 0}}; + + LongSparseNdArray instance = + new LongSparseNdArray(indices, values, DimensionalSpace.create(shape)); + instance + .elements(0) + .forEachIndexed((idx, l) -> assertEquals(expected[(int) idx[0]], l.getObject())); + instance + .elements(1) + .forEachIndexed( + (idx, l) -> assertEquals(dense2DArray[(int) idx[0]][(int) idx[1]], l.getObject())); + } + + @Test + public void testCopyTo() { + LongNdArray dst = NdArrays.ofLongs(shape); + LongSparseNdArray instance = + new LongSparseNdArray(indices, values, DimensionalSpace.create(shape)); + instance.copyTo(dst); + for (int n = 0; n < instance.shape().get(0); n++) { + for (int m = 0; m < instance.shape().get(1); m++) { + assertEquals(instance.getLong(n, m), dst.getLong(n, m)); + } + } + } + + @Test + public void testCreate() { + long[] denseArray = {1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0}; + long[][] dense2Array = {{1, 0, 0, 0}, {0, 0, 2, 0}, {0, 0, 0, 0}}; + LongSparseNdArray instance = + new LongSparseNdArray(indices, values, DimensionalSpace.create(shape)); + LongSparseNdArray instanceA = + LongSparseNdArray.create(indices, values, DimensionalSpace.create(shape)); + assertEquals(instance, instanceA); + + LongDataBuffer dataBuffer = RawDataBufferFactory.create(denseArray, false); + // use a zero buffer + LongSparseNdArray instanceB = LongSparseNdArray.create(DimensionalSpace.create(shape)); + instanceB.write(dataBuffer); + assertEquals(instance, instanceB); + + LongSparseNdArray instanceC = + LongSparseNdArray.create(dataBuffer, DimensionalSpace.create(shape)); + assertEquals(instanceB, instanceC); + + LongSparseNdArray instanceD = LongSparseNdArray.create(dataBuffer, shape); + assertEquals(instanceB, instanceD); + + LongNdArray ndArray = StdArrays.ndCopyOf(dense2Array); + LongSparseNdArray instanceE = LongSparseNdArray.create(ndArray); + assertEquals(instance, instanceE); + } + + @Test + public void testSlice() { + long[] expected = {0, 0, 2, 0, 0, 0}; + LongSparseNdArray instance = + new LongSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + LongNdArray sliceInstance = instance.slice(Indices.all(), Indices.sliceFrom(2)); + // check the values of the slice against the original sparse array + AtomicInteger i = new AtomicInteger(); + sliceInstance + .scalars() + .forEachIndexed((idx, f) -> assertEquals(expected[i.getAndIncrement()], f.getLong())); + // check values from elements(0) of a slice against the original sparse array + i.set(0); + sliceInstance + .elements(0) + .forEachIndexed( + (idx, l) -> + l.scalars() + .forEachIndexed( + (lidx, f) -> assertEquals(expected[i.getAndIncrement()], f.getLong()))); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArrayTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArrayTest.java new file mode 100644 index 00000000000..cec13589241 --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArrayTest.java @@ -0,0 +1,315 @@ +package org.tensorflow.ndarray.impl.sparse; + +import org.junit.jupiter.api.Test; +import org.tensorflow.ndarray.LongNdArray; +import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.ShortNdArray; +import org.tensorflow.ndarray.StdArrays; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.buffer.ShortDataBuffer; +import org.tensorflow.ndarray.impl.buffer.nio.NioDataBufferFactory; +import org.tensorflow.ndarray.impl.buffer.raw.RawDataBufferFactory; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; +import org.tensorflow.ndarray.index.Indices; + +import java.nio.ShortBuffer; +import java.util.concurrent.atomic.AtomicInteger; + +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; + +class ShortSparseNdArrayTest { + long[][] indicesArray = {{0, 0}, {1, 2}}; + short[] valuesArray = {1, 2}; + short[] denseArray = { + 1, 0, 0, 0, + 0, 0, 2, 0, + 0, 0, 0, 0 + }; + short[][] dense2DArrayDefaultValue = {{1, -1, -1, -1}, {-1, -1, 2, -1}, {-1, -1, -1, -1}}; + + Shape shape = Shape.of(3, 4); + LongNdArray indices = StdArrays.ndCopyOf(indicesArray); + ShortNdArray values = StdArrays.ndCopyOf(valuesArray); + + @Test + public void testBasic() { + ShortSparseNdArray instance = + new ShortSparseNdArray(indices, values, DimensionalSpace.create(shape)); + assertEquals(indices, instance.getIndices()); + assertEquals(values, instance.getValues()); + assertEquals(shape, instance.shape()); + } + + @Test + public void testRead() { + ShortSparseNdArray instance = + new ShortSparseNdArray(indices, values, DimensionalSpace.create(shape)); + ShortDataBuffer dataBuffer = DataBuffers.ofShorts(instance.shape().size()); + + instance.read(dataBuffer); + + short[] array = new short[denseArray.length]; + dataBuffer.read(array); + assertArrayEquals(denseArray, array); + } + + @Test + public void testWrite() { + + ShortDataBuffer dataBuffer = NioDataBufferFactory.create(ShortBuffer.wrap(denseArray)); + // use a zero buffer + ShortSparseNdArray instance = ShortSparseNdArray.create(DimensionalSpace.create(shape)); + instance.write(dataBuffer); + + assertEquals(indices, instance.getIndices()); + assertEquals(values, instance.getValues()); + } + + @Test + public void testWriteDefaultValue() { + // change 0 to -1 + short[] denseArrayDefaultValue = new short[denseArray.length]; + for (int i = 0; i < denseArrayDefaultValue.length; i++) { + denseArrayDefaultValue[i] = denseArray[i] == 0 ? (short) -1 : denseArray[i]; + } + + ShortDataBuffer dataBuffer = RawDataBufferFactory.create(denseArrayDefaultValue, false); + // use a zero buffer + ShortSparseNdArray instance = + ShortSparseNdArray.create((short) -1, DimensionalSpace.create(shape)); + instance.write(dataBuffer); + + assertEquals(indices, instance.getIndices()); + assertEquals(values, instance.getValues()); + assertEquals((short) -1, instance.getShort(2, 0)); + } + + @Test + public void testGetObject() { + short[][] dense2DArray = {{1, 0, 0, 0}, {0, 0, 2, 0}, {0, 0, 0, 0}}; + ShortNdArray ndArray = StdArrays.ndCopyOf(dense2DArray); + ShortSparseNdArray instance = + new ShortSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + for (int n = 0; n < ndArray.shape().get(0); n++) { + for (int m = 0; m < ndArray.shape().get(1); m++) { + assertEquals(ndArray.getObject(n, m), instance.getObject(n, m)); + } + } + } + + @Test + public void testGetShort() { + short[][] dense2DArray = {{1, 0, 0, 0}, {0, 0, 2, 0}, {0, 0, 0, 0}}; + ShortNdArray ndArray = StdArrays.ndCopyOf(dense2DArray); + ShortSparseNdArray instance = + new ShortSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + for (int n = 0; n < ndArray.shape().get(0); n++) { + for (int m = 0; m < ndArray.shape().get(1); m++) { + assertEquals(ndArray.getShort(n, m), instance.getShort(n, m)); + } + } + } + + @Test + public void testGetShortDefaultValue() { + ShortNdArray ndArray = StdArrays.ndCopyOf(dense2DArrayDefaultValue); + ShortSparseNdArray instance = + new ShortSparseNdArray(indices, values, (short) -1, DimensionalSpace.create(shape)); + + for (int n = 0; n < ndArray.shape().get(0); n++) { + for (int m = 0; m < ndArray.shape().get(1); m++) { + assertEquals(ndArray.getShort(n, m), instance.getShort(n, m)); + } + } + } + + @Test + public void testGet() { + short[][] dense2DArray = {{1, 0, 0, 0}, {0, 0, 2, 0}, {0, 0, 0, 0}}; + ShortNdArray ndArray = StdArrays.ndCopyOf(dense2DArray); + ShortSparseNdArray instance = + new ShortSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + for (int n = 0; n < ndArray.shape().get(0); n++) { + assertEquals(ndArray.get(n), instance.get(n)); + for (int m = 0; m < ndArray.shape().get(1); m++) { + assertEquals(ndArray.get(n, m), instance.get(n, m)); + } + } + } + + @Test + public void testSetObject() { + ShortSparseNdArray instance = + new ShortSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + assertThrows(java.nio.ReadOnlyBufferException.class, () -> instance.setObject((short) 2, 0, 0)); + } + + @Test + public void testSet() { + ShortSparseNdArray instance = + new ShortSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + assertThrows( + java.nio.ReadOnlyBufferException.class, + () -> instance.set(instance.getDefaultArray(), 0, 0)); + } + + @Test + public void testSort() { + + long[][] indicesArray = {{0, 0}, {1, 2}, {0, 1}, {2, 3}, {1, 4}}; + long[][] sortedIndicesArray = {{0, 0}, {0, 1}, {1, 2}, {1, 4}, {2, 3}}; + short[] valuesArray = {1, 3, 2, 5, 4}; + short[] sortedValuesArray = {1, 2, 3, 4, 5}; + + LongNdArray indices = StdArrays.ndCopyOf(indicesArray); + LongNdArray sortedIndices = StdArrays.ndCopyOf(sortedIndicesArray); + ShortNdArray values = StdArrays.ndCopyOf(valuesArray); + ShortNdArray sortedValues = StdArrays.ndCopyOf(sortedValuesArray); + + ShortSparseNdArray instance = + new ShortSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + instance.sortIndicesAndValues(); + + // should be sorted in ascending row-wise coordinate order based on test values + assertEquals(sortedIndices, instance.getIndices()); + assertEquals(sortedValues, instance.getValues()); + } + + @Test + public void testElements() { + + ShortSparseNdArray instance = + new ShortSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + short[][] dense2DArray = {{1, 0, 0, 0}, {0, 0, 2, 0}, {0, 0, 0, 0}}; + instance + .elements(0) + .forEachIndexed( + (idx, item) -> { + short[] slice = dense2DArray[(int) idx[0]]; + item.scalars() + .forEachIndexed((dx, f) -> assertEquals(slice[(int) dx[0]], f.getObject())); + }); + } + + @Test + public void testDense() { + short[][] dense2DArray = {{1, 0, 0, 0}, {0, 0, 2, 0}, {0, 0, 0, 0}}; + + ShortSparseNdArray instance = + new ShortSparseNdArray(indices, values, DimensionalSpace.create(shape)); + ShortNdArray denseInstance = instance.toDense(); + ShortNdArray expectedDense = StdArrays.ndCopyOf(dense2DArray); + assertEquals(expectedDense, denseInstance); + } + + @Test + public void testFromDense() { + short[][] dense2DArray = {{1, 0, 0, 0}, {0, 0, 2, 0}, {0, 0, 0, 0}}; + ShortNdArray ndArray = StdArrays.ndCopyOf(dense2DArray); + ShortSparseNdArray instance = + ShortSparseNdArray.create(DimensionalSpace.create(ndArray.shape())); + instance.fromDense(ndArray); + assertNotNull(instance.getIndices()); + assertEquals(2, instance.getIndices().shape().get(0)); + assertNotNull(instance.getValues()); + assertEquals(2, instance.getValues().size()); + + assertEquals(ndArray.shape(), instance.shape()); + for (int n = 0; n < ndArray.shape().get(0); n++) { + for (int m = 0; m < ndArray.shape().get(1); m++) { + assertEquals(ndArray.getShort(n, m), instance.getShort(n, m)); + } + } + } + + @Test + public void testElements1() { + short[] expected = {1, 0, 0}; + short[][] dense2DArray = {{1, 0, 0, 0}, {0, 0, 2, 0}, {0, 0, 0, 0}}; + + ShortSparseNdArray instance = + new ShortSparseNdArray(indices, values, DimensionalSpace.create(shape)); + instance + .elements(0) + .forEachIndexed((idx, l) -> assertEquals(expected[(int) idx[0]], l.getObject())); + instance + .elements(1) + .forEachIndexed( + (idx, l) -> assertEquals(dense2DArray[(int) idx[0]][(int) idx[1]], l.getObject())); + } + + @Test + public void testCopyTo() { + ShortNdArray dst = NdArrays.ofShorts(shape); + ShortSparseNdArray instance = + new ShortSparseNdArray(indices, values, DimensionalSpace.create(shape)); + instance.copyTo(dst); + for (int n = 0; n < instance.shape().get(0); n++) { + for (int m = 0; m < instance.shape().get(1); m++) { + assertEquals(instance.getShort(n, m), dst.getShort(n, m)); + } + } + } + + @Test + public void testCreate() { + short[] denseArray = {1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0}; + short[][] dense2Array = {{1, 0, 0, 0}, {0, 0, 2, 0}, {0, 0, 0, 0}}; + ShortSparseNdArray instance = + new ShortSparseNdArray(indices, values, DimensionalSpace.create(shape)); + ShortSparseNdArray instanceA = + ShortSparseNdArray.create(indices, values, DimensionalSpace.create(shape)); + assertEquals(instance, instanceA); + + ShortDataBuffer dataBuffer = RawDataBufferFactory.create(denseArray, false); + // use a zero buffer + ShortSparseNdArray instanceB = ShortSparseNdArray.create(DimensionalSpace.create(shape)); + instanceB.write(dataBuffer); + assertEquals(instance, instanceB); + + ShortSparseNdArray instanceC = + ShortSparseNdArray.create(dataBuffer, DimensionalSpace.create(shape)); + assertEquals(instanceB, instanceC); + + ShortSparseNdArray instanceD = ShortSparseNdArray.create(dataBuffer, shape); + assertEquals(instanceB, instanceD); + + ShortNdArray ndArray = StdArrays.ndCopyOf(dense2Array); + ShortSparseNdArray instanceE = ShortSparseNdArray.create(ndArray); + assertEquals(instance, instanceE); + } + + @Test + public void testSlice() { + short[] expected = {0, 0, 2, 0, 0, 0}; + ShortSparseNdArray instance = + new ShortSparseNdArray(indices, values, DimensionalSpace.create(shape)); + + ShortNdArray sliceInstance = instance.slice(Indices.all(), Indices.sliceFrom(2)); + // check the values of the slice against the original sparse array + AtomicInteger i = new AtomicInteger(); + sliceInstance + .scalars() + .forEachIndexed((idx, f) -> assertEquals(expected[i.getAndIncrement()], f.getShort())); + // check values from elements(0) of a slice against the original sparse array + i.set(0); + sliceInstance + .elements(0) + .forEachIndexed( + (idx, l) -> + l.scalars() + .forEachIndexed( + (lidx, f) -> assertEquals(expected[i.getAndIncrement()], f.getShort()))); + } +} diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/StringSparseNdArrayTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/StringSparseNdArrayTest.java new file mode 100644 index 00000000000..40d65971abd --- /dev/null +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/StringSparseNdArrayTest.java @@ -0,0 +1,341 @@ +/* Copyright 2021 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ +package org.tensorflow.ndarray.impl.sparse; + +import org.junit.jupiter.api.Test; +import org.tensorflow.ndarray.LongNdArray; +import org.tensorflow.ndarray.NdArray; +import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.StdArrays; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; +import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; +import org.tensorflow.ndarray.index.Indices; + +import java.util.concurrent.atomic.AtomicInteger; + +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertThrows; + +public class StringSparseNdArrayTest { + long[][] indicesArray = {{0, 0}, {1, 2}}; + String[] valuesArray = {"alpha", "omega"}; + String[] denseArray = { + "alpha", null, null, null, null, null, "omega", null, null, null, null, null + }; + String[][] dense2DArray = { + {"alpha", null, null, null}, {null, null, "omega", null}, {null, null, null, null} + }; + + String[][] dense2DArrayDefault = { + {"alpha", "default", "default", "default"}, + {"default", "default", "omega", "default"}, + {"default", "default", "default", "default"} + }; + + Shape shape = Shape.of(3, 4); + LongNdArray indices = StdArrays.ndCopyOf(indicesArray); + NdArray values = StdArrays.ndCopyOf(valuesArray); + + @Test + public void testBasic() { + SparseNdArray> instance = + new SparseNdArray<>(String.class, indices, values, DimensionalSpace.create(shape)); + assertEquals(indices, instance.getIndices()); + assertEquals(values, instance.getValues()); + assertEquals(shape, instance.shape()); + } + + @Test + public void testRead() { + SparseNdArray> instance = + new SparseNdArray<>(String.class, indices, values, DimensionalSpace.create(shape)); + DataBuffer dataBuffer = DataBuffers.ofObjects(String.class, instance.shape().size()); + + instance.read(dataBuffer); + + String[] array = new String[denseArray.length]; + dataBuffer.read(array); + assertArrayEquals(denseArray, array); + } + + @Test + public void testWrite() { + + DataBuffer dataBuffer = DataBuffers.ofObjects(denseArray); + // use a zero buffer + SparseNdArray> instance = + SparseNdArray.create(String.class, DimensionalSpace.create(shape)); + instance.write(dataBuffer); + + assertEquals(indices, instance.getIndices()); + assertEquals(values, instance.getValues()); + assertEquals(indices.shape().get(0), values.size()); + assertEquals(2, values.size()); + } + + @Test + public void testWriteDefaultValue() { + String defaultValue = "default"; + String[] denseArrayDefaultValue = new String[denseArray.length]; + for (int i = 0; i < denseArrayDefaultValue.length; i++) { + denseArrayDefaultValue[i] = denseArray[i] == null ? defaultValue : denseArray[i]; + } + + DataBuffer dataBuffer = DataBuffers.ofObjects(denseArrayDefaultValue); + // use a zero buffer + SparseNdArray> instance = + SparseNdArray.create(String.class, defaultValue, DimensionalSpace.create(shape)); + instance.write(dataBuffer); + + assertEquals(indices, instance.getIndices()); + assertEquals(values, instance.getValues()); + assertEquals(2, values.size()); + assertEquals(indices.shape().get(0), values.size()); + } + + @Test + public void testGetObject() { + NdArray ndArray = StdArrays.ndCopyOf(dense2DArray); + SparseNdArray> instance = + new SparseNdArray<>(String.class, indices, values, DimensionalSpace.create(shape)); + + for (int n = 0; n < ndArray.shape().get(0); n++) { + for (int m = 0; m < ndArray.shape().get(1); m++) { + assertEquals(ndArray.getObject(n, m), instance.getObject(n, m)); + } + } + } + + @Test + public void testGetObjectDefaultValue() { + String defaultValue = "default"; + + NdArray ndArray = StdArrays.ndCopyOf(dense2DArrayDefault); + SparseNdArray> instance = + new SparseNdArray<>( + String.class, indices, values, defaultValue, DimensionalSpace.create(shape)); + + for (int n = 0; n < ndArray.shape().get(0); n++) { + for (int m = 0; m < ndArray.shape().get(1); m++) { + assertEquals(ndArray.getObject(n, m), instance.getObject(n, m)); + } + } + } + + @Test + public void testGet() { + NdArray ndArray = StdArrays.ndCopyOf(dense2DArray); + SparseNdArray> instance = + new SparseNdArray<>(String.class, indices, values, DimensionalSpace.create(shape)); + + for (int n = 0; n < ndArray.shape().get(0); n++) { + assertEquals(ndArray.get(n), instance.get(n)); + for (int m = 0; m < ndArray.shape().get(1); m++) { + assertEquals(ndArray.get(n, m), instance.get(n, m)); + } + } + } + + @Test + public void testSetObject() { + SparseNdArray> instance = + new SparseNdArray<>(String.class, indices, values, DimensionalSpace.create(shape)); + + assertThrows(java.nio.ReadOnlyBufferException.class, () -> instance.setObject(null, 0, 0)); + } + + @Test + public void testSet() { + SparseNdArray> instance = + new SparseNdArray<>(String.class, indices, values, DimensionalSpace.create(shape)); + + assertThrows( + java.nio.ReadOnlyBufferException.class, + () -> instance.set(instance.getDefaultArray(), 0, 0)); + } + + @Test + public void testSort() { + + long[][] indicesArray = {{0, 0}, {1, 2}, {0, 1}, {2, 3}, {1, 4}}; + long[][] sortedIndicesArray = {{0, 0}, {0, 1}, {1, 2}, {1, 4}, {2, 3}}; + String[] valuesArray = {"b", "d", "a", null, "c"}; + String[] sortedValuesArray = {"b", "a", "d", "c", null}; + + LongNdArray indices = StdArrays.ndCopyOf(indicesArray); + LongNdArray sortedIndices = StdArrays.ndCopyOf(sortedIndicesArray); + NdArray values = StdArrays.ndCopyOf(valuesArray); + NdArray sortedValues = StdArrays.ndCopyOf(sortedValuesArray); + + SparseNdArray> instance = + new SparseNdArray<>(String.class, indices, values, DimensionalSpace.create(shape)); + + instance.sortIndicesAndValues(); + + // should be sorted in ascending row-wise coordinate order based on test values + assertEquals(sortedIndices, instance.getIndices()); + assertEquals(sortedValues, instance.getValues()); + } + + @Test + public void testElements() { + + SparseNdArray> instance = + new SparseNdArray<>(String.class, indices, values, DimensionalSpace.create(shape)); + + instance + .elements(0) + .forEachIndexed( + (idx, item) -> { + String[] slice = dense2DArray[(int) idx[0]]; + item.scalars() + .forEachIndexed((dx, f) -> assertEquals(slice[(int) dx[0]], f.getObject())); + }); + } + + @Test + public void testDense() { + + SparseNdArray> instance = + new SparseNdArray<>(String.class, indices, values, DimensionalSpace.create(shape)); + NdArray denseInstance = instance.toDense(); + NdArray expectedDense = StdArrays.ndCopyOf(dense2DArray); + assertEquals(expectedDense, denseInstance); + } + + @Test + public void testFromDense() { + NdArray ndArray = StdArrays.ndCopyOf(dense2DArray); + SparseNdArray> instance = + SparseNdArray.create(String.class, DimensionalSpace.create(ndArray.shape())); + instance.fromDense(ndArray); + assertNotNull(instance.getIndices()); + assertEquals(2, instance.getIndices().shape().get(0)); + assertNotNull(instance.getValues()); + assertEquals(2, instance.getValues().size()); + + assertEquals(ndArray.shape(), instance.shape()); + for (int n = 0; n < ndArray.shape().get(0); n++) { + for (int m = 0; m < ndArray.shape().get(1); m++) { + assertEquals(ndArray.getObject(n, m), instance.getObject(n, m)); + } + } + } + + @Test + public void testElements1() { + String[] expected = {"alpha", null, null}; + + SparseNdArray> instance = + new SparseNdArray<>(String.class, indices, values, DimensionalSpace.create(shape)); + instance + .elements(0) + .forEachIndexed((idx, l) -> assertEquals(expected[(int) idx[0]], l.getObject())); + instance + .elements(1) + .forEachIndexed( + (idx, l) -> assertEquals(dense2DArray[(int) idx[0]][(int) idx[1]], l.getObject())); + } + + @Test + public void testCopyTo() { + NdArray dst = NdArrays.ofObjects(String.class, shape); + SparseNdArray> instance = + new SparseNdArray<>(String.class, indices, values, DimensionalSpace.create(shape)); + instance.copyTo(dst); + for (int n = 0; n < instance.shape().get(0); n++) { + for (int m = 0; m < instance.shape().get(1); m++) { + assertEquals(instance.getObject(n, m), dst.getObject(n, m)); + } + } + } + + @Test + public void testCreate() { + + SparseNdArray> instance = + new SparseNdArray<>(String.class, indices, values, DimensionalSpace.create(shape)); + SparseNdArray> instanceA = + SparseNdArray.create(String.class, indices, values, DimensionalSpace.create(shape)); + assertEquals(instance, instanceA); + + DataBuffer dataBuffer = DataBuffers.ofObjects(denseArray); + + // use a zero buffer + SparseNdArray> instanceB = + SparseNdArray.create(String.class, DimensionalSpace.create(shape)); + instanceB.write(dataBuffer); + assertEquals(instance, instanceB); + + SparseNdArray> instanceC = + SparseNdArray.create(String.class, dataBuffer, DimensionalSpace.create(shape)); + assertEquals(instanceB, instanceC); + + SparseNdArray> instanceD = + SparseNdArray.create(String.class, dataBuffer, shape); + assertEquals(instanceB, instanceD); + + NdArray ndArray = StdArrays.ndCopyOf(dense2DArray); + SparseNdArray> instanceE = SparseNdArray.create(String.class, ndArray); + assertEquals(instance, instanceE); + } + + @Test + public void testSlice() { + String[] expected = {null, null, "omega", null, null, null}; + SparseNdArray> instance = + new SparseNdArray<>(String.class, indices, values, DimensionalSpace.create(shape)); + + NdArray sliceInstance = instance.slice(Indices.all(), Indices.sliceFrom(2)); + // check the values of the slice against the original sparse array + AtomicInteger i = new AtomicInteger(); + sliceInstance + .scalars() + .forEachIndexed((idx, f) -> assertEquals(expected[i.getAndIncrement()], f.getObject())); + // check values from elements(0) of a slice against the original sparse array + i.set(0); + sliceInstance + .elements(0) + .forEachIndexed( + (idx, l) -> + l.scalars() + .forEachIndexed( + (lidx, f) -> assertEquals(expected[i.getAndIncrement()], f.getObject()))); + } + + @Test + public void testNullDefault() { + SparseNdArray> instance = + new SparseNdArray<>(String.class, indices, values, DimensionalSpace.create(shape)); + + NdArray dArray = instance.getDefaultArray(); + assertEquals(1L, dArray.size()); + assertNull(dArray.getObject()); + + instance = + new SparseNdArray<>( + String.class, indices, values, "a default", DimensionalSpace.create(shape)); + + dArray = instance.getDefaultArray(); + assertEquals(1L, dArray.size()); + assertNotNull(dArray.getObject()); + assertEquals("a default", dArray.getObject()); + } +} From 220d52a18f7fc01e8d15e6429991bd0a59ced0cd Mon Sep 17 00:00:00 2001 From: Karl Lessard Date: Tue, 11 Jan 2022 10:34:36 -0500 Subject: [PATCH 07/60] Allow SparseNdArray impls to be inherited (#5) --- .../impl/sparse/BooleanSparseNdArray.java | 22 +++++++++---------- .../impl/sparse/ByteSparseNdArray.java | 16 +++++++------- .../impl/sparse/DoubleSparseNdArray.java | 16 +++++++------- .../impl/sparse/FloatSparseNdArray.java | 16 +++++++------- .../ndarray/impl/sparse/IntSparseNdArray.java | 16 +++++++------- .../impl/sparse/LongSparseNdArray.java | 16 +++++++------- .../impl/sparse/ShortSparseNdArray.java | 16 +++++++------- .../ndarray/impl/sparse/SparseNdArray.java | 18 +++++++-------- 8 files changed, 68 insertions(+), 68 deletions(-) diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java index f9e41bfa970..f5b984fed35 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java @@ -63,7 +63,7 @@ public class BooleanSparseNdArray extends AbstractSparseNdArray implements ByteNdArray { /** - * Creates a ByteSparseNdArray + * Creates a ByteSparseNdArray with a default value of zero. * * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the * elements in the sparse array that contain non-default values (elements are zero-indexed). @@ -73,14 +73,16 @@ public class ByteSparseNdArray extends AbstractSparseNdArray * each element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter * {@code values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse NdArray has a * value of {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.6}. + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} * @param dimensions the dimensional space for the dense object represented by this sparse array, */ - ByteSparseNdArray(LongNdArray indices, ByteNdArray values, DimensionalSpace dimensions) { - this(indices, values, (byte) 0, dimensions); + protected ByteSparseNdArray( + LongNdArray indices, ByteNdArray values, byte defaultValue, DimensionalSpace dimensions) { + super(indices, values, defaultValue, dimensions); } /** - * Creates a ByteSparseNdArray with a default value of zero. + * Creates a ByteSparseNdArray * * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the * elements in the sparse array that contain non-default values (elements are zero-indexed). @@ -90,12 +92,10 @@ public class ByteSparseNdArray extends AbstractSparseNdArray * each element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter * {@code values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse NdArray has a * value of {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.6}. - * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} * @param dimensions the dimensional space for the dense object represented by this sparse array, */ - ByteSparseNdArray( - LongNdArray indices, ByteNdArray values, byte defaultValue, DimensionalSpace dimensions) { - super(indices, values, defaultValue, dimensions); + ByteSparseNdArray(LongNdArray indices, ByteNdArray values, DimensionalSpace dimensions) { + this(indices, values, (byte) 0, dimensions); } /** diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArray.java index 27a083227ba..07a6d2ad752 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArray.java @@ -63,7 +63,7 @@ public class DoubleSparseNdArray extends AbstractSparseNdArray implements IntNdArray { /** - * Creates a IntSparseNdArray with a default value of zero. + * Creates a IntSparseNdArray * * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the * elements in the sparse array that contain non-default values (elements are zero-indexed). @@ -73,14 +73,16 @@ public class IntSparseNdArray extends AbstractSparseNdArray * in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code * values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse NdArray has a value of * {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.6}. + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} * @param dimensions the dimensional space for the dense object represented by this sparse array, */ - IntSparseNdArray(LongNdArray indices, IntNdArray values, DimensionalSpace dimensions) { - this(indices, values, 0, dimensions); + protected IntSparseNdArray( + LongNdArray indices, IntNdArray values, int defaultValue, DimensionalSpace dimensions) { + super(indices, values, defaultValue, dimensions); } /** - * Creates a IntSparseNdArray + * Creates a IntSparseNdArray with a default value of zero. * * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the * elements in the sparse array that contain non-default values (elements are zero-indexed). @@ -90,12 +92,10 @@ public class IntSparseNdArray extends AbstractSparseNdArray * in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code * values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse NdArray has a value of * {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.6}. - * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} * @param dimensions the dimensional space for the dense object represented by this sparse array, */ - IntSparseNdArray( - LongNdArray indices, IntNdArray values, int defaultValue, DimensionalSpace dimensions) { - super(indices, values, defaultValue, dimensions); + IntSparseNdArray(LongNdArray indices, IntNdArray values, DimensionalSpace dimensions) { + this(indices, values, 0, dimensions); } /** diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArray.java index 3385022fe53..242ba5077d0 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArray.java @@ -62,7 +62,7 @@ public class LongSparseNdArray extends AbstractSparseNdArray implements LongNdArray { /** - * Creates a LongSparseNdArray with a default value of zero. + * Creates a LongSparseNdArray * * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the * elements in the sparse array that contain non-default values (elements are zero-indexed). @@ -72,14 +72,16 @@ public class LongSparseNdArray extends AbstractSparseNdArray * element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code * values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse NdArray has a value of * {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.6}. + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} * @param dimensions the dimensional space for the dense object represented by this sparse array, */ - LongSparseNdArray(LongNdArray indices, LongNdArray values, DimensionalSpace dimensions) { - this(indices, values, 0L, dimensions); + protected LongSparseNdArray( + LongNdArray indices, LongNdArray values, long defaultValue, DimensionalSpace dimensions) { + super(indices, values, defaultValue, dimensions); } /** - * Creates a LongSparseNdArray + * Creates a LongSparseNdArray with a default value of zero. * * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the * elements in the sparse array that contain non-default values (elements are zero-indexed). @@ -89,12 +91,10 @@ public class LongSparseNdArray extends AbstractSparseNdArray * element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code * values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse NdArray has a value of * {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.6}. - * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} * @param dimensions the dimensional space for the dense object represented by this sparse array, */ - LongSparseNdArray( - LongNdArray indices, LongNdArray values, long defaultValue, DimensionalSpace dimensions) { - super(indices, values, defaultValue, dimensions); + LongSparseNdArray(LongNdArray indices, LongNdArray values, DimensionalSpace dimensions) { + this(indices, values, 0L, dimensions); } /** diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArray.java index 50793b994d7..63dde22d7ed 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArray.java @@ -63,7 +63,7 @@ public class ShortSparseNdArray extends AbstractSparseNdArray> extends AbstractSparseNdArra private final Class type; /** - * Creates a SparseNdArray with a default value of null. + * Creates a SparseNdArray * * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the * elements in the sparse array that contain non-default values (elements are zero-indexed). @@ -74,14 +74,17 @@ public class SparseNdArray> extends AbstractSparseNdArra * parameter {@code values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse * NdArray has a value of {@code 18}, and element {@code [2,4]} of the NdArray has a value of * {@code 3.6}. + * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} * @param dimensions the dimensional space for the dense object represented by this sparse array, */ - SparseNdArray(Class type, LongNdArray indices, U values, DimensionalSpace dimensions) { - this(type, indices, values, null, dimensions); + protected SparseNdArray( + Class type, LongNdArray indices, U values, T defaultValue, DimensionalSpace dimensions) { + super(indices, values, defaultValue, dimensions); + this.type = type; } /** - * Creates a SparseNdArray + * Creates a SparseNdArray with a default value of null. * * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the * elements in the sparse array that contain non-default values (elements are zero-indexed). @@ -92,13 +95,10 @@ public class SparseNdArray> extends AbstractSparseNdArra * parameter {@code values=[18, 3.6]} specifies that element {@code [1,3]} of the sparse * NdArray has a value of {@code 18}, and element {@code [2,4]} of the NdArray has a value of * {@code 3.6}. - * @param defaultValue Scalar value to set for indices not specified in {@link #getIndices()} * @param dimensions the dimensional space for the dense object represented by this sparse array, */ - SparseNdArray( - Class type, LongNdArray indices, U values, T defaultValue, DimensionalSpace dimensions) { - super(indices, values, defaultValue, dimensions); - this.type = type; + SparseNdArray(Class type, LongNdArray indices, U values, DimensionalSpace dimensions) { + this(type, indices, values, null, dimensions); } /** From a6f8d7f3512c2917c5b23f372d934d0195e10702 Mon Sep 17 00:00:00 2001 From: Karl Lessard Date: Tue, 8 Feb 2022 22:50:04 -0500 Subject: [PATCH 08/60] Better examples in Sparse array documentation (#6) --- .../java/org/tensorflow/ndarray/NdArrays.java | 160 +++++++++--------- 1 file changed, 80 insertions(+), 80 deletions(-) diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/NdArrays.java b/ndarray/src/main/java/org/tensorflow/ndarray/NdArrays.java index 64ab7eb3f0d..d79b78191ff 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/NdArrays.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/NdArrays.java @@ -108,12 +108,12 @@ public static ByteNdArray wrap(Shape shape, ByteDataBuffer buffer) { * * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the * elements in the sparse array that contain non-default values (elements are zero-indexed). - * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of - * {@code [1,3]} and {@code [2,4]} have non-default values. + * For example, {@code indices=[[1,3,1], [2,4,0]]} specifies that the elements with indexes of + * {@code [1,3,1]} and {@code [2,4,0]} have non-default values. * @param values A 1-D ByteNdArray of shape {@code [N]}, which supplies the values for each - * element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code - * values=[18, 3]} specifies that element {@code [1,3]} of the sparse NdArray has a value of - * {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3}. + * element in indices. For example, given {@code indices=[[1,3,1], [2,4,0]]}, the parameter {@code + * values=[18, 3]} specifies that element {@code [1,3,1]} of the sparse NdArray has a value of + * {@code 18}, and element {@code [2,4,0]} of the NdArray has a value of {@code 3}. * @param shape the shape of the dense array represented by this sparse array. * @return the byte sparse array. */ @@ -126,12 +126,12 @@ public static ByteSparseNdArray sparseOf(LongNdArray indices, ByteNdArray values * * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the * elements in the sparse array that contain non-default values (elements are zero-indexed). - * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of - * {@code [1,3]} and {@code [2,4]} have non default values. + * For example, {@code indices=[[1,3,1], [2,4,0]]} specifies that the elements with indexes of + * {@code [1,3,1]} and {@code [2,4,0]} have non default values. * @param values A 1-D ByteNdArray of shape {@code [N]}, which supplies the values for each - * element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code - * values=[18, 3]} specifies that element {@code [1,3]} of the sparse NdArray has a value of - * {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3}. + * element in indices. For example, given {@code indices=[[1,3,1], [2,4,0]]}, the parameter {@code + * values=[18, 3]} specifies that element {@code [1,3,1]} of the sparse NdArray has a value of + * {@code 18}, and element {@code [2,4,0]} of the NdArray has a value of {@code 3}. * @param defaultValue Scalar value to set for indices not specified in 'indices' * @param shape the shape of the dense array represented by this sparse array. * @return the byte sparse array. @@ -201,12 +201,12 @@ public static LongNdArray wrap(Shape shape, LongDataBuffer buffer) { * * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the * elements in the sparse array that contain non-default values (elements are zero-indexed). - * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of - * {@code [1,3]} and {@code [2,4]} have non-default values. + * For example, {@code indices=[[1,3,1], [2,4,0]]} specifies that the elements with indexes of + * {@code [1,3,1]} and {@code [2,4,0]} have non-default values. * @param values A 1-D LongNdArray of shape {@code [N]}, which supplies the values for each - * element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code - * values=[18, 3]} specifies that element {@code [1,3]} of the sparse NdArray has a value of - * {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3}. + * element in indices. For example, given {@code indices=[[1,3,1], [2,4,0]]}, the parameter {@code + * values=[18L, 3L]} specifies that element {@code [1,3,1]} of the sparse NdArray has a value of + * {@code 18L}, and element {@code [2,4,0]} of the NdArray has a value of {@code 3L}. * @param shape the shape of the dense array represented by this sparse array. * @return the long sparse array. */ @@ -219,12 +219,12 @@ public static LongSparseNdArray sparseOf(LongNdArray indices, LongNdArray values * * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the * elements in the sparse array that contain non-default values (elements are zero-indexed). - * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of - * {@code [1,3]} and {@code [2,4]} have non-default values. + * For example, {@code indices=[[1,3,1], [2,4,0]]} specifies that the elements with indexes of + * {@code [1,3,1]} and {@code [2,4,0]} have non-default values. * @param values A 1-D LongNdArray of shape {@code [N]}, which supplies the values for each - * element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code - * values=[18, 3]} specifies that element {@code [1,3]} of the sparse NdArray has a value of - * {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3}. + * element in indices. For example, given {@code indices=[[1,3,1], [2,4,0]]}, the parameter {@code + * values=[18L, 3L]} specifies that element {@code [1,3,1]} of the sparse NdArray has a value of + * {@code 18L}, and element {@code [2,4,0]} of the NdArray has a value of {@code 3L}. * @param defaultValue Scalar value to set for indices not specified in 'indices' * @param shape the shape of the dense array represented by this sparse array. * @return the long sparse array. @@ -294,12 +294,12 @@ public static IntNdArray wrap(Shape shape, IntDataBuffer buffer) { * * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the * elements in the sparse array that contain non-default values (elements are zero-indexed). - * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of - * {@code [1,3]} and {@code [2,4]} have non-default values. + * For example, {@code indices=[[1,3,1], [2,4,0]]} specifies that the elements with indexes of + * {@code [1,3,1]} and {@code [2,4,0]} have non-default values. * @param values A 1-D IntNdArray of shape {@code [N]}, which supplies the values for each element - * in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code - * values=[18, 3]} specifies that element {@code [1,3]} of the sparse NdArray has a value of - * {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3}. + * in indices. For example, given {@code indices=[[1,3,1], [2,4,0]]}, the parameter {@code + * values=[18, 3]} specifies that element {@code [1,3,1]} of the sparse NdArray has a value of + * {@code 18}, and element {@code [2,4,0]} of the NdArray has a value of {@code 3}. * @param shape the shape of the dense array represented by this sparse array. * @return the int sparse array. */ @@ -312,12 +312,12 @@ public static IntSparseNdArray sparseOf(LongNdArray indices, IntNdArray values, * * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the * elements in the sparse array that contain non-default values (elements are zero-indexed). - * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of - * {@code [1,3]} and {@code [2,4]} have non-default values. + * For example, {@code indices=[[1,3,1], [2,4,0]]} specifies that the elements with indexes of + * {@code [1,3,1]} and {@code [2,4,0]} have non-default values. * @param values A 1-D IntNdArray of shape {@code [N]}, which supplies the values for each element - * in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code - * values=[18, 3]} specifies that element {@code [1,3]} of the sparse NdArray has a value of - * {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3}. + * in indices. For example, given {@code indices=[[1,3,1], [2,4,0]]}, the parameter {@code + * values=[18, 3]} specifies that element {@code [1,3,1]} of the sparse NdArray has a value of + * {@code 18}, and element {@code [2,4,0]} of the NdArray has a value of {@code 3}. * @param defaultValue Scalar value to set for indices not specified in 'indices' * @param shape the shape of the dense array represented by this sparse array. * @return the int sparse array. @@ -387,12 +387,12 @@ public static ShortNdArray wrap(Shape shape, ShortDataBuffer buffer) { * * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the * elements in the sparse array that contain non-default values (elements are zero-indexed). - * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of - * {@code [1,3]} and {@code [2,4]} have non-default values. + * For example, {@code indices=[[1,3,1], [2,4,0]]} specifies that the elements with indexes of + * {@code [1,3,1]} and {@code [2,4,0]} have non-default values. * @param values A 1-D ShortNdArray of shape {@code [N]}, which supplies the values for each - * element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code - * values=[18, 3]} specifies that element {@code [1,3]} of the sparse NdArray has a value of - * {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3}. + * element in indices. For example, given {@code indices=[[1,3,1], [2,4,0]]}, the parameter {@code + * values=[18, 3]} specifies that element {@code [1,3,1]} of the sparse NdArray has a value of + * {@code 18}, and element {@code [2,4,0]} of the NdArray has a value of {@code 3}. * @param shape the shape of the dense array represented by this sparse array. * @return the short sparse array. */ @@ -405,12 +405,12 @@ public static ShortSparseNdArray sparseOf(LongNdArray indices, ShortNdArray valu * * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the * elements in the sparse array that contain non-default values (elements are zero-indexed). - * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of - * {@code [1,3]} and {@code [2,4]} have non-default values. + * For example, {@code indices=[[1,3,1], [2,4,0]]} specifies that the elements with indexes of + * {@code [1,3,1]} and {@code [2,4,0]} have non-default values. * @param values A 1-D ShortNdArray of shape {@code [N]}, which supplies the values for each - * element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code - * values=[18, 3]} specifies that element {@code [1,3]} of the sparse NdArray has a value of - * {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3}. + * element in indices. For example, given {@code indices=[[1,3,1], [2,4,0]]}, the parameter {@code + * values=[18, 3]} specifies that element {@code [1,3,1]} of the sparse NdArray has a value of + * {@code 18}, and element {@code [2,4,0]} of the NdArray has a value of {@code 3}. * @param defaultValue Scalar value to set for indices not specified in 'indices' * @param shape the shape of the dense array represented by this sparse array. * @return the short sparse array. @@ -480,12 +480,12 @@ public static FloatNdArray wrap(Shape shape, FloatDataBuffer buffer) { * * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the * elements in the sparse array that contain non-default values (elements are zero-indexed). - * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of - * {@code [1,3]} and {@code [2,4]} have non-default values. + * For example, {@code indices=[[1,3,1], [2,4,0]]} specifies that the elements with indexes of + * {@code [1,3,1]} and {@code [2,4,0]} have non-default values. * @param values A 1-D FloatNdArray of shape {@code [N]}, which supplies the values for each - * element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code - * values=[18, 3.8]} specifies that element {@code [1,3]} of the sparse NdArray has a value of - * {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.8}. + * element in indices. For example, given {@code indices=[[1,3,1], [2,4,0]]}, the parameter {@code + * values=[18f, 3.8f]} specifies that element {@code [1,3,1]} of the sparse NdArray has a value of + * {@code 18f}, and element {@code [2,4,0]} of the NdArray has a value of {@code 3.8f}. * @param shape the shape of the dense array represented by this sparse array. * @return the float sparse array. */ @@ -498,12 +498,12 @@ public static FloatSparseNdArray sparseOf(LongNdArray indices, FloatNdArray valu * * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the * elements in the sparse array that contain non-default values (elements are zero-indexed). - * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of - * {@code [1,3]} and {@code [2,4]} have non-default values. + * For example, {@code indices=[[1,3,1], [2,4,0]]} specifies that the elements with indexes of + * {@code [1,3,1]} and {@code [2,4,0]} have non-default values. * @param values A 1-D FloatNdArray of shape {@code [N]}, which supplies the values for each - * element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code - * values=[18, 3.8]} specifies that element {@code [1,3]} of the sparse NdArray has a value of - * {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.8}. + * element in indices. For example, given {@code indices=[[1,3,1], [2,4,0]]}, the parameter {@code + * values=[18f, 3.8f]} specifies that element {@code [1,3,1]} of the sparse NdArray has a value of + * {@code 18f}, and element {@code [2,4,0]} of the NdArray has a value of {@code 3.8f}. * @param defaultValue Scalar value to set for indices not specified in 'indices' * @param shape the shape of the dense array represented by this sparse array. * @return the float sparse array. @@ -573,12 +573,12 @@ public static DoubleNdArray wrap(Shape shape, DoubleDataBuffer buffer) { * * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the * elements in the sparse array that contain non-default values (elements are zero-indexed). - * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of - * {@code [1,3]} and {@code [2,4]} have non-default values. + * For example, {@code indices=[[1,3,1], [2,4,0]]} specifies that the elements with indexes of + * {@code [1,3,1]} and {@code [2,4,0]} have non-default values. * @param values A 1-D DoubleNdArray of shape {@code [N]}, which supplies the values for each - * element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code - * values=[18, 3.8]} specifies that element {@code [1,3]} of the sparse NdArray has a value of - * {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.8}. + * element in indices. For example, given {@code indices=[[1,3,1], [2,4,0]]}, the parameter {@code + * values=[18, 3.8]} specifies that element {@code [1,3,1]} of the sparse NdArray has a value of + * {@code 18}, and element {@code [2,4,0]} of the NdArray has a value of {@code 3.8}. * @param shape the shape of the dense array represented by this sparse array. * @return the float sparse array. */ @@ -592,12 +592,12 @@ public static DoubleSparseNdArray sparseOf( * * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the * elements in the sparse array that contain non-default values (elements are zero-indexed). - * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of - * {@code [1,3]} and {@code [2,4]} have non-default values. + * For example, {@code indices=[[1,3,1], [2,4,0]]} specifies that the elements with indexes of + * {@code [1,3,1]} and {@code [2,4,0]} have non-default values. * @param values A 1-D DoubleNdArray of shape {@code [N]}, which supplies the values for each - * element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code - * values=[18, 3.8]} specifies that element {@code [1,3]} of the sparse NdArray has a value of - * {@code 18}, and element {@code [2,4]} of the NdArray has a value of {@code 3.8}. + * element in indices. For example, given {@code indices=[[1,3,1], [2,4,0]]}, the parameter {@code + * values=[18, 3.8]} specifies that element {@code [1,3,1]} of the sparse NdArray has a value of + * {@code 18}, and element {@code [2,4,0]} of the NdArray has a value of {@code 3.8}. * @param defaultValue Scalar value to set for indices not specified in 'indices' * @param shape the shape of the dense array represented by this sparse array. * @return the float sparse array. @@ -668,12 +668,12 @@ public static BooleanNdArray wrap(Shape shape, BooleanDataBuffer buffer) { * * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the * elements in the sparse array that contain non-default values (elements are zero-indexed). - * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of - * {@code [1,3]} and {@code [2,4]} have non-default values. + * For example, {@code indices=[[1,3,1], [2,4,0]]} specifies that the elements with indexes of + * {@code [1,3,1]} and {@code [2,4,0]} have non-default values. * @param values A 1-D BooleanNdArray of shape {@code [N]}, which supplies the values for each - * element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code - * values=[true, true]} specifies that element {@code [1,3]} of the sparse NdArray has a value - * of true, and element {@code [2,4]} of the NdArray has a value of true. All other values are + * element in indices. For example, given {@code indices=[[1,3,1], [2,4,0]]}, the parameter {@code + * values=[true, true]} specifies that element {@code [1,3,1]} of the sparse NdArray has a value + * of true, and element {@code [2,4,0]} of the NdArray has a value of true. All other values are * false. * @param shape the shape of the dense array represented by this sparse array. * @return the float sparse array. @@ -688,12 +688,12 @@ public static BooleanSparseNdArray sparseOf( * * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the * elements in the sparse array that contain non-default values (elements are zero-indexed). - * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of - * {@code [1,3]} and {@code [2,4]} have non-default values. + * For example, {@code indices=[[1,3,1], [2,4,0]]} specifies that the elements with indexes of + * {@code [1,3,1]} and {@code [2,4,0]} have non-default values. * @param values A 1-D BooleanNdArray of shape {@code [N]}, which supplies the values for each - * element in indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code - * values=[true, true]} specifies that element {@code [1,3]} of the sparse NdArray has a value - * of true, and element {@code [2,4]} of the NdArray has a value of true. All other values are + * element in indices. For example, given {@code indices=[[1,3,1], [2,4,0]]}, the parameter {@code + * values=[true, true]} specifies that element {@code [1,3,1]} of the sparse NdArray has a value + * of true, and element {@code [2,4,0]} of the NdArray has a value of true. All other values are * false. * @param defaultValue Scalar value to set for indices not specified in 'indices' * @param shape the shape of the dense array represented by this sparse array. @@ -776,12 +776,12 @@ public static NdArray wrap(Shape shape, DataBuffer buffer) { * @param type the class type represented by this sparse array. * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the * elements in the sparse array that contain non-default values (elements are zero-indexed). - * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of - * {@code [1,3]} and {@code [2,4]} have non-default values. + * For example, {@code indices=[[1,3,1], [2,4,0]]} specifies that the elements with indexes of + * {@code [1,3,1]} and {@code [2,4,0]} have non-default values. * @param values A 1-D NdArray of shape {@code [N]}, which supplies the values for each element in - * indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code - * values=["one", "two"]} specifies that element {@code [1,3]} of the sparse NdArray has a - * value of "one", and element {@code [2,4]} of the NdArray has a value of "two"". All other + * indices. For example, given {@code indices=[[1,3,1], [2,4,0]]}, the parameter {@code + * values=["one", "two"]} specifies that element {@code [1,3,1]} of the sparse NdArray has a + * value of "one", and element {@code [2,4,0]} of the NdArray has a value of "two"". All other * values are null. * @param shape the shape of the dense array represented by this sparse array. * @return the float sparse array. @@ -798,12 +798,12 @@ public static NdArray sparseOfObjects( * @param type the class type represented by this sparse array. * @param indices A 2-D LongNdArray of shape {@code [N, ndims]}, that specifies the indices of the * elements in the sparse array that contain non-default values (elements are zero-indexed). - * For example, {@code indices=[[1,3], [2,4]]} specifies that the elements with indexes of - * {@code [1,3]} and {@code [2,4]} have non-default values. + * For example, {@code indices=[[1,3,1], [2,4,0]]} specifies that the elements with indexes of + * {@code [1,3,1]} and {@code [2,4,0]} have non-default values. * @param values A 1-D NdArray of shape {@code [N]}, which supplies the values for each element in - * indices. For example, given {@code indices=[[1,3], [2,4]]}, the parameter {@code - * values=["one", "two"]} specifies that element {@code [1,3]} of the sparse NdArray has a - * value of "one", and element {@code [2,4]} of the NdArray has a value of "two"". All other + * indices. For example, given {@code indices=[[1,3,1], [2,4,0]]}, the parameter {@code + * values=["one", "two"]} specifies that element {@code [1,3,1]} of the sparse NdArray has a + * value of "one", and element {@code [2,4,0]} of the NdArray has a value of "two"". All other * values are null. * @param defaultValue Scalar value to set for indices not specified in 'indices' * @param shape the shape of the dense array represented by this sparse array. From 7ac4abbe6b7b347f33ab5e3fa2d559ef81f6043a Mon Sep 17 00:00:00 2001 From: Karl Lessard Date: Tue, 15 Feb 2022 22:48:37 -0500 Subject: [PATCH 09/60] Build on JDK11 by default (#7) --- ndarray/pom.xml | 19 +++++++- ndarray/src/main/java/module-info.java | 37 +++++++++++++++ .../impl/buffer/raw/UnsafeReference.java | 46 +++++++++++-------- 3 files changed, 82 insertions(+), 20 deletions(-) create mode 100644 ndarray/src/main/java/module-info.java diff --git a/ndarray/pom.xml b/ndarray/pom.xml index 3a8ba7189f4..f34150c7908 100644 --- a/ndarray/pom.xml +++ b/ndarray/pom.xml @@ -75,16 +75,31 @@ org.apache.maven.plugins maven-surefire-plugin - 2.22.2 + 3.0.0-M5 1 false - -Xmx2G -XX:MaxPermSize=256m + -Xmx2G **/*Test.java + false + + org.apache.maven.plugins + maven-compiler-plugin + + + default-testCompile + + + --add-modules=java.desktop + + + + + diff --git a/ndarray/src/main/java/module-info.java b/ndarray/src/main/java/module-info.java new file mode 100644 index 00000000000..d8a899f745f --- /dev/null +++ b/ndarray/src/main/java/module-info.java @@ -0,0 +1,37 @@ +/* + Copyright 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +module org.tensorflow.ndarray { + exports org.tensorflow.ndarray; + exports org.tensorflow.ndarray.buffer; + exports org.tensorflow.ndarray.buffer.layout; + exports org.tensorflow.ndarray.index; + + // Expose all implementions of our interfaces, so consumers can write custom + // implementations easily by extending from them + exports org.tensorflow.ndarray.impl.buffer.adapter; + exports org.tensorflow.ndarray.impl.buffer.layout; + exports org.tensorflow.ndarray.impl.buffer.misc; + exports org.tensorflow.ndarray.impl.buffer.nio; + exports org.tensorflow.ndarray.impl.buffer.raw; + exports org.tensorflow.ndarray.impl.dense; + exports org.tensorflow.ndarray.impl.dimension; + exports org.tensorflow.ndarray.impl.sequence; + exports org.tensorflow.ndarray.impl.sparse; + exports org.tensorflow.ndarray.impl.sparse.slice; + + requires jdk.unsupported; // required by raw buffer implementations using Unsafe +} diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/UnsafeReference.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/UnsafeReference.java index 7b95eac7349..a8cc16d94d2 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/UnsafeReference.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/UnsafeReference.java @@ -36,24 +36,24 @@ static boolean isAvailable() { theUnsafe.setAccessible(true); Object instance = theUnsafe.get(null); if (instance.getClass() == clazz) { - // Validate that this Unsafe instance exposes all methods we need - clazz.getDeclaredMethod("getByte", Object.class, long.class); - clazz.getDeclaredMethod("putByte", Object.class, long.class, byte.class); - clazz.getDeclaredMethod("getShort", Object.class, long.class); - clazz.getDeclaredMethod("putShort", Object.class, long.class, short.class); - clazz.getDeclaredMethod("getInt", Object.class, long.class); - clazz.getDeclaredMethod("putInt", Object.class, long.class, int.class); - clazz.getDeclaredMethod("getLong", Object.class, long.class); - clazz.getDeclaredMethod("putLong", Object.class, long.class, long.class); - clazz.getDeclaredMethod("getFloat", Object.class, long.class); - clazz.getDeclaredMethod("putFloat", Object.class, long.class, float.class); - clazz.getDeclaredMethod("getDouble", Object.class, long.class); - clazz.getDeclaredMethod("putDouble", Object.class, long.class, double.class); - clazz.getDeclaredMethod("getBoolean", Object.class, long.class); - clazz.getDeclaredMethod("putBoolean", Object.class, long.class, boolean.class); - clazz.getDeclaredMethod("copyMemory", Object.class, long.class, Object.class, long.class, long.class); - clazz.getDeclaredMethod("arrayBaseOffset", Class.class); - clazz.getDeclaredMethod("arrayIndexScale", Class.class); + checkMethod(clazz, "getByte", Object.class, long.class); + checkMethod(clazz, "putByte", Object.class, long.class, byte.class); + checkMethod(clazz, "getShort", Object.class, long.class); + checkMethod(clazz, "putShort", Object.class, long.class, short.class); + checkMethod(clazz, "getInt", Object.class, long.class); + checkMethod(clazz, "putInt", Object.class, long.class, int.class); + checkMethod(clazz, "getLong", Object.class, long.class); + checkMethod(clazz, "putLong", Object.class, long.class, long.class); + checkMethod(clazz, "getFloat", Object.class, long.class); + checkMethod(clazz, "putFloat", Object.class, long.class, float.class); + checkMethod(clazz, "getDouble", Object.class, long.class); + checkMethod(clazz, "putDouble", Object.class, long.class, double.class); + checkMethod(clazz, "getBoolean", Object.class, long.class); + checkMethod(clazz, "putBoolean", Object.class, long.class, boolean.class); + checkMethod(clazz, "copyMemory", Object.class, long.class, Object.class, long.class, long.class); + checkMethod(clazz, "arrayBaseOffset", Class.class); + checkMethod(clazz, "arrayIndexScale", Class.class); + unsafe = (Unsafe) instance; } } catch (ClassNotFoundException | NoSuchMethodException | NoSuchFieldException | SecurityException | IllegalAccessException | ClassCastException ex) { @@ -61,4 +61,14 @@ static boolean isAvailable() { } UNSAFE = unsafe; } + + /** + * Validate that this Unsafe instance exposes this method + * + * ErrorProne does not like that we do nothing with the returned method... but there is nothing to do with it, so disable the check + */ + @SuppressWarnings("ReturnValueIgnored") + private static void checkMethod(Class unsafeClass, String methodName, Class... parameterTypes) throws NoSuchMethodException { + unsafeClass.getDeclaredMethod(methodName, parameterTypes); + } } From a40b7acbc5c2b40da26cb0cce9e9ab4fd1efc1e6 Mon Sep 17 00:00:00 2001 From: Karl Lessard Date: Tue, 15 Feb 2022 23:08:23 -0500 Subject: [PATCH 10/60] Add missing export --- ndarray/src/main/java/module-info.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ndarray/src/main/java/module-info.java b/ndarray/src/main/java/module-info.java index d8a899f745f..6b33ed65ba8 100644 --- a/ndarray/src/main/java/module-info.java +++ b/ndarray/src/main/java/module-info.java @@ -15,6 +15,8 @@ ======================================================================= */ module org.tensorflow.ndarray { + requires jdk.unsupported; // required by raw buffer implementations using Unsafe + exports org.tensorflow.ndarray; exports org.tensorflow.ndarray.buffer; exports org.tensorflow.ndarray.buffer.layout; @@ -22,6 +24,7 @@ // Expose all implementions of our interfaces, so consumers can write custom // implementations easily by extending from them + exports org.tensorflow.ndarray.impl.buffer; exports org.tensorflow.ndarray.impl.buffer.adapter; exports org.tensorflow.ndarray.impl.buffer.layout; exports org.tensorflow.ndarray.impl.buffer.misc; @@ -32,6 +35,4 @@ exports org.tensorflow.ndarray.impl.sequence; exports org.tensorflow.ndarray.impl.sparse; exports org.tensorflow.ndarray.impl.sparse.slice; - - requires jdk.unsupported; // required by raw buffer implementations using Unsafe } From 9cec7510c05f691bca603278f79719cb824dd12d Mon Sep 17 00:00:00 2001 From: Adam Pocock Date: Wed, 16 Mar 2022 21:18:22 -0400 Subject: [PATCH 11/60] Adding toString to AbstractDenseNdArray and AbstractSparseNdArray (#8) --- .../impl/dense/AbstractDenseNdArray.java | 9 ++++++++ .../impl/sparse/AbstractSparseNdArray.java | 20 ++++++++++++++++++ .../ndarray/impl/sparse/SparseNdArray.java | 21 +++++++++++++++++++ .../impl/dense/BooleanDenseNdArrayTest.java | 10 +++++++++ .../impl/dense/DoubleDenseNdArrayTest.java | 12 +++++++++++ .../impl/sparse/DoubleSparseNdArrayTest.java | 12 +++++++++++ .../impl/sparse/StringSparseNdArrayTest.java | 11 ++++++++++ 7 files changed, 95 insertions(+) diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/AbstractDenseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/AbstractDenseNdArray.java index 0497095116e..30af952815b 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/AbstractDenseNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/AbstractDenseNdArray.java @@ -132,6 +132,15 @@ public boolean equals(Object obj) { return buffer().equals(other.buffer()); } + /** + * A String showing the type and shape of this dense ndarray. + * @return A string containing the type and shape. + */ + @Override + public String toString() { + return this.getClass().getSimpleName() + "(shape=" + this.shape() + ")"; + } + protected AbstractDenseNdArray(DimensionalSpace dimensions) { super(dimensions); } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/AbstractSparseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/AbstractSparseNdArray.java index daffad90256..8e3892db6f9 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/AbstractSparseNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/AbstractSparseNdArray.java @@ -402,6 +402,26 @@ public boolean equals(Object obj) { return values.equals(other.values); } + /** + * A String showing the type, default value, number of elements and + * the dense shape of this sparse ndarray. + * @return A string containing the type, default value, number of elements and shape. + */ + @Override + public String toString() { + long numElements = values == null ? 0 : values.size(); + String strDefault; + if (defaultValue == null) { + strDefault = ""; + } else if (defaultValue instanceof Number) { + strDefault = defaultValue.toString(); + } else { + strDefault = "'" + defaultValue + "'"; + } + return this.getClass().getSimpleName() + "(defaultValue=" + strDefault + + ", numElements=" + numElements + ", shape=" + this.shape() + ")"; + } + /** * Performs a binary search on the indices array to locate the index of the specified coordinates. * The indices array must be sorted by coordinates, row major. diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/SparseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/SparseNdArray.java index bdf3d517d29..52b3867c8f7 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/SparseNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/SparseNdArray.java @@ -394,4 +394,25 @@ public NdArray fromDense(NdArray src) { public Class getType() { return type; } + + /** + * A String showing the type, default value, number of elements and + * the dense shape of this sparse ndarray. + * @return A string containing the type, default value, number of elements and shape. + */ + @Override + public String toString() { + long numElements = getValues() == null ? 0 : getValues().size(); + String strDefault; + T defaultVal = getDefaultValue(); + if (defaultVal == null) { + strDefault = ""; + } else if (defaultVal instanceof Number) { + strDefault = defaultVal.toString(); + } else { + strDefault = "'" + defaultVal + "'"; + } + return this.getClass().getSimpleName() + "(type="+type.getSimpleName()+", defaultValue=" + strDefault + + ", numElements=" + numElements + ", shape=" + this.shape() + ")"; + } } diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/BooleanDenseNdArrayTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/BooleanDenseNdArrayTest.java index 36540104eb7..d47766826e6 100644 --- a/ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/BooleanDenseNdArrayTest.java +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/BooleanDenseNdArrayTest.java @@ -16,6 +16,8 @@ */ package org.tensorflow.ndarray.impl.dense; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; import org.tensorflow.ndarray.Shape; import org.tensorflow.ndarray.buffer.DataBuffer; import org.tensorflow.ndarray.buffer.DataBuffers; @@ -32,4 +34,12 @@ public class BooleanDenseNdArrayTest extends BooleanNdArrayTestBase { @Override protected DataBuffer allocateBuffer(long size) { return DataBuffers.ofBooleans(size); } + + @Test + public void testToString() { + BooleanNdArray matrix3d = allocate(Shape.of(5, 4, 5)); + Assertions.assertEquals("BooleanDenseNdArray(shape=[5, 4, 5])",matrix3d.toString()); + BooleanNdArray scalar = allocate(Shape.of()); + Assertions.assertEquals("BooleanDenseNdArray(shape=[])",scalar.toString()); + } } diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/DoubleDenseNdArrayTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/DoubleDenseNdArrayTest.java index 9810a744c50..279c7b8da59 100644 --- a/ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/DoubleDenseNdArrayTest.java +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/DoubleDenseNdArrayTest.java @@ -16,6 +16,8 @@ */ package org.tensorflow.ndarray.impl.dense; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; import org.tensorflow.ndarray.Shape; import org.tensorflow.ndarray.buffer.DataBuffer; import org.tensorflow.ndarray.buffer.DataBuffers; @@ -32,4 +34,14 @@ public class DoubleDenseNdArrayTest extends DoubleNdArrayTestBase { @Override protected DataBuffer allocateBuffer(long size) { return DataBuffers.ofDoubles(size); } + + @Test + public void testToString() { + DoubleNdArray matrix3d = allocate(Shape.of(5, 4, 5)); + Assertions.assertEquals("DoubleDenseNdArray(shape=[5, 4, 5])",matrix3d.toString()); + DoubleNdArray vector = allocate(Shape.of(5)); + Assertions.assertEquals("DoubleDenseNdArray(shape=[5])",vector.toString()); + DoubleNdArray scalar = allocate(Shape.of()); + Assertions.assertEquals("DoubleDenseNdArray(shape=[])",scalar.toString()); + } } diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArrayTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArrayTest.java index 437c9dc2904..616863ebe4d 100644 --- a/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArrayTest.java +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArrayTest.java @@ -1,5 +1,6 @@ package org.tensorflow.ndarray.impl.sparse; +import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.tensorflow.ndarray.DoubleNdArray; import org.tensorflow.ndarray.LongNdArray; @@ -302,4 +303,15 @@ public void testSlice() { .forEachIndexed( (lidx, f) -> assertEquals(expected[i.getAndIncrement()], f.getDouble()))); } + + @Test + public void testToString() { + DoubleNdArray ndArray = StdArrays.ndCopyOf(dense2DArray); + DoubleSparseNdArray instance = + DoubleSparseNdArray.create(DimensionalSpace.create(ndArray.shape())); + instance.fromDense(ndArray); + Assertions.assertEquals("DoubleSparseNdArray(defaultValue=0.0, numElements=2, shape=[3, 4])",instance.toString()); + DoubleSparseNdArray empty = DoubleSparseNdArray.create(DimensionalSpace.create(Shape.of(5))); + Assertions.assertEquals("DoubleSparseNdArray(defaultValue=0.0, numElements=0, shape=[5])",empty.toString()); + } } diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/StringSparseNdArrayTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/StringSparseNdArrayTest.java index 40d65971abd..152a13e5f5a 100644 --- a/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/StringSparseNdArrayTest.java +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/StringSparseNdArrayTest.java @@ -14,6 +14,7 @@ =======================================================================*/ package org.tensorflow.ndarray.impl.sparse; +import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.tensorflow.ndarray.LongNdArray; import org.tensorflow.ndarray.NdArray; @@ -338,4 +339,14 @@ public void testNullDefault() { assertNotNull(dArray.getObject()); assertEquals("a default", dArray.getObject()); } + + @Test + public void testToString() { + SparseNdArray> instance = + new SparseNdArray<>(String.class, indices, values, DimensionalSpace.create(shape)); + Assertions.assertEquals("SparseNdArray(type=String, defaultValue=, numElements=2, shape=[3, 4])",instance.toString()); + instance = new SparseNdArray<>( + String.class, indices, values, "a default", DimensionalSpace.create(shape)); + Assertions.assertEquals("SparseNdArray(type=String, defaultValue='a default', numElements=2, shape=[3, 4])",instance.toString()); + } } From 9b3f8a0613538c4ba15118d1b62659f2f1e816e1 Mon Sep 17 00:00:00 2001 From: hmf Date: Mon, 21 Nov 2022 17:27:22 +0000 Subject: [PATCH 12/60] Test Java copyFrom Ok --- ndarray/src/main/java/module-info.java | 1 + .../org/tensorflow/ndarray/IndexTest.java | 117 ++++++++++++++++++ 2 files changed, 118 insertions(+) diff --git a/ndarray/src/main/java/module-info.java b/ndarray/src/main/java/module-info.java index 6b33ed65ba8..bc09f1164d6 100644 --- a/ndarray/src/main/java/module-info.java +++ b/ndarray/src/main/java/module-info.java @@ -16,6 +16,7 @@ */ module org.tensorflow.ndarray { requires jdk.unsupported; // required by raw buffer implementations using Unsafe + requires java.desktop; // required for java.awt.* exports org.tensorflow.ndarray; exports org.tensorflow.ndarray.buffer; diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/IndexTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/IndexTest.java index 6f92dab9b99..00bec9483a8 100644 --- a/ndarray/src/test/java/org/tensorflow/ndarray/IndexTest.java +++ b/ndarray/src/test/java/org/tensorflow/ndarray/IndexTest.java @@ -18,6 +18,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; import org.junit.jupiter.api.Test; import org.tensorflow.ndarray.index.Indices; @@ -43,6 +44,122 @@ public void testNullConversions(){ assertTrue(Indices.slice(null, null).endMask(), "Passed null for slice end but didn't set end mask"); } + + @Test + public void testIndices(){ + + String[][] indexData = new String[5][4]; + for (int i=0 ; i < 5; i++) + for (int j=0 ; j < 4; j++) + indexData[i][j] = "("+j+", "+i+")"; + + NdArray matrix2d = StdArrays.ndCopyOf(indexData); + assertEquals(2, matrix2d.rank()); + + /* + |(0, 0), (1, 0), (2, 0), (3, 0)| + |(0, 1), (1, 1), (2, 1), (3, 1)| + |(0, 2), (1, 2), (2, 2), (3, 2)| + |(0, 3), (1, 3), (2, 3), (3, 3)| + |(0, 4), (1, 4), (2, 4), (3, 4)| + */ + + NdArray same1 = matrix2d.slice(Indices.all()); + String[][] same1j = StdArrays.array2dCopyOf(same1, String.class); + assertEquals(2, same1.rank()); + assertEquals(same1, matrix2d); + + NdArray same2 = matrix2d.slice(Indices.ellipsis()); + String[][] same2j = StdArrays.array2dCopyOf(same2, String.class); + assertEquals(2, same2.rank()); + assertEquals(matrix2d, same2); + + // All rows, column 1 + NdArray same3 = matrix2d.slice(Indices.all(), Indices.at(1)); + assertEquals(1, same3.rank()); + String[] same3j = StdArrays.array1dCopyOf(same3, String.class); + assertArrayEquals(new String[] { "(1, 0)", "(1, 1)", "(1, 2)", "(1, 3)", "(1, 4)" }, same3j); + + // row 2, all columns + NdArray same4 = matrix2d.slice(Indices.at(2), Indices.all()); + assertEquals(1, same4.rank()); + String[] same4j = StdArrays.array1dCopyOf(same4, String.class); + assertArrayEquals(new String[] {"(0, 2)", "(1, 2)", "(2, 2)", "(3, 2)"}, same4j); + assertEquals(NdArrays.vectorOfObjects("(0, 2)", "(1, 2)", "(2, 2)", "(3, 2)"), same4); + + // row 2, column 1 + NdArray same5 = matrix2d.slice(Indices.at(2), Indices.at(1)); + assertEquals(0, same5.rank()); + assertTrue(same5.shape().isScalar()); + // Don't use an index + String same5j = same5.getObject(); + assertEquals("(1, 2)", same5j); + + // rows 1 to 2, all columns + NdArray same6 = matrix2d.slice(Indices.slice(1,3)); + assertEquals(2, same6.rank()); + String[][] same6j = StdArrays.array2dCopyOf(same6, String.class); + assertArrayEquals( + new String[][] + { + {"(0, 1)", "(1, 1)", "(2, 1)", "(3, 1)"}, + {"(0, 2)", "(1, 2)", "(2, 2)", "(3, 2)"} + }, + same6j + ); + + // Exception in thread "main" java.nio.BufferOverflowException + // all rows, columns 1 to 2 + NdArray same7 = matrix2d.slice(Indices.all(), Indices.slice(1,3)); + assertEquals(2, same7.rank()); + assertEquals(Shape.of(5,2), same7.shape()); + assertEquals(10, same7.size()); + NdArray r7_0 = same7.get(0); + NdArray r7_1 = same7.get(1); + NdArray r7_2 = same7.get(2); + NdArray r7_3 = same7.get(3); + NdArray r7_4 = same7.get(4); + assertEquals(1, r7_0.rank()); + assertEquals(Shape.of(2), r7_0.shape()); + assertEquals(2, r7_0.size()); + // TODO: I get a (0,0) which is not what I expected + System.out.println(r7_0.getObject()); + //assertEquals("(1,0)", r7_0.getObject()); + assertEquals( "(1, 0)", r7_0.getObject(0)); + assertEquals( "(2, 0)", r7_0.getObject(1)); + assertEquals( "(1, 1)", r7_1.getObject(0)); + assertEquals( "(2, 1)", r7_1.getObject(1)); + assertEquals( "(1, 2)", r7_2.getObject(0)); + assertEquals( "(2, 2)", r7_2.getObject(1)); + assertEquals( "(1, 3)", r7_3.getObject(0)); + assertEquals( "(2, 3)", r7_3.getObject(1)); + assertEquals( "(1, 4)", r7_4.getObject(0)); + assertEquals( "(2, 4)", r7_4.getObject(1)); + String[][] expectedr7 = new String[][] + { + {"(1, 0)", "(2, 0)"}, + {"(1, 1)", "(2, 1)"}, + {"(1, 2)", "(2, 2)"}, + {"(1, 3)", "(2, 3)"}, + {"(1, 4)", "(2, 4)"} + }; + //String[][] lArray = new String[5][2]; + String[][] lArray = new String[5][]; + lArray[0] = new String[2]; + lArray[1] = new String[2]; + lArray[2] = new String[2]; + lArray[3] = new String[2]; + lArray[4] = new String[2]; + StdArrays.copyFrom(same7, lArray); + assertArrayEquals( expectedr7, lArray); + String[][] same7j = StdArrays.array2dCopyOf(same7, String.class); + assertArrayEquals( expectedr7, same7j); + +/* +*/ + + assertEquals(0, 0); + } @Test public void testNewaxis(){ From 4c9d60604eb41e6abf9955db09a484c173a34adf Mon Sep 17 00:00:00 2001 From: hmf Date: Mon, 21 Nov 2022 19:08:08 +0000 Subject: [PATCH 13/60] Test Java copyFrom - trying to replicate Scala error --- .../java/org/tensorflow/ndarray/IndexTest.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/IndexTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/IndexTest.java index 00bec9483a8..a1d7ef1e2aa 100644 --- a/ndarray/src/test/java/org/tensorflow/ndarray/IndexTest.java +++ b/ndarray/src/test/java/org/tensorflow/ndarray/IndexTest.java @@ -143,13 +143,13 @@ public void testIndices(){ {"(1, 3)", "(2, 3)"}, {"(1, 4)", "(2, 4)"} }; - //String[][] lArray = new String[5][2]; - String[][] lArray = new String[5][]; - lArray[0] = new String[2]; - lArray[1] = new String[2]; - lArray[2] = new String[2]; - lArray[3] = new String[2]; - lArray[4] = new String[2]; + String[][] lArray = new String[5][2]; + // String[][] lArray = new String[5][]; + // lArray[0] = new String[2]; + // lArray[1] = new String[2]; + // lArray[2] = new String[2]; + // lArray[3] = new String[2]; + // lArray[4] = new String[2]; StdArrays.copyFrom(same7, lArray); assertArrayEquals( expectedr7, lArray); String[][] same7j = StdArrays.array2dCopyOf(same7, String.class); From 17da0e0d799b7ecb00280de19c4dabb273f87040 Mon Sep 17 00:00:00 2001 From: hmf Date: Tue, 22 Nov 2022 08:14:56 +0000 Subject: [PATCH 14/60] Test Java copyFrom - trying to replicate Scala error v2 --- .../src/test/java/org/tensorflow/ndarray/IndexTest.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/IndexTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/IndexTest.java index a1d7ef1e2aa..db44f56ae07 100644 --- a/ndarray/src/test/java/org/tensorflow/ndarray/IndexTest.java +++ b/ndarray/src/test/java/org/tensorflow/ndarray/IndexTest.java @@ -48,10 +48,13 @@ public void testNullConversions(){ @Test public void testIndices(){ - String[][] indexData = new String[5][4]; - for (int i=0 ; i < 5; i++) + // String[][] indexData = new String[5][4]; + String[][] indexData = new String[5][]; + for (int i=0 ; i < 5; i++){ + indexData[i] = new String[4]; for (int j=0 ; j < 4; j++) indexData[i][j] = "("+j+", "+i+")"; + } NdArray matrix2d = StdArrays.ndCopyOf(indexData); assertEquals(2, matrix2d.rank()); @@ -63,6 +66,7 @@ public void testIndices(){ |(0, 3), (1, 3), (2, 3), (3, 3)| |(0, 4), (1, 4), (2, 4), (3, 4)| */ + assertArrayEquals(new String[]{"(0, 0)", "(1, 0)", "(2, 0)", "(3, 0)"}, indexData[0]); NdArray same1 = matrix2d.slice(Indices.all()); String[][] same1j = StdArrays.array2dCopyOf(same1, String.class); From 14e09bb51ca8498bd0ffeaea02ef5d0fda8dd9bd Mon Sep 17 00:00:00 2001 From: hmf Date: Sat, 26 Nov 2022 12:52:03 +0000 Subject: [PATCH 15/60] Added basic index tests (rank 2) --- .../org/tensorflow/ndarray/IndexTest.java | 273 +++++++++++++++++- 1 file changed, 259 insertions(+), 14 deletions(-) diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/IndexTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/IndexTest.java index db44f56ae07..10c08064a82 100644 --- a/ndarray/src/test/java/org/tensorflow/ndarray/IndexTest.java +++ b/ndarray/src/test/java/org/tensorflow/ndarray/IndexTest.java @@ -48,10 +48,8 @@ public void testNullConversions(){ @Test public void testIndices(){ - // String[][] indexData = new String[5][4]; - String[][] indexData = new String[5][]; + String[][] indexData = new String[5][4]; for (int i=0 ; i < 5; i++){ - indexData[i] = new String[4]; for (int j=0 ; j < 4; j++) indexData[i][j] = "("+j+", "+i+")"; } @@ -72,11 +70,13 @@ public void testIndices(){ String[][] same1j = StdArrays.array2dCopyOf(same1, String.class); assertEquals(2, same1.rank()); assertEquals(same1, matrix2d); + assertEquals(matrix2d, StdArrays.ndCopyOf(same1j)); NdArray same2 = matrix2d.slice(Indices.ellipsis()); String[][] same2j = StdArrays.array2dCopyOf(same2, String.class); assertEquals(2, same2.rank()); assertEquals(matrix2d, same2); + assertEquals(matrix2d, StdArrays.ndCopyOf(same2j)); // All rows, column 1 NdArray same3 = matrix2d.slice(Indices.all(), Indices.at(1)); @@ -127,8 +127,8 @@ public void testIndices(){ assertEquals(Shape.of(2), r7_0.shape()); assertEquals(2, r7_0.size()); // TODO: I get a (0,0) which is not what I expected - System.out.println(r7_0.getObject()); - //assertEquals("(1,0)", r7_0.getObject()); + // System.out.println(r7_0.getObject()); + // assertEquals("(1,0)", r7_0.getObject()); assertEquals( "(1, 0)", r7_0.getObject(0)); assertEquals( "(2, 0)", r7_0.getObject(1)); assertEquals( "(1, 1)", r7_1.getObject(0)); @@ -148,21 +148,266 @@ public void testIndices(){ {"(1, 4)", "(2, 4)"} }; String[][] lArray = new String[5][2]; - // String[][] lArray = new String[5][]; - // lArray[0] = new String[2]; - // lArray[1] = new String[2]; - // lArray[2] = new String[2]; - // lArray[3] = new String[2]; - // lArray[4] = new String[2]; StdArrays.copyFrom(same7, lArray); assertArrayEquals( expectedr7, lArray); String[][] same7j = StdArrays.array2dCopyOf(same7, String.class); assertArrayEquals( expectedr7, same7j); -/* -*/ + + // rows 1 to 2, columns 1 to 2 + NdArray same8 = matrix2d.slice(Indices.slice(1,3), Indices.slice(1,3)); + assertEquals(2, same8.rank()); + assertEquals(Shape.of(2,2), same8.shape()); + assertEquals(4, same8.size()); + String[][] same8j = StdArrays.array2dCopyOf(same8, String.class); + // print2D(same8j) + String[][] expected_r8 = new String[][] + { + {"(1, 1)", "(2, 1)"}, + {"(1, 2)", "(2, 2)"} + }; + assertArrayEquals(expected_r8, same8j); + NdArray r8_0 = same8.get(0); + NdArray r8_1 = same8.get(1); + assertEquals(1, r8_0.rank()); + assertEquals(Shape.of(2), r8_0.shape()); + assertEquals(2, r8_0.size()); + assertEquals("(1, 1)", r8_0.getObject(0)); + assertEquals("(2, 1)", r8_0.getObject(1)); + assertEquals("(1, 2)", r8_1.getObject(0)); + assertEquals("(2, 2)", r8_1.getObject(1)); + + // rows 1 to 2, columns 1 to 2 + NdArray same9 = matrix2d.slice(Indices.range(1,3), Indices.range(1,3)); + assertEquals(2, same9.rank()); + assertEquals(Shape.of(2,2), same9.shape()); + assertEquals(4, same9.size()); + String[][] same9j = StdArrays.array2dCopyOf(same9, String.class); + String[][] expected_r9 = new String[][] + { + {"(1, 1)", "(2, 1)"}, + {"(1, 2)", "(2, 2)"} + }; + assertArrayEquals(expected_r9, same9j); + NdArray r9_0 = same9.get(0); + NdArray r9_1 = same9.get(1); + assertEquals(1, r9_0.rank()); + assertEquals(Shape.of(2), r9_0.shape()); + assertEquals(2, r9_0.size()); + assertEquals("(1, 1)", r9_0.getObject(0)); + assertEquals("(2, 1)", r9_0.getObject(1)); + assertEquals("(1, 2)", r9_1.getObject(0)); + assertEquals("(2, 2)", r9_1.getObject(1)); + + // rows 1, 3 and 4, columns 0 to 2 + NdArray same10 = matrix2d.slice(Indices.odd(), Indices.even()); + String[][] same10j = StdArrays.array2dCopyOf(same10, String.class); + assertEquals(2, same10.rank()); + assertEquals(Shape.of(2,2), same10.shape()); + assertEquals(4, same10.size()); + String[][] expected_r10 = new String[][] + { + {"(0, 1)", "(2, 1)"}, + {"(0, 3)", "(2, 3)"} + }; + assertArrayEquals(expected_r10, same10j); + NdArray r10_0 = same10.get(0); + NdArray r10_1 = same10.get(1); + assertEquals(1, r10_0.rank()); + assertEquals(Shape.of(2), r10_0.shape()); + assertEquals(2, r10_0.size()); + assertEquals("(0, 1)", r10_0.getObject(0)); + assertEquals("(2, 1)", r10_0.getObject(1)); + assertEquals("(0, 3)", r10_1.getObject(0)); + assertEquals("(2, 3)", r10_1.getObject(1)); + + // rows 3 and 4, columns 0 and 1. Second value is stride + NdArray same11 = matrix2d.slice(Indices.sliceFrom(3,1), Indices.sliceFrom(2,1)); + String[][] same11j = StdArrays.array2dCopyOf(same11, String.class); + assertEquals(2, same11.rank()); + assertEquals(Shape.of(2,2), same11.shape()); + assertEquals(4, same11.size()); + String[][] expected_r11 = new String[][] + { + {"(2, 3)", "(3, 3)"}, + {"(2, 4)", "(3, 4)"} + }; + assertArrayEquals(expected_r11, same11j); + NdArray r11_0 = same11.get(0); + NdArray r11_1 = same11.get(1); + assertEquals(1, r11_0.rank()); + assertEquals(Shape.of(2), r11_0.shape()); + assertEquals(2, r11_0.size()); + assertEquals("(2, 3)", r11_0.getObject(0)); + assertEquals("(3, 3)", r11_0.getObject(1)); + assertEquals("(2, 4)", r11_1.getObject(0)); + assertEquals("(3, 4)", r11_1.getObject(1)); + + + // rows 0 and 2, columns 0 and 1. Second value is stride. Index non inclusive + NdArray same12 = matrix2d.slice(Indices.sliceTo(3,2), Indices.sliceTo(2,1)); + String[][] same12j = StdArrays.array2dCopyOf(same12, String.class); + assertEquals(2, same12.rank()); + assertEquals(Shape.of(2,2), same12.shape()); + assertEquals(4, same12.size()); + String[][] expected_r12 = new String[][] + { + {"(0, 0)", "(1, 0)"}, + {"(0, 2)", "(1, 2)"} + }; + assertArrayEquals(expected_r12, same12j); + NdArray r12_0 = same12.get(0); + NdArray r12_1 = same12.get(1); + assertEquals(1, r12_0.rank()); + assertEquals(Shape.of(2), r12_0.shape()); + assertEquals(2, r12_0.size()); + assertEquals("(0, 0)", r12_0.getObject(0)); + assertEquals("(1, 0)", r12_0.getObject(1)); + assertEquals("(0, 2)", r12_1.getObject(0)); + assertEquals("(1, 2)", r12_1.getObject(1)); + + // rows 0 and 2, columns 0 and 1. Second value is stride. Index non inclusive + NdArray same13 = matrix2d.slice(Indices.step(2), Indices.step(2)); + String[][] same13j = StdArrays.array2dCopyOf(same13, String.class); + assertEquals(2, same13.rank()); + assertEquals(Shape.of(3,2), same13.shape()); + assertEquals(6, same13.size()); + String[][] expected_r13 = new String[][] + { + {"(0, 0)", "(2, 0)"}, + {"(0, 2)", "(2, 2)"}, + {"(0, 4)", "(2, 4)"} + }; + assertArrayEquals(expected_r13, same13j); + NdArray r13_0 = same13.get(0); + NdArray r13_1 = same13.get(1); + NdArray r13_2 = same13.get(2); + assertEquals(1, r13_0.rank()); + assertEquals(Shape.of(2), r13_0.shape()); + assertEquals(2, r13_0.size()); + assertEquals("(0, 0)", r13_0.getObject(0)); + assertEquals("(2, 0)", r13_0.getObject(1)); + assertEquals("(0, 2)", r13_1.getObject(0)); + assertEquals("(2, 2)", r13_1.getObject(1)); + assertEquals("(0, 4)", r13_2.getObject(0)); + assertEquals("(2, 4)", r13_2.getObject(1)); + + + NdArray same14 = same13.slice(Indices.flip(), Indices.flip()); + String[][] same14j = StdArrays.array2dCopyOf(same14, String.class); + assertEquals(2, same14.rank()); + assertEquals(Shape.of(3,2), same14.shape()); + assertEquals(6, same14.size()); + String[][] expected_r14 = new String[][] + { + {"(2, 4)", "(0, 4)"}, + {"(2, 2)", "(0, 2)"}, + {"(2, 0)", "(0, 0)"} + }; + assertArrayEquals(same14j, expected_r14); + NdArray r14_0 = same14.get(0); + NdArray r14_1 = same14.get(1); + NdArray r14_2 = same14.get(2); + assertEquals(1, r14_0.rank()); + assertEquals(Shape.of(2), r14_0.shape()); + assertEquals(2, r14_0.size()); + assertEquals("(0, 0)", r14_2.getObject(1)); + assertEquals("(2, 0)", r14_2.getObject(0)); + assertEquals("(0, 2)", r14_1.getObject(1)); + assertEquals("(2, 2)", r14_1.getObject(0)); + assertEquals("(0, 4)", r14_0.getObject(1)); + assertEquals("(2, 4)", r14_0.getObject(0)); + + + NdArray same15 = matrix2d.slice(Indices.slice(4,0,-2), Indices.slice(3L,null,-2)); + String[][] same15j = StdArrays.array2dCopyOf(same15, String.class); + assertEquals(2, same15.rank()); + assertEquals(Shape.of(2,2), same15.shape()); + assertEquals(4,same15.size()); + String[][] expected_r15 = new String[][] + { + {"(3, 4)", "(1, 4)"}, + {"(3, 2)", "(1, 2)"}, + }; + assertArrayEquals(expected_r15, same15j); + NdArray r15_0 = same15.get(0); + NdArray r15_1 = same15.get(1); + assertEquals(1, r15_0.rank()); + assertEquals(Shape.of(2), r15_0.shape()); + assertEquals(2, r15_0.size()); + assertEquals("(3, 4)", r15_0.getObject(0)); + assertEquals("(1, 4)", r15_0.getObject(1)); + assertEquals("(3, 2)", r15_1.getObject(0)); + assertEquals("(1, 2)", r15_1.getObject(1)); + + NdArray same16 = matrix2d.slice(Indices.seq(4,2), Indices.seq(3,1)); + String[][] same16j = StdArrays.array2dCopyOf(same16, String.class); + assertEquals(2, same16.rank()); + assertEquals(Shape.of(2,2), same16.shape()); + assertEquals(4, same16.size()); + String[][] expected_r16 = new String[][] + { + {"(3, 4)", "(1, 4)"}, + {"(3, 2)", "(1, 2)"} + }; + assertArrayEquals(expected_r16, same16j); + NdArray r16_0 = same16.get(0); + NdArray r16_1 = same16.get(1); + assertEquals(1, r16_0.rank()); + assertEquals(Shape.of(2), r16_0.shape()); + assertEquals(2, r16_0.size()); + assertEquals("(3, 4)", r16_0.getObject(0)); + assertEquals("(1, 4)", r16_0.getObject(1)); + assertEquals("(3, 2)", r16_1.getObject(0)); + assertEquals("(1, 2)", r16_1.getObject(1)); - assertEquals(0, 0); + + // New axis always has size 1 + NdArray same17 = matrix2d.slice(Indices.all(), Indices.all(), Indices.newAxis()); + String[][][] same17j = StdArrays.array3dCopyOf(same17, String.class); + assertEquals(3, same17.rank()); + assertEquals(Shape.of(5,4,1), same17.shape()); + assertEquals(20, same17.size()); + String[][][] expected_r17 = new String[][][] + { + {{"(0, 0)"}, {"(1, 0)"}, {"(2, 0)"}, {"(3, 0)"}}, + {{"(0, 1)"}, {"(1, 1)"}, {"(2, 1)"}, {"(3, 1)"}}, + {{"(0, 2)"}, {"(1, 2)"}, {"(2, 2)"}, {"(3, 2)"}}, + {{"(0, 3)"}, {"(1, 3)"}, {"(2, 3)"}, {"(3, 3)"}}, + {{"(0, 4)"}, {"(1, 4)"}, {"(2, 4)"}, {"(3, 4)"}} + }; + assertArrayEquals(expected_r17, same17j); + NdArray r17_0 = same17.get(0); + NdArray r17_1 = same17.get(1); + NdArray r17_2 = same17.get(2); + NdArray r17_3 = same17.get(3); + NdArray r17_4 = same17.get(4); + assertEquals(2, r17_0.rank()); + assertEquals(Shape.of(4,1), r17_0.shape()); + assertEquals(4, r17_0.size()); + // row 0 + // What use case can we have for a new index of size 1? + // row 1 + assertEquals("(0, 1)", r17_1.getObject(0,0)); + assertEquals("(1, 1)", r17_1.getObject(1,0)); + assertEquals("(2, 1)", r17_1.getObject(2,0)); + assertEquals("(3, 1)", r17_1.getObject(3,0)); + // row 2 + assertEquals("(0, 2)", r17_2.getObject(0,0)); + assertEquals("(1, 2)", r17_2.getObject(1,0)); + assertEquals("(2, 2)", r17_2.getObject(2,0)); + assertEquals("(3, 2)", r17_2.getObject(3,0)); + // row 3 + assertEquals("(0, 3)", r17_3.getObject(0,0)); + assertEquals("(1, 3)", r17_3.getObject(1,0)); + assertEquals("(2, 3)", r17_3.getObject(2,0)); + assertEquals("(3, 3)", r17_3.getObject(3,0)); + // row 4 + assertEquals("(0, 4)", r17_4.getObject(0,0)); + assertEquals("(1, 4)", r17_4.getObject(1,0)); + assertEquals("(2, 4)", r17_4.getObject(2,0)); + assertEquals("(3, 4)", r17_4.getObject(3,0)); + } @Test From 0dac08a546d2cd534066cb054e1432540d284c95 Mon Sep 17 00:00:00 2001 From: hmf Date: Tue, 29 Nov 2022 15:47:14 +0000 Subject: [PATCH 16/60] Added module-info to tests --- ndarray/src/main/java/module-info.java | 1 - ndarray/src/test/java/module-info.test | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 ndarray/src/test/java/module-info.test diff --git a/ndarray/src/main/java/module-info.java b/ndarray/src/main/java/module-info.java index bc09f1164d6..6b33ed65ba8 100644 --- a/ndarray/src/main/java/module-info.java +++ b/ndarray/src/main/java/module-info.java @@ -16,7 +16,6 @@ */ module org.tensorflow.ndarray { requires jdk.unsupported; // required by raw buffer implementations using Unsafe - requires java.desktop; // required for java.awt.* exports org.tensorflow.ndarray; exports org.tensorflow.ndarray.buffer; diff --git a/ndarray/src/test/java/module-info.test b/ndarray/src/test/java/module-info.test new file mode 100644 index 00000000000..24830da4641 --- /dev/null +++ b/ndarray/src/test/java/module-info.test @@ -0,0 +1,19 @@ +/* + Copyright 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ======================================================================= + */ +module org.tensorflow.ndarray.test { + requires java.desktop; // required for java.awt.* +} From d36324002fc80fa8c23aa39365412ffcb801b1ef Mon Sep 17 00:00:00 2001 From: hmf Date: Wed, 30 Nov 2022 08:20:51 +0000 Subject: [PATCH 17/60] Module-info for tests use the same module name of src --- ndarray/src/test/java/module-info.test | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ndarray/src/test/java/module-info.test b/ndarray/src/test/java/module-info.test index 24830da4641..310e500ee47 100644 --- a/ndarray/src/test/java/module-info.test +++ b/ndarray/src/test/java/module-info.test @@ -14,6 +14,9 @@ limitations under the License. ======================================================================= */ -module org.tensorflow.ndarray.test { +module org.tensorflow.ndarray { requires java.desktop; // required for java.awt.* + + requires transitive org.junit.jupiter.engine; + requires transitive org.junit.jupiter.api; } From 99789562ef9aaf7cb47bb79816f19f702e33a5e7 Mon Sep 17 00:00:00 2001 From: Karl Lessard Date: Wed, 25 Jan 2023 13:22:25 -0500 Subject: [PATCH 18/60] Value streaming for NdArrays (#15) --- .../org/tensorflow/ndarray/DoubleNdArray.java | 17 +++++++++- .../org/tensorflow/ndarray/IntNdArray.java | 17 +++++++++- .../org/tensorflow/ndarray/LongNdArray.java | 17 +++++++++- .../java/org/tensorflow/ndarray/NdArray.java | 17 +++++++++- .../ndarray/IntNdArrayTestBase.java | 32 +++++++++++++++-- .../ndarray/LongNdArrayTestBase.java | 28 ++++++++++++++- .../tensorflow/ndarray/NdArrayTestBase.java | 34 ++++++++++++++++--- 7 files changed, 150 insertions(+), 12 deletions(-) diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/DoubleNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/DoubleNdArray.java index 80e99b01877..b0e6dabbef5 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/DoubleNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/DoubleNdArray.java @@ -1,5 +1,5 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. + Copyright 2019-2023 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. @@ -20,6 +20,9 @@ import org.tensorflow.ndarray.buffer.DoubleDataBuffer; import org.tensorflow.ndarray.index.Index; +import java.util.stream.DoubleStream; +import java.util.stream.StreamSupport; + /** * An {@link NdArray} of doubles. */ @@ -68,6 +71,18 @@ public interface DoubleNdArray extends NdArray { */ DoubleNdArray setDouble(double value, long... coordinates); + /** + * Retrieve all scalar values of this array as a stream of doubles. + * + *

    For {@code rank() > 1} arrays, all vectors of the last dimension are collated so that the scalar values are + * returned in sequential order.

    + * + * @return scalar values as a stream + */ + default DoubleStream streamOfDoubles() { + return StreamSupport.stream(scalars().spliterator(), false).mapToDouble(DoubleNdArray::getDouble); + } + @Override DoubleNdArray slice(Index... indices); diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/IntNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/IntNdArray.java index aa2cc652d69..e6a5cf00f87 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/IntNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/IntNdArray.java @@ -1,5 +1,5 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. + Copyright 2019-2023 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. @@ -20,6 +20,9 @@ import org.tensorflow.ndarray.buffer.IntDataBuffer; import org.tensorflow.ndarray.index.Index; +import java.util.stream.IntStream; +import java.util.stream.StreamSupport; + /** * An {@link NdArray} of integers. */ @@ -68,6 +71,18 @@ public interface IntNdArray extends NdArray { */ IntNdArray setInt(int value, long... coordinates); + /** + * Retrieve all scalar values of this array as a stream of integers. + * + *

    For {@code rank() > 1} arrays, all vectors of the last dimension are collated so that the scalar values are + * returned in sequential order.

    + * + * @return scalar values as a stream + */ + default IntStream streamOfInts() { + return StreamSupport.stream(scalars().spliterator(), false).mapToInt(IntNdArray::getInt); + } + @Override IntNdArray slice(Index... indices); diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/LongNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/LongNdArray.java index 3e5be6dc7ec..e7bd26614e0 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/LongNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/LongNdArray.java @@ -1,5 +1,5 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. + Copyright 2019-2023 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. @@ -20,6 +20,9 @@ import org.tensorflow.ndarray.buffer.LongDataBuffer; import org.tensorflow.ndarray.index.Index; +import java.util.stream.LongStream; +import java.util.stream.StreamSupport; + /** * An {@link NdArray} of longs. */ @@ -68,6 +71,18 @@ public interface LongNdArray extends NdArray { */ LongNdArray setLong(long value, long... coordinates); + /** + * Retrieve all scalar values of this array as a stream of longs. + * + *

    For {@code rank() > 1} arrays, all vectors of the last dimension are collated so that the scalar values are + * returned in sequential order.

    + * + * @return scalar values as a stream + */ + default LongStream streamOfLongs() { + return StreamSupport.stream(scalars().spliterator(), false).mapToLong(LongNdArray::getLong); + } + @Override LongNdArray slice(Index... indices); diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/NdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/NdArray.java index 6686abd9148..f1e84d45521 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/NdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/NdArray.java @@ -1,5 +1,5 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. + Copyright 2019-2023 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. @@ -18,6 +18,9 @@ import java.util.function.BiConsumer; import java.util.function.Consumer; +import java.util.stream.Stream; +import java.util.stream.StreamSupport; + import org.tensorflow.ndarray.buffer.DataBuffer; import org.tensorflow.ndarray.index.Index; @@ -229,6 +232,18 @@ public interface NdArray extends Shaped { */ NdArray setObject(T value, long... coordinates); + /** + * Retrieve all scalar values of this array as a stream of objects. + * + *

    For {@code rank() > 1} arrays, all vectors of the last dimension are collated so that the scalar values are + * returned in sequential order.

    + * + * @return scalar values as a stream + */ + default Stream streamOfObjects() { + return StreamSupport.stream(scalars().spliterator(), false).map(NdArray::getObject); + } + /** * Copy the content of this array to the destination array. * diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/IntNdArrayTestBase.java b/ndarray/src/test/java/org/tensorflow/ndarray/IntNdArrayTestBase.java index 1a3c7cb1a12..0fba8fb9fb7 100644 --- a/ndarray/src/test/java/org/tensorflow/ndarray/IntNdArrayTestBase.java +++ b/ndarray/src/test/java/org/tensorflow/ndarray/IntNdArrayTestBase.java @@ -1,5 +1,5 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. + Copyright 2019-2023 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. @@ -16,10 +16,11 @@ */ package org.tensorflow.ndarray; -import static org.junit.jupiter.api.Assertions.assertEquals; - import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; + public abstract class IntNdArrayTestBase extends NdArrayTestBase { @Override @@ -52,4 +53,29 @@ public void iteratePrimitiveElements() { assertEquals(9, matrix3d.getInt(0, 0, 4)); assertEquals(7, matrix3d.getInt(0, 1, 2)); } + + @Test + public void streamingInts() { + IntNdArray scalar = allocate(Shape.scalar()); + scalar.setInt(1); + var values = scalar.streamOfInts().toArray(); + assertArrayEquals(new int[]{1}, values); + + IntNdArray vector = allocate(Shape.of(5)); + vector.setInt(1, 0); + vector.setInt(2, 1); + vector.setInt(3, 2); + vector.setInt(4, 3); + vector.setInt(5, 4); + values = vector.streamOfInts().toArray(); + assertArrayEquals(new int[]{1, 2, 3, 4, 5}, values); + + IntNdArray matrix = allocate(Shape.of(2, 2)); + matrix.setInt(1, 0, 0); + matrix.setInt(2, 0, 1); + matrix.setInt(3, 1, 0); + matrix.setInt(4, 1, 1); + values = matrix.streamOfInts().toArray(); + assertArrayEquals(new int[]{1, 2, 3, 4}, values); + } } diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/LongNdArrayTestBase.java b/ndarray/src/test/java/org/tensorflow/ndarray/LongNdArrayTestBase.java index b91c19d6557..520d9bc3a61 100644 --- a/ndarray/src/test/java/org/tensorflow/ndarray/LongNdArrayTestBase.java +++ b/ndarray/src/test/java/org/tensorflow/ndarray/LongNdArrayTestBase.java @@ -1,5 +1,5 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. + Copyright 2019-2023 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. @@ -16,6 +16,7 @@ */ package org.tensorflow.ndarray; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; import static org.junit.jupiter.api.Assertions.assertEquals; import org.junit.jupiter.api.Test; @@ -52,4 +53,29 @@ public void iteratePrimitiveElements() { assertEquals(9, matrix3d.getLong(0, 0, 4)); assertEquals(7, matrix3d.getLong(0, 1, 2)); } + + @Test + public void streamingLongs() { + LongNdArray scalar = allocate(Shape.scalar()); + scalar.setLong(1L); + var values = scalar.streamOfLongs().toArray(); + assertArrayEquals(new long[]{1L}, values); + + LongNdArray vector = allocate(Shape.of(5)); + vector.setLong(1L, 0); + vector.setLong(2L, 1); + vector.setLong(3L, 2); + vector.setLong(4L, 3); + vector.setLong(5L, 4); + values = vector.streamOfLongs().toArray(); + assertArrayEquals(new long[]{1L, 2L, 3L, 4L, 5L}, values); + + LongNdArray matrix = allocate(Shape.of(2, 2)); + matrix.setLong(1L, 0, 0); + matrix.setLong(2L, 0, 1); + matrix.setLong(3L, 1, 0); + matrix.setLong(4L, 1, 1); + values = matrix.streamOfLongs().toArray(); + assertArrayEquals(new long[]{1L, 2L, 3L, 4L}, values); + } } diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/NdArrayTestBase.java b/ndarray/src/test/java/org/tensorflow/ndarray/NdArrayTestBase.java index c44db8d7ec5..8a09ec77a0d 100644 --- a/ndarray/src/test/java/org/tensorflow/ndarray/NdArrayTestBase.java +++ b/ndarray/src/test/java/org/tensorflow/ndarray/NdArrayTestBase.java @@ -1,5 +1,5 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. + Copyright 2019-2023 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. @@ -16,9 +16,7 @@ */ package org.tensorflow.ndarray; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotEquals; -import static org.junit.jupiter.api.Assertions.fail; +import static org.junit.jupiter.api.Assertions.*; import static org.tensorflow.ndarray.NdArrays.vectorOfObjects; import static org.tensorflow.ndarray.index.Indices.all; import static org.tensorflow.ndarray.index.Indices.at; @@ -32,6 +30,9 @@ import java.nio.BufferOverflowException; import java.nio.BufferUnderflowException; +import java.util.List; +import java.util.stream.Collectors; + import org.junit.jupiter.api.Test; import org.tensorflow.ndarray.buffer.DataBuffer; import org.tensorflow.ndarray.index.Indices; @@ -358,4 +359,29 @@ public void iterateScalarsOnSegmentedElements() { }); }); } + + @Test + public void streamingObjects() { + NdArray scalar = allocate(Shape.scalar()); + scalar.setObject(valueOf(1L)); + var values = scalar.streamOfObjects().collect(Collectors.toList()); + assertIterableEquals(List.of(valueOf(1L)), values); + + NdArray vector = allocate(Shape.of(5)); + vector.setObject(valueOf(1L), 0); + vector.setObject(valueOf(2L), 1); + vector.setObject(valueOf(3L), 2); + vector.setObject(valueOf(4L), 3); + vector.setObject(valueOf(5L), 4); + values = vector.streamOfObjects().collect(Collectors.toList()); + assertIterableEquals(List.of(valueOf(1L), valueOf(2L), valueOf(3L), valueOf(4L), valueOf(5L)), values); + + NdArray matrix = allocate(Shape.of(2, 2)); + matrix.setObject(valueOf(1L), 0, 0); + matrix.setObject(valueOf(2L), 0, 1); + matrix.setObject(valueOf(3L), 1, 0); + matrix.setObject(valueOf(4L), 1, 1); + values = matrix.streamOfObjects().collect(Collectors.toList()); + assertIterableEquals(List.of(valueOf(1L), valueOf(2L), valueOf(3L), valueOf(4L)), values); + } } From 8f171519c7f2845e8d78b51b05a467ead592881d Mon Sep 17 00:00:00 2001 From: Karl Lessard Date: Wed, 25 Jan 2023 21:19:35 -0500 Subject: [PATCH 19/60] Release 0.4.0 --- ndarray/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ndarray/pom.xml b/ndarray/pom.xml index f34150c7908..73e80fa16e7 100644 --- a/ndarray/pom.xml +++ b/ndarray/pom.xml @@ -22,7 +22,7 @@ org.tensorflow tensorflow-java-ndarray - 0.4.0-SNAPSHOT + 0.4.0 ndarray jar From b2ba5ad7510d2d318ed4b074935717dec9ebd368 Mon Sep 17 00:00:00 2001 From: Karl Lessard Date: Thu, 26 Jan 2023 17:03:39 -0500 Subject: [PATCH 20/60] Prepare next iteration --- ndarray/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ndarray/pom.xml b/ndarray/pom.xml index 73e80fa16e7..9966a354582 100644 --- a/ndarray/pom.xml +++ b/ndarray/pom.xml @@ -22,7 +22,7 @@ org.tensorflow tensorflow-java-ndarray - 0.4.0 + 0.5.0-SNAPSHOT ndarray jar From cdafccda677d1eaa7338620b79fca0ef9cc3fbb3 Mon Sep 17 00:00:00 2001 From: Karl Lessard Date: Sat, 17 Feb 2024 21:38:25 -0500 Subject: [PATCH 21/60] Viewing arrays with different shapes (#18) --- .../tensorflow/ndarray/BooleanNdArray.java | 3 ++ .../org/tensorflow/ndarray/ByteNdArray.java | 3 ++ .../org/tensorflow/ndarray/DoubleNdArray.java | 3 ++ .../org/tensorflow/ndarray/FloatNdArray.java | 3 ++ .../org/tensorflow/ndarray/IntNdArray.java | 3 ++ .../org/tensorflow/ndarray/LongNdArray.java | 3 ++ .../java/org/tensorflow/ndarray/NdArray.java | 32 +++++++++++++++++-- .../org/tensorflow/ndarray/ShortNdArray.java | 3 ++ .../impl/dense/AbstractDenseNdArray.java | 18 +++++++++-- .../impl/dense/BooleanDenseNdArray.java | 2 +- .../ndarray/impl/dense/ByteDenseNdArray.java | 2 +- .../ndarray/impl/dense/DenseNdArray.java | 2 +- .../impl/dense/DoubleDenseNdArray.java | 2 +- .../ndarray/impl/dense/FloatDenseNdArray.java | 2 +- .../ndarray/impl/dense/IntDenseNdArray.java | 2 +- .../ndarray/impl/dense/LongDenseNdArray.java | 2 +- .../ndarray/impl/dense/ShortDenseNdArray.java | 2 +- .../impl/sparse/AbstractSparseNdArray.java | 5 +++ .../tensorflow/ndarray/NdArrayTestBase.java | 27 ++++++++++++++++ .../tensorflow/ndarray/SparseNdArrayTest.java | 7 ++++ 20 files changed, 112 insertions(+), 14 deletions(-) diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/BooleanNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/BooleanNdArray.java index 5b4bedb1c84..bd16a9ac083 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/BooleanNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/BooleanNdArray.java @@ -68,6 +68,9 @@ public interface BooleanNdArray extends NdArray { */ BooleanNdArray setBoolean(boolean value, long... coordinates); + @Override + BooleanNdArray withShape(Shape shape); + @Override BooleanNdArray slice(Index... indices); diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/ByteNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/ByteNdArray.java index 0e6f118f5ef..47e5a0dd89d 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/ByteNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/ByteNdArray.java @@ -68,6 +68,9 @@ public interface ByteNdArray extends NdArray { */ ByteNdArray setByte(byte value, long... coordinates); + @Override + ByteNdArray withShape(Shape shape); + @Override ByteNdArray slice(Index... indices); diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/DoubleNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/DoubleNdArray.java index b0e6dabbef5..da42babc92b 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/DoubleNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/DoubleNdArray.java @@ -83,6 +83,9 @@ default DoubleStream streamOfDoubles() { return StreamSupport.stream(scalars().spliterator(), false).mapToDouble(DoubleNdArray::getDouble); } + @Override + DoubleNdArray withShape(Shape shape); + @Override DoubleNdArray slice(Index... indices); diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/FloatNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/FloatNdArray.java index 8d4fbf5c1ed..34e4201805d 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/FloatNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/FloatNdArray.java @@ -68,6 +68,9 @@ public interface FloatNdArray extends NdArray { */ FloatNdArray setFloat(float value, long... coordinates); + @Override + FloatNdArray withShape(Shape shape); + @Override FloatNdArray slice(Index... coordinates); diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/IntNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/IntNdArray.java index e6a5cf00f87..71f19b993c1 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/IntNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/IntNdArray.java @@ -83,6 +83,9 @@ default IntStream streamOfInts() { return StreamSupport.stream(scalars().spliterator(), false).mapToInt(IntNdArray::getInt); } + @Override + IntNdArray withShape(Shape shape); + @Override IntNdArray slice(Index... indices); diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/LongNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/LongNdArray.java index e7bd26614e0..a55b2ab5e1a 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/LongNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/LongNdArray.java @@ -83,6 +83,9 @@ default LongStream streamOfLongs() { return StreamSupport.stream(scalars().spliterator(), false).mapToLong(LongNdArray::getLong); } + @Override + LongNdArray withShape(Shape shape); + @Override LongNdArray slice(Index... indices); diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/NdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/NdArray.java index f1e84d45521..a75da480f54 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/NdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/NdArray.java @@ -16,14 +16,14 @@ */ package org.tensorflow.ndarray; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.index.Index; + import java.util.function.BiConsumer; import java.util.function.Consumer; import java.util.stream.Stream; import java.util.stream.StreamSupport; -import org.tensorflow.ndarray.buffer.DataBuffer; -import org.tensorflow.ndarray.index.Index; - /** * A data structure of N-dimensions. * @@ -101,6 +101,32 @@ public interface NdArray extends Shaped { */ NdArraySequence> scalars(); + /** + * Returns a new N-dimensional view of this array with the given {@code shape}. + * + *

    The provided {@code shape} must comply to the following characteristics: + *

      + *
    • new shape is known (i.e. has no unknown dimension)
    • + *
    • new shape size is equal to the size of the current shape (i.e. same number of elements)
    • + *
    + * For example, + *
    {@code
    +   *    NdArrays.ofInts(Shape.scalar()).withShape(Shape.of(1, 1));  // ok
    +   *    NdArrays.ofInts(Shape.of(2, 3).withShape(Shape.of(3, 2));   // ok
    +   *    NdArrays.ofInts(Shape.scalar()).withShape(Shape.of(1, 2));  // not ok, sizes are different (1 != 2)
    +   *    NdArrays.ofInts(Shape.of(2, 3)).withShape(Shape.unknown()); // not ok, new shape unknown
    +   * }
    + * + *

    Any changes applied to the returned view affect the data of this array as well, as there + * is no copy involved. + * + * @param shape the new shape to apply + * @return a new array viewing the data according to the new shape, or this array if shapes are the same + * @throws IllegalArgumentException if the provided {@code shape} is not compliant + * @throws UnsupportedOperationException if this array does not support this operation + */ + NdArray withShape(Shape shape); + /** * Creates a multi-dimensional view (or slice) of this array by mapping one or more dimensions * to the given index selectors. diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/ShortNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/ShortNdArray.java index f9335b4d5d2..92b608f7191 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/ShortNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/ShortNdArray.java @@ -68,6 +68,9 @@ public interface ShortNdArray extends NdArray { */ ShortNdArray setShort(short value, long... coordinates); + @Override + ShortNdArray withShape(Shape shape); + @Override ShortNdArray slice(Index... coordinates); diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/AbstractDenseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/AbstractDenseNdArray.java index 30af952815b..baaf23ee042 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/AbstractDenseNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/AbstractDenseNdArray.java @@ -18,6 +18,7 @@ import org.tensorflow.ndarray.NdArray; import org.tensorflow.ndarray.NdArraySequence; +import org.tensorflow.ndarray.Shape; import org.tensorflow.ndarray.impl.AbstractNdArray; import org.tensorflow.ndarray.impl.dimension.RelativeDimensionalSpace; import org.tensorflow.ndarray.impl.sequence.FastElementSequence; @@ -43,7 +44,7 @@ public NdArraySequence elements(int dimensionIdx) { DimensionalSpace elemDims = dimensions().from(dimensionIdx + 1); try { DataBufferWindow> elemWindow = buffer().window(elemDims.physicalSize()); - U element = instantiate(elemWindow.buffer(), elemDims); + U element = instantiateView(elemWindow.buffer(), elemDims); return new FastElementSequence(this, dimensionIdx, element, elemWindow); } catch (UnsupportedOperationException e) { // If buffer windows are not supported, fallback to slicing (and slower) sequence @@ -51,10 +52,21 @@ public NdArraySequence elements(int dimensionIdx) { } } + @Override + public U withShape(Shape shape) { + if (shape == null || shape.isUnknown() || shape.size() != this.shape().size()) { + throw new IllegalArgumentException("Shape " + shape + " cannot be used to reshape ndarray of shape " + this.shape()); + } + if (shape.equals(this.shape())) { + return (U)this; + } + return instantiateView(buffer(), DimensionalSpace.create(shape)); + } + @Override public U slice(long position, DimensionalSpace sliceDimensions) { DataBuffer sliceBuffer = buffer().slice(position, sliceDimensions.physicalSize()); - return instantiate(sliceBuffer, sliceDimensions); + return instantiateView(sliceBuffer, sliceDimensions); } @Override @@ -147,7 +159,7 @@ protected AbstractDenseNdArray(DimensionalSpace dimensions) { abstract protected DataBuffer buffer(); - abstract U instantiate(DataBuffer buffer, DimensionalSpace dimensions); + abstract U instantiateView(DataBuffer buffer, DimensionalSpace dimensions); long positionOf(long[] coords, boolean isValue) { if (coords == null || coords.length == 0) { diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/BooleanDenseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/BooleanDenseNdArray.java index 0764146f962..9c134b5dc9b 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/BooleanDenseNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/BooleanDenseNdArray.java @@ -73,7 +73,7 @@ protected BooleanDenseNdArray(BooleanDataBuffer buffer, Shape shape) { } @Override - BooleanDenseNdArray instantiate(DataBuffer buffer, DimensionalSpace dimensions) { + BooleanDenseNdArray instantiateView(DataBuffer buffer, DimensionalSpace dimensions) { return new BooleanDenseNdArray((BooleanDataBuffer)buffer, dimensions); } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ByteDenseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ByteDenseNdArray.java index 172432b5939..a2525c631fe 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ByteDenseNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ByteDenseNdArray.java @@ -73,7 +73,7 @@ protected ByteDenseNdArray(ByteDataBuffer buffer, Shape shape) { } @Override - ByteDenseNdArray instantiate(DataBuffer buffer, DimensionalSpace dimensions) { + ByteDenseNdArray instantiateView(DataBuffer buffer, DimensionalSpace dimensions) { return new ByteDenseNdArray((ByteDataBuffer)buffer, dimensions); } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DenseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DenseNdArray.java index 819d95de2fc..18b37552739 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DenseNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DenseNdArray.java @@ -45,7 +45,7 @@ protected DenseNdArray(DataBuffer buffer, Shape shape) { } @Override - DenseNdArray instantiate(DataBuffer buffer, DimensionalSpace dimensions) { + DenseNdArray instantiateView(DataBuffer buffer, DimensionalSpace dimensions) { return new DenseNdArray<>(buffer, dimensions); } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DoubleDenseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DoubleDenseNdArray.java index f54b8d0347a..a967ce1131a 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DoubleDenseNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DoubleDenseNdArray.java @@ -73,7 +73,7 @@ protected DoubleDenseNdArray(DoubleDataBuffer buffer, Shape shape) { } @Override - DoubleDenseNdArray instantiate(DataBuffer buffer, DimensionalSpace dimensions) { + DoubleDenseNdArray instantiateView(DataBuffer buffer, DimensionalSpace dimensions) { return new DoubleDenseNdArray((DoubleDataBuffer)buffer, dimensions); } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/FloatDenseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/FloatDenseNdArray.java index 196b5ef8b11..a04c1922ec2 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/FloatDenseNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/FloatDenseNdArray.java @@ -73,7 +73,7 @@ protected FloatDenseNdArray(FloatDataBuffer buffer, Shape shape) { } @Override - FloatDenseNdArray instantiate(DataBuffer buffer, DimensionalSpace dimensions) { + FloatDenseNdArray instantiateView(DataBuffer buffer, DimensionalSpace dimensions) { return new FloatDenseNdArray((FloatDataBuffer) buffer, dimensions); } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/IntDenseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/IntDenseNdArray.java index a7af498dd6f..e1a726fd8b1 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/IntDenseNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/IntDenseNdArray.java @@ -73,7 +73,7 @@ protected IntDenseNdArray(IntDataBuffer buffer, Shape shape) { } @Override - IntDenseNdArray instantiate(DataBuffer buffer, DimensionalSpace dimensions) { + IntDenseNdArray instantiateView(DataBuffer buffer, DimensionalSpace dimensions) { return new IntDenseNdArray((IntDataBuffer)buffer, dimensions); } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/LongDenseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/LongDenseNdArray.java index cd56dadfb2b..802cbcdb5f3 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/LongDenseNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/LongDenseNdArray.java @@ -73,7 +73,7 @@ protected LongDenseNdArray(LongDataBuffer buffer, Shape shape) { } @Override - LongDenseNdArray instantiate(DataBuffer buffer, DimensionalSpace dimensions) { + LongDenseNdArray instantiateView(DataBuffer buffer, DimensionalSpace dimensions) { return new LongDenseNdArray((LongDataBuffer)buffer, dimensions); } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ShortDenseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ShortDenseNdArray.java index 291c01ac8e1..434b2609142 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ShortDenseNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ShortDenseNdArray.java @@ -73,7 +73,7 @@ protected ShortDenseNdArray(ShortDataBuffer buffer, Shape shape) { } @Override - ShortDenseNdArray instantiate(DataBuffer buffer, DimensionalSpace dimensions) { + ShortDenseNdArray instantiateView(DataBuffer buffer, DimensionalSpace dimensions) { return new ShortDenseNdArray((ShortDataBuffer)buffer, dimensions); } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/AbstractSparseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/AbstractSparseNdArray.java index 8e3892db6f9..e4a2fba6a0c 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/AbstractSparseNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/AbstractSparseNdArray.java @@ -212,6 +212,11 @@ protected long[] getIndicesCoordinates(LongNdArray l) { */ public abstract U toDense(); + @Override + public U withShape(Shape shape) { + throw new UnsupportedOperationException("Sparse NdArrays cannot be viewed with a different shape"); + } + /** {@inheritDoc} */ @Override public NdArray slice(Index... indices) { diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/NdArrayTestBase.java b/ndarray/src/test/java/org/tensorflow/ndarray/NdArrayTestBase.java index 8a09ec77a0d..577c2b75e50 100644 --- a/ndarray/src/test/java/org/tensorflow/ndarray/NdArrayTestBase.java +++ b/ndarray/src/test/java/org/tensorflow/ndarray/NdArrayTestBase.java @@ -384,4 +384,31 @@ public void streamingObjects() { values = matrix.streamOfObjects().collect(Collectors.toList()); assertIterableEquals(List.of(valueOf(1L), valueOf(2L), valueOf(3L), valueOf(4L)), values); } + + @Test + public void withShape() { + Shape originalShape = Shape.scalar(); + Shape newShape = originalShape.prepend(1).prepend(1); // [1, 1] + + NdArray originalArray = allocate(originalShape); + originalArray.setObject(valueOf(10L)); + assertEquals(valueOf(10L), originalArray.getObject()); + + NdArray newArray = originalArray.withShape(newShape); + assertNotNull(newArray); + assertEquals(newShape, newArray.shape()); + assertEquals(originalShape, originalArray.shape()); + assertEquals(valueOf(10L), newArray.getObject(0, 0)); + + NdArray sameArray = originalArray.withShape(Shape.scalar()); + assertSame(originalArray, sameArray); + + assertThrows(IllegalArgumentException.class, () -> originalArray.withShape(Shape.of(2))); + assertThrows(IllegalArgumentException.class, () -> originalArray.withShape(Shape.unknown())); + + NdArray originalMatrix = allocate(Shape.of(2, 3)); + assertThrows(IllegalArgumentException.class, () -> originalMatrix.withShape(Shape.scalar())); + NdArray newMatrix = originalMatrix.withShape(Shape.of(3, 2)); + assertEquals(Shape.of(3, 2), newMatrix.shape()); + } } diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/SparseNdArrayTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/SparseNdArrayTest.java index 43779b3c4ae..0c5d6b30e9d 100644 --- a/ndarray/src/test/java/org/tensorflow/ndarray/SparseNdArrayTest.java +++ b/ndarray/src/test/java/org/tensorflow/ndarray/SparseNdArrayTest.java @@ -25,6 +25,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; public class SparseNdArrayTest { @@ -188,4 +189,10 @@ public void testShort() { assertEquals((short) 0, instance.getShort(2, 2)); assertEquals((short) 0xff00, instance.getShort(2, 3)); } + + @Test + public void withShape() { + NdArray sparseArray = NdArrays.sparseOf(indices, NdArrays.vectorOf(1, 2, 3), shape); + assertThrows(UnsupportedOperationException.class, () -> sparseArray.withShape(shape.prepend(1))); + } } From e2563029441a7b90eb63aea414693915e3aac487 Mon Sep 17 00:00:00 2001 From: Karl Lessard Date: Mon, 19 Feb 2024 21:46:55 -0500 Subject: [PATCH 22/60] Rename read/write to copyTo/From (#19) --- .../tensorflow/ndarray/BooleanNdArray.java | 8 +++---- .../org/tensorflow/ndarray/ByteNdArray.java | 8 +++---- .../org/tensorflow/ndarray/DoubleNdArray.java | 8 +++---- .../org/tensorflow/ndarray/FloatNdArray.java | 8 +++---- .../org/tensorflow/ndarray/IntNdArray.java | 8 +++---- .../org/tensorflow/ndarray/LongNdArray.java | 8 +++---- .../java/org/tensorflow/ndarray/NdArray.java | 14 +++++++---- .../org/tensorflow/ndarray/ShortNdArray.java | 8 +++---- .../org/tensorflow/ndarray/StdArrays.java | 16 ++++++------- .../tensorflow/ndarray/impl/Validator.java | 4 ++-- .../impl/dense/AbstractDenseNdArray.java | 8 +++---- .../impl/dense/BooleanDenseNdArray.java | 8 +++---- .../ndarray/impl/dense/ByteDenseNdArray.java | 8 +++---- .../impl/dense/DoubleDenseNdArray.java | 8 +++---- .../ndarray/impl/dense/FloatDenseNdArray.java | 8 +++---- .../ndarray/impl/dense/IntDenseNdArray.java | 8 +++---- .../ndarray/impl/dense/LongDenseNdArray.java | 8 +++---- .../ndarray/impl/dense/ShortDenseNdArray.java | 8 +++---- .../impl/sparse/BooleanSparseNdArray.java | 24 +++++++++---------- .../impl/sparse/ByteSparseNdArray.java | 24 +++++++++---------- .../impl/sparse/DoubleSparseNdArray.java | 24 +++++++++---------- .../impl/sparse/FloatSparseNdArray.java | 24 +++++++++---------- .../ndarray/impl/sparse/IntSparseNdArray.java | 24 +++++++++---------- .../impl/sparse/LongSparseNdArray.java | 24 +++++++++---------- .../impl/sparse/ShortSparseNdArray.java | 24 +++++++++---------- .../ndarray/impl/sparse/SparseNdArray.java | 16 ++++++------- .../impl/sparse/slice/BooleanSparseSlice.java | 12 +++++----- .../impl/sparse/slice/ByteSparseSlice.java | 12 +++++----- .../impl/sparse/slice/DoubleSparseSlice.java | 12 +++++----- .../impl/sparse/slice/FloatSparseSlice.java | 12 +++++----- .../impl/sparse/slice/IntSparseSlice.java | 12 +++++----- .../impl/sparse/slice/LongSparseSlice.java | 12 +++++----- .../impl/sparse/slice/ObjectSparseSlice.java | 4 ++-- .../impl/sparse/slice/ShortSparseSlice.java | 12 +++++----- .../impl/sparse/slice/SparseSlice.java | 2 +- .../tensorflow/ndarray/NdArrayTestBase.java | 8 +++---- .../impl/sparse/BooleanSparseNdArrayTest.java | 12 +++++----- .../impl/sparse/ByteSparseNdArrayTest.java | 12 +++++----- .../impl/sparse/DoubleSparseNdArrayTest.java | 12 +++++----- .../impl/sparse/FloatSparseNdArrayTest.java | 12 +++++----- .../impl/sparse/IntSparseNdArrayTest.java | 12 +++++----- .../impl/sparse/LongSparseNdArrayTest.java | 12 +++++----- .../impl/sparse/ShortSparseNdArrayTest.java | 12 +++++----- .../impl/sparse/StringSparseNdArrayTest.java | 12 +++++----- 44 files changed, 269 insertions(+), 263 deletions(-) diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/BooleanNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/BooleanNdArray.java index bd16a9ac083..a762896b793 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/BooleanNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/BooleanNdArray.java @@ -100,12 +100,12 @@ default BooleanNdArray setObject(Boolean value, long... coordinates) { BooleanNdArray copyTo(NdArray dst); @Override - BooleanNdArray read(DataBuffer dst); + BooleanNdArray copyTo(DataBuffer dst); - BooleanNdArray read(BooleanDataBuffer dst); + BooleanNdArray copyTo(BooleanDataBuffer dst); @Override - BooleanNdArray write(DataBuffer src); + BooleanNdArray copyFrom(DataBuffer src); - BooleanNdArray write(BooleanDataBuffer src); + BooleanNdArray copyFrom(BooleanDataBuffer src); } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/ByteNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/ByteNdArray.java index 47e5a0dd89d..7a6f0cdce05 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/ByteNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/ByteNdArray.java @@ -100,12 +100,12 @@ default ByteNdArray setObject(Byte value, long... coordinates) { ByteNdArray copyTo(NdArray dst); @Override - ByteNdArray read(DataBuffer dst); + ByteNdArray copyTo(DataBuffer dst); - ByteNdArray read(ByteDataBuffer dst); + ByteNdArray copyTo(ByteDataBuffer dst); @Override - ByteNdArray write(DataBuffer src); + ByteNdArray copyFrom(DataBuffer src); - ByteNdArray write(ByteDataBuffer src); + ByteNdArray copyFrom(ByteDataBuffer src); } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/DoubleNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/DoubleNdArray.java index da42babc92b..d8d23122181 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/DoubleNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/DoubleNdArray.java @@ -115,12 +115,12 @@ default DoubleNdArray setObject(Double value, long... coordinates) { DoubleNdArray copyTo(NdArray dst); @Override - DoubleNdArray read(DataBuffer dst); + DoubleNdArray copyTo(DataBuffer dst); - DoubleNdArray read(DoubleDataBuffer dst); + DoubleNdArray copyTo(DoubleDataBuffer dst); @Override - DoubleNdArray write(DataBuffer src); + DoubleNdArray copyFrom(DataBuffer src); - DoubleNdArray write(DoubleDataBuffer src); + DoubleNdArray copyFrom(DoubleDataBuffer src); } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/FloatNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/FloatNdArray.java index 34e4201805d..98ec87ec9f6 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/FloatNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/FloatNdArray.java @@ -100,12 +100,12 @@ default FloatNdArray setObject(Float value, long... coordinates) { FloatNdArray copyTo(NdArray dst); @Override - FloatNdArray read(DataBuffer dst); + FloatNdArray copyTo(DataBuffer dst); - FloatNdArray read(FloatDataBuffer dst); + FloatNdArray copyTo(FloatDataBuffer dst); @Override - FloatNdArray write(DataBuffer src); + FloatNdArray copyFrom(DataBuffer src); - FloatNdArray write(FloatDataBuffer src); + FloatNdArray copyFrom(FloatDataBuffer src); } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/IntNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/IntNdArray.java index 71f19b993c1..b165900a583 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/IntNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/IntNdArray.java @@ -115,12 +115,12 @@ default IntNdArray setObject(Integer value, long... coordinates) { IntNdArray copyTo(NdArray dst); @Override - IntNdArray read(DataBuffer dst); + IntNdArray copyTo(DataBuffer dst); - IntNdArray read(IntDataBuffer dst); + IntNdArray copyTo(IntDataBuffer dst); @Override - IntNdArray write(DataBuffer src); + IntNdArray copyFrom(DataBuffer src); - IntNdArray write(IntDataBuffer src); + IntNdArray copyFrom(IntDataBuffer src); } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/LongNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/LongNdArray.java index a55b2ab5e1a..5d5766a7474 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/LongNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/LongNdArray.java @@ -115,12 +115,12 @@ default LongNdArray setObject(Long value, long... coordinates) { LongNdArray copyTo(NdArray dst); @Override - LongNdArray read(DataBuffer dst); + LongNdArray copyTo(DataBuffer dst); - LongNdArray read(LongDataBuffer dst); + LongNdArray copyTo(LongDataBuffer dst); @Override - LongNdArray write(DataBuffer src); + LongNdArray copyFrom(DataBuffer src); - LongNdArray write(LongDataBuffer src); + LongNdArray copyFrom(LongDataBuffer src); } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/NdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/NdArray.java index a75da480f54..da34fd3fa49 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/NdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/NdArray.java @@ -285,33 +285,39 @@ default Stream streamOfObjects() { NdArray copyTo(NdArray dst); /** - * Read the content of this N-dimensional array into the destination buffer. + * Copy the content of this N-dimensional array into the destination buffer. * *

    The size of the buffer must be equal or greater to the {@link #size()} of this * array, or an exception is thrown. After the copy, content of the buffer and of the array can be * altered independently, without affecting each other. * + *

    Note: in version 0.4.0 and earlier, this method was named {@code read(DataBuffer)}. It has been renamed to + * explicitly indicate the direction of the data flow to avoid confusion. + * * @param dst the destination buffer * @return this array * @throws java.nio.BufferOverflowException if the buffer cannot hold the content of this array * @see DataBuffer#size() */ - NdArray read(DataBuffer dst); + NdArray copyTo(DataBuffer dst); /** - * Write the content of this N-dimensional array from the source buffer. + * Copy the content of the source buffer into this N-dimensional array. * *

    The size of the buffer must be equal or greater to the {@link #size()} of this * array, or an exception is thrown. After the copy, content of the buffer and of the array can be * altered independently, without affecting each other. * + *

    Note: in version 0.4.0 and earlier, this method was named {@code write(DataBuffer)}. It has been renamed to + * explicitly indicate the direction of the data flow to avoid confusion. + * * @param src the source buffer * @return this array * @throws java.nio.BufferUnderflowException if the buffer has not enough remaining data to write * into this array * @see DataBuffer#size() */ - NdArray write(DataBuffer src); + NdArray copyFrom(DataBuffer src); /** * Checks equality between n-dimensional arrays. diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/ShortNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/ShortNdArray.java index 92b608f7191..022ccf77e89 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/ShortNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/ShortNdArray.java @@ -100,12 +100,12 @@ default ShortNdArray setObject(Short value, long... coordinates) { ShortNdArray copyTo(NdArray dst); @Override - ShortNdArray read(DataBuffer dst); + ShortNdArray copyTo(DataBuffer dst); - ShortNdArray read(ShortDataBuffer dst); + ShortNdArray copyTo(ShortDataBuffer dst); @Override - ShortNdArray write(DataBuffer src); + ShortNdArray copyFrom(DataBuffer src); - ShortNdArray write(ShortDataBuffer src); + ShortNdArray copyFrom(ShortDataBuffer src); } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java b/ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java index 249e69af0d6..73671654d72 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java @@ -2010,7 +2010,7 @@ public static void copyFrom(IntNdArray src, int[] dst) { if (src.size() > dst.length) { throw new ArrayIndexOutOfBoundsException(String.valueOf(src.size()) + " > " + dst.length); } - src.read(DataBuffers.of(dst, false, false)); + src.copyTo(DataBuffers.of(dst, false, false)); } /** @@ -2113,7 +2113,7 @@ public static void copyFrom(LongNdArray src, long[] dst) { if (src.size() > dst.length) { throw new ArrayIndexOutOfBoundsException(String.valueOf(src.size()) + " > " + dst.length); } - src.read(DataBuffers.of(dst, false, false)); + src.copyTo(DataBuffers.of(dst, false, false)); } /** @@ -2216,7 +2216,7 @@ public static void copyFrom(FloatNdArray src, float[] dst) { if (src.size() > dst.length) { throw new ArrayIndexOutOfBoundsException(String.valueOf(src.size()) + " > " + dst.length); } - src.read(DataBuffers.of(dst, false, false)); + src.copyTo(DataBuffers.of(dst, false, false)); } /** @@ -2319,7 +2319,7 @@ public static void copyFrom(DoubleNdArray src, double[] dst) { if (src.size() > dst.length) { throw new ArrayIndexOutOfBoundsException(String.valueOf(src.size()) + " > " + dst.length); } - src.read(DataBuffers.of(dst, false, false)); + src.copyTo(DataBuffers.of(dst, false, false)); } /** @@ -2422,7 +2422,7 @@ public static void copyFrom(ByteNdArray src, byte[] dst) { if (src.size() > dst.length) { throw new ArrayIndexOutOfBoundsException(String.valueOf(src.size()) + " > " + dst.length); } - src.read(DataBuffers.of(dst, false, false)); + src.copyTo(DataBuffers.of(dst, false, false)); } /** @@ -2525,7 +2525,7 @@ public static void copyFrom(ShortNdArray src, short[] dst) { if (src.size() > dst.length) { throw new ArrayIndexOutOfBoundsException(String.valueOf(src.size()) + " > " + dst.length); } - src.read(DataBuffers.of(dst, false, false)); + src.copyTo(DataBuffers.of(dst, false, false)); } /** @@ -2628,7 +2628,7 @@ public static void copyFrom(BooleanNdArray src, boolean[] dst) { if (src.size() > dst.length) { throw new ArrayIndexOutOfBoundsException(String.valueOf(src.size()) + " > " + dst.length); } - src.read(DataBuffers.of(dst, false, false)); + src.copyTo(DataBuffers.of(dst, false, false)); } /** @@ -2732,7 +2732,7 @@ public static void copyFrom(NdArray src, T[] dst) { if (src.size() > dst.length) { throw new ArrayIndexOutOfBoundsException(String.valueOf(src.size()) + " > " + dst.length); } - src.read(DataBuffers.of(dst, false, false)); + src.copyTo(DataBuffers.of(dst, false, false)); } /** diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/Validator.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/Validator.java index 285d09966de..3e0ba204325 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/Validator.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/Validator.java @@ -30,13 +30,13 @@ public static void copyToNdArrayArgs(NdArray ndArray, NdArray otherNdArray } } - public static void readToBufferArgs(NdArray ndArray, DataBuffer dst) { + public static void copyToBufferArgs(NdArray ndArray, DataBuffer dst) { if (dst.size() < ndArray.size()) { throw new BufferOverflowException(); } } - public static void writeFromBufferArgs(NdArray ndArray, DataBuffer src) { + public static void copyFromBufferArgs(NdArray ndArray, DataBuffer src) { if (src.size() < ndArray.size()) { throw new BufferUnderflowException(); } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/AbstractDenseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/AbstractDenseNdArray.java index baaf23ee042..a22518d28f6 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/AbstractDenseNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/AbstractDenseNdArray.java @@ -101,15 +101,15 @@ public U setObject(T value, long... coords) { } @Override - public U read(DataBuffer dst) { - Validator.readToBufferArgs(this, dst); + public U copyTo(DataBuffer dst) { + Validator.copyToBufferArgs(this, dst); DataTransfer.execute(buffer(), dimensions(), dst, DataTransfer::ofValue); return (U)this; } @Override - public U write(DataBuffer src) { - Validator.writeFromBufferArgs(this, src); + public U copyFrom(DataBuffer src) { + Validator.copyFromBufferArgs(this, src); DataTransfer.execute(src, buffer(), dimensions(), DataTransfer::ofValue); return (U)this; } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/BooleanDenseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/BooleanDenseNdArray.java index 9c134b5dc9b..c3df6e8d4f6 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/BooleanDenseNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/BooleanDenseNdArray.java @@ -55,15 +55,15 @@ public BooleanNdArray copyTo(NdArray dst) { } @Override - public BooleanNdArray read(BooleanDataBuffer dst) { - Validator.readToBufferArgs(this, dst); + public BooleanNdArray copyTo(BooleanDataBuffer dst) { + Validator.copyToBufferArgs(this, dst); DataTransfer.execute(buffer, dimensions(), dst, DataTransfer::ofBoolean); return this; } @Override - public BooleanNdArray write(BooleanDataBuffer src) { - Validator.writeFromBufferArgs(this, src); + public BooleanNdArray copyFrom(BooleanDataBuffer src) { + Validator.copyFromBufferArgs(this, src); DataTransfer.execute(src, buffer, dimensions(), DataTransfer::ofBoolean); return this; } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ByteDenseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ByteDenseNdArray.java index a2525c631fe..1f01ce6f169 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ByteDenseNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ByteDenseNdArray.java @@ -55,15 +55,15 @@ public ByteNdArray copyTo(NdArray dst) { } @Override - public ByteNdArray read(ByteDataBuffer dst) { - Validator.readToBufferArgs(this, dst); + public ByteNdArray copyTo(ByteDataBuffer dst) { + Validator.copyToBufferArgs(this, dst); DataTransfer.execute(buffer, dimensions(), dst, DataTransfer::ofByte); return this; } @Override - public ByteNdArray write(ByteDataBuffer src) { - Validator.writeFromBufferArgs(this, src); + public ByteNdArray copyFrom(ByteDataBuffer src) { + Validator.copyFromBufferArgs(this, src); DataTransfer.execute(src, buffer, dimensions(), DataTransfer::ofByte); return this; } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DoubleDenseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DoubleDenseNdArray.java index a967ce1131a..d983d16ac50 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DoubleDenseNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DoubleDenseNdArray.java @@ -55,15 +55,15 @@ public DoubleNdArray copyTo(NdArray dst) { } @Override - public DoubleNdArray read(DoubleDataBuffer dst) { - Validator.readToBufferArgs(this, dst); + public DoubleNdArray copyTo(DoubleDataBuffer dst) { + Validator.copyToBufferArgs(this, dst); DataTransfer.execute(buffer, dimensions(), dst, DataTransfer::ofDouble); return this; } @Override - public DoubleNdArray write(DoubleDataBuffer src) { - Validator.writeFromBufferArgs(this, src); + public DoubleNdArray copyFrom(DoubleDataBuffer src) { + Validator.copyFromBufferArgs(this, src); DataTransfer.execute(src, buffer, dimensions(), DataTransfer::ofDouble); return this; } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/FloatDenseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/FloatDenseNdArray.java index a04c1922ec2..779e047e3f0 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/FloatDenseNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/FloatDenseNdArray.java @@ -55,15 +55,15 @@ public FloatNdArray copyTo(NdArray dst) { } @Override - public FloatNdArray read(FloatDataBuffer dst) { - Validator.readToBufferArgs(this, dst); + public FloatNdArray copyTo(FloatDataBuffer dst) { + Validator.copyToBufferArgs(this, dst); DataTransfer.execute(buffer, dimensions(), dst, DataTransfer::ofFloat); return this; } @Override - public FloatNdArray write(FloatDataBuffer src) { - Validator.writeFromBufferArgs(this, src); + public FloatNdArray copyFrom(FloatDataBuffer src) { + Validator.copyFromBufferArgs(this, src); DataTransfer.execute(src, buffer, dimensions(), DataTransfer::ofFloat); return this; } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/IntDenseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/IntDenseNdArray.java index e1a726fd8b1..4e2183d8625 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/IntDenseNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/IntDenseNdArray.java @@ -55,15 +55,15 @@ public IntNdArray copyTo(NdArray dst) { } @Override - public IntNdArray read(IntDataBuffer dst) { - Validator.readToBufferArgs(this, dst); + public IntNdArray copyTo(IntDataBuffer dst) { + Validator.copyToBufferArgs(this, dst); DataTransfer.execute(buffer, dimensions(), dst, DataTransfer::ofInt); return this; } @Override - public IntNdArray write(IntDataBuffer src) { - Validator.writeFromBufferArgs(this, src); + public IntNdArray copyFrom(IntDataBuffer src) { + Validator.copyFromBufferArgs(this, src); DataTransfer.execute(src, buffer, dimensions(), DataTransfer::ofInt); return this; } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/LongDenseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/LongDenseNdArray.java index 802cbcdb5f3..cde91a3dc3d 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/LongDenseNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/LongDenseNdArray.java @@ -55,15 +55,15 @@ public LongNdArray copyTo(NdArray dst) { } @Override - public LongNdArray read(LongDataBuffer dst) { - Validator.readToBufferArgs(this, dst); + public LongNdArray copyTo(LongDataBuffer dst) { + Validator.copyToBufferArgs(this, dst); DataTransfer.execute(buffer, dimensions(), dst, DataTransfer::ofLong); return this; } @Override - public LongNdArray write(LongDataBuffer src) { - Validator.writeFromBufferArgs(this, src); + public LongNdArray copyFrom(LongDataBuffer src) { + Validator.copyFromBufferArgs(this, src); DataTransfer.execute(src, buffer, dimensions(), DataTransfer::ofLong); return this; } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ShortDenseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ShortDenseNdArray.java index 434b2609142..8d0dfc86c8f 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ShortDenseNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ShortDenseNdArray.java @@ -55,15 +55,15 @@ public ShortNdArray copyTo(NdArray dst) { } @Override - public ShortNdArray read(ShortDataBuffer dst) { - Validator.readToBufferArgs(this, dst); + public ShortNdArray copyTo(ShortDataBuffer dst) { + Validator.copyToBufferArgs(this, dst); DataTransfer.execute(buffer, dimensions(), dst, DataTransfer::ofShort); return this; } @Override - public ShortNdArray write(ShortDataBuffer src) { - Validator.writeFromBufferArgs(this, src); + public ShortNdArray copyFrom(ShortDataBuffer src) { + Validator.copyFromBufferArgs(this, src); DataTransfer.execute(src, buffer, dimensions(), DataTransfer::ofShort); return this; } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java index f5b984fed35..d5d8d725990 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java @@ -124,7 +124,7 @@ protected BooleanSparseNdArray( BooleanDataBuffer dataBuffer, boolean defaultValue, DimensionalSpace dimensions) { super(defaultValue, dimensions); // use write to set up the indices and values - write(dataBuffer); + copyFrom(dataBuffer); } /** @@ -266,7 +266,7 @@ public static BooleanSparseNdArray create( */ public static BooleanSparseNdArray create(BooleanNdArray src) { BooleanDataBuffer buffer = DataBuffers.ofBooleans(src.size()); - src.read(buffer); + src.copyTo(buffer); return new BooleanSparseNdArray(buffer, DimensionalSpace.create(src.shape())); } /** @@ -278,7 +278,7 @@ public static BooleanSparseNdArray create(BooleanNdArray src) { */ public static BooleanSparseNdArray create(BooleanNdArray src, boolean defaultValue) { BooleanDataBuffer buffer = DataBuffers.ofBooleans(src.size()); - src.read(buffer); + src.copyTo(buffer); return new BooleanSparseNdArray(buffer, defaultValue, DimensionalSpace.create(src.shape())); } @@ -318,13 +318,13 @@ public BooleanNdArray setBoolean(boolean value, long... coordinates) { /** {@inheritDoc} */ @Override - public BooleanNdArray read(DataBuffer dst) { - return read((BooleanDataBuffer) dst); + public BooleanNdArray copyTo(DataBuffer dst) { + return copyTo((BooleanDataBuffer) dst); } /** {@inheritDoc} */ @Override - public BooleanNdArray read(BooleanDataBuffer dst) { + public BooleanNdArray copyTo(BooleanDataBuffer dst) { // set the values in buf to the default, then overwrite with indices/values Boolean[] defaults = new Boolean[(int) shape().size()]; Arrays.fill(defaults, getDefaultValue()); @@ -344,7 +344,7 @@ public BooleanNdArray read(BooleanDataBuffer dst) { /** {@inheritDoc} */ @Override - public BooleanNdArray write(BooleanDataBuffer src) { + public BooleanNdArray copyFrom(BooleanDataBuffer src) { List indices = new ArrayList<>(); List values = new ArrayList<>(); @@ -368,8 +368,8 @@ public BooleanNdArray write(BooleanDataBuffer src) { /** {@inheritDoc} */ @Override - public BooleanNdArray write(DataBuffer src) { - return write((BooleanDataBuffer) src); + public BooleanNdArray copyFrom(DataBuffer src) { + return copyFrom((BooleanDataBuffer) src); } /** @@ -379,7 +379,7 @@ public BooleanNdArray write(DataBuffer src) { */ public BooleanNdArray toDense() { BooleanDataBuffer dataBuffer = DataBuffers.ofBooleans(shape().size()); - read(dataBuffer); + copyTo(dataBuffer); return NdArrays.wrap(shape(), dataBuffer); } @@ -391,8 +391,8 @@ public BooleanNdArray toDense() { */ public BooleanNdArray fromDense(BooleanNdArray src) { BooleanDataBuffer buffer = DataBuffers.ofBooleans(src.size()); - src.read(buffer); - write(buffer); + src.copyTo(buffer); + copyFrom(buffer); return this; } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArray.java index 259aefe1c54..633ca496f13 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArray.java @@ -118,7 +118,7 @@ protected ByteSparseNdArray( ByteSparseNdArray(ByteDataBuffer dataBuffer, byte defaultValue, DimensionalSpace dimensions) { super(defaultValue, dimensions); // use write to set up the indices and values - write(dataBuffer); + copyFrom(dataBuffer); } /** @@ -255,7 +255,7 @@ public static ByteSparseNdArray create(ByteDataBuffer buffer, byte defaultValue, */ public static ByteSparseNdArray create(ByteNdArray src) { ByteDataBuffer buffer = DataBuffers.ofBytes(src.size()); - src.read(buffer); + src.copyTo(buffer); return new ByteSparseNdArray(buffer, DimensionalSpace.create(src.shape())); } @@ -268,7 +268,7 @@ public static ByteSparseNdArray create(ByteNdArray src) { */ public static ByteSparseNdArray create(ByteNdArray src, byte defaultValue) { ByteDataBuffer buffer = DataBuffers.ofBytes(src.size()); - src.read(buffer); + src.copyTo(buffer); return new ByteSparseNdArray(buffer, defaultValue, DimensionalSpace.create(src.shape())); } @@ -302,13 +302,13 @@ public ByteNdArray setByte(byte value, long... coordinates) { /** {@inheritDoc} */ @Override - public ByteNdArray read(DataBuffer dst) { - return read((ByteDataBuffer) dst); + public ByteNdArray copyTo(DataBuffer dst) { + return copyTo((ByteDataBuffer) dst); } /** {@inheritDoc} */ @Override - public ByteNdArray read(ByteDataBuffer dst) { + public ByteNdArray copyTo(ByteDataBuffer dst) { // set the values in buf to the default, then overwrite with indices/values Byte[] defaults = new Byte[(int) shape().size()]; Arrays.fill(defaults, getDefaultValue()); @@ -328,7 +328,7 @@ public ByteNdArray read(ByteDataBuffer dst) { /** {@inheritDoc} */ @Override - public ByteNdArray write(ByteDataBuffer src) { + public ByteNdArray copyFrom(ByteDataBuffer src) { List indices = new ArrayList<>(); List values = new ArrayList<>(); @@ -352,8 +352,8 @@ public ByteNdArray write(ByteDataBuffer src) { /** {@inheritDoc} */ @Override - public ByteNdArray write(DataBuffer src) { - return write((ByteDataBuffer) src); + public ByteNdArray copyFrom(DataBuffer src) { + return copyFrom((ByteDataBuffer) src); } /** @@ -363,7 +363,7 @@ public ByteNdArray write(DataBuffer src) { */ public ByteNdArray toDense() { ByteDataBuffer dataBuffer = DataBuffers.ofBytes(shape().size()); - read(dataBuffer); + copyTo(dataBuffer); return NdArrays.wrap(shape(), dataBuffer); } @@ -375,8 +375,8 @@ public ByteNdArray toDense() { */ public ByteNdArray fromDense(ByteNdArray src) { ByteDataBuffer buffer = DataBuffers.ofBytes(src.size()); - src.read(buffer); - write(buffer); + src.copyTo(buffer); + copyFrom(buffer); return this; } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArray.java index 07a6d2ad752..35b3541bb21 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArray.java @@ -118,7 +118,7 @@ protected DoubleSparseNdArray( DoubleDataBuffer dataBuffer, double defaultValue, DimensionalSpace dimensions) { super(defaultValue, dimensions); // use write to set up the indices and values - write(dataBuffer); + copyFrom(dataBuffer); } /** @@ -257,7 +257,7 @@ public static DoubleSparseNdArray create( */ public static DoubleSparseNdArray create(DoubleNdArray src) { DoubleDataBuffer buffer = DataBuffers.ofDoubles(src.size()); - src.read(buffer); + src.copyTo(buffer); return new DoubleSparseNdArray(buffer, DimensionalSpace.create(src.shape())); } /** @@ -269,7 +269,7 @@ public static DoubleSparseNdArray create(DoubleNdArray src) { */ public static DoubleSparseNdArray create(DoubleNdArray src, double defaultValue) { DoubleDataBuffer buffer = DataBuffers.ofDoubles(src.size()); - src.read(buffer); + src.copyTo(buffer); return new DoubleSparseNdArray(buffer, defaultValue, DimensionalSpace.create(src.shape())); } @@ -303,13 +303,13 @@ public DoubleNdArray setDouble(double value, long... coordinates) { /** {@inheritDoc} */ @Override - public DoubleNdArray read(DataBuffer dst) { - return read((DoubleDataBuffer) dst); + public DoubleNdArray copyTo(DataBuffer dst) { + return copyTo((DoubleDataBuffer) dst); } /** {@inheritDoc} */ @Override - public DoubleNdArray read(DoubleDataBuffer dst) { + public DoubleNdArray copyTo(DoubleDataBuffer dst) { // set buf to the default values, then overwrite with the indices/values. Double[] defaults = new Double[(int) shape().size()]; Arrays.fill(defaults, getDefaultValue()); @@ -329,7 +329,7 @@ public DoubleNdArray read(DoubleDataBuffer dst) { /** {@inheritDoc} */ @Override - public DoubleNdArray write(DoubleDataBuffer src) { + public DoubleNdArray copyFrom(DoubleDataBuffer src) { List indices = new ArrayList<>(); List values = new ArrayList<>(); @@ -353,8 +353,8 @@ public DoubleNdArray write(DoubleDataBuffer src) { /** {@inheritDoc} */ @Override - public DoubleNdArray write(DataBuffer src) { - return write((DoubleDataBuffer) src); + public DoubleNdArray copyFrom(DataBuffer src) { + return copyFrom((DoubleDataBuffer) src); } /** @@ -364,7 +364,7 @@ public DoubleNdArray write(DataBuffer src) { */ public DoubleNdArray toDense() { DoubleDataBuffer dataBuffer = DataBuffers.ofDoubles(shape().size()); - read(dataBuffer); + copyTo(dataBuffer); return NdArrays.wrap(shape(), dataBuffer); } @@ -376,8 +376,8 @@ public DoubleNdArray toDense() { */ public DoubleNdArray fromDense(DoubleNdArray src) { DoubleDataBuffer buffer = DataBuffers.ofDoubles(src.size()); - src.read(buffer); - write(buffer); + src.copyTo(buffer); + copyFrom(buffer); return this; } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArray.java index 9b224a03540..88f34b16e31 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArray.java @@ -118,7 +118,7 @@ protected FloatSparseNdArray( FloatSparseNdArray(FloatDataBuffer dataBuffer, float defaultValue, DimensionalSpace dimensions) { super(defaultValue, dimensions); // use write to set up the indices and values - write(dataBuffer); + copyFrom(dataBuffer); } /** @@ -255,7 +255,7 @@ public static FloatSparseNdArray create(FloatDataBuffer buffer, float defaultVal */ public static FloatSparseNdArray create(FloatNdArray src) { FloatDataBuffer buffer = DataBuffers.ofFloats(src.size()); - src.read(buffer); + src.copyTo(buffer); return new FloatSparseNdArray(buffer, DimensionalSpace.create(src.shape())); } /** @@ -267,7 +267,7 @@ public static FloatSparseNdArray create(FloatNdArray src) { */ public static FloatSparseNdArray create(FloatNdArray src, float defaultValue) { FloatDataBuffer buffer = DataBuffers.ofFloats(src.size()); - src.read(buffer); + src.copyTo(buffer); return new FloatSparseNdArray(buffer, defaultValue, DimensionalSpace.create(src.shape())); } @@ -301,13 +301,13 @@ public FloatNdArray setFloat(float value, long... coordinates) { /** {@inheritDoc} */ @Override - public FloatNdArray read(DataBuffer dst) { - return read((FloatDataBuffer) dst); + public FloatNdArray copyTo(DataBuffer dst) { + return copyTo((FloatDataBuffer) dst); } /** {@inheritDoc} */ @Override - public FloatNdArray read(FloatDataBuffer dst) { + public FloatNdArray copyTo(FloatDataBuffer dst) { // set the values in buf to the default, then overwrite with indices/values Float[] defaults = new Float[(int) shape().size()]; Arrays.fill(defaults, getDefaultValue()); @@ -327,7 +327,7 @@ public FloatNdArray read(FloatDataBuffer dst) { /** {@inheritDoc} */ @Override - public FloatNdArray write(FloatDataBuffer src) { + public FloatNdArray copyFrom(FloatDataBuffer src) { List indices = new ArrayList<>(); List values = new ArrayList<>(); @@ -351,8 +351,8 @@ public FloatNdArray write(FloatDataBuffer src) { /** {@inheritDoc} */ @Override - public FloatNdArray write(DataBuffer src) { - return write((FloatDataBuffer) src); + public FloatNdArray copyFrom(DataBuffer src) { + return copyFrom((FloatDataBuffer) src); } /** @@ -362,7 +362,7 @@ public FloatNdArray write(DataBuffer src) { */ public FloatNdArray toDense() { FloatDataBuffer dataBuffer = DataBuffers.ofFloats(shape().size()); - read(dataBuffer); + copyTo(dataBuffer); return NdArrays.wrap(shape(), dataBuffer); } @@ -374,8 +374,8 @@ public FloatNdArray toDense() { */ public FloatNdArray fromDense(FloatNdArray src) { FloatDataBuffer buffer = DataBuffers.ofFloats(src.size()); - src.read(buffer); - write(buffer); + src.copyTo(buffer); + copyFrom(buffer); return this; } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArray.java index 757363f64f6..d79c4415aab 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArray.java @@ -116,7 +116,7 @@ protected IntSparseNdArray( IntSparseNdArray(IntDataBuffer dataBuffer, int defaultValue, DimensionalSpace dimensions) { super(defaultValue, dimensions); // use write to set up the indices and values - write(dataBuffer); + copyFrom(dataBuffer); } /** @@ -269,7 +269,7 @@ public static IntSparseNdArray create(IntDataBuffer buffer, int defaultValue, Sh */ public static IntSparseNdArray create(IntNdArray src) { IntDataBuffer buffer = DataBuffers.ofInts(src.size()); - src.read(buffer); + src.copyTo(buffer); return new IntSparseNdArray(buffer, DimensionalSpace.create(src.shape())); } @@ -282,7 +282,7 @@ public static IntSparseNdArray create(IntNdArray src) { */ public static IntSparseNdArray create(IntNdArray src, int defaultValue) { IntDataBuffer buffer = DataBuffers.ofInts(src.size()); - src.read(buffer); + src.copyTo(buffer); return new IntSparseNdArray(buffer, defaultValue, DimensionalSpace.create(src.shape())); } @@ -316,13 +316,13 @@ public IntNdArray setInt(int value, long... coordinates) { /** {@inheritDoc} */ @Override - public IntNdArray read(DataBuffer dst) { - return read((IntDataBuffer) dst); + public IntNdArray copyTo(DataBuffer dst) { + return copyTo((IntDataBuffer) dst); } /** {@inheritDoc} */ @Override - public IntNdArray read(IntDataBuffer dst) { + public IntNdArray copyTo(IntDataBuffer dst) { // set the values in buf to the default, then overwrite with indices/values Integer[] defaults = new Integer[(int) shape().size()]; Arrays.fill(defaults, getDefaultValue()); @@ -342,7 +342,7 @@ public IntNdArray read(IntDataBuffer dst) { /** {@inheritDoc} */ @Override - public IntNdArray write(IntDataBuffer src) { + public IntNdArray copyFrom(IntDataBuffer src) { List indices = new ArrayList<>(); List values = new ArrayList<>(); @@ -366,8 +366,8 @@ public IntNdArray write(IntDataBuffer src) { /** {@inheritDoc} */ @Override - public IntNdArray write(DataBuffer src) { - return write((IntDataBuffer) src); + public IntNdArray copyFrom(DataBuffer src) { + return copyFrom((IntDataBuffer) src); } /** @@ -377,7 +377,7 @@ public IntNdArray write(DataBuffer src) { */ public IntNdArray toDense() { IntDataBuffer dataBuffer = DataBuffers.ofInts(shape().size()); - read(dataBuffer); + copyTo(dataBuffer); return NdArrays.wrap(shape(), dataBuffer); } @@ -389,8 +389,8 @@ public IntNdArray toDense() { */ public IntNdArray fromDense(IntNdArray src) { IntDataBuffer buffer = DataBuffers.ofInts(src.size()); - src.read(buffer); - write(buffer); + src.copyTo(buffer); + copyFrom(buffer); return this; } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArray.java index 242ba5077d0..1c01198e71f 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArray.java @@ -117,7 +117,7 @@ protected LongSparseNdArray( LongSparseNdArray(LongDataBuffer dataBuffer, long defaultValue, DimensionalSpace dimensions) { super(defaultValue, dimensions); // use write to set up the indices and values - write(dataBuffer); + copyFrom(dataBuffer); } /** @@ -254,7 +254,7 @@ public static LongSparseNdArray create(LongDataBuffer buffer, long defaultValue, */ public static LongSparseNdArray create(LongNdArray src) { LongDataBuffer buffer = DataBuffers.ofLongs(src.size()); - src.read(buffer); + src.copyTo(buffer); return new LongSparseNdArray(buffer, DimensionalSpace.create(src.shape())); } @@ -267,7 +267,7 @@ public static LongSparseNdArray create(LongNdArray src) { */ public static LongSparseNdArray create(LongNdArray src, long defaultValue) { LongDataBuffer buffer = DataBuffers.ofLongs(src.size()); - src.read(buffer); + src.copyTo(buffer); return new LongSparseNdArray(buffer, defaultValue, DimensionalSpace.create(src.shape())); } @@ -301,13 +301,13 @@ public LongNdArray setLong(long value, long... coordinates) { /** {@inheritDoc} */ @Override - public LongNdArray read(DataBuffer dst) { - return read((LongDataBuffer) dst); + public LongNdArray copyTo(DataBuffer dst) { + return copyTo((LongDataBuffer) dst); } /** {@inheritDoc} */ @Override - public LongNdArray read(LongDataBuffer dst) { + public LongNdArray copyTo(LongDataBuffer dst) { // set the values in buf to the default, then overwrite with indices/values Long[] defaults = new Long[(int) shape().size()]; Arrays.fill(defaults, getDefaultValue()); @@ -327,7 +327,7 @@ public LongNdArray read(LongDataBuffer dst) { /** {@inheritDoc} */ @Override - public LongNdArray write(LongDataBuffer src) { + public LongNdArray copyFrom(LongDataBuffer src) { List indices = new ArrayList<>(); List values = new ArrayList<>(); @@ -351,8 +351,8 @@ public LongNdArray write(LongDataBuffer src) { /** {@inheritDoc} */ @Override - public LongNdArray write(DataBuffer src) { - return write((LongDataBuffer) src); + public LongNdArray copyFrom(DataBuffer src) { + return copyFrom((LongDataBuffer) src); } /** @@ -362,7 +362,7 @@ public LongNdArray write(DataBuffer src) { */ public LongNdArray toDense() { LongDataBuffer dataBuffer = DataBuffers.ofLongs(shape().size()); - read(dataBuffer); + copyTo(dataBuffer); return NdArrays.wrap(shape(), dataBuffer); } @@ -374,8 +374,8 @@ public LongNdArray toDense() { */ public LongNdArray fromDense(LongNdArray src) { LongDataBuffer buffer = DataBuffers.ofLongs(src.size()); - src.read(buffer); - write(buffer); + src.copyTo(buffer); + copyFrom(buffer); return this; } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArray.java index 63dde22d7ed..051a7cb5d49 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArray.java @@ -118,7 +118,7 @@ protected ShortSparseNdArray( ShortSparseNdArray(ShortDataBuffer dataBuffer, short defaultValue, DimensionalSpace dimensions) { super(defaultValue, dimensions); // use write to set up the indices and values - write(dataBuffer); + copyFrom(dataBuffer); } /** @@ -255,7 +255,7 @@ public static ShortSparseNdArray create(ShortDataBuffer buffer, short defaultVal */ public static ShortSparseNdArray create(ShortNdArray src) { ShortDataBuffer buffer = DataBuffers.ofShorts(src.size()); - src.read(buffer); + src.copyTo(buffer); return new ShortSparseNdArray(buffer, DimensionalSpace.create(src.shape())); } @@ -268,7 +268,7 @@ public static ShortSparseNdArray create(ShortNdArray src) { */ public static ShortSparseNdArray create(ShortNdArray src, short defaultValue) { ShortDataBuffer buffer = DataBuffers.ofShorts(src.size()); - src.read(buffer); + src.copyTo(buffer); return new ShortSparseNdArray(buffer, defaultValue, DimensionalSpace.create(src.shape())); } @@ -302,13 +302,13 @@ public ShortNdArray setShort(short value, long... coordinates) { /** {@inheritDoc} */ @Override - public ShortNdArray read(DataBuffer dst) { - return read((ShortDataBuffer) dst); + public ShortNdArray copyTo(DataBuffer dst) { + return copyTo((ShortDataBuffer) dst); } /** {@inheritDoc} */ @Override - public ShortNdArray read(ShortDataBuffer dst) { + public ShortNdArray copyTo(ShortDataBuffer dst) { // set the values in buf to the default, then overwrite with indices/values Short[] defaults = new Short[(int) shape().size()]; Arrays.fill(defaults, getDefaultValue()); @@ -328,7 +328,7 @@ public ShortNdArray read(ShortDataBuffer dst) { /** {@inheritDoc} */ @Override - public ShortNdArray write(ShortDataBuffer src) { + public ShortNdArray copyFrom(ShortDataBuffer src) { List indices = new ArrayList<>(); List values = new ArrayList<>(); @@ -352,8 +352,8 @@ public ShortNdArray write(ShortDataBuffer src) { /** {@inheritDoc} */ @Override - public ShortNdArray write(DataBuffer src) { - return write((ShortDataBuffer) src); + public ShortNdArray copyFrom(DataBuffer src) { + return copyFrom((ShortDataBuffer) src); } /** @@ -363,7 +363,7 @@ public ShortNdArray write(DataBuffer src) { */ public ShortNdArray toDense() { ShortDataBuffer dataBuffer = DataBuffers.ofShorts(shape().size()); - read(dataBuffer); + copyTo(dataBuffer); return NdArrays.wrap(shape(), dataBuffer); } @@ -375,8 +375,8 @@ public ShortNdArray toDense() { */ public ShortNdArray fromDense(ShortNdArray src) { ShortDataBuffer buffer = DataBuffers.ofShorts(src.size()); - src.read(buffer); - write(buffer); + src.copyTo(buffer); + copyFrom(buffer); return this; } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/SparseNdArray.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/SparseNdArray.java index 52b3867c8f7..c6d93f27996 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/SparseNdArray.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/SparseNdArray.java @@ -123,7 +123,7 @@ protected SparseNdArray( super(defaultValue, dimensions); this.type = type; // use write to set up the indices and values - write(dataBuffer); + copyFrom(dataBuffer); } /** @@ -266,7 +266,7 @@ public static > SparseNdArray create( */ public static > SparseNdArray create(Class type, U src) { DataBuffer buffer = DataBuffers.ofObjects(type, src.size()); - src.read(buffer); + src.copyTo(buffer); return new SparseNdArray<>(type, buffer, DimensionalSpace.create(src.shape())); } /** @@ -279,7 +279,7 @@ public static > SparseNdArray create(Class type public static > SparseNdArray create( Class type, U src, T defaultValue) { DataBuffer buffer = DataBuffers.ofObjects(type, src.size()); - src.read(buffer); + src.copyTo(buffer); return new SparseNdArray<>(type, buffer, defaultValue, DimensionalSpace.create(src.shape())); } @@ -312,7 +312,7 @@ public U slice(long position, DimensionalSpace sliceDimensions) { /** {@inheritDoc} */ @Override - public NdArray read(DataBuffer dst) { + public NdArray copyTo(DataBuffer dst) { // set the values in buf to the default, then overwrite with indices/values @SuppressWarnings("unchecked") T[] defaults = (T[]) Array.newInstance(type, (int) dst.size()); @@ -336,7 +336,7 @@ public NdArray read(DataBuffer dst) { @SuppressWarnings({ "unchecked", }) - public NdArray write(DataBuffer src) { + public NdArray copyFrom(DataBuffer src) { List indices = new ArrayList<>(); List values = new ArrayList<>(); @@ -368,7 +368,7 @@ public NdArray write(DataBuffer src) { @SuppressWarnings("unchecked") public U toDense() { DataBuffer dataBuffer = DataBuffers.ofObjects(type, shape().size()); - read(dataBuffer); + copyTo(dataBuffer); // unchecked cast, suppressed. return (U) NdArrays.wrap(shape(), dataBuffer); } @@ -381,8 +381,8 @@ public U toDense() { */ public NdArray fromDense(NdArray src) { DataBuffer buffer = DataBuffers.ofObjects(type, src.size()); - src.read(buffer); - write(buffer); + src.copyTo(buffer); + copyFrom(buffer); return this; } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/BooleanSparseSlice.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/BooleanSparseSlice.java index 24283dbd41e..945ccdc5a06 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/BooleanSparseSlice.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/BooleanSparseSlice.java @@ -49,7 +49,7 @@ public BooleanSparseSlice( @Override public BooleanNdArray toDense() { BooleanDataBuffer dataBuffer = DataBuffers.ofBooleans(shape().size()); - read(dataBuffer); + copyTo(dataBuffer); return NdArrays.wrap(shape(), dataBuffer); } @@ -75,7 +75,7 @@ public BooleanNdArray set(NdArray src, long... coordinates) { /** {@inheritDoc} */ @Override - public BooleanNdArray read(DataBuffer dst) { + public BooleanNdArray copyTo(DataBuffer dst) { // zero out buf. Boolean[] defaults = new Boolean[(int) shape().size()]; dst.write(defaults); @@ -93,17 +93,17 @@ public BooleanNdArray read(DataBuffer dst) { } @Override - public BooleanNdArray read(BooleanDataBuffer dst) { - return read((DataBuffer) dst); + public BooleanNdArray copyTo(BooleanDataBuffer dst) { + return copyTo((DataBuffer) dst); } @Override - public BooleanNdArray write(DataBuffer src) { + public BooleanNdArray copyFrom(DataBuffer src) { throw new ReadOnlyBufferException(); } @Override - public BooleanNdArray write(BooleanDataBuffer src) { + public BooleanNdArray copyFrom(BooleanDataBuffer src) { throw new ReadOnlyBufferException(); } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ByteSparseSlice.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ByteSparseSlice.java index a8ced3b762c..35e33d9d4fe 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ByteSparseSlice.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ByteSparseSlice.java @@ -48,7 +48,7 @@ public ByteSparseSlice( @Override public ByteNdArray toDense() { ByteDataBuffer dataBuffer = DataBuffers.ofBytes(shape().size()); - read(dataBuffer); + copyTo(dataBuffer); return NdArrays.wrap(shape(), dataBuffer); } @@ -74,7 +74,7 @@ public ByteNdArray set(NdArray src, long... coordinates) { /** {@inheritDoc} */ @Override - public ByteNdArray read(DataBuffer dst) { + public ByteNdArray copyTo(DataBuffer dst) { // zero out buf. Byte[] defaults = new Byte[(int) shape().size()]; dst.write(defaults); @@ -92,17 +92,17 @@ public ByteNdArray read(DataBuffer dst) { } @Override - public ByteNdArray read(ByteDataBuffer dst) { - return read((DataBuffer) dst); + public ByteNdArray copyTo(ByteDataBuffer dst) { + return this.copyTo((DataBuffer) dst); } @Override - public ByteNdArray write(DataBuffer src) { + public ByteNdArray copyFrom(DataBuffer src) { throw new ReadOnlyBufferException(); } @Override - public ByteNdArray write(ByteDataBuffer src) { + public ByteNdArray copyFrom(ByteDataBuffer src) { throw new ReadOnlyBufferException(); } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/DoubleSparseSlice.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/DoubleSparseSlice.java index 596be18fc99..3f66308e5fa 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/DoubleSparseSlice.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/DoubleSparseSlice.java @@ -49,7 +49,7 @@ public DoubleSparseSlice( @Override public DoubleNdArray toDense() { DoubleDataBuffer dataBuffer = DataBuffers.ofDoubles(shape().size()); - read(dataBuffer); + copyTo(dataBuffer); return NdArrays.wrap(shape(), dataBuffer); } @@ -75,7 +75,7 @@ public DoubleNdArray set(NdArray src, long... coordinates) { /** {@inheritDoc} */ @Override - public DoubleNdArray read(DataBuffer dst) { + public DoubleNdArray copyTo(DataBuffer dst) { // set the values in buf to the default, then overwrite with indices/values Double[] defaults = new Double[(int) shape().size()]; Arrays.fill(defaults, getDefaultValue()); @@ -94,17 +94,17 @@ public DoubleNdArray read(DataBuffer dst) { } @Override - public DoubleNdArray read(DoubleDataBuffer dst) { - return read((DataBuffer) dst); + public DoubleNdArray copyTo(DoubleDataBuffer dst) { + return this.copyTo((DataBuffer) dst); } @Override - public DoubleNdArray write(DataBuffer src) { + public DoubleNdArray copyFrom(DataBuffer src) { throw new ReadOnlyBufferException(); } @Override - public DoubleNdArray write(DoubleDataBuffer src) { + public DoubleNdArray copyFrom(DoubleDataBuffer src) { throw new ReadOnlyBufferException(); } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/FloatSparseSlice.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/FloatSparseSlice.java index 5e6094d763e..8e2204d5a5a 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/FloatSparseSlice.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/FloatSparseSlice.java @@ -49,7 +49,7 @@ public FloatSparseSlice( @Override public FloatNdArray toDense() { FloatDataBuffer dataBuffer = DataBuffers.ofFloats(shape().size()); - read(dataBuffer); + copyTo(dataBuffer); return NdArrays.wrap(shape(), dataBuffer); } @@ -75,7 +75,7 @@ public FloatNdArray set(NdArray src, long... coordinates) { /** {@inheritDoc} */ @Override - public FloatNdArray read(DataBuffer dst) { + public FloatNdArray copyTo(DataBuffer dst) { // set the values in buf to the default, then overwrite with indices/values Float[] defaults = new Float[(int) shape().size()]; Arrays.fill(defaults, getDefaultValue()); @@ -94,17 +94,17 @@ public FloatNdArray read(DataBuffer dst) { } @Override - public FloatNdArray read(FloatDataBuffer dst) { - return read((DataBuffer) dst); + public FloatNdArray copyTo(FloatDataBuffer dst) { + return this.copyTo((DataBuffer) dst); } @Override - public FloatNdArray write(DataBuffer src) { + public FloatNdArray copyFrom(DataBuffer src) { throw new ReadOnlyBufferException(); } @Override - public FloatNdArray write(FloatDataBuffer src) { + public FloatNdArray copyFrom(FloatDataBuffer src) { throw new ReadOnlyBufferException(); } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/IntSparseSlice.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/IntSparseSlice.java index 067c64b223d..988551bee34 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/IntSparseSlice.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/IntSparseSlice.java @@ -49,7 +49,7 @@ public IntSparseSlice( @Override public IntNdArray toDense() { IntDataBuffer dataBuffer = DataBuffers.ofInts(shape().size()); - read(dataBuffer); + copyTo(dataBuffer); return NdArrays.wrap(shape(), dataBuffer); } @@ -75,7 +75,7 @@ public IntNdArray set(NdArray src, long... coordinates) { /** {@inheritDoc} */ @Override - public IntNdArray read(DataBuffer dst) { + public IntNdArray copyTo(DataBuffer dst) { // set the values in buf to the default, then overwrite with indices/values Integer[] defaults = new Integer[(int) shape().size()]; Arrays.fill(defaults, getDefaultValue()); @@ -94,17 +94,17 @@ public IntNdArray read(DataBuffer dst) { } @Override - public IntNdArray read(IntDataBuffer dst) { - return read((DataBuffer) dst); + public IntNdArray copyTo(IntDataBuffer dst) { + return this.copyTo((DataBuffer) dst); } @Override - public IntNdArray write(DataBuffer src) { + public IntNdArray copyFrom(DataBuffer src) { throw new ReadOnlyBufferException(); } @Override - public IntNdArray write(IntDataBuffer src) { + public IntNdArray copyFrom(IntDataBuffer src) { throw new ReadOnlyBufferException(); } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/LongSparseSlice.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/LongSparseSlice.java index ea182b7fdf3..0916293633c 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/LongSparseSlice.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/LongSparseSlice.java @@ -49,7 +49,7 @@ public LongSparseSlice( @Override public LongNdArray toDense() { LongDataBuffer dataBuffer = DataBuffers.ofLongs(shape().size()); - read(dataBuffer); + copyTo(dataBuffer); return NdArrays.wrap(shape(), dataBuffer); } @@ -75,7 +75,7 @@ public LongNdArray set(NdArray src, long... coordinates) { /** {@inheritDoc} */ @Override - public LongNdArray read(DataBuffer dst) { + public LongNdArray copyTo(DataBuffer dst) { // set the values in buf to the default, then overwrite with indices/values Long[] defaults = new Long[(int) shape().size()]; Arrays.fill(defaults, getDefaultValue()); @@ -94,17 +94,17 @@ public LongNdArray read(DataBuffer dst) { } @Override - public LongNdArray read(LongDataBuffer dst) { - return read((DataBuffer) dst); + public LongNdArray copyTo(LongDataBuffer dst) { + return copyTo((DataBuffer) dst); } @Override - public LongNdArray write(DataBuffer src) { + public LongNdArray copyFrom(DataBuffer src) { throw new ReadOnlyBufferException(); } @Override - public LongNdArray write(LongDataBuffer src) { + public LongNdArray copyFrom(LongDataBuffer src) { throw new ReadOnlyBufferException(); } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ObjectSparseSlice.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ObjectSparseSlice.java index be7f9f49ff9..9f62bf80ffe 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ObjectSparseSlice.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ObjectSparseSlice.java @@ -48,7 +48,7 @@ public ObjectSparseSlice( @SuppressWarnings("unchecked") public U toDense() { DataBuffer dataBuffer = DataBuffers.ofObjects(getType(), shape().size()); - read(dataBuffer); + copyTo(dataBuffer); // unchecked NdArray to U return (U) NdArrays.wrap(shape(), dataBuffer); } @@ -66,7 +66,7 @@ public U set(NdArray src, long... coordinates) { /** {@inheritDoc} */ @Override @SuppressWarnings("unchecked") - public U read(DataBuffer dst) { + public U copyTo(DataBuffer dst) { // unchecked Object to T[] T[] defaults = (T[]) Array.newInstance(getType(), (int) dst.size()); Arrays.fill(defaults, getDefaultValue()); diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ShortSparseSlice.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ShortSparseSlice.java index 16aa5612c7f..2da0f8c83a6 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ShortSparseSlice.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ShortSparseSlice.java @@ -49,7 +49,7 @@ public ShortSparseSlice( @Override public ShortNdArray toDense() { ShortDataBuffer dataBuffer = DataBuffers.ofShorts(shape().size()); - read(dataBuffer); + copyTo(dataBuffer); return NdArrays.wrap(shape(), dataBuffer); } @@ -75,7 +75,7 @@ public ShortNdArray set(NdArray src, long... coordinates) { /** {@inheritDoc} */ @Override - public ShortNdArray read(DataBuffer dst) { + public ShortNdArray copyTo(DataBuffer dst) { // set the values in buf to the default, then overwrite with indices/values Short[] defaults = new Short[(int) shape().size()]; Arrays.fill(defaults, getDefaultValue()); @@ -94,17 +94,17 @@ public ShortNdArray read(DataBuffer dst) { } @Override - public ShortNdArray read(ShortDataBuffer dst) { - return read((DataBuffer) dst); + public ShortNdArray copyTo(ShortDataBuffer dst) { + return this.copyTo((DataBuffer) dst); } @Override - public ShortNdArray write(DataBuffer src) { + public ShortNdArray copyFrom(DataBuffer src) { throw new ReadOnlyBufferException(); } @Override - public ShortNdArray write(ShortDataBuffer src) { + public ShortNdArray copyFrom(ShortDataBuffer src) { throw new ReadOnlyBufferException(); } diff --git a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/SparseSlice.java b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/SparseSlice.java index e0db8398fe6..3e5be6f4246 100644 --- a/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/SparseSlice.java +++ b/ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/SparseSlice.java @@ -133,7 +133,7 @@ public NdArraySequence elements(int dimensionIdx) { /** {@inheritDoc} */ @Override - public NdArray write(DataBuffer src) { + public NdArray copyFrom(DataBuffer src) { throw new ReadOnlyBufferException(); } diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/NdArrayTestBase.java b/ndarray/src/test/java/org/tensorflow/ndarray/NdArrayTestBase.java index 577c2b75e50..36064d24a73 100644 --- a/ndarray/src/test/java/org/tensorflow/ndarray/NdArrayTestBase.java +++ b/ndarray/src/test/java/org/tensorflow/ndarray/NdArrayTestBase.java @@ -258,7 +258,7 @@ public void writeAndReadWithBuffers() { buffer.setObject(valueOf(val), val); } NdArray matrix = allocate(Shape.of(3, 5)); - matrix.write(buffer); + matrix.copyFrom(buffer); assertEquals(valueOf(0L), matrix.getObject(0, 0)); assertEquals(valueOf(4L), matrix.getObject(0, 4)); assertEquals(valueOf(5L), matrix.getObject(1, 0)); @@ -266,7 +266,7 @@ public void writeAndReadWithBuffers() { assertEquals(valueOf(14L), matrix.getObject(2, 4)); matrix.setObject(valueOf(100L), 1, 0); - matrix.read(buffer); + matrix.copyTo(buffer); assertEquals(valueOf(0L), buffer.getObject(0)); assertEquals(valueOf(4L), buffer.getObject(4)); assertEquals(valueOf(100L), buffer.getObject(5)); @@ -274,13 +274,13 @@ public void writeAndReadWithBuffers() { assertEquals(valueOf(14L), buffer.getObject(14)); try { - matrix.write(buffer.narrow(10)); + matrix.copyFrom(buffer.narrow(10)); fail(); } catch (BufferUnderflowException e) { // as expected } try { - matrix.read(buffer.narrow(10)); + matrix.copyTo(buffer.narrow(10)); fail(); } catch (BufferOverflowException e) { // as expected diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArrayTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArrayTest.java index bcb7235f72d..ecd9e8520eb 100644 --- a/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArrayTest.java +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArrayTest.java @@ -47,12 +47,12 @@ public void testBasic() { } @Test - public void testRead() { + public void testCopyToBuffer() { BooleanSparseNdArray instance = new BooleanSparseNdArray(indices, values, DimensionalSpace.create(shape)); BooleanDataBuffer dataBuffer = DataBuffers.ofBooleans(instance.shape().size()); - instance.read(dataBuffer); + instance.copyTo(dataBuffer); boolean[] array = new boolean[denseArray.length]; dataBuffer.read(array); @@ -60,12 +60,12 @@ public void testRead() { } @Test - public void testWrite() { + public void testCopyFromBuffer() { BooleanDataBuffer dataBuffer = RawDataBufferFactory.create(denseArray, false); // use a zero buffer BooleanSparseNdArray instance = BooleanSparseNdArray.create(DimensionalSpace.create(shape)); - instance.write(dataBuffer); + instance.copyFrom(dataBuffer); assertEquals(indices, instance.getIndices()); assertEquals(values, instance.getValues()); @@ -84,7 +84,7 @@ public void testWriteDefaultValue() { // use a zero buffer BooleanSparseNdArray instance = BooleanSparseNdArray.create(true, DimensionalSpace.create(shape)); - instance.write(dataBuffer); + instance.copyFrom(dataBuffer); assertEquals(indices, instance.getIndices()); assertEquals(valuesDefault, instance.getValues()); @@ -274,7 +274,7 @@ public void testCreate() { BooleanDataBuffer dataBuffer = RawDataBufferFactory.create(denseArray, false); // use a zero buffer BooleanSparseNdArray instanceB = BooleanSparseNdArray.create(DimensionalSpace.create(shape)); - instanceB.write(dataBuffer); + instanceB.copyFrom(dataBuffer); assertEquals(instance, instanceB); BooleanSparseNdArray instanceC = diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArrayTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArrayTest.java index 7dd9df277ed..efa05720e00 100644 --- a/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArrayTest.java +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArrayTest.java @@ -45,12 +45,12 @@ public void testBasic() { } @Test - public void testRead() { + public void testCopyToBuffer() { ByteSparseNdArray instance = new ByteSparseNdArray(indices, values, DimensionalSpace.create(shape)); ByteDataBuffer dataBuffer = DataBuffers.ofBytes(instance.shape().size()); - instance.read(dataBuffer); + instance.copyTo(dataBuffer); byte[] array = new byte[denseArray.length]; dataBuffer.read(array); @@ -58,12 +58,12 @@ public void testRead() { } @Test - public void testWrite() { + public void testCopyFromBuffer() { ByteDataBuffer dataBuffer = RawDataBufferFactory.create(denseArray, false); // use a zero buffer ByteSparseNdArray instance = ByteSparseNdArray.create(DimensionalSpace.create(shape)); - instance.write(dataBuffer); + instance.copyFrom(dataBuffer); assertEquals(indices, instance.getIndices()); assertEquals(values, instance.getValues()); @@ -80,7 +80,7 @@ public void testWriteDefaultValue() { // use a zero buffer ByteSparseNdArray instance = ByteSparseNdArray.create((byte) -1, DimensionalSpace.create(shape)); - instance.write(dataBuffer); + instance.copyFrom(dataBuffer); assertEquals(indices, instance.getIndices()); assertEquals(values, instance.getValues()); @@ -265,7 +265,7 @@ public void testCreate() { ByteDataBuffer dataBuffer = RawDataBufferFactory.create(denseArray, false); // use a zero buffer ByteSparseNdArray instanceB = ByteSparseNdArray.create(DimensionalSpace.create(shape)); - instanceB.write(dataBuffer); + instanceB.copyFrom(dataBuffer); assertEquals(instance, instanceB); ByteSparseNdArray instanceC = diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArrayTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArrayTest.java index 616863ebe4d..f7ff65f1a04 100644 --- a/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArrayTest.java +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArrayTest.java @@ -49,12 +49,12 @@ public void testBasic() { } @Test - public void testRead() { + public void testCopyToBuffer() { DoubleSparseNdArray instance = new DoubleSparseNdArray(indices, values, DimensionalSpace.create(shape)); DoubleDataBuffer dataBuffer = DataBuffers.ofDoubles(instance.shape().size()); - instance.read(dataBuffer); + instance.copyTo(dataBuffer); double[] array = new double[denseArray.length]; dataBuffer.read(array); @@ -62,12 +62,12 @@ public void testRead() { } @Test - public void testWrite() { + public void testCopyFromBuffer() { DoubleDataBuffer dataBuffer = NioDataBufferFactory.create(DoubleBuffer.wrap(denseArray)); // use a zero buffer DoubleSparseNdArray instance = DoubleSparseNdArray.create(DimensionalSpace.create(shape)); - instance.write(dataBuffer); + instance.copyFrom(dataBuffer); assertEquals(indices, instance.getIndices()); assertEquals(values, instance.getValues()); @@ -80,7 +80,7 @@ public void testWriteDefaultValue() { DoubleDataBuffer dataBuffer = RawDataBufferFactory.create(denseArrayDefaultValue, false); // use a zero buffer DoubleSparseNdArray instance = DoubleSparseNdArray.create(-1d, DimensionalSpace.create(shape)); - instance.write(dataBuffer); + instance.copyFrom(dataBuffer); assertEquals(indices, instance.getIndices()); assertEquals(values, instance.getValues()); @@ -266,7 +266,7 @@ public void testCreate() { DoubleDataBuffer dataBuffer = RawDataBufferFactory.create(denseArray, false); // use a zero buffer DoubleSparseNdArray instanceB = DoubleSparseNdArray.create(DimensionalSpace.create(shape)); - instanceB.write(dataBuffer); + instanceB.copyFrom(dataBuffer); assertEquals(instance, instanceB); DoubleSparseNdArray instanceC = diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArrayTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArrayTest.java index f5f6ba422f3..d948d1ec476 100644 --- a/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArrayTest.java +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArrayTest.java @@ -46,12 +46,12 @@ public void testBasic() { } @Test - public void testRead() { + public void testCopyToBuffer() { FloatSparseNdArray instance = new FloatSparseNdArray(indices, values, DimensionalSpace.create(shape)); FloatDataBuffer dataBuffer = DataBuffers.ofFloats(instance.shape().size()); - instance.read(dataBuffer); + instance.copyTo(dataBuffer); float[] array = new float[denseArray.length]; dataBuffer.read(array); @@ -59,12 +59,12 @@ public void testRead() { } @Test - public void testWrite() { + public void testCopyFromBuffer() { FloatDataBuffer dataBuffer = NioDataBufferFactory.create(FloatBuffer.wrap(denseArray)); // use a zero buffer FloatSparseNdArray instance = FloatSparseNdArray.create(DimensionalSpace.create(shape)); - instance.write(dataBuffer); + instance.copyFrom(dataBuffer); assertEquals(indices, instance.getIndices()); assertEquals(values, instance.getValues()); @@ -80,7 +80,7 @@ public void testWriteDefaultValue() { FloatDataBuffer dataBuffer = RawDataBufferFactory.create(denseArrayDefaultValue, false); // use a zero buffer FloatSparseNdArray instance = FloatSparseNdArray.create(-1f, DimensionalSpace.create(shape)); - instance.write(dataBuffer); + instance.copyFrom(dataBuffer); assertEquals(indices, instance.getIndices()); assertEquals(values, instance.getValues()); @@ -274,7 +274,7 @@ public void testCreate() { FloatDataBuffer dataBuffer = RawDataBufferFactory.create(denseArray, false); // use a zero buffer FloatSparseNdArray instanceB = FloatSparseNdArray.create(DimensionalSpace.create(shape)); - instanceB.write(dataBuffer); + instanceB.copyFrom(dataBuffer); assertEquals(instance, instanceB); FloatSparseNdArray instanceC = diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArrayTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArrayTest.java index 8492493b93c..b60b7db540f 100644 --- a/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArrayTest.java +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArrayTest.java @@ -47,12 +47,12 @@ public void testBasic() { } @Test - public void testRead() { + public void testCopyToBuffer() { IntSparseNdArray instance = new IntSparseNdArray(indices, values, DimensionalSpace.create(shape)); IntDataBuffer dataBuffer = DataBuffers.ofInts(instance.shape().size()); - instance.read(dataBuffer); + instance.copyTo(dataBuffer); int[] array = new int[denseArray.length]; dataBuffer.read(array); @@ -60,12 +60,12 @@ public void testRead() { } @Test - public void testWrite() { + public void testCopyFromBufferBuffer() { IntDataBuffer dataBuffer = NioDataBufferFactory.create(IntBuffer.wrap(denseArray)); // use a zero buffer IntSparseNdArray instance = IntSparseNdArray.create(DimensionalSpace.create(shape)); - instance.write(dataBuffer); + instance.copyFrom(dataBuffer); assertEquals(indices, instance.getIndices()); assertEquals(values, instance.getValues()); @@ -79,7 +79,7 @@ public void testWriteDefaultValue() { IntDataBuffer dataBuffer = RawDataBufferFactory.create(denseArrayDefaultValue, false); // use a zero buffer IntSparseNdArray instance = IntSparseNdArray.create(-1, DimensionalSpace.create(shape)); - instance.write(dataBuffer); + instance.copyFrom(dataBuffer); assertEquals(indices, instance.getIndices()); assertEquals(values, instance.getValues()); @@ -272,7 +272,7 @@ public void testCreate() { IntDataBuffer dataBuffer = RawDataBufferFactory.create(denseArray, false); // use a zero buffer IntSparseNdArray instanceB = IntSparseNdArray.create(DimensionalSpace.create(shape)); - instanceB.write(dataBuffer); + instanceB.copyFrom(dataBuffer); assertEquals(instance, instanceB); IntSparseNdArray instanceC = diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArrayTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArrayTest.java index 0a4b6c66fb1..7f9a13682ea 100644 --- a/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArrayTest.java +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArrayTest.java @@ -46,12 +46,12 @@ public void testBasic() { } @Test - public void testRead() { + public void testCopyToBuffer() { LongSparseNdArray instance = new LongSparseNdArray(indices, values, DimensionalSpace.create(shape)); LongDataBuffer dataBuffer = DataBuffers.ofLongs(instance.shape().size()); - instance.read(dataBuffer); + instance.copyTo(dataBuffer); long[] array = new long[denseArray.length]; dataBuffer.read(array); @@ -59,12 +59,12 @@ public void testRead() { } @Test - public void testWrite() { + public void testCopyFromBuffer() { LongDataBuffer dataBuffer = NioDataBufferFactory.create(LongBuffer.wrap(denseArray)); // use a zero buffer LongSparseNdArray instance = LongSparseNdArray.create(DimensionalSpace.create(shape)); - instance.write(dataBuffer); + instance.copyFrom(dataBuffer); assertEquals(indices, instance.getIndices()); assertEquals(values, instance.getValues()); @@ -78,7 +78,7 @@ public void testWriteDefaultValue() { LongDataBuffer dataBuffer = RawDataBufferFactory.create(denseArrayDefaultValue, false); // use a zero buffer LongSparseNdArray instance = LongSparseNdArray.create(-1L, DimensionalSpace.create(shape)); - instance.write(dataBuffer); + instance.copyFrom(dataBuffer); assertEquals(indices, instance.getIndices()); assertEquals(values, instance.getValues()); @@ -271,7 +271,7 @@ public void testCreate() { LongDataBuffer dataBuffer = RawDataBufferFactory.create(denseArray, false); // use a zero buffer LongSparseNdArray instanceB = LongSparseNdArray.create(DimensionalSpace.create(shape)); - instanceB.write(dataBuffer); + instanceB.copyFrom(dataBuffer); assertEquals(instance, instanceB); LongSparseNdArray instanceC = diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArrayTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArrayTest.java index cec13589241..5f854130632 100644 --- a/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArrayTest.java +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArrayTest.java @@ -45,12 +45,12 @@ public void testBasic() { } @Test - public void testRead() { + public void testCopyToBuffer() { ShortSparseNdArray instance = new ShortSparseNdArray(indices, values, DimensionalSpace.create(shape)); ShortDataBuffer dataBuffer = DataBuffers.ofShorts(instance.shape().size()); - instance.read(dataBuffer); + instance.copyTo(dataBuffer); short[] array = new short[denseArray.length]; dataBuffer.read(array); @@ -58,12 +58,12 @@ public void testRead() { } @Test - public void testWrite() { + public void testCopyFromBuffer() { ShortDataBuffer dataBuffer = NioDataBufferFactory.create(ShortBuffer.wrap(denseArray)); // use a zero buffer ShortSparseNdArray instance = ShortSparseNdArray.create(DimensionalSpace.create(shape)); - instance.write(dataBuffer); + instance.copyFrom(dataBuffer); assertEquals(indices, instance.getIndices()); assertEquals(values, instance.getValues()); @@ -81,7 +81,7 @@ public void testWriteDefaultValue() { // use a zero buffer ShortSparseNdArray instance = ShortSparseNdArray.create((short) -1, DimensionalSpace.create(shape)); - instance.write(dataBuffer); + instance.copyFrom(dataBuffer); assertEquals(indices, instance.getIndices()); assertEquals(values, instance.getValues()); @@ -275,7 +275,7 @@ public void testCreate() { ShortDataBuffer dataBuffer = RawDataBufferFactory.create(denseArray, false); // use a zero buffer ShortSparseNdArray instanceB = ShortSparseNdArray.create(DimensionalSpace.create(shape)); - instanceB.write(dataBuffer); + instanceB.copyFrom(dataBuffer); assertEquals(instance, instanceB); ShortSparseNdArray instanceC = diff --git a/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/StringSparseNdArrayTest.java b/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/StringSparseNdArrayTest.java index 152a13e5f5a..a93cd4508fe 100644 --- a/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/StringSparseNdArrayTest.java +++ b/ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/StringSparseNdArrayTest.java @@ -64,12 +64,12 @@ public void testBasic() { } @Test - public void testRead() { + public void testCopyToBuffer() { SparseNdArray> instance = new SparseNdArray<>(String.class, indices, values, DimensionalSpace.create(shape)); DataBuffer dataBuffer = DataBuffers.ofObjects(String.class, instance.shape().size()); - instance.read(dataBuffer); + instance.copyTo(dataBuffer); String[] array = new String[denseArray.length]; dataBuffer.read(array); @@ -77,13 +77,13 @@ public void testRead() { } @Test - public void testWrite() { + public void testCopyFromBuffer() { DataBuffer dataBuffer = DataBuffers.ofObjects(denseArray); // use a zero buffer SparseNdArray> instance = SparseNdArray.create(String.class, DimensionalSpace.create(shape)); - instance.write(dataBuffer); + instance.copyFrom(dataBuffer); assertEquals(indices, instance.getIndices()); assertEquals(values, instance.getValues()); @@ -103,7 +103,7 @@ public void testWriteDefaultValue() { // use a zero buffer SparseNdArray> instance = SparseNdArray.create(String.class, defaultValue, DimensionalSpace.create(shape)); - instance.write(dataBuffer); + instance.copyFrom(dataBuffer); assertEquals(indices, instance.getIndices()); assertEquals(values, instance.getValues()); @@ -282,7 +282,7 @@ public void testCreate() { // use a zero buffer SparseNdArray> instanceB = SparseNdArray.create(String.class, DimensionalSpace.create(shape)); - instanceB.write(dataBuffer); + instanceB.copyFrom(dataBuffer); assertEquals(instance, instanceB); SparseNdArray> instanceC = From 08aa62f094ce7f4ae6d932ca8079a248600d17ce Mon Sep 17 00:00:00 2001 From: Karl Lessard Date: Tue, 20 Feb 2024 08:19:42 -0500 Subject: [PATCH 23/60] Releasing 1.0.0-rc.1 --- ndarray/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ndarray/pom.xml b/ndarray/pom.xml index 9966a354582..c7407f14ff7 100644 --- a/ndarray/pom.xml +++ b/ndarray/pom.xml @@ -22,7 +22,7 @@ org.tensorflow tensorflow-java-ndarray - 0.5.0-SNAPSHOT + 1.0.0-rc.1 ndarray jar From 8d4f06e04420468143eb66c5adc0d90341760dc8 Mon Sep 17 00:00:00 2001 From: Karl Lessard Date: Tue, 20 Feb 2024 21:28:17 -0500 Subject: [PATCH 24/60] Increase version for next iteration --- ndarray/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ndarray/pom.xml b/ndarray/pom.xml index c7407f14ff7..543cf706757 100644 --- a/ndarray/pom.xml +++ b/ndarray/pom.xml @@ -22,7 +22,7 @@ org.tensorflow tensorflow-java-ndarray - 1.0.0-rc.1 + 1.1.0-SNAPSHOT ndarray jar From d5d5e5156a9225421e94b7d06abe44fd7b72d919 Mon Sep 17 00:00:00 2001 From: Winfried Gerlach Date: Fri, 20 Jun 2025 19:23:16 +0200 Subject: [PATCH 25/60] add Gradle snippets to README.md --- README.md | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 00cacf870c4..595c096529a 100644 --- a/README.md +++ b/README.md @@ -44,17 +44,17 @@ See [CONTRIBUTING.md](CONTRIBUTING.md#building). ## Using Maven Artifacts There are two options for adding TensorFlow Java as a dependency to your Maven project: with individual dependencies -for each targeted platforms or with a single dependency that target them all. +for each targeted platform or with a single dependency that targets them all. ### Individual dependencies With this option, you must first add a dependency to `tensorflow-core-api` and then one or multiple dependencies to `tensorflow-core-native` with a classifier targeting a specific platform. This option is preferred as -it minimize the size of your application by only including the TensorFlow builds you need, at the cost of being more +it minimizes the size of your application by only including the TensorFlow builds you need, at the cost of being more restrictive. While TensorFlow Java can be compiled for [multiple platforms](https://github.com/tensorflow/java/blob/master/tensorflow-core/pom.xml#L54), -only binaries for the followings are being **supported and distributed** by this project: +only binaries for the following are being **supported and distributed** by this project: - `linux-x86_64`: Linux platforms on Intel/AMD chips - `linux-x86_64-gpu`: Linux platforms on Intel/AMD chips with Cuda GPU support @@ -80,6 +80,12 @@ systems with no GPU support, you should add the following dependencies: linux-x86_64 ``` +Or Gradle: +```groovy +def tfVersion = '1.0.0' +implementation "org.tensorflow:tensorflow-core-api:$tfVersion" +implementation "org.tensorflow:tensorflow-core-native:$tfVersion:linux-x86_64" +``` On the other hand, if you plan to deploy your JAR on more platforms, you need additional native dependencies as follows: @@ -108,13 +114,21 @@ native dependencies as follows: windows-x86_64 ``` +Or Gradle: +```groovy +def tfVersion = '1.0.0' +implementation "org.tensorflow:tensorflow-core-api:$tfVersion" +implementation "org.tensorflow:tensorflow-core-native:$tfVersion:linux-x86_64-gpu" +implementation "org.tensorflow:tensorflow-core-native:$tfVersion:macosx-arm64" +implementation "org.tensorflow:tensorflow-core-native:$tfVersion:windows-x86_64" +``` Only one dependency can be added per platform, meaning that you cannot add native dependencies to both `linux-x86_64` and `linux-x86_64-gpu` within the same project. To use an NVIDIA GPU, you need to install the NVIDIA device driver, CUDA Toolkit, and cuDNN. For Ubuntu 24.04, you can install them with the following command: -```sudo apt-get install -y nvidia-driver-550 nvidia-cuda-toolkit nvidia-cudnn``` +```sudo apt install -y nvidia-driver-550 nvidia-cuda-toolkit nvidia-cudnn``` ### Single dependency @@ -132,6 +146,10 @@ simply add this dependency to your application: 1.0.0 ``` +Or Gradle: +```groovy +implementation "org.tensorflow:tensorflow-core-platform:1.0.0" +``` Be aware though that the builds of TensorFlow are quite voluminous and including too many native dependencies may significantly increase the size of your application. So it is good practice to limit your dependencies to @@ -163,6 +181,20 @@ to add Sonatype OSS repository in your pom.xml, like the following ``` +Or Gradle: +```groovy +repositories { + mavenCentral() + maven { + url = uri("https://oss.sonatype.org/content/repositories/snapshots") + } +} + +dependencies { + // Example of dependency, see section above for more options + implementation "org.tensorflow:tensorflow-core-platform:1.1.0-SNAPSHOT" +} +``` ## TensorFlow/Java Version Support From e9c854fba1e4c175de7cc8df0fb4185b09dab229 Mon Sep 17 00:00:00 2001 From: Karl Lessard Date: Sat, 28 Jun 2025 23:24:32 -0400 Subject: [PATCH 26/60] Increase version for next iteration --- README.md | 6 +++--- docs/install.md | 2 +- pom.xml | 2 +- tensorflow-core/pom.xml | 2 +- tensorflow-core/tensorflow-core-api/pom.xml | 2 +- tensorflow-core/tensorflow-core-generator/pom.xml | 2 +- tensorflow-core/tensorflow-core-native/pom.xml | 2 +- tensorflow-core/tensorflow-core-platform/pom.xml | 2 +- tensorflow-framework/pom.xml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 33c78fe8f74..d81dcfd0d66 100644 --- a/README.md +++ b/README.md @@ -177,7 +177,7 @@ to add Sonatype OSS repository in your pom.xml, like the following org.tensorflow tensorflow-core-platform - 1.1.0-SNAPSHOT + 1.2.0-SNAPSHOT ``` @@ -192,7 +192,7 @@ repositories { dependencies { // Example of dependency, see section above for more options - implementation "org.tensorflow:tensorflow-core-platform:1.1.0-SNAPSHOT" + implementation "org.tensorflow:tensorflow-core-platform:1.2.0-SNAPSHOT" } ``` @@ -214,8 +214,8 @@ This table shows the mapping between TensorFlow, TensorFlow Java and minimum sup | 1.0.0-rc.1 | 2.16.1 | 11 | | 1.0.0-rc.2 | 2.16.2 | 11 | | 1.0.0 | 2.16.2 | 11 | -| 1.1.0-SNAPSHOT | 2.18.0 | 11 | | 1.1.0 | 2.18.0 | 11 | +| 1.2.0-SNAPSHOT | 2.18.0 | 11 | ## How to Contribute? diff --git a/docs/install.md b/docs/install.md index 0f94b563010..3014f0d1320 100644 --- a/docs/install.md +++ b/docs/install.md @@ -105,7 +105,7 @@ snapshots repository in your `pom.xml`. org.tensorflow tensorflow-core-platform - 1.1.0-SNAPSHOT + 1.2.0-SNAPSHOT ``` diff --git a/pom.xml b/pom.xml index 8f426115244..1a1853b15de 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ org.tensorflow tensorflow-java - 1.1.0 + 1.2.0-SNAPSHOT pom TensorFlow Java Parent diff --git a/tensorflow-core/pom.xml b/tensorflow-core/pom.xml index 7fc8b26e802..e40b06f7f33 100644 --- a/tensorflow-core/pom.xml +++ b/tensorflow-core/pom.xml @@ -22,7 +22,7 @@ org.tensorflow tensorflow-java - 1.1.0 + 1.2.0-SNAPSHOT tensorflow-core pom diff --git a/tensorflow-core/tensorflow-core-api/pom.xml b/tensorflow-core/tensorflow-core-api/pom.xml index 8ecfa41fcc8..0b87d9a17c2 100644 --- a/tensorflow-core/tensorflow-core-api/pom.xml +++ b/tensorflow-core/tensorflow-core-api/pom.xml @@ -6,7 +6,7 @@ org.tensorflow tensorflow-core - 1.1.0 + 1.2.0-SNAPSHOT tensorflow-core-api jar diff --git a/tensorflow-core/tensorflow-core-generator/pom.xml b/tensorflow-core/tensorflow-core-generator/pom.xml index dd544eaaa89..bb532f5deab 100644 --- a/tensorflow-core/tensorflow-core-generator/pom.xml +++ b/tensorflow-core/tensorflow-core-generator/pom.xml @@ -5,7 +5,7 @@ org.tensorflow tensorflow-core - 1.1.0 + 1.2.0-SNAPSHOT tensorflow-core-generator jar diff --git a/tensorflow-core/tensorflow-core-native/pom.xml b/tensorflow-core/tensorflow-core-native/pom.xml index 13864845568..59d84eb014d 100644 --- a/tensorflow-core/tensorflow-core-native/pom.xml +++ b/tensorflow-core/tensorflow-core-native/pom.xml @@ -6,7 +6,7 @@ org.tensorflow tensorflow-core - 1.1.0 + 1.2.0-SNAPSHOT tensorflow-core-native jar diff --git a/tensorflow-core/tensorflow-core-platform/pom.xml b/tensorflow-core/tensorflow-core-platform/pom.xml index 9fe62f2b78b..181b1089b8d 100644 --- a/tensorflow-core/tensorflow-core-platform/pom.xml +++ b/tensorflow-core/tensorflow-core-platform/pom.xml @@ -22,7 +22,7 @@ org.tensorflow tensorflow-core - 1.1.0 + 1.2.0-SNAPSHOT tensorflow-core-platform TensorFlow API Platform diff --git a/tensorflow-framework/pom.xml b/tensorflow-framework/pom.xml index 5477f63d82d..03745bfea9a 100644 --- a/tensorflow-framework/pom.xml +++ b/tensorflow-framework/pom.xml @@ -22,7 +22,7 @@ org.tensorflow tensorflow-java - 1.1.0 + 1.2.0-SNAPSHOT tensorflow-framework jar From eeaa3f12103c271c723cb23d9f6bf779efd454b6 Mon Sep 17 00:00:00 2001 From: Winfried Gerlach Date: Tue, 19 Aug 2025 06:28:54 +0200 Subject: [PATCH 27/60] bump to version 1.1.0 in README.md Gradle examples --- README.md | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index d81dcfd0d66..e1d1e080bcb 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ systems with no GPU support, you should add the following dependencies: ``` Or Gradle: ```groovy -def tfVersion = '1.0.0' +def tfVersion = '1.1.0' implementation "org.tensorflow:tensorflow-core-api:$tfVersion" implementation "org.tensorflow:tensorflow-core-native:$tfVersion:linux-x86_64" ``` @@ -116,7 +116,7 @@ native dependencies as follows: ``` Or Gradle: ```groovy -def tfVersion = '1.0.0' +def tfVersion = '1.1.0' implementation "org.tensorflow:tensorflow-core-api:$tfVersion" implementation "org.tensorflow:tensorflow-core-native:$tfVersion:linux-x86_64-gpu" implementation "org.tensorflow:tensorflow-core-native:$tfVersion:macosx-arm64" @@ -148,7 +148,7 @@ simply add this dependency to your application: ``` Or Gradle: ```groovy -implementation "org.tensorflow:tensorflow-core-platform:1.0.0" +implementation "org.tensorflow:tensorflow-core-platform:1.1.0" ``` Be aware though that the builds of TensorFlow are quite voluminous and including too many native dependencies may @@ -160,7 +160,7 @@ the conventions established on this page: ### Snapshots Snapshots of TensorFlow Java artifacts are automatically distributed after each update in the code. To use them, you need -to add Sonatype OSS repository in your pom.xml, like the following +to add Sonatype OSS repository in your `pom.xml`, like the following ```xml @@ -201,21 +201,21 @@ dependencies { This table shows the mapping between TensorFlow, TensorFlow Java and minimum supported Java versions. | TensorFlow Java Version | TensorFlow Version | Minimum Java Version | -|-------------------------|--------------------| --------------- | -| 0.2.0 | 2.3.1 | 8 | -| 0.3.0 | 2.4.1 | 8 | -| 0.3.1 | 2.4.1 | 8 | -| 0.3.2 | 2.4.1 | 8 | -| 0.3.3 | 2.4.1 | 8 | -| 0.4.0 | 2.7.0 | 8 | -| 0.4.1 | 2.7.1 | 8 | -| 0.4.2 | 2.7.4 | 8 | -| 0.5.0 | 2.10.1 | 11 | -| 1.0.0-rc.1 | 2.16.1 | 11 | -| 1.0.0-rc.2 | 2.16.2 | 11 | -| 1.0.0 | 2.16.2 | 11 | -| 1.1.0 | 2.18.0 | 11 | -| 1.2.0-SNAPSHOT | 2.18.0 | 11 | +|-------------------------|--------------------|----------------------| +| 0.2.0 | 2.3.1 | 8 | +| 0.3.0 | 2.4.1 | 8 | +| 0.3.1 | 2.4.1 | 8 | +| 0.3.2 | 2.4.1 | 8 | +| 0.3.3 | 2.4.1 | 8 | +| 0.4.0 | 2.7.0 | 8 | +| 0.4.1 | 2.7.1 | 8 | +| 0.4.2 | 2.7.4 | 8 | +| 0.5.0 | 2.10.1 | 11 | +| 1.0.0-rc.1 | 2.16.1 | 11 | +| 1.0.0-rc.2 | 2.16.2 | 11 | +| 1.0.0 | 2.16.2 | 11 | +| 1.1.0 | 2.18.0 | 11 | +| 1.2.0-SNAPSHOT | 2.18.0 | 11 | ## How to Contribute? From e9b45ec51579ad9e3823987a8143a92ce64dad41 Mon Sep 17 00:00:00 2001 From: Karl Lessard Date: Mon, 25 Nov 2024 13:46:32 -0500 Subject: [PATCH 28/60] Fix typos in GPU migration instructs --- MIGRATING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MIGRATING.md b/MIGRATING.md index f8f5d257e01..ac7276eba99 100644 --- a/MIGRATING.md +++ b/MIGRATING.md @@ -53,7 +53,7 @@ The Java Module (jigsaw) names has been updated to drop the leading `org.`, as f Previous versions of TF Java were building a `tensorflow-core-platform-gpu` artifact upon which application could depend on to include any TensorFlow native library that GPU support enabled. Since TensorFlow has removed its support of GPU -on all platforms other that Linux, we removed our platform JAR in favour of simply adding a dependency on the +on all platforms other than Linux, we removed our platform JAR in favour of simply adding a dependency on the `linux-x86_64-gpu` native artifact. ```xml @@ -64,7 +64,7 @@ on all platforms other that Linux, we removed our platform JAR in favour of simp ``` Please note that including this dependency won't work if your application also depends on `tensorflow-core-platform`. If -you need to support more platforms that Linux, you should include the other `tensorflow-core-native` dependencies +you need to support more platforms than Linux, you should include the other `tensorflow-core-native` dependencies separately (see the [README](README.md) file). ### Session Run Result From 1f18a23c9fb0563071eaab982b818a61ecda5134 Mon Sep 17 00:00:00 2001 From: Adam Pocock Date: Fri, 26 Sep 2025 15:42:12 -0400 Subject: [PATCH 29/60] Bump Windows image (#619) * Bump Windows image * bumping spotless and JavaCPP. * Fix VS path --- .github/workflows/build.yml | 4 ++-- pom.xml | 2 +- tensorflow-core/pom.xml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c48921c272d..786b86984a3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -138,7 +138,7 @@ jobs: if: env.DEPLOY_RELEASE == 'true' || env.DEPLOY_SNAPSHOT == 'true' run: mvn -f tensorflow-core/tensorflow-core-native/pom.xml deploy:deploy-file@native-only -B -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }} -Durl=${{ needs.prepare.outputs.repositoryUrl }} windows-x86_64: - runs-on: windows-2019 + runs-on: windows-2022 needs: prepare strategy: matrix: @@ -161,7 +161,7 @@ jobs: - name: Build project shell: cmd run: | - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64 + call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64 set "PATH=C:\msys64\usr\bin;%PATH%" echo Shorten work paths to prevent Bazel from reaching MAX_PATH limit mkdir C:\tmp diff --git a/pom.xml b/pom.xml index 1a1853b15de..7dd9489f42c 100644 --- a/pom.xml +++ b/pom.xml @@ -49,7 +49,7 @@ true true true - 2.43.0 + 2.46.1 diff --git a/tensorflow-core/pom.xml b/tensorflow-core/pom.xml index e40b06f7f33..14d155dd901 100644 --- a/tensorflow-core/pom.xml +++ b/tensorflow-core/pom.xml @@ -59,7 +59,7 @@ macosx-arm64${javacpp.platform.extension} macosx-x86_64${javacpp.platform.extension} windows-x86_64${javacpp.platform.extension} - 1.5.11 + 1.5.12 From 52f51f1d80aabf5edb566fc2c3aca58dcc59769e Mon Sep 17 00:00:00 2001 From: Adam Pocock Date: Fri, 31 Oct 2025 16:30:52 -0400 Subject: [PATCH 30/60] Small docs fixes (#622) * Adding requirements.txt for doc generation and a few small Javadoc fixes. * Bumping maven-javadoc-plugin version. * Spotless fixes. * Module info help text. * Fixing the pom files so the Javadoc generates correctly. --- docs/tools/requirements.txt | 3 ++ pom.xml | 29 ++++++++++++++++--- tensorflow-core/tensorflow-core-api/pom.xml | 24 --------------- .../src/main/java/module-info.java | 2 ++ .../buffer/ByteSequenceTensorBuffer.java | 13 ++++----- .../internal/types/TUint16Mapper.java | 2 +- .../src/main/java/module-info.java | 9 ++++-- .../tensorflow-core-native/pom.xml | 28 ------------------ .../src/main/java/module-info.java | 2 ++ .../src/main/java/module-info.java | 6 ++-- .../framework/losses/impl/LossesHelper.java | 1 - 11 files changed, 49 insertions(+), 70 deletions(-) create mode 100644 docs/tools/requirements.txt diff --git a/docs/tools/requirements.txt b/docs/tools/requirements.txt new file mode 100644 index 00000000000..681ed3bdde8 --- /dev/null +++ b/docs/tools/requirements.txt @@ -0,0 +1,3 @@ +GitPython +requests +tensorflow-docs \ No newline at end of file diff --git a/pom.xml b/pom.xml index 7dd9489f42c..cc5f5cb9466 100644 --- a/pom.xml +++ b/pom.xml @@ -546,16 +546,37 @@ maven-javadoc-plugin - 3.6.0 + 3.12.0 + + ./docs/overview.md + + Copyright 2015, 2025 The TensorFlow Authors. All Rights Reserved. + + -Xmaxerrs + 65536 + -Xmaxwarns + 65536 + + false + 256m + 2048m + + https://protobuf.dev/reference/java/api-docs + https://bytedeco.org/javacpp/apidocs + + + + javadoc-site + + javadoc + + attach-javadocs jar - - true - diff --git a/tensorflow-core/tensorflow-core-api/pom.xml b/tensorflow-core/tensorflow-core-api/pom.xml index 0b87d9a17c2..59e1703d355 100644 --- a/tensorflow-core/tensorflow-core-api/pom.xml +++ b/tensorflow-core/tensorflow-core-api/pom.xml @@ -220,30 +220,6 @@ - - maven-javadoc-plugin - 3.6.0 - - - attach-javadocs - - jar - - - - -Xmaxerrs - 65536 - -Xmaxwarns - 65536 - - false - 256m - 2048m - - - - - org.codehaus.mojo exec-maven-plugin diff --git a/tensorflow-core/tensorflow-core-api/src/main/java/module-info.java b/tensorflow-core/tensorflow-core-api/src/main/java/module-info.java index f3e4875193d..b12e7042b48 100644 --- a/tensorflow-core/tensorflow-core-api/src/main/java/module-info.java +++ b/tensorflow-core/tensorflow-core-api/src/main/java/module-info.java @@ -14,6 +14,8 @@ limitations under the License. ======================================================================= */ + +/** Core module implementing the TensorFlow Java API and operator definitions. */ module tensorflow { requires transitive org.tensorflow.ndarray; requires transitive tensorflow.nativelib; diff --git a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/internal/buffer/ByteSequenceTensorBuffer.java b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/internal/buffer/ByteSequenceTensorBuffer.java index bd886d776b7..3bf262bec14 100644 --- a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/internal/buffer/ByteSequenceTensorBuffer.java +++ b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/internal/buffer/ByteSequenceTensorBuffer.java @@ -23,13 +23,11 @@ import static org.tensorflow.internal.c_api.global.tensorflow.TF_TString_GetSize; import java.nio.ReadOnlyBufferException; -import java.util.function.Function; import org.bytedeco.javacpp.BytePointer; import org.bytedeco.javacpp.Loader; import org.bytedeco.javacpp.Pointer; import org.bytedeco.javacpp.PointerScope; import org.tensorflow.internal.c_api.TF_TString; -import org.tensorflow.ndarray.NdArray; import org.tensorflow.ndarray.buffer.DataBuffer; import org.tensorflow.ndarray.impl.buffer.AbstractDataBuffer; import org.tensorflow.ndarray.impl.buffer.Validator; @@ -40,10 +38,9 @@ *

    The values are stored as an array of {@link TF_TString}, internally wrapped with {@code * tensorflow::tstring}, which is essentially a portable version of {@code std::string}. * - *

    The data of the buffer must be initialized only once, by calling {@link #init(NdArray, - * Function)}, and the buffer must have been allocated with enough space (use {@link - * #computeSize(NdArray, Function)} priory to know exactly how many bytes are required to store the - * data). + *

    The data of the buffer must be initialized only once, by calling {@link #init}, and the buffer + * must have been allocated with enough space (use {@link #computeSize} priory to know exactly how + * many bytes are required to store the data). * *

    After its data has been initialized, the buffer is read-only as it is not possible to change * safely a value without reinitializing the whole data. @@ -66,8 +63,8 @@ public static long computeSize(ByteSequenceProvider byteSequenceProvider) * *

    While it is not enforced programmatically, it is mandatory that this method is called only * once after the creation of the buffer. The buffer must have been allocated according to the - * same set of data, calling {@link #computeSize(NdArray, Function)} priory to make sure there is - * enough space to store it. + * same set of data, calling {@link #computeSize} priory to make sure there is enough space to + * store it. * * @param byteSequenceProvider produces sequences of bytes to use as the tensor data */ diff --git a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/internal/types/TUint16Mapper.java b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/internal/types/TUint16Mapper.java index d563302319a..43faa1199ed 100644 --- a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/internal/types/TUint16Mapper.java +++ b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/internal/types/TUint16Mapper.java @@ -29,7 +29,7 @@ import org.tensorflow.types.TUint16; /** - * Maps memory of {@link org.tensorflow.proto.DataType#DT_Uint16} tensors to a n-dimensional data + * Maps memory of {@link org.tensorflow.proto.DataType#DT_UINT16} tensors to a n-dimensional data * space. */ public final class TUint16Mapper extends TensorMapper { diff --git a/tensorflow-core/tensorflow-core-generator/src/main/java/module-info.java b/tensorflow-core/tensorflow-core-generator/src/main/java/module-info.java index 1b155bc3af1..a6efd2561a3 100644 --- a/tensorflow-core/tensorflow-core-generator/src/main/java/module-info.java +++ b/tensorflow-core/tensorflow-core-generator/src/main/java/module-info.java @@ -14,13 +14,18 @@ limitations under the License. ======================================================================= */ + +/** + * Code to generate the Java side implementations of TensorFlow's ops based on the TensorFlow op + * definition files. + */ module tensorflow.generator { requires tensorflow.nativelib; - requires java.compiler; + requires transitive java.compiler; requires com.github.javaparser.core; requires com.google.protobuf; requires com.google.common; - requires com.squareup.javapoet; + requires transitive com.squareup.javapoet; requires org.commonmark; requires spring.core; diff --git a/tensorflow-core/tensorflow-core-native/pom.xml b/tensorflow-core/tensorflow-core-native/pom.xml index 59d84eb014d..bb9eb053c33 100644 --- a/tensorflow-core/tensorflow-core-native/pom.xml +++ b/tensorflow-core/tensorflow-core-native/pom.xml @@ -639,34 +639,6 @@ - - - maven-javadoc-plugin - 3.7.0 - - - attach-javadocs - - jar - - - - -Xmaxerrs - 65536 - -Xmaxwarns - 65536 - - false - 256m - 2048m - - https://protobuf.dev/reference/java/api-docs - http://bytedeco.org/javacpp/apidocs - - - - - diff --git a/tensorflow-core/tensorflow-core-native/src/main/java/module-info.java b/tensorflow-core/tensorflow-core-native/src/main/java/module-info.java index 2f7628187e3..f9fe6e3ea3d 100644 --- a/tensorflow-core/tensorflow-core-native/src/main/java/module-info.java +++ b/tensorflow-core/tensorflow-core-native/src/main/java/module-info.java @@ -14,6 +14,8 @@ limitations under the License. ======================================================================= */ + +/** Native interop with the TensorFlow C API. */ module tensorflow.nativelib { requires transitive org.bytedeco.javacpp; requires transitive com.google.protobuf; diff --git a/tensorflow-framework/src/main/java/module-info.java b/tensorflow-framework/src/main/java/module-info.java index 2c500bfc459..715d68331cc 100644 --- a/tensorflow-framework/src/main/java/module-info.java +++ b/tensorflow-framework/src/main/java/module-info.java @@ -14,9 +14,11 @@ limitations under the License. ======================================================================= */ + +/** Higher level TensorFlow framework containing model definition and training operations. */ module tensorflow.framework { - requires tensorflow; - requires org.tensorflow.ndarray; + requires transitive tensorflow; + requires transitive org.tensorflow.ndarray; exports org.tensorflow.framework.activations; exports org.tensorflow.framework.constraints; diff --git a/tensorflow-framework/src/main/java/org/tensorflow/framework/losses/impl/LossesHelper.java b/tensorflow-framework/src/main/java/org/tensorflow/framework/losses/impl/LossesHelper.java index 6c40149f3de..ccd801c4fea 100644 --- a/tensorflow-framework/src/main/java/org/tensorflow/framework/losses/impl/LossesHelper.java +++ b/tensorflow-framework/src/main/java/org/tensorflow/framework/losses/impl/LossesHelper.java @@ -299,7 +299,6 @@ private static Operand reduceWeightedLoss( * * @param tf the TensorFlow Ops * @param losses Operand whose elements contain individual loss measurements. - * @param numElements The number of measurable elements in losses. * @param the data type of the losses * @return A scalar representing the mean of losses. If numElements is * zero, then zero is returned. From cbf942051d55291ba9bdb019b2f207f013889bba Mon Sep 17 00:00:00 2001 From: Adam Pocock Date: Fri, 14 Nov 2025 15:42:08 -0500 Subject: [PATCH 31/60] Adding a link to tensorflow-java-ndarray's javadoc at javadoc generation time. (#623) --- pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/pom.xml b/pom.xml index cc5f5cb9466..f7f90275778 100644 --- a/pom.xml +++ b/pom.xml @@ -561,6 +561,7 @@ 256m 2048m + https://tensorflow.github.io/java/javadoc-ndarray/v1.0.0/ https://protobuf.dev/reference/java/api-docs https://bytedeco.org/javacpp/apidocs From e788c95f57fe84eee7502c552cf1ef5c4765e1c6 Mon Sep 17 00:00:00 2001 From: Karl Lessard Date: Fri, 12 Dec 2025 15:14:02 -0500 Subject: [PATCH 32/60] Fix/docs nav (#624) * Fixing javadoc generation scripts * Add docs nav and landing page * Update JavaCPP notice * Renamed tools to legacy * Delete old docs scripts * Add mention for legacy doc tools --- .gitignore | 3 + docs/_toc.yaml | 0 docs/docs/assets/tensorflow.svg | 1 + docs/{ => docs}/index.md | 33 +++---- docs/{ => docs}/install.md | 3 +- docs/docs/references.md | 8 ++ docs/docs/stylesheets/extra.css | 14 +++ .../legacy_tools}/build_java_api_docs.py | 63 +++++++++--- docs/legacy_tools/requirements.txt | 8 ++ .../legacy_tools}/run-javadoc-for-tf-local.sh | 16 ++- docs/mkdocs.yml | 97 +++++++++++++++++++ docs/tools/requirements.txt | 3 - .../annotations/org/tensorflow/op/Ops.java | 6 +- .../Deallocator_Pointer_long_Pointer.java | 2 +- .../internal/c_api/Listener_BytePointer.java | 2 +- .../internal/c_api/Listener_String.java | 2 +- .../internal/c_api/TFE_CancelCallback.java | 2 +- .../c_api/TFE_CancellationManager.java | 2 +- .../internal/c_api/TFE_Context.java | 2 +- .../internal/c_api/TFE_ContextOptions.java | 2 +- .../internal/c_api/TFE_CustomDevice.java | 2 +- .../c_api/TFE_CustomDeviceTensorHandle.java | 2 +- .../internal/c_api/TFE_Executor.java | 2 +- .../c_api/TFE_MonitoringBoolGauge0.java | 2 +- .../c_api/TFE_MonitoringBoolGauge1.java | 2 +- .../c_api/TFE_MonitoringBoolGauge2.java | 2 +- .../c_api/TFE_MonitoringBoolGaugeCell.java | 2 +- .../internal/c_api/TFE_MonitoringBuckets.java | 2 +- .../c_api/TFE_MonitoringCounter0.java | 2 +- .../c_api/TFE_MonitoringCounter1.java | 2 +- .../c_api/TFE_MonitoringCounter2.java | 2 +- .../c_api/TFE_MonitoringCounterCell.java | 2 +- .../c_api/TFE_MonitoringIntGauge0.java | 2 +- .../c_api/TFE_MonitoringIntGauge1.java | 2 +- .../c_api/TFE_MonitoringIntGauge2.java | 2 +- .../c_api/TFE_MonitoringIntGaugeCell.java | 2 +- .../c_api/TFE_MonitoringSampler0.java | 2 +- .../c_api/TFE_MonitoringSampler1.java | 2 +- .../c_api/TFE_MonitoringSampler2.java | 2 +- .../c_api/TFE_MonitoringSamplerCell.java | 2 +- .../c_api/TFE_MonitoringStringGauge0.java | 2 +- .../c_api/TFE_MonitoringStringGauge1.java | 2 +- .../c_api/TFE_MonitoringStringGauge2.java | 2 +- .../c_api/TFE_MonitoringStringGauge3.java | 2 +- .../c_api/TFE_MonitoringStringGauge4.java | 2 +- .../c_api/TFE_MonitoringStringGaugeCell.java | 2 +- .../org/tensorflow/internal/c_api/TFE_Op.java | 2 +- .../internal/c_api/TFE_OpAttrs.java | 2 +- .../internal/c_api/TFE_TensorDebugInfo.java | 2 +- .../internal/c_api/TFE_TensorHandle.java | 2 +- .../internal/c_api/TFJ_GradFuncAdapter.java | 2 +- .../internal/c_api/TFJ_GraphId.java | 2 +- .../tensorflow/internal/c_api/TFJ_Scope.java | 2 +- .../c_api/TF_AllocatorAttributes.java | 2 +- .../internal/c_api/TF_ApiDefMap.java | 2 +- .../internal/c_api/TF_AttrBuilder.java | 2 +- .../internal/c_api/TF_AttrMetadata.java | 2 +- .../tensorflow/internal/c_api/TF_Buffer.java | 2 +- .../internal/c_api/TF_CheckpointReader.java | 2 +- .../internal/c_api/TF_DeprecatedSession.java | 2 +- .../internal/c_api/TF_DeviceList.java | 2 +- .../internal/c_api/TF_Function.java | 2 +- .../internal/c_api/TF_FunctionOptions.java | 2 +- .../tensorflow/internal/c_api/TF_Graph.java | 2 +- .../c_api/TF_ImportGraphDefOptions.java | 2 +- .../c_api/TF_ImportGraphDefResults.java | 2 +- .../tensorflow/internal/c_api/TF_Input.java | 2 +- .../tensorflow/internal/c_api/TF_Library.java | 2 +- .../internal/c_api/TF_Operation.java | 2 +- .../c_api/TF_OperationDescription.java | 2 +- .../tensorflow/internal/c_api/TF_Output.java | 2 +- .../tensorflow/internal/c_api/TF_Server.java | 2 +- .../tensorflow/internal/c_api/TF_Session.java | 2 +- .../internal/c_api/TF_SessionOptions.java | 2 +- .../internal/c_api/TF_ShapeAndType.java | 2 +- .../internal/c_api/TF_ShapeAndTypeList.java | 2 +- .../tensorflow/internal/c_api/TF_Status.java | 2 +- .../internal/c_api/TF_StringView.java | 2 +- .../tensorflow/internal/c_api/TF_TString.java | 2 +- .../internal/c_api/TF_TString_Large.java | 2 +- .../internal/c_api/TF_TString_Offset.java | 2 +- .../internal/c_api/TF_TString_Raw.java | 2 +- .../internal/c_api/TF_TString_Small.java | 2 +- .../internal/c_api/TF_TString_Union.java | 2 +- .../internal/c_api/TF_TString_View.java | 2 +- .../tensorflow/internal/c_api/TF_Tensor.java | 2 +- .../internal/c_api/TF_WhileParams.java | 2 +- .../org/tensorflow/internal/c_api/Tensor.java | 2 +- .../internal/c_api/global/tensorflow.java | 35 ++++++- 89 files changed, 313 insertions(+), 127 deletions(-) mode change 100644 => 100755 docs/_toc.yaml create mode 100644 docs/docs/assets/tensorflow.svg rename docs/{ => docs}/index.md (59%) mode change 100644 => 100755 rename docs/{ => docs}/install.md (98%) mode change 100644 => 100755 create mode 100644 docs/docs/references.md create mode 100644 docs/docs/stylesheets/extra.css rename {tools => docs/legacy_tools}/build_java_api_docs.py (56%) create mode 100644 docs/legacy_tools/requirements.txt rename {tools => docs/legacy_tools}/run-javadoc-for-tf-local.sh (83%) create mode 100644 docs/mkdocs.yml delete mode 100644 docs/tools/requirements.txt diff --git a/.gitignore b/.gitignore index cb95fc014f9..d9e902d7d9e 100644 --- a/.gitignore +++ b/.gitignore @@ -64,3 +64,6 @@ gradleBuild # Deployment Files settings.xml pom.xml.asc + +# Docs +docs/docs/apidocs/ \ No newline at end of file diff --git a/docs/_toc.yaml b/docs/_toc.yaml old mode 100644 new mode 100755 diff --git a/docs/docs/assets/tensorflow.svg b/docs/docs/assets/tensorflow.svg new file mode 100644 index 00000000000..c0778626d66 --- /dev/null +++ b/docs/docs/assets/tensorflow.svg @@ -0,0 +1 @@ + diff --git a/docs/index.md b/docs/docs/index.md old mode 100644 new mode 100755 similarity index 59% rename from docs/index.md rename to docs/docs/index.md index 47ad1385a1e..c9fcbf53e7e --- a/docs/index.md +++ b/docs/docs/index.md @@ -1,14 +1,5 @@ # TensorFlow for Java - - - -
    - View on TensorFlow.org - - View GitHub repository -
    - TensorFlow Java can run on any JVM for building, training and running machine learning models. It comes with a series of utilities and frameworks that help achieve most of the tasks common to data scientists and developers working in this domain. Java and other JVM languages, such as Scala or Kotlin, are @@ -26,21 +17,19 @@ migrated from Bazel to Maven, which is more familiar for most Java developers. The following describes the layout of the repository and its different artifacts: -* [tensorflow-core](https://github.com/tensorflow/java/tree/master/tensorflow-core) - * All artifacts that build up the core language bindings of TensorFlow for Java - * Intended audience: projects that provide their own APIs or frameworks on top of - TensorFlow and just want a thin layer to access the TensorFlow runtime from the JVM - -* [tensorflow-framework](https://github.com/tensorflow/java/tree/master/tensorflow-framework) - * Primary API for building and training neural networks with TensorFlow - * Intended audience: neural network developers +### [tensorflow-core](https://github.com/tensorflow/java/tree/master/tensorflow-core) + * **Intended audience**: developers who wants to deploy a TensorFlow model on a JVM for inference. Also for projects + that provide their own APIs or frameworks on top of TensorFlow and just want a thin layer to access the TensorFlow runtime from the JVM. + * All artifacts that make up the core language bindings of TensorFlow for Java. -* [ndarray](https://github.com/tensorflow/java-ndarray) - * Generic utility library for n-dimensional data I/O operations - * Used by TensorFlow but does not depend on TensorFlow - * Intended audience: any developer who needs a Java n-dimensional array implementation, whether or not they - use it with TensorFlow +### [tensorflow-framework](https://github.com/tensorflow/java/tree/master/tensorflow-framework) + * **Intended audience**: neural network developers. + * Primary API for building and training neural networks with TensorFlow. +### [ndarray](https://github.com/tensorflow/java-ndarray) + * **Intended audience**: any developer who needs a Java n-dimensional array implementation, whether or not they use it with TensorFlow. + * Generic utility library for n-dimensional data I/O operations. + * Used by TensorFlow but does not depend on TensorFlow. ## Communication diff --git a/docs/install.md b/docs/docs/install.md old mode 100644 new mode 100755 similarity index 98% rename from docs/install.md rename to docs/docs/install.md index 3014f0d1320..e8d2860c7b9 --- a/docs/install.md +++ b/docs/docs/install.md @@ -25,8 +25,7 @@ TensorFlow Java 1.0 series and earlier releases also have binaries for: * macOS 12 or higher; 64-bit, x86 -*Note: To use TensorFlow on Android, see -[TensorFlow Lite](https://tensorflow.org/lite)* +*Note: To use TensorFlow on Android, see [LiteRT](https://tensorflow.org/lite)* ## Versions diff --git a/docs/docs/references.md b/docs/docs/references.md new file mode 100644 index 00000000000..524b23dc675 --- /dev/null +++ b/docs/docs/references.md @@ -0,0 +1,8 @@ +--- +hide: + - navigation + - toc + - title +--- +# + \ No newline at end of file diff --git a/docs/docs/stylesheets/extra.css b/docs/docs/stylesheets/extra.css new file mode 100644 index 00000000000..70aefe6843e --- /dev/null +++ b/docs/docs/stylesheets/extra.css @@ -0,0 +1,14 @@ +:root > * { + /*--md-primary-fg-color: #EE782F;*/ + /*--md-primary-fg-color--light: #455960;*/ + /*--md-primary-fg-color--dark: #90030C;*/ +} + +.md-typeset h1, .md-typeset h2 { + font-weight: 800; + letter-spacing: -.01em; +} + +.md-sidebar--primary { + display: none; +} \ No newline at end of file diff --git a/tools/build_java_api_docs.py b/docs/legacy_tools/build_java_api_docs.py similarity index 56% rename from tools/build_java_api_docs.py rename to docs/legacy_tools/build_java_api_docs.py index 5eadafc276d..77d3ba80f31 100644 --- a/tools/build_java_api_docs.py +++ b/docs/legacy_tools/build_java_api_docs.py @@ -13,6 +13,13 @@ # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== + +###################################################################################################################### +# IMPORTANT: Files in legacy_tools are no longer used to generate the TensorFlow-Java API docs as there are unfixed issues +# when using DocLava outside of the Google environment. We are keeping these for reference in case they are useful later. +###################################################################################################################### + + """Generate TensorFlow Java reference docs for TensorFlow.org.""" from __future__ import absolute_import from __future__ import division @@ -21,6 +28,9 @@ import pathlib import shutil import tempfile +import io +import requests +import zipfile from git import Repo from absl import app @@ -29,14 +39,29 @@ from tensorflow_docs.api_generator import gen_java FLAGS = flags.FLAGS + NDARRAY_VERSION = 'v1.0.0' +JAVACPP_VERSION = '1.5.11' +PROTOBUF_VERSION = 'v3.21.9' + +# __file__ is the path to this file +TOOLS_DIR = pathlib.Path(__file__).resolve().parent +DOCS_DIR = TOOLS_DIR.parent +REPO_ROOT = DOCS_DIR.parent +DOC_OUTPUT_DIR = DOCS_DIR.joinpath("output") + +SECTION_LABELS = { + 'org.tensorflow': 'Core', + 'org.tensorflow.ndarray': 'NdArray', + 'org.tensorflow.framework': 'Framework', +} # These flags are required by infrastructure, not all of them are used. -flags.DEFINE_string('output_dir', '/tmp/java_api/', +flags.DEFINE_string('output_dir', f"{DOC_OUTPUT_DIR}", ("Use this branch as the root version and don't" ' create in version directory')) -flags.DEFINE_string('site_path', 'java/api_docs/java', +flags.DEFINE_string('site_path', 'api_docs/', 'Path prefix in the _toc.yaml') flags.DEFINE_string('code_url_prefix', None, @@ -46,20 +71,15 @@ 'search_hints', True, '[UNUSED] Include metadata search hints in the generated files') -# __file__ is the path to this file -TOOLS_DIR = pathlib.Path(__file__).resolve().parent -REPO_ROOT = TOOLS_DIR.parent - -def checkout_ndarray(): - repo_url = 'https://github.com/tensorflow/java-ndarray' - local_repo_path = REPO_ROOT/'ndarray' +def checkout_repo(repo_url: str, target_dir_name: str, version: str): + local_repo_path = f"{REPO_ROOT}/{target_dir_name}" if not pathlib.Path(local_repo_path).exists(): local_repo = Repo.clone_from(repo_url, local_repo_path) else: local_repo = Repo(local_repo_path) local_repo.remotes['origin'].fetch() - local_repo.git.checkout(NDARRAY_VERSION) + local_repo.git.checkout(version) def overlay(from_root, to_root): @@ -74,25 +94,36 @@ def overlay(from_root, to_root): def main(unused_argv): - checkout_ndarray() + checkout_repo('https://github.com/tensorflow/java-ndarray', 'ndarray', NDARRAY_VERSION) + checkout_repo('https://github.com/bytedeco/javacpp', 'javacpp', JAVACPP_VERSION) + response = requests.get('https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.21.9/protobuf-java-3.21.9-sources.jar') + with zipfile.ZipFile(io.BytesIO(response.content)) as z: + z.extractall(f"{REPO_ROOT}/protobuf") + response = requests.get('https://repo1.maven.org/maven2/org/osgi/osgi.annotation/8.1.0/osgi.annotation-8.1.0-sources.jar') + with zipfile.ZipFile(io.BytesIO(response.content)) as z: + z.extractall(f"{REPO_ROOT}/osgi") + merged_source = pathlib.Path(tempfile.mkdtemp()) (merged_source / 'java/org').mkdir(parents=True) - shutil.copytree(REPO_ROOT/'tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/', merged_source/'java/org/tensorflow') overlay(REPO_ROOT/'tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow', merged_source/'java/org/tensorflow') - shutil.copytree(REPO_ROOT/'tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto', merged_source/'java/org/tensorflow/proto') - shutil.copytree(REPO_ROOT/'tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/exceptions', merged_source/'java/org/tensorflow/exceptions') - shutil.copytree(REPO_ROOT/'tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api', merged_source/'java/org/tensorflow/internal/c_api') + overlay(REPO_ROOT/'tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow', merged_source/'java/org/tensorflow') + overlay(REPO_ROOT/'tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/', merged_source/'java/org/tensorflow/') + overlay(REPO_ROOT/'tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/', merged_source/'java/org/tensorflow/') shutil.copytree(REPO_ROOT/'tensorflow-framework/src/main/java/org/tensorflow/framework', merged_source/'java/org/tensorflow/framework') shutil.copytree(REPO_ROOT/'ndarray/ndarray/src/main/java/org/tensorflow/ndarray', merged_source/'java/org/tensorflow/ndarray') + shutil.copytree(REPO_ROOT/'javacpp/src/main/java/org/bytedeco', merged_source/'java/org/bytedeco') + shutil.copytree(REPO_ROOT/'protobuf/com/', merged_source/'java/com') + shutil.copytree(REPO_ROOT/'osgi/org/osgi', merged_source/'java/org/osgi') gen_java.gen_java_docs( package='org.tensorflow', source_path=merged_source / 'java', output_dir=pathlib.Path(FLAGS.output_dir), site_path=pathlib.Path(FLAGS.site_path), + section_labels=SECTION_LABELS, # Uncomment for local testing: - # script_path=pathlib.Path(REPO_ROOT/'tools/run-javadoc-for-tf-local.sh'), + script_path=pathlib.Path(TOOLS_DIR, 'run-javadoc-for-tf-local.sh'), ) diff --git a/docs/legacy_tools/requirements.txt b/docs/legacy_tools/requirements.txt new file mode 100644 index 00000000000..4435ca4d4a9 --- /dev/null +++ b/docs/legacy_tools/requirements.txt @@ -0,0 +1,8 @@ +###################################################################################################################### +# IMPORTANT: Files in legacy_tools are no longer used to generate the TensorFlow-Java API docs as there are unfixed issues +# when using DocLava outside of the Google environment. We are keeping these for reference in case they are useful later. +###################################################################################################################### + +GitPython +requests +tensorflow-docs \ No newline at end of file diff --git a/tools/run-javadoc-for-tf-local.sh b/docs/legacy_tools/run-javadoc-for-tf-local.sh similarity index 83% rename from tools/run-javadoc-for-tf-local.sh rename to docs/legacy_tools/run-javadoc-for-tf-local.sh index 59239b78141..97d59ddfd6e 100644 --- a/tools/run-javadoc-for-tf-local.sh +++ b/docs/legacy_tools/run-javadoc-for-tf-local.sh @@ -1,4 +1,10 @@ #!/bin/bash + +###################################################################################################################### +# IMPORTANT: Files in legacy_tools are no longer used to generate the TensorFlow-Java API docs as there are unfixed issues +# when using DocLava outside of the Google environment. We are keeping these for reference in case they are useful later. +###################################################################################################################### + set -ex export JAVA_HOME=/Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home # Or change to any JDK 11 home path @@ -11,12 +17,13 @@ export JAVA_HOME=/Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home # O # $ sudo apt install doclava-aosp #v 6.0.1+r55-1+build1 # # https://unix.stackexchange.com/questions/594841/how-do-i-assign-a-value-to-a-bash-variable-iff-that-variable-is-null-unassigned -DOCLAVA_JAR=${DOCLAVA_JAR:-'lib/doclava.jar'} # Build lib locally +DOCLAVA_JAR=${DOCLAVA_JAR:-'tools/lib/doclava.jar'} # Build lib locally + # Install java clear silver templates with: # # $ sudo apt install libjsilver-aosp-java #v 6.0.1+r55-1+build1 -JSILVER_JAR=${JSILVER_JAR:-'lib/jsilver.jar'} # Build lib locally +JSILVER_JAR=${JSILVER_JAR:-'tools/lib/jsilver.jar'} # Build lib locally ######### DELETE OUTPUT_DIR ################# @@ -56,16 +63,15 @@ for pkg in "${packages[@]}"; do SUBPACKAGES+=" -subpackages ${pkg}" done ( # Capture the return code. it may be non-zero for minor errors. - javadoc \ + /Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home/bin/javadoc \ -sourcepath "${SOURCE_PATH}" \ -docletpath "${DOCLAVA_JAR}:${JSILVER_JAR}" \ -doclet com.google.doclava.Doclava \ - -d "${OUTPUT_DIR}" \ -toroot "${SITE_PATH}"/ \ -yaml _toc.yaml \ -templatedir "${TEMPLATES}" \ -public \ - -devsite \ + -d "${OUTPUT_DIR}" \ ${FEDERATED_PARAMS} \ ${SUBPACKAGES} ) diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml new file mode 100644 index 00000000000..545376ce4ff --- /dev/null +++ b/docs/mkdocs.yml @@ -0,0 +1,97 @@ +site_name: '' +site_url: https://tensorflow.org +repo_url: https://github.com/tensorflow/java +site_description: Documentation of TensorFlow Java API and tools. +copyright: "© TensorFlow Authors 2025" + +theme: + name: material + logo: assets/tensorflow.svg + features: + - navigation.indexes + - navigation.instant + - navigation.sections + - navigation.tabs + - navigation.tabs.sticky + - toc.follow + palette: + # Palette toggle for automatic mode + - media: "(prefers-color-scheme)" + toggle: + icon: material/brightness-auto + name: Switch to light mode + # Palette toggle for light mode + - media: "(prefers-color-scheme: light)" + scheme: default + primary: white + accent: orange + toggle: + icon: material/brightness-7 + name: Switch to dark mode + # Palette toggle for dark mode + - media: "(prefers-color-scheme: dark)" + scheme: slate + primary: black + accent: orange + toggle: + icon: material/brightness-4 + name: Switch to system preference + +extra_css: + - stylesheets/extra.css + +nav: + - Home: + - index.md + - Install: + - install.md + - References: + - apidocs/index.html + +#markdown_extensions: +# - admonition +# - pymdownx.snippets +# - pymdownx.superfences +# - pymdownx.details +# - pymdownx.superfences +# - attr_list +# - md_in_html +# - toc +# - pymdownx.tabbed: +# alternate_style: true + +#plugins: +# - search +# - glightbox +# - include-markdown +# - include_dir_to_nav +# - mkdocs-jupyter: +# execute: false +# include_source: true +# - mkdocstrings: +# default_handler: python +# handlers: +# python: +# load_external_modules: false +# options: +# docstring_options: +# ignore_init_summary: true +# docstring_style: google +# members_order: source +# merge_init_into_class: true +# parameter_headings: true +# separate_signature: true +# show_if_no_docstring: true +# show_root_full_path: true +# show_root_heading: false +# show_source: true +# show_symbol_type_heading: true +# show_symbol_type_toc: true +# signature_crossrefs: true +# +#extra: +# generator: false +# social: +# - icon: fontawesome/brands/slack +# link: https://expediagroup.enterprise.slack.com/archives/C08RD5SBRLH +# name: "#ask-genai-platform" \ No newline at end of file diff --git a/docs/tools/requirements.txt b/docs/tools/requirements.txt deleted file mode 100644 index 681ed3bdde8..00000000000 --- a/docs/tools/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -GitPython -requests -tensorflow-docs \ No newline at end of file diff --git a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/Ops.java b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/Ops.java index 8483a4efb61..b9f5cd836f6 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/Ops.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/Ops.java @@ -420,10 +420,10 @@ public final class Ops { public final SummaryOps summary; - public final RaggedOps ragged; - public final ImageOps image; + public final RaggedOps ragged; + public final ShapeOps shape; public final IoOps io; @@ -457,8 +457,8 @@ public final class Ops { train = new TrainOps(this); quantization = new QuantizationOps(this); summary = new SummaryOps(this); - ragged = new RaggedOps(this); image = new ImageOps(this); + ragged = new RaggedOps(this); shape = new ShapeOps(this); io = new IoOps(this); dtypes = new DtypesOps(this); diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/Deallocator_Pointer_long_Pointer.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/Deallocator_Pointer_long_Pointer.java index cadc5930dc9..6db414f7382 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/Deallocator_Pointer_long_Pointer.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/Deallocator_Pointer_long_Pointer.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/Listener_BytePointer.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/Listener_BytePointer.java index 3f5ef587ab1..abd96e95392 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/Listener_BytePointer.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/Listener_BytePointer.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/Listener_String.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/Listener_String.java index 3e62d7d0acb..af6030e6503 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/Listener_String.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/Listener_String.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_CancelCallback.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_CancelCallback.java index 037bdbfaf2b..a2ab0621623 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_CancelCallback.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_CancelCallback.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_CancellationManager.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_CancellationManager.java index be8d6ba91d5..1a1524e6593 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_CancellationManager.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_CancellationManager.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_Context.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_Context.java index 88339d3a463..88322c6d243 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_Context.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_Context.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_ContextOptions.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_ContextOptions.java index 4697c57a675..8a9768dbaec 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_ContextOptions.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_ContextOptions.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_CustomDevice.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_CustomDevice.java index 4b51f0e83ea..1b9ddc78173 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_CustomDevice.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_CustomDevice.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_CustomDeviceTensorHandle.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_CustomDeviceTensorHandle.java index a4b0939adb7..b6943e9f386 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_CustomDeviceTensorHandle.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_CustomDeviceTensorHandle.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_Executor.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_Executor.java index 29bdf274105..53a66d08755 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_Executor.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_Executor.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBoolGauge0.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBoolGauge0.java index 0d1a29dbe09..2ee4a7020c8 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBoolGauge0.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBoolGauge0.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBoolGauge1.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBoolGauge1.java index 23ed2050658..004c852fcd7 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBoolGauge1.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBoolGauge1.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBoolGauge2.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBoolGauge2.java index 50478f15ea9..e46a3f06e0d 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBoolGauge2.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBoolGauge2.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBoolGaugeCell.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBoolGaugeCell.java index 3f3ba2f7abb..6b9d73cb6f2 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBoolGaugeCell.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBoolGaugeCell.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBuckets.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBuckets.java index 53f0870fcb8..8fa952614cf 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBuckets.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBuckets.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringCounter0.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringCounter0.java index d6a1741d04c..03185b12ac1 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringCounter0.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringCounter0.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringCounter1.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringCounter1.java index 154ea614520..3fc374c963d 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringCounter1.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringCounter1.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringCounter2.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringCounter2.java index 12230296e90..3f479145a55 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringCounter2.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringCounter2.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringCounterCell.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringCounterCell.java index 3ba3cffa6c5..c4ff6a322cd 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringCounterCell.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringCounterCell.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringIntGauge0.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringIntGauge0.java index 8e397c42218..b01c212d04e 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringIntGauge0.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringIntGauge0.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringIntGauge1.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringIntGauge1.java index 17e85beebd9..46ca45846ce 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringIntGauge1.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringIntGauge1.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringIntGauge2.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringIntGauge2.java index 952667a192a..a48f8ea3d8e 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringIntGauge2.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringIntGauge2.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringIntGaugeCell.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringIntGaugeCell.java index 0a5b4ffb2d0..34d7da5854e 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringIntGaugeCell.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringIntGaugeCell.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringSampler0.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringSampler0.java index 52696ccd933..d0235201962 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringSampler0.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringSampler0.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringSampler1.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringSampler1.java index 7ee23fd6044..f71d9821bae 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringSampler1.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringSampler1.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringSampler2.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringSampler2.java index 03ceb795203..eaa959122f5 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringSampler2.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringSampler2.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringSamplerCell.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringSamplerCell.java index 7450bc22100..7d2b50cd5e5 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringSamplerCell.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringSamplerCell.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge0.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge0.java index eee853733c2..978e30fca4a 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge0.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge0.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge1.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge1.java index 9b6a251d2fb..d0a0aca659c 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge1.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge1.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge2.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge2.java index ddbe1a5e0cb..85d097da12f 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge2.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge2.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge3.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge3.java index cc304e409ae..aa07f5ee144 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge3.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge3.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge4.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge4.java index c2a2d811c8d..46732e2bfcd 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge4.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge4.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGaugeCell.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGaugeCell.java index 62ac9ab0f33..cfee1b9991d 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGaugeCell.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGaugeCell.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_Op.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_Op.java index a7566da0df2..b4b9fba825e 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_Op.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_Op.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_OpAttrs.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_OpAttrs.java index be1e0e5fc9d..c72023d587f 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_OpAttrs.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_OpAttrs.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_TensorDebugInfo.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_TensorDebugInfo.java index 157630bc750..7f5cc8b30f1 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_TensorDebugInfo.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_TensorDebugInfo.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_TensorHandle.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_TensorHandle.java index e984edc1329..39ebd0e0984 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_TensorHandle.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_TensorHandle.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFJ_GradFuncAdapter.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFJ_GradFuncAdapter.java index da652c6b068..7938de58a8e 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFJ_GradFuncAdapter.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFJ_GradFuncAdapter.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFJ_GraphId.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFJ_GraphId.java index 5f3ec15585c..f503ed65a91 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFJ_GraphId.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFJ_GraphId.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFJ_Scope.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFJ_Scope.java index 048f1a23706..8c3c0746c5c 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFJ_Scope.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFJ_Scope.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_AllocatorAttributes.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_AllocatorAttributes.java index abe89fdca60..5862c60b31d 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_AllocatorAttributes.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_AllocatorAttributes.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ApiDefMap.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ApiDefMap.java index 2274e428250..57f7d3095bf 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ApiDefMap.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ApiDefMap.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_AttrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_AttrBuilder.java index 1066daabbdb..8e5a084ccce 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_AttrBuilder.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_AttrBuilder.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_AttrMetadata.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_AttrMetadata.java index 14d7e44817d..6a99a4d1b8e 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_AttrMetadata.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_AttrMetadata.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Buffer.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Buffer.java index 676dd7417f2..a4bf64d3f5f 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Buffer.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Buffer.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_CheckpointReader.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_CheckpointReader.java index 76522daf8b0..232cb85fd04 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_CheckpointReader.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_CheckpointReader.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_DeprecatedSession.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_DeprecatedSession.java index d2382eaca52..d816ab6f832 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_DeprecatedSession.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_DeprecatedSession.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_DeviceList.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_DeviceList.java index a24fc795c92..6d095f0b8c7 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_DeviceList.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_DeviceList.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Function.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Function.java index 017a9e653bd..acf54133d12 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Function.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Function.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_FunctionOptions.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_FunctionOptions.java index beeda28ce31..381a690e1e6 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_FunctionOptions.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_FunctionOptions.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Graph.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Graph.java index 1d81f725050..779c5030842 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Graph.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Graph.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ImportGraphDefOptions.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ImportGraphDefOptions.java index 755b4aeaa42..527b6f1109e 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ImportGraphDefOptions.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ImportGraphDefOptions.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ImportGraphDefResults.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ImportGraphDefResults.java index a202d65ea5f..7d3bf3597f0 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ImportGraphDefResults.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ImportGraphDefResults.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Input.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Input.java index eb169346beb..05bb181a86d 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Input.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Input.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Library.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Library.java index 9ba55f9db0b..22a67f6cd2c 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Library.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Library.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Operation.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Operation.java index 715f0f67ca4..084fef91bda 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Operation.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Operation.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_OperationDescription.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_OperationDescription.java index bf17e0d1f5f..9387c172354 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_OperationDescription.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_OperationDescription.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Output.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Output.java index f8b7103c57a..a52cff3c905 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Output.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Output.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Server.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Server.java index a2495132444..5753e37ae97 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Server.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Server.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Session.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Session.java index dd5b1259279..8ab407637f5 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Session.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Session.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_SessionOptions.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_SessionOptions.java index 72d9ea3911f..a85ba6f5c62 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_SessionOptions.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_SessionOptions.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ShapeAndType.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ShapeAndType.java index 2a68ec2fab0..315bfa3e01c 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ShapeAndType.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ShapeAndType.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ShapeAndTypeList.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ShapeAndTypeList.java index 17da08c7990..ac959f2acf7 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ShapeAndTypeList.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ShapeAndTypeList.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Status.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Status.java index c2d2c329aa8..3aa5e8156d5 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Status.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Status.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_StringView.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_StringView.java index af639c7647c..cd9b9928069 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_StringView.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_StringView.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString.java index 6ecc8d18dd5..66092be629f 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Large.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Large.java index 240b0d83e36..2cab61e7d73 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Large.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Large.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Offset.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Offset.java index 280e4e403a8..3dbdcd468f1 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Offset.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Offset.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Raw.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Raw.java index 22712b73a55..f2916801c5f 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Raw.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Raw.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Small.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Small.java index 6440c91e627..57702a8b716 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Small.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Small.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Union.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Union.java index 51b009cf79a..5ebe9ebfac8 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Union.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Union.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_View.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_View.java index 907bf5d0389..5951c1b1238 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_View.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_View.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Tensor.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Tensor.java index 4b35bbf637e..4ee1ae89418 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Tensor.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Tensor.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_WhileParams.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_WhileParams.java index e4ca40d66a3..d3607e4a274 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_WhileParams.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_WhileParams.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/Tensor.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/Tensor.java index fbbeaec6bea..d534b2caa87 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/Tensor.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/Tensor.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/global/tensorflow.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/global/tensorflow.java index 5d6ab7ed753..f867058d6bb 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/global/tensorflow.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/global/tensorflow.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.12-SNAPSHOT: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api.global; @@ -5163,6 +5163,39 @@ public static native void TF_GraphRemoveFunction(TF_Graph g, // #endif // TENSORFLOW_C_C_API_EXPERIMENTAL_H_ +// Parsed from tfe_serverdef_stub.h + +/* Copyright 2025 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +provided under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +// #ifndef TENSORFLOW_JAVA_TFE_SERVERDEF_STUB_H_ +// #define TENSORFLOW_JAVA_TFE_SERVERDEF_STUB_H_ + +// #ifdef _WIN32 + +// #include "tensorflow/c/c_api.h" +// #include "tensorflow/c/c_api_experimental.h" + +// Include the implementation so that a local definition is always available +// on Windows. +// #include "tfe_serverdef_stub.cc" + +// #endif // _WIN32 + +// #endif // TENSORFLOW_JAVA_TFE_SERVERDEF_STUB_H_ + // Parsed from tfj_graph.h /* Copyright 2024 The TensorFlow Authors. All Rights Reserved. From ab1a8cff007c184e1e68649051caa79785b12da6 Mon Sep 17 00:00:00 2001 From: Salman Chishti Date: Fri, 19 Dec 2025 20:21:15 +0000 Subject: [PATCH 33/60] Upgrade GitHub Actions for Node 24 compatibility (#626) * Upgrade GitHub Actions for Node 24 compatibility Signed-off-by: Salman Muin Kayser Chishti <13schishti@gmail.com> * Add fetch-depth: 0 to check-format checkout for spotless ratchet The spotless maven plugin uses git ratchet mode to compare against origin/master. With checkout@v6's default shallow clone, origin/master is not available, causing the format check to fail. Adding fetch-depth: 0 to the check-format job ensures the full git history is cloned including origin/master reference. --------- Signed-off-by: Salman Muin Kayser Chishti <13schishti@gmail.com> --- .github/workflows/build.yml | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 786b86984a3..a56d64d08ce 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,12 +20,14 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Configure Java - uses: actions/setup-java@v2 + uses: actions/setup-java@v5 with: distribution: 'adopt' java-version: '17' - name: Checkout repository - uses: actions/checkout@v1 + uses: actions/checkout@v6 + with: + fetch-depth: 0 - name: Build project run: | gcc --version @@ -51,7 +53,7 @@ jobs: echo "Staging repository created: $STAGING_REPOSITORY_ID" echo "::set-output name=stagingRepositoryId::$STAGING_REPOSITORY_ID" - name: Checkout repository - uses: actions/checkout@v1 + uses: actions/checkout@v6 - name: Extract distribution repository URL id: repository run: | @@ -74,13 +76,13 @@ jobs: sudo apt update sudo apt install -y curl wget unzip tar git gcc g++ - name: Configure Java - uses: actions/setup-java@v2 + uses: actions/setup-java@v5 with: distribution: 'zulu' java-version: '17' architecture: 'aarch64' - name: Checkout repository - uses: actions/checkout@v1 + uses: actions/checkout@v6 - name: Build project run: | gcc --version @@ -98,12 +100,12 @@ jobs: ext: ["", -gpu] steps: - name: Configure Java - uses: actions/setup-java@v2 + uses: actions/setup-java@v5 with: distribution: 'adopt' java-version: '11' - name: Checkout repository - uses: actions/checkout@v1 + uses: actions/checkout@v6 - name: Build project run: | gcc --version @@ -121,13 +123,13 @@ jobs: ext: [""] steps: - name: Configure Java - uses: actions/setup-java@v2 + uses: actions/setup-java@v5 with: distribution: 'zulu' java-version: '17' architecture: 'arm64' - name: Checkout repository - uses: actions/checkout@v1 + uses: actions/checkout@v6 - name: Build project run: | clang --version @@ -152,12 +154,12 @@ jobs: set "EXT=${{ matrix.ext }}" echo %JAVA_HOME% - name: Configure Java - uses: actions/setup-java@v2 + uses: actions/setup-java@v5 with: distribution: 'adopt' java-version: '11' - name: Checkout repository - uses: actions/checkout@v1 + uses: actions/checkout@v6 - name: Build project shell: cmd run: | @@ -189,12 +191,12 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Configure Java - uses: actions/setup-java@v2 + uses: actions/setup-java@v5 with: distribution: 'adopt' java-version: '11' - name: Checkout repository - uses: actions/checkout@v1 + uses: actions/checkout@v6 - name: Build project run: | java -version From 89703f7dfe8e4c5580e5c63907fb15bc79c9e30e Mon Sep 17 00:00:00 2001 From: Karl Lessard Date: Fri, 19 Dec 2025 15:46:22 -0500 Subject: [PATCH 34/60] Remove unused markdown extensions and plugins --- docs/mkdocs.yml | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 545376ce4ff..8729bca5af5 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -47,51 +47,3 @@ nav: - install.md - References: - apidocs/index.html - -#markdown_extensions: -# - admonition -# - pymdownx.snippets -# - pymdownx.superfences -# - pymdownx.details -# - pymdownx.superfences -# - attr_list -# - md_in_html -# - toc -# - pymdownx.tabbed: -# alternate_style: true - -#plugins: -# - search -# - glightbox -# - include-markdown -# - include_dir_to_nav -# - mkdocs-jupyter: -# execute: false -# include_source: true -# - mkdocstrings: -# default_handler: python -# handlers: -# python: -# load_external_modules: false -# options: -# docstring_options: -# ignore_init_summary: true -# docstring_style: google -# members_order: source -# merge_init_into_class: true -# parameter_headings: true -# separate_signature: true -# show_if_no_docstring: true -# show_root_full_path: true -# show_root_heading: false -# show_source: true -# show_symbol_type_heading: true -# show_symbol_type_toc: true -# signature_crossrefs: true -# -#extra: -# generator: false -# social: -# - icon: fontawesome/brands/slack -# link: https://expediagroup.enterprise.slack.com/archives/C08RD5SBRLH -# name: "#ask-genai-platform" \ No newline at end of file From cf36b38d61f73de57ec9a09a6a724ac36a157278 Mon Sep 17 00:00:00 2001 From: winne42 Date: Tue, 20 Jan 2026 15:20:39 +0100 Subject: [PATCH 35/60] Feature/add t bool test (#628) * add TBoolTest (mix of TStringTest and NumericTypesTestBase) * minor cleanup * add copyright comment, fix comment in test * make class and test methods public to be aligned with other tests * fix formatting with mvn spotless:apply --------- Co-authored-by: Winfried Gerlach --- .../java/org/tensorflow/NativeFunction.java | 4 +- .../java/org/tensorflow/types/TBoolTest.java | 156 ++++++++++++++++++ 2 files changed, 157 insertions(+), 3 deletions(-) create mode 100644 tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/types/TBoolTest.java diff --git a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/NativeFunction.java b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/NativeFunction.java index 245fff70d1a..4dbde8f2473 100644 --- a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/NativeFunction.java +++ b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/NativeFunction.java @@ -20,9 +20,7 @@ import com.google.protobuf.InvalidProtocolBufferException; import java.util.ArrayDeque; -import java.util.ArrayList; import java.util.Collection; -import java.util.Collections; import java.util.LinkedHashSet; import java.util.List; import java.util.Map; @@ -92,7 +90,7 @@ public synchronized List getDependencies() { } }); } - dependencies = Collections.unmodifiableList(new ArrayList<>(deps)); + dependencies = List.copyOf(deps); } return dependencies; diff --git a/tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/types/TBoolTest.java b/tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/types/TBoolTest.java new file mode 100644 index 00000000000..df5e1333b00 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/types/TBoolTest.java @@ -0,0 +1,156 @@ +/* + * Copyright 2020 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================= + */ + +package org.tensorflow.types; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +import org.junit.jupiter.api.Test; +import org.tensorflow.EagerSession; +import org.tensorflow.ndarray.NdArray; +import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.index.Indices; +import org.tensorflow.op.Ops; +import org.tensorflow.op.core.Constant; +import org.tensorflow.op.math.LogicalAnd; +import org.tensorflow.op.math.LogicalNot; +import org.tensorflow.op.math.LogicalOr; + +public class TBoolTest { + + @Test + public void createScalar() { + TBool tensorT = TBool.scalarOf(true); + assertNotNull(tensorT); + assertEquals(Shape.scalar(), tensorT.shape()); + assertEquals(true, tensorT.getObject()); + + TBool tensorF = TBool.scalarOf(false); + assertNotNull(tensorF); + assertEquals(Shape.scalar(), tensorF.shape()); + assertEquals(false, tensorF.getObject()); + } + + @Test + public void createVector() { + TBool tensor = TBool.vectorOf(true, false); + assertNotNull(tensor); + assertEquals(Shape.of(2), tensor.shape()); + assertEquals(true, tensor.getObject(0)); + assertEquals(false, tensor.getObject(1)); + } + + @Test + public void createCopy() { + NdArray bools = + NdArrays.ofObjects(Boolean.class, Shape.of(2, 2)) + .setObject(true, 0, 0) + .setObject(false, 0, 1) + .setObject(false, 1, 0) + .setObject(true, 1, 1); + + TBool tensor = TBool.tensorOf(bools); + assertNotNull(tensor); + bools.scalars().forEachIndexed((idx, s) -> assertEquals(s.getObject(), tensor.getObject(idx))); + } + + @Test + public void initializeTensorsWithBools() { + // Allocate a tensor of booleans of the shape (2, 3, 2) + TBool tensor = TBool.tensorOf(Shape.of(2, 3, 2)); + + assertEquals(3, tensor.rank()); + assertEquals(12, tensor.size()); + NdArray data = (NdArray) tensor; + + try (EagerSession session = EagerSession.create()) { + Ops tf = Ops.create(session); + + // Initialize tensor memory with falses and take a snapshot + data.scalars().forEach(scalar -> ((NdArray) scalar).setObject(false)); + Constant x = tf.constantOf(tensor); + + // Initialize the same tensor memory with trues and take a snapshot + data.scalars().forEach(scalar -> ((NdArray) scalar).setObject(true)); + Constant y = tf.constantOf(tensor); + + // Calculate x AND y and validate the result + LogicalAnd xAndY = tf.math.logicalAnd(x, y); + ((NdArray) xAndY.asTensor()) + .scalars() + .forEach(scalar -> assertEquals(false, scalar.getObject())); + + // Calculate x OR y and validate the result + LogicalOr xOrY = tf.math.logicalOr(x, y); + ((NdArray) xOrY.asTensor()) + .scalars() + .forEach(scalar -> assertEquals(true, scalar.getObject())); + + // Calculate !x and validate the result against y + LogicalNot notX = tf.math.logicalNot(x); + assertEquals(y.asTensor(), notX.asTensor()); + } + } + + @Test + public void setAndCompute() { + NdArray heapData = + NdArrays.ofBooleans(Shape.of(4)) + .setObject(true, 0) + .setObject(false, 1) + .setObject(true, 2) + .setObject(false, 3); + + // Creates a 2x2 matrix + try (TBool tensor = TBool.tensorOf(Shape.of(2, 2))) { + NdArray data = (NdArray) tensor; + + // Copy first 2 values of the vector to the first row of the matrix + data.set(heapData.slice(Indices.range(0, 2)), 0); + + // Copy values at an odd position in the vector as the second row of the matrix + data.set(heapData.slice(Indices.odd()), 1); + + assertEquals(true, data.getObject(0, 0)); + assertEquals(false, data.getObject(0, 1)); + assertEquals(false, data.getObject(1, 0)); + assertEquals(false, data.getObject(1, 1)); + + // Read rows of the tensor in reverse order + NdArray flippedData = data.slice(Indices.flip(), Indices.flip()); + + assertEquals(false, flippedData.getObject(0, 0)); + assertEquals(false, flippedData.getObject(0, 1)); + assertEquals(false, flippedData.getObject(1, 0)); + assertEquals(true, flippedData.getObject(1, 1)); + + try (EagerSession session = EagerSession.create()) { + Ops tf = Ops.create(session); + + LogicalNot sub = tf.math.logicalNot(tf.constantOf(tensor)); + NdArray result = (NdArray) sub.asTensor(); + + assertEquals(false, result.getObject(0, 0)); + assertEquals(true, result.getObject(0, 1)); + assertEquals(true, result.getObject(1, 0)); + assertEquals(true, result.getObject(1, 1)); + } + } + } +} From e28dcc4de83525c935622420fa36518422306433 Mon Sep 17 00:00:00 2001 From: Shreyansh Shekhar Dwivedi Date: Wed, 21 Jan 2026 02:07:28 +0530 Subject: [PATCH 36/60] docs: align API stability guarantees with 1.0.0 release (#597) (#629) * docs: align api stability documentation with 1.0.0 release * style: fix formatting via GitHub Codespaces --- docs/docs/install.md | 6 ++++-- .../src/main/java/org/tensorflow/package-info.java | 10 ++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/docs/install.md b/docs/docs/install.md index e8d2860c7b9..2fe676e956a 100755 --- a/docs/docs/install.md +++ b/docs/docs/install.md @@ -8,8 +8,10 @@ Kotlin, are frequently used in large and small enterprises all over the world, which makes TensorFlow Java a strategic choice for adopting machine learning at a large scale. -Caution: The TensorFlow Java API is *not* covered by the TensorFlow -[API stability guarantees](https://www.tensorflow.org/guide/versions). +Note: Starting from version 1.0.0, the TensorFlow Java project follows the +[TensorFlow API stability guarantees](https://www.tensorflow.org/guide/versions#api_stability). +However, as these bindings are downstream of the TensorFlow C API, users should +be aware that stability is subject to the evolution of the upstream TensorFlow core. ## Requirements diff --git a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/package-info.java b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/package-info.java index 983cda5260c..49cdef2a624 100644 --- a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/package-info.java +++ b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/package-info.java @@ -16,10 +16,12 @@ /** * Defines classes to build, save, load and execute TensorFlow models. * - *

    WARNING: The API is currently experimental and is not covered by TensorFlow API stability guarantees. See README.md - * for installation instructions. + *

    API Stability: Since version 1.0.0, the TensorFlow Java API is covered by TensorFlow API stability guarantees. + * Please note that as this library is a wrapper for the TensorFlow C API, its stability is subject + * to the stability of the underlying upstream TensorFlow project. See the README.md for installation + * instructions. * *

    The LabelImage From d5d2ba37c1f947fef70affd8480bd9b3cbf8b3b9 Mon Sep 17 00:00:00 2001 From: Shreyansh Shekhar Dwivedi Date: Sat, 24 Jan 2026 00:45:05 +0530 Subject: [PATCH 37/60] fix(generator): ensure variadic options in secondary factory methods (#630) --- .../src/gen/annotations/org/tensorflow/op/NnOps.java | 2 +- .../src/gen/java/org/tensorflow/op/nn/TopK.java | 2 +- .../java/org/tensorflow/generator/op/ClassGenerator.java | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/NnOps.java b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/NnOps.java index 9859a308562..535af3cda71 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/NnOps.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/NnOps.java @@ -3126,7 +3126,7 @@ public SparseSoftmaxCrossEntropyWithLogits sparseSoftmaxC * @return a new instance of TopK, with default output types */ public TopK topK(Operand input, Operand k, - TopK.Options[] options) { + TopK.Options... options) { return TopK.create(scope, input, k, options); } diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/nn/TopK.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/nn/TopK.java index 189f0434054..5185b5fd785 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/nn/TopK.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/nn/TopK.java @@ -118,7 +118,7 @@ public static TopK create(Scope sco describeByClass = true ) public static TopK create(Scope scope, Operand input, - Operand k, Options[] options) { + Operand k, Options... options) { return create(scope, input, k, TInt32.class, options); } diff --git a/tensorflow-core/tensorflow-core-generator/src/main/java/org/tensorflow/generator/op/ClassGenerator.java b/tensorflow-core/tensorflow-core-generator/src/main/java/org/tensorflow/generator/op/ClassGenerator.java index 78b8ea04964..91d66134880 100644 --- a/tensorflow-core/tensorflow-core-generator/src/main/java/org/tensorflow/generator/op/ClassGenerator.java +++ b/tensorflow-core/tensorflow-core-generator/src/main/java/org/tensorflow/generator/op/ClassGenerator.java @@ -105,7 +105,7 @@ enum RenderMode { /** * The generated options class, or null if it doesn't have one or {@link #buildOptionsClass()} has - * not been ran. + * not been run. */ private TypeSpec optionsClass = null; @@ -748,6 +748,10 @@ private void buildSecondaryFactory( body.add("$T.class", defaultTypes.get(attr)); } else { factoryBuilder.addParameter(param); + // Checking if the parameter being added is the variadic options or not + if (param.name.equals("options")) { + factoryBuilder.varargs(); + } factoryBuilder.addJavadoc("\n@param $L $L", param.name, paramTags.get(param.name)); typeVars.addAll(new ResolvedType(param.type).findGenerics()); body.add("$L", param.name); From bcf9e2ecc4787c4e97115250338f493854090f19 Mon Sep 17 00:00:00 2001 From: nfeybesse Date: Sun, 8 Feb 2026 13:56:33 +0100 Subject: [PATCH 38/60] Add GradientDispatch bridge for custom gradient adapter dispatch --- .../op/DispatchingGradientAdapter.java | 76 +++++++++++++++++++ .../org/tensorflow/op/GradientDispatch.java | 25 ++++++ 2 files changed, 101 insertions(+) create mode 100644 tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/DispatchingGradientAdapter.java create mode 100644 tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/GradientDispatch.java diff --git a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/DispatchingGradientAdapter.java b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/DispatchingGradientAdapter.java new file mode 100644 index 00000000000..413dd7afb42 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/DispatchingGradientAdapter.java @@ -0,0 +1,76 @@ +package org.tensorflow.op; + +import java.lang.reflect.Constructor; +import java.util.List; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; +import org.tensorflow.AbstractGradientAdapter; +import org.tensorflow.Graph; +import org.tensorflow.GraphOperation; +import org.tensorflow.Operand; +import org.tensorflow.Output; +import org.tensorflow.internal.c_api.TFJ_Scope; + +final class DispatchingGradientAdapter extends AbstractGradientAdapter { + + private final ConcurrentMap raw = new ConcurrentHashMap<>(); + private final ConcurrentMap> typed = new ConcurrentHashMap<>(); + + static final class TypedEntry> { + final CustomGradient grad; + final Class inputClass; + final Constructor ctor; + + TypedEntry(CustomGradient grad, Class inputClass) { + this.grad = grad; + this.inputClass = inputClass; + try { + this.ctor = inputClass.getConstructor(org.tensorflow.GraphOperation.class); + } catch (NoSuchMethodException e) { + throw new IllegalArgumentException( + "Inputs class " + inputClass.getName() + " must have a public ctor(GraphOperation).", e); + } + } + } + + void putRaw(String opType, RawCustomGradient g) { + raw.put(opType, g); + } + + > void putTyped(String opType, CustomGradient g, Class inputClass) { + typed.put(opType, new TypedEntry<>(g, inputClass)); + } + + @Override + protected List> apply( + Graph graph, TFJ_Scope scope, GraphOperation operation, List> gradInputs) { + + final String opType = operation.type(); + + RawCustomGradient rg = raw.get(opType); + if (rg != null) { + // NativeScope & Ops constructors are package-private => must be in org.tensorflow.op + Scope nativeScope = new NativeScope(scope, graph, operation.name()).withSubScope(operation.name()); + return rg.call(new Ops(nativeScope), operation, gradInputs); + } + + @SuppressWarnings("rawtypes") + TypedEntry te = typed.get(opType); + if (te != null) { + return applyTyped(graph, scope, operation, gradInputs, te); + } + + throw new IllegalStateException("No Java custom gradient registered for op type: " + opType); + } + + private > List> applyTyped( + Graph graph, TFJ_Scope scope, GraphOperation operation, List> gradInputs, TypedEntry te) { + try { + T inputs = te.ctor.newInstance(operation); + Scope nativeScope = new NativeScope(scope, graph, operation.name()).withSubScope(operation.name()); + return te.grad.call(new Ops(nativeScope), inputs, gradInputs); + } catch (ReflectiveOperationException e) { + throw new RuntimeException("Failed to instantiate inputs for " + te.inputClass.getName(), e); + } + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/GradientDispatch.java b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/GradientDispatch.java new file mode 100644 index 00000000000..64504121677 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/GradientDispatch.java @@ -0,0 +1,25 @@ +package org.tensorflow.op; + +import org.tensorflow.internal.c_api.TFJ_GradFuncAdapter; + +/** Public bridge to a single native gradient adapter. */ +public final class GradientDispatch { + + // package-private adapter that can access NativeScope/Ops constructors + static final DispatchingGradientAdapter ADAPTER = new DispatchingGradientAdapter(); + + private GradientDispatch() {} + + public static TFJ_GradFuncAdapter adapter() { + return ADAPTER; + } + + public static void putRaw(String opType, RawCustomGradient gradient) { + ADAPTER.putRaw(opType, gradient); + } + + public static > void putTyped( + String opType, CustomGradient gradient, Class inputClass) { + ADAPTER.putTyped(opType, gradient, inputClass); + } +} From 7c7dc54b57555bb5cc49526ce0bf1b8732eb74d9 Mon Sep 17 00:00:00 2001 From: nfeybesse Date: Sun, 8 Feb 2026 13:56:40 +0100 Subject: [PATCH 39/60] Fix custom gradient registration scalability and support NoGradient --- .../tensorflow/AbstractGradientAdapter.java | 12 ++++++- .../main/java/org/tensorflow/TensorFlow.java | 10 ++++-- .../org/tensorflow/op/CustomGradient.java | 32 ++++++++++++++++++- .../op/DispatchingGradientAdapter.java | 18 ++++++++--- .../org/tensorflow/op/RawCustomGradient.java | 31 +++++++++++++++++- 5 files changed, 93 insertions(+), 10 deletions(-) diff --git a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/AbstractGradientAdapter.java b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/AbstractGradientAdapter.java index 2119cddaa67..18f95d2197d 100644 --- a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/AbstractGradientAdapter.java +++ b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/AbstractGradientAdapter.java @@ -92,8 +92,18 @@ private static TF_Output toNativeOutputs(List> outputs) { new TF_Output(Pointer.malloc((long) outputs.size() * Pointer.sizeof(TF_Output.class))); for (int i = 0; i < outputs.size(); ++i) { - var output = outputs.get(i).asOutput(); var nativeOutput = nativeOutputs.getPointer(i); + + Operand operand = outputs.get(i); + if (operand == null) { + // "NoGradient" sentinel: null oper + index 0. + // Native side must tolerate TF_Output.oper == nullptr. + nativeOutput.oper((org.tensorflow.internal.c_api.TF_Operation) null); + nativeOutput.index(0); + continue; + } + + var output = operand.asOutput(); nativeOutput.oper(((GraphOperation) output.op()).getUnsafeNativeHandle()); nativeOutput.index(output.index()); } diff --git a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/TensorFlow.java b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/TensorFlow.java index 7eba6d7ce30..76c0f168eb6 100644 --- a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/TensorFlow.java +++ b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/TensorFlow.java @@ -207,7 +207,10 @@ public static synchronized boolean registerCustomGradient( if (hasGradient(opType)) { return false; } - TFJ_GradFuncAdapter g = RawCustomGradient.adapter(gradient); + + org.tensorflow.op.GradientDispatch.putRaw(opType, gradient); + TFJ_GradFuncAdapter g = org.tensorflow.op.GradientDispatch.adapter(); + if (!TFJ_RegisterCustomGradient(opType, g)) { return false; } @@ -255,7 +258,10 @@ public static synchronized > boolean registerCustomGrad if (hasGradient(opType)) { return false; } - TFJ_GradFuncAdapter g = CustomGradient.adapter(gradient, inputClass); + + org.tensorflow.op.GradientDispatch.putTyped(opType, gradient, inputClass); + TFJ_GradFuncAdapter g = org.tensorflow.op.GradientDispatch.adapter(); + if (!TFJ_RegisterCustomGradient(opType, g)) { return false; } diff --git a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/CustomGradient.java b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/CustomGradient.java index 02acce1cb37..4c3b80a6cad 100644 --- a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/CustomGradient.java +++ b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/CustomGradient.java @@ -17,10 +17,15 @@ package org.tensorflow.op; import java.util.List; +import org.bytedeco.javacpp.PointerPointer; import org.tensorflow.Operand; import org.tensorflow.Output; import org.tensorflow.TensorFlow; import org.tensorflow.internal.c_api.TFJ_GradFuncAdapter; +import org.tensorflow.internal.c_api.TFJ_GraphId; +import org.tensorflow.internal.c_api.TFJ_Scope; +import org.tensorflow.internal.c_api.TF_Operation; +import org.tensorflow.internal.c_api.TF_Output; /** * A custom gradient for ops of type {@link T}. Should be registered using {@link @@ -57,6 +62,31 @@ public interface CustomGradient { */ static > TFJ_GradFuncAdapter adapter( CustomGradient gradient, Class opClass) { - return new TypedGradientAdapter(gradient, opClass); + + final TypedGradientAdapter impl = new TypedGradientAdapter(gradient, opClass); + + // IMPORTANT: + // Return a *direct* TFJ_GradFuncAdapter subclass, so JavaCPP reliably materializes a function + // pointer thunk for the native side. Some call paths may pass NULL if we return a deeper + // subclass. + return new TFJ_GradFuncAdapter() { + @Override + public int call( + TFJ_GraphId nativeGraphId, + TFJ_Scope nativeScope, + TF_Operation nativeOperation, + TF_Output nativeGradInputs, + int nativeGradInputsLength, + PointerPointer nativeGradOutputsPtr) { + + return impl.call( + nativeGraphId, + nativeScope, + nativeOperation, + nativeGradInputs, + nativeGradInputsLength, + nativeGradOutputsPtr); + } + }; } } diff --git a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/DispatchingGradientAdapter.java b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/DispatchingGradientAdapter.java index 413dd7afb42..380dd6b555d 100644 --- a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/DispatchingGradientAdapter.java +++ b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/DispatchingGradientAdapter.java @@ -28,7 +28,8 @@ static final class TypedEntry> { this.ctor = inputClass.getConstructor(org.tensorflow.GraphOperation.class); } catch (NoSuchMethodException e) { throw new IllegalArgumentException( - "Inputs class " + inputClass.getName() + " must have a public ctor(GraphOperation).", e); + "Inputs class " + inputClass.getName() + " must have a public ctor(GraphOperation).", + e); } } } @@ -37,7 +38,8 @@ void putRaw(String opType, RawCustomGradient g) { raw.put(opType, g); } - > void putTyped(String opType, CustomGradient g, Class inputClass) { + > void putTyped( + String opType, CustomGradient g, Class inputClass) { typed.put(opType, new TypedEntry<>(g, inputClass)); } @@ -50,7 +52,8 @@ protected List> apply( RawCustomGradient rg = raw.get(opType); if (rg != null) { // NativeScope & Ops constructors are package-private => must be in org.tensorflow.op - Scope nativeScope = new NativeScope(scope, graph, operation.name()).withSubScope(operation.name()); + Scope nativeScope = + new NativeScope(scope, graph, operation.name()).withSubScope(operation.name()); return rg.call(new Ops(nativeScope), operation, gradInputs); } @@ -64,10 +67,15 @@ protected List> apply( } private > List> applyTyped( - Graph graph, TFJ_Scope scope, GraphOperation operation, List> gradInputs, TypedEntry te) { + Graph graph, + TFJ_Scope scope, + GraphOperation operation, + List> gradInputs, + TypedEntry te) { try { T inputs = te.ctor.newInstance(operation); - Scope nativeScope = new NativeScope(scope, graph, operation.name()).withSubScope(operation.name()); + Scope nativeScope = + new NativeScope(scope, graph, operation.name()).withSubScope(operation.name()); return te.grad.call(new Ops(nativeScope), inputs, gradInputs); } catch (ReflectiveOperationException e) { throw new RuntimeException("Failed to instantiate inputs for " + te.inputClass.getName(), e); diff --git a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/RawCustomGradient.java b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/RawCustomGradient.java index c2d5496de2a..723d45d58ad 100644 --- a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/RawCustomGradient.java +++ b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/RawCustomGradient.java @@ -17,11 +17,16 @@ package org.tensorflow.op; import java.util.List; +import org.bytedeco.javacpp.PointerPointer; import org.tensorflow.GraphOperation; import org.tensorflow.Operand; import org.tensorflow.Output; import org.tensorflow.TensorFlow; import org.tensorflow.internal.c_api.TFJ_GradFuncAdapter; +import org.tensorflow.internal.c_api.TFJ_GraphId; +import org.tensorflow.internal.c_api.TFJ_Scope; +import org.tensorflow.internal.c_api.TF_Operation; +import org.tensorflow.internal.c_api.TF_Output; /** * A custom gradient for an op of unspecified type. Should be registered using {@link @@ -54,6 +59,30 @@ public interface RawCustomGradient { * TensorFlow#registerCustomGradient(String, RawCustomGradient)}. */ static TFJ_GradFuncAdapter adapter(RawCustomGradient gradient) { - return new RawGradientAdapter(gradient); + final RawGradientAdapter impl = new RawGradientAdapter(gradient); + + // IMPORTANT: + // Return a *direct* TFJ_GradFuncAdapter subclass, so JavaCPP reliably materializes a function + // pointer thunk for the native side. Some call paths may pass NULL if we return a deeper + // subclass. + return new TFJ_GradFuncAdapter() { + @Override + public int call( + TFJ_GraphId nativeGraphId, + TFJ_Scope nativeScope, + TF_Operation nativeOperation, + TF_Output nativeGradInputs, + int nativeGradInputsLength, + PointerPointer nativeGradOutputsPtr) { + + return impl.call( + nativeGraphId, + nativeScope, + nativeOperation, + nativeGradInputs, + nativeGradInputsLength, + nativeGradOutputsPtr); + } + }; } } From e2fa04b5729159308162bbebd8caa24d314f977b Mon Sep 17 00:00:00 2001 From: nfeybesse Date: Sun, 8 Feb 2026 13:56:51 +0100 Subject: [PATCH 40/60] Handle NoGradient in native custom gradient bridge --- .../internal/c_api/presets/tensorflow.java | 13 ++++ .../internal/c_api/tfj_gradients_impl.cc | 78 ++++++++++++++++--- 2 files changed, 81 insertions(+), 10 deletions(-) diff --git a/tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/presets/tensorflow.java b/tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/presets/tensorflow.java index cd3be39fde2..01f8fe59b4b 100644 --- a/tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/presets/tensorflow.java +++ b/tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/presets/tensorflow.java @@ -213,6 +213,19 @@ public void map(InfoMap infoMap) { // Skip C++ classes infoMap.put(new Info("tsl::StatusGroup").skip()); + + // Force correct marshalling of TFJ_RegisterCustomGradient callback argument. + // Without an explicit cast, JavaCPP may pass a NULL function pointer for some FunctionPointer + // instances. + infoMap.put( + new Info("TFJ_RegisterCustomGradient") + .javaText( + "public static native @Cast(\"bool\") boolean TFJ_RegisterCustomGradient(" + + "@Cast(\"const char*\") BytePointer op_type, " + + "@Cast(\"TFJ_GradFuncAdapter\") TFJ_GradFuncAdapter custom_gradient_adapter);\n" + + "public static native @Cast(\"bool\") boolean TFJ_RegisterCustomGradient(" + + "@Cast(\"const char*\") String op_type, " + + "@Cast(\"TFJ_GradFuncAdapter\") TFJ_GradFuncAdapter custom_gradient_adapter);\n")); } @Override diff --git a/tensorflow-core/tensorflow-core-native/src/main/native/org/tensorflow/internal/c_api/tfj_gradients_impl.cc b/tensorflow-core/tensorflow-core-native/src/main/native/org/tensorflow/internal/c_api/tfj_gradients_impl.cc index 6882cfa704c..0e30623dbc3 100644 --- a/tensorflow-core/tensorflow-core-native/src/main/native/org/tensorflow/internal/c_api/tfj_gradients_impl.cc +++ b/tensorflow-core/tensorflow-core-native/src/main/native/org/tensorflow/internal/c_api/tfj_gradients_impl.cc @@ -18,6 +18,12 @@ limitations under the License. #include #include +// IMPORTANT: explicit STL includes (this .cc is included via tfj_gradients.h in some builds, +// so we must not rely on transitive includes from other headers). +#include +#include +#include + #include "tfj_graph.h" #include "tsl/platform/errors.h" #include "tensorflow/c/c_api.h" @@ -32,7 +38,6 @@ namespace tensorflow { unordered_map g_grad_func_adapters; /// This method can be used to cast a pointer to/from a C struct that contains only that pointer. It is a bit - /// It has been "inspired" by the TensorFlow C API code, as found at this location when time of writing: /// https://github.com/tensorflow/tensorflow/blob/9d637f69f699c0c422716b56153a8b27b681891a/tensorflow/c/c_api.cc#L658 template T* struct_cast(U* ptr) { @@ -53,16 +58,34 @@ namespace tensorflow { if (found_adapter == g_grad_func_adapters.end()) { return errors::NotFound("No gradient adapter found for operation ", op_type); } - int num_inputs = grad_inputs.size(); - TF_Output* inputs = (TF_Output*)malloc(num_inputs * sizeof(TF_Output)); + + const int num_inputs = static_cast(grad_inputs.size()); + + TF_Output* inputs = nullptr; + if (num_inputs > 0) { + inputs = static_cast(malloc(num_inputs * sizeof(TF_Output))); + if (inputs == nullptr) { + return errors::ResourceExhausted( + "Out of memory allocating inputs for custom gradient of op ", op_type); + } + } + for (int i = 0; i < num_inputs; ++i) { - Output grad_input = grad_inputs[i]; + const Output& grad_input = grad_inputs[i]; inputs[i].oper = struct_cast(grad_input.node()); inputs[i].index = grad_input.index(); } - TF_Output* outputs = NULL; + + TF_Output* outputs = nullptr; LOG(INFO) << "Calling Java gradient function for operation of type " << op_type; - int num_outputs = found_adapter->second( + + TFJ_GradFuncAdapter adapter = found_adapter->second; + if (adapter == nullptr) { + if (inputs != nullptr) free(inputs); + return errors::Unknown("Null Java gradient adapter for op ", op_type); + } + LOG(INFO) << "Adapter ptr for " << op_type << " = " << reinterpret_cast(found_adapter->second); + const int num_outputs = adapter( static_cast(scope.graph()), struct_cast(const_cast(&scope)), struct_cast(op.node()), @@ -70,12 +93,39 @@ namespace tensorflow { num_inputs, &outputs ); + + // Always free inputs, even on error paths. + if (inputs != nullptr) free(inputs); + + // Adapter contract hardening: + // - On Java exception / failure, adapter should return negative or outputs==nullptr. + if (num_outputs < 0) { + if (outputs != nullptr) free(outputs); + return errors::Unknown("Java custom gradient adapter failed for op ", op_type, + " (num_outputs=", num_outputs, ")"); + } + if (num_outputs > 0 && outputs == nullptr) { + return errors::Unknown("Java custom gradient adapter returned null outputs for op ", + op_type, " with num_outputs=", num_outputs); + } + + grad_outputs->reserve(grad_outputs->size() + static_cast(num_outputs)); + for (int i = 0; i < num_outputs; ++i) { - TF_Output output = outputs[i]; - grad_outputs->push_back(Output(struct_cast(output.oper), output.index)); + const TF_Output out = outputs[i]; + + // "NoGradient" sentinel from Java: TF_Output.oper == nullptr + if (out.oper == nullptr) { + // Represent "no gradient" as an empty Output. + // TF's gradient builder should tolerate missing gradients for non-differentiable inputs. + grad_outputs->push_back(Output()); + continue; + } + + grad_outputs->push_back(Output(struct_cast(out.oper), out.index)); } - free(inputs); - free(outputs); // outputs are allocated from Java but must be freed here + + if (outputs != nullptr) free(outputs); return OkStatus(); } } @@ -91,6 +141,14 @@ bool TFJ_HasGradient(const char* op_type) { } bool TFJ_RegisterCustomGradient(const char* op_type, TFJ_GradFuncAdapter grad_func_adapter) { + LOG(INFO) << "TFJ_RegisterCustomGradient(" << op_type << ") adapter_ptr=" + << reinterpret_cast(grad_func_adapter); + + if (grad_func_adapter == nullptr) { + LOG(ERROR) << "Refusing to register NULL Java gradient adapter for op " << op_type; + return false; + } + if (TFJ_HasGradient(op_type)) { // Check if gradient already exists otherwise the JVM might abort/crash LOG(WARNING) << "Tried to register Java gradient function for operation " << op_type << ", which has already a registered function"; From 1d43d4cd9542d632071b512cd5c690d4cd25f5f1 Mon Sep 17 00:00:00 2001 From: nfeybesse Date: Tue, 10 Feb 2026 04:53:09 +0100 Subject: [PATCH 41/60] Add tests for NoGradient support in Java custom gradients --- .../org/tensorflow/CustomGradientsTest.java | 124 ++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/CustomGradientsTest.java diff --git a/tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/CustomGradientsTest.java b/tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/CustomGradientsTest.java new file mode 100644 index 00000000000..102623ffc5b --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/CustomGradientsTest.java @@ -0,0 +1,124 @@ +package org.tensorflow; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.util.List; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.DisabledOnOs; +import org.junit.jupiter.api.condition.OS; +import org.tensorflow.op.CustomGradient; +import org.tensorflow.op.Ops; +import org.tensorflow.op.RawCustomGradient; +import org.tensorflow.op.nn.SparseSoftmaxCrossEntropyWithLogits; +import org.tensorflow.types.TFloat32; +import org.tensorflow.types.TInt32; + +@DisabledOnOs(OS.WINDOWS) +public class CustomGradientsTest { + + @Test + public void noGradientNullIsSupported() { + // Register a custom gradient for an op that has NO native gradient in TF core. + CustomGradient grad = + (tf, op, gradInputs) -> { + @SuppressWarnings("unchecked") + Operand gLoss = (Operand) gradInputs.get(0); // [B] + + @SuppressWarnings("unchecked") + Operand logits = op.features; + + SparseSoftmaxCrossEntropyWithLogits xent = + SparseSoftmaxCrossEntropyWithLogits.create(tf.scope(), logits, op.labels); + + Operand backprop = xent.backprop(); // [B,C] + Operand gLossE = tf.expandDims(gLoss, tf.constant(1)); // [B,1] + Operand dLogits = tf.math.mul(gLossE, backprop); // [B,C] + + // labels: NoGradient + return java.util.Arrays.asList(dLogits, null); + }; + + assertTrue( + TensorFlow.registerCustomGradient(SparseSoftmaxCrossEntropyWithLogits.Inputs.class, grad)); + + try (Graph g = new Graph()) { + Ops tf = Ops.create(g); + + // Small fixed shapes to be able to create an explicit seed (avoid OnesLike in addGradients). + Operand logits = tf.constant(new float[][] {{1f, 2f, 3f}, {3f, 2f, 1f}}); + Operand labels = tf.constant(new int[] {2, 0}); + + SparseSoftmaxCrossEntropyWithLogits xent = + SparseSoftmaxCrossEntropyWithLogits.create(tf.scope(), logits, labels); + + Output loss = xent.loss(); // [2] + Operand seed = tf.constant(new float[] {1f, 1f}); // same shape as loss + + Output[] grads = + g.addGradients( + "seed", + new Output[] {loss}, + new Output[] {logits.asOutput(), labels.asOutput()}, + new Output[] {seed.asOutput()}); + + // logits grad exists, labels grad must be "NoGradient" (represented as a CLOSED Output) + assertNotNull(grads); + assertEquals(2, grads.length); + assertNotNull(grads[0], "Expected gradient for logits"); + assertNotNull(grads[1], "Expected an Output placeholder for labels gradient"); + assertTrue(grads[1].isClosed(), "Expected closed gradient (NoGradient) for labels"); + } + } + + @Test + public void sigmoidGradHasCustomGradientWithoutOnesLikeSeed() { + // Register custom gradient for SigmoidGrad (if already registered, it will return false, + // but the test can still pass because the gradient exists in the current process). + TensorFlow.registerCustomGradient( + "SigmoidGrad", + (RawCustomGradient) + (tf, op, gradInputs) -> { + @SuppressWarnings("unchecked") + Operand y = (Operand) op.input(0); // sigmoid(x) + @SuppressWarnings("unchecked") + Operand dy = (Operand) op.input(1); // upstream into SigmoidGrad + @SuppressWarnings("unchecked") + Operand upstream = (Operand) gradInputs.get(0); + + Operand one = tf.constant(1.0f); + Operand yTimesOneMinusY = tf.math.mul(y, tf.math.sub(one, y)); + + // dL/d(dy) = upstream * y*(1-y) + Operand dDy = tf.math.mul(upstream, yTimesOneMinusY); + + // dL/d(y) not needed for this test; return zeros to keep it non-null. + Operand dY = tf.zerosLike(y); + + return List.of(dY, dDy); + }); + + try (Graph g = new Graph()) { + Ops tf = Ops.create(g); + + Operand x = tf.placeholder(TFloat32.class); + Operand y = tf.math.sigmoid(x); + + // Provide an explicit seed dy to avoid Graph.addGradients defaulting to OnesLike(y) + Operand seed = tf.fill(tf.shape(y), tf.constant(1.0f)); + + Output[] grads = + g.addGradients( + "seed", + new Output[] {y.asOutput()}, + new Output[] {x.asOutput()}, + new Output[] {seed.asOutput()}); + + assertNotNull(grads); + assertEquals(1, grads.length); + assertNotNull(grads[0], "Expected a non-null gradient for sigmoid(x) wrt x."); + assertTrue(!grads[0].isClosed(), "Expected an active Output for d(sigmoid)/dx."); + } + } +} From 69a9a3672760188a25229eb57380d388000acafb Mon Sep 17 00:00:00 2001 From: nfeybesse Date: Tue, 10 Feb 2026 09:58:12 +0100 Subject: [PATCH 42/60] Fix custom gradients: support NoGradient and stabilize adapter --- .../tensorflow/AbstractGradientAdapter.java | 17 +- .../org/tensorflow/CustomGradientsTest.java | 5 +- .../internal/c_api/tfj_gradients_impl.cc | 243 +++++++++--------- 3 files changed, 130 insertions(+), 135 deletions(-) diff --git a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/AbstractGradientAdapter.java b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/AbstractGradientAdapter.java index 18f95d2197d..ef581db7ae0 100644 --- a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/AbstractGradientAdapter.java +++ b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/AbstractGradientAdapter.java @@ -80,11 +80,11 @@ private static List> fromNativeOutputs(Graph g, TF_Output nativeOutput } /** - * Put the Java outputs into the array of native outputs, resizing it to the necessary size. - * - * @param outputs the outputs to put - * @return pointer to the native array of outputs - */ + * Put the Java outputs into the array of native outputs, resizing it to the necessary size. + * + * @param outputs the outputs to put + * @return pointer to the native array of outputs + */ private static TF_Output toNativeOutputs(List> outputs) { // Use malloc to allocate native outputs, as they will be freed by the native layer and we do // not want JavaCPP to deallocate them @@ -92,13 +92,12 @@ private static TF_Output toNativeOutputs(List> outputs) { new TF_Output(Pointer.malloc((long) outputs.size() * Pointer.sizeof(TF_Output.class))); for (int i = 0; i < outputs.size(); ++i) { + Operand operand = outputs.get(i); var nativeOutput = nativeOutputs.getPointer(i); - Operand operand = outputs.get(i); + // Convention: null Operand => NoGradient if (operand == null) { - // "NoGradient" sentinel: null oper + index 0. - // Native side must tolerate TF_Output.oper == nullptr. - nativeOutput.oper((org.tensorflow.internal.c_api.TF_Operation) null); + nativeOutput.oper((TF_Operation) null); nativeOutput.index(0); continue; } diff --git a/tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/CustomGradientsTest.java b/tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/CustomGradientsTest.java index 102623ffc5b..baaa7bdb742 100644 --- a/tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/CustomGradientsTest.java +++ b/tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/CustomGradientsTest.java @@ -3,6 +3,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.assertFalse; import java.util.List; import org.junit.jupiter.api.Test; @@ -96,7 +97,7 @@ public void sigmoidGradHasCustomGradientWithoutOnesLikeSeed() { // dL/d(y) not needed for this test; return zeros to keep it non-null. Operand dY = tf.zerosLike(y); - return List.of(dY, dDy); + return java.util.Arrays.asList(dY, dDy); }); try (Graph g = new Graph()) { @@ -118,7 +119,7 @@ public void sigmoidGradHasCustomGradientWithoutOnesLikeSeed() { assertNotNull(grads); assertEquals(1, grads.length); assertNotNull(grads[0], "Expected a non-null gradient for sigmoid(x) wrt x."); - assertTrue(!grads[0].isClosed(), "Expected an active Output for d(sigmoid)/dx."); + assertFalse(grads[0].isClosed(), "Expected an active Output for d(sigmoid)/dx."); } } } diff --git a/tensorflow-core/tensorflow-core-native/src/main/native/org/tensorflow/internal/c_api/tfj_gradients_impl.cc b/tensorflow-core/tensorflow-core-native/src/main/native/org/tensorflow/internal/c_api/tfj_gradients_impl.cc index 0e30623dbc3..32e6043b1c3 100644 --- a/tensorflow-core/tensorflow-core-native/src/main/native/org/tensorflow/internal/c_api/tfj_gradients_impl.cc +++ b/tensorflow-core/tensorflow-core-native/src/main/native/org/tensorflow/internal/c_api/tfj_gradients_impl.cc @@ -21,8 +21,8 @@ limitations under the License. // IMPORTANT: explicit STL includes (this .cc is included via tfj_gradients.h in some builds, // so we must not rely on transitive includes from other headers). #include -#include #include +#include #include "tfj_graph.h" #include "tsl/platform/errors.h" @@ -31,141 +31,136 @@ limitations under the License. #include "tensorflow/cc/framework/grad_op_registry.h" namespace tensorflow { - namespace java { - using namespace tsl; - using namespace std; - - unordered_map g_grad_func_adapters; - - /// This method can be used to cast a pointer to/from a C struct that contains only that pointer. It is a bit - /// It has been "inspired" by the TensorFlow C API code, as found at this location when time of writing: - /// https://github.com/tensorflow/tensorflow/blob/9d637f69f699c0c422716b56153a8b27b681891a/tensorflow/c/c_api.cc#L658 - template T* struct_cast(U* ptr) { - return static_cast(static_cast(ptr)); - } - - /// This function is called by the TensorFlow runtime when it is time to add gradient operations of `op` to the - /// graph using the given `scope`. - /// We use it as a bridge between the C++ signature in TensorFlow (tensorflow::op::GradFunc) and our custom - /// "C" version (TFJ_GradFuncAdapter). - Status CustomGradFunc(const Scope& scope, - const Operation& op, - const vector& grad_inputs, - vector* grad_outputs) - { - const string& op_type = op.node()->type_string(); - auto found_adapter = g_grad_func_adapters.find(op_type); - if (found_adapter == g_grad_func_adapters.end()) { - return errors::NotFound("No gradient adapter found for operation ", op_type); - } - - const int num_inputs = static_cast(grad_inputs.size()); - - TF_Output* inputs = nullptr; - if (num_inputs > 0) { - inputs = static_cast(malloc(num_inputs * sizeof(TF_Output))); - if (inputs == nullptr) { - return errors::ResourceExhausted( - "Out of memory allocating inputs for custom gradient of op ", op_type); - } - } - - for (int i = 0; i < num_inputs; ++i) { - const Output& grad_input = grad_inputs[i]; - inputs[i].oper = struct_cast(grad_input.node()); - inputs[i].index = grad_input.index(); - } - - TF_Output* outputs = nullptr; - LOG(INFO) << "Calling Java gradient function for operation of type " << op_type; - - TFJ_GradFuncAdapter adapter = found_adapter->second; - if (adapter == nullptr) { - if (inputs != nullptr) free(inputs); - return errors::Unknown("Null Java gradient adapter for op ", op_type); - } - LOG(INFO) << "Adapter ptr for " << op_type << " = " << reinterpret_cast(found_adapter->second); - const int num_outputs = adapter( - static_cast(scope.graph()), - struct_cast(const_cast(&scope)), - struct_cast(op.node()), - inputs, - num_inputs, - &outputs - ); - - // Always free inputs, even on error paths. - if (inputs != nullptr) free(inputs); - - // Adapter contract hardening: - // - On Java exception / failure, adapter should return negative or outputs==nullptr. - if (num_outputs < 0) { - if (outputs != nullptr) free(outputs); - return errors::Unknown("Java custom gradient adapter failed for op ", op_type, - " (num_outputs=", num_outputs, ")"); - } - if (num_outputs > 0 && outputs == nullptr) { - return errors::Unknown("Java custom gradient adapter returned null outputs for op ", - op_type, " with num_outputs=", num_outputs); - } - - grad_outputs->reserve(grad_outputs->size() + static_cast(num_outputs)); - - for (int i = 0; i < num_outputs; ++i) { - const TF_Output out = outputs[i]; - - // "NoGradient" sentinel from Java: TF_Output.oper == nullptr - if (out.oper == nullptr) { - // Represent "no gradient" as an empty Output. - // TF's gradient builder should tolerate missing gradients for non-differentiable inputs. - grad_outputs->push_back(Output()); - continue; - } - - grad_outputs->push_back(Output(struct_cast(out.oper), out.index)); - } - - if (outputs != nullptr) free(outputs); - return OkStatus(); - } +namespace java { + +using namespace tsl; +using namespace std; + +unordered_map g_grad_func_adapters; + +// Cast helper (inspired by TF C-API) +template +T* struct_cast(U* ptr) { + return static_cast(static_cast(ptr)); +} + +// Bridge called by TF runtime when building gradients for op +Status CustomGradFunc(const Scope& scope, + const Operation& op, + const vector& grad_inputs, + vector* grad_outputs) { + const string& op_type = op.node()->type_string(); + auto found_adapter = g_grad_func_adapters.find(op_type); + if (found_adapter == g_grad_func_adapters.end()) { + return errors::NotFound("No gradient adapter found for operation ", op_type); + } + + TFJ_GradFuncAdapter adapter = found_adapter->second; + if (adapter == nullptr) { + return errors::Unknown("Null Java gradient adapter for op ", op_type); + } + + const int num_inputs = static_cast(grad_inputs.size()); + + TF_Output* inputs = nullptr; + if (num_inputs > 0) { + inputs = static_cast(malloc(num_inputs * sizeof(TF_Output))); + if (inputs == nullptr) { + return errors::ResourceExhausted( + "Out of memory allocating inputs for custom gradient of op ", op_type); + } + } + + for (int i = 0; i < num_inputs; ++i) { + const Output& grad_input = grad_inputs[i]; + inputs[i].oper = struct_cast(grad_input.node()); + inputs[i].index = grad_input.index(); + } + + TF_Output* outputs = nullptr; + + LOG(INFO) << "Calling Java gradient function for operation of type " << op_type; + const int num_outputs = adapter( + static_cast(scope.graph()), + struct_cast(const_cast(&scope)), + struct_cast(op.node()), + inputs, + num_inputs, + &outputs); + + if (inputs != nullptr) free(inputs); + + // Adapter contract: + // - num_outputs < 0 indicates failure + // - num_outputs == 0: OK, outputs may be nullptr + // - num_outputs > 0: outputs must be non-null + if (num_outputs < 0) { + if (outputs != nullptr) free(outputs); + return errors::Unknown("Java custom gradient adapter failed for op ", op_type, + " (num_outputs=", num_outputs, ")"); + } + if (num_outputs > 0 && outputs == nullptr) { + return errors::Unknown("Java custom gradient adapter returned null outputs for op ", + op_type, " with num_outputs=", num_outputs); + } + + grad_outputs->reserve(grad_outputs->size() + static_cast(num_outputs)); + + for (int i = 0; i < num_outputs; ++i) { + const TF_Output out = outputs[i]; + + // Convention: out.oper == nullptr => NoGradient + if (out.oper == nullptr) { + grad_outputs->push_back(Output()); // TF interprets empty Output as "no grad" + continue; } + + grad_outputs->push_back(Output(struct_cast(out.oper), out.index)); + } + + if (outputs != nullptr) free(outputs); // allocated from Java via malloc + return OkStatus(); } +} // namespace java +} // namespace tensorflow + using namespace tensorflow::ops; using namespace tensorflow::java; bool TFJ_HasGradient(const char* op_type) { - GradFunc dummy; - tsl::Status status = GradOpRegistry::Global()->Lookup(op_type, &dummy); - return status.ok(); + GradFunc dummy; + tsl::Status status = GradOpRegistry::Global()->Lookup(op_type, &dummy); + return status.ok(); } bool TFJ_RegisterCustomGradient(const char* op_type, TFJ_GradFuncAdapter grad_func_adapter) { - LOG(INFO) << "TFJ_RegisterCustomGradient(" << op_type << ") adapter_ptr=" - << reinterpret_cast(grad_func_adapter); - - if (grad_func_adapter == nullptr) { - LOG(ERROR) << "Refusing to register NULL Java gradient adapter for op " << op_type; - return false; - } - - if (TFJ_HasGradient(op_type)) { // Check if gradient already exists otherwise the JVM might abort/crash - LOG(WARNING) << "Tried to register Java gradient function for operation " << op_type - << ", which has already a registered function"; - return false; - } - bool registered = GradOpRegistry::Global()->Register(op_type, CustomGradFunc); - if (registered) { - g_grad_func_adapters.insert({op_type, grad_func_adapter}); - } - return registered; + LOG(INFO) << "TFJ_RegisterCustomGradient(" << op_type << ") adapter_ptr=" + << reinterpret_cast(grad_func_adapter); + + if (grad_func_adapter == nullptr) { + LOG(ERROR) << "Refusing to register NULL Java gradient adapter for op " << op_type; + return false; + } + + if (TFJ_HasGradient(op_type)) { + LOG(WARNING) << "Tried to register Java gradient function for operation " << op_type + << ", which has already a registered function"; + return false; + } + + bool registered = GradOpRegistry::Global()->Register(op_type, CustomGradFunc); + if (registered) { + g_grad_func_adapters.insert({op_type, grad_func_adapter}); + } + return registered; } -#else // #ifndef _WIN32 - -/* This extension is not available on Windows */ +#else // _WIN32 bool TFJ_HasGradient(const char* op_type) { return true; } -bool TFJ_RegisterCustomGradient(const char* op_type, TFJ_GradFuncAdapter grad_func_adapter) { return false; } +bool TFJ_RegisterCustomGradient(const char* op_type, TFJ_GradFuncAdapter grad_func_adapter) { + return false; +} -#endif // #ifndef _WIN32 +#endif // _WIN32 From 8d80312b8c0b0efd53132fa5ac8f1d2cb5d5f50c Mon Sep 17 00:00:00 2001 From: nfeybesse Date: Tue, 10 Feb 2026 17:55:07 +0100 Subject: [PATCH 43/60] apply mvn spotless --- .../tensorflow/AbstractGradientAdapter.java | 10 +- .../org/tensorflow/CustomGradientsTest.java | 3 +- .../internal/c_api/tfj_gradients_impl.cc | 230 +++++++++--------- 3 files changed, 116 insertions(+), 127 deletions(-) diff --git a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/AbstractGradientAdapter.java b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/AbstractGradientAdapter.java index ef581db7ae0..94f82786ed3 100644 --- a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/AbstractGradientAdapter.java +++ b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/AbstractGradientAdapter.java @@ -80,11 +80,11 @@ private static List> fromNativeOutputs(Graph g, TF_Output nativeOutput } /** - * Put the Java outputs into the array of native outputs, resizing it to the necessary size. - * - * @param outputs the outputs to put - * @return pointer to the native array of outputs - */ + * Put the Java outputs into the array of native outputs, resizing it to the necessary size. + * + * @param outputs the outputs to put + * @return pointer to the native array of outputs + */ private static TF_Output toNativeOutputs(List> outputs) { // Use malloc to allocate native outputs, as they will be freed by the native layer and we do // not want JavaCPP to deallocate them diff --git a/tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/CustomGradientsTest.java b/tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/CustomGradientsTest.java index baaa7bdb742..6d7e9a098cd 100644 --- a/tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/CustomGradientsTest.java +++ b/tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/CustomGradientsTest.java @@ -1,11 +1,10 @@ package org.tensorflow; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.junit.jupiter.api.Assertions.assertFalse; -import java.util.List; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.condition.DisabledOnOs; import org.junit.jupiter.api.condition.OS; diff --git a/tensorflow-core/tensorflow-core-native/src/main/native/org/tensorflow/internal/c_api/tfj_gradients_impl.cc b/tensorflow-core/tensorflow-core-native/src/main/native/org/tensorflow/internal/c_api/tfj_gradients_impl.cc index 32e6043b1c3..9c5ecd75e07 100644 --- a/tensorflow-core/tensorflow-core-native/src/main/native/org/tensorflow/internal/c_api/tfj_gradients_impl.cc +++ b/tensorflow-core/tensorflow-core-native/src/main/native/org/tensorflow/internal/c_api/tfj_gradients_impl.cc @@ -18,8 +18,6 @@ limitations under the License. #include #include -// IMPORTANT: explicit STL includes (this .cc is included via tfj_gradients.h in some builds, -// so we must not rely on transitive includes from other headers). #include #include #include @@ -31,136 +29,128 @@ limitations under the License. #include "tensorflow/cc/framework/grad_op_registry.h" namespace tensorflow { -namespace java { - -using namespace tsl; -using namespace std; - -unordered_map g_grad_func_adapters; - -// Cast helper (inspired by TF C-API) -template -T* struct_cast(U* ptr) { - return static_cast(static_cast(ptr)); -} - -// Bridge called by TF runtime when building gradients for op -Status CustomGradFunc(const Scope& scope, - const Operation& op, - const vector& grad_inputs, - vector* grad_outputs) { - const string& op_type = op.node()->type_string(); - auto found_adapter = g_grad_func_adapters.find(op_type); - if (found_adapter == g_grad_func_adapters.end()) { - return errors::NotFound("No gradient adapter found for operation ", op_type); - } - - TFJ_GradFuncAdapter adapter = found_adapter->second; - if (adapter == nullptr) { - return errors::Unknown("Null Java gradient adapter for op ", op_type); - } - - const int num_inputs = static_cast(grad_inputs.size()); - - TF_Output* inputs = nullptr; - if (num_inputs > 0) { - inputs = static_cast(malloc(num_inputs * sizeof(TF_Output))); - if (inputs == nullptr) { - return errors::ResourceExhausted( - "Out of memory allocating inputs for custom gradient of op ", op_type); - } - } - - for (int i = 0; i < num_inputs; ++i) { - const Output& grad_input = grad_inputs[i]; - inputs[i].oper = struct_cast(grad_input.node()); - inputs[i].index = grad_input.index(); - } - - TF_Output* outputs = nullptr; - - LOG(INFO) << "Calling Java gradient function for operation of type " << op_type; - const int num_outputs = adapter( - static_cast(scope.graph()), - struct_cast(const_cast(&scope)), - struct_cast(op.node()), - inputs, - num_inputs, - &outputs); - - if (inputs != nullptr) free(inputs); - - // Adapter contract: - // - num_outputs < 0 indicates failure - // - num_outputs == 0: OK, outputs may be nullptr - // - num_outputs > 0: outputs must be non-null - if (num_outputs < 0) { - if (outputs != nullptr) free(outputs); - return errors::Unknown("Java custom gradient adapter failed for op ", op_type, - " (num_outputs=", num_outputs, ")"); - } - if (num_outputs > 0 && outputs == nullptr) { - return errors::Unknown("Java custom gradient adapter returned null outputs for op ", - op_type, " with num_outputs=", num_outputs); - } - - grad_outputs->reserve(grad_outputs->size() + static_cast(num_outputs)); - - for (int i = 0; i < num_outputs; ++i) { - const TF_Output out = outputs[i]; - - // Convention: out.oper == nullptr => NoGradient - if (out.oper == nullptr) { - grad_outputs->push_back(Output()); // TF interprets empty Output as "no grad" - continue; + namespace java { + using namespace tsl; + using namespace std; + + unordered_map g_grad_func_adapters; + + /// This method can be used to cast a pointer to/from a C struct that contains only that pointer. It is a bit + /// + /// It has been "inspired" by the TensorFlow C API code, as found at this location when time of writing: + /// https://github.com/tensorflow/tensorflow/blob/9d637f69f699c0c422716b56153a8b27b681891a/tensorflow/c/c_api.cc#L658 + template T* struct_cast(U* ptr) { + return static_cast(static_cast(ptr)); + } + + /// This function is called by the TensorFlow runtime when it is time to add gradient operations of `op` to the + /// graph using the given `scope`. + /// We use it as a bridge between the C++ signature in TensorFlow (tensorflow::op::GradFunc) and our custom + /// "C" version (TFJ_GradFuncAdapter). + Status CustomGradFunc(const Scope& scope, + const Operation& op, + const vector& grad_inputs, + vector* grad_outputs) + { + const string& op_type = op.node()->type_string(); + auto found_adapter = g_grad_func_adapters.find(op_type); + if (found_adapter == g_grad_func_adapters.end()) { + return errors::NotFound("No gradient adapter found for operation ", op_type); + } + + TFJ_GradFuncAdapter adapter = found_adapter->second; + if (adapter == NULL) { + return errors::Unknown("Null Java gradient adapter for operation ", op_type); + } + + int num_inputs = grad_inputs.size(); + TF_Output* inputs = NULL; + if (num_inputs > 0) { + inputs = (TF_Output*)malloc(num_inputs * sizeof(TF_Output)); + if (inputs == NULL) { + return errors::ResourceExhausted( + "Out of memory allocating inputs for custom gradient of op ", op_type); + } + } + + for (int i = 0; i < num_inputs; ++i) { + Output grad_input = grad_inputs[i]; + inputs[i].oper = struct_cast(grad_input.node()); + inputs[i].index = grad_input.index(); + } + + TF_Output* outputs = NULL; + LOG(INFO) << "Calling Java gradient function for operation of type " << op_type; + int num_outputs = adapter( + static_cast(scope.graph()), + struct_cast(const_cast(&scope)), + struct_cast(op.node()), + inputs, + num_inputs, + &outputs + ); + + if (inputs != NULL) free(inputs); + + if (num_outputs < 0) { + if (outputs != NULL) free(outputs); + return errors::Unknown("Java custom gradient adapter failed for operation ", op_type, + " (num_outputs=", num_outputs, ")"); + } + if (num_outputs > 0 && outputs == NULL) { + return errors::Unknown("Java custom gradient adapter returned null outputs for operation ", + op_type, " with num_outputs=", num_outputs); + } + + for (int i = 0; i < num_outputs; ++i) { + TF_Output output = outputs[i]; + + // Convention: output.oper == NULL => NoGradient + if (output.oper == NULL) { + grad_outputs->push_back(Output()); + } else { + grad_outputs->push_back(Output(struct_cast(output.oper), output.index)); + } + } + + if (outputs != NULL) free(outputs); // outputs are allocated from Java but must be freed here + return OkStatus(); + } } - - grad_outputs->push_back(Output(struct_cast(out.oper), out.index)); - } - - if (outputs != nullptr) free(outputs); // allocated from Java via malloc - return OkStatus(); } -} // namespace java -} // namespace tensorflow - using namespace tensorflow::ops; using namespace tensorflow::java; bool TFJ_HasGradient(const char* op_type) { - GradFunc dummy; - tsl::Status status = GradOpRegistry::Global()->Lookup(op_type, &dummy); - return status.ok(); + GradFunc dummy; + tsl::Status status = GradOpRegistry::Global()->Lookup(op_type, &dummy); + return status.ok(); } bool TFJ_RegisterCustomGradient(const char* op_type, TFJ_GradFuncAdapter grad_func_adapter) { - LOG(INFO) << "TFJ_RegisterCustomGradient(" << op_type << ") adapter_ptr=" - << reinterpret_cast(grad_func_adapter); - - if (grad_func_adapter == nullptr) { - LOG(ERROR) << "Refusing to register NULL Java gradient adapter for op " << op_type; - return false; - } - - if (TFJ_HasGradient(op_type)) { - LOG(WARNING) << "Tried to register Java gradient function for operation " << op_type - << ", which has already a registered function"; - return false; - } - - bool registered = GradOpRegistry::Global()->Register(op_type, CustomGradFunc); - if (registered) { - g_grad_func_adapters.insert({op_type, grad_func_adapter}); - } - return registered; + if (grad_func_adapter == NULL) { + LOG(ERROR) << "Refusing to register NULL Java gradient adapter for operation " << op_type; + return false; + } + + if (TFJ_HasGradient(op_type)) { // Check if gradient already exists otherwise the JVM might abort/crash + LOG(WARNING) << "Tried to register Java gradient function for operation " << op_type + << ", which has already a registered function"; + return false; + } + bool registered = GradOpRegistry::Global()->Register(op_type, CustomGradFunc); + if (registered) { + g_grad_func_adapters.insert({op_type, grad_func_adapter}); + } + return registered; } -#else // _WIN32 +#else // #ifndef _WIN32 + +/* This extension is not available on Windows */ bool TFJ_HasGradient(const char* op_type) { return true; } -bool TFJ_RegisterCustomGradient(const char* op_type, TFJ_GradFuncAdapter grad_func_adapter) { - return false; -} +bool TFJ_RegisterCustomGradient(const char* op_type, TFJ_GradFuncAdapter grad_func_adapter) { return false; } -#endif // _WIN32 +#endif // #ifndef _WIN32 From 1240293e6799ca0caef6f439349f1aef304f7785 Mon Sep 17 00:00:00 2001 From: Nicolas Feybesse Date: Thu, 12 Feb 2026 17:29:28 +0100 Subject: [PATCH 44/60] Fix review comments: enforce mutual exclusion for raw/typed gradients, remove inline ifs, add license headers and imports - Prevent dual registration of raw and typed gradients for the same op type - Use putIfAbsent and explicit exceptions to avoid silent overwrites - Replace inline if statements in tfj_gradients_impl.cc with brace blocks - Add Apache 2.0 headers to new files - Replace fully-qualified GradientDispatch reference with import --- .../main/java/org/tensorflow/TensorFlow.java | 9 ++-- .../op/DispatchingGradientAdapter.java | 43 ++++++++++++++++++- .../org/tensorflow/op/GradientDispatch.java | 15 +++++++ .../internal/c_api/tfj_gradients_impl.cc | 14 ++++-- 4 files changed, 72 insertions(+), 9 deletions(-) diff --git a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/TensorFlow.java b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/TensorFlow.java index 76c0f168eb6..a6b9e86dd9e 100644 --- a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/TensorFlow.java +++ b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/TensorFlow.java @@ -39,6 +39,7 @@ import org.tensorflow.internal.c_api.TF_Library; import org.tensorflow.internal.c_api.TF_Status; import org.tensorflow.op.CustomGradient; +import org.tensorflow.op.GradientDispatch; import org.tensorflow.op.RawCustomGradient; import org.tensorflow.op.RawOpInputs; import org.tensorflow.op.annotation.OpInputsMetadata; @@ -208,8 +209,8 @@ public static synchronized boolean registerCustomGradient( return false; } - org.tensorflow.op.GradientDispatch.putRaw(opType, gradient); - TFJ_GradFuncAdapter g = org.tensorflow.op.GradientDispatch.adapter(); + GradientDispatch.putRaw(opType, gradient); + TFJ_GradFuncAdapter g = GradientDispatch.adapter(); if (!TFJ_RegisterCustomGradient(opType, g)) { return false; @@ -259,8 +260,8 @@ public static synchronized > boolean registerCustomGrad return false; } - org.tensorflow.op.GradientDispatch.putTyped(opType, gradient, inputClass); - TFJ_GradFuncAdapter g = org.tensorflow.op.GradientDispatch.adapter(); + GradientDispatch.putTyped(opType, gradient, inputClass); + TFJ_GradFuncAdapter g = GradientDispatch.adapter(); if (!TFJ_RegisterCustomGradient(opType, g)) { return false; diff --git a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/DispatchingGradientAdapter.java b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/DispatchingGradientAdapter.java index 380dd6b555d..80b934460dc 100644 --- a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/DispatchingGradientAdapter.java +++ b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/DispatchingGradientAdapter.java @@ -1,3 +1,18 @@ +/* Copyright 2026 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.op; import java.lang.reflect.Constructor; @@ -16,6 +31,16 @@ final class DispatchingGradientAdapter extends AbstractGradientAdapter { private final ConcurrentMap raw = new ConcurrentHashMap<>(); private final ConcurrentMap> typed = new ConcurrentHashMap<>(); + private static String dupMsg(String opType, String existingKind, String newKind) { + return "A " + + existingKind + + " gradient is already registered for op type '" + + opType + + "'. Raw and typed registrations are mutually exclusive; cannot register " + + newKind + + "."; + } + static final class TypedEntry> { final CustomGradient grad; final Class inputClass; @@ -35,12 +60,26 @@ static final class TypedEntry> { } void putRaw(String opType, RawCustomGradient g) { - raw.put(opType, g); + if (typed.containsKey(opType)) { + throw new IllegalStateException(dupMsg(opType, "typed", "raw")); + } + RawCustomGradient prev = raw.putIfAbsent(opType, g); + if (prev != null) { + throw new IllegalStateException( + "A raw gradient is already registered for op type '" + opType + "'."); + } } > void putTyped( String opType, CustomGradient g, Class inputClass) { - typed.put(opType, new TypedEntry<>(g, inputClass)); + if (raw.containsKey(opType)) { + throw new IllegalStateException(dupMsg(opType, "raw", "typed")); + } + TypedEntry prev = typed.putIfAbsent(opType, new TypedEntry<>(g, inputClass)); + if (prev != null) { + throw new IllegalStateException( + "A typed gradient is already registered for op type '" + opType + "'."); + } } @Override diff --git a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/GradientDispatch.java b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/GradientDispatch.java index 64504121677..441cff5a2fc 100644 --- a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/GradientDispatch.java +++ b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/GradientDispatch.java @@ -1,3 +1,18 @@ +/* Copyright 2026 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.op; import org.tensorflow.internal.c_api.TFJ_GradFuncAdapter; diff --git a/tensorflow-core/tensorflow-core-native/src/main/native/org/tensorflow/internal/c_api/tfj_gradients_impl.cc b/tensorflow-core/tensorflow-core-native/src/main/native/org/tensorflow/internal/c_api/tfj_gradients_impl.cc index 9c5ecd75e07..ad68e1e5c05 100644 --- a/tensorflow-core/tensorflow-core-native/src/main/native/org/tensorflow/internal/c_api/tfj_gradients_impl.cc +++ b/tensorflow-core/tensorflow-core-native/src/main/native/org/tensorflow/internal/c_api/tfj_gradients_impl.cc @@ -90,13 +90,18 @@ namespace tensorflow { &outputs ); - if (inputs != NULL) free(inputs); + if (inputs != NULL) { + free(inputs); + } if (num_outputs < 0) { - if (outputs != NULL) free(outputs); + if (outputs != NULL) { + free(outputs); + } return errors::Unknown("Java custom gradient adapter failed for operation ", op_type, " (num_outputs=", num_outputs, ")"); } + if (num_outputs > 0 && outputs == NULL) { return errors::Unknown("Java custom gradient adapter returned null outputs for operation ", op_type, " with num_outputs=", num_outputs); @@ -113,7 +118,10 @@ namespace tensorflow { } } - if (outputs != NULL) free(outputs); // outputs are allocated from Java but must be freed here + if (outputs != NULL) { + free(outputs); // outputs are allocated from Java but must be freed here + } + return OkStatus(); } } From fd1cc192ef41ca9bd87ff3a65d3b05618022b984 Mon Sep 17 00:00:00 2001 From: nfeybesse Date: Fri, 13 Feb 2026 04:54:16 +0100 Subject: [PATCH 45/60] Add Javadoc to DispatchingGradientAdapter Document purpose as Java-side gradient dispatcher mirroring TF-Python, clarify raw vs typed gradient registration contract, and note duplicate registration rejection. --- .../op/DispatchingGradientAdapter.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/DispatchingGradientAdapter.java b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/DispatchingGradientAdapter.java index 80b934460dc..d82aa5df8a2 100644 --- a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/DispatchingGradientAdapter.java +++ b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/DispatchingGradientAdapter.java @@ -26,6 +26,28 @@ import org.tensorflow.Output; import org.tensorflow.internal.c_api.TFJ_Scope; +/** + * Dispatching adapter for Java-side custom gradient registration. + * + *

    This class mirrors the behavior of TensorFlow Python's {@code tf.RegisterGradient} mechanism + * by providing a centralized dispatch layer for custom gradients in the Java API. + * + *

    Gradients may be registered in one of two forms for a given op type: + * + *

      + *
    • A raw gradient ({@link RawCustomGradient}) operating directly on {@link GraphOperation} and + * {@link Output} objects. + *
    • A typed gradient ({@link CustomGradient}) operating on generated {@link RawOpInputs} + * subclasses. + *
    + * + *

    For any given op type, exactly one gradient definition is permitted: either raw or typed. + * Duplicate registrations, or attempts to mix raw and typed gradients for the same op type, are + * rejected to prevent ambiguous dispatch behavior. + * + *

    At runtime, {@link #apply(Graph, TFJ_Scope, GraphOperation, List)} determines the operation + * type and dispatches to the corresponding registered gradient implementation. + */ final class DispatchingGradientAdapter extends AbstractGradientAdapter { private final ConcurrentMap raw = new ConcurrentHashMap<>(); From cdd943c23b3fdf4765545b3a4444a7178681c5b9 Mon Sep 17 00:00:00 2001 From: nfeybesse Date: Sat, 14 Feb 2026 10:25:03 +0100 Subject: [PATCH 46/60] Add Apache 2.0 license header to GradientTests --- .../java/org/tensorflow/CustomGradientsTest.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/CustomGradientsTest.java b/tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/CustomGradientsTest.java index 6d7e9a098cd..c1d528c8a20 100644 --- a/tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/CustomGradientsTest.java +++ b/tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/CustomGradientsTest.java @@ -1,3 +1,19 @@ +/* + Copyright 2026 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +============================================================================== +*/ package org.tensorflow; import static org.junit.jupiter.api.Assertions.assertEquals; From 75402befedce0e1cf847b6f93d654b708a7db1db Mon Sep 17 00:00:00 2001 From: Adam Pocock Date: Fri, 20 Feb 2026 10:24:31 -0500 Subject: [PATCH 47/60] Bumps TF version to 2.20 (#631) * Upgrading to TF 2.20. Dropping Windows support. * Working on bazel protobuf generation. * Working on bazel protobuf generation. * Regenerated protos and ops. * Fixing libomp on Linux arm64. * Fixing library name in JavaCPP generator. --- .github/workflows/build.yml | 48 +- README.md | 4 +- tensorflow-core/pom.xml | 2 +- .../scripts/test_download.sh | 6 +- .../src/api/api_def_DecodeWebP.pbtxt | 6 + .../src/api/api_def_TPUDummyInput.pbtxt | 7 + .../api_def_XlaSparseActivationsUnstack.pbtxt | 7 + ...mbinerOnTcGradWithAdagradAndCsrInput.pbtxt | 7 + ...TcGradWithAdagradMomentumAndCsrInput.pbtxt | 7 + ...mCombinerOnTcGradWithAdamAndCsrInput.pbtxt | 7 + ...ulCustomCombinerOnTcGradWithCsrInput.pbtxt | 7 + ...mCombinerOnTcGradWithFtrlAndCsrInput.pbtxt | 7 + ...omCombinerOnTcGradWithSgdAndCsrInput.pbtxt | 6 + ...MatmulCustomCombinerOnTcWithCsrInput.pbtxt | 6 + .../api/api_def_XlaSparseGradientsStack.pbtxt | 6 + .../org/tensorflow/op/DtypesOps.java | 2 +- .../org/tensorflow/op/ImageOps.java | 89 +- .../annotations/org/tensorflow/op/NnOps.java | 2 +- .../annotations/org/tensorflow/op/Ops.java | 6 +- .../org/tensorflow/op/QuantizationOps.java | 2 +- .../org/tensorflow/op/RandomOps.java | 4 +- .../org/tensorflow/op/StringsOps.java | 4 +- .../annotations/org/tensorflow/op/XlaOps.java | 246 +- .../op/debugging/DebugNumericsSummary.java | 2 +- .../org/tensorflow/op/dtypes/AsString.java | 2 +- .../org/tensorflow/op/image/DecodeImage.java | 48 +- .../org/tensorflow/op/image/DecodePng.java | 2 +- .../org/tensorflow/op/image/DecodeWebP.java | 189 + .../tensorflow/op/nn/MaxPoolWithArgmax.java | 2 +- .../op/quantization/Dequantize.java | 2 +- .../org/tensorflow/op/random/Multinomial.java | 2 +- .../tensorflow/op/random/RandomPoisson.java | 2 +- .../tensorflow/op/strings/UnicodeDecode.java | 2 +- .../op/strings/UnicodeDecodeWithOffsets.java | 2 +- .../tensorflow/op/tpu/ReplicateMetadata.java | 34 +- .../org/tensorflow/op/tpu/TPUDummyInput.java | 114 + .../op/tpu/TPUReplicateMetadata.java | 34 +- .../op/xla/XlaSparseActivationsUnstack.java | 163 + ...ombinerOnTcGradWithAdagradAndCsrInput.java | 374 ++ ...nTcGradWithAdagradMomentumAndCsrInput.java | 437 +++ ...omCombinerOnTcGradWithAdamAndCsrInput.java | 427 ++ ...mulCustomCombinerOnTcGradWithCsrInput.java | 301 ++ ...omCombinerOnTcGradWithFtrlAndCsrInput.java | 436 +++ ...tomCombinerOnTcGradWithSgdAndCsrInput.java | 350 ++ ...eMatmulCustomCombinerOnTcWithCsrInput.java | 278 ++ ...DenseMatmulGradWithAdagradAndCsrInput.java | 34 +- ...mulGradWithAdagradAndStaticBufferSize.java | 34 +- ...mulGradWithAdagradMomentumAndCsrInput.java | 34 +- ...ithAdagradMomentumAndStaticBufferSize.java | 34 +- ...rseDenseMatmulGradWithAdamAndCsrInput.java | 34 +- ...MatmulGradWithAdamAndStaticBufferSize.java | 34 +- .../XlaSparseDenseMatmulGradWithCsrInput.java | 80 +- ...rseDenseMatmulGradWithFtrlAndCsrInput.java | 34 +- ...MatmulGradWithFtrlAndStaticBufferSize.java | 34 +- ...arseDenseMatmulGradWithSgdAndCsrInput.java | 34 +- ...eMatmulGradWithSgdAndStaticBufferSize.java | 34 +- .../xla/XlaSparseDenseMatmulWithCsrInput.java | 80 +- ...SparseDenseMatmulWithStaticBufferSize.java | 50 +- .../op/xla/XlaSparseGradientsStack.java | 128 + .../tensorflow-core-native/.bazelversion | 2 +- tensorflow-core/tensorflow-core-native/BUILD | 4 +- .../tensorflow-core-native/WORKSPACE | 87 +- .../tensorflow-core-native/pom.xml | 10 - .../scripts/bazel_common.sh | 3 +- .../scripts/dist_download.sh | 20 +- .../Deallocator_Pointer_long_Pointer.java | 2 +- .../internal/c_api/Listener_BytePointer.java | 2 +- .../internal/c_api/Listener_String.java | 2 +- .../internal/c_api/TFE_CancelCallback.java | 2 +- .../c_api/TFE_CancellationManager.java | 2 +- .../internal/c_api/TFE_Context.java | 2 +- .../internal/c_api/TFE_ContextOptions.java | 2 +- .../internal/c_api/TFE_CustomDevice.java | 2 +- .../c_api/TFE_CustomDeviceTensorHandle.java | 2 +- .../internal/c_api/TFE_Executor.java | 2 +- .../c_api/TFE_MonitoringBoolGauge0.java | 2 +- .../c_api/TFE_MonitoringBoolGauge1.java | 2 +- .../c_api/TFE_MonitoringBoolGauge2.java | 2 +- .../c_api/TFE_MonitoringBoolGaugeCell.java | 2 +- .../internal/c_api/TFE_MonitoringBuckets.java | 2 +- .../c_api/TFE_MonitoringCounter0.java | 2 +- .../c_api/TFE_MonitoringCounter1.java | 2 +- .../c_api/TFE_MonitoringCounter2.java | 2 +- .../c_api/TFE_MonitoringCounterCell.java | 2 +- .../c_api/TFE_MonitoringIntGauge0.java | 2 +- .../c_api/TFE_MonitoringIntGauge1.java | 2 +- .../c_api/TFE_MonitoringIntGauge2.java | 2 +- .../c_api/TFE_MonitoringIntGaugeCell.java | 2 +- .../c_api/TFE_MonitoringSampler0.java | 2 +- .../c_api/TFE_MonitoringSampler1.java | 2 +- .../c_api/TFE_MonitoringSampler2.java | 2 +- .../c_api/TFE_MonitoringSamplerCell.java | 2 +- .../c_api/TFE_MonitoringStringGauge0.java | 2 +- .../c_api/TFE_MonitoringStringGauge1.java | 2 +- .../c_api/TFE_MonitoringStringGauge2.java | 2 +- .../c_api/TFE_MonitoringStringGauge3.java | 2 +- .../c_api/TFE_MonitoringStringGauge4.java | 2 +- .../c_api/TFE_MonitoringStringGaugeCell.java | 2 +- .../org/tensorflow/internal/c_api/TFE_Op.java | 2 +- .../internal/c_api/TFE_OpAttrs.java | 2 +- .../internal/c_api/TFE_TensorDebugInfo.java | 2 +- .../internal/c_api/TFE_TensorHandle.java | 2 +- .../internal/c_api/TFJ_GradFuncAdapter.java | 2 +- .../internal/c_api/TFJ_GraphId.java | 2 +- .../tensorflow/internal/c_api/TFJ_Scope.java | 2 +- .../c_api/TF_AllocatorAttributes.java | 2 +- .../internal/c_api/TF_ApiDefMap.java | 2 +- .../internal/c_api/TF_AttrBuilder.java | 2 +- .../internal/c_api/TF_AttrMetadata.java | 2 +- .../tensorflow/internal/c_api/TF_Buffer.java | 2 +- .../internal/c_api/TF_CheckpointReader.java | 2 +- .../internal/c_api/TF_DeprecatedSession.java | 2 +- .../internal/c_api/TF_DeviceList.java | 2 +- .../internal/c_api/TF_Function.java | 2 +- .../internal/c_api/TF_FunctionOptions.java | 2 +- .../tensorflow/internal/c_api/TF_Graph.java | 2 +- .../c_api/TF_ImportGraphDefOptions.java | 2 +- .../c_api/TF_ImportGraphDefResults.java | 2 +- .../tensorflow/internal/c_api/TF_Input.java | 2 +- .../tensorflow/internal/c_api/TF_Library.java | 2 +- .../internal/c_api/TF_Operation.java | 2 +- .../c_api/TF_OperationDescription.java | 2 +- .../tensorflow/internal/c_api/TF_Output.java | 2 +- .../tensorflow/internal/c_api/TF_Server.java | 2 +- .../tensorflow/internal/c_api/TF_Session.java | 2 +- .../internal/c_api/TF_SessionOptions.java | 2 +- .../internal/c_api/TF_ShapeAndType.java | 2 +- .../internal/c_api/TF_ShapeAndTypeList.java | 2 +- .../tensorflow/internal/c_api/TF_Status.java | 2 +- .../internal/c_api/TF_StringView.java | 2 +- .../tensorflow/internal/c_api/TF_TString.java | 2 +- .../internal/c_api/TF_TString_Large.java | 2 +- .../internal/c_api/TF_TString_Offset.java | 2 +- .../internal/c_api/TF_TString_Raw.java | 2 +- .../internal/c_api/TF_TString_Small.java | 2 +- .../internal/c_api/TF_TString_Union.java | 2 +- .../internal/c_api/TF_TString_View.java | 2 +- .../tensorflow/internal/c_api/TF_Tensor.java | 2 +- .../internal/c_api/TF_WhileParams.java | 2 +- .../org/tensorflow/internal/c_api/Tensor.java | 2 +- .../internal/c_api/global/tensorflow.java | 16 +- .../proto/AllocationDescription.java | 205 +- .../proto/AllocationDescriptionOrBuilder.java | 2 + .../proto/AllocationDescriptionProtos.java | 16 +- .../tensorflow/proto/AllocationRecord.java | 128 +- .../proto/AllocationRecordOrBuilder.java | 2 + .../tensorflow/proto/AllocatorMemoryUsed.java | 226 +- .../proto/AllocatorMemoryUsedOrBuilder.java | 2 + .../gen/java/org/tensorflow/proto/ApiDef.java | 1187 +++--- .../org/tensorflow/proto/ApiDefOrBuilder.java | 2 + .../org/tensorflow/proto/ApiDefProtos.java | 32 +- .../java/org/tensorflow/proto/ApiDefs.java | 117 +- .../tensorflow/proto/ApiDefsOrBuilder.java | 2 + .../org/tensorflow/proto/AssetFileDef.java | 218 +- .../proto/AssetFileDefOrBuilder.java | 2 + .../java/org/tensorflow/proto/AttrValue.java | 602 ++- .../tensorflow/proto/AttrValueOrBuilder.java | 4 +- .../org/tensorflow/proto/AttrValueProtos.java | 28 +- .../tensorflow/proto/AutoParallelOptions.java | 128 +- .../proto/AutoParallelOptionsOrBuilder.java | 2 + .../tensorflow/proto/AvailableDeviceInfo.java | 219 +- .../proto/AvailableDeviceInfoOrBuilder.java | 2 + .../org/tensorflow/proto/BatchingOptions.java | 958 +++++ .../proto/BatchingOptionsOrBuilder.java | 94 + .../tensorflow/proto/BenchmarkEntries.java | 117 +- .../proto/BenchmarkEntriesOrBuilder.java | 2 + .../org/tensorflow/proto/BenchmarkEntry.java | 373 +- .../proto/BenchmarkEntryOrBuilder.java | 4 +- .../org/tensorflow/proto/BfcMemoryMap.java | 1047 +++-- .../tensorflow/proto/BuildConfiguration.java | 261 +- .../proto/BuildConfigurationOrBuilder.java | 2 + .../tensorflow/proto/BundleEntryProto.java | 511 +-- .../proto/BundleEntryProtoOrBuilder.java | 49 +- .../tensorflow/proto/BundleHeaderProto.java | 230 +- .../proto/BundleHeaderProtoOrBuilder.java | 2 + .../java/org/tensorflow/proto/BytesList.java | 152 +- .../tensorflow/proto/BytesListOrBuilder.java | 2 + .../java/org/tensorflow/proto/CPUInfo.java | 257 +- .../tensorflow/proto/CPUInfoOrBuilder.java | 4 +- .../org/tensorflow/proto/CallableOptions.java | 883 +++-- .../proto/CallableOptionsOrBuilder.java | 162 +- .../java/org/tensorflow/proto/ClusterDef.java | 117 +- .../tensorflow/proto/ClusterDefOrBuilder.java | 2 + .../proto/ClusterDeviceFilters.java | 117 +- .../proto/ClusterDeviceFiltersOrBuilder.java | 2 + .../org/tensorflow/proto/ClusterProtos.java | 24 +- .../org/tensorflow/proto/CodeLocation.java | 198 +- .../proto/CodeLocationOrBuilder.java | 2 + .../org/tensorflow/proto/CollectionDef.java | 1176 +++--- .../proto/CollectionDefOrBuilder.java | 4 +- .../java/org/tensorflow/proto/CommitId.java | 178 +- .../tensorflow/proto/CommitIdOrBuilder.java | 4 +- .../proto/CompositeTensorVariant.java | 199 +- .../org/tensorflow/proto/CondContextDef.java | 338 +- .../proto/CondContextDefOrBuilder.java | 2 + .../org/tensorflow/proto/ConfigProto.java | 1868 +++++---- .../proto/ConfigProtoOrBuilder.java | 30 +- .../org/tensorflow/proto/ConfigProtos.java | 435 +- .../proto/ControlFlowContextDef.java | 144 +- .../proto/ControlFlowContextDefOrBuilder.java | 4 +- .../tensorflow/proto/ControlFlowProtos.java | 32 +- .../tensorflow/proto/CoordinationConfig.java | 684 ++-- .../org/tensorflow/proto/CostGraphDef.java | 1047 +++-- .../proto/CostGraphDefOrBuilder.java | 2 + .../org/tensorflow/proto/CostGraphProtos.java | 32 +- .../java/org/tensorflow/proto/DataClass.java | 11 + .../java/org/tensorflow/proto/DataType.java | 139 +- .../java/org/tensorflow/proto/DebugEvent.java | 295 +- .../tensorflow/proto/DebugEventOrBuilder.java | 4 +- .../tensorflow/proto/DebugEventProtos.java | 52 +- .../org/tensorflow/proto/DebugMetadata.java | 205 +- .../proto/DebugMetadataOrBuilder.java | 2 + .../org/tensorflow/proto/DebugOptions.java | 145 +- .../proto/DebugOptionsOrBuilder.java | 2 + .../org/tensorflow/proto/DebugProtos.java | 28 +- .../tensorflow/proto/DebugTensorWatch.java | 510 +-- .../proto/DebugTensorWatchOrBuilder.java | 70 +- .../org/tensorflow/proto/DebuggedDevice.java | 149 +- .../proto/DebuggedDeviceOrBuilder.java | 2 + .../org/tensorflow/proto/DebuggedGraph.java | 302 +- .../proto/DebuggedGraphOrBuilder.java | 2 + .../tensorflow/proto/DebuggedSourceFile.java | 261 +- .../proto/DebuggedSourceFileOrBuilder.java | 2 + .../tensorflow/proto/DebuggedSourceFiles.java | 117 +- .../proto/DebuggedSourceFilesOrBuilder.java | 2 + .../tensorflow/proto/DeviceAttributes.java | 330 +- .../proto/DeviceAttributesOrBuilder.java | 2 + .../proto/DeviceAttributesProtos.java | 28 +- .../tensorflow/proto/DeviceFiltersProtos.java | 28 +- .../org/tensorflow/proto/DeviceLocality.java | 211 +- .../proto/DeviceLocalityOrBuilder.java | 2 + .../proto/DevicePropertiesProtos.java | 631 ++- .../org/tensorflow/proto/DeviceStepStats.java | 244 +- .../proto/DeviceStepStatsOrBuilder.java | 4 +- .../java/org/tensorflow/proto/EntryValue.java | 129 +- .../tensorflow/proto/EntryValueOrBuilder.java | 4 +- .../java/org/tensorflow/proto/ErrorCodes.java | 18 +- .../gen/java/org/tensorflow/proto/Event.java | 324 +- .../org/tensorflow/proto/EventOrBuilder.java | 4 +- .../org/tensorflow/proto/EventProtos.java | 48 +- .../java/org/tensorflow/proto/Example.java | 183 +- .../tensorflow/proto/ExampleOrBuilder.java | 2 + .../proto/ExampleParserConfiguration.java | 239 +- .../ExampleParserConfigurationOrBuilder.java | 4 +- .../ExampleParserConfigurationProtos.java | 32 +- .../org/tensorflow/proto/ExampleProtos.java | 20 +- .../java/org/tensorflow/proto/Execution.java | 428 +- .../tensorflow/proto/ExecutionOrBuilder.java | 2 + .../java/org/tensorflow/proto/Feature.java | 163 +- .../proto/FeatureConfiguration.java | 144 +- .../proto/FeatureConfigurationOrBuilder.java | 4 +- .../org/tensorflow/proto/FeatureList.java | 121 +- .../proto/FeatureListOrBuilder.java | 2 + .../org/tensorflow/proto/FeatureLists.java | 243 +- .../proto/FeatureListsOrBuilder.java | 4 +- .../tensorflow/proto/FeatureOrBuilder.java | 4 +- .../org/tensorflow/proto/FeatureProtos.java | 84 +- .../java/org/tensorflow/proto/Features.java | 243 +- .../tensorflow/proto/FeaturesOrBuilder.java | 4 +- .../org/tensorflow/proto/FingerprintDef.java | 419 +- .../proto/FingerprintDefOrBuilder.java | 22 + .../tensorflow/proto/FingerprintProtos.java | 32 +- .../proto/FixedLenFeatureProto.java | 310 +- .../proto/FixedLenFeatureProtoOrBuilder.java | 2 + .../java/org/tensorflow/proto/FloatList.java | 143 +- .../tensorflow/proto/FloatListOrBuilder.java | 2 + .../org/tensorflow/proto/FullTypeDef.java | 185 +- .../proto/FullTypeDefOrBuilder.java | 4 +- .../java/org/tensorflow/proto/FullTypeId.java | 395 +- .../org/tensorflow/proto/FullTypeProtos.java | 16 +- .../org/tensorflow/proto/FunctionDef.java | 943 ++--- .../tensorflow/proto/FunctionDefLibrary.java | 135 +- .../proto/FunctionDefLibraryOrBuilder.java | 2 + .../proto/FunctionDefOrBuilder.java | 22 +- .../org/tensorflow/proto/FunctionProtos.java | 56 +- .../java/org/tensorflow/proto/GPUInfo.java | 205 +- .../tensorflow/proto/GPUInfoOrBuilder.java | 2 + .../java/org/tensorflow/proto/GPUOptions.java | 2575 ++++++------ .../tensorflow/proto/GPUOptionsOrBuilder.java | 74 +- .../org/tensorflow/proto/GradientDef.java | 188 +- .../proto/GradientDefOrBuilder.java | 2 + .../org/tensorflow/proto/GraphDebugInfo.java | 1021 +++-- .../proto/GraphDebugInfoOrBuilder.java | 25 +- .../proto/GraphDebugInfoProtos.java | 40 +- .../java/org/tensorflow/proto/GraphDef.java | 845 ++-- .../tensorflow/proto/GraphDefOrBuilder.java | 125 +- .../tensorflow/proto/GraphExecutionTrace.java | 323 +- .../proto/GraphExecutionTraceOrBuilder.java | 2 + .../org/tensorflow/proto/GraphOpCreation.java | 467 ++- .../proto/GraphOpCreationOrBuilder.java | 2 + .../org/tensorflow/proto/GraphOptions.java | 356 +- .../proto/GraphOptionsOrBuilder.java | 3 + .../org/tensorflow/proto/GraphProtos.java | 16 +- .../proto/GraphTransferConstNodeInfo.java | 223 +- .../GraphTransferConstNodeInfoOrBuilder.java | 2 + .../GraphTransferGraphInputNodeInfo.java | 192 +- ...phTransferGraphInputNodeInfoOrBuilder.java | 2 + .../GraphTransferGraphOutputNodeInfo.java | 192 +- ...hTransferGraphOutputNodeInfoOrBuilder.java | 2 + .../tensorflow/proto/GraphTransferInfo.java | 192 +- .../proto/GraphTransferInfoOrBuilder.java | 2 + .../proto/GraphTransferInfoProto.java | 44 +- .../proto/GraphTransferNodeInfo.java | 240 +- .../proto/GraphTransferNodeInfoOrBuilder.java | 2 + .../proto/GraphTransferNodeInput.java | 128 +- .../proto/GraphTransferNodeInputInfo.java | 149 +- .../GraphTransferNodeInputInfoOrBuilder.java | 2 + .../GraphTransferNodeInputOrBuilder.java | 2 + .../proto/GraphTransferNodeOutputInfo.java | 150 +- .../GraphTransferNodeOutputInfoOrBuilder.java | 2 + .../java/org/tensorflow/proto/Histogram.java | 33 +- .../org/tensorflow/proto/HistogramProto.java | 298 +- .../proto/HistogramProtoOrBuilder.java | 16 +- .../java/org/tensorflow/proto/Int64List.java | 154 +- .../tensorflow/proto/Int64ListOrBuilder.java | 8 +- .../tensorflow/proto/InterconnectLink.java | 163 +- .../proto/InterconnectLinkOrBuilder.java | 2 + .../gen/java/org/tensorflow/proto/JobDef.java | 231 +- .../org/tensorflow/proto/JobDefOrBuilder.java | 14 +- .../tensorflow/proto/JobDeviceFilters.java | 292 +- .../proto/JobDeviceFiltersOrBuilder.java | 4 +- .../java/org/tensorflow/proto/KernelDef.java | 533 ++- .../tensorflow/proto/KernelDefOrBuilder.java | 2 + .../org/tensorflow/proto/KernelDefProtos.java | 24 +- .../java/org/tensorflow/proto/KernelList.java | 117 +- .../tensorflow/proto/KernelListOrBuilder.java | 2 + .../java/org/tensorflow/proto/LocalLinks.java | 117 +- .../tensorflow/proto/LocalLinksOrBuilder.java | 2 + .../org/tensorflow/proto/LogMemoryProtos.java | 36 +- .../java/org/tensorflow/proto/LogMessage.java | 167 +- .../tensorflow/proto/LogMessageOrBuilder.java | 2 + .../proto/MachineConfiguration.java | 459 ++- .../proto/MachineConfigurationOrBuilder.java | 2 + .../tensorflow/proto/MemmappedFileSystem.java | 296 +- .../java/org/tensorflow/proto/MemoryInfo.java | 128 +- .../tensorflow/proto/MemoryInfoOrBuilder.java | 2 + .../proto/MemoryLogRawAllocation.java | 226 +- .../MemoryLogRawAllocationOrBuilder.java | 2 + .../proto/MemoryLogRawDeallocation.java | 212 +- .../MemoryLogRawDeallocationOrBuilder.java | 2 + .../org/tensorflow/proto/MemoryLogStep.java | 149 +- .../proto/MemoryLogStepOrBuilder.java | 2 + .../proto/MemoryLogTensorAllocation.java | 232 +- .../MemoryLogTensorAllocationOrBuilder.java | 2 + .../proto/MemoryLogTensorDeallocation.java | 149 +- .../MemoryLogTensorDeallocationOrBuilder.java | 2 + .../proto/MemoryLogTensorOutput.java | 246 +- .../proto/MemoryLogTensorOutputOrBuilder.java | 2 + .../org/tensorflow/proto/MemoryStats.java | 224 +- .../proto/MemoryStatsOrBuilder.java | 2 + .../org/tensorflow/proto/MetaGraphDef.java | 1253 +++--- .../proto/MetaGraphDefOrBuilder.java | 6 +- .../org/tensorflow/proto/MetaGraphProtos.java | 88 +- .../org/tensorflow/proto/MetricEntry.java | 303 +- .../proto/MetricEntryOrBuilder.java | 2 + .../org/tensorflow/proto/NameAttrList.java | 274 +- .../proto/NameAttrListOrBuilder.java | 4 +- .../tensorflow/proto/NamedTensorProto.java | 230 +- .../proto/NamedTensorProtoOrBuilder.java | 5 + .../tensorflow/proto/NamedTensorProtos.java | 16 +- .../java/org/tensorflow/proto/NodeDef.java | 889 +++-- .../tensorflow/proto/NodeDefOrBuilder.java | 24 +- .../org/tensorflow/proto/NodeExecStats.java | 499 +-- .../proto/NodeExecStatsOrBuilder.java | 2 + .../java/org/tensorflow/proto/NodeOutput.java | 197 +- .../tensorflow/proto/NodeOutputOrBuilder.java | 2 + .../java/org/tensorflow/proto/NodeProto.java | 24 +- .../gen/java/org/tensorflow/proto/OpDef.java | 1442 ++++--- .../org/tensorflow/proto/OpDefOrBuilder.java | 3 + .../org/tensorflow/proto/OpDefProtos.java | 32 +- .../org/tensorflow/proto/OpDeprecation.java | 149 +- .../proto/OpDeprecationOrBuilder.java | 2 + .../gen/java/org/tensorflow/proto/OpList.java | 117 +- .../org/tensorflow/proto/OpListOrBuilder.java | 2 + .../tensorflow/proto/OpPerformanceData.java | 1970 +++++----- .../OptimizedFunctionGraphOuterClass.java | 465 ++- .../tensorflow/proto/OptimizerOptions.java | 246 +- .../proto/OptimizerOptionsOrBuilder.java | 6 +- .../org/tensorflow/proto/PlatformInfo.java | 310 +- .../proto/PlatformInfoOrBuilder.java | 2 + .../org/tensorflow/proto/ProfilerOptions.java | 2965 ++++++++++++-- .../org/tensorflow/proto/QueueRunnerDef.java | 354 +- .../proto/QueueRunnerDefOrBuilder.java | 2 + .../tensorflow/proto/QueueRunnerProtos.java | 16 +- .../tensorflow/proto/ReaderBaseProtos.java | 16 +- .../org/tensorflow/proto/ReaderBaseState.java | 159 +- .../proto/ReaderBaseStateOrBuilder.java | 2 + .../tensorflow/proto/RegisteredGradient.java | 170 +- .../proto/RegisteredGradientOrBuilder.java | 2 + .../tensorflow/proto/RequestedExitCode.java | 114 +- .../proto/RequestedExitCodeOrBuilder.java | 2 + .../org/tensorflow/proto/ResourceHandle.java | 20 +- .../tensorflow/proto/ResourceHandleProto.java | 491 +-- .../proto/ResourceHandleProtoOrBuilder.java | 2 + .../org/tensorflow/proto/RewriterConfig.java | 1445 +++---- .../proto/RewriterConfigOrBuilder.java | 10 + .../proto/RewriterConfigProtos.java | 32 +- .../java/org/tensorflow/proto/RpcOptions.java | 244 +- .../tensorflow/proto/RunConfiguration.java | 223 +- .../proto/RunConfigurationOrBuilder.java | 4 +- .../org/tensorflow/proto/RunMetadata.java | 657 ++-- .../proto/RunMetadataOrBuilder.java | 2 + .../java/org/tensorflow/proto/RunOptions.java | 665 ++-- .../tensorflow/proto/RunOptionsOrBuilder.java | 3 + .../tensorflow/proto/SaveSliceInfoDef.java | 235 +- .../proto/SaveSliceInfoDefOrBuilder.java | 2 + .../java/org/tensorflow/proto/SavedModel.java | 149 +- .../tensorflow/proto/SavedModelOrBuilder.java | 2 + .../tensorflow/proto/SavedModelProtos.java | 16 +- .../proto/SavedObjectGraphOuterClass.java | 3486 ++++++++--------- .../java/org/tensorflow/proto/SavedSlice.java | 289 +- .../org/tensorflow/proto/SavedSliceMeta.java | 275 +- .../proto/SavedSliceMetaOrBuilder.java | 2 + .../tensorflow/proto/SavedSliceOrBuilder.java | 2 + .../proto/SavedTensorSliceMeta.java | 201 +- .../proto/SavedTensorSliceMetaOrBuilder.java | 2 + .../proto/SavedTensorSliceProtos.java | 28 +- .../tensorflow/proto/SavedTensorSlices.java | 254 +- .../proto/SavedTensorSlicesOrBuilder.java | 2 + .../java/org/tensorflow/proto/SaverDef.java | 277 +- .../tensorflow/proto/SaverDefOrBuilder.java | 2 + .../org/tensorflow/proto/SaverProtos.java | 16 +- .../proto/ScopedAllocatorOptions.java | 163 +- .../ScopedAllocatorOptionsOrBuilder.java | 2 + .../org/tensorflow/proto/SequenceExample.java | 254 +- .../proto/SequenceExampleOrBuilder.java | 2 + .../org/tensorflow/proto/SerializedDType.java | 121 +- .../proto/SerializedDTypeOrBuilder.java | 2 + .../java/org/tensorflow/proto/ServerDef.java | 455 +-- .../tensorflow/proto/ServerDefOrBuilder.java | 7 + .../org/tensorflow/proto/ServerProtos.java | 16 +- .../java/org/tensorflow/proto/SessionLog.java | 200 +- .../tensorflow/proto/SessionLogOrBuilder.java | 2 + .../org/tensorflow/proto/SessionMetadata.java | 155 +- .../proto/SessionMetadataOrBuilder.java | 2 + .../org/tensorflow/proto/SignatureDef.java | 563 +-- .../proto/SignatureDefOrBuilder.java | 10 +- .../java/org/tensorflow/proto/SourceFile.java | 233 +- .../tensorflow/proto/SourceFileOrBuilder.java | 2 + .../org/tensorflow/proto/SourceMetadata.java | 135 +- .../proto/SourceMetadataOrBuilder.java | 2 + .../tensorflow/proto/StackFrameWithId.java | 218 +- .../proto/StackFrameWithIdOrBuilder.java | 2 + .../gen/java/org/tensorflow/proto/Status.java | 47 +- .../org/tensorflow/proto/StatusProto.java | 498 ++- .../proto/StatusProtoOrBuilder.java | 64 +- .../java/org/tensorflow/proto/StepStats.java | 117 +- .../tensorflow/proto/StepStatsOrBuilder.java | 2 + .../org/tensorflow/proto/StepStatsProtos.java | 44 +- .../gen/java/org/tensorflow/proto/Struct.java | 2353 +++++------ .../java/org/tensorflow/proto/Summary.java | 870 ++-- .../tensorflow/proto/SummaryDescription.java | 135 +- .../proto/SummaryDescriptionOrBuilder.java | 2 + .../org/tensorflow/proto/SummaryMetadata.java | 424 +- .../proto/SummaryMetadataOrBuilder.java | 2 + .../tensorflow/proto/SummaryOrBuilder.java | 2 + .../org/tensorflow/proto/SummaryProtos.java | 102 +- .../tensorflow/proto/TaggedRunMetadata.java | 152 +- .../proto/TaggedRunMetadataOrBuilder.java | 2 + .../tensorflow/proto/TaskDeviceFilters.java | 163 +- .../proto/TaskDeviceFiltersOrBuilder.java | 2 + .../tensorflow/proto/TensorBundleProtos.java | 20 +- .../tensorflow/proto/TensorConnection.java | 170 +- .../proto/TensorConnectionOrBuilder.java | 2 + .../org/tensorflow/proto/TensorDebugMode.java | 23 +- .../tensorflow/proto/TensorDescription.java | 275 +- .../proto/TensorDescriptionOrBuilder.java | 2 + .../proto/TensorDescriptionProtos.java | 16 +- .../java/org/tensorflow/proto/TensorInfo.java | 687 ++-- .../tensorflow/proto/TensorInfoOrBuilder.java | 4 +- .../org/tensorflow/proto/TensorProto.java | 763 ++-- .../proto/TensorProtoOrBuilder.java | 3 + .../org/tensorflow/proto/TensorProtos.java | 20 +- .../tensorflow/proto/TensorShapeProto.java | 351 +- .../proto/TensorShapeProtoOrBuilder.java | 18 + .../tensorflow/proto/TensorShapeProtos.java | 20 +- .../tensorflow/proto/TensorSliceProto.java | 264 +- .../proto/TensorSliceProtoOrBuilder.java | 7 + .../tensorflow/proto/TensorSliceProtos.java | 20 +- .../org/tensorflow/proto/TestLogProtos.java | 80 +- .../org/tensorflow/proto/TestResults.java | 677 ++-- .../proto/TestResultsOrBuilder.java | 6 +- .../proto/ThreadPoolOptionProto.java | 251 +- .../proto/ThreadPoolOptionProtoOrBuilder.java | 31 +- .../proto/TrackableObjectGraphOuterClass.java | 1118 +++--- .../tensorflow/proto/TransportOptions.java | 166 +- .../org/tensorflow/proto/TypesProtos.java | 59 +- .../tensorflow/proto/UniformQuantOpsAttr.java | 298 +- .../java/org/tensorflow/proto/ValuesDef.java | 223 +- .../tensorflow/proto/ValuesDefOrBuilder.java | 4 +- .../tensorflow/proto/VarLenFeatureProto.java | 226 +- .../proto/VarLenFeatureProtoOrBuilder.java | 2 + .../tensorflow/proto/VariableAggregation.java | 11 + .../org/tensorflow/proto/VariableDef.java | 393 +- .../proto/VariableDefOrBuilder.java | 2 + .../org/tensorflow/proto/VariableProtos.java | 20 +- .../proto/VariableSynchronization.java | 11 + .../proto/VariantTensorDataProto.java | 187 +- .../VariantTensorDataProtoOrBuilder.java | 2 + .../org/tensorflow/proto/VerifierConfig.java | 144 +- .../proto/VerifierConfigOrBuilder.java | 2 + .../proto/VerifierConfigProtos.java | 16 +- .../java/org/tensorflow/proto/VersionDef.java | 182 +- .../tensorflow/proto/VersionDefOrBuilder.java | 2 + .../org/tensorflow/proto/VersionsProtos.java | 16 +- .../org/tensorflow/proto/WatchdogConfig.java | 114 +- .../proto/WatchdogConfigOrBuilder.java | 2 + .../org/tensorflow/proto/WhileContextDef.java | 562 ++- .../proto/WhileContextDefOrBuilder.java | 2 + .../org/tensorflow/proto/WorkerHealth.java | 11 + .../proto/WorkerHeartbeatRequest.java | 275 +- .../WorkerHeartbeatRequestOrBuilder.java | 2 + .../proto/WorkerHeartbeatResponse.java | 191 +- .../WorkerHeartbeatResponseOrBuilder.java | 2 + .../tensorflow/proto/WorkerShutdownMode.java | 11 + .../proto/core/CppShapeInference.java | 862 ++-- .../core/platform/CorePlatformPayloads.java | 144 +- .../tensorflow/proto/data/DataService.java | 634 ++- .../org/tensorflow/proto/data/Dataset.java | 539 ++- .../proto/data/DatasetMetadata.java | 292 +- .../tensorflow/proto/data/DatasetOptions.java | 1857 +++++---- .../data/experimental/ServiceConfig.java | 818 ++-- .../proto/data/experimental/Snapshot.java | 917 ++--- .../tensorflow/proto/data/model/Model.java | 1258 +++--- .../DistributedRuntimePayloads.java | 398 +- .../tensorflow/proto/dummy/BfcMemoryMap.java | 12 + .../proto/dummy/ProfilerOptions.java | 12 + .../tensorflow/proto/dummy/RpcOptions.java | 22 +- .../org/tensorflow/proto/dummy/Status.java | 22 +- .../org/tensorflow/proto/dummy/TestLog.java | 12 + .../proto/eager/RemoteTensorHandle.java | 254 +- .../eager/RemoteTensorHandleOrBuilder.java | 2 + .../proto/eager/RemoteTensorHandleProtos.java | 20 +- .../proto/eager/ResourceDtypeAndShape.java | 204 +- .../eager/ResourceDtypeAndShapeOrBuilder.java | 2 + .../java/org/tensorflow/proto/error/Code.java | 84 +- .../proto/error/ErrorCodesProtos.java | 44 +- .../proto/error/dummy/ErrorCodes.java | 22 +- .../org/tensorflow/proto/profiler/Xplane.java | 1925 +++++---- .../proto/profiler/empty/Xplane.java | 40 - .../base_api/api_def_AsString.pbtxt | 2 +- .../base_api/api_def_DecodeImage.pbtxt | 28 +- .../base_api/api_def_DecodeWebP.pbtxt | 35 + .../tensorflow/base_api/api_def_Igamma.pbtxt | 2 +- .../base_api/api_def_TPUDummyInput.pbtxt | 20 + .../api_def_XlaSparseActivationsUnstack.pbtxt | 4 + ...mbinerOnTcGradWithAdagradAndCsrInput.pbtxt | 4 + ...TcGradWithAdagradMomentumAndCsrInput.pbtxt | 4 + ...mCombinerOnTcGradWithAdamAndCsrInput.pbtxt | 4 + ...ulCustomCombinerOnTcGradWithCsrInput.pbtxt | 4 + ...mCombinerOnTcGradWithFtrlAndCsrInput.pbtxt | 4 + ...omCombinerOnTcGradWithSgdAndCsrInput.pbtxt | 4 + ...MatmulCustomCombinerOnTcWithCsrInput.pbtxt | 4 + .../api_def_XlaSparseGradientsStack.pbtxt | 4 + .../gen/resources/org/tensorflow/ops.pbtxt | 1255 +++++- .../src/main/java/module-info.java | 1 - .../internal/c_api/presets/tensorflow.java | 2 +- .../tensorflow-core-native/tensorflow.bazelrc | 333 +- .../tensorflow-core-platform/pom.xml | 8 +- 559 files changed, 47452 insertions(+), 42375 deletions(-) create mode 100644 tensorflow-core/tensorflow-core-api/src/api/api_def_DecodeWebP.pbtxt create mode 100644 tensorflow-core/tensorflow-core-api/src/api/api_def_TPUDummyInput.pbtxt create mode 100644 tensorflow-core/tensorflow-core-api/src/api/api_def_XlaSparseActivationsUnstack.pbtxt create mode 100644 tensorflow-core/tensorflow-core-api/src/api/api_def_XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradAndCsrInput.pbtxt create mode 100644 tensorflow-core/tensorflow-core-api/src/api/api_def_XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradMomentumAndCsrInput.pbtxt create mode 100644 tensorflow-core/tensorflow-core-api/src/api/api_def_XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdamAndCsrInput.pbtxt create mode 100644 tensorflow-core/tensorflow-core-api/src/api/api_def_XlaSparseDenseMatmulCustomCombinerOnTcGradWithCsrInput.pbtxt create mode 100644 tensorflow-core/tensorflow-core-api/src/api/api_def_XlaSparseDenseMatmulCustomCombinerOnTcGradWithFtrlAndCsrInput.pbtxt create mode 100644 tensorflow-core/tensorflow-core-api/src/api/api_def_XlaSparseDenseMatmulCustomCombinerOnTcGradWithSgdAndCsrInput.pbtxt create mode 100644 tensorflow-core/tensorflow-core-api/src/api/api_def_XlaSparseDenseMatmulCustomCombinerOnTcWithCsrInput.pbtxt create mode 100644 tensorflow-core/tensorflow-core-api/src/api/api_def_XlaSparseGradientsStack.pbtxt create mode 100644 tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/image/DecodeWebP.java create mode 100644 tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/tpu/TPUDummyInput.java create mode 100644 tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseActivationsUnstack.java create mode 100644 tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradAndCsrInput.java create mode 100644 tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradMomentumAndCsrInput.java create mode 100644 tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdamAndCsrInput.java create mode 100644 tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulCustomCombinerOnTcGradWithCsrInput.java create mode 100644 tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulCustomCombinerOnTcGradWithFtrlAndCsrInput.java create mode 100644 tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulCustomCombinerOnTcGradWithSgdAndCsrInput.java create mode 100644 tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulCustomCombinerOnTcWithCsrInput.java create mode 100644 tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseGradientsStack.java create mode 100644 tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BatchingOptions.java create mode 100644 tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BatchingOptionsOrBuilder.java delete mode 100644 tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/profiler/empty/Xplane.java create mode 100644 tensorflow-core/tensorflow-core-native/src/gen/resources/org/tensorflow/base_api/api_def_DecodeWebP.pbtxt create mode 100644 tensorflow-core/tensorflow-core-native/src/gen/resources/org/tensorflow/base_api/api_def_TPUDummyInput.pbtxt create mode 100644 tensorflow-core/tensorflow-core-native/src/gen/resources/org/tensorflow/base_api/api_def_XlaSparseActivationsUnstack.pbtxt create mode 100644 tensorflow-core/tensorflow-core-native/src/gen/resources/org/tensorflow/base_api/api_def_XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradAndCsrInput.pbtxt create mode 100644 tensorflow-core/tensorflow-core-native/src/gen/resources/org/tensorflow/base_api/api_def_XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradMomentumAndCsrInput.pbtxt create mode 100644 tensorflow-core/tensorflow-core-native/src/gen/resources/org/tensorflow/base_api/api_def_XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdamAndCsrInput.pbtxt create mode 100644 tensorflow-core/tensorflow-core-native/src/gen/resources/org/tensorflow/base_api/api_def_XlaSparseDenseMatmulCustomCombinerOnTcGradWithCsrInput.pbtxt create mode 100644 tensorflow-core/tensorflow-core-native/src/gen/resources/org/tensorflow/base_api/api_def_XlaSparseDenseMatmulCustomCombinerOnTcGradWithFtrlAndCsrInput.pbtxt create mode 100644 tensorflow-core/tensorflow-core-native/src/gen/resources/org/tensorflow/base_api/api_def_XlaSparseDenseMatmulCustomCombinerOnTcGradWithSgdAndCsrInput.pbtxt create mode 100644 tensorflow-core/tensorflow-core-native/src/gen/resources/org/tensorflow/base_api/api_def_XlaSparseDenseMatmulCustomCombinerOnTcWithCsrInput.pbtxt create mode 100644 tensorflow-core/tensorflow-core-native/src/gen/resources/org/tensorflow/base_api/api_def_XlaSparseGradientsStack.pbtxt diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a56d64d08ce..e43d793064e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -139,55 +139,9 @@ jobs: - name: Deploy native artifact if: env.DEPLOY_RELEASE == 'true' || env.DEPLOY_SNAPSHOT == 'true' run: mvn -f tensorflow-core/tensorflow-core-native/pom.xml deploy:deploy-file@native-only -B -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }} -Durl=${{ needs.prepare.outputs.repositoryUrl }} - windows-x86_64: - runs-on: windows-2022 - needs: prepare - strategy: - matrix: - ext: [""] #, -gpu] - steps: - - name: Install environment - shell: cmd - run: | - set "PATH=C:\msys64\usr\bin;%PATH%" - python -m pip install numpy six - set "EXT=${{ matrix.ext }}" - echo %JAVA_HOME% - - name: Configure Java - uses: actions/setup-java@v5 - with: - distribution: 'adopt' - java-version: '11' - - name: Checkout repository - uses: actions/checkout@v6 - - name: Build project - shell: cmd - run: | - call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64 - set "PATH=C:\msys64\usr\bin;%PATH%" - echo Shorten work paths to prevent Bazel from reaching MAX_PATH limit - mkdir C:\tmp - set "TEST_TMPDIR=C:\tmp" - set "TMPDIR=C:\tmp" - set "TEMP=C:\tmp" - set "TMP=C:\tmp" - bash --version - git --version - cl - call mvn -version - echo ^^^^ossrh^^${{ secrets.CI_DEPLOY_USERNAME }}^^${{ secrets.CI_DEPLOY_PASSWORD }}^^^^ > %USERPROFILE%\.m2\settings.xml - set "SKIP_EXPORT=true" - call mvn clean install -pl "!tensorflow-framework" -B -U -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }} - if ERRORLEVEL 1 exit /b - - name: Deploy native artifact - if: env.DEPLOY_RELEASE == 'true' || env.DEPLOY_SNAPSHOT == 'true' - shell: cmd - run: | - call mvn -f tensorflow-core/tensorflow-core-native/pom.xml deploy:deploy-file@native-only -B -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }} -Durl=${{ needs.prepare.outputs.repositoryUrl }} - if ERRORLEVEL 1 exit /b deploy: if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/staging') }} # DEPLOY_SNAPSHOT (releases should be signed and deployed manually from local machine) - needs: [linux-x86_64, windows-x86_64, macosx-arm64, linux-arm64] + needs: [linux-x86_64, macosx-arm64, linux-arm64] runs-on: ubuntu-22.04 steps: - name: Configure Java diff --git a/README.md b/README.md index e1d1e080bcb..67dae4fc1ab 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ only binaries for the following are being **supported and distributed** by this - `linux-x86_64-gpu`: Linux platforms on Intel/AMD chips with Cuda GPU support - `linux-arm64`: Linux platforms on Arm chips - `macosx-arm64`: MacOS X platforms on Apple Silicon chips -- `windows-x86_64`: Windows platforms on Intel/AMD chips +- `windows-x86_64`: Windows platforms on Intel/AMD chips (v1.1.0 and earlier) Binaries for `macosx-x86_64` are available for TF-Java 1.0 series releases and earlier, they were dropped from TF-Java 1.1 and newer as they are no longer supported or released by Google. @@ -215,7 +215,7 @@ This table shows the mapping between TensorFlow, TensorFlow Java and minimum sup | 1.0.0-rc.2 | 2.16.2 | 11 | | 1.0.0 | 2.16.2 | 11 | | 1.1.0 | 2.18.0 | 11 | -| 1.2.0-SNAPSHOT | 2.18.0 | 11 | +| 1.2.0-SNAPSHOT | 2.20.0 | 11 | ## How to Contribute? diff --git a/tensorflow-core/pom.xml b/tensorflow-core/pom.xml index 14d155dd901..03c548a4111 100644 --- a/tensorflow-core/pom.xml +++ b/tensorflow-core/pom.xml @@ -42,7 +42,7 @@ https://github.com/tensorflow/tensorflow/blob/master/tensorflow/workspace2.bzl (but for the currently used release, not master) --> - 3.21.9 + 4.28.3 ${javacpp.platform}${javacpp.platform.extension} diff --git a/tensorflow-core/tensorflow-core-api/scripts/test_download.sh b/tensorflow-core/tensorflow-core-api/scripts/test_download.sh index 5d1c2988d7e..509468bade2 100755 --- a/tensorflow-core/tensorflow-core-api/scripts/test_download.sh +++ b/tensorflow-core/tensorflow-core-api/scripts/test_download.sh @@ -5,13 +5,13 @@ DOWNLOAD_FOLDER="$1" case ${PLATFORM:-} in 'linux-x86_64') - TEXT_WHEEL_URL='https://files.pythonhosted.org/packages/f3/73/3a906feb0d71d9353c6fb2363d4052856cc6eff5a78a097b1a6002d4e908/tensorflow_text-2.18.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl' + 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' ;; 'linux-arm64') - TEXT_WHEEL_URL='https://files.pythonhosted.org/packages/8a/9a/ebba9f6274f8b51e5fe1ac2411b8b6bf680a32d10bd6e9c54be1faeec062/tensorflow_text-2.18.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl' + 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' ;; 'macosx-arm64') - TEXT_WHEEL_URL='https://files.pythonhosted.org/packages/18/b6/8ad233edb0732847db1da538cea941dcccc42f59304ff6fb449676e6dd5a/tensorflow_text-2.18.1-cp311-cp311-macosx_11_0_arm64.whl' + TEXT_WHEEL_URL='https://files.pythonhosted.org/packages/98/e4/e3c72d0a73caeba90cf5b31e69d44e9a08d614e0e829484d813f3b63e037/tensorflow_text-2.20.0-cp312-cp312-macosx_11_0_arm64.whl' ;; *) echo "TensorFlow Text distribution for ${PLATFORM} is not supported for download" diff --git a/tensorflow-core/tensorflow-core-api/src/api/api_def_DecodeWebP.pbtxt b/tensorflow-core/tensorflow-core-api/src/api/api_def_DecodeWebP.pbtxt new file mode 100644 index 00000000000..5bd8c3f5508 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/api/api_def_DecodeWebP.pbtxt @@ -0,0 +1,6 @@ +op { + graph_op_name: "DecodeWebP" + endpoint { + name: "image.DecodeWebP" + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/api/api_def_TPUDummyInput.pbtxt b/tensorflow-core/tensorflow-core-api/src/api/api_def_TPUDummyInput.pbtxt new file mode 100644 index 00000000000..113a79a4bad --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/api/api_def_TPUDummyInput.pbtxt @@ -0,0 +1,7 @@ +op { + graph_op_name: "TPUDummyInput" + visibility: HIDDEN + endpoint { + name: "tpu.TPUDummyInput" + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/api/api_def_XlaSparseActivationsUnstack.pbtxt b/tensorflow-core/tensorflow-core-api/src/api/api_def_XlaSparseActivationsUnstack.pbtxt new file mode 100644 index 00000000000..986cff47591 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/api/api_def_XlaSparseActivationsUnstack.pbtxt @@ -0,0 +1,7 @@ +op { + graph_op_name: "XlaSparseActivationsUnstack" + visibility: VISIBLE + endpoint { + name: "xla.XlaSparseActivationsUnstack" + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/api/api_def_XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradAndCsrInput.pbtxt b/tensorflow-core/tensorflow-core-api/src/api/api_def_XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradAndCsrInput.pbtxt new file mode 100644 index 00000000000..c1f3e390238 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/api/api_def_XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradAndCsrInput.pbtxt @@ -0,0 +1,7 @@ +op { + graph_op_name: "XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradAndCsrInput" + visibility: VISIBLE + endpoint { + name: "xla.XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradAndCsrInput" + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/api/api_def_XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradMomentumAndCsrInput.pbtxt b/tensorflow-core/tensorflow-core-api/src/api/api_def_XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradMomentumAndCsrInput.pbtxt new file mode 100644 index 00000000000..e43971974c0 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/api/api_def_XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradMomentumAndCsrInput.pbtxt @@ -0,0 +1,7 @@ +op { + graph_op_name: "XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradMomentumAndCsrInput" + visibility: VISIBLE + endpoint { + name: "xla.XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradMomentumAndCsrInput" + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/api/api_def_XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdamAndCsrInput.pbtxt b/tensorflow-core/tensorflow-core-api/src/api/api_def_XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdamAndCsrInput.pbtxt new file mode 100644 index 00000000000..5458e7794fc --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/api/api_def_XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdamAndCsrInput.pbtxt @@ -0,0 +1,7 @@ +op { + graph_op_name: "XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdamAndCsrInput" + visibility: VISIBLE + endpoint { + name: "xla.XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdamAndCsrInput" + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/api/api_def_XlaSparseDenseMatmulCustomCombinerOnTcGradWithCsrInput.pbtxt b/tensorflow-core/tensorflow-core-api/src/api/api_def_XlaSparseDenseMatmulCustomCombinerOnTcGradWithCsrInput.pbtxt new file mode 100644 index 00000000000..2c0a3ca45c3 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/api/api_def_XlaSparseDenseMatmulCustomCombinerOnTcGradWithCsrInput.pbtxt @@ -0,0 +1,7 @@ +op { + graph_op_name: "XlaSparseDenseMatmulCustomCombinerOnTcGradWithCsrInput" + visibility: VISIBLE + endpoint { + name: "xla.XlaSparseDenseMatmulCustomCombinerOnTcGradWithCsrInput" + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/api/api_def_XlaSparseDenseMatmulCustomCombinerOnTcGradWithFtrlAndCsrInput.pbtxt b/tensorflow-core/tensorflow-core-api/src/api/api_def_XlaSparseDenseMatmulCustomCombinerOnTcGradWithFtrlAndCsrInput.pbtxt new file mode 100644 index 00000000000..e0f07990fa0 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/api/api_def_XlaSparseDenseMatmulCustomCombinerOnTcGradWithFtrlAndCsrInput.pbtxt @@ -0,0 +1,7 @@ +op { + graph_op_name: "XlaSparseDenseMatmulCustomCombinerOnTcGradWithFtrlAndCsrInput" + visibility: VISIBLE + endpoint { + name: "xla.XlaSparseDenseMatmulCustomCombinerOnTcGradWithFtrlAndCsrInput" + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/api/api_def_XlaSparseDenseMatmulCustomCombinerOnTcGradWithSgdAndCsrInput.pbtxt b/tensorflow-core/tensorflow-core-api/src/api/api_def_XlaSparseDenseMatmulCustomCombinerOnTcGradWithSgdAndCsrInput.pbtxt new file mode 100644 index 00000000000..5a619a2dd46 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/api/api_def_XlaSparseDenseMatmulCustomCombinerOnTcGradWithSgdAndCsrInput.pbtxt @@ -0,0 +1,6 @@ +op { + graph_op_name: "XlaSparseDenseMatmulCustomCombinerOnTcGradWithSgdAndCsrInput" + endpoint { + name: "xla.XlaSparseDenseMatmulCustomCombinerOnTcGradWithSgdAndCsrInput" + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/api/api_def_XlaSparseDenseMatmulCustomCombinerOnTcWithCsrInput.pbtxt b/tensorflow-core/tensorflow-core-api/src/api/api_def_XlaSparseDenseMatmulCustomCombinerOnTcWithCsrInput.pbtxt new file mode 100644 index 00000000000..9bb0f124d58 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/api/api_def_XlaSparseDenseMatmulCustomCombinerOnTcWithCsrInput.pbtxt @@ -0,0 +1,6 @@ +op { + graph_op_name: "XlaSparseDenseMatmulCustomCombinerOnTcWithCsrInput" + endpoint { + name: "xla.XlaSparseDenseMatmulCustomCombinerOnTcWithCsrInput" + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/api/api_def_XlaSparseGradientsStack.pbtxt b/tensorflow-core/tensorflow-core-api/src/api/api_def_XlaSparseGradientsStack.pbtxt new file mode 100644 index 00000000000..c8275b4698e --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/api/api_def_XlaSparseGradientsStack.pbtxt @@ -0,0 +1,6 @@ +op { + graph_op_name: "XlaSparseGradientsStack" + endpoint { + name: "xla.XlaSparseGradientsStack" + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/DtypesOps.java b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/DtypesOps.java index 42f59c161d7..df58cb578a4 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/DtypesOps.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/DtypesOps.java @@ -44,7 +44,7 @@ public final class DtypesOps { * Converts each entry in the given tensor to strings. * Supports many numeric types and boolean. *

    For Unicode, see the - * [https://www.tensorflow.org/tutorials/representation/unicode](Working with Unicode text) + * [https://www.tensorflow.org/text/guide/unicode](Working with Unicode text) * tutorial. *

    Examples: *

    diff --git a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/ImageOps.java b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/ImageOps.java index f3fa3e6bbc0..896bb62de5c 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/ImageOps.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/ImageOps.java @@ -32,6 +32,7 @@ import org.tensorflow.op.image.DecodeImage; import org.tensorflow.op.image.DecodeJpeg; import org.tensorflow.op.image.DecodePng; +import org.tensorflow.op.image.DecodeWebP; import org.tensorflow.op.image.DrawBoundingBoxes; import org.tensorflow.op.image.EncodeJpeg; import org.tensorflow.op.image.EncodeJpegVariableQuality; @@ -336,17 +337,18 @@ public DecodeGif decodeGif(Operand contents) { } /** - * Function for decode_bmp, decode_gif, decode_jpeg, and decode_png. - * Detects whether an image is a BMP, GIF, JPEG, or PNG, and performs the + * Function for decode_bmp, decode_gif, decode_jpeg, decode_webp, and decode_png. + * Detects whether an image is a BMP, GIF, JPEG, WebP, or PNG, and performs the * appropriate operation to convert the input bytes string into a Tensor of type * dtype. - *

    NOTE: decode_gif returns a 4-D array [num_frames, height, width, 3], as - * opposed to decode_bmp, decode_jpeg and decode_png, which return 3-D arrays - * [height, width, num_channels]. Make sure to take this into account when - * constructing your graph if you are intermixing GIF files with BMP, JPEG, and/or - * PNG files. Alternately, set the expand_animations argument of this function to - * False, in which case the op will return 3-dimensional tensors and will truncate - * animated GIF files to the first frame. + *

    NOTE: decode_gif and decode_webp return a 4-D + * array [num_frames, height, width, 3], as opposed to decode_bmp, + * decode_jpeg, and decode_png, which always return 3-D arrays [height, + * width, num_channels]. Make sure to take this into account when + * constructing your graph if you are intermixing animated files with + * BMP, JPEG, and/or PNG files. Alternately, set the expand_animations + * argument of this function to False, in which case the op will return + * 3-dimensional tensors and will truncate animations to the first frame. *

    NOTE: If the first frame of an animated GIF does not occupy the entire * canvas (maximum frame width x maximum frame height), then it fills the * unoccupied areas (in the first frame) with zeros (black). For frames after the @@ -357,22 +359,24 @@ public DecodeGif decodeGif(Operand contents) { * @param options carries optional attribute values * @return a new instance of DecodeImage, with default output types */ - public DecodeImage decodeImage(Operand contents, DecodeImage.Options[] options) { + public DecodeImage decodeImage(Operand contents, + DecodeImage.Options... options) { return DecodeImage.create(scope, contents, options); } /** - * Function for decode_bmp, decode_gif, decode_jpeg, and decode_png. - * Detects whether an image is a BMP, GIF, JPEG, or PNG, and performs the + * Function for decode_bmp, decode_gif, decode_jpeg, decode_webp, and decode_png. + * Detects whether an image is a BMP, GIF, JPEG, WebP, or PNG, and performs the * appropriate operation to convert the input bytes string into a Tensor of type * dtype. - *

    NOTE: decode_gif returns a 4-D array [num_frames, height, width, 3], as - * opposed to decode_bmp, decode_jpeg and decode_png, which return 3-D arrays - * [height, width, num_channels]. Make sure to take this into account when - * constructing your graph if you are intermixing GIF files with BMP, JPEG, and/or - * PNG files. Alternately, set the expand_animations argument of this function to - * False, in which case the op will return 3-dimensional tensors and will truncate - * animated GIF files to the first frame. + *

    NOTE: decode_gif and decode_webp return a 4-D + * array [num_frames, height, width, 3], as opposed to decode_bmp, + * decode_jpeg, and decode_png, which always return 3-D arrays [height, + * width, num_channels]. Make sure to take this into account when + * constructing your graph if you are intermixing animated files with + * BMP, JPEG, and/or PNG files. Alternately, set the expand_animations + * argument of this function to False, in which case the op will return + * 3-dimensional tensors and will truncate animations to the first frame. *

    NOTE: If the first frame of an animated GIF does not occupy the entire * canvas (maximum frame width x maximum frame height), then it fills the * unoccupied areas (in the first frame) with zeros (black). For frames after the @@ -436,7 +440,7 @@ public DecodeJpeg decodeJpeg(Operand contents, DecodeJpeg.Options... op * @param options carries optional attribute values * @return a new instance of DecodePng, with default output types */ - public DecodePng decodePng(Operand contents, DecodePng.Options[] options) { + public DecodePng decodePng(Operand contents, DecodePng.Options... options) { return DecodePng.create(scope, contents, options); } @@ -467,6 +471,51 @@ public DecodePng decodePng(Operand contents, Cla return DecodePng.create(scope, contents, dtype, options); } + /** + * Decode a WebP-encoded image to a uint8 tensor. + * The attr {@code channels} indicates the desired number of color channels for the + * decoded image. + *

    Accepted values are: + *

      + *
    • 0: Use the number of channels in the WebP-encoded image.
    • + *
    • 3: output an RGB image.
    • + *
    • 4: output an RGBA image.
    • + *
    + *

    The number of channels must currently match that of the underlying file. + * For WebP animations, only 4-channel RGBA is supported. + * + * @param contents 0-D. The WebP-encoded image. + * @param options carries optional attribute values + * @return a new instance of DecodeWebP, with default output types + */ + public DecodeWebP decodeWebP(Operand contents, DecodeWebP.Options... options) { + return DecodeWebP.create(scope, contents, options); + } + + /** + * Decode a WebP-encoded image to a uint8 tensor. + * The attr {@code channels} indicates the desired number of color channels for the + * decoded image. + *

    Accepted values are: + *

      + *
    • 0: Use the number of channels in the WebP-encoded image.
    • + *
    • 3: output an RGB image.
    • + *
    • 4: output an RGBA image.
    • + *
    + *

    The number of channels must currently match that of the underlying file. + * For WebP animations, only 4-channel RGBA is supported. + * + * @param contents 0-D. The WebP-encoded image. + * @param dtype The value of the dtype attribute + * @param options carries optional attribute values + * @param data type for {@code DecodeWebP} output and operands + * @return a new instance of DecodeWebP + */ + public DecodeWebP decodeWebP(Operand contents, Class dtype, + DecodeWebP.Options... options) { + return DecodeWebP.create(scope, contents, dtype, options); + } + /** * Draw bounding boxes on a batch of images. * Outputs a copy of {@code images} but draws on top of the pixels zero or more bounding diff --git a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/NnOps.java b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/NnOps.java index 535af3cda71..c9f086a3255 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/NnOps.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/NnOps.java @@ -2127,7 +2127,7 @@ public MaxPoolGradWithArgmax maxPoolGradWithArgmax(Operan * @return a new instance of MaxPoolWithArgmax, with default output types */ public MaxPoolWithArgmax maxPoolWithArgmax(Operand input, - List ksize, List strides, String padding, MaxPoolWithArgmax.Options[] options) { + List ksize, List strides, String padding, MaxPoolWithArgmax.Options... options) { return MaxPoolWithArgmax.create(scope, input, ksize, strides, padding, options); } diff --git a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/Ops.java b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/Ops.java index b9f5cd836f6..8483a4efb61 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/Ops.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/Ops.java @@ -420,10 +420,10 @@ public final class Ops { public final SummaryOps summary; - public final ImageOps image; - public final RaggedOps ragged; + public final ImageOps image; + public final ShapeOps shape; public final IoOps io; @@ -457,8 +457,8 @@ public final class Ops { train = new TrainOps(this); quantization = new QuantizationOps(this); summary = new SummaryOps(this); - image = new ImageOps(this); ragged = new RaggedOps(this); + image = new ImageOps(this); shape = new ShapeOps(this); io = new IoOps(this); dtypes = new DtypesOps(this); diff --git a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/QuantizationOps.java b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/QuantizationOps.java index 8bd174ba427..88df6bf8a0e 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/QuantizationOps.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/QuantizationOps.java @@ -114,7 +114,7 @@ public final class QuantizationOps { * @return a new instance of Dequantize, with default output types */ public Dequantize dequantize(Operand input, - Operand minRange, Operand maxRange, Dequantize.Options[] options) { + Operand minRange, Operand maxRange, Dequantize.Options... options) { return Dequantize.create(scope, input, minRange, maxRange, options); } diff --git a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/RandomOps.java b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/RandomOps.java index c5ff9a489a0..6000af11c9b 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/RandomOps.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/RandomOps.java @@ -210,7 +210,7 @@ public LogUniformCandidateSampler logUniformCandidateSampler(Operand tru * @return a new instance of Multinomial, with default output types */ public Multinomial multinomial(Operand logits, - Operand numSamples, Multinomial.Options[] options) { + Operand numSamples, Multinomial.Options... options) { return Multinomial.create(scope, logits, numSamples, options); } @@ -327,7 +327,7 @@ public RandomGammaGrad randomGammaGrad(Operand alpha, * @return a new instance of RandomPoisson, with default output types */ public RandomPoisson randomPoisson(Operand shape, - Operand rate, RandomPoisson.Options[] options) { + Operand rate, RandomPoisson.Options... options) { return RandomPoisson.create(scope, shape, rate, options); } diff --git a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/StringsOps.java b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/StringsOps.java index 56a82c2dbf6..2b49dd474a3 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/StringsOps.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/StringsOps.java @@ -564,7 +564,7 @@ public ToNumber toNumber(Operand stringTensor, C * @return a new instance of UnicodeDecode, with default output types */ public UnicodeDecode unicodeDecode(Operand input, String inputEncoding, - UnicodeDecode.Options[] options) { + UnicodeDecode.Options... options) { return UnicodeDecode.create(scope, input, inputEncoding, options); } @@ -626,7 +626,7 @@ public UnicodeDecode unicodeDecode(Operand input * @return a new instance of UnicodeDecodeWithOffsets, with default output types */ public UnicodeDecodeWithOffsets unicodeDecodeWithOffsets(Operand input, - String inputEncoding, UnicodeDecodeWithOffsets.Options[] options) { + String inputEncoding, UnicodeDecodeWithOffsets.Options... options) { return UnicodeDecodeWithOffsets.create(scope, input, inputEncoding, options); } diff --git a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/XlaOps.java b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/XlaOps.java index 22a2ef5ae85..38961e1570a 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/XlaOps.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/XlaOps.java @@ -28,12 +28,18 @@ import org.tensorflow.op.xla.XlaHostCompute; import org.tensorflow.op.xla.XlaRecvFromHost; import org.tensorflow.op.xla.XlaSendToHost; +import org.tensorflow.op.xla.XlaSparseActivationsUnstack; import org.tensorflow.op.xla.XlaSparseCoreAdagrad; import org.tensorflow.op.xla.XlaSparseCoreAdagradMomentum; import org.tensorflow.op.xla.XlaSparseCoreAdam; import org.tensorflow.op.xla.XlaSparseCoreFtrl; import org.tensorflow.op.xla.XlaSparseCoreSgd; import org.tensorflow.op.xla.XlaSparseDenseMatmul; +import org.tensorflow.op.xla.XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradAndCsrInput; +import org.tensorflow.op.xla.XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradMomentumAndCsrInput; +import org.tensorflow.op.xla.XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdamAndCsrInput; +import org.tensorflow.op.xla.XlaSparseDenseMatmulCustomCombinerOnTcGradWithCsrInput; +import org.tensorflow.op.xla.XlaSparseDenseMatmulCustomCombinerOnTcGradWithFtrlAndCsrInput; import org.tensorflow.op.xla.XlaSparseDenseMatmulGradWithAdagradAndCsrInput; import org.tensorflow.op.xla.XlaSparseDenseMatmulGradWithAdagradMomentumAndCsrInput; import org.tensorflow.op.xla.XlaSparseDenseMatmulGradWithAdamAndCsrInput; @@ -42,6 +48,7 @@ import org.tensorflow.op.xla.XlaSparseDenseMatmulWithCsrInput; import org.tensorflow.types.TFloat32; import org.tensorflow.types.TInt32; +import org.tensorflow.types.family.TNumber; import org.tensorflow.types.family.TType; /** @@ -292,6 +299,24 @@ public XlaSendToHost xlaSendToHost(Operand input, String key) { return XlaSendToHost.create(scope, input, key); } + /** + * The XlaSparseActivationsUnstack operation + * + * @param stackedActivations The stackedActivations value + * @param numTables The value of the numTables attribute + * @param sampleCounts The value of the sampleCounts attribute + * @param features The value of the features attribute + * @param interleaved The value of the interleaved attribute + * @param dtype The value of the dtype attribute + * @param data type for {@code XlaSparseActivationsUnstack} output and operands + * @return a new instance of XlaSparseActivationsUnstack + */ + public XlaSparseActivationsUnstack xlaSparseActivationsUnstack( + Operand stackedActivations, Long numTables, List sampleCounts, + List features, Boolean interleaved, Class dtype) { + return XlaSparseActivationsUnstack.create(scope, stackedActivations, numTables, sampleCounts, features, interleaved, dtype); + } + /** * The XlaSparseCoreAdagrad operation * @@ -418,6 +443,217 @@ public XlaSparseDenseMatmul xlaSparseDenseMatmul(Operand rowIds, return XlaSparseDenseMatmul.create(scope, rowIds, colIds, values, offsets, embeddingTable, maxIdsPerPartition, maxUniqueIdsPerPartition, inputSize); } + /** + * The XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradAndCsrInput operation + * + * @param rowPointers The rowPointers value + * @param sortedSampleIds The sortedSampleIds value + * @param sortedTokenIds The sortedTokenIds value + * @param sortedPosIds The sortedPosIds value + * @param sortedGains The sortedGains value + * @param weights The weights value + * @param preservedValencies The preservedValencies value + * @param preservedVectors The preservedVectors value + * @param preservedWeights The preservedWeights value + * @param activationGradients The activationGradients value + * @param learningRate The learningRate value + * @param combinerWeightsLearningRate The combinerWeightsLearningRate value + * @param embeddingTable The embeddingTable value + * @param accumulator The accumulator value + * @param maxValency The value of the maxValency attribute + * @param numWeights The value of the numWeights attribute + * @param combinerTableVjpComputation The value of the combinerTableVjpComputation attribute + * @param combinerWeightsVjpComputation The value of the combinerWeightsVjpComputation attribute + * @param tableName The value of the tableName attribute + * @param options carries optional attribute values + * @return a new instance of XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradAndCsrInput + */ + public XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradAndCsrInput xlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradAndCsrInput( + Operand rowPointers, Operand sortedSampleIds, Operand sortedTokenIds, + Operand sortedPosIds, Operand sortedGains, Operand weights, + Operand preservedValencies, Operand preservedVectors, + Operand preservedWeights, Operand activationGradients, + Operand learningRate, Operand combinerWeightsLearningRate, + Operand embeddingTable, Operand accumulator, Long maxValency, + Long numWeights, ConcreteFunction combinerTableVjpComputation, + ConcreteFunction combinerWeightsVjpComputation, String tableName, + XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradAndCsrInput.Options... options) { + return XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradAndCsrInput.create(scope, rowPointers, sortedSampleIds, sortedTokenIds, sortedPosIds, sortedGains, weights, preservedValencies, preservedVectors, preservedWeights, activationGradients, learningRate, combinerWeightsLearningRate, embeddingTable, accumulator, maxValency, numWeights, combinerTableVjpComputation, combinerWeightsVjpComputation, tableName, options); + } + + /** + * The XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradMomentumAndCsrInput operation + * + * @param rowPointers The rowPointers value + * @param sortedSampleIds The sortedSampleIds value + * @param sortedTokenIds The sortedTokenIds value + * @param sortedPosIds The sortedPosIds value + * @param sortedGains The sortedGains value + * @param weights The weights value + * @param preservedValencies The preservedValencies value + * @param preservedVectors The preservedVectors value + * @param preservedWeights The preservedWeights value + * @param activationGradients The activationGradients value + * @param learningRate The learningRate value + * @param combinerWeightsLearningRate The combinerWeightsLearningRate value + * @param embeddingTable The embeddingTable value + * @param accumulator The accumulator value + * @param momenta The momenta value + * @param useNesterov The value of the useNesterov attribute + * @param exponent The value of the exponent attribute + * @param beta1 The value of the beta1 attribute + * @param beta2 The value of the beta2 attribute + * @param epsilon The value of the epsilon attribute + * @param maxValency The value of the maxValency attribute + * @param numWeights The value of the numWeights attribute + * @param combinerTableVjpComputation The value of the combinerTableVjpComputation attribute + * @param combinerWeightsVjpComputation The value of the combinerWeightsVjpComputation attribute + * @param tableName The value of the tableName attribute + * @param options carries optional attribute values + * @return a new instance of XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradMomentumAndCsrInput + */ + public XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradMomentumAndCsrInput xlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradMomentumAndCsrInput( + Operand rowPointers, Operand sortedSampleIds, Operand sortedTokenIds, + Operand sortedPosIds, Operand sortedGains, Operand weights, + Operand preservedValencies, Operand preservedVectors, + Operand preservedWeights, Operand activationGradients, + Operand learningRate, Operand combinerWeightsLearningRate, + Operand embeddingTable, Operand accumulator, Operand momenta, + Boolean useNesterov, Float exponent, Float beta1, Float beta2, Float epsilon, Long maxValency, + Long numWeights, ConcreteFunction combinerTableVjpComputation, + ConcreteFunction combinerWeightsVjpComputation, String tableName, + XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradMomentumAndCsrInput.Options... options) { + return XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradMomentumAndCsrInput.create(scope, rowPointers, sortedSampleIds, sortedTokenIds, sortedPosIds, sortedGains, weights, preservedValencies, preservedVectors, preservedWeights, activationGradients, learningRate, combinerWeightsLearningRate, embeddingTable, accumulator, momenta, useNesterov, exponent, beta1, beta2, epsilon, maxValency, numWeights, combinerTableVjpComputation, combinerWeightsVjpComputation, tableName, options); + } + + /** + * The XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdamAndCsrInput operation + * + * @param rowPointers The rowPointers value + * @param sortedSampleIds The sortedSampleIds value + * @param sortedTokenIds The sortedTokenIds value + * @param sortedPosIds The sortedPosIds value + * @param sortedGains The sortedGains value + * @param weights The weights value + * @param preservedValencies The preservedValencies value + * @param preservedVectors The preservedVectors value + * @param preservedWeights The preservedWeights value + * @param activationGradients The activationGradients value + * @param learningRate The learningRate value + * @param combinerWeightsLearningRate The combinerWeightsLearningRate value + * @param embeddingTable The embeddingTable value + * @param momenta The momenta value + * @param velocity The velocity value + * @param useSumInsideSqrt The value of the useSumInsideSqrt attribute + * @param beta1 The value of the beta1 attribute + * @param beta2 The value of the beta2 attribute + * @param epsilon The value of the epsilon attribute + * @param maxValency The value of the maxValency attribute + * @param numWeights The value of the numWeights attribute + * @param combinerTableVjpComputation The value of the combinerTableVjpComputation attribute + * @param combinerWeightsVjpComputation The value of the combinerWeightsVjpComputation attribute + * @param tableName The value of the tableName attribute + * @param options carries optional attribute values + * @return a new instance of XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdamAndCsrInput + */ + public XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdamAndCsrInput xlaSparseDenseMatmulCustomCombinerOnTcGradWithAdamAndCsrInput( + Operand rowPointers, Operand sortedSampleIds, Operand sortedTokenIds, + Operand sortedPosIds, Operand sortedGains, Operand weights, + Operand preservedValencies, Operand preservedVectors, + Operand preservedWeights, Operand activationGradients, + Operand learningRate, Operand combinerWeightsLearningRate, + Operand embeddingTable, Operand momenta, Operand velocity, + Boolean useSumInsideSqrt, Float beta1, Float beta2, Float epsilon, Long maxValency, + Long numWeights, ConcreteFunction combinerTableVjpComputation, + ConcreteFunction combinerWeightsVjpComputation, String tableName, + XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdamAndCsrInput.Options... options) { + return XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdamAndCsrInput.create(scope, rowPointers, sortedSampleIds, sortedTokenIds, sortedPosIds, sortedGains, weights, preservedValencies, preservedVectors, preservedWeights, activationGradients, learningRate, combinerWeightsLearningRate, embeddingTable, momenta, velocity, useSumInsideSqrt, beta1, beta2, epsilon, maxValency, numWeights, combinerTableVjpComputation, combinerWeightsVjpComputation, tableName, options); + } + + /** + * The XlaSparseDenseMatmulCustomCombinerOnTcGradWithCsrInput operation + * + * @param rowPointers The rowPointers value + * @param sortedSampleIds The sortedSampleIds value + * @param sortedTokenIds The sortedTokenIds value + * @param sortedPosIds The sortedPosIds value + * @param sortedGains The sortedGains value + * @param weights The weights value + * @param preservedValencies The preservedValencies value + * @param preservedVectors The preservedVectors value + * @param preservedWeights The preservedWeights value + * @param activationGradients The activationGradients value + * @param tables The tables value + * @param hyperparameters The hyperparameters value + * @param combinerWeightsLearningRate The combinerWeightsLearningRate value + * @param maxValency The value of the maxValency attribute + * @param numWeights The value of the numWeights attribute + * @param combinerTableVjpComputation The value of the combinerTableVjpComputation attribute + * @param combinerWeightsVjpComputation The value of the combinerWeightsVjpComputation attribute + * @param optimizerCustomComputation The value of the optimizerCustomComputation attribute + * @param tableName The value of the tableName attribute + * @param options carries optional attribute values + * @return a new instance of XlaSparseDenseMatmulCustomCombinerOnTcGradWithCsrInput + */ + public XlaSparseDenseMatmulCustomCombinerOnTcGradWithCsrInput xlaSparseDenseMatmulCustomCombinerOnTcGradWithCsrInput( + Operand rowPointers, Operand sortedSampleIds, Operand sortedTokenIds, + Operand sortedPosIds, Operand sortedGains, Operand weights, + Operand preservedValencies, Operand preservedVectors, + Operand preservedWeights, Operand activationGradients, + Iterable> tables, Iterable> hyperparameters, + Operand combinerWeightsLearningRate, Long maxValency, Long numWeights, + ConcreteFunction combinerTableVjpComputation, ConcreteFunction combinerWeightsVjpComputation, + ConcreteFunction optimizerCustomComputation, String tableName, + XlaSparseDenseMatmulCustomCombinerOnTcGradWithCsrInput.Options... options) { + return XlaSparseDenseMatmulCustomCombinerOnTcGradWithCsrInput.create(scope, rowPointers, sortedSampleIds, sortedTokenIds, sortedPosIds, sortedGains, weights, preservedValencies, preservedVectors, preservedWeights, activationGradients, tables, hyperparameters, combinerWeightsLearningRate, maxValency, numWeights, combinerTableVjpComputation, combinerWeightsVjpComputation, optimizerCustomComputation, tableName, options); + } + + /** + * The XlaSparseDenseMatmulCustomCombinerOnTcGradWithFtrlAndCsrInput operation + * + * @param rowPointers The rowPointers value + * @param sortedSampleIds The sortedSampleIds value + * @param sortedTokenIds The sortedTokenIds value + * @param sortedPosIds The sortedPosIds value + * @param sortedGains The sortedGains value + * @param weights The weights value + * @param preservedValencies The preservedValencies value + * @param preservedVectors The preservedVectors value + * @param preservedWeights The preservedWeights value + * @param activationGradients The activationGradients value + * @param learningRate The learningRate value + * @param combinerWeightsLearningRate The combinerWeightsLearningRate value + * @param embeddingTable The embeddingTable value + * @param accumulator The accumulator value + * @param linear The linear value + * @param multiplyLinearByLearningRate The value of the multiplyLinearByLearningRate attribute + * @param beta The value of the beta attribute + * @param learningRatePower The value of the learningRatePower attribute + * @param l1RegularizationStrength The value of the l1RegularizationStrength attribute + * @param l2RegularizationStrength The value of the l2RegularizationStrength attribute + * @param maxValency The value of the maxValency attribute + * @param numWeights The value of the numWeights attribute + * @param combinerTableVjpComputation The value of the combinerTableVjpComputation attribute + * @param combinerWeightsVjpComputation The value of the combinerWeightsVjpComputation attribute + * @param tableName The value of the tableName attribute + * @param options carries optional attribute values + * @return a new instance of XlaSparseDenseMatmulCustomCombinerOnTcGradWithFtrlAndCsrInput + */ + public XlaSparseDenseMatmulCustomCombinerOnTcGradWithFtrlAndCsrInput xlaSparseDenseMatmulCustomCombinerOnTcGradWithFtrlAndCsrInput( + Operand rowPointers, Operand sortedSampleIds, Operand sortedTokenIds, + Operand sortedPosIds, Operand sortedGains, Operand weights, + Operand preservedValencies, Operand preservedVectors, + Operand preservedWeights, Operand activationGradients, + Operand learningRate, Operand combinerWeightsLearningRate, + Operand embeddingTable, Operand accumulator, Operand linear, + Boolean multiplyLinearByLearningRate, Float beta, Float learningRatePower, + Float l1RegularizationStrength, Float l2RegularizationStrength, Long maxValency, + Long numWeights, ConcreteFunction combinerTableVjpComputation, + ConcreteFunction combinerWeightsVjpComputation, String tableName, + XlaSparseDenseMatmulCustomCombinerOnTcGradWithFtrlAndCsrInput.Options... options) { + return XlaSparseDenseMatmulCustomCombinerOnTcGradWithFtrlAndCsrInput.create(scope, rowPointers, sortedSampleIds, sortedTokenIds, sortedPosIds, sortedGains, weights, preservedValencies, preservedVectors, preservedWeights, activationGradients, learningRate, combinerWeightsLearningRate, embeddingTable, accumulator, linear, multiplyLinearByLearningRate, beta, learningRatePower, l1RegularizationStrength, l2RegularizationStrength, maxValency, numWeights, combinerTableVjpComputation, combinerWeightsVjpComputation, tableName, options); + } + /** * The XlaSparseDenseMatmulGradWithAdagradAndCsrInput operation * @@ -579,15 +815,17 @@ public XlaSparseDenseMatmulGradWithSgdAndCsrInput xlaSparseDenseMatmulGradWithSg * @param quantizationConfigHigh The value of the quantizationConfigHigh attribute * @param quantizationConfigNumBuckets The value of the quantizationConfigNumBuckets attribute * @param tableName The value of the tableName attribute + * @param options carries optional attribute values + * @param data type for {@code XlaSparseDenseMatmulWithCsrInput} output and operands * @return a new instance of XlaSparseDenseMatmulWithCsrInput */ - public XlaSparseDenseMatmulWithCsrInput xlaSparseDenseMatmulWithCsrInput( + public XlaSparseDenseMatmulWithCsrInput xlaSparseDenseMatmulWithCsrInput( Operand rowPointers, Operand sortedSampleIds, Operand sortedTokenIds, - Operand sortedGains, Operand embeddingTable, + Operand sortedGains, Operand embeddingTable, Operand numMinibatchesPerPhysicalSparseCore, Long inputSize, Float quantizationConfigLow, Float quantizationConfigHigh, Long quantizationConfigNumBuckets, - String tableName) { - return XlaSparseDenseMatmulWithCsrInput.create(scope, rowPointers, sortedSampleIds, sortedTokenIds, sortedGains, embeddingTable, numMinibatchesPerPhysicalSparseCore, inputSize, quantizationConfigLow, quantizationConfigHigh, quantizationConfigNumBuckets, tableName); + String tableName, XlaSparseDenseMatmulWithCsrInput.Options... options) { + return XlaSparseDenseMatmulWithCsrInput.create(scope, rowPointers, sortedSampleIds, sortedTokenIds, sortedGains, embeddingTable, numMinibatchesPerPhysicalSparseCore, inputSize, quantizationConfigLow, quantizationConfigHigh, quantizationConfigNumBuckets, tableName, options); } /** diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/debugging/DebugNumericsSummary.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/debugging/DebugNumericsSummary.java index 4ff0f11c7bc..d83f728b452 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/debugging/DebugNumericsSummary.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/debugging/DebugNumericsSummary.java @@ -102,7 +102,7 @@ public static DebugNumericsSummary create(Scope scope, describeByClass = true ) public static DebugNumericsSummary create(Scope scope, Operand input, - Options[] options) { + Options... options) { return create(scope, input, TFloat32.class, options); } diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/dtypes/AsString.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/dtypes/AsString.java index 1f9b0285c6c..25dfbfe50ff 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/dtypes/AsString.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/dtypes/AsString.java @@ -38,7 +38,7 @@ * Converts each entry in the given tensor to strings. * Supports many numeric types and boolean. *

    For Unicode, see the - * [https://www.tensorflow.org/tutorials/representation/unicode](Working with Unicode text) + * [https://www.tensorflow.org/text/guide/unicode](Working with Unicode text) * tutorial. *

    Examples: *

    diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/image/DecodeImage.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/image/DecodeImage.java index a5c7ee7845e..891c31bb514 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/image/DecodeImage.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/image/DecodeImage.java @@ -37,17 +37,18 @@ import org.tensorflow.types.family.TNumber; /** - * Function for decode_bmp, decode_gif, decode_jpeg, and decode_png. - * Detects whether an image is a BMP, GIF, JPEG, or PNG, and performs the + * Function for decode_bmp, decode_gif, decode_jpeg, decode_webp, and decode_png. + * Detects whether an image is a BMP, GIF, JPEG, WebP, or PNG, and performs the * appropriate operation to convert the input bytes string into a Tensor of type * dtype. - *

    NOTE: decode_gif returns a 4-D array [num_frames, height, width, 3], as - * opposed to decode_bmp, decode_jpeg and decode_png, which return 3-D arrays - * [height, width, num_channels]. Make sure to take this into account when - * constructing your graph if you are intermixing GIF files with BMP, JPEG, and/or - * PNG files. Alternately, set the expand_animations argument of this function to - * False, in which case the op will return 3-dimensional tensors and will truncate - * animated GIF files to the first frame. + *

    NOTE: decode_gif and decode_webp return a 4-D + * array [num_frames, height, width, 3], as opposed to decode_bmp, + * decode_jpeg, and decode_png, which always return 3-D arrays [height, + * width, num_channels]. Make sure to take this into account when + * constructing your graph if you are intermixing animated files with + * BMP, JPEG, and/or PNG files. Alternately, set the expand_animations + * argument of this function to False, in which case the op will return + * 3-dimensional tensors and will truncate animations to the first frame. *

    NOTE: If the first frame of an animated GIF does not occupy the entire * canvas (maximum frame width x maximum frame height), then it fills the * unoccupied areas (in the first frame) with zeros (black). For frames after the @@ -118,7 +119,7 @@ public static DecodeImage create(Scope scope, Operand create(Scope scope, Operand contents, - Options[] options) { + Options... options) { return create(scope, contents, TUint8.class, options); } @@ -135,10 +136,11 @@ public static Options channels(Long channels) { /** * Sets the expandAnimations option. * - * @param expandAnimations Controls the output shape of the returned op. If True, the returned op will - * produce a 3-D tensor for PNG, JPEG, and BMP files; and a 4-D tensor for all - * GIFs, whether animated or not. If, False, the returned op will produce a 3-D - * tensor for all file types and will truncate animated GIFs to the first frame. + * @param expandAnimations Controls the output shape of the returned op. If True, the returned op + * will produce a 3-D tensor for PNG, JPEG, and BMP files; and a 4-D + * tensor for all GIFs and WebP images, whether animated or not. If, + * False, the returned op will produce a 3-D tensor for all file types + * and will truncate animated images to the first frame. * @return this Options instance. */ public static Options expandAnimations(Boolean expandAnimations) { @@ -185,10 +187,11 @@ public Options channels(Long channels) { /** * Sets the expandAnimations option. * - * @param expandAnimations Controls the output shape of the returned op. If True, the returned op will - * produce a 3-D tensor for PNG, JPEG, and BMP files; and a 4-D tensor for all - * GIFs, whether animated or not. If, False, the returned op will produce a 3-D - * tensor for all file types and will truncate animated GIFs to the first frame. + * @param expandAnimations Controls the output shape of the returned op. If True, the returned op + * will produce a 3-D tensor for PNG, JPEG, and BMP files; and a 4-D + * tensor for all GIFs and WebP images, whether animated or not. If, + * False, the returned op will produce a 3-D tensor for all file types + * and will truncate animated images to the first frame. * @return this Options instance. */ public Options expandAnimations(Boolean expandAnimations) { @@ -217,10 +220,11 @@ public static class Inputs extends RawOpInputs> { public final DataType dtype; /** - * Controls the output shape of the returned op. If True, the returned op will - * produce a 3-D tensor for PNG, JPEG, and BMP files; and a 4-D tensor for all - * GIFs, whether animated or not. If, False, the returned op will produce a 3-D - * tensor for all file types and will truncate animated GIFs to the first frame. + * Controls the output shape of the returned op. If True, the returned op + * will produce a 3-D tensor for PNG, JPEG, and BMP files; and a 4-D + * tensor for all GIFs and WebP images, whether animated or not. If, + * False, the returned op will produce a 3-D tensor for all file types + * and will truncate animated images to the first frame. */ public final boolean expandAnimations; diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/image/DecodePng.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/image/DecodePng.java index dd6384caf7c..8352476fae0 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/image/DecodePng.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/image/DecodePng.java @@ -113,7 +113,7 @@ public static DecodePng create(Scope scope, Operand create(Scope scope, Operand contents, - Options[] options) { + Options... options) { return create(scope, contents, TUint8.class, options); } diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/image/DecodeWebP.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/image/DecodeWebP.java new file mode 100644 index 00000000000..16a7b6b54cb --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/image/DecodeWebP.java @@ -0,0 +1,189 @@ +/* Copyright 2018-2023 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ + +// This class has been generated, DO NOT EDIT! + +package org.tensorflow.op.image; + +import java.util.Arrays; +import org.tensorflow.GraphOperation; +import org.tensorflow.Operand; +import org.tensorflow.Operation; +import org.tensorflow.OperationBuilder; +import org.tensorflow.Output; +import org.tensorflow.op.Operands; +import org.tensorflow.op.RawOp; +import org.tensorflow.op.RawOpInputs; +import org.tensorflow.op.Scope; +import org.tensorflow.op.annotation.Endpoint; +import org.tensorflow.op.annotation.OpInputsMetadata; +import org.tensorflow.op.annotation.OpMetadata; +import org.tensorflow.op.annotation.Operator; +import org.tensorflow.proto.DataType; +import org.tensorflow.types.TString; +import org.tensorflow.types.TUint8; +import org.tensorflow.types.family.TNumber; + +/** + * Decode a WebP-encoded image to a uint8 tensor. + * The attr {@code channels} indicates the desired number of color channels for the + * decoded image. + *

    Accepted values are: + *

      + *
    • 0: Use the number of channels in the WebP-encoded image.
    • + *
    • 3: output an RGB image.
    • + *
    • 4: output an RGBA image.
    • + *
    + *

    The number of channels must currently match that of the underlying file. + * For WebP animations, only 4-channel RGBA is supported. + */ +@OpMetadata( + opType = DecodeWebP.OP_NAME, + inputsClass = DecodeWebP.Inputs.class +) +@Operator( + group = "image" +) +public final class DecodeWebP extends RawOp implements Operand { + /** + * The name of this op, as known by TensorFlow core engine + */ + public static final String OP_NAME = "DecodeWebP"; + + private Output image; + + public DecodeWebP(Operation operation) { + super(operation, OP_NAME); + int outputIdx = 0; + image = operation.output(outputIdx++); + } + + /** + * Factory method to create a class wrapping a new DecodeWebP operation. + * + * @param scope current scope + * @param contents 0-D. The WebP-encoded image. + * @param dtype The value of the dtype attribute + * @param options carries optional attribute values + * @param data type for {@code DecodeWebP} output and operands + * @return a new instance of DecodeWebP + */ + @Endpoint( + describeByClass = true + ) + public static DecodeWebP create(Scope scope, Operand contents, + Class dtype, Options... options) { + OperationBuilder opBuilder = scope.opBuilder(OP_NAME, "DecodeWebP"); + opBuilder.addInput(contents.asOutput()); + opBuilder.setAttr("dtype", Operands.toDataType(dtype)); + if (options != null) { + for (Options opts : options) { + if (opts.channels != null) { + opBuilder.setAttr("channels", opts.channels); + } + } + } + return new DecodeWebP<>(opBuilder.build()); + } + + /** + * Factory method to create a class wrapping a new DecodeWebP operation, with the default output types. + * + * @param scope current scope + * @param contents 0-D. The WebP-encoded image. + * @param options carries optional attribute values + * @return a new instance of DecodeWebP, with default output types + */ + @Endpoint( + describeByClass = true + ) + public static DecodeWebP create(Scope scope, Operand contents, + Options... options) { + return create(scope, contents, TUint8.class, options); + } + + /** + * Sets the channels option. + * + * @param channels Number of color channels for the decoded image. + * @return this Options instance. + */ + public static Options channels(Long channels) { + return new Options().channels(channels); + } + + /** + * Gets image. + * 4-D with shape {@code [num_frames, height, width, channels]}. + * @return image. + */ + public Output image() { + return image; + } + + @Override + public Output asOutput() { + return image; + } + + /** + * Optional attributes for {@link org.tensorflow.op.image.DecodeWebP} + */ + public static class Options { + private Long channels; + + private Options() { + } + + /** + * Sets the channels option. + * + * @param channels Number of color channels for the decoded image. + * @return this Options instance. + */ + public Options channels(Long channels) { + this.channels = channels; + return this; + } + } + + @OpInputsMetadata( + outputsClass = DecodeWebP.class + ) + public static class Inputs extends RawOpInputs> { + /** + * 0-D. The WebP-encoded image. + */ + public final Operand contents; + + /** + * Number of color channels for the decoded image. + */ + public final long channels; + + /** + * The dtype attribute + */ + public final DataType dtype; + + public Inputs(GraphOperation op) { + super(new DecodeWebP<>(op), op, Arrays.asList("channels", "dtype")); + int inputIndex = 0; + contents = (Operand) op.input(inputIndex++); + channels = op.attributes().getAttrInt("channels"); + dtype = op.attributes().getAttrType("dtype"); + } + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/nn/MaxPoolWithArgmax.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/nn/MaxPoolWithArgmax.java index bd19af1b703..78e871d2de7 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/nn/MaxPoolWithArgmax.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/nn/MaxPoolWithArgmax.java @@ -133,7 +133,7 @@ public static MaxPoolWithArgmax cre describeByClass = true ) public static MaxPoolWithArgmax create(Scope scope, - Operand input, List ksize, List strides, String padding, Options[] options) { + Operand input, List ksize, List strides, String padding, Options... options) { return create(scope, input, ksize, strides, TInt64.class, padding, options); } diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/quantization/Dequantize.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/quantization/Dequantize.java index a062ee1db29..e1333747ce9 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/quantization/Dequantize.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/quantization/Dequantize.java @@ -156,7 +156,7 @@ public static Dequantize create(Scope scope, describeByClass = true ) public static Dequantize create(Scope scope, Operand input, - Operand minRange, Operand maxRange, Options[] options) { + Operand minRange, Operand maxRange, Options... options) { return create(scope, input, minRange, maxRange, TFloat32.class, options); } diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/random/Multinomial.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/random/Multinomial.java index a213609fca6..c4625651dc9 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/random/Multinomial.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/random/Multinomial.java @@ -109,7 +109,7 @@ public static Multinomial create(Scope scope, describeByClass = true ) public static Multinomial create(Scope scope, Operand logits, - Operand numSamples, Options[] options) { + Operand numSamples, Options... options) { return create(scope, logits, numSamples, TInt64.class, options); } diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/random/RandomPoisson.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/random/RandomPoisson.java index 3e5fc40fc2f..8abad16a003 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/random/RandomPoisson.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/random/RandomPoisson.java @@ -118,7 +118,7 @@ public static RandomPoisson create(Scope scope, describeByClass = true ) public static RandomPoisson create(Scope scope, Operand shape, - Operand rate, Options[] options) { + Operand rate, Options... options) { return create(scope, shape, rate, TInt64.class, options); } diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/UnicodeDecode.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/UnicodeDecode.java index 40624c66adf..cc29b554bef 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/UnicodeDecode.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/UnicodeDecode.java @@ -130,7 +130,7 @@ public static UnicodeDecode create(Scope scope, Operand create(Scope scope, Operand input, - String inputEncoding, Options[] options) { + String inputEncoding, Options... options) { return create(scope, input, inputEncoding, TInt64.class, options); } diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/UnicodeDecodeWithOffsets.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/UnicodeDecodeWithOffsets.java index 5989e8e7106..fb8887c4594 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/UnicodeDecodeWithOffsets.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/strings/UnicodeDecodeWithOffsets.java @@ -137,7 +137,7 @@ public static UnicodeDecodeWithOffsets create(Scope scope describeByClass = true ) public static UnicodeDecodeWithOffsets create(Scope scope, Operand input, - String inputEncoding, Options[] options) { + String inputEncoding, Options... options) { return create(scope, input, inputEncoding, TInt64.class, options); } diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/tpu/ReplicateMetadata.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/tpu/ReplicateMetadata.java index 67f49871a2c..3e9453b7789 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/tpu/ReplicateMetadata.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/tpu/ReplicateMetadata.java @@ -113,6 +113,9 @@ public static ReplicateMetadata create(Scope scope, Long numReplicas, Options... if (opts.useSpmdForXlaPartitioning != null) { opBuilder.setAttr("use_spmd_for_xla_partitioning", opts.useSpmdForXlaPartitioning); } + if (opts.useShardyPartitioner != null) { + opBuilder.setAttr("use_shardy_partitioner", opts.useShardyPartitioner); + } if (opts.tpuCompileOptionsProto != null) { opBuilder.setAttr("tpu_compile_options_proto", opts.tpuCompileOptionsProto); } @@ -261,6 +264,16 @@ public static Options useSpmdForXlaPartitioning(Boolean useSpmdForXlaPartitionin return new Options().useSpmdForXlaPartitioning(useSpmdForXlaPartitioning); } + /** + * Sets the useShardyPartitioner option. + * + * @param useShardyPartitioner the useShardyPartitioner option + * @return this Options instance. + */ + public static Options useShardyPartitioner(Boolean useShardyPartitioner) { + return new Options().useShardyPartitioner(useShardyPartitioner); + } + /** * Sets the tpuCompileOptionsProto option. * @@ -295,6 +308,8 @@ public static class Options { private Boolean useSpmdForXlaPartitioning; + private Boolean useShardyPartitioner; + private String tpuCompileOptionsProto; private Options() { @@ -454,6 +469,17 @@ public Options useSpmdForXlaPartitioning(Boolean useSpmdForXlaPartitioning) { return this; } + /** + * Sets the useShardyPartitioner option. + * + * @param useShardyPartitioner the useShardyPartitioner option + * @return this Options instance. + */ + public Options useShardyPartitioner(Boolean useShardyPartitioner) { + this.useShardyPartitioner = useShardyPartitioner; + return this; + } + /** * Sets the tpuCompileOptionsProto option. * @@ -525,13 +551,18 @@ public static class Inputs extends RawOpInputs { */ public final boolean useSpmdForXlaPartitioning; + /** + * The useShardyPartitioner attribute + */ + public final boolean useShardyPartitioner; + /** * The tpuCompileOptionsProto attribute */ public final String tpuCompileOptionsProto; public Inputs(GraphOperation op) { - super(new ReplicateMetadata(op), op, Arrays.asList("num_replicas", "num_cores_per_replica", "topology", "use_tpu", "device_assignment", "computation_shape", "host_compute_core", "padding_map", "step_marker_location", "allow_soft_placement", "use_spmd_for_xla_partitioning", "tpu_compile_options_proto")); + super(new ReplicateMetadata(op), op, Arrays.asList("num_replicas", "num_cores_per_replica", "topology", "use_tpu", "device_assignment", "computation_shape", "host_compute_core", "padding_map", "step_marker_location", "allow_soft_placement", "use_spmd_for_xla_partitioning", "use_shardy_partitioner", "tpu_compile_options_proto")); int inputIndex = 0; numReplicas = op.attributes().getAttrInt("num_replicas"); numCoresPerReplica = op.attributes().getAttrInt("num_cores_per_replica"); @@ -544,6 +575,7 @@ public Inputs(GraphOperation op) { stepMarkerLocation = op.attributes().getAttrString("step_marker_location"); allowSoftPlacement = op.attributes().getAttrBool("allow_soft_placement"); useSpmdForXlaPartitioning = op.attributes().getAttrBool("use_spmd_for_xla_partitioning"); + useShardyPartitioner = op.attributes().getAttrBool("use_shardy_partitioner"); tpuCompileOptionsProto = op.attributes().getAttrString("tpu_compile_options_proto"); } } diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/tpu/TPUDummyInput.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/tpu/TPUDummyInput.java new file mode 100644 index 00000000000..4b7fae6c11c --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/tpu/TPUDummyInput.java @@ -0,0 +1,114 @@ +/* Copyright 2018-2023 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ + +// This class has been generated, DO NOT EDIT! + +package org.tensorflow.op.tpu; + +import java.util.Arrays; +import org.tensorflow.GraphOperation; +import org.tensorflow.Operand; +import org.tensorflow.Operation; +import org.tensorflow.OperationBuilder; +import org.tensorflow.Output; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.op.Operands; +import org.tensorflow.op.RawOp; +import org.tensorflow.op.RawOpInputs; +import org.tensorflow.op.Scope; +import org.tensorflow.op.annotation.Endpoint; +import org.tensorflow.op.annotation.OpInputsMetadata; +import org.tensorflow.op.annotation.OpMetadata; +import org.tensorflow.proto.DataType; +import org.tensorflow.types.family.TNumber; + +/** + * Generates a zero-valued tensor for use as a dummy input to a TPU. + * For the internal use of the TF2XLA bridge in the XLA Broadcast pass. This op + */ +@OpMetadata( + opType = TPUDummyInput.OP_NAME, + inputsClass = TPUDummyInput.Inputs.class +) +public final class TPUDummyInput extends RawOp implements Operand { + /** + * The name of this op, as known by TensorFlow core engine + */ + public static final String OP_NAME = "TPUDummyInput"; + + private Output output; + + public TPUDummyInput(Operation operation) { + super(operation, OP_NAME); + int outputIdx = 0; + output = operation.output(outputIdx++); + } + + /** + * Factory method to create a class wrapping a new TPUDummyInput operation. + * + * @param scope current scope + * @param dtype The element type of the produced tensor. + * @param shape The shape of the produced tensor. + * @param data type for {@code TPUDummyInput} output and operands + * @return a new instance of TPUDummyInput + */ + @Endpoint( + describeByClass = true + ) + public static TPUDummyInput create(Scope scope, Class dtype, + Shape shape) { + OperationBuilder opBuilder = scope.opBuilder(OP_NAME, "TPUDummyInput"); + opBuilder.setAttr("dtype", Operands.toDataType(dtype)); + opBuilder.setAttr("shape", shape); + return new TPUDummyInput<>(opBuilder.build()); + } + + /** + * Gets output. + * + * @return output. + */ + public Output output() { + return output; + } + + @Override + public Output asOutput() { + return output; + } + + @OpInputsMetadata( + outputsClass = TPUDummyInput.class + ) + public static class Inputs extends RawOpInputs> { + /** + * The element type of the produced tensor. + */ + public final DataType dtype; + + /** + * The shape of the produced tensor. + */ + public final Shape shape; + + public Inputs(GraphOperation op) { + super(new TPUDummyInput<>(op), op, Arrays.asList("dtype", "shape")); + int inputIndex = 0; + dtype = op.attributes().getAttrType("dtype"); + shape = op.attributes().getAttrShape("shape"); + } + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/tpu/TPUReplicateMetadata.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/tpu/TPUReplicateMetadata.java index 1e5fab82839..968dde2b09a 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/tpu/TPUReplicateMetadata.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/tpu/TPUReplicateMetadata.java @@ -116,6 +116,9 @@ public static TPUReplicateMetadata create(Scope scope, Long numReplicas, Options if (opts.useSpmdForXlaPartitioning != null) { opBuilder.setAttr("use_spmd_for_xla_partitioning", opts.useSpmdForXlaPartitioning); } + if (opts.useShardyPartitioner != null) { + opBuilder.setAttr("use_shardy_partitioner", opts.useShardyPartitioner); + } if (opts.tpuCompileOptionsProto != null) { opBuilder.setAttr("tpu_compile_options_proto", opts.tpuCompileOptionsProto); } @@ -264,6 +267,16 @@ public static Options useSpmdForXlaPartitioning(Boolean useSpmdForXlaPartitionin return new Options().useSpmdForXlaPartitioning(useSpmdForXlaPartitioning); } + /** + * Sets the useShardyPartitioner option. + * + * @param useShardyPartitioner the useShardyPartitioner option + * @return this Options instance. + */ + public static Options useShardyPartitioner(Boolean useShardyPartitioner) { + return new Options().useShardyPartitioner(useShardyPartitioner); + } + /** * Sets the tpuCompileOptionsProto option. * @@ -298,6 +311,8 @@ public static class Options { private Boolean useSpmdForXlaPartitioning; + private Boolean useShardyPartitioner; + private String tpuCompileOptionsProto; private Options() { @@ -457,6 +472,17 @@ public Options useSpmdForXlaPartitioning(Boolean useSpmdForXlaPartitioning) { return this; } + /** + * Sets the useShardyPartitioner option. + * + * @param useShardyPartitioner the useShardyPartitioner option + * @return this Options instance. + */ + public Options useShardyPartitioner(Boolean useShardyPartitioner) { + this.useShardyPartitioner = useShardyPartitioner; + return this; + } + /** * Sets the tpuCompileOptionsProto option. * @@ -528,13 +554,18 @@ public static class Inputs extends RawOpInputs { */ public final boolean useSpmdForXlaPartitioning; + /** + * The useShardyPartitioner attribute + */ + public final boolean useShardyPartitioner; + /** * The tpuCompileOptionsProto attribute */ public final String tpuCompileOptionsProto; public Inputs(GraphOperation op) { - super(new TPUReplicateMetadata(op), op, Arrays.asList("num_replicas", "num_cores_per_replica", "topology", "use_tpu", "device_assignment", "computation_shape", "host_compute_core", "padding_map", "step_marker_location", "allow_soft_placement", "use_spmd_for_xla_partitioning", "tpu_compile_options_proto")); + super(new TPUReplicateMetadata(op), op, Arrays.asList("num_replicas", "num_cores_per_replica", "topology", "use_tpu", "device_assignment", "computation_shape", "host_compute_core", "padding_map", "step_marker_location", "allow_soft_placement", "use_spmd_for_xla_partitioning", "use_shardy_partitioner", "tpu_compile_options_proto")); int inputIndex = 0; numReplicas = op.attributes().getAttrInt("num_replicas"); numCoresPerReplica = op.attributes().getAttrInt("num_cores_per_replica"); @@ -547,6 +578,7 @@ public Inputs(GraphOperation op) { stepMarkerLocation = op.attributes().getAttrString("step_marker_location"); allowSoftPlacement = op.attributes().getAttrBool("allow_soft_placement"); useSpmdForXlaPartitioning = op.attributes().getAttrBool("use_spmd_for_xla_partitioning"); + useShardyPartitioner = op.attributes().getAttrBool("use_shardy_partitioner"); tpuCompileOptionsProto = op.attributes().getAttrString("tpu_compile_options_proto"); } } diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseActivationsUnstack.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseActivationsUnstack.java new file mode 100644 index 00000000000..6dc42362b87 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseActivationsUnstack.java @@ -0,0 +1,163 @@ +/* Copyright 2018-2023 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ + +// This class has been generated, DO NOT EDIT! + +package org.tensorflow.op.xla; + +import java.util.Arrays; +import java.util.Iterator; +import java.util.List; +import org.tensorflow.GraphOperation; +import org.tensorflow.Operand; +import org.tensorflow.Operation; +import org.tensorflow.OperationBuilder; +import org.tensorflow.Output; +import org.tensorflow.op.Operands; +import org.tensorflow.op.RawOp; +import org.tensorflow.op.RawOpInputs; +import org.tensorflow.op.Scope; +import org.tensorflow.op.annotation.Endpoint; +import org.tensorflow.op.annotation.OpInputsMetadata; +import org.tensorflow.op.annotation.OpMetadata; +import org.tensorflow.op.annotation.Operator; +import org.tensorflow.proto.DataType; +import org.tensorflow.types.family.TType; + +/** + * The XlaSparseActivationsUnstack operation + */ +@OpMetadata( + opType = XlaSparseActivationsUnstack.OP_NAME, + inputsClass = XlaSparseActivationsUnstack.Inputs.class +) +@Operator( + group = "xla" +) +public final class XlaSparseActivationsUnstack extends RawOp implements Iterable> { + /** + * The name of this op, as known by TensorFlow core engine + */ + public static final String OP_NAME = "XlaSparseActivationsUnstack"; + + private List> unstackedActivations; + + @SuppressWarnings("unchecked") + public XlaSparseActivationsUnstack(Operation operation) { + super(operation, OP_NAME); + int outputIdx = 0; + int unstackedActivationsLength = operation.outputListLength("unstacked_activations"); + unstackedActivations = Arrays.asList((Output[]) operation.outputList(outputIdx, unstackedActivationsLength)); + outputIdx += unstackedActivationsLength; + } + + /** + * Factory method to create a class wrapping a new XlaSparseActivationsUnstack operation. + * + * @param scope current scope + * @param stackedActivations The stackedActivations value + * @param numTables The value of the numTables attribute + * @param sampleCounts The value of the sampleCounts attribute + * @param features The value of the features attribute + * @param interleaved The value of the interleaved attribute + * @param dtype The value of the dtype attribute + * @param data type for {@code XlaSparseActivationsUnstack} output and operands + * @return a new instance of XlaSparseActivationsUnstack + */ + @Endpoint( + describeByClass = true + ) + public static XlaSparseActivationsUnstack create(Scope scope, + Operand stackedActivations, Long numTables, List sampleCounts, + List features, Boolean interleaved, Class dtype) { + OperationBuilder opBuilder = scope.opBuilder(OP_NAME, "XlaSparseActivationsUnstack"); + opBuilder.addInput(stackedActivations.asOutput()); + opBuilder.setAttr("num_tables", numTables); + long[] sampleCountsArray = new long[sampleCounts.size()]; + for (int i = 0 ; i < sampleCountsArray.length ; i++) { + sampleCountsArray[i] = sampleCounts.get(i); + } + opBuilder.setAttr("sample_counts", sampleCountsArray); + long[] featuresArray = new long[features.size()]; + for (int i = 0 ; i < featuresArray.length ; i++) { + featuresArray[i] = features.get(i); + } + opBuilder.setAttr("features", featuresArray); + opBuilder.setAttr("interleaved", interleaved); + opBuilder.setAttr("dtype", Operands.toDataType(dtype)); + return new XlaSparseActivationsUnstack<>(opBuilder.build()); + } + + /** + * Gets unstackedActivations. + * + * @return unstackedActivations. + */ + public List> unstackedActivations() { + return unstackedActivations; + } + + @Override + @SuppressWarnings({"rawtypes", "unchecked"}) + public Iterator> iterator() { + return (Iterator) unstackedActivations.iterator(); + } + + @OpInputsMetadata( + outputsClass = XlaSparseActivationsUnstack.class + ) + public static class Inputs extends RawOpInputs> { + /** + * The stackedActivations input + */ + public final Operand stackedActivations; + + /** + * The sampleCounts attribute + */ + public final long[] sampleCounts; + + /** + * The features attribute + */ + public final long[] features; + + /** + * The interleaved attribute + */ + public final boolean interleaved; + + /** + * The inputDtype attribute + */ + public final DataType inputDtype; + + /** + * The dtype attribute + */ + public final DataType dtype; + + public Inputs(GraphOperation op) { + super(new XlaSparseActivationsUnstack<>(op), op, Arrays.asList("sample_counts", "features", "interleaved", "input_dtype", "dtype")); + int inputIndex = 0; + stackedActivations = (Operand) op.input(inputIndex++); + sampleCounts = op.attributes().getAttrIntList("sample_counts"); + features = op.attributes().getAttrIntList("features"); + interleaved = op.attributes().getAttrBool("interleaved"); + inputDtype = op.attributes().getAttrType("input_dtype"); + dtype = op.attributes().getAttrType("dtype"); + } + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradAndCsrInput.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradAndCsrInput.java new file mode 100644 index 00000000000..0fd2a1347bc --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradAndCsrInput.java @@ -0,0 +1,374 @@ +/* Copyright 2018-2023 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ + +// This class has been generated, DO NOT EDIT! + +package org.tensorflow.op.xla; + +import java.util.Arrays; +import org.tensorflow.ConcreteFunction; +import org.tensorflow.GraphOperation; +import org.tensorflow.Operand; +import org.tensorflow.Operation; +import org.tensorflow.OperationBuilder; +import org.tensorflow.Output; +import org.tensorflow.op.RawOp; +import org.tensorflow.op.RawOpInputs; +import org.tensorflow.op.Scope; +import org.tensorflow.op.annotation.Endpoint; +import org.tensorflow.op.annotation.OpInputsMetadata; +import org.tensorflow.op.annotation.OpMetadata; +import org.tensorflow.op.annotation.Operator; +import org.tensorflow.types.TFloat32; +import org.tensorflow.types.TInt32; + +/** + * The XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradAndCsrInput operation + */ +@OpMetadata( + opType = XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradAndCsrInput.OP_NAME, + inputsClass = XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradAndCsrInput.Inputs.class +) +@Operator( + group = "xla" +) +public final class XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradAndCsrInput extends RawOp { + /** + * The name of this op, as known by TensorFlow core engine + */ + public static final String OP_NAME = "XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradAndCsrInput"; + + private Output updatedEmbeddingTable; + + private Output updatedAccumulator; + + private Output updatedWeights; + + public XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradAndCsrInput(Operation operation) { + super(operation, OP_NAME); + int outputIdx = 0; + updatedEmbeddingTable = operation.output(outputIdx++); + updatedAccumulator = operation.output(outputIdx++); + updatedWeights = operation.output(outputIdx++); + } + + /** + * Factory method to create a class wrapping a new XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradAndCsrInput operation. + * + * @param scope current scope + * @param rowPointers The rowPointers value + * @param sortedSampleIds The sortedSampleIds value + * @param sortedTokenIds The sortedTokenIds value + * @param sortedPosIds The sortedPosIds value + * @param sortedGains The sortedGains value + * @param weights The weights value + * @param preservedValencies The preservedValencies value + * @param preservedVectors The preservedVectors value + * @param preservedWeights The preservedWeights value + * @param activationGradients The activationGradients value + * @param learningRate The learningRate value + * @param combinerWeightsLearningRate The combinerWeightsLearningRate value + * @param embeddingTable The embeddingTable value + * @param accumulator The accumulator value + * @param maxValency The value of the maxValency attribute + * @param numWeights The value of the numWeights attribute + * @param combinerTableVjpComputation The value of the combinerTableVjpComputation attribute + * @param combinerWeightsVjpComputation The value of the combinerWeightsVjpComputation attribute + * @param tableName The value of the tableName attribute + * @param options carries optional attribute values + * @return a new instance of XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradAndCsrInput + */ + @Endpoint( + describeByClass = true + ) + public static XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradAndCsrInput create(Scope scope, + Operand rowPointers, Operand sortedSampleIds, Operand sortedTokenIds, + Operand sortedPosIds, Operand sortedGains, Operand weights, + Operand preservedValencies, Operand preservedVectors, + Operand preservedWeights, Operand activationGradients, + Operand learningRate, Operand combinerWeightsLearningRate, + Operand embeddingTable, Operand accumulator, Long maxValency, + Long numWeights, ConcreteFunction combinerTableVjpComputation, + ConcreteFunction combinerWeightsVjpComputation, String tableName, Options... options) { + OperationBuilder opBuilder = scope.opBuilder(OP_NAME, "XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradAndCsrInput"); + opBuilder.addInput(rowPointers.asOutput()); + opBuilder.addInput(sortedSampleIds.asOutput()); + opBuilder.addInput(sortedTokenIds.asOutput()); + opBuilder.addInput(sortedPosIds.asOutput()); + opBuilder.addInput(sortedGains.asOutput()); + opBuilder.addInput(weights.asOutput()); + opBuilder.addInput(preservedValencies.asOutput()); + opBuilder.addInput(preservedVectors.asOutput()); + opBuilder.addInput(preservedWeights.asOutput()); + opBuilder.addInput(activationGradients.asOutput()); + opBuilder.addInput(learningRate.asOutput()); + opBuilder.addInput(combinerWeightsLearningRate.asOutput()); + opBuilder.addInput(embeddingTable.asOutput()); + opBuilder.addInput(accumulator.asOutput()); + opBuilder.setAttr("max_valency", maxValency); + opBuilder.setAttr("num_weights", numWeights); + opBuilder.setAttr("combiner_table_vjp_computation", combinerTableVjpComputation); + opBuilder.setAttr("combiner_weights_vjp_computation", combinerWeightsVjpComputation); + opBuilder.setAttr("table_name", tableName); + if (options != null) { + for (Options opts : options) { + if (opts.clipWeightMin != null) { + opBuilder.setAttr("clip_weight_min", opts.clipWeightMin); + } + if (opts.clipWeightMax != null) { + opBuilder.setAttr("clip_weight_max", opts.clipWeightMax); + } + if (opts.numSparsecoresPerDevice != null) { + opBuilder.setAttr("num_sparsecores_per_device", opts.numSparsecoresPerDevice); + } + } + } + return new XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradAndCsrInput(opBuilder.build()); + } + + /** + * Sets the clipWeightMin option. + * + * @param clipWeightMin the clipWeightMin option + * @return this Options instance. + */ + public static Options clipWeightMin(Float clipWeightMin) { + return new Options().clipWeightMin(clipWeightMin); + } + + /** + * Sets the clipWeightMax option. + * + * @param clipWeightMax the clipWeightMax option + * @return this Options instance. + */ + public static Options clipWeightMax(Float clipWeightMax) { + return new Options().clipWeightMax(clipWeightMax); + } + + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public static Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + return new Options().numSparsecoresPerDevice(numSparsecoresPerDevice); + } + + /** + * Gets updatedEmbeddingTable. + * + * @return updatedEmbeddingTable. + */ + public Output updatedEmbeddingTable() { + return updatedEmbeddingTable; + } + + /** + * Gets updatedAccumulator. + * + * @return updatedAccumulator. + */ + public Output updatedAccumulator() { + return updatedAccumulator; + } + + /** + * Gets updatedWeights. + * + * @return updatedWeights. + */ + public Output updatedWeights() { + return updatedWeights; + } + + /** + * Optional attributes for {@link org.tensorflow.op.xla.XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradAndCsrInput} + */ + public static class Options { + private Float clipWeightMin; + + private Float clipWeightMax; + + private Long numSparsecoresPerDevice; + + private Options() { + } + + /** + * Sets the clipWeightMin option. + * + * @param clipWeightMin the clipWeightMin option + * @return this Options instance. + */ + public Options clipWeightMin(Float clipWeightMin) { + this.clipWeightMin = clipWeightMin; + return this; + } + + /** + * Sets the clipWeightMax option. + * + * @param clipWeightMax the clipWeightMax option + * @return this Options instance. + */ + public Options clipWeightMax(Float clipWeightMax) { + this.clipWeightMax = clipWeightMax; + return this; + } + + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + this.numSparsecoresPerDevice = numSparsecoresPerDevice; + return this; + } + } + + @OpInputsMetadata( + outputsClass = XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradAndCsrInput.class + ) + public static class Inputs extends RawOpInputs { + /** + * The rowPointers input + */ + public final Operand rowPointers; + + /** + * The sortedSampleIds input + */ + public final Operand sortedSampleIds; + + /** + * The sortedTokenIds input + */ + public final Operand sortedTokenIds; + + /** + * The sortedPosIds input + */ + public final Operand sortedPosIds; + + /** + * The sortedGains input + */ + public final Operand sortedGains; + + /** + * The weights input + */ + public final Operand weights; + + /** + * The preservedValencies input + */ + public final Operand preservedValencies; + + /** + * The preservedVectors input + */ + public final Operand preservedVectors; + + /** + * The preservedWeights input + */ + public final Operand preservedWeights; + + /** + * The activationGradients input + */ + public final Operand activationGradients; + + /** + * The learningRate input + */ + public final Operand learningRate; + + /** + * The combinerWeightsLearningRate input + */ + public final Operand combinerWeightsLearningRate; + + /** + * The embeddingTable input + */ + public final Operand embeddingTable; + + /** + * The accumulator input + */ + public final Operand accumulator; + + /** + * The clipWeightMin attribute + */ + public final float clipWeightMin; + + /** + * The clipWeightMax attribute + */ + public final float clipWeightMax; + + /** + * The maxValency attribute + */ + public final long maxValency; + + /** + * The numWeights attribute + */ + public final long numWeights; + + /** + * The tableName attribute + */ + public final String tableName; + + /** + * The numSparsecoresPerDevice attribute + */ + public final long numSparsecoresPerDevice; + + public Inputs(GraphOperation op) { + super(new XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradAndCsrInput(op), op, Arrays.asList("clip_weight_min", "clip_weight_max", "max_valency", "num_weights", "table_name", "num_sparsecores_per_device")); + int inputIndex = 0; + rowPointers = (Operand) op.input(inputIndex++); + sortedSampleIds = (Operand) op.input(inputIndex++); + sortedTokenIds = (Operand) op.input(inputIndex++); + sortedPosIds = (Operand) op.input(inputIndex++); + sortedGains = (Operand) op.input(inputIndex++); + weights = (Operand) op.input(inputIndex++); + preservedValencies = (Operand) op.input(inputIndex++); + preservedVectors = (Operand) op.input(inputIndex++); + preservedWeights = (Operand) op.input(inputIndex++); + activationGradients = (Operand) op.input(inputIndex++); + learningRate = (Operand) op.input(inputIndex++); + combinerWeightsLearningRate = (Operand) op.input(inputIndex++); + embeddingTable = (Operand) op.input(inputIndex++); + accumulator = (Operand) op.input(inputIndex++); + clipWeightMin = op.attributes().getAttrFloat("clip_weight_min"); + clipWeightMax = op.attributes().getAttrFloat("clip_weight_max"); + maxValency = op.attributes().getAttrInt("max_valency"); + numWeights = op.attributes().getAttrInt("num_weights"); + tableName = op.attributes().getAttrString("table_name"); + numSparsecoresPerDevice = op.attributes().getAttrInt("num_sparsecores_per_device"); + } + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradMomentumAndCsrInput.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradMomentumAndCsrInput.java new file mode 100644 index 00000000000..fd9039450b6 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradMomentumAndCsrInput.java @@ -0,0 +1,437 @@ +/* Copyright 2018-2023 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ + +// This class has been generated, DO NOT EDIT! + +package org.tensorflow.op.xla; + +import java.util.Arrays; +import org.tensorflow.ConcreteFunction; +import org.tensorflow.GraphOperation; +import org.tensorflow.Operand; +import org.tensorflow.Operation; +import org.tensorflow.OperationBuilder; +import org.tensorflow.Output; +import org.tensorflow.op.RawOp; +import org.tensorflow.op.RawOpInputs; +import org.tensorflow.op.Scope; +import org.tensorflow.op.annotation.Endpoint; +import org.tensorflow.op.annotation.OpInputsMetadata; +import org.tensorflow.op.annotation.OpMetadata; +import org.tensorflow.op.annotation.Operator; +import org.tensorflow.types.TFloat32; +import org.tensorflow.types.TInt32; + +/** + * The XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradMomentumAndCsrInput operation + */ +@OpMetadata( + opType = XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradMomentumAndCsrInput.OP_NAME, + inputsClass = XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradMomentumAndCsrInput.Inputs.class +) +@Operator( + group = "xla" +) +public final class XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradMomentumAndCsrInput extends RawOp { + /** + * The name of this op, as known by TensorFlow core engine + */ + public static final String OP_NAME = "XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradMomentumAndCsrInput"; + + private Output updatedEmbeddingTable; + + private Output updatedAccumulator; + + private Output updatedMomenta; + + private Output updatedWeights; + + public XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradMomentumAndCsrInput( + Operation operation) { + super(operation, OP_NAME); + int outputIdx = 0; + updatedEmbeddingTable = operation.output(outputIdx++); + updatedAccumulator = operation.output(outputIdx++); + updatedMomenta = operation.output(outputIdx++); + updatedWeights = operation.output(outputIdx++); + } + + /** + * Factory method to create a class wrapping a new XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradMomentumAndCsrInput operation. + * + * @param scope current scope + * @param rowPointers The rowPointers value + * @param sortedSampleIds The sortedSampleIds value + * @param sortedTokenIds The sortedTokenIds value + * @param sortedPosIds The sortedPosIds value + * @param sortedGains The sortedGains value + * @param weights The weights value + * @param preservedValencies The preservedValencies value + * @param preservedVectors The preservedVectors value + * @param preservedWeights The preservedWeights value + * @param activationGradients The activationGradients value + * @param learningRate The learningRate value + * @param combinerWeightsLearningRate The combinerWeightsLearningRate value + * @param embeddingTable The embeddingTable value + * @param accumulator The accumulator value + * @param momenta The momenta value + * @param useNesterov The value of the useNesterov attribute + * @param exponent The value of the exponent attribute + * @param beta1 The value of the beta1 attribute + * @param beta2 The value of the beta2 attribute + * @param epsilon The value of the epsilon attribute + * @param maxValency The value of the maxValency attribute + * @param numWeights The value of the numWeights attribute + * @param combinerTableVjpComputation The value of the combinerTableVjpComputation attribute + * @param combinerWeightsVjpComputation The value of the combinerWeightsVjpComputation attribute + * @param tableName The value of the tableName attribute + * @param options carries optional attribute values + * @return a new instance of XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradMomentumAndCsrInput + */ + @Endpoint( + describeByClass = true + ) + public static XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradMomentumAndCsrInput create( + Scope scope, Operand rowPointers, Operand sortedSampleIds, + Operand sortedTokenIds, Operand sortedPosIds, Operand sortedGains, + Operand weights, Operand preservedValencies, + Operand preservedVectors, Operand preservedWeights, + Operand activationGradients, Operand learningRate, + Operand combinerWeightsLearningRate, Operand embeddingTable, + Operand accumulator, Operand momenta, Boolean useNesterov, Float exponent, + Float beta1, Float beta2, Float epsilon, Long maxValency, Long numWeights, + ConcreteFunction combinerTableVjpComputation, ConcreteFunction combinerWeightsVjpComputation, + String tableName, Options... options) { + OperationBuilder opBuilder = scope.opBuilder(OP_NAME, "XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradMomentumAndCsrInput"); + opBuilder.addInput(rowPointers.asOutput()); + opBuilder.addInput(sortedSampleIds.asOutput()); + opBuilder.addInput(sortedTokenIds.asOutput()); + opBuilder.addInput(sortedPosIds.asOutput()); + opBuilder.addInput(sortedGains.asOutput()); + opBuilder.addInput(weights.asOutput()); + opBuilder.addInput(preservedValencies.asOutput()); + opBuilder.addInput(preservedVectors.asOutput()); + opBuilder.addInput(preservedWeights.asOutput()); + opBuilder.addInput(activationGradients.asOutput()); + opBuilder.addInput(learningRate.asOutput()); + opBuilder.addInput(combinerWeightsLearningRate.asOutput()); + opBuilder.addInput(embeddingTable.asOutput()); + opBuilder.addInput(accumulator.asOutput()); + opBuilder.addInput(momenta.asOutput()); + opBuilder.setAttr("use_nesterov", useNesterov); + opBuilder.setAttr("exponent", exponent); + opBuilder.setAttr("beta1", beta1); + opBuilder.setAttr("beta2", beta2); + opBuilder.setAttr("epsilon", epsilon); + opBuilder.setAttr("max_valency", maxValency); + opBuilder.setAttr("num_weights", numWeights); + opBuilder.setAttr("combiner_table_vjp_computation", combinerTableVjpComputation); + opBuilder.setAttr("combiner_weights_vjp_computation", combinerWeightsVjpComputation); + opBuilder.setAttr("table_name", tableName); + if (options != null) { + for (Options opts : options) { + if (opts.clipWeightMin != null) { + opBuilder.setAttr("clip_weight_min", opts.clipWeightMin); + } + if (opts.clipWeightMax != null) { + opBuilder.setAttr("clip_weight_max", opts.clipWeightMax); + } + if (opts.numSparsecoresPerDevice != null) { + opBuilder.setAttr("num_sparsecores_per_device", opts.numSparsecoresPerDevice); + } + } + } + return new XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradMomentumAndCsrInput(opBuilder.build()); + } + + /** + * Sets the clipWeightMin option. + * + * @param clipWeightMin the clipWeightMin option + * @return this Options instance. + */ + public static Options clipWeightMin(Float clipWeightMin) { + return new Options().clipWeightMin(clipWeightMin); + } + + /** + * Sets the clipWeightMax option. + * + * @param clipWeightMax the clipWeightMax option + * @return this Options instance. + */ + public static Options clipWeightMax(Float clipWeightMax) { + return new Options().clipWeightMax(clipWeightMax); + } + + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public static Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + return new Options().numSparsecoresPerDevice(numSparsecoresPerDevice); + } + + /** + * Gets updatedEmbeddingTable. + * + * @return updatedEmbeddingTable. + */ + public Output updatedEmbeddingTable() { + return updatedEmbeddingTable; + } + + /** + * Gets updatedAccumulator. + * + * @return updatedAccumulator. + */ + public Output updatedAccumulator() { + return updatedAccumulator; + } + + /** + * Gets updatedMomenta. + * + * @return updatedMomenta. + */ + public Output updatedMomenta() { + return updatedMomenta; + } + + /** + * Gets updatedWeights. + * + * @return updatedWeights. + */ + public Output updatedWeights() { + return updatedWeights; + } + + /** + * Optional attributes for {@link org.tensorflow.op.xla.XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradMomentumAndCsrInput} + */ + public static class Options { + private Float clipWeightMin; + + private Float clipWeightMax; + + private Long numSparsecoresPerDevice; + + private Options() { + } + + /** + * Sets the clipWeightMin option. + * + * @param clipWeightMin the clipWeightMin option + * @return this Options instance. + */ + public Options clipWeightMin(Float clipWeightMin) { + this.clipWeightMin = clipWeightMin; + return this; + } + + /** + * Sets the clipWeightMax option. + * + * @param clipWeightMax the clipWeightMax option + * @return this Options instance. + */ + public Options clipWeightMax(Float clipWeightMax) { + this.clipWeightMax = clipWeightMax; + return this; + } + + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + this.numSparsecoresPerDevice = numSparsecoresPerDevice; + return this; + } + } + + @OpInputsMetadata( + outputsClass = XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradMomentumAndCsrInput.class + ) + public static class Inputs extends RawOpInputs { + /** + * The rowPointers input + */ + public final Operand rowPointers; + + /** + * The sortedSampleIds input + */ + public final Operand sortedSampleIds; + + /** + * The sortedTokenIds input + */ + public final Operand sortedTokenIds; + + /** + * The sortedPosIds input + */ + public final Operand sortedPosIds; + + /** + * The sortedGains input + */ + public final Operand sortedGains; + + /** + * The weights input + */ + public final Operand weights; + + /** + * The preservedValencies input + */ + public final Operand preservedValencies; + + /** + * The preservedVectors input + */ + public final Operand preservedVectors; + + /** + * The preservedWeights input + */ + public final Operand preservedWeights; + + /** + * The activationGradients input + */ + public final Operand activationGradients; + + /** + * The learningRate input + */ + public final Operand learningRate; + + /** + * The combinerWeightsLearningRate input + */ + public final Operand combinerWeightsLearningRate; + + /** + * The embeddingTable input + */ + public final Operand embeddingTable; + + /** + * The accumulator input + */ + public final Operand accumulator; + + /** + * The momenta input + */ + public final Operand momenta; + + /** + * The useNesterov attribute + */ + public final boolean useNesterov; + + /** + * The exponent attribute + */ + public final float exponent; + + /** + * The beta1 attribute + */ + public final float beta1; + + /** + * The beta2 attribute + */ + public final float beta2; + + /** + * The epsilon attribute + */ + public final float epsilon; + + /** + * The clipWeightMin attribute + */ + public final float clipWeightMin; + + /** + * The clipWeightMax attribute + */ + public final float clipWeightMax; + + /** + * The maxValency attribute + */ + public final long maxValency; + + /** + * The numWeights attribute + */ + public final long numWeights; + + /** + * The tableName attribute + */ + public final String tableName; + + /** + * The numSparsecoresPerDevice attribute + */ + public final long numSparsecoresPerDevice; + + public Inputs(GraphOperation op) { + super(new XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdagradMomentumAndCsrInput(op), op, Arrays.asList("use_nesterov", "exponent", "beta1", "beta2", "epsilon", "clip_weight_min", "clip_weight_max", "max_valency", "num_weights", "table_name", "num_sparsecores_per_device")); + int inputIndex = 0; + rowPointers = (Operand) op.input(inputIndex++); + sortedSampleIds = (Operand) op.input(inputIndex++); + sortedTokenIds = (Operand) op.input(inputIndex++); + sortedPosIds = (Operand) op.input(inputIndex++); + sortedGains = (Operand) op.input(inputIndex++); + weights = (Operand) op.input(inputIndex++); + preservedValencies = (Operand) op.input(inputIndex++); + preservedVectors = (Operand) op.input(inputIndex++); + preservedWeights = (Operand) op.input(inputIndex++); + activationGradients = (Operand) op.input(inputIndex++); + learningRate = (Operand) op.input(inputIndex++); + combinerWeightsLearningRate = (Operand) op.input(inputIndex++); + embeddingTable = (Operand) op.input(inputIndex++); + accumulator = (Operand) op.input(inputIndex++); + momenta = (Operand) op.input(inputIndex++); + useNesterov = op.attributes().getAttrBool("use_nesterov"); + exponent = op.attributes().getAttrFloat("exponent"); + beta1 = op.attributes().getAttrFloat("beta1"); + beta2 = op.attributes().getAttrFloat("beta2"); + epsilon = op.attributes().getAttrFloat("epsilon"); + clipWeightMin = op.attributes().getAttrFloat("clip_weight_min"); + clipWeightMax = op.attributes().getAttrFloat("clip_weight_max"); + maxValency = op.attributes().getAttrInt("max_valency"); + numWeights = op.attributes().getAttrInt("num_weights"); + tableName = op.attributes().getAttrString("table_name"); + numSparsecoresPerDevice = op.attributes().getAttrInt("num_sparsecores_per_device"); + } + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdamAndCsrInput.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdamAndCsrInput.java new file mode 100644 index 00000000000..2f8c1a3a7df --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdamAndCsrInput.java @@ -0,0 +1,427 @@ +/* Copyright 2018-2023 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ + +// This class has been generated, DO NOT EDIT! + +package org.tensorflow.op.xla; + +import java.util.Arrays; +import org.tensorflow.ConcreteFunction; +import org.tensorflow.GraphOperation; +import org.tensorflow.Operand; +import org.tensorflow.Operation; +import org.tensorflow.OperationBuilder; +import org.tensorflow.Output; +import org.tensorflow.op.RawOp; +import org.tensorflow.op.RawOpInputs; +import org.tensorflow.op.Scope; +import org.tensorflow.op.annotation.Endpoint; +import org.tensorflow.op.annotation.OpInputsMetadata; +import org.tensorflow.op.annotation.OpMetadata; +import org.tensorflow.op.annotation.Operator; +import org.tensorflow.types.TFloat32; +import org.tensorflow.types.TInt32; + +/** + * The XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdamAndCsrInput operation + */ +@OpMetadata( + opType = XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdamAndCsrInput.OP_NAME, + inputsClass = XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdamAndCsrInput.Inputs.class +) +@Operator( + group = "xla" +) +public final class XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdamAndCsrInput extends RawOp { + /** + * The name of this op, as known by TensorFlow core engine + */ + public static final String OP_NAME = "XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdamAndCsrInput"; + + private Output updatedEmbeddingTable; + + private Output updatedMomenta; + + private Output updatedVelocity; + + private Output updatedWeights; + + public XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdamAndCsrInput(Operation operation) { + super(operation, OP_NAME); + int outputIdx = 0; + updatedEmbeddingTable = operation.output(outputIdx++); + updatedMomenta = operation.output(outputIdx++); + updatedVelocity = operation.output(outputIdx++); + updatedWeights = operation.output(outputIdx++); + } + + /** + * Factory method to create a class wrapping a new XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdamAndCsrInput operation. + * + * @param scope current scope + * @param rowPointers The rowPointers value + * @param sortedSampleIds The sortedSampleIds value + * @param sortedTokenIds The sortedTokenIds value + * @param sortedPosIds The sortedPosIds value + * @param sortedGains The sortedGains value + * @param weights The weights value + * @param preservedValencies The preservedValencies value + * @param preservedVectors The preservedVectors value + * @param preservedWeights The preservedWeights value + * @param activationGradients The activationGradients value + * @param learningRate The learningRate value + * @param combinerWeightsLearningRate The combinerWeightsLearningRate value + * @param embeddingTable The embeddingTable value + * @param momenta The momenta value + * @param velocity The velocity value + * @param useSumInsideSqrt The value of the useSumInsideSqrt attribute + * @param beta1 The value of the beta1 attribute + * @param beta2 The value of the beta2 attribute + * @param epsilon The value of the epsilon attribute + * @param maxValency The value of the maxValency attribute + * @param numWeights The value of the numWeights attribute + * @param combinerTableVjpComputation The value of the combinerTableVjpComputation attribute + * @param combinerWeightsVjpComputation The value of the combinerWeightsVjpComputation attribute + * @param tableName The value of the tableName attribute + * @param options carries optional attribute values + * @return a new instance of XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdamAndCsrInput + */ + @Endpoint( + describeByClass = true + ) + public static XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdamAndCsrInput create(Scope scope, + Operand rowPointers, Operand sortedSampleIds, Operand sortedTokenIds, + Operand sortedPosIds, Operand sortedGains, Operand weights, + Operand preservedValencies, Operand preservedVectors, + Operand preservedWeights, Operand activationGradients, + Operand learningRate, Operand combinerWeightsLearningRate, + Operand embeddingTable, Operand momenta, Operand velocity, + Boolean useSumInsideSqrt, Float beta1, Float beta2, Float epsilon, Long maxValency, + Long numWeights, ConcreteFunction combinerTableVjpComputation, + ConcreteFunction combinerWeightsVjpComputation, String tableName, Options... options) { + OperationBuilder opBuilder = scope.opBuilder(OP_NAME, "XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdamAndCsrInput"); + opBuilder.addInput(rowPointers.asOutput()); + opBuilder.addInput(sortedSampleIds.asOutput()); + opBuilder.addInput(sortedTokenIds.asOutput()); + opBuilder.addInput(sortedPosIds.asOutput()); + opBuilder.addInput(sortedGains.asOutput()); + opBuilder.addInput(weights.asOutput()); + opBuilder.addInput(preservedValencies.asOutput()); + opBuilder.addInput(preservedVectors.asOutput()); + opBuilder.addInput(preservedWeights.asOutput()); + opBuilder.addInput(activationGradients.asOutput()); + opBuilder.addInput(learningRate.asOutput()); + opBuilder.addInput(combinerWeightsLearningRate.asOutput()); + opBuilder.addInput(embeddingTable.asOutput()); + opBuilder.addInput(momenta.asOutput()); + opBuilder.addInput(velocity.asOutput()); + opBuilder.setAttr("use_sum_inside_sqrt", useSumInsideSqrt); + opBuilder.setAttr("beta1", beta1); + opBuilder.setAttr("beta2", beta2); + opBuilder.setAttr("epsilon", epsilon); + opBuilder.setAttr("max_valency", maxValency); + opBuilder.setAttr("num_weights", numWeights); + opBuilder.setAttr("combiner_table_vjp_computation", combinerTableVjpComputation); + opBuilder.setAttr("combiner_weights_vjp_computation", combinerWeightsVjpComputation); + opBuilder.setAttr("table_name", tableName); + if (options != null) { + for (Options opts : options) { + if (opts.clipWeightMin != null) { + opBuilder.setAttr("clip_weight_min", opts.clipWeightMin); + } + if (opts.clipWeightMax != null) { + opBuilder.setAttr("clip_weight_max", opts.clipWeightMax); + } + if (opts.numSparsecoresPerDevice != null) { + opBuilder.setAttr("num_sparsecores_per_device", opts.numSparsecoresPerDevice); + } + } + } + return new XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdamAndCsrInput(opBuilder.build()); + } + + /** + * Sets the clipWeightMin option. + * + * @param clipWeightMin the clipWeightMin option + * @return this Options instance. + */ + public static Options clipWeightMin(Float clipWeightMin) { + return new Options().clipWeightMin(clipWeightMin); + } + + /** + * Sets the clipWeightMax option. + * + * @param clipWeightMax the clipWeightMax option + * @return this Options instance. + */ + public static Options clipWeightMax(Float clipWeightMax) { + return new Options().clipWeightMax(clipWeightMax); + } + + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public static Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + return new Options().numSparsecoresPerDevice(numSparsecoresPerDevice); + } + + /** + * Gets updatedEmbeddingTable. + * + * @return updatedEmbeddingTable. + */ + public Output updatedEmbeddingTable() { + return updatedEmbeddingTable; + } + + /** + * Gets updatedMomenta. + * + * @return updatedMomenta. + */ + public Output updatedMomenta() { + return updatedMomenta; + } + + /** + * Gets updatedVelocity. + * + * @return updatedVelocity. + */ + public Output updatedVelocity() { + return updatedVelocity; + } + + /** + * Gets updatedWeights. + * + * @return updatedWeights. + */ + public Output updatedWeights() { + return updatedWeights; + } + + /** + * Optional attributes for {@link org.tensorflow.op.xla.XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdamAndCsrInput} + */ + public static class Options { + private Float clipWeightMin; + + private Float clipWeightMax; + + private Long numSparsecoresPerDevice; + + private Options() { + } + + /** + * Sets the clipWeightMin option. + * + * @param clipWeightMin the clipWeightMin option + * @return this Options instance. + */ + public Options clipWeightMin(Float clipWeightMin) { + this.clipWeightMin = clipWeightMin; + return this; + } + + /** + * Sets the clipWeightMax option. + * + * @param clipWeightMax the clipWeightMax option + * @return this Options instance. + */ + public Options clipWeightMax(Float clipWeightMax) { + this.clipWeightMax = clipWeightMax; + return this; + } + + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + this.numSparsecoresPerDevice = numSparsecoresPerDevice; + return this; + } + } + + @OpInputsMetadata( + outputsClass = XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdamAndCsrInput.class + ) + public static class Inputs extends RawOpInputs { + /** + * The rowPointers input + */ + public final Operand rowPointers; + + /** + * The sortedSampleIds input + */ + public final Operand sortedSampleIds; + + /** + * The sortedTokenIds input + */ + public final Operand sortedTokenIds; + + /** + * The sortedPosIds input + */ + public final Operand sortedPosIds; + + /** + * The sortedGains input + */ + public final Operand sortedGains; + + /** + * The weights input + */ + public final Operand weights; + + /** + * The preservedValencies input + */ + public final Operand preservedValencies; + + /** + * The preservedVectors input + */ + public final Operand preservedVectors; + + /** + * The preservedWeights input + */ + public final Operand preservedWeights; + + /** + * The activationGradients input + */ + public final Operand activationGradients; + + /** + * The learningRate input + */ + public final Operand learningRate; + + /** + * The combinerWeightsLearningRate input + */ + public final Operand combinerWeightsLearningRate; + + /** + * The embeddingTable input + */ + public final Operand embeddingTable; + + /** + * The momenta input + */ + public final Operand momenta; + + /** + * The velocity input + */ + public final Operand velocity; + + /** + * The useSumInsideSqrt attribute + */ + public final boolean useSumInsideSqrt; + + /** + * The beta1 attribute + */ + public final float beta1; + + /** + * The beta2 attribute + */ + public final float beta2; + + /** + * The epsilon attribute + */ + public final float epsilon; + + /** + * The clipWeightMin attribute + */ + public final float clipWeightMin; + + /** + * The clipWeightMax attribute + */ + public final float clipWeightMax; + + /** + * The maxValency attribute + */ + public final long maxValency; + + /** + * The numWeights attribute + */ + public final long numWeights; + + /** + * The tableName attribute + */ + public final String tableName; + + /** + * The numSparsecoresPerDevice attribute + */ + public final long numSparsecoresPerDevice; + + public Inputs(GraphOperation op) { + super(new XlaSparseDenseMatmulCustomCombinerOnTcGradWithAdamAndCsrInput(op), op, Arrays.asList("use_sum_inside_sqrt", "beta1", "beta2", "epsilon", "clip_weight_min", "clip_weight_max", "max_valency", "num_weights", "table_name", "num_sparsecores_per_device")); + int inputIndex = 0; + rowPointers = (Operand) op.input(inputIndex++); + sortedSampleIds = (Operand) op.input(inputIndex++); + sortedTokenIds = (Operand) op.input(inputIndex++); + sortedPosIds = (Operand) op.input(inputIndex++); + sortedGains = (Operand) op.input(inputIndex++); + weights = (Operand) op.input(inputIndex++); + preservedValencies = (Operand) op.input(inputIndex++); + preservedVectors = (Operand) op.input(inputIndex++); + preservedWeights = (Operand) op.input(inputIndex++); + activationGradients = (Operand) op.input(inputIndex++); + learningRate = (Operand) op.input(inputIndex++); + combinerWeightsLearningRate = (Operand) op.input(inputIndex++); + embeddingTable = (Operand) op.input(inputIndex++); + momenta = (Operand) op.input(inputIndex++); + velocity = (Operand) op.input(inputIndex++); + useSumInsideSqrt = op.attributes().getAttrBool("use_sum_inside_sqrt"); + beta1 = op.attributes().getAttrFloat("beta1"); + beta2 = op.attributes().getAttrFloat("beta2"); + epsilon = op.attributes().getAttrFloat("epsilon"); + clipWeightMin = op.attributes().getAttrFloat("clip_weight_min"); + clipWeightMax = op.attributes().getAttrFloat("clip_weight_max"); + maxValency = op.attributes().getAttrInt("max_valency"); + numWeights = op.attributes().getAttrInt("num_weights"); + tableName = op.attributes().getAttrString("table_name"); + numSparsecoresPerDevice = op.attributes().getAttrInt("num_sparsecores_per_device"); + } + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulCustomCombinerOnTcGradWithCsrInput.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulCustomCombinerOnTcGradWithCsrInput.java new file mode 100644 index 00000000000..b4bb94eb671 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulCustomCombinerOnTcGradWithCsrInput.java @@ -0,0 +1,301 @@ +/* Copyright 2018-2023 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ + +// This class has been generated, DO NOT EDIT! + +package org.tensorflow.op.xla; + +import java.util.Arrays; +import java.util.List; +import org.tensorflow.ConcreteFunction; +import org.tensorflow.GraphOperation; +import org.tensorflow.Operand; +import org.tensorflow.Operation; +import org.tensorflow.OperationBuilder; +import org.tensorflow.Output; +import org.tensorflow.op.Operands; +import org.tensorflow.op.RawOp; +import org.tensorflow.op.RawOpInputs; +import org.tensorflow.op.Scope; +import org.tensorflow.op.annotation.Endpoint; +import org.tensorflow.op.annotation.OpInputsMetadata; +import org.tensorflow.op.annotation.OpMetadata; +import org.tensorflow.op.annotation.Operator; +import org.tensorflow.types.TFloat32; +import org.tensorflow.types.TInt32; + +/** + * The XlaSparseDenseMatmulCustomCombinerOnTcGradWithCsrInput operation + */ +@OpMetadata( + opType = XlaSparseDenseMatmulCustomCombinerOnTcGradWithCsrInput.OP_NAME, + inputsClass = XlaSparseDenseMatmulCustomCombinerOnTcGradWithCsrInput.Inputs.class +) +@Operator( + group = "xla" +) +public final class XlaSparseDenseMatmulCustomCombinerOnTcGradWithCsrInput extends RawOp { + /** + * The name of this op, as known by TensorFlow core engine + */ + public static final String OP_NAME = "XlaSparseDenseMatmulCustomCombinerOnTcGradWithCsrInput"; + + private List> updatedTables; + + private Output updatedWeights; + + @SuppressWarnings("unchecked") + public XlaSparseDenseMatmulCustomCombinerOnTcGradWithCsrInput(Operation operation) { + super(operation, OP_NAME); + int outputIdx = 0; + int updatedTablesLength = operation.outputListLength("updated_tables"); + updatedTables = Arrays.asList((Output[]) operation.outputList(outputIdx, updatedTablesLength)); + outputIdx += updatedTablesLength; + updatedWeights = operation.output(outputIdx++); + } + + /** + * Factory method to create a class wrapping a new XlaSparseDenseMatmulCustomCombinerOnTcGradWithCsrInput operation. + * + * @param scope current scope + * @param rowPointers The rowPointers value + * @param sortedSampleIds The sortedSampleIds value + * @param sortedTokenIds The sortedTokenIds value + * @param sortedPosIds The sortedPosIds value + * @param sortedGains The sortedGains value + * @param weights The weights value + * @param preservedValencies The preservedValencies value + * @param preservedVectors The preservedVectors value + * @param preservedWeights The preservedWeights value + * @param activationGradients The activationGradients value + * @param tables The tables value + * @param hyperparameters The hyperparameters value + * @param combinerWeightsLearningRate The combinerWeightsLearningRate value + * @param maxValency The value of the maxValency attribute + * @param numWeights The value of the numWeights attribute + * @param combinerTableVjpComputation The value of the combinerTableVjpComputation attribute + * @param combinerWeightsVjpComputation The value of the combinerWeightsVjpComputation attribute + * @param optimizerCustomComputation The value of the optimizerCustomComputation attribute + * @param tableName The value of the tableName attribute + * @param options carries optional attribute values + * @return a new instance of XlaSparseDenseMatmulCustomCombinerOnTcGradWithCsrInput + */ + @Endpoint( + describeByClass = true + ) + public static XlaSparseDenseMatmulCustomCombinerOnTcGradWithCsrInput create(Scope scope, + Operand rowPointers, Operand sortedSampleIds, Operand sortedTokenIds, + Operand sortedPosIds, Operand sortedGains, Operand weights, + Operand preservedValencies, Operand preservedVectors, + Operand preservedWeights, Operand activationGradients, + Iterable> tables, Iterable> hyperparameters, + Operand combinerWeightsLearningRate, Long maxValency, Long numWeights, + ConcreteFunction combinerTableVjpComputation, ConcreteFunction combinerWeightsVjpComputation, + ConcreteFunction optimizerCustomComputation, String tableName, Options... options) { + OperationBuilder opBuilder = scope.opBuilder(OP_NAME, "XlaSparseDenseMatmulCustomCombinerOnTcGradWithCsrInput"); + opBuilder.addInput(rowPointers.asOutput()); + opBuilder.addInput(sortedSampleIds.asOutput()); + opBuilder.addInput(sortedTokenIds.asOutput()); + opBuilder.addInput(sortedPosIds.asOutput()); + opBuilder.addInput(sortedGains.asOutput()); + opBuilder.addInput(weights.asOutput()); + opBuilder.addInput(preservedValencies.asOutput()); + opBuilder.addInput(preservedVectors.asOutput()); + opBuilder.addInput(preservedWeights.asOutput()); + opBuilder.addInput(activationGradients.asOutput()); + opBuilder.addInputList(Operands.asOutputs(tables)); + opBuilder.addInputList(Operands.asOutputs(hyperparameters)); + opBuilder.addInput(combinerWeightsLearningRate.asOutput()); + opBuilder.setAttr("max_valency", maxValency); + opBuilder.setAttr("num_weights", numWeights); + opBuilder.setAttr("combiner_table_vjp_computation", combinerTableVjpComputation); + opBuilder.setAttr("combiner_weights_vjp_computation", combinerWeightsVjpComputation); + opBuilder.setAttr("optimizer_custom_computation", optimizerCustomComputation); + opBuilder.setAttr("table_name", tableName); + if (options != null) { + for (Options opts : options) { + if (opts.numSparsecoresPerDevice != null) { + opBuilder.setAttr("num_sparsecores_per_device", opts.numSparsecoresPerDevice); + } + } + } + return new XlaSparseDenseMatmulCustomCombinerOnTcGradWithCsrInput(opBuilder.build()); + } + + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public static Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + return new Options().numSparsecoresPerDevice(numSparsecoresPerDevice); + } + + /** + * Gets updatedTables. + * + * @return updatedTables. + */ + public List> updatedTables() { + return updatedTables; + } + + /** + * Gets updatedWeights. + * + * @return updatedWeights. + */ + public Output updatedWeights() { + return updatedWeights; + } + + /** + * Optional attributes for {@link org.tensorflow.op.xla.XlaSparseDenseMatmulCustomCombinerOnTcGradWithCsrInput} + */ + public static class Options { + private Long numSparsecoresPerDevice; + + private Options() { + } + + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + this.numSparsecoresPerDevice = numSparsecoresPerDevice; + return this; + } + } + + @OpInputsMetadata( + outputsClass = XlaSparseDenseMatmulCustomCombinerOnTcGradWithCsrInput.class + ) + public static class Inputs extends RawOpInputs { + /** + * The rowPointers input + */ + public final Operand rowPointers; + + /** + * The sortedSampleIds input + */ + public final Operand sortedSampleIds; + + /** + * The sortedTokenIds input + */ + public final Operand sortedTokenIds; + + /** + * The sortedPosIds input + */ + public final Operand sortedPosIds; + + /** + * The sortedGains input + */ + public final Operand sortedGains; + + /** + * The weights input + */ + public final Operand weights; + + /** + * The preservedValencies input + */ + public final Operand preservedValencies; + + /** + * The preservedVectors input + */ + public final Operand preservedVectors; + + /** + * The preservedWeights input + */ + public final Operand preservedWeights; + + /** + * The activationGradients input + */ + public final Operand activationGradients; + + /** + * The tables input + */ + public final Iterable> tables; + + /** + * The hyperparameters input + */ + public final Iterable> hyperparameters; + + /** + * The combinerWeightsLearningRate input + */ + public final Operand combinerWeightsLearningRate; + + /** + * The maxValency attribute + */ + public final long maxValency; + + /** + * The numWeights attribute + */ + public final long numWeights; + + /** + * The tableName attribute + */ + public final String tableName; + + /** + * The numSparsecoresPerDevice attribute + */ + public final long numSparsecoresPerDevice; + + public Inputs(GraphOperation op) { + super(new XlaSparseDenseMatmulCustomCombinerOnTcGradWithCsrInput(op), op, Arrays.asList("max_valency", "num_weights", "table_name", "num_sparsecores_per_device")); + int inputIndex = 0; + rowPointers = (Operand) op.input(inputIndex++); + sortedSampleIds = (Operand) op.input(inputIndex++); + sortedTokenIds = (Operand) op.input(inputIndex++); + sortedPosIds = (Operand) op.input(inputIndex++); + sortedGains = (Operand) op.input(inputIndex++); + weights = (Operand) op.input(inputIndex++); + preservedValencies = (Operand) op.input(inputIndex++); + preservedVectors = (Operand) op.input(inputIndex++); + preservedWeights = (Operand) op.input(inputIndex++); + activationGradients = (Operand) op.input(inputIndex++); + int tablesLength = op.inputListLength("tables"); + tables = Arrays.asList((Operand[]) op.inputList(inputIndex, tablesLength)); + inputIndex += tablesLength; + int hyperparametersLength = op.inputListLength("hyperparameters"); + hyperparameters = Arrays.asList((Operand[]) op.inputList(inputIndex, hyperparametersLength)); + inputIndex += hyperparametersLength; + combinerWeightsLearningRate = (Operand) op.input(inputIndex++); + maxValency = op.attributes().getAttrInt("max_valency"); + numWeights = op.attributes().getAttrInt("num_weights"); + tableName = op.attributes().getAttrString("table_name"); + numSparsecoresPerDevice = op.attributes().getAttrInt("num_sparsecores_per_device"); + } + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulCustomCombinerOnTcGradWithFtrlAndCsrInput.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulCustomCombinerOnTcGradWithFtrlAndCsrInput.java new file mode 100644 index 00000000000..f4230f5a56d --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulCustomCombinerOnTcGradWithFtrlAndCsrInput.java @@ -0,0 +1,436 @@ +/* Copyright 2018-2023 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ + +// This class has been generated, DO NOT EDIT! + +package org.tensorflow.op.xla; + +import java.util.Arrays; +import org.tensorflow.ConcreteFunction; +import org.tensorflow.GraphOperation; +import org.tensorflow.Operand; +import org.tensorflow.Operation; +import org.tensorflow.OperationBuilder; +import org.tensorflow.Output; +import org.tensorflow.op.RawOp; +import org.tensorflow.op.RawOpInputs; +import org.tensorflow.op.Scope; +import org.tensorflow.op.annotation.Endpoint; +import org.tensorflow.op.annotation.OpInputsMetadata; +import org.tensorflow.op.annotation.OpMetadata; +import org.tensorflow.op.annotation.Operator; +import org.tensorflow.types.TFloat32; +import org.tensorflow.types.TInt32; + +/** + * The XlaSparseDenseMatmulCustomCombinerOnTcGradWithFtrlAndCsrInput operation + */ +@OpMetadata( + opType = XlaSparseDenseMatmulCustomCombinerOnTcGradWithFtrlAndCsrInput.OP_NAME, + inputsClass = XlaSparseDenseMatmulCustomCombinerOnTcGradWithFtrlAndCsrInput.Inputs.class +) +@Operator( + group = "xla" +) +public final class XlaSparseDenseMatmulCustomCombinerOnTcGradWithFtrlAndCsrInput extends RawOp { + /** + * The name of this op, as known by TensorFlow core engine + */ + public static final String OP_NAME = "XlaSparseDenseMatmulCustomCombinerOnTcGradWithFtrlAndCsrInput"; + + private Output updatedEmbeddingTable; + + private Output updatedAccumulator; + + private Output updatedLinear; + + private Output updatedWeights; + + public XlaSparseDenseMatmulCustomCombinerOnTcGradWithFtrlAndCsrInput(Operation operation) { + super(operation, OP_NAME); + int outputIdx = 0; + updatedEmbeddingTable = operation.output(outputIdx++); + updatedAccumulator = operation.output(outputIdx++); + updatedLinear = operation.output(outputIdx++); + updatedWeights = operation.output(outputIdx++); + } + + /** + * Factory method to create a class wrapping a new XlaSparseDenseMatmulCustomCombinerOnTcGradWithFtrlAndCsrInput operation. + * + * @param scope current scope + * @param rowPointers The rowPointers value + * @param sortedSampleIds The sortedSampleIds value + * @param sortedTokenIds The sortedTokenIds value + * @param sortedPosIds The sortedPosIds value + * @param sortedGains The sortedGains value + * @param weights The weights value + * @param preservedValencies The preservedValencies value + * @param preservedVectors The preservedVectors value + * @param preservedWeights The preservedWeights value + * @param activationGradients The activationGradients value + * @param learningRate The learningRate value + * @param combinerWeightsLearningRate The combinerWeightsLearningRate value + * @param embeddingTable The embeddingTable value + * @param accumulator The accumulator value + * @param linear The linear value + * @param multiplyLinearByLearningRate The value of the multiplyLinearByLearningRate attribute + * @param beta The value of the beta attribute + * @param learningRatePower The value of the learningRatePower attribute + * @param l1RegularizationStrength The value of the l1RegularizationStrength attribute + * @param l2RegularizationStrength The value of the l2RegularizationStrength attribute + * @param maxValency The value of the maxValency attribute + * @param numWeights The value of the numWeights attribute + * @param combinerTableVjpComputation The value of the combinerTableVjpComputation attribute + * @param combinerWeightsVjpComputation The value of the combinerWeightsVjpComputation attribute + * @param tableName The value of the tableName attribute + * @param options carries optional attribute values + * @return a new instance of XlaSparseDenseMatmulCustomCombinerOnTcGradWithFtrlAndCsrInput + */ + @Endpoint( + describeByClass = true + ) + public static XlaSparseDenseMatmulCustomCombinerOnTcGradWithFtrlAndCsrInput create(Scope scope, + Operand rowPointers, Operand sortedSampleIds, Operand sortedTokenIds, + Operand sortedPosIds, Operand sortedGains, Operand weights, + Operand preservedValencies, Operand preservedVectors, + Operand preservedWeights, Operand activationGradients, + Operand learningRate, Operand combinerWeightsLearningRate, + Operand embeddingTable, Operand accumulator, Operand linear, + Boolean multiplyLinearByLearningRate, Float beta, Float learningRatePower, + Float l1RegularizationStrength, Float l2RegularizationStrength, Long maxValency, + Long numWeights, ConcreteFunction combinerTableVjpComputation, + ConcreteFunction combinerWeightsVjpComputation, String tableName, Options... options) { + OperationBuilder opBuilder = scope.opBuilder(OP_NAME, "XlaSparseDenseMatmulCustomCombinerOnTcGradWithFtrlAndCsrInput"); + opBuilder.addInput(rowPointers.asOutput()); + opBuilder.addInput(sortedSampleIds.asOutput()); + opBuilder.addInput(sortedTokenIds.asOutput()); + opBuilder.addInput(sortedPosIds.asOutput()); + opBuilder.addInput(sortedGains.asOutput()); + opBuilder.addInput(weights.asOutput()); + opBuilder.addInput(preservedValencies.asOutput()); + opBuilder.addInput(preservedVectors.asOutput()); + opBuilder.addInput(preservedWeights.asOutput()); + opBuilder.addInput(activationGradients.asOutput()); + opBuilder.addInput(learningRate.asOutput()); + opBuilder.addInput(combinerWeightsLearningRate.asOutput()); + opBuilder.addInput(embeddingTable.asOutput()); + opBuilder.addInput(accumulator.asOutput()); + opBuilder.addInput(linear.asOutput()); + opBuilder.setAttr("multiply_linear_by_learning_rate", multiplyLinearByLearningRate); + opBuilder.setAttr("beta", beta); + opBuilder.setAttr("learning_rate_power", learningRatePower); + opBuilder.setAttr("l1_regularization_strength", l1RegularizationStrength); + opBuilder.setAttr("l2_regularization_strength", l2RegularizationStrength); + opBuilder.setAttr("max_valency", maxValency); + opBuilder.setAttr("num_weights", numWeights); + opBuilder.setAttr("combiner_table_vjp_computation", combinerTableVjpComputation); + opBuilder.setAttr("combiner_weights_vjp_computation", combinerWeightsVjpComputation); + opBuilder.setAttr("table_name", tableName); + if (options != null) { + for (Options opts : options) { + if (opts.clipWeightMin != null) { + opBuilder.setAttr("clip_weight_min", opts.clipWeightMin); + } + if (opts.clipWeightMax != null) { + opBuilder.setAttr("clip_weight_max", opts.clipWeightMax); + } + if (opts.numSparsecoresPerDevice != null) { + opBuilder.setAttr("num_sparsecores_per_device", opts.numSparsecoresPerDevice); + } + } + } + return new XlaSparseDenseMatmulCustomCombinerOnTcGradWithFtrlAndCsrInput(opBuilder.build()); + } + + /** + * Sets the clipWeightMin option. + * + * @param clipWeightMin the clipWeightMin option + * @return this Options instance. + */ + public static Options clipWeightMin(Float clipWeightMin) { + return new Options().clipWeightMin(clipWeightMin); + } + + /** + * Sets the clipWeightMax option. + * + * @param clipWeightMax the clipWeightMax option + * @return this Options instance. + */ + public static Options clipWeightMax(Float clipWeightMax) { + return new Options().clipWeightMax(clipWeightMax); + } + + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public static Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + return new Options().numSparsecoresPerDevice(numSparsecoresPerDevice); + } + + /** + * Gets updatedEmbeddingTable. + * + * @return updatedEmbeddingTable. + */ + public Output updatedEmbeddingTable() { + return updatedEmbeddingTable; + } + + /** + * Gets updatedAccumulator. + * + * @return updatedAccumulator. + */ + public Output updatedAccumulator() { + return updatedAccumulator; + } + + /** + * Gets updatedLinear. + * + * @return updatedLinear. + */ + public Output updatedLinear() { + return updatedLinear; + } + + /** + * Gets updatedWeights. + * + * @return updatedWeights. + */ + public Output updatedWeights() { + return updatedWeights; + } + + /** + * Optional attributes for {@link org.tensorflow.op.xla.XlaSparseDenseMatmulCustomCombinerOnTcGradWithFtrlAndCsrInput} + */ + public static class Options { + private Float clipWeightMin; + + private Float clipWeightMax; + + private Long numSparsecoresPerDevice; + + private Options() { + } + + /** + * Sets the clipWeightMin option. + * + * @param clipWeightMin the clipWeightMin option + * @return this Options instance. + */ + public Options clipWeightMin(Float clipWeightMin) { + this.clipWeightMin = clipWeightMin; + return this; + } + + /** + * Sets the clipWeightMax option. + * + * @param clipWeightMax the clipWeightMax option + * @return this Options instance. + */ + public Options clipWeightMax(Float clipWeightMax) { + this.clipWeightMax = clipWeightMax; + return this; + } + + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + this.numSparsecoresPerDevice = numSparsecoresPerDevice; + return this; + } + } + + @OpInputsMetadata( + outputsClass = XlaSparseDenseMatmulCustomCombinerOnTcGradWithFtrlAndCsrInput.class + ) + public static class Inputs extends RawOpInputs { + /** + * The rowPointers input + */ + public final Operand rowPointers; + + /** + * The sortedSampleIds input + */ + public final Operand sortedSampleIds; + + /** + * The sortedTokenIds input + */ + public final Operand sortedTokenIds; + + /** + * The sortedPosIds input + */ + public final Operand sortedPosIds; + + /** + * The sortedGains input + */ + public final Operand sortedGains; + + /** + * The weights input + */ + public final Operand weights; + + /** + * The preservedValencies input + */ + public final Operand preservedValencies; + + /** + * The preservedVectors input + */ + public final Operand preservedVectors; + + /** + * The preservedWeights input + */ + public final Operand preservedWeights; + + /** + * The activationGradients input + */ + public final Operand activationGradients; + + /** + * The learningRate input + */ + public final Operand learningRate; + + /** + * The combinerWeightsLearningRate input + */ + public final Operand combinerWeightsLearningRate; + + /** + * The embeddingTable input + */ + public final Operand embeddingTable; + + /** + * The accumulator input + */ + public final Operand accumulator; + + /** + * The linear input + */ + public final Operand linear; + + /** + * The multiplyLinearByLearningRate attribute + */ + public final boolean multiplyLinearByLearningRate; + + /** + * The beta attribute + */ + public final float beta; + + /** + * The learningRatePower attribute + */ + public final float learningRatePower; + + /** + * The l1RegularizationStrength attribute + */ + public final float l1RegularizationStrength; + + /** + * The l2RegularizationStrength attribute + */ + public final float l2RegularizationStrength; + + /** + * The clipWeightMin attribute + */ + public final float clipWeightMin; + + /** + * The clipWeightMax attribute + */ + public final float clipWeightMax; + + /** + * The maxValency attribute + */ + public final long maxValency; + + /** + * The numWeights attribute + */ + public final long numWeights; + + /** + * The tableName attribute + */ + public final String tableName; + + /** + * The numSparsecoresPerDevice attribute + */ + public final long numSparsecoresPerDevice; + + public Inputs(GraphOperation op) { + super(new XlaSparseDenseMatmulCustomCombinerOnTcGradWithFtrlAndCsrInput(op), op, Arrays.asList("multiply_linear_by_learning_rate", "beta", "learning_rate_power", "l1_regularization_strength", "l2_regularization_strength", "clip_weight_min", "clip_weight_max", "max_valency", "num_weights", "table_name", "num_sparsecores_per_device")); + int inputIndex = 0; + rowPointers = (Operand) op.input(inputIndex++); + sortedSampleIds = (Operand) op.input(inputIndex++); + sortedTokenIds = (Operand) op.input(inputIndex++); + sortedPosIds = (Operand) op.input(inputIndex++); + sortedGains = (Operand) op.input(inputIndex++); + weights = (Operand) op.input(inputIndex++); + preservedValencies = (Operand) op.input(inputIndex++); + preservedVectors = (Operand) op.input(inputIndex++); + preservedWeights = (Operand) op.input(inputIndex++); + activationGradients = (Operand) op.input(inputIndex++); + learningRate = (Operand) op.input(inputIndex++); + combinerWeightsLearningRate = (Operand) op.input(inputIndex++); + embeddingTable = (Operand) op.input(inputIndex++); + accumulator = (Operand) op.input(inputIndex++); + linear = (Operand) op.input(inputIndex++); + multiplyLinearByLearningRate = op.attributes().getAttrBool("multiply_linear_by_learning_rate"); + beta = op.attributes().getAttrFloat("beta"); + learningRatePower = op.attributes().getAttrFloat("learning_rate_power"); + l1RegularizationStrength = op.attributes().getAttrFloat("l1_regularization_strength"); + l2RegularizationStrength = op.attributes().getAttrFloat("l2_regularization_strength"); + clipWeightMin = op.attributes().getAttrFloat("clip_weight_min"); + clipWeightMax = op.attributes().getAttrFloat("clip_weight_max"); + maxValency = op.attributes().getAttrInt("max_valency"); + numWeights = op.attributes().getAttrInt("num_weights"); + tableName = op.attributes().getAttrString("table_name"); + numSparsecoresPerDevice = op.attributes().getAttrInt("num_sparsecores_per_device"); + } + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulCustomCombinerOnTcGradWithSgdAndCsrInput.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulCustomCombinerOnTcGradWithSgdAndCsrInput.java new file mode 100644 index 00000000000..1dfa617f3c9 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulCustomCombinerOnTcGradWithSgdAndCsrInput.java @@ -0,0 +1,350 @@ +/* Copyright 2018-2023 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ + +// This class has been generated, DO NOT EDIT! + +package org.tensorflow.op.xla; + +import java.util.Arrays; +import org.tensorflow.ConcreteFunction; +import org.tensorflow.GraphOperation; +import org.tensorflow.Operand; +import org.tensorflow.Operation; +import org.tensorflow.OperationBuilder; +import org.tensorflow.Output; +import org.tensorflow.op.RawOp; +import org.tensorflow.op.RawOpInputs; +import org.tensorflow.op.Scope; +import org.tensorflow.op.annotation.Endpoint; +import org.tensorflow.op.annotation.OpInputsMetadata; +import org.tensorflow.op.annotation.OpMetadata; +import org.tensorflow.types.TFloat32; +import org.tensorflow.types.TInt32; + +/** + * The XlaSparseDenseMatmulCustomCombinerOnTcGradWithSgdAndCsrInput operation + */ +@OpMetadata( + opType = XlaSparseDenseMatmulCustomCombinerOnTcGradWithSgdAndCsrInput.OP_NAME, + inputsClass = XlaSparseDenseMatmulCustomCombinerOnTcGradWithSgdAndCsrInput.Inputs.class +) +public final class XlaSparseDenseMatmulCustomCombinerOnTcGradWithSgdAndCsrInput extends RawOp { + /** + * The name of this op, as known by TensorFlow core engine + */ + public static final String OP_NAME = "XlaSparseDenseMatmulCustomCombinerOnTcGradWithSgdAndCsrInput"; + + private Output updatedEmbeddingTable; + + private Output updatedWeights; + + public XlaSparseDenseMatmulCustomCombinerOnTcGradWithSgdAndCsrInput(Operation operation) { + super(operation, OP_NAME); + int outputIdx = 0; + updatedEmbeddingTable = operation.output(outputIdx++); + updatedWeights = operation.output(outputIdx++); + } + + /** + * Factory method to create a class wrapping a new XlaSparseDenseMatmulCustomCombinerOnTcGradWithSgdAndCsrInput operation. + * + * @param scope current scope + * @param rowPointers The rowPointers value + * @param sortedSampleIds The sortedSampleIds value + * @param sortedTokenIds The sortedTokenIds value + * @param sortedPosIds The sortedPosIds value + * @param sortedGains The sortedGains value + * @param weights The weights value + * @param preservedValencies The preservedValencies value + * @param preservedVectors The preservedVectors value + * @param preservedWeights The preservedWeights value + * @param activationGradients The activationGradients value + * @param learningRate The learningRate value + * @param combinerWeightsLearningRate The combinerWeightsLearningRate value + * @param embeddingTable The embeddingTable value + * @param maxValency The value of the maxValency attribute + * @param numWeights The value of the numWeights attribute + * @param combinerTableVjpComputation The value of the combinerTableVjpComputation attribute + * @param combinerWeightsVjpComputation The value of the combinerWeightsVjpComputation attribute + * @param tableName The value of the tableName attribute + * @param options carries optional attribute values + * @return a new instance of XlaSparseDenseMatmulCustomCombinerOnTcGradWithSgdAndCsrInput + */ + @Endpoint( + describeByClass = true + ) + public static XlaSparseDenseMatmulCustomCombinerOnTcGradWithSgdAndCsrInput create(Scope scope, + Operand rowPointers, Operand sortedSampleIds, Operand sortedTokenIds, + Operand sortedPosIds, Operand sortedGains, Operand weights, + Operand preservedValencies, Operand preservedVectors, + Operand preservedWeights, Operand activationGradients, + Operand learningRate, Operand combinerWeightsLearningRate, + Operand embeddingTable, Long maxValency, Long numWeights, + ConcreteFunction combinerTableVjpComputation, ConcreteFunction combinerWeightsVjpComputation, + String tableName, Options... options) { + OperationBuilder opBuilder = scope.opBuilder(OP_NAME, "XlaSparseDenseMatmulCustomCombinerOnTcGradWithSgdAndCsrInput"); + opBuilder.addInput(rowPointers.asOutput()); + opBuilder.addInput(sortedSampleIds.asOutput()); + opBuilder.addInput(sortedTokenIds.asOutput()); + opBuilder.addInput(sortedPosIds.asOutput()); + opBuilder.addInput(sortedGains.asOutput()); + opBuilder.addInput(weights.asOutput()); + opBuilder.addInput(preservedValencies.asOutput()); + opBuilder.addInput(preservedVectors.asOutput()); + opBuilder.addInput(preservedWeights.asOutput()); + opBuilder.addInput(activationGradients.asOutput()); + opBuilder.addInput(learningRate.asOutput()); + opBuilder.addInput(combinerWeightsLearningRate.asOutput()); + opBuilder.addInput(embeddingTable.asOutput()); + opBuilder.setAttr("max_valency", maxValency); + opBuilder.setAttr("num_weights", numWeights); + opBuilder.setAttr("combiner_table_vjp_computation", combinerTableVjpComputation); + opBuilder.setAttr("combiner_weights_vjp_computation", combinerWeightsVjpComputation); + opBuilder.setAttr("table_name", tableName); + if (options != null) { + for (Options opts : options) { + if (opts.clipWeightMin != null) { + opBuilder.setAttr("clip_weight_min", opts.clipWeightMin); + } + if (opts.clipWeightMax != null) { + opBuilder.setAttr("clip_weight_max", opts.clipWeightMax); + } + if (opts.numSparsecoresPerDevice != null) { + opBuilder.setAttr("num_sparsecores_per_device", opts.numSparsecoresPerDevice); + } + } + } + return new XlaSparseDenseMatmulCustomCombinerOnTcGradWithSgdAndCsrInput(opBuilder.build()); + } + + /** + * Sets the clipWeightMin option. + * + * @param clipWeightMin the clipWeightMin option + * @return this Options instance. + */ + public static Options clipWeightMin(Float clipWeightMin) { + return new Options().clipWeightMin(clipWeightMin); + } + + /** + * Sets the clipWeightMax option. + * + * @param clipWeightMax the clipWeightMax option + * @return this Options instance. + */ + public static Options clipWeightMax(Float clipWeightMax) { + return new Options().clipWeightMax(clipWeightMax); + } + + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public static Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + return new Options().numSparsecoresPerDevice(numSparsecoresPerDevice); + } + + /** + * Gets updatedEmbeddingTable. + * + * @return updatedEmbeddingTable. + */ + public Output updatedEmbeddingTable() { + return updatedEmbeddingTable; + } + + /** + * Gets updatedWeights. + * + * @return updatedWeights. + */ + public Output updatedWeights() { + return updatedWeights; + } + + /** + * Optional attributes for {@link org.tensorflow.op.xla.XlaSparseDenseMatmulCustomCombinerOnTcGradWithSgdAndCsrInput} + */ + public static class Options { + private Float clipWeightMin; + + private Float clipWeightMax; + + private Long numSparsecoresPerDevice; + + private Options() { + } + + /** + * Sets the clipWeightMin option. + * + * @param clipWeightMin the clipWeightMin option + * @return this Options instance. + */ + public Options clipWeightMin(Float clipWeightMin) { + this.clipWeightMin = clipWeightMin; + return this; + } + + /** + * Sets the clipWeightMax option. + * + * @param clipWeightMax the clipWeightMax option + * @return this Options instance. + */ + public Options clipWeightMax(Float clipWeightMax) { + this.clipWeightMax = clipWeightMax; + return this; + } + + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + this.numSparsecoresPerDevice = numSparsecoresPerDevice; + return this; + } + } + + @OpInputsMetadata( + outputsClass = XlaSparseDenseMatmulCustomCombinerOnTcGradWithSgdAndCsrInput.class + ) + public static class Inputs extends RawOpInputs { + /** + * The rowPointers input + */ + public final Operand rowPointers; + + /** + * The sortedSampleIds input + */ + public final Operand sortedSampleIds; + + /** + * The sortedTokenIds input + */ + public final Operand sortedTokenIds; + + /** + * The sortedPosIds input + */ + public final Operand sortedPosIds; + + /** + * The sortedGains input + */ + public final Operand sortedGains; + + /** + * The weights input + */ + public final Operand weights; + + /** + * The preservedValencies input + */ + public final Operand preservedValencies; + + /** + * The preservedVectors input + */ + public final Operand preservedVectors; + + /** + * The preservedWeights input + */ + public final Operand preservedWeights; + + /** + * The activationGradients input + */ + public final Operand activationGradients; + + /** + * The learningRate input + */ + public final Operand learningRate; + + /** + * The combinerWeightsLearningRate input + */ + public final Operand combinerWeightsLearningRate; + + /** + * The embeddingTable input + */ + public final Operand embeddingTable; + + /** + * The clipWeightMin attribute + */ + public final float clipWeightMin; + + /** + * The clipWeightMax attribute + */ + public final float clipWeightMax; + + /** + * The maxValency attribute + */ + public final long maxValency; + + /** + * The numWeights attribute + */ + public final long numWeights; + + /** + * The tableName attribute + */ + public final String tableName; + + /** + * The numSparsecoresPerDevice attribute + */ + public final long numSparsecoresPerDevice; + + public Inputs(GraphOperation op) { + super(new XlaSparseDenseMatmulCustomCombinerOnTcGradWithSgdAndCsrInput(op), op, Arrays.asList("clip_weight_min", "clip_weight_max", "max_valency", "num_weights", "table_name", "num_sparsecores_per_device")); + int inputIndex = 0; + rowPointers = (Operand) op.input(inputIndex++); + sortedSampleIds = (Operand) op.input(inputIndex++); + sortedTokenIds = (Operand) op.input(inputIndex++); + sortedPosIds = (Operand) op.input(inputIndex++); + sortedGains = (Operand) op.input(inputIndex++); + weights = (Operand) op.input(inputIndex++); + preservedValencies = (Operand) op.input(inputIndex++); + preservedVectors = (Operand) op.input(inputIndex++); + preservedWeights = (Operand) op.input(inputIndex++); + activationGradients = (Operand) op.input(inputIndex++); + learningRate = (Operand) op.input(inputIndex++); + combinerWeightsLearningRate = (Operand) op.input(inputIndex++); + embeddingTable = (Operand) op.input(inputIndex++); + clipWeightMin = op.attributes().getAttrFloat("clip_weight_min"); + clipWeightMax = op.attributes().getAttrFloat("clip_weight_max"); + maxValency = op.attributes().getAttrInt("max_valency"); + numWeights = op.attributes().getAttrInt("num_weights"); + tableName = op.attributes().getAttrString("table_name"); + numSparsecoresPerDevice = op.attributes().getAttrInt("num_sparsecores_per_device"); + } + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulCustomCombinerOnTcWithCsrInput.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulCustomCombinerOnTcWithCsrInput.java new file mode 100644 index 00000000000..37e9bbd0380 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulCustomCombinerOnTcWithCsrInput.java @@ -0,0 +1,278 @@ +/* Copyright 2018-2023 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ + +// This class has been generated, DO NOT EDIT! + +package org.tensorflow.op.xla; + +import java.util.Arrays; +import org.tensorflow.ConcreteFunction; +import org.tensorflow.GraphOperation; +import org.tensorflow.Operand; +import org.tensorflow.Operation; +import org.tensorflow.OperationBuilder; +import org.tensorflow.Output; +import org.tensorflow.op.RawOp; +import org.tensorflow.op.RawOpInputs; +import org.tensorflow.op.Scope; +import org.tensorflow.op.annotation.Endpoint; +import org.tensorflow.op.annotation.OpInputsMetadata; +import org.tensorflow.op.annotation.OpMetadata; +import org.tensorflow.types.TFloat32; +import org.tensorflow.types.TInt32; + +/** + * The XlaSparseDenseMatmulCustomCombinerOnTcWithCsrInput operation + */ +@OpMetadata( + opType = XlaSparseDenseMatmulCustomCombinerOnTcWithCsrInput.OP_NAME, + inputsClass = XlaSparseDenseMatmulCustomCombinerOnTcWithCsrInput.Inputs.class +) +public final class XlaSparseDenseMatmulCustomCombinerOnTcWithCsrInput extends RawOp { + /** + * The name of this op, as known by TensorFlow core engine + */ + public static final String OP_NAME = "XlaSparseDenseMatmulCustomCombinerOnTcWithCsrInput"; + + private Output activations; + + private Output preservedValencies; + + private Output preservedVectors; + + public XlaSparseDenseMatmulCustomCombinerOnTcWithCsrInput(Operation operation) { + super(operation, OP_NAME); + int outputIdx = 0; + activations = operation.output(outputIdx++); + preservedValencies = operation.output(outputIdx++); + preservedVectors = operation.output(outputIdx++); + } + + /** + * Factory method to create a class wrapping a new XlaSparseDenseMatmulCustomCombinerOnTcWithCsrInput operation. + * + * @param scope current scope + * @param rowPointers The rowPointers value + * @param sortedSampleIds The sortedSampleIds value + * @param sortedTokenIds The sortedTokenIds value + * @param sortedPosIds The sortedPosIds value + * @param sortedGains The sortedGains value + * @param embeddingTable The embeddingTable value + * @param weights The weights value + * @param inputSize The value of the inputSize attribute + * @param maxValency The value of the maxValency attribute + * @param numWeights The value of the numWeights attribute + * @param combinerComputation The value of the combinerComputation attribute + * @param quantizationConfigLow The value of the quantizationConfigLow attribute + * @param quantizationConfigHigh The value of the quantizationConfigHigh attribute + * @param quantizationConfigNumBuckets The value of the quantizationConfigNumBuckets attribute + * @param tableName The value of the tableName attribute + * @param options carries optional attribute values + * @return a new instance of XlaSparseDenseMatmulCustomCombinerOnTcWithCsrInput + */ + @Endpoint( + describeByClass = true + ) + public static XlaSparseDenseMatmulCustomCombinerOnTcWithCsrInput create(Scope scope, + Operand rowPointers, Operand sortedSampleIds, Operand sortedTokenIds, + Operand sortedPosIds, Operand sortedGains, Operand embeddingTable, + Operand weights, Long inputSize, Long maxValency, Long numWeights, + ConcreteFunction combinerComputation, Float quantizationConfigLow, + Float quantizationConfigHigh, Long quantizationConfigNumBuckets, String tableName, + Options... options) { + OperationBuilder opBuilder = scope.opBuilder(OP_NAME, "XlaSparseDenseMatmulCustomCombinerOnTcWithCsrInput"); + opBuilder.addInput(rowPointers.asOutput()); + opBuilder.addInput(sortedSampleIds.asOutput()); + opBuilder.addInput(sortedTokenIds.asOutput()); + opBuilder.addInput(sortedPosIds.asOutput()); + opBuilder.addInput(sortedGains.asOutput()); + opBuilder.addInput(embeddingTable.asOutput()); + opBuilder.addInput(weights.asOutput()); + opBuilder.setAttr("input_size", inputSize); + opBuilder.setAttr("max_valency", maxValency); + opBuilder.setAttr("num_weights", numWeights); + opBuilder.setAttr("combiner_computation", combinerComputation); + opBuilder.setAttr("quantization_config_low", quantizationConfigLow); + opBuilder.setAttr("quantization_config_high", quantizationConfigHigh); + opBuilder.setAttr("quantization_config_num_buckets", quantizationConfigNumBuckets); + opBuilder.setAttr("table_name", tableName); + if (options != null) { + for (Options opts : options) { + if (opts.numSparsecoresPerDevice != null) { + opBuilder.setAttr("num_sparsecores_per_device", opts.numSparsecoresPerDevice); + } + } + } + return new XlaSparseDenseMatmulCustomCombinerOnTcWithCsrInput(opBuilder.build()); + } + + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public static Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + return new Options().numSparsecoresPerDevice(numSparsecoresPerDevice); + } + + /** + * Gets activations. + * + * @return activations. + */ + public Output activations() { + return activations; + } + + /** + * Gets preservedValencies. + * + * @return preservedValencies. + */ + public Output preservedValencies() { + return preservedValencies; + } + + /** + * Gets preservedVectors. + * + * @return preservedVectors. + */ + public Output preservedVectors() { + return preservedVectors; + } + + /** + * Optional attributes for {@link org.tensorflow.op.xla.XlaSparseDenseMatmulCustomCombinerOnTcWithCsrInput} + */ + public static class Options { + private Long numSparsecoresPerDevice; + + private Options() { + } + + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + this.numSparsecoresPerDevice = numSparsecoresPerDevice; + return this; + } + } + + @OpInputsMetadata( + outputsClass = XlaSparseDenseMatmulCustomCombinerOnTcWithCsrInput.class + ) + public static class Inputs extends RawOpInputs { + /** + * The rowPointers input + */ + public final Operand rowPointers; + + /** + * The sortedSampleIds input + */ + public final Operand sortedSampleIds; + + /** + * The sortedTokenIds input + */ + public final Operand sortedTokenIds; + + /** + * The sortedPosIds input + */ + public final Operand sortedPosIds; + + /** + * The sortedGains input + */ + public final Operand sortedGains; + + /** + * The embeddingTable input + */ + public final Operand embeddingTable; + + /** + * The weights input + */ + public final Operand weights; + + /** + * The inputSize attribute + */ + public final long inputSize; + + /** + * The maxValency attribute + */ + public final long maxValency; + + /** + * The numWeights attribute + */ + public final long numWeights; + + /** + * The quantizationConfigLow attribute + */ + public final float quantizationConfigLow; + + /** + * The quantizationConfigHigh attribute + */ + public final float quantizationConfigHigh; + + /** + * The quantizationConfigNumBuckets attribute + */ + public final long quantizationConfigNumBuckets; + + /** + * The tableName attribute + */ + public final String tableName; + + /** + * The numSparsecoresPerDevice attribute + */ + public final long numSparsecoresPerDevice; + + public Inputs(GraphOperation op) { + super(new XlaSparseDenseMatmulCustomCombinerOnTcWithCsrInput(op), op, Arrays.asList("input_size", "max_valency", "num_weights", "quantization_config_low", "quantization_config_high", "quantization_config_num_buckets", "table_name", "num_sparsecores_per_device")); + int inputIndex = 0; + rowPointers = (Operand) op.input(inputIndex++); + sortedSampleIds = (Operand) op.input(inputIndex++); + sortedTokenIds = (Operand) op.input(inputIndex++); + sortedPosIds = (Operand) op.input(inputIndex++); + sortedGains = (Operand) op.input(inputIndex++); + embeddingTable = (Operand) op.input(inputIndex++); + weights = (Operand) op.input(inputIndex++); + inputSize = op.attributes().getAttrInt("input_size"); + maxValency = op.attributes().getAttrInt("max_valency"); + numWeights = op.attributes().getAttrInt("num_weights"); + quantizationConfigLow = op.attributes().getAttrFloat("quantization_config_low"); + quantizationConfigHigh = op.attributes().getAttrFloat("quantization_config_high"); + quantizationConfigNumBuckets = op.attributes().getAttrInt("quantization_config_num_buckets"); + tableName = op.attributes().getAttrString("table_name"); + numSparsecoresPerDevice = op.attributes().getAttrInt("num_sparsecores_per_device"); + } + } +} diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithAdagradAndCsrInput.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithAdagradAndCsrInput.java index b63cba97719..0f71b62bc15 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithAdagradAndCsrInput.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithAdagradAndCsrInput.java @@ -105,6 +105,9 @@ public static XlaSparseDenseMatmulGradWithAdagradAndCsrInput create(Scope scope, if (opts.clipWeightMax != null) { opBuilder.setAttr("clip_weight_max", opts.clipWeightMax); } + if (opts.numSparsecoresPerDevice != null) { + opBuilder.setAttr("num_sparsecores_per_device", opts.numSparsecoresPerDevice); + } } } return new XlaSparseDenseMatmulGradWithAdagradAndCsrInput(opBuilder.build()); @@ -130,6 +133,16 @@ public static Options clipWeightMax(Float clipWeightMax) { return new Options().clipWeightMax(clipWeightMax); } + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public static Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + return new Options().numSparsecoresPerDevice(numSparsecoresPerDevice); + } + /** * Gets updatedEmbeddingTable. * @@ -156,6 +169,8 @@ public static class Options { private Float clipWeightMax; + private Long numSparsecoresPerDevice; + private Options() { } @@ -180,6 +195,17 @@ public Options clipWeightMax(Float clipWeightMax) { this.clipWeightMax = clipWeightMax; return this; } + + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + this.numSparsecoresPerDevice = numSparsecoresPerDevice; + return this; + } } @OpInputsMetadata( @@ -246,8 +272,13 @@ public static class Inputs extends RawOpInputs) op.input(inputIndex++); sortedSampleIds = (Operand) op.input(inputIndex++); @@ -261,6 +292,7 @@ public Inputs(GraphOperation op) { clipWeightMin = op.attributes().getAttrFloat("clip_weight_min"); clipWeightMax = op.attributes().getAttrFloat("clip_weight_max"); tableName = op.attributes().getAttrString("table_name"); + numSparsecoresPerDevice = op.attributes().getAttrInt("num_sparsecores_per_device"); } } } diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithAdagradAndStaticBufferSize.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithAdagradAndStaticBufferSize.java index f8ab65a6ee1..6a04212720a 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithAdagradAndStaticBufferSize.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithAdagradAndStaticBufferSize.java @@ -106,6 +106,9 @@ public static XlaSparseDenseMatmulGradWithAdagradAndStaticBufferSize create(Scop if (opts.clipWeightMax != null) { opBuilder.setAttr("clip_weight_max", opts.clipWeightMax); } + if (opts.numSparsecoresPerDevice != null) { + opBuilder.setAttr("num_sparsecores_per_device", opts.numSparsecoresPerDevice); + } } } return new XlaSparseDenseMatmulGradWithAdagradAndStaticBufferSize(opBuilder.build()); @@ -131,6 +134,16 @@ public static Options clipWeightMax(Float clipWeightMax) { return new Options().clipWeightMax(clipWeightMax); } + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public static Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + return new Options().numSparsecoresPerDevice(numSparsecoresPerDevice); + } + /** * Gets updatedEmbeddingTable. * @@ -157,6 +170,8 @@ public static class Options { private Float clipWeightMax; + private Long numSparsecoresPerDevice; + private Options() { } @@ -181,6 +196,17 @@ public Options clipWeightMax(Float clipWeightMax) { this.clipWeightMax = clipWeightMax; return this; } + + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + this.numSparsecoresPerDevice = numSparsecoresPerDevice; + return this; + } } @OpInputsMetadata( @@ -257,8 +283,13 @@ public static class Inputs extends RawOpInputs) op.input(inputIndex++); sortedSampleIds = (Operand) op.input(inputIndex++); @@ -274,6 +305,7 @@ public Inputs(GraphOperation op) { maxIdsPerSparseCore = op.attributes().getAttrInt("max_ids_per_sparse_core"); maxUniqueIdsPerSparseCore = op.attributes().getAttrInt("max_unique_ids_per_sparse_core"); tableName = op.attributes().getAttrString("table_name"); + numSparsecoresPerDevice = op.attributes().getAttrInt("num_sparsecores_per_device"); } } } diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithAdagradMomentumAndCsrInput.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithAdagradMomentumAndCsrInput.java index faa117af196..d9edff0a5ee 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithAdagradMomentumAndCsrInput.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithAdagradMomentumAndCsrInput.java @@ -121,6 +121,9 @@ public static XlaSparseDenseMatmulGradWithAdagradMomentumAndCsrInput create(Scop if (opts.clipWeightMax != null) { opBuilder.setAttr("clip_weight_max", opts.clipWeightMax); } + if (opts.numSparsecoresPerDevice != null) { + opBuilder.setAttr("num_sparsecores_per_device", opts.numSparsecoresPerDevice); + } } } return new XlaSparseDenseMatmulGradWithAdagradMomentumAndCsrInput(opBuilder.build()); @@ -146,6 +149,16 @@ public static Options clipWeightMax(Float clipWeightMax) { return new Options().clipWeightMax(clipWeightMax); } + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public static Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + return new Options().numSparsecoresPerDevice(numSparsecoresPerDevice); + } + /** * Gets updatedEmbeddingTable. * @@ -181,6 +194,8 @@ public static class Options { private Float clipWeightMax; + private Long numSparsecoresPerDevice; + private Options() { } @@ -205,6 +220,17 @@ public Options clipWeightMax(Float clipWeightMax) { this.clipWeightMax = clipWeightMax; return this; } + + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + this.numSparsecoresPerDevice = numSparsecoresPerDevice; + return this; + } } @OpInputsMetadata( @@ -301,8 +327,13 @@ public static class Inputs extends RawOpInputs) op.input(inputIndex++); sortedSampleIds = (Operand) op.input(inputIndex++); @@ -322,6 +353,7 @@ public Inputs(GraphOperation op) { clipWeightMin = op.attributes().getAttrFloat("clip_weight_min"); clipWeightMax = op.attributes().getAttrFloat("clip_weight_max"); tableName = op.attributes().getAttrString("table_name"); + numSparsecoresPerDevice = op.attributes().getAttrInt("num_sparsecores_per_device"); } } } diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithAdagradMomentumAndStaticBufferSize.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithAdagradMomentumAndStaticBufferSize.java index e007641d72a..285b2c84a1f 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithAdagradMomentumAndStaticBufferSize.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithAdagradMomentumAndStaticBufferSize.java @@ -122,6 +122,9 @@ public static XlaSparseDenseMatmulGradWithAdagradMomentumAndStaticBufferSize cre if (opts.clipWeightMax != null) { opBuilder.setAttr("clip_weight_max", opts.clipWeightMax); } + if (opts.numSparsecoresPerDevice != null) { + opBuilder.setAttr("num_sparsecores_per_device", opts.numSparsecoresPerDevice); + } } } return new XlaSparseDenseMatmulGradWithAdagradMomentumAndStaticBufferSize(opBuilder.build()); @@ -147,6 +150,16 @@ public static Options clipWeightMax(Float clipWeightMax) { return new Options().clipWeightMax(clipWeightMax); } + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public static Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + return new Options().numSparsecoresPerDevice(numSparsecoresPerDevice); + } + /** * Gets updatedEmbeddingTable. * @@ -182,6 +195,8 @@ public static class Options { private Float clipWeightMax; + private Long numSparsecoresPerDevice; + private Options() { } @@ -206,6 +221,17 @@ public Options clipWeightMax(Float clipWeightMax) { this.clipWeightMax = clipWeightMax; return this; } + + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + this.numSparsecoresPerDevice = numSparsecoresPerDevice; + return this; + } } @OpInputsMetadata( @@ -312,8 +338,13 @@ public static class Inputs extends RawOpInputs) op.input(inputIndex++); sortedSampleIds = (Operand) op.input(inputIndex++); @@ -335,6 +366,7 @@ public Inputs(GraphOperation op) { maxIdsPerSparseCore = op.attributes().getAttrInt("max_ids_per_sparse_core"); maxUniqueIdsPerSparseCore = op.attributes().getAttrInt("max_unique_ids_per_sparse_core"); tableName = op.attributes().getAttrString("table_name"); + numSparsecoresPerDevice = op.attributes().getAttrInt("num_sparsecores_per_device"); } } } diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithAdamAndCsrInput.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithAdamAndCsrInput.java index a39190054b3..d7a5b8e6765 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithAdamAndCsrInput.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithAdamAndCsrInput.java @@ -119,6 +119,9 @@ public static XlaSparseDenseMatmulGradWithAdamAndCsrInput create(Scope scope, if (opts.clipWeightMax != null) { opBuilder.setAttr("clip_weight_max", opts.clipWeightMax); } + if (opts.numSparsecoresPerDevice != null) { + opBuilder.setAttr("num_sparsecores_per_device", opts.numSparsecoresPerDevice); + } } } return new XlaSparseDenseMatmulGradWithAdamAndCsrInput(opBuilder.build()); @@ -144,6 +147,16 @@ public static Options clipWeightMax(Float clipWeightMax) { return new Options().clipWeightMax(clipWeightMax); } + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public static Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + return new Options().numSparsecoresPerDevice(numSparsecoresPerDevice); + } + /** * Gets updatedEmbeddingTable. * @@ -179,6 +192,8 @@ public static class Options { private Float clipWeightMax; + private Long numSparsecoresPerDevice; + private Options() { } @@ -203,6 +218,17 @@ public Options clipWeightMax(Float clipWeightMax) { this.clipWeightMax = clipWeightMax; return this; } + + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + this.numSparsecoresPerDevice = numSparsecoresPerDevice; + return this; + } } @OpInputsMetadata( @@ -294,8 +320,13 @@ public static class Inputs extends RawOpInputs) op.input(inputIndex++); sortedSampleIds = (Operand) op.input(inputIndex++); @@ -314,6 +345,7 @@ public Inputs(GraphOperation op) { clipWeightMin = op.attributes().getAttrFloat("clip_weight_min"); clipWeightMax = op.attributes().getAttrFloat("clip_weight_max"); tableName = op.attributes().getAttrString("table_name"); + numSparsecoresPerDevice = op.attributes().getAttrInt("num_sparsecores_per_device"); } } } diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithAdamAndStaticBufferSize.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithAdamAndStaticBufferSize.java index fe875c67f69..8f4ada3dd4a 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithAdamAndStaticBufferSize.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithAdamAndStaticBufferSize.java @@ -119,6 +119,9 @@ public static XlaSparseDenseMatmulGradWithAdamAndStaticBufferSize create(Scope s if (opts.clipWeightMax != null) { opBuilder.setAttr("clip_weight_max", opts.clipWeightMax); } + if (opts.numSparsecoresPerDevice != null) { + opBuilder.setAttr("num_sparsecores_per_device", opts.numSparsecoresPerDevice); + } } } return new XlaSparseDenseMatmulGradWithAdamAndStaticBufferSize(opBuilder.build()); @@ -144,6 +147,16 @@ public static Options clipWeightMax(Float clipWeightMax) { return new Options().clipWeightMax(clipWeightMax); } + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public static Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + return new Options().numSparsecoresPerDevice(numSparsecoresPerDevice); + } + /** * Gets updatedEmbeddingTable. * @@ -179,6 +192,8 @@ public static class Options { private Float clipWeightMax; + private Long numSparsecoresPerDevice; + private Options() { } @@ -203,6 +218,17 @@ public Options clipWeightMax(Float clipWeightMax) { this.clipWeightMax = clipWeightMax; return this; } + + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + this.numSparsecoresPerDevice = numSparsecoresPerDevice; + return this; + } } @OpInputsMetadata( @@ -304,8 +330,13 @@ public static class Inputs extends RawOpInputs) op.input(inputIndex++); sortedSampleIds = (Operand) op.input(inputIndex++); @@ -326,6 +357,7 @@ public Inputs(GraphOperation op) { maxIdsPerSparseCore = op.attributes().getAttrInt("max_ids_per_sparse_core"); maxUniqueIdsPerSparseCore = op.attributes().getAttrInt("max_unique_ids_per_sparse_core"); tableName = op.attributes().getAttrString("table_name"); + numSparsecoresPerDevice = op.attributes().getAttrInt("num_sparsecores_per_device"); } } } diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithCsrInput.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithCsrInput.java index 7ac92263e93..0af99ae8dbf 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithCsrInput.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithCsrInput.java @@ -33,8 +33,10 @@ import org.tensorflow.op.annotation.Endpoint; import org.tensorflow.op.annotation.OpInputsMetadata; import org.tensorflow.op.annotation.OpMetadata; +import org.tensorflow.proto.DataType; import org.tensorflow.types.TFloat32; import org.tensorflow.types.TInt32; +import org.tensorflow.types.family.TNumber; /** * The XlaSparseDenseMatmulGradWithCsrInput operation @@ -43,20 +45,20 @@ opType = XlaSparseDenseMatmulGradWithCsrInput.OP_NAME, inputsClass = XlaSparseDenseMatmulGradWithCsrInput.Inputs.class ) -public final class XlaSparseDenseMatmulGradWithCsrInput extends RawOp implements Iterable> { +public final class XlaSparseDenseMatmulGradWithCsrInput extends RawOp implements Iterable> { /** * The name of this op, as known by TensorFlow core engine */ public static final String OP_NAME = "XlaSparseDenseMatmulGradWithCsrInput"; - private List> updatedTables; + private List> updatedTables; @SuppressWarnings("unchecked") public XlaSparseDenseMatmulGradWithCsrInput(Operation operation) { super(operation, OP_NAME); int outputIdx = 0; int updatedTablesLength = operation.outputListLength("updated_tables"); - updatedTables = Arrays.asList((Output[]) operation.outputList(outputIdx, updatedTablesLength)); + updatedTables = Arrays.asList((Output[]) operation.outputList(outputIdx, updatedTablesLength)); outputIdx += updatedTablesLength; } @@ -74,17 +76,19 @@ public XlaSparseDenseMatmulGradWithCsrInput(Operation operation) { * @param numMinibatchesPerPhysicalSparseCore The numMinibatchesPerPhysicalSparseCore value * @param customComputation The value of the customComputation attribute * @param tableName The value of the tableName attribute + * @param options carries optional attribute values + * @param data type for {@code XlaSparseDenseMatmulGradWithCsrInput} output and operands * @return a new instance of XlaSparseDenseMatmulGradWithCsrInput */ @Endpoint( describeByClass = true ) - public static XlaSparseDenseMatmulGradWithCsrInput create(Scope scope, + public static XlaSparseDenseMatmulGradWithCsrInput create(Scope scope, Operand rowPointers, Operand sortedSampleIds, Operand sortedTokenIds, Operand sortedGains, Operand activationGradients, - Iterable> tables, Iterable> hyperparameters, + Iterable> tables, Iterable> hyperparameters, Operand numMinibatchesPerPhysicalSparseCore, ConcreteFunction customComputation, - String tableName) { + String tableName, Options... options) { OperationBuilder opBuilder = scope.opBuilder(OP_NAME, "XlaSparseDenseMatmulGradWithCsrInput"); opBuilder.addInput(rowPointers.asOutput()); opBuilder.addInput(sortedSampleIds.asOutput()); @@ -96,7 +100,24 @@ public static XlaSparseDenseMatmulGradWithCsrInput create(Scope scope, opBuilder.addInput(numMinibatchesPerPhysicalSparseCore.asOutput()); opBuilder.setAttr("custom_computation", customComputation); opBuilder.setAttr("table_name", tableName); - return new XlaSparseDenseMatmulGradWithCsrInput(opBuilder.build()); + if (options != null) { + for (Options opts : options) { + if (opts.numSparsecoresPerDevice != null) { + opBuilder.setAttr("num_sparsecores_per_device", opts.numSparsecoresPerDevice); + } + } + } + return new XlaSparseDenseMatmulGradWithCsrInput<>(opBuilder.build()); + } + + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public static Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + return new Options().numSparsecoresPerDevice(numSparsecoresPerDevice); } /** @@ -104,20 +125,41 @@ public static XlaSparseDenseMatmulGradWithCsrInput create(Scope scope, * * @return updatedTables. */ - public List> updatedTables() { + public List> updatedTables() { return updatedTables; } @Override @SuppressWarnings({"rawtypes", "unchecked"}) - public Iterator> iterator() { + public Iterator> iterator() { return (Iterator) updatedTables.iterator(); } + /** + * Optional attributes for {@link org.tensorflow.op.xla.XlaSparseDenseMatmulGradWithCsrInput} + */ + public static class Options { + private Long numSparsecoresPerDevice; + + private Options() { + } + + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + this.numSparsecoresPerDevice = numSparsecoresPerDevice; + return this; + } + } + @OpInputsMetadata( outputsClass = XlaSparseDenseMatmulGradWithCsrInput.class ) - public static class Inputs extends RawOpInputs { + public static class Inputs extends RawOpInputs> { /** * The rowPointers input */ @@ -146,7 +188,7 @@ public static class Inputs extends RawOpInputs> tables; + public final Iterable> tables; /** * The hyperparameters input @@ -163,8 +205,18 @@ public static class Inputs extends RawOpInputs(op), op, Arrays.asList("table_name", "num_sparsecores_per_device", "T")); int inputIndex = 0; rowPointers = (Operand) op.input(inputIndex++); sortedSampleIds = (Operand) op.input(inputIndex++); @@ -172,13 +224,15 @@ public Inputs(GraphOperation op) { sortedGains = (Operand) op.input(inputIndex++); activationGradients = (Operand) op.input(inputIndex++); int tablesLength = op.inputListLength("tables"); - tables = Arrays.asList((Operand[]) op.inputList(inputIndex, tablesLength)); + tables = Arrays.asList((Operand[]) op.inputList(inputIndex, tablesLength)); inputIndex += tablesLength; int hyperparametersLength = op.inputListLength("hyperparameters"); hyperparameters = Arrays.asList((Operand[]) op.inputList(inputIndex, hyperparametersLength)); inputIndex += hyperparametersLength; numMinibatchesPerPhysicalSparseCore = (Operand) op.input(inputIndex++); tableName = op.attributes().getAttrString("table_name"); + numSparsecoresPerDevice = op.attributes().getAttrInt("num_sparsecores_per_device"); + T = op.attributes().getAttrType("T"); } } } diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithFtrlAndCsrInput.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithFtrlAndCsrInput.java index b8d005b7059..6dabad2682d 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithFtrlAndCsrInput.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithFtrlAndCsrInput.java @@ -122,6 +122,9 @@ public static XlaSparseDenseMatmulGradWithFtrlAndCsrInput create(Scope scope, if (opts.clipWeightMax != null) { opBuilder.setAttr("clip_weight_max", opts.clipWeightMax); } + if (opts.numSparsecoresPerDevice != null) { + opBuilder.setAttr("num_sparsecores_per_device", opts.numSparsecoresPerDevice); + } } } return new XlaSparseDenseMatmulGradWithFtrlAndCsrInput(opBuilder.build()); @@ -147,6 +150,16 @@ public static Options clipWeightMax(Float clipWeightMax) { return new Options().clipWeightMax(clipWeightMax); } + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public static Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + return new Options().numSparsecoresPerDevice(numSparsecoresPerDevice); + } + /** * Gets updatedEmbeddingTable. * @@ -182,6 +195,8 @@ public static class Options { private Float clipWeightMax; + private Long numSparsecoresPerDevice; + private Options() { } @@ -206,6 +221,17 @@ public Options clipWeightMax(Float clipWeightMax) { this.clipWeightMax = clipWeightMax; return this; } + + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + this.numSparsecoresPerDevice = numSparsecoresPerDevice; + return this; + } } @OpInputsMetadata( @@ -302,8 +328,13 @@ public static class Inputs extends RawOpInputs) op.input(inputIndex++); sortedSampleIds = (Operand) op.input(inputIndex++); @@ -323,6 +354,7 @@ public Inputs(GraphOperation op) { clipWeightMin = op.attributes().getAttrFloat("clip_weight_min"); clipWeightMax = op.attributes().getAttrFloat("clip_weight_max"); tableName = op.attributes().getAttrString("table_name"); + numSparsecoresPerDevice = op.attributes().getAttrInt("num_sparsecores_per_device"); } } } diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithFtrlAndStaticBufferSize.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithFtrlAndStaticBufferSize.java index 7bfa0c2cc45..604416fd7d3 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithFtrlAndStaticBufferSize.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithFtrlAndStaticBufferSize.java @@ -123,6 +123,9 @@ public static XlaSparseDenseMatmulGradWithFtrlAndStaticBufferSize create(Scope s if (opts.clipWeightMax != null) { opBuilder.setAttr("clip_weight_max", opts.clipWeightMax); } + if (opts.numSparsecoresPerDevice != null) { + opBuilder.setAttr("num_sparsecores_per_device", opts.numSparsecoresPerDevice); + } } } return new XlaSparseDenseMatmulGradWithFtrlAndStaticBufferSize(opBuilder.build()); @@ -148,6 +151,16 @@ public static Options clipWeightMax(Float clipWeightMax) { return new Options().clipWeightMax(clipWeightMax); } + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public static Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + return new Options().numSparsecoresPerDevice(numSparsecoresPerDevice); + } + /** * Gets updatedEmbeddingTable. * @@ -183,6 +196,8 @@ public static class Options { private Float clipWeightMax; + private Long numSparsecoresPerDevice; + private Options() { } @@ -207,6 +222,17 @@ public Options clipWeightMax(Float clipWeightMax) { this.clipWeightMax = clipWeightMax; return this; } + + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + this.numSparsecoresPerDevice = numSparsecoresPerDevice; + return this; + } } @OpInputsMetadata( @@ -313,8 +339,13 @@ public static class Inputs extends RawOpInputs) op.input(inputIndex++); sortedSampleIds = (Operand) op.input(inputIndex++); @@ -336,6 +367,7 @@ public Inputs(GraphOperation op) { maxIdsPerSparseCore = op.attributes().getAttrInt("max_ids_per_sparse_core"); maxUniqueIdsPerSparseCore = op.attributes().getAttrInt("max_unique_ids_per_sparse_core"); tableName = op.attributes().getAttrString("table_name"); + numSparsecoresPerDevice = op.attributes().getAttrInt("num_sparsecores_per_device"); } } } diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithSgdAndCsrInput.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithSgdAndCsrInput.java index bfb8a3a127f..5fdfa0a487d 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithSgdAndCsrInput.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithSgdAndCsrInput.java @@ -99,6 +99,9 @@ public static XlaSparseDenseMatmulGradWithSgdAndCsrInput create(Scope scope, if (opts.clipWeightMax != null) { opBuilder.setAttr("clip_weight_max", opts.clipWeightMax); } + if (opts.numSparsecoresPerDevice != null) { + opBuilder.setAttr("num_sparsecores_per_device", opts.numSparsecoresPerDevice); + } } } return new XlaSparseDenseMatmulGradWithSgdAndCsrInput(opBuilder.build()); @@ -124,6 +127,16 @@ public static Options clipWeightMax(Float clipWeightMax) { return new Options().clipWeightMax(clipWeightMax); } + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public static Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + return new Options().numSparsecoresPerDevice(numSparsecoresPerDevice); + } + /** * Gets updatedEmbeddingTable. * @@ -146,6 +159,8 @@ public static class Options { private Float clipWeightMax; + private Long numSparsecoresPerDevice; + private Options() { } @@ -170,6 +185,17 @@ public Options clipWeightMax(Float clipWeightMax) { this.clipWeightMax = clipWeightMax; return this; } + + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + this.numSparsecoresPerDevice = numSparsecoresPerDevice; + return this; + } } @OpInputsMetadata( @@ -231,8 +257,13 @@ public static class Inputs extends RawOpInputs) op.input(inputIndex++); sortedSampleIds = (Operand) op.input(inputIndex++); @@ -245,6 +276,7 @@ public Inputs(GraphOperation op) { clipWeightMin = op.attributes().getAttrFloat("clip_weight_min"); clipWeightMax = op.attributes().getAttrFloat("clip_weight_max"); tableName = op.attributes().getAttrString("table_name"); + numSparsecoresPerDevice = op.attributes().getAttrInt("num_sparsecores_per_device"); } } } diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithSgdAndStaticBufferSize.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithSgdAndStaticBufferSize.java index 65c059d2821..5dadd3fdca1 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithSgdAndStaticBufferSize.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulGradWithSgdAndStaticBufferSize.java @@ -100,6 +100,9 @@ public static XlaSparseDenseMatmulGradWithSgdAndStaticBufferSize create(Scope sc if (opts.clipWeightMax != null) { opBuilder.setAttr("clip_weight_max", opts.clipWeightMax); } + if (opts.numSparsecoresPerDevice != null) { + opBuilder.setAttr("num_sparsecores_per_device", opts.numSparsecoresPerDevice); + } } } return new XlaSparseDenseMatmulGradWithSgdAndStaticBufferSize(opBuilder.build()); @@ -125,6 +128,16 @@ public static Options clipWeightMax(Float clipWeightMax) { return new Options().clipWeightMax(clipWeightMax); } + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public static Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + return new Options().numSparsecoresPerDevice(numSparsecoresPerDevice); + } + /** * Gets updatedEmbeddingTable. * @@ -147,6 +160,8 @@ public static class Options { private Float clipWeightMax; + private Long numSparsecoresPerDevice; + private Options() { } @@ -171,6 +186,17 @@ public Options clipWeightMax(Float clipWeightMax) { this.clipWeightMax = clipWeightMax; return this; } + + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + this.numSparsecoresPerDevice = numSparsecoresPerDevice; + return this; + } } @OpInputsMetadata( @@ -242,8 +268,13 @@ public static class Inputs extends RawOpInputs) op.input(inputIndex++); sortedSampleIds = (Operand) op.input(inputIndex++); @@ -258,6 +289,7 @@ public Inputs(GraphOperation op) { maxIdsPerSparseCore = op.attributes().getAttrInt("max_ids_per_sparse_core"); maxUniqueIdsPerSparseCore = op.attributes().getAttrInt("max_unique_ids_per_sparse_core"); tableName = op.attributes().getAttrString("table_name"); + numSparsecoresPerDevice = op.attributes().getAttrInt("num_sparsecores_per_device"); } } } diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulWithCsrInput.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulWithCsrInput.java index 793c460676f..a4893b0196c 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulWithCsrInput.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulWithCsrInput.java @@ -30,8 +30,10 @@ import org.tensorflow.op.annotation.OpInputsMetadata; import org.tensorflow.op.annotation.OpMetadata; import org.tensorflow.op.annotation.Operator; +import org.tensorflow.proto.DataType; import org.tensorflow.types.TFloat32; import org.tensorflow.types.TInt32; +import org.tensorflow.types.family.TNumber; /** * The XlaSparseDenseMatmulWithCsrInput operation @@ -43,13 +45,13 @@ @Operator( group = "xla" ) -public final class XlaSparseDenseMatmulWithCsrInput extends RawOp implements Operand { +public final class XlaSparseDenseMatmulWithCsrInput extends RawOp implements Operand { /** * The name of this op, as known by TensorFlow core engine */ public static final String OP_NAME = "XlaSparseDenseMatmulWithCsrInput"; - private Output activations; + private Output activations; public XlaSparseDenseMatmulWithCsrInput(Operation operation) { super(operation, OP_NAME); @@ -72,17 +74,19 @@ public XlaSparseDenseMatmulWithCsrInput(Operation operation) { * @param quantizationConfigHigh The value of the quantizationConfigHigh attribute * @param quantizationConfigNumBuckets The value of the quantizationConfigNumBuckets attribute * @param tableName The value of the tableName attribute + * @param options carries optional attribute values + * @param data type for {@code XlaSparseDenseMatmulWithCsrInput} output and operands * @return a new instance of XlaSparseDenseMatmulWithCsrInput */ @Endpoint( describeByClass = true ) - public static XlaSparseDenseMatmulWithCsrInput create(Scope scope, Operand rowPointers, - Operand sortedSampleIds, Operand sortedTokenIds, - Operand sortedGains, Operand embeddingTable, + public static XlaSparseDenseMatmulWithCsrInput create(Scope scope, + Operand rowPointers, Operand sortedSampleIds, Operand sortedTokenIds, + Operand sortedGains, Operand embeddingTable, Operand numMinibatchesPerPhysicalSparseCore, Long inputSize, Float quantizationConfigLow, Float quantizationConfigHigh, Long quantizationConfigNumBuckets, - String tableName) { + String tableName, Options... options) { OperationBuilder opBuilder = scope.opBuilder(OP_NAME, "XlaSparseDenseMatmulWithCsrInput"); opBuilder.addInput(rowPointers.asOutput()); opBuilder.addInput(sortedSampleIds.asOutput()); @@ -95,7 +99,24 @@ public static XlaSparseDenseMatmulWithCsrInput create(Scope scope, Operand(opBuilder.build()); + } + + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public static Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + return new Options().numSparsecoresPerDevice(numSparsecoresPerDevice); } /** @@ -103,19 +124,40 @@ public static XlaSparseDenseMatmulWithCsrInput create(Scope scope, Operand activations() { + public Output activations() { return activations; } @Override - public Output asOutput() { + public Output asOutput() { return activations; } + /** + * Optional attributes for {@link org.tensorflow.op.xla.XlaSparseDenseMatmulWithCsrInput} + */ + public static class Options { + private Long numSparsecoresPerDevice; + + private Options() { + } + + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + this.numSparsecoresPerDevice = numSparsecoresPerDevice; + return this; + } + } + @OpInputsMetadata( outputsClass = XlaSparseDenseMatmulWithCsrInput.class ) - public static class Inputs extends RawOpInputs { + public static class Inputs extends RawOpInputs> { /** * The rowPointers input */ @@ -139,7 +181,7 @@ public static class Inputs extends RawOpInputs /** * The embeddingTable input */ - public final Operand embeddingTable; + public final Operand embeddingTable; /** * The numMinibatchesPerPhysicalSparseCore input @@ -171,20 +213,32 @@ public static class Inputs extends RawOpInputs */ public final String tableName; + /** + * The numSparsecoresPerDevice attribute + */ + public final long numSparsecoresPerDevice; + + /** + * The T attribute + */ + public final DataType T; + public Inputs(GraphOperation op) { - super(new XlaSparseDenseMatmulWithCsrInput(op), op, Arrays.asList("input_size", "quantization_config_low", "quantization_config_high", "quantization_config_num_buckets", "table_name")); + super(new XlaSparseDenseMatmulWithCsrInput<>(op), op, Arrays.asList("input_size", "quantization_config_low", "quantization_config_high", "quantization_config_num_buckets", "table_name", "num_sparsecores_per_device", "T")); int inputIndex = 0; rowPointers = (Operand) op.input(inputIndex++); sortedSampleIds = (Operand) op.input(inputIndex++); sortedTokenIds = (Operand) op.input(inputIndex++); sortedGains = (Operand) op.input(inputIndex++); - embeddingTable = (Operand) op.input(inputIndex++); + embeddingTable = (Operand) op.input(inputIndex++); numMinibatchesPerPhysicalSparseCore = (Operand) op.input(inputIndex++); inputSize = op.attributes().getAttrInt("input_size"); quantizationConfigLow = op.attributes().getAttrFloat("quantization_config_low"); quantizationConfigHigh = op.attributes().getAttrFloat("quantization_config_high"); quantizationConfigNumBuckets = op.attributes().getAttrInt("quantization_config_num_buckets"); tableName = op.attributes().getAttrString("table_name"); + numSparsecoresPerDevice = op.attributes().getAttrInt("num_sparsecores_per_device"); + T = op.attributes().getAttrType("T"); } } } diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulWithStaticBufferSize.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulWithStaticBufferSize.java index 268a9b0fc4b..d164df81749 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulWithStaticBufferSize.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseDenseMatmulWithStaticBufferSize.java @@ -70,6 +70,7 @@ public XlaSparseDenseMatmulWithStaticBufferSize(Operation operation) { * @param maxIdsPerSparseCore The value of the maxIdsPerSparseCore attribute * @param maxUniqueIdsPerSparseCore The value of the maxUniqueIdsPerSparseCore attribute * @param tableName The value of the tableName attribute + * @param options carries optional attribute values * @return a new instance of XlaSparseDenseMatmulWithStaticBufferSize */ @Endpoint( @@ -80,7 +81,8 @@ public static XlaSparseDenseMatmulWithStaticBufferSize create(Scope scope, Operand sortedGains, Operand embeddingTable, Operand numMinibatchesPerPhysicalSparseCore, Long inputSize, Float quantizationConfigLow, Float quantizationConfigHigh, Long quantizationConfigNumBuckets, - Long maxIdsPerSparseCore, Long maxUniqueIdsPerSparseCore, String tableName) { + Long maxIdsPerSparseCore, Long maxUniqueIdsPerSparseCore, String tableName, + Options... options) { OperationBuilder opBuilder = scope.opBuilder(OP_NAME, "XlaSparseDenseMatmulWithStaticBufferSize"); opBuilder.addInput(rowPointers.asOutput()); opBuilder.addInput(sortedSampleIds.asOutput()); @@ -95,9 +97,26 @@ public static XlaSparseDenseMatmulWithStaticBufferSize create(Scope scope, opBuilder.setAttr("max_ids_per_sparse_core", maxIdsPerSparseCore); opBuilder.setAttr("max_unique_ids_per_sparse_core", maxUniqueIdsPerSparseCore); opBuilder.setAttr("table_name", tableName); + if (options != null) { + for (Options opts : options) { + if (opts.numSparsecoresPerDevice != null) { + opBuilder.setAttr("num_sparsecores_per_device", opts.numSparsecoresPerDevice); + } + } + } return new XlaSparseDenseMatmulWithStaticBufferSize(opBuilder.build()); } + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public static Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + return new Options().numSparsecoresPerDevice(numSparsecoresPerDevice); + } + /** * Gets activations. * @@ -112,6 +131,27 @@ public Output asOutput() { return activations; } + /** + * Optional attributes for {@link org.tensorflow.op.xla.XlaSparseDenseMatmulWithStaticBufferSize} + */ + public static class Options { + private Long numSparsecoresPerDevice; + + private Options() { + } + + /** + * Sets the numSparsecoresPerDevice option. + * + * @param numSparsecoresPerDevice the numSparsecoresPerDevice option + * @return this Options instance. + */ + public Options numSparsecoresPerDevice(Long numSparsecoresPerDevice) { + this.numSparsecoresPerDevice = numSparsecoresPerDevice; + return this; + } + } + @OpInputsMetadata( outputsClass = XlaSparseDenseMatmulWithStaticBufferSize.class ) @@ -181,8 +221,13 @@ public static class Inputs extends RawOpInputs) op.input(inputIndex++); sortedSampleIds = (Operand) op.input(inputIndex++); @@ -197,6 +242,7 @@ public Inputs(GraphOperation op) { maxIdsPerSparseCore = op.attributes().getAttrInt("max_ids_per_sparse_core"); maxUniqueIdsPerSparseCore = op.attributes().getAttrInt("max_unique_ids_per_sparse_core"); tableName = op.attributes().getAttrString("table_name"); + numSparsecoresPerDevice = op.attributes().getAttrInt("num_sparsecores_per_device"); } } } diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseGradientsStack.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseGradientsStack.java new file mode 100644 index 00000000000..5042befbc66 --- /dev/null +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/XlaSparseGradientsStack.java @@ -0,0 +1,128 @@ +/* Copyright 2018-2023 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +=======================================================================*/ + +// This class has been generated, DO NOT EDIT! + +package org.tensorflow.op.xla; + +import java.util.Arrays; +import org.tensorflow.GraphOperation; +import org.tensorflow.Operand; +import org.tensorflow.Operation; +import org.tensorflow.OperationBuilder; +import org.tensorflow.Output; +import org.tensorflow.op.Operands; +import org.tensorflow.op.RawOp; +import org.tensorflow.op.RawOpInputs; +import org.tensorflow.op.Scope; +import org.tensorflow.op.annotation.Endpoint; +import org.tensorflow.op.annotation.OpInputsMetadata; +import org.tensorflow.op.annotation.OpMetadata; +import org.tensorflow.proto.DataType; +import org.tensorflow.types.family.TType; + +/** + * The XlaSparseGradientsStack operation + */ +@OpMetadata( + opType = XlaSparseGradientsStack.OP_NAME, + inputsClass = XlaSparseGradientsStack.Inputs.class +) +public final class XlaSparseGradientsStack extends RawOp implements Operand { + /** + * The name of this op, as known by TensorFlow core engine + */ + public static final String OP_NAME = "XlaSparseGradientsStack"; + + private Output stackedGradients; + + public XlaSparseGradientsStack(Operation operation) { + super(operation, OP_NAME); + int outputIdx = 0; + stackedGradients = operation.output(outputIdx++); + } + + /** + * Factory method to create a class wrapping a new XlaSparseGradientsStack operation. + * + * @param scope current scope + * @param unstackedGradients The unstackedGradients value + * @param interleaved The value of the interleaved attribute + * @param dtype The value of the dtype attribute + * @param data type for {@code XlaSparseGradientsStack} output and operands + * @return a new instance of XlaSparseGradientsStack + */ + @Endpoint( + describeByClass = true + ) + public static XlaSparseGradientsStack create(Scope scope, + Iterable> unstackedGradients, Boolean interleaved, Class dtype) { + OperationBuilder opBuilder = scope.opBuilder(OP_NAME, "XlaSparseGradientsStack"); + opBuilder.addInputList(Operands.asOutputs(unstackedGradients)); + opBuilder.setAttr("interleaved", interleaved); + opBuilder.setAttr("dtype", Operands.toDataType(dtype)); + return new XlaSparseGradientsStack<>(opBuilder.build()); + } + + /** + * Gets stackedGradients. + * + * @return stackedGradients. + */ + public Output stackedGradients() { + return stackedGradients; + } + + @Override + public Output asOutput() { + return stackedGradients; + } + + @OpInputsMetadata( + outputsClass = XlaSparseGradientsStack.class + ) + public static class Inputs extends RawOpInputs> { + /** + * The unstackedGradients input + */ + public final Iterable> unstackedGradients; + + /** + * The interleaved attribute + */ + public final boolean interleaved; + + /** + * The inputDtype attribute + */ + public final DataType inputDtype; + + /** + * The dtype attribute + */ + public final DataType dtype; + + public Inputs(GraphOperation op) { + super(new XlaSparseGradientsStack<>(op), op, Arrays.asList("interleaved", "input_dtype", "dtype")); + int inputIndex = 0; + int unstackedGradientsLength = op.inputListLength("unstacked_gradients"); + unstackedGradients = Arrays.asList((Operand[]) op.inputList(inputIndex, unstackedGradientsLength)); + inputIndex += unstackedGradientsLength; + interleaved = op.attributes().getAttrBool("interleaved"); + inputDtype = op.attributes().getAttrType("input_dtype"); + dtype = op.attributes().getAttrType("dtype"); + } + } +} diff --git a/tensorflow-core/tensorflow-core-native/.bazelversion b/tensorflow-core/tensorflow-core-native/.bazelversion index f3c238740e5..5c733d6c13a 100644 --- a/tensorflow-core/tensorflow-core-native/.bazelversion +++ b/tensorflow-core/tensorflow-core-native/.bazelversion @@ -1,2 +1,2 @@ -6.5.0 +7.4.1 # NOTE: Update Bazel version in tensorflow/tools/ci_build/release/common.sh.oss \ No newline at end of file diff --git a/tensorflow-core/tensorflow-core-native/BUILD b/tensorflow-core/tensorflow-core-native/BUILD index b3b1a2cfcd7..f480e638867 100644 --- a/tensorflow-core/tensorflow-core-native/BUILD +++ b/tensorflow-core/tensorflow-core-native/BUILD @@ -4,8 +4,6 @@ java_proto_library( name = "java_proto_gen_sources", deps = [ "@org_tensorflow//tensorflow/core:protos_all", - "@local_xla//xla/tsl/protobuf:bfc_memory_map_proto", - "@local_xla//xla/tsl/protobuf:test_log_proto", - "@local_tsl//tsl/protobuf:protos_all" + "@local_xla//xla/tsl/protobuf:protos_all" ] ) diff --git a/tensorflow-core/tensorflow-core-native/WORKSPACE b/tensorflow-core/tensorflow-core-native/WORKSPACE index ad2c74508ad..a0f6b30323e 100644 --- a/tensorflow-core/tensorflow-core-native/WORKSPACE +++ b/tensorflow-core/tensorflow-core-native/WORKSPACE @@ -18,23 +18,23 @@ http_archive( "find tensorflow third_party/xla/third_party/tsl third_party/xla/xla/tsl -name \\*.proto | xargs sed -i.bak 's/^package tensorflow\\([^;]*\\).*$/package tensorflow\\1;\\noption java_package = \"org.tensorflow.proto\\1\";/'", ], urls = [ - "https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.18.0.tar.gz", + "https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.20.0.tar.gz", ], - sha256 = "d7876f4bb0235cac60eb6316392a7c48676729860da1ab659fb440379ad5186d", - strip_prefix = "tensorflow-2.18.0" + sha256 = "a640d1f97be316a09301dfc9347e3d929ad4d9a2336e3ca23c32c93b0ff7e5d0", + strip_prefix = "tensorflow-2.20.0" ) ##### Copy content of tensorflow/WORKSPACE here (make sure to change references of default package "//" to "@org_tensorflow//") # buildifier: disable=load-on-top -# We must initialize hermetic python first. load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( - name = "rules_java", - sha256 = "c73336802d0b4882e40770666ad055212df4ea62cfa6edf9cb0f9d29828a0934", - url = "https://github.com/bazelbuild/rules_java/releases/download/5.3.5/rules_java-5.3.5.tar.gz", + name = "rules_shell", + sha256 = "bc61ef94facc78e20a645726f64756e5e285a045037c7a61f65af2941f4c25e1", + strip_prefix = "rules_shell-0.4.1", + url = "https://github.com/bazelbuild/rules_shell/releases/download/v0.4.1/rules_shell-v0.4.1.tar.gz", ) # Initialize the TensorFlow repository and all dependencies. @@ -47,6 +47,12 @@ load("@org_tensorflow//tensorflow:workspace3.bzl", "tf_workspace3") tf_workspace3() +load("@rules_shell//shell:repositories.bzl", "rules_shell_dependencies", "rules_shell_toolchains") + +rules_shell_dependencies() + +rules_shell_toolchains() + # Initialize hermetic Python load("@local_xla//third_party/py:python_init_rules.bzl", "python_init_rules") @@ -61,12 +67,13 @@ python_init_repositories( "tensorflow*", "tf_nightly*", ], - local_wheel_workspaces = ["//:WORKSPACE"], + local_wheel_workspaces = ["@org_tensorflow//:WORKSPACE"], requirements = { "3.9": "@org_tensorflow//:requirements_lock_3_9.txt", "3.10": "@org_tensorflow//:requirements_lock_3_10.txt", "3.11": "@org_tensorflow//:requirements_lock_3_11.txt", "3.12": "@org_tensorflow//:requirements_lock_3_12.txt", + "3.13": "@org_tensorflow//:requirements_lock_3_13.txt", }, ) @@ -87,6 +94,13 @@ load("@org_tensorflow//tensorflow:workspace2.bzl", "tf_workspace2") tf_workspace2() +# Added to fix macOS compiler support on Tahoe? +#http_archive( +# name = "build_bazel_apple_support", +# sha256 = "1ae6fcf983cff3edab717636f91ad0efff2e5ba75607fdddddfd6ad0dbdfaf10", +# urls = ["https://github.com/bazelbuild/apple_support/releases/download/1.24.5/apple_support.1.24.5.tar.gz"] +#) + load("@org_tensorflow//tensorflow:workspace1.bzl", "tf_workspace1") tf_workspace1() @@ -96,7 +110,14 @@ load("@org_tensorflow//tensorflow:workspace0.bzl", "tf_workspace0") tf_workspace0() load( - "@local_tsl//third_party/gpus/cuda/hermetic:cuda_json_init_repository.bzl", + "@local_xla//third_party/py:python_wheel.bzl", + "python_wheel_version_suffix_repository", +) + +python_wheel_version_suffix_repository(name = "tf_wheel_version_suffix") + +load( + "@rules_ml_toolchain//third_party/gpus/cuda/hermetic:cuda_json_init_repository.bzl", "cuda_json_init_repository", ) @@ -108,7 +129,7 @@ load( "CUDNN_REDISTRIBUTIONS", ) load( - "@local_tsl//third_party/gpus/cuda/hermetic:cuda_redist_init_repositories.bzl", + "@rules_ml_toolchain//third_party/gpus/cuda/hermetic:cuda_redist_init_repositories.bzl", "cuda_redist_init_repositories", "cudnn_redist_init_repository", ) @@ -122,22 +143,60 @@ cudnn_redist_init_repository( ) load( - "@local_tsl//third_party/gpus/cuda/hermetic:cuda_configure.bzl", + "@rules_ml_toolchain//third_party/gpus/cuda/hermetic:cuda_configure.bzl", "cuda_configure", ) cuda_configure(name = "local_config_cuda") load( - "@local_tsl//third_party/nccl/hermetic:nccl_redist_init_repository.bzl", + "@rules_ml_toolchain//third_party/nccl/hermetic:nccl_redist_init_repository.bzl", "nccl_redist_init_repository", ) nccl_redist_init_repository() load( - "@local_tsl//third_party/nccl/hermetic:nccl_configure.bzl", + "@rules_ml_toolchain//third_party/nccl/hermetic:nccl_configure.bzl", "nccl_configure", ) -nccl_configure(name = "local_config_nccl") \ No newline at end of file +nccl_configure(name = "local_config_nccl") + +load( + "@rules_ml_toolchain//third_party/nvshmem/hermetic:nvshmem_json_init_repository.bzl", + "nvshmem_json_init_repository", +) + +nvshmem_json_init_repository() + +load( + "@nvshmem_redist_json//:distributions.bzl", + "NVSHMEM_REDISTRIBUTIONS", +) +load( + "@rules_ml_toolchain//third_party/nvshmem/hermetic:nvshmem_redist_init_repository.bzl", + "nvshmem_redist_init_repository", +) + +nvshmem_redist_init_repository( + nvshmem_redistributions = NVSHMEM_REDISTRIBUTIONS, +) + +load( + "@rules_ml_toolchain//third_party/nvshmem/hermetic:nvshmem_configure.bzl", + "nvshmem_configure", +) + +nvshmem_configure(name = "local_config_nvshmem") + +load( + "@rules_ml_toolchain//cc_toolchain/deps:cc_toolchain_deps.bzl", + "cc_toolchain_deps", +) + +cc_toolchain_deps() + +register_toolchains("@rules_ml_toolchain//cc_toolchain:lx64_lx64") + +register_toolchains("@rules_ml_toolchain//cc_toolchain:lx64_lx64_cuda") \ No newline at end of file diff --git a/tensorflow-core/tensorflow-core-native/pom.xml b/tensorflow-core/tensorflow-core-native/pom.xml index bb9eb053c33..ce6041d0427 100644 --- a/tensorflow-core/tensorflow-core-native/pom.xml +++ b/tensorflow-core/tensorflow-core-native/pom.xml @@ -119,12 +119,6 @@ ${project.version} ${javacpp.platform.macosx-arm64} - - ${project.groupId} - ${project.artifactId} - ${project.version} - ${javacpp.platform.windows-x86_64} - ${project.groupId} ${project.artifactId} @@ -161,10 +155,6 @@ ${project.build.directory}/${project.artifactId}-${project.version}-${javacpp.platform.macosx-arm64}.jar ${javacpp.platform.macosx-arm64} - - ${project.build.directory}/${project.artifactId}-${project.version}-${javacpp.platform.windows-x86_64}.jar - ${javacpp.platform.windows-x86_64} - ${project.build.directory}/${project.artifactId}-${project.version}-${javacpp.platform.linux-arm64}.jar ${javacpp.platform.linux-arm64} diff --git a/tensorflow-core/tensorflow-core-native/scripts/bazel_common.sh b/tensorflow-core/tensorflow-core-native/scripts/bazel_common.sh index 211b6653860..a46225129a6 100755 --- a/tensorflow-core/tensorflow-core-native/scripts/bazel_common.sh +++ b/tensorflow-core/tensorflow-core-native/scripts/bazel_common.sh @@ -2,7 +2,6 @@ set -eu # Set generic Bazel build options -export BAZEL_USE_CPP_ONLY_TOOLCHAIN=1 export BAZEL_VC="${VCINSTALLDIR:-}" if [[ -d $BAZEL_VC ]]; then export BUILD_FLAGS="--output_user_root=$(cygpath -w $TMP) build" @@ -16,7 +15,7 @@ fi if [[ "${PLATFORM:-}" == macosx-arm64 ]]; then BUILD_FLAGS="$BUILD_FLAGS --config=macos_arm64" fi -BUILD_FLAGS="$BUILD_FLAGS --experimental_repo_remote_exec --python_path="$PYTHON_BIN_PATH" --output_filter=DONT_MATCH_ANYTHING --verbose_failures --distinct_host_configuration=true" +BUILD_FLAGS="$BUILD_FLAGS --experimental_repo_remote_exec --python_path="$PYTHON_BIN_PATH" --output_filter=DONT_MATCH_ANYTHING --verbose_failures" export BAZEL_BIN=$(pwd -P)/bazel-bin export TENSORFLOW_BIN=$BAZEL_BIN/external/org_tensorflow/tensorflow diff --git a/tensorflow-core/tensorflow-core-native/scripts/dist_download.sh b/tensorflow-core/tensorflow-core-native/scripts/dist_download.sh index acf28b9391d..54ffca74ac0 100755 --- a/tensorflow-core/tensorflow-core-native/scripts/dist_download.sh +++ b/tensorflow-core/tensorflow-core-native/scripts/dist_download.sh @@ -5,20 +5,16 @@ DOWNLOAD_FOLDER="$1" case ${PLATFORM:-} in 'linux-x86_64') - WHEEL_URL='https://files.pythonhosted.org/packages/aa/1d/032a9d40762895e51cad06f382135c14d16487a0ad9dcc65aae5bd89c968/tensorflow_cpu-2.18.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl' + WHEEL_URL='https://files.pythonhosted.org/packages/1a/9e/594164db23e3e262da1a0e8983258811eff56e5af6b7b6da5eccccb8d4c7/tensorflow_cpu-2.20.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl' ;; 'linux-x86_64-gpu') - WHEEL_URL='https://files.pythonhosted.org/packages/84/76/c55967ac9968ddaede25a4dce37aba37e9030656f02c12676151ce1b6f22/tensorflow-2.18.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl' + WHEEL_URL='https://files.pythonhosted.org/packages/43/fb/8be8547c128613d82a2b006004026d86ed0bd672e913029a98153af4ffab/tensorflow-2.20.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl' ;; 'linux-arm64') - WHEEL_URL='https://files.pythonhosted.org/packages/56/e4/55aaac2b15af4dad079e5af329a79d961e5206589d0e02b1e8da221472ed/tensorflow-2.18.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl' + WHEEL_URL='https://files.pythonhosted.org/packages/ea/4c/c1aa90c5cc92e9f7f9c78421e121ef25bae7d378f8d1d4cbad46c6308836/tensorflow-2.20.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl' ;; 'macosx-arm64') - WHEEL_URL='https://files.pythonhosted.org/packages/26/08/556c4159675c1a30e077ec2a942eeeb81b457cc35c247a5b4a59a1274f05/tensorflow-2.18.0-cp311-cp311-macosx_12_0_arm64.whl' - ;; - 'windows-x86_64') - WHEEL_URL='https://files.pythonhosted.org/packages/76/ad/fa6c508a15ff79cb5409294c293388e0999b7d480f84b65e4287277434fe/tensorflow_intel-2.18.0-cp311-cp311-win_amd64.whl' - CLIB_URL='https://storage.googleapis.com/tensorflow/versions/2.18.0/libtensorflow-cpu-windows-x86_64.zip' + WHEEL_URL='https://files.pythonhosted.org/packages/04/82/af283f402f8d1e9315644a331a5f0f326264c5d1de08262f3de5a5ade422/tensorflow-2.20.0-cp313-cp313-macosx_12_0_arm64.whl' ;; *) echo "TensorFlow distribution for ${PLATFORM} is not supported for download" @@ -52,15 +48,11 @@ if [[ "$PLATFORM" =~ "linux" ]]; then ln -fs libtensorflow_cc.so.2 libtensorflow_cc.so ln -fs libtensorflow_framework.so.2 libtensorflow_framework.so if [[ "$PLATFORM" == "linux-arm64" ]]; then - cp ../tensorflow.libs/libomp-6196b3b5.so.5 libomp-6196b3b5.so.5 - ln -fs libomp-6196b3b5.so.5 libomp-6196b3b5.so + cp ../tensorflow.libs/libomp-f1025659.so.5 libomp-f1025659.so.5 + ln -fs libomp-f1025659.so.5 libomp-f1025659.so fi elif [[ "$PLATFORM" =~ "macosx" ]]; then ln -fs libtensorflow_cc.2.dylib libtensorflow_cc.dylib ln -fs libtensorflow_framework.2.dylib libtensorflow_framework.dylib -elif [[ "$PLATFORM" =~ "windows" ]]; then - # FIXME Looks like tsl headers are only present under the tensorflow folder for the windows build - # (while it is also available at the root of the include folder for other platforms) - cd include && ln -fs tensorflow/tsl tsl && cd - fi ls -l . diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/Deallocator_Pointer_long_Pointer.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/Deallocator_Pointer_long_Pointer.java index 6db414f7382..58873a30c53 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/Deallocator_Pointer_long_Pointer.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/Deallocator_Pointer_long_Pointer.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/Listener_BytePointer.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/Listener_BytePointer.java index abd96e95392..6ce5d643c9e 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/Listener_BytePointer.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/Listener_BytePointer.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/Listener_String.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/Listener_String.java index af6030e6503..03b4094e19e 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/Listener_String.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/Listener_String.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_CancelCallback.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_CancelCallback.java index a2ab0621623..bcb0ffbdec9 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_CancelCallback.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_CancelCallback.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_CancellationManager.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_CancellationManager.java index 1a1524e6593..85181d651a6 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_CancellationManager.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_CancellationManager.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_Context.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_Context.java index 88322c6d243..ee22b68f7ce 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_Context.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_Context.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_ContextOptions.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_ContextOptions.java index 8a9768dbaec..1e6b1dad072 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_ContextOptions.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_ContextOptions.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_CustomDevice.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_CustomDevice.java index 1b9ddc78173..cda91d819b3 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_CustomDevice.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_CustomDevice.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_CustomDeviceTensorHandle.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_CustomDeviceTensorHandle.java index b6943e9f386..fef6b028ee8 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_CustomDeviceTensorHandle.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_CustomDeviceTensorHandle.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_Executor.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_Executor.java index 53a66d08755..5edcd18e91e 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_Executor.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_Executor.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBoolGauge0.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBoolGauge0.java index 2ee4a7020c8..86b997f9c5f 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBoolGauge0.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBoolGauge0.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBoolGauge1.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBoolGauge1.java index 004c852fcd7..e8d0be739c3 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBoolGauge1.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBoolGauge1.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBoolGauge2.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBoolGauge2.java index e46a3f06e0d..be6f3a4157f 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBoolGauge2.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBoolGauge2.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBoolGaugeCell.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBoolGaugeCell.java index 6b9d73cb6f2..3f595391ea2 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBoolGaugeCell.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBoolGaugeCell.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBuckets.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBuckets.java index 8fa952614cf..1e962207ae1 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBuckets.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringBuckets.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringCounter0.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringCounter0.java index 03185b12ac1..2e6c7e1bd47 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringCounter0.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringCounter0.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringCounter1.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringCounter1.java index 3fc374c963d..4fca4cbd77f 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringCounter1.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringCounter1.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringCounter2.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringCounter2.java index 3f479145a55..deec4369dd0 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringCounter2.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringCounter2.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringCounterCell.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringCounterCell.java index c4ff6a322cd..41652a4ccf2 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringCounterCell.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringCounterCell.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringIntGauge0.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringIntGauge0.java index b01c212d04e..44a58a1b211 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringIntGauge0.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringIntGauge0.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringIntGauge1.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringIntGauge1.java index 46ca45846ce..b1d9654bec7 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringIntGauge1.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringIntGauge1.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringIntGauge2.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringIntGauge2.java index a48f8ea3d8e..a2a140e73b6 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringIntGauge2.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringIntGauge2.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringIntGaugeCell.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringIntGaugeCell.java index 34d7da5854e..102cd37b2a9 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringIntGaugeCell.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringIntGaugeCell.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringSampler0.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringSampler0.java index d0235201962..9c4194944e7 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringSampler0.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringSampler0.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringSampler1.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringSampler1.java index f71d9821bae..afd8b49e657 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringSampler1.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringSampler1.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringSampler2.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringSampler2.java index eaa959122f5..0dfaee7d782 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringSampler2.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringSampler2.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringSamplerCell.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringSamplerCell.java index 7d2b50cd5e5..e3547fb10ac 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringSamplerCell.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringSamplerCell.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge0.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge0.java index 978e30fca4a..213b72c2a4f 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge0.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge0.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge1.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge1.java index d0a0aca659c..a19ae751637 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge1.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge1.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge2.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge2.java index 85d097da12f..a30f250a8ed 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge2.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge2.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge3.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge3.java index aa07f5ee144..fb80143410e 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge3.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge3.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge4.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge4.java index 46732e2bfcd..d3d33cbb1e6 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge4.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGauge4.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGaugeCell.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGaugeCell.java index cfee1b9991d..cf839004e4b 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGaugeCell.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_MonitoringStringGaugeCell.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_Op.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_Op.java index b4b9fba825e..4a1b8e2e899 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_Op.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_Op.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_OpAttrs.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_OpAttrs.java index c72023d587f..cc7923eecbf 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_OpAttrs.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_OpAttrs.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_TensorDebugInfo.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_TensorDebugInfo.java index 7f5cc8b30f1..23f1399b60e 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_TensorDebugInfo.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_TensorDebugInfo.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_TensorHandle.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_TensorHandle.java index 39ebd0e0984..4bca36afa91 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_TensorHandle.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFE_TensorHandle.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFJ_GradFuncAdapter.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFJ_GradFuncAdapter.java index 7938de58a8e..b948e0bb83b 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFJ_GradFuncAdapter.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFJ_GradFuncAdapter.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFJ_GraphId.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFJ_GraphId.java index f503ed65a91..46273ff116a 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFJ_GraphId.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFJ_GraphId.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFJ_Scope.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFJ_Scope.java index 8c3c0746c5c..2b1f059ea34 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFJ_Scope.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TFJ_Scope.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_AllocatorAttributes.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_AllocatorAttributes.java index 5862c60b31d..a107a5fca3c 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_AllocatorAttributes.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_AllocatorAttributes.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ApiDefMap.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ApiDefMap.java index 57f7d3095bf..010e72afc58 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ApiDefMap.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ApiDefMap.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_AttrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_AttrBuilder.java index 8e5a084ccce..5e90a864542 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_AttrBuilder.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_AttrBuilder.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_AttrMetadata.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_AttrMetadata.java index 6a99a4d1b8e..5bfdc300bfa 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_AttrMetadata.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_AttrMetadata.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Buffer.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Buffer.java index a4bf64d3f5f..a3c175e743d 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Buffer.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Buffer.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_CheckpointReader.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_CheckpointReader.java index 232cb85fd04..139e8890b73 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_CheckpointReader.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_CheckpointReader.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_DeprecatedSession.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_DeprecatedSession.java index d816ab6f832..9e43f800123 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_DeprecatedSession.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_DeprecatedSession.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_DeviceList.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_DeviceList.java index 6d095f0b8c7..4e592d8f5c3 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_DeviceList.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_DeviceList.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Function.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Function.java index acf54133d12..23b78cd1e1b 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Function.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Function.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_FunctionOptions.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_FunctionOptions.java index 381a690e1e6..71baf2504f2 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_FunctionOptions.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_FunctionOptions.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Graph.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Graph.java index 779c5030842..f94f4151612 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Graph.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Graph.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ImportGraphDefOptions.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ImportGraphDefOptions.java index 527b6f1109e..a8d717dbcc5 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ImportGraphDefOptions.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ImportGraphDefOptions.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ImportGraphDefResults.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ImportGraphDefResults.java index 7d3bf3597f0..90ccbbc4f7d 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ImportGraphDefResults.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ImportGraphDefResults.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Input.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Input.java index 05bb181a86d..ae27224db9a 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Input.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Input.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Library.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Library.java index 22a67f6cd2c..0c4e471a82b 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Library.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Library.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Operation.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Operation.java index 084fef91bda..823bba704f1 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Operation.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Operation.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_OperationDescription.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_OperationDescription.java index 9387c172354..f2787037d42 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_OperationDescription.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_OperationDescription.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Output.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Output.java index a52cff3c905..34229d26d81 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Output.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Output.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Server.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Server.java index 5753e37ae97..40f4755522f 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Server.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Server.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Session.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Session.java index 8ab407637f5..f70734dc616 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Session.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Session.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_SessionOptions.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_SessionOptions.java index a85ba6f5c62..000fbc6bf60 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_SessionOptions.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_SessionOptions.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ShapeAndType.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ShapeAndType.java index 315bfa3e01c..0022ee15d23 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ShapeAndType.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ShapeAndType.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ShapeAndTypeList.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ShapeAndTypeList.java index ac959f2acf7..acb68133e42 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ShapeAndTypeList.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_ShapeAndTypeList.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Status.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Status.java index 3aa5e8156d5..b31ed7f4646 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Status.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Status.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_StringView.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_StringView.java index cd9b9928069..64ae5dfd3e5 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_StringView.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_StringView.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString.java index 66092be629f..89455bbfe30 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Large.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Large.java index 2cab61e7d73..352d77d2bd3 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Large.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Large.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Offset.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Offset.java index 3dbdcd468f1..7b11bc70ffc 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Offset.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Offset.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Raw.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Raw.java index f2916801c5f..b36ff8c9706 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Raw.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Raw.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Small.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Small.java index 57702a8b716..70edc44605c 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Small.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Small.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Union.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Union.java index 5ebe9ebfac8..bb050ab5b27 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Union.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_Union.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_View.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_View.java index 5951c1b1238..e3cac3b45a2 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_View.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_View.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Tensor.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Tensor.java index 4ee1ae89418..8fac15d737b 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Tensor.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_Tensor.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_WhileParams.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_WhileParams.java index d3607e4a274..41bf07ffa9c 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_WhileParams.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_WhileParams.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/Tensor.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/Tensor.java index d534b2caa87..224cc05b58e 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/Tensor.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/Tensor.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/global/tensorflow.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/global/tensorflow.java index f867058d6bb..48a6a3ded36 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/global/tensorflow.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/global/tensorflow.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE package org.tensorflow.internal.c_api.global; @@ -468,12 +468,16 @@ public static native void TF_TString_Copy(TF_TString dst, String src, TF_FLOAT8_E5M2 = 24, // 5 exponent bits, 2 mantissa bits. TF_FLOAT8_E4M3FN = 25, // 4 exponent bits, 3 mantissa bits, finite-only, with // 2 NaNs (0bS1111111). - // TODO - b/299182407: Leaving room for remaining float8 types. - // TF_FLOAT8_E4M3FNUZ = 26, - // TF_FLOAT8_E4M3B11FNUZ = 27, - // TF_FLOAT8_E5M2FNUZ = 28, + TF_FLOAT8_E4M3FNUZ = 26, // 4 exponent bits, 3 mantissa bits, + // finite-only,with NaN. + TF_FLOAT8_E4M3B11FNUZ = 27, // 4 exponent bits, 3 mantissa bits, 11 bits + // bias, finite-only, with NaNs. + TF_FLOAT8_E5M2FNUZ = 28, // 5 exponent bits, 2 mantissa bits, + // finite-only,with NaN. TF_INT4 = 29, - TF_UINT4 = 30; + TF_UINT4 = 30, + TF_INT2 = 31, + TF_UINT2 = 32; // TF_DataTypeSize returns the sizeof() for the underlying type corresponding // to the given TF_DataType enum value. Returns 0 for variable length types diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationDescription.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationDescription.java index 99f454ad116..967073358af 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationDescription.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationDescription.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/framework/allocation_description.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -7,37 +9,34 @@ * Protobuf type {@code tensorflow.AllocationDescription} */ public final class AllocationDescription extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.AllocationDescription) AllocationDescriptionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + AllocationDescription.class.getName()); + } // Use AllocationDescription.newBuilder() to construct. - private AllocationDescription(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private AllocationDescription(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private AllocationDescription() { allocatorName_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AllocationDescription(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.AllocationDescriptionProtos.internal_static_tensorflow_AllocationDescription_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.AllocationDescriptionProtos.internal_static_tensorflow_AllocationDescription_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -45,7 +44,7 @@ protected java.lang.Object newInstance( } public static final int REQUESTED_BYTES_FIELD_NUMBER = 1; - private long requestedBytes_; + private long requestedBytes_ = 0L; /** *

        * Total number of bytes requested
    @@ -60,7 +59,7 @@ public long getRequestedBytes() {
       }
     
       public static final int ALLOCATED_BYTES_FIELD_NUMBER = 2;
    -  private long allocatedBytes_;
    +  private long allocatedBytes_ = 0L;
       /**
        * 
        * Total number of bytes allocated if known
    @@ -75,7 +74,8 @@ public long getAllocatedBytes() {
       }
     
       public static final int ALLOCATOR_NAME_FIELD_NUMBER = 3;
    -  private volatile java.lang.Object allocatorName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object allocatorName_ = "";
       /**
        * 
        * Name of the allocator used
    @@ -121,7 +121,7 @@ public java.lang.String getAllocatorName() {
       }
     
       public static final int ALLOCATION_ID_FIELD_NUMBER = 4;
    -  private long allocationId_;
    +  private long allocationId_ = 0L;
       /**
        * 
        * Identifier of the allocated buffer if known
    @@ -136,7 +136,7 @@ public long getAllocationId() {
       }
     
       public static final int HAS_SINGLE_REFERENCE_FIELD_NUMBER = 5;
    -  private boolean hasSingleReference_;
    +  private boolean hasSingleReference_ = false;
       /**
        * 
        * Set if this tensor only has one remaining reference
    @@ -151,7 +151,7 @@ public boolean getHasSingleReference() {
       }
     
       public static final int PTR_FIELD_NUMBER = 6;
    -  private long ptr_;
    +  private long ptr_ = 0L;
       /**
        * 
        * Address of the allocation.
    @@ -185,8 +185,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         if (allocatedBytes_ != 0L) {
           output.writeInt64(2, allocatedBytes_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(allocatorName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, allocatorName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(allocatorName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 3, allocatorName_);
         }
         if (allocationId_ != 0L) {
           output.writeInt64(4, allocationId_);
    @@ -214,8 +214,8 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeInt64Size(2, allocatedBytes_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(allocatorName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, allocatorName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(allocatorName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(3, allocatorName_);
         }
         if (allocationId_ != 0L) {
           size += com.google.protobuf.CodedOutputStream
    @@ -323,39 +323,41 @@ public static org.tensorflow.proto.AllocationDescription parseFrom(
       }
       public static org.tensorflow.proto.AllocationDescription parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.AllocationDescription parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.AllocationDescription parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.AllocationDescription parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.AllocationDescription parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.AllocationDescription parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -375,7 +377,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -383,7 +385,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.AllocationDescription}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.AllocationDescription)
           org.tensorflow.proto.AllocationDescriptionOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -392,7 +394,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.AllocationDescriptionProtos.internal_static_tensorflow_AllocationDescription_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -405,25 +407,20 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           requestedBytes_ = 0L;
    -
           allocatedBytes_ = 0L;
    -
           allocatorName_ = "";
    -
           allocationId_ = 0L;
    -
           hasSingleReference_ = false;
    -
           ptr_ = 0L;
    -
           return this;
         }
     
    @@ -450,48 +447,33 @@ public org.tensorflow.proto.AllocationDescription build() {
         @java.lang.Override
         public org.tensorflow.proto.AllocationDescription buildPartial() {
           org.tensorflow.proto.AllocationDescription result = new org.tensorflow.proto.AllocationDescription(this);
    -      result.requestedBytes_ = requestedBytes_;
    -      result.allocatedBytes_ = allocatedBytes_;
    -      result.allocatorName_ = allocatorName_;
    -      result.allocationId_ = allocationId_;
    -      result.hasSingleReference_ = hasSingleReference_;
    -      result.ptr_ = ptr_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.AllocationDescription result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.requestedBytes_ = requestedBytes_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.allocatedBytes_ = allocatedBytes_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.allocatorName_ = allocatorName_;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.allocationId_ = allocationId_;
    +      }
    +      if (((from_bitField0_ & 0x00000010) != 0)) {
    +        result.hasSingleReference_ = hasSingleReference_;
    +      }
    +      if (((from_bitField0_ & 0x00000020) != 0)) {
    +        result.ptr_ = ptr_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.AllocationDescription) {
    @@ -512,6 +494,7 @@ public Builder mergeFrom(org.tensorflow.proto.AllocationDescription other) {
           }
           if (!other.getAllocatorName().isEmpty()) {
             allocatorName_ = other.allocatorName_;
    +        bitField0_ |= 0x00000004;
             onChanged();
           }
           if (other.getAllocationId() != 0L) {
    @@ -551,32 +534,32 @@ public Builder mergeFrom(
                   break;
                 case 8: {
                   requestedBytes_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 8
                 case 16: {
                   allocatedBytes_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 16
                 case 26: {
                   allocatorName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 26
                 case 32: {
                   allocationId_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 32
                 case 40: {
                   hasSingleReference_ = input.readBool();
    -
    +              bitField0_ |= 0x00000010;
                   break;
                 } // case 40
                 case 48: {
                   ptr_ = input.readUInt64();
    -
    +              bitField0_ |= 0x00000020;
                   break;
                 } // case 48
                 default: {
    @@ -594,6 +577,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private long requestedBytes_ ;
         /**
    @@ -618,8 +602,9 @@ public long getRequestedBytes() {
          * @return This builder for chaining.
          */
         public Builder setRequestedBytes(long value) {
    -      
    +
           requestedBytes_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -632,7 +617,7 @@ public Builder setRequestedBytes(long value) {
          * @return This builder for chaining.
          */
         public Builder clearRequestedBytes() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000001);
           requestedBytes_ = 0L;
           onChanged();
           return this;
    @@ -661,8 +646,9 @@ public long getAllocatedBytes() {
          * @return This builder for chaining.
          */
         public Builder setAllocatedBytes(long value) {
    -      
    +
           allocatedBytes_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -675,7 +661,7 @@ public Builder setAllocatedBytes(long value) {
          * @return This builder for chaining.
          */
         public Builder clearAllocatedBytes() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000002);
           allocatedBytes_ = 0L;
           onChanged();
           return this;
    @@ -734,11 +720,9 @@ public java.lang.String getAllocatorName() {
          */
         public Builder setAllocatorName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           allocatorName_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -751,8 +735,8 @@ public Builder setAllocatorName(
          * @return This builder for chaining.
          */
         public Builder clearAllocatorName() {
    -      
           allocatorName_ = getDefaultInstance().getAllocatorName();
    +      bitField0_ = (bitField0_ & ~0x00000004);
           onChanged();
           return this;
         }
    @@ -767,12 +751,10 @@ public Builder clearAllocatorName() {
          */
         public Builder setAllocatorNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           allocatorName_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -800,8 +782,9 @@ public long getAllocationId() {
          * @return This builder for chaining.
          */
         public Builder setAllocationId(long value) {
    -      
    +
           allocationId_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -814,7 +797,7 @@ public Builder setAllocationId(long value) {
          * @return This builder for chaining.
          */
         public Builder clearAllocationId() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000008);
           allocationId_ = 0L;
           onChanged();
           return this;
    @@ -843,8 +826,9 @@ public boolean getHasSingleReference() {
          * @return This builder for chaining.
          */
         public Builder setHasSingleReference(boolean value) {
    -      
    +
           hasSingleReference_ = value;
    +      bitField0_ |= 0x00000010;
           onChanged();
           return this;
         }
    @@ -857,7 +841,7 @@ public Builder setHasSingleReference(boolean value) {
          * @return This builder for chaining.
          */
         public Builder clearHasSingleReference() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000010);
           hasSingleReference_ = false;
           onChanged();
           return this;
    @@ -886,8 +870,9 @@ public long getPtr() {
          * @return This builder for chaining.
          */
         public Builder setPtr(long value) {
    -      
    +
           ptr_ = value;
    +      bitField0_ |= 0x00000020;
           onChanged();
           return this;
         }
    @@ -900,23 +885,11 @@ public Builder setPtr(long value) {
          * @return This builder for chaining.
          */
         public Builder clearPtr() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000020);
           ptr_ = 0L;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.AllocationDescription)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationDescriptionOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationDescriptionOrBuilder.java
    index 3c6d26ceb58..bb64ef9e0c4 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationDescriptionOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationDescriptionOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/allocation_description.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationDescriptionProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationDescriptionProtos.java
    index bf746192c95..80ca6baa735 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationDescriptionProtos.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationDescriptionProtos.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/allocation_description.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class AllocationDescriptionProtos {
       private AllocationDescriptionProtos() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      AllocationDescriptionProtos.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,7 +28,7 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_AllocationDescription_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_AllocationDescription_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -46,9 +57,10 @@ public static void registerAllExtensions(
         internal_static_tensorflow_AllocationDescription_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_AllocationDescription_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_AllocationDescription_descriptor,
             new java.lang.String[] { "RequestedBytes", "AllocatedBytes", "AllocatorName", "AllocationId", "HasSingleReference", "Ptr", });
    +    descriptor.resolveAllFeaturesImmutable();
       }
     
       // @@protoc_insertion_point(outer_class_scope)
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationRecord.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationRecord.java
    index 0da9249630b..64ef50b0cce 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationRecord.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationRecord.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/step_stats.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,36 +13,33 @@
      * Protobuf type {@code tensorflow.AllocationRecord}
      */
     public final class AllocationRecord extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.AllocationRecord)
         AllocationRecordOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      AllocationRecord.class.getName());
    +  }
       // Use AllocationRecord.newBuilder() to construct.
    -  private AllocationRecord(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private AllocationRecord(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private AllocationRecord() {
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new AllocationRecord();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.StepStatsProtos.internal_static_tensorflow_AllocationRecord_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.StepStatsProtos.internal_static_tensorflow_AllocationRecord_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -48,7 +47,7 @@ protected java.lang.Object newInstance(
       }
     
       public static final int ALLOC_MICROS_FIELD_NUMBER = 1;
    -  private long allocMicros_;
    +  private long allocMicros_ = 0L;
       /**
        * 
        * The timestamp of the operation.
    @@ -63,7 +62,7 @@ public long getAllocMicros() {
       }
     
       public static final int ALLOC_BYTES_FIELD_NUMBER = 2;
    -  private long allocBytes_;
    +  private long allocBytes_ = 0L;
       /**
        * 
        * Number of bytes allocated, or de-allocated if negative.
    @@ -189,39 +188,41 @@ public static org.tensorflow.proto.AllocationRecord parseFrom(
       }
       public static org.tensorflow.proto.AllocationRecord parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.AllocationRecord parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.AllocationRecord parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.AllocationRecord parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.AllocationRecord parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.AllocationRecord parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -241,7 +242,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -253,7 +254,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.AllocationRecord}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.AllocationRecord)
           org.tensorflow.proto.AllocationRecordOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -262,7 +263,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.StepStatsProtos.internal_static_tensorflow_AllocationRecord_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -275,17 +276,16 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           allocMicros_ = 0L;
    -
           allocBytes_ = 0L;
    -
           return this;
         }
     
    @@ -312,44 +312,21 @@ public org.tensorflow.proto.AllocationRecord build() {
         @java.lang.Override
         public org.tensorflow.proto.AllocationRecord buildPartial() {
           org.tensorflow.proto.AllocationRecord result = new org.tensorflow.proto.AllocationRecord(this);
    -      result.allocMicros_ = allocMicros_;
    -      result.allocBytes_ = allocBytes_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.AllocationRecord result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.allocMicros_ = allocMicros_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.allocBytes_ = allocBytes_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.AllocationRecord) {
    @@ -396,12 +373,12 @@ public Builder mergeFrom(
                   break;
                 case 8: {
                   allocMicros_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 8
                 case 16: {
                   allocBytes_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 16
                 default: {
    @@ -419,6 +396,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private long allocMicros_ ;
         /**
    @@ -443,8 +421,9 @@ public long getAllocMicros() {
          * @return This builder for chaining.
          */
         public Builder setAllocMicros(long value) {
    -      
    +
           allocMicros_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -457,7 +436,7 @@ public Builder setAllocMicros(long value) {
          * @return This builder for chaining.
          */
         public Builder clearAllocMicros() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000001);
           allocMicros_ = 0L;
           onChanged();
           return this;
    @@ -486,8 +465,9 @@ public long getAllocBytes() {
          * @return This builder for chaining.
          */
         public Builder setAllocBytes(long value) {
    -      
    +
           allocBytes_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -500,23 +480,11 @@ public Builder setAllocBytes(long value) {
          * @return This builder for chaining.
          */
         public Builder clearAllocBytes() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000002);
           allocBytes_ = 0L;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.AllocationRecord)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationRecordOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationRecordOrBuilder.java
    index 08fdb9d2c7a..4825baf1aaf 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationRecordOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationRecordOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/step_stats.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocatorMemoryUsed.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocatorMemoryUsed.java
    index 4439abfc23d..49e5a0df53f 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocatorMemoryUsed.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocatorMemoryUsed.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/step_stats.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,12 +9,21 @@
      * Protobuf type {@code tensorflow.AllocatorMemoryUsed}
      */
     public final class AllocatorMemoryUsed extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.AllocatorMemoryUsed)
         AllocatorMemoryUsedOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      AllocatorMemoryUsed.class.getName());
    +  }
       // Use AllocatorMemoryUsed.newBuilder() to construct.
    -  private AllocatorMemoryUsed(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private AllocatorMemoryUsed(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private AllocatorMemoryUsed() {
    @@ -20,25 +31,13 @@ private AllocatorMemoryUsed() {
         allocationRecords_ = java.util.Collections.emptyList();
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new AllocatorMemoryUsed();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.StepStatsProtos.internal_static_tensorflow_AllocatorMemoryUsed_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.StepStatsProtos.internal_static_tensorflow_AllocatorMemoryUsed_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -46,7 +45,8 @@ protected java.lang.Object newInstance(
       }
     
       public static final int ALLOCATOR_NAME_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object allocatorName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object allocatorName_ = "";
       /**
        * string allocator_name = 1;
        * @return The allocatorName.
    @@ -84,7 +84,7 @@ public java.lang.String getAllocatorName() {
       }
     
       public static final int TOTAL_BYTES_FIELD_NUMBER = 2;
    -  private long totalBytes_;
    +  private long totalBytes_ = 0L;
       /**
        * 
        * These are per-node allocator memory stats.
    @@ -99,7 +99,7 @@ public long getTotalBytes() {
       }
     
       public static final int PEAK_BYTES_FIELD_NUMBER = 3;
    -  private long peakBytes_;
    +  private long peakBytes_ = 0L;
       /**
        * int64 peak_bytes = 3;
        * @return The peakBytes.
    @@ -110,7 +110,7 @@ public long getPeakBytes() {
       }
     
       public static final int LIVE_BYTES_FIELD_NUMBER = 4;
    -  private long liveBytes_;
    +  private long liveBytes_ = 0L;
       /**
        * 
        * The bytes that are not deallocated.
    @@ -125,6 +125,7 @@ public long getLiveBytes() {
       }
     
       public static final int ALLOCATION_RECORDS_FIELD_NUMBER = 6;
    +  @SuppressWarnings("serial")
       private java.util.List allocationRecords_;
       /**
        * 
    @@ -185,7 +186,7 @@ public org.tensorflow.proto.AllocationRecordOrBuilder getAllocationRecordsOrBuil
       }
     
       public static final int ALLOCATOR_BYTES_IN_USE_FIELD_NUMBER = 5;
    -  private long allocatorBytesInUse_;
    +  private long allocatorBytesInUse_ = 0L;
       /**
        * 
        * These are snapshots of the overall allocator memory stats.
    @@ -214,8 +215,8 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(allocatorName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, allocatorName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(allocatorName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, allocatorName_);
         }
         if (totalBytes_ != 0L) {
           output.writeInt64(2, totalBytes_);
    @@ -241,8 +242,8 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(allocatorName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, allocatorName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(allocatorName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, allocatorName_);
         }
         if (totalBytes_ != 0L) {
           size += com.google.protobuf.CodedOutputStream
    @@ -359,39 +360,41 @@ public static org.tensorflow.proto.AllocatorMemoryUsed parseFrom(
       }
       public static org.tensorflow.proto.AllocatorMemoryUsed parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.AllocatorMemoryUsed parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.AllocatorMemoryUsed parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.AllocatorMemoryUsed parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.AllocatorMemoryUsed parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.AllocatorMemoryUsed parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -411,7 +414,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -419,7 +422,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.AllocatorMemoryUsed}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.AllocatorMemoryUsed)
           org.tensorflow.proto.AllocatorMemoryUsedOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -428,7 +431,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.StepStatsProtos.internal_static_tensorflow_AllocatorMemoryUsed_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -441,30 +444,26 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           allocatorName_ = "";
    -
           totalBytes_ = 0L;
    -
           peakBytes_ = 0L;
    -
           liveBytes_ = 0L;
    -
           if (allocationRecordsBuilder_ == null) {
             allocationRecords_ = java.util.Collections.emptyList();
           } else {
             allocationRecords_ = null;
             allocationRecordsBuilder_.clear();
           }
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      bitField0_ = (bitField0_ & ~0x00000010);
           allocatorBytesInUse_ = 0L;
    -
           return this;
         }
     
    @@ -491,57 +490,43 @@ public org.tensorflow.proto.AllocatorMemoryUsed build() {
         @java.lang.Override
         public org.tensorflow.proto.AllocatorMemoryUsed buildPartial() {
           org.tensorflow.proto.AllocatorMemoryUsed result = new org.tensorflow.proto.AllocatorMemoryUsed(this);
    -      int from_bitField0_ = bitField0_;
    -      result.allocatorName_ = allocatorName_;
    -      result.totalBytes_ = totalBytes_;
    -      result.peakBytes_ = peakBytes_;
    -      result.liveBytes_ = liveBytes_;
    +      buildPartialRepeatedFields(result);
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartialRepeatedFields(org.tensorflow.proto.AllocatorMemoryUsed result) {
           if (allocationRecordsBuilder_ == null) {
    -        if (((bitField0_ & 0x00000001) != 0)) {
    +        if (((bitField0_ & 0x00000010) != 0)) {
               allocationRecords_ = java.util.Collections.unmodifiableList(allocationRecords_);
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ = (bitField0_ & ~0x00000010);
             }
             result.allocationRecords_ = allocationRecords_;
           } else {
             result.allocationRecords_ = allocationRecordsBuilder_.build();
           }
    -      result.allocatorBytesInUse_ = allocatorBytesInUse_;
    -      onBuilt();
    -      return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.AllocatorMemoryUsed result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.allocatorName_ = allocatorName_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.totalBytes_ = totalBytes_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.peakBytes_ = peakBytes_;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.liveBytes_ = liveBytes_;
    +      }
    +      if (((from_bitField0_ & 0x00000020) != 0)) {
    +        result.allocatorBytesInUse_ = allocatorBytesInUse_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.AllocatorMemoryUsed) {
    @@ -556,6 +541,7 @@ public Builder mergeFrom(org.tensorflow.proto.AllocatorMemoryUsed other) {
           if (other == org.tensorflow.proto.AllocatorMemoryUsed.getDefaultInstance()) return this;
           if (!other.getAllocatorName().isEmpty()) {
             allocatorName_ = other.allocatorName_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (other.getTotalBytes() != 0L) {
    @@ -571,7 +557,7 @@ public Builder mergeFrom(org.tensorflow.proto.AllocatorMemoryUsed other) {
             if (!other.allocationRecords_.isEmpty()) {
               if (allocationRecords_.isEmpty()) {
                 allocationRecords_ = other.allocationRecords_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000010);
               } else {
                 ensureAllocationRecordsIsMutable();
                 allocationRecords_.addAll(other.allocationRecords_);
    @@ -584,9 +570,9 @@ public Builder mergeFrom(org.tensorflow.proto.AllocatorMemoryUsed other) {
                 allocationRecordsBuilder_.dispose();
                 allocationRecordsBuilder_ = null;
                 allocationRecords_ = other.allocationRecords_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000010);
                 allocationRecordsBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getAllocationRecordsFieldBuilder() : null;
               } else {
                 allocationRecordsBuilder_.addAllMessages(other.allocationRecords_);
    @@ -624,27 +610,27 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   allocatorName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 16: {
                   totalBytes_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 16
                 case 24: {
                   peakBytes_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 24
                 case 32: {
                   liveBytes_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 32
                 case 40: {
                   allocatorBytesInUse_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000020;
                   break;
                 } // case 40
                 case 50: {
    @@ -718,11 +704,9 @@ public java.lang.String getAllocatorName() {
          */
         public Builder setAllocatorName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           allocatorName_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -731,8 +715,8 @@ public Builder setAllocatorName(
          * @return This builder for chaining.
          */
         public Builder clearAllocatorName() {
    -      
           allocatorName_ = getDefaultInstance().getAllocatorName();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -743,12 +727,10 @@ public Builder clearAllocatorName() {
          */
         public Builder setAllocatorNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           allocatorName_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -776,8 +758,9 @@ public long getTotalBytes() {
          * @return This builder for chaining.
          */
         public Builder setTotalBytes(long value) {
    -      
    +
           totalBytes_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -790,7 +773,7 @@ public Builder setTotalBytes(long value) {
          * @return This builder for chaining.
          */
         public Builder clearTotalBytes() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000002);
           totalBytes_ = 0L;
           onChanged();
           return this;
    @@ -811,8 +794,9 @@ public long getPeakBytes() {
          * @return This builder for chaining.
          */
         public Builder setPeakBytes(long value) {
    -      
    +
           peakBytes_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -821,7 +805,7 @@ public Builder setPeakBytes(long value) {
          * @return This builder for chaining.
          */
         public Builder clearPeakBytes() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000004);
           peakBytes_ = 0L;
           onChanged();
           return this;
    @@ -850,8 +834,9 @@ public long getLiveBytes() {
          * @return This builder for chaining.
          */
         public Builder setLiveBytes(long value) {
    -      
    +
           liveBytes_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -864,7 +849,7 @@ public Builder setLiveBytes(long value) {
          * @return This builder for chaining.
          */
         public Builder clearLiveBytes() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000008);
           liveBytes_ = 0L;
           onChanged();
           return this;
    @@ -873,13 +858,13 @@ public Builder clearLiveBytes() {
         private java.util.List allocationRecords_ =
           java.util.Collections.emptyList();
         private void ensureAllocationRecordsIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    +      if (!((bitField0_ & 0x00000010) != 0)) {
             allocationRecords_ = new java.util.ArrayList(allocationRecords_);
    -        bitField0_ |= 0x00000001;
    +        bitField0_ |= 0x00000010;
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.AllocationRecord, org.tensorflow.proto.AllocationRecord.Builder, org.tensorflow.proto.AllocationRecordOrBuilder> allocationRecordsBuilder_;
     
         /**
    @@ -1069,7 +1054,7 @@ public Builder addAllAllocationRecords(
         public Builder clearAllocationRecords() {
           if (allocationRecordsBuilder_ == null) {
             allocationRecords_ = java.util.Collections.emptyList();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        bitField0_ = (bitField0_ & ~0x00000010);
             onChanged();
           } else {
             allocationRecordsBuilder_.clear();
    @@ -1167,14 +1152,14 @@ public org.tensorflow.proto.AllocationRecord.Builder addAllocationRecordsBuilder
              getAllocationRecordsBuilderList() {
           return getAllocationRecordsFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.AllocationRecord, org.tensorflow.proto.AllocationRecord.Builder, org.tensorflow.proto.AllocationRecordOrBuilder> 
             getAllocationRecordsFieldBuilder() {
           if (allocationRecordsBuilder_ == null) {
    -        allocationRecordsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        allocationRecordsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.AllocationRecord, org.tensorflow.proto.AllocationRecord.Builder, org.tensorflow.proto.AllocationRecordOrBuilder>(
                     allocationRecords_,
    -                ((bitField0_ & 0x00000001) != 0),
    +                ((bitField0_ & 0x00000010) != 0),
                     getParentForChildren(),
                     isClean());
             allocationRecords_ = null;
    @@ -1207,8 +1192,9 @@ public long getAllocatorBytesInUse() {
          * @return This builder for chaining.
          */
         public Builder setAllocatorBytesInUse(long value) {
    -      
    +
           allocatorBytesInUse_ = value;
    +      bitField0_ |= 0x00000020;
           onChanged();
           return this;
         }
    @@ -1222,23 +1208,11 @@ public Builder setAllocatorBytesInUse(long value) {
          * @return This builder for chaining.
          */
         public Builder clearAllocatorBytesInUse() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000020);
           allocatorBytesInUse_ = 0L;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.AllocatorMemoryUsed)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocatorMemoryUsedOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocatorMemoryUsedOrBuilder.java
    index 3b2bf3ec5f5..64564b22ffa 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocatorMemoryUsedOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocatorMemoryUsedOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/step_stats.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDef.java
    index 441f276d544..eba5e89cca2 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDef.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDef.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/api_def.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,10 +13,12 @@
      * to all client languages, and another set per client language.
      * The per-client-language ApiDefs will inherit values from the
      * common ApiDefs which it can either replace or modify.
    + *
      * We separate the API definition from the OpDef so we can evolve the
      * API while remaining backwards compatible when interpreting old
      * graphs.  Overrides go in an "api_def.pbtxt" file with a text-format
      * ApiDefs message.
    + *
      * WARNING: Be *very* careful changing the API for any existing op --
      * you can change the semantics of existing code.  These changes may
      * need to wait until a major release of TensorFlow to avoid breaking
    @@ -24,12 +28,21 @@
      * Protobuf type {@code tensorflow.ApiDef}
      */
     public final class ApiDef extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.ApiDef)
         ApiDefOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      ApiDef.class.getName());
    +  }
       // Use ApiDef.newBuilder() to construct.
    -  private ApiDef(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private ApiDef(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private ApiDef() {
    @@ -39,7 +52,8 @@ private ApiDef() {
         endpoint_ = java.util.Collections.emptyList();
         inArg_ = java.util.Collections.emptyList();
         outArg_ = java.util.Collections.emptyList();
    -    argOrder_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +    argOrder_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         attr_ = java.util.Collections.emptyList();
         summary_ = "";
         description_ = "";
    @@ -47,25 +61,13 @@ private ApiDef() {
         descriptionSuffix_ = "";
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new ApiDef();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.ApiDefProtos.internal_static_tensorflow_ApiDef_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.ApiDefProtos.internal_static_tensorflow_ApiDef_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -115,6 +117,15 @@ public enum Visibility
         UNRECOGNIZED(-1),
         ;
     
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        Visibility.class.getName());
    +    }
         /**
          * 
          * Normally this is "VISIBLE" unless you are inheriting a
    @@ -299,37 +310,34 @@ public interface EndpointOrBuilder extends
        * Protobuf type {@code tensorflow.ApiDef.Endpoint}
        */
       public static final class Endpoint extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.ApiDef.Endpoint)
           EndpointOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        Endpoint.class.getName());
    +    }
         // Use Endpoint.newBuilder() to construct.
    -    private Endpoint(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private Endpoint(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private Endpoint() {
           name_ = "";
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new Endpoint();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.ApiDefProtos.internal_static_tensorflow_ApiDef_Endpoint_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.ApiDefProtos.internal_static_tensorflow_ApiDef_Endpoint_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -337,7 +345,8 @@ protected java.lang.Object newInstance(
         }
     
         public static final int NAME_FIELD_NUMBER = 1;
    -    private volatile java.lang.Object name_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object name_ = "";
         /**
          * 
          * Name should be either like "CamelCaseName" or
    @@ -387,7 +396,7 @@ public java.lang.String getName() {
         }
     
         public static final int DEPRECATED_FIELD_NUMBER = 3;
    -    private boolean deprecated_;
    +    private boolean deprecated_ = false;
         /**
          * 
          * Set if this endpoint is deprecated. If set to true, a message suggesting
    @@ -404,7 +413,7 @@ public boolean getDeprecated() {
         }
     
         public static final int DEPRECATION_VERSION_FIELD_NUMBER = 4;
    -    private int deprecationVersion_;
    +    private int deprecationVersion_ = 0;
         /**
          * 
          * Major version when an endpoint will be deleted. For e.g. set this
    @@ -434,8 +443,8 @@ public final boolean isInitialized() {
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output)
                             throws java.io.IOException {
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
           }
           if (deprecated_ != false) {
             output.writeBool(3, deprecated_);
    @@ -452,8 +461,8 @@ public int getSerializedSize() {
           if (size != -1) return size;
     
           size = 0;
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
           }
           if (deprecated_ != false) {
             size += com.google.protobuf.CodedOutputStream
    @@ -541,39 +550,41 @@ public static org.tensorflow.proto.ApiDef.Endpoint parseFrom(
         }
         public static org.tensorflow.proto.ApiDef.Endpoint parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.ApiDef.Endpoint parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.ApiDef.Endpoint parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.ApiDef.Endpoint parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.ApiDef.Endpoint parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.ApiDef.Endpoint parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -593,7 +604,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -608,7 +619,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.ApiDef.Endpoint}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.ApiDef.Endpoint)
             org.tensorflow.proto.ApiDef.EndpointOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -617,7 +628,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.ApiDefProtos.internal_static_tensorflow_ApiDef_Endpoint_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -630,19 +641,17 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             name_ = "";
    -
             deprecated_ = false;
    -
             deprecationVersion_ = 0;
    -
             return this;
           }
     
    @@ -669,45 +678,24 @@ public org.tensorflow.proto.ApiDef.Endpoint build() {
           @java.lang.Override
           public org.tensorflow.proto.ApiDef.Endpoint buildPartial() {
             org.tensorflow.proto.ApiDef.Endpoint result = new org.tensorflow.proto.ApiDef.Endpoint(this);
    -        result.name_ = name_;
    -        result.deprecated_ = deprecated_;
    -        result.deprecationVersion_ = deprecationVersion_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.ApiDef.Endpoint result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.name_ = name_;
    +        }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.deprecated_ = deprecated_;
    +        }
    +        if (((from_bitField0_ & 0x00000004) != 0)) {
    +          result.deprecationVersion_ = deprecationVersion_;
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.ApiDef.Endpoint) {
    @@ -722,6 +710,7 @@ public Builder mergeFrom(org.tensorflow.proto.ApiDef.Endpoint other) {
             if (other == org.tensorflow.proto.ApiDef.Endpoint.getDefaultInstance()) return this;
             if (!other.getName().isEmpty()) {
               name_ = other.name_;
    +          bitField0_ |= 0x00000001;
               onChanged();
             }
             if (other.getDeprecated() != false) {
    @@ -758,17 +747,17 @@ public Builder mergeFrom(
                     break;
                   case 10: {
                     name_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 10
                   case 24: {
                     deprecated_ = input.readBool();
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 24
                   case 32: {
                     deprecationVersion_ = input.readInt32();
    -
    +                bitField0_ |= 0x00000004;
                     break;
                   } // case 32
                   default: {
    @@ -786,6 +775,7 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    +      private int bitField0_;
     
           private java.lang.Object name_ = "";
           /**
    @@ -846,11 +836,9 @@ public java.lang.String getName() {
            */
           public Builder setName(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             name_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -865,8 +853,8 @@ public Builder setName(
            * @return This builder for chaining.
            */
           public Builder clearName() {
    -        
             name_ = getDefaultInstance().getName();
    +        bitField0_ = (bitField0_ & ~0x00000001);
             onChanged();
             return this;
           }
    @@ -883,12 +871,10 @@ public Builder clearName() {
            */
           public Builder setNameBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             name_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -920,8 +906,9 @@ public boolean getDeprecated() {
            * @return This builder for chaining.
            */
           public Builder setDeprecated(boolean value) {
    -        
    +
             deprecated_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -936,7 +923,7 @@ public Builder setDeprecated(boolean value) {
            * @return This builder for chaining.
            */
           public Builder clearDeprecated() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000002);
             deprecated_ = false;
             onChanged();
             return this;
    @@ -969,8 +956,9 @@ public int getDeprecationVersion() {
            * @return This builder for chaining.
            */
           public Builder setDeprecationVersion(int value) {
    -        
    +
             deprecationVersion_ = value;
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -985,23 +973,11 @@ public Builder setDeprecationVersion(int value) {
            * @return This builder for chaining.
            */
           public Builder clearDeprecationVersion() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000004);
             deprecationVersion_ = 0;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.ApiDef.Endpoint)
         }
    @@ -1122,12 +1098,21 @@ public interface ArgOrBuilder extends
        * Protobuf type {@code tensorflow.ApiDef.Arg}
        */
       public static final class Arg extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.ApiDef.Arg)
           ArgOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        Arg.class.getName());
    +    }
         // Use Arg.newBuilder() to construct.
    -    private Arg(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private Arg(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private Arg() {
    @@ -1136,25 +1121,13 @@ private Arg() {
           description_ = "";
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new Arg();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.ApiDefProtos.internal_static_tensorflow_ApiDef_Arg_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.ApiDefProtos.internal_static_tensorflow_ApiDef_Arg_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -1162,7 +1135,8 @@ protected java.lang.Object newInstance(
         }
     
         public static final int NAME_FIELD_NUMBER = 1;
    -    private volatile java.lang.Object name_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object name_ = "";
         /**
          * string name = 1;
          * @return The name.
    @@ -1200,7 +1174,8 @@ public java.lang.String getName() {
         }
     
         public static final int RENAME_TO_FIELD_NUMBER = 2;
    -    private volatile java.lang.Object renameTo_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object renameTo_ = "";
         /**
          * 
          * Change the name used to access this arg in the API from what
    @@ -1250,7 +1225,8 @@ public java.lang.String getRenameTo() {
         }
     
         public static final int DESCRIPTION_FIELD_NUMBER = 3;
    -    private volatile java.lang.Object description_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object description_ = "";
         /**
          * 
          * Note: this will replace any inherited arg doc. There is no
    @@ -1313,14 +1289,14 @@ public final boolean isInitialized() {
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output)
                             throws java.io.IOException {
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(renameTo_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, renameTo_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(renameTo_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 2, renameTo_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 3, description_);
           }
           getUnknownFields().writeTo(output);
         }
    @@ -1331,14 +1307,14 @@ public int getSerializedSize() {
           if (size != -1) return size;
     
           size = 0;
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(renameTo_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, renameTo_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(renameTo_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, renameTo_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(3, description_);
           }
           size += getUnknownFields().getSerializedSize();
           memoizedSize = size;
    @@ -1417,39 +1393,41 @@ public static org.tensorflow.proto.ApiDef.Arg parseFrom(
         }
         public static org.tensorflow.proto.ApiDef.Arg parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.ApiDef.Arg parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.ApiDef.Arg parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.ApiDef.Arg parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.ApiDef.Arg parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.ApiDef.Arg parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -1469,7 +1447,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -1477,7 +1455,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.ApiDef.Arg}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.ApiDef.Arg)
             org.tensorflow.proto.ApiDef.ArgOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -1486,7 +1464,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.ApiDefProtos.internal_static_tensorflow_ApiDef_Arg_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -1499,19 +1477,17 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             name_ = "";
    -
             renameTo_ = "";
    -
             description_ = "";
    -
             return this;
           }
     
    @@ -1538,45 +1514,24 @@ public org.tensorflow.proto.ApiDef.Arg build() {
           @java.lang.Override
           public org.tensorflow.proto.ApiDef.Arg buildPartial() {
             org.tensorflow.proto.ApiDef.Arg result = new org.tensorflow.proto.ApiDef.Arg(this);
    -        result.name_ = name_;
    -        result.renameTo_ = renameTo_;
    -        result.description_ = description_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.ApiDef.Arg result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.name_ = name_;
    +        }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.renameTo_ = renameTo_;
    +        }
    +        if (((from_bitField0_ & 0x00000004) != 0)) {
    +          result.description_ = description_;
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.ApiDef.Arg) {
    @@ -1591,14 +1546,17 @@ public Builder mergeFrom(org.tensorflow.proto.ApiDef.Arg other) {
             if (other == org.tensorflow.proto.ApiDef.Arg.getDefaultInstance()) return this;
             if (!other.getName().isEmpty()) {
               name_ = other.name_;
    +          bitField0_ |= 0x00000001;
               onChanged();
             }
             if (!other.getRenameTo().isEmpty()) {
               renameTo_ = other.renameTo_;
    +          bitField0_ |= 0x00000002;
               onChanged();
             }
             if (!other.getDescription().isEmpty()) {
               description_ = other.description_;
    +          bitField0_ |= 0x00000004;
               onChanged();
             }
             this.mergeUnknownFields(other.getUnknownFields());
    @@ -1629,17 +1587,17 @@ public Builder mergeFrom(
                     break;
                   case 10: {
                     name_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 10
                   case 18: {
                     renameTo_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 18
                   case 26: {
                     description_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000004;
                     break;
                   } // case 26
                   default: {
    @@ -1657,6 +1615,7 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    +      private int bitField0_;
     
           private java.lang.Object name_ = "";
           /**
    @@ -1699,11 +1658,9 @@ public java.lang.String getName() {
            */
           public Builder setName(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             name_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -1712,8 +1669,8 @@ public Builder setName(
            * @return This builder for chaining.
            */
           public Builder clearName() {
    -        
             name_ = getDefaultInstance().getName();
    +        bitField0_ = (bitField0_ & ~0x00000001);
             onChanged();
             return this;
           }
    @@ -1724,12 +1681,10 @@ public Builder clearName() {
            */
           public Builder setNameBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             name_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -1793,11 +1748,9 @@ public java.lang.String getRenameTo() {
            */
           public Builder setRenameTo(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             renameTo_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -1812,8 +1765,8 @@ public Builder setRenameTo(
            * @return This builder for chaining.
            */
           public Builder clearRenameTo() {
    -        
             renameTo_ = getDefaultInstance().getRenameTo();
    +        bitField0_ = (bitField0_ & ~0x00000002);
             onChanged();
             return this;
           }
    @@ -1830,12 +1783,10 @@ public Builder clearRenameTo() {
            */
           public Builder setRenameToBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             renameTo_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -1899,11 +1850,9 @@ public java.lang.String getDescription() {
            */
           public Builder setDescription(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             description_ = value;
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -1918,8 +1867,8 @@ public Builder setDescription(
            * @return This builder for chaining.
            */
           public Builder clearDescription() {
    -        
             description_ = getDefaultInstance().getDescription();
    +        bitField0_ = (bitField0_ & ~0x00000004);
             onChanged();
             return this;
           }
    @@ -1936,27 +1885,13 @@ public Builder clearDescription() {
            */
           public Builder setDescriptionBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             description_ = value;
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.ApiDef.Arg)
         }
    @@ -2117,12 +2052,21 @@ public interface AttrOrBuilder extends
        * Protobuf type {@code tensorflow.ApiDef.Attr}
        */
       public static final class Attr extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.ApiDef.Attr)
           AttrOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        Attr.class.getName());
    +    }
         // Use Attr.newBuilder() to construct.
    -    private Attr(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private Attr(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private Attr() {
    @@ -2131,33 +2075,23 @@ private Attr() {
           description_ = "";
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new Attr();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.ApiDefProtos.internal_static_tensorflow_ApiDef_Attr_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.ApiDefProtos.internal_static_tensorflow_ApiDef_Attr_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
                   org.tensorflow.proto.ApiDef.Attr.class, org.tensorflow.proto.ApiDef.Attr.Builder.class);
         }
     
    +    private int bitField0_;
         public static final int NAME_FIELD_NUMBER = 1;
    -    private volatile java.lang.Object name_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object name_ = "";
         /**
          * string name = 1;
          * @return The name.
    @@ -2195,7 +2129,8 @@ public java.lang.String getName() {
         }
     
         public static final int RENAME_TO_FIELD_NUMBER = 2;
    -    private volatile java.lang.Object renameTo_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object renameTo_ = "";
         /**
          * 
          * Change the name used to access this attr in the API from what
    @@ -2259,7 +2194,7 @@ public java.lang.String getRenameTo() {
          */
         @java.lang.Override
         public boolean hasDefaultValue() {
    -      return defaultValue_ != null;
    +      return ((bitField0_ & 0x00000001) != 0);
         }
         /**
          * 
    @@ -2288,11 +2223,12 @@ public org.tensorflow.proto.AttrValue getDefaultValue() {
          */
         @java.lang.Override
         public org.tensorflow.proto.AttrValueOrBuilder getDefaultValueOrBuilder() {
    -      return getDefaultValue();
    +      return defaultValue_ == null ? org.tensorflow.proto.AttrValue.getDefaultInstance() : defaultValue_;
         }
     
         public static final int DESCRIPTION_FIELD_NUMBER = 4;
    -    private volatile java.lang.Object description_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object description_ = "";
         /**
          * 
          * Note: this will replace any inherited attr doc, there is no current
    @@ -2353,17 +2289,17 @@ public final boolean isInitialized() {
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output)
                             throws java.io.IOException {
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(renameTo_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, renameTo_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(renameTo_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 2, renameTo_);
           }
    -      if (defaultValue_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             output.writeMessage(3, getDefaultValue());
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 4, description_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 4, description_);
           }
           getUnknownFields().writeTo(output);
         }
    @@ -2374,18 +2310,18 @@ public int getSerializedSize() {
           if (size != -1) return size;
     
           size = 0;
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(renameTo_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, renameTo_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(renameTo_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, renameTo_);
           }
    -      if (defaultValue_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(3, getDefaultValue());
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, description_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(4, description_);
           }
           size += getUnknownFields().getSerializedSize();
           memoizedSize = size;
    @@ -2473,39 +2409,41 @@ public static org.tensorflow.proto.ApiDef.Attr parseFrom(
         }
         public static org.tensorflow.proto.ApiDef.Attr parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.ApiDef.Attr parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.ApiDef.Attr parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.ApiDef.Attr parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.ApiDef.Attr parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.ApiDef.Attr parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -2525,7 +2463,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -2539,7 +2477,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.ApiDef.Attr}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.ApiDef.Attr)
             org.tensorflow.proto.ApiDef.AttrOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -2548,7 +2486,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.ApiDefProtos.internal_static_tensorflow_ApiDef_Attr_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -2557,29 +2495,32 @@ public static final class Builder extends
     
           // Construct using org.tensorflow.proto.ApiDef.Attr.newBuilder()
           private Builder() {
    -
    +        maybeForceBuilderInitialization();
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
    -
    +        maybeForceBuilderInitialization();
    +      }
    +      private void maybeForceBuilderInitialization() {
    +        if (com.google.protobuf.GeneratedMessage
    +                .alwaysUseFieldBuilders) {
    +          getDefaultValueFieldBuilder();
    +        }
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             name_ = "";
    -
             renameTo_ = "";
    -
    -        if (defaultValueBuilder_ == null) {
    -          defaultValue_ = null;
    -        } else {
    -          defaultValue_ = null;
    +        defaultValue_ = null;
    +        if (defaultValueBuilder_ != null) {
    +          defaultValueBuilder_.dispose();
               defaultValueBuilder_ = null;
             }
             description_ = "";
    -
             return this;
           }
     
    @@ -2606,50 +2547,32 @@ public org.tensorflow.proto.ApiDef.Attr build() {
           @java.lang.Override
           public org.tensorflow.proto.ApiDef.Attr buildPartial() {
             org.tensorflow.proto.ApiDef.Attr result = new org.tensorflow.proto.ApiDef.Attr(this);
    -        result.name_ = name_;
    -        result.renameTo_ = renameTo_;
    -        if (defaultValueBuilder_ == null) {
    -          result.defaultValue_ = defaultValue_;
    -        } else {
    -          result.defaultValue_ = defaultValueBuilder_.build();
    -        }
    -        result.description_ = description_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.ApiDef.Attr result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.name_ = name_;
    +        }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.renameTo_ = renameTo_;
    +        }
    +        int to_bitField0_ = 0;
    +        if (((from_bitField0_ & 0x00000004) != 0)) {
    +          result.defaultValue_ = defaultValueBuilder_ == null
    +              ? defaultValue_
    +              : defaultValueBuilder_.build();
    +          to_bitField0_ |= 0x00000001;
    +        }
    +        if (((from_bitField0_ & 0x00000008) != 0)) {
    +          result.description_ = description_;
    +        }
    +        result.bitField0_ |= to_bitField0_;
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.ApiDef.Attr) {
    @@ -2664,10 +2587,12 @@ public Builder mergeFrom(org.tensorflow.proto.ApiDef.Attr other) {
             if (other == org.tensorflow.proto.ApiDef.Attr.getDefaultInstance()) return this;
             if (!other.getName().isEmpty()) {
               name_ = other.name_;
    +          bitField0_ |= 0x00000001;
               onChanged();
             }
             if (!other.getRenameTo().isEmpty()) {
               renameTo_ = other.renameTo_;
    +          bitField0_ |= 0x00000002;
               onChanged();
             }
             if (other.hasDefaultValue()) {
    @@ -2675,6 +2600,7 @@ public Builder mergeFrom(org.tensorflow.proto.ApiDef.Attr other) {
             }
             if (!other.getDescription().isEmpty()) {
               description_ = other.description_;
    +          bitField0_ |= 0x00000008;
               onChanged();
             }
             this.mergeUnknownFields(other.getUnknownFields());
    @@ -2705,24 +2631,24 @@ public Builder mergeFrom(
                     break;
                   case 10: {
                     name_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 10
                   case 18: {
                     renameTo_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 18
                   case 26: {
                     input.readMessage(
                         getDefaultValueFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00000004;
                     break;
                   } // case 26
                   case 34: {
                     description_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000008;
                     break;
                   } // case 34
                   default: {
    @@ -2740,6 +2666,7 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    +      private int bitField0_;
     
           private java.lang.Object name_ = "";
           /**
    @@ -2782,11 +2709,9 @@ public java.lang.String getName() {
            */
           public Builder setName(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             name_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -2795,8 +2720,8 @@ public Builder setName(
            * @return This builder for chaining.
            */
           public Builder clearName() {
    -        
             name_ = getDefaultInstance().getName();
    +        bitField0_ = (bitField0_ & ~0x00000001);
             onChanged();
             return this;
           }
    @@ -2807,12 +2732,10 @@ public Builder clearName() {
            */
           public Builder setNameBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             name_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -2876,11 +2799,9 @@ public java.lang.String getRenameTo() {
            */
           public Builder setRenameTo(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             renameTo_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -2895,8 +2816,8 @@ public Builder setRenameTo(
            * @return This builder for chaining.
            */
           public Builder clearRenameTo() {
    -        
             renameTo_ = getDefaultInstance().getRenameTo();
    +        bitField0_ = (bitField0_ & ~0x00000002);
             onChanged();
             return this;
           }
    @@ -2913,18 +2834,16 @@ public Builder clearRenameTo() {
            */
           public Builder setRenameToBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             renameTo_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
     
           private org.tensorflow.proto.AttrValue defaultValue_;
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.AttrValue, org.tensorflow.proto.AttrValue.Builder, org.tensorflow.proto.AttrValueOrBuilder> defaultValueBuilder_;
           /**
            * 
    @@ -2938,7 +2857,7 @@ public Builder setRenameToBytes(
            * @return Whether the defaultValue field is set.
            */
           public boolean hasDefaultValue() {
    -        return defaultValueBuilder_ != null || defaultValue_ != null;
    +        return ((bitField0_ & 0x00000004) != 0);
           }
           /**
            * 
    @@ -2974,11 +2893,11 @@ public Builder setDefaultValue(org.tensorflow.proto.AttrValue value) {
                 throw new NullPointerException();
               }
               defaultValue_ = value;
    -          onChanged();
             } else {
               defaultValueBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000004;
    +        onChanged();
             return this;
           }
           /**
    @@ -2995,11 +2914,11 @@ public Builder setDefaultValue(
               org.tensorflow.proto.AttrValue.Builder builderForValue) {
             if (defaultValueBuilder_ == null) {
               defaultValue_ = builderForValue.build();
    -          onChanged();
             } else {
               defaultValueBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000004;
    +        onChanged();
             return this;
           }
           /**
    @@ -3014,17 +2933,20 @@ public Builder setDefaultValue(
            */
           public Builder mergeDefaultValue(org.tensorflow.proto.AttrValue value) {
             if (defaultValueBuilder_ == null) {
    -          if (defaultValue_ != null) {
    -            defaultValue_ =
    -              org.tensorflow.proto.AttrValue.newBuilder(defaultValue_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000004) != 0) &&
    +            defaultValue_ != null &&
    +            defaultValue_ != org.tensorflow.proto.AttrValue.getDefaultInstance()) {
    +            getDefaultValueBuilder().mergeFrom(value);
               } else {
                 defaultValue_ = value;
               }
    -          onChanged();
             } else {
               defaultValueBuilder_.mergeFrom(value);
             }
    -
    +        if (defaultValue_ != null) {
    +          bitField0_ |= 0x00000004;
    +          onChanged();
    +        }
             return this;
           }
           /**
    @@ -3038,14 +2960,13 @@ public Builder mergeDefaultValue(org.tensorflow.proto.AttrValue value) {
            * .tensorflow.AttrValue default_value = 3;
            */
           public Builder clearDefaultValue() {
    -        if (defaultValueBuilder_ == null) {
    -          defaultValue_ = null;
    -          onChanged();
    -        } else {
    -          defaultValue_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000004);
    +        defaultValue_ = null;
    +        if (defaultValueBuilder_ != null) {
    +          defaultValueBuilder_.dispose();
               defaultValueBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
    @@ -3059,7 +2980,7 @@ public Builder clearDefaultValue() {
            * .tensorflow.AttrValue default_value = 3;
            */
           public org.tensorflow.proto.AttrValue.Builder getDefaultValueBuilder() {
    -        
    +        bitField0_ |= 0x00000004;
             onChanged();
             return getDefaultValueFieldBuilder().getBuilder();
           }
    @@ -3091,11 +3012,11 @@ public org.tensorflow.proto.AttrValueOrBuilder getDefaultValueOrBuilder() {
            *
            * .tensorflow.AttrValue default_value = 3;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.AttrValue, org.tensorflow.proto.AttrValue.Builder, org.tensorflow.proto.AttrValueOrBuilder> 
               getDefaultValueFieldBuilder() {
             if (defaultValueBuilder_ == null) {
    -          defaultValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          defaultValueBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.AttrValue, org.tensorflow.proto.AttrValue.Builder, org.tensorflow.proto.AttrValueOrBuilder>(
                       getDefaultValue(),
                       getParentForChildren(),
    @@ -3161,11 +3082,9 @@ public java.lang.String getDescription() {
            */
           public Builder setDescription(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             description_ = value;
    +        bitField0_ |= 0x00000008;
             onChanged();
             return this;
           }
    @@ -3179,8 +3098,8 @@ public Builder setDescription(
            * @return This builder for chaining.
            */
           public Builder clearDescription() {
    -        
             description_ = getDefaultInstance().getDescription();
    +        bitField0_ = (bitField0_ & ~0x00000008);
             onChanged();
             return this;
           }
    @@ -3196,27 +3115,13 @@ public Builder clearDescription() {
            */
           public Builder setDescriptionBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             description_ = value;
    +        bitField0_ |= 0x00000008;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.ApiDef.Attr)
         }
    @@ -3270,7 +3175,8 @@ public org.tensorflow.proto.ApiDef.Attr getDefaultInstanceForType() {
       }
     
       public static final int GRAPH_OP_NAME_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object graphOpName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object graphOpName_ = "";
       /**
        * 
        * Name of the op (in the OpDef) to specify the API for.
    @@ -3316,7 +3222,8 @@ public java.lang.String getGraphOpName() {
       }
     
       public static final int DEPRECATION_MESSAGE_FIELD_NUMBER = 12;
    -  private volatile java.lang.Object deprecationMessage_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object deprecationMessage_ = "";
       /**
        * 
        * If this op is deprecated, set deprecation message to the message
    @@ -3366,7 +3273,7 @@ public java.lang.String getDeprecationMessage() {
       }
     
       public static final int DEPRECATION_VERSION_FIELD_NUMBER = 13;
    -  private int deprecationVersion_;
    +  private int deprecationVersion_ = 0;
       /**
        * 
        * Major version when the op will be deleted. For e.g. set this
    @@ -3383,7 +3290,7 @@ public int getDeprecationVersion() {
       }
     
       public static final int VISIBILITY_FIELD_NUMBER = 2;
    -  private int visibility_;
    +  private int visibility_ = 0;
       /**
        * .tensorflow.ApiDef.Visibility visibility = 2;
        * @return The enum numeric value on the wire for visibility.
    @@ -3396,12 +3303,12 @@ public int getDeprecationVersion() {
        * @return The visibility.
        */
       @java.lang.Override public org.tensorflow.proto.ApiDef.Visibility getVisibility() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.ApiDef.Visibility result = org.tensorflow.proto.ApiDef.Visibility.valueOf(visibility_);
    +    org.tensorflow.proto.ApiDef.Visibility result = org.tensorflow.proto.ApiDef.Visibility.forNumber(visibility_);
         return result == null ? org.tensorflow.proto.ApiDef.Visibility.UNRECOGNIZED : result;
       }
     
       public static final int ENDPOINT_FIELD_NUMBER = 3;
    +  @SuppressWarnings("serial")
       private java.util.List endpoint_;
       /**
        * repeated .tensorflow.ApiDef.Endpoint endpoint = 3;
    @@ -3442,6 +3349,7 @@ public org.tensorflow.proto.ApiDef.EndpointOrBuilder getEndpointOrBuilder(
       }
     
       public static final int IN_ARG_FIELD_NUMBER = 4;
    +  @SuppressWarnings("serial")
       private java.util.List inArg_;
       /**
        * repeated .tensorflow.ApiDef.Arg in_arg = 4;
    @@ -3482,6 +3390,7 @@ public org.tensorflow.proto.ApiDef.ArgOrBuilder getInArgOrBuilder(
       }
     
       public static final int OUT_ARG_FIELD_NUMBER = 5;
    +  @SuppressWarnings("serial")
       private java.util.List outArg_;
       /**
        * repeated .tensorflow.ApiDef.Arg out_arg = 5;
    @@ -3522,7 +3431,9 @@ public org.tensorflow.proto.ApiDef.ArgOrBuilder getOutArgOrBuilder(
       }
     
       public static final int ARG_ORDER_FIELD_NUMBER = 11;
    -  private com.google.protobuf.LazyStringList argOrder_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.LazyStringArrayList argOrder_ =
    +      com.google.protobuf.LazyStringArrayList.emptyList();
       /**
        * 
        * List of original in_arg names to specify new argument order.
    @@ -3581,6 +3492,7 @@ public java.lang.String getArgOrder(int index) {
       }
     
       public static final int ATTR_FIELD_NUMBER = 6;
    +  @SuppressWarnings("serial")
       private java.util.List attr_;
       /**
        * repeated .tensorflow.ApiDef.Attr attr = 6;
    @@ -3621,7 +3533,8 @@ public org.tensorflow.proto.ApiDef.AttrOrBuilder getAttrOrBuilder(
       }
     
       public static final int SUMMARY_FIELD_NUMBER = 7;
    -  private volatile java.lang.Object summary_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object summary_ = "";
       /**
        * 
        * One-line human-readable description of what the Op does.
    @@ -3667,7 +3580,8 @@ public java.lang.String getSummary() {
       }
     
       public static final int DESCRIPTION_FIELD_NUMBER = 8;
    -  private volatile java.lang.Object description_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object description_ = "";
       /**
        * 
        * Additional, longer human-readable description of what the Op does.
    @@ -3713,7 +3627,8 @@ public java.lang.String getDescription() {
       }
     
       public static final int DESCRIPTION_PREFIX_FIELD_NUMBER = 9;
    -  private volatile java.lang.Object descriptionPrefix_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object descriptionPrefix_ = "";
       /**
        * 
        * Modify an existing/inherited description by adding text to the beginning
    @@ -3761,7 +3676,8 @@ public java.lang.String getDescriptionPrefix() {
       }
     
       public static final int DESCRIPTION_SUFFIX_FIELD_NUMBER = 10;
    -  private volatile java.lang.Object descriptionSuffix_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object descriptionSuffix_ = "";
       /**
        * string description_suffix = 10;
        * @return The descriptionSuffix.
    @@ -3812,8 +3728,8 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(graphOpName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, graphOpName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(graphOpName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, graphOpName_);
         }
         if (visibility_ != org.tensorflow.proto.ApiDef.Visibility.DEFAULT_VISIBILITY.getNumber()) {
           output.writeEnum(2, visibility_);
    @@ -3830,23 +3746,23 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         for (int i = 0; i < attr_.size(); i++) {
           output.writeMessage(6, attr_.get(i));
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(summary_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 7, summary_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(summary_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 7, summary_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 8, description_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 8, description_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(descriptionPrefix_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 9, descriptionPrefix_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(descriptionPrefix_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 9, descriptionPrefix_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(descriptionSuffix_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 10, descriptionSuffix_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(descriptionSuffix_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 10, descriptionSuffix_);
         }
         for (int i = 0; i < argOrder_.size(); i++) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 11, argOrder_.getRaw(i));
    +      com.google.protobuf.GeneratedMessage.writeString(output, 11, argOrder_.getRaw(i));
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deprecationMessage_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 12, deprecationMessage_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(deprecationMessage_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 12, deprecationMessage_);
         }
         if (deprecationVersion_ != 0) {
           output.writeInt32(13, deprecationVersion_);
    @@ -3860,8 +3776,8 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(graphOpName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, graphOpName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(graphOpName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, graphOpName_);
         }
         if (visibility_ != org.tensorflow.proto.ApiDef.Visibility.DEFAULT_VISIBILITY.getNumber()) {
           size += com.google.protobuf.CodedOutputStream
    @@ -3883,17 +3799,17 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(6, attr_.get(i));
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(summary_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, summary_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(summary_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(7, summary_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, description_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(8, description_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(descriptionPrefix_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, descriptionPrefix_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(descriptionPrefix_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(9, descriptionPrefix_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(descriptionSuffix_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, descriptionSuffix_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(descriptionSuffix_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(10, descriptionSuffix_);
         }
         {
           int dataSize = 0;
    @@ -3903,8 +3819,8 @@ public int getSerializedSize() {
           size += dataSize;
           size += 1 * getArgOrderList().size();
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deprecationMessage_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, deprecationMessage_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(deprecationMessage_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(12, deprecationMessage_);
         }
         if (deprecationVersion_ != 0) {
           size += com.google.protobuf.CodedOutputStream
    @@ -4036,39 +3952,41 @@ public static org.tensorflow.proto.ApiDef parseFrom(
       }
       public static org.tensorflow.proto.ApiDef parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.ApiDef parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.ApiDef parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.ApiDef parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.ApiDef parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.ApiDef parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -4088,7 +4006,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -4100,10 +4018,12 @@ protected Builder newBuilderForType(
        * to all client languages, and another set per client language.
        * The per-client-language ApiDefs will inherit values from the
        * common ApiDefs which it can either replace or modify.
    +   *
        * We separate the API definition from the OpDef so we can evolve the
        * API while remaining backwards compatible when interpreting old
        * graphs.  Overrides go in an "api_def.pbtxt" file with a text-format
        * ApiDefs message.
    +   *
        * WARNING: Be *very* careful changing the API for any existing op --
        * you can change the semantics of existing code.  These changes may
        * need to wait until a major release of TensorFlow to avoid breaking
    @@ -4113,7 +4033,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.ApiDef}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.ApiDef)
           org.tensorflow.proto.ApiDefOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -4122,7 +4042,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.ApiDefProtos.internal_static_tensorflow_ApiDef_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -4135,59 +4055,52 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           graphOpName_ = "";
    -
           deprecationMessage_ = "";
    -
           deprecationVersion_ = 0;
    -
           visibility_ = 0;
    -
           if (endpointBuilder_ == null) {
             endpoint_ = java.util.Collections.emptyList();
           } else {
             endpoint_ = null;
             endpointBuilder_.clear();
           }
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      bitField0_ = (bitField0_ & ~0x00000010);
           if (inArgBuilder_ == null) {
             inArg_ = java.util.Collections.emptyList();
           } else {
             inArg_ = null;
             inArgBuilder_.clear();
           }
    -      bitField0_ = (bitField0_ & ~0x00000002);
    +      bitField0_ = (bitField0_ & ~0x00000020);
           if (outArgBuilder_ == null) {
             outArg_ = java.util.Collections.emptyList();
           } else {
             outArg_ = null;
             outArgBuilder_.clear();
           }
    -      bitField0_ = (bitField0_ & ~0x00000004);
    -      argOrder_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000008);
    +      bitField0_ = (bitField0_ & ~0x00000040);
    +      argOrder_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
           if (attrBuilder_ == null) {
             attr_ = java.util.Collections.emptyList();
           } else {
             attr_ = null;
             attrBuilder_.clear();
           }
    -      bitField0_ = (bitField0_ & ~0x00000010);
    +      bitField0_ = (bitField0_ & ~0x00000100);
           summary_ = "";
    -
           description_ = "";
    -
           descriptionPrefix_ = "";
    -
           descriptionSuffix_ = "";
    -
           return this;
         }
     
    @@ -4214,92 +4127,83 @@ public org.tensorflow.proto.ApiDef build() {
         @java.lang.Override
         public org.tensorflow.proto.ApiDef buildPartial() {
           org.tensorflow.proto.ApiDef result = new org.tensorflow.proto.ApiDef(this);
    -      int from_bitField0_ = bitField0_;
    -      result.graphOpName_ = graphOpName_;
    -      result.deprecationMessage_ = deprecationMessage_;
    -      result.deprecationVersion_ = deprecationVersion_;
    -      result.visibility_ = visibility_;
    +      buildPartialRepeatedFields(result);
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartialRepeatedFields(org.tensorflow.proto.ApiDef result) {
           if (endpointBuilder_ == null) {
    -        if (((bitField0_ & 0x00000001) != 0)) {
    +        if (((bitField0_ & 0x00000010) != 0)) {
               endpoint_ = java.util.Collections.unmodifiableList(endpoint_);
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ = (bitField0_ & ~0x00000010);
             }
             result.endpoint_ = endpoint_;
           } else {
             result.endpoint_ = endpointBuilder_.build();
           }
           if (inArgBuilder_ == null) {
    -        if (((bitField0_ & 0x00000002) != 0)) {
    +        if (((bitField0_ & 0x00000020) != 0)) {
               inArg_ = java.util.Collections.unmodifiableList(inArg_);
    -          bitField0_ = (bitField0_ & ~0x00000002);
    +          bitField0_ = (bitField0_ & ~0x00000020);
             }
             result.inArg_ = inArg_;
           } else {
             result.inArg_ = inArgBuilder_.build();
           }
           if (outArgBuilder_ == null) {
    -        if (((bitField0_ & 0x00000004) != 0)) {
    +        if (((bitField0_ & 0x00000040) != 0)) {
               outArg_ = java.util.Collections.unmodifiableList(outArg_);
    -          bitField0_ = (bitField0_ & ~0x00000004);
    +          bitField0_ = (bitField0_ & ~0x00000040);
             }
             result.outArg_ = outArg_;
           } else {
             result.outArg_ = outArgBuilder_.build();
           }
    -      if (((bitField0_ & 0x00000008) != 0)) {
    -        argOrder_ = argOrder_.getUnmodifiableView();
    -        bitField0_ = (bitField0_ & ~0x00000008);
    -      }
    -      result.argOrder_ = argOrder_;
           if (attrBuilder_ == null) {
    -        if (((bitField0_ & 0x00000010) != 0)) {
    +        if (((bitField0_ & 0x00000100) != 0)) {
               attr_ = java.util.Collections.unmodifiableList(attr_);
    -          bitField0_ = (bitField0_ & ~0x00000010);
    +          bitField0_ = (bitField0_ & ~0x00000100);
             }
             result.attr_ = attr_;
           } else {
             result.attr_ = attrBuilder_.build();
           }
    -      result.summary_ = summary_;
    -      result.description_ = description_;
    -      result.descriptionPrefix_ = descriptionPrefix_;
    -      result.descriptionSuffix_ = descriptionSuffix_;
    -      onBuilt();
    -      return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.ApiDef result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.graphOpName_ = graphOpName_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.deprecationMessage_ = deprecationMessage_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.deprecationVersion_ = deprecationVersion_;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.visibility_ = visibility_;
    +      }
    +      if (((from_bitField0_ & 0x00000080) != 0)) {
    +        argOrder_.makeImmutable();
    +        result.argOrder_ = argOrder_;
    +      }
    +      if (((from_bitField0_ & 0x00000200) != 0)) {
    +        result.summary_ = summary_;
    +      }
    +      if (((from_bitField0_ & 0x00000400) != 0)) {
    +        result.description_ = description_;
    +      }
    +      if (((from_bitField0_ & 0x00000800) != 0)) {
    +        result.descriptionPrefix_ = descriptionPrefix_;
    +      }
    +      if (((from_bitField0_ & 0x00001000) != 0)) {
    +        result.descriptionSuffix_ = descriptionSuffix_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.ApiDef) {
    @@ -4314,10 +4218,12 @@ public Builder mergeFrom(org.tensorflow.proto.ApiDef other) {
           if (other == org.tensorflow.proto.ApiDef.getDefaultInstance()) return this;
           if (!other.getGraphOpName().isEmpty()) {
             graphOpName_ = other.graphOpName_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (!other.getDeprecationMessage().isEmpty()) {
             deprecationMessage_ = other.deprecationMessage_;
    +        bitField0_ |= 0x00000002;
             onChanged();
           }
           if (other.getDeprecationVersion() != 0) {
    @@ -4330,7 +4236,7 @@ public Builder mergeFrom(org.tensorflow.proto.ApiDef other) {
             if (!other.endpoint_.isEmpty()) {
               if (endpoint_.isEmpty()) {
                 endpoint_ = other.endpoint_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000010);
               } else {
                 ensureEndpointIsMutable();
                 endpoint_.addAll(other.endpoint_);
    @@ -4343,9 +4249,9 @@ public Builder mergeFrom(org.tensorflow.proto.ApiDef other) {
                 endpointBuilder_.dispose();
                 endpointBuilder_ = null;
                 endpoint_ = other.endpoint_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000010);
                 endpointBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getEndpointFieldBuilder() : null;
               } else {
                 endpointBuilder_.addAllMessages(other.endpoint_);
    @@ -4356,7 +4262,7 @@ public Builder mergeFrom(org.tensorflow.proto.ApiDef other) {
             if (!other.inArg_.isEmpty()) {
               if (inArg_.isEmpty()) {
                 inArg_ = other.inArg_;
    -            bitField0_ = (bitField0_ & ~0x00000002);
    +            bitField0_ = (bitField0_ & ~0x00000020);
               } else {
                 ensureInArgIsMutable();
                 inArg_.addAll(other.inArg_);
    @@ -4369,9 +4275,9 @@ public Builder mergeFrom(org.tensorflow.proto.ApiDef other) {
                 inArgBuilder_.dispose();
                 inArgBuilder_ = null;
                 inArg_ = other.inArg_;
    -            bitField0_ = (bitField0_ & ~0x00000002);
    +            bitField0_ = (bitField0_ & ~0x00000020);
                 inArgBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getInArgFieldBuilder() : null;
               } else {
                 inArgBuilder_.addAllMessages(other.inArg_);
    @@ -4382,7 +4288,7 @@ public Builder mergeFrom(org.tensorflow.proto.ApiDef other) {
             if (!other.outArg_.isEmpty()) {
               if (outArg_.isEmpty()) {
                 outArg_ = other.outArg_;
    -            bitField0_ = (bitField0_ & ~0x00000004);
    +            bitField0_ = (bitField0_ & ~0x00000040);
               } else {
                 ensureOutArgIsMutable();
                 outArg_.addAll(other.outArg_);
    @@ -4395,9 +4301,9 @@ public Builder mergeFrom(org.tensorflow.proto.ApiDef other) {
                 outArgBuilder_.dispose();
                 outArgBuilder_ = null;
                 outArg_ = other.outArg_;
    -            bitField0_ = (bitField0_ & ~0x00000004);
    +            bitField0_ = (bitField0_ & ~0x00000040);
                 outArgBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getOutArgFieldBuilder() : null;
               } else {
                 outArgBuilder_.addAllMessages(other.outArg_);
    @@ -4407,7 +4313,7 @@ public Builder mergeFrom(org.tensorflow.proto.ApiDef other) {
           if (!other.argOrder_.isEmpty()) {
             if (argOrder_.isEmpty()) {
               argOrder_ = other.argOrder_;
    -          bitField0_ = (bitField0_ & ~0x00000008);
    +          bitField0_ |= 0x00000080;
             } else {
               ensureArgOrderIsMutable();
               argOrder_.addAll(other.argOrder_);
    @@ -4418,7 +4324,7 @@ public Builder mergeFrom(org.tensorflow.proto.ApiDef other) {
             if (!other.attr_.isEmpty()) {
               if (attr_.isEmpty()) {
                 attr_ = other.attr_;
    -            bitField0_ = (bitField0_ & ~0x00000010);
    +            bitField0_ = (bitField0_ & ~0x00000100);
               } else {
                 ensureAttrIsMutable();
                 attr_.addAll(other.attr_);
    @@ -4431,9 +4337,9 @@ public Builder mergeFrom(org.tensorflow.proto.ApiDef other) {
                 attrBuilder_.dispose();
                 attrBuilder_ = null;
                 attr_ = other.attr_;
    -            bitField0_ = (bitField0_ & ~0x00000010);
    +            bitField0_ = (bitField0_ & ~0x00000100);
                 attrBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getAttrFieldBuilder() : null;
               } else {
                 attrBuilder_.addAllMessages(other.attr_);
    @@ -4442,18 +4348,22 @@ public Builder mergeFrom(org.tensorflow.proto.ApiDef other) {
           }
           if (!other.getSummary().isEmpty()) {
             summary_ = other.summary_;
    +        bitField0_ |= 0x00000200;
             onChanged();
           }
           if (!other.getDescription().isEmpty()) {
             description_ = other.description_;
    +        bitField0_ |= 0x00000400;
             onChanged();
           }
           if (!other.getDescriptionPrefix().isEmpty()) {
             descriptionPrefix_ = other.descriptionPrefix_;
    +        bitField0_ |= 0x00000800;
             onChanged();
           }
           if (!other.getDescriptionSuffix().isEmpty()) {
             descriptionSuffix_ = other.descriptionSuffix_;
    +        bitField0_ |= 0x00001000;
             onChanged();
           }
           this.mergeUnknownFields(other.getUnknownFields());
    @@ -4484,12 +4394,12 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   graphOpName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 16: {
                   visibility_ = input.readEnum();
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 16
                 case 26: {
    @@ -4546,22 +4456,22 @@ public Builder mergeFrom(
                 } // case 50
                 case 58: {
                   summary_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000200;
                   break;
                 } // case 58
                 case 66: {
                   description_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000400;
                   break;
                 } // case 66
                 case 74: {
                   descriptionPrefix_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000800;
                   break;
                 } // case 74
                 case 82: {
                   descriptionSuffix_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00001000;
                   break;
                 } // case 82
                 case 90: {
    @@ -4572,12 +4482,12 @@ public Builder mergeFrom(
                 } // case 90
                 case 98: {
                   deprecationMessage_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 98
                 case 104: {
                   deprecationVersion_ = input.readInt32();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 104
                 default: {
    @@ -4650,11 +4560,9 @@ public java.lang.String getGraphOpName() {
          */
         public Builder setGraphOpName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           graphOpName_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -4667,8 +4575,8 @@ public Builder setGraphOpName(
          * @return This builder for chaining.
          */
         public Builder clearGraphOpName() {
    -      
           graphOpName_ = getDefaultInstance().getGraphOpName();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -4683,12 +4591,10 @@ public Builder clearGraphOpName() {
          */
         public Builder setGraphOpNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           graphOpName_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -4752,11 +4658,9 @@ public java.lang.String getDeprecationMessage() {
          */
         public Builder setDeprecationMessage(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           deprecationMessage_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -4771,8 +4675,8 @@ public Builder setDeprecationMessage(
          * @return This builder for chaining.
          */
         public Builder clearDeprecationMessage() {
    -      
           deprecationMessage_ = getDefaultInstance().getDeprecationMessage();
    +      bitField0_ = (bitField0_ & ~0x00000002);
           onChanged();
           return this;
         }
    @@ -4789,12 +4693,10 @@ public Builder clearDeprecationMessage() {
          */
         public Builder setDeprecationMessageBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           deprecationMessage_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -4826,8 +4728,9 @@ public int getDeprecationVersion() {
          * @return This builder for chaining.
          */
         public Builder setDeprecationVersion(int value) {
    -      
    +
           deprecationVersion_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -4842,7 +4745,7 @@ public Builder setDeprecationVersion(int value) {
          * @return This builder for chaining.
          */
         public Builder clearDeprecationVersion() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000004);
           deprecationVersion_ = 0;
           onChanged();
           return this;
    @@ -4862,8 +4765,8 @@ public Builder clearDeprecationVersion() {
          * @return This builder for chaining.
          */
         public Builder setVisibilityValue(int value) {
    -      
           visibility_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -4873,8 +4776,7 @@ public Builder setVisibilityValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.ApiDef.Visibility getVisibility() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.ApiDef.Visibility result = org.tensorflow.proto.ApiDef.Visibility.valueOf(visibility_);
    +      org.tensorflow.proto.ApiDef.Visibility result = org.tensorflow.proto.ApiDef.Visibility.forNumber(visibility_);
           return result == null ? org.tensorflow.proto.ApiDef.Visibility.UNRECOGNIZED : result;
         }
         /**
    @@ -4886,7 +4788,7 @@ public Builder setVisibility(org.tensorflow.proto.ApiDef.Visibility value) {
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00000008;
           visibility_ = value.getNumber();
           onChanged();
           return this;
    @@ -4896,7 +4798,7 @@ public Builder setVisibility(org.tensorflow.proto.ApiDef.Visibility value) {
          * @return This builder for chaining.
          */
         public Builder clearVisibility() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000008);
           visibility_ = 0;
           onChanged();
           return this;
    @@ -4905,13 +4807,13 @@ public Builder clearVisibility() {
         private java.util.List endpoint_ =
           java.util.Collections.emptyList();
         private void ensureEndpointIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    +      if (!((bitField0_ & 0x00000010) != 0)) {
             endpoint_ = new java.util.ArrayList(endpoint_);
    -        bitField0_ |= 0x00000001;
    +        bitField0_ |= 0x00000010;
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.ApiDef.Endpoint, org.tensorflow.proto.ApiDef.Endpoint.Builder, org.tensorflow.proto.ApiDef.EndpointOrBuilder> endpointBuilder_;
     
         /**
    @@ -5057,7 +4959,7 @@ public Builder addAllEndpoint(
         public Builder clearEndpoint() {
           if (endpointBuilder_ == null) {
             endpoint_ = java.util.Collections.emptyList();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        bitField0_ = (bitField0_ & ~0x00000010);
             onChanged();
           } else {
             endpointBuilder_.clear();
    @@ -5127,14 +5029,14 @@ public org.tensorflow.proto.ApiDef.Endpoint.Builder addEndpointBuilder(
              getEndpointBuilderList() {
           return getEndpointFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.ApiDef.Endpoint, org.tensorflow.proto.ApiDef.Endpoint.Builder, org.tensorflow.proto.ApiDef.EndpointOrBuilder> 
             getEndpointFieldBuilder() {
           if (endpointBuilder_ == null) {
    -        endpointBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        endpointBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.ApiDef.Endpoint, org.tensorflow.proto.ApiDef.Endpoint.Builder, org.tensorflow.proto.ApiDef.EndpointOrBuilder>(
                     endpoint_,
    -                ((bitField0_ & 0x00000001) != 0),
    +                ((bitField0_ & 0x00000010) != 0),
                     getParentForChildren(),
                     isClean());
             endpoint_ = null;
    @@ -5145,13 +5047,13 @@ public org.tensorflow.proto.ApiDef.Endpoint.Builder addEndpointBuilder(
         private java.util.List inArg_ =
           java.util.Collections.emptyList();
         private void ensureInArgIsMutable() {
    -      if (!((bitField0_ & 0x00000002) != 0)) {
    +      if (!((bitField0_ & 0x00000020) != 0)) {
             inArg_ = new java.util.ArrayList(inArg_);
    -        bitField0_ |= 0x00000002;
    +        bitField0_ |= 0x00000020;
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.ApiDef.Arg, org.tensorflow.proto.ApiDef.Arg.Builder, org.tensorflow.proto.ApiDef.ArgOrBuilder> inArgBuilder_;
     
         /**
    @@ -5297,7 +5199,7 @@ public Builder addAllInArg(
         public Builder clearInArg() {
           if (inArgBuilder_ == null) {
             inArg_ = java.util.Collections.emptyList();
    -        bitField0_ = (bitField0_ & ~0x00000002);
    +        bitField0_ = (bitField0_ & ~0x00000020);
             onChanged();
           } else {
             inArgBuilder_.clear();
    @@ -5367,14 +5269,14 @@ public org.tensorflow.proto.ApiDef.Arg.Builder addInArgBuilder(
              getInArgBuilderList() {
           return getInArgFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.ApiDef.Arg, org.tensorflow.proto.ApiDef.Arg.Builder, org.tensorflow.proto.ApiDef.ArgOrBuilder> 
             getInArgFieldBuilder() {
           if (inArgBuilder_ == null) {
    -        inArgBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        inArgBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.ApiDef.Arg, org.tensorflow.proto.ApiDef.Arg.Builder, org.tensorflow.proto.ApiDef.ArgOrBuilder>(
                     inArg_,
    -                ((bitField0_ & 0x00000002) != 0),
    +                ((bitField0_ & 0x00000020) != 0),
                     getParentForChildren(),
                     isClean());
             inArg_ = null;
    @@ -5385,13 +5287,13 @@ public org.tensorflow.proto.ApiDef.Arg.Builder addInArgBuilder(
         private java.util.List outArg_ =
           java.util.Collections.emptyList();
         private void ensureOutArgIsMutable() {
    -      if (!((bitField0_ & 0x00000004) != 0)) {
    +      if (!((bitField0_ & 0x00000040) != 0)) {
             outArg_ = new java.util.ArrayList(outArg_);
    -        bitField0_ |= 0x00000004;
    +        bitField0_ |= 0x00000040;
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.ApiDef.Arg, org.tensorflow.proto.ApiDef.Arg.Builder, org.tensorflow.proto.ApiDef.ArgOrBuilder> outArgBuilder_;
     
         /**
    @@ -5537,7 +5439,7 @@ public Builder addAllOutArg(
         public Builder clearOutArg() {
           if (outArgBuilder_ == null) {
             outArg_ = java.util.Collections.emptyList();
    -        bitField0_ = (bitField0_ & ~0x00000004);
    +        bitField0_ = (bitField0_ & ~0x00000040);
             onChanged();
           } else {
             outArgBuilder_.clear();
    @@ -5607,14 +5509,14 @@ public org.tensorflow.proto.ApiDef.Arg.Builder addOutArgBuilder(
              getOutArgBuilderList() {
           return getOutArgFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.ApiDef.Arg, org.tensorflow.proto.ApiDef.Arg.Builder, org.tensorflow.proto.ApiDef.ArgOrBuilder> 
             getOutArgFieldBuilder() {
           if (outArgBuilder_ == null) {
    -        outArgBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        outArgBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.ApiDef.Arg, org.tensorflow.proto.ApiDef.Arg.Builder, org.tensorflow.proto.ApiDef.ArgOrBuilder>(
                     outArg_,
    -                ((bitField0_ & 0x00000004) != 0),
    +                ((bitField0_ & 0x00000040) != 0),
                     getParentForChildren(),
                     isClean());
             outArg_ = null;
    @@ -5622,12 +5524,13 @@ public org.tensorflow.proto.ApiDef.Arg.Builder addOutArgBuilder(
           return outArgBuilder_;
         }
     
    -    private com.google.protobuf.LazyStringList argOrder_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +    private com.google.protobuf.LazyStringArrayList argOrder_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         private void ensureArgOrderIsMutable() {
    -      if (!((bitField0_ & 0x00000008) != 0)) {
    +      if (!argOrder_.isModifiable()) {
             argOrder_ = new com.google.protobuf.LazyStringArrayList(argOrder_);
    -        bitField0_ |= 0x00000008;
    -       }
    +      }
    +      bitField0_ |= 0x00000080;
         }
         /**
          * 
    @@ -5641,7 +5544,8 @@ private void ensureArgOrderIsMutable() {
          */
         public com.google.protobuf.ProtocolStringList
             getArgOrderList() {
    -      return argOrder_.getUnmodifiableView();
    +      argOrder_.makeImmutable();
    +      return argOrder_;
         }
         /**
          * 
    @@ -5699,11 +5603,10 @@ public java.lang.String getArgOrder(int index) {
          */
         public Builder setArgOrder(
             int index, java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureArgOrderIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureArgOrderIsMutable();
           argOrder_.set(index, value);
    +      bitField0_ |= 0x00000080;
           onChanged();
           return this;
         }
    @@ -5720,11 +5623,10 @@ public Builder setArgOrder(
          */
         public Builder addArgOrder(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureArgOrderIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureArgOrderIsMutable();
           argOrder_.add(value);
    +      bitField0_ |= 0x00000080;
           onChanged();
           return this;
         }
    @@ -5744,6 +5646,7 @@ public Builder addAllArgOrder(
           ensureArgOrderIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, argOrder_);
    +      bitField0_ |= 0x00000080;
           onChanged();
           return this;
         }
    @@ -5758,8 +5661,9 @@ public Builder addAllArgOrder(
          * @return This builder for chaining.
          */
         public Builder clearArgOrder() {
    -      argOrder_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000008);
    +      argOrder_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
    +      bitField0_ = (bitField0_ & ~0x00000080);;
           onChanged();
           return this;
         }
    @@ -5776,12 +5680,11 @@ public Builder clearArgOrder() {
          */
         public Builder addArgOrderBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           ensureArgOrderIsMutable();
           argOrder_.add(value);
    +      bitField0_ |= 0x00000080;
           onChanged();
           return this;
         }
    @@ -5789,13 +5692,13 @@ public Builder addArgOrderBytes(
         private java.util.List attr_ =
           java.util.Collections.emptyList();
         private void ensureAttrIsMutable() {
    -      if (!((bitField0_ & 0x00000010) != 0)) {
    +      if (!((bitField0_ & 0x00000100) != 0)) {
             attr_ = new java.util.ArrayList(attr_);
    -        bitField0_ |= 0x00000010;
    +        bitField0_ |= 0x00000100;
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.ApiDef.Attr, org.tensorflow.proto.ApiDef.Attr.Builder, org.tensorflow.proto.ApiDef.AttrOrBuilder> attrBuilder_;
     
         /**
    @@ -5941,7 +5844,7 @@ public Builder addAllAttr(
         public Builder clearAttr() {
           if (attrBuilder_ == null) {
             attr_ = java.util.Collections.emptyList();
    -        bitField0_ = (bitField0_ & ~0x00000010);
    +        bitField0_ = (bitField0_ & ~0x00000100);
             onChanged();
           } else {
             attrBuilder_.clear();
    @@ -6011,14 +5914,14 @@ public org.tensorflow.proto.ApiDef.Attr.Builder addAttrBuilder(
              getAttrBuilderList() {
           return getAttrFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.ApiDef.Attr, org.tensorflow.proto.ApiDef.Attr.Builder, org.tensorflow.proto.ApiDef.AttrOrBuilder> 
             getAttrFieldBuilder() {
           if (attrBuilder_ == null) {
    -        attrBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        attrBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.ApiDef.Attr, org.tensorflow.proto.ApiDef.Attr.Builder, org.tensorflow.proto.ApiDef.AttrOrBuilder>(
                     attr_,
    -                ((bitField0_ & 0x00000010) != 0),
    +                ((bitField0_ & 0x00000100) != 0),
                     getParentForChildren(),
                     isClean());
             attr_ = null;
    @@ -6079,11 +5982,9 @@ public java.lang.String getSummary() {
          */
         public Builder setSummary(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           summary_ = value;
    +      bitField0_ |= 0x00000200;
           onChanged();
           return this;
         }
    @@ -6096,8 +5997,8 @@ public Builder setSummary(
          * @return This builder for chaining.
          */
         public Builder clearSummary() {
    -      
           summary_ = getDefaultInstance().getSummary();
    +      bitField0_ = (bitField0_ & ~0x00000200);
           onChanged();
           return this;
         }
    @@ -6112,12 +6013,10 @@ public Builder clearSummary() {
          */
         public Builder setSummaryBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           summary_ = value;
    +      bitField0_ |= 0x00000200;
           onChanged();
           return this;
         }
    @@ -6175,11 +6074,9 @@ public java.lang.String getDescription() {
          */
         public Builder setDescription(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           description_ = value;
    +      bitField0_ |= 0x00000400;
           onChanged();
           return this;
         }
    @@ -6192,8 +6089,8 @@ public Builder setDescription(
          * @return This builder for chaining.
          */
         public Builder clearDescription() {
    -      
           description_ = getDefaultInstance().getDescription();
    +      bitField0_ = (bitField0_ & ~0x00000400);
           onChanged();
           return this;
         }
    @@ -6208,12 +6105,10 @@ public Builder clearDescription() {
          */
         public Builder setDescriptionBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           description_ = value;
    +      bitField0_ |= 0x00000400;
           onChanged();
           return this;
         }
    @@ -6274,11 +6169,9 @@ public java.lang.String getDescriptionPrefix() {
          */
         public Builder setDescriptionPrefix(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           descriptionPrefix_ = value;
    +      bitField0_ |= 0x00000800;
           onChanged();
           return this;
         }
    @@ -6292,8 +6185,8 @@ public Builder setDescriptionPrefix(
          * @return This builder for chaining.
          */
         public Builder clearDescriptionPrefix() {
    -      
           descriptionPrefix_ = getDefaultInstance().getDescriptionPrefix();
    +      bitField0_ = (bitField0_ & ~0x00000800);
           onChanged();
           return this;
         }
    @@ -6309,12 +6202,10 @@ public Builder clearDescriptionPrefix() {
          */
         public Builder setDescriptionPrefixBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           descriptionPrefix_ = value;
    +      bitField0_ |= 0x00000800;
           onChanged();
           return this;
         }
    @@ -6360,11 +6251,9 @@ public java.lang.String getDescriptionSuffix() {
          */
         public Builder setDescriptionSuffix(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           descriptionSuffix_ = value;
    +      bitField0_ |= 0x00001000;
           onChanged();
           return this;
         }
    @@ -6373,8 +6262,8 @@ public Builder setDescriptionSuffix(
          * @return This builder for chaining.
          */
         public Builder clearDescriptionSuffix() {
    -      
           descriptionSuffix_ = getDefaultInstance().getDescriptionSuffix();
    +      bitField0_ = (bitField0_ & ~0x00001000);
           onChanged();
           return this;
         }
    @@ -6385,27 +6274,13 @@ public Builder clearDescriptionSuffix() {
          */
         public Builder setDescriptionSuffixBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           descriptionSuffix_ = value;
    +      bitField0_ |= 0x00001000;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.ApiDef)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDefOrBuilder.java
    index 388d57e8cd5..14dadfc1643 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDefOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDefOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/api_def.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDefProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDefProtos.java
    index 6c02e1f3125..8c7940039f2 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDefProtos.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDefProtos.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/api_def.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class ApiDefProtos {
       private ApiDefProtos() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      ApiDefProtos.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,27 +28,27 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_ApiDef_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_ApiDef_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_ApiDef_Endpoint_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_ApiDef_Endpoint_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_ApiDef_Arg_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_ApiDef_Arg_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_ApiDef_Attr_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_ApiDef_Attr_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_ApiDefs_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_ApiDefs_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -83,33 +94,34 @@ public static void registerAllExtensions(
         internal_static_tensorflow_ApiDef_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_ApiDef_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_ApiDef_descriptor,
             new java.lang.String[] { "GraphOpName", "DeprecationMessage", "DeprecationVersion", "Visibility", "Endpoint", "InArg", "OutArg", "ArgOrder", "Attr", "Summary", "Description", "DescriptionPrefix", "DescriptionSuffix", });
         internal_static_tensorflow_ApiDef_Endpoint_descriptor =
           internal_static_tensorflow_ApiDef_descriptor.getNestedTypes().get(0);
         internal_static_tensorflow_ApiDef_Endpoint_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_ApiDef_Endpoint_descriptor,
             new java.lang.String[] { "Name", "Deprecated", "DeprecationVersion", });
         internal_static_tensorflow_ApiDef_Arg_descriptor =
           internal_static_tensorflow_ApiDef_descriptor.getNestedTypes().get(1);
         internal_static_tensorflow_ApiDef_Arg_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_ApiDef_Arg_descriptor,
             new java.lang.String[] { "Name", "RenameTo", "Description", });
         internal_static_tensorflow_ApiDef_Attr_descriptor =
           internal_static_tensorflow_ApiDef_descriptor.getNestedTypes().get(2);
         internal_static_tensorflow_ApiDef_Attr_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_ApiDef_Attr_descriptor,
             new java.lang.String[] { "Name", "RenameTo", "DefaultValue", "Description", });
         internal_static_tensorflow_ApiDefs_descriptor =
           getDescriptor().getMessageTypes().get(1);
         internal_static_tensorflow_ApiDefs_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_ApiDefs_descriptor,
             new java.lang.String[] { "Op", });
    +    descriptor.resolveAllFeaturesImmutable();
         org.tensorflow.proto.AttrValueProtos.getDescriptor();
       }
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDefs.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDefs.java
    index 5df4db339f7..a260fd1794e 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDefs.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDefs.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/api_def.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,37 +9,34 @@
      * Protobuf type {@code tensorflow.ApiDefs}
      */
     public final class ApiDefs extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.ApiDefs)
         ApiDefsOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      ApiDefs.class.getName());
    +  }
       // Use ApiDefs.newBuilder() to construct.
    -  private ApiDefs(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private ApiDefs(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private ApiDefs() {
         op_ = java.util.Collections.emptyList();
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new ApiDefs();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.ApiDefProtos.internal_static_tensorflow_ApiDefs_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.ApiDefProtos.internal_static_tensorflow_ApiDefs_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -45,6 +44,7 @@ protected java.lang.Object newInstance(
       }
     
       public static final int OP_FIELD_NUMBER = 1;
    +  @SuppressWarnings("serial")
       private java.util.List op_;
       /**
        * repeated .tensorflow.ApiDef op = 1;
    @@ -185,39 +185,41 @@ public static org.tensorflow.proto.ApiDefs parseFrom(
       }
       public static org.tensorflow.proto.ApiDefs parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.ApiDefs parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.ApiDefs parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.ApiDefs parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.ApiDefs parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.ApiDefs parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -237,7 +239,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -245,7 +247,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.ApiDefs}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.ApiDefs)
           org.tensorflow.proto.ApiDefsOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -254,7 +256,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.ApiDefProtos.internal_static_tensorflow_ApiDefs_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -267,13 +269,14 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           if (opBuilder_ == null) {
             op_ = java.util.Collections.emptyList();
           } else {
    @@ -307,7 +310,13 @@ public org.tensorflow.proto.ApiDefs build() {
         @java.lang.Override
         public org.tensorflow.proto.ApiDefs buildPartial() {
           org.tensorflow.proto.ApiDefs result = new org.tensorflow.proto.ApiDefs(this);
    -      int from_bitField0_ = bitField0_;
    +      buildPartialRepeatedFields(result);
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartialRepeatedFields(org.tensorflow.proto.ApiDefs result) {
           if (opBuilder_ == null) {
             if (((bitField0_ & 0x00000001) != 0)) {
               op_ = java.util.Collections.unmodifiableList(op_);
    @@ -317,42 +326,12 @@ public org.tensorflow.proto.ApiDefs buildPartial() {
           } else {
             result.op_ = opBuilder_.build();
           }
    -      onBuilt();
    -      return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.ApiDefs result) {
    +      int from_bitField0_ = bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.ApiDefs) {
    @@ -384,7 +363,7 @@ public Builder mergeFrom(org.tensorflow.proto.ApiDefs other) {
                 op_ = other.op_;
                 bitField0_ = (bitField0_ & ~0x00000001);
                 opBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getOpFieldBuilder() : null;
               } else {
                 opBuilder_.addAllMessages(other.op_);
    @@ -456,7 +435,7 @@ private void ensureOpIsMutable() {
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.ApiDef, org.tensorflow.proto.ApiDef.Builder, org.tensorflow.proto.ApiDefOrBuilder> opBuilder_;
     
         /**
    @@ -672,11 +651,11 @@ public org.tensorflow.proto.ApiDef.Builder addOpBuilder(
              getOpBuilderList() {
           return getOpFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.ApiDef, org.tensorflow.proto.ApiDef.Builder, org.tensorflow.proto.ApiDefOrBuilder> 
             getOpFieldBuilder() {
           if (opBuilder_ == null) {
    -        opBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        opBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.ApiDef, org.tensorflow.proto.ApiDef.Builder, org.tensorflow.proto.ApiDefOrBuilder>(
                     op_,
                     ((bitField0_ & 0x00000001) != 0),
    @@ -686,18 +665,6 @@ public org.tensorflow.proto.ApiDef.Builder addOpBuilder(
           }
           return opBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.ApiDefs)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDefsOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDefsOrBuilder.java
    index 32127066fdd..b8ebc086863 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDefsOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDefsOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/api_def.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AssetFileDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AssetFileDef.java
    index a2f10f0252a..db61fe4a55e 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AssetFileDef.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AssetFileDef.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/meta_graph.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -12,43 +14,41 @@
      * Protobuf type {@code tensorflow.AssetFileDef}
      */
     public final class AssetFileDef extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.AssetFileDef)
         AssetFileDefOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      AssetFileDef.class.getName());
    +  }
       // Use AssetFileDef.newBuilder() to construct.
    -  private AssetFileDef(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private AssetFileDef(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private AssetFileDef() {
         filename_ = "";
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new AssetFileDef();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.MetaGraphProtos.internal_static_tensorflow_AssetFileDef_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.MetaGraphProtos.internal_static_tensorflow_AssetFileDef_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
                 org.tensorflow.proto.AssetFileDef.class, org.tensorflow.proto.AssetFileDef.Builder.class);
       }
     
    +  private int bitField0_;
       public static final int TENSOR_INFO_FIELD_NUMBER = 1;
       private org.tensorflow.proto.TensorInfo tensorInfo_;
       /**
    @@ -61,7 +61,7 @@ protected java.lang.Object newInstance(
        */
       @java.lang.Override
       public boolean hasTensorInfo() {
    -    return tensorInfo_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * 
    @@ -84,11 +84,12 @@ public org.tensorflow.proto.TensorInfo getTensorInfo() {
        */
       @java.lang.Override
       public org.tensorflow.proto.TensorInfoOrBuilder getTensorInfoOrBuilder() {
    -    return getTensorInfo();
    +    return tensorInfo_ == null ? org.tensorflow.proto.TensorInfo.getDefaultInstance() : tensorInfo_;
       }
     
       public static final int FILENAME_FIELD_NUMBER = 2;
    -  private volatile java.lang.Object filename_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object filename_ = "";
       /**
        * 
        * The filename within an assets directory. Note: does not include the path
    @@ -151,11 +152,11 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (tensorInfo_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(1, getTensorInfo());
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filename_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filename_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filename_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 2, filename_);
         }
         getUnknownFields().writeTo(output);
       }
    @@ -166,12 +167,12 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (tensorInfo_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(1, getTensorInfo());
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filename_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filename_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filename_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(2, filename_);
         }
         size += getUnknownFields().getSerializedSize();
         memoizedSize = size;
    @@ -251,39 +252,41 @@ public static org.tensorflow.proto.AssetFileDef parseFrom(
       }
       public static org.tensorflow.proto.AssetFileDef parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.AssetFileDef parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.AssetFileDef parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.AssetFileDef parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.AssetFileDef parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.AssetFileDef parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -303,7 +306,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -316,7 +319,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.AssetFileDef}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.AssetFileDef)
           org.tensorflow.proto.AssetFileDefOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -325,7 +328,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.MetaGraphProtos.internal_static_tensorflow_AssetFileDef_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -334,25 +337,30 @@ public static final class Builder extends
     
         // Construct using org.tensorflow.proto.AssetFileDef.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getTensorInfoFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    -      if (tensorInfoBuilder_ == null) {
    -        tensorInfo_ = null;
    -      } else {
    -        tensorInfo_ = null;
    +      bitField0_ = 0;
    +      tensorInfo_ = null;
    +      if (tensorInfoBuilder_ != null) {
    +        tensorInfoBuilder_.dispose();
             tensorInfoBuilder_ = null;
           }
           filename_ = "";
    -
           return this;
         }
     
    @@ -379,48 +387,26 @@ public org.tensorflow.proto.AssetFileDef build() {
         @java.lang.Override
         public org.tensorflow.proto.AssetFileDef buildPartial() {
           org.tensorflow.proto.AssetFileDef result = new org.tensorflow.proto.AssetFileDef(this);
    -      if (tensorInfoBuilder_ == null) {
    -        result.tensorInfo_ = tensorInfo_;
    -      } else {
    -        result.tensorInfo_ = tensorInfoBuilder_.build();
    -      }
    -      result.filename_ = filename_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.AssetFileDef result) {
    +      int from_bitField0_ = bitField0_;
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.tensorInfo_ = tensorInfoBuilder_ == null
    +            ? tensorInfo_
    +            : tensorInfoBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.filename_ = filename_;
    +      }
    +      result.bitField0_ |= to_bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.AssetFileDef) {
    @@ -438,6 +424,7 @@ public Builder mergeFrom(org.tensorflow.proto.AssetFileDef other) {
           }
           if (!other.getFilename().isEmpty()) {
             filename_ = other.filename_;
    +        bitField0_ |= 0x00000002;
             onChanged();
           }
           this.mergeUnknownFields(other.getUnknownFields());
    @@ -470,12 +457,12 @@ public Builder mergeFrom(
                   input.readMessage(
                       getTensorInfoFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
                   filename_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 default: {
    @@ -493,9 +480,10 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private org.tensorflow.proto.TensorInfo tensorInfo_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorInfo, org.tensorflow.proto.TensorInfo.Builder, org.tensorflow.proto.TensorInfoOrBuilder> tensorInfoBuilder_;
         /**
          * 
    @@ -506,7 +494,7 @@ public Builder mergeFrom(
          * @return Whether the tensorInfo field is set.
          */
         public boolean hasTensorInfo() {
    -      return tensorInfoBuilder_ != null || tensorInfo_ != null;
    +      return ((bitField0_ & 0x00000001) != 0);
         }
         /**
          * 
    @@ -536,11 +524,11 @@ public Builder setTensorInfo(org.tensorflow.proto.TensorInfo value) {
               throw new NullPointerException();
             }
             tensorInfo_ = value;
    -        onChanged();
           } else {
             tensorInfoBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000001;
    +      onChanged();
           return this;
         }
         /**
    @@ -554,11 +542,11 @@ public Builder setTensorInfo(
             org.tensorflow.proto.TensorInfo.Builder builderForValue) {
           if (tensorInfoBuilder_ == null) {
             tensorInfo_ = builderForValue.build();
    -        onChanged();
           } else {
             tensorInfoBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000001;
    +      onChanged();
           return this;
         }
         /**
    @@ -570,17 +558,20 @@ public Builder setTensorInfo(
          */
         public Builder mergeTensorInfo(org.tensorflow.proto.TensorInfo value) {
           if (tensorInfoBuilder_ == null) {
    -        if (tensorInfo_ != null) {
    -          tensorInfo_ =
    -            org.tensorflow.proto.TensorInfo.newBuilder(tensorInfo_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000001) != 0) &&
    +          tensorInfo_ != null &&
    +          tensorInfo_ != org.tensorflow.proto.TensorInfo.getDefaultInstance()) {
    +          getTensorInfoBuilder().mergeFrom(value);
             } else {
               tensorInfo_ = value;
             }
    -        onChanged();
           } else {
             tensorInfoBuilder_.mergeFrom(value);
           }
    -
    +      if (tensorInfo_ != null) {
    +        bitField0_ |= 0x00000001;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -591,14 +582,13 @@ public Builder mergeTensorInfo(org.tensorflow.proto.TensorInfo value) {
          * .tensorflow.TensorInfo tensor_info = 1;
          */
         public Builder clearTensorInfo() {
    -      if (tensorInfoBuilder_ == null) {
    -        tensorInfo_ = null;
    -        onChanged();
    -      } else {
    -        tensorInfo_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000001);
    +      tensorInfo_ = null;
    +      if (tensorInfoBuilder_ != null) {
    +        tensorInfoBuilder_.dispose();
             tensorInfoBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -609,7 +599,7 @@ public Builder clearTensorInfo() {
          * .tensorflow.TensorInfo tensor_info = 1;
          */
         public org.tensorflow.proto.TensorInfo.Builder getTensorInfoBuilder() {
    -      
    +      bitField0_ |= 0x00000001;
           onChanged();
           return getTensorInfoFieldBuilder().getBuilder();
         }
    @@ -635,11 +625,11 @@ public org.tensorflow.proto.TensorInfoOrBuilder getTensorInfoOrBuilder() {
          *
          * .tensorflow.TensorInfo tensor_info = 1;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorInfo, org.tensorflow.proto.TensorInfo.Builder, org.tensorflow.proto.TensorInfoOrBuilder> 
             getTensorInfoFieldBuilder() {
           if (tensorInfoBuilder_ == null) {
    -        tensorInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        tensorInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.TensorInfo, org.tensorflow.proto.TensorInfo.Builder, org.tensorflow.proto.TensorInfoOrBuilder>(
                     getTensorInfo(),
                     getParentForChildren(),
    @@ -708,11 +698,9 @@ public java.lang.String getFilename() {
          */
         public Builder setFilename(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           filename_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -727,8 +715,8 @@ public Builder setFilename(
          * @return This builder for chaining.
          */
         public Builder clearFilename() {
    -      
           filename_ = getDefaultInstance().getFilename();
    +      bitField0_ = (bitField0_ & ~0x00000002);
           onChanged();
           return this;
         }
    @@ -745,27 +733,13 @@ public Builder clearFilename() {
          */
         public Builder setFilenameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           filename_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.AssetFileDef)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AssetFileDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AssetFileDefOrBuilder.java
    index 48bf1b57107..52a03d57c0e 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AssetFileDefOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AssetFileDefOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/meta_graph.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AttrValue.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AttrValue.java
    index db04fce38a7..50282f98466 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AttrValue.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AttrValue.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/attr_value.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -13,36 +15,33 @@
      * Protobuf type {@code tensorflow.AttrValue}
      */
     public final class AttrValue extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.AttrValue)
         AttrValueOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      AttrValue.class.getName());
    +  }
       // Use AttrValue.newBuilder() to construct.
    -  private AttrValue(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private AttrValue(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private AttrValue() {
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new AttrValue();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.AttrValueProtos.internal_static_tensorflow_AttrValue_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.AttrValueProtos.internal_static_tensorflow_AttrValue_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -358,44 +357,41 @@ org.tensorflow.proto.NameAttrListOrBuilder getFuncOrBuilder(
        * Protobuf type {@code tensorflow.AttrValue.ListValue}
        */
       public static final class ListValue extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.AttrValue.ListValue)
           ListValueOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        ListValue.class.getName());
    +    }
         // Use ListValue.newBuilder() to construct.
    -    private ListValue(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private ListValue(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private ListValue() {
    -      s_ = java.util.Collections.emptyList();
    +      s_ = emptyList(com.google.protobuf.ByteString.class);
           i_ = emptyLongList();
           f_ = emptyFloatList();
           b_ = emptyBooleanList();
    -      type_ = java.util.Collections.emptyList();
    +      type_ = emptyIntList();
           shape_ = java.util.Collections.emptyList();
           tensor_ = java.util.Collections.emptyList();
           func_ = java.util.Collections.emptyList();
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new ListValue();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.AttrValueProtos.internal_static_tensorflow_AttrValue_ListValue_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.AttrValueProtos.internal_static_tensorflow_AttrValue_ListValue_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -403,7 +399,9 @@ protected java.lang.Object newInstance(
         }
     
         public static final int S_FIELD_NUMBER = 2;
    -    private java.util.List s_;
    +    @SuppressWarnings("serial")
    +    private com.google.protobuf.Internal.ProtobufList s_ =
    +        emptyList(com.google.protobuf.ByteString.class);
         /**
          * 
          * "list(string)"
    @@ -442,7 +440,9 @@ public com.google.protobuf.ByteString getS(int index) {
         }
     
         public static final int I_FIELD_NUMBER = 3;
    -    private com.google.protobuf.Internal.LongList i_;
    +    @SuppressWarnings("serial")
    +    private com.google.protobuf.Internal.LongList i_ =
    +        emptyLongList();
         /**
          * 
          * "list(int)"
    @@ -482,7 +482,9 @@ public long getI(int index) {
         private int iMemoizedSerializedSize = -1;
     
         public static final int F_FIELD_NUMBER = 4;
    -    private com.google.protobuf.Internal.FloatList f_;
    +    @SuppressWarnings("serial")
    +    private com.google.protobuf.Internal.FloatList f_ =
    +        emptyFloatList();
         /**
          * 
          * "list(float)"
    @@ -522,7 +524,9 @@ public float getF(int index) {
         private int fMemoizedSerializedSize = -1;
     
         public static final int B_FIELD_NUMBER = 5;
    -    private com.google.protobuf.Internal.BooleanList b_;
    +    @SuppressWarnings("serial")
    +    private com.google.protobuf.Internal.BooleanList b_ =
    +        emptyBooleanList();
         /**
          * 
          * "list(bool)"
    @@ -562,14 +566,14 @@ public boolean getB(int index) {
         private int bMemoizedSerializedSize = -1;
     
         public static final int TYPE_FIELD_NUMBER = 6;
    -    private java.util.List type_;
    -    private static final com.google.protobuf.Internal.ListAdapter.Converter<
    -        java.lang.Integer, org.tensorflow.proto.DataType> type_converter_ =
    -            new com.google.protobuf.Internal.ListAdapter.Converter<
    -                java.lang.Integer, org.tensorflow.proto.DataType>() {
    -              public org.tensorflow.proto.DataType convert(java.lang.Integer from) {
    -                @SuppressWarnings("deprecation")
    -                org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(from);
    +    @SuppressWarnings("serial")
    +    private com.google.protobuf.Internal.IntList type_;
    +    private static final com.google.protobuf.Internal.IntListAdapter.IntConverter<
    +        org.tensorflow.proto.DataType> type_converter_ =
    +            new com.google.protobuf.Internal.IntListAdapter.IntConverter<
    +                org.tensorflow.proto.DataType>() {
    +              public org.tensorflow.proto.DataType convert(int from) {
    +                org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(from);
                     return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
                   }
                 };
    @@ -583,8 +587,8 @@ public org.tensorflow.proto.DataType convert(java.lang.Integer from) {
          */
         @java.lang.Override
         public java.util.List getTypeList() {
    -      return new com.google.protobuf.Internal.ListAdapter<
    -          java.lang.Integer, org.tensorflow.proto.DataType>(type_, type_converter_);
    +      return new com.google.protobuf.Internal.IntListAdapter<
    +          org.tensorflow.proto.DataType>(type_, type_converter_);
         }
         /**
          * 
    @@ -609,7 +613,7 @@ public int getTypeCount() {
          */
         @java.lang.Override
         public org.tensorflow.proto.DataType getType(int index) {
    -      return type_converter_.convert(type_.get(index));
    +      return type_converter_.convert(type_.getInt(index));
         }
         /**
          * 
    @@ -635,11 +639,12 @@ public org.tensorflow.proto.DataType getType(int index) {
          */
         @java.lang.Override
         public int getTypeValue(int index) {
    -      return type_.get(index);
    +      return type_.getInt(index);
         }
         private int typeMemoizedSerializedSize;
     
         public static final int SHAPE_FIELD_NUMBER = 7;
    +    @SuppressWarnings("serial")
         private java.util.List shape_;
         /**
          * 
    @@ -700,6 +705,7 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder(
         }
     
         public static final int TENSOR_FIELD_NUMBER = 8;
    +    @SuppressWarnings("serial")
         private java.util.List tensor_;
         /**
          * 
    @@ -760,6 +766,7 @@ public org.tensorflow.proto.TensorProtoOrBuilder getTensorOrBuilder(
         }
     
         public static final int FUNC_FIELD_NUMBER = 9;
    +    @SuppressWarnings("serial")
         private java.util.List func_;
         /**
          * 
    @@ -863,7 +870,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
             output.writeUInt32NoTag(typeMemoizedSerializedSize);
           }
           for (int i = 0; i < type_.size(); i++) {
    -        output.writeEnumNoTag(type_.get(i));
    +        output.writeEnumNoTag(type_.getInt(i));
           }
           for (int i = 0; i < shape_.size(); i++) {
             output.writeMessage(7, shape_.get(i));
    @@ -932,7 +939,7 @@ public int getSerializedSize() {
             int dataSize = 0;
             for (int i = 0; i < type_.size(); i++) {
               dataSize += com.google.protobuf.CodedOutputStream
    -            .computeEnumSizeNoTag(type_.get(i));
    +            .computeEnumSizeNoTag(type_.getInt(i));
             }
             size += dataSize;
             if (!getTypeList().isEmpty()) {  size += 1;
    @@ -1064,39 +1071,41 @@ public static org.tensorflow.proto.AttrValue.ListValue parseFrom(
         }
         public static org.tensorflow.proto.AttrValue.ListValue parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.AttrValue.ListValue parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.AttrValue.ListValue parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.AttrValue.ListValue parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.AttrValue.ListValue parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.AttrValue.ListValue parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -1116,7 +1125,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -1128,7 +1137,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.AttrValue.ListValue}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.AttrValue.ListValue)
             org.tensorflow.proto.AttrValue.ListValueOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -1137,7 +1146,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.AttrValueProtos.internal_static_tensorflow_AttrValue_ListValue_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -1150,22 +1159,19 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    -        s_ = java.util.Collections.emptyList();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        bitField0_ = 0;
    +        s_ = emptyList(com.google.protobuf.ByteString.class);
             i_ = emptyLongList();
    -        bitField0_ = (bitField0_ & ~0x00000002);
             f_ = emptyFloatList();
    -        bitField0_ = (bitField0_ & ~0x00000004);
             b_ = emptyBooleanList();
    -        bitField0_ = (bitField0_ & ~0x00000008);
    -        type_ = java.util.Collections.emptyList();
    +        type_ = emptyIntList();
             bitField0_ = (bitField0_ & ~0x00000010);
             if (shapeBuilder_ == null) {
               shape_ = java.util.Collections.emptyList();
    @@ -1214,29 +1220,15 @@ public org.tensorflow.proto.AttrValue.ListValue build() {
           @java.lang.Override
           public org.tensorflow.proto.AttrValue.ListValue buildPartial() {
             org.tensorflow.proto.AttrValue.ListValue result = new org.tensorflow.proto.AttrValue.ListValue(this);
    -        int from_bitField0_ = bitField0_;
    -        if (((bitField0_ & 0x00000001) != 0)) {
    -          s_ = java.util.Collections.unmodifiableList(s_);
    -          bitField0_ = (bitField0_ & ~0x00000001);
    -        }
    -        result.s_ = s_;
    -        if (((bitField0_ & 0x00000002) != 0)) {
    -          i_.makeImmutable();
    -          bitField0_ = (bitField0_ & ~0x00000002);
    -        }
    -        result.i_ = i_;
    -        if (((bitField0_ & 0x00000004) != 0)) {
    -          f_.makeImmutable();
    -          bitField0_ = (bitField0_ & ~0x00000004);
    -        }
    -        result.f_ = f_;
    -        if (((bitField0_ & 0x00000008) != 0)) {
    -          b_.makeImmutable();
    -          bitField0_ = (bitField0_ & ~0x00000008);
    -        }
    -        result.b_ = b_;
    +        buildPartialRepeatedFields(result);
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        onBuilt();
    +        return result;
    +      }
    +
    +      private void buildPartialRepeatedFields(org.tensorflow.proto.AttrValue.ListValue result) {
             if (((bitField0_ & 0x00000010) != 0)) {
    -          type_ = java.util.Collections.unmodifiableList(type_);
    +          type_.makeImmutable();
               bitField0_ = (bitField0_ & ~0x00000010);
             }
             result.type_ = type_;
    @@ -1267,42 +1259,28 @@ public org.tensorflow.proto.AttrValue.ListValue buildPartial() {
             } else {
               result.func_ = funcBuilder_.build();
             }
    -        onBuilt();
    -        return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.AttrValue.ListValue result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          s_.makeImmutable();
    +          result.s_ = s_;
    +        }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          i_.makeImmutable();
    +          result.i_ = i_;
    +        }
    +        if (((from_bitField0_ & 0x00000004) != 0)) {
    +          f_.makeImmutable();
    +          result.f_ = f_;
    +        }
    +        if (((from_bitField0_ & 0x00000008) != 0)) {
    +          b_.makeImmutable();
    +          result.b_ = b_;
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.AttrValue.ListValue) {
    @@ -1318,7 +1296,8 @@ public Builder mergeFrom(org.tensorflow.proto.AttrValue.ListValue other) {
             if (!other.s_.isEmpty()) {
               if (s_.isEmpty()) {
                 s_ = other.s_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            s_.makeImmutable();
    +            bitField0_ |= 0x00000001;
               } else {
                 ensureSIsMutable();
                 s_.addAll(other.s_);
    @@ -1328,7 +1307,8 @@ public Builder mergeFrom(org.tensorflow.proto.AttrValue.ListValue other) {
             if (!other.i_.isEmpty()) {
               if (i_.isEmpty()) {
                 i_ = other.i_;
    -            bitField0_ = (bitField0_ & ~0x00000002);
    +            i_.makeImmutable();
    +            bitField0_ |= 0x00000002;
               } else {
                 ensureIIsMutable();
                 i_.addAll(other.i_);
    @@ -1338,7 +1318,8 @@ public Builder mergeFrom(org.tensorflow.proto.AttrValue.ListValue other) {
             if (!other.f_.isEmpty()) {
               if (f_.isEmpty()) {
                 f_ = other.f_;
    -            bitField0_ = (bitField0_ & ~0x00000004);
    +            f_.makeImmutable();
    +            bitField0_ |= 0x00000004;
               } else {
                 ensureFIsMutable();
                 f_.addAll(other.f_);
    @@ -1348,7 +1329,8 @@ public Builder mergeFrom(org.tensorflow.proto.AttrValue.ListValue other) {
             if (!other.b_.isEmpty()) {
               if (b_.isEmpty()) {
                 b_ = other.b_;
    -            bitField0_ = (bitField0_ & ~0x00000008);
    +            b_.makeImmutable();
    +            bitField0_ |= 0x00000008;
               } else {
                 ensureBIsMutable();
                 b_.addAll(other.b_);
    @@ -1384,7 +1366,7 @@ public Builder mergeFrom(org.tensorflow.proto.AttrValue.ListValue other) {
                   shape_ = other.shape_;
                   bitField0_ = (bitField0_ & ~0x00000020);
                   shapeBuilder_ = 
    -                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                        getShapeFieldBuilder() : null;
                 } else {
                   shapeBuilder_.addAllMessages(other.shape_);
    @@ -1410,7 +1392,7 @@ public Builder mergeFrom(org.tensorflow.proto.AttrValue.ListValue other) {
                   tensor_ = other.tensor_;
                   bitField0_ = (bitField0_ & ~0x00000040);
                   tensorBuilder_ = 
    -                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                        getTensorFieldBuilder() : null;
                 } else {
                   tensorBuilder_.addAllMessages(other.tensor_);
    @@ -1436,7 +1418,7 @@ public Builder mergeFrom(org.tensorflow.proto.AttrValue.ListValue other) {
                   func_ = other.func_;
                   bitField0_ = (bitField0_ & ~0x00000080);
                   funcBuilder_ = 
    -                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                        getFuncFieldBuilder() : null;
                 } else {
                   funcBuilder_.addAllMessages(other.func_);
    @@ -1500,7 +1482,8 @@ public Builder mergeFrom(
                   case 34: {
                     int length = input.readRawVarint32();
                     int limit = input.pushLimit(length);
    -                ensureFIsMutable();
    +                int alloc = length > 4096 ? 4096 : length;
    +                ensureFIsMutable(alloc / 4);
                     while (input.getBytesUntilLimit() > 0) {
                       f_.addFloat(input.readFloat());
                     }
    @@ -1516,7 +1499,8 @@ public Builder mergeFrom(
                   case 42: {
                     int length = input.readRawVarint32();
                     int limit = input.pushLimit(length);
    -                ensureBIsMutable();
    +                int alloc = length > 4096 ? 4096 : length;
    +                ensureBIsMutable(alloc / 1);
                     while (input.getBytesUntilLimit() > 0) {
                       b_.addBoolean(input.readBool());
                     }
    @@ -1526,7 +1510,7 @@ public Builder mergeFrom(
                   case 48: {
                     int tmpRaw = input.readEnum();
                     ensureTypeIsMutable();
    -                type_.add(tmpRaw);
    +                type_.addInt(tmpRaw);
                     break;
                   } // case 48
                   case 50: {
    @@ -1535,7 +1519,7 @@ public Builder mergeFrom(
                     while(input.getBytesUntilLimit() > 0) {
                       int tmpRaw = input.readEnum();
                       ensureTypeIsMutable();
    -                  type_.add(tmpRaw);
    +                  type_.addInt(tmpRaw);
                     }
                     input.popLimit(oldLimit);
                     break;
    @@ -1596,12 +1580,12 @@ public Builder mergeFrom(
           }
           private int bitField0_;
     
    -      private java.util.List s_ = java.util.Collections.emptyList();
    +      private com.google.protobuf.Internal.ProtobufList s_ = emptyList(com.google.protobuf.ByteString.class);
           private void ensureSIsMutable() {
    -        if (!((bitField0_ & 0x00000001) != 0)) {
    -          s_ = new java.util.ArrayList(s_);
    -          bitField0_ |= 0x00000001;
    -         }
    +        if (!s_.isModifiable()) {
    +          s_ = makeMutableCopy(s_);
    +        }
    +        bitField0_ |= 0x00000001;
           }
           /**
            * 
    @@ -1613,8 +1597,8 @@ private void ensureSIsMutable() {
            */
           public java.util.List
               getSList() {
    -        return ((bitField0_ & 0x00000001) != 0) ?
    -                 java.util.Collections.unmodifiableList(s_) : s_;
    +        s_.makeImmutable();
    +        return s_;
           }
           /**
            * 
    @@ -1651,11 +1635,10 @@ public com.google.protobuf.ByteString getS(int index) {
            */
           public Builder setS(
               int index, com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureSIsMutable();
    +        if (value == null) { throw new NullPointerException(); }
    +        ensureSIsMutable();
             s_.set(index, value);
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -1669,11 +1652,10 @@ public Builder setS(
            * @return This builder for chaining.
            */
           public Builder addS(com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureSIsMutable();
    +        if (value == null) { throw new NullPointerException(); }
    +        ensureSIsMutable();
             s_.add(value);
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -1691,6 +1673,7 @@ public Builder addAllS(
             ensureSIsMutable();
             com.google.protobuf.AbstractMessageLite.Builder.addAll(
                 values, s_);
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -1703,7 +1686,7 @@ public Builder addAllS(
            * @return This builder for chaining.
            */
           public Builder clearS() {
    -        s_ = java.util.Collections.emptyList();
    +        s_ = emptyList(com.google.protobuf.ByteString.class);
             bitField0_ = (bitField0_ & ~0x00000001);
             onChanged();
             return this;
    @@ -1711,10 +1694,10 @@ public Builder clearS() {
     
           private com.google.protobuf.Internal.LongList i_ = emptyLongList();
           private void ensureIIsMutable() {
    -        if (!((bitField0_ & 0x00000002) != 0)) {
    -          i_ = mutableCopy(i_);
    -          bitField0_ |= 0x00000002;
    -         }
    +        if (!i_.isModifiable()) {
    +          i_ = makeMutableCopy(i_);
    +        }
    +        bitField0_ |= 0x00000002;
           }
           /**
            * 
    @@ -1726,8 +1709,8 @@ private void ensureIIsMutable() {
            */
           public java.util.List
               getIList() {
    -        return ((bitField0_ & 0x00000002) != 0) ?
    -                 java.util.Collections.unmodifiableList(i_) : i_;
    +        i_.makeImmutable();
    +        return i_;
           }
           /**
            * 
    @@ -1764,8 +1747,10 @@ public long getI(int index) {
            */
           public Builder setI(
               int index, long value) {
    +
             ensureIIsMutable();
             i_.setLong(index, value);
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -1779,8 +1764,10 @@ public Builder setI(
            * @return This builder for chaining.
            */
           public Builder addI(long value) {
    +
             ensureIIsMutable();
             i_.addLong(value);
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -1798,6 +1785,7 @@ public Builder addAllI(
             ensureIIsMutable();
             com.google.protobuf.AbstractMessageLite.Builder.addAll(
                 values, i_);
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -1818,10 +1806,16 @@ public Builder clearI() {
     
           private com.google.protobuf.Internal.FloatList f_ = emptyFloatList();
           private void ensureFIsMutable() {
    -        if (!((bitField0_ & 0x00000004) != 0)) {
    -          f_ = mutableCopy(f_);
    -          bitField0_ |= 0x00000004;
    -         }
    +        if (!f_.isModifiable()) {
    +          f_ = makeMutableCopy(f_);
    +        }
    +        bitField0_ |= 0x00000004;
    +      }
    +      private void ensureFIsMutable(int capacity) {
    +        if (!f_.isModifiable()) {
    +          f_ = makeMutableCopy(f_, capacity);
    +        }
    +        bitField0_ |= 0x00000004;
           }
           /**
            * 
    @@ -1833,8 +1827,8 @@ private void ensureFIsMutable() {
            */
           public java.util.List
               getFList() {
    -        return ((bitField0_ & 0x00000004) != 0) ?
    -                 java.util.Collections.unmodifiableList(f_) : f_;
    +        f_.makeImmutable();
    +        return f_;
           }
           /**
            * 
    @@ -1871,8 +1865,10 @@ public float getF(int index) {
            */
           public Builder setF(
               int index, float value) {
    +
             ensureFIsMutable();
             f_.setFloat(index, value);
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -1886,8 +1882,10 @@ public Builder setF(
            * @return This builder for chaining.
            */
           public Builder addF(float value) {
    +
             ensureFIsMutable();
             f_.addFloat(value);
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -1905,6 +1903,7 @@ public Builder addAllF(
             ensureFIsMutable();
             com.google.protobuf.AbstractMessageLite.Builder.addAll(
                 values, f_);
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -1925,10 +1924,16 @@ public Builder clearF() {
     
           private com.google.protobuf.Internal.BooleanList b_ = emptyBooleanList();
           private void ensureBIsMutable() {
    -        if (!((bitField0_ & 0x00000008) != 0)) {
    -          b_ = mutableCopy(b_);
    -          bitField0_ |= 0x00000008;
    -         }
    +        if (!b_.isModifiable()) {
    +          b_ = makeMutableCopy(b_);
    +        }
    +        bitField0_ |= 0x00000008;
    +      }
    +      private void ensureBIsMutable(int capacity) {
    +        if (!b_.isModifiable()) {
    +          b_ = makeMutableCopy(b_, capacity);
    +        }
    +        bitField0_ |= 0x00000008;
           }
           /**
            * 
    @@ -1940,8 +1945,8 @@ private void ensureBIsMutable() {
            */
           public java.util.List
               getBList() {
    -        return ((bitField0_ & 0x00000008) != 0) ?
    -                 java.util.Collections.unmodifiableList(b_) : b_;
    +        b_.makeImmutable();
    +        return b_;
           }
           /**
            * 
    @@ -1978,8 +1983,10 @@ public boolean getB(int index) {
            */
           public Builder setB(
               int index, boolean value) {
    +
             ensureBIsMutable();
             b_.setBoolean(index, value);
    +        bitField0_ |= 0x00000008;
             onChanged();
             return this;
           }
    @@ -1993,8 +2000,10 @@ public Builder setB(
            * @return This builder for chaining.
            */
           public Builder addB(boolean value) {
    +
             ensureBIsMutable();
             b_.addBoolean(value);
    +        bitField0_ |= 0x00000008;
             onChanged();
             return this;
           }
    @@ -2012,6 +2021,7 @@ public Builder addAllB(
             ensureBIsMutable();
             com.google.protobuf.AbstractMessageLite.Builder.addAll(
                 values, b_);
    +        bitField0_ |= 0x00000008;
             onChanged();
             return this;
           }
    @@ -2030,11 +2040,11 @@ public Builder clearB() {
             return this;
           }
     
    -      private java.util.List type_ =
    -        java.util.Collections.emptyList();
    +      private com.google.protobuf.Internal.IntList type_ =
    +        emptyIntList();
           private void ensureTypeIsMutable() {
             if (!((bitField0_ & 0x00000010) != 0)) {
    -          type_ = new java.util.ArrayList(type_);
    +          type_ = makeMutableCopy(type_);
               bitField0_ |= 0x00000010;
             }
           }
    @@ -2047,8 +2057,8 @@ private void ensureTypeIsMutable() {
            * @return A list containing the type.
            */
           public java.util.List getTypeList() {
    -        return new com.google.protobuf.Internal.ListAdapter<
    -            java.lang.Integer, org.tensorflow.proto.DataType>(type_, type_converter_);
    +        return new com.google.protobuf.Internal.IntListAdapter<
    +            org.tensorflow.proto.DataType>(type_, type_converter_);
           }
           /**
            * 
    @@ -2071,7 +2081,7 @@ public int getTypeCount() {
            * @return The type at the given index.
            */
           public org.tensorflow.proto.DataType getType(int index) {
    -        return type_converter_.convert(type_.get(index));
    +        return type_converter_.convert(type_.getInt(index));
           }
           /**
            * 
    @@ -2089,7 +2099,7 @@ public Builder setType(
               throw new NullPointerException();
             }
             ensureTypeIsMutable();
    -        type_.set(index, value.getNumber());
    +        type_.setInt(index, value.getNumber());
             onChanged();
             return this;
           }
    @@ -2107,7 +2117,7 @@ public Builder addType(org.tensorflow.proto.DataType value) {
               throw new NullPointerException();
             }
             ensureTypeIsMutable();
    -        type_.add(value.getNumber());
    +        type_.addInt(value.getNumber());
             onChanged();
             return this;
           }
    @@ -2124,7 +2134,7 @@ public Builder addAllType(
               java.lang.Iterable values) {
             ensureTypeIsMutable();
             for (org.tensorflow.proto.DataType value : values) {
    -          type_.add(value.getNumber());
    +          type_.addInt(value.getNumber());
             }
             onChanged();
             return this;
    @@ -2138,7 +2148,7 @@ public Builder addAllType(
            * @return This builder for chaining.
            */
           public Builder clearType() {
    -        type_ = java.util.Collections.emptyList();
    +        type_ = emptyIntList();
             bitField0_ = (bitField0_ & ~0x00000010);
             onChanged();
             return this;
    @@ -2165,7 +2175,7 @@ public Builder clearType() {
            * @return The enum numeric value on the wire of type at the given index.
            */
           public int getTypeValue(int index) {
    -        return type_.get(index);
    +        return type_.getInt(index);
           }
           /**
            * 
    @@ -2180,7 +2190,7 @@ public int getTypeValue(int index) {
           public Builder setTypeValue(
               int index, int value) {
             ensureTypeIsMutable();
    -        type_.set(index, value);
    +        type_.setInt(index, value);
             onChanged();
             return this;
           }
    @@ -2195,7 +2205,7 @@ public Builder setTypeValue(
            */
           public Builder addTypeValue(int value) {
             ensureTypeIsMutable();
    -        type_.add(value);
    +        type_.addInt(value);
             onChanged();
             return this;
           }
    @@ -2212,7 +2222,7 @@ public Builder addAllTypeValue(
               java.lang.Iterable values) {
             ensureTypeIsMutable();
             for (int value : values) {
    -          type_.add(value);
    +          type_.addInt(value);
             }
             onChanged();
             return this;
    @@ -2227,7 +2237,7 @@ private void ensureShapeIsMutable() {
              }
           }
     
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> shapeBuilder_;
     
           /**
    @@ -2515,11 +2525,11 @@ public org.tensorflow.proto.TensorShapeProto.Builder addShapeBuilder(
                getShapeBuilderList() {
             return getShapeFieldBuilder().getBuilderList();
           }
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> 
               getShapeFieldBuilder() {
             if (shapeBuilder_ == null) {
    -          shapeBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +          shapeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                   org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder>(
                       shape_,
                       ((bitField0_ & 0x00000020) != 0),
    @@ -2539,7 +2549,7 @@ private void ensureTensorIsMutable() {
              }
           }
     
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> tensorBuilder_;
     
           /**
    @@ -2827,11 +2837,11 @@ public org.tensorflow.proto.TensorProto.Builder addTensorBuilder(
                getTensorBuilderList() {
             return getTensorFieldBuilder().getBuilderList();
           }
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> 
               getTensorFieldBuilder() {
             if (tensorBuilder_ == null) {
    -          tensorBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +          tensorBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                   org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder>(
                       tensor_,
                       ((bitField0_ & 0x00000040) != 0),
    @@ -2851,7 +2861,7 @@ private void ensureFuncIsMutable() {
              }
           }
     
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.NameAttrList, org.tensorflow.proto.NameAttrList.Builder, org.tensorflow.proto.NameAttrListOrBuilder> funcBuilder_;
     
           /**
    @@ -3139,11 +3149,11 @@ public org.tensorflow.proto.NameAttrList.Builder addFuncBuilder(
                getFuncBuilderList() {
             return getFuncFieldBuilder().getBuilderList();
           }
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.NameAttrList, org.tensorflow.proto.NameAttrList.Builder, org.tensorflow.proto.NameAttrListOrBuilder> 
               getFuncFieldBuilder() {
             if (funcBuilder_ == null) {
    -          funcBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +          funcBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                   org.tensorflow.proto.NameAttrList, org.tensorflow.proto.NameAttrList.Builder, org.tensorflow.proto.NameAttrListOrBuilder>(
                       func_,
                       ((bitField0_ & 0x00000080) != 0),
    @@ -3153,18 +3163,6 @@ public org.tensorflow.proto.NameAttrList.Builder addFuncBuilder(
             }
             return funcBuilder_;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.AttrValue.ListValue)
         }
    @@ -3218,6 +3216,7 @@ public org.tensorflow.proto.AttrValue.ListValue getDefaultInstanceForType() {
       }
     
       private int valueCase_ = 0;
    +  @SuppressWarnings("serial")
       private java.lang.Object value_;
       public enum ValueCase
           implements com.google.protobuf.Internal.EnumLite,
    @@ -3426,8 +3425,7 @@ public int getTypeValue() {
        */
       public org.tensorflow.proto.DataType getType() {
         if (valueCase_ == 6) {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(
    +      org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(
               (java.lang.Integer) value_);
           return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
         }
    @@ -3740,7 +3738,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           output.writeMessage(8, (org.tensorflow.proto.TensorProto) value_);
         }
         if (valueCase_ == 9) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 9, value_);
    +      com.google.protobuf.GeneratedMessage.writeString(output, 9, value_);
         }
         if (valueCase_ == 10) {
           output.writeMessage(10, (org.tensorflow.proto.NameAttrList) value_);
    @@ -3791,7 +3789,7 @@ public int getSerializedSize() {
             .computeMessageSize(8, (org.tensorflow.proto.TensorProto) value_);
         }
         if (valueCase_ == 9) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, value_);
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(9, value_);
         }
         if (valueCase_ == 10) {
           size += com.google.protobuf.CodedOutputStream
    @@ -3955,39 +3953,41 @@ public static org.tensorflow.proto.AttrValue parseFrom(
       }
       public static org.tensorflow.proto.AttrValue parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.AttrValue parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.AttrValue parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.AttrValue parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.AttrValue parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.AttrValue parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -4007,7 +4007,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -4021,7 +4021,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.AttrValue}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.AttrValue)
           org.tensorflow.proto.AttrValueOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -4030,7 +4030,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.AttrValueProtos.internal_static_tensorflow_AttrValue_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -4043,13 +4043,14 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           if (shapeBuilder_ != null) {
             shapeBuilder_.clear();
           }
    @@ -4090,89 +4091,37 @@ public org.tensorflow.proto.AttrValue build() {
         @java.lang.Override
         public org.tensorflow.proto.AttrValue buildPartial() {
           org.tensorflow.proto.AttrValue result = new org.tensorflow.proto.AttrValue(this);
    -      if (valueCase_ == 2) {
    -        result.value_ = value_;
    -      }
    -      if (valueCase_ == 3) {
    -        result.value_ = value_;
    -      }
    -      if (valueCase_ == 4) {
    -        result.value_ = value_;
    -      }
    -      if (valueCase_ == 5) {
    -        result.value_ = value_;
    -      }
    -      if (valueCase_ == 6) {
    -        result.value_ = value_;
    -      }
    -      if (valueCase_ == 7) {
    -        if (shapeBuilder_ == null) {
    -          result.value_ = value_;
    -        } else {
    -          result.value_ = shapeBuilder_.build();
    -        }
    -      }
    -      if (valueCase_ == 8) {
    -        if (tensorBuilder_ == null) {
    -          result.value_ = value_;
    -        } else {
    -          result.value_ = tensorBuilder_.build();
    -        }
    -      }
    -      if (valueCase_ == 1) {
    -        if (listBuilder_ == null) {
    -          result.value_ = value_;
    -        } else {
    -          result.value_ = listBuilder_.build();
    -        }
    -      }
    -      if (valueCase_ == 10) {
    -        if (funcBuilder_ == null) {
    -          result.value_ = value_;
    -        } else {
    -          result.value_ = funcBuilder_.build();
    -        }
    -      }
    -      if (valueCase_ == 9) {
    -        result.value_ = value_;
    -      }
    -      result.valueCase_ = valueCase_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      buildPartialOneofs(result);
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    +    private void buildPartial0(org.tensorflow.proto.AttrValue result) {
    +      int from_bitField0_ = bitField0_;
         }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +
    +    private void buildPartialOneofs(org.tensorflow.proto.AttrValue result) {
    +      result.valueCase_ = valueCase_;
    +      result.value_ = this.value_;
    +      if (valueCase_ == 7 &&
    +          shapeBuilder_ != null) {
    +        result.value_ = shapeBuilder_.build();
    +      }
    +      if (valueCase_ == 8 &&
    +          tensorBuilder_ != null) {
    +        result.value_ = tensorBuilder_.build();
    +      }
    +      if (valueCase_ == 1 &&
    +          listBuilder_ != null) {
    +        result.value_ = listBuilder_.build();
    +      }
    +      if (valueCase_ == 10 &&
    +          funcBuilder_ != null) {
    +        result.value_ = funcBuilder_.build();
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.AttrValue) {
    @@ -4348,6 +4297,7 @@ public Builder clearValue() {
           return this;
         }
     
    +    private int bitField0_;
     
         /**
          * 
    @@ -4384,10 +4334,8 @@ public com.google.protobuf.ByteString getS() {
          * @return This builder for chaining.
          */
         public Builder setS(com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  valueCase_ = 2;
    +      if (value == null) { throw new NullPointerException(); }
    +      valueCase_ = 2;
           value_ = value;
           onChanged();
           return this;
    @@ -4444,6 +4392,7 @@ public long getI() {
          * @return This builder for chaining.
          */
         public Builder setI(long value) {
    +
           valueCase_ = 3;
           value_ = value;
           onChanged();
    @@ -4501,6 +4450,7 @@ public float getF() {
          * @return This builder for chaining.
          */
         public Builder setF(float value) {
    +
           valueCase_ = 4;
           value_ = value;
           onChanged();
    @@ -4558,6 +4508,7 @@ public boolean getB() {
          * @return This builder for chaining.
          */
         public Builder setB(boolean value) {
    +
           valueCase_ = 5;
           value_ = value;
           onChanged();
    @@ -4633,8 +4584,7 @@ public Builder setTypeValue(int value) {
         @java.lang.Override
         public org.tensorflow.proto.DataType getType() {
           if (valueCase_ == 6) {
    -        @SuppressWarnings("deprecation")
    -        org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(
    +        org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(
                 (java.lang.Integer) value_);
             return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
           }
    @@ -4675,7 +4625,7 @@ public Builder clearType() {
           return this;
         }
     
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> shapeBuilder_;
         /**
          * 
    @@ -4834,14 +4784,14 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
          *
          * .tensorflow.TensorShapeProto shape = 7;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> 
             getShapeFieldBuilder() {
           if (shapeBuilder_ == null) {
             if (!(valueCase_ == 7)) {
               value_ = org.tensorflow.proto.TensorShapeProto.getDefaultInstance();
             }
    -        shapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        shapeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder>(
                     (org.tensorflow.proto.TensorShapeProto) value_,
                     getParentForChildren(),
    @@ -4849,11 +4799,11 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
             value_ = null;
           }
           valueCase_ = 7;
    -      onChanged();;
    +      onChanged();
           return shapeBuilder_;
         }
     
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> tensorBuilder_;
         /**
          * 
    @@ -5012,14 +4962,14 @@ public org.tensorflow.proto.TensorProtoOrBuilder getTensorOrBuilder() {
          *
          * .tensorflow.TensorProto tensor = 8;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> 
             getTensorFieldBuilder() {
           if (tensorBuilder_ == null) {
             if (!(valueCase_ == 8)) {
               value_ = org.tensorflow.proto.TensorProto.getDefaultInstance();
             }
    -        tensorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        tensorBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder>(
                     (org.tensorflow.proto.TensorProto) value_,
                     getParentForChildren(),
    @@ -5027,11 +4977,11 @@ public org.tensorflow.proto.TensorProtoOrBuilder getTensorOrBuilder() {
             value_ = null;
           }
           valueCase_ = 8;
    -      onChanged();;
    +      onChanged();
           return tensorBuilder_;
         }
     
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.AttrValue.ListValue, org.tensorflow.proto.AttrValue.ListValue.Builder, org.tensorflow.proto.AttrValue.ListValueOrBuilder> listBuilder_;
         /**
          * 
    @@ -5190,14 +5140,14 @@ public org.tensorflow.proto.AttrValue.ListValueOrBuilder getListOrBuilder() {
          *
          * .tensorflow.AttrValue.ListValue list = 1;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.AttrValue.ListValue, org.tensorflow.proto.AttrValue.ListValue.Builder, org.tensorflow.proto.AttrValue.ListValueOrBuilder> 
             getListFieldBuilder() {
           if (listBuilder_ == null) {
             if (!(valueCase_ == 1)) {
               value_ = org.tensorflow.proto.AttrValue.ListValue.getDefaultInstance();
             }
    -        listBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        listBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.AttrValue.ListValue, org.tensorflow.proto.AttrValue.ListValue.Builder, org.tensorflow.proto.AttrValue.ListValueOrBuilder>(
                     (org.tensorflow.proto.AttrValue.ListValue) value_,
                     getParentForChildren(),
    @@ -5205,11 +5155,11 @@ public org.tensorflow.proto.AttrValue.ListValueOrBuilder getListOrBuilder() {
             value_ = null;
           }
           valueCase_ = 1;
    -      onChanged();;
    +      onChanged();
           return listBuilder_;
         }
     
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.NameAttrList, org.tensorflow.proto.NameAttrList.Builder, org.tensorflow.proto.NameAttrListOrBuilder> funcBuilder_;
         /**
          * 
    @@ -5395,14 +5345,14 @@ public org.tensorflow.proto.NameAttrListOrBuilder getFuncOrBuilder() {
          *
          * .tensorflow.NameAttrList func = 10;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.NameAttrList, org.tensorflow.proto.NameAttrList.Builder, org.tensorflow.proto.NameAttrListOrBuilder> 
             getFuncFieldBuilder() {
           if (funcBuilder_ == null) {
             if (!(valueCase_ == 10)) {
               value_ = org.tensorflow.proto.NameAttrList.getDefaultInstance();
             }
    -        funcBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        funcBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.NameAttrList, org.tensorflow.proto.NameAttrList.Builder, org.tensorflow.proto.NameAttrListOrBuilder>(
                     (org.tensorflow.proto.NameAttrList) value_,
                     getParentForChildren(),
    @@ -5410,7 +5360,7 @@ public org.tensorflow.proto.NameAttrListOrBuilder getFuncOrBuilder() {
             value_ = null;
           }
           valueCase_ = 10;
    -      onChanged();;
    +      onChanged();
           return funcBuilder_;
         }
     
    @@ -5514,10 +5464,8 @@ public java.lang.String getPlaceholder() {
          */
         public Builder setPlaceholder(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  valueCase_ = 9;
    +      if (value == null) { throw new NullPointerException(); }
    +      valueCase_ = 9;
           value_ = value;
           onChanged();
           return this;
    @@ -5561,27 +5509,13 @@ public Builder clearPlaceholder() {
          */
         public Builder setPlaceholderBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           valueCase_ = 9;
           value_ = value;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.AttrValue)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AttrValueOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AttrValueOrBuilder.java
    index 5dc778e642e..88837631bad 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AttrValueOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AttrValueOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/attr_value.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -275,5 +277,5 @@ public interface AttrValueOrBuilder extends
       com.google.protobuf.ByteString
           getPlaceholderBytes();
     
    -  public org.tensorflow.proto.AttrValue.ValueCase getValueCase();
    +  org.tensorflow.proto.AttrValue.ValueCase getValueCase();
     }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AttrValueProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AttrValueProtos.java
    index e444e942611..e37ba3edf83 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AttrValueProtos.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AttrValueProtos.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/attr_value.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class AttrValueProtos {
       private AttrValueProtos() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      AttrValueProtos.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,22 +28,22 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_AttrValue_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_AttrValue_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_AttrValue_ListValue_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_AttrValue_ListValue_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_NameAttrList_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_NameAttrList_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_NameAttrList_AttrEntry_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_NameAttrList_AttrEntry_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -80,27 +91,28 @@ public static void registerAllExtensions(
         internal_static_tensorflow_AttrValue_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_AttrValue_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_AttrValue_descriptor,
             new java.lang.String[] { "S", "I", "F", "B", "Type", "Shape", "Tensor", "List", "Func", "Placeholder", "Value", });
         internal_static_tensorflow_AttrValue_ListValue_descriptor =
           internal_static_tensorflow_AttrValue_descriptor.getNestedTypes().get(0);
         internal_static_tensorflow_AttrValue_ListValue_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_AttrValue_ListValue_descriptor,
             new java.lang.String[] { "S", "I", "F", "B", "Type", "Shape", "Tensor", "Func", });
         internal_static_tensorflow_NameAttrList_descriptor =
           getDescriptor().getMessageTypes().get(1);
         internal_static_tensorflow_NameAttrList_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_NameAttrList_descriptor,
             new java.lang.String[] { "Name", "Attr", });
         internal_static_tensorflow_NameAttrList_AttrEntry_descriptor =
           internal_static_tensorflow_NameAttrList_descriptor.getNestedTypes().get(0);
         internal_static_tensorflow_NameAttrList_AttrEntry_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_NameAttrList_AttrEntry_descriptor,
             new java.lang.String[] { "Key", "Value", });
    +    descriptor.resolveAllFeaturesImmutable();
         org.tensorflow.proto.TensorProtos.getDescriptor();
         org.tensorflow.proto.TensorShapeProtos.getDescriptor();
         org.tensorflow.proto.TypesProtos.getDescriptor();
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AutoParallelOptions.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AutoParallelOptions.java
    index 18506fb1b87..9c98cce7b81 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AutoParallelOptions.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AutoParallelOptions.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/rewriter_config.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,36 +9,33 @@
      * Protobuf type {@code tensorflow.AutoParallelOptions}
      */
     public final class AutoParallelOptions extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.AutoParallelOptions)
         AutoParallelOptionsOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      AutoParallelOptions.class.getName());
    +  }
       // Use AutoParallelOptions.newBuilder() to construct.
    -  private AutoParallelOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private AutoParallelOptions(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private AutoParallelOptions() {
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new AutoParallelOptions();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.RewriterConfigProtos.internal_static_tensorflow_AutoParallelOptions_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.RewriterConfigProtos.internal_static_tensorflow_AutoParallelOptions_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -44,7 +43,7 @@ protected java.lang.Object newInstance(
       }
     
       public static final int ENABLE_FIELD_NUMBER = 1;
    -  private boolean enable_;
    +  private boolean enable_ = false;
       /**
        * bool enable = 1;
        * @return The enable.
    @@ -55,7 +54,7 @@ public boolean getEnable() {
       }
     
       public static final int NUM_REPLICAS_FIELD_NUMBER = 2;
    -  private int numReplicas_;
    +  private int numReplicas_ = 0;
       /**
        * int32 num_replicas = 2;
        * @return The numReplicas.
    @@ -176,39 +175,41 @@ public static org.tensorflow.proto.AutoParallelOptions parseFrom(
       }
       public static org.tensorflow.proto.AutoParallelOptions parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.AutoParallelOptions parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.AutoParallelOptions parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.AutoParallelOptions parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.AutoParallelOptions parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.AutoParallelOptions parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -228,7 +229,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -236,7 +237,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.AutoParallelOptions}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.AutoParallelOptions)
           org.tensorflow.proto.AutoParallelOptionsOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -245,7 +246,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.RewriterConfigProtos.internal_static_tensorflow_AutoParallelOptions_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -258,17 +259,16 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           enable_ = false;
    -
           numReplicas_ = 0;
    -
           return this;
         }
     
    @@ -295,44 +295,21 @@ public org.tensorflow.proto.AutoParallelOptions build() {
         @java.lang.Override
         public org.tensorflow.proto.AutoParallelOptions buildPartial() {
           org.tensorflow.proto.AutoParallelOptions result = new org.tensorflow.proto.AutoParallelOptions(this);
    -      result.enable_ = enable_;
    -      result.numReplicas_ = numReplicas_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.AutoParallelOptions result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.enable_ = enable_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.numReplicas_ = numReplicas_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.AutoParallelOptions) {
    @@ -379,12 +356,12 @@ public Builder mergeFrom(
                   break;
                 case 8: {
                   enable_ = input.readBool();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 8
                 case 16: {
                   numReplicas_ = input.readInt32();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 16
                 default: {
    @@ -402,6 +379,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private boolean enable_ ;
         /**
    @@ -418,8 +396,9 @@ public boolean getEnable() {
          * @return This builder for chaining.
          */
         public Builder setEnable(boolean value) {
    -      
    +
           enable_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -428,7 +407,7 @@ public Builder setEnable(boolean value) {
          * @return This builder for chaining.
          */
         public Builder clearEnable() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000001);
           enable_ = false;
           onChanged();
           return this;
    @@ -449,8 +428,9 @@ public int getNumReplicas() {
          * @return This builder for chaining.
          */
         public Builder setNumReplicas(int value) {
    -      
    +
           numReplicas_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -459,23 +439,11 @@ public Builder setNumReplicas(int value) {
          * @return This builder for chaining.
          */
         public Builder clearNumReplicas() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000002);
           numReplicas_ = 0;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.AutoParallelOptions)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AutoParallelOptionsOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AutoParallelOptionsOrBuilder.java
    index e673fb4ec6a..2220bc1d192 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AutoParallelOptionsOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AutoParallelOptionsOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/rewriter_config.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AvailableDeviceInfo.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AvailableDeviceInfo.java
    index 50aa7d93009..174ab3c3307 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AvailableDeviceInfo.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AvailableDeviceInfo.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: xla/tsl/protobuf/test_log.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,12 +13,21 @@
      * Protobuf type {@code tensorflow.AvailableDeviceInfo}
      */
     public final class AvailableDeviceInfo extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.AvailableDeviceInfo)
         AvailableDeviceInfoOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      AvailableDeviceInfo.class.getName());
    +  }
       // Use AvailableDeviceInfo.newBuilder() to construct.
    -  private AvailableDeviceInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private AvailableDeviceInfo(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private AvailableDeviceInfo() {
    @@ -25,25 +36,13 @@ private AvailableDeviceInfo() {
         physicalDescription_ = "";
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new AvailableDeviceInfo();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_AvailableDeviceInfo_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_AvailableDeviceInfo_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -51,7 +50,8 @@ protected java.lang.Object newInstance(
       }
     
       public static final int NAME_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object name_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object name_ = "";
       /**
        * 
        * Device name.
    @@ -97,7 +97,8 @@ public java.lang.String getName() {
       }
     
       public static final int TYPE_FIELD_NUMBER = 2;
    -  private volatile java.lang.Object type_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object type_ = "";
       /**
        * 
        * Device type, e.g. 'CPU' or 'GPU'.
    @@ -143,7 +144,7 @@ public java.lang.String getType() {
       }
     
       public static final int MEMORY_LIMIT_FIELD_NUMBER = 3;
    -  private long memoryLimit_;
    +  private long memoryLimit_ = 0L;
       /**
        * 
        * Memory capacity in bytes.
    @@ -158,7 +159,8 @@ public long getMemoryLimit() {
       }
     
       public static final int PHYSICAL_DESCRIPTION_FIELD_NUMBER = 4;
    -  private volatile java.lang.Object physicalDescription_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object physicalDescription_ = "";
       /**
        * 
        * The physical description of this device.
    @@ -217,17 +219,17 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, type_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(type_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 2, type_);
         }
         if (memoryLimit_ != 0L) {
           output.writeInt64(3, memoryLimit_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(physicalDescription_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, physicalDescription_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(physicalDescription_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 4, physicalDescription_);
         }
         getUnknownFields().writeTo(output);
       }
    @@ -238,18 +240,18 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, type_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(type_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(2, type_);
         }
         if (memoryLimit_ != 0L) {
           size += com.google.protobuf.CodedOutputStream
             .computeInt64Size(3, memoryLimit_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(physicalDescription_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, physicalDescription_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(physicalDescription_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(4, physicalDescription_);
         }
         size += getUnknownFields().getSerializedSize();
         memoizedSize = size;
    @@ -333,39 +335,41 @@ public static org.tensorflow.proto.AvailableDeviceInfo parseFrom(
       }
       public static org.tensorflow.proto.AvailableDeviceInfo parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.AvailableDeviceInfo parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.AvailableDeviceInfo parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.AvailableDeviceInfo parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.AvailableDeviceInfo parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.AvailableDeviceInfo parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -385,7 +389,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -397,7 +401,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.AvailableDeviceInfo}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.AvailableDeviceInfo)
           org.tensorflow.proto.AvailableDeviceInfoOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -406,7 +410,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_AvailableDeviceInfo_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -419,21 +423,18 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           name_ = "";
    -
           type_ = "";
    -
           memoryLimit_ = 0L;
    -
           physicalDescription_ = "";
    -
           return this;
         }
     
    @@ -460,46 +461,27 @@ public org.tensorflow.proto.AvailableDeviceInfo build() {
         @java.lang.Override
         public org.tensorflow.proto.AvailableDeviceInfo buildPartial() {
           org.tensorflow.proto.AvailableDeviceInfo result = new org.tensorflow.proto.AvailableDeviceInfo(this);
    -      result.name_ = name_;
    -      result.type_ = type_;
    -      result.memoryLimit_ = memoryLimit_;
    -      result.physicalDescription_ = physicalDescription_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.AvailableDeviceInfo result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.name_ = name_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.type_ = type_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.memoryLimit_ = memoryLimit_;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.physicalDescription_ = physicalDescription_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.AvailableDeviceInfo) {
    @@ -514,10 +496,12 @@ public Builder mergeFrom(org.tensorflow.proto.AvailableDeviceInfo other) {
           if (other == org.tensorflow.proto.AvailableDeviceInfo.getDefaultInstance()) return this;
           if (!other.getName().isEmpty()) {
             name_ = other.name_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (!other.getType().isEmpty()) {
             type_ = other.type_;
    +        bitField0_ |= 0x00000002;
             onChanged();
           }
           if (other.getMemoryLimit() != 0L) {
    @@ -525,6 +509,7 @@ public Builder mergeFrom(org.tensorflow.proto.AvailableDeviceInfo other) {
           }
           if (!other.getPhysicalDescription().isEmpty()) {
             physicalDescription_ = other.physicalDescription_;
    +        bitField0_ |= 0x00000008;
             onChanged();
           }
           this.mergeUnknownFields(other.getUnknownFields());
    @@ -555,22 +540,22 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   name_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
                   type_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 case 24: {
                   memoryLimit_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 24
                 case 34: {
                   physicalDescription_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 34
                 default: {
    @@ -588,6 +573,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private java.lang.Object name_ = "";
         /**
    @@ -642,11 +628,9 @@ public java.lang.String getName() {
          */
         public Builder setName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           name_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -659,8 +643,8 @@ public Builder setName(
          * @return This builder for chaining.
          */
         public Builder clearName() {
    -      
           name_ = getDefaultInstance().getName();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -675,12 +659,10 @@ public Builder clearName() {
          */
         public Builder setNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           name_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -738,11 +720,9 @@ public java.lang.String getType() {
          */
         public Builder setType(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           type_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -755,8 +735,8 @@ public Builder setType(
          * @return This builder for chaining.
          */
         public Builder clearType() {
    -      
           type_ = getDefaultInstance().getType();
    +      bitField0_ = (bitField0_ & ~0x00000002);
           onChanged();
           return this;
         }
    @@ -771,12 +751,10 @@ public Builder clearType() {
          */
         public Builder setTypeBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           type_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -804,8 +782,9 @@ public long getMemoryLimit() {
          * @return This builder for chaining.
          */
         public Builder setMemoryLimit(long value) {
    -      
    +
           memoryLimit_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -818,7 +797,7 @@ public Builder setMemoryLimit(long value) {
          * @return This builder for chaining.
          */
         public Builder clearMemoryLimit() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000004);
           memoryLimit_ = 0L;
           onChanged();
           return this;
    @@ -877,11 +856,9 @@ public java.lang.String getPhysicalDescription() {
          */
         public Builder setPhysicalDescription(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           physicalDescription_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -894,8 +871,8 @@ public Builder setPhysicalDescription(
          * @return This builder for chaining.
          */
         public Builder clearPhysicalDescription() {
    -      
           physicalDescription_ = getDefaultInstance().getPhysicalDescription();
    +      bitField0_ = (bitField0_ & ~0x00000008);
           onChanged();
           return this;
         }
    @@ -910,27 +887,13 @@ public Builder clearPhysicalDescription() {
          */
         public Builder setPhysicalDescriptionBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           physicalDescription_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.AvailableDeviceInfo)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AvailableDeviceInfoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AvailableDeviceInfoOrBuilder.java
    index c35a7c6a745..de445a4283f 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AvailableDeviceInfoOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AvailableDeviceInfoOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: xla/tsl/protobuf/test_log.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BatchingOptions.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BatchingOptions.java
    new file mode 100644
    index 00000000000..fb63a3ec488
    --- /dev/null
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BatchingOptions.java
    @@ -0,0 +1,958 @@
    +// Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
    +// source: tensorflow/core/protobuf/config.proto
    +// Protobuf Java Version: 4.28.3
    +
    +package org.tensorflow.proto;
    +
    +/**
    + * Protobuf type {@code tensorflow.BatchingOptions}
    + */
    +public final class BatchingOptions extends
    +    com.google.protobuf.GeneratedMessage implements
    +    // @@protoc_insertion_point(message_implements:tensorflow.BatchingOptions)
    +    BatchingOptionsOrBuilder {
    +private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      BatchingOptions.class.getName());
    +  }
    +  // Use BatchingOptions.newBuilder() to construct.
    +  private BatchingOptions(com.google.protobuf.GeneratedMessage.Builder builder) {
    +    super(builder);
    +  }
    +  private BatchingOptions() {
    +    allowedBatchSizes_ = emptyIntList();
    +  }
    +
    +  public static final com.google.protobuf.Descriptors.Descriptor
    +      getDescriptor() {
    +    return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_BatchingOptions_descriptor;
    +  }
    +
    +  @java.lang.Override
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
    +      internalGetFieldAccessorTable() {
    +    return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_BatchingOptions_fieldAccessorTable
    +        .ensureFieldAccessorsInitialized(
    +            org.tensorflow.proto.BatchingOptions.class, org.tensorflow.proto.BatchingOptions.Builder.class);
    +  }
    +
    +  public static final int NUM_BATCH_THREADS_FIELD_NUMBER = 1;
    +  private int numBatchThreads_ = 0;
    +  /**
    +   * 
    +   * Number of scheduling threads for processing batches of work. Determines
    +   * the number of batches processed in parallel. This should be roughly in line
    +   * with the number of TPU cores available.
    +   * 
    + * + * int32 num_batch_threads = 1; + * @return The numBatchThreads. + */ + @java.lang.Override + public int getNumBatchThreads() { + return numBatchThreads_; + } + + public static final int MAX_BATCH_SIZE_FIELD_NUMBER = 2; + private int maxBatchSize_ = 0; + /** + *
    +   * The maximum allowed batch size. Can be larger than allowed_batch_sizes to
    +   * utilize large batch splitting.
    +   * 
    + * + * int32 max_batch_size = 2; + * @return The maxBatchSize. + */ + @java.lang.Override + public int getMaxBatchSize() { + return maxBatchSize_; + } + + public static final int BATCH_TIMEOUT_MICROS_FIELD_NUMBER = 3; + private int batchTimeoutMicros_ = 0; + /** + *
    +   * Maximum number of microseconds to wait before outputting an incomplete
    +   * batch.
    +   * 
    + * + * int32 batch_timeout_micros = 3; + * @return The batchTimeoutMicros. + */ + @java.lang.Override + public int getBatchTimeoutMicros() { + return batchTimeoutMicros_; + } + + public static final int ALLOWED_BATCH_SIZES_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private com.google.protobuf.Internal.IntList allowedBatchSizes_ = + emptyIntList(); + /** + *
    +   * Optional list of allowed batch sizes. If left empty, does nothing.
    +   * Otherwise, supplies a list of batch sizes, causing the op to pad batches up
    +   * to one of those sizes. The entries must increase monotonically, and the
    +   * final entry must be equal or less than the max_batch_size.
    +   * 
    + * + * repeated int32 allowed_batch_sizes = 4; + * @return A list containing the allowedBatchSizes. + */ + @java.lang.Override + public java.util.List + getAllowedBatchSizesList() { + return allowedBatchSizes_; + } + /** + *
    +   * Optional list of allowed batch sizes. If left empty, does nothing.
    +   * Otherwise, supplies a list of batch sizes, causing the op to pad batches up
    +   * to one of those sizes. The entries must increase monotonically, and the
    +   * final entry must be equal or less than the max_batch_size.
    +   * 
    + * + * repeated int32 allowed_batch_sizes = 4; + * @return The count of allowedBatchSizes. + */ + public int getAllowedBatchSizesCount() { + return allowedBatchSizes_.size(); + } + /** + *
    +   * Optional list of allowed batch sizes. If left empty, does nothing.
    +   * Otherwise, supplies a list of batch sizes, causing the op to pad batches up
    +   * to one of those sizes. The entries must increase monotonically, and the
    +   * final entry must be equal or less than the max_batch_size.
    +   * 
    + * + * repeated int32 allowed_batch_sizes = 4; + * @param index The index of the element to return. + * @return The allowedBatchSizes at the given index. + */ + public int getAllowedBatchSizes(int index) { + return allowedBatchSizes_.getInt(index); + } + private int allowedBatchSizesMemoizedSerializedSize = -1; + + public static final int MAX_ENQUEUED_BATCHES_FIELD_NUMBER = 5; + private int maxEnqueuedBatches_ = 0; + /** + *
    +   * Maximum number of batches enqueued for processing before requests are
    +   * failed fast.
    +   * 
    + * + * int32 max_enqueued_batches = 5; + * @return The maxEnqueuedBatches. + */ + @java.lang.Override + public int getMaxEnqueuedBatches() { + return maxEnqueuedBatches_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (numBatchThreads_ != 0) { + output.writeInt32(1, numBatchThreads_); + } + if (maxBatchSize_ != 0) { + output.writeInt32(2, maxBatchSize_); + } + if (batchTimeoutMicros_ != 0) { + output.writeInt32(3, batchTimeoutMicros_); + } + if (getAllowedBatchSizesList().size() > 0) { + output.writeUInt32NoTag(34); + output.writeUInt32NoTag(allowedBatchSizesMemoizedSerializedSize); + } + for (int i = 0; i < allowedBatchSizes_.size(); i++) { + output.writeInt32NoTag(allowedBatchSizes_.getInt(i)); + } + if (maxEnqueuedBatches_ != 0) { + output.writeInt32(5, maxEnqueuedBatches_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (numBatchThreads_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, numBatchThreads_); + } + if (maxBatchSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, maxBatchSize_); + } + if (batchTimeoutMicros_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, batchTimeoutMicros_); + } + { + int dataSize = 0; + for (int i = 0; i < allowedBatchSizes_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(allowedBatchSizes_.getInt(i)); + } + size += dataSize; + if (!getAllowedBatchSizesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + allowedBatchSizesMemoizedSerializedSize = dataSize; + } + if (maxEnqueuedBatches_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, maxEnqueuedBatches_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.BatchingOptions)) { + return super.equals(obj); + } + org.tensorflow.proto.BatchingOptions other = (org.tensorflow.proto.BatchingOptions) obj; + + if (getNumBatchThreads() + != other.getNumBatchThreads()) return false; + if (getMaxBatchSize() + != other.getMaxBatchSize()) return false; + if (getBatchTimeoutMicros() + != other.getBatchTimeoutMicros()) return false; + if (!getAllowedBatchSizesList() + .equals(other.getAllowedBatchSizesList())) return false; + if (getMaxEnqueuedBatches() + != other.getMaxEnqueuedBatches()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NUM_BATCH_THREADS_FIELD_NUMBER; + hash = (53 * hash) + getNumBatchThreads(); + hash = (37 * hash) + MAX_BATCH_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getMaxBatchSize(); + hash = (37 * hash) + BATCH_TIMEOUT_MICROS_FIELD_NUMBER; + hash = (53 * hash) + getBatchTimeoutMicros(); + if (getAllowedBatchSizesCount() > 0) { + hash = (37 * hash) + ALLOWED_BATCH_SIZES_FIELD_NUMBER; + hash = (53 * hash) + getAllowedBatchSizesList().hashCode(); + } + hash = (37 * hash) + MAX_ENQUEUED_BATCHES_FIELD_NUMBER; + hash = (53 * hash) + getMaxEnqueuedBatches(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.BatchingOptions parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.BatchingOptions parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.BatchingOptions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.BatchingOptions parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.BatchingOptions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.BatchingOptions parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.BatchingOptions parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.BatchingOptions parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static org.tensorflow.proto.BatchingOptions parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static org.tensorflow.proto.BatchingOptions parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.BatchingOptions parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.BatchingOptions parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.BatchingOptions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.BatchingOptions} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.BatchingOptions) + org.tensorflow.proto.BatchingOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_BatchingOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_BatchingOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.BatchingOptions.class, org.tensorflow.proto.BatchingOptions.Builder.class); + } + + // Construct using org.tensorflow.proto.BatchingOptions.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + numBatchThreads_ = 0; + maxBatchSize_ = 0; + batchTimeoutMicros_ = 0; + allowedBatchSizes_ = emptyIntList(); + maxEnqueuedBatches_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_BatchingOptions_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.BatchingOptions getDefaultInstanceForType() { + return org.tensorflow.proto.BatchingOptions.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.BatchingOptions build() { + org.tensorflow.proto.BatchingOptions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.BatchingOptions buildPartial() { + org.tensorflow.proto.BatchingOptions result = new org.tensorflow.proto.BatchingOptions(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(org.tensorflow.proto.BatchingOptions result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.numBatchThreads_ = numBatchThreads_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.maxBatchSize_ = maxBatchSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.batchTimeoutMicros_ = batchTimeoutMicros_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + allowedBatchSizes_.makeImmutable(); + result.allowedBatchSizes_ = allowedBatchSizes_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.maxEnqueuedBatches_ = maxEnqueuedBatches_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.BatchingOptions) { + return mergeFrom((org.tensorflow.proto.BatchingOptions)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.BatchingOptions other) { + if (other == org.tensorflow.proto.BatchingOptions.getDefaultInstance()) return this; + if (other.getNumBatchThreads() != 0) { + setNumBatchThreads(other.getNumBatchThreads()); + } + if (other.getMaxBatchSize() != 0) { + setMaxBatchSize(other.getMaxBatchSize()); + } + if (other.getBatchTimeoutMicros() != 0) { + setBatchTimeoutMicros(other.getBatchTimeoutMicros()); + } + if (!other.allowedBatchSizes_.isEmpty()) { + if (allowedBatchSizes_.isEmpty()) { + allowedBatchSizes_ = other.allowedBatchSizes_; + allowedBatchSizes_.makeImmutable(); + bitField0_ |= 0x00000008; + } else { + ensureAllowedBatchSizesIsMutable(); + allowedBatchSizes_.addAll(other.allowedBatchSizes_); + } + onChanged(); + } + if (other.getMaxEnqueuedBatches() != 0) { + setMaxEnqueuedBatches(other.getMaxEnqueuedBatches()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + numBatchThreads_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + maxBatchSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + batchTimeoutMicros_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + int v = input.readInt32(); + ensureAllowedBatchSizesIsMutable(); + allowedBatchSizes_.addInt(v); + break; + } // case 32 + case 34: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureAllowedBatchSizesIsMutable(); + while (input.getBytesUntilLimit() > 0) { + allowedBatchSizes_.addInt(input.readInt32()); + } + input.popLimit(limit); + break; + } // case 34 + case 40: { + maxEnqueuedBatches_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int numBatchThreads_ ; + /** + *
    +     * Number of scheduling threads for processing batches of work. Determines
    +     * the number of batches processed in parallel. This should be roughly in line
    +     * with the number of TPU cores available.
    +     * 
    + * + * int32 num_batch_threads = 1; + * @return The numBatchThreads. + */ + @java.lang.Override + public int getNumBatchThreads() { + return numBatchThreads_; + } + /** + *
    +     * Number of scheduling threads for processing batches of work. Determines
    +     * the number of batches processed in parallel. This should be roughly in line
    +     * with the number of TPU cores available.
    +     * 
    + * + * int32 num_batch_threads = 1; + * @param value The numBatchThreads to set. + * @return This builder for chaining. + */ + public Builder setNumBatchThreads(int value) { + + numBatchThreads_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
    +     * Number of scheduling threads for processing batches of work. Determines
    +     * the number of batches processed in parallel. This should be roughly in line
    +     * with the number of TPU cores available.
    +     * 
    + * + * int32 num_batch_threads = 1; + * @return This builder for chaining. + */ + public Builder clearNumBatchThreads() { + bitField0_ = (bitField0_ & ~0x00000001); + numBatchThreads_ = 0; + onChanged(); + return this; + } + + private int maxBatchSize_ ; + /** + *
    +     * The maximum allowed batch size. Can be larger than allowed_batch_sizes to
    +     * utilize large batch splitting.
    +     * 
    + * + * int32 max_batch_size = 2; + * @return The maxBatchSize. + */ + @java.lang.Override + public int getMaxBatchSize() { + return maxBatchSize_; + } + /** + *
    +     * The maximum allowed batch size. Can be larger than allowed_batch_sizes to
    +     * utilize large batch splitting.
    +     * 
    + * + * int32 max_batch_size = 2; + * @param value The maxBatchSize to set. + * @return This builder for chaining. + */ + public Builder setMaxBatchSize(int value) { + + maxBatchSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
    +     * The maximum allowed batch size. Can be larger than allowed_batch_sizes to
    +     * utilize large batch splitting.
    +     * 
    + * + * int32 max_batch_size = 2; + * @return This builder for chaining. + */ + public Builder clearMaxBatchSize() { + bitField0_ = (bitField0_ & ~0x00000002); + maxBatchSize_ = 0; + onChanged(); + return this; + } + + private int batchTimeoutMicros_ ; + /** + *
    +     * Maximum number of microseconds to wait before outputting an incomplete
    +     * batch.
    +     * 
    + * + * int32 batch_timeout_micros = 3; + * @return The batchTimeoutMicros. + */ + @java.lang.Override + public int getBatchTimeoutMicros() { + return batchTimeoutMicros_; + } + /** + *
    +     * Maximum number of microseconds to wait before outputting an incomplete
    +     * batch.
    +     * 
    + * + * int32 batch_timeout_micros = 3; + * @param value The batchTimeoutMicros to set. + * @return This builder for chaining. + */ + public Builder setBatchTimeoutMicros(int value) { + + batchTimeoutMicros_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
    +     * Maximum number of microseconds to wait before outputting an incomplete
    +     * batch.
    +     * 
    + * + * int32 batch_timeout_micros = 3; + * @return This builder for chaining. + */ + public Builder clearBatchTimeoutMicros() { + bitField0_ = (bitField0_ & ~0x00000004); + batchTimeoutMicros_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.IntList allowedBatchSizes_ = emptyIntList(); + private void ensureAllowedBatchSizesIsMutable() { + if (!allowedBatchSizes_.isModifiable()) { + allowedBatchSizes_ = makeMutableCopy(allowedBatchSizes_); + } + bitField0_ |= 0x00000008; + } + /** + *
    +     * Optional list of allowed batch sizes. If left empty, does nothing.
    +     * Otherwise, supplies a list of batch sizes, causing the op to pad batches up
    +     * to one of those sizes. The entries must increase monotonically, and the
    +     * final entry must be equal or less than the max_batch_size.
    +     * 
    + * + * repeated int32 allowed_batch_sizes = 4; + * @return A list containing the allowedBatchSizes. + */ + public java.util.List + getAllowedBatchSizesList() { + allowedBatchSizes_.makeImmutable(); + return allowedBatchSizes_; + } + /** + *
    +     * Optional list of allowed batch sizes. If left empty, does nothing.
    +     * Otherwise, supplies a list of batch sizes, causing the op to pad batches up
    +     * to one of those sizes. The entries must increase monotonically, and the
    +     * final entry must be equal or less than the max_batch_size.
    +     * 
    + * + * repeated int32 allowed_batch_sizes = 4; + * @return The count of allowedBatchSizes. + */ + public int getAllowedBatchSizesCount() { + return allowedBatchSizes_.size(); + } + /** + *
    +     * Optional list of allowed batch sizes. If left empty, does nothing.
    +     * Otherwise, supplies a list of batch sizes, causing the op to pad batches up
    +     * to one of those sizes. The entries must increase monotonically, and the
    +     * final entry must be equal or less than the max_batch_size.
    +     * 
    + * + * repeated int32 allowed_batch_sizes = 4; + * @param index The index of the element to return. + * @return The allowedBatchSizes at the given index. + */ + public int getAllowedBatchSizes(int index) { + return allowedBatchSizes_.getInt(index); + } + /** + *
    +     * Optional list of allowed batch sizes. If left empty, does nothing.
    +     * Otherwise, supplies a list of batch sizes, causing the op to pad batches up
    +     * to one of those sizes. The entries must increase monotonically, and the
    +     * final entry must be equal or less than the max_batch_size.
    +     * 
    + * + * repeated int32 allowed_batch_sizes = 4; + * @param index The index to set the value at. + * @param value The allowedBatchSizes to set. + * @return This builder for chaining. + */ + public Builder setAllowedBatchSizes( + int index, int value) { + + ensureAllowedBatchSizesIsMutable(); + allowedBatchSizes_.setInt(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
    +     * Optional list of allowed batch sizes. If left empty, does nothing.
    +     * Otherwise, supplies a list of batch sizes, causing the op to pad batches up
    +     * to one of those sizes. The entries must increase monotonically, and the
    +     * final entry must be equal or less than the max_batch_size.
    +     * 
    + * + * repeated int32 allowed_batch_sizes = 4; + * @param value The allowedBatchSizes to add. + * @return This builder for chaining. + */ + public Builder addAllowedBatchSizes(int value) { + + ensureAllowedBatchSizesIsMutable(); + allowedBatchSizes_.addInt(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
    +     * Optional list of allowed batch sizes. If left empty, does nothing.
    +     * Otherwise, supplies a list of batch sizes, causing the op to pad batches up
    +     * to one of those sizes. The entries must increase monotonically, and the
    +     * final entry must be equal or less than the max_batch_size.
    +     * 
    + * + * repeated int32 allowed_batch_sizes = 4; + * @param values The allowedBatchSizes to add. + * @return This builder for chaining. + */ + public Builder addAllAllowedBatchSizes( + java.lang.Iterable values) { + ensureAllowedBatchSizesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, allowedBatchSizes_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
    +     * Optional list of allowed batch sizes. If left empty, does nothing.
    +     * Otherwise, supplies a list of batch sizes, causing the op to pad batches up
    +     * to one of those sizes. The entries must increase monotonically, and the
    +     * final entry must be equal or less than the max_batch_size.
    +     * 
    + * + * repeated int32 allowed_batch_sizes = 4; + * @return This builder for chaining. + */ + public Builder clearAllowedBatchSizes() { + allowedBatchSizes_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + private int maxEnqueuedBatches_ ; + /** + *
    +     * Maximum number of batches enqueued for processing before requests are
    +     * failed fast.
    +     * 
    + * + * int32 max_enqueued_batches = 5; + * @return The maxEnqueuedBatches. + */ + @java.lang.Override + public int getMaxEnqueuedBatches() { + return maxEnqueuedBatches_; + } + /** + *
    +     * Maximum number of batches enqueued for processing before requests are
    +     * failed fast.
    +     * 
    + * + * int32 max_enqueued_batches = 5; + * @param value The maxEnqueuedBatches to set. + * @return This builder for chaining. + */ + public Builder setMaxEnqueuedBatches(int value) { + + maxEnqueuedBatches_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
    +     * Maximum number of batches enqueued for processing before requests are
    +     * failed fast.
    +     * 
    + * + * int32 max_enqueued_batches = 5; + * @return This builder for chaining. + */ + public Builder clearMaxEnqueuedBatches() { + bitField0_ = (bitField0_ & ~0x00000010); + maxEnqueuedBatches_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:tensorflow.BatchingOptions) + } + + // @@protoc_insertion_point(class_scope:tensorflow.BatchingOptions) + private static final org.tensorflow.proto.BatchingOptions DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.BatchingOptions(); + } + + public static org.tensorflow.proto.BatchingOptions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchingOptions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.BatchingOptions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BatchingOptionsOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BatchingOptionsOrBuilder.java new file mode 100644 index 00000000000..f23c6d205d3 --- /dev/null +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BatchingOptionsOrBuilder.java @@ -0,0 +1,94 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: tensorflow/core/protobuf/config.proto +// Protobuf Java Version: 4.28.3 + +package org.tensorflow.proto; + +public interface BatchingOptionsOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.BatchingOptions) + com.google.protobuf.MessageOrBuilder { + + /** + *
    +   * Number of scheduling threads for processing batches of work. Determines
    +   * the number of batches processed in parallel. This should be roughly in line
    +   * with the number of TPU cores available.
    +   * 
    + * + * int32 num_batch_threads = 1; + * @return The numBatchThreads. + */ + int getNumBatchThreads(); + + /** + *
    +   * The maximum allowed batch size. Can be larger than allowed_batch_sizes to
    +   * utilize large batch splitting.
    +   * 
    + * + * int32 max_batch_size = 2; + * @return The maxBatchSize. + */ + int getMaxBatchSize(); + + /** + *
    +   * Maximum number of microseconds to wait before outputting an incomplete
    +   * batch.
    +   * 
    + * + * int32 batch_timeout_micros = 3; + * @return The batchTimeoutMicros. + */ + int getBatchTimeoutMicros(); + + /** + *
    +   * Optional list of allowed batch sizes. If left empty, does nothing.
    +   * Otherwise, supplies a list of batch sizes, causing the op to pad batches up
    +   * to one of those sizes. The entries must increase monotonically, and the
    +   * final entry must be equal or less than the max_batch_size.
    +   * 
    + * + * repeated int32 allowed_batch_sizes = 4; + * @return A list containing the allowedBatchSizes. + */ + java.util.List getAllowedBatchSizesList(); + /** + *
    +   * Optional list of allowed batch sizes. If left empty, does nothing.
    +   * Otherwise, supplies a list of batch sizes, causing the op to pad batches up
    +   * to one of those sizes. The entries must increase monotonically, and the
    +   * final entry must be equal or less than the max_batch_size.
    +   * 
    + * + * repeated int32 allowed_batch_sizes = 4; + * @return The count of allowedBatchSizes. + */ + int getAllowedBatchSizesCount(); + /** + *
    +   * Optional list of allowed batch sizes. If left empty, does nothing.
    +   * Otherwise, supplies a list of batch sizes, causing the op to pad batches up
    +   * to one of those sizes. The entries must increase monotonically, and the
    +   * final entry must be equal or less than the max_batch_size.
    +   * 
    + * + * repeated int32 allowed_batch_sizes = 4; + * @param index The index of the element to return. + * @return The allowedBatchSizes at the given index. + */ + int getAllowedBatchSizes(int index); + + /** + *
    +   * Maximum number of batches enqueued for processing before requests are
    +   * failed fast.
    +   * 
    + * + * int32 max_enqueued_batches = 5; + * @return The maxEnqueuedBatches. + */ + int getMaxEnqueuedBatches(); +} diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BenchmarkEntries.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BenchmarkEntries.java index 73be037bfe8..78647b68d29 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BenchmarkEntries.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BenchmarkEntries.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: xla/tsl/protobuf/test_log.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -7,37 +9,34 @@ * Protobuf type {@code tensorflow.BenchmarkEntries} */ public final class BenchmarkEntries extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.BenchmarkEntries) BenchmarkEntriesOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + BenchmarkEntries.class.getName()); + } // Use BenchmarkEntries.newBuilder() to construct. - private BenchmarkEntries(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private BenchmarkEntries(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private BenchmarkEntries() { entry_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BenchmarkEntries(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_BenchmarkEntries_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_BenchmarkEntries_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -45,6 +44,7 @@ protected java.lang.Object newInstance( } public static final int ENTRY_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List entry_; /** * repeated .tensorflow.BenchmarkEntry entry = 1; @@ -185,39 +185,41 @@ public static org.tensorflow.proto.BenchmarkEntries parseFrom( } public static org.tensorflow.proto.BenchmarkEntries parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.BenchmarkEntries parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.BenchmarkEntries parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.BenchmarkEntries parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.BenchmarkEntries parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.BenchmarkEntries parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -237,7 +239,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -245,7 +247,7 @@ protected Builder newBuilderForType( * Protobuf type {@code tensorflow.BenchmarkEntries} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.BenchmarkEntries) org.tensorflow.proto.BenchmarkEntriesOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -254,7 +256,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_BenchmarkEntries_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -267,13 +269,14 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (entryBuilder_ == null) { entry_ = java.util.Collections.emptyList(); } else { @@ -307,7 +310,13 @@ public org.tensorflow.proto.BenchmarkEntries build() { @java.lang.Override public org.tensorflow.proto.BenchmarkEntries buildPartial() { org.tensorflow.proto.BenchmarkEntries result = new org.tensorflow.proto.BenchmarkEntries(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(org.tensorflow.proto.BenchmarkEntries result) { if (entryBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { entry_ = java.util.Collections.unmodifiableList(entry_); @@ -317,42 +326,12 @@ public org.tensorflow.proto.BenchmarkEntries buildPartial() { } else { result.entry_ = entryBuilder_.build(); } - onBuilt(); - return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.BenchmarkEntries result) { + int from_bitField0_ = bitField0_; } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.BenchmarkEntries) { @@ -384,7 +363,7 @@ public Builder mergeFrom(org.tensorflow.proto.BenchmarkEntries other) { entry_ = other.entry_; bitField0_ = (bitField0_ & ~0x00000001); entryBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getEntryFieldBuilder() : null; } else { entryBuilder_.addAllMessages(other.entry_); @@ -456,7 +435,7 @@ private void ensureEntryIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.BenchmarkEntry, org.tensorflow.proto.BenchmarkEntry.Builder, org.tensorflow.proto.BenchmarkEntryOrBuilder> entryBuilder_; /** @@ -672,11 +651,11 @@ public org.tensorflow.proto.BenchmarkEntry.Builder addEntryBuilder( getEntryBuilderList() { return getEntryFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.BenchmarkEntry, org.tensorflow.proto.BenchmarkEntry.Builder, org.tensorflow.proto.BenchmarkEntryOrBuilder> getEntryFieldBuilder() { if (entryBuilder_ == null) { - entryBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + entryBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.BenchmarkEntry, org.tensorflow.proto.BenchmarkEntry.Builder, org.tensorflow.proto.BenchmarkEntryOrBuilder>( entry_, ((bitField0_ & 0x00000001) != 0), @@ -686,18 +665,6 @@ public org.tensorflow.proto.BenchmarkEntry.Builder addEntryBuilder( } return entryBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.BenchmarkEntries) } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BenchmarkEntriesOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BenchmarkEntriesOrBuilder.java index de029d1d399..7f439a05b87 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BenchmarkEntriesOrBuilder.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BenchmarkEntriesOrBuilder.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: xla/tsl/protobuf/test_log.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BenchmarkEntry.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BenchmarkEntry.java index efe111640d5..7b41d4e7a15 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BenchmarkEntry.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BenchmarkEntry.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: xla/tsl/protobuf/test_log.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -9,6 +11,7 @@ * some set of information. Here we provide some reasonable keys * one would expect to see, with optional key/value pairs for things * we haven't considered. + * * This BenchmarkEntry should be emitted by each unit test or benchmark * reporter. *
    @@ -16,12 +19,21 @@ * Protobuf type {@code tensorflow.BenchmarkEntry} */ public final class BenchmarkEntry extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.BenchmarkEntry) BenchmarkEntryOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + BenchmarkEntry.class.getName()); + } // Use BenchmarkEntry.newBuilder() to construct. - private BenchmarkEntry(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private BenchmarkEntry(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private BenchmarkEntry() { @@ -29,18 +41,6 @@ private BenchmarkEntry() { metrics_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BenchmarkEntry(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_BenchmarkEntry_descriptor; @@ -48,7 +48,7 @@ protected java.lang.Object newInstance( @SuppressWarnings({"rawtypes"}) @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 6: @@ -59,7 +59,7 @@ protected com.google.protobuf.MapField internalGetMapField( } } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_BenchmarkEntry_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -67,7 +67,8 @@ protected com.google.protobuf.MapField internalGetMapField( } public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; /** *
        * The name of the specific benchmark or test
    @@ -115,7 +116,7 @@ public java.lang.String getName() {
       }
     
       public static final int ITERS_FIELD_NUMBER = 2;
    -  private long iters_;
    +  private long iters_ = 0L;
       /**
        * 
        * If a benchmark, how many iterations it was run for
    @@ -130,7 +131,7 @@ public long getIters() {
       }
     
       public static final int CPU_TIME_FIELD_NUMBER = 3;
    -  private double cpuTime_;
    +  private double cpuTime_ = 0D;
       /**
        * 
        * Total cpu time used for all iterations (in seconds)
    @@ -145,7 +146,7 @@ public double getCpuTime() {
       }
     
       public static final int WALL_TIME_FIELD_NUMBER = 4;
    -  private double wallTime_;
    +  private double wallTime_ = 0D;
       /**
        * 
        * Total wall time used for all iterations (in seconds)
    @@ -160,7 +161,7 @@ public double getWallTime() {
       }
     
       public static final int THROUGHPUT_FIELD_NUMBER = 5;
    -  private double throughput_;
    +  private double throughput_ = 0D;
       /**
        * 
        * Throughput (in MB/s)
    @@ -186,6 +187,7 @@ private static final class ExtrasDefaultEntryHolder {
                     com.google.protobuf.WireFormat.FieldType.MESSAGE,
                     org.tensorflow.proto.EntryValue.getDefaultInstance());
       }
    +  @SuppressWarnings("serial")
       private com.google.protobuf.MapField<
           java.lang.String, org.tensorflow.proto.EntryValue> extras_;
       private com.google.protobuf.MapField
    @@ -196,7 +198,6 @@ private static final class ExtrasDefaultEntryHolder {
         }
         return extras_;
       }
    -
       public int getExtrasCount() {
         return internalGetExtras().getMap().size();
       }
    @@ -207,7 +208,6 @@ public int getExtrasCount() {
        *
        * map<string, .tensorflow.EntryValue> extras = 6;
        */
    -
       @java.lang.Override
       public boolean containsExtras(
           java.lang.String key) {
    @@ -230,7 +230,6 @@ public java.util.Map getExtra
        * map<string, .tensorflow.EntryValue> extras = 6;
        */
       @java.lang.Override
    -
       public java.util.Map getExtrasMap() {
         return internalGetExtras().getMap();
       }
    @@ -242,10 +241,11 @@ public java.util.Map getExtra
        * map<string, .tensorflow.EntryValue> extras = 6;
        */
       @java.lang.Override
    -
    -  public org.tensorflow.proto.EntryValue getExtrasOrDefault(
    +  public /* nullable */
    +org.tensorflow.proto.EntryValue getExtrasOrDefault(
           java.lang.String key,
    -      org.tensorflow.proto.EntryValue defaultValue) {
    +      /* nullable */
    +org.tensorflow.proto.EntryValue defaultValue) {
         if (key == null) { throw new NullPointerException("map key"); }
         java.util.Map map =
             internalGetExtras().getMap();
    @@ -259,7 +259,6 @@ public org.tensorflow.proto.EntryValue getExtrasOrDefault(
        * map<string, .tensorflow.EntryValue> extras = 6;
        */
       @java.lang.Override
    -
       public org.tensorflow.proto.EntryValue getExtrasOrThrow(
           java.lang.String key) {
         if (key == null) { throw new NullPointerException("map key"); }
    @@ -272,6 +271,7 @@ public org.tensorflow.proto.EntryValue getExtrasOrThrow(
       }
     
       public static final int METRICS_FIELD_NUMBER = 7;
    +  @SuppressWarnings("serial")
       private java.util.List metrics_;
       /**
        * 
    @@ -350,8 +350,8 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
         }
         if (iters_ != 0L) {
           output.writeInt64(2, iters_);
    @@ -365,7 +365,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         if (java.lang.Double.doubleToRawLongBits(throughput_) != 0) {
           output.writeDouble(5, throughput_);
         }
    -    com.google.protobuf.GeneratedMessageV3
    +    com.google.protobuf.GeneratedMessage
           .serializeStringMapTo(
             output,
             internalGetExtras(),
    @@ -383,8 +383,8 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
         }
         if (iters_ != 0L) {
           size += com.google.protobuf.CodedOutputStream
    @@ -520,39 +520,41 @@ public static org.tensorflow.proto.BenchmarkEntry parseFrom(
       }
       public static org.tensorflow.proto.BenchmarkEntry parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.BenchmarkEntry parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.BenchmarkEntry parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.BenchmarkEntry parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.BenchmarkEntry parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.BenchmarkEntry parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -572,7 +574,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -582,6 +584,7 @@ protected Builder newBuilderForType(
        * some set of information.  Here we provide some reasonable keys
        * one would expect to see, with optional key/value pairs for things
        * we haven't considered.
    +   *
        * This BenchmarkEntry should be emitted by each unit test or benchmark
        * reporter.
        * 
    @@ -589,7 +592,7 @@ protected Builder newBuilderForType( * Protobuf type {@code tensorflow.BenchmarkEntry} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.BenchmarkEntry) org.tensorflow.proto.BenchmarkEntryOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -598,7 +601,7 @@ public static final class Builder extends } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 6: @@ -609,7 +612,7 @@ protected com.google.protobuf.MapField internalGetMapField( } } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( int number) { switch (number) { case 6: @@ -620,7 +623,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField( } } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_BenchmarkEntry_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -633,23 +636,19 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; name_ = ""; - iters_ = 0L; - cpuTime_ = 0D; - wallTime_ = 0D; - throughput_ = 0D; - internalGetMutableExtras().clear(); if (metricsBuilder_ == null) { metrics_ = java.util.Collections.emptyList(); @@ -657,7 +656,7 @@ public Builder clear() { metrics_ = null; metricsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000040); return this; } @@ -684,59 +683,46 @@ public org.tensorflow.proto.BenchmarkEntry build() { @java.lang.Override public org.tensorflow.proto.BenchmarkEntry buildPartial() { org.tensorflow.proto.BenchmarkEntry result = new org.tensorflow.proto.BenchmarkEntry(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.iters_ = iters_; - result.cpuTime_ = cpuTime_; - result.wallTime_ = wallTime_; - result.throughput_ = throughput_; - result.extras_ = internalGetExtras(); - result.extras_.makeImmutable(); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(org.tensorflow.proto.BenchmarkEntry result) { if (metricsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000040) != 0)) { metrics_ = java.util.Collections.unmodifiableList(metrics_); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000040); } result.metrics_ = metrics_; } else { result.metrics_ = metricsBuilder_.build(); } - onBuilt(); - return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.BenchmarkEntry result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.iters_ = iters_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.cpuTime_ = cpuTime_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.wallTime_ = wallTime_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.throughput_ = throughput_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.extras_ = internalGetExtras().build(ExtrasDefaultEntryHolder.defaultEntry); + } } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.BenchmarkEntry) { @@ -751,6 +737,7 @@ public Builder mergeFrom(org.tensorflow.proto.BenchmarkEntry other) { if (other == org.tensorflow.proto.BenchmarkEntry.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; + bitField0_ |= 0x00000001; onChanged(); } if (other.getIters() != 0L) { @@ -767,11 +754,12 @@ public Builder mergeFrom(org.tensorflow.proto.BenchmarkEntry other) { } internalGetMutableExtras().mergeFrom( other.internalGetExtras()); + bitField0_ |= 0x00000020; if (metricsBuilder_ == null) { if (!other.metrics_.isEmpty()) { if (metrics_.isEmpty()) { metrics_ = other.metrics_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000040); } else { ensureMetricsIsMutable(); metrics_.addAll(other.metrics_); @@ -784,9 +772,9 @@ public Builder mergeFrom(org.tensorflow.proto.BenchmarkEntry other) { metricsBuilder_.dispose(); metricsBuilder_ = null; metrics_ = other.metrics_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000040); metricsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getMetricsFieldBuilder() : null; } else { metricsBuilder_.addAllMessages(other.metrics_); @@ -821,35 +809,36 @@ public Builder mergeFrom( break; case 10: { name_ = input.readStringRequireUtf8(); - + bitField0_ |= 0x00000001; break; } // case 10 case 16: { iters_ = input.readInt64(); - + bitField0_ |= 0x00000002; break; } // case 16 case 25: { cpuTime_ = input.readDouble(); - + bitField0_ |= 0x00000004; break; } // case 25 case 33: { wallTime_ = input.readDouble(); - + bitField0_ |= 0x00000008; break; } // case 33 case 41: { throughput_ = input.readDouble(); - + bitField0_ |= 0x00000010; break; } // case 41 case 50: { com.google.protobuf.MapEntry extras__ = input.readMessage( ExtrasDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableExtras().getMutableMap().put( + internalGetMutableExtras().ensureBuilderMap().put( extras__.getKey(), extras__.getValue()); + bitField0_ |= 0x00000020; break; } // case 50 case 58: { @@ -938,11 +927,9 @@ public java.lang.String getName() { */ public Builder setName( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } name_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -956,8 +943,8 @@ public Builder setName( * @return This builder for chaining. */ public Builder clearName() { - name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -973,12 +960,10 @@ public Builder clearName() { */ public Builder setNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); name_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -1006,8 +991,9 @@ public long getIters() { * @return This builder for chaining. */ public Builder setIters(long value) { - + iters_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -1020,7 +1006,7 @@ public Builder setIters(long value) { * @return This builder for chaining. */ public Builder clearIters() { - + bitField0_ = (bitField0_ & ~0x00000002); iters_ = 0L; onChanged(); return this; @@ -1049,8 +1035,9 @@ public double getCpuTime() { * @return This builder for chaining. */ public Builder setCpuTime(double value) { - + cpuTime_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -1063,7 +1050,7 @@ public Builder setCpuTime(double value) { * @return This builder for chaining. */ public Builder clearCpuTime() { - + bitField0_ = (bitField0_ & ~0x00000004); cpuTime_ = 0D; onChanged(); return this; @@ -1092,8 +1079,9 @@ public double getWallTime() { * @return This builder for chaining. */ public Builder setWallTime(double value) { - + wallTime_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1106,7 +1094,7 @@ public Builder setWallTime(double value) { * @return This builder for chaining. */ public Builder clearWallTime() { - + bitField0_ = (bitField0_ & ~0x00000008); wallTime_ = 0D; onChanged(); return this; @@ -1135,8 +1123,9 @@ public double getThroughput() { * @return This builder for chaining. */ public Builder setThroughput(double value) { - + throughput_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -1149,37 +1138,46 @@ public Builder setThroughput(double value) { * @return This builder for chaining. */ public Builder clearThroughput() { - + bitField0_ = (bitField0_ & ~0x00000010); throughput_ = 0D; onChanged(); return this; } - private com.google.protobuf.MapField< - java.lang.String, org.tensorflow.proto.EntryValue> extras_; - private com.google.protobuf.MapField - internalGetExtras() { + private static final class ExtrasConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public org.tensorflow.proto.EntryValue build(org.tensorflow.proto.EntryValueOrBuilder val) { + if (val instanceof org.tensorflow.proto.EntryValue) { return (org.tensorflow.proto.EntryValue) val; } + return ((org.tensorflow.proto.EntryValue.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return ExtrasDefaultEntryHolder.defaultEntry; + } + }; + private static final ExtrasConverter extrasConverter = new ExtrasConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, org.tensorflow.proto.EntryValueOrBuilder, org.tensorflow.proto.EntryValue, org.tensorflow.proto.EntryValue.Builder> extras_; + private com.google.protobuf.MapFieldBuilder + internalGetExtras() { if (extras_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ExtrasDefaultEntryHolder.defaultEntry); + return new com.google.protobuf.MapFieldBuilder<>(extrasConverter); } return extras_; } - private com.google.protobuf.MapField - internalGetMutableExtras() { - onChanged();; + private com.google.protobuf.MapFieldBuilder + internalGetMutableExtras() { if (extras_ == null) { - extras_ = com.google.protobuf.MapField.newMapField( - ExtrasDefaultEntryHolder.defaultEntry); - } - if (!extras_.isMutable()) { - extras_ = extras_.copy(); + extras_ = new com.google.protobuf.MapFieldBuilder<>(extrasConverter); } + bitField0_ |= 0x00000020; + onChanged(); return extras_; } - public int getExtrasCount() { - return internalGetExtras().getMap().size(); + return internalGetExtras().ensureBuilderMap().size(); } /** *
    @@ -1188,12 +1186,11 @@ public int getExtrasCount() {
          *
          * map<string, .tensorflow.EntryValue> extras = 6;
          */
    -
         @java.lang.Override
         public boolean containsExtras(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      return internalGetExtras().getMap().containsKey(key);
    +      return internalGetExtras().ensureBuilderMap().containsKey(key);
         }
         /**
          * Use {@link #getExtrasMap()} instead.
    @@ -1211,9 +1208,8 @@ public java.util.Map getExtra
          * map<string, .tensorflow.EntryValue> extras = 6;
          */
         @java.lang.Override
    -
         public java.util.Map getExtrasMap() {
    -      return internalGetExtras().getMap();
    +      return internalGetExtras().getImmutableMap();
         }
         /**
          * 
    @@ -1223,14 +1219,14 @@ public java.util.Map getExtra
          * map<string, .tensorflow.EntryValue> extras = 6;
          */
         @java.lang.Override
    -
    -    public org.tensorflow.proto.EntryValue getExtrasOrDefault(
    +    public /* nullable */
    +org.tensorflow.proto.EntryValue getExtrasOrDefault(
             java.lang.String key,
    -        org.tensorflow.proto.EntryValue defaultValue) {
    +        /* nullable */
    +org.tensorflow.proto.EntryValue defaultValue) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      java.util.Map map =
    -          internalGetExtras().getMap();
    -      return map.containsKey(key) ? map.get(key) : defaultValue;
    +      java.util.Map map = internalGetMutableExtras().ensureBuilderMap();
    +      return map.containsKey(key) ? extrasConverter.build(map.get(key)) : defaultValue;
         }
         /**
          * 
    @@ -1240,21 +1236,18 @@ public org.tensorflow.proto.EntryValue getExtrasOrDefault(
          * map<string, .tensorflow.EntryValue> extras = 6;
          */
         @java.lang.Override
    -
         public org.tensorflow.proto.EntryValue getExtrasOrThrow(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      java.util.Map map =
    -          internalGetExtras().getMap();
    +      java.util.Map map = internalGetMutableExtras().ensureBuilderMap();
           if (!map.containsKey(key)) {
             throw new java.lang.IllegalArgumentException();
           }
    -      return map.get(key);
    +      return extrasConverter.build(map.get(key));
         }
    -
         public Builder clearExtras() {
    -      internalGetMutableExtras().getMutableMap()
    -          .clear();
    +      bitField0_ = (bitField0_ & ~0x00000020);
    +      internalGetMutableExtras().clear();
           return this;
         }
         /**
    @@ -1264,11 +1257,10 @@ public Builder clearExtras() {
          *
          * map<string, .tensorflow.EntryValue> extras = 6;
          */
    -
         public Builder removeExtras(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      internalGetMutableExtras().getMutableMap()
    +      internalGetMutableExtras().ensureBuilderMap()
               .remove(key);
           return this;
         }
    @@ -1277,8 +1269,9 @@ public Builder removeExtras(
          */
         @java.lang.Deprecated
         public java.util.Map
    -    getMutableExtras() {
    -      return internalGetMutableExtras().getMutableMap();
    +        getMutableExtras() {
    +      bitField0_ |= 0x00000020;
    +      return internalGetMutableExtras().ensureMessageMap();
         }
         /**
          * 
    @@ -1291,12 +1284,10 @@ public Builder putExtras(
             java.lang.String key,
             org.tensorflow.proto.EntryValue value) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      if (value == null) {
    -  throw new NullPointerException("map value");
    -}
    -
    -      internalGetMutableExtras().getMutableMap()
    +      if (value == null) { throw new NullPointerException("map value"); }
    +      internalGetMutableExtras().ensureBuilderMap()
               .put(key, value);
    +      bitField0_ |= 0x00000020;
           return this;
         }
         /**
    @@ -1306,24 +1297,50 @@ public Builder putExtras(
          *
          * map<string, .tensorflow.EntryValue> extras = 6;
          */
    -
         public Builder putAllExtras(
             java.util.Map values) {
    -      internalGetMutableExtras().getMutableMap()
    +      for (java.util.Map.Entry e : values.entrySet()) {
    +        if (e.getKey() == null || e.getValue() == null) {
    +          throw new NullPointerException();
    +        }
    +      }
    +      internalGetMutableExtras().ensureBuilderMap()
               .putAll(values);
    +      bitField0_ |= 0x00000020;
           return this;
         }
    +    /**
    +     * 
    +     * Generic map from result key to value.
    +     * 
    + * + * map<string, .tensorflow.EntryValue> extras = 6; + */ + public org.tensorflow.proto.EntryValue.Builder putExtrasBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableExtras().ensureBuilderMap(); + org.tensorflow.proto.EntryValueOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = org.tensorflow.proto.EntryValue.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof org.tensorflow.proto.EntryValue) { + entry = ((org.tensorflow.proto.EntryValue) entry).toBuilder(); + builderMap.put(key, entry); + } + return (org.tensorflow.proto.EntryValue.Builder) entry; + } private java.util.List metrics_ = java.util.Collections.emptyList(); private void ensureMetricsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { + if (!((bitField0_ & 0x00000040) != 0)) { metrics_ = new java.util.ArrayList(metrics_); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000040; } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.MetricEntry, org.tensorflow.proto.MetricEntry.Builder, org.tensorflow.proto.MetricEntryOrBuilder> metricsBuilder_; /** @@ -1524,7 +1541,7 @@ public Builder addAllMetrics( public Builder clearMetrics() { if (metricsBuilder_ == null) { metrics_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000040); onChanged(); } else { metricsBuilder_.clear(); @@ -1629,32 +1646,20 @@ public org.tensorflow.proto.MetricEntry.Builder addMetricsBuilder( getMetricsBuilderList() { return getMetricsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.MetricEntry, org.tensorflow.proto.MetricEntry.Builder, org.tensorflow.proto.MetricEntryOrBuilder> getMetricsFieldBuilder() { if (metricsBuilder_ == null) { - metricsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + metricsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.MetricEntry, org.tensorflow.proto.MetricEntry.Builder, org.tensorflow.proto.MetricEntryOrBuilder>( metrics_, - ((bitField0_ & 0x00000002) != 0), + ((bitField0_ & 0x00000040) != 0), getParentForChildren(), isClean()); metrics_ = null; } return metricsBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.BenchmarkEntry) } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BenchmarkEntryOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BenchmarkEntryOrBuilder.java index fba00ccb7f1..9e699bd4b76 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BenchmarkEntryOrBuilder.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BenchmarkEntryOrBuilder.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: xla/tsl/protobuf/test_log.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -108,7 +110,6 @@ boolean containsExtras( * * map<string, .tensorflow.EntryValue> extras = 6; */ - /* nullable */ org.tensorflow.proto.EntryValue getExtrasOrDefault( java.lang.String key, @@ -121,7 +122,6 @@ org.tensorflow.proto.EntryValue getExtrasOrDefault( * * map<string, .tensorflow.EntryValue> extras = 6; */ - org.tensorflow.proto.EntryValue getExtrasOrThrow( java.lang.String key); diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BfcMemoryMap.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BfcMemoryMap.java index e894298881d..d84aebde9c7 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BfcMemoryMap.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BfcMemoryMap.java @@ -1,10 +1,21 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: xla/tsl/protobuf/bfc_memory_map.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; public final class BfcMemoryMap { private BfcMemoryMap() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + BfcMemoryMap.class.getName()); + } public static void registerAllExtensions( com.google.protobuf.ExtensionRegistryLite registry) { } @@ -56,36 +67,33 @@ public interface MemAllocatorStatsOrBuilder extends * Protobuf type {@code tensorflow.MemAllocatorStats} */ public static final class MemAllocatorStats extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.MemAllocatorStats) MemAllocatorStatsOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + MemAllocatorStats.class.getName()); + } // Use MemAllocatorStats.newBuilder() to construct. - private MemAllocatorStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private MemAllocatorStats(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private MemAllocatorStats() { } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new MemAllocatorStats(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.BfcMemoryMap.internal_static_tensorflow_MemAllocatorStats_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.BfcMemoryMap.internal_static_tensorflow_MemAllocatorStats_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -93,7 +101,7 @@ protected java.lang.Object newInstance( } public static final int NUM_ALLOCS_FIELD_NUMBER = 1; - private long numAllocs_; + private long numAllocs_ = 0L; /** * int64 num_allocs = 1; * @return The numAllocs. @@ -104,7 +112,7 @@ public long getNumAllocs() { } public static final int BYTES_IN_USE_FIELD_NUMBER = 2; - private long bytesInUse_; + private long bytesInUse_ = 0L; /** * int64 bytes_in_use = 2; * @return The bytesInUse. @@ -115,7 +123,7 @@ public long getBytesInUse() { } public static final int PEAK_BYTES_IN_USE_FIELD_NUMBER = 3; - private long peakBytesInUse_; + private long peakBytesInUse_ = 0L; /** * int64 peak_bytes_in_use = 3; * @return The peakBytesInUse. @@ -126,7 +134,7 @@ public long getPeakBytesInUse() { } public static final int LARGEST_ALLOC_SIZE_FIELD_NUMBER = 4; - private long largestAllocSize_; + private long largestAllocSize_ = 0L; /** * int64 largest_alloc_size = 4; * @return The largestAllocSize. @@ -137,7 +145,7 @@ public long getLargestAllocSize() { } public static final int FRAGMENTATION_METRIC_FIELD_NUMBER = 5; - private float fragmentationMetric_; + private float fragmentationMetric_ = 0F; /** * float fragmentation_metric = 5; * @return The fragmentationMetric. @@ -296,39 +304,41 @@ public static org.tensorflow.proto.BfcMemoryMap.MemAllocatorStats parseFrom( } public static org.tensorflow.proto.BfcMemoryMap.MemAllocatorStats parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.BfcMemoryMap.MemAllocatorStats parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.BfcMemoryMap.MemAllocatorStats parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.BfcMemoryMap.MemAllocatorStats parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.BfcMemoryMap.MemAllocatorStats parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.BfcMemoryMap.MemAllocatorStats parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -348,7 +358,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -360,7 +370,7 @@ protected Builder newBuilderForType( * Protobuf type {@code tensorflow.MemAllocatorStats} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.MemAllocatorStats) org.tensorflow.proto.BfcMemoryMap.MemAllocatorStatsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -369,7 +379,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.BfcMemoryMap.internal_static_tensorflow_MemAllocatorStats_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -382,23 +392,19 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; numAllocs_ = 0L; - bytesInUse_ = 0L; - peakBytesInUse_ = 0L; - largestAllocSize_ = 0L; - fragmentationMetric_ = 0F; - return this; } @@ -425,47 +431,30 @@ public org.tensorflow.proto.BfcMemoryMap.MemAllocatorStats build() { @java.lang.Override public org.tensorflow.proto.BfcMemoryMap.MemAllocatorStats buildPartial() { org.tensorflow.proto.BfcMemoryMap.MemAllocatorStats result = new org.tensorflow.proto.BfcMemoryMap.MemAllocatorStats(this); - result.numAllocs_ = numAllocs_; - result.bytesInUse_ = bytesInUse_; - result.peakBytesInUse_ = peakBytesInUse_; - result.largestAllocSize_ = largestAllocSize_; - result.fragmentationMetric_ = fragmentationMetric_; + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.BfcMemoryMap.MemAllocatorStats result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.numAllocs_ = numAllocs_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.bytesInUse_ = bytesInUse_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.peakBytesInUse_ = peakBytesInUse_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.largestAllocSize_ = largestAllocSize_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.fragmentationMetric_ = fragmentationMetric_; + } } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.BfcMemoryMap.MemAllocatorStats) { @@ -521,27 +510,27 @@ public Builder mergeFrom( break; case 8: { numAllocs_ = input.readInt64(); - + bitField0_ |= 0x00000001; break; } // case 8 case 16: { bytesInUse_ = input.readInt64(); - + bitField0_ |= 0x00000002; break; } // case 16 case 24: { peakBytesInUse_ = input.readInt64(); - + bitField0_ |= 0x00000004; break; } // case 24 case 32: { largestAllocSize_ = input.readInt64(); - + bitField0_ |= 0x00000008; break; } // case 32 case 45: { fragmentationMetric_ = input.readFloat(); - + bitField0_ |= 0x00000010; break; } // case 45 default: { @@ -559,6 +548,7 @@ public Builder mergeFrom( } // finally return this; } + private int bitField0_; private long numAllocs_ ; /** @@ -575,8 +565,9 @@ public long getNumAllocs() { * @return This builder for chaining. */ public Builder setNumAllocs(long value) { - + numAllocs_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -585,7 +576,7 @@ public Builder setNumAllocs(long value) { * @return This builder for chaining. */ public Builder clearNumAllocs() { - + bitField0_ = (bitField0_ & ~0x00000001); numAllocs_ = 0L; onChanged(); return this; @@ -606,8 +597,9 @@ public long getBytesInUse() { * @return This builder for chaining. */ public Builder setBytesInUse(long value) { - + bytesInUse_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -616,7 +608,7 @@ public Builder setBytesInUse(long value) { * @return This builder for chaining. */ public Builder clearBytesInUse() { - + bitField0_ = (bitField0_ & ~0x00000002); bytesInUse_ = 0L; onChanged(); return this; @@ -637,8 +629,9 @@ public long getPeakBytesInUse() { * @return This builder for chaining. */ public Builder setPeakBytesInUse(long value) { - + peakBytesInUse_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -647,7 +640,7 @@ public Builder setPeakBytesInUse(long value) { * @return This builder for chaining. */ public Builder clearPeakBytesInUse() { - + bitField0_ = (bitField0_ & ~0x00000004); peakBytesInUse_ = 0L; onChanged(); return this; @@ -668,8 +661,9 @@ public long getLargestAllocSize() { * @return This builder for chaining. */ public Builder setLargestAllocSize(long value) { - + largestAllocSize_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -678,7 +672,7 @@ public Builder setLargestAllocSize(long value) { * @return This builder for chaining. */ public Builder clearLargestAllocSize() { - + bitField0_ = (bitField0_ & ~0x00000008); largestAllocSize_ = 0L; onChanged(); return this; @@ -699,8 +693,9 @@ public float getFragmentationMetric() { * @return This builder for chaining. */ public Builder setFragmentationMetric(float value) { - + fragmentationMetric_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -709,23 +704,11 @@ public Builder setFragmentationMetric(float value) { * @return This builder for chaining. */ public Builder clearFragmentationMetric() { - + bitField0_ = (bitField0_ & ~0x00000010); fragmentationMetric_ = 0F; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.MemAllocatorStats) } @@ -846,37 +829,34 @@ public interface MemChunkOrBuilder extends * Protobuf type {@code tensorflow.MemChunk} */ public static final class MemChunk extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.MemChunk) MemChunkOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + MemChunk.class.getName()); + } // Use MemChunk.newBuilder() to construct. - private MemChunk(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private MemChunk(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private MemChunk() { opName_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new MemChunk(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.BfcMemoryMap.internal_static_tensorflow_MemChunk_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.BfcMemoryMap.internal_static_tensorflow_MemChunk_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -884,7 +864,7 @@ protected java.lang.Object newInstance( } public static final int ADDRESS_FIELD_NUMBER = 1; - private long address_; + private long address_ = 0L; /** * uint64 address = 1; * @return The address. @@ -895,7 +875,7 @@ public long getAddress() { } public static final int SIZE_FIELD_NUMBER = 2; - private long size_; + private long size_ = 0L; /** * int64 size = 2; * @return The size. @@ -906,7 +886,7 @@ public long getSize() { } public static final int REQUESTED_SIZE_FIELD_NUMBER = 3; - private long requestedSize_; + private long requestedSize_ = 0L; /** * int64 requested_size = 3; * @return The requestedSize. @@ -917,7 +897,7 @@ public long getRequestedSize() { } public static final int BIN_FIELD_NUMBER = 4; - private int bin_; + private int bin_ = 0; /** * int32 bin = 4; * @return The bin. @@ -928,7 +908,8 @@ public int getBin() { } public static final int OP_NAME_FIELD_NUMBER = 5; - private volatile java.lang.Object opName_; + @SuppressWarnings("serial") + private volatile java.lang.Object opName_ = ""; /** * string op_name = 5; * @return The opName. @@ -966,7 +947,7 @@ public java.lang.String getOpName() { } public static final int FREED_AT_COUNT_FIELD_NUMBER = 6; - private long freedAtCount_; + private long freedAtCount_ = 0L; /** * uint64 freed_at_count = 6; * @return The freedAtCount. @@ -977,7 +958,7 @@ public long getFreedAtCount() { } public static final int ACTION_COUNT_FIELD_NUMBER = 7; - private long actionCount_; + private long actionCount_ = 0L; /** * uint64 action_count = 7; * @return The actionCount. @@ -988,7 +969,7 @@ public long getActionCount() { } public static final int IN_USE_FIELD_NUMBER = 8; - private boolean inUse_; + private boolean inUse_ = false; /** * bool in_use = 8; * @return The inUse. @@ -999,7 +980,7 @@ public boolean getInUse() { } public static final int STEP_ID_FIELD_NUMBER = 9; - private long stepId_; + private long stepId_ = 0L; /** * uint64 step_id = 9; * @return The stepId. @@ -1035,8 +1016,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (bin_ != 0) { output.writeInt32(4, bin_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(opName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, opName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(opName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, opName_); } if (freedAtCount_ != 0L) { output.writeUInt64(6, freedAtCount_); @@ -1075,8 +1056,8 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeInt32Size(4, bin_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(opName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, opName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(opName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, opName_); } if (freedAtCount_ != 0L) { size += com.google.protobuf.CodedOutputStream @@ -1202,39 +1183,41 @@ public static org.tensorflow.proto.BfcMemoryMap.MemChunk parseFrom( } public static org.tensorflow.proto.BfcMemoryMap.MemChunk parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.BfcMemoryMap.MemChunk parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.BfcMemoryMap.MemChunk parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.BfcMemoryMap.MemChunk parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.BfcMemoryMap.MemChunk parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.BfcMemoryMap.MemChunk parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -1254,7 +1237,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -1262,7 +1245,7 @@ protected Builder newBuilderForType( * Protobuf type {@code tensorflow.MemChunk} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.MemChunk) org.tensorflow.proto.BfcMemoryMap.MemChunkOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -1271,7 +1254,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.BfcMemoryMap.internal_static_tensorflow_MemChunk_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -1284,31 +1267,23 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; address_ = 0L; - size_ = 0L; - requestedSize_ = 0L; - bin_ = 0; - opName_ = ""; - freedAtCount_ = 0L; - actionCount_ = 0L; - inUse_ = false; - stepId_ = 0L; - return this; } @@ -1335,51 +1310,42 @@ public org.tensorflow.proto.BfcMemoryMap.MemChunk build() { @java.lang.Override public org.tensorflow.proto.BfcMemoryMap.MemChunk buildPartial() { org.tensorflow.proto.BfcMemoryMap.MemChunk result = new org.tensorflow.proto.BfcMemoryMap.MemChunk(this); - result.address_ = address_; - result.size_ = size_; - result.requestedSize_ = requestedSize_; - result.bin_ = bin_; - result.opName_ = opName_; - result.freedAtCount_ = freedAtCount_; - result.actionCount_ = actionCount_; - result.inUse_ = inUse_; - result.stepId_ = stepId_; + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.BfcMemoryMap.MemChunk result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.address_ = address_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.size_ = size_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestedSize_ = requestedSize_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.bin_ = bin_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.opName_ = opName_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.freedAtCount_ = freedAtCount_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.actionCount_ = actionCount_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.inUse_ = inUse_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.stepId_ = stepId_; + } } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.BfcMemoryMap.MemChunk) { @@ -1406,6 +1372,7 @@ public Builder mergeFrom(org.tensorflow.proto.BfcMemoryMap.MemChunk other) { } if (!other.getOpName().isEmpty()) { opName_ = other.opName_; + bitField0_ |= 0x00000010; onChanged(); } if (other.getFreedAtCount() != 0L) { @@ -1448,47 +1415,47 @@ public Builder mergeFrom( break; case 8: { address_ = input.readUInt64(); - + bitField0_ |= 0x00000001; break; } // case 8 case 16: { size_ = input.readInt64(); - + bitField0_ |= 0x00000002; break; } // case 16 case 24: { requestedSize_ = input.readInt64(); - + bitField0_ |= 0x00000004; break; } // case 24 case 32: { bin_ = input.readInt32(); - + bitField0_ |= 0x00000008; break; } // case 32 case 42: { opName_ = input.readStringRequireUtf8(); - + bitField0_ |= 0x00000010; break; } // case 42 case 48: { freedAtCount_ = input.readUInt64(); - + bitField0_ |= 0x00000020; break; } // case 48 case 56: { actionCount_ = input.readUInt64(); - + bitField0_ |= 0x00000040; break; } // case 56 case 64: { inUse_ = input.readBool(); - + bitField0_ |= 0x00000080; break; } // case 64 case 72: { stepId_ = input.readUInt64(); - + bitField0_ |= 0x00000100; break; } // case 72 default: { @@ -1506,6 +1473,7 @@ public Builder mergeFrom( } // finally return this; } + private int bitField0_; private long address_ ; /** @@ -1522,8 +1490,9 @@ public long getAddress() { * @return This builder for chaining. */ public Builder setAddress(long value) { - + address_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -1532,7 +1501,7 @@ public Builder setAddress(long value) { * @return This builder for chaining. */ public Builder clearAddress() { - + bitField0_ = (bitField0_ & ~0x00000001); address_ = 0L; onChanged(); return this; @@ -1553,8 +1522,9 @@ public long getSize() { * @return This builder for chaining. */ public Builder setSize(long value) { - + size_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -1563,7 +1533,7 @@ public Builder setSize(long value) { * @return This builder for chaining. */ public Builder clearSize() { - + bitField0_ = (bitField0_ & ~0x00000002); size_ = 0L; onChanged(); return this; @@ -1584,8 +1554,9 @@ public long getRequestedSize() { * @return This builder for chaining. */ public Builder setRequestedSize(long value) { - + requestedSize_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -1594,7 +1565,7 @@ public Builder setRequestedSize(long value) { * @return This builder for chaining. */ public Builder clearRequestedSize() { - + bitField0_ = (bitField0_ & ~0x00000004); requestedSize_ = 0L; onChanged(); return this; @@ -1615,8 +1586,9 @@ public int getBin() { * @return This builder for chaining. */ public Builder setBin(int value) { - + bin_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1625,7 +1597,7 @@ public Builder setBin(int value) { * @return This builder for chaining. */ public Builder clearBin() { - + bitField0_ = (bitField0_ & ~0x00000008); bin_ = 0; onChanged(); return this; @@ -1672,11 +1644,9 @@ public java.lang.String getOpName() { */ public Builder setOpName( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } opName_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -1685,8 +1655,8 @@ public Builder setOpName( * @return This builder for chaining. */ public Builder clearOpName() { - opName_ = getDefaultInstance().getOpName(); + bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } @@ -1697,12 +1667,10 @@ public Builder clearOpName() { */ public Builder setOpNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); opName_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -1722,8 +1690,9 @@ public long getFreedAtCount() { * @return This builder for chaining. */ public Builder setFreedAtCount(long value) { - + freedAtCount_ = value; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -1732,7 +1701,7 @@ public Builder setFreedAtCount(long value) { * @return This builder for chaining. */ public Builder clearFreedAtCount() { - + bitField0_ = (bitField0_ & ~0x00000020); freedAtCount_ = 0L; onChanged(); return this; @@ -1753,8 +1722,9 @@ public long getActionCount() { * @return This builder for chaining. */ public Builder setActionCount(long value) { - + actionCount_ = value; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -1763,7 +1733,7 @@ public Builder setActionCount(long value) { * @return This builder for chaining. */ public Builder clearActionCount() { - + bitField0_ = (bitField0_ & ~0x00000040); actionCount_ = 0L; onChanged(); return this; @@ -1784,8 +1754,9 @@ public boolean getInUse() { * @return This builder for chaining. */ public Builder setInUse(boolean value) { - + inUse_ = value; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -1794,7 +1765,7 @@ public Builder setInUse(boolean value) { * @return This builder for chaining. */ public Builder clearInUse() { - + bitField0_ = (bitField0_ & ~0x00000080); inUse_ = false; onChanged(); return this; @@ -1815,8 +1786,9 @@ public long getStepId() { * @return This builder for chaining. */ public Builder setStepId(long value) { - + stepId_ = value; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -1825,23 +1797,11 @@ public Builder setStepId(long value) { * @return This builder for chaining. */ public Builder clearStepId() { - + bitField0_ = (bitField0_ & ~0x00000100); stepId_ = 0L; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.MemChunk) } @@ -1932,36 +1892,33 @@ public interface BinSummaryOrBuilder extends * Protobuf type {@code tensorflow.BinSummary} */ public static final class BinSummary extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.BinSummary) BinSummaryOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + BinSummary.class.getName()); + } // Use BinSummary.newBuilder() to construct. - private BinSummary(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private BinSummary(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private BinSummary() { } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BinSummary(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.BfcMemoryMap.internal_static_tensorflow_BinSummary_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.BfcMemoryMap.internal_static_tensorflow_BinSummary_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -1969,7 +1926,7 @@ protected java.lang.Object newInstance( } public static final int BIN_FIELD_NUMBER = 1; - private int bin_; + private int bin_ = 0; /** * int32 bin = 1; * @return The bin. @@ -1980,7 +1937,7 @@ public int getBin() { } public static final int TOTAL_BYTES_IN_USE_FIELD_NUMBER = 2; - private long totalBytesInUse_; + private long totalBytesInUse_ = 0L; /** * int64 total_bytes_in_use = 2; * @return The totalBytesInUse. @@ -1991,7 +1948,7 @@ public long getTotalBytesInUse() { } public static final int TOTAL_BYTES_IN_BIN_FIELD_NUMBER = 3; - private long totalBytesInBin_; + private long totalBytesInBin_ = 0L; /** * int64 total_bytes_in_bin = 3; * @return The totalBytesInBin. @@ -2002,7 +1959,7 @@ public long getTotalBytesInBin() { } public static final int TOTAL_CHUNKS_IN_USE_FIELD_NUMBER = 4; - private long totalChunksInUse_; + private long totalChunksInUse_ = 0L; /** * int64 total_chunks_in_use = 4; * @return The totalChunksInUse. @@ -2013,7 +1970,7 @@ public long getTotalChunksInUse() { } public static final int TOTAL_CHUNKS_IN_BIN_FIELD_NUMBER = 5; - private long totalChunksInBin_; + private long totalChunksInBin_ = 0L; /** * int64 total_chunks_in_bin = 5; * @return The totalChunksInBin. @@ -2170,39 +2127,41 @@ public static org.tensorflow.proto.BfcMemoryMap.BinSummary parseFrom( } public static org.tensorflow.proto.BfcMemoryMap.BinSummary parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.BfcMemoryMap.BinSummary parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.BfcMemoryMap.BinSummary parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.BfcMemoryMap.BinSummary parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.BfcMemoryMap.BinSummary parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.BfcMemoryMap.BinSummary parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -2222,7 +2181,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -2230,7 +2189,7 @@ protected Builder newBuilderForType( * Protobuf type {@code tensorflow.BinSummary} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.BinSummary) org.tensorflow.proto.BfcMemoryMap.BinSummaryOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -2239,7 +2198,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.BfcMemoryMap.internal_static_tensorflow_BinSummary_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -2252,23 +2211,19 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; bin_ = 0; - totalBytesInUse_ = 0L; - totalBytesInBin_ = 0L; - totalChunksInUse_ = 0L; - totalChunksInBin_ = 0L; - return this; } @@ -2295,47 +2250,30 @@ public org.tensorflow.proto.BfcMemoryMap.BinSummary build() { @java.lang.Override public org.tensorflow.proto.BfcMemoryMap.BinSummary buildPartial() { org.tensorflow.proto.BfcMemoryMap.BinSummary result = new org.tensorflow.proto.BfcMemoryMap.BinSummary(this); - result.bin_ = bin_; - result.totalBytesInUse_ = totalBytesInUse_; - result.totalBytesInBin_ = totalBytesInBin_; - result.totalChunksInUse_ = totalChunksInUse_; - result.totalChunksInBin_ = totalChunksInBin_; + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.BfcMemoryMap.BinSummary result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.bin_ = bin_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.totalBytesInUse_ = totalBytesInUse_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.totalBytesInBin_ = totalBytesInBin_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.totalChunksInUse_ = totalChunksInUse_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.totalChunksInBin_ = totalChunksInBin_; + } } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.BfcMemoryMap.BinSummary) { @@ -2391,27 +2329,27 @@ public Builder mergeFrom( break; case 8: { bin_ = input.readInt32(); - + bitField0_ |= 0x00000001; break; } // case 8 case 16: { totalBytesInUse_ = input.readInt64(); - + bitField0_ |= 0x00000002; break; } // case 16 case 24: { totalBytesInBin_ = input.readInt64(); - + bitField0_ |= 0x00000004; break; } // case 24 case 32: { totalChunksInUse_ = input.readInt64(); - + bitField0_ |= 0x00000008; break; } // case 32 case 40: { totalChunksInBin_ = input.readInt64(); - + bitField0_ |= 0x00000010; break; } // case 40 default: { @@ -2429,6 +2367,7 @@ public Builder mergeFrom( } // finally return this; } + private int bitField0_; private int bin_ ; /** @@ -2445,8 +2384,9 @@ public int getBin() { * @return This builder for chaining. */ public Builder setBin(int value) { - + bin_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -2455,7 +2395,7 @@ public Builder setBin(int value) { * @return This builder for chaining. */ public Builder clearBin() { - + bitField0_ = (bitField0_ & ~0x00000001); bin_ = 0; onChanged(); return this; @@ -2476,8 +2416,9 @@ public long getTotalBytesInUse() { * @return This builder for chaining. */ public Builder setTotalBytesInUse(long value) { - + totalBytesInUse_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -2486,7 +2427,7 @@ public Builder setTotalBytesInUse(long value) { * @return This builder for chaining. */ public Builder clearTotalBytesInUse() { - + bitField0_ = (bitField0_ & ~0x00000002); totalBytesInUse_ = 0L; onChanged(); return this; @@ -2507,8 +2448,9 @@ public long getTotalBytesInBin() { * @return This builder for chaining. */ public Builder setTotalBytesInBin(long value) { - + totalBytesInBin_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -2517,7 +2459,7 @@ public Builder setTotalBytesInBin(long value) { * @return This builder for chaining. */ public Builder clearTotalBytesInBin() { - + bitField0_ = (bitField0_ & ~0x00000004); totalBytesInBin_ = 0L; onChanged(); return this; @@ -2538,8 +2480,9 @@ public long getTotalChunksInUse() { * @return This builder for chaining. */ public Builder setTotalChunksInUse(long value) { - + totalChunksInUse_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -2548,7 +2491,7 @@ public Builder setTotalChunksInUse(long value) { * @return This builder for chaining. */ public Builder clearTotalChunksInUse() { - + bitField0_ = (bitField0_ & ~0x00000008); totalChunksInUse_ = 0L; onChanged(); return this; @@ -2569,8 +2512,9 @@ public long getTotalChunksInBin() { * @return This builder for chaining. */ public Builder setTotalChunksInBin(long value) { - + totalChunksInBin_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2579,23 +2523,11 @@ public Builder setTotalChunksInBin(long value) { * @return This builder for chaining. */ public Builder clearTotalChunksInBin() { - + bitField0_ = (bitField0_ & ~0x00000010); totalChunksInBin_ = 0L; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.BinSummary) } @@ -2668,36 +2600,33 @@ public interface SnapShotOrBuilder extends * Protobuf type {@code tensorflow.SnapShot} */ public static final class SnapShot extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.SnapShot) SnapShotOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + SnapShot.class.getName()); + } // Use SnapShot.newBuilder() to construct. - private SnapShot(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private SnapShot(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private SnapShot() { } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SnapShot(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.BfcMemoryMap.internal_static_tensorflow_SnapShot_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.BfcMemoryMap.internal_static_tensorflow_SnapShot_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -2705,7 +2634,7 @@ protected java.lang.Object newInstance( } public static final int ACTION_COUNT_FIELD_NUMBER = 1; - private long actionCount_; + private long actionCount_ = 0L; /** * uint64 action_count = 1; * @return The actionCount. @@ -2716,7 +2645,7 @@ public long getActionCount() { } public static final int SIZE_FIELD_NUMBER = 2; - private long size_; + private long size_ = 0L; /** * int64 size = 2; * @return The size. @@ -2838,39 +2767,41 @@ public static org.tensorflow.proto.BfcMemoryMap.SnapShot parseFrom( } public static org.tensorflow.proto.BfcMemoryMap.SnapShot parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.BfcMemoryMap.SnapShot parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.BfcMemoryMap.SnapShot parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.BfcMemoryMap.SnapShot parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.BfcMemoryMap.SnapShot parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.BfcMemoryMap.SnapShot parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -2890,7 +2821,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -2898,7 +2829,7 @@ protected Builder newBuilderForType( * Protobuf type {@code tensorflow.SnapShot} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.SnapShot) org.tensorflow.proto.BfcMemoryMap.SnapShotOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -2907,7 +2838,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.BfcMemoryMap.internal_static_tensorflow_SnapShot_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -2920,17 +2851,16 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; actionCount_ = 0L; - size_ = 0L; - return this; } @@ -2957,44 +2887,21 @@ public org.tensorflow.proto.BfcMemoryMap.SnapShot build() { @java.lang.Override public org.tensorflow.proto.BfcMemoryMap.SnapShot buildPartial() { org.tensorflow.proto.BfcMemoryMap.SnapShot result = new org.tensorflow.proto.BfcMemoryMap.SnapShot(this); - result.actionCount_ = actionCount_; - result.size_ = size_; + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.BfcMemoryMap.SnapShot result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.actionCount_ = actionCount_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.size_ = size_; + } } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.BfcMemoryMap.SnapShot) { @@ -3041,12 +2948,12 @@ public Builder mergeFrom( break; case 8: { actionCount_ = input.readUInt64(); - + bitField0_ |= 0x00000001; break; } // case 8 case 16: { size_ = input.readInt64(); - + bitField0_ |= 0x00000002; break; } // case 16 default: { @@ -3064,6 +2971,7 @@ public Builder mergeFrom( } // finally return this; } + private int bitField0_; private long actionCount_ ; /** @@ -3080,8 +2988,9 @@ public long getActionCount() { * @return This builder for chaining. */ public Builder setActionCount(long value) { - + actionCount_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -3090,7 +2999,7 @@ public Builder setActionCount(long value) { * @return This builder for chaining. */ public Builder clearActionCount() { - + bitField0_ = (bitField0_ & ~0x00000001); actionCount_ = 0L; onChanged(); return this; @@ -3111,8 +3020,9 @@ public long getSize() { * @return This builder for chaining. */ public Builder setSize(long value) { - + size_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -3121,23 +3031,11 @@ public Builder setSize(long value) { * @return This builder for chaining. */ public Builder clearSize() { - + bitField0_ = (bitField0_ & ~0x00000002); size_ = 0L; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.SnapShot) } @@ -3297,12 +3195,21 @@ org.tensorflow.proto.BfcMemoryMap.SnapShotOrBuilder getSnapShotOrBuilder( * Protobuf type {@code tensorflow.MemoryDump} */ public static final class MemoryDump extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.MemoryDump) MemoryDumpOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + MemoryDump.class.getName()); + } // Use MemoryDump.newBuilder() to construct. - private MemoryDump(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private MemoryDump(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private MemoryDump() { @@ -3312,33 +3219,23 @@ private MemoryDump() { snapShot_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new MemoryDump(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.BfcMemoryMap.internal_static_tensorflow_MemoryDump_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.BfcMemoryMap.internal_static_tensorflow_MemoryDump_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.proto.BfcMemoryMap.MemoryDump.class, org.tensorflow.proto.BfcMemoryMap.MemoryDump.Builder.class); } + private int bitField0_; public static final int ALLOCATOR_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object allocatorName_; + @SuppressWarnings("serial") + private volatile java.lang.Object allocatorName_ = ""; /** * string allocator_name = 1; * @return The allocatorName. @@ -3376,6 +3273,7 @@ public java.lang.String getAllocatorName() { } public static final int BIN_SUMMARY_FIELD_NUMBER = 2; + @SuppressWarnings("serial") private java.util.List binSummary_; /** * repeated .tensorflow.BinSummary bin_summary = 2; @@ -3416,6 +3314,7 @@ public org.tensorflow.proto.BfcMemoryMap.BinSummaryOrBuilder getBinSummaryOrBuil } public static final int CHUNK_FIELD_NUMBER = 3; + @SuppressWarnings("serial") private java.util.List chunk_; /** * repeated .tensorflow.MemChunk chunk = 3; @@ -3456,6 +3355,7 @@ public org.tensorflow.proto.BfcMemoryMap.MemChunkOrBuilder getChunkOrBuilder( } public static final int SNAP_SHOT_FIELD_NUMBER = 4; + @SuppressWarnings("serial") private java.util.List snapShot_; /** * repeated .tensorflow.SnapShot snap_shot = 4; @@ -3503,7 +3403,7 @@ public org.tensorflow.proto.BfcMemoryMap.SnapShotOrBuilder getSnapShotOrBuilder( */ @java.lang.Override public boolean hasStats() { - return stats_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * .tensorflow.MemAllocatorStats stats = 5; @@ -3518,7 +3418,7 @@ public org.tensorflow.proto.BfcMemoryMap.MemAllocatorStats getStats() { */ @java.lang.Override public org.tensorflow.proto.BfcMemoryMap.MemAllocatorStatsOrBuilder getStatsOrBuilder() { - return getStats(); + return stats_ == null ? org.tensorflow.proto.BfcMemoryMap.MemAllocatorStats.getDefaultInstance() : stats_; } private byte memoizedIsInitialized = -1; @@ -3535,8 +3435,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(allocatorName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, allocatorName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(allocatorName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, allocatorName_); } for (int i = 0; i < binSummary_.size(); i++) { output.writeMessage(2, binSummary_.get(i)); @@ -3547,7 +3447,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < snapShot_.size(); i++) { output.writeMessage(4, snapShot_.get(i)); } - if (stats_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(5, getStats()); } getUnknownFields().writeTo(output); @@ -3559,8 +3459,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(allocatorName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, allocatorName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(allocatorName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, allocatorName_); } for (int i = 0; i < binSummary_.size(); i++) { size += com.google.protobuf.CodedOutputStream @@ -3574,7 +3474,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, snapShot_.get(i)); } - if (stats_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, getStats()); } @@ -3674,39 +3574,41 @@ public static org.tensorflow.proto.BfcMemoryMap.MemoryDump parseFrom( } public static org.tensorflow.proto.BfcMemoryMap.MemoryDump parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.BfcMemoryMap.MemoryDump parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.BfcMemoryMap.MemoryDump parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.BfcMemoryMap.MemoryDump parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.BfcMemoryMap.MemoryDump parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.BfcMemoryMap.MemoryDump parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -3726,7 +3628,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -3734,7 +3636,7 @@ protected Builder newBuilderForType( * Protobuf type {@code tensorflow.MemoryDump} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.MemoryDump) org.tensorflow.proto.BfcMemoryMap.MemoryDumpOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -3743,7 +3645,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.BfcMemoryMap.internal_static_tensorflow_MemoryDump_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -3752,44 +3654,52 @@ public static final class Builder extends // Construct using org.tensorflow.proto.BfcMemoryMap.MemoryDump.newBuilder() private Builder() { - + maybeForceBuilderInitialization(); } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getBinSummaryFieldBuilder(); + getChunkFieldBuilder(); + getSnapShotFieldBuilder(); + getStatsFieldBuilder(); + } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; allocatorName_ = ""; - if (binSummaryBuilder_ == null) { binSummary_ = java.util.Collections.emptyList(); } else { binSummary_ = null; binSummaryBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); if (chunkBuilder_ == null) { chunk_ = java.util.Collections.emptyList(); } else { chunk_ = null; chunkBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); if (snapShotBuilder_ == null) { snapShot_ = java.util.Collections.emptyList(); } else { snapShot_ = null; snapShotBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000004); - if (statsBuilder_ == null) { - stats_ = null; - } else { - stats_ = null; + bitField0_ = (bitField0_ & ~0x00000008); + stats_ = null; + if (statsBuilder_ != null) { + statsBuilder_.dispose(); statsBuilder_ = null; } return this; @@ -3818,76 +3728,57 @@ public org.tensorflow.proto.BfcMemoryMap.MemoryDump build() { @java.lang.Override public org.tensorflow.proto.BfcMemoryMap.MemoryDump buildPartial() { org.tensorflow.proto.BfcMemoryMap.MemoryDump result = new org.tensorflow.proto.BfcMemoryMap.MemoryDump(this); - int from_bitField0_ = bitField0_; - result.allocatorName_ = allocatorName_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(org.tensorflow.proto.BfcMemoryMap.MemoryDump result) { if (binSummaryBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000002) != 0)) { binSummary_ = java.util.Collections.unmodifiableList(binSummary_); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); } result.binSummary_ = binSummary_; } else { result.binSummary_ = binSummaryBuilder_.build(); } if (chunkBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { chunk_ = java.util.Collections.unmodifiableList(chunk_); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); } result.chunk_ = chunk_; } else { result.chunk_ = chunkBuilder_.build(); } if (snapShotBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { + if (((bitField0_ & 0x00000008) != 0)) { snapShot_ = java.util.Collections.unmodifiableList(snapShot_); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); } result.snapShot_ = snapShot_; } else { result.snapShot_ = snapShotBuilder_.build(); } - if (statsBuilder_ == null) { - result.stats_ = stats_; - } else { - result.stats_ = statsBuilder_.build(); - } - onBuilt(); - return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.BfcMemoryMap.MemoryDump result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.allocatorName_ = allocatorName_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.stats_ = statsBuilder_ == null + ? stats_ + : statsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.BfcMemoryMap.MemoryDump) { @@ -3902,13 +3793,14 @@ public Builder mergeFrom(org.tensorflow.proto.BfcMemoryMap.MemoryDump other) { if (other == org.tensorflow.proto.BfcMemoryMap.MemoryDump.getDefaultInstance()) return this; if (!other.getAllocatorName().isEmpty()) { allocatorName_ = other.allocatorName_; + bitField0_ |= 0x00000001; onChanged(); } if (binSummaryBuilder_ == null) { if (!other.binSummary_.isEmpty()) { if (binSummary_.isEmpty()) { binSummary_ = other.binSummary_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); } else { ensureBinSummaryIsMutable(); binSummary_.addAll(other.binSummary_); @@ -3921,9 +3813,9 @@ public Builder mergeFrom(org.tensorflow.proto.BfcMemoryMap.MemoryDump other) { binSummaryBuilder_.dispose(); binSummaryBuilder_ = null; binSummary_ = other.binSummary_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); binSummaryBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getBinSummaryFieldBuilder() : null; } else { binSummaryBuilder_.addAllMessages(other.binSummary_); @@ -3934,7 +3826,7 @@ public Builder mergeFrom(org.tensorflow.proto.BfcMemoryMap.MemoryDump other) { if (!other.chunk_.isEmpty()) { if (chunk_.isEmpty()) { chunk_ = other.chunk_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); } else { ensureChunkIsMutable(); chunk_.addAll(other.chunk_); @@ -3947,9 +3839,9 @@ public Builder mergeFrom(org.tensorflow.proto.BfcMemoryMap.MemoryDump other) { chunkBuilder_.dispose(); chunkBuilder_ = null; chunk_ = other.chunk_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); chunkBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getChunkFieldBuilder() : null; } else { chunkBuilder_.addAllMessages(other.chunk_); @@ -3960,7 +3852,7 @@ public Builder mergeFrom(org.tensorflow.proto.BfcMemoryMap.MemoryDump other) { if (!other.snapShot_.isEmpty()) { if (snapShot_.isEmpty()) { snapShot_ = other.snapShot_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); } else { ensureSnapShotIsMutable(); snapShot_.addAll(other.snapShot_); @@ -3973,9 +3865,9 @@ public Builder mergeFrom(org.tensorflow.proto.BfcMemoryMap.MemoryDump other) { snapShotBuilder_.dispose(); snapShotBuilder_ = null; snapShot_ = other.snapShot_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); snapShotBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getSnapShotFieldBuilder() : null; } else { snapShotBuilder_.addAllMessages(other.snapShot_); @@ -4013,7 +3905,7 @@ public Builder mergeFrom( break; case 10: { allocatorName_ = input.readStringRequireUtf8(); - + bitField0_ |= 0x00000001; break; } // case 10 case 18: { @@ -4059,7 +3951,7 @@ public Builder mergeFrom( input.readMessage( getStatsFieldBuilder().getBuilder(), extensionRegistry); - + bitField0_ |= 0x00000010; break; } // case 42 default: { @@ -4120,11 +4012,9 @@ public java.lang.String getAllocatorName() { */ public Builder setAllocatorName( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } allocatorName_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -4133,8 +4023,8 @@ public Builder setAllocatorName( * @return This builder for chaining. */ public Builder clearAllocatorName() { - allocatorName_ = getDefaultInstance().getAllocatorName(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -4145,12 +4035,10 @@ public Builder clearAllocatorName() { */ public Builder setAllocatorNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); allocatorName_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -4158,13 +4046,13 @@ public Builder setAllocatorNameBytes( private java.util.List binSummary_ = java.util.Collections.emptyList(); private void ensureBinSummaryIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!((bitField0_ & 0x00000002) != 0)) { binSummary_ = new java.util.ArrayList(binSummary_); - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000002; } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.BfcMemoryMap.BinSummary, org.tensorflow.proto.BfcMemoryMap.BinSummary.Builder, org.tensorflow.proto.BfcMemoryMap.BinSummaryOrBuilder> binSummaryBuilder_; /** @@ -4310,7 +4198,7 @@ public Builder addAllBinSummary( public Builder clearBinSummary() { if (binSummaryBuilder_ == null) { binSummary_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { binSummaryBuilder_.clear(); @@ -4380,14 +4268,14 @@ public org.tensorflow.proto.BfcMemoryMap.BinSummary.Builder addBinSummaryBuilder getBinSummaryBuilderList() { return getBinSummaryFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.BfcMemoryMap.BinSummary, org.tensorflow.proto.BfcMemoryMap.BinSummary.Builder, org.tensorflow.proto.BfcMemoryMap.BinSummaryOrBuilder> getBinSummaryFieldBuilder() { if (binSummaryBuilder_ == null) { - binSummaryBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + binSummaryBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.BfcMemoryMap.BinSummary, org.tensorflow.proto.BfcMemoryMap.BinSummary.Builder, org.tensorflow.proto.BfcMemoryMap.BinSummaryOrBuilder>( binSummary_, - ((bitField0_ & 0x00000001) != 0), + ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); binSummary_ = null; @@ -4398,13 +4286,13 @@ public org.tensorflow.proto.BfcMemoryMap.BinSummary.Builder addBinSummaryBuilder private java.util.List chunk_ = java.util.Collections.emptyList(); private void ensureChunkIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { + if (!((bitField0_ & 0x00000004) != 0)) { chunk_ = new java.util.ArrayList(chunk_); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.BfcMemoryMap.MemChunk, org.tensorflow.proto.BfcMemoryMap.MemChunk.Builder, org.tensorflow.proto.BfcMemoryMap.MemChunkOrBuilder> chunkBuilder_; /** @@ -4550,7 +4438,7 @@ public Builder addAllChunk( public Builder clearChunk() { if (chunkBuilder_ == null) { chunk_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { chunkBuilder_.clear(); @@ -4620,14 +4508,14 @@ public org.tensorflow.proto.BfcMemoryMap.MemChunk.Builder addChunkBuilder( getChunkBuilderList() { return getChunkFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.BfcMemoryMap.MemChunk, org.tensorflow.proto.BfcMemoryMap.MemChunk.Builder, org.tensorflow.proto.BfcMemoryMap.MemChunkOrBuilder> getChunkFieldBuilder() { if (chunkBuilder_ == null) { - chunkBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + chunkBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.BfcMemoryMap.MemChunk, org.tensorflow.proto.BfcMemoryMap.MemChunk.Builder, org.tensorflow.proto.BfcMemoryMap.MemChunkOrBuilder>( chunk_, - ((bitField0_ & 0x00000002) != 0), + ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); chunk_ = null; @@ -4638,13 +4526,13 @@ public org.tensorflow.proto.BfcMemoryMap.MemChunk.Builder addChunkBuilder( private java.util.List snapShot_ = java.util.Collections.emptyList(); private void ensureSnapShotIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { + if (!((bitField0_ & 0x00000008) != 0)) { snapShot_ = new java.util.ArrayList(snapShot_); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.BfcMemoryMap.SnapShot, org.tensorflow.proto.BfcMemoryMap.SnapShot.Builder, org.tensorflow.proto.BfcMemoryMap.SnapShotOrBuilder> snapShotBuilder_; /** @@ -4790,7 +4678,7 @@ public Builder addAllSnapShot( public Builder clearSnapShot() { if (snapShotBuilder_ == null) { snapShot_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { snapShotBuilder_.clear(); @@ -4860,14 +4748,14 @@ public org.tensorflow.proto.BfcMemoryMap.SnapShot.Builder addSnapShotBuilder( getSnapShotBuilderList() { return getSnapShotFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.BfcMemoryMap.SnapShot, org.tensorflow.proto.BfcMemoryMap.SnapShot.Builder, org.tensorflow.proto.BfcMemoryMap.SnapShotOrBuilder> getSnapShotFieldBuilder() { if (snapShotBuilder_ == null) { - snapShotBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + snapShotBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.BfcMemoryMap.SnapShot, org.tensorflow.proto.BfcMemoryMap.SnapShot.Builder, org.tensorflow.proto.BfcMemoryMap.SnapShotOrBuilder>( snapShot_, - ((bitField0_ & 0x00000004) != 0), + ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); snapShot_ = null; @@ -4876,14 +4764,14 @@ public org.tensorflow.proto.BfcMemoryMap.SnapShot.Builder addSnapShotBuilder( } private org.tensorflow.proto.BfcMemoryMap.MemAllocatorStats stats_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.BfcMemoryMap.MemAllocatorStats, org.tensorflow.proto.BfcMemoryMap.MemAllocatorStats.Builder, org.tensorflow.proto.BfcMemoryMap.MemAllocatorStatsOrBuilder> statsBuilder_; /** * .tensorflow.MemAllocatorStats stats = 5; * @return Whether the stats field is set. */ public boolean hasStats() { - return statsBuilder_ != null || stats_ != null; + return ((bitField0_ & 0x00000010) != 0); } /** * .tensorflow.MemAllocatorStats stats = 5; @@ -4905,11 +4793,11 @@ public Builder setStats(org.tensorflow.proto.BfcMemoryMap.MemAllocatorStats valu throw new NullPointerException(); } stats_ = value; - onChanged(); } else { statsBuilder_.setMessage(value); } - + bitField0_ |= 0x00000010; + onChanged(); return this; } /** @@ -4919,11 +4807,11 @@ public Builder setStats( org.tensorflow.proto.BfcMemoryMap.MemAllocatorStats.Builder builderForValue) { if (statsBuilder_ == null) { stats_ = builderForValue.build(); - onChanged(); } else { statsBuilder_.setMessage(builderForValue.build()); } - + bitField0_ |= 0x00000010; + onChanged(); return this; } /** @@ -4931,38 +4819,40 @@ public Builder setStats( */ public Builder mergeStats(org.tensorflow.proto.BfcMemoryMap.MemAllocatorStats value) { if (statsBuilder_ == null) { - if (stats_ != null) { - stats_ = - org.tensorflow.proto.BfcMemoryMap.MemAllocatorStats.newBuilder(stats_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000010) != 0) && + stats_ != null && + stats_ != org.tensorflow.proto.BfcMemoryMap.MemAllocatorStats.getDefaultInstance()) { + getStatsBuilder().mergeFrom(value); } else { stats_ = value; } - onChanged(); } else { statsBuilder_.mergeFrom(value); } - + if (stats_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } return this; } /** * .tensorflow.MemAllocatorStats stats = 5; */ public Builder clearStats() { - if (statsBuilder_ == null) { - stats_ = null; - onChanged(); - } else { - stats_ = null; + bitField0_ = (bitField0_ & ~0x00000010); + stats_ = null; + if (statsBuilder_ != null) { + statsBuilder_.dispose(); statsBuilder_ = null; } - + onChanged(); return this; } /** * .tensorflow.MemAllocatorStats stats = 5; */ public org.tensorflow.proto.BfcMemoryMap.MemAllocatorStats.Builder getStatsBuilder() { - + bitField0_ |= 0x00000010; onChanged(); return getStatsFieldBuilder().getBuilder(); } @@ -4980,11 +4870,11 @@ public org.tensorflow.proto.BfcMemoryMap.MemAllocatorStatsOrBuilder getStatsOrBu /** * .tensorflow.MemAllocatorStats stats = 5; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.BfcMemoryMap.MemAllocatorStats, org.tensorflow.proto.BfcMemoryMap.MemAllocatorStats.Builder, org.tensorflow.proto.BfcMemoryMap.MemAllocatorStatsOrBuilder> getStatsFieldBuilder() { if (statsBuilder_ == null) { - statsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + statsBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.BfcMemoryMap.MemAllocatorStats, org.tensorflow.proto.BfcMemoryMap.MemAllocatorStats.Builder, org.tensorflow.proto.BfcMemoryMap.MemAllocatorStatsOrBuilder>( getStats(), getParentForChildren(), @@ -4993,18 +4883,6 @@ public org.tensorflow.proto.BfcMemoryMap.MemAllocatorStatsOrBuilder getStatsOrBu } return statsBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.MemoryDump) } @@ -5060,27 +4938,27 @@ public org.tensorflow.proto.BfcMemoryMap.MemoryDump getDefaultInstanceForType() private static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_MemAllocatorStats_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_MemAllocatorStats_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_MemChunk_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_MemChunk_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_BinSummary_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_BinSummary_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_SnapShot_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_SnapShot_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_MemoryDump_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_MemoryDump_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor @@ -5121,33 +4999,34 @@ public org.tensorflow.proto.BfcMemoryMap.MemoryDump getDefaultInstanceForType() internal_static_tensorflow_MemAllocatorStats_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_tensorflow_MemAllocatorStats_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_MemAllocatorStats_descriptor, new java.lang.String[] { "NumAllocs", "BytesInUse", "PeakBytesInUse", "LargestAllocSize", "FragmentationMetric", }); internal_static_tensorflow_MemChunk_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_tensorflow_MemChunk_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_MemChunk_descriptor, new java.lang.String[] { "Address", "Size", "RequestedSize", "Bin", "OpName", "FreedAtCount", "ActionCount", "InUse", "StepId", }); internal_static_tensorflow_BinSummary_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_tensorflow_BinSummary_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_BinSummary_descriptor, new java.lang.String[] { "Bin", "TotalBytesInUse", "TotalBytesInBin", "TotalChunksInUse", "TotalChunksInBin", }); internal_static_tensorflow_SnapShot_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_tensorflow_SnapShot_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_SnapShot_descriptor, new java.lang.String[] { "ActionCount", "Size", }); internal_static_tensorflow_MemoryDump_descriptor = getDescriptor().getMessageTypes().get(4); internal_static_tensorflow_MemoryDump_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_MemoryDump_descriptor, new java.lang.String[] { "AllocatorName", "BinSummary", "Chunk", "SnapShot", "Stats", }); + descriptor.resolveAllFeaturesImmutable(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BuildConfiguration.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BuildConfiguration.java index 19b464ffb52..5924c47cbc4 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BuildConfiguration.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BuildConfiguration.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: xla/tsl/protobuf/test_log.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -7,39 +9,38 @@ * Protobuf type {@code tensorflow.BuildConfiguration} */ public final class BuildConfiguration extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.BuildConfiguration) BuildConfigurationOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + BuildConfiguration.class.getName()); + } // Use BuildConfiguration.newBuilder() to construct. - private BuildConfiguration(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private BuildConfiguration(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private BuildConfiguration() { mode_ = ""; - ccFlags_ = com.google.protobuf.LazyStringArrayList.EMPTY; - opts_ = com.google.protobuf.LazyStringArrayList.EMPTY; + ccFlags_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + opts_ = + com.google.protobuf.LazyStringArrayList.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BuildConfiguration(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_BuildConfiguration_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_BuildConfiguration_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -47,7 +48,8 @@ protected java.lang.Object newInstance( } public static final int MODE_FIELD_NUMBER = 1; - private volatile java.lang.Object mode_; + @SuppressWarnings("serial") + private volatile java.lang.Object mode_ = ""; /** *
        * opt, dbg, etc
    @@ -93,7 +95,9 @@ public java.lang.String getMode() {
       }
     
       public static final int CC_FLAGS_FIELD_NUMBER = 2;
    -  private com.google.protobuf.LazyStringList ccFlags_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.LazyStringArrayList ccFlags_ =
    +      com.google.protobuf.LazyStringArrayList.emptyList();
       /**
        * 
        * CC compiler flags, if known
    @@ -144,7 +148,9 @@ public java.lang.String getCcFlags(int index) {
       }
     
       public static final int OPTS_FIELD_NUMBER = 3;
    -  private com.google.protobuf.LazyStringList opts_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.LazyStringArrayList opts_ =
    +      com.google.protobuf.LazyStringArrayList.emptyList();
       /**
        * 
        * Bazel compilation options, if known
    @@ -208,14 +214,14 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mode_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mode_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mode_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, mode_);
         }
         for (int i = 0; i < ccFlags_.size(); i++) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ccFlags_.getRaw(i));
    +      com.google.protobuf.GeneratedMessage.writeString(output, 2, ccFlags_.getRaw(i));
         }
         for (int i = 0; i < opts_.size(); i++) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, opts_.getRaw(i));
    +      com.google.protobuf.GeneratedMessage.writeString(output, 3, opts_.getRaw(i));
         }
         getUnknownFields().writeTo(output);
       }
    @@ -226,8 +232,8 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mode_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mode_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mode_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, mode_);
         }
         {
           int dataSize = 0;
    @@ -326,39 +332,41 @@ public static org.tensorflow.proto.BuildConfiguration parseFrom(
       }
       public static org.tensorflow.proto.BuildConfiguration parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.BuildConfiguration parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.BuildConfiguration parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.BuildConfiguration parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.BuildConfiguration parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.BuildConfiguration parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -378,7 +386,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -386,7 +394,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.BuildConfiguration}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.BuildConfiguration)
           org.tensorflow.proto.BuildConfigurationOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -395,7 +403,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_BuildConfiguration_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -408,19 +416,19 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           mode_ = "";
    -
    -      ccFlags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000001);
    -      opts_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000002);
    +      ccFlags_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
    +      opts_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
           return this;
         }
     
    @@ -447,54 +455,26 @@ public org.tensorflow.proto.BuildConfiguration build() {
         @java.lang.Override
         public org.tensorflow.proto.BuildConfiguration buildPartial() {
           org.tensorflow.proto.BuildConfiguration result = new org.tensorflow.proto.BuildConfiguration(this);
    -      int from_bitField0_ = bitField0_;
    -      result.mode_ = mode_;
    -      if (((bitField0_ & 0x00000001) != 0)) {
    -        ccFlags_ = ccFlags_.getUnmodifiableView();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    -      }
    -      result.ccFlags_ = ccFlags_;
    -      if (((bitField0_ & 0x00000002) != 0)) {
    -        opts_ = opts_.getUnmodifiableView();
    -        bitField0_ = (bitField0_ & ~0x00000002);
    -      }
    -      result.opts_ = opts_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.BuildConfiguration result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.mode_ = mode_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        ccFlags_.makeImmutable();
    +        result.ccFlags_ = ccFlags_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        opts_.makeImmutable();
    +        result.opts_ = opts_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.BuildConfiguration) {
    @@ -509,12 +489,13 @@ public Builder mergeFrom(org.tensorflow.proto.BuildConfiguration other) {
           if (other == org.tensorflow.proto.BuildConfiguration.getDefaultInstance()) return this;
           if (!other.getMode().isEmpty()) {
             mode_ = other.mode_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (!other.ccFlags_.isEmpty()) {
             if (ccFlags_.isEmpty()) {
               ccFlags_ = other.ccFlags_;
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ |= 0x00000002;
             } else {
               ensureCcFlagsIsMutable();
               ccFlags_.addAll(other.ccFlags_);
    @@ -524,7 +505,7 @@ public Builder mergeFrom(org.tensorflow.proto.BuildConfiguration other) {
           if (!other.opts_.isEmpty()) {
             if (opts_.isEmpty()) {
               opts_ = other.opts_;
    -          bitField0_ = (bitField0_ & ~0x00000002);
    +          bitField0_ |= 0x00000004;
             } else {
               ensureOptsIsMutable();
               opts_.addAll(other.opts_);
    @@ -559,7 +540,7 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   mode_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
    @@ -644,11 +625,9 @@ public java.lang.String getMode() {
          */
         public Builder setMode(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           mode_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -661,8 +640,8 @@ public Builder setMode(
          * @return This builder for chaining.
          */
         public Builder clearMode() {
    -      
           mode_ = getDefaultInstance().getMode();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -677,22 +656,21 @@ public Builder clearMode() {
          */
         public Builder setModeBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           mode_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
     
    -    private com.google.protobuf.LazyStringList ccFlags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +    private com.google.protobuf.LazyStringArrayList ccFlags_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         private void ensureCcFlagsIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    +      if (!ccFlags_.isModifiable()) {
             ccFlags_ = new com.google.protobuf.LazyStringArrayList(ccFlags_);
    -        bitField0_ |= 0x00000001;
    -       }
    +      }
    +      bitField0_ |= 0x00000002;
         }
         /**
          * 
    @@ -704,7 +682,8 @@ private void ensureCcFlagsIsMutable() {
          */
         public com.google.protobuf.ProtocolStringList
             getCcFlagsList() {
    -      return ccFlags_.getUnmodifiableView();
    +      ccFlags_.makeImmutable();
    +      return ccFlags_;
         }
         /**
          * 
    @@ -754,11 +733,10 @@ public java.lang.String getCcFlags(int index) {
          */
         public Builder setCcFlags(
             int index, java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureCcFlagsIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureCcFlagsIsMutable();
           ccFlags_.set(index, value);
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -773,11 +751,10 @@ public Builder setCcFlags(
          */
         public Builder addCcFlags(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureCcFlagsIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureCcFlagsIsMutable();
           ccFlags_.add(value);
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -795,6 +772,7 @@ public Builder addAllCcFlags(
           ensureCcFlagsIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, ccFlags_);
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -807,8 +785,9 @@ public Builder addAllCcFlags(
          * @return This builder for chaining.
          */
         public Builder clearCcFlags() {
    -      ccFlags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      ccFlags_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
    +      bitField0_ = (bitField0_ & ~0x00000002);;
           onChanged();
           return this;
         }
    @@ -823,22 +802,22 @@ public Builder clearCcFlags() {
          */
         public Builder addCcFlagsBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           ensureCcFlagsIsMutable();
           ccFlags_.add(value);
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
     
    -    private com.google.protobuf.LazyStringList opts_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +    private com.google.protobuf.LazyStringArrayList opts_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         private void ensureOptsIsMutable() {
    -      if (!((bitField0_ & 0x00000002) != 0)) {
    +      if (!opts_.isModifiable()) {
             opts_ = new com.google.protobuf.LazyStringArrayList(opts_);
    -        bitField0_ |= 0x00000002;
    -       }
    +      }
    +      bitField0_ |= 0x00000004;
         }
         /**
          * 
    @@ -850,7 +829,8 @@ private void ensureOptsIsMutable() {
          */
         public com.google.protobuf.ProtocolStringList
             getOptsList() {
    -      return opts_.getUnmodifiableView();
    +      opts_.makeImmutable();
    +      return opts_;
         }
         /**
          * 
    @@ -900,11 +880,10 @@ public java.lang.String getOpts(int index) {
          */
         public Builder setOpts(
             int index, java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureOptsIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureOptsIsMutable();
           opts_.set(index, value);
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -919,11 +898,10 @@ public Builder setOpts(
          */
         public Builder addOpts(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureOptsIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureOptsIsMutable();
           opts_.add(value);
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -941,6 +919,7 @@ public Builder addAllOpts(
           ensureOptsIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, opts_);
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -953,8 +932,9 @@ public Builder addAllOpts(
          * @return This builder for chaining.
          */
         public Builder clearOpts() {
    -      opts_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000002);
    +      opts_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
    +      bitField0_ = (bitField0_ & ~0x00000004);;
           onChanged();
           return this;
         }
    @@ -969,27 +949,14 @@ public Builder clearOpts() {
          */
         public Builder addOptsBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           ensureOptsIsMutable();
           opts_.add(value);
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.BuildConfiguration)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BuildConfigurationOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BuildConfigurationOrBuilder.java
    index 112534dc95a..4e529158905 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BuildConfigurationOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BuildConfigurationOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: xla/tsl/protobuf/test_log.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BundleEntryProto.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BundleEntryProto.java
    index ff5e9404343..778eb17b5d2 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BundleEntryProto.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BundleEntryProto.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/tensor_bundle.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,12 +13,21 @@
      * Protobuf type {@code tensorflow.BundleEntryProto}
      */
     public final class BundleEntryProto extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.BundleEntryProto)
         BundleEntryProtoOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      BundleEntryProto.class.getName());
    +  }
       // Use BundleEntryProto.newBuilder() to construct.
    -  private BundleEntryProto(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private BundleEntryProto(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private BundleEntryProto() {
    @@ -24,33 +35,22 @@ private BundleEntryProto() {
         slices_ = java.util.Collections.emptyList();
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new BundleEntryProto();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.TensorBundleProtos.internal_static_tensorflow_BundleEntryProto_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.TensorBundleProtos.internal_static_tensorflow_BundleEntryProto_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
                 org.tensorflow.proto.BundleEntryProto.class, org.tensorflow.proto.BundleEntryProto.Builder.class);
       }
     
    +  private int bitField0_;
       public static final int DTYPE_FIELD_NUMBER = 1;
    -  private int dtype_;
    +  private int dtype_ = 0;
       /**
        * 
        * The tensor dtype and shape.
    @@ -71,8 +71,7 @@ protected java.lang.Object newInstance(
        * @return The dtype.
        */
       @java.lang.Override public org.tensorflow.proto.DataType getDtype() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(dtype_);
    +    org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(dtype_);
         return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
       }
     
    @@ -84,7 +83,7 @@ protected java.lang.Object newInstance(
        */
       @java.lang.Override
       public boolean hasShape() {
    -    return shape_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * .tensorflow.TensorShapeProto shape = 2;
    @@ -99,15 +98,15 @@ public org.tensorflow.proto.TensorShapeProto getShape() {
        */
       @java.lang.Override
       public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
    -    return getShape();
    +    return shape_ == null ? org.tensorflow.proto.TensorShapeProto.getDefaultInstance() : shape_;
       }
     
       public static final int SHARD_ID_FIELD_NUMBER = 3;
    -  private int shardId_;
    +  private int shardId_ = 0;
       /**
        * 
        * The binary content of the tensor lies in:
    -   *   File "shard_id": bytes [offset, offset + size).
    +   * File "shard_id": bytes [offset, offset + size).
        * 
    * * int32 shard_id = 3; @@ -119,7 +118,7 @@ public int getShardId() { } public static final int OFFSET_FIELD_NUMBER = 4; - private long offset_; + private long offset_ = 0L; /** * int64 offset = 4; * @return The offset. @@ -130,7 +129,7 @@ public long getOffset() { } public static final int SIZE_FIELD_NUMBER = 5; - private long size_; + private long size_ = 0L; /** * int64 size = 5; * @return The size. @@ -141,7 +140,7 @@ public long getSize() { } public static final int CRC32C_FIELD_NUMBER = 6; - private int crc32C_; + private int crc32C_ = 0; /** *
        * The CRC32C checksum of the tensor bytes.
    @@ -156,15 +155,17 @@ public int getCrc32C() {
       }
     
       public static final int SLICES_FIELD_NUMBER = 7;
    +  @SuppressWarnings("serial")
       private java.util.List slices_;
       /**
        * 
        * Iff present, this entry represents a partitioned tensor.  The previous
        * fields are interpreted as follows:
    -   *   "dtype", "shape": describe the full tensor.
    -   *   "shard_id", "offset", "size", "crc32c": all IGNORED.
    -   *      These information for each slice can be looked up in their own
    -   *      BundleEntryProto, keyed by each "slice_name".
    +   *
    +   * "dtype", "shape": describe the full tensor.
    +   * "shard_id", "offset", "size", "crc32c": all IGNORED.
    +   * These information for each slice can be looked up in their own
    +   * BundleEntryProto, keyed by each "slice_name".
        * 
    * * repeated .tensorflow.TensorSliceProto slices = 7; @@ -177,10 +178,11 @@ public java.util.List getSlicesList() { *
        * Iff present, this entry represents a partitioned tensor.  The previous
        * fields are interpreted as follows:
    -   *   "dtype", "shape": describe the full tensor.
    -   *   "shard_id", "offset", "size", "crc32c": all IGNORED.
    -   *      These information for each slice can be looked up in their own
    -   *      BundleEntryProto, keyed by each "slice_name".
    +   *
    +   * "dtype", "shape": describe the full tensor.
    +   * "shard_id", "offset", "size", "crc32c": all IGNORED.
    +   * These information for each slice can be looked up in their own
    +   * BundleEntryProto, keyed by each "slice_name".
        * 
    * * repeated .tensorflow.TensorSliceProto slices = 7; @@ -194,10 +196,11 @@ public java.util.List getSlicesList() { *
        * Iff present, this entry represents a partitioned tensor.  The previous
        * fields are interpreted as follows:
    -   *   "dtype", "shape": describe the full tensor.
    -   *   "shard_id", "offset", "size", "crc32c": all IGNORED.
    -   *      These information for each slice can be looked up in their own
    -   *      BundleEntryProto, keyed by each "slice_name".
    +   *
    +   * "dtype", "shape": describe the full tensor.
    +   * "shard_id", "offset", "size", "crc32c": all IGNORED.
    +   * These information for each slice can be looked up in their own
    +   * BundleEntryProto, keyed by each "slice_name".
        * 
    * * repeated .tensorflow.TensorSliceProto slices = 7; @@ -210,10 +213,11 @@ public int getSlicesCount() { *
        * Iff present, this entry represents a partitioned tensor.  The previous
        * fields are interpreted as follows:
    -   *   "dtype", "shape": describe the full tensor.
    -   *   "shard_id", "offset", "size", "crc32c": all IGNORED.
    -   *      These information for each slice can be looked up in their own
    -   *      BundleEntryProto, keyed by each "slice_name".
    +   *
    +   * "dtype", "shape": describe the full tensor.
    +   * "shard_id", "offset", "size", "crc32c": all IGNORED.
    +   * These information for each slice can be looked up in their own
    +   * BundleEntryProto, keyed by each "slice_name".
        * 
    * * repeated .tensorflow.TensorSliceProto slices = 7; @@ -226,10 +230,11 @@ public org.tensorflow.proto.TensorSliceProto getSlices(int index) { *
        * Iff present, this entry represents a partitioned tensor.  The previous
        * fields are interpreted as follows:
    -   *   "dtype", "shape": describe the full tensor.
    -   *   "shard_id", "offset", "size", "crc32c": all IGNORED.
    -   *      These information for each slice can be looked up in their own
    -   *      BundleEntryProto, keyed by each "slice_name".
    +   *
    +   * "dtype", "shape": describe the full tensor.
    +   * "shard_id", "offset", "size", "crc32c": all IGNORED.
    +   * These information for each slice can be looked up in their own
    +   * BundleEntryProto, keyed by each "slice_name".
        * 
    * * repeated .tensorflow.TensorSliceProto slices = 7; @@ -257,7 +262,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (dtype_ != org.tensorflow.proto.DataType.DT_INVALID.getNumber()) { output.writeEnum(1, dtype_); } - if (shape_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getShape()); } if (shardId_ != 0) { @@ -288,7 +293,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, dtype_); } - if (shape_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getShape()); } @@ -413,39 +418,41 @@ public static org.tensorflow.proto.BundleEntryProto parseFrom( } public static org.tensorflow.proto.BundleEntryProto parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.BundleEntryProto parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.BundleEntryProto parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.BundleEntryProto parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.BundleEntryProto parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.BundleEntryProto parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -465,7 +472,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -477,7 +484,7 @@ protected Builder newBuilderForType( * Protobuf type {@code tensorflow.BundleEntryProto} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.BundleEntryProto) org.tensorflow.proto.BundleEntryProtoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -486,7 +493,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.TensorBundleProtos.internal_static_tensorflow_BundleEntryProto_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -495,40 +502,42 @@ public static final class Builder extends // Construct using org.tensorflow.proto.BundleEntryProto.newBuilder() private Builder() { - + maybeForceBuilderInitialization(); } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getShapeFieldBuilder(); + getSlicesFieldBuilder(); + } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; dtype_ = 0; - - if (shapeBuilder_ == null) { - shape_ = null; - } else { - shape_ = null; + shape_ = null; + if (shapeBuilder_ != null) { + shapeBuilder_.dispose(); shapeBuilder_ = null; } shardId_ = 0; - offset_ = 0L; - size_ = 0L; - crc32C_ = 0; - if (slicesBuilder_ == null) { slices_ = java.util.Collections.emptyList(); } else { slices_ = null; slicesBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000040); return this; } @@ -555,62 +564,51 @@ public org.tensorflow.proto.BundleEntryProto build() { @java.lang.Override public org.tensorflow.proto.BundleEntryProto buildPartial() { org.tensorflow.proto.BundleEntryProto result = new org.tensorflow.proto.BundleEntryProto(this); - int from_bitField0_ = bitField0_; - result.dtype_ = dtype_; - if (shapeBuilder_ == null) { - result.shape_ = shape_; - } else { - result.shape_ = shapeBuilder_.build(); - } - result.shardId_ = shardId_; - result.offset_ = offset_; - result.size_ = size_; - result.crc32C_ = crc32C_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(org.tensorflow.proto.BundleEntryProto result) { if (slicesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000040) != 0)) { slices_ = java.util.Collections.unmodifiableList(slices_); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000040); } result.slices_ = slices_; } else { result.slices_ = slicesBuilder_.build(); } - onBuilt(); - return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.BundleEntryProto result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.dtype_ = dtype_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.shape_ = shapeBuilder_ == null + ? shape_ + : shapeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.shardId_ = shardId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.offset_ = offset_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.size_ = size_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.crc32C_ = crc32C_; + } + result.bitField0_ |= to_bitField0_; } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.BundleEntryProto) { @@ -645,7 +643,7 @@ public Builder mergeFrom(org.tensorflow.proto.BundleEntryProto other) { if (!other.slices_.isEmpty()) { if (slices_.isEmpty()) { slices_ = other.slices_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000040); } else { ensureSlicesIsMutable(); slices_.addAll(other.slices_); @@ -658,9 +656,9 @@ public Builder mergeFrom(org.tensorflow.proto.BundleEntryProto other) { slicesBuilder_.dispose(); slicesBuilder_ = null; slices_ = other.slices_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000040); slicesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getSlicesFieldBuilder() : null; } else { slicesBuilder_.addAllMessages(other.slices_); @@ -695,34 +693,34 @@ public Builder mergeFrom( break; case 8: { dtype_ = input.readEnum(); - + bitField0_ |= 0x00000001; break; } // case 8 case 18: { input.readMessage( getShapeFieldBuilder().getBuilder(), extensionRegistry); - + bitField0_ |= 0x00000002; break; } // case 18 case 24: { shardId_ = input.readInt32(); - + bitField0_ |= 0x00000004; break; } // case 24 case 32: { offset_ = input.readInt64(); - + bitField0_ |= 0x00000008; break; } // case 32 case 40: { size_ = input.readInt64(); - + bitField0_ |= 0x00000010; break; } // case 40 case 53: { crc32C_ = input.readFixed32(); - + bitField0_ |= 0x00000020; break; } // case 53 case 58: { @@ -777,8 +775,8 @@ public Builder mergeFrom( * @return This builder for chaining. */ public Builder setDtypeValue(int value) { - dtype_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -792,8 +790,7 @@ public Builder setDtypeValue(int value) { */ @java.lang.Override public org.tensorflow.proto.DataType getDtype() { - @SuppressWarnings("deprecation") - org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(dtype_); + org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(dtype_); return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result; } /** @@ -809,7 +806,7 @@ public Builder setDtype(org.tensorflow.proto.DataType value) { if (value == null) { throw new NullPointerException(); } - + bitField0_ |= 0x00000001; dtype_ = value.getNumber(); onChanged(); return this; @@ -823,21 +820,21 @@ public Builder setDtype(org.tensorflow.proto.DataType value) { * @return This builder for chaining. */ public Builder clearDtype() { - + bitField0_ = (bitField0_ & ~0x00000001); dtype_ = 0; onChanged(); return this; } private org.tensorflow.proto.TensorShapeProto shape_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> shapeBuilder_; /** * .tensorflow.TensorShapeProto shape = 2; * @return Whether the shape field is set. */ public boolean hasShape() { - return shapeBuilder_ != null || shape_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** * .tensorflow.TensorShapeProto shape = 2; @@ -859,11 +856,11 @@ public Builder setShape(org.tensorflow.proto.TensorShapeProto value) { throw new NullPointerException(); } shape_ = value; - onChanged(); } else { shapeBuilder_.setMessage(value); } - + bitField0_ |= 0x00000002; + onChanged(); return this; } /** @@ -873,11 +870,11 @@ public Builder setShape( org.tensorflow.proto.TensorShapeProto.Builder builderForValue) { if (shapeBuilder_ == null) { shape_ = builderForValue.build(); - onChanged(); } else { shapeBuilder_.setMessage(builderForValue.build()); } - + bitField0_ |= 0x00000002; + onChanged(); return this; } /** @@ -885,38 +882,40 @@ public Builder setShape( */ public Builder mergeShape(org.tensorflow.proto.TensorShapeProto value) { if (shapeBuilder_ == null) { - if (shape_ != null) { - shape_ = - org.tensorflow.proto.TensorShapeProto.newBuilder(shape_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000002) != 0) && + shape_ != null && + shape_ != org.tensorflow.proto.TensorShapeProto.getDefaultInstance()) { + getShapeBuilder().mergeFrom(value); } else { shape_ = value; } - onChanged(); } else { shapeBuilder_.mergeFrom(value); } - + if (shape_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } return this; } /** * .tensorflow.TensorShapeProto shape = 2; */ public Builder clearShape() { - if (shapeBuilder_ == null) { - shape_ = null; - onChanged(); - } else { - shape_ = null; + bitField0_ = (bitField0_ & ~0x00000002); + shape_ = null; + if (shapeBuilder_ != null) { + shapeBuilder_.dispose(); shapeBuilder_ = null; } - + onChanged(); return this; } /** * .tensorflow.TensorShapeProto shape = 2; */ public org.tensorflow.proto.TensorShapeProto.Builder getShapeBuilder() { - + bitField0_ |= 0x00000002; onChanged(); return getShapeFieldBuilder().getBuilder(); } @@ -934,11 +933,11 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() { /** * .tensorflow.TensorShapeProto shape = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> getShapeFieldBuilder() { if (shapeBuilder_ == null) { - shapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + shapeBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder>( getShape(), getParentForChildren(), @@ -952,7 +951,7 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() { /** *
          * The binary content of the tensor lies in:
    -     *   File "shard_id": bytes [offset, offset + size).
    +     * File "shard_id": bytes [offset, offset + size).
          * 
    * * int32 shard_id = 3; @@ -965,7 +964,7 @@ public int getShardId() { /** *
          * The binary content of the tensor lies in:
    -     *   File "shard_id": bytes [offset, offset + size).
    +     * File "shard_id": bytes [offset, offset + size).
          * 
    * * int32 shard_id = 3; @@ -973,22 +972,23 @@ public int getShardId() { * @return This builder for chaining. */ public Builder setShardId(int value) { - + shardId_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } /** *
          * The binary content of the tensor lies in:
    -     *   File "shard_id": bytes [offset, offset + size).
    +     * File "shard_id": bytes [offset, offset + size).
          * 
    * * int32 shard_id = 3; * @return This builder for chaining. */ public Builder clearShardId() { - + bitField0_ = (bitField0_ & ~0x00000004); shardId_ = 0; onChanged(); return this; @@ -1009,8 +1009,9 @@ public long getOffset() { * @return This builder for chaining. */ public Builder setOffset(long value) { - + offset_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1019,7 +1020,7 @@ public Builder setOffset(long value) { * @return This builder for chaining. */ public Builder clearOffset() { - + bitField0_ = (bitField0_ & ~0x00000008); offset_ = 0L; onChanged(); return this; @@ -1040,8 +1041,9 @@ public long getSize() { * @return This builder for chaining. */ public Builder setSize(long value) { - + size_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -1050,7 +1052,7 @@ public Builder setSize(long value) { * @return This builder for chaining. */ public Builder clearSize() { - + bitField0_ = (bitField0_ & ~0x00000010); size_ = 0L; onChanged(); return this; @@ -1079,8 +1081,9 @@ public int getCrc32C() { * @return This builder for chaining. */ public Builder setCrc32C(int value) { - + crc32C_ = value; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -1093,7 +1096,7 @@ public Builder setCrc32C(int value) { * @return This builder for chaining. */ public Builder clearCrc32C() { - + bitField0_ = (bitField0_ & ~0x00000020); crc32C_ = 0; onChanged(); return this; @@ -1102,23 +1105,24 @@ public Builder clearCrc32C() { private java.util.List slices_ = java.util.Collections.emptyList(); private void ensureSlicesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!((bitField0_ & 0x00000040) != 0)) { slices_ = new java.util.ArrayList(slices_); - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000040; } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.TensorSliceProto, org.tensorflow.proto.TensorSliceProto.Builder, org.tensorflow.proto.TensorSliceProtoOrBuilder> slicesBuilder_; /** *
          * Iff present, this entry represents a partitioned tensor.  The previous
          * fields are interpreted as follows:
    -     *   "dtype", "shape": describe the full tensor.
    -     *   "shard_id", "offset", "size", "crc32c": all IGNORED.
    -     *      These information for each slice can be looked up in their own
    -     *      BundleEntryProto, keyed by each "slice_name".
    +     *
    +     * "dtype", "shape": describe the full tensor.
    +     * "shard_id", "offset", "size", "crc32c": all IGNORED.
    +     * These information for each slice can be looked up in their own
    +     * BundleEntryProto, keyed by each "slice_name".
          * 
    * * repeated .tensorflow.TensorSliceProto slices = 7; @@ -1134,10 +1138,11 @@ public java.util.List getSlicesList() { *
          * Iff present, this entry represents a partitioned tensor.  The previous
          * fields are interpreted as follows:
    -     *   "dtype", "shape": describe the full tensor.
    -     *   "shard_id", "offset", "size", "crc32c": all IGNORED.
    -     *      These information for each slice can be looked up in their own
    -     *      BundleEntryProto, keyed by each "slice_name".
    +     *
    +     * "dtype", "shape": describe the full tensor.
    +     * "shard_id", "offset", "size", "crc32c": all IGNORED.
    +     * These information for each slice can be looked up in their own
    +     * BundleEntryProto, keyed by each "slice_name".
          * 
    * * repeated .tensorflow.TensorSliceProto slices = 7; @@ -1153,10 +1158,11 @@ public int getSlicesCount() { *
          * Iff present, this entry represents a partitioned tensor.  The previous
          * fields are interpreted as follows:
    -     *   "dtype", "shape": describe the full tensor.
    -     *   "shard_id", "offset", "size", "crc32c": all IGNORED.
    -     *      These information for each slice can be looked up in their own
    -     *      BundleEntryProto, keyed by each "slice_name".
    +     *
    +     * "dtype", "shape": describe the full tensor.
    +     * "shard_id", "offset", "size", "crc32c": all IGNORED.
    +     * These information for each slice can be looked up in their own
    +     * BundleEntryProto, keyed by each "slice_name".
          * 
    * * repeated .tensorflow.TensorSliceProto slices = 7; @@ -1172,10 +1178,11 @@ public org.tensorflow.proto.TensorSliceProto getSlices(int index) { *
          * Iff present, this entry represents a partitioned tensor.  The previous
          * fields are interpreted as follows:
    -     *   "dtype", "shape": describe the full tensor.
    -     *   "shard_id", "offset", "size", "crc32c": all IGNORED.
    -     *      These information for each slice can be looked up in their own
    -     *      BundleEntryProto, keyed by each "slice_name".
    +     *
    +     * "dtype", "shape": describe the full tensor.
    +     * "shard_id", "offset", "size", "crc32c": all IGNORED.
    +     * These information for each slice can be looked up in their own
    +     * BundleEntryProto, keyed by each "slice_name".
          * 
    * * repeated .tensorflow.TensorSliceProto slices = 7; @@ -1198,10 +1205,11 @@ public Builder setSlices( *
          * Iff present, this entry represents a partitioned tensor.  The previous
          * fields are interpreted as follows:
    -     *   "dtype", "shape": describe the full tensor.
    -     *   "shard_id", "offset", "size", "crc32c": all IGNORED.
    -     *      These information for each slice can be looked up in their own
    -     *      BundleEntryProto, keyed by each "slice_name".
    +     *
    +     * "dtype", "shape": describe the full tensor.
    +     * "shard_id", "offset", "size", "crc32c": all IGNORED.
    +     * These information for each slice can be looked up in their own
    +     * BundleEntryProto, keyed by each "slice_name".
          * 
    * * repeated .tensorflow.TensorSliceProto slices = 7; @@ -1221,10 +1229,11 @@ public Builder setSlices( *
          * Iff present, this entry represents a partitioned tensor.  The previous
          * fields are interpreted as follows:
    -     *   "dtype", "shape": describe the full tensor.
    -     *   "shard_id", "offset", "size", "crc32c": all IGNORED.
    -     *      These information for each slice can be looked up in their own
    -     *      BundleEntryProto, keyed by each "slice_name".
    +     *
    +     * "dtype", "shape": describe the full tensor.
    +     * "shard_id", "offset", "size", "crc32c": all IGNORED.
    +     * These information for each slice can be looked up in their own
    +     * BundleEntryProto, keyed by each "slice_name".
          * 
    * * repeated .tensorflow.TensorSliceProto slices = 7; @@ -1246,10 +1255,11 @@ public Builder addSlices(org.tensorflow.proto.TensorSliceProto value) { *
          * Iff present, this entry represents a partitioned tensor.  The previous
          * fields are interpreted as follows:
    -     *   "dtype", "shape": describe the full tensor.
    -     *   "shard_id", "offset", "size", "crc32c": all IGNORED.
    -     *      These information for each slice can be looked up in their own
    -     *      BundleEntryProto, keyed by each "slice_name".
    +     *
    +     * "dtype", "shape": describe the full tensor.
    +     * "shard_id", "offset", "size", "crc32c": all IGNORED.
    +     * These information for each slice can be looked up in their own
    +     * BundleEntryProto, keyed by each "slice_name".
          * 
    * * repeated .tensorflow.TensorSliceProto slices = 7; @@ -1272,10 +1282,11 @@ public Builder addSlices( *
          * Iff present, this entry represents a partitioned tensor.  The previous
          * fields are interpreted as follows:
    -     *   "dtype", "shape": describe the full tensor.
    -     *   "shard_id", "offset", "size", "crc32c": all IGNORED.
    -     *      These information for each slice can be looked up in their own
    -     *      BundleEntryProto, keyed by each "slice_name".
    +     *
    +     * "dtype", "shape": describe the full tensor.
    +     * "shard_id", "offset", "size", "crc32c": all IGNORED.
    +     * These information for each slice can be looked up in their own
    +     * BundleEntryProto, keyed by each "slice_name".
          * 
    * * repeated .tensorflow.TensorSliceProto slices = 7; @@ -1295,10 +1306,11 @@ public Builder addSlices( *
          * Iff present, this entry represents a partitioned tensor.  The previous
          * fields are interpreted as follows:
    -     *   "dtype", "shape": describe the full tensor.
    -     *   "shard_id", "offset", "size", "crc32c": all IGNORED.
    -     *      These information for each slice can be looked up in their own
    -     *      BundleEntryProto, keyed by each "slice_name".
    +     *
    +     * "dtype", "shape": describe the full tensor.
    +     * "shard_id", "offset", "size", "crc32c": all IGNORED.
    +     * These information for each slice can be looked up in their own
    +     * BundleEntryProto, keyed by each "slice_name".
          * 
    * * repeated .tensorflow.TensorSliceProto slices = 7; @@ -1318,10 +1330,11 @@ public Builder addSlices( *
          * Iff present, this entry represents a partitioned tensor.  The previous
          * fields are interpreted as follows:
    -     *   "dtype", "shape": describe the full tensor.
    -     *   "shard_id", "offset", "size", "crc32c": all IGNORED.
    -     *      These information for each slice can be looked up in their own
    -     *      BundleEntryProto, keyed by each "slice_name".
    +     *
    +     * "dtype", "shape": describe the full tensor.
    +     * "shard_id", "offset", "size", "crc32c": all IGNORED.
    +     * These information for each slice can be looked up in their own
    +     * BundleEntryProto, keyed by each "slice_name".
          * 
    * * repeated .tensorflow.TensorSliceProto slices = 7; @@ -1342,10 +1355,11 @@ public Builder addAllSlices( *
          * Iff present, this entry represents a partitioned tensor.  The previous
          * fields are interpreted as follows:
    -     *   "dtype", "shape": describe the full tensor.
    -     *   "shard_id", "offset", "size", "crc32c": all IGNORED.
    -     *      These information for each slice can be looked up in their own
    -     *      BundleEntryProto, keyed by each "slice_name".
    +     *
    +     * "dtype", "shape": describe the full tensor.
    +     * "shard_id", "offset", "size", "crc32c": all IGNORED.
    +     * These information for each slice can be looked up in their own
    +     * BundleEntryProto, keyed by each "slice_name".
          * 
    * * repeated .tensorflow.TensorSliceProto slices = 7; @@ -1353,7 +1367,7 @@ public Builder addAllSlices( public Builder clearSlices() { if (slicesBuilder_ == null) { slices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000040); onChanged(); } else { slicesBuilder_.clear(); @@ -1364,10 +1378,11 @@ public Builder clearSlices() { *
          * Iff present, this entry represents a partitioned tensor.  The previous
          * fields are interpreted as follows:
    -     *   "dtype", "shape": describe the full tensor.
    -     *   "shard_id", "offset", "size", "crc32c": all IGNORED.
    -     *      These information for each slice can be looked up in their own
    -     *      BundleEntryProto, keyed by each "slice_name".
    +     *
    +     * "dtype", "shape": describe the full tensor.
    +     * "shard_id", "offset", "size", "crc32c": all IGNORED.
    +     * These information for each slice can be looked up in their own
    +     * BundleEntryProto, keyed by each "slice_name".
          * 
    * * repeated .tensorflow.TensorSliceProto slices = 7; @@ -1386,10 +1401,11 @@ public Builder removeSlices(int index) { *
          * Iff present, this entry represents a partitioned tensor.  The previous
          * fields are interpreted as follows:
    -     *   "dtype", "shape": describe the full tensor.
    -     *   "shard_id", "offset", "size", "crc32c": all IGNORED.
    -     *      These information for each slice can be looked up in their own
    -     *      BundleEntryProto, keyed by each "slice_name".
    +     *
    +     * "dtype", "shape": describe the full tensor.
    +     * "shard_id", "offset", "size", "crc32c": all IGNORED.
    +     * These information for each slice can be looked up in their own
    +     * BundleEntryProto, keyed by each "slice_name".
          * 
    * * repeated .tensorflow.TensorSliceProto slices = 7; @@ -1402,10 +1418,11 @@ public org.tensorflow.proto.TensorSliceProto.Builder getSlicesBuilder( *
          * Iff present, this entry represents a partitioned tensor.  The previous
          * fields are interpreted as follows:
    -     *   "dtype", "shape": describe the full tensor.
    -     *   "shard_id", "offset", "size", "crc32c": all IGNORED.
    -     *      These information for each slice can be looked up in their own
    -     *      BundleEntryProto, keyed by each "slice_name".
    +     *
    +     * "dtype", "shape": describe the full tensor.
    +     * "shard_id", "offset", "size", "crc32c": all IGNORED.
    +     * These information for each slice can be looked up in their own
    +     * BundleEntryProto, keyed by each "slice_name".
          * 
    * * repeated .tensorflow.TensorSliceProto slices = 7; @@ -1421,10 +1438,11 @@ public org.tensorflow.proto.TensorSliceProtoOrBuilder getSlicesOrBuilder( *
          * Iff present, this entry represents a partitioned tensor.  The previous
          * fields are interpreted as follows:
    -     *   "dtype", "shape": describe the full tensor.
    -     *   "shard_id", "offset", "size", "crc32c": all IGNORED.
    -     *      These information for each slice can be looked up in their own
    -     *      BundleEntryProto, keyed by each "slice_name".
    +     *
    +     * "dtype", "shape": describe the full tensor.
    +     * "shard_id", "offset", "size", "crc32c": all IGNORED.
    +     * These information for each slice can be looked up in their own
    +     * BundleEntryProto, keyed by each "slice_name".
          * 
    * * repeated .tensorflow.TensorSliceProto slices = 7; @@ -1441,10 +1459,11 @@ public org.tensorflow.proto.TensorSliceProtoOrBuilder getSlicesOrBuilder( *
          * Iff present, this entry represents a partitioned tensor.  The previous
          * fields are interpreted as follows:
    -     *   "dtype", "shape": describe the full tensor.
    -     *   "shard_id", "offset", "size", "crc32c": all IGNORED.
    -     *      These information for each slice can be looked up in their own
    -     *      BundleEntryProto, keyed by each "slice_name".
    +     *
    +     * "dtype", "shape": describe the full tensor.
    +     * "shard_id", "offset", "size", "crc32c": all IGNORED.
    +     * These information for each slice can be looked up in their own
    +     * BundleEntryProto, keyed by each "slice_name".
          * 
    * * repeated .tensorflow.TensorSliceProto slices = 7; @@ -1457,10 +1476,11 @@ public org.tensorflow.proto.TensorSliceProto.Builder addSlicesBuilder() { *
          * Iff present, this entry represents a partitioned tensor.  The previous
          * fields are interpreted as follows:
    -     *   "dtype", "shape": describe the full tensor.
    -     *   "shard_id", "offset", "size", "crc32c": all IGNORED.
    -     *      These information for each slice can be looked up in their own
    -     *      BundleEntryProto, keyed by each "slice_name".
    +     *
    +     * "dtype", "shape": describe the full tensor.
    +     * "shard_id", "offset", "size", "crc32c": all IGNORED.
    +     * These information for each slice can be looked up in their own
    +     * BundleEntryProto, keyed by each "slice_name".
          * 
    * * repeated .tensorflow.TensorSliceProto slices = 7; @@ -1474,10 +1494,11 @@ public org.tensorflow.proto.TensorSliceProto.Builder addSlicesBuilder( *
          * Iff present, this entry represents a partitioned tensor.  The previous
          * fields are interpreted as follows:
    -     *   "dtype", "shape": describe the full tensor.
    -     *   "shard_id", "offset", "size", "crc32c": all IGNORED.
    -     *      These information for each slice can be looked up in their own
    -     *      BundleEntryProto, keyed by each "slice_name".
    +     *
    +     * "dtype", "shape": describe the full tensor.
    +     * "shard_id", "offset", "size", "crc32c": all IGNORED.
    +     * These information for each slice can be looked up in their own
    +     * BundleEntryProto, keyed by each "slice_name".
          * 
    * * repeated .tensorflow.TensorSliceProto slices = 7; @@ -1486,32 +1507,20 @@ public org.tensorflow.proto.TensorSliceProto.Builder addSlicesBuilder( getSlicesBuilderList() { return getSlicesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.TensorSliceProto, org.tensorflow.proto.TensorSliceProto.Builder, org.tensorflow.proto.TensorSliceProtoOrBuilder> getSlicesFieldBuilder() { if (slicesBuilder_ == null) { - slicesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + slicesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.TensorSliceProto, org.tensorflow.proto.TensorSliceProto.Builder, org.tensorflow.proto.TensorSliceProtoOrBuilder>( slices_, - ((bitField0_ & 0x00000001) != 0), + ((bitField0_ & 0x00000040) != 0), getParentForChildren(), isClean()); slices_ = null; } return slicesBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.BundleEntryProto) } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BundleEntryProtoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BundleEntryProtoOrBuilder.java index cd69bb75b99..cc082e079da 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BundleEntryProtoOrBuilder.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BundleEntryProtoOrBuilder.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/protobuf/tensor_bundle.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -44,7 +46,7 @@ public interface BundleEntryProtoOrBuilder extends /** *
        * The binary content of the tensor lies in:
    -   *   File "shard_id": bytes [offset, offset + size).
    +   * File "shard_id": bytes [offset, offset + size).
        * 
    * * int32 shard_id = 3; @@ -78,10 +80,11 @@ public interface BundleEntryProtoOrBuilder extends *
        * Iff present, this entry represents a partitioned tensor.  The previous
        * fields are interpreted as follows:
    -   *   "dtype", "shape": describe the full tensor.
    -   *   "shard_id", "offset", "size", "crc32c": all IGNORED.
    -   *      These information for each slice can be looked up in their own
    -   *      BundleEntryProto, keyed by each "slice_name".
    +   *
    +   * "dtype", "shape": describe the full tensor.
    +   * "shard_id", "offset", "size", "crc32c": all IGNORED.
    +   * These information for each slice can be looked up in their own
    +   * BundleEntryProto, keyed by each "slice_name".
        * 
    * * repeated .tensorflow.TensorSliceProto slices = 7; @@ -92,10 +95,11 @@ public interface BundleEntryProtoOrBuilder extends *
        * Iff present, this entry represents a partitioned tensor.  The previous
        * fields are interpreted as follows:
    -   *   "dtype", "shape": describe the full tensor.
    -   *   "shard_id", "offset", "size", "crc32c": all IGNORED.
    -   *      These information for each slice can be looked up in their own
    -   *      BundleEntryProto, keyed by each "slice_name".
    +   *
    +   * "dtype", "shape": describe the full tensor.
    +   * "shard_id", "offset", "size", "crc32c": all IGNORED.
    +   * These information for each slice can be looked up in their own
    +   * BundleEntryProto, keyed by each "slice_name".
        * 
    * * repeated .tensorflow.TensorSliceProto slices = 7; @@ -105,10 +109,11 @@ public interface BundleEntryProtoOrBuilder extends *
        * Iff present, this entry represents a partitioned tensor.  The previous
        * fields are interpreted as follows:
    -   *   "dtype", "shape": describe the full tensor.
    -   *   "shard_id", "offset", "size", "crc32c": all IGNORED.
    -   *      These information for each slice can be looked up in their own
    -   *      BundleEntryProto, keyed by each "slice_name".
    +   *
    +   * "dtype", "shape": describe the full tensor.
    +   * "shard_id", "offset", "size", "crc32c": all IGNORED.
    +   * These information for each slice can be looked up in their own
    +   * BundleEntryProto, keyed by each "slice_name".
        * 
    * * repeated .tensorflow.TensorSliceProto slices = 7; @@ -118,10 +123,11 @@ public interface BundleEntryProtoOrBuilder extends *
        * Iff present, this entry represents a partitioned tensor.  The previous
        * fields are interpreted as follows:
    -   *   "dtype", "shape": describe the full tensor.
    -   *   "shard_id", "offset", "size", "crc32c": all IGNORED.
    -   *      These information for each slice can be looked up in their own
    -   *      BundleEntryProto, keyed by each "slice_name".
    +   *
    +   * "dtype", "shape": describe the full tensor.
    +   * "shard_id", "offset", "size", "crc32c": all IGNORED.
    +   * These information for each slice can be looked up in their own
    +   * BundleEntryProto, keyed by each "slice_name".
        * 
    * * repeated .tensorflow.TensorSliceProto slices = 7; @@ -132,10 +138,11 @@ public interface BundleEntryProtoOrBuilder extends *
        * Iff present, this entry represents a partitioned tensor.  The previous
        * fields are interpreted as follows:
    -   *   "dtype", "shape": describe the full tensor.
    -   *   "shard_id", "offset", "size", "crc32c": all IGNORED.
    -   *      These information for each slice can be looked up in their own
    -   *      BundleEntryProto, keyed by each "slice_name".
    +   *
    +   * "dtype", "shape": describe the full tensor.
    +   * "shard_id", "offset", "size", "crc32c": all IGNORED.
    +   * These information for each slice can be looked up in their own
    +   * BundleEntryProto, keyed by each "slice_name".
        * 
    * * repeated .tensorflow.TensorSliceProto slices = 7; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BundleHeaderProto.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BundleHeaderProto.java index e3ed86bdef5..b3794d41c2e 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BundleHeaderProto.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BundleHeaderProto.java @@ -1,11 +1,14 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/protobuf/tensor_bundle.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; /** *
      * Special header that is associated with a bundle.
    + *
      * TODO(zongheng,zhifengc): maybe in the future, we can add information about
      * which binary produced this checkpoint, timestamp, etc. Sometime, these can be
      * valuable debugging information. And if needed, these can be used as defensive
    @@ -16,37 +19,34 @@
      * Protobuf type {@code tensorflow.BundleHeaderProto}
      */
     public final class BundleHeaderProto extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.BundleHeaderProto)
         BundleHeaderProtoOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      BundleHeaderProto.class.getName());
    +  }
       // Use BundleHeaderProto.newBuilder() to construct.
    -  private BundleHeaderProto(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private BundleHeaderProto(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private BundleHeaderProto() {
         endianness_ = 0;
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new BundleHeaderProto();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.TensorBundleProtos.internal_static_tensorflow_BundleHeaderProto_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.TensorBundleProtos.internal_static_tensorflow_BundleHeaderProto_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -58,6 +58,7 @@ protected java.lang.Object newInstance(
        * An enum indicating the endianness of the platform that produced this
        * bundle.  A bundle can only be read by a platform with matching endianness.
        * Defaults to LITTLE, as most modern platforms are little-endian.
    +   *
        * Affects the binary tensor data bytes only, not the metadata in protobufs.
        * 
    * @@ -76,6 +77,15 @@ public enum Endianness UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + Endianness.class.getName()); + } /** * LITTLE = 0; */ @@ -168,8 +178,9 @@ private Endianness(int value) { // @@protoc_insertion_point(enum_scope:tensorflow.BundleHeaderProto.Endianness) } + private int bitField0_; public static final int NUM_SHARDS_FIELD_NUMBER = 1; - private int numShards_; + private int numShards_ = 0; /** *
        * Number of data files in the bundle.
    @@ -184,7 +195,7 @@ public int getNumShards() {
       }
     
       public static final int ENDIANNESS_FIELD_NUMBER = 2;
    -  private int endianness_;
    +  private int endianness_ = 0;
       /**
        * .tensorflow.BundleHeaderProto.Endianness endianness = 2;
        * @return The enum numeric value on the wire for endianness.
    @@ -197,8 +208,7 @@ public int getNumShards() {
        * @return The endianness.
        */
       @java.lang.Override public org.tensorflow.proto.BundleHeaderProto.Endianness getEndianness() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.BundleHeaderProto.Endianness result = org.tensorflow.proto.BundleHeaderProto.Endianness.valueOf(endianness_);
    +    org.tensorflow.proto.BundleHeaderProto.Endianness result = org.tensorflow.proto.BundleHeaderProto.Endianness.forNumber(endianness_);
         return result == null ? org.tensorflow.proto.BundleHeaderProto.Endianness.UNRECOGNIZED : result;
       }
     
    @@ -214,7 +224,7 @@ public int getNumShards() {
        */
       @java.lang.Override
       public boolean hasVersion() {
    -    return version_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * 
    @@ -237,7 +247,7 @@ public org.tensorflow.proto.VersionDef getVersion() {
        */
       @java.lang.Override
       public org.tensorflow.proto.VersionDefOrBuilder getVersionOrBuilder() {
    -    return getVersion();
    +    return version_ == null ? org.tensorflow.proto.VersionDef.getDefaultInstance() : version_;
       }
     
       private byte memoizedIsInitialized = -1;
    @@ -260,7 +270,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         if (endianness_ != org.tensorflow.proto.BundleHeaderProto.Endianness.LITTLE.getNumber()) {
           output.writeEnum(2, endianness_);
         }
    -    if (version_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(3, getVersion());
         }
         getUnknownFields().writeTo(output);
    @@ -280,7 +290,7 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeEnumSize(2, endianness_);
         }
    -    if (version_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(3, getVersion());
         }
    @@ -365,39 +375,41 @@ public static org.tensorflow.proto.BundleHeaderProto parseFrom(
       }
       public static org.tensorflow.proto.BundleHeaderProto parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.BundleHeaderProto parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.BundleHeaderProto parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.BundleHeaderProto parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.BundleHeaderProto parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.BundleHeaderProto parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -417,13 +429,14 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
       /**
        * 
        * Special header that is associated with a bundle.
    +   *
        * TODO(zongheng,zhifengc): maybe in the future, we can add information about
        * which binary produced this checkpoint, timestamp, etc. Sometime, these can be
        * valuable debugging information. And if needed, these can be used as defensive
    @@ -434,7 +447,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.BundleHeaderProto}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.BundleHeaderProto)
           org.tensorflow.proto.BundleHeaderProtoOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -443,7 +456,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.TensorBundleProtos.internal_static_tensorflow_BundleHeaderProto_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -452,25 +465,29 @@ public static final class Builder extends
     
         // Construct using org.tensorflow.proto.BundleHeaderProto.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getVersionFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           numShards_ = 0;
    -
           endianness_ = 0;
    -
    -      if (versionBuilder_ == null) {
    -        version_ = null;
    -      } else {
    -        version_ = null;
    +      version_ = null;
    +      if (versionBuilder_ != null) {
    +        versionBuilder_.dispose();
             versionBuilder_ = null;
           }
           return this;
    @@ -499,49 +516,29 @@ public org.tensorflow.proto.BundleHeaderProto build() {
         @java.lang.Override
         public org.tensorflow.proto.BundleHeaderProto buildPartial() {
           org.tensorflow.proto.BundleHeaderProto result = new org.tensorflow.proto.BundleHeaderProto(this);
    -      result.numShards_ = numShards_;
    -      result.endianness_ = endianness_;
    -      if (versionBuilder_ == null) {
    -        result.version_ = version_;
    -      } else {
    -        result.version_ = versionBuilder_.build();
    -      }
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.BundleHeaderProto result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.numShards_ = numShards_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.endianness_ = endianness_;
    +      }
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.version_ = versionBuilder_ == null
    +            ? version_
    +            : versionBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
    +      }
    +      result.bitField0_ |= to_bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.BundleHeaderProto) {
    @@ -591,19 +588,19 @@ public Builder mergeFrom(
                   break;
                 case 8: {
                   numShards_ = input.readInt32();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 8
                 case 16: {
                   endianness_ = input.readEnum();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 16
                 case 26: {
                   input.readMessage(
                       getVersionFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 26
                 default: {
    @@ -621,6 +618,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private int numShards_ ;
         /**
    @@ -645,8 +643,9 @@ public int getNumShards() {
          * @return This builder for chaining.
          */
         public Builder setNumShards(int value) {
    -      
    +
           numShards_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -659,7 +658,7 @@ public Builder setNumShards(int value) {
          * @return This builder for chaining.
          */
         public Builder clearNumShards() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000001);
           numShards_ = 0;
           onChanged();
           return this;
    @@ -679,8 +678,8 @@ public Builder clearNumShards() {
          * @return This builder for chaining.
          */
         public Builder setEndiannessValue(int value) {
    -      
           endianness_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -690,8 +689,7 @@ public Builder setEndiannessValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.BundleHeaderProto.Endianness getEndianness() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.BundleHeaderProto.Endianness result = org.tensorflow.proto.BundleHeaderProto.Endianness.valueOf(endianness_);
    +      org.tensorflow.proto.BundleHeaderProto.Endianness result = org.tensorflow.proto.BundleHeaderProto.Endianness.forNumber(endianness_);
           return result == null ? org.tensorflow.proto.BundleHeaderProto.Endianness.UNRECOGNIZED : result;
         }
         /**
    @@ -703,7 +701,7 @@ public Builder setEndianness(org.tensorflow.proto.BundleHeaderProto.Endianness v
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00000002;
           endianness_ = value.getNumber();
           onChanged();
           return this;
    @@ -713,14 +711,14 @@ public Builder setEndianness(org.tensorflow.proto.BundleHeaderProto.Endianness v
          * @return This builder for chaining.
          */
         public Builder clearEndianness() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000002);
           endianness_ = 0;
           onChanged();
           return this;
         }
     
         private org.tensorflow.proto.VersionDef version_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.VersionDef, org.tensorflow.proto.VersionDef.Builder, org.tensorflow.proto.VersionDefOrBuilder> versionBuilder_;
         /**
          * 
    @@ -731,7 +729,7 @@ public Builder clearEndianness() {
          * @return Whether the version field is set.
          */
         public boolean hasVersion() {
    -      return versionBuilder_ != null || version_ != null;
    +      return ((bitField0_ & 0x00000004) != 0);
         }
         /**
          * 
    @@ -761,11 +759,11 @@ public Builder setVersion(org.tensorflow.proto.VersionDef value) {
               throw new NullPointerException();
             }
             version_ = value;
    -        onChanged();
           } else {
             versionBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000004;
    +      onChanged();
           return this;
         }
         /**
    @@ -779,11 +777,11 @@ public Builder setVersion(
             org.tensorflow.proto.VersionDef.Builder builderForValue) {
           if (versionBuilder_ == null) {
             version_ = builderForValue.build();
    -        onChanged();
           } else {
             versionBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000004;
    +      onChanged();
           return this;
         }
         /**
    @@ -795,17 +793,20 @@ public Builder setVersion(
          */
         public Builder mergeVersion(org.tensorflow.proto.VersionDef value) {
           if (versionBuilder_ == null) {
    -        if (version_ != null) {
    -          version_ =
    -            org.tensorflow.proto.VersionDef.newBuilder(version_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000004) != 0) &&
    +          version_ != null &&
    +          version_ != org.tensorflow.proto.VersionDef.getDefaultInstance()) {
    +          getVersionBuilder().mergeFrom(value);
             } else {
               version_ = value;
             }
    -        onChanged();
           } else {
             versionBuilder_.mergeFrom(value);
           }
    -
    +      if (version_ != null) {
    +        bitField0_ |= 0x00000004;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -816,14 +817,13 @@ public Builder mergeVersion(org.tensorflow.proto.VersionDef value) {
          * .tensorflow.VersionDef version = 3;
          */
         public Builder clearVersion() {
    -      if (versionBuilder_ == null) {
    -        version_ = null;
    -        onChanged();
    -      } else {
    -        version_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000004);
    +      version_ = null;
    +      if (versionBuilder_ != null) {
    +        versionBuilder_.dispose();
             versionBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -834,7 +834,7 @@ public Builder clearVersion() {
          * .tensorflow.VersionDef version = 3;
          */
         public org.tensorflow.proto.VersionDef.Builder getVersionBuilder() {
    -      
    +      bitField0_ |= 0x00000004;
           onChanged();
           return getVersionFieldBuilder().getBuilder();
         }
    @@ -860,11 +860,11 @@ public org.tensorflow.proto.VersionDefOrBuilder getVersionOrBuilder() {
          *
          * .tensorflow.VersionDef version = 3;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.VersionDef, org.tensorflow.proto.VersionDef.Builder, org.tensorflow.proto.VersionDefOrBuilder> 
             getVersionFieldBuilder() {
           if (versionBuilder_ == null) {
    -        versionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        versionBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.VersionDef, org.tensorflow.proto.VersionDef.Builder, org.tensorflow.proto.VersionDefOrBuilder>(
                     getVersion(),
                     getParentForChildren(),
    @@ -873,18 +873,6 @@ public org.tensorflow.proto.VersionDefOrBuilder getVersionOrBuilder() {
           }
           return versionBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.BundleHeaderProto)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BundleHeaderProtoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BundleHeaderProtoOrBuilder.java
    index 9ab9de7026e..af4013c645d 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BundleHeaderProtoOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BundleHeaderProtoOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/tensor_bundle.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BytesList.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BytesList.java
    index e14a7d27419..2f6bc835be9 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BytesList.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BytesList.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/example/feature.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -12,37 +14,34 @@
      * Protobuf type {@code tensorflow.BytesList}
      */
     public final class BytesList extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.BytesList)
         BytesListOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      BytesList.class.getName());
    +  }
       // Use BytesList.newBuilder() to construct.
    -  private BytesList(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private BytesList(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private BytesList() {
    -    value_ = java.util.Collections.emptyList();
    -  }
    -
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new BytesList();
    +    value_ = emptyList(com.google.protobuf.ByteString.class);
       }
     
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.FeatureProtos.internal_static_tensorflow_BytesList_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.FeatureProtos.internal_static_tensorflow_BytesList_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -50,7 +49,9 @@ protected java.lang.Object newInstance(
       }
     
       public static final int VALUE_FIELD_NUMBER = 1;
    -  private java.util.List value_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.Internal.ProtobufList value_ =
    +      emptyList(com.google.protobuf.ByteString.class);
       /**
        * repeated bytes value = 1;
        * @return A list containing the value.
    @@ -182,39 +183,41 @@ public static org.tensorflow.proto.BytesList parseFrom(
       }
       public static org.tensorflow.proto.BytesList parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.BytesList parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.BytesList parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.BytesList parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.BytesList parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.BytesList parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -234,7 +237,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -247,7 +250,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.BytesList}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.BytesList)
           org.tensorflow.proto.BytesListOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -256,7 +259,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.FeatureProtos.internal_static_tensorflow_BytesList_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -269,15 +272,15 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    -      value_ = java.util.Collections.emptyList();
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      bitField0_ = 0;
    +      value_ = emptyList(com.google.protobuf.ByteString.class);
           return this;
         }
     
    @@ -304,48 +307,19 @@ public org.tensorflow.proto.BytesList build() {
         @java.lang.Override
         public org.tensorflow.proto.BytesList buildPartial() {
           org.tensorflow.proto.BytesList result = new org.tensorflow.proto.BytesList(this);
    -      int from_bitField0_ = bitField0_;
    -      if (((bitField0_ & 0x00000001) != 0)) {
    -        value_ = java.util.Collections.unmodifiableList(value_);
    -        bitField0_ = (bitField0_ & ~0x00000001);
    -      }
    -      result.value_ = value_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.BytesList result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        value_.makeImmutable();
    +        result.value_ = value_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.BytesList) {
    @@ -361,7 +335,8 @@ public Builder mergeFrom(org.tensorflow.proto.BytesList other) {
           if (!other.value_.isEmpty()) {
             if (value_.isEmpty()) {
               value_ = other.value_;
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          value_.makeImmutable();
    +          bitField0_ |= 0x00000001;
             } else {
               ensureValueIsMutable();
               value_.addAll(other.value_);
    @@ -417,12 +392,12 @@ public Builder mergeFrom(
         }
         private int bitField0_;
     
    -    private java.util.List value_ = java.util.Collections.emptyList();
    +    private com.google.protobuf.Internal.ProtobufList value_ = emptyList(com.google.protobuf.ByteString.class);
         private void ensureValueIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    -        value_ = new java.util.ArrayList(value_);
    -        bitField0_ |= 0x00000001;
    -       }
    +      if (!value_.isModifiable()) {
    +        value_ = makeMutableCopy(value_);
    +      }
    +      bitField0_ |= 0x00000001;
         }
         /**
          * repeated bytes value = 1;
    @@ -430,8 +405,8 @@ private void ensureValueIsMutable() {
          */
         public java.util.List
             getValueList() {
    -      return ((bitField0_ & 0x00000001) != 0) ?
    -               java.util.Collections.unmodifiableList(value_) : value_;
    +      value_.makeImmutable();
    +      return value_;
         }
         /**
          * repeated bytes value = 1;
    @@ -456,11 +431,10 @@ public com.google.protobuf.ByteString getValue(int index) {
          */
         public Builder setValue(
             int index, com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureValueIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureValueIsMutable();
           value_.set(index, value);
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -470,11 +444,10 @@ public Builder setValue(
          * @return This builder for chaining.
          */
         public Builder addValue(com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureValueIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureValueIsMutable();
           value_.add(value);
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -488,6 +461,7 @@ public Builder addAllValue(
           ensureValueIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, value_);
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -496,23 +470,11 @@ public Builder addAllValue(
          * @return This builder for chaining.
          */
         public Builder clearValue() {
    -      value_ = java.util.Collections.emptyList();
    +      value_ = emptyList(com.google.protobuf.ByteString.class);
           bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.BytesList)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BytesListOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BytesListOrBuilder.java
    index 355201bf884..aedd4074e8e 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BytesListOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BytesListOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/example/feature.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CPUInfo.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CPUInfo.java
    index 3816e55e459..035624d0f53 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CPUInfo.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CPUInfo.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: xla/tsl/protobuf/test_log.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,12 +9,21 @@
      * Protobuf type {@code tensorflow.CPUInfo}
      */
     public final class CPUInfo extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.CPUInfo)
         CPUInfoOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      CPUInfo.class.getName());
    +  }
       // Use CPUInfo.newBuilder() to construct.
    -  private CPUInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private CPUInfo(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private CPUInfo() {
    @@ -20,18 +31,6 @@ private CPUInfo() {
         cpuGovernor_ = "";
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new CPUInfo();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_CPUInfo_descriptor;
    @@ -39,7 +38,7 @@ protected java.lang.Object newInstance(
     
       @SuppressWarnings({"rawtypes"})
       @java.lang.Override
    -  protected com.google.protobuf.MapField internalGetMapField(
    +  protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
           int number) {
         switch (number) {
           case 6:
    @@ -50,7 +49,7 @@ protected com.google.protobuf.MapField internalGetMapField(
         }
       }
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_CPUInfo_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -58,7 +57,7 @@ protected com.google.protobuf.MapField internalGetMapField(
       }
     
       public static final int NUM_CORES_FIELD_NUMBER = 1;
    -  private long numCores_;
    +  private long numCores_ = 0L;
       /**
        * int64 num_cores = 1;
        * @return The numCores.
    @@ -69,7 +68,7 @@ public long getNumCores() {
       }
     
       public static final int NUM_CORES_ALLOWED_FIELD_NUMBER = 2;
    -  private long numCoresAllowed_;
    +  private long numCoresAllowed_ = 0L;
       /**
        * int64 num_cores_allowed = 2;
        * @return The numCoresAllowed.
    @@ -80,7 +79,7 @@ public long getNumCoresAllowed() {
       }
     
       public static final int MHZ_PER_CPU_FIELD_NUMBER = 3;
    -  private double mhzPerCpu_;
    +  private double mhzPerCpu_ = 0D;
       /**
        * 
        * How fast are these cpus?
    @@ -95,7 +94,8 @@ public double getMhzPerCpu() {
       }
     
       public static final int CPU_INFO_FIELD_NUMBER = 4;
    -  private volatile java.lang.Object cpuInfo_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object cpuInfo_ = "";
       /**
        * 
        * Additional cpu information. For example,
    @@ -143,7 +143,8 @@ public java.lang.String getCpuInfo() {
       }
     
       public static final int CPU_GOVERNOR_FIELD_NUMBER = 5;
    -  private volatile java.lang.Object cpuGovernor_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object cpuGovernor_ = "";
       /**
        * 
        * What kind of cpu scaling is enabled on the host.
    @@ -202,6 +203,7 @@ private static final class CacheSizeDefaultEntryHolder {
                     com.google.protobuf.WireFormat.FieldType.INT64,
                     0L);
       }
    +  @SuppressWarnings("serial")
       private com.google.protobuf.MapField<
           java.lang.String, java.lang.Long> cacheSize_;
       private com.google.protobuf.MapField
    @@ -212,7 +214,6 @@ private static final class CacheSizeDefaultEntryHolder {
         }
         return cacheSize_;
       }
    -
       public int getCacheSizeCount() {
         return internalGetCacheSize().getMap().size();
       }
    @@ -223,7 +224,6 @@ public int getCacheSizeCount() {
        *
        * map<string, int64> cache_size = 6;
        */
    -
       @java.lang.Override
       public boolean containsCacheSize(
           java.lang.String key) {
    @@ -246,7 +246,6 @@ public java.util.Map getCacheSize() {
        * map<string, int64> cache_size = 6;
        */
       @java.lang.Override
    -
       public java.util.Map getCacheSizeMap() {
         return internalGetCacheSize().getMap();
       }
    @@ -258,7 +257,6 @@ public java.util.Map getCacheSizeMap() {
        * map<string, int64> cache_size = 6;
        */
       @java.lang.Override
    -
       public long getCacheSizeOrDefault(
           java.lang.String key,
           long defaultValue) {
    @@ -275,7 +273,6 @@ public long getCacheSizeOrDefault(
        * map<string, int64> cache_size = 6;
        */
       @java.lang.Override
    -
       public long getCacheSizeOrThrow(
           java.lang.String key) {
         if (key == null) { throw new NullPointerException("map key"); }
    @@ -310,13 +307,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         if (java.lang.Double.doubleToRawLongBits(mhzPerCpu_) != 0) {
           output.writeDouble(3, mhzPerCpu_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpuInfo_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, cpuInfo_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cpuInfo_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 4, cpuInfo_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpuGovernor_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, cpuGovernor_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cpuGovernor_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 5, cpuGovernor_);
         }
    -    com.google.protobuf.GeneratedMessageV3
    +    com.google.protobuf.GeneratedMessage
           .serializeStringMapTo(
             output,
             internalGetCacheSize(),
    @@ -343,11 +340,11 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeDoubleSize(3, mhzPerCpu_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpuInfo_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, cpuInfo_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cpuInfo_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(4, cpuInfo_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpuGovernor_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, cpuGovernor_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cpuGovernor_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(5, cpuGovernor_);
         }
         for (java.util.Map.Entry entry
              : internalGetCacheSize().getMap().entrySet()) {
    @@ -454,39 +451,41 @@ public static org.tensorflow.proto.CPUInfo parseFrom(
       }
       public static org.tensorflow.proto.CPUInfo parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.CPUInfo parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.CPUInfo parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.CPUInfo parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.CPUInfo parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.CPUInfo parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -506,7 +505,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -514,7 +513,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.CPUInfo}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.CPUInfo)
           org.tensorflow.proto.CPUInfoOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -523,7 +522,7 @@ public static final class Builder extends
         }
     
         @SuppressWarnings({"rawtypes"})
    -    protected com.google.protobuf.MapField internalGetMapField(
    +    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
             int number) {
           switch (number) {
             case 6:
    @@ -534,7 +533,7 @@ protected com.google.protobuf.MapField internalGetMapField(
           }
         }
         @SuppressWarnings({"rawtypes"})
    -    protected com.google.protobuf.MapField internalGetMutableMapField(
    +    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
             int number) {
           switch (number) {
             case 6:
    @@ -545,7 +544,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField(
           }
         }
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_CPUInfo_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -558,23 +557,19 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           numCores_ = 0L;
    -
           numCoresAllowed_ = 0L;
    -
           mhzPerCpu_ = 0D;
    -
           cpuInfo_ = "";
    -
           cpuGovernor_ = "";
    -
           internalGetMutableCacheSize().clear();
           return this;
         }
    @@ -602,50 +597,34 @@ public org.tensorflow.proto.CPUInfo build() {
         @java.lang.Override
         public org.tensorflow.proto.CPUInfo buildPartial() {
           org.tensorflow.proto.CPUInfo result = new org.tensorflow.proto.CPUInfo(this);
    -      int from_bitField0_ = bitField0_;
    -      result.numCores_ = numCores_;
    -      result.numCoresAllowed_ = numCoresAllowed_;
    -      result.mhzPerCpu_ = mhzPerCpu_;
    -      result.cpuInfo_ = cpuInfo_;
    -      result.cpuGovernor_ = cpuGovernor_;
    -      result.cacheSize_ = internalGetCacheSize();
    -      result.cacheSize_.makeImmutable();
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.CPUInfo result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.numCores_ = numCores_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.numCoresAllowed_ = numCoresAllowed_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.mhzPerCpu_ = mhzPerCpu_;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.cpuInfo_ = cpuInfo_;
    +      }
    +      if (((from_bitField0_ & 0x00000010) != 0)) {
    +        result.cpuGovernor_ = cpuGovernor_;
    +      }
    +      if (((from_bitField0_ & 0x00000020) != 0)) {
    +        result.cacheSize_ = internalGetCacheSize();
    +        result.cacheSize_.makeImmutable();
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.CPUInfo) {
    @@ -669,14 +648,17 @@ public Builder mergeFrom(org.tensorflow.proto.CPUInfo other) {
           }
           if (!other.getCpuInfo().isEmpty()) {
             cpuInfo_ = other.cpuInfo_;
    +        bitField0_ |= 0x00000008;
             onChanged();
           }
           if (!other.getCpuGovernor().isEmpty()) {
             cpuGovernor_ = other.cpuGovernor_;
    +        bitField0_ |= 0x00000010;
             onChanged();
           }
           internalGetMutableCacheSize().mergeFrom(
               other.internalGetCacheSize());
    +      bitField0_ |= 0x00000020;
           this.mergeUnknownFields(other.getUnknownFields());
           onChanged();
           return this;
    @@ -705,27 +687,27 @@ public Builder mergeFrom(
                   break;
                 case 8: {
                   numCores_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 8
                 case 16: {
                   numCoresAllowed_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 16
                 case 25: {
                   mhzPerCpu_ = input.readDouble();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 25
                 case 34: {
                   cpuInfo_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 34
                 case 42: {
                   cpuGovernor_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000010;
                   break;
                 } // case 42
                 case 50: {
    @@ -734,6 +716,7 @@ public Builder mergeFrom(
                       CacheSizeDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
                   internalGetMutableCacheSize().getMutableMap().put(
                       cacheSize__.getKey(), cacheSize__.getValue());
    +              bitField0_ |= 0x00000020;
                   break;
                 } // case 50
                 default: {
    @@ -768,8 +751,9 @@ public long getNumCores() {
          * @return This builder for chaining.
          */
         public Builder setNumCores(long value) {
    -      
    +
           numCores_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -778,7 +762,7 @@ public Builder setNumCores(long value) {
          * @return This builder for chaining.
          */
         public Builder clearNumCores() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000001);
           numCores_ = 0L;
           onChanged();
           return this;
    @@ -799,8 +783,9 @@ public long getNumCoresAllowed() {
          * @return This builder for chaining.
          */
         public Builder setNumCoresAllowed(long value) {
    -      
    +
           numCoresAllowed_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -809,7 +794,7 @@ public Builder setNumCoresAllowed(long value) {
          * @return This builder for chaining.
          */
         public Builder clearNumCoresAllowed() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000002);
           numCoresAllowed_ = 0L;
           onChanged();
           return this;
    @@ -838,8 +823,9 @@ public double getMhzPerCpu() {
          * @return This builder for chaining.
          */
         public Builder setMhzPerCpu(double value) {
    -      
    +
           mhzPerCpu_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -852,7 +838,7 @@ public Builder setMhzPerCpu(double value) {
          * @return This builder for chaining.
          */
         public Builder clearMhzPerCpu() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000004);
           mhzPerCpu_ = 0D;
           onChanged();
           return this;
    @@ -914,11 +900,9 @@ public java.lang.String getCpuInfo() {
          */
         public Builder setCpuInfo(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           cpuInfo_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -932,8 +916,8 @@ public Builder setCpuInfo(
          * @return This builder for chaining.
          */
         public Builder clearCpuInfo() {
    -      
           cpuInfo_ = getDefaultInstance().getCpuInfo();
    +      bitField0_ = (bitField0_ & ~0x00000008);
           onChanged();
           return this;
         }
    @@ -949,12 +933,10 @@ public Builder clearCpuInfo() {
          */
         public Builder setCpuInfoBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           cpuInfo_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -1015,11 +997,9 @@ public java.lang.String getCpuGovernor() {
          */
         public Builder setCpuGovernor(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           cpuGovernor_ = value;
    +      bitField0_ |= 0x00000010;
           onChanged();
           return this;
         }
    @@ -1033,8 +1013,8 @@ public Builder setCpuGovernor(
          * @return This builder for chaining.
          */
         public Builder clearCpuGovernor() {
    -      
           cpuGovernor_ = getDefaultInstance().getCpuGovernor();
    +      bitField0_ = (bitField0_ & ~0x00000010);
           onChanged();
           return this;
         }
    @@ -1050,12 +1030,10 @@ public Builder clearCpuGovernor() {
          */
         public Builder setCpuGovernorBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           cpuGovernor_ = value;
    +      bitField0_ |= 0x00000010;
           onChanged();
           return this;
         }
    @@ -1063,7 +1041,7 @@ public Builder setCpuGovernorBytes(
         private com.google.protobuf.MapField<
             java.lang.String, java.lang.Long> cacheSize_;
         private com.google.protobuf.MapField
    -    internalGetCacheSize() {
    +        internalGetCacheSize() {
           if (cacheSize_ == null) {
             return com.google.protobuf.MapField.emptyMapField(
                 CacheSizeDefaultEntryHolder.defaultEntry);
    @@ -1071,8 +1049,7 @@ public Builder setCpuGovernorBytes(
           return cacheSize_;
         }
         private com.google.protobuf.MapField
    -    internalGetMutableCacheSize() {
    -      onChanged();;
    +        internalGetMutableCacheSize() {
           if (cacheSize_ == null) {
             cacheSize_ = com.google.protobuf.MapField.newMapField(
                 CacheSizeDefaultEntryHolder.defaultEntry);
    @@ -1080,9 +1057,10 @@ public Builder setCpuGovernorBytes(
           if (!cacheSize_.isMutable()) {
             cacheSize_ = cacheSize_.copy();
           }
    +      bitField0_ |= 0x00000020;
    +      onChanged();
           return cacheSize_;
         }
    -
         public int getCacheSizeCount() {
           return internalGetCacheSize().getMap().size();
         }
    @@ -1093,7 +1071,6 @@ public int getCacheSizeCount() {
          *
          * map<string, int64> cache_size = 6;
          */
    -
         @java.lang.Override
         public boolean containsCacheSize(
             java.lang.String key) {
    @@ -1116,7 +1093,6 @@ public java.util.Map getCacheSize() {
          * map<string, int64> cache_size = 6;
          */
         @java.lang.Override
    -
         public java.util.Map getCacheSizeMap() {
           return internalGetCacheSize().getMap();
         }
    @@ -1128,7 +1104,6 @@ public java.util.Map getCacheSizeMap() {
          * map<string, int64> cache_size = 6;
          */
         @java.lang.Override
    -
         public long getCacheSizeOrDefault(
             java.lang.String key,
             long defaultValue) {
    @@ -1145,7 +1120,6 @@ public long getCacheSizeOrDefault(
          * map<string, int64> cache_size = 6;
          */
         @java.lang.Override
    -
         public long getCacheSizeOrThrow(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    @@ -1156,8 +1130,8 @@ public long getCacheSizeOrThrow(
           }
           return map.get(key);
         }
    -
         public Builder clearCacheSize() {
    +      bitField0_ = (bitField0_ & ~0x00000020);
           internalGetMutableCacheSize().getMutableMap()
               .clear();
           return this;
    @@ -1169,7 +1143,6 @@ public Builder clearCacheSize() {
          *
          * map<string, int64> cache_size = 6;
          */
    -
         public Builder removeCacheSize(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    @@ -1182,7 +1155,8 @@ public Builder removeCacheSize(
          */
         @java.lang.Deprecated
         public java.util.Map
    -    getMutableCacheSize() {
    +        getMutableCacheSize() {
    +      bitField0_ |= 0x00000020;
           return internalGetMutableCacheSize().getMutableMap();
         }
         /**
    @@ -1196,9 +1170,10 @@ public Builder putCacheSize(
             java.lang.String key,
             long value) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      
    +
           internalGetMutableCacheSize().getMutableMap()
               .put(key, value);
    +      bitField0_ |= 0x00000020;
           return this;
         }
         /**
    @@ -1208,25 +1183,13 @@ public Builder putCacheSize(
          *
          * map<string, int64> cache_size = 6;
          */
    -
         public Builder putAllCacheSize(
             java.util.Map values) {
           internalGetMutableCacheSize().getMutableMap()
               .putAll(values);
    +      bitField0_ |= 0x00000020;
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.CPUInfo)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CPUInfoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CPUInfoOrBuilder.java
    index 9ede760853d..7989860564f 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CPUInfoOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CPUInfoOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: xla/tsl/protobuf/test_log.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -112,7 +114,6 @@ boolean containsCacheSize(
        *
        * map<string, int64> cache_size = 6;
        */
    -
       long getCacheSizeOrDefault(
           java.lang.String key,
           long defaultValue);
    @@ -123,7 +124,6 @@ long getCacheSizeOrDefault(
        *
        * map<string, int64> cache_size = 6;
        */
    -
       long getCacheSizeOrThrow(
           java.lang.String key);
     }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CallableOptions.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CallableOptions.java
    index 905344c6072..5e11341845b 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CallableOptions.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CallableOptions.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/config.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,39 +9,40 @@
      * 
      * Defines a subgraph in another `GraphDef` as a set of feed points and nodes
      * to be fetched or executed.
    + *
      * Compare with the arguments to `Session::Run()`.
      * 
    * * Protobuf type {@code tensorflow.CallableOptions} */ public final class CallableOptions extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.CallableOptions) CallableOptionsOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + CallableOptions.class.getName()); + } // Use CallableOptions.newBuilder() to construct. - private CallableOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CallableOptions(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private CallableOptions() { - feed_ = com.google.protobuf.LazyStringArrayList.EMPTY; - fetch_ = com.google.protobuf.LazyStringArrayList.EMPTY; - target_ = com.google.protobuf.LazyStringArrayList.EMPTY; + feed_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + fetch_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + target_ = + com.google.protobuf.LazyStringArrayList.emptyList(); tensorConnection_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CallableOptions(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_CallableOptions_descriptor; @@ -47,7 +50,7 @@ protected java.lang.Object newInstance( @SuppressWarnings({"rawtypes"}) @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 6: @@ -60,15 +63,18 @@ protected com.google.protobuf.MapField internalGetMapField( } } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_CallableOptions_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.proto.CallableOptions.class, org.tensorflow.proto.CallableOptions.Builder.class); } + private int bitField0_; public static final int FEED_FIELD_NUMBER = 1; - private com.google.protobuf.LazyStringList feed_; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList feed_ = + com.google.protobuf.LazyStringArrayList.emptyList(); /** *
        * Tensors to be fed in the callable. Each feed is the name of a tensor.
    @@ -119,7 +125,9 @@ public java.lang.String getFeed(int index) {
       }
     
       public static final int FETCH_FIELD_NUMBER = 2;
    -  private com.google.protobuf.LazyStringList fetch_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.LazyStringArrayList fetch_ =
    +      com.google.protobuf.LazyStringArrayList.emptyList();
       /**
        * 
        * Fetches. A list of tensor names. The caller of the callable expects a
    @@ -178,7 +186,9 @@ public java.lang.String getFetch(int index) {
       }
     
       public static final int TARGET_FIELD_NUMBER = 3;
    -  private com.google.protobuf.LazyStringList target_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.LazyStringArrayList target_ =
    +      com.google.protobuf.LazyStringArrayList.emptyList();
       /**
        * 
        * Target Nodes. A list of node names. The named nodes will be run by the
    @@ -244,7 +254,7 @@ public java.lang.String getTarget(int index) {
        */
       @java.lang.Override
       public boolean hasRunOptions() {
    -    return runOptions_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * 
    @@ -267,10 +277,11 @@ public org.tensorflow.proto.RunOptions getRunOptions() {
        */
       @java.lang.Override
       public org.tensorflow.proto.RunOptionsOrBuilder getRunOptionsOrBuilder() {
    -    return getRunOptions();
    +    return runOptions_ == null ? org.tensorflow.proto.RunOptions.getDefaultInstance() : runOptions_;
       }
     
       public static final int TENSOR_CONNECTION_FIELD_NUMBER = 5;
    +  @SuppressWarnings("serial")
       private java.util.List tensorConnection_;
       /**
        * 
    @@ -352,6 +363,7 @@ private static final class FeedDevicesDefaultEntryHolder {
                     com.google.protobuf.WireFormat.FieldType.STRING,
                     "");
       }
    +  @SuppressWarnings("serial")
       private com.google.protobuf.MapField<
           java.lang.String, java.lang.String> feedDevices_;
       private com.google.protobuf.MapField
    @@ -362,7 +374,6 @@ private static final class FeedDevicesDefaultEntryHolder {
         }
         return feedDevices_;
       }
    -
       public int getFeedDevicesCount() {
         return internalGetFeedDevices().getMap().size();
       }
    @@ -370,36 +381,47 @@ public int getFeedDevicesCount() {
        * 
        * The Tensor objects fed in the callable and fetched from the callable
        * are expected to be backed by host (CPU) memory by default.
    +   *
        * The options below allow changing that - feeding tensors backed by
        * device memory, or returning tensors that are backed by device memory.
    +   *
        * The maps below map the name of a feed/fetch tensor (which appears in
        * 'feed' or 'fetch' fields above), to the fully qualified name of the device
        * owning the memory backing the contents of the tensor.
    +   *
        * For example, creating a callable with the following options:
    +   *
        * CallableOptions {
    -   *   feed: "a:0"
    -   *   feed: "b:0"
    -   *   fetch: "x:0"
    -   *   fetch: "y:0"
    -   *   feed_devices: {
    -   *     "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    -   *   }
    -   *   fetch_devices: {
    -   *     "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    -   *  }
    +   * feed: "a:0"
    +   * feed: "b:0"
    +   *
    +   * fetch: "x:0"
    +   * fetch: "y:0"
    +   *
    +   * feed_devices: {
    +   * "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    +   * }
    +   *
    +   * fetch_devices: {
    +   * "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
        * }
    +   * }
    +   *
        * means that the Callable expects:
        * - The first argument ("a:0") is a Tensor backed by GPU memory.
        * - The second argument ("b:0") is a Tensor backed by host memory.
        * and of its return values:
        * - The first output ("x:0") will be backed by host memory.
        * - The second output ("y:0") will be backed by GPU memory.
    +   *
        * FEEDS:
        * It is the responsibility of the caller to ensure that the memory of the fed
        * tensors will be correctly initialized and synchronized before it is
        * accessed by operations executed during the call to Session::RunCallable().
    +   *
        * This is typically ensured by using the TensorFlow memory allocators
        * (Device::GetAllocator()) to create the Tensor to be fed.
    +   *
        * Alternatively, for CUDA-enabled GPU devices, this typically means that the
        * operation that produced the contents of the tensor has completed, i.e., the
        * CUDA stream has been synchronized (e.g., via cuCtxSynchronize() or
    @@ -408,7 +430,6 @@ public int getFeedDevicesCount() {
        *
        * map<string, string> feed_devices = 6;
        */
    -
       @java.lang.Override
       public boolean containsFeedDevices(
           java.lang.String key) {
    @@ -427,36 +448,47 @@ public java.util.Map getFeedDevices() {
        * 
        * The Tensor objects fed in the callable and fetched from the callable
        * are expected to be backed by host (CPU) memory by default.
    +   *
        * The options below allow changing that - feeding tensors backed by
        * device memory, or returning tensors that are backed by device memory.
    +   *
        * The maps below map the name of a feed/fetch tensor (which appears in
        * 'feed' or 'fetch' fields above), to the fully qualified name of the device
        * owning the memory backing the contents of the tensor.
    +   *
        * For example, creating a callable with the following options:
    +   *
        * CallableOptions {
    -   *   feed: "a:0"
    -   *   feed: "b:0"
    -   *   fetch: "x:0"
    -   *   fetch: "y:0"
    -   *   feed_devices: {
    -   *     "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    -   *   }
    -   *   fetch_devices: {
    -   *     "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    -   *  }
    +   * feed: "a:0"
    +   * feed: "b:0"
    +   *
    +   * fetch: "x:0"
    +   * fetch: "y:0"
    +   *
    +   * feed_devices: {
    +   * "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    +   * }
    +   *
    +   * fetch_devices: {
    +   * "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
        * }
    +   * }
    +   *
        * means that the Callable expects:
        * - The first argument ("a:0") is a Tensor backed by GPU memory.
        * - The second argument ("b:0") is a Tensor backed by host memory.
        * and of its return values:
        * - The first output ("x:0") will be backed by host memory.
        * - The second output ("y:0") will be backed by GPU memory.
    +   *
        * FEEDS:
        * It is the responsibility of the caller to ensure that the memory of the fed
        * tensors will be correctly initialized and synchronized before it is
        * accessed by operations executed during the call to Session::RunCallable().
    +   *
        * This is typically ensured by using the TensorFlow memory allocators
        * (Device::GetAllocator()) to create the Tensor to be fed.
    +   *
        * Alternatively, for CUDA-enabled GPU devices, this typically means that the
        * operation that produced the contents of the tensor has completed, i.e., the
        * CUDA stream has been synchronized (e.g., via cuCtxSynchronize() or
    @@ -466,7 +498,6 @@ public java.util.Map getFeedDevices() {
        * map<string, string> feed_devices = 6;
        */
       @java.lang.Override
    -
       public java.util.Map getFeedDevicesMap() {
         return internalGetFeedDevices().getMap();
       }
    @@ -474,36 +505,47 @@ public java.util.Map getFeedDevicesMap() {
        * 
        * The Tensor objects fed in the callable and fetched from the callable
        * are expected to be backed by host (CPU) memory by default.
    +   *
        * The options below allow changing that - feeding tensors backed by
        * device memory, or returning tensors that are backed by device memory.
    +   *
        * The maps below map the name of a feed/fetch tensor (which appears in
        * 'feed' or 'fetch' fields above), to the fully qualified name of the device
        * owning the memory backing the contents of the tensor.
    +   *
        * For example, creating a callable with the following options:
    +   *
        * CallableOptions {
    -   *   feed: "a:0"
    -   *   feed: "b:0"
    -   *   fetch: "x:0"
    -   *   fetch: "y:0"
    -   *   feed_devices: {
    -   *     "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    -   *   }
    -   *   fetch_devices: {
    -   *     "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    -   *  }
    +   * feed: "a:0"
    +   * feed: "b:0"
    +   *
    +   * fetch: "x:0"
    +   * fetch: "y:0"
    +   *
    +   * feed_devices: {
    +   * "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    +   * }
    +   *
    +   * fetch_devices: {
    +   * "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    +   * }
        * }
    +   *
        * means that the Callable expects:
        * - The first argument ("a:0") is a Tensor backed by GPU memory.
        * - The second argument ("b:0") is a Tensor backed by host memory.
        * and of its return values:
        * - The first output ("x:0") will be backed by host memory.
        * - The second output ("y:0") will be backed by GPU memory.
    +   *
        * FEEDS:
        * It is the responsibility of the caller to ensure that the memory of the fed
        * tensors will be correctly initialized and synchronized before it is
        * accessed by operations executed during the call to Session::RunCallable().
    +   *
        * This is typically ensured by using the TensorFlow memory allocators
        * (Device::GetAllocator()) to create the Tensor to be fed.
    +   *
        * Alternatively, for CUDA-enabled GPU devices, this typically means that the
        * operation that produced the contents of the tensor has completed, i.e., the
        * CUDA stream has been synchronized (e.g., via cuCtxSynchronize() or
    @@ -513,10 +555,11 @@ public java.util.Map getFeedDevicesMap() {
        * map<string, string> feed_devices = 6;
        */
       @java.lang.Override
    -
    -  public java.lang.String getFeedDevicesOrDefault(
    +  public /* nullable */
    +java.lang.String getFeedDevicesOrDefault(
           java.lang.String key,
    -      java.lang.String defaultValue) {
    +      /* nullable */
    +java.lang.String defaultValue) {
         if (key == null) { throw new NullPointerException("map key"); }
         java.util.Map map =
             internalGetFeedDevices().getMap();
    @@ -526,36 +569,47 @@ public java.lang.String getFeedDevicesOrDefault(
        * 
        * The Tensor objects fed in the callable and fetched from the callable
        * are expected to be backed by host (CPU) memory by default.
    +   *
        * The options below allow changing that - feeding tensors backed by
        * device memory, or returning tensors that are backed by device memory.
    +   *
        * The maps below map the name of a feed/fetch tensor (which appears in
        * 'feed' or 'fetch' fields above), to the fully qualified name of the device
        * owning the memory backing the contents of the tensor.
    +   *
        * For example, creating a callable with the following options:
    +   *
        * CallableOptions {
    -   *   feed: "a:0"
    -   *   feed: "b:0"
    -   *   fetch: "x:0"
    -   *   fetch: "y:0"
    -   *   feed_devices: {
    -   *     "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    -   *   }
    -   *   fetch_devices: {
    -   *     "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    -   *  }
    +   * feed: "a:0"
    +   * feed: "b:0"
    +   *
    +   * fetch: "x:0"
    +   * fetch: "y:0"
    +   *
    +   * feed_devices: {
    +   * "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
        * }
    +   *
    +   * fetch_devices: {
    +   * "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    +   * }
    +   * }
    +   *
        * means that the Callable expects:
        * - The first argument ("a:0") is a Tensor backed by GPU memory.
        * - The second argument ("b:0") is a Tensor backed by host memory.
        * and of its return values:
        * - The first output ("x:0") will be backed by host memory.
        * - The second output ("y:0") will be backed by GPU memory.
    +   *
        * FEEDS:
        * It is the responsibility of the caller to ensure that the memory of the fed
        * tensors will be correctly initialized and synchronized before it is
        * accessed by operations executed during the call to Session::RunCallable().
    +   *
        * This is typically ensured by using the TensorFlow memory allocators
        * (Device::GetAllocator()) to create the Tensor to be fed.
    +   *
        * Alternatively, for CUDA-enabled GPU devices, this typically means that the
        * operation that produced the contents of the tensor has completed, i.e., the
        * CUDA stream has been synchronized (e.g., via cuCtxSynchronize() or
    @@ -565,7 +619,6 @@ public java.lang.String getFeedDevicesOrDefault(
        * map<string, string> feed_devices = 6;
        */
       @java.lang.Override
    -
       public java.lang.String getFeedDevicesOrThrow(
           java.lang.String key) {
         if (key == null) { throw new NullPointerException("map key"); }
    @@ -589,6 +642,7 @@ private static final class FetchDevicesDefaultEntryHolder {
                     com.google.protobuf.WireFormat.FieldType.STRING,
                     "");
       }
    +  @SuppressWarnings("serial")
       private com.google.protobuf.MapField<
           java.lang.String, java.lang.String> fetchDevices_;
       private com.google.protobuf.MapField
    @@ -599,14 +653,12 @@ private static final class FetchDevicesDefaultEntryHolder {
         }
         return fetchDevices_;
       }
    -
       public int getFetchDevicesCount() {
         return internalGetFetchDevices().getMap().size();
       }
       /**
        * map<string, string> fetch_devices = 7;
        */
    -
       @java.lang.Override
       public boolean containsFetchDevices(
           java.lang.String key) {
    @@ -625,7 +677,6 @@ public java.util.Map getFetchDevices() {
        * map<string, string> fetch_devices = 7;
        */
       @java.lang.Override
    -
       public java.util.Map getFetchDevicesMap() {
         return internalGetFetchDevices().getMap();
       }
    @@ -633,10 +684,11 @@ public java.util.Map getFetchDevicesMap() {
        * map<string, string> fetch_devices = 7;
        */
       @java.lang.Override
    -
    -  public java.lang.String getFetchDevicesOrDefault(
    +  public /* nullable */
    +java.lang.String getFetchDevicesOrDefault(
           java.lang.String key,
    -      java.lang.String defaultValue) {
    +      /* nullable */
    +java.lang.String defaultValue) {
         if (key == null) { throw new NullPointerException("map key"); }
         java.util.Map map =
             internalGetFetchDevices().getMap();
    @@ -646,7 +698,6 @@ public java.lang.String getFetchDevicesOrDefault(
        * map<string, string> fetch_devices = 7;
        */
       @java.lang.Override
    -
       public java.lang.String getFetchDevicesOrThrow(
           java.lang.String key) {
         if (key == null) { throw new NullPointerException("map key"); }
    @@ -659,13 +710,14 @@ public java.lang.String getFetchDevicesOrThrow(
       }
     
       public static final int FETCH_SKIP_SYNC_FIELD_NUMBER = 8;
    -  private boolean fetchSkipSync_;
    +  private boolean fetchSkipSync_ = false;
       /**
        * 
        * By default, RunCallable() will synchronize the GPU stream before returning
        * fetched tensors on a GPU device, to ensure that the values in those tensors
        * have been produced. This simplifies interacting with the tensors, but
        * potentially incurs a performance hit.
    +   *
        * If this options is set to true, the caller is responsible for ensuring
        * that the values in the fetched tensors have been produced before they are
        * used. The caller can do this by invoking `Device::Sync()` on the underlying
    @@ -696,27 +748,27 @@ public final boolean isInitialized() {
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
         for (int i = 0; i < feed_.size(); i++) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, feed_.getRaw(i));
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, feed_.getRaw(i));
         }
         for (int i = 0; i < fetch_.size(); i++) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, fetch_.getRaw(i));
    +      com.google.protobuf.GeneratedMessage.writeString(output, 2, fetch_.getRaw(i));
         }
         for (int i = 0; i < target_.size(); i++) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, target_.getRaw(i));
    +      com.google.protobuf.GeneratedMessage.writeString(output, 3, target_.getRaw(i));
         }
    -    if (runOptions_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(4, getRunOptions());
         }
         for (int i = 0; i < tensorConnection_.size(); i++) {
           output.writeMessage(5, tensorConnection_.get(i));
         }
    -    com.google.protobuf.GeneratedMessageV3
    +    com.google.protobuf.GeneratedMessage
           .serializeStringMapTo(
             output,
             internalGetFeedDevices(),
             FeedDevicesDefaultEntryHolder.defaultEntry,
             6);
    -    com.google.protobuf.GeneratedMessageV3
    +    com.google.protobuf.GeneratedMessage
           .serializeStringMapTo(
             output,
             internalGetFetchDevices(),
    @@ -758,7 +810,7 @@ public int getSerializedSize() {
           size += dataSize;
           size += 1 * getTargetList().size();
         }
    -    if (runOptions_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(4, getRunOptions());
         }
    @@ -905,39 +957,41 @@ public static org.tensorflow.proto.CallableOptions parseFrom(
       }
       public static org.tensorflow.proto.CallableOptions parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.CallableOptions parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.CallableOptions parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.CallableOptions parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.CallableOptions parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.CallableOptions parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -957,7 +1011,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -965,13 +1019,14 @@ protected Builder newBuilderForType(
        * 
        * Defines a subgraph in another `GraphDef` as a set of feed points and nodes
        * to be fetched or executed.
    +   *
        * Compare with the arguments to `Session::Run()`.
        * 
    * * Protobuf type {@code tensorflow.CallableOptions} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.CallableOptions) org.tensorflow.proto.CallableOptionsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -980,7 +1035,7 @@ public static final class Builder extends } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 6: @@ -993,7 +1048,7 @@ protected com.google.protobuf.MapField internalGetMapField( } } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( int number) { switch (number) { case 6: @@ -1006,7 +1061,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField( } } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_CallableOptions_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -1015,27 +1070,34 @@ protected com.google.protobuf.MapField internalGetMutableMapField( // Construct using org.tensorflow.proto.CallableOptions.newBuilder() private Builder() { - + maybeForceBuilderInitialization(); } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getRunOptionsFieldBuilder(); + getTensorConnectionFieldBuilder(); + } } @java.lang.Override public Builder clear() { super.clear(); - feed_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - fetch_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - target_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - if (runOptionsBuilder_ == null) { - runOptions_ = null; - } else { - runOptions_ = null; + bitField0_ = 0; + feed_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + fetch_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + target_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + runOptions_ = null; + if (runOptionsBuilder_ != null) { + runOptionsBuilder_.dispose(); runOptionsBuilder_ = null; } if (tensorConnectionBuilder_ == null) { @@ -1044,11 +1106,10 @@ public Builder clear() { tensorConnection_ = null; tensorConnectionBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); internalGetMutableFeedDevices().clear(); internalGetMutableFetchDevices().clear(); fetchSkipSync_ = false; - return this; } @@ -1075,77 +1136,59 @@ public org.tensorflow.proto.CallableOptions build() { @java.lang.Override public org.tensorflow.proto.CallableOptions buildPartial() { org.tensorflow.proto.CallableOptions result = new org.tensorflow.proto.CallableOptions(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - feed_ = feed_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.feed_ = feed_; - if (((bitField0_ & 0x00000002) != 0)) { - fetch_ = fetch_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.fetch_ = fetch_; - if (((bitField0_ & 0x00000004) != 0)) { - target_ = target_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.target_ = target_; - if (runOptionsBuilder_ == null) { - result.runOptions_ = runOptions_; - } else { - result.runOptions_ = runOptionsBuilder_.build(); - } + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(org.tensorflow.proto.CallableOptions result) { if (tensorConnectionBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { + if (((bitField0_ & 0x00000010) != 0)) { tensorConnection_ = java.util.Collections.unmodifiableList(tensorConnection_); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); } result.tensorConnection_ = tensorConnection_; } else { result.tensorConnection_ = tensorConnectionBuilder_.build(); } - result.feedDevices_ = internalGetFeedDevices(); - result.feedDevices_.makeImmutable(); - result.fetchDevices_ = internalGetFetchDevices(); - result.fetchDevices_.makeImmutable(); - result.fetchSkipSync_ = fetchSkipSync_; - onBuilt(); - return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.CallableOptions result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + feed_.makeImmutable(); + result.feed_ = feed_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + fetch_.makeImmutable(); + result.fetch_ = fetch_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + target_.makeImmutable(); + result.target_ = target_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.runOptions_ = runOptionsBuilder_ == null + ? runOptions_ + : runOptionsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.feedDevices_ = internalGetFeedDevices(); + result.feedDevices_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.fetchDevices_ = internalGetFetchDevices(); + result.fetchDevices_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.fetchSkipSync_ = fetchSkipSync_; + } + result.bitField0_ |= to_bitField0_; } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.CallableOptions) { @@ -1161,7 +1204,7 @@ public Builder mergeFrom(org.tensorflow.proto.CallableOptions other) { if (!other.feed_.isEmpty()) { if (feed_.isEmpty()) { feed_ = other.feed_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ |= 0x00000001; } else { ensureFeedIsMutable(); feed_.addAll(other.feed_); @@ -1171,7 +1214,7 @@ public Builder mergeFrom(org.tensorflow.proto.CallableOptions other) { if (!other.fetch_.isEmpty()) { if (fetch_.isEmpty()) { fetch_ = other.fetch_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ |= 0x00000002; } else { ensureFetchIsMutable(); fetch_.addAll(other.fetch_); @@ -1181,7 +1224,7 @@ public Builder mergeFrom(org.tensorflow.proto.CallableOptions other) { if (!other.target_.isEmpty()) { if (target_.isEmpty()) { target_ = other.target_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ |= 0x00000004; } else { ensureTargetIsMutable(); target_.addAll(other.target_); @@ -1195,7 +1238,7 @@ public Builder mergeFrom(org.tensorflow.proto.CallableOptions other) { if (!other.tensorConnection_.isEmpty()) { if (tensorConnection_.isEmpty()) { tensorConnection_ = other.tensorConnection_; - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); } else { ensureTensorConnectionIsMutable(); tensorConnection_.addAll(other.tensorConnection_); @@ -1208,9 +1251,9 @@ public Builder mergeFrom(org.tensorflow.proto.CallableOptions other) { tensorConnectionBuilder_.dispose(); tensorConnectionBuilder_ = null; tensorConnection_ = other.tensorConnection_; - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); tensorConnectionBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getTensorConnectionFieldBuilder() : null; } else { tensorConnectionBuilder_.addAllMessages(other.tensorConnection_); @@ -1219,8 +1262,10 @@ public Builder mergeFrom(org.tensorflow.proto.CallableOptions other) { } internalGetMutableFeedDevices().mergeFrom( other.internalGetFeedDevices()); + bitField0_ |= 0x00000020; internalGetMutableFetchDevices().mergeFrom( other.internalGetFetchDevices()); + bitField0_ |= 0x00000040; if (other.getFetchSkipSync() != false) { setFetchSkipSync(other.getFetchSkipSync()); } @@ -1272,7 +1317,7 @@ public Builder mergeFrom( input.readMessage( getRunOptionsFieldBuilder().getBuilder(), extensionRegistry); - + bitField0_ |= 0x00000008; break; } // case 34 case 42: { @@ -1294,6 +1339,7 @@ public Builder mergeFrom( FeedDevicesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableFeedDevices().getMutableMap().put( feedDevices__.getKey(), feedDevices__.getValue()); + bitField0_ |= 0x00000020; break; } // case 50 case 58: { @@ -1302,11 +1348,12 @@ public Builder mergeFrom( FetchDevicesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableFetchDevices().getMutableMap().put( fetchDevices__.getKey(), fetchDevices__.getValue()); + bitField0_ |= 0x00000040; break; } // case 58 case 64: { fetchSkipSync_ = input.readBool(); - + bitField0_ |= 0x00000080; break; } // case 64 default: { @@ -1326,12 +1373,13 @@ public Builder mergeFrom( } private int bitField0_; - private com.google.protobuf.LazyStringList feed_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private com.google.protobuf.LazyStringArrayList feed_ = + com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureFeedIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!feed_.isModifiable()) { feed_ = new com.google.protobuf.LazyStringArrayList(feed_); - bitField0_ |= 0x00000001; - } + } + bitField0_ |= 0x00000001; } /** *
    @@ -1343,7 +1391,8 @@ private void ensureFeedIsMutable() {
          */
         public com.google.protobuf.ProtocolStringList
             getFeedList() {
    -      return feed_.getUnmodifiableView();
    +      feed_.makeImmutable();
    +      return feed_;
         }
         /**
          * 
    @@ -1393,11 +1442,10 @@ public java.lang.String getFeed(int index) {
          */
         public Builder setFeed(
             int index, java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureFeedIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureFeedIsMutable();
           feed_.set(index, value);
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -1412,11 +1460,10 @@ public Builder setFeed(
          */
         public Builder addFeed(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureFeedIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureFeedIsMutable();
           feed_.add(value);
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -1434,6 +1481,7 @@ public Builder addAllFeed(
           ensureFeedIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, feed_);
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -1446,8 +1494,9 @@ public Builder addAllFeed(
          * @return This builder for chaining.
          */
         public Builder clearFeed() {
    -      feed_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      feed_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
    +      bitField0_ = (bitField0_ & ~0x00000001);;
           onChanged();
           return this;
         }
    @@ -1462,22 +1511,22 @@ public Builder clearFeed() {
          */
         public Builder addFeedBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           ensureFeedIsMutable();
           feed_.add(value);
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
     
    -    private com.google.protobuf.LazyStringList fetch_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +    private com.google.protobuf.LazyStringArrayList fetch_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         private void ensureFetchIsMutable() {
    -      if (!((bitField0_ & 0x00000002) != 0)) {
    +      if (!fetch_.isModifiable()) {
             fetch_ = new com.google.protobuf.LazyStringArrayList(fetch_);
    -        bitField0_ |= 0x00000002;
    -       }
    +      }
    +      bitField0_ |= 0x00000002;
         }
         /**
          * 
    @@ -1491,7 +1540,8 @@ private void ensureFetchIsMutable() {
          */
         public com.google.protobuf.ProtocolStringList
             getFetchList() {
    -      return fetch_.getUnmodifiableView();
    +      fetch_.makeImmutable();
    +      return fetch_;
         }
         /**
          * 
    @@ -1549,11 +1599,10 @@ public java.lang.String getFetch(int index) {
          */
         public Builder setFetch(
             int index, java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureFetchIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureFetchIsMutable();
           fetch_.set(index, value);
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -1570,11 +1619,10 @@ public Builder setFetch(
          */
         public Builder addFetch(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureFetchIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureFetchIsMutable();
           fetch_.add(value);
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -1594,6 +1642,7 @@ public Builder addAllFetch(
           ensureFetchIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, fetch_);
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -1608,8 +1657,9 @@ public Builder addAllFetch(
          * @return This builder for chaining.
          */
         public Builder clearFetch() {
    -      fetch_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000002);
    +      fetch_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
    +      bitField0_ = (bitField0_ & ~0x00000002);;
           onChanged();
           return this;
         }
    @@ -1626,22 +1676,22 @@ public Builder clearFetch() {
          */
         public Builder addFetchBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           ensureFetchIsMutable();
           fetch_.add(value);
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
     
    -    private com.google.protobuf.LazyStringList target_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +    private com.google.protobuf.LazyStringArrayList target_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         private void ensureTargetIsMutable() {
    -      if (!((bitField0_ & 0x00000004) != 0)) {
    +      if (!target_.isModifiable()) {
             target_ = new com.google.protobuf.LazyStringArrayList(target_);
    -        bitField0_ |= 0x00000004;
    -       }
    +      }
    +      bitField0_ |= 0x00000004;
         }
         /**
          * 
    @@ -1654,7 +1704,8 @@ private void ensureTargetIsMutable() {
          */
         public com.google.protobuf.ProtocolStringList
             getTargetList() {
    -      return target_.getUnmodifiableView();
    +      target_.makeImmutable();
    +      return target_;
         }
         /**
          * 
    @@ -1708,11 +1759,10 @@ public java.lang.String getTarget(int index) {
          */
         public Builder setTarget(
             int index, java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureTargetIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureTargetIsMutable();
           target_.set(index, value);
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -1728,11 +1778,10 @@ public Builder setTarget(
          */
         public Builder addTarget(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureTargetIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureTargetIsMutable();
           target_.add(value);
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -1751,6 +1800,7 @@ public Builder addAllTarget(
           ensureTargetIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, target_);
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -1764,8 +1814,9 @@ public Builder addAllTarget(
          * @return This builder for chaining.
          */
         public Builder clearTarget() {
    -      target_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000004);
    +      target_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
    +      bitField0_ = (bitField0_ & ~0x00000004);;
           onChanged();
           return this;
         }
    @@ -1781,18 +1832,17 @@ public Builder clearTarget() {
          */
         public Builder addTargetBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           ensureTargetIsMutable();
           target_.add(value);
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
     
         private org.tensorflow.proto.RunOptions runOptions_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.RunOptions, org.tensorflow.proto.RunOptions.Builder, org.tensorflow.proto.RunOptionsOrBuilder> runOptionsBuilder_;
         /**
          * 
    @@ -1803,7 +1853,7 @@ public Builder addTargetBytes(
          * @return Whether the runOptions field is set.
          */
         public boolean hasRunOptions() {
    -      return runOptionsBuilder_ != null || runOptions_ != null;
    +      return ((bitField0_ & 0x00000008) != 0);
         }
         /**
          * 
    @@ -1833,11 +1883,11 @@ public Builder setRunOptions(org.tensorflow.proto.RunOptions value) {
               throw new NullPointerException();
             }
             runOptions_ = value;
    -        onChanged();
           } else {
             runOptionsBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000008;
    +      onChanged();
           return this;
         }
         /**
    @@ -1851,11 +1901,11 @@ public Builder setRunOptions(
             org.tensorflow.proto.RunOptions.Builder builderForValue) {
           if (runOptionsBuilder_ == null) {
             runOptions_ = builderForValue.build();
    -        onChanged();
           } else {
             runOptionsBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000008;
    +      onChanged();
           return this;
         }
         /**
    @@ -1867,17 +1917,20 @@ public Builder setRunOptions(
          */
         public Builder mergeRunOptions(org.tensorflow.proto.RunOptions value) {
           if (runOptionsBuilder_ == null) {
    -        if (runOptions_ != null) {
    -          runOptions_ =
    -            org.tensorflow.proto.RunOptions.newBuilder(runOptions_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000008) != 0) &&
    +          runOptions_ != null &&
    +          runOptions_ != org.tensorflow.proto.RunOptions.getDefaultInstance()) {
    +          getRunOptionsBuilder().mergeFrom(value);
             } else {
               runOptions_ = value;
             }
    -        onChanged();
           } else {
             runOptionsBuilder_.mergeFrom(value);
           }
    -
    +      if (runOptions_ != null) {
    +        bitField0_ |= 0x00000008;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -1888,14 +1941,13 @@ public Builder mergeRunOptions(org.tensorflow.proto.RunOptions value) {
          * .tensorflow.RunOptions run_options = 4;
          */
         public Builder clearRunOptions() {
    -      if (runOptionsBuilder_ == null) {
    -        runOptions_ = null;
    -        onChanged();
    -      } else {
    -        runOptions_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000008);
    +      runOptions_ = null;
    +      if (runOptionsBuilder_ != null) {
    +        runOptionsBuilder_.dispose();
             runOptionsBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -1906,7 +1958,7 @@ public Builder clearRunOptions() {
          * .tensorflow.RunOptions run_options = 4;
          */
         public org.tensorflow.proto.RunOptions.Builder getRunOptionsBuilder() {
    -      
    +      bitField0_ |= 0x00000008;
           onChanged();
           return getRunOptionsFieldBuilder().getBuilder();
         }
    @@ -1932,11 +1984,11 @@ public org.tensorflow.proto.RunOptionsOrBuilder getRunOptionsOrBuilder() {
          *
          * .tensorflow.RunOptions run_options = 4;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.RunOptions, org.tensorflow.proto.RunOptions.Builder, org.tensorflow.proto.RunOptionsOrBuilder> 
             getRunOptionsFieldBuilder() {
           if (runOptionsBuilder_ == null) {
    -        runOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        runOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.RunOptions, org.tensorflow.proto.RunOptions.Builder, org.tensorflow.proto.RunOptionsOrBuilder>(
                     getRunOptions(),
                     getParentForChildren(),
    @@ -1949,13 +2001,13 @@ public org.tensorflow.proto.RunOptionsOrBuilder getRunOptionsOrBuilder() {
         private java.util.List tensorConnection_ =
           java.util.Collections.emptyList();
         private void ensureTensorConnectionIsMutable() {
    -      if (!((bitField0_ & 0x00000008) != 0)) {
    +      if (!((bitField0_ & 0x00000010) != 0)) {
             tensorConnection_ = new java.util.ArrayList(tensorConnection_);
    -        bitField0_ |= 0x00000008;
    +        bitField0_ |= 0x00000010;
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.TensorConnection, org.tensorflow.proto.TensorConnection.Builder, org.tensorflow.proto.TensorConnectionOrBuilder> tensorConnectionBuilder_;
     
         /**
    @@ -2167,7 +2219,7 @@ public Builder addAllTensorConnection(
         public Builder clearTensorConnection() {
           if (tensorConnectionBuilder_ == null) {
             tensorConnection_ = java.util.Collections.emptyList();
    -        bitField0_ = (bitField0_ & ~0x00000008);
    +        bitField0_ = (bitField0_ & ~0x00000010);
             onChanged();
           } else {
             tensorConnectionBuilder_.clear();
    @@ -2279,14 +2331,14 @@ public org.tensorflow.proto.TensorConnection.Builder addTensorConnectionBuilder(
              getTensorConnectionBuilderList() {
           return getTensorConnectionFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.TensorConnection, org.tensorflow.proto.TensorConnection.Builder, org.tensorflow.proto.TensorConnectionOrBuilder> 
             getTensorConnectionFieldBuilder() {
           if (tensorConnectionBuilder_ == null) {
    -        tensorConnectionBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        tensorConnectionBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.TensorConnection, org.tensorflow.proto.TensorConnection.Builder, org.tensorflow.proto.TensorConnectionOrBuilder>(
                     tensorConnection_,
    -                ((bitField0_ & 0x00000008) != 0),
    +                ((bitField0_ & 0x00000010) != 0),
                     getParentForChildren(),
                     isClean());
             tensorConnection_ = null;
    @@ -2297,7 +2349,7 @@ public org.tensorflow.proto.TensorConnection.Builder addTensorConnectionBuilder(
         private com.google.protobuf.MapField<
             java.lang.String, java.lang.String> feedDevices_;
         private com.google.protobuf.MapField
    -    internalGetFeedDevices() {
    +        internalGetFeedDevices() {
           if (feedDevices_ == null) {
             return com.google.protobuf.MapField.emptyMapField(
                 FeedDevicesDefaultEntryHolder.defaultEntry);
    @@ -2305,8 +2357,7 @@ public org.tensorflow.proto.TensorConnection.Builder addTensorConnectionBuilder(
           return feedDevices_;
         }
         private com.google.protobuf.MapField
    -    internalGetMutableFeedDevices() {
    -      onChanged();;
    +        internalGetMutableFeedDevices() {
           if (feedDevices_ == null) {
             feedDevices_ = com.google.protobuf.MapField.newMapField(
                 FeedDevicesDefaultEntryHolder.defaultEntry);
    @@ -2314,9 +2365,10 @@ public org.tensorflow.proto.TensorConnection.Builder addTensorConnectionBuilder(
           if (!feedDevices_.isMutable()) {
             feedDevices_ = feedDevices_.copy();
           }
    +      bitField0_ |= 0x00000020;
    +      onChanged();
           return feedDevices_;
         }
    -
         public int getFeedDevicesCount() {
           return internalGetFeedDevices().getMap().size();
         }
    @@ -2324,36 +2376,47 @@ public int getFeedDevicesCount() {
          * 
          * The Tensor objects fed in the callable and fetched from the callable
          * are expected to be backed by host (CPU) memory by default.
    +     *
          * The options below allow changing that - feeding tensors backed by
          * device memory, or returning tensors that are backed by device memory.
    +     *
          * The maps below map the name of a feed/fetch tensor (which appears in
          * 'feed' or 'fetch' fields above), to the fully qualified name of the device
          * owning the memory backing the contents of the tensor.
    +     *
          * For example, creating a callable with the following options:
    +     *
          * CallableOptions {
    -     *   feed: "a:0"
    -     *   feed: "b:0"
    -     *   fetch: "x:0"
    -     *   fetch: "y:0"
    -     *   feed_devices: {
    -     *     "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    -     *   }
    -     *   fetch_devices: {
    -     *     "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    -     *  }
    +     * feed: "a:0"
    +     * feed: "b:0"
    +     *
    +     * fetch: "x:0"
    +     * fetch: "y:0"
    +     *
    +     * feed_devices: {
    +     * "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    +     * }
    +     *
    +     * fetch_devices: {
    +     * "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
          * }
    +     * }
    +     *
          * means that the Callable expects:
          * - The first argument ("a:0") is a Tensor backed by GPU memory.
          * - The second argument ("b:0") is a Tensor backed by host memory.
          * and of its return values:
          * - The first output ("x:0") will be backed by host memory.
          * - The second output ("y:0") will be backed by GPU memory.
    +     *
          * FEEDS:
          * It is the responsibility of the caller to ensure that the memory of the fed
          * tensors will be correctly initialized and synchronized before it is
          * accessed by operations executed during the call to Session::RunCallable().
    +     *
          * This is typically ensured by using the TensorFlow memory allocators
          * (Device::GetAllocator()) to create the Tensor to be fed.
    +     *
          * Alternatively, for CUDA-enabled GPU devices, this typically means that the
          * operation that produced the contents of the tensor has completed, i.e., the
          * CUDA stream has been synchronized (e.g., via cuCtxSynchronize() or
    @@ -2362,7 +2425,6 @@ public int getFeedDevicesCount() {
          *
          * map<string, string> feed_devices = 6;
          */
    -
         @java.lang.Override
         public boolean containsFeedDevices(
             java.lang.String key) {
    @@ -2381,36 +2443,47 @@ public java.util.Map getFeedDevices() {
          * 
          * The Tensor objects fed in the callable and fetched from the callable
          * are expected to be backed by host (CPU) memory by default.
    +     *
          * The options below allow changing that - feeding tensors backed by
          * device memory, or returning tensors that are backed by device memory.
    +     *
          * The maps below map the name of a feed/fetch tensor (which appears in
          * 'feed' or 'fetch' fields above), to the fully qualified name of the device
          * owning the memory backing the contents of the tensor.
    +     *
          * For example, creating a callable with the following options:
    +     *
          * CallableOptions {
    -     *   feed: "a:0"
    -     *   feed: "b:0"
    -     *   fetch: "x:0"
    -     *   fetch: "y:0"
    -     *   feed_devices: {
    -     *     "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    -     *   }
    -     *   fetch_devices: {
    -     *     "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    -     *  }
    +     * feed: "a:0"
    +     * feed: "b:0"
    +     *
    +     * fetch: "x:0"
    +     * fetch: "y:0"
    +     *
    +     * feed_devices: {
    +     * "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    +     * }
    +     *
    +     * fetch_devices: {
    +     * "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    +     * }
          * }
    +     *
          * means that the Callable expects:
          * - The first argument ("a:0") is a Tensor backed by GPU memory.
          * - The second argument ("b:0") is a Tensor backed by host memory.
          * and of its return values:
          * - The first output ("x:0") will be backed by host memory.
          * - The second output ("y:0") will be backed by GPU memory.
    +     *
          * FEEDS:
          * It is the responsibility of the caller to ensure that the memory of the fed
          * tensors will be correctly initialized and synchronized before it is
          * accessed by operations executed during the call to Session::RunCallable().
    +     *
          * This is typically ensured by using the TensorFlow memory allocators
          * (Device::GetAllocator()) to create the Tensor to be fed.
    +     *
          * Alternatively, for CUDA-enabled GPU devices, this typically means that the
          * operation that produced the contents of the tensor has completed, i.e., the
          * CUDA stream has been synchronized (e.g., via cuCtxSynchronize() or
    @@ -2420,7 +2493,6 @@ public java.util.Map getFeedDevices() {
          * map<string, string> feed_devices = 6;
          */
         @java.lang.Override
    -
         public java.util.Map getFeedDevicesMap() {
           return internalGetFeedDevices().getMap();
         }
    @@ -2428,36 +2500,47 @@ public java.util.Map getFeedDevicesMap() {
          * 
          * The Tensor objects fed in the callable and fetched from the callable
          * are expected to be backed by host (CPU) memory by default.
    +     *
          * The options below allow changing that - feeding tensors backed by
          * device memory, or returning tensors that are backed by device memory.
    +     *
          * The maps below map the name of a feed/fetch tensor (which appears in
          * 'feed' or 'fetch' fields above), to the fully qualified name of the device
          * owning the memory backing the contents of the tensor.
    +     *
          * For example, creating a callable with the following options:
    +     *
          * CallableOptions {
    -     *   feed: "a:0"
    -     *   feed: "b:0"
    -     *   fetch: "x:0"
    -     *   fetch: "y:0"
    -     *   feed_devices: {
    -     *     "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    -     *   }
    -     *   fetch_devices: {
    -     *     "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    -     *  }
    +     * feed: "a:0"
    +     * feed: "b:0"
    +     *
    +     * fetch: "x:0"
    +     * fetch: "y:0"
    +     *
    +     * feed_devices: {
    +     * "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    +     * }
    +     *
    +     * fetch_devices: {
    +     * "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    +     * }
          * }
    +     *
          * means that the Callable expects:
          * - The first argument ("a:0") is a Tensor backed by GPU memory.
          * - The second argument ("b:0") is a Tensor backed by host memory.
          * and of its return values:
          * - The first output ("x:0") will be backed by host memory.
          * - The second output ("y:0") will be backed by GPU memory.
    +     *
          * FEEDS:
          * It is the responsibility of the caller to ensure that the memory of the fed
          * tensors will be correctly initialized and synchronized before it is
          * accessed by operations executed during the call to Session::RunCallable().
    +     *
          * This is typically ensured by using the TensorFlow memory allocators
          * (Device::GetAllocator()) to create the Tensor to be fed.
    +     *
          * Alternatively, for CUDA-enabled GPU devices, this typically means that the
          * operation that produced the contents of the tensor has completed, i.e., the
          * CUDA stream has been synchronized (e.g., via cuCtxSynchronize() or
    @@ -2467,10 +2550,11 @@ public java.util.Map getFeedDevicesMap() {
          * map<string, string> feed_devices = 6;
          */
         @java.lang.Override
    -
    -    public java.lang.String getFeedDevicesOrDefault(
    +    public /* nullable */
    +java.lang.String getFeedDevicesOrDefault(
             java.lang.String key,
    -        java.lang.String defaultValue) {
    +        /* nullable */
    +java.lang.String defaultValue) {
           if (key == null) { throw new NullPointerException("map key"); }
           java.util.Map map =
               internalGetFeedDevices().getMap();
    @@ -2480,36 +2564,47 @@ public java.lang.String getFeedDevicesOrDefault(
          * 
          * The Tensor objects fed in the callable and fetched from the callable
          * are expected to be backed by host (CPU) memory by default.
    +     *
          * The options below allow changing that - feeding tensors backed by
          * device memory, or returning tensors that are backed by device memory.
    +     *
          * The maps below map the name of a feed/fetch tensor (which appears in
          * 'feed' or 'fetch' fields above), to the fully qualified name of the device
          * owning the memory backing the contents of the tensor.
    +     *
          * For example, creating a callable with the following options:
    +     *
          * CallableOptions {
    -     *   feed: "a:0"
    -     *   feed: "b:0"
    -     *   fetch: "x:0"
    -     *   fetch: "y:0"
    -     *   feed_devices: {
    -     *     "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    -     *   }
    -     *   fetch_devices: {
    -     *     "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    -     *  }
    +     * feed: "a:0"
    +     * feed: "b:0"
    +     *
    +     * fetch: "x:0"
    +     * fetch: "y:0"
    +     *
    +     * feed_devices: {
    +     * "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    +     * }
    +     *
    +     * fetch_devices: {
    +     * "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
          * }
    +     * }
    +     *
          * means that the Callable expects:
          * - The first argument ("a:0") is a Tensor backed by GPU memory.
          * - The second argument ("b:0") is a Tensor backed by host memory.
          * and of its return values:
          * - The first output ("x:0") will be backed by host memory.
          * - The second output ("y:0") will be backed by GPU memory.
    +     *
          * FEEDS:
          * It is the responsibility of the caller to ensure that the memory of the fed
          * tensors will be correctly initialized and synchronized before it is
          * accessed by operations executed during the call to Session::RunCallable().
    +     *
          * This is typically ensured by using the TensorFlow memory allocators
          * (Device::GetAllocator()) to create the Tensor to be fed.
    +     *
          * Alternatively, for CUDA-enabled GPU devices, this typically means that the
          * operation that produced the contents of the tensor has completed, i.e., the
          * CUDA stream has been synchronized (e.g., via cuCtxSynchronize() or
    @@ -2519,7 +2614,6 @@ public java.lang.String getFeedDevicesOrDefault(
          * map<string, string> feed_devices = 6;
          */
         @java.lang.Override
    -
         public java.lang.String getFeedDevicesOrThrow(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    @@ -2530,8 +2624,8 @@ public java.lang.String getFeedDevicesOrThrow(
           }
           return map.get(key);
         }
    -
         public Builder clearFeedDevices() {
    +      bitField0_ = (bitField0_ & ~0x00000020);
           internalGetMutableFeedDevices().getMutableMap()
               .clear();
           return this;
    @@ -2540,36 +2634,47 @@ public Builder clearFeedDevices() {
          * 
          * The Tensor objects fed in the callable and fetched from the callable
          * are expected to be backed by host (CPU) memory by default.
    +     *
          * The options below allow changing that - feeding tensors backed by
          * device memory, or returning tensors that are backed by device memory.
    +     *
          * The maps below map the name of a feed/fetch tensor (which appears in
          * 'feed' or 'fetch' fields above), to the fully qualified name of the device
          * owning the memory backing the contents of the tensor.
    +     *
          * For example, creating a callable with the following options:
    +     *
          * CallableOptions {
    -     *   feed: "a:0"
    -     *   feed: "b:0"
    -     *   fetch: "x:0"
    -     *   fetch: "y:0"
    -     *   feed_devices: {
    -     *     "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    -     *   }
    -     *   fetch_devices: {
    -     *     "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    -     *  }
    +     * feed: "a:0"
    +     * feed: "b:0"
    +     *
    +     * fetch: "x:0"
    +     * fetch: "y:0"
    +     *
    +     * feed_devices: {
    +     * "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
          * }
    +     *
    +     * fetch_devices: {
    +     * "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    +     * }
    +     * }
    +     *
          * means that the Callable expects:
          * - The first argument ("a:0") is a Tensor backed by GPU memory.
          * - The second argument ("b:0") is a Tensor backed by host memory.
          * and of its return values:
          * - The first output ("x:0") will be backed by host memory.
          * - The second output ("y:0") will be backed by GPU memory.
    +     *
          * FEEDS:
          * It is the responsibility of the caller to ensure that the memory of the fed
          * tensors will be correctly initialized and synchronized before it is
          * accessed by operations executed during the call to Session::RunCallable().
    +     *
          * This is typically ensured by using the TensorFlow memory allocators
          * (Device::GetAllocator()) to create the Tensor to be fed.
    +     *
          * Alternatively, for CUDA-enabled GPU devices, this typically means that the
          * operation that produced the contents of the tensor has completed, i.e., the
          * CUDA stream has been synchronized (e.g., via cuCtxSynchronize() or
    @@ -2578,7 +2683,6 @@ public Builder clearFeedDevices() {
          *
          * map<string, string> feed_devices = 6;
          */
    -
         public Builder removeFeedDevices(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    @@ -2591,43 +2695,55 @@ public Builder removeFeedDevices(
          */
         @java.lang.Deprecated
         public java.util.Map
    -    getMutableFeedDevices() {
    +        getMutableFeedDevices() {
    +      bitField0_ |= 0x00000020;
           return internalGetMutableFeedDevices().getMutableMap();
         }
         /**
          * 
          * The Tensor objects fed in the callable and fetched from the callable
          * are expected to be backed by host (CPU) memory by default.
    +     *
          * The options below allow changing that - feeding tensors backed by
          * device memory, or returning tensors that are backed by device memory.
    +     *
          * The maps below map the name of a feed/fetch tensor (which appears in
          * 'feed' or 'fetch' fields above), to the fully qualified name of the device
          * owning the memory backing the contents of the tensor.
    +     *
          * For example, creating a callable with the following options:
    +     *
          * CallableOptions {
    -     *   feed: "a:0"
    -     *   feed: "b:0"
    -     *   fetch: "x:0"
    -     *   fetch: "y:0"
    -     *   feed_devices: {
    -     *     "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    -     *   }
    -     *   fetch_devices: {
    -     *     "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    -     *  }
    +     * feed: "a:0"
    +     * feed: "b:0"
    +     *
    +     * fetch: "x:0"
    +     * fetch: "y:0"
    +     *
    +     * feed_devices: {
    +     * "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
          * }
    +     *
    +     * fetch_devices: {
    +     * "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    +     * }
    +     * }
    +     *
          * means that the Callable expects:
          * - The first argument ("a:0") is a Tensor backed by GPU memory.
          * - The second argument ("b:0") is a Tensor backed by host memory.
          * and of its return values:
          * - The first output ("x:0") will be backed by host memory.
          * - The second output ("y:0") will be backed by GPU memory.
    +     *
          * FEEDS:
          * It is the responsibility of the caller to ensure that the memory of the fed
          * tensors will be correctly initialized and synchronized before it is
          * accessed by operations executed during the call to Session::RunCallable().
    +     *
          * This is typically ensured by using the TensorFlow memory allocators
          * (Device::GetAllocator()) to create the Tensor to be fed.
    +     *
          * Alternatively, for CUDA-enabled GPU devices, this typically means that the
          * operation that produced the contents of the tensor has completed, i.e., the
          * CUDA stream has been synchronized (e.g., via cuCtxSynchronize() or
    @@ -2640,48 +2756,57 @@ public Builder putFeedDevices(
             java.lang.String key,
             java.lang.String value) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      if (value == null) {
    -  throw new NullPointerException("map value");
    -}
    -
    +      if (value == null) { throw new NullPointerException("map value"); }
           internalGetMutableFeedDevices().getMutableMap()
               .put(key, value);
    +      bitField0_ |= 0x00000020;
           return this;
         }
         /**
          * 
          * The Tensor objects fed in the callable and fetched from the callable
          * are expected to be backed by host (CPU) memory by default.
    +     *
          * The options below allow changing that - feeding tensors backed by
          * device memory, or returning tensors that are backed by device memory.
    +     *
          * The maps below map the name of a feed/fetch tensor (which appears in
          * 'feed' or 'fetch' fields above), to the fully qualified name of the device
          * owning the memory backing the contents of the tensor.
    +     *
          * For example, creating a callable with the following options:
    +     *
          * CallableOptions {
    -     *   feed: "a:0"
    -     *   feed: "b:0"
    -     *   fetch: "x:0"
    -     *   fetch: "y:0"
    -     *   feed_devices: {
    -     *     "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    -     *   }
    -     *   fetch_devices: {
    -     *     "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    -     *  }
    +     * feed: "a:0"
    +     * feed: "b:0"
    +     *
    +     * fetch: "x:0"
    +     * fetch: "y:0"
    +     *
    +     * feed_devices: {
    +     * "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    +     * }
    +     *
    +     * fetch_devices: {
    +     * "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    +     * }
          * }
    +     *
          * means that the Callable expects:
          * - The first argument ("a:0") is a Tensor backed by GPU memory.
          * - The second argument ("b:0") is a Tensor backed by host memory.
          * and of its return values:
          * - The first output ("x:0") will be backed by host memory.
          * - The second output ("y:0") will be backed by GPU memory.
    +     *
          * FEEDS:
          * It is the responsibility of the caller to ensure that the memory of the fed
          * tensors will be correctly initialized and synchronized before it is
          * accessed by operations executed during the call to Session::RunCallable().
    +     *
          * This is typically ensured by using the TensorFlow memory allocators
          * (Device::GetAllocator()) to create the Tensor to be fed.
    +     *
          * Alternatively, for CUDA-enabled GPU devices, this typically means that the
          * operation that produced the contents of the tensor has completed, i.e., the
          * CUDA stream has been synchronized (e.g., via cuCtxSynchronize() or
    @@ -2690,18 +2815,18 @@ public Builder putFeedDevices(
          *
          * map<string, string> feed_devices = 6;
          */
    -
         public Builder putAllFeedDevices(
             java.util.Map values) {
           internalGetMutableFeedDevices().getMutableMap()
               .putAll(values);
    +      bitField0_ |= 0x00000020;
           return this;
         }
     
         private com.google.protobuf.MapField<
             java.lang.String, java.lang.String> fetchDevices_;
         private com.google.protobuf.MapField
    -    internalGetFetchDevices() {
    +        internalGetFetchDevices() {
           if (fetchDevices_ == null) {
             return com.google.protobuf.MapField.emptyMapField(
                 FetchDevicesDefaultEntryHolder.defaultEntry);
    @@ -2709,8 +2834,7 @@ public Builder putAllFeedDevices(
           return fetchDevices_;
         }
         private com.google.protobuf.MapField
    -    internalGetMutableFetchDevices() {
    -      onChanged();;
    +        internalGetMutableFetchDevices() {
           if (fetchDevices_ == null) {
             fetchDevices_ = com.google.protobuf.MapField.newMapField(
                 FetchDevicesDefaultEntryHolder.defaultEntry);
    @@ -2718,16 +2842,16 @@ public Builder putAllFeedDevices(
           if (!fetchDevices_.isMutable()) {
             fetchDevices_ = fetchDevices_.copy();
           }
    +      bitField0_ |= 0x00000040;
    +      onChanged();
           return fetchDevices_;
         }
    -
         public int getFetchDevicesCount() {
           return internalGetFetchDevices().getMap().size();
         }
         /**
          * map<string, string> fetch_devices = 7;
          */
    -
         @java.lang.Override
         public boolean containsFetchDevices(
             java.lang.String key) {
    @@ -2746,7 +2870,6 @@ public java.util.Map getFetchDevices() {
          * map<string, string> fetch_devices = 7;
          */
         @java.lang.Override
    -
         public java.util.Map getFetchDevicesMap() {
           return internalGetFetchDevices().getMap();
         }
    @@ -2754,10 +2877,11 @@ public java.util.Map getFetchDevicesMap() {
          * map<string, string> fetch_devices = 7;
          */
         @java.lang.Override
    -
    -    public java.lang.String getFetchDevicesOrDefault(
    +    public /* nullable */
    +java.lang.String getFetchDevicesOrDefault(
             java.lang.String key,
    -        java.lang.String defaultValue) {
    +        /* nullable */
    +java.lang.String defaultValue) {
           if (key == null) { throw new NullPointerException("map key"); }
           java.util.Map map =
               internalGetFetchDevices().getMap();
    @@ -2767,7 +2891,6 @@ public java.lang.String getFetchDevicesOrDefault(
          * map<string, string> fetch_devices = 7;
          */
         @java.lang.Override
    -
         public java.lang.String getFetchDevicesOrThrow(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    @@ -2778,8 +2901,8 @@ public java.lang.String getFetchDevicesOrThrow(
           }
           return map.get(key);
         }
    -
         public Builder clearFetchDevices() {
    +      bitField0_ = (bitField0_ & ~0x00000040);
           internalGetMutableFetchDevices().getMutableMap()
               .clear();
           return this;
    @@ -2787,7 +2910,6 @@ public Builder clearFetchDevices() {
         /**
          * map<string, string> fetch_devices = 7;
          */
    -
         public Builder removeFetchDevices(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    @@ -2800,7 +2922,8 @@ public Builder removeFetchDevices(
          */
         @java.lang.Deprecated
         public java.util.Map
    -    getMutableFetchDevices() {
    +        getMutableFetchDevices() {
    +      bitField0_ |= 0x00000040;
           return internalGetMutableFetchDevices().getMutableMap();
         }
         /**
    @@ -2810,22 +2933,20 @@ public Builder putFetchDevices(
             java.lang.String key,
             java.lang.String value) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      if (value == null) {
    -  throw new NullPointerException("map value");
    -}
    -
    +      if (value == null) { throw new NullPointerException("map value"); }
           internalGetMutableFetchDevices().getMutableMap()
               .put(key, value);
    +      bitField0_ |= 0x00000040;
           return this;
         }
         /**
          * map<string, string> fetch_devices = 7;
          */
    -
         public Builder putAllFetchDevices(
             java.util.Map values) {
           internalGetMutableFetchDevices().getMutableMap()
               .putAll(values);
    +      bitField0_ |= 0x00000040;
           return this;
         }
     
    @@ -2836,6 +2957,7 @@ public Builder putAllFetchDevices(
          * fetched tensors on a GPU device, to ensure that the values in those tensors
          * have been produced. This simplifies interacting with the tensors, but
          * potentially incurs a performance hit.
    +     *
          * If this options is set to true, the caller is responsible for ensuring
          * that the values in the fetched tensors have been produced before they are
          * used. The caller can do this by invoking `Device::Sync()` on the underlying
    @@ -2856,6 +2978,7 @@ public boolean getFetchSkipSync() {
          * fetched tensors on a GPU device, to ensure that the values in those tensors
          * have been produced. This simplifies interacting with the tensors, but
          * potentially incurs a performance hit.
    +     *
          * If this options is set to true, the caller is responsible for ensuring
          * that the values in the fetched tensors have been produced before they are
          * used. The caller can do this by invoking `Device::Sync()` on the underlying
    @@ -2868,8 +2991,9 @@ public boolean getFetchSkipSync() {
          * @return This builder for chaining.
          */
         public Builder setFetchSkipSync(boolean value) {
    -      
    +
           fetchSkipSync_ = value;
    +      bitField0_ |= 0x00000080;
           onChanged();
           return this;
         }
    @@ -2879,6 +3003,7 @@ public Builder setFetchSkipSync(boolean value) {
          * fetched tensors on a GPU device, to ensure that the values in those tensors
          * have been produced. This simplifies interacting with the tensors, but
          * potentially incurs a performance hit.
    +     *
          * If this options is set to true, the caller is responsible for ensuring
          * that the values in the fetched tensors have been produced before they are
          * used. The caller can do this by invoking `Device::Sync()` on the underlying
    @@ -2890,23 +3015,11 @@ public Builder setFetchSkipSync(boolean value) {
          * @return This builder for chaining.
          */
         public Builder clearFetchSkipSync() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000080);
           fetchSkipSync_ = false;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.CallableOptions)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CallableOptionsOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CallableOptionsOrBuilder.java
    index ac1a0b53857..422a47d8e89 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CallableOptionsOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CallableOptionsOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/config.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -227,36 +229,47 @@ org.tensorflow.proto.TensorConnectionOrBuilder getTensorConnectionOrBuilder(
        * 
        * The Tensor objects fed in the callable and fetched from the callable
        * are expected to be backed by host (CPU) memory by default.
    +   *
        * The options below allow changing that - feeding tensors backed by
        * device memory, or returning tensors that are backed by device memory.
    +   *
        * The maps below map the name of a feed/fetch tensor (which appears in
        * 'feed' or 'fetch' fields above), to the fully qualified name of the device
        * owning the memory backing the contents of the tensor.
    +   *
        * For example, creating a callable with the following options:
    +   *
        * CallableOptions {
    -   *   feed: "a:0"
    -   *   feed: "b:0"
    -   *   fetch: "x:0"
    -   *   fetch: "y:0"
    -   *   feed_devices: {
    -   *     "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    -   *   }
    -   *   fetch_devices: {
    -   *     "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    -   *  }
    +   * feed: "a:0"
    +   * feed: "b:0"
    +   *
    +   * fetch: "x:0"
    +   * fetch: "y:0"
    +   *
    +   * feed_devices: {
    +   * "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    +   * }
    +   *
    +   * fetch_devices: {
    +   * "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    +   * }
        * }
    +   *
        * means that the Callable expects:
        * - The first argument ("a:0") is a Tensor backed by GPU memory.
        * - The second argument ("b:0") is a Tensor backed by host memory.
        * and of its return values:
        * - The first output ("x:0") will be backed by host memory.
        * - The second output ("y:0") will be backed by GPU memory.
    +   *
        * FEEDS:
        * It is the responsibility of the caller to ensure that the memory of the fed
        * tensors will be correctly initialized and synchronized before it is
        * accessed by operations executed during the call to Session::RunCallable().
    +   *
        * This is typically ensured by using the TensorFlow memory allocators
        * (Device::GetAllocator()) to create the Tensor to be fed.
    +   *
        * Alternatively, for CUDA-enabled GPU devices, this typically means that the
        * operation that produced the contents of the tensor has completed, i.e., the
        * CUDA stream has been synchronized (e.g., via cuCtxSynchronize() or
    @@ -270,36 +283,47 @@ org.tensorflow.proto.TensorConnectionOrBuilder getTensorConnectionOrBuilder(
        * 
        * The Tensor objects fed in the callable and fetched from the callable
        * are expected to be backed by host (CPU) memory by default.
    +   *
        * The options below allow changing that - feeding tensors backed by
        * device memory, or returning tensors that are backed by device memory.
    +   *
        * The maps below map the name of a feed/fetch tensor (which appears in
        * 'feed' or 'fetch' fields above), to the fully qualified name of the device
        * owning the memory backing the contents of the tensor.
    +   *
        * For example, creating a callable with the following options:
    +   *
        * CallableOptions {
    -   *   feed: "a:0"
    -   *   feed: "b:0"
    -   *   fetch: "x:0"
    -   *   fetch: "y:0"
    -   *   feed_devices: {
    -   *     "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    -   *   }
    -   *   fetch_devices: {
    -   *     "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    -   *  }
    +   * feed: "a:0"
    +   * feed: "b:0"
    +   *
    +   * fetch: "x:0"
    +   * fetch: "y:0"
    +   *
    +   * feed_devices: {
    +   * "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    +   * }
    +   *
    +   * fetch_devices: {
    +   * "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
        * }
    +   * }
    +   *
        * means that the Callable expects:
        * - The first argument ("a:0") is a Tensor backed by GPU memory.
        * - The second argument ("b:0") is a Tensor backed by host memory.
        * and of its return values:
        * - The first output ("x:0") will be backed by host memory.
        * - The second output ("y:0") will be backed by GPU memory.
    +   *
        * FEEDS:
        * It is the responsibility of the caller to ensure that the memory of the fed
        * tensors will be correctly initialized and synchronized before it is
        * accessed by operations executed during the call to Session::RunCallable().
    +   *
        * This is typically ensured by using the TensorFlow memory allocators
        * (Device::GetAllocator()) to create the Tensor to be fed.
    +   *
        * Alternatively, for CUDA-enabled GPU devices, this typically means that the
        * operation that produced the contents of the tensor has completed, i.e., the
        * CUDA stream has been synchronized (e.g., via cuCtxSynchronize() or
    @@ -320,36 +344,47 @@ boolean containsFeedDevices(
        * 
        * The Tensor objects fed in the callable and fetched from the callable
        * are expected to be backed by host (CPU) memory by default.
    +   *
        * The options below allow changing that - feeding tensors backed by
        * device memory, or returning tensors that are backed by device memory.
    +   *
        * The maps below map the name of a feed/fetch tensor (which appears in
        * 'feed' or 'fetch' fields above), to the fully qualified name of the device
        * owning the memory backing the contents of the tensor.
    +   *
        * For example, creating a callable with the following options:
    +   *
        * CallableOptions {
    -   *   feed: "a:0"
    -   *   feed: "b:0"
    -   *   fetch: "x:0"
    -   *   fetch: "y:0"
    -   *   feed_devices: {
    -   *     "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    -   *   }
    -   *   fetch_devices: {
    -   *     "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    -   *  }
    +   * feed: "a:0"
    +   * feed: "b:0"
    +   *
    +   * fetch: "x:0"
    +   * fetch: "y:0"
    +   *
    +   * feed_devices: {
    +   * "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    +   * }
    +   *
    +   * fetch_devices: {
    +   * "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    +   * }
        * }
    +   *
        * means that the Callable expects:
        * - The first argument ("a:0") is a Tensor backed by GPU memory.
        * - The second argument ("b:0") is a Tensor backed by host memory.
        * and of its return values:
        * - The first output ("x:0") will be backed by host memory.
        * - The second output ("y:0") will be backed by GPU memory.
    +   *
        * FEEDS:
        * It is the responsibility of the caller to ensure that the memory of the fed
        * tensors will be correctly initialized and synchronized before it is
        * accessed by operations executed during the call to Session::RunCallable().
    +   *
        * This is typically ensured by using the TensorFlow memory allocators
        * (Device::GetAllocator()) to create the Tensor to be fed.
    +   *
        * Alternatively, for CUDA-enabled GPU devices, this typically means that the
        * operation that produced the contents of the tensor has completed, i.e., the
        * CUDA stream has been synchronized (e.g., via cuCtxSynchronize() or
    @@ -364,36 +399,47 @@ boolean containsFeedDevices(
        * 
        * The Tensor objects fed in the callable and fetched from the callable
        * are expected to be backed by host (CPU) memory by default.
    +   *
        * The options below allow changing that - feeding tensors backed by
        * device memory, or returning tensors that are backed by device memory.
    +   *
        * The maps below map the name of a feed/fetch tensor (which appears in
        * 'feed' or 'fetch' fields above), to the fully qualified name of the device
        * owning the memory backing the contents of the tensor.
    +   *
        * For example, creating a callable with the following options:
    +   *
        * CallableOptions {
    -   *   feed: "a:0"
    -   *   feed: "b:0"
    -   *   fetch: "x:0"
    -   *   fetch: "y:0"
    -   *   feed_devices: {
    -   *     "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    -   *   }
    -   *   fetch_devices: {
    -   *     "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    -   *  }
    +   * feed: "a:0"
    +   * feed: "b:0"
    +   *
    +   * fetch: "x:0"
    +   * fetch: "y:0"
    +   *
    +   * feed_devices: {
    +   * "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    +   * }
    +   *
    +   * fetch_devices: {
    +   * "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
        * }
    +   * }
    +   *
        * means that the Callable expects:
        * - The first argument ("a:0") is a Tensor backed by GPU memory.
        * - The second argument ("b:0") is a Tensor backed by host memory.
        * and of its return values:
        * - The first output ("x:0") will be backed by host memory.
        * - The second output ("y:0") will be backed by GPU memory.
    +   *
        * FEEDS:
        * It is the responsibility of the caller to ensure that the memory of the fed
        * tensors will be correctly initialized and synchronized before it is
        * accessed by operations executed during the call to Session::RunCallable().
    +   *
        * This is typically ensured by using the TensorFlow memory allocators
        * (Device::GetAllocator()) to create the Tensor to be fed.
    +   *
        * Alternatively, for CUDA-enabled GPU devices, this typically means that the
        * operation that produced the contents of the tensor has completed, i.e., the
        * CUDA stream has been synchronized (e.g., via cuCtxSynchronize() or
    @@ -402,7 +448,6 @@ boolean containsFeedDevices(
        *
        * map<string, string> feed_devices = 6;
        */
    -
       /* nullable */
     java.lang.String getFeedDevicesOrDefault(
           java.lang.String key,
    @@ -412,36 +457,47 @@ java.lang.String getFeedDevicesOrDefault(
        * 
        * The Tensor objects fed in the callable and fetched from the callable
        * are expected to be backed by host (CPU) memory by default.
    +   *
        * The options below allow changing that - feeding tensors backed by
        * device memory, or returning tensors that are backed by device memory.
    +   *
        * The maps below map the name of a feed/fetch tensor (which appears in
        * 'feed' or 'fetch' fields above), to the fully qualified name of the device
        * owning the memory backing the contents of the tensor.
    +   *
        * For example, creating a callable with the following options:
    +   *
        * CallableOptions {
    -   *   feed: "a:0"
    -   *   feed: "b:0"
    -   *   fetch: "x:0"
    -   *   fetch: "y:0"
    -   *   feed_devices: {
    -   *     "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    -   *   }
    -   *   fetch_devices: {
    -   *     "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    -   *  }
    +   * feed: "a:0"
    +   * feed: "b:0"
    +   *
    +   * fetch: "x:0"
    +   * fetch: "y:0"
    +   *
    +   * feed_devices: {
    +   * "a:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    +   * }
    +   *
    +   * fetch_devices: {
    +   * "y:0": "/job:localhost/replica:0/task:0/device:GPU:0"
    +   * }
        * }
    +   *
        * means that the Callable expects:
        * - The first argument ("a:0") is a Tensor backed by GPU memory.
        * - The second argument ("b:0") is a Tensor backed by host memory.
        * and of its return values:
        * - The first output ("x:0") will be backed by host memory.
        * - The second output ("y:0") will be backed by GPU memory.
    +   *
        * FEEDS:
        * It is the responsibility of the caller to ensure that the memory of the fed
        * tensors will be correctly initialized and synchronized before it is
        * accessed by operations executed during the call to Session::RunCallable().
    +   *
        * This is typically ensured by using the TensorFlow memory allocators
        * (Device::GetAllocator()) to create the Tensor to be fed.
    +   *
        * Alternatively, for CUDA-enabled GPU devices, this typically means that the
        * operation that produced the contents of the tensor has completed, i.e., the
        * CUDA stream has been synchronized (e.g., via cuCtxSynchronize() or
    @@ -450,7 +506,6 @@ java.lang.String getFeedDevicesOrDefault(
        *
        * map<string, string> feed_devices = 6;
        */
    -
       java.lang.String getFeedDevicesOrThrow(
           java.lang.String key);
     
    @@ -477,7 +532,6 @@ boolean containsFetchDevices(
       /**
        * map<string, string> fetch_devices = 7;
        */
    -
       /* nullable */
     java.lang.String getFetchDevicesOrDefault(
           java.lang.String key,
    @@ -486,7 +540,6 @@ java.lang.String getFetchDevicesOrDefault(
       /**
        * map<string, string> fetch_devices = 7;
        */
    -
       java.lang.String getFetchDevicesOrThrow(
           java.lang.String key);
     
    @@ -496,6 +549,7 @@ java.lang.String getFetchDevicesOrThrow(
        * fetched tensors on a GPU device, to ensure that the values in those tensors
        * have been produced. This simplifies interacting with the tensors, but
        * potentially incurs a performance hit.
    +   *
        * If this options is set to true, the caller is responsible for ensuring
        * that the values in the fetched tensors have been produced before they are
        * used. The caller can do this by invoking `Device::Sync()` on the underlying
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterDef.java
    index 054c2fc4b0b..e0593e89941 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterDef.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterDef.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/cluster.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,37 +13,34 @@
      * Protobuf type {@code tensorflow.ClusterDef}
      */
     public final class ClusterDef extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.ClusterDef)
         ClusterDefOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      ClusterDef.class.getName());
    +  }
       // Use ClusterDef.newBuilder() to construct.
    -  private ClusterDef(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private ClusterDef(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private ClusterDef() {
         job_ = java.util.Collections.emptyList();
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new ClusterDef();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.ClusterProtos.internal_static_tensorflow_ClusterDef_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.ClusterProtos.internal_static_tensorflow_ClusterDef_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -49,6 +48,7 @@ protected java.lang.Object newInstance(
       }
     
       public static final int JOB_FIELD_NUMBER = 1;
    +  @SuppressWarnings("serial")
       private java.util.List job_;
       /**
        * 
    @@ -209,39 +209,41 @@ public static org.tensorflow.proto.ClusterDef parseFrom(
       }
       public static org.tensorflow.proto.ClusterDef parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.ClusterDef parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.ClusterDef parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.ClusterDef parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.ClusterDef parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.ClusterDef parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -261,7 +263,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -273,7 +275,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.ClusterDef}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.ClusterDef)
           org.tensorflow.proto.ClusterDefOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -282,7 +284,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.ClusterProtos.internal_static_tensorflow_ClusterDef_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -295,13 +297,14 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           if (jobBuilder_ == null) {
             job_ = java.util.Collections.emptyList();
           } else {
    @@ -335,7 +338,13 @@ public org.tensorflow.proto.ClusterDef build() {
         @java.lang.Override
         public org.tensorflow.proto.ClusterDef buildPartial() {
           org.tensorflow.proto.ClusterDef result = new org.tensorflow.proto.ClusterDef(this);
    -      int from_bitField0_ = bitField0_;
    +      buildPartialRepeatedFields(result);
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartialRepeatedFields(org.tensorflow.proto.ClusterDef result) {
           if (jobBuilder_ == null) {
             if (((bitField0_ & 0x00000001) != 0)) {
               job_ = java.util.Collections.unmodifiableList(job_);
    @@ -345,42 +354,12 @@ public org.tensorflow.proto.ClusterDef buildPartial() {
           } else {
             result.job_ = jobBuilder_.build();
           }
    -      onBuilt();
    -      return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.ClusterDef result) {
    +      int from_bitField0_ = bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.ClusterDef) {
    @@ -412,7 +391,7 @@ public Builder mergeFrom(org.tensorflow.proto.ClusterDef other) {
                 job_ = other.job_;
                 bitField0_ = (bitField0_ & ~0x00000001);
                 jobBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getJobFieldBuilder() : null;
               } else {
                 jobBuilder_.addAllMessages(other.job_);
    @@ -484,7 +463,7 @@ private void ensureJobIsMutable() {
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.JobDef, org.tensorflow.proto.JobDef.Builder, org.tensorflow.proto.JobDefOrBuilder> jobBuilder_;
     
         /**
    @@ -772,11 +751,11 @@ public org.tensorflow.proto.JobDef.Builder addJobBuilder(
              getJobBuilderList() {
           return getJobFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.JobDef, org.tensorflow.proto.JobDef.Builder, org.tensorflow.proto.JobDefOrBuilder> 
             getJobFieldBuilder() {
           if (jobBuilder_ == null) {
    -        jobBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        jobBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.JobDef, org.tensorflow.proto.JobDef.Builder, org.tensorflow.proto.JobDefOrBuilder>(
                     job_,
                     ((bitField0_ & 0x00000001) != 0),
    @@ -786,18 +765,6 @@ public org.tensorflow.proto.JobDef.Builder addJobBuilder(
           }
           return jobBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.ClusterDef)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterDefOrBuilder.java
    index 4e6a591a34c..ffec98bc2ca 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterDefOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterDefOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/cluster.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterDeviceFilters.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterDeviceFilters.java
    index 3453537c484..250aec1e1ad 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterDeviceFilters.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterDeviceFilters.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/device_filters.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,37 +13,34 @@
      * Protobuf type {@code tensorflow.ClusterDeviceFilters}
      */
     public final class ClusterDeviceFilters extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.ClusterDeviceFilters)
         ClusterDeviceFiltersOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      ClusterDeviceFilters.class.getName());
    +  }
       // Use ClusterDeviceFilters.newBuilder() to construct.
    -  private ClusterDeviceFilters(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private ClusterDeviceFilters(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private ClusterDeviceFilters() {
         jobs_ = java.util.Collections.emptyList();
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new ClusterDeviceFilters();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.DeviceFiltersProtos.internal_static_tensorflow_ClusterDeviceFilters_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.DeviceFiltersProtos.internal_static_tensorflow_ClusterDeviceFilters_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -49,6 +48,7 @@ protected java.lang.Object newInstance(
       }
     
       public static final int JOBS_FIELD_NUMBER = 1;
    +  @SuppressWarnings("serial")
       private java.util.List jobs_;
       /**
        * repeated .tensorflow.JobDeviceFilters jobs = 1;
    @@ -189,39 +189,41 @@ public static org.tensorflow.proto.ClusterDeviceFilters parseFrom(
       }
       public static org.tensorflow.proto.ClusterDeviceFilters parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.ClusterDeviceFilters parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.ClusterDeviceFilters parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.ClusterDeviceFilters parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.ClusterDeviceFilters parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.ClusterDeviceFilters parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -241,7 +243,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -253,7 +255,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.ClusterDeviceFilters}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.ClusterDeviceFilters)
           org.tensorflow.proto.ClusterDeviceFiltersOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -262,7 +264,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.DeviceFiltersProtos.internal_static_tensorflow_ClusterDeviceFilters_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -275,13 +277,14 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           if (jobsBuilder_ == null) {
             jobs_ = java.util.Collections.emptyList();
           } else {
    @@ -315,7 +318,13 @@ public org.tensorflow.proto.ClusterDeviceFilters build() {
         @java.lang.Override
         public org.tensorflow.proto.ClusterDeviceFilters buildPartial() {
           org.tensorflow.proto.ClusterDeviceFilters result = new org.tensorflow.proto.ClusterDeviceFilters(this);
    -      int from_bitField0_ = bitField0_;
    +      buildPartialRepeatedFields(result);
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartialRepeatedFields(org.tensorflow.proto.ClusterDeviceFilters result) {
           if (jobsBuilder_ == null) {
             if (((bitField0_ & 0x00000001) != 0)) {
               jobs_ = java.util.Collections.unmodifiableList(jobs_);
    @@ -325,42 +334,12 @@ public org.tensorflow.proto.ClusterDeviceFilters buildPartial() {
           } else {
             result.jobs_ = jobsBuilder_.build();
           }
    -      onBuilt();
    -      return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.ClusterDeviceFilters result) {
    +      int from_bitField0_ = bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.ClusterDeviceFilters) {
    @@ -392,7 +371,7 @@ public Builder mergeFrom(org.tensorflow.proto.ClusterDeviceFilters other) {
                 jobs_ = other.jobs_;
                 bitField0_ = (bitField0_ & ~0x00000001);
                 jobsBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getJobsFieldBuilder() : null;
               } else {
                 jobsBuilder_.addAllMessages(other.jobs_);
    @@ -464,7 +443,7 @@ private void ensureJobsIsMutable() {
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.JobDeviceFilters, org.tensorflow.proto.JobDeviceFilters.Builder, org.tensorflow.proto.JobDeviceFiltersOrBuilder> jobsBuilder_;
     
         /**
    @@ -680,11 +659,11 @@ public org.tensorflow.proto.JobDeviceFilters.Builder addJobsBuilder(
              getJobsBuilderList() {
           return getJobsFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.JobDeviceFilters, org.tensorflow.proto.JobDeviceFilters.Builder, org.tensorflow.proto.JobDeviceFiltersOrBuilder> 
             getJobsFieldBuilder() {
           if (jobsBuilder_ == null) {
    -        jobsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        jobsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.JobDeviceFilters, org.tensorflow.proto.JobDeviceFilters.Builder, org.tensorflow.proto.JobDeviceFiltersOrBuilder>(
                     jobs_,
                     ((bitField0_ & 0x00000001) != 0),
    @@ -694,18 +673,6 @@ public org.tensorflow.proto.JobDeviceFilters.Builder addJobsBuilder(
           }
           return jobsBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.ClusterDeviceFilters)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterDeviceFiltersOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterDeviceFiltersOrBuilder.java
    index b05c17dceb4..56c5436ebcd 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterDeviceFiltersOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterDeviceFiltersOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/device_filters.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterProtos.java
    index 1b46df68749..5f55a24f00b 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterProtos.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterProtos.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/cluster.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class ClusterProtos {
       private ClusterProtos() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      ClusterProtos.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,17 +28,17 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_JobDef_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_JobDef_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_JobDef_TasksEntry_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_JobDef_TasksEntry_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_ClusterDef_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_ClusterDef_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -55,21 +66,22 @@ public static void registerAllExtensions(
         internal_static_tensorflow_JobDef_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_JobDef_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_JobDef_descriptor,
             new java.lang.String[] { "Name", "Tasks", });
         internal_static_tensorflow_JobDef_TasksEntry_descriptor =
           internal_static_tensorflow_JobDef_descriptor.getNestedTypes().get(0);
         internal_static_tensorflow_JobDef_TasksEntry_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_JobDef_TasksEntry_descriptor,
             new java.lang.String[] { "Key", "Value", });
         internal_static_tensorflow_ClusterDef_descriptor =
           getDescriptor().getMessageTypes().get(1);
         internal_static_tensorflow_ClusterDef_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_ClusterDef_descriptor,
             new java.lang.String[] { "Job", });
    +    descriptor.resolveAllFeaturesImmutable();
       }
     
       // @@protoc_insertion_point(outer_class_scope)
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CodeLocation.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CodeLocation.java
    index 14591ad3812..c19176e024a 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CodeLocation.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CodeLocation.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/debug_event.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -13,38 +15,36 @@
      * Protobuf type {@code tensorflow.CodeLocation}
      */
     public final class CodeLocation extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.CodeLocation)
         CodeLocationOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      CodeLocation.class.getName());
    +  }
       // Use CodeLocation.newBuilder() to construct.
    -  private CodeLocation(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private CodeLocation(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private CodeLocation() {
         hostName_ = "";
    -    stackFrameIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -  }
    -
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new CodeLocation();
    +    stackFrameIds_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
       }
     
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.DebugEventProtos.internal_static_tensorflow_CodeLocation_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.DebugEventProtos.internal_static_tensorflow_CodeLocation_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -52,7 +52,8 @@ protected java.lang.Object newInstance(
       }
     
       public static final int HOST_NAME_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object hostName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object hostName_ = "";
       /**
        * 
        * Host name on which the source files are located.
    @@ -98,7 +99,9 @@ public java.lang.String getHostName() {
       }
     
       public static final int STACK_FRAME_IDS_FIELD_NUMBER = 2;
    -  private com.google.protobuf.LazyStringList stackFrameIds_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.LazyStringArrayList stackFrameIds_ =
    +      com.google.protobuf.LazyStringArrayList.emptyList();
       /**
        * 
        * ID to a stack frame, each of which is pointed to
    @@ -170,11 +173,11 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hostName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, hostName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(hostName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, hostName_);
         }
         for (int i = 0; i < stackFrameIds_.size(); i++) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, stackFrameIds_.getRaw(i));
    +      com.google.protobuf.GeneratedMessage.writeString(output, 2, stackFrameIds_.getRaw(i));
         }
         getUnknownFields().writeTo(output);
       }
    @@ -185,8 +188,8 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hostName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, hostName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(hostName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, hostName_);
         }
         {
           int dataSize = 0;
    @@ -271,39 +274,41 @@ public static org.tensorflow.proto.CodeLocation parseFrom(
       }
       public static org.tensorflow.proto.CodeLocation parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.CodeLocation parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.CodeLocation parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.CodeLocation parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.CodeLocation parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.CodeLocation parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -323,7 +328,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -337,7 +342,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.CodeLocation}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.CodeLocation)
           org.tensorflow.proto.CodeLocationOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -346,7 +351,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.DebugEventProtos.internal_static_tensorflow_CodeLocation_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -359,17 +364,17 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           hostName_ = "";
    -
    -      stackFrameIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      stackFrameIds_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
           return this;
         }
     
    @@ -396,49 +401,22 @@ public org.tensorflow.proto.CodeLocation build() {
         @java.lang.Override
         public org.tensorflow.proto.CodeLocation buildPartial() {
           org.tensorflow.proto.CodeLocation result = new org.tensorflow.proto.CodeLocation(this);
    -      int from_bitField0_ = bitField0_;
    -      result.hostName_ = hostName_;
    -      if (((bitField0_ & 0x00000001) != 0)) {
    -        stackFrameIds_ = stackFrameIds_.getUnmodifiableView();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    -      }
    -      result.stackFrameIds_ = stackFrameIds_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.CodeLocation result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.hostName_ = hostName_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        stackFrameIds_.makeImmutable();
    +        result.stackFrameIds_ = stackFrameIds_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.CodeLocation) {
    @@ -453,12 +431,13 @@ public Builder mergeFrom(org.tensorflow.proto.CodeLocation other) {
           if (other == org.tensorflow.proto.CodeLocation.getDefaultInstance()) return this;
           if (!other.getHostName().isEmpty()) {
             hostName_ = other.hostName_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (!other.stackFrameIds_.isEmpty()) {
             if (stackFrameIds_.isEmpty()) {
               stackFrameIds_ = other.stackFrameIds_;
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ |= 0x00000002;
             } else {
               ensureStackFrameIdsIsMutable();
               stackFrameIds_.addAll(other.stackFrameIds_);
    @@ -493,7 +472,7 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   hostName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
    @@ -572,11 +551,9 @@ public java.lang.String getHostName() {
          */
         public Builder setHostName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           hostName_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -589,8 +566,8 @@ public Builder setHostName(
          * @return This builder for chaining.
          */
         public Builder clearHostName() {
    -      
           hostName_ = getDefaultInstance().getHostName();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -605,22 +582,21 @@ public Builder clearHostName() {
          */
         public Builder setHostNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           hostName_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
     
    -    private com.google.protobuf.LazyStringList stackFrameIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +    private com.google.protobuf.LazyStringArrayList stackFrameIds_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         private void ensureStackFrameIdsIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    +      if (!stackFrameIds_.isModifiable()) {
             stackFrameIds_ = new com.google.protobuf.LazyStringArrayList(stackFrameIds_);
    -        bitField0_ |= 0x00000001;
    -       }
    +      }
    +      bitField0_ |= 0x00000002;
         }
         /**
          * 
    @@ -634,7 +610,8 @@ private void ensureStackFrameIdsIsMutable() {
          */
         public com.google.protobuf.ProtocolStringList
             getStackFrameIdsList() {
    -      return stackFrameIds_.getUnmodifiableView();
    +      stackFrameIds_.makeImmutable();
    +      return stackFrameIds_;
         }
         /**
          * 
    @@ -692,11 +669,10 @@ public java.lang.String getStackFrameIds(int index) {
          */
         public Builder setStackFrameIds(
             int index, java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureStackFrameIdsIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureStackFrameIdsIsMutable();
           stackFrameIds_.set(index, value);
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -713,11 +689,10 @@ public Builder setStackFrameIds(
          */
         public Builder addStackFrameIds(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureStackFrameIdsIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureStackFrameIdsIsMutable();
           stackFrameIds_.add(value);
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -737,6 +712,7 @@ public Builder addAllStackFrameIds(
           ensureStackFrameIdsIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, stackFrameIds_);
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -751,8 +727,9 @@ public Builder addAllStackFrameIds(
          * @return This builder for chaining.
          */
         public Builder clearStackFrameIds() {
    -      stackFrameIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      stackFrameIds_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
    +      bitField0_ = (bitField0_ & ~0x00000002);;
           onChanged();
           return this;
         }
    @@ -769,27 +746,14 @@ public Builder clearStackFrameIds() {
          */
         public Builder addStackFrameIdsBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           ensureStackFrameIdsIsMutable();
           stackFrameIds_.add(value);
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.CodeLocation)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CodeLocationOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CodeLocationOrBuilder.java
    index 74c15d03196..4c1cc378579 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CodeLocationOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CodeLocationOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/debug_event.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CollectionDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CollectionDef.java
    index 6644d97f6ce..e072f35c64f 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CollectionDef.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CollectionDef.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/meta_graph.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -8,91 +10,97 @@
      * CollectionDef should cover most collections.
      * To add a user-defined collection, do one of the following:
      * 1. For simple data types, such as string, int, float:
    - *      tf.add_to_collection("your_collection_name", your_simple_value)
    - *    strings will be stored as bytes_list.
    + * tf.add_to_collection("your_collection_name", your_simple_value)
    + * strings will be stored as bytes_list.
    + *
      * 2. For Protobuf types, there are three ways to add them:
    - *    1) tf.add_to_collection("your_collection_name",
    - *         your_proto.SerializeToString())
    - *       collection_def {
    - *         key: "user_defined_bytes_collection"
    - *         value {
    - *           bytes_list {
    - *             value: "queue_name: \"test_queue\"\n"
    - *           }
    - *         }
    - *       }
    - *  or
    - *    2) tf.add_to_collection("your_collection_name", str(your_proto))
    - *       collection_def {
    - *         key: "user_defined_string_collection"
    - *         value {
    - *          bytes_list {
    - *             value: "\n\ntest_queue"
    - *           }
    - *         }
    - *       }
    - *  or
    - *    3) any_buf = any_pb2.Any()
    - *       tf.add_to_collection("your_collection_name",
    - *         any_buf.Pack(your_proto))
    - *       collection_def {
    - *         key: "user_defined_any_collection"
    - *         value {
    - *           any_list {
    - *             value {
    - *               type_url: "type.googleapis.com/tensorflow.QueueRunnerDef"
    - *               value: "\n\ntest_queue"
    - *             }
    - *           }
    - *         }
    - *       }
    + * 1) tf.add_to_collection("your_collection_name",
    + * your_proto.SerializeToString())
    + *
    + * collection_def {
    + * key: "user_defined_bytes_collection"
    + * value {
    + * bytes_list {
    + * value: "queue_name: \"test_queue\"\n"
    + * }
    + * }
    + * }
    + *
    + * or
    + *
    + * 2) tf.add_to_collection("your_collection_name", str(your_proto))
    + *
    + * collection_def {
    + * key: "user_defined_string_collection"
    + * value {
    + * bytes_list {
    + * value: "\n\ntest_queue"
    + * }
    + * }
    + * }
    + *
    + * or
    + *
    + * 3) any_buf = any_pb2.Any()
    + * tf.add_to_collection("your_collection_name",
    + * any_buf.Pack(your_proto))
    + *
    + * collection_def {
    + * key: "user_defined_any_collection"
    + * value {
    + * any_list {
    + * value {
    + * type_url: "type.googleapis.com/tensorflow.QueueRunnerDef"
    + * value: "\n\ntest_queue"
    + * }
    + * }
    + * }
    + * }
    + *
      * 3. For Python objects, implement to_proto() and from_proto(), and register
    - *    them in the following manner:
    - *    ops.register_proto_function("your_collection_name",
    - *                                proto_type,
    - *                                to_proto=YourPythonObject.to_proto,
    - *                                from_proto=YourPythonObject.from_proto)
    - *    These functions will be invoked to serialize and de-serialize the
    - *    collection. For example,
    - *    ops.register_proto_function(ops.GraphKeys.GLOBAL_VARIABLES,
    - *                                proto_type=variable_pb2.VariableDef,
    - *                                to_proto=Variable.to_proto,
    - *                                from_proto=Variable.from_proto)
    + * them in the following manner:
    + * ops.register_proto_function("your_collection_name",
    + * proto_type,
    + * to_proto=YourPythonObject.to_proto,
    + * from_proto=YourPythonObject.from_proto)
    + * These functions will be invoked to serialize and de-serialize the
    + * collection. For example,
    + * ops.register_proto_function(ops.GraphKeys.GLOBAL_VARIABLES,
    + * proto_type=variable_pb2.VariableDef,
    + * to_proto=Variable.to_proto,
    + * from_proto=Variable.from_proto)
      * 
    * * Protobuf type {@code tensorflow.CollectionDef} */ public final class CollectionDef extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.CollectionDef) CollectionDefOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + CollectionDef.class.getName()); + } // Use CollectionDef.newBuilder() to construct. - private CollectionDef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CollectionDef(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private CollectionDef() { } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CollectionDef(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.MetaGraphProtos.internal_static_tensorflow_CollectionDef_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.MetaGraphProtos.internal_static_tensorflow_CollectionDef_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -132,50 +140,48 @@ public interface NodeListOrBuilder extends *
        * NodeList is used for collecting nodes in graph. For example
        * collection_def {
    -   *   key: "summaries"
    -   *   value {
    -   *     node_list {
    -   *       value: "input_producer/ScalarSummary:0"
    -   *       value: "shuffle_batch/ScalarSummary:0"
    -   *       value: "ImageSummary:0"
    -   *     }
    -   *   }
    +   * key: "summaries"
    +   * value {
    +   * node_list {
    +   * value: "input_producer/ScalarSummary:0"
    +   * value: "shuffle_batch/ScalarSummary:0"
    +   * value: "ImageSummary:0"
    +   * }
    +   * }
        * 
    * * Protobuf type {@code tensorflow.CollectionDef.NodeList} */ public static final class NodeList extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.CollectionDef.NodeList) NodeListOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + NodeList.class.getName()); + } // Use NodeList.newBuilder() to construct. - private NodeList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private NodeList(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private NodeList() { - value_ = com.google.protobuf.LazyStringArrayList.EMPTY; + value_ = + com.google.protobuf.LazyStringArrayList.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new NodeList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.MetaGraphProtos.internal_static_tensorflow_CollectionDef_NodeList_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.MetaGraphProtos.internal_static_tensorflow_CollectionDef_NodeList_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -183,7 +189,9 @@ protected java.lang.Object newInstance( } public static final int VALUE_FIELD_NUMBER = 1; - private com.google.protobuf.LazyStringList value_; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList value_ = + com.google.protobuf.LazyStringArrayList.emptyList(); /** * repeated string value = 1; * @return A list containing the value. @@ -232,7 +240,7 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < value_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, value_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 1, value_.getRaw(i)); } getUnknownFields().writeTo(output); } @@ -322,39 +330,41 @@ public static org.tensorflow.proto.CollectionDef.NodeList parseFrom( } public static org.tensorflow.proto.CollectionDef.NodeList parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.CollectionDef.NodeList parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.CollectionDef.NodeList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.CollectionDef.NodeList parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.CollectionDef.NodeList parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.CollectionDef.NodeList parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -374,7 +384,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -382,20 +392,20 @@ protected Builder newBuilderForType( *
          * NodeList is used for collecting nodes in graph. For example
          * collection_def {
    -     *   key: "summaries"
    -     *   value {
    -     *     node_list {
    -     *       value: "input_producer/ScalarSummary:0"
    -     *       value: "shuffle_batch/ScalarSummary:0"
    -     *       value: "ImageSummary:0"
    -     *     }
    -     *   }
    +     * key: "summaries"
    +     * value {
    +     * node_list {
    +     * value: "input_producer/ScalarSummary:0"
    +     * value: "shuffle_batch/ScalarSummary:0"
    +     * value: "ImageSummary:0"
    +     * }
    +     * }
          * 
    * * Protobuf type {@code tensorflow.CollectionDef.NodeList} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.CollectionDef.NodeList) org.tensorflow.proto.CollectionDef.NodeListOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -404,7 +414,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.MetaGraphProtos.internal_static_tensorflow_CollectionDef_NodeList_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -417,15 +427,16 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); - value_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = 0; + value_ = + com.google.protobuf.LazyStringArrayList.emptyList(); return this; } @@ -452,48 +463,19 @@ public org.tensorflow.proto.CollectionDef.NodeList build() { @java.lang.Override public org.tensorflow.proto.CollectionDef.NodeList buildPartial() { org.tensorflow.proto.CollectionDef.NodeList result = new org.tensorflow.proto.CollectionDef.NodeList(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - value_ = value_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.value_ = value_; + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.CollectionDef.NodeList result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + value_.makeImmutable(); + result.value_ = value_; + } } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.CollectionDef.NodeList) { @@ -509,7 +491,7 @@ public Builder mergeFrom(org.tensorflow.proto.CollectionDef.NodeList other) { if (!other.value_.isEmpty()) { if (value_.isEmpty()) { value_ = other.value_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ |= 0x00000001; } else { ensureValueIsMutable(); value_.addAll(other.value_); @@ -565,12 +547,13 @@ public Builder mergeFrom( } private int bitField0_; - private com.google.protobuf.LazyStringList value_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private com.google.protobuf.LazyStringArrayList value_ = + com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureValueIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!value_.isModifiable()) { value_ = new com.google.protobuf.LazyStringArrayList(value_); - bitField0_ |= 0x00000001; - } + } + bitField0_ |= 0x00000001; } /** * repeated string value = 1; @@ -578,7 +561,8 @@ private void ensureValueIsMutable() { */ public com.google.protobuf.ProtocolStringList getValueList() { - return value_.getUnmodifiableView(); + value_.makeImmutable(); + return value_; } /** * repeated string value = 1; @@ -612,11 +596,10 @@ public java.lang.String getValue(int index) { */ public Builder setValue( int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureValueIsMutable(); + if (value == null) { throw new NullPointerException(); } + ensureValueIsMutable(); value_.set(index, value); + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -627,11 +610,10 @@ public Builder setValue( */ public Builder addValue( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureValueIsMutable(); + if (value == null) { throw new NullPointerException(); } + ensureValueIsMutable(); value_.add(value); + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -645,6 +627,7 @@ public Builder addAllValue( ensureValueIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, value_); + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -653,8 +636,9 @@ public Builder addAllValue( * @return This builder for chaining. */ public Builder clearValue() { - value_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); + value_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001);; onChanged(); return this; } @@ -665,27 +649,14 @@ public Builder clearValue() { */ public Builder addValueBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); ensureValueIsMutable(); value_.add(value); + bitField0_ |= 0x00000001; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.CollectionDef.NodeList) } @@ -764,52 +735,49 @@ public interface BytesListOrBuilder extends * BytesList is used for collecting strings and serialized protobufs. For * example: * collection_def { - * key: "trainable_variables" - * value { - * bytes_list { - * value: "\n\017conv1/weights:0\022\024conv1/weights/Assign - * \032\024conv1/weights/read:0" - * value: "\n\016conv1/biases:0\022\023conv1/biases/Assign\032 - * \023conv1/biases/read:0" - * } - * } + * key: "trainable_variables" + * value { + * bytes_list { + * value: "\n\017conv1/weights:0\022\024conv1/weights/Assign + * \032\024conv1/weights/read:0" + * value: "\n\016conv1/biases:0\022\023conv1/biases/Assign\032 + * \023conv1/biases/read:0" + * } + * } * } *
    * * Protobuf type {@code tensorflow.CollectionDef.BytesList} */ public static final class BytesList extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.CollectionDef.BytesList) BytesListOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + BytesList.class.getName()); + } // Use BytesList.newBuilder() to construct. - private BytesList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private BytesList(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private BytesList() { - value_ = java.util.Collections.emptyList(); + value_ = emptyList(com.google.protobuf.ByteString.class); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BytesList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.MetaGraphProtos.internal_static_tensorflow_CollectionDef_BytesList_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.MetaGraphProtos.internal_static_tensorflow_CollectionDef_BytesList_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -817,7 +785,9 @@ protected java.lang.Object newInstance( } public static final int VALUE_FIELD_NUMBER = 1; - private java.util.List value_; + @SuppressWarnings("serial") + private com.google.protobuf.Internal.ProtobufList value_ = + emptyList(com.google.protobuf.ByteString.class); /** * repeated bytes value = 1; * @return A list containing the value. @@ -949,39 +919,41 @@ public static org.tensorflow.proto.CollectionDef.BytesList parseFrom( } public static org.tensorflow.proto.CollectionDef.BytesList parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.CollectionDef.BytesList parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.CollectionDef.BytesList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.CollectionDef.BytesList parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.CollectionDef.BytesList parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.CollectionDef.BytesList parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -1001,7 +973,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -1010,22 +982,22 @@ protected Builder newBuilderForType( * BytesList is used for collecting strings and serialized protobufs. For * example: * collection_def { - * key: "trainable_variables" - * value { - * bytes_list { - * value: "\n\017conv1/weights:0\022\024conv1/weights/Assign - * \032\024conv1/weights/read:0" - * value: "\n\016conv1/biases:0\022\023conv1/biases/Assign\032 - * \023conv1/biases/read:0" - * } - * } + * key: "trainable_variables" + * value { + * bytes_list { + * value: "\n\017conv1/weights:0\022\024conv1/weights/Assign + * \032\024conv1/weights/read:0" + * value: "\n\016conv1/biases:0\022\023conv1/biases/Assign\032 + * \023conv1/biases/read:0" + * } + * } * } *
    * * Protobuf type {@code tensorflow.CollectionDef.BytesList} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.CollectionDef.BytesList) org.tensorflow.proto.CollectionDef.BytesListOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -1034,7 +1006,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.MetaGraphProtos.internal_static_tensorflow_CollectionDef_BytesList_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -1047,15 +1019,15 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); - value_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = 0; + value_ = emptyList(com.google.protobuf.ByteString.class); return this; } @@ -1082,48 +1054,19 @@ public org.tensorflow.proto.CollectionDef.BytesList build() { @java.lang.Override public org.tensorflow.proto.CollectionDef.BytesList buildPartial() { org.tensorflow.proto.CollectionDef.BytesList result = new org.tensorflow.proto.CollectionDef.BytesList(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - value_ = java.util.Collections.unmodifiableList(value_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.value_ = value_; + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.CollectionDef.BytesList result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + value_.makeImmutable(); + result.value_ = value_; + } } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.CollectionDef.BytesList) { @@ -1139,7 +1082,8 @@ public Builder mergeFrom(org.tensorflow.proto.CollectionDef.BytesList other) { if (!other.value_.isEmpty()) { if (value_.isEmpty()) { value_ = other.value_; - bitField0_ = (bitField0_ & ~0x00000001); + value_.makeImmutable(); + bitField0_ |= 0x00000001; } else { ensureValueIsMutable(); value_.addAll(other.value_); @@ -1195,12 +1139,12 @@ public Builder mergeFrom( } private int bitField0_; - private java.util.List value_ = java.util.Collections.emptyList(); + private com.google.protobuf.Internal.ProtobufList value_ = emptyList(com.google.protobuf.ByteString.class); private void ensureValueIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - value_ = new java.util.ArrayList(value_); - bitField0_ |= 0x00000001; - } + if (!value_.isModifiable()) { + value_ = makeMutableCopy(value_); + } + bitField0_ |= 0x00000001; } /** * repeated bytes value = 1; @@ -1208,8 +1152,8 @@ private void ensureValueIsMutable() { */ public java.util.List getValueList() { - return ((bitField0_ & 0x00000001) != 0) ? - java.util.Collections.unmodifiableList(value_) : value_; + value_.makeImmutable(); + return value_; } /** * repeated bytes value = 1; @@ -1234,11 +1178,10 @@ public com.google.protobuf.ByteString getValue(int index) { */ public Builder setValue( int index, com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureValueIsMutable(); + if (value == null) { throw new NullPointerException(); } + ensureValueIsMutable(); value_.set(index, value); + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -1248,11 +1191,10 @@ public Builder setValue( * @return This builder for chaining. */ public Builder addValue(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureValueIsMutable(); + if (value == null) { throw new NullPointerException(); } + ensureValueIsMutable(); value_.add(value); + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -1266,6 +1208,7 @@ public Builder addAllValue( ensureValueIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, value_); + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -1274,23 +1217,11 @@ public Builder addAllValue( * @return This builder for chaining. */ public Builder clearValue() { - value_ = java.util.Collections.emptyList(); + value_ = emptyList(com.google.protobuf.ByteString.class); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.CollectionDef.BytesList) } @@ -1372,37 +1303,34 @@ public interface Int64ListOrBuilder extends * Protobuf type {@code tensorflow.CollectionDef.Int64List} */ public static final class Int64List extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.CollectionDef.Int64List) Int64ListOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + Int64List.class.getName()); + } // Use Int64List.newBuilder() to construct. - private Int64List(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Int64List(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Int64List() { value_ = emptyLongList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Int64List(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.MetaGraphProtos.internal_static_tensorflow_CollectionDef_Int64List_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.MetaGraphProtos.internal_static_tensorflow_CollectionDef_Int64List_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -1410,7 +1338,9 @@ protected java.lang.Object newInstance( } public static final int VALUE_FIELD_NUMBER = 1; - private com.google.protobuf.Internal.LongList value_; + @SuppressWarnings("serial") + private com.google.protobuf.Internal.LongList value_ = + emptyLongList(); /** * repeated int64 value = 1 [packed = true]; * @return A list containing the value. @@ -1553,39 +1483,41 @@ public static org.tensorflow.proto.CollectionDef.Int64List parseFrom( } public static org.tensorflow.proto.CollectionDef.Int64List parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.CollectionDef.Int64List parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.CollectionDef.Int64List parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.CollectionDef.Int64List parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.CollectionDef.Int64List parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.CollectionDef.Int64List parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -1605,7 +1537,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -1617,7 +1549,7 @@ protected Builder newBuilderForType( * Protobuf type {@code tensorflow.CollectionDef.Int64List} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.CollectionDef.Int64List) org.tensorflow.proto.CollectionDef.Int64ListOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -1626,7 +1558,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.MetaGraphProtos.internal_static_tensorflow_CollectionDef_Int64List_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -1639,15 +1571,15 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; value_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -1674,48 +1606,19 @@ public org.tensorflow.proto.CollectionDef.Int64List build() { @java.lang.Override public org.tensorflow.proto.CollectionDef.Int64List buildPartial() { org.tensorflow.proto.CollectionDef.Int64List result = new org.tensorflow.proto.CollectionDef.Int64List(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - value_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.value_ = value_; + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.CollectionDef.Int64List result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + value_.makeImmutable(); + result.value_ = value_; + } } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.CollectionDef.Int64List) { @@ -1731,7 +1634,8 @@ public Builder mergeFrom(org.tensorflow.proto.CollectionDef.Int64List other) { if (!other.value_.isEmpty()) { if (value_.isEmpty()) { value_ = other.value_; - bitField0_ = (bitField0_ & ~0x00000001); + value_.makeImmutable(); + bitField0_ |= 0x00000001; } else { ensureValueIsMutable(); value_.addAll(other.value_); @@ -1799,10 +1703,10 @@ public Builder mergeFrom( private com.google.protobuf.Internal.LongList value_ = emptyLongList(); private void ensureValueIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - value_ = mutableCopy(value_); - bitField0_ |= 0x00000001; - } + if (!value_.isModifiable()) { + value_ = makeMutableCopy(value_); + } + bitField0_ |= 0x00000001; } /** * repeated int64 value = 1 [packed = true]; @@ -1810,8 +1714,8 @@ private void ensureValueIsMutable() { */ public java.util.List getValueList() { - return ((bitField0_ & 0x00000001) != 0) ? - java.util.Collections.unmodifiableList(value_) : value_; + value_.makeImmutable(); + return value_; } /** * repeated int64 value = 1 [packed = true]; @@ -1836,8 +1740,10 @@ public long getValue(int index) { */ public Builder setValue( int index, long value) { + ensureValueIsMutable(); value_.setLong(index, value); + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -1847,8 +1753,10 @@ public Builder setValue( * @return This builder for chaining. */ public Builder addValue(long value) { + ensureValueIsMutable(); value_.addLong(value); + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -1862,6 +1770,7 @@ public Builder addAllValue( ensureValueIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, value_); + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -1875,18 +1784,6 @@ public Builder clearValue() { onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.CollectionDef.Int64List) } @@ -1968,37 +1865,34 @@ public interface FloatListOrBuilder extends * Protobuf type {@code tensorflow.CollectionDef.FloatList} */ public static final class FloatList extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.CollectionDef.FloatList) FloatListOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + FloatList.class.getName()); + } // Use FloatList.newBuilder() to construct. - private FloatList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private FloatList(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private FloatList() { value_ = emptyFloatList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new FloatList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.MetaGraphProtos.internal_static_tensorflow_CollectionDef_FloatList_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.MetaGraphProtos.internal_static_tensorflow_CollectionDef_FloatList_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -2006,7 +1900,9 @@ protected java.lang.Object newInstance( } public static final int VALUE_FIELD_NUMBER = 1; - private com.google.protobuf.Internal.FloatList value_; + @SuppressWarnings("serial") + private com.google.protobuf.Internal.FloatList value_ = + emptyFloatList(); /** * repeated float value = 1 [packed = true]; * @return A list containing the value. @@ -2146,39 +2042,41 @@ public static org.tensorflow.proto.CollectionDef.FloatList parseFrom( } public static org.tensorflow.proto.CollectionDef.FloatList parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.CollectionDef.FloatList parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.CollectionDef.FloatList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.CollectionDef.FloatList parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.CollectionDef.FloatList parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.CollectionDef.FloatList parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -2198,7 +2096,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -2210,7 +2108,7 @@ protected Builder newBuilderForType( * Protobuf type {@code tensorflow.CollectionDef.FloatList} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.CollectionDef.FloatList) org.tensorflow.proto.CollectionDef.FloatListOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -2219,7 +2117,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.MetaGraphProtos.internal_static_tensorflow_CollectionDef_FloatList_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -2232,15 +2130,15 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; value_ = emptyFloatList(); - bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -2267,48 +2165,19 @@ public org.tensorflow.proto.CollectionDef.FloatList build() { @java.lang.Override public org.tensorflow.proto.CollectionDef.FloatList buildPartial() { org.tensorflow.proto.CollectionDef.FloatList result = new org.tensorflow.proto.CollectionDef.FloatList(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - value_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.value_ = value_; + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.CollectionDef.FloatList result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + value_.makeImmutable(); + result.value_ = value_; + } } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.CollectionDef.FloatList) { @@ -2324,7 +2193,8 @@ public Builder mergeFrom(org.tensorflow.proto.CollectionDef.FloatList other) { if (!other.value_.isEmpty()) { if (value_.isEmpty()) { value_ = other.value_; - bitField0_ = (bitField0_ & ~0x00000001); + value_.makeImmutable(); + bitField0_ |= 0x00000001; } else { ensureValueIsMutable(); value_.addAll(other.value_); @@ -2366,7 +2236,8 @@ public Builder mergeFrom( case 10: { int length = input.readRawVarint32(); int limit = input.pushLimit(length); - ensureValueIsMutable(); + int alloc = length > 4096 ? 4096 : length; + ensureValueIsMutable(alloc / 4); while (input.getBytesUntilLimit() > 0) { value_.addFloat(input.readFloat()); } @@ -2392,10 +2263,16 @@ public Builder mergeFrom( private com.google.protobuf.Internal.FloatList value_ = emptyFloatList(); private void ensureValueIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - value_ = mutableCopy(value_); - bitField0_ |= 0x00000001; - } + if (!value_.isModifiable()) { + value_ = makeMutableCopy(value_); + } + bitField0_ |= 0x00000001; + } + private void ensureValueIsMutable(int capacity) { + if (!value_.isModifiable()) { + value_ = makeMutableCopy(value_, capacity); + } + bitField0_ |= 0x00000001; } /** * repeated float value = 1 [packed = true]; @@ -2403,8 +2280,8 @@ private void ensureValueIsMutable() { */ public java.util.List getValueList() { - return ((bitField0_ & 0x00000001) != 0) ? - java.util.Collections.unmodifiableList(value_) : value_; + value_.makeImmutable(); + return value_; } /** * repeated float value = 1 [packed = true]; @@ -2429,8 +2306,10 @@ public float getValue(int index) { */ public Builder setValue( int index, float value) { + ensureValueIsMutable(); value_.setFloat(index, value); + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -2440,8 +2319,10 @@ public Builder setValue( * @return This builder for chaining. */ public Builder addValue(float value) { + ensureValueIsMutable(); value_.addFloat(value); + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -2455,6 +2336,7 @@ public Builder addAllValue( ensureValueIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, value_); + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -2468,18 +2350,6 @@ public Builder clearValue() { onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.CollectionDef.FloatList) } @@ -2568,37 +2438,34 @@ com.google.protobuf.AnyOrBuilder getValueOrBuilder( * Protobuf type {@code tensorflow.CollectionDef.AnyList} */ public static final class AnyList extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.CollectionDef.AnyList) AnyListOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + AnyList.class.getName()); + } // Use AnyList.newBuilder() to construct. - private AnyList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private AnyList(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private AnyList() { value_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AnyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.MetaGraphProtos.internal_static_tensorflow_CollectionDef_AnyList_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.MetaGraphProtos.internal_static_tensorflow_CollectionDef_AnyList_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -2606,6 +2473,7 @@ protected java.lang.Object newInstance( } public static final int VALUE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List value_; /** * repeated .google.protobuf.Any value = 1; @@ -2746,39 +2614,41 @@ public static org.tensorflow.proto.CollectionDef.AnyList parseFrom( } public static org.tensorflow.proto.CollectionDef.AnyList parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.CollectionDef.AnyList parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.CollectionDef.AnyList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.CollectionDef.AnyList parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.CollectionDef.AnyList parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.CollectionDef.AnyList parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -2798,7 +2668,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -2810,7 +2680,7 @@ protected Builder newBuilderForType( * Protobuf type {@code tensorflow.CollectionDef.AnyList} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.CollectionDef.AnyList) org.tensorflow.proto.CollectionDef.AnyListOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -2819,7 +2689,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.MetaGraphProtos.internal_static_tensorflow_CollectionDef_AnyList_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -2832,13 +2702,14 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (valueBuilder_ == null) { value_ = java.util.Collections.emptyList(); } else { @@ -2872,7 +2743,13 @@ public org.tensorflow.proto.CollectionDef.AnyList build() { @java.lang.Override public org.tensorflow.proto.CollectionDef.AnyList buildPartial() { org.tensorflow.proto.CollectionDef.AnyList result = new org.tensorflow.proto.CollectionDef.AnyList(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(org.tensorflow.proto.CollectionDef.AnyList result) { if (valueBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { value_ = java.util.Collections.unmodifiableList(value_); @@ -2882,42 +2759,12 @@ public org.tensorflow.proto.CollectionDef.AnyList buildPartial() { } else { result.value_ = valueBuilder_.build(); } - onBuilt(); - return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.CollectionDef.AnyList result) { + int from_bitField0_ = bitField0_; } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.CollectionDef.AnyList) { @@ -2949,7 +2796,7 @@ public Builder mergeFrom(org.tensorflow.proto.CollectionDef.AnyList other) { value_ = other.value_; bitField0_ = (bitField0_ & ~0x00000001); valueBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getValueFieldBuilder() : null; } else { valueBuilder_.addAllMessages(other.value_); @@ -3021,7 +2868,7 @@ private void ensureValueIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> valueBuilder_; /** @@ -3237,11 +3084,11 @@ public com.google.protobuf.Any.Builder addValueBuilder( getValueBuilderList() { return getValueFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> getValueFieldBuilder() { if (valueBuilder_ == null) { - valueBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + valueBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( value_, ((bitField0_ & 0x00000001) != 0), @@ -3251,18 +3098,6 @@ public com.google.protobuf.Any.Builder addValueBuilder( } return valueBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.CollectionDef.AnyList) } @@ -3316,6 +3151,7 @@ public org.tensorflow.proto.CollectionDef.AnyList getDefaultInstanceForType() { } private int kindCase_ = 0; + @SuppressWarnings("serial") private java.lang.Object kind_; public enum KindCase implements com.google.protobuf.Internal.EnumLite, @@ -3689,39 +3525,41 @@ public static org.tensorflow.proto.CollectionDef parseFrom( } public static org.tensorflow.proto.CollectionDef parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.CollectionDef parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.CollectionDef parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.CollectionDef parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.CollectionDef parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.CollectionDef parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -3741,7 +3579,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -3750,62 +3588,71 @@ protected Builder newBuilderForType( * CollectionDef should cover most collections. * To add a user-defined collection, do one of the following: * 1. For simple data types, such as string, int, float: - * tf.add_to_collection("your_collection_name", your_simple_value) - * strings will be stored as bytes_list. + * tf.add_to_collection("your_collection_name", your_simple_value) + * strings will be stored as bytes_list. + * * 2. For Protobuf types, there are three ways to add them: - * 1) tf.add_to_collection("your_collection_name", - * your_proto.SerializeToString()) - * collection_def { - * key: "user_defined_bytes_collection" - * value { - * bytes_list { - * value: "queue_name: \"test_queue\"\n" - * } - * } - * } - * or - * 2) tf.add_to_collection("your_collection_name", str(your_proto)) - * collection_def { - * key: "user_defined_string_collection" - * value { - * bytes_list { - * value: "\n\ntest_queue" - * } - * } - * } - * or - * 3) any_buf = any_pb2.Any() - * tf.add_to_collection("your_collection_name", - * any_buf.Pack(your_proto)) - * collection_def { - * key: "user_defined_any_collection" - * value { - * any_list { - * value { - * type_url: "type.googleapis.com/tensorflow.QueueRunnerDef" - * value: "\n\ntest_queue" - * } - * } - * } - * } + * 1) tf.add_to_collection("your_collection_name", + * your_proto.SerializeToString()) + * + * collection_def { + * key: "user_defined_bytes_collection" + * value { + * bytes_list { + * value: "queue_name: \"test_queue\"\n" + * } + * } + * } + * + * or + * + * 2) tf.add_to_collection("your_collection_name", str(your_proto)) + * + * collection_def { + * key: "user_defined_string_collection" + * value { + * bytes_list { + * value: "\n\ntest_queue" + * } + * } + * } + * + * or + * + * 3) any_buf = any_pb2.Any() + * tf.add_to_collection("your_collection_name", + * any_buf.Pack(your_proto)) + * + * collection_def { + * key: "user_defined_any_collection" + * value { + * any_list { + * value { + * type_url: "type.googleapis.com/tensorflow.QueueRunnerDef" + * value: "\n\ntest_queue" + * } + * } + * } + * } + * * 3. For Python objects, implement to_proto() and from_proto(), and register - * them in the following manner: - * ops.register_proto_function("your_collection_name", - * proto_type, - * to_proto=YourPythonObject.to_proto, - * from_proto=YourPythonObject.from_proto) - * These functions will be invoked to serialize and de-serialize the - * collection. For example, - * ops.register_proto_function(ops.GraphKeys.GLOBAL_VARIABLES, - * proto_type=variable_pb2.VariableDef, - * to_proto=Variable.to_proto, - * from_proto=Variable.from_proto) + * them in the following manner: + * ops.register_proto_function("your_collection_name", + * proto_type, + * to_proto=YourPythonObject.to_proto, + * from_proto=YourPythonObject.from_proto) + * These functions will be invoked to serialize and de-serialize the + * collection. For example, + * ops.register_proto_function(ops.GraphKeys.GLOBAL_VARIABLES, + * proto_type=variable_pb2.VariableDef, + * to_proto=Variable.to_proto, + * from_proto=Variable.from_proto) *
    * * Protobuf type {@code tensorflow.CollectionDef} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.CollectionDef) org.tensorflow.proto.CollectionDefOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -3814,7 +3661,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.MetaGraphProtos.internal_static_tensorflow_CollectionDef_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -3827,13 +3674,14 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (nodeListBuilder_ != null) { nodeListBuilder_.clear(); } @@ -3877,78 +3725,41 @@ public org.tensorflow.proto.CollectionDef build() { @java.lang.Override public org.tensorflow.proto.CollectionDef buildPartial() { org.tensorflow.proto.CollectionDef result = new org.tensorflow.proto.CollectionDef(this); - if (kindCase_ == 1) { - if (nodeListBuilder_ == null) { - result.kind_ = kind_; - } else { - result.kind_ = nodeListBuilder_.build(); - } + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(org.tensorflow.proto.CollectionDef result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(org.tensorflow.proto.CollectionDef result) { + result.kindCase_ = kindCase_; + result.kind_ = this.kind_; + if (kindCase_ == 1 && + nodeListBuilder_ != null) { + result.kind_ = nodeListBuilder_.build(); } - if (kindCase_ == 2) { - if (bytesListBuilder_ == null) { - result.kind_ = kind_; - } else { - result.kind_ = bytesListBuilder_.build(); - } + if (kindCase_ == 2 && + bytesListBuilder_ != null) { + result.kind_ = bytesListBuilder_.build(); } - if (kindCase_ == 3) { - if (int64ListBuilder_ == null) { - result.kind_ = kind_; - } else { - result.kind_ = int64ListBuilder_.build(); - } + if (kindCase_ == 3 && + int64ListBuilder_ != null) { + result.kind_ = int64ListBuilder_.build(); } - if (kindCase_ == 4) { - if (floatListBuilder_ == null) { - result.kind_ = kind_; - } else { - result.kind_ = floatListBuilder_.build(); - } + if (kindCase_ == 4 && + floatListBuilder_ != null) { + result.kind_ = floatListBuilder_.build(); } - if (kindCase_ == 5) { - if (anyListBuilder_ == null) { - result.kind_ = kind_; - } else { - result.kind_ = anyListBuilder_.build(); - } + if (kindCase_ == 5 && + anyListBuilder_ != null) { + result.kind_ = anyListBuilder_.build(); } - result.kindCase_ = kindCase_; - onBuilt(); - return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.CollectionDef) { @@ -4077,8 +3888,9 @@ public Builder clearKind() { return this; } + private int bitField0_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.CollectionDef.NodeList, org.tensorflow.proto.CollectionDef.NodeList.Builder, org.tensorflow.proto.CollectionDef.NodeListOrBuilder> nodeListBuilder_; /** * .tensorflow.CollectionDef.NodeList node_list = 1; @@ -4201,14 +4013,14 @@ public org.tensorflow.proto.CollectionDef.NodeListOrBuilder getNodeListOrBuilder /** * .tensorflow.CollectionDef.NodeList node_list = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.CollectionDef.NodeList, org.tensorflow.proto.CollectionDef.NodeList.Builder, org.tensorflow.proto.CollectionDef.NodeListOrBuilder> getNodeListFieldBuilder() { if (nodeListBuilder_ == null) { if (!(kindCase_ == 1)) { kind_ = org.tensorflow.proto.CollectionDef.NodeList.getDefaultInstance(); } - nodeListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + nodeListBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.CollectionDef.NodeList, org.tensorflow.proto.CollectionDef.NodeList.Builder, org.tensorflow.proto.CollectionDef.NodeListOrBuilder>( (org.tensorflow.proto.CollectionDef.NodeList) kind_, getParentForChildren(), @@ -4216,11 +4028,11 @@ public org.tensorflow.proto.CollectionDef.NodeListOrBuilder getNodeListOrBuilder kind_ = null; } kindCase_ = 1; - onChanged();; + onChanged(); return nodeListBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.CollectionDef.BytesList, org.tensorflow.proto.CollectionDef.BytesList.Builder, org.tensorflow.proto.CollectionDef.BytesListOrBuilder> bytesListBuilder_; /** * .tensorflow.CollectionDef.BytesList bytes_list = 2; @@ -4343,14 +4155,14 @@ public org.tensorflow.proto.CollectionDef.BytesListOrBuilder getBytesListOrBuild /** * .tensorflow.CollectionDef.BytesList bytes_list = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.CollectionDef.BytesList, org.tensorflow.proto.CollectionDef.BytesList.Builder, org.tensorflow.proto.CollectionDef.BytesListOrBuilder> getBytesListFieldBuilder() { if (bytesListBuilder_ == null) { if (!(kindCase_ == 2)) { kind_ = org.tensorflow.proto.CollectionDef.BytesList.getDefaultInstance(); } - bytesListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + bytesListBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.CollectionDef.BytesList, org.tensorflow.proto.CollectionDef.BytesList.Builder, org.tensorflow.proto.CollectionDef.BytesListOrBuilder>( (org.tensorflow.proto.CollectionDef.BytesList) kind_, getParentForChildren(), @@ -4358,11 +4170,11 @@ public org.tensorflow.proto.CollectionDef.BytesListOrBuilder getBytesListOrBuild kind_ = null; } kindCase_ = 2; - onChanged();; + onChanged(); return bytesListBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.CollectionDef.Int64List, org.tensorflow.proto.CollectionDef.Int64List.Builder, org.tensorflow.proto.CollectionDef.Int64ListOrBuilder> int64ListBuilder_; /** * .tensorflow.CollectionDef.Int64List int64_list = 3; @@ -4485,14 +4297,14 @@ public org.tensorflow.proto.CollectionDef.Int64ListOrBuilder getInt64ListOrBuild /** * .tensorflow.CollectionDef.Int64List int64_list = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.CollectionDef.Int64List, org.tensorflow.proto.CollectionDef.Int64List.Builder, org.tensorflow.proto.CollectionDef.Int64ListOrBuilder> getInt64ListFieldBuilder() { if (int64ListBuilder_ == null) { if (!(kindCase_ == 3)) { kind_ = org.tensorflow.proto.CollectionDef.Int64List.getDefaultInstance(); } - int64ListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + int64ListBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.CollectionDef.Int64List, org.tensorflow.proto.CollectionDef.Int64List.Builder, org.tensorflow.proto.CollectionDef.Int64ListOrBuilder>( (org.tensorflow.proto.CollectionDef.Int64List) kind_, getParentForChildren(), @@ -4500,11 +4312,11 @@ public org.tensorflow.proto.CollectionDef.Int64ListOrBuilder getInt64ListOrBuild kind_ = null; } kindCase_ = 3; - onChanged();; + onChanged(); return int64ListBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.CollectionDef.FloatList, org.tensorflow.proto.CollectionDef.FloatList.Builder, org.tensorflow.proto.CollectionDef.FloatListOrBuilder> floatListBuilder_; /** * .tensorflow.CollectionDef.FloatList float_list = 4; @@ -4627,14 +4439,14 @@ public org.tensorflow.proto.CollectionDef.FloatListOrBuilder getFloatListOrBuild /** * .tensorflow.CollectionDef.FloatList float_list = 4; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.CollectionDef.FloatList, org.tensorflow.proto.CollectionDef.FloatList.Builder, org.tensorflow.proto.CollectionDef.FloatListOrBuilder> getFloatListFieldBuilder() { if (floatListBuilder_ == null) { if (!(kindCase_ == 4)) { kind_ = org.tensorflow.proto.CollectionDef.FloatList.getDefaultInstance(); } - floatListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + floatListBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.CollectionDef.FloatList, org.tensorflow.proto.CollectionDef.FloatList.Builder, org.tensorflow.proto.CollectionDef.FloatListOrBuilder>( (org.tensorflow.proto.CollectionDef.FloatList) kind_, getParentForChildren(), @@ -4642,11 +4454,11 @@ public org.tensorflow.proto.CollectionDef.FloatListOrBuilder getFloatListOrBuild kind_ = null; } kindCase_ = 4; - onChanged();; + onChanged(); return floatListBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.CollectionDef.AnyList, org.tensorflow.proto.CollectionDef.AnyList.Builder, org.tensorflow.proto.CollectionDef.AnyListOrBuilder> anyListBuilder_; /** * .tensorflow.CollectionDef.AnyList any_list = 5; @@ -4769,14 +4581,14 @@ public org.tensorflow.proto.CollectionDef.AnyListOrBuilder getAnyListOrBuilder() /** * .tensorflow.CollectionDef.AnyList any_list = 5; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.CollectionDef.AnyList, org.tensorflow.proto.CollectionDef.AnyList.Builder, org.tensorflow.proto.CollectionDef.AnyListOrBuilder> getAnyListFieldBuilder() { if (anyListBuilder_ == null) { if (!(kindCase_ == 5)) { kind_ = org.tensorflow.proto.CollectionDef.AnyList.getDefaultInstance(); } - anyListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + anyListBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.CollectionDef.AnyList, org.tensorflow.proto.CollectionDef.AnyList.Builder, org.tensorflow.proto.CollectionDef.AnyListOrBuilder>( (org.tensorflow.proto.CollectionDef.AnyList) kind_, getParentForChildren(), @@ -4784,21 +4596,9 @@ public org.tensorflow.proto.CollectionDef.AnyListOrBuilder getAnyListOrBuilder() kind_ = null; } kindCase_ = 5; - onChanged();; + onChanged(); return anyListBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.CollectionDef) } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CollectionDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CollectionDefOrBuilder.java index dafdcb0f648..0b80d88866e 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CollectionDefOrBuilder.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CollectionDefOrBuilder.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/protobuf/meta_graph.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -82,5 +84,5 @@ public interface CollectionDefOrBuilder extends */ org.tensorflow.proto.CollectionDef.AnyListOrBuilder getAnyListOrBuilder(); - public org.tensorflow.proto.CollectionDef.KindCase getKindCase(); + org.tensorflow.proto.CollectionDef.KindCase getKindCase(); } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CommitId.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CommitId.java index 9f6ad5f08bc..e47f5125f55 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CommitId.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CommitId.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: xla/tsl/protobuf/test_log.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -7,37 +9,34 @@ * Protobuf type {@code tensorflow.CommitId} */ public final class CommitId extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.CommitId) CommitIdOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + CommitId.class.getName()); + } // Use CommitId.newBuilder() to construct. - private CommitId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CommitId(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private CommitId() { snapshot_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CommitId(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_CommitId_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_CommitId_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -45,6 +44,7 @@ protected java.lang.Object newInstance( } private int kindCase_ = 0; + @SuppressWarnings("serial") private java.lang.Object kind_; public enum KindCase implements com.google.protobuf.Internal.EnumLite, @@ -167,7 +167,8 @@ public java.lang.String getHash() { } public static final int SNAPSHOT_FIELD_NUMBER = 3; - private volatile java.lang.Object snapshot_; + @SuppressWarnings("serial") + private volatile java.lang.Object snapshot_ = ""; /** *
        * Hash of intermediate change between hash/changelist and what was tested.
    @@ -215,7 +216,7 @@ public java.lang.String getSnapshot() {
       }
     
       public static final int PENDING_CHANGELIST_FIELD_NUMBER = 4;
    -  private long pendingChangelist_;
    +  private long pendingChangelist_ = 0L;
       /**
        * 
        * Changelist tested if the change list is not already submitted.
    @@ -248,10 +249,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
               1, (long)((java.lang.Long) kind_));
         }
         if (kindCase_ == 2) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, kind_);
    +      com.google.protobuf.GeneratedMessage.writeString(output, 2, kind_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(snapshot_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, snapshot_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(snapshot_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 3, snapshot_);
         }
         if (pendingChangelist_ != 0L) {
           output.writeInt64(4, pendingChangelist_);
    @@ -271,10 +272,10 @@ public int getSerializedSize() {
                 1, (long)((java.lang.Long) kind_));
         }
         if (kindCase_ == 2) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, kind_);
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(2, kind_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(snapshot_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, snapshot_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(snapshot_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(3, snapshot_);
         }
         if (pendingChangelist_ != 0L) {
           size += com.google.protobuf.CodedOutputStream
    @@ -380,39 +381,41 @@ public static org.tensorflow.proto.CommitId parseFrom(
       }
       public static org.tensorflow.proto.CommitId parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.CommitId parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.CommitId parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.CommitId parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.CommitId parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.CommitId parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -432,7 +435,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -440,7 +443,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.CommitId}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.CommitId)
           org.tensorflow.proto.CommitIdOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -449,7 +452,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_CommitId_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -462,17 +465,16 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           snapshot_ = "";
    -
           pendingChangelist_ = 0L;
    -
           kindCase_ = 0;
           kind_ = null;
           return this;
    @@ -501,51 +503,27 @@ public org.tensorflow.proto.CommitId build() {
         @java.lang.Override
         public org.tensorflow.proto.CommitId buildPartial() {
           org.tensorflow.proto.CommitId result = new org.tensorflow.proto.CommitId(this);
    -      if (kindCase_ == 1) {
    -        result.kind_ = kind_;
    -      }
    -      if (kindCase_ == 2) {
    -        result.kind_ = kind_;
    -      }
    -      result.snapshot_ = snapshot_;
    -      result.pendingChangelist_ = pendingChangelist_;
    -      result.kindCase_ = kindCase_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      buildPartialOneofs(result);
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    +    private void buildPartial0(org.tensorflow.proto.CommitId result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.snapshot_ = snapshot_;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.pendingChangelist_ = pendingChangelist_;
    +      }
         }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +
    +    private void buildPartialOneofs(org.tensorflow.proto.CommitId result) {
    +      result.kindCase_ = kindCase_;
    +      result.kind_ = this.kind_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.CommitId) {
    @@ -560,6 +538,7 @@ public Builder mergeFrom(org.tensorflow.proto.CommitId other) {
           if (other == org.tensorflow.proto.CommitId.getDefaultInstance()) return this;
           if (!other.getSnapshot().isEmpty()) {
             snapshot_ = other.snapshot_;
    +        bitField0_ |= 0x00000004;
             onChanged();
           }
           if (other.getPendingChangelist() != 0L) {
    @@ -619,12 +598,12 @@ public Builder mergeFrom(
                 } // case 18
                 case 26: {
                   snapshot_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 26
                 case 32: {
                   pendingChangelist_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 32
                 default: {
    @@ -657,6 +636,7 @@ public Builder clearKind() {
           return this;
         }
     
    +    private int bitField0_;
     
         /**
          * 
    @@ -693,6 +673,7 @@ public long getChangelist() {
          * @return This builder for chaining.
          */
         public Builder setChangelist(long value) {
    +
           kindCase_ = 1;
           kind_ = value;
           onChanged();
    @@ -775,10 +756,8 @@ public java.lang.String getHash() {
          */
         public Builder setHash(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  kindCase_ = 2;
    +      if (value == null) { throw new NullPointerException(); }
    +      kindCase_ = 2;
           kind_ = value;
           onChanged();
           return this;
    @@ -802,10 +781,8 @@ public Builder clearHash() {
          */
         public Builder setHashBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           kindCase_ = 2;
           kind_ = value;
           onChanged();
    @@ -868,11 +845,9 @@ public java.lang.String getSnapshot() {
          */
         public Builder setSnapshot(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           snapshot_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -886,8 +861,8 @@ public Builder setSnapshot(
          * @return This builder for chaining.
          */
         public Builder clearSnapshot() {
    -      
           snapshot_ = getDefaultInstance().getSnapshot();
    +      bitField0_ = (bitField0_ & ~0x00000004);
           onChanged();
           return this;
         }
    @@ -903,12 +878,10 @@ public Builder clearSnapshot() {
          */
         public Builder setSnapshotBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           snapshot_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -936,8 +909,9 @@ public long getPendingChangelist() {
          * @return This builder for chaining.
          */
         public Builder setPendingChangelist(long value) {
    -      
    +
           pendingChangelist_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -950,23 +924,11 @@ public Builder setPendingChangelist(long value) {
          * @return This builder for chaining.
          */
         public Builder clearPendingChangelist() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000008);
           pendingChangelist_ = 0L;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.CommitId)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CommitIdOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CommitIdOrBuilder.java
    index cb78f3bd9d2..0975a2c537f 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CommitIdOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CommitIdOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: xla/tsl/protobuf/test_log.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -75,5 +77,5 @@ public interface CommitIdOrBuilder extends
        */
       long getPendingChangelist();
     
    -  public org.tensorflow.proto.CommitId.KindCase getKindCase();
    +  org.tensorflow.proto.CommitId.KindCase getKindCase();
     }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CompositeTensorVariant.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CompositeTensorVariant.java
    index a2630d9ac0e..80fd1875558 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CompositeTensorVariant.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CompositeTensorVariant.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/composite_tensor_variant.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class CompositeTensorVariant {
       private CompositeTensorVariant() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      CompositeTensorVariant.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -36,6 +47,7 @@ public interface CompositeTensorVariantMetadataOrBuilder extends
       /**
        * 
        * Metadata for CompositeTensorVariant, used when serializing as Variant.
    +   *
        * We define a new message here (rather than directly using TypeSpecProto for
        * the metadata string) to retain flexibility to change the metadata encoding
        * to support additional features.
    @@ -44,42 +56,40 @@ public interface CompositeTensorVariantMetadataOrBuilder extends
        * Protobuf type {@code tensorflow.CompositeTensorVariantMetadata}
        */
       public static final class CompositeTensorVariantMetadata extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.CompositeTensorVariantMetadata)
           CompositeTensorVariantMetadataOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        CompositeTensorVariantMetadata.class.getName());
    +    }
         // Use CompositeTensorVariantMetadata.newBuilder() to construct.
    -    private CompositeTensorVariantMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private CompositeTensorVariantMetadata(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private CompositeTensorVariantMetadata() {
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new CompositeTensorVariantMetadata();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.CompositeTensorVariant.internal_static_tensorflow_CompositeTensorVariantMetadata_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.CompositeTensorVariant.internal_static_tensorflow_CompositeTensorVariantMetadata_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
                   org.tensorflow.proto.CompositeTensorVariant.CompositeTensorVariantMetadata.class, org.tensorflow.proto.CompositeTensorVariant.CompositeTensorVariantMetadata.Builder.class);
         }
     
    +    private int bitField0_;
         public static final int TYPE_SPEC_PROTO_FIELD_NUMBER = 1;
         private org.tensorflow.proto.Struct.TypeSpecProto typeSpecProto_;
         /**
    @@ -88,7 +98,7 @@ protected java.lang.Object newInstance(
          */
         @java.lang.Override
         public boolean hasTypeSpecProto() {
    -      return typeSpecProto_ != null;
    +      return ((bitField0_ & 0x00000001) != 0);
         }
         /**
          * .tensorflow.TypeSpecProto type_spec_proto = 1;
    @@ -103,7 +113,7 @@ public org.tensorflow.proto.Struct.TypeSpecProto getTypeSpecProto() {
          */
         @java.lang.Override
         public org.tensorflow.proto.Struct.TypeSpecProtoOrBuilder getTypeSpecProtoOrBuilder() {
    -      return getTypeSpecProto();
    +      return typeSpecProto_ == null ? org.tensorflow.proto.Struct.TypeSpecProto.getDefaultInstance() : typeSpecProto_;
         }
     
         private byte memoizedIsInitialized = -1;
    @@ -120,7 +130,7 @@ public final boolean isInitialized() {
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output)
                             throws java.io.IOException {
    -      if (typeSpecProto_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             output.writeMessage(1, getTypeSpecProto());
           }
           getUnknownFields().writeTo(output);
    @@ -132,7 +142,7 @@ public int getSerializedSize() {
           if (size != -1) return size;
     
           size = 0;
    -      if (typeSpecProto_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(1, getTypeSpecProto());
           }
    @@ -210,39 +220,41 @@ public static org.tensorflow.proto.CompositeTensorVariant.CompositeTensorVariant
         }
         public static org.tensorflow.proto.CompositeTensorVariant.CompositeTensorVariantMetadata parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.CompositeTensorVariant.CompositeTensorVariantMetadata parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.CompositeTensorVariant.CompositeTensorVariantMetadata parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.CompositeTensorVariant.CompositeTensorVariantMetadata parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.CompositeTensorVariant.CompositeTensorVariantMetadata parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.CompositeTensorVariant.CompositeTensorVariantMetadata parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -262,13 +274,14 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
         /**
          * 
          * Metadata for CompositeTensorVariant, used when serializing as Variant.
    +     *
          * We define a new message here (rather than directly using TypeSpecProto for
          * the metadata string) to retain flexibility to change the metadata encoding
          * to support additional features.
    @@ -277,7 +290,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.CompositeTensorVariantMetadata}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.CompositeTensorVariantMetadata)
             org.tensorflow.proto.CompositeTensorVariant.CompositeTensorVariantMetadataOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -286,7 +299,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.CompositeTensorVariant.internal_static_tensorflow_CompositeTensorVariantMetadata_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -295,21 +308,27 @@ public static final class Builder extends
     
           // Construct using org.tensorflow.proto.CompositeTensorVariant.CompositeTensorVariantMetadata.newBuilder()
           private Builder() {
    -
    +        maybeForceBuilderInitialization();
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
    -
    +        maybeForceBuilderInitialization();
    +      }
    +      private void maybeForceBuilderInitialization() {
    +        if (com.google.protobuf.GeneratedMessage
    +                .alwaysUseFieldBuilders) {
    +          getTypeSpecProtoFieldBuilder();
    +        }
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    -        if (typeSpecProtoBuilder_ == null) {
    -          typeSpecProto_ = null;
    -        } else {
    -          typeSpecProto_ = null;
    +        bitField0_ = 0;
    +        typeSpecProto_ = null;
    +        if (typeSpecProtoBuilder_ != null) {
    +          typeSpecProtoBuilder_.dispose();
               typeSpecProtoBuilder_ = null;
             }
             return this;
    @@ -338,47 +357,23 @@ public org.tensorflow.proto.CompositeTensorVariant.CompositeTensorVariantMetadat
           @java.lang.Override
           public org.tensorflow.proto.CompositeTensorVariant.CompositeTensorVariantMetadata buildPartial() {
             org.tensorflow.proto.CompositeTensorVariant.CompositeTensorVariantMetadata result = new org.tensorflow.proto.CompositeTensorVariant.CompositeTensorVariantMetadata(this);
    -        if (typeSpecProtoBuilder_ == null) {
    -          result.typeSpecProto_ = typeSpecProto_;
    -        } else {
    -          result.typeSpecProto_ = typeSpecProtoBuilder_.build();
    -        }
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.CompositeTensorVariant.CompositeTensorVariantMetadata result) {
    +        int from_bitField0_ = bitField0_;
    +        int to_bitField0_ = 0;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.typeSpecProto_ = typeSpecProtoBuilder_ == null
    +              ? typeSpecProto_
    +              : typeSpecProtoBuilder_.build();
    +          to_bitField0_ |= 0x00000001;
    +        }
    +        result.bitField0_ |= to_bitField0_;
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.CompositeTensorVariant.CompositeTensorVariantMetadata) {
    @@ -424,7 +419,7 @@ public Builder mergeFrom(
                     input.readMessage(
                         getTypeSpecProtoFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 10
                   default: {
    @@ -442,16 +437,17 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    +      private int bitField0_;
     
           private org.tensorflow.proto.Struct.TypeSpecProto typeSpecProto_;
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Struct.TypeSpecProto, org.tensorflow.proto.Struct.TypeSpecProto.Builder, org.tensorflow.proto.Struct.TypeSpecProtoOrBuilder> typeSpecProtoBuilder_;
           /**
            * .tensorflow.TypeSpecProto type_spec_proto = 1;
            * @return Whether the typeSpecProto field is set.
            */
           public boolean hasTypeSpecProto() {
    -        return typeSpecProtoBuilder_ != null || typeSpecProto_ != null;
    +        return ((bitField0_ & 0x00000001) != 0);
           }
           /**
            * .tensorflow.TypeSpecProto type_spec_proto = 1;
    @@ -473,11 +469,11 @@ public Builder setTypeSpecProto(org.tensorflow.proto.Struct.TypeSpecProto value)
                 throw new NullPointerException();
               }
               typeSpecProto_ = value;
    -          onChanged();
             } else {
               typeSpecProtoBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000001;
    +        onChanged();
             return this;
           }
           /**
    @@ -487,11 +483,11 @@ public Builder setTypeSpecProto(
               org.tensorflow.proto.Struct.TypeSpecProto.Builder builderForValue) {
             if (typeSpecProtoBuilder_ == null) {
               typeSpecProto_ = builderForValue.build();
    -          onChanged();
             } else {
               typeSpecProtoBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000001;
    +        onChanged();
             return this;
           }
           /**
    @@ -499,38 +495,40 @@ public Builder setTypeSpecProto(
            */
           public Builder mergeTypeSpecProto(org.tensorflow.proto.Struct.TypeSpecProto value) {
             if (typeSpecProtoBuilder_ == null) {
    -          if (typeSpecProto_ != null) {
    -            typeSpecProto_ =
    -              org.tensorflow.proto.Struct.TypeSpecProto.newBuilder(typeSpecProto_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000001) != 0) &&
    +            typeSpecProto_ != null &&
    +            typeSpecProto_ != org.tensorflow.proto.Struct.TypeSpecProto.getDefaultInstance()) {
    +            getTypeSpecProtoBuilder().mergeFrom(value);
               } else {
                 typeSpecProto_ = value;
               }
    -          onChanged();
             } else {
               typeSpecProtoBuilder_.mergeFrom(value);
             }
    -
    +        if (typeSpecProto_ != null) {
    +          bitField0_ |= 0x00000001;
    +          onChanged();
    +        }
             return this;
           }
           /**
            * .tensorflow.TypeSpecProto type_spec_proto = 1;
            */
           public Builder clearTypeSpecProto() {
    -        if (typeSpecProtoBuilder_ == null) {
    -          typeSpecProto_ = null;
    -          onChanged();
    -        } else {
    -          typeSpecProto_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000001);
    +        typeSpecProto_ = null;
    +        if (typeSpecProtoBuilder_ != null) {
    +          typeSpecProtoBuilder_.dispose();
               typeSpecProtoBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
            * .tensorflow.TypeSpecProto type_spec_proto = 1;
            */
           public org.tensorflow.proto.Struct.TypeSpecProto.Builder getTypeSpecProtoBuilder() {
    -        
    +        bitField0_ |= 0x00000001;
             onChanged();
             return getTypeSpecProtoFieldBuilder().getBuilder();
           }
    @@ -548,11 +546,11 @@ public org.tensorflow.proto.Struct.TypeSpecProtoOrBuilder getTypeSpecProtoOrBuil
           /**
            * .tensorflow.TypeSpecProto type_spec_proto = 1;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Struct.TypeSpecProto, org.tensorflow.proto.Struct.TypeSpecProto.Builder, org.tensorflow.proto.Struct.TypeSpecProtoOrBuilder> 
               getTypeSpecProtoFieldBuilder() {
             if (typeSpecProtoBuilder_ == null) {
    -          typeSpecProtoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          typeSpecProtoBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.Struct.TypeSpecProto, org.tensorflow.proto.Struct.TypeSpecProto.Builder, org.tensorflow.proto.Struct.TypeSpecProtoOrBuilder>(
                       getTypeSpecProto(),
                       getParentForChildren(),
    @@ -561,18 +559,6 @@ public org.tensorflow.proto.Struct.TypeSpecProtoOrBuilder getTypeSpecProtoOrBuil
             }
             return typeSpecProtoBuilder_;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.CompositeTensorVariantMetadata)
         }
    @@ -628,7 +614,7 @@ public org.tensorflow.proto.CompositeTensorVariant.CompositeTensorVariantMetadat
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_CompositeTensorVariantMetadata_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_CompositeTensorVariantMetadata_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -656,9 +642,10 @@ public org.tensorflow.proto.CompositeTensorVariant.CompositeTensorVariantMetadat
         internal_static_tensorflow_CompositeTensorVariantMetadata_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_CompositeTensorVariantMetadata_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_CompositeTensorVariantMetadata_descriptor,
             new java.lang.String[] { "TypeSpecProto", });
    +    descriptor.resolveAllFeaturesImmutable();
         org.tensorflow.proto.Struct.getDescriptor();
       }
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CondContextDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CondContextDef.java
    index e985c3683cc..a75ca0e43fb 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CondContextDef.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CondContextDef.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/control_flow.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,12 +13,21 @@
      * Protobuf type {@code tensorflow.CondContextDef}
      */
     public final class CondContextDef extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.CondContextDef)
         CondContextDefOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      CondContextDef.class.getName());
    +  }
       // Use CondContextDef.newBuilder() to construct.
    -  private CondContextDef(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private CondContextDef(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private CondContextDef() {
    @@ -26,33 +37,23 @@ private CondContextDef() {
         nestedContexts_ = java.util.Collections.emptyList();
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new CondContextDef();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.ControlFlowProtos.internal_static_tensorflow_CondContextDef_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.ControlFlowProtos.internal_static_tensorflow_CondContextDef_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
                 org.tensorflow.proto.CondContextDef.class, org.tensorflow.proto.CondContextDef.Builder.class);
       }
     
    +  private int bitField0_;
       public static final int CONTEXT_NAME_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object contextName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object contextName_ = "";
       /**
        * 
        * Name of the context.
    @@ -98,7 +99,8 @@ public java.lang.String getContextName() {
       }
     
       public static final int PRED_NAME_FIELD_NUMBER = 2;
    -  private volatile java.lang.Object predName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object predName_ = "";
       /**
        * 
        * Name of the pred tensor.
    @@ -144,7 +146,8 @@ public java.lang.String getPredName() {
       }
     
       public static final int PIVOT_NAME_FIELD_NUMBER = 3;
    -  private volatile java.lang.Object pivotName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object pivotName_ = "";
       /**
        * 
        * Name of the pivot tensor.
    @@ -190,7 +193,7 @@ public java.lang.String getPivotName() {
       }
     
       public static final int BRANCH_FIELD_NUMBER = 4;
    -  private int branch_;
    +  private int branch_ = 0;
       /**
        * 
        * Branch prediction. 0 or 1.
    @@ -216,7 +219,7 @@ public int getBranch() {
        */
       @java.lang.Override
       public boolean hasValuesDef() {
    -    return valuesDef_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * 
    @@ -239,10 +242,11 @@ public org.tensorflow.proto.ValuesDef getValuesDef() {
        */
       @java.lang.Override
       public org.tensorflow.proto.ValuesDefOrBuilder getValuesDefOrBuilder() {
    -    return getValuesDef();
    +    return valuesDef_ == null ? org.tensorflow.proto.ValuesDef.getDefaultInstance() : valuesDef_;
       }
     
       public static final int NESTED_CONTEXTS_FIELD_NUMBER = 6;
    +  @SuppressWarnings("serial")
       private java.util.List nestedContexts_;
       /**
        * 
    @@ -316,19 +320,19 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contextName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, contextName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(contextName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, contextName_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(predName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, predName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(predName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 2, predName_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pivotName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pivotName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pivotName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 3, pivotName_);
         }
         if (branch_ != 0) {
           output.writeInt32(4, branch_);
         }
    -    if (valuesDef_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(5, getValuesDef());
         }
         for (int i = 0; i < nestedContexts_.size(); i++) {
    @@ -343,20 +347,20 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contextName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, contextName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(contextName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, contextName_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(predName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, predName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(predName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(2, predName_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pivotName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pivotName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pivotName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pivotName_);
         }
         if (branch_ != 0) {
           size += com.google.protobuf.CodedOutputStream
             .computeInt32Size(4, branch_);
         }
    -    if (valuesDef_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(5, getValuesDef());
         }
    @@ -460,39 +464,41 @@ public static org.tensorflow.proto.CondContextDef parseFrom(
       }
       public static org.tensorflow.proto.CondContextDef parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.CondContextDef parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.CondContextDef parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.CondContextDef parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.CondContextDef parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.CondContextDef parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -512,7 +518,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -524,7 +530,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.CondContextDef}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.CondContextDef)
           org.tensorflow.proto.CondContextDefOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -533,7 +539,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.ControlFlowProtos.internal_static_tensorflow_CondContextDef_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -542,29 +548,32 @@ public static final class Builder extends
     
         // Construct using org.tensorflow.proto.CondContextDef.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getValuesDefFieldBuilder();
    +        getNestedContextsFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           contextName_ = "";
    -
           predName_ = "";
    -
           pivotName_ = "";
    -
           branch_ = 0;
    -
    -      if (valuesDefBuilder_ == null) {
    -        valuesDef_ = null;
    -      } else {
    -        valuesDef_ = null;
    +      valuesDef_ = null;
    +      if (valuesDefBuilder_ != null) {
    +        valuesDefBuilder_.dispose();
             valuesDefBuilder_ = null;
           }
           if (nestedContextsBuilder_ == null) {
    @@ -573,7 +582,7 @@ public Builder clear() {
             nestedContexts_ = null;
             nestedContextsBuilder_.clear();
           }
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      bitField0_ = (bitField0_ & ~0x00000020);
           return this;
         }
     
    @@ -600,61 +609,48 @@ public org.tensorflow.proto.CondContextDef build() {
         @java.lang.Override
         public org.tensorflow.proto.CondContextDef buildPartial() {
           org.tensorflow.proto.CondContextDef result = new org.tensorflow.proto.CondContextDef(this);
    -      int from_bitField0_ = bitField0_;
    -      result.contextName_ = contextName_;
    -      result.predName_ = predName_;
    -      result.pivotName_ = pivotName_;
    -      result.branch_ = branch_;
    -      if (valuesDefBuilder_ == null) {
    -        result.valuesDef_ = valuesDef_;
    -      } else {
    -        result.valuesDef_ = valuesDefBuilder_.build();
    -      }
    +      buildPartialRepeatedFields(result);
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartialRepeatedFields(org.tensorflow.proto.CondContextDef result) {
           if (nestedContextsBuilder_ == null) {
    -        if (((bitField0_ & 0x00000001) != 0)) {
    +        if (((bitField0_ & 0x00000020) != 0)) {
               nestedContexts_ = java.util.Collections.unmodifiableList(nestedContexts_);
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ = (bitField0_ & ~0x00000020);
             }
             result.nestedContexts_ = nestedContexts_;
           } else {
             result.nestedContexts_ = nestedContextsBuilder_.build();
           }
    -      onBuilt();
    -      return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.CondContextDef result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.contextName_ = contextName_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.predName_ = predName_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.pivotName_ = pivotName_;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.branch_ = branch_;
    +      }
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000010) != 0)) {
    +        result.valuesDef_ = valuesDefBuilder_ == null
    +            ? valuesDef_
    +            : valuesDefBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
    +      }
    +      result.bitField0_ |= to_bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.CondContextDef) {
    @@ -669,14 +665,17 @@ public Builder mergeFrom(org.tensorflow.proto.CondContextDef other) {
           if (other == org.tensorflow.proto.CondContextDef.getDefaultInstance()) return this;
           if (!other.getContextName().isEmpty()) {
             contextName_ = other.contextName_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (!other.getPredName().isEmpty()) {
             predName_ = other.predName_;
    +        bitField0_ |= 0x00000002;
             onChanged();
           }
           if (!other.getPivotName().isEmpty()) {
             pivotName_ = other.pivotName_;
    +        bitField0_ |= 0x00000004;
             onChanged();
           }
           if (other.getBranch() != 0) {
    @@ -689,7 +688,7 @@ public Builder mergeFrom(org.tensorflow.proto.CondContextDef other) {
             if (!other.nestedContexts_.isEmpty()) {
               if (nestedContexts_.isEmpty()) {
                 nestedContexts_ = other.nestedContexts_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000020);
               } else {
                 ensureNestedContextsIsMutable();
                 nestedContexts_.addAll(other.nestedContexts_);
    @@ -702,9 +701,9 @@ public Builder mergeFrom(org.tensorflow.proto.CondContextDef other) {
                 nestedContextsBuilder_.dispose();
                 nestedContextsBuilder_ = null;
                 nestedContexts_ = other.nestedContexts_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000020);
                 nestedContextsBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getNestedContextsFieldBuilder() : null;
               } else {
                 nestedContextsBuilder_.addAllMessages(other.nestedContexts_);
    @@ -739,29 +738,29 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   contextName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
                   predName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 case 26: {
                   pivotName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 26
                 case 32: {
                   branch_ = input.readInt32();
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 32
                 case 42: {
                   input.readMessage(
                       getValuesDefFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000010;
                   break;
                 } // case 42
                 case 50: {
    @@ -847,11 +846,9 @@ public java.lang.String getContextName() {
          */
         public Builder setContextName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           contextName_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -864,8 +861,8 @@ public Builder setContextName(
          * @return This builder for chaining.
          */
         public Builder clearContextName() {
    -      
           contextName_ = getDefaultInstance().getContextName();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -880,12 +877,10 @@ public Builder clearContextName() {
          */
         public Builder setContextNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           contextName_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -943,11 +938,9 @@ public java.lang.String getPredName() {
          */
         public Builder setPredName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           predName_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -960,8 +953,8 @@ public Builder setPredName(
          * @return This builder for chaining.
          */
         public Builder clearPredName() {
    -      
           predName_ = getDefaultInstance().getPredName();
    +      bitField0_ = (bitField0_ & ~0x00000002);
           onChanged();
           return this;
         }
    @@ -976,12 +969,10 @@ public Builder clearPredName() {
          */
         public Builder setPredNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           predName_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -1039,11 +1030,9 @@ public java.lang.String getPivotName() {
          */
         public Builder setPivotName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           pivotName_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -1056,8 +1045,8 @@ public Builder setPivotName(
          * @return This builder for chaining.
          */
         public Builder clearPivotName() {
    -      
           pivotName_ = getDefaultInstance().getPivotName();
    +      bitField0_ = (bitField0_ & ~0x00000004);
           onChanged();
           return this;
         }
    @@ -1072,12 +1061,10 @@ public Builder clearPivotName() {
          */
         public Builder setPivotNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           pivotName_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -1105,8 +1092,9 @@ public int getBranch() {
          * @return This builder for chaining.
          */
         public Builder setBranch(int value) {
    -      
    +
           branch_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -1119,14 +1107,14 @@ public Builder setBranch(int value) {
          * @return This builder for chaining.
          */
         public Builder clearBranch() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000008);
           branch_ = 0;
           onChanged();
           return this;
         }
     
         private org.tensorflow.proto.ValuesDef valuesDef_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.ValuesDef, org.tensorflow.proto.ValuesDef.Builder, org.tensorflow.proto.ValuesDefOrBuilder> valuesDefBuilder_;
         /**
          * 
    @@ -1137,7 +1125,7 @@ public Builder clearBranch() {
          * @return Whether the valuesDef field is set.
          */
         public boolean hasValuesDef() {
    -      return valuesDefBuilder_ != null || valuesDef_ != null;
    +      return ((bitField0_ & 0x00000010) != 0);
         }
         /**
          * 
    @@ -1167,11 +1155,11 @@ public Builder setValuesDef(org.tensorflow.proto.ValuesDef value) {
               throw new NullPointerException();
             }
             valuesDef_ = value;
    -        onChanged();
           } else {
             valuesDefBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000010;
    +      onChanged();
           return this;
         }
         /**
    @@ -1185,11 +1173,11 @@ public Builder setValuesDef(
             org.tensorflow.proto.ValuesDef.Builder builderForValue) {
           if (valuesDefBuilder_ == null) {
             valuesDef_ = builderForValue.build();
    -        onChanged();
           } else {
             valuesDefBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000010;
    +      onChanged();
           return this;
         }
         /**
    @@ -1201,17 +1189,20 @@ public Builder setValuesDef(
          */
         public Builder mergeValuesDef(org.tensorflow.proto.ValuesDef value) {
           if (valuesDefBuilder_ == null) {
    -        if (valuesDef_ != null) {
    -          valuesDef_ =
    -            org.tensorflow.proto.ValuesDef.newBuilder(valuesDef_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000010) != 0) &&
    +          valuesDef_ != null &&
    +          valuesDef_ != org.tensorflow.proto.ValuesDef.getDefaultInstance()) {
    +          getValuesDefBuilder().mergeFrom(value);
             } else {
               valuesDef_ = value;
             }
    -        onChanged();
           } else {
             valuesDefBuilder_.mergeFrom(value);
           }
    -
    +      if (valuesDef_ != null) {
    +        bitField0_ |= 0x00000010;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -1222,14 +1213,13 @@ public Builder mergeValuesDef(org.tensorflow.proto.ValuesDef value) {
          * .tensorflow.ValuesDef values_def = 5;
          */
         public Builder clearValuesDef() {
    -      if (valuesDefBuilder_ == null) {
    -        valuesDef_ = null;
    -        onChanged();
    -      } else {
    -        valuesDef_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000010);
    +      valuesDef_ = null;
    +      if (valuesDefBuilder_ != null) {
    +        valuesDefBuilder_.dispose();
             valuesDefBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -1240,7 +1230,7 @@ public Builder clearValuesDef() {
          * .tensorflow.ValuesDef values_def = 5;
          */
         public org.tensorflow.proto.ValuesDef.Builder getValuesDefBuilder() {
    -      
    +      bitField0_ |= 0x00000010;
           onChanged();
           return getValuesDefFieldBuilder().getBuilder();
         }
    @@ -1266,11 +1256,11 @@ public org.tensorflow.proto.ValuesDefOrBuilder getValuesDefOrBuilder() {
          *
          * .tensorflow.ValuesDef values_def = 5;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.ValuesDef, org.tensorflow.proto.ValuesDef.Builder, org.tensorflow.proto.ValuesDefOrBuilder> 
             getValuesDefFieldBuilder() {
           if (valuesDefBuilder_ == null) {
    -        valuesDefBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        valuesDefBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.ValuesDef, org.tensorflow.proto.ValuesDef.Builder, org.tensorflow.proto.ValuesDefOrBuilder>(
                     getValuesDef(),
                     getParentForChildren(),
    @@ -1283,13 +1273,13 @@ public org.tensorflow.proto.ValuesDefOrBuilder getValuesDefOrBuilder() {
         private java.util.List nestedContexts_ =
           java.util.Collections.emptyList();
         private void ensureNestedContextsIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    +      if (!((bitField0_ & 0x00000020) != 0)) {
             nestedContexts_ = new java.util.ArrayList(nestedContexts_);
    -        bitField0_ |= 0x00000001;
    +        bitField0_ |= 0x00000020;
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.ControlFlowContextDef, org.tensorflow.proto.ControlFlowContextDef.Builder, org.tensorflow.proto.ControlFlowContextDefOrBuilder> nestedContextsBuilder_;
     
         /**
    @@ -1479,7 +1469,7 @@ public Builder addAllNestedContexts(
         public Builder clearNestedContexts() {
           if (nestedContextsBuilder_ == null) {
             nestedContexts_ = java.util.Collections.emptyList();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        bitField0_ = (bitField0_ & ~0x00000020);
             onChanged();
           } else {
             nestedContextsBuilder_.clear();
    @@ -1577,32 +1567,20 @@ public org.tensorflow.proto.ControlFlowContextDef.Builder addNestedContextsBuild
              getNestedContextsBuilderList() {
           return getNestedContextsFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.ControlFlowContextDef, org.tensorflow.proto.ControlFlowContextDef.Builder, org.tensorflow.proto.ControlFlowContextDefOrBuilder> 
             getNestedContextsFieldBuilder() {
           if (nestedContextsBuilder_ == null) {
    -        nestedContextsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        nestedContextsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.ControlFlowContextDef, org.tensorflow.proto.ControlFlowContextDef.Builder, org.tensorflow.proto.ControlFlowContextDefOrBuilder>(
                     nestedContexts_,
    -                ((bitField0_ & 0x00000001) != 0),
    +                ((bitField0_ & 0x00000020) != 0),
                     getParentForChildren(),
                     isClean());
             nestedContexts_ = null;
           }
           return nestedContextsBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.CondContextDef)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CondContextDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CondContextDefOrBuilder.java
    index c995a5f46a1..e136d8849da 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CondContextDefOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CondContextDefOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/control_flow.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ConfigProto.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ConfigProto.java
    index 5dcca1ed5f7..08d6ec83d47 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ConfigProto.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ConfigProto.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/config.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -12,31 +14,29 @@
      * Protobuf type {@code tensorflow.ConfigProto}
      */
     public final class ConfigProto extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.ConfigProto)
         ConfigProtoOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      ConfigProto.class.getName());
    +  }
       // Use ConfigProto.newBuilder() to construct.
    -  private ConfigProto(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private ConfigProto(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private ConfigProto() {
         sessionInterOpThreadPool_ = java.util.Collections.emptyList();
    -    deviceFilters_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -  }
    -
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new ConfigProto();
    +    deviceFilters_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
       }
     
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_ConfigProto_descriptor;
    @@ -44,7 +44,7 @@ protected java.lang.Object newInstance(
     
       @SuppressWarnings({"rawtypes"})
       @java.lang.Override
    -  protected com.google.protobuf.MapField internalGetMapField(
    +  protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
           int number) {
         switch (number) {
           case 1:
    @@ -55,7 +55,7 @@ protected com.google.protobuf.MapField internalGetMapField(
         }
       }
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_ConfigProto_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -159,6 +159,7 @@ public interface ExperimentalOrBuilder extends
          * In the following, session state means the value of a variable, elements
          * in a hash table, or any other resource, accessible by worker sessions
          * held by a TF server.
    +     *
          * When ClusterSpec propagation is enabled, the value of
          * isolate_session_state is ignored when deciding whether to share session
          * states in a TF server (for backwards compatibility reasons).
    @@ -166,11 +167,13 @@ public interface ExperimentalOrBuilder extends
          * states are shared.
          * - If share_session_state_in_clusterspec_propagation is false, session
          * states are isolated.
    +     *
          * When clusterspec propagation is not used, the value of
          * share_session_state_in_clusterspec_propagation is ignored when deciding
          * whether to share session states in a TF server.
          * - If isolate_session_state is true, session states are isolated.
          * - If isolate_session_state is false, session states are shared.
    +     *
          * TODO(b/129330037): Add a single API that consistently treats
          * isolate_session_state and ClusterSpec propagation.
          * 
    @@ -207,8 +210,10 @@ public interface ExperimentalOrBuilder extends /** *
          * Metadata about the session.
    +     *
          * If set, this can be used by the runtime and the Ops for debugging,
          * monitoring, etc.
    +     *
          * NOTE: This is currently used and propagated only by the direct session
          * and EagerContext.
          * 
    @@ -220,8 +225,10 @@ public interface ExperimentalOrBuilder extends /** *
          * Metadata about the session.
    +     *
          * If set, this can be used by the runtime and the Ops for debugging,
          * monitoring, etc.
    +     *
          * NOTE: This is currently used and propagated only by the direct session
          * and EagerContext.
          * 
    @@ -233,8 +240,10 @@ public interface ExperimentalOrBuilder extends /** *
          * Metadata about the session.
    +     *
          * If set, this can be used by the runtime and the Ops for debugging,
          * monitoring, etc.
    +     *
          * NOTE: This is currently used and propagated only by the direct session
          * and EagerContext.
          * 
    @@ -247,6 +256,7 @@ public interface ExperimentalOrBuilder extends *
          * If true, the session may treat the graph as being static for optimization
          * purposes.
    +     *
          * If this option is set to true when a session is created, the full
          * GraphDef must be passed in a single call to Session::Create(), and
          * Session::Extend() may not be supported.
    @@ -262,6 +272,7 @@ public interface ExperimentalOrBuilder extends
          * Whether to enable the MLIR-based TF->XLA bridge. This is only used if set
          * to true. Default value or false is ignored. Use mlir_bridge_rollout for
          * finer control.
    +     *
          * If this option is set to true when a session is created, MLIR is used to
          * perform the set of graph transformations to put the graph in a form that
          * can be executed with delegation of some computations to an accelerator.
    @@ -298,6 +309,7 @@ public interface ExperimentalOrBuilder extends
         /**
          * 
          * Whether to enable the MLIR-based Graph optimizations.
    +     *
          * This will become a part of standard Tensorflow graph optimization
          * pipeline, currently this is only used for gradual migration and testing
          * new passes that are replacing existing optimizations in Grappler.
    @@ -312,6 +324,7 @@ public interface ExperimentalOrBuilder extends
          * 
          * If true, the session will not store an additional copy of the graph for
          * each subgraph.
    +     *
          * If this option is set to true when a session is created, the
          * `RunOptions.output_partition_graphs` options must not be set.
          * 
    @@ -325,6 +338,7 @@ public interface ExperimentalOrBuilder extends *
          * Minimum number of batches run through the XLA graph before XLA fusion
          * autotuner is enabled. Default value of zero disables the autotuner.
    +     *
          * The XLA fusion autotuner can improve performance by executing a heuristic
          * search on the compiler parameters.
          * 
    @@ -424,7 +438,7 @@ public interface ExperimentalOrBuilder extends /** *
          * Provides a hint to XLA auto clustering to prefer forming a single large
    -     * cluster that encompases most of the graph.
    +     * cluster that encompasses most of the graph.
          * 
    * * bool xla_prefer_single_graph_cluster = 22; @@ -463,9 +477,11 @@ public interface ExperimentalOrBuilder extends *
          * If true, the session will treat the graph as being non-static for
          * optimization purposes.
    +     *
          * If this option is set to true when a session is created, the full
          * GraphDef will be retained to enable calls to Session::Extend().
          * Calling Extend() without setting this flag will result in errors.
    +     *
          * This option is meant to replace `optimize_for_static_graph` and it
          * aims to negate its value.
          * 
    @@ -486,23 +502,54 @@ public interface ExperimentalOrBuilder extends * @return The disableEagerExecutorStreamingEnqueue. */ boolean getDisableEagerExecutorStreamingEnqueue(); + + /** + *
    +     * If true, the function library runtime will be finalized when the session
    +     * is finalized.
    +     * 
    + * + * bool finalize_function_library_runtime = 33; + * @return The finalizeFunctionLibraryRuntime. + */ + boolean getFinalizeFunctionLibraryRuntime(); + + /** + *
    +     * If true, the resource manager will be finalized when the session
    +     * is finalized.
    +     * 
    + * + * bool finalize_resource_manager = 34; + * @return The finalizeResourceManager. + */ + boolean getFinalizeResourceManager(); } /** *
        * Everything inside Experimental is subject to change and is not subject
        * to API stability guarantees in
    -   * https://www.tensorflow.org/guide/version_compat.
    +   * https://www.tensorflow.org/guide/versions.
        * 
    * * Protobuf type {@code tensorflow.ConfigProto.Experimental} */ public static final class Experimental extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.ConfigProto.Experimental) ExperimentalOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + Experimental.class.getName()); + } // Use Experimental.newBuilder() to construct. - private Experimental(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Experimental(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Experimental() { @@ -511,25 +558,13 @@ private Experimental() { mlirBridgeRollout_ = 0; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Experimental(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_ConfigProto_Experimental_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_ConfigProto_Experimental_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -573,6 +608,15 @@ public enum MlirBridgeRollout UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + MlirBridgeRollout.class.getName()); + } /** *
            * If this field is left unspecified, the MLIR bridge may be selectively
    @@ -683,8 +727,10 @@ private MlirBridgeRollout(int value) {
           // @@protoc_insertion_point(enum_scope:tensorflow.ConfigProto.Experimental.MlirBridgeRollout)
         }
     
    +    private int bitField0_;
         public static final int COLLECTIVE_GROUP_LEADER_FIELD_NUMBER = 1;
    -    private volatile java.lang.Object collectiveGroupLeader_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object collectiveGroupLeader_ = "";
         /**
          * 
          * Task name for group resolution.
    @@ -730,7 +776,8 @@ public java.lang.String getCollectiveGroupLeader() {
         }
     
         public static final int EXECUTOR_TYPE_FIELD_NUMBER = 3;
    -    private volatile java.lang.Object executorType_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object executorType_ = "";
         /**
          * 
          * Which executor to use, the default executor will be used
    @@ -778,7 +825,7 @@ public java.lang.String getExecutorType() {
         }
     
         public static final int RECV_BUF_MAX_CHUNK_FIELD_NUMBER = 4;
    -    private int recvBufMaxChunk_;
    +    private int recvBufMaxChunk_ = 0;
         /**
          * 
          * Guidance to formatting of large RecvBuf fields for transfer.
    @@ -795,7 +842,7 @@ public int getRecvBufMaxChunk() {
         }
     
         public static final int USE_NUMA_AFFINITY_FIELD_NUMBER = 5;
    -    private boolean useNumaAffinity_;
    +    private boolean useNumaAffinity_ = false;
         /**
          * 
          * If true, and supported by the platform, the runtime will attempt to
    @@ -812,7 +859,7 @@ public boolean getUseNumaAffinity() {
         }
     
         public static final int COLLECTIVE_DETERMINISTIC_SEQUENTIAL_EXECUTION_FIELD_NUMBER = 6;
    -    private boolean collectiveDeterministicSequentialExecution_;
    +    private boolean collectiveDeterministicSequentialExecution_ = false;
         /**
          * 
          * If true, make collective op execution order sequential and deterministic
    @@ -828,7 +875,7 @@ public boolean getCollectiveDeterministicSequentialExecution() {
         }
     
         public static final int COLLECTIVE_NCCL_FIELD_NUMBER = 7;
    -    private boolean collectiveNccl_;
    +    private boolean collectiveNccl_ = false;
         /**
          * 
          * If true, use NCCL for CollectiveOps.  This feature is highly
    @@ -844,12 +891,13 @@ public boolean getCollectiveNccl() {
         }
     
         public static final int SHARE_SESSION_STATE_IN_CLUSTERSPEC_PROPAGATION_FIELD_NUMBER = 8;
    -    private boolean shareSessionStateInClusterspecPropagation_;
    +    private boolean shareSessionStateInClusterspecPropagation_ = false;
         /**
          * 
          * In the following, session state means the value of a variable, elements
          * in a hash table, or any other resource, accessible by worker sessions
          * held by a TF server.
    +     *
          * When ClusterSpec propagation is enabled, the value of
          * isolate_session_state is ignored when deciding whether to share session
          * states in a TF server (for backwards compatibility reasons).
    @@ -857,11 +905,13 @@ public boolean getCollectiveNccl() {
          * states are shared.
          * - If share_session_state_in_clusterspec_propagation is false, session
          * states are isolated.
    +     *
          * When clusterspec propagation is not used, the value of
          * share_session_state_in_clusterspec_propagation is ignored when deciding
          * whether to share session states in a TF server.
          * - If isolate_session_state is true, session states are isolated.
          * - If isolate_session_state is false, session states are shared.
    +     *
          * TODO(b/129330037): Add a single API that consistently treats
          * isolate_session_state and ClusterSpec propagation.
          * 
    @@ -875,7 +925,7 @@ public boolean getShareSessionStateInClusterspecPropagation() { } public static final int DISABLE_THREAD_SPINNING_FIELD_NUMBER = 9; - private boolean disableThreadSpinning_; + private boolean disableThreadSpinning_ = false; /** *
          * If using a direct session, disable spinning while waiting for work in
    @@ -893,7 +943,7 @@ public boolean getDisableThreadSpinning() {
         }
     
         public static final int SHARE_CLUSTER_DEVICES_IN_SESSION_FIELD_NUMBER = 10;
    -    private boolean shareClusterDevicesInSession_;
    +    private boolean shareClusterDevicesInSession_ = false;
         /**
          * 
          * This was promoted to a non-experimental API. Please use
    @@ -913,8 +963,10 @@ public boolean getShareClusterDevicesInSession() {
         /**
          * 
          * Metadata about the session.
    +     *
          * If set, this can be used by the runtime and the Ops for debugging,
          * monitoring, etc.
    +     *
          * NOTE: This is currently used and propagated only by the direct session
          * and EagerContext.
          * 
    @@ -924,13 +976,15 @@ public boolean getShareClusterDevicesInSession() { */ @java.lang.Override public boolean hasSessionMetadata() { - return sessionMetadata_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** *
          * Metadata about the session.
    +     *
          * If set, this can be used by the runtime and the Ops for debugging,
          * monitoring, etc.
    +     *
          * NOTE: This is currently used and propagated only by the direct session
          * and EagerContext.
          * 
    @@ -945,8 +999,10 @@ public org.tensorflow.proto.SessionMetadata getSessionMetadata() { /** *
          * Metadata about the session.
    +     *
          * If set, this can be used by the runtime and the Ops for debugging,
          * monitoring, etc.
    +     *
          * NOTE: This is currently used and propagated only by the direct session
          * and EagerContext.
          * 
    @@ -955,15 +1011,16 @@ public org.tensorflow.proto.SessionMetadata getSessionMetadata() { */ @java.lang.Override public org.tensorflow.proto.SessionMetadataOrBuilder getSessionMetadataOrBuilder() { - return getSessionMetadata(); + return sessionMetadata_ == null ? org.tensorflow.proto.SessionMetadata.getDefaultInstance() : sessionMetadata_; } public static final int OPTIMIZE_FOR_STATIC_GRAPH_FIELD_NUMBER = 12; - private boolean optimizeForStaticGraph_; + private boolean optimizeForStaticGraph_ = false; /** *
          * If true, the session may treat the graph as being static for optimization
          * purposes.
    +     *
          * If this option is set to true when a session is created, the full
          * GraphDef must be passed in a single call to Session::Create(), and
          * Session::Extend() may not be supported.
    @@ -978,12 +1035,13 @@ public boolean getOptimizeForStaticGraph() {
         }
     
         public static final int ENABLE_MLIR_BRIDGE_FIELD_NUMBER = 13;
    -    private boolean enableMlirBridge_;
    +    private boolean enableMlirBridge_ = false;
         /**
          * 
          * Whether to enable the MLIR-based TF->XLA bridge. This is only used if set
          * to true. Default value or false is ignored. Use mlir_bridge_rollout for
          * finer control.
    +     *
          * If this option is set to true when a session is created, MLIR is used to
          * perform the set of graph transformations to put the graph in a form that
          * can be executed with delegation of some computations to an accelerator.
    @@ -1002,7 +1060,7 @@ public boolean getEnableMlirBridge() {
         }
     
         public static final int MLIR_BRIDGE_ROLLOUT_FIELD_NUMBER = 17;
    -    private int mlirBridgeRollout_;
    +    private int mlirBridgeRollout_ = 0;
         /**
          * 
          * Whether to enable the MLIR-based TF->XLA bridge.
    @@ -1023,16 +1081,16 @@ public boolean getEnableMlirBridge() {
          * @return The mlirBridgeRollout.
          */
         @java.lang.Override public org.tensorflow.proto.ConfigProto.Experimental.MlirBridgeRollout getMlirBridgeRollout() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.ConfigProto.Experimental.MlirBridgeRollout result = org.tensorflow.proto.ConfigProto.Experimental.MlirBridgeRollout.valueOf(mlirBridgeRollout_);
    +      org.tensorflow.proto.ConfigProto.Experimental.MlirBridgeRollout result = org.tensorflow.proto.ConfigProto.Experimental.MlirBridgeRollout.forNumber(mlirBridgeRollout_);
           return result == null ? org.tensorflow.proto.ConfigProto.Experimental.MlirBridgeRollout.UNRECOGNIZED : result;
         }
     
         public static final int ENABLE_MLIR_GRAPH_OPTIMIZATION_FIELD_NUMBER = 16;
    -    private boolean enableMlirGraphOptimization_;
    +    private boolean enableMlirGraphOptimization_ = false;
         /**
          * 
          * Whether to enable the MLIR-based Graph optimizations.
    +     *
          * This will become a part of standard Tensorflow graph optimization
          * pipeline, currently this is only used for gradual migration and testing
          * new passes that are replacing existing optimizations in Grappler.
    @@ -1047,11 +1105,12 @@ public boolean getEnableMlirGraphOptimization() {
         }
     
         public static final int DISABLE_OUTPUT_PARTITION_GRAPHS_FIELD_NUMBER = 14;
    -    private boolean disableOutputPartitionGraphs_;
    +    private boolean disableOutputPartitionGraphs_ = false;
         /**
          * 
          * If true, the session will not store an additional copy of the graph for
          * each subgraph.
    +     *
          * If this option is set to true when a session is created, the
          * `RunOptions.output_partition_graphs` options must not be set.
          * 
    @@ -1065,11 +1124,12 @@ public boolean getDisableOutputPartitionGraphs() { } public static final int XLA_FUSION_AUTOTUNER_THRESH_FIELD_NUMBER = 15; - private long xlaFusionAutotunerThresh_; + private long xlaFusionAutotunerThresh_ = 0L; /** *
          * Minimum number of batches run through the XLA graph before XLA fusion
          * autotuner is enabled. Default value of zero disables the autotuner.
    +     *
          * The XLA fusion autotuner can improve performance by executing a heuristic
          * search on the compiler parameters.
          * 
    @@ -1083,7 +1143,7 @@ public long getXlaFusionAutotunerThresh() { } public static final int USE_TFRT_FIELD_NUMBER = 18; - private boolean useTfrt_; + private boolean useTfrt_ = false; /** *
          * Whether runtime execution uses TFRT.
    @@ -1098,7 +1158,7 @@ public boolean getUseTfrt() {
         }
     
         public static final int ENABLE_MULTI_HOST_FIELD_NUMBER = 27;
    -    private boolean enableMultiHost_;
    +    private boolean enableMultiHost_ = false;
         /**
          * 
          * If true, use Pathways with TFRT API for multi host support.
    @@ -1113,7 +1173,7 @@ public boolean getEnableMultiHost() {
         }
     
         public static final int TFRT_USE_IFRT_FIELD_NUMBER = 32;
    -    private boolean tfrtUseIfrt_;
    +    private boolean tfrtUseIfrt_ = false;
         /**
          * 
          * If true, use ifrt as the backend for TFRT. This is only used when
    @@ -1129,7 +1189,7 @@ public boolean getTfrtUseIfrt() {
         }
     
         public static final int BACKEND_SERVER_PORT_FIELD_NUMBER = 28;
    -    private int backendServerPort_;
    +    private int backendServerPort_ = 0;
         /**
          * 
          * Port for the Pathways server. Ignored if enable_multi_host=false.
    @@ -1144,7 +1204,7 @@ public int getBackendServerPort() {
         }
     
         public static final int TARGET_TPU_FIELD_NUMBER = 29;
    -    private boolean targetTpu_;
    +    private boolean targetTpu_ = false;
         /**
          * 
          * If true, TFRT will use TPU specific compiler passes and perform TPU
    @@ -1160,7 +1220,7 @@ public boolean getTargetTpu() {
         }
     
         public static final int TARGET_GPU_FIELD_NUMBER = 30;
    -    private boolean targetGpu_;
    +    private boolean targetGpu_ = false;
         /**
          * 
          * If true, TFRT will use GPU specific compiler passes and perform GPU
    @@ -1176,7 +1236,7 @@ public boolean getTargetGpu() {
         }
     
         public static final int STREAM_MERGE_THRESHOLD_FIELD_NUMBER = 31;
    -    private int streamMergeThreshold_;
    +    private int streamMergeThreshold_ = 0;
         /**
          * 
          * The threshold to merge small streams in TFRT. The stream with cost
    @@ -1193,7 +1253,7 @@ public int getStreamMergeThreshold() {
         }
     
         public static final int DISABLE_FUNCTIONAL_OPS_LOWERING_FIELD_NUMBER = 21;
    -    private boolean disableFunctionalOpsLowering_;
    +    private boolean disableFunctionalOpsLowering_ = false;
         /**
          * 
          * Whether functional control flow op lowering should be disabled. This is
    @@ -1210,11 +1270,11 @@ public boolean getDisableFunctionalOpsLowering() {
         }
     
         public static final int XLA_PREFER_SINGLE_GRAPH_CLUSTER_FIELD_NUMBER = 22;
    -    private boolean xlaPreferSingleGraphCluster_;
    +    private boolean xlaPreferSingleGraphCluster_ = false;
         /**
          * 
          * Provides a hint to XLA auto clustering to prefer forming a single large
    -     * cluster that encompases most of the graph.
    +     * cluster that encompasses most of the graph.
          * 
    * * bool xla_prefer_single_graph_cluster = 22; @@ -1237,7 +1297,7 @@ public boolean getXlaPreferSingleGraphCluster() { */ @java.lang.Override public boolean hasCoordinationConfig() { - return coordinationConfig_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** *
    @@ -1260,18 +1320,20 @@ public org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfig getCoor
          */
         @java.lang.Override
         public org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfigOrBuilder getCoordinationConfigOrBuilder() {
    -      return getCoordinationConfig();
    +      return coordinationConfig_ == null ? org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfig.getDefaultInstance() : coordinationConfig_;
         }
     
         public static final int DISABLE_OPTIMIZE_FOR_STATIC_GRAPH_FIELD_NUMBER = 24;
    -    private boolean disableOptimizeForStaticGraph_;
    +    private boolean disableOptimizeForStaticGraph_ = false;
         /**
          * 
          * If true, the session will treat the graph as being non-static for
          * optimization purposes.
    +     *
          * If this option is set to true when a session is created, the full
          * GraphDef will be retained to enable calls to Session::Extend().
          * Calling Extend() without setting this flag will result in errors.
    +     *
          * This option is meant to replace `optimize_for_static_graph` and it
          * aims to negate its value.
          * 
    @@ -1285,7 +1347,7 @@ public boolean getDisableOptimizeForStaticGraph() { } public static final int DISABLE_EAGER_EXECUTOR_STREAMING_ENQUEUE_FIELD_NUMBER = 26; - private boolean disableEagerExecutorStreamingEnqueue_; + private boolean disableEagerExecutorStreamingEnqueue_ = false; /** *
          * Whether eager remote execution will stream all the function calls or
    @@ -1301,6 +1363,38 @@ public boolean getDisableEagerExecutorStreamingEnqueue() {
           return disableEagerExecutorStreamingEnqueue_;
         }
     
    +    public static final int FINALIZE_FUNCTION_LIBRARY_RUNTIME_FIELD_NUMBER = 33;
    +    private boolean finalizeFunctionLibraryRuntime_ = false;
    +    /**
    +     * 
    +     * If true, the function library runtime will be finalized when the session
    +     * is finalized.
    +     * 
    + * + * bool finalize_function_library_runtime = 33; + * @return The finalizeFunctionLibraryRuntime. + */ + @java.lang.Override + public boolean getFinalizeFunctionLibraryRuntime() { + return finalizeFunctionLibraryRuntime_; + } + + public static final int FINALIZE_RESOURCE_MANAGER_FIELD_NUMBER = 34; + private boolean finalizeResourceManager_ = false; + /** + *
    +     * If true, the resource manager will be finalized when the session
    +     * is finalized.
    +     * 
    + * + * bool finalize_resource_manager = 34; + * @return The finalizeResourceManager. + */ + @java.lang.Override + public boolean getFinalizeResourceManager() { + return finalizeResourceManager_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -1315,11 +1409,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(collectiveGroupLeader_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, collectiveGroupLeader_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(collectiveGroupLeader_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, collectiveGroupLeader_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(executorType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, executorType_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(executorType_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, executorType_); } if (recvBufMaxChunk_ != 0) { output.writeInt32(4, recvBufMaxChunk_); @@ -1342,7 +1436,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (shareClusterDevicesInSession_ != false) { output.writeBool(10, shareClusterDevicesInSession_); } - if (sessionMetadata_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(11, getSessionMetadata()); } if (optimizeForStaticGraph_ != false) { @@ -1372,7 +1466,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (xlaPreferSingleGraphCluster_ != false) { output.writeBool(22, xlaPreferSingleGraphCluster_); } - if (coordinationConfig_ != null) { + if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(23, getCoordinationConfig()); } if (disableOptimizeForStaticGraph_ != false) { @@ -1399,6 +1493,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (tfrtUseIfrt_ != false) { output.writeBool(32, tfrtUseIfrt_); } + if (finalizeFunctionLibraryRuntime_ != false) { + output.writeBool(33, finalizeFunctionLibraryRuntime_); + } + if (finalizeResourceManager_ != false) { + output.writeBool(34, finalizeResourceManager_); + } getUnknownFields().writeTo(output); } @@ -1408,11 +1508,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(collectiveGroupLeader_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, collectiveGroupLeader_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(collectiveGroupLeader_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, collectiveGroupLeader_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(executorType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, executorType_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(executorType_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, executorType_); } if (recvBufMaxChunk_ != 0) { size += com.google.protobuf.CodedOutputStream @@ -1442,7 +1542,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBoolSize(10, shareClusterDevicesInSession_); } - if (sessionMetadata_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(11, getSessionMetadata()); } @@ -1482,7 +1582,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBoolSize(22, xlaPreferSingleGraphCluster_); } - if (coordinationConfig_ != null) { + if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(23, getCoordinationConfig()); } @@ -1518,6 +1618,14 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBoolSize(32, tfrtUseIfrt_); } + if (finalizeFunctionLibraryRuntime_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(33, finalizeFunctionLibraryRuntime_); + } + if (finalizeResourceManager_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(34, finalizeResourceManager_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1594,6 +1702,10 @@ public boolean equals(final java.lang.Object obj) { != other.getDisableOptimizeForStaticGraph()) return false; if (getDisableEagerExecutorStreamingEnqueue() != other.getDisableEagerExecutorStreamingEnqueue()) return false; + if (getFinalizeFunctionLibraryRuntime() + != other.getFinalizeFunctionLibraryRuntime()) return false; + if (getFinalizeResourceManager() + != other.getFinalizeResourceManager()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1685,6 +1797,12 @@ public int hashCode() { hash = (37 * hash) + DISABLE_EAGER_EXECUTOR_STREAMING_ENQUEUE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getDisableEagerExecutorStreamingEnqueue()); + hash = (37 * hash) + FINALIZE_FUNCTION_LIBRARY_RUNTIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getFinalizeFunctionLibraryRuntime()); + hash = (37 * hash) + FINALIZE_RESOURCE_MANAGER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getFinalizeResourceManager()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1724,39 +1842,41 @@ public static org.tensorflow.proto.ConfigProto.Experimental parseFrom( } public static org.tensorflow.proto.ConfigProto.Experimental parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.ConfigProto.Experimental parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.ConfigProto.Experimental parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.ConfigProto.Experimental parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.ConfigProto.Experimental parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.ConfigProto.Experimental parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -1776,7 +1896,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -1784,13 +1904,13 @@ protected Builder newBuilderForType( *
          * Everything inside Experimental is subject to change and is not subject
          * to API stability guarantees in
    -     * https://www.tensorflow.org/guide/version_compat.
    +     * https://www.tensorflow.org/guide/versions.
          * 
    * * Protobuf type {@code tensorflow.ConfigProto.Experimental} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.ConfigProto.Experimental) org.tensorflow.proto.ConfigProto.ExperimentalOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -1799,7 +1919,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_ConfigProto_Experimental_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -1808,81 +1928,63 @@ public static final class Builder extends // Construct using org.tensorflow.proto.ConfigProto.Experimental.newBuilder() private Builder() { - + maybeForceBuilderInitialization(); } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getSessionMetadataFieldBuilder(); + getCoordinationConfigFieldBuilder(); + } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; collectiveGroupLeader_ = ""; - executorType_ = ""; - recvBufMaxChunk_ = 0; - useNumaAffinity_ = false; - collectiveDeterministicSequentialExecution_ = false; - collectiveNccl_ = false; - shareSessionStateInClusterspecPropagation_ = false; - disableThreadSpinning_ = false; - shareClusterDevicesInSession_ = false; - - if (sessionMetadataBuilder_ == null) { - sessionMetadata_ = null; - } else { - sessionMetadata_ = null; + sessionMetadata_ = null; + if (sessionMetadataBuilder_ != null) { + sessionMetadataBuilder_.dispose(); sessionMetadataBuilder_ = null; } optimizeForStaticGraph_ = false; - enableMlirBridge_ = false; - mlirBridgeRollout_ = 0; - enableMlirGraphOptimization_ = false; - disableOutputPartitionGraphs_ = false; - xlaFusionAutotunerThresh_ = 0L; - useTfrt_ = false; - enableMultiHost_ = false; - tfrtUseIfrt_ = false; - backendServerPort_ = 0; - targetTpu_ = false; - targetGpu_ = false; - streamMergeThreshold_ = 0; - disableFunctionalOpsLowering_ = false; - xlaPreferSingleGraphCluster_ = false; - - if (coordinationConfigBuilder_ == null) { - coordinationConfig_ = null; - } else { - coordinationConfig_ = null; + coordinationConfig_ = null; + if (coordinationConfigBuilder_ != null) { + coordinationConfigBuilder_.dispose(); coordinationConfigBuilder_ = null; } disableOptimizeForStaticGraph_ = false; - disableEagerExecutorStreamingEnqueue_ = false; - + finalizeFunctionLibraryRuntime_ = false; + finalizeResourceManager_ = false; return this; } @@ -1909,78 +2011,113 @@ public org.tensorflow.proto.ConfigProto.Experimental build() { @java.lang.Override public org.tensorflow.proto.ConfigProto.Experimental buildPartial() { org.tensorflow.proto.ConfigProto.Experimental result = new org.tensorflow.proto.ConfigProto.Experimental(this); - result.collectiveGroupLeader_ = collectiveGroupLeader_; - result.executorType_ = executorType_; - result.recvBufMaxChunk_ = recvBufMaxChunk_; - result.useNumaAffinity_ = useNumaAffinity_; - result.collectiveDeterministicSequentialExecution_ = collectiveDeterministicSequentialExecution_; - result.collectiveNccl_ = collectiveNccl_; - result.shareSessionStateInClusterspecPropagation_ = shareSessionStateInClusterspecPropagation_; - result.disableThreadSpinning_ = disableThreadSpinning_; - result.shareClusterDevicesInSession_ = shareClusterDevicesInSession_; - if (sessionMetadataBuilder_ == null) { - result.sessionMetadata_ = sessionMetadata_; - } else { - result.sessionMetadata_ = sessionMetadataBuilder_.build(); - } - result.optimizeForStaticGraph_ = optimizeForStaticGraph_; - result.enableMlirBridge_ = enableMlirBridge_; - result.mlirBridgeRollout_ = mlirBridgeRollout_; - result.enableMlirGraphOptimization_ = enableMlirGraphOptimization_; - result.disableOutputPartitionGraphs_ = disableOutputPartitionGraphs_; - result.xlaFusionAutotunerThresh_ = xlaFusionAutotunerThresh_; - result.useTfrt_ = useTfrt_; - result.enableMultiHost_ = enableMultiHost_; - result.tfrtUseIfrt_ = tfrtUseIfrt_; - result.backendServerPort_ = backendServerPort_; - result.targetTpu_ = targetTpu_; - result.targetGpu_ = targetGpu_; - result.streamMergeThreshold_ = streamMergeThreshold_; - result.disableFunctionalOpsLowering_ = disableFunctionalOpsLowering_; - result.xlaPreferSingleGraphCluster_ = xlaPreferSingleGraphCluster_; - if (coordinationConfigBuilder_ == null) { - result.coordinationConfig_ = coordinationConfig_; - } else { - result.coordinationConfig_ = coordinationConfigBuilder_.build(); - } - result.disableOptimizeForStaticGraph_ = disableOptimizeForStaticGraph_; - result.disableEagerExecutorStreamingEnqueue_ = disableEagerExecutorStreamingEnqueue_; + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.ConfigProto.Experimental result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.collectiveGroupLeader_ = collectiveGroupLeader_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.executorType_ = executorType_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.recvBufMaxChunk_ = recvBufMaxChunk_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.useNumaAffinity_ = useNumaAffinity_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.collectiveDeterministicSequentialExecution_ = collectiveDeterministicSequentialExecution_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.collectiveNccl_ = collectiveNccl_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.shareSessionStateInClusterspecPropagation_ = shareSessionStateInClusterspecPropagation_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.disableThreadSpinning_ = disableThreadSpinning_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.shareClusterDevicesInSession_ = shareClusterDevicesInSession_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000200) != 0)) { + result.sessionMetadata_ = sessionMetadataBuilder_ == null + ? sessionMetadata_ + : sessionMetadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.optimizeForStaticGraph_ = optimizeForStaticGraph_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.enableMlirBridge_ = enableMlirBridge_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.mlirBridgeRollout_ = mlirBridgeRollout_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.enableMlirGraphOptimization_ = enableMlirGraphOptimization_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.disableOutputPartitionGraphs_ = disableOutputPartitionGraphs_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.xlaFusionAutotunerThresh_ = xlaFusionAutotunerThresh_; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.useTfrt_ = useTfrt_; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.enableMultiHost_ = enableMultiHost_; + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.tfrtUseIfrt_ = tfrtUseIfrt_; + } + if (((from_bitField0_ & 0x00080000) != 0)) { + result.backendServerPort_ = backendServerPort_; + } + if (((from_bitField0_ & 0x00100000) != 0)) { + result.targetTpu_ = targetTpu_; + } + if (((from_bitField0_ & 0x00200000) != 0)) { + result.targetGpu_ = targetGpu_; + } + if (((from_bitField0_ & 0x00400000) != 0)) { + result.streamMergeThreshold_ = streamMergeThreshold_; + } + if (((from_bitField0_ & 0x00800000) != 0)) { + result.disableFunctionalOpsLowering_ = disableFunctionalOpsLowering_; + } + if (((from_bitField0_ & 0x01000000) != 0)) { + result.xlaPreferSingleGraphCluster_ = xlaPreferSingleGraphCluster_; + } + if (((from_bitField0_ & 0x02000000) != 0)) { + result.coordinationConfig_ = coordinationConfigBuilder_ == null + ? coordinationConfig_ + : coordinationConfigBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x04000000) != 0)) { + result.disableOptimizeForStaticGraph_ = disableOptimizeForStaticGraph_; + } + if (((from_bitField0_ & 0x08000000) != 0)) { + result.disableEagerExecutorStreamingEnqueue_ = disableEagerExecutorStreamingEnqueue_; + } + if (((from_bitField0_ & 0x10000000) != 0)) { + result.finalizeFunctionLibraryRuntime_ = finalizeFunctionLibraryRuntime_; + } + if (((from_bitField0_ & 0x20000000) != 0)) { + result.finalizeResourceManager_ = finalizeResourceManager_; + } + result.bitField0_ |= to_bitField0_; } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.ConfigProto.Experimental) { @@ -1995,10 +2132,12 @@ public Builder mergeFrom(org.tensorflow.proto.ConfigProto.Experimental other) { if (other == org.tensorflow.proto.ConfigProto.Experimental.getDefaultInstance()) return this; if (!other.getCollectiveGroupLeader().isEmpty()) { collectiveGroupLeader_ = other.collectiveGroupLeader_; + bitField0_ |= 0x00000001; onChanged(); } if (!other.getExecutorType().isEmpty()) { executorType_ = other.executorType_; + bitField0_ |= 0x00000002; onChanged(); } if (other.getRecvBufMaxChunk() != 0) { @@ -2079,6 +2218,12 @@ public Builder mergeFrom(org.tensorflow.proto.ConfigProto.Experimental other) { if (other.getDisableEagerExecutorStreamingEnqueue() != false) { setDisableEagerExecutorStreamingEnqueue(other.getDisableEagerExecutorStreamingEnqueue()); } + if (other.getFinalizeFunctionLibraryRuntime() != false) { + setFinalizeFunctionLibraryRuntime(other.getFinalizeFunctionLibraryRuntime()); + } + if (other.getFinalizeResourceManager() != false) { + setFinalizeResourceManager(other.getFinalizeResourceManager()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2107,148 +2252,158 @@ public Builder mergeFrom( break; case 10: { collectiveGroupLeader_ = input.readStringRequireUtf8(); - + bitField0_ |= 0x00000001; break; } // case 10 case 26: { executorType_ = input.readStringRequireUtf8(); - + bitField0_ |= 0x00000002; break; } // case 26 case 32: { recvBufMaxChunk_ = input.readInt32(); - + bitField0_ |= 0x00000004; break; } // case 32 case 40: { useNumaAffinity_ = input.readBool(); - + bitField0_ |= 0x00000008; break; } // case 40 case 48: { collectiveDeterministicSequentialExecution_ = input.readBool(); - + bitField0_ |= 0x00000010; break; } // case 48 case 56: { collectiveNccl_ = input.readBool(); - + bitField0_ |= 0x00000020; break; } // case 56 case 64: { shareSessionStateInClusterspecPropagation_ = input.readBool(); - + bitField0_ |= 0x00000040; break; } // case 64 case 72: { disableThreadSpinning_ = input.readBool(); - + bitField0_ |= 0x00000080; break; } // case 72 case 80: { shareClusterDevicesInSession_ = input.readBool(); - + bitField0_ |= 0x00000100; break; } // case 80 case 90: { input.readMessage( getSessionMetadataFieldBuilder().getBuilder(), extensionRegistry); - + bitField0_ |= 0x00000200; break; } // case 90 case 96: { optimizeForStaticGraph_ = input.readBool(); - + bitField0_ |= 0x00000400; break; } // case 96 case 104: { enableMlirBridge_ = input.readBool(); - + bitField0_ |= 0x00000800; break; } // case 104 case 112: { disableOutputPartitionGraphs_ = input.readBool(); - + bitField0_ |= 0x00004000; break; } // case 112 case 120: { xlaFusionAutotunerThresh_ = input.readInt64(); - + bitField0_ |= 0x00008000; break; } // case 120 case 128: { enableMlirGraphOptimization_ = input.readBool(); - + bitField0_ |= 0x00002000; break; } // case 128 case 136: { mlirBridgeRollout_ = input.readEnum(); - + bitField0_ |= 0x00001000; break; } // case 136 case 144: { useTfrt_ = input.readBool(); - + bitField0_ |= 0x00010000; break; } // case 144 case 168: { disableFunctionalOpsLowering_ = input.readBool(); - + bitField0_ |= 0x00800000; break; } // case 168 case 176: { xlaPreferSingleGraphCluster_ = input.readBool(); - + bitField0_ |= 0x01000000; break; } // case 176 case 186: { input.readMessage( getCoordinationConfigFieldBuilder().getBuilder(), extensionRegistry); - + bitField0_ |= 0x02000000; break; } // case 186 case 192: { disableOptimizeForStaticGraph_ = input.readBool(); - + bitField0_ |= 0x04000000; break; } // case 192 case 208: { disableEagerExecutorStreamingEnqueue_ = input.readBool(); - + bitField0_ |= 0x08000000; break; } // case 208 case 216: { enableMultiHost_ = input.readBool(); - + bitField0_ |= 0x00020000; break; } // case 216 case 224: { backendServerPort_ = input.readInt32(); - + bitField0_ |= 0x00080000; break; } // case 224 case 232: { targetTpu_ = input.readBool(); - + bitField0_ |= 0x00100000; break; } // case 232 case 240: { targetGpu_ = input.readBool(); - + bitField0_ |= 0x00200000; break; } // case 240 case 248: { streamMergeThreshold_ = input.readInt32(); - + bitField0_ |= 0x00400000; break; } // case 248 case 256: { tfrtUseIfrt_ = input.readBool(); - + bitField0_ |= 0x00040000; break; } // case 256 + case 264: { + finalizeFunctionLibraryRuntime_ = input.readBool(); + bitField0_ |= 0x10000000; + break; + } // case 264 + case 272: { + finalizeResourceManager_ = input.readBool(); + bitField0_ |= 0x20000000; + break; + } // case 272 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -2264,6 +2419,7 @@ public Builder mergeFrom( } // finally return this; } + private int bitField0_; private java.lang.Object collectiveGroupLeader_ = ""; /** @@ -2318,11 +2474,9 @@ public java.lang.String getCollectiveGroupLeader() { */ public Builder setCollectiveGroupLeader( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } collectiveGroupLeader_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -2335,8 +2489,8 @@ public Builder setCollectiveGroupLeader( * @return This builder for chaining. */ public Builder clearCollectiveGroupLeader() { - collectiveGroupLeader_ = getDefaultInstance().getCollectiveGroupLeader(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -2351,12 +2505,10 @@ public Builder clearCollectiveGroupLeader() { */ public Builder setCollectiveGroupLeaderBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); collectiveGroupLeader_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -2417,11 +2569,9 @@ public java.lang.String getExecutorType() { */ public Builder setExecutorType( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } executorType_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -2435,8 +2585,8 @@ public Builder setExecutorType( * @return This builder for chaining. */ public Builder clearExecutorType() { - executorType_ = getDefaultInstance().getExecutorType(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -2452,12 +2602,10 @@ public Builder clearExecutorType() { */ public Builder setExecutorTypeBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); executorType_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -2489,8 +2637,9 @@ public int getRecvBufMaxChunk() { * @return This builder for chaining. */ public Builder setRecvBufMaxChunk(int value) { - + recvBufMaxChunk_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -2505,7 +2654,7 @@ public Builder setRecvBufMaxChunk(int value) { * @return This builder for chaining. */ public Builder clearRecvBufMaxChunk() { - + bitField0_ = (bitField0_ & ~0x00000004); recvBufMaxChunk_ = 0; onChanged(); return this; @@ -2538,8 +2687,9 @@ public boolean getUseNumaAffinity() { * @return This builder for chaining. */ public Builder setUseNumaAffinity(boolean value) { - + useNumaAffinity_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -2554,7 +2704,7 @@ public Builder setUseNumaAffinity(boolean value) { * @return This builder for chaining. */ public Builder clearUseNumaAffinity() { - + bitField0_ = (bitField0_ & ~0x00000008); useNumaAffinity_ = false; onChanged(); return this; @@ -2585,8 +2735,9 @@ public boolean getCollectiveDeterministicSequentialExecution() { * @return This builder for chaining. */ public Builder setCollectiveDeterministicSequentialExecution(boolean value) { - + collectiveDeterministicSequentialExecution_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2600,7 +2751,7 @@ public Builder setCollectiveDeterministicSequentialExecution(boolean value) { * @return This builder for chaining. */ public Builder clearCollectiveDeterministicSequentialExecution() { - + bitField0_ = (bitField0_ & ~0x00000010); collectiveDeterministicSequentialExecution_ = false; onChanged(); return this; @@ -2631,8 +2782,9 @@ public boolean getCollectiveNccl() { * @return This builder for chaining. */ public Builder setCollectiveNccl(boolean value) { - + collectiveNccl_ = value; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2646,7 +2798,7 @@ public Builder setCollectiveNccl(boolean value) { * @return This builder for chaining. */ public Builder clearCollectiveNccl() { - + bitField0_ = (bitField0_ & ~0x00000020); collectiveNccl_ = false; onChanged(); return this; @@ -2658,6 +2810,7 @@ public Builder clearCollectiveNccl() { * In the following, session state means the value of a variable, elements * in a hash table, or any other resource, accessible by worker sessions * held by a TF server. + * * When ClusterSpec propagation is enabled, the value of * isolate_session_state is ignored when deciding whether to share session * states in a TF server (for backwards compatibility reasons). @@ -2665,11 +2818,13 @@ public Builder clearCollectiveNccl() { * states are shared. * - If share_session_state_in_clusterspec_propagation is false, session * states are isolated. + * * When clusterspec propagation is not used, the value of * share_session_state_in_clusterspec_propagation is ignored when deciding * whether to share session states in a TF server. * - If isolate_session_state is true, session states are isolated. * - If isolate_session_state is false, session states are shared. + * * TODO(b/129330037): Add a single API that consistently treats * isolate_session_state and ClusterSpec propagation. *
    @@ -2686,6 +2841,7 @@ public boolean getShareSessionStateInClusterspecPropagation() { * In the following, session state means the value of a variable, elements * in a hash table, or any other resource, accessible by worker sessions * held by a TF server. + * * When ClusterSpec propagation is enabled, the value of * isolate_session_state is ignored when deciding whether to share session * states in a TF server (for backwards compatibility reasons). @@ -2693,11 +2849,13 @@ public boolean getShareSessionStateInClusterspecPropagation() { * states are shared. * - If share_session_state_in_clusterspec_propagation is false, session * states are isolated. + * * When clusterspec propagation is not used, the value of * share_session_state_in_clusterspec_propagation is ignored when deciding * whether to share session states in a TF server. * - If isolate_session_state is true, session states are isolated. * - If isolate_session_state is false, session states are shared. + * * TODO(b/129330037): Add a single API that consistently treats * isolate_session_state and ClusterSpec propagation. *
    @@ -2707,8 +2865,9 @@ public boolean getShareSessionStateInClusterspecPropagation() { * @return This builder for chaining. */ public Builder setShareSessionStateInClusterspecPropagation(boolean value) { - + shareSessionStateInClusterspecPropagation_ = value; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -2717,6 +2876,7 @@ public Builder setShareSessionStateInClusterspecPropagation(boolean value) { * In the following, session state means the value of a variable, elements * in a hash table, or any other resource, accessible by worker sessions * held by a TF server. + * * When ClusterSpec propagation is enabled, the value of * isolate_session_state is ignored when deciding whether to share session * states in a TF server (for backwards compatibility reasons). @@ -2724,11 +2884,13 @@ public Builder setShareSessionStateInClusterspecPropagation(boolean value) { * states are shared. * - If share_session_state_in_clusterspec_propagation is false, session * states are isolated. + * * When clusterspec propagation is not used, the value of * share_session_state_in_clusterspec_propagation is ignored when deciding * whether to share session states in a TF server. * - If isolate_session_state is true, session states are isolated. * - If isolate_session_state is false, session states are shared. + * * TODO(b/129330037): Add a single API that consistently treats * isolate_session_state and ClusterSpec propagation. *
    @@ -2737,7 +2899,7 @@ public Builder setShareSessionStateInClusterspecPropagation(boolean value) { * @return This builder for chaining. */ public Builder clearShareSessionStateInClusterspecPropagation() { - + bitField0_ = (bitField0_ & ~0x00000040); shareSessionStateInClusterspecPropagation_ = false; onChanged(); return this; @@ -2772,8 +2934,9 @@ public boolean getDisableThreadSpinning() { * @return This builder for chaining. */ public Builder setDisableThreadSpinning(boolean value) { - + disableThreadSpinning_ = value; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -2789,7 +2952,7 @@ public Builder setDisableThreadSpinning(boolean value) { * @return This builder for chaining. */ public Builder clearDisableThreadSpinning() { - + bitField0_ = (bitField0_ & ~0x00000080); disableThreadSpinning_ = false; onChanged(); return this; @@ -2820,8 +2983,9 @@ public boolean getShareClusterDevicesInSession() { * @return This builder for chaining. */ public Builder setShareClusterDevicesInSession(boolean value) { - + shareClusterDevicesInSession_ = value; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -2835,20 +2999,22 @@ public Builder setShareClusterDevicesInSession(boolean value) { * @return This builder for chaining. */ public Builder clearShareClusterDevicesInSession() { - + bitField0_ = (bitField0_ & ~0x00000100); shareClusterDevicesInSession_ = false; onChanged(); return this; } private org.tensorflow.proto.SessionMetadata sessionMetadata_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.SessionMetadata, org.tensorflow.proto.SessionMetadata.Builder, org.tensorflow.proto.SessionMetadataOrBuilder> sessionMetadataBuilder_; /** *
            * Metadata about the session.
    +       *
            * If set, this can be used by the runtime and the Ops for debugging,
            * monitoring, etc.
    +       *
            * NOTE: This is currently used and propagated only by the direct session
            * and EagerContext.
            * 
    @@ -2857,13 +3023,15 @@ public Builder clearShareClusterDevicesInSession() { * @return Whether the sessionMetadata field is set. */ public boolean hasSessionMetadata() { - return sessionMetadataBuilder_ != null || sessionMetadata_ != null; + return ((bitField0_ & 0x00000200) != 0); } /** *
            * Metadata about the session.
    +       *
            * If set, this can be used by the runtime and the Ops for debugging,
            * monitoring, etc.
    +       *
            * NOTE: This is currently used and propagated only by the direct session
            * and EagerContext.
            * 
    @@ -2881,8 +3049,10 @@ public org.tensorflow.proto.SessionMetadata getSessionMetadata() { /** *
            * Metadata about the session.
    +       *
            * If set, this can be used by the runtime and the Ops for debugging,
            * monitoring, etc.
    +       *
            * NOTE: This is currently used and propagated only by the direct session
            * and EagerContext.
            * 
    @@ -2895,18 +3065,20 @@ public Builder setSessionMetadata(org.tensorflow.proto.SessionMetadata value) { throw new NullPointerException(); } sessionMetadata_ = value; - onChanged(); } else { sessionMetadataBuilder_.setMessage(value); } - + bitField0_ |= 0x00000200; + onChanged(); return this; } /** *
            * Metadata about the session.
    +       *
            * If set, this can be used by the runtime and the Ops for debugging,
            * monitoring, etc.
    +       *
            * NOTE: This is currently used and propagated only by the direct session
            * and EagerContext.
            * 
    @@ -2917,18 +3089,20 @@ public Builder setSessionMetadata( org.tensorflow.proto.SessionMetadata.Builder builderForValue) { if (sessionMetadataBuilder_ == null) { sessionMetadata_ = builderForValue.build(); - onChanged(); } else { sessionMetadataBuilder_.setMessage(builderForValue.build()); } - + bitField0_ |= 0x00000200; + onChanged(); return this; } /** *
            * Metadata about the session.
    +       *
            * If set, this can be used by the runtime and the Ops for debugging,
            * monitoring, etc.
    +       *
            * NOTE: This is currently used and propagated only by the direct session
            * and EagerContext.
            * 
    @@ -2937,24 +3111,29 @@ public Builder setSessionMetadata( */ public Builder mergeSessionMetadata(org.tensorflow.proto.SessionMetadata value) { if (sessionMetadataBuilder_ == null) { - if (sessionMetadata_ != null) { - sessionMetadata_ = - org.tensorflow.proto.SessionMetadata.newBuilder(sessionMetadata_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000200) != 0) && + sessionMetadata_ != null && + sessionMetadata_ != org.tensorflow.proto.SessionMetadata.getDefaultInstance()) { + getSessionMetadataBuilder().mergeFrom(value); } else { sessionMetadata_ = value; } - onChanged(); } else { sessionMetadataBuilder_.mergeFrom(value); } - + if (sessionMetadata_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } return this; } /** *
            * Metadata about the session.
    +       *
            * If set, this can be used by the runtime and the Ops for debugging,
            * monitoring, etc.
    +       *
            * NOTE: This is currently used and propagated only by the direct session
            * and EagerContext.
            * 
    @@ -2962,21 +3141,22 @@ public Builder mergeSessionMetadata(org.tensorflow.proto.SessionMetadata value) * .tensorflow.SessionMetadata session_metadata = 11; */ public Builder clearSessionMetadata() { - if (sessionMetadataBuilder_ == null) { - sessionMetadata_ = null; - onChanged(); - } else { - sessionMetadata_ = null; + bitField0_ = (bitField0_ & ~0x00000200); + sessionMetadata_ = null; + if (sessionMetadataBuilder_ != null) { + sessionMetadataBuilder_.dispose(); sessionMetadataBuilder_ = null; } - + onChanged(); return this; } /** *
            * Metadata about the session.
    +       *
            * If set, this can be used by the runtime and the Ops for debugging,
            * monitoring, etc.
    +       *
            * NOTE: This is currently used and propagated only by the direct session
            * and EagerContext.
            * 
    @@ -2984,15 +3164,17 @@ public Builder clearSessionMetadata() { * .tensorflow.SessionMetadata session_metadata = 11; */ public org.tensorflow.proto.SessionMetadata.Builder getSessionMetadataBuilder() { - + bitField0_ |= 0x00000200; onChanged(); return getSessionMetadataFieldBuilder().getBuilder(); } /** *
            * Metadata about the session.
    +       *
            * If set, this can be used by the runtime and the Ops for debugging,
            * monitoring, etc.
    +       *
            * NOTE: This is currently used and propagated only by the direct session
            * and EagerContext.
            * 
    @@ -3010,19 +3192,21 @@ public org.tensorflow.proto.SessionMetadataOrBuilder getSessionMetadataOrBuilder /** *
            * Metadata about the session.
    +       *
            * If set, this can be used by the runtime and the Ops for debugging,
            * monitoring, etc.
    +       *
            * NOTE: This is currently used and propagated only by the direct session
            * and EagerContext.
            * 
    * * .tensorflow.SessionMetadata session_metadata = 11; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.SessionMetadata, org.tensorflow.proto.SessionMetadata.Builder, org.tensorflow.proto.SessionMetadataOrBuilder> getSessionMetadataFieldBuilder() { if (sessionMetadataBuilder_ == null) { - sessionMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + sessionMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.SessionMetadata, org.tensorflow.proto.SessionMetadata.Builder, org.tensorflow.proto.SessionMetadataOrBuilder>( getSessionMetadata(), getParentForChildren(), @@ -3037,6 +3221,7 @@ public org.tensorflow.proto.SessionMetadataOrBuilder getSessionMetadataOrBuilder *
            * If true, the session may treat the graph as being static for optimization
            * purposes.
    +       *
            * If this option is set to true when a session is created, the full
            * GraphDef must be passed in a single call to Session::Create(), and
            * Session::Extend() may not be supported.
    @@ -3053,6 +3238,7 @@ public boolean getOptimizeForStaticGraph() {
            * 
            * If true, the session may treat the graph as being static for optimization
            * purposes.
    +       *
            * If this option is set to true when a session is created, the full
            * GraphDef must be passed in a single call to Session::Create(), and
            * Session::Extend() may not be supported.
    @@ -3063,8 +3249,9 @@ public boolean getOptimizeForStaticGraph() {
            * @return This builder for chaining.
            */
           public Builder setOptimizeForStaticGraph(boolean value) {
    -        
    +
             optimizeForStaticGraph_ = value;
    +        bitField0_ |= 0x00000400;
             onChanged();
             return this;
           }
    @@ -3072,6 +3259,7 @@ public Builder setOptimizeForStaticGraph(boolean value) {
            * 
            * If true, the session may treat the graph as being static for optimization
            * purposes.
    +       *
            * If this option is set to true when a session is created, the full
            * GraphDef must be passed in a single call to Session::Create(), and
            * Session::Extend() may not be supported.
    @@ -3081,7 +3269,7 @@ public Builder setOptimizeForStaticGraph(boolean value) {
            * @return This builder for chaining.
            */
           public Builder clearOptimizeForStaticGraph() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000400);
             optimizeForStaticGraph_ = false;
             onChanged();
             return this;
    @@ -3093,6 +3281,7 @@ public Builder clearOptimizeForStaticGraph() {
            * Whether to enable the MLIR-based TF->XLA bridge. This is only used if set
            * to true. Default value or false is ignored. Use mlir_bridge_rollout for
            * finer control.
    +       *
            * If this option is set to true when a session is created, MLIR is used to
            * perform the set of graph transformations to put the graph in a form that
            * can be executed with delegation of some computations to an accelerator.
    @@ -3114,6 +3303,7 @@ public boolean getEnableMlirBridge() {
            * Whether to enable the MLIR-based TF->XLA bridge. This is only used if set
            * to true. Default value or false is ignored. Use mlir_bridge_rollout for
            * finer control.
    +       *
            * If this option is set to true when a session is created, MLIR is used to
            * perform the set of graph transformations to put the graph in a form that
            * can be executed with delegation of some computations to an accelerator.
    @@ -3128,8 +3318,9 @@ public boolean getEnableMlirBridge() {
            * @return This builder for chaining.
            */
           public Builder setEnableMlirBridge(boolean value) {
    -        
    +
             enableMlirBridge_ = value;
    +        bitField0_ |= 0x00000800;
             onChanged();
             return this;
           }
    @@ -3138,6 +3329,7 @@ public Builder setEnableMlirBridge(boolean value) {
            * Whether to enable the MLIR-based TF->XLA bridge. This is only used if set
            * to true. Default value or false is ignored. Use mlir_bridge_rollout for
            * finer control.
    +       *
            * If this option is set to true when a session is created, MLIR is used to
            * perform the set of graph transformations to put the graph in a form that
            * can be executed with delegation of some computations to an accelerator.
    @@ -3151,7 +3343,7 @@ public Builder setEnableMlirBridge(boolean value) {
            * @return This builder for chaining.
            */
           public Builder clearEnableMlirBridge() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000800);
             enableMlirBridge_ = false;
             onChanged();
             return this;
    @@ -3179,8 +3371,8 @@ public Builder clearEnableMlirBridge() {
            * @return This builder for chaining.
            */
           public Builder setMlirBridgeRolloutValue(int value) {
    -        
             mlirBridgeRollout_ = value;
    +        bitField0_ |= 0x00001000;
             onChanged();
             return this;
           }
    @@ -3194,8 +3386,7 @@ public Builder setMlirBridgeRolloutValue(int value) {
            */
           @java.lang.Override
           public org.tensorflow.proto.ConfigProto.Experimental.MlirBridgeRollout getMlirBridgeRollout() {
    -        @SuppressWarnings("deprecation")
    -        org.tensorflow.proto.ConfigProto.Experimental.MlirBridgeRollout result = org.tensorflow.proto.ConfigProto.Experimental.MlirBridgeRollout.valueOf(mlirBridgeRollout_);
    +        org.tensorflow.proto.ConfigProto.Experimental.MlirBridgeRollout result = org.tensorflow.proto.ConfigProto.Experimental.MlirBridgeRollout.forNumber(mlirBridgeRollout_);
             return result == null ? org.tensorflow.proto.ConfigProto.Experimental.MlirBridgeRollout.UNRECOGNIZED : result;
           }
           /**
    @@ -3211,7 +3402,7 @@ public Builder setMlirBridgeRollout(org.tensorflow.proto.ConfigProto.Experimenta
             if (value == null) {
               throw new NullPointerException();
             }
    -        
    +        bitField0_ |= 0x00001000;
             mlirBridgeRollout_ = value.getNumber();
             onChanged();
             return this;
    @@ -3225,7 +3416,7 @@ public Builder setMlirBridgeRollout(org.tensorflow.proto.ConfigProto.Experimenta
            * @return This builder for chaining.
            */
           public Builder clearMlirBridgeRollout() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00001000);
             mlirBridgeRollout_ = 0;
             onChanged();
             return this;
    @@ -3235,6 +3426,7 @@ public Builder clearMlirBridgeRollout() {
           /**
            * 
            * Whether to enable the MLIR-based Graph optimizations.
    +       *
            * This will become a part of standard Tensorflow graph optimization
            * pipeline, currently this is only used for gradual migration and testing
            * new passes that are replacing existing optimizations in Grappler.
    @@ -3250,6 +3442,7 @@ public boolean getEnableMlirGraphOptimization() {
           /**
            * 
            * Whether to enable the MLIR-based Graph optimizations.
    +       *
            * This will become a part of standard Tensorflow graph optimization
            * pipeline, currently this is only used for gradual migration and testing
            * new passes that are replacing existing optimizations in Grappler.
    @@ -3260,14 +3453,16 @@ public boolean getEnableMlirGraphOptimization() {
            * @return This builder for chaining.
            */
           public Builder setEnableMlirGraphOptimization(boolean value) {
    -        
    +
             enableMlirGraphOptimization_ = value;
    +        bitField0_ |= 0x00002000;
             onChanged();
             return this;
           }
           /**
            * 
            * Whether to enable the MLIR-based Graph optimizations.
    +       *
            * This will become a part of standard Tensorflow graph optimization
            * pipeline, currently this is only used for gradual migration and testing
            * new passes that are replacing existing optimizations in Grappler.
    @@ -3277,7 +3472,7 @@ public Builder setEnableMlirGraphOptimization(boolean value) {
            * @return This builder for chaining.
            */
           public Builder clearEnableMlirGraphOptimization() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00002000);
             enableMlirGraphOptimization_ = false;
             onChanged();
             return this;
    @@ -3288,6 +3483,7 @@ public Builder clearEnableMlirGraphOptimization() {
            * 
            * If true, the session will not store an additional copy of the graph for
            * each subgraph.
    +       *
            * If this option is set to true when a session is created, the
            * `RunOptions.output_partition_graphs` options must not be set.
            * 
    @@ -3303,6 +3499,7 @@ public boolean getDisableOutputPartitionGraphs() { *
            * If true, the session will not store an additional copy of the graph for
            * each subgraph.
    +       *
            * If this option is set to true when a session is created, the
            * `RunOptions.output_partition_graphs` options must not be set.
            * 
    @@ -3312,8 +3509,9 @@ public boolean getDisableOutputPartitionGraphs() { * @return This builder for chaining. */ public Builder setDisableOutputPartitionGraphs(boolean value) { - + disableOutputPartitionGraphs_ = value; + bitField0_ |= 0x00004000; onChanged(); return this; } @@ -3321,6 +3519,7 @@ public Builder setDisableOutputPartitionGraphs(boolean value) { *
            * If true, the session will not store an additional copy of the graph for
            * each subgraph.
    +       *
            * If this option is set to true when a session is created, the
            * `RunOptions.output_partition_graphs` options must not be set.
            * 
    @@ -3329,7 +3528,7 @@ public Builder setDisableOutputPartitionGraphs(boolean value) { * @return This builder for chaining. */ public Builder clearDisableOutputPartitionGraphs() { - + bitField0_ = (bitField0_ & ~0x00004000); disableOutputPartitionGraphs_ = false; onChanged(); return this; @@ -3340,6 +3539,7 @@ public Builder clearDisableOutputPartitionGraphs() { *
            * Minimum number of batches run through the XLA graph before XLA fusion
            * autotuner is enabled. Default value of zero disables the autotuner.
    +       *
            * The XLA fusion autotuner can improve performance by executing a heuristic
            * search on the compiler parameters.
            * 
    @@ -3355,6 +3555,7 @@ public long getXlaFusionAutotunerThresh() { *
            * Minimum number of batches run through the XLA graph before XLA fusion
            * autotuner is enabled. Default value of zero disables the autotuner.
    +       *
            * The XLA fusion autotuner can improve performance by executing a heuristic
            * search on the compiler parameters.
            * 
    @@ -3364,8 +3565,9 @@ public long getXlaFusionAutotunerThresh() { * @return This builder for chaining. */ public Builder setXlaFusionAutotunerThresh(long value) { - + xlaFusionAutotunerThresh_ = value; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -3373,6 +3575,7 @@ public Builder setXlaFusionAutotunerThresh(long value) { *
            * Minimum number of batches run through the XLA graph before XLA fusion
            * autotuner is enabled. Default value of zero disables the autotuner.
    +       *
            * The XLA fusion autotuner can improve performance by executing a heuristic
            * search on the compiler parameters.
            * 
    @@ -3381,7 +3584,7 @@ public Builder setXlaFusionAutotunerThresh(long value) { * @return This builder for chaining. */ public Builder clearXlaFusionAutotunerThresh() { - + bitField0_ = (bitField0_ & ~0x00008000); xlaFusionAutotunerThresh_ = 0L; onChanged(); return this; @@ -3410,8 +3613,9 @@ public boolean getUseTfrt() { * @return This builder for chaining. */ public Builder setUseTfrt(boolean value) { - + useTfrt_ = value; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -3424,7 +3628,7 @@ public Builder setUseTfrt(boolean value) { * @return This builder for chaining. */ public Builder clearUseTfrt() { - + bitField0_ = (bitField0_ & ~0x00010000); useTfrt_ = false; onChanged(); return this; @@ -3453,8 +3657,9 @@ public boolean getEnableMultiHost() { * @return This builder for chaining. */ public Builder setEnableMultiHost(boolean value) { - + enableMultiHost_ = value; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -3467,7 +3672,7 @@ public Builder setEnableMultiHost(boolean value) { * @return This builder for chaining. */ public Builder clearEnableMultiHost() { - + bitField0_ = (bitField0_ & ~0x00020000); enableMultiHost_ = false; onChanged(); return this; @@ -3498,8 +3703,9 @@ public boolean getTfrtUseIfrt() { * @return This builder for chaining. */ public Builder setTfrtUseIfrt(boolean value) { - + tfrtUseIfrt_ = value; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -3513,7 +3719,7 @@ public Builder setTfrtUseIfrt(boolean value) { * @return This builder for chaining. */ public Builder clearTfrtUseIfrt() { - + bitField0_ = (bitField0_ & ~0x00040000); tfrtUseIfrt_ = false; onChanged(); return this; @@ -3542,8 +3748,9 @@ public int getBackendServerPort() { * @return This builder for chaining. */ public Builder setBackendServerPort(int value) { - + backendServerPort_ = value; + bitField0_ |= 0x00080000; onChanged(); return this; } @@ -3556,7 +3763,7 @@ public Builder setBackendServerPort(int value) { * @return This builder for chaining. */ public Builder clearBackendServerPort() { - + bitField0_ = (bitField0_ & ~0x00080000); backendServerPort_ = 0; onChanged(); return this; @@ -3587,8 +3794,9 @@ public boolean getTargetTpu() { * @return This builder for chaining. */ public Builder setTargetTpu(boolean value) { - + targetTpu_ = value; + bitField0_ |= 0x00100000; onChanged(); return this; } @@ -3602,7 +3810,7 @@ public Builder setTargetTpu(boolean value) { * @return This builder for chaining. */ public Builder clearTargetTpu() { - + bitField0_ = (bitField0_ & ~0x00100000); targetTpu_ = false; onChanged(); return this; @@ -3633,8 +3841,9 @@ public boolean getTargetGpu() { * @return This builder for chaining. */ public Builder setTargetGpu(boolean value) { - + targetGpu_ = value; + bitField0_ |= 0x00200000; onChanged(); return this; } @@ -3648,7 +3857,7 @@ public Builder setTargetGpu(boolean value) { * @return This builder for chaining. */ public Builder clearTargetGpu() { - + bitField0_ = (bitField0_ & ~0x00200000); targetGpu_ = false; onChanged(); return this; @@ -3681,8 +3890,9 @@ public int getStreamMergeThreshold() { * @return This builder for chaining. */ public Builder setStreamMergeThreshold(int value) { - + streamMergeThreshold_ = value; + bitField0_ |= 0x00400000; onChanged(); return this; } @@ -3697,7 +3907,7 @@ public Builder setStreamMergeThreshold(int value) { * @return This builder for chaining. */ public Builder clearStreamMergeThreshold() { - + bitField0_ = (bitField0_ & ~0x00400000); streamMergeThreshold_ = 0; onChanged(); return this; @@ -3730,8 +3940,9 @@ public boolean getDisableFunctionalOpsLowering() { * @return This builder for chaining. */ public Builder setDisableFunctionalOpsLowering(boolean value) { - + disableFunctionalOpsLowering_ = value; + bitField0_ |= 0x00800000; onChanged(); return this; } @@ -3746,7 +3957,7 @@ public Builder setDisableFunctionalOpsLowering(boolean value) { * @return This builder for chaining. */ public Builder clearDisableFunctionalOpsLowering() { - + bitField0_ = (bitField0_ & ~0x00800000); disableFunctionalOpsLowering_ = false; onChanged(); return this; @@ -3756,7 +3967,7 @@ public Builder clearDisableFunctionalOpsLowering() { /** *
            * Provides a hint to XLA auto clustering to prefer forming a single large
    -       * cluster that encompases most of the graph.
    +       * cluster that encompasses most of the graph.
            * 
    * * bool xla_prefer_single_graph_cluster = 22; @@ -3769,7 +3980,7 @@ public boolean getXlaPreferSingleGraphCluster() { /** *
            * Provides a hint to XLA auto clustering to prefer forming a single large
    -       * cluster that encompases most of the graph.
    +       * cluster that encompasses most of the graph.
            * 
    * * bool xla_prefer_single_graph_cluster = 22; @@ -3777,29 +3988,30 @@ public boolean getXlaPreferSingleGraphCluster() { * @return This builder for chaining. */ public Builder setXlaPreferSingleGraphCluster(boolean value) { - + xlaPreferSingleGraphCluster_ = value; + bitField0_ |= 0x01000000; onChanged(); return this; } /** *
            * Provides a hint to XLA auto clustering to prefer forming a single large
    -       * cluster that encompases most of the graph.
    +       * cluster that encompasses most of the graph.
            * 
    * * bool xla_prefer_single_graph_cluster = 22; * @return This builder for chaining. */ public Builder clearXlaPreferSingleGraphCluster() { - + bitField0_ = (bitField0_ & ~0x01000000); xlaPreferSingleGraphCluster_ = false; onChanged(); return this; } private org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfig coordinationConfig_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfig, org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfig.Builder, org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfigOrBuilder> coordinationConfigBuilder_; /** *
    @@ -3810,7 +4022,7 @@ public Builder clearXlaPreferSingleGraphCluster() {
            * @return Whether the coordinationConfig field is set.
            */
           public boolean hasCoordinationConfig() {
    -        return coordinationConfigBuilder_ != null || coordinationConfig_ != null;
    +        return ((bitField0_ & 0x02000000) != 0);
           }
           /**
            * 
    @@ -3840,11 +4052,11 @@ public Builder setCoordinationConfig(org.tensorflow.proto.CoordinationConfig.Coo
                 throw new NullPointerException();
               }
               coordinationConfig_ = value;
    -          onChanged();
             } else {
               coordinationConfigBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x02000000;
    +        onChanged();
             return this;
           }
           /**
    @@ -3858,11 +4070,11 @@ public Builder setCoordinationConfig(
               org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfig.Builder builderForValue) {
             if (coordinationConfigBuilder_ == null) {
               coordinationConfig_ = builderForValue.build();
    -          onChanged();
             } else {
               coordinationConfigBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x02000000;
    +        onChanged();
             return this;
           }
           /**
    @@ -3874,17 +4086,20 @@ public Builder setCoordinationConfig(
            */
           public Builder mergeCoordinationConfig(org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfig value) {
             if (coordinationConfigBuilder_ == null) {
    -          if (coordinationConfig_ != null) {
    -            coordinationConfig_ =
    -              org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfig.newBuilder(coordinationConfig_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x02000000) != 0) &&
    +            coordinationConfig_ != null &&
    +            coordinationConfig_ != org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfig.getDefaultInstance()) {
    +            getCoordinationConfigBuilder().mergeFrom(value);
               } else {
                 coordinationConfig_ = value;
               }
    -          onChanged();
             } else {
               coordinationConfigBuilder_.mergeFrom(value);
             }
    -
    +        if (coordinationConfig_ != null) {
    +          bitField0_ |= 0x02000000;
    +          onChanged();
    +        }
             return this;
           }
           /**
    @@ -3895,14 +4110,13 @@ public Builder mergeCoordinationConfig(org.tensorflow.proto.CoordinationConfig.C
            * .tensorflow.CoordinationServiceConfig coordination_config = 23;
            */
           public Builder clearCoordinationConfig() {
    -        if (coordinationConfigBuilder_ == null) {
    -          coordinationConfig_ = null;
    -          onChanged();
    -        } else {
    -          coordinationConfig_ = null;
    +        bitField0_ = (bitField0_ & ~0x02000000);
    +        coordinationConfig_ = null;
    +        if (coordinationConfigBuilder_ != null) {
    +          coordinationConfigBuilder_.dispose();
               coordinationConfigBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
    @@ -3913,7 +4127,7 @@ public Builder clearCoordinationConfig() {
            * .tensorflow.CoordinationServiceConfig coordination_config = 23;
            */
           public org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfig.Builder getCoordinationConfigBuilder() {
    -        
    +        bitField0_ |= 0x02000000;
             onChanged();
             return getCoordinationConfigFieldBuilder().getBuilder();
           }
    @@ -3939,11 +4153,11 @@ public org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfigOrBuilde
            *
            * .tensorflow.CoordinationServiceConfig coordination_config = 23;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfig, org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfig.Builder, org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfigOrBuilder> 
               getCoordinationConfigFieldBuilder() {
             if (coordinationConfigBuilder_ == null) {
    -          coordinationConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          coordinationConfigBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfig, org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfig.Builder, org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfigOrBuilder>(
                       getCoordinationConfig(),
                       getParentForChildren(),
    @@ -3958,9 +4172,11 @@ public org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfigOrBuilde
            * 
            * If true, the session will treat the graph as being non-static for
            * optimization purposes.
    +       *
            * If this option is set to true when a session is created, the full
            * GraphDef will be retained to enable calls to Session::Extend().
            * Calling Extend() without setting this flag will result in errors.
    +       *
            * This option is meant to replace `optimize_for_static_graph` and it
            * aims to negate its value.
            * 
    @@ -3976,9 +4192,11 @@ public boolean getDisableOptimizeForStaticGraph() { *
            * If true, the session will treat the graph as being non-static for
            * optimization purposes.
    +       *
            * If this option is set to true when a session is created, the full
            * GraphDef will be retained to enable calls to Session::Extend().
            * Calling Extend() without setting this flag will result in errors.
    +       *
            * This option is meant to replace `optimize_for_static_graph` and it
            * aims to negate its value.
            * 
    @@ -3988,8 +4206,9 @@ public boolean getDisableOptimizeForStaticGraph() { * @return This builder for chaining. */ public Builder setDisableOptimizeForStaticGraph(boolean value) { - + disableOptimizeForStaticGraph_ = value; + bitField0_ |= 0x04000000; onChanged(); return this; } @@ -3997,9 +4216,11 @@ public Builder setDisableOptimizeForStaticGraph(boolean value) { *
            * If true, the session will treat the graph as being non-static for
            * optimization purposes.
    +       *
            * If this option is set to true when a session is created, the full
            * GraphDef will be retained to enable calls to Session::Extend().
            * Calling Extend() without setting this flag will result in errors.
    +       *
            * This option is meant to replace `optimize_for_static_graph` and it
            * aims to negate its value.
            * 
    @@ -4008,7 +4229,7 @@ public Builder setDisableOptimizeForStaticGraph(boolean value) { * @return This builder for chaining. */ public Builder clearDisableOptimizeForStaticGraph() { - + bitField0_ = (bitField0_ & ~0x04000000); disableOptimizeForStaticGraph_ = false; onChanged(); return this; @@ -4041,8 +4262,9 @@ public boolean getDisableEagerExecutorStreamingEnqueue() { * @return This builder for chaining. */ public Builder setDisableEagerExecutorStreamingEnqueue(boolean value) { - + disableEagerExecutorStreamingEnqueue_ = value; + bitField0_ |= 0x08000000; onChanged(); return this; } @@ -4057,23 +4279,105 @@ public Builder setDisableEagerExecutorStreamingEnqueue(boolean value) { * @return This builder for chaining. */ public Builder clearDisableEagerExecutorStreamingEnqueue() { - + bitField0_ = (bitField0_ & ~0x08000000); disableEagerExecutorStreamingEnqueue_ = false; onChanged(); return this; } + + private boolean finalizeFunctionLibraryRuntime_ ; + /** + *
    +       * If true, the function library runtime will be finalized when the session
    +       * is finalized.
    +       * 
    + * + * bool finalize_function_library_runtime = 33; + * @return The finalizeFunctionLibraryRuntime. + */ @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + public boolean getFinalizeFunctionLibraryRuntime() { + return finalizeFunctionLibraryRuntime_; + } + /** + *
    +       * If true, the function library runtime will be finalized when the session
    +       * is finalized.
    +       * 
    + * + * bool finalize_function_library_runtime = 33; + * @param value The finalizeFunctionLibraryRuntime to set. + * @return This builder for chaining. + */ + public Builder setFinalizeFunctionLibraryRuntime(boolean value) { + + finalizeFunctionLibraryRuntime_ = value; + bitField0_ |= 0x10000000; + onChanged(); + return this; + } + /** + *
    +       * If true, the function library runtime will be finalized when the session
    +       * is finalized.
    +       * 
    + * + * bool finalize_function_library_runtime = 33; + * @return This builder for chaining. + */ + public Builder clearFinalizeFunctionLibraryRuntime() { + bitField0_ = (bitField0_ & ~0x10000000); + finalizeFunctionLibraryRuntime_ = false; + onChanged(); + return this; } + private boolean finalizeResourceManager_ ; + /** + *
    +       * If true, the resource manager will be finalized when the session
    +       * is finalized.
    +       * 
    + * + * bool finalize_resource_manager = 34; + * @return The finalizeResourceManager. + */ @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + public boolean getFinalizeResourceManager() { + return finalizeResourceManager_; } + /** + *
    +       * If true, the resource manager will be finalized when the session
    +       * is finalized.
    +       * 
    + * + * bool finalize_resource_manager = 34; + * @param value The finalizeResourceManager to set. + * @return This builder for chaining. + */ + public Builder setFinalizeResourceManager(boolean value) { + finalizeResourceManager_ = value; + bitField0_ |= 0x20000000; + onChanged(); + return this; + } + /** + *
    +       * If true, the resource manager will be finalized when the session
    +       * is finalized.
    +       * 
    + * + * bool finalize_resource_manager = 34; + * @return This builder for chaining. + */ + public Builder clearFinalizeResourceManager() { + bitField0_ = (bitField0_ & ~0x20000000); + finalizeResourceManager_ = false; + onChanged(); + return this; + } // @@protoc_insertion_point(builder_scope:tensorflow.ConfigProto.Experimental) } @@ -4126,6 +4430,7 @@ public org.tensorflow.proto.ConfigProto.Experimental getDefaultInstanceForType() } + private int bitField0_; public static final int DEVICE_COUNT_FIELD_NUMBER = 1; private static final class DeviceCountDefaultEntryHolder { static final com.google.protobuf.MapEntry< @@ -4138,6 +4443,7 @@ private static final class DeviceCountDefaultEntryHolder { com.google.protobuf.WireFormat.FieldType.INT32, 0); } + @SuppressWarnings("serial") private com.google.protobuf.MapField< java.lang.String, java.lang.Integer> deviceCount_; private com.google.protobuf.MapField @@ -4148,7 +4454,6 @@ private static final class DeviceCountDefaultEntryHolder { } return deviceCount_; } - public int getDeviceCountCount() { return internalGetDeviceCount().getMap().size(); } @@ -4162,7 +4467,6 @@ public int getDeviceCountCount() { * * map<string, int32> device_count = 1; */ - @java.lang.Override public boolean containsDeviceCount( java.lang.String key) { @@ -4188,7 +4492,6 @@ public java.util.Map getDeviceCount() { * map<string, int32> device_count = 1; */ @java.lang.Override - public java.util.Map getDeviceCountMap() { return internalGetDeviceCount().getMap(); } @@ -4203,7 +4506,6 @@ public java.util.Map getDeviceCountMap() { * map<string, int32> device_count = 1; */ @java.lang.Override - public int getDeviceCountOrDefault( java.lang.String key, int defaultValue) { @@ -4223,7 +4525,6 @@ public int getDeviceCountOrDefault( * map<string, int32> device_count = 1; */ @java.lang.Override - public int getDeviceCountOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } @@ -4236,21 +4537,23 @@ public int getDeviceCountOrThrow( } public static final int INTRA_OP_PARALLELISM_THREADS_FIELD_NUMBER = 2; - private int intraOpParallelismThreads_; + private int intraOpParallelismThreads_ = 0; /** *
        * The execution of an individual op (for some op types) can be
        * parallelized on a pool of intra_op_parallelism_threads.
        * 0 means the system picks an appropriate number.
    +   *
        * If you create an ordinary session, e.g., from Python or C++,
        * then there is exactly one intra op thread pool per process.
        * The first session created determines the number of threads in this pool.
        * All subsequent sessions reuse/share this one global pool.
    +   *
        * There are notable exceptions to the default behavior described above:
        * 1. There is an environment variable  for overriding this thread pool,
    -   *    named TF_OVERRIDE_GLOBAL_THREADPOOL.
    +   * named TF_OVERRIDE_GLOBAL_THREADPOOL.
        * 2. When connecting to a server, such as a remote `tf.train.Server`
    -   *    instance, then this option will be ignored altogether.
    +   * instance, then this option will be ignored altogether.
        * 
    * * int32 intra_op_parallelism_threads = 2; @@ -4262,13 +4565,15 @@ public int getIntraOpParallelismThreads() { } public static final int INTER_OP_PARALLELISM_THREADS_FIELD_NUMBER = 5; - private int interOpParallelismThreads_; + private int interOpParallelismThreads_ = 0; /** *
        * Nodes that perform blocking operations are enqueued on a pool of
        * inter_op_parallelism_threads available in each process.
    +   *
        * 0 means the system picks an appropriate number.
        * Negative means all operations are performed in caller's thread.
    +   *
        * Note that the first Session created in the process sets the
        * number of threads for all future sessions unless use_per_session_threads is
        * true or session_inter_op_thread_pool is configured.
    @@ -4283,13 +4588,15 @@ public int getInterOpParallelismThreads() {
       }
     
       public static final int USE_PER_SESSION_THREADS_FIELD_NUMBER = 9;
    -  private boolean usePerSessionThreads_;
    +  private boolean usePerSessionThreads_ = false;
       /**
        * 
        * If true, use a new set of threads for this session rather than the global
        * pool of threads. Only supported by direct sessions.
    +   *
        * If false, use the global threads created by the first session, or the
        * per-session thread pools configured by session_inter_op_thread_pool.
    +   *
        * This option is deprecated. The same effect can be achieved by setting
        * session_inter_op_thread_pool to have one element, whose num_threads equals
        * inter_op_parallelism_threads.
    @@ -4304,13 +4611,16 @@ public boolean getUsePerSessionThreads() {
       }
     
       public static final int SESSION_INTER_OP_THREAD_POOL_FIELD_NUMBER = 12;
    +  @SuppressWarnings("serial")
       private java.util.List sessionInterOpThreadPool_;
       /**
        * 
        * This option is experimental - it may be replaced with a different mechanism
        * in the future.
    +   *
        * Configures session thread pools. If this is configured, then RunOptions for
        * a Run call can select the thread pool to use.
    +   *
        * The intended use is for when some session invocations need to run in a
        * background pool limited to a small number of threads:
        * - For example, a session may be configured to have one large pool (for
    @@ -4336,8 +4646,10 @@ public java.util.List getSessionInte
        * 
        * This option is experimental - it may be replaced with a different mechanism
        * in the future.
    +   *
        * Configures session thread pools. If this is configured, then RunOptions for
        * a Run call can select the thread pool to use.
    +   *
        * The intended use is for when some session invocations need to run in a
        * background pool limited to a small number of threads:
        * - For example, a session may be configured to have one large pool (for
    @@ -4364,8 +4676,10 @@ public java.util.List getSessionInte
        * 
        * This option is experimental - it may be replaced with a different mechanism
        * in the future.
    +   *
        * Configures session thread pools. If this is configured, then RunOptions for
        * a Run call can select the thread pool to use.
    +   *
        * The intended use is for when some session invocations need to run in a
        * background pool limited to a small number of threads:
        * - For example, a session may be configured to have one large pool (for
    @@ -4391,8 +4705,10 @@ public int getSessionInterOpThreadPoolCount() {
        * 
        * This option is experimental - it may be replaced with a different mechanism
        * in the future.
    +   *
        * Configures session thread pools. If this is configured, then RunOptions for
        * a Run call can select the thread pool to use.
    +   *
        * The intended use is for when some session invocations need to run in a
        * background pool limited to a small number of threads:
        * - For example, a session may be configured to have one large pool (for
    @@ -4418,8 +4734,10 @@ public org.tensorflow.proto.ThreadPoolOptionProto getSessionInterOpThreadPool(in
        * 
        * This option is experimental - it may be replaced with a different mechanism
        * in the future.
    +   *
        * Configures session thread pools. If this is configured, then RunOptions for
        * a Run call can select the thread pool to use.
    +   *
        * The intended use is for when some session invocations need to run in a
        * background pool limited to a small number of threads:
        * - For example, a session may be configured to have one large pool (for
    @@ -4444,7 +4762,7 @@ public org.tensorflow.proto.ThreadPoolOptionProtoOrBuilder getSessionInterOpThre
       }
     
       public static final int PLACEMENT_PERIOD_FIELD_NUMBER = 3;
    -  private int placementPeriod_;
    +  private int placementPeriod_ = 0;
       /**
        * 
        * Assignment of Nodes to Devices is recomputed every placement_period
    @@ -4461,7 +4779,9 @@ public int getPlacementPeriod() {
       }
     
       public static final int DEVICE_FILTERS_FIELD_NUMBER = 4;
    -  private com.google.protobuf.LazyStringList deviceFilters_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.LazyStringArrayList deviceFilters_ =
    +      com.google.protobuf.LazyStringArrayList.emptyList();
       /**
        * 
        * When any filters are present sessions will ignore all devices which do not
    @@ -4531,7 +4851,7 @@ public java.lang.String getDeviceFilters(int index) {
        */
       @java.lang.Override
       public boolean hasGpuOptions() {
    -    return gpuOptions_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * 
    @@ -4554,7 +4874,7 @@ public org.tensorflow.proto.GPUOptions getGpuOptions() {
        */
       @java.lang.Override
       public org.tensorflow.proto.GPUOptionsOrBuilder getGpuOptionsOrBuilder() {
    -    return getGpuOptions();
    +    return gpuOptions_ == null ? org.tensorflow.proto.GPUOptions.getDefaultInstance() : gpuOptions_;
       }
     
       public static final int PLUGGABLE_DEVICE_OPTIONS_FIELD_NUMBER = 18;
    @@ -4569,7 +4889,7 @@ public org.tensorflow.proto.GPUOptionsOrBuilder getGpuOptionsOrBuilder() {
        */
       @java.lang.Override
       public boolean hasPluggableDeviceOptions() {
    -    return pluggableDeviceOptions_ != null;
    +    return ((bitField0_ & 0x00000002) != 0);
       }
       /**
        * 
    @@ -4592,20 +4912,20 @@ public org.tensorflow.proto.GPUOptions getPluggableDeviceOptions() {
        */
       @java.lang.Override
       public org.tensorflow.proto.GPUOptionsOrBuilder getPluggableDeviceOptionsOrBuilder() {
    -    return getPluggableDeviceOptions();
    +    return pluggableDeviceOptions_ == null ? org.tensorflow.proto.GPUOptions.getDefaultInstance() : pluggableDeviceOptions_;
       }
     
       public static final int ALLOW_SOFT_PLACEMENT_FIELD_NUMBER = 7;
    -  private boolean allowSoftPlacement_;
    +  private boolean allowSoftPlacement_ = false;
       /**
        * 
        * Whether soft placement is allowed. If allow_soft_placement is true,
        * an op will be placed on CPU if
    -   *   1. there's no GPU implementation for the OP
    +   * 1. there's no GPU implementation for the OP
        * or
    -   *   2. no GPU devices are known or registered
    +   * 2. no GPU devices are known or registered
        * or
    -   *   3. need to co-locate with reftype input(s) which are from CPU.
    +   * 3. need to co-locate with reftype input(s) which are from CPU.
        * 
    * * bool allow_soft_placement = 7; @@ -4617,7 +4937,7 @@ public boolean getAllowSoftPlacement() { } public static final int LOG_DEVICE_PLACEMENT_FIELD_NUMBER = 8; - private boolean logDevicePlacement_; + private boolean logDevicePlacement_ = false; /** *
        * Whether device placements should be logged.
    @@ -4643,7 +4963,7 @@ public boolean getLogDevicePlacement() {
        */
       @java.lang.Override
       public boolean hasGraphOptions() {
    -    return graphOptions_ != null;
    +    return ((bitField0_ & 0x00000004) != 0);
       }
       /**
        * 
    @@ -4666,11 +4986,11 @@ public org.tensorflow.proto.GraphOptions getGraphOptions() {
        */
       @java.lang.Override
       public org.tensorflow.proto.GraphOptionsOrBuilder getGraphOptionsOrBuilder() {
    -    return getGraphOptions();
    +    return graphOptions_ == null ? org.tensorflow.proto.GraphOptions.getDefaultInstance() : graphOptions_;
       }
     
       public static final int OPERATION_TIMEOUT_IN_MS_FIELD_NUMBER = 11;
    -  private long operationTimeoutInMs_;
    +  private long operationTimeoutInMs_ = 0L;
       /**
        * 
        * Global timeout for all blocking operations in this session.  If non-zero,
    @@ -4698,7 +5018,7 @@ public long getOperationTimeoutInMs() {
        */
       @java.lang.Override
       public boolean hasRpcOptions() {
    -    return rpcOptions_ != null;
    +    return ((bitField0_ & 0x00000008) != 0);
       }
       /**
        * 
    @@ -4721,7 +5041,7 @@ public org.tensorflow.proto.RpcOptions.RPCOptions getRpcOptions() {
        */
       @java.lang.Override
       public org.tensorflow.proto.RpcOptions.RPCOptionsOrBuilder getRpcOptionsOrBuilder() {
    -    return getRpcOptions();
    +    return rpcOptions_ == null ? org.tensorflow.proto.RpcOptions.RPCOptions.getDefaultInstance() : rpcOptions_;
       }
     
       public static final int CLUSTER_DEF_FIELD_NUMBER = 14;
    @@ -4736,7 +5056,7 @@ public org.tensorflow.proto.RpcOptions.RPCOptionsOrBuilder getRpcOptionsOrBuilde
        */
       @java.lang.Override
       public boolean hasClusterDef() {
    -    return clusterDef_ != null;
    +    return ((bitField0_ & 0x00000010) != 0);
       }
       /**
        * 
    @@ -4759,11 +5079,11 @@ public org.tensorflow.proto.ClusterDef getClusterDef() {
        */
       @java.lang.Override
       public org.tensorflow.proto.ClusterDefOrBuilder getClusterDefOrBuilder() {
    -    return getClusterDef();
    +    return clusterDef_ == null ? org.tensorflow.proto.ClusterDef.getDefaultInstance() : clusterDef_;
       }
     
       public static final int ISOLATE_SESSION_STATE_FIELD_NUMBER = 15;
    -  private boolean isolateSessionState_;
    +  private boolean isolateSessionState_ = false;
       /**
        * 
        * If true, any resources such as Variables used in the session will not be
    @@ -4780,7 +5100,7 @@ public boolean getIsolateSessionState() {
       }
     
       public static final int SHARE_CLUSTER_DEVICES_IN_SESSION_FIELD_NUMBER = 17;
    -  private boolean shareClusterDevicesInSession_;
    +  private boolean shareClusterDevicesInSession_ = false;
       /**
        * 
        * When true, WorkerSessions are created with device attributes from the
    @@ -4805,7 +5125,7 @@ public boolean getShareClusterDevicesInSession() {
        */
       @java.lang.Override
       public boolean hasExperimental() {
    -    return experimental_ != null;
    +    return ((bitField0_ & 0x00000020) != 0);
       }
       /**
        * .tensorflow.ConfigProto.Experimental experimental = 16;
    @@ -4820,7 +5140,7 @@ public org.tensorflow.proto.ConfigProto.Experimental getExperimental() {
        */
       @java.lang.Override
       public org.tensorflow.proto.ConfigProto.ExperimentalOrBuilder getExperimentalOrBuilder() {
    -    return getExperimental();
    +    return experimental_ == null ? org.tensorflow.proto.ConfigProto.Experimental.getDefaultInstance() : experimental_;
       }
     
       private byte memoizedIsInitialized = -1;
    @@ -4837,7 +5157,7 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    com.google.protobuf.GeneratedMessageV3
    +    com.google.protobuf.GeneratedMessage
           .serializeStringMapTo(
             output,
             internalGetDeviceCount(),
    @@ -4850,12 +5170,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           output.writeInt32(3, placementPeriod_);
         }
         for (int i = 0; i < deviceFilters_.size(); i++) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, deviceFilters_.getRaw(i));
    +      com.google.protobuf.GeneratedMessage.writeString(output, 4, deviceFilters_.getRaw(i));
         }
         if (interOpParallelismThreads_ != 0) {
           output.writeInt32(5, interOpParallelismThreads_);
         }
    -    if (gpuOptions_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(6, getGpuOptions());
         }
         if (allowSoftPlacement_ != false) {
    @@ -4867,7 +5187,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         if (usePerSessionThreads_ != false) {
           output.writeBool(9, usePerSessionThreads_);
         }
    -    if (graphOptions_ != null) {
    +    if (((bitField0_ & 0x00000004) != 0)) {
           output.writeMessage(10, getGraphOptions());
         }
         if (operationTimeoutInMs_ != 0L) {
    @@ -4876,22 +5196,22 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         for (int i = 0; i < sessionInterOpThreadPool_.size(); i++) {
           output.writeMessage(12, sessionInterOpThreadPool_.get(i));
         }
    -    if (rpcOptions_ != null) {
    +    if (((bitField0_ & 0x00000008) != 0)) {
           output.writeMessage(13, getRpcOptions());
         }
    -    if (clusterDef_ != null) {
    +    if (((bitField0_ & 0x00000010) != 0)) {
           output.writeMessage(14, getClusterDef());
         }
         if (isolateSessionState_ != false) {
           output.writeBool(15, isolateSessionState_);
         }
    -    if (experimental_ != null) {
    +    if (((bitField0_ & 0x00000020) != 0)) {
           output.writeMessage(16, getExperimental());
         }
         if (shareClusterDevicesInSession_ != false) {
           output.writeBool(17, shareClusterDevicesInSession_);
         }
    -    if (pluggableDeviceOptions_ != null) {
    +    if (((bitField0_ & 0x00000002) != 0)) {
           output.writeMessage(18, getPluggableDeviceOptions());
         }
         getUnknownFields().writeTo(output);
    @@ -4933,7 +5253,7 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeInt32Size(5, interOpParallelismThreads_);
         }
    -    if (gpuOptions_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(6, getGpuOptions());
         }
    @@ -4949,7 +5269,7 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeBoolSize(9, usePerSessionThreads_);
         }
    -    if (graphOptions_ != null) {
    +    if (((bitField0_ & 0x00000004) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(10, getGraphOptions());
         }
    @@ -4961,11 +5281,11 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(12, sessionInterOpThreadPool_.get(i));
         }
    -    if (rpcOptions_ != null) {
    +    if (((bitField0_ & 0x00000008) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(13, getRpcOptions());
         }
    -    if (clusterDef_ != null) {
    +    if (((bitField0_ & 0x00000010) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(14, getClusterDef());
         }
    @@ -4973,7 +5293,7 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeBoolSize(15, isolateSessionState_);
         }
    -    if (experimental_ != null) {
    +    if (((bitField0_ & 0x00000020) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(16, getExperimental());
         }
    @@ -4981,7 +5301,7 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeBoolSize(17, shareClusterDevicesInSession_);
         }
    -    if (pluggableDeviceOptions_ != null) {
    +    if (((bitField0_ & 0x00000002) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(18, getPluggableDeviceOptions());
         }
    @@ -5164,39 +5484,41 @@ public static org.tensorflow.proto.ConfigProto parseFrom(
       }
       public static org.tensorflow.proto.ConfigProto parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.ConfigProto parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.ConfigProto parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.ConfigProto parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.ConfigProto parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.ConfigProto parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -5216,7 +5538,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -5229,7 +5551,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.ConfigProto}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.ConfigProto)
           org.tensorflow.proto.ConfigProtoOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -5238,7 +5560,7 @@ public static final class Builder extends
         }
     
         @SuppressWarnings({"rawtypes"})
    -    protected com.google.protobuf.MapField internalGetMapField(
    +    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
             int number) {
           switch (number) {
             case 1:
    @@ -5249,7 +5571,7 @@ protected com.google.protobuf.MapField internalGetMapField(
           }
         }
         @SuppressWarnings({"rawtypes"})
    -    protected com.google.protobuf.MapField internalGetMutableMapField(
    +    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
             int number) {
           switch (number) {
             case 1:
    @@ -5260,7 +5582,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField(
           }
         }
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_ConfigProto_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -5269,79 +5591,77 @@ protected com.google.protobuf.MapField internalGetMutableMapField(
     
         // Construct using org.tensorflow.proto.ConfigProto.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getSessionInterOpThreadPoolFieldBuilder();
    +        getGpuOptionsFieldBuilder();
    +        getPluggableDeviceOptionsFieldBuilder();
    +        getGraphOptionsFieldBuilder();
    +        getRpcOptionsFieldBuilder();
    +        getClusterDefFieldBuilder();
    +        getExperimentalFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           internalGetMutableDeviceCount().clear();
           intraOpParallelismThreads_ = 0;
    -
           interOpParallelismThreads_ = 0;
    -
           usePerSessionThreads_ = false;
    -
           if (sessionInterOpThreadPoolBuilder_ == null) {
             sessionInterOpThreadPool_ = java.util.Collections.emptyList();
           } else {
             sessionInterOpThreadPool_ = null;
             sessionInterOpThreadPoolBuilder_.clear();
           }
    -      bitField0_ = (bitField0_ & ~0x00000002);
    +      bitField0_ = (bitField0_ & ~0x00000010);
           placementPeriod_ = 0;
    -
    -      deviceFilters_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000004);
    -      if (gpuOptionsBuilder_ == null) {
    -        gpuOptions_ = null;
    -      } else {
    -        gpuOptions_ = null;
    +      deviceFilters_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
    +      gpuOptions_ = null;
    +      if (gpuOptionsBuilder_ != null) {
    +        gpuOptionsBuilder_.dispose();
             gpuOptionsBuilder_ = null;
           }
    -      if (pluggableDeviceOptionsBuilder_ == null) {
    -        pluggableDeviceOptions_ = null;
    -      } else {
    -        pluggableDeviceOptions_ = null;
    +      pluggableDeviceOptions_ = null;
    +      if (pluggableDeviceOptionsBuilder_ != null) {
    +        pluggableDeviceOptionsBuilder_.dispose();
             pluggableDeviceOptionsBuilder_ = null;
           }
           allowSoftPlacement_ = false;
    -
           logDevicePlacement_ = false;
    -
    -      if (graphOptionsBuilder_ == null) {
    -        graphOptions_ = null;
    -      } else {
    -        graphOptions_ = null;
    +      graphOptions_ = null;
    +      if (graphOptionsBuilder_ != null) {
    +        graphOptionsBuilder_.dispose();
             graphOptionsBuilder_ = null;
           }
           operationTimeoutInMs_ = 0L;
    -
    -      if (rpcOptionsBuilder_ == null) {
    -        rpcOptions_ = null;
    -      } else {
    -        rpcOptions_ = null;
    +      rpcOptions_ = null;
    +      if (rpcOptionsBuilder_ != null) {
    +        rpcOptionsBuilder_.dispose();
             rpcOptionsBuilder_ = null;
           }
    -      if (clusterDefBuilder_ == null) {
    -        clusterDef_ = null;
    -      } else {
    -        clusterDef_ = null;
    +      clusterDef_ = null;
    +      if (clusterDefBuilder_ != null) {
    +        clusterDefBuilder_.dispose();
             clusterDefBuilder_ = null;
           }
           isolateSessionState_ = false;
    -
           shareClusterDevicesInSession_ = false;
    -
    -      if (experimentalBuilder_ == null) {
    -        experimental_ = null;
    -      } else {
    -        experimental_ = null;
    +      experimental_ = null;
    +      if (experimentalBuilder_ != null) {
    +        experimentalBuilder_.dispose();
             experimentalBuilder_ = null;
           }
           return this;
    @@ -5370,98 +5690,101 @@ public org.tensorflow.proto.ConfigProto build() {
         @java.lang.Override
         public org.tensorflow.proto.ConfigProto buildPartial() {
           org.tensorflow.proto.ConfigProto result = new org.tensorflow.proto.ConfigProto(this);
    -      int from_bitField0_ = bitField0_;
    -      result.deviceCount_ = internalGetDeviceCount();
    -      result.deviceCount_.makeImmutable();
    -      result.intraOpParallelismThreads_ = intraOpParallelismThreads_;
    -      result.interOpParallelismThreads_ = interOpParallelismThreads_;
    -      result.usePerSessionThreads_ = usePerSessionThreads_;
    +      buildPartialRepeatedFields(result);
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartialRepeatedFields(org.tensorflow.proto.ConfigProto result) {
           if (sessionInterOpThreadPoolBuilder_ == null) {
    -        if (((bitField0_ & 0x00000002) != 0)) {
    +        if (((bitField0_ & 0x00000010) != 0)) {
               sessionInterOpThreadPool_ = java.util.Collections.unmodifiableList(sessionInterOpThreadPool_);
    -          bitField0_ = (bitField0_ & ~0x00000002);
    +          bitField0_ = (bitField0_ & ~0x00000010);
             }
             result.sessionInterOpThreadPool_ = sessionInterOpThreadPool_;
           } else {
             result.sessionInterOpThreadPool_ = sessionInterOpThreadPoolBuilder_.build();
           }
    -      result.placementPeriod_ = placementPeriod_;
    -      if (((bitField0_ & 0x00000004) != 0)) {
    -        deviceFilters_ = deviceFilters_.getUnmodifiableView();
    -        bitField0_ = (bitField0_ & ~0x00000004);
    -      }
    -      result.deviceFilters_ = deviceFilters_;
    -      if (gpuOptionsBuilder_ == null) {
    -        result.gpuOptions_ = gpuOptions_;
    -      } else {
    -        result.gpuOptions_ = gpuOptionsBuilder_.build();
    -      }
    -      if (pluggableDeviceOptionsBuilder_ == null) {
    -        result.pluggableDeviceOptions_ = pluggableDeviceOptions_;
    -      } else {
    -        result.pluggableDeviceOptions_ = pluggableDeviceOptionsBuilder_.build();
    -      }
    -      result.allowSoftPlacement_ = allowSoftPlacement_;
    -      result.logDevicePlacement_ = logDevicePlacement_;
    -      if (graphOptionsBuilder_ == null) {
    -        result.graphOptions_ = graphOptions_;
    -      } else {
    -        result.graphOptions_ = graphOptionsBuilder_.build();
    -      }
    -      result.operationTimeoutInMs_ = operationTimeoutInMs_;
    -      if (rpcOptionsBuilder_ == null) {
    -        result.rpcOptions_ = rpcOptions_;
    -      } else {
    -        result.rpcOptions_ = rpcOptionsBuilder_.build();
    -      }
    -      if (clusterDefBuilder_ == null) {
    -        result.clusterDef_ = clusterDef_;
    -      } else {
    -        result.clusterDef_ = clusterDefBuilder_.build();
    +    }
    +
    +    private void buildPartial0(org.tensorflow.proto.ConfigProto result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.deviceCount_ = internalGetDeviceCount();
    +        result.deviceCount_.makeImmutable();
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.intraOpParallelismThreads_ = intraOpParallelismThreads_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.interOpParallelismThreads_ = interOpParallelismThreads_;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.usePerSessionThreads_ = usePerSessionThreads_;
    +      }
    +      if (((from_bitField0_ & 0x00000020) != 0)) {
    +        result.placementPeriod_ = placementPeriod_;
    +      }
    +      if (((from_bitField0_ & 0x00000040) != 0)) {
    +        deviceFilters_.makeImmutable();
    +        result.deviceFilters_ = deviceFilters_;
    +      }
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000080) != 0)) {
    +        result.gpuOptions_ = gpuOptionsBuilder_ == null
    +            ? gpuOptions_
    +            : gpuOptionsBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
    +      }
    +      if (((from_bitField0_ & 0x00000100) != 0)) {
    +        result.pluggableDeviceOptions_ = pluggableDeviceOptionsBuilder_ == null
    +            ? pluggableDeviceOptions_
    +            : pluggableDeviceOptionsBuilder_.build();
    +        to_bitField0_ |= 0x00000002;
    +      }
    +      if (((from_bitField0_ & 0x00000200) != 0)) {
    +        result.allowSoftPlacement_ = allowSoftPlacement_;
    +      }
    +      if (((from_bitField0_ & 0x00000400) != 0)) {
    +        result.logDevicePlacement_ = logDevicePlacement_;
    +      }
    +      if (((from_bitField0_ & 0x00000800) != 0)) {
    +        result.graphOptions_ = graphOptionsBuilder_ == null
    +            ? graphOptions_
    +            : graphOptionsBuilder_.build();
    +        to_bitField0_ |= 0x00000004;
    +      }
    +      if (((from_bitField0_ & 0x00001000) != 0)) {
    +        result.operationTimeoutInMs_ = operationTimeoutInMs_;
    +      }
    +      if (((from_bitField0_ & 0x00002000) != 0)) {
    +        result.rpcOptions_ = rpcOptionsBuilder_ == null
    +            ? rpcOptions_
    +            : rpcOptionsBuilder_.build();
    +        to_bitField0_ |= 0x00000008;
    +      }
    +      if (((from_bitField0_ & 0x00004000) != 0)) {
    +        result.clusterDef_ = clusterDefBuilder_ == null
    +            ? clusterDef_
    +            : clusterDefBuilder_.build();
    +        to_bitField0_ |= 0x00000010;
    +      }
    +      if (((from_bitField0_ & 0x00008000) != 0)) {
    +        result.isolateSessionState_ = isolateSessionState_;
    +      }
    +      if (((from_bitField0_ & 0x00010000) != 0)) {
    +        result.shareClusterDevicesInSession_ = shareClusterDevicesInSession_;
           }
    -      result.isolateSessionState_ = isolateSessionState_;
    -      result.shareClusterDevicesInSession_ = shareClusterDevicesInSession_;
    -      if (experimentalBuilder_ == null) {
    -        result.experimental_ = experimental_;
    -      } else {
    -        result.experimental_ = experimentalBuilder_.build();
    +      if (((from_bitField0_ & 0x00020000) != 0)) {
    +        result.experimental_ = experimentalBuilder_ == null
    +            ? experimental_
    +            : experimentalBuilder_.build();
    +        to_bitField0_ |= 0x00000020;
           }
    -      onBuilt();
    -      return result;
    +      result.bitField0_ |= to_bitField0_;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    -    }
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.ConfigProto) {
    @@ -5476,6 +5799,7 @@ public Builder mergeFrom(org.tensorflow.proto.ConfigProto other) {
           if (other == org.tensorflow.proto.ConfigProto.getDefaultInstance()) return this;
           internalGetMutableDeviceCount().mergeFrom(
               other.internalGetDeviceCount());
    +      bitField0_ |= 0x00000001;
           if (other.getIntraOpParallelismThreads() != 0) {
             setIntraOpParallelismThreads(other.getIntraOpParallelismThreads());
           }
    @@ -5489,7 +5813,7 @@ public Builder mergeFrom(org.tensorflow.proto.ConfigProto other) {
             if (!other.sessionInterOpThreadPool_.isEmpty()) {
               if (sessionInterOpThreadPool_.isEmpty()) {
                 sessionInterOpThreadPool_ = other.sessionInterOpThreadPool_;
    -            bitField0_ = (bitField0_ & ~0x00000002);
    +            bitField0_ = (bitField0_ & ~0x00000010);
               } else {
                 ensureSessionInterOpThreadPoolIsMutable();
                 sessionInterOpThreadPool_.addAll(other.sessionInterOpThreadPool_);
    @@ -5502,9 +5826,9 @@ public Builder mergeFrom(org.tensorflow.proto.ConfigProto other) {
                 sessionInterOpThreadPoolBuilder_.dispose();
                 sessionInterOpThreadPoolBuilder_ = null;
                 sessionInterOpThreadPool_ = other.sessionInterOpThreadPool_;
    -            bitField0_ = (bitField0_ & ~0x00000002);
    +            bitField0_ = (bitField0_ & ~0x00000010);
                 sessionInterOpThreadPoolBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getSessionInterOpThreadPoolFieldBuilder() : null;
               } else {
                 sessionInterOpThreadPoolBuilder_.addAllMessages(other.sessionInterOpThreadPool_);
    @@ -5517,7 +5841,7 @@ public Builder mergeFrom(org.tensorflow.proto.ConfigProto other) {
           if (!other.deviceFilters_.isEmpty()) {
             if (deviceFilters_.isEmpty()) {
               deviceFilters_ = other.deviceFilters_;
    -          bitField0_ = (bitField0_ & ~0x00000004);
    +          bitField0_ |= 0x00000040;
             } else {
               ensureDeviceFiltersIsMutable();
               deviceFilters_.addAll(other.deviceFilters_);
    @@ -5589,16 +5913,17 @@ public Builder mergeFrom(
                       DeviceCountDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
                   internalGetMutableDeviceCount().getMutableMap().put(
                       deviceCount__.getKey(), deviceCount__.getValue());
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 16: {
                   intraOpParallelismThreads_ = input.readInt32();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 16
                 case 24: {
                   placementPeriod_ = input.readInt32();
    -
    +              bitField0_ |= 0x00000020;
                   break;
                 } // case 24
                 case 34: {
    @@ -5609,41 +5934,41 @@ public Builder mergeFrom(
                 } // case 34
                 case 40: {
                   interOpParallelismThreads_ = input.readInt32();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 40
                 case 50: {
                   input.readMessage(
                       getGpuOptionsFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000080;
                   break;
                 } // case 50
                 case 56: {
                   allowSoftPlacement_ = input.readBool();
    -
    +              bitField0_ |= 0x00000200;
                   break;
                 } // case 56
                 case 64: {
                   logDevicePlacement_ = input.readBool();
    -
    +              bitField0_ |= 0x00000400;
                   break;
                 } // case 64
                 case 72: {
                   usePerSessionThreads_ = input.readBool();
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 72
                 case 82: {
                   input.readMessage(
                       getGraphOptionsFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000800;
                   break;
                 } // case 82
                 case 88: {
                   operationTimeoutInMs_ = input.readInt64();
    -
    +              bitField0_ |= 0x00001000;
                   break;
                 } // case 88
                 case 98: {
    @@ -5663,38 +5988,38 @@ public Builder mergeFrom(
                   input.readMessage(
                       getRpcOptionsFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00002000;
                   break;
                 } // case 106
                 case 114: {
                   input.readMessage(
                       getClusterDefFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00004000;
                   break;
                 } // case 114
                 case 120: {
                   isolateSessionState_ = input.readBool();
    -
    +              bitField0_ |= 0x00008000;
                   break;
                 } // case 120
                 case 130: {
                   input.readMessage(
                       getExperimentalFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00020000;
                   break;
                 } // case 130
                 case 136: {
                   shareClusterDevicesInSession_ = input.readBool();
    -
    +              bitField0_ |= 0x00010000;
                   break;
                 } // case 136
                 case 146: {
                   input.readMessage(
                       getPluggableDeviceOptionsFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000100;
                   break;
                 } // case 146
                 default: {
    @@ -5717,7 +6042,7 @@ public Builder mergeFrom(
         private com.google.protobuf.MapField<
             java.lang.String, java.lang.Integer> deviceCount_;
         private com.google.protobuf.MapField
    -    internalGetDeviceCount() {
    +        internalGetDeviceCount() {
           if (deviceCount_ == null) {
             return com.google.protobuf.MapField.emptyMapField(
                 DeviceCountDefaultEntryHolder.defaultEntry);
    @@ -5725,8 +6050,7 @@ public Builder mergeFrom(
           return deviceCount_;
         }
         private com.google.protobuf.MapField
    -    internalGetMutableDeviceCount() {
    -      onChanged();;
    +        internalGetMutableDeviceCount() {
           if (deviceCount_ == null) {
             deviceCount_ = com.google.protobuf.MapField.newMapField(
                 DeviceCountDefaultEntryHolder.defaultEntry);
    @@ -5734,9 +6058,10 @@ public Builder mergeFrom(
           if (!deviceCount_.isMutable()) {
             deviceCount_ = deviceCount_.copy();
           }
    +      bitField0_ |= 0x00000001;
    +      onChanged();
           return deviceCount_;
         }
    -
         public int getDeviceCountCount() {
           return internalGetDeviceCount().getMap().size();
         }
    @@ -5750,7 +6075,6 @@ public int getDeviceCountCount() {
          *
          * map<string, int32> device_count = 1;
          */
    -
         @java.lang.Override
         public boolean containsDeviceCount(
             java.lang.String key) {
    @@ -5776,7 +6100,6 @@ public java.util.Map getDeviceCount() {
          * map<string, int32> device_count = 1;
          */
         @java.lang.Override
    -
         public java.util.Map getDeviceCountMap() {
           return internalGetDeviceCount().getMap();
         }
    @@ -5791,7 +6114,6 @@ public java.util.Map getDeviceCountMap() {
          * map<string, int32> device_count = 1;
          */
         @java.lang.Override
    -
         public int getDeviceCountOrDefault(
             java.lang.String key,
             int defaultValue) {
    @@ -5811,7 +6133,6 @@ public int getDeviceCountOrDefault(
          * map<string, int32> device_count = 1;
          */
         @java.lang.Override
    -
         public int getDeviceCountOrThrow(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    @@ -5822,8 +6143,8 @@ public int getDeviceCountOrThrow(
           }
           return map.get(key);
         }
    -
         public Builder clearDeviceCount() {
    +      bitField0_ = (bitField0_ & ~0x00000001);
           internalGetMutableDeviceCount().getMutableMap()
               .clear();
           return this;
    @@ -5838,7 +6159,6 @@ public Builder clearDeviceCount() {
          *
          * map<string, int32> device_count = 1;
          */
    -
         public Builder removeDeviceCount(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    @@ -5851,7 +6171,8 @@ public Builder removeDeviceCount(
          */
         @java.lang.Deprecated
         public java.util.Map
    -    getMutableDeviceCount() {
    +        getMutableDeviceCount() {
    +      bitField0_ |= 0x00000001;
           return internalGetMutableDeviceCount().getMutableMap();
         }
         /**
    @@ -5868,9 +6189,10 @@ public Builder putDeviceCount(
             java.lang.String key,
             int value) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      
    +
           internalGetMutableDeviceCount().getMutableMap()
               .put(key, value);
    +      bitField0_ |= 0x00000001;
           return this;
         }
         /**
    @@ -5883,11 +6205,11 @@ public Builder putDeviceCount(
          *
          * map<string, int32> device_count = 1;
          */
    -
         public Builder putAllDeviceCount(
             java.util.Map values) {
           internalGetMutableDeviceCount().getMutableMap()
               .putAll(values);
    +      bitField0_ |= 0x00000001;
           return this;
         }
     
    @@ -5897,15 +6219,17 @@ public Builder putAllDeviceCount(
          * The execution of an individual op (for some op types) can be
          * parallelized on a pool of intra_op_parallelism_threads.
          * 0 means the system picks an appropriate number.
    +     *
          * If you create an ordinary session, e.g., from Python or C++,
          * then there is exactly one intra op thread pool per process.
          * The first session created determines the number of threads in this pool.
          * All subsequent sessions reuse/share this one global pool.
    +     *
          * There are notable exceptions to the default behavior described above:
          * 1. There is an environment variable  for overriding this thread pool,
    -     *    named TF_OVERRIDE_GLOBAL_THREADPOOL.
    +     * named TF_OVERRIDE_GLOBAL_THREADPOOL.
          * 2. When connecting to a server, such as a remote `tf.train.Server`
    -     *    instance, then this option will be ignored altogether.
    +     * instance, then this option will be ignored altogether.
          * 
    * * int32 intra_op_parallelism_threads = 2; @@ -5920,15 +6244,17 @@ public int getIntraOpParallelismThreads() { * The execution of an individual op (for some op types) can be * parallelized on a pool of intra_op_parallelism_threads. * 0 means the system picks an appropriate number. + * * If you create an ordinary session, e.g., from Python or C++, * then there is exactly one intra op thread pool per process. * The first session created determines the number of threads in this pool. * All subsequent sessions reuse/share this one global pool. + * * There are notable exceptions to the default behavior described above: * 1. There is an environment variable for overriding this thread pool, - * named TF_OVERRIDE_GLOBAL_THREADPOOL. + * named TF_OVERRIDE_GLOBAL_THREADPOOL. * 2. When connecting to a server, such as a remote `tf.train.Server` - * instance, then this option will be ignored altogether. + * instance, then this option will be ignored altogether. *
    * * int32 intra_op_parallelism_threads = 2; @@ -5936,8 +6262,9 @@ public int getIntraOpParallelismThreads() { * @return This builder for chaining. */ public Builder setIntraOpParallelismThreads(int value) { - + intraOpParallelismThreads_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -5946,22 +6273,24 @@ public Builder setIntraOpParallelismThreads(int value) { * The execution of an individual op (for some op types) can be * parallelized on a pool of intra_op_parallelism_threads. * 0 means the system picks an appropriate number. + * * If you create an ordinary session, e.g., from Python or C++, * then there is exactly one intra op thread pool per process. * The first session created determines the number of threads in this pool. * All subsequent sessions reuse/share this one global pool. + * * There are notable exceptions to the default behavior described above: * 1. There is an environment variable for overriding this thread pool, - * named TF_OVERRIDE_GLOBAL_THREADPOOL. + * named TF_OVERRIDE_GLOBAL_THREADPOOL. * 2. When connecting to a server, such as a remote `tf.train.Server` - * instance, then this option will be ignored altogether. + * instance, then this option will be ignored altogether. *
    * * int32 intra_op_parallelism_threads = 2; * @return This builder for chaining. */ public Builder clearIntraOpParallelismThreads() { - + bitField0_ = (bitField0_ & ~0x00000002); intraOpParallelismThreads_ = 0; onChanged(); return this; @@ -5972,8 +6301,10 @@ public Builder clearIntraOpParallelismThreads() { *
          * Nodes that perform blocking operations are enqueued on a pool of
          * inter_op_parallelism_threads available in each process.
    +     *
          * 0 means the system picks an appropriate number.
          * Negative means all operations are performed in caller's thread.
    +     *
          * Note that the first Session created in the process sets the
          * number of threads for all future sessions unless use_per_session_threads is
          * true or session_inter_op_thread_pool is configured.
    @@ -5990,8 +6321,10 @@ public int getInterOpParallelismThreads() {
          * 
          * Nodes that perform blocking operations are enqueued on a pool of
          * inter_op_parallelism_threads available in each process.
    +     *
          * 0 means the system picks an appropriate number.
          * Negative means all operations are performed in caller's thread.
    +     *
          * Note that the first Session created in the process sets the
          * number of threads for all future sessions unless use_per_session_threads is
          * true or session_inter_op_thread_pool is configured.
    @@ -6002,8 +6335,9 @@ public int getInterOpParallelismThreads() {
          * @return This builder for chaining.
          */
         public Builder setInterOpParallelismThreads(int value) {
    -      
    +
           interOpParallelismThreads_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -6011,8 +6345,10 @@ public Builder setInterOpParallelismThreads(int value) {
          * 
          * Nodes that perform blocking operations are enqueued on a pool of
          * inter_op_parallelism_threads available in each process.
    +     *
          * 0 means the system picks an appropriate number.
          * Negative means all operations are performed in caller's thread.
    +     *
          * Note that the first Session created in the process sets the
          * number of threads for all future sessions unless use_per_session_threads is
          * true or session_inter_op_thread_pool is configured.
    @@ -6022,7 +6358,7 @@ public Builder setInterOpParallelismThreads(int value) {
          * @return This builder for chaining.
          */
         public Builder clearInterOpParallelismThreads() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000004);
           interOpParallelismThreads_ = 0;
           onChanged();
           return this;
    @@ -6033,8 +6369,10 @@ public Builder clearInterOpParallelismThreads() {
          * 
          * If true, use a new set of threads for this session rather than the global
          * pool of threads. Only supported by direct sessions.
    +     *
          * If false, use the global threads created by the first session, or the
          * per-session thread pools configured by session_inter_op_thread_pool.
    +     *
          * This option is deprecated. The same effect can be achieved by setting
          * session_inter_op_thread_pool to have one element, whose num_threads equals
          * inter_op_parallelism_threads.
    @@ -6051,8 +6389,10 @@ public boolean getUsePerSessionThreads() {
          * 
          * If true, use a new set of threads for this session rather than the global
          * pool of threads. Only supported by direct sessions.
    +     *
          * If false, use the global threads created by the first session, or the
          * per-session thread pools configured by session_inter_op_thread_pool.
    +     *
          * This option is deprecated. The same effect can be achieved by setting
          * session_inter_op_thread_pool to have one element, whose num_threads equals
          * inter_op_parallelism_threads.
    @@ -6063,8 +6403,9 @@ public boolean getUsePerSessionThreads() {
          * @return This builder for chaining.
          */
         public Builder setUsePerSessionThreads(boolean value) {
    -      
    +
           usePerSessionThreads_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -6072,8 +6413,10 @@ public Builder setUsePerSessionThreads(boolean value) {
          * 
          * If true, use a new set of threads for this session rather than the global
          * pool of threads. Only supported by direct sessions.
    +     *
          * If false, use the global threads created by the first session, or the
          * per-session thread pools configured by session_inter_op_thread_pool.
    +     *
          * This option is deprecated. The same effect can be achieved by setting
          * session_inter_op_thread_pool to have one element, whose num_threads equals
          * inter_op_parallelism_threads.
    @@ -6083,7 +6426,7 @@ public Builder setUsePerSessionThreads(boolean value) {
          * @return This builder for chaining.
          */
         public Builder clearUsePerSessionThreads() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000008);
           usePerSessionThreads_ = false;
           onChanged();
           return this;
    @@ -6092,21 +6435,23 @@ public Builder clearUsePerSessionThreads() {
         private java.util.List sessionInterOpThreadPool_ =
           java.util.Collections.emptyList();
         private void ensureSessionInterOpThreadPoolIsMutable() {
    -      if (!((bitField0_ & 0x00000002) != 0)) {
    +      if (!((bitField0_ & 0x00000010) != 0)) {
             sessionInterOpThreadPool_ = new java.util.ArrayList(sessionInterOpThreadPool_);
    -        bitField0_ |= 0x00000002;
    +        bitField0_ |= 0x00000010;
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.ThreadPoolOptionProto, org.tensorflow.proto.ThreadPoolOptionProto.Builder, org.tensorflow.proto.ThreadPoolOptionProtoOrBuilder> sessionInterOpThreadPoolBuilder_;
     
         /**
          * 
          * This option is experimental - it may be replaced with a different mechanism
          * in the future.
    +     *
          * Configures session thread pools. If this is configured, then RunOptions for
          * a Run call can select the thread pool to use.
    +     *
          * The intended use is for when some session invocations need to run in a
          * background pool limited to a small number of threads:
          * - For example, a session may be configured to have one large pool (for
    @@ -6135,8 +6480,10 @@ public java.util.List getSessionInte
          * 
          * This option is experimental - it may be replaced with a different mechanism
          * in the future.
    +     *
          * Configures session thread pools. If this is configured, then RunOptions for
          * a Run call can select the thread pool to use.
    +     *
          * The intended use is for when some session invocations need to run in a
          * background pool limited to a small number of threads:
          * - For example, a session may be configured to have one large pool (for
    @@ -6165,8 +6512,10 @@ public int getSessionInterOpThreadPoolCount() {
          * 
          * This option is experimental - it may be replaced with a different mechanism
          * in the future.
    +     *
          * Configures session thread pools. If this is configured, then RunOptions for
          * a Run call can select the thread pool to use.
    +     *
          * The intended use is for when some session invocations need to run in a
          * background pool limited to a small number of threads:
          * - For example, a session may be configured to have one large pool (for
    @@ -6195,8 +6544,10 @@ public org.tensorflow.proto.ThreadPoolOptionProto getSessionInterOpThreadPool(in
          * 
          * This option is experimental - it may be replaced with a different mechanism
          * in the future.
    +     *
          * Configures session thread pools. If this is configured, then RunOptions for
          * a Run call can select the thread pool to use.
    +     *
          * The intended use is for when some session invocations need to run in a
          * background pool limited to a small number of threads:
          * - For example, a session may be configured to have one large pool (for
    @@ -6232,8 +6583,10 @@ public Builder setSessionInterOpThreadPool(
          * 
          * This option is experimental - it may be replaced with a different mechanism
          * in the future.
    +     *
          * Configures session thread pools. If this is configured, then RunOptions for
          * a Run call can select the thread pool to use.
    +     *
          * The intended use is for when some session invocations need to run in a
          * background pool limited to a small number of threads:
          * - For example, a session may be configured to have one large pool (for
    @@ -6266,8 +6619,10 @@ public Builder setSessionInterOpThreadPool(
          * 
          * This option is experimental - it may be replaced with a different mechanism
          * in the future.
    +     *
          * Configures session thread pools. If this is configured, then RunOptions for
          * a Run call can select the thread pool to use.
    +     *
          * The intended use is for when some session invocations need to run in a
          * background pool limited to a small number of threads:
          * - For example, a session may be configured to have one large pool (for
    @@ -6302,8 +6657,10 @@ public Builder addSessionInterOpThreadPool(org.tensorflow.proto.ThreadPoolOption
          * 
          * This option is experimental - it may be replaced with a different mechanism
          * in the future.
    +     *
          * Configures session thread pools. If this is configured, then RunOptions for
          * a Run call can select the thread pool to use.
    +     *
          * The intended use is for when some session invocations need to run in a
          * background pool limited to a small number of threads:
          * - For example, a session may be configured to have one large pool (for
    @@ -6339,8 +6696,10 @@ public Builder addSessionInterOpThreadPool(
          * 
          * This option is experimental - it may be replaced with a different mechanism
          * in the future.
    +     *
          * Configures session thread pools. If this is configured, then RunOptions for
          * a Run call can select the thread pool to use.
    +     *
          * The intended use is for when some session invocations need to run in a
          * background pool limited to a small number of threads:
          * - For example, a session may be configured to have one large pool (for
    @@ -6373,8 +6732,10 @@ public Builder addSessionInterOpThreadPool(
          * 
          * This option is experimental - it may be replaced with a different mechanism
          * in the future.
    +     *
          * Configures session thread pools. If this is configured, then RunOptions for
          * a Run call can select the thread pool to use.
    +     *
          * The intended use is for when some session invocations need to run in a
          * background pool limited to a small number of threads:
          * - For example, a session may be configured to have one large pool (for
    @@ -6407,8 +6768,10 @@ public Builder addSessionInterOpThreadPool(
          * 
          * This option is experimental - it may be replaced with a different mechanism
          * in the future.
    +     *
          * Configures session thread pools. If this is configured, then RunOptions for
          * a Run call can select the thread pool to use.
    +     *
          * The intended use is for when some session invocations need to run in a
          * background pool limited to a small number of threads:
          * - For example, a session may be configured to have one large pool (for
    @@ -6442,8 +6805,10 @@ public Builder addAllSessionInterOpThreadPool(
          * 
          * This option is experimental - it may be replaced with a different mechanism
          * in the future.
    +     *
          * Configures session thread pools. If this is configured, then RunOptions for
          * a Run call can select the thread pool to use.
    +     *
          * The intended use is for when some session invocations need to run in a
          * background pool limited to a small number of threads:
          * - For example, a session may be configured to have one large pool (for
    @@ -6464,7 +6829,7 @@ public Builder addAllSessionInterOpThreadPool(
         public Builder clearSessionInterOpThreadPool() {
           if (sessionInterOpThreadPoolBuilder_ == null) {
             sessionInterOpThreadPool_ = java.util.Collections.emptyList();
    -        bitField0_ = (bitField0_ & ~0x00000002);
    +        bitField0_ = (bitField0_ & ~0x00000010);
             onChanged();
           } else {
             sessionInterOpThreadPoolBuilder_.clear();
    @@ -6475,8 +6840,10 @@ public Builder clearSessionInterOpThreadPool() {
          * 
          * This option is experimental - it may be replaced with a different mechanism
          * in the future.
    +     *
          * Configures session thread pools. If this is configured, then RunOptions for
          * a Run call can select the thread pool to use.
    +     *
          * The intended use is for when some session invocations need to run in a
          * background pool limited to a small number of threads:
          * - For example, a session may be configured to have one large pool (for
    @@ -6508,8 +6875,10 @@ public Builder removeSessionInterOpThreadPool(int index) {
          * 
          * This option is experimental - it may be replaced with a different mechanism
          * in the future.
    +     *
          * Configures session thread pools. If this is configured, then RunOptions for
          * a Run call can select the thread pool to use.
    +     *
          * The intended use is for when some session invocations need to run in a
          * background pool limited to a small number of threads:
          * - For example, a session may be configured to have one large pool (for
    @@ -6535,8 +6904,10 @@ public org.tensorflow.proto.ThreadPoolOptionProto.Builder getSessionInterOpThrea
          * 
          * This option is experimental - it may be replaced with a different mechanism
          * in the future.
    +     *
          * Configures session thread pools. If this is configured, then RunOptions for
          * a Run call can select the thread pool to use.
    +     *
          * The intended use is for when some session invocations need to run in a
          * background pool limited to a small number of threads:
          * - For example, a session may be configured to have one large pool (for
    @@ -6565,8 +6936,10 @@ public org.tensorflow.proto.ThreadPoolOptionProtoOrBuilder getSessionInterOpThre
          * 
          * This option is experimental - it may be replaced with a different mechanism
          * in the future.
    +     *
          * Configures session thread pools. If this is configured, then RunOptions for
          * a Run call can select the thread pool to use.
    +     *
          * The intended use is for when some session invocations need to run in a
          * background pool limited to a small number of threads:
          * - For example, a session may be configured to have one large pool (for
    @@ -6596,8 +6969,10 @@ public org.tensorflow.proto.ThreadPoolOptionProtoOrBuilder getSessionInterOpThre
          * 
          * This option is experimental - it may be replaced with a different mechanism
          * in the future.
    +     *
          * Configures session thread pools. If this is configured, then RunOptions for
          * a Run call can select the thread pool to use.
    +     *
          * The intended use is for when some session invocations need to run in a
          * background pool limited to a small number of threads:
          * - For example, a session may be configured to have one large pool (for
    @@ -6623,8 +6998,10 @@ public org.tensorflow.proto.ThreadPoolOptionProto.Builder addSessionInterOpThrea
          * 
          * This option is experimental - it may be replaced with a different mechanism
          * in the future.
    +     *
          * Configures session thread pools. If this is configured, then RunOptions for
          * a Run call can select the thread pool to use.
    +     *
          * The intended use is for when some session invocations need to run in a
          * background pool limited to a small number of threads:
          * - For example, a session may be configured to have one large pool (for
    @@ -6651,8 +7028,10 @@ public org.tensorflow.proto.ThreadPoolOptionProto.Builder addSessionInterOpThrea
          * 
          * This option is experimental - it may be replaced with a different mechanism
          * in the future.
    +     *
          * Configures session thread pools. If this is configured, then RunOptions for
          * a Run call can select the thread pool to use.
    +     *
          * The intended use is for when some session invocations need to run in a
          * background pool limited to a small number of threads:
          * - For example, a session may be configured to have one large pool (for
    @@ -6674,14 +7053,14 @@ public org.tensorflow.proto.ThreadPoolOptionProto.Builder addSessionInterOpThrea
              getSessionInterOpThreadPoolBuilderList() {
           return getSessionInterOpThreadPoolFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.ThreadPoolOptionProto, org.tensorflow.proto.ThreadPoolOptionProto.Builder, org.tensorflow.proto.ThreadPoolOptionProtoOrBuilder> 
             getSessionInterOpThreadPoolFieldBuilder() {
           if (sessionInterOpThreadPoolBuilder_ == null) {
    -        sessionInterOpThreadPoolBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        sessionInterOpThreadPoolBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.ThreadPoolOptionProto, org.tensorflow.proto.ThreadPoolOptionProto.Builder, org.tensorflow.proto.ThreadPoolOptionProtoOrBuilder>(
                     sessionInterOpThreadPool_,
    -                ((bitField0_ & 0x00000002) != 0),
    +                ((bitField0_ & 0x00000010) != 0),
                     getParentForChildren(),
                     isClean());
             sessionInterOpThreadPool_ = null;
    @@ -6716,8 +7095,9 @@ public int getPlacementPeriod() {
          * @return This builder for chaining.
          */
         public Builder setPlacementPeriod(int value) {
    -      
    +
           placementPeriod_ = value;
    +      bitField0_ |= 0x00000020;
           onChanged();
           return this;
         }
    @@ -6732,18 +7112,19 @@ public Builder setPlacementPeriod(int value) {
          * @return This builder for chaining.
          */
         public Builder clearPlacementPeriod() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000020);
           placementPeriod_ = 0;
           onChanged();
           return this;
         }
     
    -    private com.google.protobuf.LazyStringList deviceFilters_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +    private com.google.protobuf.LazyStringArrayList deviceFilters_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         private void ensureDeviceFiltersIsMutable() {
    -      if (!((bitField0_ & 0x00000004) != 0)) {
    +      if (!deviceFilters_.isModifiable()) {
             deviceFilters_ = new com.google.protobuf.LazyStringArrayList(deviceFilters_);
    -        bitField0_ |= 0x00000004;
    -       }
    +      }
    +      bitField0_ |= 0x00000040;
         }
         /**
          * 
    @@ -6757,7 +7138,8 @@ private void ensureDeviceFiltersIsMutable() {
          */
         public com.google.protobuf.ProtocolStringList
             getDeviceFiltersList() {
    -      return deviceFilters_.getUnmodifiableView();
    +      deviceFilters_.makeImmutable();
    +      return deviceFilters_;
         }
         /**
          * 
    @@ -6815,11 +7197,10 @@ public java.lang.String getDeviceFilters(int index) {
          */
         public Builder setDeviceFilters(
             int index, java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureDeviceFiltersIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureDeviceFiltersIsMutable();
           deviceFilters_.set(index, value);
    +      bitField0_ |= 0x00000040;
           onChanged();
           return this;
         }
    @@ -6836,11 +7217,10 @@ public Builder setDeviceFilters(
          */
         public Builder addDeviceFilters(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureDeviceFiltersIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureDeviceFiltersIsMutable();
           deviceFilters_.add(value);
    +      bitField0_ |= 0x00000040;
           onChanged();
           return this;
         }
    @@ -6860,6 +7240,7 @@ public Builder addAllDeviceFilters(
           ensureDeviceFiltersIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, deviceFilters_);
    +      bitField0_ |= 0x00000040;
           onChanged();
           return this;
         }
    @@ -6874,8 +7255,9 @@ public Builder addAllDeviceFilters(
          * @return This builder for chaining.
          */
         public Builder clearDeviceFilters() {
    -      deviceFilters_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000004);
    +      deviceFilters_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
    +      bitField0_ = (bitField0_ & ~0x00000040);;
           onChanged();
           return this;
         }
    @@ -6892,18 +7274,17 @@ public Builder clearDeviceFilters() {
          */
         public Builder addDeviceFiltersBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           ensureDeviceFiltersIsMutable();
           deviceFilters_.add(value);
    +      bitField0_ |= 0x00000040;
           onChanged();
           return this;
         }
     
         private org.tensorflow.proto.GPUOptions gpuOptions_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.GPUOptions, org.tensorflow.proto.GPUOptions.Builder, org.tensorflow.proto.GPUOptionsOrBuilder> gpuOptionsBuilder_;
         /**
          * 
    @@ -6914,7 +7295,7 @@ public Builder addDeviceFiltersBytes(
          * @return Whether the gpuOptions field is set.
          */
         public boolean hasGpuOptions() {
    -      return gpuOptionsBuilder_ != null || gpuOptions_ != null;
    +      return ((bitField0_ & 0x00000080) != 0);
         }
         /**
          * 
    @@ -6944,11 +7325,11 @@ public Builder setGpuOptions(org.tensorflow.proto.GPUOptions value) {
               throw new NullPointerException();
             }
             gpuOptions_ = value;
    -        onChanged();
           } else {
             gpuOptionsBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000080;
    +      onChanged();
           return this;
         }
         /**
    @@ -6962,11 +7343,11 @@ public Builder setGpuOptions(
             org.tensorflow.proto.GPUOptions.Builder builderForValue) {
           if (gpuOptionsBuilder_ == null) {
             gpuOptions_ = builderForValue.build();
    -        onChanged();
           } else {
             gpuOptionsBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000080;
    +      onChanged();
           return this;
         }
         /**
    @@ -6978,17 +7359,20 @@ public Builder setGpuOptions(
          */
         public Builder mergeGpuOptions(org.tensorflow.proto.GPUOptions value) {
           if (gpuOptionsBuilder_ == null) {
    -        if (gpuOptions_ != null) {
    -          gpuOptions_ =
    -            org.tensorflow.proto.GPUOptions.newBuilder(gpuOptions_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000080) != 0) &&
    +          gpuOptions_ != null &&
    +          gpuOptions_ != org.tensorflow.proto.GPUOptions.getDefaultInstance()) {
    +          getGpuOptionsBuilder().mergeFrom(value);
             } else {
               gpuOptions_ = value;
             }
    -        onChanged();
           } else {
             gpuOptionsBuilder_.mergeFrom(value);
           }
    -
    +      if (gpuOptions_ != null) {
    +        bitField0_ |= 0x00000080;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -6999,14 +7383,13 @@ public Builder mergeGpuOptions(org.tensorflow.proto.GPUOptions value) {
          * .tensorflow.GPUOptions gpu_options = 6;
          */
         public Builder clearGpuOptions() {
    -      if (gpuOptionsBuilder_ == null) {
    -        gpuOptions_ = null;
    -        onChanged();
    -      } else {
    -        gpuOptions_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000080);
    +      gpuOptions_ = null;
    +      if (gpuOptionsBuilder_ != null) {
    +        gpuOptionsBuilder_.dispose();
             gpuOptionsBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -7017,7 +7400,7 @@ public Builder clearGpuOptions() {
          * .tensorflow.GPUOptions gpu_options = 6;
          */
         public org.tensorflow.proto.GPUOptions.Builder getGpuOptionsBuilder() {
    -      
    +      bitField0_ |= 0x00000080;
           onChanged();
           return getGpuOptionsFieldBuilder().getBuilder();
         }
    @@ -7043,11 +7426,11 @@ public org.tensorflow.proto.GPUOptionsOrBuilder getGpuOptionsOrBuilder() {
          *
          * .tensorflow.GPUOptions gpu_options = 6;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.GPUOptions, org.tensorflow.proto.GPUOptions.Builder, org.tensorflow.proto.GPUOptionsOrBuilder> 
             getGpuOptionsFieldBuilder() {
           if (gpuOptionsBuilder_ == null) {
    -        gpuOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        gpuOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.GPUOptions, org.tensorflow.proto.GPUOptions.Builder, org.tensorflow.proto.GPUOptionsOrBuilder>(
                     getGpuOptions(),
                     getParentForChildren(),
    @@ -7058,7 +7441,7 @@ public org.tensorflow.proto.GPUOptionsOrBuilder getGpuOptionsOrBuilder() {
         }
     
         private org.tensorflow.proto.GPUOptions pluggableDeviceOptions_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.GPUOptions, org.tensorflow.proto.GPUOptions.Builder, org.tensorflow.proto.GPUOptionsOrBuilder> pluggableDeviceOptionsBuilder_;
         /**
          * 
    @@ -7069,7 +7452,7 @@ public org.tensorflow.proto.GPUOptionsOrBuilder getGpuOptionsOrBuilder() {
          * @return Whether the pluggableDeviceOptions field is set.
          */
         public boolean hasPluggableDeviceOptions() {
    -      return pluggableDeviceOptionsBuilder_ != null || pluggableDeviceOptions_ != null;
    +      return ((bitField0_ & 0x00000100) != 0);
         }
         /**
          * 
    @@ -7099,11 +7482,11 @@ public Builder setPluggableDeviceOptions(org.tensorflow.proto.GPUOptions value)
               throw new NullPointerException();
             }
             pluggableDeviceOptions_ = value;
    -        onChanged();
           } else {
             pluggableDeviceOptionsBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000100;
    +      onChanged();
           return this;
         }
         /**
    @@ -7117,11 +7500,11 @@ public Builder setPluggableDeviceOptions(
             org.tensorflow.proto.GPUOptions.Builder builderForValue) {
           if (pluggableDeviceOptionsBuilder_ == null) {
             pluggableDeviceOptions_ = builderForValue.build();
    -        onChanged();
           } else {
             pluggableDeviceOptionsBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000100;
    +      onChanged();
           return this;
         }
         /**
    @@ -7133,17 +7516,20 @@ public Builder setPluggableDeviceOptions(
          */
         public Builder mergePluggableDeviceOptions(org.tensorflow.proto.GPUOptions value) {
           if (pluggableDeviceOptionsBuilder_ == null) {
    -        if (pluggableDeviceOptions_ != null) {
    -          pluggableDeviceOptions_ =
    -            org.tensorflow.proto.GPUOptions.newBuilder(pluggableDeviceOptions_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000100) != 0) &&
    +          pluggableDeviceOptions_ != null &&
    +          pluggableDeviceOptions_ != org.tensorflow.proto.GPUOptions.getDefaultInstance()) {
    +          getPluggableDeviceOptionsBuilder().mergeFrom(value);
             } else {
               pluggableDeviceOptions_ = value;
             }
    -        onChanged();
           } else {
             pluggableDeviceOptionsBuilder_.mergeFrom(value);
           }
    -
    +      if (pluggableDeviceOptions_ != null) {
    +        bitField0_ |= 0x00000100;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -7154,14 +7540,13 @@ public Builder mergePluggableDeviceOptions(org.tensorflow.proto.GPUOptions value
          * .tensorflow.GPUOptions pluggable_device_options = 18;
          */
         public Builder clearPluggableDeviceOptions() {
    -      if (pluggableDeviceOptionsBuilder_ == null) {
    -        pluggableDeviceOptions_ = null;
    -        onChanged();
    -      } else {
    -        pluggableDeviceOptions_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000100);
    +      pluggableDeviceOptions_ = null;
    +      if (pluggableDeviceOptionsBuilder_ != null) {
    +        pluggableDeviceOptionsBuilder_.dispose();
             pluggableDeviceOptionsBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -7172,7 +7557,7 @@ public Builder clearPluggableDeviceOptions() {
          * .tensorflow.GPUOptions pluggable_device_options = 18;
          */
         public org.tensorflow.proto.GPUOptions.Builder getPluggableDeviceOptionsBuilder() {
    -      
    +      bitField0_ |= 0x00000100;
           onChanged();
           return getPluggableDeviceOptionsFieldBuilder().getBuilder();
         }
    @@ -7198,11 +7583,11 @@ public org.tensorflow.proto.GPUOptionsOrBuilder getPluggableDeviceOptionsOrBuild
          *
          * .tensorflow.GPUOptions pluggable_device_options = 18;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.GPUOptions, org.tensorflow.proto.GPUOptions.Builder, org.tensorflow.proto.GPUOptionsOrBuilder> 
             getPluggableDeviceOptionsFieldBuilder() {
           if (pluggableDeviceOptionsBuilder_ == null) {
    -        pluggableDeviceOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        pluggableDeviceOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.GPUOptions, org.tensorflow.proto.GPUOptions.Builder, org.tensorflow.proto.GPUOptionsOrBuilder>(
                     getPluggableDeviceOptions(),
                     getParentForChildren(),
    @@ -7217,11 +7602,11 @@ public org.tensorflow.proto.GPUOptionsOrBuilder getPluggableDeviceOptionsOrBuild
          * 
          * Whether soft placement is allowed. If allow_soft_placement is true,
          * an op will be placed on CPU if
    -     *   1. there's no GPU implementation for the OP
    +     * 1. there's no GPU implementation for the OP
          * or
    -     *   2. no GPU devices are known or registered
    +     * 2. no GPU devices are known or registered
          * or
    -     *   3. need to co-locate with reftype input(s) which are from CPU.
    +     * 3. need to co-locate with reftype input(s) which are from CPU.
          * 
    * * bool allow_soft_placement = 7; @@ -7235,11 +7620,11 @@ public boolean getAllowSoftPlacement() { *
          * Whether soft placement is allowed. If allow_soft_placement is true,
          * an op will be placed on CPU if
    -     *   1. there's no GPU implementation for the OP
    +     * 1. there's no GPU implementation for the OP
          * or
    -     *   2. no GPU devices are known or registered
    +     * 2. no GPU devices are known or registered
          * or
    -     *   3. need to co-locate with reftype input(s) which are from CPU.
    +     * 3. need to co-locate with reftype input(s) which are from CPU.
          * 
    * * bool allow_soft_placement = 7; @@ -7247,8 +7632,9 @@ public boolean getAllowSoftPlacement() { * @return This builder for chaining. */ public Builder setAllowSoftPlacement(boolean value) { - + allowSoftPlacement_ = value; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -7256,18 +7642,18 @@ public Builder setAllowSoftPlacement(boolean value) { *
          * Whether soft placement is allowed. If allow_soft_placement is true,
          * an op will be placed on CPU if
    -     *   1. there's no GPU implementation for the OP
    +     * 1. there's no GPU implementation for the OP
          * or
    -     *   2. no GPU devices are known or registered
    +     * 2. no GPU devices are known or registered
          * or
    -     *   3. need to co-locate with reftype input(s) which are from CPU.
    +     * 3. need to co-locate with reftype input(s) which are from CPU.
          * 
    * * bool allow_soft_placement = 7; * @return This builder for chaining. */ public Builder clearAllowSoftPlacement() { - + bitField0_ = (bitField0_ & ~0x00000200); allowSoftPlacement_ = false; onChanged(); return this; @@ -7296,8 +7682,9 @@ public boolean getLogDevicePlacement() { * @return This builder for chaining. */ public Builder setLogDevicePlacement(boolean value) { - + logDevicePlacement_ = value; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -7310,14 +7697,14 @@ public Builder setLogDevicePlacement(boolean value) { * @return This builder for chaining. */ public Builder clearLogDevicePlacement() { - + bitField0_ = (bitField0_ & ~0x00000400); logDevicePlacement_ = false; onChanged(); return this; } private org.tensorflow.proto.GraphOptions graphOptions_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.GraphOptions, org.tensorflow.proto.GraphOptions.Builder, org.tensorflow.proto.GraphOptionsOrBuilder> graphOptionsBuilder_; /** *
    @@ -7328,7 +7715,7 @@ public Builder clearLogDevicePlacement() {
          * @return Whether the graphOptions field is set.
          */
         public boolean hasGraphOptions() {
    -      return graphOptionsBuilder_ != null || graphOptions_ != null;
    +      return ((bitField0_ & 0x00000800) != 0);
         }
         /**
          * 
    @@ -7358,11 +7745,11 @@ public Builder setGraphOptions(org.tensorflow.proto.GraphOptions value) {
               throw new NullPointerException();
             }
             graphOptions_ = value;
    -        onChanged();
           } else {
             graphOptionsBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000800;
    +      onChanged();
           return this;
         }
         /**
    @@ -7376,11 +7763,11 @@ public Builder setGraphOptions(
             org.tensorflow.proto.GraphOptions.Builder builderForValue) {
           if (graphOptionsBuilder_ == null) {
             graphOptions_ = builderForValue.build();
    -        onChanged();
           } else {
             graphOptionsBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000800;
    +      onChanged();
           return this;
         }
         /**
    @@ -7392,17 +7779,20 @@ public Builder setGraphOptions(
          */
         public Builder mergeGraphOptions(org.tensorflow.proto.GraphOptions value) {
           if (graphOptionsBuilder_ == null) {
    -        if (graphOptions_ != null) {
    -          graphOptions_ =
    -            org.tensorflow.proto.GraphOptions.newBuilder(graphOptions_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000800) != 0) &&
    +          graphOptions_ != null &&
    +          graphOptions_ != org.tensorflow.proto.GraphOptions.getDefaultInstance()) {
    +          getGraphOptionsBuilder().mergeFrom(value);
             } else {
               graphOptions_ = value;
             }
    -        onChanged();
           } else {
             graphOptionsBuilder_.mergeFrom(value);
           }
    -
    +      if (graphOptions_ != null) {
    +        bitField0_ |= 0x00000800;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -7413,14 +7803,13 @@ public Builder mergeGraphOptions(org.tensorflow.proto.GraphOptions value) {
          * .tensorflow.GraphOptions graph_options = 10;
          */
         public Builder clearGraphOptions() {
    -      if (graphOptionsBuilder_ == null) {
    -        graphOptions_ = null;
    -        onChanged();
    -      } else {
    -        graphOptions_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000800);
    +      graphOptions_ = null;
    +      if (graphOptionsBuilder_ != null) {
    +        graphOptionsBuilder_.dispose();
             graphOptionsBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -7431,7 +7820,7 @@ public Builder clearGraphOptions() {
          * .tensorflow.GraphOptions graph_options = 10;
          */
         public org.tensorflow.proto.GraphOptions.Builder getGraphOptionsBuilder() {
    -      
    +      bitField0_ |= 0x00000800;
           onChanged();
           return getGraphOptionsFieldBuilder().getBuilder();
         }
    @@ -7457,11 +7846,11 @@ public org.tensorflow.proto.GraphOptionsOrBuilder getGraphOptionsOrBuilder() {
          *
          * .tensorflow.GraphOptions graph_options = 10;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.GraphOptions, org.tensorflow.proto.GraphOptions.Builder, org.tensorflow.proto.GraphOptionsOrBuilder> 
             getGraphOptionsFieldBuilder() {
           if (graphOptionsBuilder_ == null) {
    -        graphOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        graphOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.GraphOptions, org.tensorflow.proto.GraphOptions.Builder, org.tensorflow.proto.GraphOptionsOrBuilder>(
                     getGraphOptions(),
                     getParentForChildren(),
    @@ -7498,8 +7887,9 @@ public long getOperationTimeoutInMs() {
          * @return This builder for chaining.
          */
         public Builder setOperationTimeoutInMs(long value) {
    -      
    +
           operationTimeoutInMs_ = value;
    +      bitField0_ |= 0x00001000;
           onChanged();
           return this;
         }
    @@ -7514,14 +7904,14 @@ public Builder setOperationTimeoutInMs(long value) {
          * @return This builder for chaining.
          */
         public Builder clearOperationTimeoutInMs() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00001000);
           operationTimeoutInMs_ = 0L;
           onChanged();
           return this;
         }
     
         private org.tensorflow.proto.RpcOptions.RPCOptions rpcOptions_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.RpcOptions.RPCOptions, org.tensorflow.proto.RpcOptions.RPCOptions.Builder, org.tensorflow.proto.RpcOptions.RPCOptionsOrBuilder> rpcOptionsBuilder_;
         /**
          * 
    @@ -7532,7 +7922,7 @@ public Builder clearOperationTimeoutInMs() {
          * @return Whether the rpcOptions field is set.
          */
         public boolean hasRpcOptions() {
    -      return rpcOptionsBuilder_ != null || rpcOptions_ != null;
    +      return ((bitField0_ & 0x00002000) != 0);
         }
         /**
          * 
    @@ -7562,11 +7952,11 @@ public Builder setRpcOptions(org.tensorflow.proto.RpcOptions.RPCOptions value) {
               throw new NullPointerException();
             }
             rpcOptions_ = value;
    -        onChanged();
           } else {
             rpcOptionsBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00002000;
    +      onChanged();
           return this;
         }
         /**
    @@ -7580,11 +7970,11 @@ public Builder setRpcOptions(
             org.tensorflow.proto.RpcOptions.RPCOptions.Builder builderForValue) {
           if (rpcOptionsBuilder_ == null) {
             rpcOptions_ = builderForValue.build();
    -        onChanged();
           } else {
             rpcOptionsBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00002000;
    +      onChanged();
           return this;
         }
         /**
    @@ -7596,17 +7986,20 @@ public Builder setRpcOptions(
          */
         public Builder mergeRpcOptions(org.tensorflow.proto.RpcOptions.RPCOptions value) {
           if (rpcOptionsBuilder_ == null) {
    -        if (rpcOptions_ != null) {
    -          rpcOptions_ =
    -            org.tensorflow.proto.RpcOptions.RPCOptions.newBuilder(rpcOptions_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00002000) != 0) &&
    +          rpcOptions_ != null &&
    +          rpcOptions_ != org.tensorflow.proto.RpcOptions.RPCOptions.getDefaultInstance()) {
    +          getRpcOptionsBuilder().mergeFrom(value);
             } else {
               rpcOptions_ = value;
             }
    -        onChanged();
           } else {
             rpcOptionsBuilder_.mergeFrom(value);
           }
    -
    +      if (rpcOptions_ != null) {
    +        bitField0_ |= 0x00002000;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -7617,14 +8010,13 @@ public Builder mergeRpcOptions(org.tensorflow.proto.RpcOptions.RPCOptions value)
          * .tensorflow.RPCOptions rpc_options = 13;
          */
         public Builder clearRpcOptions() {
    -      if (rpcOptionsBuilder_ == null) {
    -        rpcOptions_ = null;
    -        onChanged();
    -      } else {
    -        rpcOptions_ = null;
    +      bitField0_ = (bitField0_ & ~0x00002000);
    +      rpcOptions_ = null;
    +      if (rpcOptionsBuilder_ != null) {
    +        rpcOptionsBuilder_.dispose();
             rpcOptionsBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -7635,7 +8027,7 @@ public Builder clearRpcOptions() {
          * .tensorflow.RPCOptions rpc_options = 13;
          */
         public org.tensorflow.proto.RpcOptions.RPCOptions.Builder getRpcOptionsBuilder() {
    -      
    +      bitField0_ |= 0x00002000;
           onChanged();
           return getRpcOptionsFieldBuilder().getBuilder();
         }
    @@ -7661,11 +8053,11 @@ public org.tensorflow.proto.RpcOptions.RPCOptionsOrBuilder getRpcOptionsOrBuilde
          *
          * .tensorflow.RPCOptions rpc_options = 13;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.RpcOptions.RPCOptions, org.tensorflow.proto.RpcOptions.RPCOptions.Builder, org.tensorflow.proto.RpcOptions.RPCOptionsOrBuilder> 
             getRpcOptionsFieldBuilder() {
           if (rpcOptionsBuilder_ == null) {
    -        rpcOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        rpcOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.RpcOptions.RPCOptions, org.tensorflow.proto.RpcOptions.RPCOptions.Builder, org.tensorflow.proto.RpcOptions.RPCOptionsOrBuilder>(
                     getRpcOptions(),
                     getParentForChildren(),
    @@ -7676,7 +8068,7 @@ public org.tensorflow.proto.RpcOptions.RPCOptionsOrBuilder getRpcOptionsOrBuilde
         }
     
         private org.tensorflow.proto.ClusterDef clusterDef_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.ClusterDef, org.tensorflow.proto.ClusterDef.Builder, org.tensorflow.proto.ClusterDefOrBuilder> clusterDefBuilder_;
         /**
          * 
    @@ -7687,7 +8079,7 @@ public org.tensorflow.proto.RpcOptions.RPCOptionsOrBuilder getRpcOptionsOrBuilde
          * @return Whether the clusterDef field is set.
          */
         public boolean hasClusterDef() {
    -      return clusterDefBuilder_ != null || clusterDef_ != null;
    +      return ((bitField0_ & 0x00004000) != 0);
         }
         /**
          * 
    @@ -7717,11 +8109,11 @@ public Builder setClusterDef(org.tensorflow.proto.ClusterDef value) {
               throw new NullPointerException();
             }
             clusterDef_ = value;
    -        onChanged();
           } else {
             clusterDefBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00004000;
    +      onChanged();
           return this;
         }
         /**
    @@ -7735,11 +8127,11 @@ public Builder setClusterDef(
             org.tensorflow.proto.ClusterDef.Builder builderForValue) {
           if (clusterDefBuilder_ == null) {
             clusterDef_ = builderForValue.build();
    -        onChanged();
           } else {
             clusterDefBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00004000;
    +      onChanged();
           return this;
         }
         /**
    @@ -7751,17 +8143,20 @@ public Builder setClusterDef(
          */
         public Builder mergeClusterDef(org.tensorflow.proto.ClusterDef value) {
           if (clusterDefBuilder_ == null) {
    -        if (clusterDef_ != null) {
    -          clusterDef_ =
    -            org.tensorflow.proto.ClusterDef.newBuilder(clusterDef_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00004000) != 0) &&
    +          clusterDef_ != null &&
    +          clusterDef_ != org.tensorflow.proto.ClusterDef.getDefaultInstance()) {
    +          getClusterDefBuilder().mergeFrom(value);
             } else {
               clusterDef_ = value;
             }
    -        onChanged();
           } else {
             clusterDefBuilder_.mergeFrom(value);
           }
    -
    +      if (clusterDef_ != null) {
    +        bitField0_ |= 0x00004000;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -7772,14 +8167,13 @@ public Builder mergeClusterDef(org.tensorflow.proto.ClusterDef value) {
          * .tensorflow.ClusterDef cluster_def = 14;
          */
         public Builder clearClusterDef() {
    -      if (clusterDefBuilder_ == null) {
    -        clusterDef_ = null;
    -        onChanged();
    -      } else {
    -        clusterDef_ = null;
    +      bitField0_ = (bitField0_ & ~0x00004000);
    +      clusterDef_ = null;
    +      if (clusterDefBuilder_ != null) {
    +        clusterDefBuilder_.dispose();
             clusterDefBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -7790,7 +8184,7 @@ public Builder clearClusterDef() {
          * .tensorflow.ClusterDef cluster_def = 14;
          */
         public org.tensorflow.proto.ClusterDef.Builder getClusterDefBuilder() {
    -      
    +      bitField0_ |= 0x00004000;
           onChanged();
           return getClusterDefFieldBuilder().getBuilder();
         }
    @@ -7816,11 +8210,11 @@ public org.tensorflow.proto.ClusterDefOrBuilder getClusterDefOrBuilder() {
          *
          * .tensorflow.ClusterDef cluster_def = 14;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.ClusterDef, org.tensorflow.proto.ClusterDef.Builder, org.tensorflow.proto.ClusterDefOrBuilder> 
             getClusterDefFieldBuilder() {
           if (clusterDefBuilder_ == null) {
    -        clusterDefBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        clusterDefBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.ClusterDef, org.tensorflow.proto.ClusterDef.Builder, org.tensorflow.proto.ClusterDefOrBuilder>(
                     getClusterDef(),
                     getParentForChildren(),
    @@ -7857,8 +8251,9 @@ public boolean getIsolateSessionState() {
          * @return This builder for chaining.
          */
         public Builder setIsolateSessionState(boolean value) {
    -      
    +
           isolateSessionState_ = value;
    +      bitField0_ |= 0x00008000;
           onChanged();
           return this;
         }
    @@ -7873,7 +8268,7 @@ public Builder setIsolateSessionState(boolean value) {
          * @return This builder for chaining.
          */
         public Builder clearIsolateSessionState() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00008000);
           isolateSessionState_ = false;
           onChanged();
           return this;
    @@ -7908,8 +8303,9 @@ public boolean getShareClusterDevicesInSession() {
          * @return This builder for chaining.
          */
         public Builder setShareClusterDevicesInSession(boolean value) {
    -      
    +
           shareClusterDevicesInSession_ = value;
    +      bitField0_ |= 0x00010000;
           onChanged();
           return this;
         }
    @@ -7925,21 +8321,21 @@ public Builder setShareClusterDevicesInSession(boolean value) {
          * @return This builder for chaining.
          */
         public Builder clearShareClusterDevicesInSession() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00010000);
           shareClusterDevicesInSession_ = false;
           onChanged();
           return this;
         }
     
         private org.tensorflow.proto.ConfigProto.Experimental experimental_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.ConfigProto.Experimental, org.tensorflow.proto.ConfigProto.Experimental.Builder, org.tensorflow.proto.ConfigProto.ExperimentalOrBuilder> experimentalBuilder_;
         /**
          * .tensorflow.ConfigProto.Experimental experimental = 16;
          * @return Whether the experimental field is set.
          */
         public boolean hasExperimental() {
    -      return experimentalBuilder_ != null || experimental_ != null;
    +      return ((bitField0_ & 0x00020000) != 0);
         }
         /**
          * .tensorflow.ConfigProto.Experimental experimental = 16;
    @@ -7961,11 +8357,11 @@ public Builder setExperimental(org.tensorflow.proto.ConfigProto.Experimental val
               throw new NullPointerException();
             }
             experimental_ = value;
    -        onChanged();
           } else {
             experimentalBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00020000;
    +      onChanged();
           return this;
         }
         /**
    @@ -7975,11 +8371,11 @@ public Builder setExperimental(
             org.tensorflow.proto.ConfigProto.Experimental.Builder builderForValue) {
           if (experimentalBuilder_ == null) {
             experimental_ = builderForValue.build();
    -        onChanged();
           } else {
             experimentalBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00020000;
    +      onChanged();
           return this;
         }
         /**
    @@ -7987,38 +8383,40 @@ public Builder setExperimental(
          */
         public Builder mergeExperimental(org.tensorflow.proto.ConfigProto.Experimental value) {
           if (experimentalBuilder_ == null) {
    -        if (experimental_ != null) {
    -          experimental_ =
    -            org.tensorflow.proto.ConfigProto.Experimental.newBuilder(experimental_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00020000) != 0) &&
    +          experimental_ != null &&
    +          experimental_ != org.tensorflow.proto.ConfigProto.Experimental.getDefaultInstance()) {
    +          getExperimentalBuilder().mergeFrom(value);
             } else {
               experimental_ = value;
             }
    -        onChanged();
           } else {
             experimentalBuilder_.mergeFrom(value);
           }
    -
    +      if (experimental_ != null) {
    +        bitField0_ |= 0x00020000;
    +        onChanged();
    +      }
           return this;
         }
         /**
          * .tensorflow.ConfigProto.Experimental experimental = 16;
          */
         public Builder clearExperimental() {
    -      if (experimentalBuilder_ == null) {
    -        experimental_ = null;
    -        onChanged();
    -      } else {
    -        experimental_ = null;
    +      bitField0_ = (bitField0_ & ~0x00020000);
    +      experimental_ = null;
    +      if (experimentalBuilder_ != null) {
    +        experimentalBuilder_.dispose();
             experimentalBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
          * .tensorflow.ConfigProto.Experimental experimental = 16;
          */
         public org.tensorflow.proto.ConfigProto.Experimental.Builder getExperimentalBuilder() {
    -      
    +      bitField0_ |= 0x00020000;
           onChanged();
           return getExperimentalFieldBuilder().getBuilder();
         }
    @@ -8036,11 +8434,11 @@ public org.tensorflow.proto.ConfigProto.ExperimentalOrBuilder getExperimentalOrB
         /**
          * .tensorflow.ConfigProto.Experimental experimental = 16;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.ConfigProto.Experimental, org.tensorflow.proto.ConfigProto.Experimental.Builder, org.tensorflow.proto.ConfigProto.ExperimentalOrBuilder> 
             getExperimentalFieldBuilder() {
           if (experimentalBuilder_ == null) {
    -        experimentalBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        experimentalBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.ConfigProto.Experimental, org.tensorflow.proto.ConfigProto.Experimental.Builder, org.tensorflow.proto.ConfigProto.ExperimentalOrBuilder>(
                     getExperimental(),
                     getParentForChildren(),
    @@ -8049,18 +8447,6 @@ public org.tensorflow.proto.ConfigProto.ExperimentalOrBuilder getExperimentalOrB
           }
           return experimentalBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.ConfigProto)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ConfigProtoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ConfigProtoOrBuilder.java
    index 29a052555c6..915822fff06 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ConfigProtoOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ConfigProtoOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/config.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -58,7 +60,6 @@ boolean containsDeviceCount(
        *
        * map<string, int32> device_count = 1;
        */
    -
       int getDeviceCountOrDefault(
           java.lang.String key,
           int defaultValue);
    @@ -72,7 +73,6 @@ int getDeviceCountOrDefault(
        *
        * map<string, int32> device_count = 1;
        */
    -
       int getDeviceCountOrThrow(
           java.lang.String key);
     
    @@ -81,15 +81,17 @@ int getDeviceCountOrThrow(
        * The execution of an individual op (for some op types) can be
        * parallelized on a pool of intra_op_parallelism_threads.
        * 0 means the system picks an appropriate number.
    +   *
        * If you create an ordinary session, e.g., from Python or C++,
        * then there is exactly one intra op thread pool per process.
        * The first session created determines the number of threads in this pool.
        * All subsequent sessions reuse/share this one global pool.
    +   *
        * There are notable exceptions to the default behavior described above:
        * 1. There is an environment variable  for overriding this thread pool,
    -   *    named TF_OVERRIDE_GLOBAL_THREADPOOL.
    +   * named TF_OVERRIDE_GLOBAL_THREADPOOL.
        * 2. When connecting to a server, such as a remote `tf.train.Server`
    -   *    instance, then this option will be ignored altogether.
    +   * instance, then this option will be ignored altogether.
        * 
    * * int32 intra_op_parallelism_threads = 2; @@ -101,8 +103,10 @@ int getDeviceCountOrThrow( *
        * Nodes that perform blocking operations are enqueued on a pool of
        * inter_op_parallelism_threads available in each process.
    +   *
        * 0 means the system picks an appropriate number.
        * Negative means all operations are performed in caller's thread.
    +   *
        * Note that the first Session created in the process sets the
        * number of threads for all future sessions unless use_per_session_threads is
        * true or session_inter_op_thread_pool is configured.
    @@ -117,8 +121,10 @@ int getDeviceCountOrThrow(
        * 
        * If true, use a new set of threads for this session rather than the global
        * pool of threads. Only supported by direct sessions.
    +   *
        * If false, use the global threads created by the first session, or the
        * per-session thread pools configured by session_inter_op_thread_pool.
    +   *
        * This option is deprecated. The same effect can be achieved by setting
        * session_inter_op_thread_pool to have one element, whose num_threads equals
        * inter_op_parallelism_threads.
    @@ -133,8 +139,10 @@ int getDeviceCountOrThrow(
        * 
        * This option is experimental - it may be replaced with a different mechanism
        * in the future.
    +   *
        * Configures session thread pools. If this is configured, then RunOptions for
        * a Run call can select the thread pool to use.
    +   *
        * The intended use is for when some session invocations need to run in a
        * background pool limited to a small number of threads:
        * - For example, a session may be configured to have one large pool (for
    @@ -158,8 +166,10 @@ int getDeviceCountOrThrow(
        * 
        * This option is experimental - it may be replaced with a different mechanism
        * in the future.
    +   *
        * Configures session thread pools. If this is configured, then RunOptions for
        * a Run call can select the thread pool to use.
    +   *
        * The intended use is for when some session invocations need to run in a
        * background pool limited to a small number of threads:
        * - For example, a session may be configured to have one large pool (for
    @@ -182,8 +192,10 @@ int getDeviceCountOrThrow(
        * 
        * This option is experimental - it may be replaced with a different mechanism
        * in the future.
    +   *
        * Configures session thread pools. If this is configured, then RunOptions for
        * a Run call can select the thread pool to use.
    +   *
        * The intended use is for when some session invocations need to run in a
        * background pool limited to a small number of threads:
        * - For example, a session may be configured to have one large pool (for
    @@ -206,8 +218,10 @@ int getDeviceCountOrThrow(
        * 
        * This option is experimental - it may be replaced with a different mechanism
        * in the future.
    +   *
        * Configures session thread pools. If this is configured, then RunOptions for
        * a Run call can select the thread pool to use.
    +   *
        * The intended use is for when some session invocations need to run in a
        * background pool limited to a small number of threads:
        * - For example, a session may be configured to have one large pool (for
    @@ -231,8 +245,10 @@ int getDeviceCountOrThrow(
        * 
        * This option is experimental - it may be replaced with a different mechanism
        * in the future.
    +   *
        * Configures session thread pools. If this is configured, then RunOptions for
        * a Run call can select the thread pool to use.
    +   *
        * The intended use is for when some session invocations need to run in a
        * background pool limited to a small number of threads:
        * - For example, a session may be configured to have one large pool (for
    @@ -372,11 +388,11 @@ org.tensorflow.proto.ThreadPoolOptionProtoOrBuilder getSessionInterOpThreadPoolO
        * 
        * Whether soft placement is allowed. If allow_soft_placement is true,
        * an op will be placed on CPU if
    -   *   1. there's no GPU implementation for the OP
    +   * 1. there's no GPU implementation for the OP
        * or
    -   *   2. no GPU devices are known or registered
    +   * 2. no GPU devices are known or registered
        * or
    -   *   3. need to co-locate with reftype input(s) which are from CPU.
    +   * 3. need to co-locate with reftype input(s) which are from CPU.
        * 
    * * bool allow_soft_placement = 7; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ConfigProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ConfigProtos.java index ee8eb70f710..63e85085fa7 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ConfigProtos.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ConfigProtos.java @@ -1,10 +1,21 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/protobuf/config.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; public final class ConfigProtos { private ConfigProtos() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + ConfigProtos.class.getName()); + } public static void registerAllExtensions( com.google.protobuf.ExtensionRegistryLite registry) { } @@ -17,103 +28,108 @@ public static void registerAllExtensions( static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_GPUOptions_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_GPUOptions_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_GPUOptions_Experimental_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_GPUOptions_Experimental_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_GPUOptions_Experimental_VirtualDevices_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_GPUOptions_Experimental_VirtualDevices_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_GPUOptions_Experimental_StreamMergeOptions_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_GPUOptions_Experimental_StreamMergeOptions_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_OptimizerOptions_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_OptimizerOptions_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_GraphOptions_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_GraphOptions_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_ThreadPoolOptionProto_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_ThreadPoolOptionProto_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_SessionMetadata_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_SessionMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_ConfigProto_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_ConfigProto_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_ConfigProto_DeviceCountEntry_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_ConfigProto_DeviceCountEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_ConfigProto_Experimental_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_ConfigProto_Experimental_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_RunOptions_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_RunOptions_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_RunOptions_Experimental_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_RunOptions_Experimental_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_RunOptions_Experimental_RunHandlerPoolOptions_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_RunOptions_Experimental_RunHandlerPoolOptions_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_RunMetadata_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_RunMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_RunMetadata_FunctionGraphs_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_RunMetadata_FunctionGraphs_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_TensorConnection_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_TensorConnection_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_CallableOptions_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_CallableOptions_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_CallableOptions_FeedDevicesEntry_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_CallableOptions_FeedDevicesEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_CallableOptions_FetchDevicesEntry_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_CallableOptions_FetchDevicesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tensorflow_BatchingOptions_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_tensorflow_BatchingOptions_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -124,170 +140,177 @@ public static void registerAllExtensions( static { java.lang.String[] descriptorData = { "\n%tensorflow/core/protobuf/config.proto\022" + - "\ntensorflow\032*tensorflow/core/framework/c" + - "ost_graph.proto\032%tensorflow/core/framewo" + - "rk/graph.proto\032*tensorflow/core/framewor" + - "k/step_stats.proto\032&tensorflow/core/prot" + - "obuf/cluster.proto\032$tensorflow/core/prot" + - "obuf/debug.proto\032.tensorflow/core/protob" + - "uf/rewriter_config.proto\032*tensorflow/cor" + - "e/protobuf/rpc_options.proto\032&tsl/protob" + - "uf/coordination_config.proto\"\211\n\n\nGPUOpti" + - "ons\022\'\n\037per_process_gpu_memory_fraction\030\001" + - " \001(\001\022\024\n\014allow_growth\030\004 \001(\010\022\026\n\016allocator_" + - "type\030\002 \001(\t\022\037\n\027deferred_deletion_bytes\030\003 " + - "\001(\003\022\033\n\023visible_device_list\030\005 \001(\t\022\"\n\032poll" + - "ing_active_delay_usecs\030\006 \001(\005\022$\n\034polling_" + - "inactive_delay_msecs\030\007 \001(\005\022\034\n\024force_gpu_" + - "compatible\030\010 \001(\010\0229\n\014experimental\030\t \001(\0132#" + - ".tensorflow.GPUOptions.Experimental\032\302\007\n\014" + - "Experimental\022K\n\017virtual_devices\030\001 \003(\01322." + - "tensorflow.GPUOptions.Experimental.Virtu" + - "alDevices\022#\n\033num_virtual_devices_per_gpu" + - "\030\017 \001(\005\022\032\n\022use_unified_memory\030\002 \001(\010\022#\n\033nu" + - "m_dev_to_dev_copy_streams\030\003 \001(\005\022\035\n\025colle" + - "ctive_ring_order\030\004 \001(\t\022\035\n\025timestamped_al" + - "locator\030\005 \001(\010\022#\n\033kernel_tracker_max_inte" + - "rval\030\007 \001(\005\022 \n\030kernel_tracker_max_bytes\030\010" + - " \001(\005\022\"\n\032kernel_tracker_max_pending\030\t \001(\005" + - "\022\'\n\037internal_fragmentation_fraction\030\n \001(" + - "\001\022\035\n\025use_cuda_malloc_async\030\013 \001(\010\022,\n$disa" + - "llow_retry_on_allocation_failure\030\014 \001(\010\022 " + - "\n\030gpu_host_mem_limit_in_mb\030\r \001(\002\022$\n\034gpu_" + - "host_mem_disallow_growth\030\016 \001(\010\022$\n\034gpu_sy" + - "stem_memory_size_in_mb\030\020 \001(\005\022.\n&populate" + - "_pjrt_gpu_client_creation_info\030\021 \001(\010\022\017\n\007" + - "node_id\030\022 \001(\005\022T\n\024stream_merge_options\030\023 " + - "\001(\01326.tensorflow.GPUOptions.Experimental" + - ".StreamMergeOptions\032S\n\016VirtualDevices\022\027\n" + - "\017memory_limit_mb\030\001 \003(\002\022\020\n\010priority\030\002 \003(\005" + - "\022\026\n\016device_ordinal\030\003 \003(\005\032\205\001\n\022StreamMerge" + - "Options\022#\n\033merge_host_to_device_stream\030\001" + - " \001(\010\022#\n\033merge_device_to_host_stream\030\002 \001(" + - "\010\022%\n\035merge_device_to_device_stream\030\003 \001(\010" + - "\"\235\003\n\020OptimizerOptions\022+\n#do_common_subex" + - "pression_elimination\030\001 \001(\010\022\033\n\023do_constan" + - "t_folding\030\002 \001(\010\022$\n\034max_folded_constant_i" + - "n_bytes\030\006 \001(\003\022\034\n\024do_function_inlining\030\004 " + - "\001(\010\0225\n\topt_level\030\003 \001(\0162\".tensorflow.Opti" + - "mizerOptions.Level\022E\n\020global_jit_level\030\005" + - " \001(\0162+.tensorflow.OptimizerOptions.Globa" + - "lJitLevel\022\026\n\016cpu_global_jit\030\007 \001(\010\" \n\005Lev" + - "el\022\006\n\002L1\020\000\022\017\n\002L0\020\377\377\377\377\377\377\377\377\377\001\"C\n\016GlobalJit" + - "Level\022\013\n\007DEFAULT\020\000\022\020\n\003OFF\020\377\377\377\377\377\377\377\377\377\001\022\010\n\004" + - "ON_1\020\001\022\010\n\004ON_2\020\002\"\356\002\n\014GraphOptions\022\036\n\026ena" + - "ble_recv_scheduling\030\002 \001(\010\0227\n\021optimizer_o" + - "ptions\030\003 \001(\0132\034.tensorflow.OptimizerOptio" + - "ns\022\030\n\020build_cost_model\030\004 \001(\003\022\036\n\026build_co" + - "st_model_after\030\t \001(\003\022\024\n\014infer_shapes\030\005 \001" + - "(\010\022\032\n\022place_pruned_graph\030\006 \001(\010\022 \n\030enable" + - "_bfloat16_sendrecv\030\007 \001(\010\022\025\n\rtimeline_ste" + - "p\030\010 \001(\005\0223\n\017rewrite_options\030\n \001(\0132\032.tenso" + - "rflow.RewriterConfigJ\004\010\001\020\002R%skip_common_" + - "subexpression_elimination\"A\n\025ThreadPoolO" + - "ptionProto\022\023\n\013num_threads\030\001 \001(\005\022\023\n\013globa" + - "l_name\030\002 \001(\t\"0\n\017SessionMetadata\022\014\n\004name\030" + - "\001 \001(\t\022\017\n\007version\030\002 \001(\003\"\346\020\n\013ConfigProto\022>" + - "\n\014device_count\030\001 \003(\0132(.tensorflow.Config" + - "Proto.DeviceCountEntry\022$\n\034intra_op_paral" + - "lelism_threads\030\002 \001(\005\022$\n\034inter_op_paralle" + - "lism_threads\030\005 \001(\005\022\037\n\027use_per_session_th" + - "reads\030\t \001(\010\022G\n\034session_inter_op_thread_p" + - "ool\030\014 \003(\0132!.tensorflow.ThreadPoolOptionP" + - "roto\022\030\n\020placement_period\030\003 \001(\005\022\026\n\016device" + - "_filters\030\004 \003(\t\022+\n\013gpu_options\030\006 \001(\0132\026.te" + - "nsorflow.GPUOptions\0228\n\030pluggable_device_" + - "options\030\022 \001(\0132\026.tensorflow.GPUOptions\022\034\n" + - "\024allow_soft_placement\030\007 \001(\010\022\034\n\024log_devic" + - "e_placement\030\010 \001(\010\022/\n\rgraph_options\030\n \001(\013" + - "2\030.tensorflow.GraphOptions\022\037\n\027operation_" + - "timeout_in_ms\030\013 \001(\003\022+\n\013rpc_options\030\r \001(\013" + - "2\026.tensorflow.RPCOptions\022+\n\013cluster_def\030" + - "\016 \001(\0132\026.tensorflow.ClusterDef\022\035\n\025isolate" + - "_session_state\030\017 \001(\010\022(\n share_cluster_de" + - "vices_in_session\030\021 \001(\010\022:\n\014experimental\030\020" + - " \001(\0132$.tensorflow.ConfigProto.Experiment" + - "al\0322\n\020DeviceCountEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v" + - "alue\030\002 \001(\005:\0028\001\032\246\n\n\014Experimental\022\037\n\027colle" + - "ctive_group_leader\030\001 \001(\t\022\025\n\rexecutor_typ" + - "e\030\003 \001(\t\022\032\n\022recv_buf_max_chunk\030\004 \001(\005\022\031\n\021u" + - "se_numa_affinity\030\005 \001(\010\0225\n-collective_det" + - "erministic_sequential_execution\030\006 \001(\010\022\027\n" + - "\017collective_nccl\030\007 \001(\010\0226\n.share_session_" + - "state_in_clusterspec_propagation\030\010 \001(\010\022\037" + - "\n\027disable_thread_spinning\030\t \001(\010\022(\n share" + - "_cluster_devices_in_session\030\n \001(\010\0225\n\020ses" + - "sion_metadata\030\013 \001(\0132\033.tensorflow.Session" + - "Metadata\022!\n\031optimize_for_static_graph\030\014 " + - "\001(\010\022\032\n\022enable_mlir_bridge\030\r \001(\010\022S\n\023mlir_" + - "bridge_rollout\030\021 \001(\01626.tensorflow.Config" + - "Proto.Experimental.MlirBridgeRollout\022&\n\036" + - "enable_mlir_graph_optimization\030\020 \001(\010\022\'\n\037" + - "disable_output_partition_graphs\030\016 \001(\010\022#\n" + - "\033xla_fusion_autotuner_thresh\030\017 \001(\003\022\020\n\010us" + - "e_tfrt\030\022 \001(\010\022\031\n\021enable_multi_host\030\033 \001(\010\022" + - "\025\n\rtfrt_use_ifrt\030 \001(\010\022\033\n\023backend_server" + - "_port\030\034 \001(\005\022\022\n\ntarget_tpu\030\035 \001(\010\022\022\n\ntarge" + - "t_gpu\030\036 \001(\010\022\036\n\026stream_merge_threshold\030\037 " + - "\001(\005\022\'\n\037disable_functional_ops_lowering\030\025" + - " \001(\010\022\'\n\037xla_prefer_single_graph_cluster\030" + - "\026 \001(\010\022B\n\023coordination_config\030\027 \001(\0132%.ten" + - "sorflow.CoordinationServiceConfig\022)\n!dis" + - "able_optimize_for_static_graph\030\030 \001(\010\0220\n(" + - "disable_eager_executor_streaming_enqueue" + - "\030\032 \001(\010\"\336\001\n\021MlirBridgeRollout\022#\n\037MLIR_BRI" + - "DGE_ROLLOUT_UNSPECIFIED\020\000\022\037\n\033MLIR_BRIDGE" + - "_ROLLOUT_ENABLED\020\001\022 \n\034MLIR_BRIDGE_ROLLOU" + - "T_DISABLED\020\002\"\004\010\003\020\003\"\004\010\004\020\004*%MLIR_BRIDGE_RO" + - "LLOUT_SAFE_MODE_ENABLED*.MLIR_BRIDGE_ROL" + - "LOUT_SAFE_MODE_FALLBACK_ENABLEDJ\004\010\002\020\003J\004\010" + - "\023\020\024J\004\010\024\020\025J\004\010\031\020\032\"\341\004\n\nRunOptions\0226\n\013trace_" + - "level\030\001 \001(\0162!.tensorflow.RunOptions.Trac" + - "eLevel\022\025\n\rtimeout_in_ms\030\002 \001(\003\022\034\n\024inter_o" + - "p_thread_pool\030\003 \001(\005\022\037\n\027output_partition_" + - "graphs\030\005 \001(\010\022/\n\rdebug_options\030\006 \001(\0132\030.te" + - "nsorflow.DebugOptions\022*\n\"report_tensor_a" + - "llocations_upon_oom\030\007 \001(\010\0229\n\014experimenta" + - "l\030\010 \001(\0132#.tensorflow.RunOptions.Experime" + - "ntal\032\322\001\n\014Experimental\022\034\n\024collective_grap" + - "h_key\030\001 \001(\003\022\034\n\024use_run_handler_pool\030\002 \001(" + - "\010\022[\n\030run_handler_pool_options\030\003 \001(\01329.te" + - "nsorflow.RunOptions.Experimental.RunHand" + - "lerPoolOptions\032)\n\025RunHandlerPoolOptions\022" + - "\020\n\010priority\030\001 \001(\003\"R\n\nTraceLevel\022\014\n\010NO_TR" + - "ACE\020\000\022\022\n\016SOFTWARE_TRACE\020\001\022\022\n\016HARDWARE_TR" + - "ACE\020\002\022\016\n\nFULL_TRACE\020\003J\004\010\004\020\005\"\276\003\n\013RunMetad" + - "ata\022)\n\nstep_stats\030\001 \001(\0132\025.tensorflow.Ste" + - "pStats\022,\n\ncost_graph\030\002 \001(\0132\030.tensorflow." + - "CostGraphDef\022.\n\020partition_graphs\030\003 \003(\0132\024" + - ".tensorflow.GraphDef\022?\n\017function_graphs\030" + - "\004 \003(\0132&.tensorflow.RunMetadata.FunctionG" + - "raphs\0225\n\020session_metadata\030\005 \001(\0132\033.tensor" + - "flow.SessionMetadata\032\255\001\n\016FunctionGraphs\022" + - ".\n\020partition_graphs\030\001 \003(\0132\024.tensorflow.G" + - "raphDef\0224\n\026pre_optimization_graph\030\002 \001(\0132" + - "\024.tensorflow.GraphDef\0225\n\027post_optimizati" + - "on_graph\030\003 \001(\0132\024.tensorflow.GraphDef\":\n\020" + - "TensorConnection\022\023\n\013from_tensor\030\001 \001(\t\022\021\n" + - "\tto_tensor\030\002 \001(\t\"\260\003\n\017CallableOptions\022\014\n\004" + - "feed\030\001 \003(\t\022\r\n\005fetch\030\002 \003(\t\022\016\n\006target\030\003 \003(" + - "\t\022+\n\013run_options\030\004 \001(\0132\026.tensorflow.RunO" + - "ptions\0227\n\021tensor_connection\030\005 \003(\0132\034.tens" + - "orflow.TensorConnection\022B\n\014feed_devices\030" + - "\006 \003(\0132,.tensorflow.CallableOptions.FeedD" + - "evicesEntry\022D\n\rfetch_devices\030\007 \003(\0132-.ten" + - "sorflow.CallableOptions.FetchDevicesEntr" + - "y\022\027\n\017fetch_skip_sync\030\010 \001(\010\0322\n\020FeedDevice" + - "sEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\0323" + - "\n\021FetchDevicesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" + - "e\030\002 \001(\t:\0028\001B\200\001\n\024org.tensorflow.protoB\014Co" + - "nfigProtosP\001ZUgithub.com/tensorflow/tens" + - "orflow/tensorflow/go/core/protobuf/for_c" + - "ore_protos_go_proto\370\001\001b\006proto3" + "\ntensorflow\032*xla/tsl/protobuf/coordinati" + + "on_config.proto\032*tensorflow/core/framewo" + + "rk/cost_graph.proto\032%tensorflow/core/fra" + + "mework/graph.proto\032*tensorflow/core/fram" + + "ework/step_stats.proto\032&tensorflow/core/" + + "protobuf/cluster.proto\032$tensorflow/core/" + + "protobuf/debug.proto\032.tensorflow/core/pr" + + "otobuf/rewriter_config.proto\032*tensorflow" + + "/core/protobuf/rpc_options.proto\"\211\n\n\nGPU" + + "Options\022\'\n\037per_process_gpu_memory_fracti" + + "on\030\001 \001(\001\022\024\n\014allow_growth\030\004 \001(\010\022\026\n\016alloca" + + "tor_type\030\002 \001(\t\022\037\n\027deferred_deletion_byte" + + "s\030\003 \001(\003\022\033\n\023visible_device_list\030\005 \001(\t\022\"\n\032" + + "polling_active_delay_usecs\030\006 \001(\005\022$\n\034poll" + + "ing_inactive_delay_msecs\030\007 \001(\005\022\034\n\024force_" + + "gpu_compatible\030\010 \001(\010\0229\n\014experimental\030\t \001" + + "(\0132#.tensorflow.GPUOptions.Experimental\032" + + "\302\007\n\014Experimental\022K\n\017virtual_devices\030\001 \003(" + + "\01322.tensorflow.GPUOptions.Experimental.V" + + "irtualDevices\022#\n\033num_virtual_devices_per" + + "_gpu\030\017 \001(\005\022\032\n\022use_unified_memory\030\002 \001(\010\022#" + + "\n\033num_dev_to_dev_copy_streams\030\003 \001(\005\022\035\n\025c" + + "ollective_ring_order\030\004 \001(\t\022\035\n\025timestampe" + + "d_allocator\030\005 \001(\010\022#\n\033kernel_tracker_max_" + + "interval\030\007 \001(\005\022 \n\030kernel_tracker_max_byt" + + "es\030\010 \001(\005\022\"\n\032kernel_tracker_max_pending\030\t" + + " \001(\005\022\'\n\037internal_fragmentation_fraction\030" + + "\n \001(\001\022\035\n\025use_cuda_malloc_async\030\013 \001(\010\022,\n$" + + "disallow_retry_on_allocation_failure\030\014 \001" + + "(\010\022 \n\030gpu_host_mem_limit_in_mb\030\r \001(\002\022$\n\034" + + "gpu_host_mem_disallow_growth\030\016 \001(\010\022$\n\034gp" + + "u_system_memory_size_in_mb\030\020 \001(\005\022.\n&popu" + + "late_pjrt_gpu_client_creation_info\030\021 \001(\010" + + "\022\017\n\007node_id\030\022 \001(\005\022T\n\024stream_merge_option" + + "s\030\023 \001(\01326.tensorflow.GPUOptions.Experime" + + "ntal.StreamMergeOptions\032S\n\016VirtualDevice" + + "s\022\027\n\017memory_limit_mb\030\001 \003(\002\022\020\n\010priority\030\002" + + " \003(\005\022\026\n\016device_ordinal\030\003 \003(\005\032\205\001\n\022StreamM" + + "ergeOptions\022#\n\033merge_host_to_device_stre" + + "am\030\001 \001(\010\022#\n\033merge_device_to_host_stream\030" + + "\002 \001(\010\022%\n\035merge_device_to_device_stream\030\003" + + " \001(\010\"\235\003\n\020OptimizerOptions\022+\n#do_common_s" + + "ubexpression_elimination\030\001 \001(\010\022\033\n\023do_con" + + "stant_folding\030\002 \001(\010\022$\n\034max_folded_consta" + + "nt_in_bytes\030\006 \001(\003\022\034\n\024do_function_inlinin" + + "g\030\004 \001(\010\0225\n\topt_level\030\003 \001(\0162\".tensorflow." + + "OptimizerOptions.Level\022E\n\020global_jit_lev" + + "el\030\005 \001(\0162+.tensorflow.OptimizerOptions.G" + + "lobalJitLevel\022\026\n\016cpu_global_jit\030\007 \001(\010\" \n" + + "\005Level\022\006\n\002L1\020\000\022\017\n\002L0\020\377\377\377\377\377\377\377\377\377\001\"C\n\016Globa" + + "lJitLevel\022\013\n\007DEFAULT\020\000\022\020\n\003OFF\020\377\377\377\377\377\377\377\377\377\001" + + "\022\010\n\004ON_1\020\001\022\010\n\004ON_2\020\002\"\356\002\n\014GraphOptions\022\036\n" + + "\026enable_recv_scheduling\030\002 \001(\010\0227\n\021optimiz" + + "er_options\030\003 \001(\0132\034.tensorflow.OptimizerO" + + "ptions\022\030\n\020build_cost_model\030\004 \001(\003\022\036\n\026buil" + + "d_cost_model_after\030\t \001(\003\022\024\n\014infer_shapes" + + "\030\005 \001(\010\022\032\n\022place_pruned_graph\030\006 \001(\010\022 \n\030en" + + "able_bfloat16_sendrecv\030\007 \001(\010\022\025\n\rtimeline" + + "_step\030\010 \001(\005\0223\n\017rewrite_options\030\n \001(\0132\032.t" + + "ensorflow.RewriterConfigJ\004\010\001\020\002R%skip_com" + + "mon_subexpression_elimination\"A\n\025ThreadP" + + "oolOptionProto\022\023\n\013num_threads\030\001 \001(\005\022\023\n\013g" + + "lobal_name\030\002 \001(\t\"0\n\017SessionMetadata\022\014\n\004n" + + "ame\030\001 \001(\t\022\017\n\007version\030\002 \001(\003\"\264\021\n\013ConfigPro" + + "to\022>\n\014device_count\030\001 \003(\0132(.tensorflow.Co" + + "nfigProto.DeviceCountEntry\022$\n\034intra_op_p" + + "arallelism_threads\030\002 \001(\005\022$\n\034inter_op_par" + + "allelism_threads\030\005 \001(\005\022\037\n\027use_per_sessio" + + "n_threads\030\t \001(\010\022G\n\034session_inter_op_thre" + + "ad_pool\030\014 \003(\0132!.tensorflow.ThreadPoolOpt" + + "ionProto\022\030\n\020placement_period\030\003 \001(\005\022\026\n\016de" + + "vice_filters\030\004 \003(\t\022+\n\013gpu_options\030\006 \001(\0132" + + "\026.tensorflow.GPUOptions\0228\n\030pluggable_dev" + + "ice_options\030\022 \001(\0132\026.tensorflow.GPUOption" + + "s\022\034\n\024allow_soft_placement\030\007 \001(\010\022\034\n\024log_d" + + "evice_placement\030\010 \001(\010\022/\n\rgraph_options\030\n" + + " \001(\0132\030.tensorflow.GraphOptions\022\037\n\027operat" + + "ion_timeout_in_ms\030\013 \001(\003\022+\n\013rpc_options\030\r" + + " \001(\0132\026.tensorflow.RPCOptions\022+\n\013cluster_" + + "def\030\016 \001(\0132\026.tensorflow.ClusterDef\022\035\n\025iso" + + "late_session_state\030\017 \001(\010\022(\n share_cluste" + + "r_devices_in_session\030\021 \001(\010\022:\n\014experiment" + + "al\030\020 \001(\0132$.tensorflow.ConfigProto.Experi" + + "mental\0322\n\020DeviceCountEntry\022\013\n\003key\030\001 \001(\t\022" + + "\r\n\005value\030\002 \001(\005:\0028\001\032\364\n\n\014Experimental\022\037\n\027c" + + "ollective_group_leader\030\001 \001(\t\022\025\n\rexecutor" + + "_type\030\003 \001(\t\022\032\n\022recv_buf_max_chunk\030\004 \001(\005\022" + + "\031\n\021use_numa_affinity\030\005 \001(\010\0225\n-collective" + + "_deterministic_sequential_execution\030\006 \001(" + + "\010\022\027\n\017collective_nccl\030\007 \001(\010\0226\n.share_sess" + + "ion_state_in_clusterspec_propagation\030\010 \001" + + "(\010\022\037\n\027disable_thread_spinning\030\t \001(\010\022(\n s" + + "hare_cluster_devices_in_session\030\n \001(\010\0225\n" + + "\020session_metadata\030\013 \001(\0132\033.tensorflow.Ses" + + "sionMetadata\022!\n\031optimize_for_static_grap" + + "h\030\014 \001(\010\022\032\n\022enable_mlir_bridge\030\r \001(\010\022S\n\023m" + + "lir_bridge_rollout\030\021 \001(\01626.tensorflow.Co" + + "nfigProto.Experimental.MlirBridgeRollout" + + "\022&\n\036enable_mlir_graph_optimization\030\020 \001(\010" + + "\022\'\n\037disable_output_partition_graphs\030\016 \001(" + + "\010\022#\n\033xla_fusion_autotuner_thresh\030\017 \001(\003\022\020" + + "\n\010use_tfrt\030\022 \001(\010\022\031\n\021enable_multi_host\030\033 " + + "\001(\010\022\025\n\rtfrt_use_ifrt\030 \001(\010\022\033\n\023backend_se" + + "rver_port\030\034 \001(\005\022\022\n\ntarget_tpu\030\035 \001(\010\022\022\n\nt" + + "arget_gpu\030\036 \001(\010\022\036\n\026stream_merge_threshol" + + "d\030\037 \001(\005\022\'\n\037disable_functional_ops_loweri" + + "ng\030\025 \001(\010\022\'\n\037xla_prefer_single_graph_clus" + + "ter\030\026 \001(\010\022B\n\023coordination_config\030\027 \001(\0132%" + + ".tensorflow.CoordinationServiceConfig\022)\n" + + "!disable_optimize_for_static_graph\030\030 \001(\010" + + "\0220\n(disable_eager_executor_streaming_enq" + + "ueue\030\032 \001(\010\022)\n!finalize_function_library_" + + "runtime\030! \001(\010\022!\n\031finalize_resource_manag" + + "er\030\" \001(\010\"\336\001\n\021MlirBridgeRollout\022#\n\037MLIR_B" + + "RIDGE_ROLLOUT_UNSPECIFIED\020\000\022\037\n\033MLIR_BRID" + + "GE_ROLLOUT_ENABLED\020\001\022 \n\034MLIR_BRIDGE_ROLL" + + "OUT_DISABLED\020\002\"\004\010\003\020\003\"\004\010\004\020\004*%MLIR_BRIDGE_" + + "ROLLOUT_SAFE_MODE_ENABLED*.MLIR_BRIDGE_R" + + "OLLOUT_SAFE_MODE_FALLBACK_ENABLEDJ\004\010\002\020\003J" + + "\004\010\023\020\024J\004\010\024\020\025J\004\010\031\020\032\"\341\004\n\nRunOptions\0226\n\013trac" + + "e_level\030\001 \001(\0162!.tensorflow.RunOptions.Tr" + + "aceLevel\022\025\n\rtimeout_in_ms\030\002 \001(\003\022\034\n\024inter" + + "_op_thread_pool\030\003 \001(\005\022\037\n\027output_partitio" + + "n_graphs\030\005 \001(\010\022/\n\rdebug_options\030\006 \001(\0132\030." + + "tensorflow.DebugOptions\022*\n\"report_tensor" + + "_allocations_upon_oom\030\007 \001(\010\0229\n\014experimen" + + "tal\030\010 \001(\0132#.tensorflow.RunOptions.Experi" + + "mental\032\322\001\n\014Experimental\022\034\n\024collective_gr" + + "aph_key\030\001 \001(\003\022\034\n\024use_run_handler_pool\030\002 " + + "\001(\010\022[\n\030run_handler_pool_options\030\003 \001(\01329." + + "tensorflow.RunOptions.Experimental.RunHa" + + "ndlerPoolOptions\032)\n\025RunHandlerPoolOption" + + "s\022\020\n\010priority\030\001 \001(\003\"R\n\nTraceLevel\022\014\n\010NO_" + + "TRACE\020\000\022\022\n\016SOFTWARE_TRACE\020\001\022\022\n\016HARDWARE_" + + "TRACE\020\002\022\016\n\nFULL_TRACE\020\003J\004\010\004\020\005\"\276\003\n\013RunMet" + + "adata\022)\n\nstep_stats\030\001 \001(\0132\025.tensorflow.S" + + "tepStats\022,\n\ncost_graph\030\002 \001(\0132\030.tensorflo" + + "w.CostGraphDef\022.\n\020partition_graphs\030\003 \003(\013" + + "2\024.tensorflow.GraphDef\022?\n\017function_graph" + + "s\030\004 \003(\0132&.tensorflow.RunMetadata.Functio" + + "nGraphs\0225\n\020session_metadata\030\005 \001(\0132\033.tens" + + "orflow.SessionMetadata\032\255\001\n\016FunctionGraph" + + "s\022.\n\020partition_graphs\030\001 \003(\0132\024.tensorflow" + + ".GraphDef\0224\n\026pre_optimization_graph\030\002 \001(" + + "\0132\024.tensorflow.GraphDef\0225\n\027post_optimiza" + + "tion_graph\030\003 \001(\0132\024.tensorflow.GraphDef\":" + + "\n\020TensorConnection\022\023\n\013from_tensor\030\001 \001(\t\022" + + "\021\n\tto_tensor\030\002 \001(\t\"\260\003\n\017CallableOptions\022\014" + + "\n\004feed\030\001 \003(\t\022\r\n\005fetch\030\002 \003(\t\022\016\n\006target\030\003 " + + "\003(\t\022+\n\013run_options\030\004 \001(\0132\026.tensorflow.Ru" + + "nOptions\0227\n\021tensor_connection\030\005 \003(\0132\034.te" + + "nsorflow.TensorConnection\022B\n\014feed_device" + + "s\030\006 \003(\0132,.tensorflow.CallableOptions.Fee" + + "dDevicesEntry\022D\n\rfetch_devices\030\007 \003(\0132-.t" + + "ensorflow.CallableOptions.FetchDevicesEn" + + "try\022\027\n\017fetch_skip_sync\030\010 \001(\010\0322\n\020FeedDevi" + + "cesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001" + + "\0323\n\021FetchDevicesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005va" + + "lue\030\002 \001(\t:\0028\001\"\235\001\n\017BatchingOptions\022\031\n\021num" + + "_batch_threads\030\001 \001(\005\022\026\n\016max_batch_size\030\002" + + " \001(\005\022\034\n\024batch_timeout_micros\030\003 \001(\005\022\033\n\023al" + + "lowed_batch_sizes\030\004 \003(\005\022\034\n\024max_enqueued_" + + "batches\030\005 \001(\005B\200\001\n\024org.tensorflow.protoB\014" + + "ConfigProtosP\001ZUgithub.com/tensorflow/te" + + "nsorflow/tensorflow/go/core/protobuf/for" + + "_core_protos_go_proto\370\001\001b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { + org.tensorflow.proto.CoordinationConfig.getDescriptor(), org.tensorflow.proto.CostGraphProtos.getDescriptor(), org.tensorflow.proto.GraphProtos.getDescriptor(), org.tensorflow.proto.StepStatsProtos.getDescriptor(), @@ -295,128 +318,135 @@ public static void registerAllExtensions( org.tensorflow.proto.DebugProtos.getDescriptor(), org.tensorflow.proto.RewriterConfigProtos.getDescriptor(), org.tensorflow.proto.dummy.RpcOptions.getDescriptor(), - org.tensorflow.proto.CoordinationConfig.getDescriptor(), }); internal_static_tensorflow_GPUOptions_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_tensorflow_GPUOptions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_GPUOptions_descriptor, new java.lang.String[] { "PerProcessGpuMemoryFraction", "AllowGrowth", "AllocatorType", "DeferredDeletionBytes", "VisibleDeviceList", "PollingActiveDelayUsecs", "PollingInactiveDelayMsecs", "ForceGpuCompatible", "Experimental", }); internal_static_tensorflow_GPUOptions_Experimental_descriptor = internal_static_tensorflow_GPUOptions_descriptor.getNestedTypes().get(0); internal_static_tensorflow_GPUOptions_Experimental_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_GPUOptions_Experimental_descriptor, new java.lang.String[] { "VirtualDevices", "NumVirtualDevicesPerGpu", "UseUnifiedMemory", "NumDevToDevCopyStreams", "CollectiveRingOrder", "TimestampedAllocator", "KernelTrackerMaxInterval", "KernelTrackerMaxBytes", "KernelTrackerMaxPending", "InternalFragmentationFraction", "UseCudaMallocAsync", "DisallowRetryOnAllocationFailure", "GpuHostMemLimitInMb", "GpuHostMemDisallowGrowth", "GpuSystemMemorySizeInMb", "PopulatePjrtGpuClientCreationInfo", "NodeId", "StreamMergeOptions", }); internal_static_tensorflow_GPUOptions_Experimental_VirtualDevices_descriptor = internal_static_tensorflow_GPUOptions_Experimental_descriptor.getNestedTypes().get(0); internal_static_tensorflow_GPUOptions_Experimental_VirtualDevices_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_GPUOptions_Experimental_VirtualDevices_descriptor, new java.lang.String[] { "MemoryLimitMb", "Priority", "DeviceOrdinal", }); internal_static_tensorflow_GPUOptions_Experimental_StreamMergeOptions_descriptor = internal_static_tensorflow_GPUOptions_Experimental_descriptor.getNestedTypes().get(1); internal_static_tensorflow_GPUOptions_Experimental_StreamMergeOptions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_GPUOptions_Experimental_StreamMergeOptions_descriptor, new java.lang.String[] { "MergeHostToDeviceStream", "MergeDeviceToHostStream", "MergeDeviceToDeviceStream", }); internal_static_tensorflow_OptimizerOptions_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_tensorflow_OptimizerOptions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_OptimizerOptions_descriptor, new java.lang.String[] { "DoCommonSubexpressionElimination", "DoConstantFolding", "MaxFoldedConstantInBytes", "DoFunctionInlining", "OptLevel", "GlobalJitLevel", "CpuGlobalJit", }); internal_static_tensorflow_GraphOptions_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_tensorflow_GraphOptions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_GraphOptions_descriptor, new java.lang.String[] { "EnableRecvScheduling", "OptimizerOptions", "BuildCostModel", "BuildCostModelAfter", "InferShapes", "PlacePrunedGraph", "EnableBfloat16Sendrecv", "TimelineStep", "RewriteOptions", }); internal_static_tensorflow_ThreadPoolOptionProto_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_tensorflow_ThreadPoolOptionProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_ThreadPoolOptionProto_descriptor, new java.lang.String[] { "NumThreads", "GlobalName", }); internal_static_tensorflow_SessionMetadata_descriptor = getDescriptor().getMessageTypes().get(4); internal_static_tensorflow_SessionMetadata_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_SessionMetadata_descriptor, new java.lang.String[] { "Name", "Version", }); internal_static_tensorflow_ConfigProto_descriptor = getDescriptor().getMessageTypes().get(5); internal_static_tensorflow_ConfigProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_ConfigProto_descriptor, new java.lang.String[] { "DeviceCount", "IntraOpParallelismThreads", "InterOpParallelismThreads", "UsePerSessionThreads", "SessionInterOpThreadPool", "PlacementPeriod", "DeviceFilters", "GpuOptions", "PluggableDeviceOptions", "AllowSoftPlacement", "LogDevicePlacement", "GraphOptions", "OperationTimeoutInMs", "RpcOptions", "ClusterDef", "IsolateSessionState", "ShareClusterDevicesInSession", "Experimental", }); internal_static_tensorflow_ConfigProto_DeviceCountEntry_descriptor = internal_static_tensorflow_ConfigProto_descriptor.getNestedTypes().get(0); internal_static_tensorflow_ConfigProto_DeviceCountEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_ConfigProto_DeviceCountEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_tensorflow_ConfigProto_Experimental_descriptor = internal_static_tensorflow_ConfigProto_descriptor.getNestedTypes().get(1); internal_static_tensorflow_ConfigProto_Experimental_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_ConfigProto_Experimental_descriptor, - new java.lang.String[] { "CollectiveGroupLeader", "ExecutorType", "RecvBufMaxChunk", "UseNumaAffinity", "CollectiveDeterministicSequentialExecution", "CollectiveNccl", "ShareSessionStateInClusterspecPropagation", "DisableThreadSpinning", "ShareClusterDevicesInSession", "SessionMetadata", "OptimizeForStaticGraph", "EnableMlirBridge", "MlirBridgeRollout", "EnableMlirGraphOptimization", "DisableOutputPartitionGraphs", "XlaFusionAutotunerThresh", "UseTfrt", "EnableMultiHost", "TfrtUseIfrt", "BackendServerPort", "TargetTpu", "TargetGpu", "StreamMergeThreshold", "DisableFunctionalOpsLowering", "XlaPreferSingleGraphCluster", "CoordinationConfig", "DisableOptimizeForStaticGraph", "DisableEagerExecutorStreamingEnqueue", }); + new java.lang.String[] { "CollectiveGroupLeader", "ExecutorType", "RecvBufMaxChunk", "UseNumaAffinity", "CollectiveDeterministicSequentialExecution", "CollectiveNccl", "ShareSessionStateInClusterspecPropagation", "DisableThreadSpinning", "ShareClusterDevicesInSession", "SessionMetadata", "OptimizeForStaticGraph", "EnableMlirBridge", "MlirBridgeRollout", "EnableMlirGraphOptimization", "DisableOutputPartitionGraphs", "XlaFusionAutotunerThresh", "UseTfrt", "EnableMultiHost", "TfrtUseIfrt", "BackendServerPort", "TargetTpu", "TargetGpu", "StreamMergeThreshold", "DisableFunctionalOpsLowering", "XlaPreferSingleGraphCluster", "CoordinationConfig", "DisableOptimizeForStaticGraph", "DisableEagerExecutorStreamingEnqueue", "FinalizeFunctionLibraryRuntime", "FinalizeResourceManager", }); internal_static_tensorflow_RunOptions_descriptor = getDescriptor().getMessageTypes().get(6); internal_static_tensorflow_RunOptions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_RunOptions_descriptor, new java.lang.String[] { "TraceLevel", "TimeoutInMs", "InterOpThreadPool", "OutputPartitionGraphs", "DebugOptions", "ReportTensorAllocationsUponOom", "Experimental", }); internal_static_tensorflow_RunOptions_Experimental_descriptor = internal_static_tensorflow_RunOptions_descriptor.getNestedTypes().get(0); internal_static_tensorflow_RunOptions_Experimental_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_RunOptions_Experimental_descriptor, new java.lang.String[] { "CollectiveGraphKey", "UseRunHandlerPool", "RunHandlerPoolOptions", }); internal_static_tensorflow_RunOptions_Experimental_RunHandlerPoolOptions_descriptor = internal_static_tensorflow_RunOptions_Experimental_descriptor.getNestedTypes().get(0); internal_static_tensorflow_RunOptions_Experimental_RunHandlerPoolOptions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_RunOptions_Experimental_RunHandlerPoolOptions_descriptor, new java.lang.String[] { "Priority", }); internal_static_tensorflow_RunMetadata_descriptor = getDescriptor().getMessageTypes().get(7); internal_static_tensorflow_RunMetadata_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_RunMetadata_descriptor, new java.lang.String[] { "StepStats", "CostGraph", "PartitionGraphs", "FunctionGraphs", "SessionMetadata", }); internal_static_tensorflow_RunMetadata_FunctionGraphs_descriptor = internal_static_tensorflow_RunMetadata_descriptor.getNestedTypes().get(0); internal_static_tensorflow_RunMetadata_FunctionGraphs_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_RunMetadata_FunctionGraphs_descriptor, new java.lang.String[] { "PartitionGraphs", "PreOptimizationGraph", "PostOptimizationGraph", }); internal_static_tensorflow_TensorConnection_descriptor = getDescriptor().getMessageTypes().get(8); internal_static_tensorflow_TensorConnection_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_TensorConnection_descriptor, new java.lang.String[] { "FromTensor", "ToTensor", }); internal_static_tensorflow_CallableOptions_descriptor = getDescriptor().getMessageTypes().get(9); internal_static_tensorflow_CallableOptions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_CallableOptions_descriptor, new java.lang.String[] { "Feed", "Fetch", "Target", "RunOptions", "TensorConnection", "FeedDevices", "FetchDevices", "FetchSkipSync", }); internal_static_tensorflow_CallableOptions_FeedDevicesEntry_descriptor = internal_static_tensorflow_CallableOptions_descriptor.getNestedTypes().get(0); internal_static_tensorflow_CallableOptions_FeedDevicesEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_CallableOptions_FeedDevicesEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_tensorflow_CallableOptions_FetchDevicesEntry_descriptor = internal_static_tensorflow_CallableOptions_descriptor.getNestedTypes().get(1); internal_static_tensorflow_CallableOptions_FetchDevicesEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_CallableOptions_FetchDevicesEntry_descriptor, new java.lang.String[] { "Key", "Value", }); + internal_static_tensorflow_BatchingOptions_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_tensorflow_BatchingOptions_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_tensorflow_BatchingOptions_descriptor, + new java.lang.String[] { "NumBatchThreads", "MaxBatchSize", "BatchTimeoutMicros", "AllowedBatchSizes", "MaxEnqueuedBatches", }); + descriptor.resolveAllFeaturesImmutable(); + org.tensorflow.proto.CoordinationConfig.getDescriptor(); org.tensorflow.proto.CostGraphProtos.getDescriptor(); org.tensorflow.proto.GraphProtos.getDescriptor(); org.tensorflow.proto.StepStatsProtos.getDescriptor(); @@ -424,7 +454,6 @@ public static void registerAllExtensions( org.tensorflow.proto.DebugProtos.getDescriptor(); org.tensorflow.proto.RewriterConfigProtos.getDescriptor(); org.tensorflow.proto.dummy.RpcOptions.getDescriptor(); - org.tensorflow.proto.CoordinationConfig.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ControlFlowContextDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ControlFlowContextDef.java index ed69b95f087..94e682160fc 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ControlFlowContextDef.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ControlFlowContextDef.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/protobuf/control_flow.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -12,36 +14,33 @@ * Protobuf type {@code tensorflow.ControlFlowContextDef} */ public final class ControlFlowContextDef extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.ControlFlowContextDef) ControlFlowContextDefOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + ControlFlowContextDef.class.getName()); + } // Use ControlFlowContextDef.newBuilder() to construct. - private ControlFlowContextDef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ControlFlowContextDef(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private ControlFlowContextDef() { } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ControlFlowContextDef(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.ControlFlowProtos.internal_static_tensorflow_ControlFlowContextDef_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.ControlFlowProtos.internal_static_tensorflow_ControlFlowContextDef_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -49,6 +48,7 @@ protected java.lang.Object newInstance( } private int ctxtCase_ = 0; + @SuppressWarnings("serial") private java.lang.Object ctxt_; public enum CtxtCase implements com.google.protobuf.Internal.EnumLite, @@ -278,39 +278,41 @@ public static org.tensorflow.proto.ControlFlowContextDef parseFrom( } public static org.tensorflow.proto.ControlFlowContextDef parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.ControlFlowContextDef parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.ControlFlowContextDef parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.ControlFlowContextDef parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.ControlFlowContextDef parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.ControlFlowContextDef parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -330,7 +332,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -343,7 +345,7 @@ protected Builder newBuilderForType( * Protobuf type {@code tensorflow.ControlFlowContextDef} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.ControlFlowContextDef) org.tensorflow.proto.ControlFlowContextDefOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -352,7 +354,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.ControlFlowProtos.internal_static_tensorflow_ControlFlowContextDef_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -365,13 +367,14 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (condCtxtBuilder_ != null) { condCtxtBuilder_.clear(); } @@ -406,57 +409,29 @@ public org.tensorflow.proto.ControlFlowContextDef build() { @java.lang.Override public org.tensorflow.proto.ControlFlowContextDef buildPartial() { org.tensorflow.proto.ControlFlowContextDef result = new org.tensorflow.proto.ControlFlowContextDef(this); - if (ctxtCase_ == 1) { - if (condCtxtBuilder_ == null) { - result.ctxt_ = ctxt_; - } else { - result.ctxt_ = condCtxtBuilder_.build(); - } - } - if (ctxtCase_ == 2) { - if (whileCtxtBuilder_ == null) { - result.ctxt_ = ctxt_; - } else { - result.ctxt_ = whileCtxtBuilder_.build(); - } - } - result.ctxtCase_ = ctxtCase_; + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); + private void buildPartial0(org.tensorflow.proto.ControlFlowContextDef result) { + int from_bitField0_ = bitField0_; } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + + private void buildPartialOneofs(org.tensorflow.proto.ControlFlowContextDef result) { + result.ctxtCase_ = ctxtCase_; + result.ctxt_ = this.ctxt_; + if (ctxtCase_ == 1 && + condCtxtBuilder_ != null) { + result.ctxt_ = condCtxtBuilder_.build(); + } + if (ctxtCase_ == 2 && + whileCtxtBuilder_ != null) { + result.ctxt_ = whileCtxtBuilder_.build(); + } } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.ControlFlowContextDef) { @@ -552,8 +527,9 @@ public Builder clearCtxt() { return this; } + private int bitField0_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.CondContextDef, org.tensorflow.proto.CondContextDef.Builder, org.tensorflow.proto.CondContextDefOrBuilder> condCtxtBuilder_; /** * .tensorflow.CondContextDef cond_ctxt = 1; @@ -676,14 +652,14 @@ public org.tensorflow.proto.CondContextDefOrBuilder getCondCtxtOrBuilder() { /** * .tensorflow.CondContextDef cond_ctxt = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.CondContextDef, org.tensorflow.proto.CondContextDef.Builder, org.tensorflow.proto.CondContextDefOrBuilder> getCondCtxtFieldBuilder() { if (condCtxtBuilder_ == null) { if (!(ctxtCase_ == 1)) { ctxt_ = org.tensorflow.proto.CondContextDef.getDefaultInstance(); } - condCtxtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + condCtxtBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.CondContextDef, org.tensorflow.proto.CondContextDef.Builder, org.tensorflow.proto.CondContextDefOrBuilder>( (org.tensorflow.proto.CondContextDef) ctxt_, getParentForChildren(), @@ -691,11 +667,11 @@ public org.tensorflow.proto.CondContextDefOrBuilder getCondCtxtOrBuilder() { ctxt_ = null; } ctxtCase_ = 1; - onChanged();; + onChanged(); return condCtxtBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.WhileContextDef, org.tensorflow.proto.WhileContextDef.Builder, org.tensorflow.proto.WhileContextDefOrBuilder> whileCtxtBuilder_; /** * .tensorflow.WhileContextDef while_ctxt = 2; @@ -818,14 +794,14 @@ public org.tensorflow.proto.WhileContextDefOrBuilder getWhileCtxtOrBuilder() { /** * .tensorflow.WhileContextDef while_ctxt = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.WhileContextDef, org.tensorflow.proto.WhileContextDef.Builder, org.tensorflow.proto.WhileContextDefOrBuilder> getWhileCtxtFieldBuilder() { if (whileCtxtBuilder_ == null) { if (!(ctxtCase_ == 2)) { ctxt_ = org.tensorflow.proto.WhileContextDef.getDefaultInstance(); } - whileCtxtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + whileCtxtBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.WhileContextDef, org.tensorflow.proto.WhileContextDef.Builder, org.tensorflow.proto.WhileContextDefOrBuilder>( (org.tensorflow.proto.WhileContextDef) ctxt_, getParentForChildren(), @@ -833,21 +809,9 @@ public org.tensorflow.proto.WhileContextDefOrBuilder getWhileCtxtOrBuilder() { ctxt_ = null; } ctxtCase_ = 2; - onChanged();; + onChanged(); return whileCtxtBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.ControlFlowContextDef) } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ControlFlowContextDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ControlFlowContextDefOrBuilder.java index 39955a15626..0fba58feb04 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ControlFlowContextDefOrBuilder.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ControlFlowContextDefOrBuilder.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/protobuf/control_flow.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -37,5 +39,5 @@ public interface ControlFlowContextDefOrBuilder extends */ org.tensorflow.proto.WhileContextDefOrBuilder getWhileCtxtOrBuilder(); - public org.tensorflow.proto.ControlFlowContextDef.CtxtCase getCtxtCase(); + org.tensorflow.proto.ControlFlowContextDef.CtxtCase getCtxtCase(); } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ControlFlowProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ControlFlowProtos.java index c0bc5688853..522e46a72f2 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ControlFlowProtos.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ControlFlowProtos.java @@ -1,10 +1,21 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/protobuf/control_flow.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; public final class ControlFlowProtos { private ControlFlowProtos() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + ControlFlowProtos.class.getName()); + } public static void registerAllExtensions( com.google.protobuf.ExtensionRegistryLite registry) { } @@ -17,27 +28,27 @@ public static void registerAllExtensions( static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_ValuesDef_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_ValuesDef_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_ValuesDef_ExternalValuesEntry_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_ValuesDef_ExternalValuesEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_ControlFlowContextDef_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_ControlFlowContextDef_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_CondContextDef_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_CondContextDef_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_WhileContextDef_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_WhileContextDef_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor @@ -83,33 +94,34 @@ public static void registerAllExtensions( internal_static_tensorflow_ValuesDef_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_tensorflow_ValuesDef_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_ValuesDef_descriptor, new java.lang.String[] { "Values", "ExternalValues", }); internal_static_tensorflow_ValuesDef_ExternalValuesEntry_descriptor = internal_static_tensorflow_ValuesDef_descriptor.getNestedTypes().get(0); internal_static_tensorflow_ValuesDef_ExternalValuesEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_ValuesDef_ExternalValuesEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_tensorflow_ControlFlowContextDef_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_tensorflow_ControlFlowContextDef_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_ControlFlowContextDef_descriptor, new java.lang.String[] { "CondCtxt", "WhileCtxt", "Ctxt", }); internal_static_tensorflow_CondContextDef_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_tensorflow_CondContextDef_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_CondContextDef_descriptor, new java.lang.String[] { "ContextName", "PredName", "PivotName", "Branch", "ValuesDef", "NestedContexts", }); internal_static_tensorflow_WhileContextDef_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_tensorflow_WhileContextDef_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_WhileContextDef_descriptor, new java.lang.String[] { "ContextName", "ParallelIterations", "BackProp", "SwapMemory", "PivotName", "PivotForPredName", "PivotForBodyName", "LoopExitNames", "LoopEnterNames", "ValuesDef", "MaximumIterationsName", "NestedContexts", }); + descriptor.resolveAllFeaturesImmutable(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CoordinationConfig.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CoordinationConfig.java index 5dfed710211..f032747ea8e 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CoordinationConfig.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CoordinationConfig.java @@ -1,10 +1,21 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tsl/protobuf/coordination_config.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: xla/tsl/protobuf/coordination_config.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; public final class CoordinationConfig { private CoordinationConfig() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + CoordinationConfig.class.getName()); + } public static void registerAllExtensions( com.google.protobuf.ExtensionRegistryLite registry) { } @@ -45,37 +56,34 @@ public interface CoordinatedJobOrBuilder extends * Protobuf type {@code tensorflow.CoordinatedJob} */ public static final class CoordinatedJob extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.CoordinatedJob) CoordinatedJobOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + CoordinatedJob.class.getName()); + } // Use CoordinatedJob.newBuilder() to construct. - private CoordinatedJob(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CoordinatedJob(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private CoordinatedJob() { name_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CoordinatedJob(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.CoordinationConfig.internal_static_tensorflow_CoordinatedJob_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.CoordinationConfig.internal_static_tensorflow_CoordinatedJob_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -83,7 +91,8 @@ protected java.lang.Object newInstance( } public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; /** * string name = 1; * @return The name. @@ -121,7 +130,7 @@ public java.lang.String getName() { } public static final int NUM_TASKS_FIELD_NUMBER = 2; - private int numTasks_; + private int numTasks_ = 0; /** * int32 num_tasks = 2; * @return The numTasks. @@ -145,8 +154,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } if (numTasks_ != 0) { output.writeInt32(2, numTasks_); @@ -160,8 +169,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } if (numTasks_ != 0) { size += com.google.protobuf.CodedOutputStream @@ -240,39 +249,41 @@ public static org.tensorflow.proto.CoordinationConfig.CoordinatedJob parseFrom( } public static org.tensorflow.proto.CoordinationConfig.CoordinatedJob parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.CoordinationConfig.CoordinatedJob parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.CoordinationConfig.CoordinatedJob parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.CoordinationConfig.CoordinatedJob parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.CoordinationConfig.CoordinatedJob parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.CoordinationConfig.CoordinatedJob parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -292,7 +303,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -305,7 +316,7 @@ protected Builder newBuilderForType( * Protobuf type {@code tensorflow.CoordinatedJob} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.CoordinatedJob) org.tensorflow.proto.CoordinationConfig.CoordinatedJobOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -314,7 +325,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.CoordinationConfig.internal_static_tensorflow_CoordinatedJob_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -327,17 +338,16 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; name_ = ""; - numTasks_ = 0; - return this; } @@ -364,44 +374,21 @@ public org.tensorflow.proto.CoordinationConfig.CoordinatedJob build() { @java.lang.Override public org.tensorflow.proto.CoordinationConfig.CoordinatedJob buildPartial() { org.tensorflow.proto.CoordinationConfig.CoordinatedJob result = new org.tensorflow.proto.CoordinationConfig.CoordinatedJob(this); - result.name_ = name_; - result.numTasks_ = numTasks_; + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.CoordinationConfig.CoordinatedJob result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.numTasks_ = numTasks_; + } } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.CoordinationConfig.CoordinatedJob) { @@ -416,6 +403,7 @@ public Builder mergeFrom(org.tensorflow.proto.CoordinationConfig.CoordinatedJob if (other == org.tensorflow.proto.CoordinationConfig.CoordinatedJob.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; + bitField0_ |= 0x00000001; onChanged(); } if (other.getNumTasks() != 0) { @@ -449,12 +437,12 @@ public Builder mergeFrom( break; case 10: { name_ = input.readStringRequireUtf8(); - + bitField0_ |= 0x00000001; break; } // case 10 case 16: { numTasks_ = input.readInt32(); - + bitField0_ |= 0x00000002; break; } // case 16 default: { @@ -472,6 +460,7 @@ public Builder mergeFrom( } // finally return this; } + private int bitField0_; private java.lang.Object name_ = ""; /** @@ -514,11 +503,9 @@ public java.lang.String getName() { */ public Builder setName( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } name_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -527,8 +514,8 @@ public Builder setName( * @return This builder for chaining. */ public Builder clearName() { - name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -539,12 +526,10 @@ public Builder clearName() { */ public Builder setNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); name_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -564,8 +549,9 @@ public int getNumTasks() { * @return This builder for chaining. */ public Builder setNumTasks(int value) { - + numTasks_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -574,23 +560,11 @@ public Builder setNumTasks(int value) { * @return This builder for chaining. */ public Builder clearNumTasks() { - + bitField0_ = (bitField0_ & ~0x00000002); numTasks_ = 0; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.CoordinatedJob) } @@ -713,6 +687,17 @@ public interface CoordinationServiceConfigOrBuilder extends */ long getClusterRegisterTimeoutInMs(); + /** + *
    +     * Denotes if we should synchronize the agents' register attempts by blocking
    +     * on a barrier. This is useful for synchronized restarts.
    +     * 
    + * + * bool cluster_register_with_barrier = 14; + * @return The clusterRegisterWithBarrier. + */ + boolean getClusterRegisterWithBarrier(); + /** *
          * Heartbeat timeout, if a task does not record heartbeat in this time
    @@ -874,40 +859,38 @@ org.tensorflow.proto.CoordinationConfig.CoordinatedJobOrBuilder getCoordinatedJo
        * Protobuf type {@code tensorflow.CoordinationServiceConfig}
        */
       public static final class CoordinationServiceConfig extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.CoordinationServiceConfig)
           CoordinationServiceConfigOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        CoordinationServiceConfig.class.getName());
    +    }
         // Use CoordinationServiceConfig.newBuilder() to construct.
    -    private CoordinationServiceConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private CoordinationServiceConfig(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private CoordinationServiceConfig() {
           serviceType_ = "";
           serviceLeader_ = "";
           coordinatedJobList_ = java.util.Collections.emptyList();
    -      recoverableJobs_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -    }
    -
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new CoordinationServiceConfig();
    +      recoverableJobs_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
         }
     
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.CoordinationConfig.internal_static_tensorflow_CoordinationServiceConfig_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.CoordinationConfig.internal_static_tensorflow_CoordinationServiceConfig_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -915,7 +898,8 @@ protected java.lang.Object newInstance(
         }
     
         public static final int SERVICE_TYPE_FIELD_NUMBER = 1;
    -    private volatile java.lang.Object serviceType_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object serviceType_ = "";
         /**
          * 
          * Type of coordination service implementation to enable.
    @@ -967,7 +951,8 @@ public java.lang.String getServiceType() {
         }
     
         public static final int SERVICE_LEADER_FIELD_NUMBER = 2;
    -    private volatile java.lang.Object serviceLeader_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object serviceLeader_ = "";
         /**
          * 
          * Address where the coordination service instance is hosted.
    @@ -1013,7 +998,7 @@ public java.lang.String getServiceLeader() {
         }
     
         public static final int ENABLE_HEALTH_CHECK_FIELD_NUMBER = 3;
    -    private boolean enableHealthCheck_;
    +    private boolean enableHealthCheck_ = false;
         /**
          * 
          * Whether to enable the health check mechanism.
    @@ -1028,7 +1013,7 @@ public boolean getEnableHealthCheck() {
         }
     
         public static final int CLUSTER_REGISTER_TIMEOUT_IN_MS_FIELD_NUMBER = 4;
    -    private long clusterRegisterTimeoutInMs_;
    +    private long clusterRegisterTimeoutInMs_ = 0L;
         /**
          * 
          * Maximum wait time for all members in the cluster to be registered.
    @@ -1042,8 +1027,24 @@ public long getClusterRegisterTimeoutInMs() {
           return clusterRegisterTimeoutInMs_;
         }
     
    +    public static final int CLUSTER_REGISTER_WITH_BARRIER_FIELD_NUMBER = 14;
    +    private boolean clusterRegisterWithBarrier_ = false;
    +    /**
    +     * 
    +     * Denotes if we should synchronize the agents' register attempts by blocking
    +     * on a barrier. This is useful for synchronized restarts.
    +     * 
    + * + * bool cluster_register_with_barrier = 14; + * @return The clusterRegisterWithBarrier. + */ + @java.lang.Override + public boolean getClusterRegisterWithBarrier() { + return clusterRegisterWithBarrier_; + } + public static final int HEARTBEAT_TIMEOUT_IN_MS_FIELD_NUMBER = 5; - private long heartbeatTimeoutInMs_; + private long heartbeatTimeoutInMs_ = 0L; /** *
          * Heartbeat timeout, if a task does not record heartbeat in this time
    @@ -1062,6 +1063,7 @@ public long getHeartbeatTimeoutInMs() {
         }
     
         public static final int COORDINATED_JOB_LIST_FIELD_NUMBER = 10;
    +    @SuppressWarnings("serial")
         private java.util.List coordinatedJobList_;
         /**
          * repeated .tensorflow.CoordinatedJob coordinated_job_list = 10;
    @@ -1102,7 +1104,7 @@ public org.tensorflow.proto.CoordinationConfig.CoordinatedJobOrBuilder getCoordi
         }
     
         public static final int SHUTDOWN_BARRIER_TIMEOUT_IN_MS_FIELD_NUMBER = 7;
    -    private long shutdownBarrierTimeoutInMs_;
    +    private long shutdownBarrierTimeoutInMs_ = 0L;
         /**
          * 
          * Denotes how long to wait for all coordination agents to reach the barriers
    @@ -1120,7 +1122,7 @@ public long getShutdownBarrierTimeoutInMs() {
         }
     
         public static final int AGENT_DESTRUCTION_WITHOUT_SHUTDOWN_FIELD_NUMBER = 8;
    -    private boolean agentDestructionWithoutShutdown_;
    +    private boolean agentDestructionWithoutShutdown_ = false;
         /**
          * 
          * If set, agents do not make an explicit Shutdown() call. Service will only
    @@ -1137,7 +1139,9 @@ public boolean getAgentDestructionWithoutShutdown() {
         }
     
         public static final int RECOVERABLE_JOBS_FIELD_NUMBER = 9;
    -    private com.google.protobuf.LazyStringList recoverableJobs_;
    +    @SuppressWarnings("serial")
    +    private com.google.protobuf.LazyStringArrayList recoverableJobs_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         /**
          * 
          * The list of jobs which are recoverable. If a task in this list fails,
    @@ -1200,7 +1204,7 @@ public java.lang.String getRecoverableJobs(int index) {
         }
     
         public static final int ALLOW_NEW_INCARNATION_TO_RECONNECT_FIELD_NUMBER = 11;
    -    private boolean allowNewIncarnationToReconnect_;
    +    private boolean allowNewIncarnationToReconnect_ = false;
         /**
          * 
          * If a task restarts with a new incarnation, we may allow it to reconnect
    @@ -1217,7 +1221,7 @@ public boolean getAllowNewIncarnationToReconnect() {
         }
     
         public static final int FORCE_DISABLE_FIELD_NUMBER = 12;
    -    private boolean forceDisable_;
    +    private boolean forceDisable_ = false;
         /**
          * 
          * Disables coordination service.
    @@ -1235,7 +1239,7 @@ public boolean getForceDisable() {
         }
     
         public static final int POLL_FOR_ERROR_FROM_SERVICE_AT_STARTUP_FIELD_NUMBER = 13;
    -    private boolean pollForErrorFromServiceAtStartup_;
    +    private boolean pollForErrorFromServiceAtStartup_ = false;
         /**
          * 
          * Use long polling to get error from coordination service as the error
    @@ -1264,11 +1268,11 @@ public final boolean isInitialized() {
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output)
                             throws java.io.IOException {
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceType_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, serviceType_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serviceType_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 1, serviceType_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceLeader_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, serviceLeader_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serviceLeader_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 2, serviceLeader_);
           }
           if (enableHealthCheck_ != false) {
             output.writeBool(3, enableHealthCheck_);
    @@ -1286,7 +1290,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
             output.writeBool(8, agentDestructionWithoutShutdown_);
           }
           for (int i = 0; i < recoverableJobs_.size(); i++) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 9, recoverableJobs_.getRaw(i));
    +        com.google.protobuf.GeneratedMessage.writeString(output, 9, recoverableJobs_.getRaw(i));
           }
           for (int i = 0; i < coordinatedJobList_.size(); i++) {
             output.writeMessage(10, coordinatedJobList_.get(i));
    @@ -1300,6 +1304,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           if (pollForErrorFromServiceAtStartup_ != false) {
             output.writeBool(13, pollForErrorFromServiceAtStartup_);
           }
    +      if (clusterRegisterWithBarrier_ != false) {
    +        output.writeBool(14, clusterRegisterWithBarrier_);
    +      }
           getUnknownFields().writeTo(output);
         }
     
    @@ -1309,11 +1316,11 @@ public int getSerializedSize() {
           if (size != -1) return size;
     
           size = 0;
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceType_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, serviceType_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serviceType_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, serviceType_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceLeader_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, serviceLeader_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serviceLeader_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, serviceLeader_);
           }
           if (enableHealthCheck_ != false) {
             size += com.google.protobuf.CodedOutputStream
    @@ -1359,6 +1366,10 @@ public int getSerializedSize() {
             size += com.google.protobuf.CodedOutputStream
               .computeBoolSize(13, pollForErrorFromServiceAtStartup_);
           }
    +      if (clusterRegisterWithBarrier_ != false) {
    +        size += com.google.protobuf.CodedOutputStream
    +          .computeBoolSize(14, clusterRegisterWithBarrier_);
    +      }
           size += getUnknownFields().getSerializedSize();
           memoizedSize = size;
           return size;
    @@ -1382,6 +1393,8 @@ public boolean equals(final java.lang.Object obj) {
               != other.getEnableHealthCheck()) return false;
           if (getClusterRegisterTimeoutInMs()
               != other.getClusterRegisterTimeoutInMs()) return false;
    +      if (getClusterRegisterWithBarrier()
    +          != other.getClusterRegisterWithBarrier()) return false;
           if (getHeartbeatTimeoutInMs()
               != other.getHeartbeatTimeoutInMs()) return false;
           if (!getCoordinatedJobListList()
    @@ -1419,6 +1432,9 @@ public int hashCode() {
           hash = (37 * hash) + CLUSTER_REGISTER_TIMEOUT_IN_MS_FIELD_NUMBER;
           hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
               getClusterRegisterTimeoutInMs());
    +      hash = (37 * hash) + CLUSTER_REGISTER_WITH_BARRIER_FIELD_NUMBER;
    +      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
    +          getClusterRegisterWithBarrier());
           hash = (37 * hash) + HEARTBEAT_TIMEOUT_IN_MS_FIELD_NUMBER;
           hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
               getHeartbeatTimeoutInMs());
    @@ -1484,39 +1500,41 @@ public static org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfig
         }
         public static org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfig parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfig parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfig parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfig parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfig parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfig parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -1536,7 +1554,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -1549,7 +1567,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.CoordinationServiceConfig}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.CoordinationServiceConfig)
             org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfigOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -1558,7 +1576,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.CoordinationConfig.internal_static_tensorflow_CoordinationServiceConfig_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -1571,42 +1589,34 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             serviceType_ = "";
    -
             serviceLeader_ = "";
    -
             enableHealthCheck_ = false;
    -
             clusterRegisterTimeoutInMs_ = 0L;
    -
    +        clusterRegisterWithBarrier_ = false;
             heartbeatTimeoutInMs_ = 0L;
    -
             if (coordinatedJobListBuilder_ == null) {
               coordinatedJobList_ = java.util.Collections.emptyList();
             } else {
               coordinatedJobList_ = null;
               coordinatedJobListBuilder_.clear();
             }
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        bitField0_ = (bitField0_ & ~0x00000040);
             shutdownBarrierTimeoutInMs_ = 0L;
    -
             agentDestructionWithoutShutdown_ = false;
    -
    -        recoverableJobs_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -        bitField0_ = (bitField0_ & ~0x00000002);
    +        recoverableJobs_ =
    +            com.google.protobuf.LazyStringArrayList.emptyList();
             allowNewIncarnationToReconnect_ = false;
    -
             forceDisable_ = false;
    -
             pollForErrorFromServiceAtStartup_ = false;
    -
             return this;
           }
     
    @@ -1633,67 +1643,65 @@ public org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfig build()
           @java.lang.Override
           public org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfig buildPartial() {
             org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfig result = new org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfig(this);
    -        int from_bitField0_ = bitField0_;
    -        result.serviceType_ = serviceType_;
    -        result.serviceLeader_ = serviceLeader_;
    -        result.enableHealthCheck_ = enableHealthCheck_;
    -        result.clusterRegisterTimeoutInMs_ = clusterRegisterTimeoutInMs_;
    -        result.heartbeatTimeoutInMs_ = heartbeatTimeoutInMs_;
    +        buildPartialRepeatedFields(result);
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        onBuilt();
    +        return result;
    +      }
    +
    +      private void buildPartialRepeatedFields(org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfig result) {
             if (coordinatedJobListBuilder_ == null) {
    -          if (((bitField0_ & 0x00000001) != 0)) {
    +          if (((bitField0_ & 0x00000040) != 0)) {
                 coordinatedJobList_ = java.util.Collections.unmodifiableList(coordinatedJobList_);
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000040);
               }
               result.coordinatedJobList_ = coordinatedJobList_;
             } else {
               result.coordinatedJobList_ = coordinatedJobListBuilder_.build();
             }
    -        result.shutdownBarrierTimeoutInMs_ = shutdownBarrierTimeoutInMs_;
    -        result.agentDestructionWithoutShutdown_ = agentDestructionWithoutShutdown_;
    -        if (((bitField0_ & 0x00000002) != 0)) {
    -          recoverableJobs_ = recoverableJobs_.getUnmodifiableView();
    -          bitField0_ = (bitField0_ & ~0x00000002);
    -        }
    -        result.recoverableJobs_ = recoverableJobs_;
    -        result.allowNewIncarnationToReconnect_ = allowNewIncarnationToReconnect_;
    -        result.forceDisable_ = forceDisable_;
    -        result.pollForErrorFromServiceAtStartup_ = pollForErrorFromServiceAtStartup_;
    -        onBuilt();
    -        return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfig result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.serviceType_ = serviceType_;
    +        }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.serviceLeader_ = serviceLeader_;
    +        }
    +        if (((from_bitField0_ & 0x00000004) != 0)) {
    +          result.enableHealthCheck_ = enableHealthCheck_;
    +        }
    +        if (((from_bitField0_ & 0x00000008) != 0)) {
    +          result.clusterRegisterTimeoutInMs_ = clusterRegisterTimeoutInMs_;
    +        }
    +        if (((from_bitField0_ & 0x00000010) != 0)) {
    +          result.clusterRegisterWithBarrier_ = clusterRegisterWithBarrier_;
    +        }
    +        if (((from_bitField0_ & 0x00000020) != 0)) {
    +          result.heartbeatTimeoutInMs_ = heartbeatTimeoutInMs_;
    +        }
    +        if (((from_bitField0_ & 0x00000080) != 0)) {
    +          result.shutdownBarrierTimeoutInMs_ = shutdownBarrierTimeoutInMs_;
    +        }
    +        if (((from_bitField0_ & 0x00000100) != 0)) {
    +          result.agentDestructionWithoutShutdown_ = agentDestructionWithoutShutdown_;
    +        }
    +        if (((from_bitField0_ & 0x00000200) != 0)) {
    +          recoverableJobs_.makeImmutable();
    +          result.recoverableJobs_ = recoverableJobs_;
    +        }
    +        if (((from_bitField0_ & 0x00000400) != 0)) {
    +          result.allowNewIncarnationToReconnect_ = allowNewIncarnationToReconnect_;
    +        }
    +        if (((from_bitField0_ & 0x00000800) != 0)) {
    +          result.forceDisable_ = forceDisable_;
    +        }
    +        if (((from_bitField0_ & 0x00001000) != 0)) {
    +          result.pollForErrorFromServiceAtStartup_ = pollForErrorFromServiceAtStartup_;
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfig) {
    @@ -1708,10 +1716,12 @@ public Builder mergeFrom(org.tensorflow.proto.CoordinationConfig.CoordinationSer
             if (other == org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfig.getDefaultInstance()) return this;
             if (!other.getServiceType().isEmpty()) {
               serviceType_ = other.serviceType_;
    +          bitField0_ |= 0x00000001;
               onChanged();
             }
             if (!other.getServiceLeader().isEmpty()) {
               serviceLeader_ = other.serviceLeader_;
    +          bitField0_ |= 0x00000002;
               onChanged();
             }
             if (other.getEnableHealthCheck() != false) {
    @@ -1720,6 +1730,9 @@ public Builder mergeFrom(org.tensorflow.proto.CoordinationConfig.CoordinationSer
             if (other.getClusterRegisterTimeoutInMs() != 0L) {
               setClusterRegisterTimeoutInMs(other.getClusterRegisterTimeoutInMs());
             }
    +        if (other.getClusterRegisterWithBarrier() != false) {
    +          setClusterRegisterWithBarrier(other.getClusterRegisterWithBarrier());
    +        }
             if (other.getHeartbeatTimeoutInMs() != 0L) {
               setHeartbeatTimeoutInMs(other.getHeartbeatTimeoutInMs());
             }
    @@ -1727,7 +1740,7 @@ public Builder mergeFrom(org.tensorflow.proto.CoordinationConfig.CoordinationSer
               if (!other.coordinatedJobList_.isEmpty()) {
                 if (coordinatedJobList_.isEmpty()) {
                   coordinatedJobList_ = other.coordinatedJobList_;
    -              bitField0_ = (bitField0_ & ~0x00000001);
    +              bitField0_ = (bitField0_ & ~0x00000040);
                 } else {
                   ensureCoordinatedJobListIsMutable();
                   coordinatedJobList_.addAll(other.coordinatedJobList_);
    @@ -1740,9 +1753,9 @@ public Builder mergeFrom(org.tensorflow.proto.CoordinationConfig.CoordinationSer
                   coordinatedJobListBuilder_.dispose();
                   coordinatedJobListBuilder_ = null;
                   coordinatedJobList_ = other.coordinatedJobList_;
    -              bitField0_ = (bitField0_ & ~0x00000001);
    +              bitField0_ = (bitField0_ & ~0x00000040);
                   coordinatedJobListBuilder_ = 
    -                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                        getCoordinatedJobListFieldBuilder() : null;
                 } else {
                   coordinatedJobListBuilder_.addAllMessages(other.coordinatedJobList_);
    @@ -1758,7 +1771,7 @@ public Builder mergeFrom(org.tensorflow.proto.CoordinationConfig.CoordinationSer
             if (!other.recoverableJobs_.isEmpty()) {
               if (recoverableJobs_.isEmpty()) {
                 recoverableJobs_ = other.recoverableJobs_;
    -            bitField0_ = (bitField0_ & ~0x00000002);
    +            bitField0_ |= 0x00000200;
               } else {
                 ensureRecoverableJobsIsMutable();
                 recoverableJobs_.addAll(other.recoverableJobs_);
    @@ -1802,37 +1815,37 @@ public Builder mergeFrom(
                     break;
                   case 10: {
                     serviceType_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 10
                   case 18: {
                     serviceLeader_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 18
                   case 24: {
                     enableHealthCheck_ = input.readBool();
    -
    +                bitField0_ |= 0x00000004;
                     break;
                   } // case 24
                   case 32: {
                     clusterRegisterTimeoutInMs_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000008;
                     break;
                   } // case 32
                   case 40: {
                     heartbeatTimeoutInMs_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000020;
                     break;
                   } // case 40
                   case 56: {
                     shutdownBarrierTimeoutInMs_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000080;
                     break;
                   } // case 56
                   case 64: {
                     agentDestructionWithoutShutdown_ = input.readBool();
    -
    +                bitField0_ |= 0x00000100;
                     break;
                   } // case 64
                   case 74: {
    @@ -1856,19 +1869,24 @@ public Builder mergeFrom(
                   } // case 82
                   case 88: {
                     allowNewIncarnationToReconnect_ = input.readBool();
    -
    +                bitField0_ |= 0x00000400;
                     break;
                   } // case 88
                   case 96: {
                     forceDisable_ = input.readBool();
    -
    +                bitField0_ |= 0x00000800;
                     break;
                   } // case 96
                   case 104: {
                     pollForErrorFromServiceAtStartup_ = input.readBool();
    -
    +                bitField0_ |= 0x00001000;
                     break;
                   } // case 104
    +              case 112: {
    +                clusterRegisterWithBarrier_ = input.readBool();
    +                bitField0_ |= 0x00000010;
    +                break;
    +              } // case 112
                   default: {
                     if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                       done = true; // was an endgroup tag
    @@ -1948,11 +1966,9 @@ public java.lang.String getServiceType() {
            */
           public Builder setServiceType(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             serviceType_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -1968,8 +1984,8 @@ public Builder setServiceType(
            * @return This builder for chaining.
            */
           public Builder clearServiceType() {
    -        
             serviceType_ = getDefaultInstance().getServiceType();
    +        bitField0_ = (bitField0_ & ~0x00000001);
             onChanged();
             return this;
           }
    @@ -1987,12 +2003,10 @@ public Builder clearServiceType() {
            */
           public Builder setServiceTypeBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             serviceType_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -2050,11 +2064,9 @@ public java.lang.String getServiceLeader() {
            */
           public Builder setServiceLeader(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             serviceLeader_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -2067,8 +2079,8 @@ public Builder setServiceLeader(
            * @return This builder for chaining.
            */
           public Builder clearServiceLeader() {
    -        
             serviceLeader_ = getDefaultInstance().getServiceLeader();
    +        bitField0_ = (bitField0_ & ~0x00000002);
             onChanged();
             return this;
           }
    @@ -2083,12 +2095,10 @@ public Builder clearServiceLeader() {
            */
           public Builder setServiceLeaderBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             serviceLeader_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -2116,8 +2126,9 @@ public boolean getEnableHealthCheck() {
            * @return This builder for chaining.
            */
           public Builder setEnableHealthCheck(boolean value) {
    -        
    +
             enableHealthCheck_ = value;
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -2130,7 +2141,7 @@ public Builder setEnableHealthCheck(boolean value) {
            * @return This builder for chaining.
            */
           public Builder clearEnableHealthCheck() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000004);
             enableHealthCheck_ = false;
             onChanged();
             return this;
    @@ -2159,8 +2170,9 @@ public long getClusterRegisterTimeoutInMs() {
            * @return This builder for chaining.
            */
           public Builder setClusterRegisterTimeoutInMs(long value) {
    -        
    +
             clusterRegisterTimeoutInMs_ = value;
    +        bitField0_ |= 0x00000008;
             onChanged();
             return this;
           }
    @@ -2173,12 +2185,59 @@ public Builder setClusterRegisterTimeoutInMs(long value) {
            * @return This builder for chaining.
            */
           public Builder clearClusterRegisterTimeoutInMs() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000008);
             clusterRegisterTimeoutInMs_ = 0L;
             onChanged();
             return this;
           }
     
    +      private boolean clusterRegisterWithBarrier_ ;
    +      /**
    +       * 
    +       * Denotes if we should synchronize the agents' register attempts by blocking
    +       * on a barrier. This is useful for synchronized restarts.
    +       * 
    + * + * bool cluster_register_with_barrier = 14; + * @return The clusterRegisterWithBarrier. + */ + @java.lang.Override + public boolean getClusterRegisterWithBarrier() { + return clusterRegisterWithBarrier_; + } + /** + *
    +       * Denotes if we should synchronize the agents' register attempts by blocking
    +       * on a barrier. This is useful for synchronized restarts.
    +       * 
    + * + * bool cluster_register_with_barrier = 14; + * @param value The clusterRegisterWithBarrier to set. + * @return This builder for chaining. + */ + public Builder setClusterRegisterWithBarrier(boolean value) { + + clusterRegisterWithBarrier_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
    +       * Denotes if we should synchronize the agents' register attempts by blocking
    +       * on a barrier. This is useful for synchronized restarts.
    +       * 
    + * + * bool cluster_register_with_barrier = 14; + * @return This builder for chaining. + */ + public Builder clearClusterRegisterWithBarrier() { + bitField0_ = (bitField0_ & ~0x00000010); + clusterRegisterWithBarrier_ = false; + onChanged(); + return this; + } + private long heartbeatTimeoutInMs_ ; /** *
    @@ -2210,8 +2269,9 @@ public long getHeartbeatTimeoutInMs() {
            * @return This builder for chaining.
            */
           public Builder setHeartbeatTimeoutInMs(long value) {
    -        
    +
             heartbeatTimeoutInMs_ = value;
    +        bitField0_ |= 0x00000020;
             onChanged();
             return this;
           }
    @@ -2228,7 +2288,7 @@ public Builder setHeartbeatTimeoutInMs(long value) {
            * @return This builder for chaining.
            */
           public Builder clearHeartbeatTimeoutInMs() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000020);
             heartbeatTimeoutInMs_ = 0L;
             onChanged();
             return this;
    @@ -2237,13 +2297,13 @@ public Builder clearHeartbeatTimeoutInMs() {
           private java.util.List coordinatedJobList_ =
             java.util.Collections.emptyList();
           private void ensureCoordinatedJobListIsMutable() {
    -        if (!((bitField0_ & 0x00000001) != 0)) {
    +        if (!((bitField0_ & 0x00000040) != 0)) {
               coordinatedJobList_ = new java.util.ArrayList(coordinatedJobList_);
    -          bitField0_ |= 0x00000001;
    +          bitField0_ |= 0x00000040;
              }
           }
     
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.CoordinationConfig.CoordinatedJob, org.tensorflow.proto.CoordinationConfig.CoordinatedJob.Builder, org.tensorflow.proto.CoordinationConfig.CoordinatedJobOrBuilder> coordinatedJobListBuilder_;
     
           /**
    @@ -2389,7 +2449,7 @@ public Builder addAllCoordinatedJobList(
           public Builder clearCoordinatedJobList() {
             if (coordinatedJobListBuilder_ == null) {
               coordinatedJobList_ = java.util.Collections.emptyList();
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ = (bitField0_ & ~0x00000040);
               onChanged();
             } else {
               coordinatedJobListBuilder_.clear();
    @@ -2459,14 +2519,14 @@ public org.tensorflow.proto.CoordinationConfig.CoordinatedJob.Builder addCoordin
                getCoordinatedJobListBuilderList() {
             return getCoordinatedJobListFieldBuilder().getBuilderList();
           }
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.CoordinationConfig.CoordinatedJob, org.tensorflow.proto.CoordinationConfig.CoordinatedJob.Builder, org.tensorflow.proto.CoordinationConfig.CoordinatedJobOrBuilder> 
               getCoordinatedJobListFieldBuilder() {
             if (coordinatedJobListBuilder_ == null) {
    -          coordinatedJobListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +          coordinatedJobListBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                   org.tensorflow.proto.CoordinationConfig.CoordinatedJob, org.tensorflow.proto.CoordinationConfig.CoordinatedJob.Builder, org.tensorflow.proto.CoordinationConfig.CoordinatedJobOrBuilder>(
                       coordinatedJobList_,
    -                  ((bitField0_ & 0x00000001) != 0),
    +                  ((bitField0_ & 0x00000040) != 0),
                       getParentForChildren(),
                       isClean());
               coordinatedJobList_ = null;
    @@ -2503,8 +2563,9 @@ public long getShutdownBarrierTimeoutInMs() {
            * @return This builder for chaining.
            */
           public Builder setShutdownBarrierTimeoutInMs(long value) {
    -        
    +
             shutdownBarrierTimeoutInMs_ = value;
    +        bitField0_ |= 0x00000080;
             onChanged();
             return this;
           }
    @@ -2520,7 +2581,7 @@ public Builder setShutdownBarrierTimeoutInMs(long value) {
            * @return This builder for chaining.
            */
           public Builder clearShutdownBarrierTimeoutInMs() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000080);
             shutdownBarrierTimeoutInMs_ = 0L;
             onChanged();
             return this;
    @@ -2553,8 +2614,9 @@ public boolean getAgentDestructionWithoutShutdown() {
            * @return This builder for chaining.
            */
           public Builder setAgentDestructionWithoutShutdown(boolean value) {
    -        
    +
             agentDestructionWithoutShutdown_ = value;
    +        bitField0_ |= 0x00000100;
             onChanged();
             return this;
           }
    @@ -2569,18 +2631,19 @@ public Builder setAgentDestructionWithoutShutdown(boolean value) {
            * @return This builder for chaining.
            */
           public Builder clearAgentDestructionWithoutShutdown() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000100);
             agentDestructionWithoutShutdown_ = false;
             onChanged();
             return this;
           }
     
    -      private com.google.protobuf.LazyStringList recoverableJobs_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +      private com.google.protobuf.LazyStringArrayList recoverableJobs_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
           private void ensureRecoverableJobsIsMutable() {
    -        if (!((bitField0_ & 0x00000002) != 0)) {
    +        if (!recoverableJobs_.isModifiable()) {
               recoverableJobs_ = new com.google.protobuf.LazyStringArrayList(recoverableJobs_);
    -          bitField0_ |= 0x00000002;
    -         }
    +        }
    +        bitField0_ |= 0x00000200;
           }
           /**
            * 
    @@ -2595,7 +2658,8 @@ private void ensureRecoverableJobsIsMutable() {
            */
           public com.google.protobuf.ProtocolStringList
               getRecoverableJobsList() {
    -        return recoverableJobs_.getUnmodifiableView();
    +        recoverableJobs_.makeImmutable();
    +        return recoverableJobs_;
           }
           /**
            * 
    @@ -2657,11 +2721,10 @@ public java.lang.String getRecoverableJobs(int index) {
            */
           public Builder setRecoverableJobs(
               int index, java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureRecoverableJobsIsMutable();
    +        if (value == null) { throw new NullPointerException(); }
    +        ensureRecoverableJobsIsMutable();
             recoverableJobs_.set(index, value);
    +        bitField0_ |= 0x00000200;
             onChanged();
             return this;
           }
    @@ -2679,11 +2742,10 @@ public Builder setRecoverableJobs(
            */
           public Builder addRecoverableJobs(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureRecoverableJobsIsMutable();
    +        if (value == null) { throw new NullPointerException(); }
    +        ensureRecoverableJobsIsMutable();
             recoverableJobs_.add(value);
    +        bitField0_ |= 0x00000200;
             onChanged();
             return this;
           }
    @@ -2704,6 +2766,7 @@ public Builder addAllRecoverableJobs(
             ensureRecoverableJobsIsMutable();
             com.google.protobuf.AbstractMessageLite.Builder.addAll(
                 values, recoverableJobs_);
    +        bitField0_ |= 0x00000200;
             onChanged();
             return this;
           }
    @@ -2719,8 +2782,9 @@ public Builder addAllRecoverableJobs(
            * @return This builder for chaining.
            */
           public Builder clearRecoverableJobs() {
    -        recoverableJobs_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -        bitField0_ = (bitField0_ & ~0x00000002);
    +        recoverableJobs_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
    +        bitField0_ = (bitField0_ & ~0x00000200);;
             onChanged();
             return this;
           }
    @@ -2738,12 +2802,11 @@ public Builder clearRecoverableJobs() {
            */
           public Builder addRecoverableJobsBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             ensureRecoverableJobsIsMutable();
             recoverableJobs_.add(value);
    +        bitField0_ |= 0x00000200;
             onChanged();
             return this;
           }
    @@ -2775,8 +2838,9 @@ public boolean getAllowNewIncarnationToReconnect() {
            * @return This builder for chaining.
            */
           public Builder setAllowNewIncarnationToReconnect(boolean value) {
    -        
    +
             allowNewIncarnationToReconnect_ = value;
    +        bitField0_ |= 0x00000400;
             onChanged();
             return this;
           }
    @@ -2791,7 +2855,7 @@ public Builder setAllowNewIncarnationToReconnect(boolean value) {
            * @return This builder for chaining.
            */
           public Builder clearAllowNewIncarnationToReconnect() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000400);
             allowNewIncarnationToReconnect_ = false;
             onChanged();
             return this;
    @@ -2826,8 +2890,9 @@ public boolean getForceDisable() {
            * @return This builder for chaining.
            */
           public Builder setForceDisable(boolean value) {
    -        
    +
             forceDisable_ = value;
    +        bitField0_ |= 0x00000800;
             onChanged();
             return this;
           }
    @@ -2843,7 +2908,7 @@ public Builder setForceDisable(boolean value) {
            * @return This builder for chaining.
            */
           public Builder clearForceDisable() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000800);
             forceDisable_ = false;
             onChanged();
             return this;
    @@ -2874,8 +2939,9 @@ public boolean getPollForErrorFromServiceAtStartup() {
            * @return This builder for chaining.
            */
           public Builder setPollForErrorFromServiceAtStartup(boolean value) {
    -        
    +
             pollForErrorFromServiceAtStartup_ = value;
    +        bitField0_ |= 0x00001000;
             onChanged();
             return this;
           }
    @@ -2889,23 +2955,11 @@ public Builder setPollForErrorFromServiceAtStartup(boolean value) {
            * @return This builder for chaining.
            */
           public Builder clearPollForErrorFromServiceAtStartup() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00001000);
             pollForErrorFromServiceAtStartup_ = false;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.CoordinationServiceConfig)
         }
    @@ -2961,12 +3015,12 @@ public org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfig getDefa
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_CoordinatedJob_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_CoordinatedJob_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_CoordinationServiceConfig_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_CoordinationServiceConfig_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -2977,24 +3031,25 @@ public org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfig getDefa
           descriptor;
       static {
         java.lang.String[] descriptorData = {
    -      "\n&tsl/protobuf/coordination_config.proto" +
    -      "\022\ntensorflow\"1\n\016CoordinatedJob\022\014\n\004name\030\001" +
    -      " \001(\t\022\021\n\tnum_tasks\030\002 \001(\005\"\320\003\n\031Coordination" +
    -      "ServiceConfig\022\024\n\014service_type\030\001 \001(\t\022\026\n\016s" +
    -      "ervice_leader\030\002 \001(\t\022\033\n\023enable_health_che" +
    -      "ck\030\003 \001(\010\022&\n\036cluster_register_timeout_in_" +
    -      "ms\030\004 \001(\003\022\037\n\027heartbeat_timeout_in_ms\030\005 \001(" +
    -      "\003\0228\n\024coordinated_job_list\030\n \003(\0132\032.tensor" +
    -      "flow.CoordinatedJob\022&\n\036shutdown_barrier_" +
    -      "timeout_in_ms\030\007 \001(\003\022*\n\"agent_destruction" +
    -      "_without_shutdown\030\010 \001(\010\022\030\n\020recoverable_j" +
    -      "obs\030\t \003(\t\022*\n\"allow_new_incarnation_to_re" +
    -      "connect\030\013 \001(\010\022\025\n\rforce_disable\030\014 \001(\010\022.\n&" +
    -      "poll_for_error_from_service_at_startup\030\r" +
    -      " \001(\010J\004\010\006\020\007Bm\n\024org.tensorflow.protoZUgith" +
    -      "ub.com/tensorflow/tensorflow/tensorflow/" +
    -      "go/core/protobuf/for_core_protos_go_prot" +
    -      "ob\006proto3"
    +      "\n*xla/tsl/protobuf/coordination_config.p" +
    +      "roto\022\ntensorflow\"1\n\016CoordinatedJob\022\014\n\004na" +
    +      "me\030\001 \001(\t\022\021\n\tnum_tasks\030\002 \001(\005\"\367\003\n\031Coordina" +
    +      "tionServiceConfig\022\024\n\014service_type\030\001 \001(\t\022" +
    +      "\026\n\016service_leader\030\002 \001(\t\022\033\n\023enable_health" +
    +      "_check\030\003 \001(\010\022&\n\036cluster_register_timeout" +
    +      "_in_ms\030\004 \001(\003\022%\n\035cluster_register_with_ba" +
    +      "rrier\030\016 \001(\010\022\037\n\027heartbeat_timeout_in_ms\030\005" +
    +      " \001(\003\0228\n\024coordinated_job_list\030\n \003(\0132\032.ten" +
    +      "sorflow.CoordinatedJob\022&\n\036shutdown_barri" +
    +      "er_timeout_in_ms\030\007 \001(\003\022*\n\"agent_destruct" +
    +      "ion_without_shutdown\030\010 \001(\010\022\030\n\020recoverabl" +
    +      "e_jobs\030\t \003(\t\022*\n\"allow_new_incarnation_to" +
    +      "_reconnect\030\013 \001(\010\022\025\n\rforce_disable\030\014 \001(\010\022" +
    +      ".\n&poll_for_error_from_service_at_startu" +
    +      "p\030\r \001(\010J\004\010\006\020\007Bm\n\024org.tensorflow.protoZUg" +
    +      "ithub.com/tensorflow/tensorflow/tensorfl" +
    +      "ow/go/core/protobuf/for_core_protos_go_p" +
    +      "rotob\006proto3"
         };
         descriptor = com.google.protobuf.Descriptors.FileDescriptor
           .internalBuildGeneratedFileFrom(descriptorData,
    @@ -3003,15 +3058,16 @@ public org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfig getDefa
         internal_static_tensorflow_CoordinatedJob_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_CoordinatedJob_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_CoordinatedJob_descriptor,
             new java.lang.String[] { "Name", "NumTasks", });
         internal_static_tensorflow_CoordinationServiceConfig_descriptor =
           getDescriptor().getMessageTypes().get(1);
         internal_static_tensorflow_CoordinationServiceConfig_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_CoordinationServiceConfig_descriptor,
    -        new java.lang.String[] { "ServiceType", "ServiceLeader", "EnableHealthCheck", "ClusterRegisterTimeoutInMs", "HeartbeatTimeoutInMs", "CoordinatedJobList", "ShutdownBarrierTimeoutInMs", "AgentDestructionWithoutShutdown", "RecoverableJobs", "AllowNewIncarnationToReconnect", "ForceDisable", "PollForErrorFromServiceAtStartup", });
    +        new java.lang.String[] { "ServiceType", "ServiceLeader", "EnableHealthCheck", "ClusterRegisterTimeoutInMs", "ClusterRegisterWithBarrier", "HeartbeatTimeoutInMs", "CoordinatedJobList", "ShutdownBarrierTimeoutInMs", "AgentDestructionWithoutShutdown", "RecoverableJobs", "AllowNewIncarnationToReconnect", "ForceDisable", "PollForErrorFromServiceAtStartup", });
    +    descriptor.resolveAllFeaturesImmutable();
       }
     
       // @@protoc_insertion_point(outer_class_scope)
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CostGraphDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CostGraphDef.java
    index 04fe7d09b27..c1b43631e02 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CostGraphDef.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CostGraphDef.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/cost_graph.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,12 +9,21 @@
      * Protobuf type {@code tensorflow.CostGraphDef}
      */
     public final class CostGraphDef extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.CostGraphDef)
         CostGraphDefOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      CostGraphDef.class.getName());
    +  }
       // Use CostGraphDef.newBuilder() to construct.
    -  private CostGraphDef(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private CostGraphDef(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private CostGraphDef() {
    @@ -20,25 +31,13 @@ private CostGraphDef() {
         cost_ = java.util.Collections.emptyList();
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new CostGraphDef();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.CostGraphProtos.internal_static_tensorflow_CostGraphDef_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.CostGraphProtos.internal_static_tensorflow_CostGraphDef_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -279,12 +278,21 @@ org.tensorflow.proto.CostGraphDef.Node.OutputInfoOrBuilder getOutputInfoOrBuilde
        * Protobuf type {@code tensorflow.CostGraphDef.Node}
        */
       public static final class Node extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.CostGraphDef.Node)
           NodeOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        Node.class.getName());
    +    }
         // Use Node.newBuilder() to construct.
    -    private Node(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private Node(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private Node() {
    @@ -295,25 +303,13 @@ private Node() {
           controlInput_ = emptyIntList();
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new Node();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -346,36 +342,33 @@ public interface InputInfoOrBuilder extends
          * Protobuf type {@code tensorflow.CostGraphDef.Node.InputInfo}
          */
         public static final class InputInfo extends
    -        com.google.protobuf.GeneratedMessageV3 implements
    +        com.google.protobuf.GeneratedMessage implements
             // @@protoc_insertion_point(message_implements:tensorflow.CostGraphDef.Node.InputInfo)
             InputInfoOrBuilder {
         private static final long serialVersionUID = 0L;
    +      static {
    +        com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +          com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +          /* major= */ 4,
    +          /* minor= */ 28,
    +          /* patch= */ 3,
    +          /* suffix= */ "",
    +          InputInfo.class.getName());
    +      }
           // Use InputInfo.newBuilder() to construct.
    -      private InputInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +      private InputInfo(com.google.protobuf.GeneratedMessage.Builder builder) {
             super(builder);
           }
           private InputInfo() {
           }
     
    -      @java.lang.Override
    -      @SuppressWarnings({"unused"})
    -      protected java.lang.Object newInstance(
    -          UnusedPrivateParameter unused) {
    -        return new InputInfo();
    -      }
    -
    -      @java.lang.Override
    -      public final com.google.protobuf.UnknownFieldSet
    -      getUnknownFields() {
    -        return this.unknownFields;
    -      }
           public static final com.google.protobuf.Descriptors.Descriptor
               getDescriptor() {
             return org.tensorflow.proto.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_InputInfo_descriptor;
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_InputInfo_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -383,7 +376,7 @@ protected java.lang.Object newInstance(
           }
     
           public static final int PRECEDING_NODE_FIELD_NUMBER = 1;
    -      private int precedingNode_;
    +      private int precedingNode_ = 0;
           /**
            * int32 preceding_node = 1;
            * @return The precedingNode.
    @@ -394,7 +387,7 @@ public int getPrecedingNode() {
           }
     
           public static final int PRECEDING_PORT_FIELD_NUMBER = 2;
    -      private int precedingPort_;
    +      private int precedingPort_ = 0;
           /**
            * int32 preceding_port = 2;
            * @return The precedingPort.
    @@ -514,39 +507,41 @@ public static org.tensorflow.proto.CostGraphDef.Node.InputInfo parseFrom(
           }
           public static org.tensorflow.proto.CostGraphDef.Node.InputInfo parseFrom(java.io.InputStream input)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input);
           }
           public static org.tensorflow.proto.CostGraphDef.Node.InputInfo parseFrom(
               java.io.InputStream input,
               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input, extensionRegistry);
           }
    +
           public static org.tensorflow.proto.CostGraphDef.Node.InputInfo parseDelimitedFrom(java.io.InputStream input)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseDelimitedWithIOException(PARSER, input);
           }
    +
           public static org.tensorflow.proto.CostGraphDef.Node.InputInfo parseDelimitedFrom(
               java.io.InputStream input,
               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
           }
           public static org.tensorflow.proto.CostGraphDef.Node.InputInfo parseFrom(
               com.google.protobuf.CodedInputStream input)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input);
           }
           public static org.tensorflow.proto.CostGraphDef.Node.InputInfo parseFrom(
               com.google.protobuf.CodedInputStream input,
               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input, extensionRegistry);
           }
     
    @@ -566,7 +561,7 @@ public Builder toBuilder() {
     
           @java.lang.Override
           protected Builder newBuilderForType(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             Builder builder = new Builder(parent);
             return builder;
           }
    @@ -580,7 +575,7 @@ protected Builder newBuilderForType(
            * Protobuf type {@code tensorflow.CostGraphDef.Node.InputInfo}
            */
           public static final class Builder extends
    -          com.google.protobuf.GeneratedMessageV3.Builder implements
    +          com.google.protobuf.GeneratedMessage.Builder implements
               // @@protoc_insertion_point(builder_implements:tensorflow.CostGraphDef.Node.InputInfo)
               org.tensorflow.proto.CostGraphDef.Node.InputInfoOrBuilder {
             public static final com.google.protobuf.Descriptors.Descriptor
    @@ -589,7 +584,7 @@ public static final class Builder extends
             }
     
             @java.lang.Override
    -        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +        protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
                 internalGetFieldAccessorTable() {
               return org.tensorflow.proto.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_InputInfo_fieldAccessorTable
                   .ensureFieldAccessorsInitialized(
    @@ -602,17 +597,16 @@ private Builder() {
             }
     
             private Builder(
    -            com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +            com.google.protobuf.GeneratedMessage.BuilderParent parent) {
               super(parent);
     
             }
             @java.lang.Override
             public Builder clear() {
               super.clear();
    +          bitField0_ = 0;
               precedingNode_ = 0;
    -
               precedingPort_ = 0;
    -
               return this;
             }
     
    @@ -639,44 +633,21 @@ public org.tensorflow.proto.CostGraphDef.Node.InputInfo build() {
             @java.lang.Override
             public org.tensorflow.proto.CostGraphDef.Node.InputInfo buildPartial() {
               org.tensorflow.proto.CostGraphDef.Node.InputInfo result = new org.tensorflow.proto.CostGraphDef.Node.InputInfo(this);
    -          result.precedingNode_ = precedingNode_;
    -          result.precedingPort_ = precedingPort_;
    +          if (bitField0_ != 0) { buildPartial0(result); }
               onBuilt();
               return result;
             }
     
    -        @java.lang.Override
    -        public Builder clone() {
    -          return super.clone();
    -        }
    -        @java.lang.Override
    -        public Builder setField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field,
    -            java.lang.Object value) {
    -          return super.setField(field, value);
    -        }
    -        @java.lang.Override
    -        public Builder clearField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field) {
    -          return super.clearField(field);
    -        }
    -        @java.lang.Override
    -        public Builder clearOneof(
    -            com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -          return super.clearOneof(oneof);
    -        }
    -        @java.lang.Override
    -        public Builder setRepeatedField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field,
    -            int index, java.lang.Object value) {
    -          return super.setRepeatedField(field, index, value);
    -        }
    -        @java.lang.Override
    -        public Builder addRepeatedField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field,
    -            java.lang.Object value) {
    -          return super.addRepeatedField(field, value);
    +        private void buildPartial0(org.tensorflow.proto.CostGraphDef.Node.InputInfo result) {
    +          int from_bitField0_ = bitField0_;
    +          if (((from_bitField0_ & 0x00000001) != 0)) {
    +            result.precedingNode_ = precedingNode_;
    +          }
    +          if (((from_bitField0_ & 0x00000002) != 0)) {
    +            result.precedingPort_ = precedingPort_;
    +          }
             }
    +
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.Message other) {
               if (other instanceof org.tensorflow.proto.CostGraphDef.Node.InputInfo) {
    @@ -723,12 +694,12 @@ public Builder mergeFrom(
                       break;
                     case 8: {
                       precedingNode_ = input.readInt32();
    -
    +                  bitField0_ |= 0x00000001;
                       break;
                     } // case 8
                     case 16: {
                       precedingPort_ = input.readInt32();
    -
    +                  bitField0_ |= 0x00000002;
                       break;
                     } // case 16
                     default: {
    @@ -746,6 +717,7 @@ public Builder mergeFrom(
               } // finally
               return this;
             }
    +        private int bitField0_;
     
             private int precedingNode_ ;
             /**
    @@ -762,8 +734,9 @@ public int getPrecedingNode() {
              * @return This builder for chaining.
              */
             public Builder setPrecedingNode(int value) {
    -          
    +
               precedingNode_ = value;
    +          bitField0_ |= 0x00000001;
               onChanged();
               return this;
             }
    @@ -772,7 +745,7 @@ public Builder setPrecedingNode(int value) {
              * @return This builder for chaining.
              */
             public Builder clearPrecedingNode() {
    -          
    +          bitField0_ = (bitField0_ & ~0x00000001);
               precedingNode_ = 0;
               onChanged();
               return this;
    @@ -793,8 +766,9 @@ public int getPrecedingPort() {
              * @return This builder for chaining.
              */
             public Builder setPrecedingPort(int value) {
    -          
    +
               precedingPort_ = value;
    +          bitField0_ |= 0x00000002;
               onChanged();
               return this;
             }
    @@ -803,23 +777,11 @@ public Builder setPrecedingPort(int value) {
              * @return This builder for chaining.
              */
             public Builder clearPrecedingPort() {
    -          
    +          bitField0_ = (bitField0_ & ~0x00000002);
               precedingPort_ = 0;
               onChanged();
               return this;
             }
    -        @java.lang.Override
    -        public final Builder setUnknownFields(
    -            final com.google.protobuf.UnknownFieldSet unknownFields) {
    -          return super.setUnknownFields(unknownFields);
    -        }
    -
    -        @java.lang.Override
    -        public final Builder mergeUnknownFields(
    -            final com.google.protobuf.UnknownFieldSet unknownFields) {
    -          return super.mergeUnknownFields(unknownFields);
    -        }
    -
     
             // @@protoc_insertion_point(builder_scope:tensorflow.CostGraphDef.Node.InputInfo)
           }
    @@ -928,45 +890,43 @@ public interface OutputInfoOrBuilder extends
          * Protobuf type {@code tensorflow.CostGraphDef.Node.OutputInfo}
          */
         public static final class OutputInfo extends
    -        com.google.protobuf.GeneratedMessageV3 implements
    +        com.google.protobuf.GeneratedMessage implements
             // @@protoc_insertion_point(message_implements:tensorflow.CostGraphDef.Node.OutputInfo)
             OutputInfoOrBuilder {
         private static final long serialVersionUID = 0L;
    +      static {
    +        com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +          com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +          /* major= */ 4,
    +          /* minor= */ 28,
    +          /* patch= */ 3,
    +          /* suffix= */ "",
    +          OutputInfo.class.getName());
    +      }
           // Use OutputInfo.newBuilder() to construct.
    -      private OutputInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +      private OutputInfo(com.google.protobuf.GeneratedMessage.Builder builder) {
             super(builder);
           }
           private OutputInfo() {
             dtype_ = 0;
           }
     
    -      @java.lang.Override
    -      @SuppressWarnings({"unused"})
    -      protected java.lang.Object newInstance(
    -          UnusedPrivateParameter unused) {
    -        return new OutputInfo();
    -      }
    -
    -      @java.lang.Override
    -      public final com.google.protobuf.UnknownFieldSet
    -      getUnknownFields() {
    -        return this.unknownFields;
    -      }
           public static final com.google.protobuf.Descriptors.Descriptor
               getDescriptor() {
             return org.tensorflow.proto.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_OutputInfo_descriptor;
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_OutputInfo_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
                     org.tensorflow.proto.CostGraphDef.Node.OutputInfo.class, org.tensorflow.proto.CostGraphDef.Node.OutputInfo.Builder.class);
           }
     
    +      private int bitField0_;
           public static final int SIZE_FIELD_NUMBER = 1;
    -      private long size_;
    +      private long size_ = 0L;
           /**
            * int64 size = 1;
            * @return The size.
    @@ -977,7 +937,7 @@ public long getSize() {
           }
     
           public static final int ALIAS_INPUT_PORT_FIELD_NUMBER = 2;
    -      private long aliasInputPort_;
    +      private long aliasInputPort_ = 0L;
           /**
            * 
            * If >= 0, the output is an alias of an input. Note that an alias input
    @@ -1001,7 +961,7 @@ public long getAliasInputPort() {
            */
           @java.lang.Override
           public boolean hasShape() {
    -        return shape_ != null;
    +        return ((bitField0_ & 0x00000001) != 0);
           }
           /**
            * .tensorflow.TensorShapeProto shape = 3;
    @@ -1016,11 +976,11 @@ public org.tensorflow.proto.TensorShapeProto getShape() {
            */
           @java.lang.Override
           public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
    -        return getShape();
    +        return shape_ == null ? org.tensorflow.proto.TensorShapeProto.getDefaultInstance() : shape_;
           }
     
           public static final int DTYPE_FIELD_NUMBER = 4;
    -      private int dtype_;
    +      private int dtype_ = 0;
           /**
            * .tensorflow.DataType dtype = 4;
            * @return The enum numeric value on the wire for dtype.
    @@ -1033,8 +993,7 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
            * @return The dtype.
            */
           @java.lang.Override public org.tensorflow.proto.DataType getDtype() {
    -        @SuppressWarnings("deprecation")
    -        org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(dtype_);
    +        org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(dtype_);
             return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
           }
     
    @@ -1058,7 +1017,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
             if (aliasInputPort_ != 0L) {
               output.writeInt64(2, aliasInputPort_);
             }
    -        if (shape_ != null) {
    +        if (((bitField0_ & 0x00000001) != 0)) {
               output.writeMessage(3, getShape());
             }
             if (dtype_ != org.tensorflow.proto.DataType.DT_INVALID.getNumber()) {
    @@ -1081,7 +1040,7 @@ public int getSerializedSize() {
               size += com.google.protobuf.CodedOutputStream
                 .computeInt64Size(2, aliasInputPort_);
             }
    -        if (shape_ != null) {
    +        if (((bitField0_ & 0x00000001) != 0)) {
               size += com.google.protobuf.CodedOutputStream
                 .computeMessageSize(3, getShape());
             }
    @@ -1176,39 +1135,41 @@ public static org.tensorflow.proto.CostGraphDef.Node.OutputInfo parseFrom(
           }
           public static org.tensorflow.proto.CostGraphDef.Node.OutputInfo parseFrom(java.io.InputStream input)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input);
           }
           public static org.tensorflow.proto.CostGraphDef.Node.OutputInfo parseFrom(
               java.io.InputStream input,
               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input, extensionRegistry);
           }
    +
           public static org.tensorflow.proto.CostGraphDef.Node.OutputInfo parseDelimitedFrom(java.io.InputStream input)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseDelimitedWithIOException(PARSER, input);
           }
    +
           public static org.tensorflow.proto.CostGraphDef.Node.OutputInfo parseDelimitedFrom(
               java.io.InputStream input,
               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
           }
           public static org.tensorflow.proto.CostGraphDef.Node.OutputInfo parseFrom(
               com.google.protobuf.CodedInputStream input)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input);
           }
           public static org.tensorflow.proto.CostGraphDef.Node.OutputInfo parseFrom(
               com.google.protobuf.CodedInputStream input,
               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input, extensionRegistry);
           }
     
    @@ -1228,7 +1189,7 @@ public Builder toBuilder() {
     
           @java.lang.Override
           protected Builder newBuilderForType(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             Builder builder = new Builder(parent);
             return builder;
           }
    @@ -1240,7 +1201,7 @@ protected Builder newBuilderForType(
            * Protobuf type {@code tensorflow.CostGraphDef.Node.OutputInfo}
            */
           public static final class Builder extends
    -          com.google.protobuf.GeneratedMessageV3.Builder implements
    +          com.google.protobuf.GeneratedMessage.Builder implements
               // @@protoc_insertion_point(builder_implements:tensorflow.CostGraphDef.Node.OutputInfo)
               org.tensorflow.proto.CostGraphDef.Node.OutputInfoOrBuilder {
             public static final com.google.protobuf.Descriptors.Descriptor
    @@ -1249,7 +1210,7 @@ public static final class Builder extends
             }
     
             @java.lang.Override
    -        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +        protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
                 internalGetFieldAccessorTable() {
               return org.tensorflow.proto.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_OutputInfo_fieldAccessorTable
                   .ensureFieldAccessorsInitialized(
    @@ -1258,29 +1219,32 @@ public static final class Builder extends
     
             // Construct using org.tensorflow.proto.CostGraphDef.Node.OutputInfo.newBuilder()
             private Builder() {
    -
    +          maybeForceBuilderInitialization();
             }
     
             private Builder(
    -            com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +            com.google.protobuf.GeneratedMessage.BuilderParent parent) {
               super(parent);
    -
    +          maybeForceBuilderInitialization();
    +        }
    +        private void maybeForceBuilderInitialization() {
    +          if (com.google.protobuf.GeneratedMessage
    +                  .alwaysUseFieldBuilders) {
    +            getShapeFieldBuilder();
    +          }
             }
             @java.lang.Override
             public Builder clear() {
               super.clear();
    +          bitField0_ = 0;
               size_ = 0L;
    -
               aliasInputPort_ = 0L;
    -
    -          if (shapeBuilder_ == null) {
    -            shape_ = null;
    -          } else {
    -            shape_ = null;
    +          shape_ = null;
    +          if (shapeBuilder_ != null) {
    +            shapeBuilder_.dispose();
                 shapeBuilder_ = null;
               }
               dtype_ = 0;
    -
               return this;
             }
     
    @@ -1307,50 +1271,32 @@ public org.tensorflow.proto.CostGraphDef.Node.OutputInfo build() {
             @java.lang.Override
             public org.tensorflow.proto.CostGraphDef.Node.OutputInfo buildPartial() {
               org.tensorflow.proto.CostGraphDef.Node.OutputInfo result = new org.tensorflow.proto.CostGraphDef.Node.OutputInfo(this);
    -          result.size_ = size_;
    -          result.aliasInputPort_ = aliasInputPort_;
    -          if (shapeBuilder_ == null) {
    -            result.shape_ = shape_;
    -          } else {
    -            result.shape_ = shapeBuilder_.build();
    -          }
    -          result.dtype_ = dtype_;
    +          if (bitField0_ != 0) { buildPartial0(result); }
               onBuilt();
               return result;
             }
     
    -        @java.lang.Override
    -        public Builder clone() {
    -          return super.clone();
    -        }
    -        @java.lang.Override
    -        public Builder setField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field,
    -            java.lang.Object value) {
    -          return super.setField(field, value);
    -        }
    -        @java.lang.Override
    -        public Builder clearField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field) {
    -          return super.clearField(field);
    -        }
    -        @java.lang.Override
    -        public Builder clearOneof(
    -            com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -          return super.clearOneof(oneof);
    -        }
    -        @java.lang.Override
    -        public Builder setRepeatedField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field,
    -            int index, java.lang.Object value) {
    -          return super.setRepeatedField(field, index, value);
    -        }
    -        @java.lang.Override
    -        public Builder addRepeatedField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field,
    -            java.lang.Object value) {
    -          return super.addRepeatedField(field, value);
    +        private void buildPartial0(org.tensorflow.proto.CostGraphDef.Node.OutputInfo result) {
    +          int from_bitField0_ = bitField0_;
    +          if (((from_bitField0_ & 0x00000001) != 0)) {
    +            result.size_ = size_;
    +          }
    +          if (((from_bitField0_ & 0x00000002) != 0)) {
    +            result.aliasInputPort_ = aliasInputPort_;
    +          }
    +          int to_bitField0_ = 0;
    +          if (((from_bitField0_ & 0x00000004) != 0)) {
    +            result.shape_ = shapeBuilder_ == null
    +                ? shape_
    +                : shapeBuilder_.build();
    +            to_bitField0_ |= 0x00000001;
    +          }
    +          if (((from_bitField0_ & 0x00000008) != 0)) {
    +            result.dtype_ = dtype_;
    +          }
    +          result.bitField0_ |= to_bitField0_;
             }
    +
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.Message other) {
               if (other instanceof org.tensorflow.proto.CostGraphDef.Node.OutputInfo) {
    @@ -1403,24 +1349,24 @@ public Builder mergeFrom(
                       break;
                     case 8: {
                       size_ = input.readInt64();
    -
    +                  bitField0_ |= 0x00000001;
                       break;
                     } // case 8
                     case 16: {
                       aliasInputPort_ = input.readInt64();
    -
    +                  bitField0_ |= 0x00000002;
                       break;
                     } // case 16
                     case 26: {
                       input.readMessage(
                           getShapeFieldBuilder().getBuilder(),
                           extensionRegistry);
    -
    +                  bitField0_ |= 0x00000004;
                       break;
                     } // case 26
                     case 32: {
                       dtype_ = input.readEnum();
    -
    +                  bitField0_ |= 0x00000008;
                       break;
                     } // case 32
                     default: {
    @@ -1438,6 +1384,7 @@ public Builder mergeFrom(
               } // finally
               return this;
             }
    +        private int bitField0_;
     
             private long size_ ;
             /**
    @@ -1454,8 +1401,9 @@ public long getSize() {
              * @return This builder for chaining.
              */
             public Builder setSize(long value) {
    -          
    +
               size_ = value;
    +          bitField0_ |= 0x00000001;
               onChanged();
               return this;
             }
    @@ -1464,7 +1412,7 @@ public Builder setSize(long value) {
              * @return This builder for chaining.
              */
             public Builder clearSize() {
    -          
    +          bitField0_ = (bitField0_ & ~0x00000001);
               size_ = 0L;
               onChanged();
               return this;
    @@ -1497,8 +1445,9 @@ public long getAliasInputPort() {
              * @return This builder for chaining.
              */
             public Builder setAliasInputPort(long value) {
    -          
    +
               aliasInputPort_ = value;
    +          bitField0_ |= 0x00000002;
               onChanged();
               return this;
             }
    @@ -1513,21 +1462,21 @@ public Builder setAliasInputPort(long value) {
              * @return This builder for chaining.
              */
             public Builder clearAliasInputPort() {
    -          
    +          bitField0_ = (bitField0_ & ~0x00000002);
               aliasInputPort_ = 0L;
               onChanged();
               return this;
             }
     
             private org.tensorflow.proto.TensorShapeProto shape_;
    -        private com.google.protobuf.SingleFieldBuilderV3<
    +        private com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> shapeBuilder_;
             /**
              * .tensorflow.TensorShapeProto shape = 3;
              * @return Whether the shape field is set.
              */
             public boolean hasShape() {
    -          return shapeBuilder_ != null || shape_ != null;
    +          return ((bitField0_ & 0x00000004) != 0);
             }
             /**
              * .tensorflow.TensorShapeProto shape = 3;
    @@ -1549,11 +1498,11 @@ public Builder setShape(org.tensorflow.proto.TensorShapeProto value) {
                   throw new NullPointerException();
                 }
                 shape_ = value;
    -            onChanged();
               } else {
                 shapeBuilder_.setMessage(value);
               }
    -
    +          bitField0_ |= 0x00000004;
    +          onChanged();
               return this;
             }
             /**
    @@ -1563,11 +1512,11 @@ public Builder setShape(
                 org.tensorflow.proto.TensorShapeProto.Builder builderForValue) {
               if (shapeBuilder_ == null) {
                 shape_ = builderForValue.build();
    -            onChanged();
               } else {
                 shapeBuilder_.setMessage(builderForValue.build());
               }
    -
    +          bitField0_ |= 0x00000004;
    +          onChanged();
               return this;
             }
             /**
    @@ -1575,38 +1524,40 @@ public Builder setShape(
              */
             public Builder mergeShape(org.tensorflow.proto.TensorShapeProto value) {
               if (shapeBuilder_ == null) {
    -            if (shape_ != null) {
    -              shape_ =
    -                org.tensorflow.proto.TensorShapeProto.newBuilder(shape_).mergeFrom(value).buildPartial();
    +            if (((bitField0_ & 0x00000004) != 0) &&
    +              shape_ != null &&
    +              shape_ != org.tensorflow.proto.TensorShapeProto.getDefaultInstance()) {
    +              getShapeBuilder().mergeFrom(value);
                 } else {
                   shape_ = value;
                 }
    -            onChanged();
               } else {
                 shapeBuilder_.mergeFrom(value);
               }
    -
    +          if (shape_ != null) {
    +            bitField0_ |= 0x00000004;
    +            onChanged();
    +          }
               return this;
             }
             /**
              * .tensorflow.TensorShapeProto shape = 3;
              */
             public Builder clearShape() {
    -          if (shapeBuilder_ == null) {
    -            shape_ = null;
    -            onChanged();
    -          } else {
    -            shape_ = null;
    +          bitField0_ = (bitField0_ & ~0x00000004);
    +          shape_ = null;
    +          if (shapeBuilder_ != null) {
    +            shapeBuilder_.dispose();
                 shapeBuilder_ = null;
               }
    -
    +          onChanged();
               return this;
             }
             /**
              * .tensorflow.TensorShapeProto shape = 3;
              */
             public org.tensorflow.proto.TensorShapeProto.Builder getShapeBuilder() {
    -          
    +          bitField0_ |= 0x00000004;
               onChanged();
               return getShapeFieldBuilder().getBuilder();
             }
    @@ -1624,11 +1575,11 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
             /**
              * .tensorflow.TensorShapeProto shape = 3;
              */
    -        private com.google.protobuf.SingleFieldBuilderV3<
    +        private com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> 
                 getShapeFieldBuilder() {
               if (shapeBuilder_ == null) {
    -            shapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +            shapeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                     org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder>(
                         getShape(),
                         getParentForChildren(),
    @@ -1652,8 +1603,8 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
              * @return This builder for chaining.
              */
             public Builder setDtypeValue(int value) {
    -          
               dtype_ = value;
    +          bitField0_ |= 0x00000008;
               onChanged();
               return this;
             }
    @@ -1663,8 +1614,7 @@ public Builder setDtypeValue(int value) {
              */
             @java.lang.Override
             public org.tensorflow.proto.DataType getDtype() {
    -          @SuppressWarnings("deprecation")
    -          org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(dtype_);
    +          org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(dtype_);
               return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
             }
             /**
    @@ -1676,7 +1626,7 @@ public Builder setDtype(org.tensorflow.proto.DataType value) {
               if (value == null) {
                 throw new NullPointerException();
               }
    -          
    +          bitField0_ |= 0x00000008;
               dtype_ = value.getNumber();
               onChanged();
               return this;
    @@ -1686,23 +1636,11 @@ public Builder setDtype(org.tensorflow.proto.DataType value) {
              * @return This builder for chaining.
              */
             public Builder clearDtype() {
    -          
    +          bitField0_ = (bitField0_ & ~0x00000008);
               dtype_ = 0;
               onChanged();
               return this;
             }
    -        @java.lang.Override
    -        public final Builder setUnknownFields(
    -            final com.google.protobuf.UnknownFieldSet unknownFields) {
    -          return super.setUnknownFields(unknownFields);
    -        }
    -
    -        @java.lang.Override
    -        public final Builder mergeUnknownFields(
    -            final com.google.protobuf.UnknownFieldSet unknownFields) {
    -          return super.mergeUnknownFields(unknownFields);
    -        }
    -
     
             // @@protoc_insertion_point(builder_scope:tensorflow.CostGraphDef.Node.OutputInfo)
           }
    @@ -1756,7 +1694,8 @@ public org.tensorflow.proto.CostGraphDef.Node.OutputInfo getDefaultInstanceForTy
         }
     
         public static final int NAME_FIELD_NUMBER = 1;
    -    private volatile java.lang.Object name_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object name_ = "";
         /**
          * 
          * The name of the node. Names are globally unique.
    @@ -1802,7 +1741,8 @@ public java.lang.String getName() {
         }
     
         public static final int DEVICE_FIELD_NUMBER = 2;
    -    private volatile java.lang.Object device_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object device_ = "";
         /**
          * 
          * The device of the node. Can be empty if the node is mapped to the
    @@ -1850,7 +1790,7 @@ public java.lang.String getDevice() {
         }
     
         public static final int ID_FIELD_NUMBER = 3;
    -    private int id_;
    +    private int id_ = 0;
         /**
          * 
          * The id of the node. Node ids are only unique inside a partition.
    @@ -1865,6 +1805,7 @@ public int getId() {
         }
     
         public static final int INPUT_INFO_FIELD_NUMBER = 4;
    +    @SuppressWarnings("serial")
         private java.util.List inputInfo_;
         /**
          * repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;
    @@ -1905,6 +1846,7 @@ public org.tensorflow.proto.CostGraphDef.Node.InputInfoOrBuilder getInputInfoOrB
         }
     
         public static final int OUTPUT_INFO_FIELD_NUMBER = 5;
    +    @SuppressWarnings("serial")
         private java.util.List outputInfo_;
         /**
          * repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;
    @@ -1945,7 +1887,7 @@ public org.tensorflow.proto.CostGraphDef.Node.OutputInfoOrBuilder getOutputInfoO
         }
     
         public static final int TEMPORARY_MEMORY_SIZE_FIELD_NUMBER = 6;
    -    private long temporaryMemorySize_;
    +    private long temporaryMemorySize_ = 0L;
         /**
          * 
          * Temporary memory used by this node.
    @@ -1960,7 +1902,7 @@ public long getTemporaryMemorySize() {
         }
     
         public static final int PERSISTENT_MEMORY_SIZE_FIELD_NUMBER = 12;
    -    private long persistentMemorySize_;
    +    private long persistentMemorySize_ = 0L;
         /**
          * 
          * Persistent memory used by this node.
    @@ -1975,7 +1917,7 @@ public long getPersistentMemorySize() {
         }
     
         public static final int HOST_TEMP_MEMORY_SIZE_FIELD_NUMBER = 10;
    -    private long hostTempMemorySize_;
    +    private long hostTempMemorySize_ = 0L;
         /**
          * int64 host_temp_memory_size = 10 [deprecated = true];
          * @deprecated tensorflow.CostGraphDef.Node.host_temp_memory_size is deprecated.
    @@ -1988,7 +1930,7 @@ public long getPersistentMemorySize() {
         }
     
         public static final int DEVICE_TEMP_MEMORY_SIZE_FIELD_NUMBER = 11;
    -    private long deviceTempMemorySize_;
    +    private long deviceTempMemorySize_ = 0L;
         /**
          * int64 device_temp_memory_size = 11 [deprecated = true];
          * @deprecated tensorflow.CostGraphDef.Node.device_temp_memory_size is deprecated.
    @@ -2001,7 +1943,7 @@ public long getPersistentMemorySize() {
         }
     
         public static final int DEVICE_PERSISTENT_MEMORY_SIZE_FIELD_NUMBER = 16;
    -    private long devicePersistentMemorySize_;
    +    private long devicePersistentMemorySize_ = 0L;
         /**
          * int64 device_persistent_memory_size = 16 [deprecated = true];
          * @deprecated tensorflow.CostGraphDef.Node.device_persistent_memory_size is deprecated.
    @@ -2014,7 +1956,7 @@ public long getPersistentMemorySize() {
         }
     
         public static final int COMPUTE_COST_FIELD_NUMBER = 9;
    -    private long computeCost_;
    +    private long computeCost_ = 0L;
         /**
          * 
          * Estimate of the computational cost of this node, in microseconds.
    @@ -2029,7 +1971,7 @@ public long getComputeCost() {
         }
     
         public static final int COMPUTE_TIME_FIELD_NUMBER = 14;
    -    private long computeTime_;
    +    private long computeTime_ = 0L;
         /**
          * 
          * Analytical estimate of the computational cost of this node, in
    @@ -2045,7 +1987,7 @@ public long getComputeTime() {
         }
     
         public static final int MEMORY_TIME_FIELD_NUMBER = 15;
    -    private long memoryTime_;
    +    private long memoryTime_ = 0L;
         /**
          * 
          * Analytical estimate of the memory access cost of this node, in
    @@ -2061,7 +2003,7 @@ public long getMemoryTime() {
         }
     
         public static final int IS_FINAL_FIELD_NUMBER = 7;
    -    private boolean isFinal_;
    +    private boolean isFinal_ = false;
         /**
          * 
          * If true, the output is permanent: it can't be discarded, because this
    @@ -2077,7 +2019,9 @@ public boolean getIsFinal() {
         }
     
         public static final int CONTROL_INPUT_FIELD_NUMBER = 8;
    -    private com.google.protobuf.Internal.IntList controlInput_;
    +    @SuppressWarnings("serial")
    +    private com.google.protobuf.Internal.IntList controlInput_ =
    +        emptyIntList();
         /**
          * 
          * Ids of the control inputs for this node.
    @@ -2117,7 +2061,7 @@ public int getControlInput(int index) {
         private int controlInputMemoizedSerializedSize = -1;
     
         public static final int INACCURATE_FIELD_NUMBER = 17;
    -    private boolean inaccurate_;
    +    private boolean inaccurate_ = false;
         /**
          * 
          * Are the costs inaccurate?
    @@ -2146,11 +2090,11 @@ public final boolean isInitialized() {
         public void writeTo(com.google.protobuf.CodedOutputStream output)
                             throws java.io.IOException {
           getSerializedSize();
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(device_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, device_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(device_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 2, device_);
           }
           if (id_ != 0) {
             output.writeInt32(3, id_);
    @@ -2207,11 +2151,11 @@ public int getSerializedSize() {
           if (size != -1) return size;
     
           size = 0;
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(device_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, device_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(device_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, device_);
           }
           if (id_ != 0) {
             size += com.google.protobuf.CodedOutputStream
    @@ -2424,39 +2368,41 @@ public static org.tensorflow.proto.CostGraphDef.Node parseFrom(
         }
         public static org.tensorflow.proto.CostGraphDef.Node parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.CostGraphDef.Node parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.CostGraphDef.Node parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.CostGraphDef.Node parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.CostGraphDef.Node parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.CostGraphDef.Node parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -2476,7 +2422,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -2484,7 +2430,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.CostGraphDef.Node}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.CostGraphDef.Node)
             org.tensorflow.proto.CostGraphDef.NodeOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -2493,7 +2439,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -2506,55 +2452,42 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             name_ = "";
    -
             device_ = "";
    -
             id_ = 0;
    -
             if (inputInfoBuilder_ == null) {
               inputInfo_ = java.util.Collections.emptyList();
             } else {
               inputInfo_ = null;
               inputInfoBuilder_.clear();
             }
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        bitField0_ = (bitField0_ & ~0x00000008);
             if (outputInfoBuilder_ == null) {
               outputInfo_ = java.util.Collections.emptyList();
             } else {
               outputInfo_ = null;
               outputInfoBuilder_.clear();
             }
    -        bitField0_ = (bitField0_ & ~0x00000002);
    +        bitField0_ = (bitField0_ & ~0x00000010);
             temporaryMemorySize_ = 0L;
    -
             persistentMemorySize_ = 0L;
    -
             hostTempMemorySize_ = 0L;
    -
             deviceTempMemorySize_ = 0L;
    -
             devicePersistentMemorySize_ = 0L;
    -
             computeCost_ = 0L;
    -
             computeTime_ = 0L;
    -
             memoryTime_ = 0L;
    -
             isFinal_ = false;
    -
             controlInput_ = emptyIntList();
    -        bitField0_ = (bitField0_ & ~0x00000004);
             inaccurate_ = false;
    -
             return this;
           }
     
    @@ -2581,79 +2514,80 @@ public org.tensorflow.proto.CostGraphDef.Node build() {
           @java.lang.Override
           public org.tensorflow.proto.CostGraphDef.Node buildPartial() {
             org.tensorflow.proto.CostGraphDef.Node result = new org.tensorflow.proto.CostGraphDef.Node(this);
    -        int from_bitField0_ = bitField0_;
    -        result.name_ = name_;
    -        result.device_ = device_;
    -        result.id_ = id_;
    +        buildPartialRepeatedFields(result);
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        onBuilt();
    +        return result;
    +      }
    +
    +      private void buildPartialRepeatedFields(org.tensorflow.proto.CostGraphDef.Node result) {
             if (inputInfoBuilder_ == null) {
    -          if (((bitField0_ & 0x00000001) != 0)) {
    +          if (((bitField0_ & 0x00000008) != 0)) {
                 inputInfo_ = java.util.Collections.unmodifiableList(inputInfo_);
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000008);
               }
               result.inputInfo_ = inputInfo_;
             } else {
               result.inputInfo_ = inputInfoBuilder_.build();
             }
             if (outputInfoBuilder_ == null) {
    -          if (((bitField0_ & 0x00000002) != 0)) {
    +          if (((bitField0_ & 0x00000010) != 0)) {
                 outputInfo_ = java.util.Collections.unmodifiableList(outputInfo_);
    -            bitField0_ = (bitField0_ & ~0x00000002);
    +            bitField0_ = (bitField0_ & ~0x00000010);
               }
               result.outputInfo_ = outputInfo_;
             } else {
               result.outputInfo_ = outputInfoBuilder_.build();
             }
    -        result.temporaryMemorySize_ = temporaryMemorySize_;
    -        result.persistentMemorySize_ = persistentMemorySize_;
    -        result.hostTempMemorySize_ = hostTempMemorySize_;
    -        result.deviceTempMemorySize_ = deviceTempMemorySize_;
    -        result.devicePersistentMemorySize_ = devicePersistentMemorySize_;
    -        result.computeCost_ = computeCost_;
    -        result.computeTime_ = computeTime_;
    -        result.memoryTime_ = memoryTime_;
    -        result.isFinal_ = isFinal_;
    -        if (((bitField0_ & 0x00000004) != 0)) {
    +      }
    +
    +      private void buildPartial0(org.tensorflow.proto.CostGraphDef.Node result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.name_ = name_;
    +        }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.device_ = device_;
    +        }
    +        if (((from_bitField0_ & 0x00000004) != 0)) {
    +          result.id_ = id_;
    +        }
    +        if (((from_bitField0_ & 0x00000020) != 0)) {
    +          result.temporaryMemorySize_ = temporaryMemorySize_;
    +        }
    +        if (((from_bitField0_ & 0x00000040) != 0)) {
    +          result.persistentMemorySize_ = persistentMemorySize_;
    +        }
    +        if (((from_bitField0_ & 0x00000080) != 0)) {
    +          result.hostTempMemorySize_ = hostTempMemorySize_;
    +        }
    +        if (((from_bitField0_ & 0x00000100) != 0)) {
    +          result.deviceTempMemorySize_ = deviceTempMemorySize_;
    +        }
    +        if (((from_bitField0_ & 0x00000200) != 0)) {
    +          result.devicePersistentMemorySize_ = devicePersistentMemorySize_;
    +        }
    +        if (((from_bitField0_ & 0x00000400) != 0)) {
    +          result.computeCost_ = computeCost_;
    +        }
    +        if (((from_bitField0_ & 0x00000800) != 0)) {
    +          result.computeTime_ = computeTime_;
    +        }
    +        if (((from_bitField0_ & 0x00001000) != 0)) {
    +          result.memoryTime_ = memoryTime_;
    +        }
    +        if (((from_bitField0_ & 0x00002000) != 0)) {
    +          result.isFinal_ = isFinal_;
    +        }
    +        if (((from_bitField0_ & 0x00004000) != 0)) {
               controlInput_.makeImmutable();
    -          bitField0_ = (bitField0_ & ~0x00000004);
    +          result.controlInput_ = controlInput_;
    +        }
    +        if (((from_bitField0_ & 0x00008000) != 0)) {
    +          result.inaccurate_ = inaccurate_;
             }
    -        result.controlInput_ = controlInput_;
    -        result.inaccurate_ = inaccurate_;
    -        onBuilt();
    -        return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    -      }
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.CostGraphDef.Node) {
    @@ -2668,10 +2602,12 @@ public Builder mergeFrom(org.tensorflow.proto.CostGraphDef.Node other) {
             if (other == org.tensorflow.proto.CostGraphDef.Node.getDefaultInstance()) return this;
             if (!other.getName().isEmpty()) {
               name_ = other.name_;
    +          bitField0_ |= 0x00000001;
               onChanged();
             }
             if (!other.getDevice().isEmpty()) {
               device_ = other.device_;
    +          bitField0_ |= 0x00000002;
               onChanged();
             }
             if (other.getId() != 0) {
    @@ -2681,7 +2617,7 @@ public Builder mergeFrom(org.tensorflow.proto.CostGraphDef.Node other) {
               if (!other.inputInfo_.isEmpty()) {
                 if (inputInfo_.isEmpty()) {
                   inputInfo_ = other.inputInfo_;
    -              bitField0_ = (bitField0_ & ~0x00000001);
    +              bitField0_ = (bitField0_ & ~0x00000008);
                 } else {
                   ensureInputInfoIsMutable();
                   inputInfo_.addAll(other.inputInfo_);
    @@ -2694,9 +2630,9 @@ public Builder mergeFrom(org.tensorflow.proto.CostGraphDef.Node other) {
                   inputInfoBuilder_.dispose();
                   inputInfoBuilder_ = null;
                   inputInfo_ = other.inputInfo_;
    -              bitField0_ = (bitField0_ & ~0x00000001);
    +              bitField0_ = (bitField0_ & ~0x00000008);
                   inputInfoBuilder_ = 
    -                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                        getInputInfoFieldBuilder() : null;
                 } else {
                   inputInfoBuilder_.addAllMessages(other.inputInfo_);
    @@ -2707,7 +2643,7 @@ public Builder mergeFrom(org.tensorflow.proto.CostGraphDef.Node other) {
               if (!other.outputInfo_.isEmpty()) {
                 if (outputInfo_.isEmpty()) {
                   outputInfo_ = other.outputInfo_;
    -              bitField0_ = (bitField0_ & ~0x00000002);
    +              bitField0_ = (bitField0_ & ~0x00000010);
                 } else {
                   ensureOutputInfoIsMutable();
                   outputInfo_.addAll(other.outputInfo_);
    @@ -2720,9 +2656,9 @@ public Builder mergeFrom(org.tensorflow.proto.CostGraphDef.Node other) {
                   outputInfoBuilder_.dispose();
                   outputInfoBuilder_ = null;
                   outputInfo_ = other.outputInfo_;
    -              bitField0_ = (bitField0_ & ~0x00000002);
    +              bitField0_ = (bitField0_ & ~0x00000010);
                   outputInfoBuilder_ = 
    -                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                        getOutputInfoFieldBuilder() : null;
                 } else {
                   outputInfoBuilder_.addAllMessages(other.outputInfo_);
    @@ -2759,7 +2695,8 @@ public Builder mergeFrom(org.tensorflow.proto.CostGraphDef.Node other) {
             if (!other.controlInput_.isEmpty()) {
               if (controlInput_.isEmpty()) {
                 controlInput_ = other.controlInput_;
    -            bitField0_ = (bitField0_ & ~0x00000004);
    +            controlInput_.makeImmutable();
    +            bitField0_ |= 0x00004000;
               } else {
                 ensureControlInputIsMutable();
                 controlInput_.addAll(other.controlInput_);
    @@ -2797,17 +2734,17 @@ public Builder mergeFrom(
                     break;
                   case 10: {
                     name_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 10
                   case 18: {
                     device_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 18
                   case 24: {
                     id_ = input.readInt32();
    -
    +                bitField0_ |= 0x00000004;
                     break;
                   } // case 24
                   case 34: {
    @@ -2838,12 +2775,12 @@ public Builder mergeFrom(
                   } // case 42
                   case 48: {
                     temporaryMemorySize_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000020;
                     break;
                   } // case 48
                   case 56: {
                     isFinal_ = input.readBool();
    -
    +                bitField0_ |= 0x00002000;
                     break;
                   } // case 56
                   case 64: {
    @@ -2864,42 +2801,42 @@ public Builder mergeFrom(
                   } // case 66
                   case 72: {
                     computeCost_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000400;
                     break;
                   } // case 72
                   case 80: {
                     hostTempMemorySize_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000080;
                     break;
                   } // case 80
                   case 88: {
                     deviceTempMemorySize_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000100;
                     break;
                   } // case 88
                   case 96: {
                     persistentMemorySize_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000040;
                     break;
                   } // case 96
                   case 112: {
                     computeTime_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000800;
                     break;
                   } // case 112
                   case 120: {
                     memoryTime_ = input.readInt64();
    -
    +                bitField0_ |= 0x00001000;
                     break;
                   } // case 120
                   case 128: {
                     devicePersistentMemorySize_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000200;
                     break;
                   } // case 128
                   case 136: {
                     inaccurate_ = input.readBool();
    -
    +                bitField0_ |= 0x00008000;
                     break;
                   } // case 136
                   default: {
    @@ -2972,11 +2909,9 @@ public java.lang.String getName() {
            */
           public Builder setName(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             name_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -2989,8 +2924,8 @@ public Builder setName(
            * @return This builder for chaining.
            */
           public Builder clearName() {
    -        
             name_ = getDefaultInstance().getName();
    +        bitField0_ = (bitField0_ & ~0x00000001);
             onChanged();
             return this;
           }
    @@ -3005,12 +2940,10 @@ public Builder clearName() {
            */
           public Builder setNameBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             name_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -3071,11 +3004,9 @@ public java.lang.String getDevice() {
            */
           public Builder setDevice(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             device_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -3089,8 +3020,8 @@ public Builder setDevice(
            * @return This builder for chaining.
            */
           public Builder clearDevice() {
    -        
             device_ = getDefaultInstance().getDevice();
    +        bitField0_ = (bitField0_ & ~0x00000002);
             onChanged();
             return this;
           }
    @@ -3106,12 +3037,10 @@ public Builder clearDevice() {
            */
           public Builder setDeviceBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             device_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -3139,8 +3068,9 @@ public int getId() {
            * @return This builder for chaining.
            */
           public Builder setId(int value) {
    -        
    +
             id_ = value;
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -3153,7 +3083,7 @@ public Builder setId(int value) {
            * @return This builder for chaining.
            */
           public Builder clearId() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000004);
             id_ = 0;
             onChanged();
             return this;
    @@ -3162,13 +3092,13 @@ public Builder clearId() {
           private java.util.List inputInfo_ =
             java.util.Collections.emptyList();
           private void ensureInputInfoIsMutable() {
    -        if (!((bitField0_ & 0x00000001) != 0)) {
    +        if (!((bitField0_ & 0x00000008) != 0)) {
               inputInfo_ = new java.util.ArrayList(inputInfo_);
    -          bitField0_ |= 0x00000001;
    +          bitField0_ |= 0x00000008;
              }
           }
     
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.CostGraphDef.Node.InputInfo, org.tensorflow.proto.CostGraphDef.Node.InputInfo.Builder, org.tensorflow.proto.CostGraphDef.Node.InputInfoOrBuilder> inputInfoBuilder_;
     
           /**
    @@ -3314,7 +3244,7 @@ public Builder addAllInputInfo(
           public Builder clearInputInfo() {
             if (inputInfoBuilder_ == null) {
               inputInfo_ = java.util.Collections.emptyList();
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ = (bitField0_ & ~0x00000008);
               onChanged();
             } else {
               inputInfoBuilder_.clear();
    @@ -3384,14 +3314,14 @@ public org.tensorflow.proto.CostGraphDef.Node.InputInfo.Builder addInputInfoBuil
                getInputInfoBuilderList() {
             return getInputInfoFieldBuilder().getBuilderList();
           }
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.CostGraphDef.Node.InputInfo, org.tensorflow.proto.CostGraphDef.Node.InputInfo.Builder, org.tensorflow.proto.CostGraphDef.Node.InputInfoOrBuilder> 
               getInputInfoFieldBuilder() {
             if (inputInfoBuilder_ == null) {
    -          inputInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +          inputInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                   org.tensorflow.proto.CostGraphDef.Node.InputInfo, org.tensorflow.proto.CostGraphDef.Node.InputInfo.Builder, org.tensorflow.proto.CostGraphDef.Node.InputInfoOrBuilder>(
                       inputInfo_,
    -                  ((bitField0_ & 0x00000001) != 0),
    +                  ((bitField0_ & 0x00000008) != 0),
                       getParentForChildren(),
                       isClean());
               inputInfo_ = null;
    @@ -3402,13 +3332,13 @@ public org.tensorflow.proto.CostGraphDef.Node.InputInfo.Builder addInputInfoBuil
           private java.util.List outputInfo_ =
             java.util.Collections.emptyList();
           private void ensureOutputInfoIsMutable() {
    -        if (!((bitField0_ & 0x00000002) != 0)) {
    +        if (!((bitField0_ & 0x00000010) != 0)) {
               outputInfo_ = new java.util.ArrayList(outputInfo_);
    -          bitField0_ |= 0x00000002;
    +          bitField0_ |= 0x00000010;
              }
           }
     
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.CostGraphDef.Node.OutputInfo, org.tensorflow.proto.CostGraphDef.Node.OutputInfo.Builder, org.tensorflow.proto.CostGraphDef.Node.OutputInfoOrBuilder> outputInfoBuilder_;
     
           /**
    @@ -3554,7 +3484,7 @@ public Builder addAllOutputInfo(
           public Builder clearOutputInfo() {
             if (outputInfoBuilder_ == null) {
               outputInfo_ = java.util.Collections.emptyList();
    -          bitField0_ = (bitField0_ & ~0x00000002);
    +          bitField0_ = (bitField0_ & ~0x00000010);
               onChanged();
             } else {
               outputInfoBuilder_.clear();
    @@ -3624,14 +3554,14 @@ public org.tensorflow.proto.CostGraphDef.Node.OutputInfo.Builder addOutputInfoBu
                getOutputInfoBuilderList() {
             return getOutputInfoFieldBuilder().getBuilderList();
           }
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.CostGraphDef.Node.OutputInfo, org.tensorflow.proto.CostGraphDef.Node.OutputInfo.Builder, org.tensorflow.proto.CostGraphDef.Node.OutputInfoOrBuilder> 
               getOutputInfoFieldBuilder() {
             if (outputInfoBuilder_ == null) {
    -          outputInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +          outputInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                   org.tensorflow.proto.CostGraphDef.Node.OutputInfo, org.tensorflow.proto.CostGraphDef.Node.OutputInfo.Builder, org.tensorflow.proto.CostGraphDef.Node.OutputInfoOrBuilder>(
                       outputInfo_,
    -                  ((bitField0_ & 0x00000002) != 0),
    +                  ((bitField0_ & 0x00000010) != 0),
                       getParentForChildren(),
                       isClean());
               outputInfo_ = null;
    @@ -3662,8 +3592,9 @@ public long getTemporaryMemorySize() {
            * @return This builder for chaining.
            */
           public Builder setTemporaryMemorySize(long value) {
    -        
    +
             temporaryMemorySize_ = value;
    +        bitField0_ |= 0x00000020;
             onChanged();
             return this;
           }
    @@ -3676,7 +3607,7 @@ public Builder setTemporaryMemorySize(long value) {
            * @return This builder for chaining.
            */
           public Builder clearTemporaryMemorySize() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000020);
             temporaryMemorySize_ = 0L;
             onChanged();
             return this;
    @@ -3705,8 +3636,9 @@ public long getPersistentMemorySize() {
            * @return This builder for chaining.
            */
           public Builder setPersistentMemorySize(long value) {
    -        
    +
             persistentMemorySize_ = value;
    +        bitField0_ |= 0x00000040;
             onChanged();
             return this;
           }
    @@ -3719,7 +3651,7 @@ public Builder setPersistentMemorySize(long value) {
            * @return This builder for chaining.
            */
           public Builder clearPersistentMemorySize() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000040);
             persistentMemorySize_ = 0L;
             onChanged();
             return this;
    @@ -3744,8 +3676,9 @@ public Builder clearPersistentMemorySize() {
            * @return This builder for chaining.
            */
           @java.lang.Deprecated public Builder setHostTempMemorySize(long value) {
    -        
    +
             hostTempMemorySize_ = value;
    +        bitField0_ |= 0x00000080;
             onChanged();
             return this;
           }
    @@ -3756,7 +3689,7 @@ public Builder clearPersistentMemorySize() {
            * @return This builder for chaining.
            */
           @java.lang.Deprecated public Builder clearHostTempMemorySize() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000080);
             hostTempMemorySize_ = 0L;
             onChanged();
             return this;
    @@ -3781,8 +3714,9 @@ public Builder clearPersistentMemorySize() {
            * @return This builder for chaining.
            */
           @java.lang.Deprecated public Builder setDeviceTempMemorySize(long value) {
    -        
    +
             deviceTempMemorySize_ = value;
    +        bitField0_ |= 0x00000100;
             onChanged();
             return this;
           }
    @@ -3793,7 +3727,7 @@ public Builder clearPersistentMemorySize() {
            * @return This builder for chaining.
            */
           @java.lang.Deprecated public Builder clearDeviceTempMemorySize() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000100);
             deviceTempMemorySize_ = 0L;
             onChanged();
             return this;
    @@ -3818,8 +3752,9 @@ public Builder clearPersistentMemorySize() {
            * @return This builder for chaining.
            */
           @java.lang.Deprecated public Builder setDevicePersistentMemorySize(long value) {
    -        
    +
             devicePersistentMemorySize_ = value;
    +        bitField0_ |= 0x00000200;
             onChanged();
             return this;
           }
    @@ -3830,7 +3765,7 @@ public Builder clearPersistentMemorySize() {
            * @return This builder for chaining.
            */
           @java.lang.Deprecated public Builder clearDevicePersistentMemorySize() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000200);
             devicePersistentMemorySize_ = 0L;
             onChanged();
             return this;
    @@ -3859,8 +3794,9 @@ public long getComputeCost() {
            * @return This builder for chaining.
            */
           public Builder setComputeCost(long value) {
    -        
    +
             computeCost_ = value;
    +        bitField0_ |= 0x00000400;
             onChanged();
             return this;
           }
    @@ -3873,7 +3809,7 @@ public Builder setComputeCost(long value) {
            * @return This builder for chaining.
            */
           public Builder clearComputeCost() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000400);
             computeCost_ = 0L;
             onChanged();
             return this;
    @@ -3904,8 +3840,9 @@ public long getComputeTime() {
            * @return This builder for chaining.
            */
           public Builder setComputeTime(long value) {
    -        
    +
             computeTime_ = value;
    +        bitField0_ |= 0x00000800;
             onChanged();
             return this;
           }
    @@ -3919,7 +3856,7 @@ public Builder setComputeTime(long value) {
            * @return This builder for chaining.
            */
           public Builder clearComputeTime() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000800);
             computeTime_ = 0L;
             onChanged();
             return this;
    @@ -3950,8 +3887,9 @@ public long getMemoryTime() {
            * @return This builder for chaining.
            */
           public Builder setMemoryTime(long value) {
    -        
    +
             memoryTime_ = value;
    +        bitField0_ |= 0x00001000;
             onChanged();
             return this;
           }
    @@ -3965,7 +3903,7 @@ public Builder setMemoryTime(long value) {
            * @return This builder for chaining.
            */
           public Builder clearMemoryTime() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00001000);
             memoryTime_ = 0L;
             onChanged();
             return this;
    @@ -3996,8 +3934,9 @@ public boolean getIsFinal() {
            * @return This builder for chaining.
            */
           public Builder setIsFinal(boolean value) {
    -        
    +
             isFinal_ = value;
    +        bitField0_ |= 0x00002000;
             onChanged();
             return this;
           }
    @@ -4011,7 +3950,7 @@ public Builder setIsFinal(boolean value) {
            * @return This builder for chaining.
            */
           public Builder clearIsFinal() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00002000);
             isFinal_ = false;
             onChanged();
             return this;
    @@ -4019,10 +3958,10 @@ public Builder clearIsFinal() {
     
           private com.google.protobuf.Internal.IntList controlInput_ = emptyIntList();
           private void ensureControlInputIsMutable() {
    -        if (!((bitField0_ & 0x00000004) != 0)) {
    -          controlInput_ = mutableCopy(controlInput_);
    -          bitField0_ |= 0x00000004;
    -         }
    +        if (!controlInput_.isModifiable()) {
    +          controlInput_ = makeMutableCopy(controlInput_);
    +        }
    +        bitField0_ |= 0x00004000;
           }
           /**
            * 
    @@ -4034,8 +3973,8 @@ private void ensureControlInputIsMutable() {
            */
           public java.util.List
               getControlInputList() {
    -        return ((bitField0_ & 0x00000004) != 0) ?
    -                 java.util.Collections.unmodifiableList(controlInput_) : controlInput_;
    +        controlInput_.makeImmutable();
    +        return controlInput_;
           }
           /**
            * 
    @@ -4072,8 +4011,10 @@ public int getControlInput(int index) {
            */
           public Builder setControlInput(
               int index, int value) {
    +
             ensureControlInputIsMutable();
             controlInput_.setInt(index, value);
    +        bitField0_ |= 0x00004000;
             onChanged();
             return this;
           }
    @@ -4087,8 +4028,10 @@ public Builder setControlInput(
            * @return This builder for chaining.
            */
           public Builder addControlInput(int value) {
    +
             ensureControlInputIsMutable();
             controlInput_.addInt(value);
    +        bitField0_ |= 0x00004000;
             onChanged();
             return this;
           }
    @@ -4106,6 +4049,7 @@ public Builder addAllControlInput(
             ensureControlInputIsMutable();
             com.google.protobuf.AbstractMessageLite.Builder.addAll(
                 values, controlInput_);
    +        bitField0_ |= 0x00004000;
             onChanged();
             return this;
           }
    @@ -4119,7 +4063,7 @@ public Builder addAllControlInput(
            */
           public Builder clearControlInput() {
             controlInput_ = emptyIntList();
    -        bitField0_ = (bitField0_ & ~0x00000004);
    +        bitField0_ = (bitField0_ & ~0x00004000);
             onChanged();
             return this;
           }
    @@ -4147,8 +4091,9 @@ public boolean getInaccurate() {
            * @return This builder for chaining.
            */
           public Builder setInaccurate(boolean value) {
    -        
    +
             inaccurate_ = value;
    +        bitField0_ |= 0x00008000;
             onChanged();
             return this;
           }
    @@ -4161,23 +4106,11 @@ public Builder setInaccurate(boolean value) {
            * @return This builder for chaining.
            */
           public Builder clearInaccurate() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00008000);
             inaccurate_ = false;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.CostGraphDef.Node)
         }
    @@ -4272,37 +4205,34 @@ public interface AggregatedCostOrBuilder extends
        * Protobuf type {@code tensorflow.CostGraphDef.AggregatedCost}
        */
       public static final class AggregatedCost extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.CostGraphDef.AggregatedCost)
           AggregatedCostOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        AggregatedCost.class.getName());
    +    }
         // Use AggregatedCost.newBuilder() to construct.
    -    private AggregatedCost(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private AggregatedCost(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private AggregatedCost() {
           dimension_ = "";
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new AggregatedCost();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.CostGraphProtos.internal_static_tensorflow_CostGraphDef_AggregatedCost_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.CostGraphProtos.internal_static_tensorflow_CostGraphDef_AggregatedCost_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -4310,7 +4240,7 @@ protected java.lang.Object newInstance(
         }
     
         public static final int COST_FIELD_NUMBER = 1;
    -    private float cost_;
    +    private float cost_ = 0F;
         /**
          * 
          * Aggregated cost value.
    @@ -4325,7 +4255,8 @@ public float getCost() {
         }
     
         public static final int DIMENSION_FIELD_NUMBER = 2;
    -    private volatile java.lang.Object dimension_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object dimension_ = "";
         /**
          * 
          * Aggregated cost dimension (e.g. 'memory', 'compute', 'network').
    @@ -4387,8 +4318,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           if (java.lang.Float.floatToRawIntBits(cost_) != 0) {
             output.writeFloat(1, cost_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dimension_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dimension_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dimension_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 2, dimension_);
           }
           getUnknownFields().writeTo(output);
         }
    @@ -4403,8 +4334,8 @@ public int getSerializedSize() {
             size += com.google.protobuf.CodedOutputStream
               .computeFloatSize(1, cost_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dimension_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, dimension_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dimension_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, dimension_);
           }
           size += getUnknownFields().getSerializedSize();
           memoizedSize = size;
    @@ -4481,39 +4412,41 @@ public static org.tensorflow.proto.CostGraphDef.AggregatedCost parseFrom(
         }
         public static org.tensorflow.proto.CostGraphDef.AggregatedCost parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.CostGraphDef.AggregatedCost parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.CostGraphDef.AggregatedCost parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.CostGraphDef.AggregatedCost parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.CostGraphDef.AggregatedCost parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.CostGraphDef.AggregatedCost parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -4533,7 +4466,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -4545,7 +4478,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.CostGraphDef.AggregatedCost}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.CostGraphDef.AggregatedCost)
             org.tensorflow.proto.CostGraphDef.AggregatedCostOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -4554,7 +4487,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.CostGraphProtos.internal_static_tensorflow_CostGraphDef_AggregatedCost_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -4567,17 +4500,16 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             cost_ = 0F;
    -
             dimension_ = "";
    -
             return this;
           }
     
    @@ -4604,44 +4536,21 @@ public org.tensorflow.proto.CostGraphDef.AggregatedCost build() {
           @java.lang.Override
           public org.tensorflow.proto.CostGraphDef.AggregatedCost buildPartial() {
             org.tensorflow.proto.CostGraphDef.AggregatedCost result = new org.tensorflow.proto.CostGraphDef.AggregatedCost(this);
    -        result.cost_ = cost_;
    -        result.dimension_ = dimension_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.CostGraphDef.AggregatedCost result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.cost_ = cost_;
    +        }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.dimension_ = dimension_;
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.CostGraphDef.AggregatedCost) {
    @@ -4659,6 +4568,7 @@ public Builder mergeFrom(org.tensorflow.proto.CostGraphDef.AggregatedCost other)
             }
             if (!other.getDimension().isEmpty()) {
               dimension_ = other.dimension_;
    +          bitField0_ |= 0x00000002;
               onChanged();
             }
             this.mergeUnknownFields(other.getUnknownFields());
    @@ -4689,12 +4599,12 @@ public Builder mergeFrom(
                     break;
                   case 13: {
                     cost_ = input.readFloat();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 13
                   case 18: {
                     dimension_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 18
                   default: {
    @@ -4712,6 +4622,7 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    +      private int bitField0_;
     
           private float cost_ ;
           /**
    @@ -4736,8 +4647,9 @@ public float getCost() {
            * @return This builder for chaining.
            */
           public Builder setCost(float value) {
    -        
    +
             cost_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -4750,7 +4662,7 @@ public Builder setCost(float value) {
            * @return This builder for chaining.
            */
           public Builder clearCost() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000001);
             cost_ = 0F;
             onChanged();
             return this;
    @@ -4809,11 +4721,9 @@ public java.lang.String getDimension() {
            */
           public Builder setDimension(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             dimension_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -4826,8 +4736,8 @@ public Builder setDimension(
            * @return This builder for chaining.
            */
           public Builder clearDimension() {
    -        
             dimension_ = getDefaultInstance().getDimension();
    +        bitField0_ = (bitField0_ & ~0x00000002);
             onChanged();
             return this;
           }
    @@ -4842,27 +4752,13 @@ public Builder clearDimension() {
            */
           public Builder setDimensionBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             dimension_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.CostGraphDef.AggregatedCost)
         }
    @@ -4916,6 +4812,7 @@ public org.tensorflow.proto.CostGraphDef.AggregatedCost getDefaultInstanceForTyp
       }
     
       public static final int NODE_FIELD_NUMBER = 1;
    +  @SuppressWarnings("serial")
       private java.util.List node_;
       /**
        * repeated .tensorflow.CostGraphDef.Node node = 1;
    @@ -4956,6 +4853,7 @@ public org.tensorflow.proto.CostGraphDef.NodeOrBuilder getNodeOrBuilder(
       }
     
       public static final int COST_FIELD_NUMBER = 2;
    +  @SuppressWarnings("serial")
       private java.util.List cost_;
       /**
        * repeated .tensorflow.CostGraphDef.AggregatedCost cost = 2;
    @@ -5109,39 +5007,41 @@ public static org.tensorflow.proto.CostGraphDef parseFrom(
       }
       public static org.tensorflow.proto.CostGraphDef parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.CostGraphDef parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.CostGraphDef parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.CostGraphDef parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.CostGraphDef parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.CostGraphDef parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -5161,7 +5061,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -5169,7 +5069,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.CostGraphDef}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.CostGraphDef)
           org.tensorflow.proto.CostGraphDefOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -5178,7 +5078,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.CostGraphProtos.internal_static_tensorflow_CostGraphDef_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -5191,13 +5091,14 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           if (nodeBuilder_ == null) {
             node_ = java.util.Collections.emptyList();
           } else {
    @@ -5238,7 +5139,13 @@ public org.tensorflow.proto.CostGraphDef build() {
         @java.lang.Override
         public org.tensorflow.proto.CostGraphDef buildPartial() {
           org.tensorflow.proto.CostGraphDef result = new org.tensorflow.proto.CostGraphDef(this);
    -      int from_bitField0_ = bitField0_;
    +      buildPartialRepeatedFields(result);
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartialRepeatedFields(org.tensorflow.proto.CostGraphDef result) {
           if (nodeBuilder_ == null) {
             if (((bitField0_ & 0x00000001) != 0)) {
               node_ = java.util.Collections.unmodifiableList(node_);
    @@ -5257,42 +5164,12 @@ public org.tensorflow.proto.CostGraphDef buildPartial() {
           } else {
             result.cost_ = costBuilder_.build();
           }
    -      onBuilt();
    -      return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.CostGraphDef result) {
    +      int from_bitField0_ = bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.CostGraphDef) {
    @@ -5324,7 +5201,7 @@ public Builder mergeFrom(org.tensorflow.proto.CostGraphDef other) {
                 node_ = other.node_;
                 bitField0_ = (bitField0_ & ~0x00000001);
                 nodeBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getNodeFieldBuilder() : null;
               } else {
                 nodeBuilder_.addAllMessages(other.node_);
    @@ -5350,7 +5227,7 @@ public Builder mergeFrom(org.tensorflow.proto.CostGraphDef other) {
                 cost_ = other.cost_;
                 bitField0_ = (bitField0_ & ~0x00000002);
                 costBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getCostFieldBuilder() : null;
               } else {
                 costBuilder_.addAllMessages(other.cost_);
    @@ -5435,7 +5312,7 @@ private void ensureNodeIsMutable() {
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.CostGraphDef.Node, org.tensorflow.proto.CostGraphDef.Node.Builder, org.tensorflow.proto.CostGraphDef.NodeOrBuilder> nodeBuilder_;
     
         /**
    @@ -5651,11 +5528,11 @@ public org.tensorflow.proto.CostGraphDef.Node.Builder addNodeBuilder(
              getNodeBuilderList() {
           return getNodeFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.CostGraphDef.Node, org.tensorflow.proto.CostGraphDef.Node.Builder, org.tensorflow.proto.CostGraphDef.NodeOrBuilder> 
             getNodeFieldBuilder() {
           if (nodeBuilder_ == null) {
    -        nodeBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        nodeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.CostGraphDef.Node, org.tensorflow.proto.CostGraphDef.Node.Builder, org.tensorflow.proto.CostGraphDef.NodeOrBuilder>(
                     node_,
                     ((bitField0_ & 0x00000001) != 0),
    @@ -5675,7 +5552,7 @@ private void ensureCostIsMutable() {
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.CostGraphDef.AggregatedCost, org.tensorflow.proto.CostGraphDef.AggregatedCost.Builder, org.tensorflow.proto.CostGraphDef.AggregatedCostOrBuilder> costBuilder_;
     
         /**
    @@ -5891,11 +5768,11 @@ public org.tensorflow.proto.CostGraphDef.AggregatedCost.Builder addCostBuilder(
              getCostBuilderList() {
           return getCostFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.CostGraphDef.AggregatedCost, org.tensorflow.proto.CostGraphDef.AggregatedCost.Builder, org.tensorflow.proto.CostGraphDef.AggregatedCostOrBuilder> 
             getCostFieldBuilder() {
           if (costBuilder_ == null) {
    -        costBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        costBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.CostGraphDef.AggregatedCost, org.tensorflow.proto.CostGraphDef.AggregatedCost.Builder, org.tensorflow.proto.CostGraphDef.AggregatedCostOrBuilder>(
                     cost_,
                     ((bitField0_ & 0x00000002) != 0),
    @@ -5905,18 +5782,6 @@ public org.tensorflow.proto.CostGraphDef.AggregatedCost.Builder addCostBuilder(
           }
           return costBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.CostGraphDef)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CostGraphDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CostGraphDefOrBuilder.java
    index cbb8c3fdd3f..ad2f98d6283 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CostGraphDefOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CostGraphDefOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/cost_graph.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CostGraphProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CostGraphProtos.java
    index 917ad9e0f2a..b99348c8a2e 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CostGraphProtos.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CostGraphProtos.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/cost_graph.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class CostGraphProtos {
       private CostGraphProtos() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      CostGraphProtos.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,27 +28,27 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_CostGraphDef_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_CostGraphDef_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_CostGraphDef_Node_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_CostGraphDef_Node_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_CostGraphDef_Node_InputInfo_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_CostGraphDef_Node_InputInfo_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_CostGraphDef_Node_OutputInfo_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_CostGraphDef_Node_OutputInfo_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_CostGraphDef_AggregatedCost_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_CostGraphDef_AggregatedCost_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -87,33 +98,34 @@ public static void registerAllExtensions(
         internal_static_tensorflow_CostGraphDef_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_CostGraphDef_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_CostGraphDef_descriptor,
             new java.lang.String[] { "Node", "Cost", });
         internal_static_tensorflow_CostGraphDef_Node_descriptor =
           internal_static_tensorflow_CostGraphDef_descriptor.getNestedTypes().get(0);
         internal_static_tensorflow_CostGraphDef_Node_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_CostGraphDef_Node_descriptor,
             new java.lang.String[] { "Name", "Device", "Id", "InputInfo", "OutputInfo", "TemporaryMemorySize", "PersistentMemorySize", "HostTempMemorySize", "DeviceTempMemorySize", "DevicePersistentMemorySize", "ComputeCost", "ComputeTime", "MemoryTime", "IsFinal", "ControlInput", "Inaccurate", });
         internal_static_tensorflow_CostGraphDef_Node_InputInfo_descriptor =
           internal_static_tensorflow_CostGraphDef_Node_descriptor.getNestedTypes().get(0);
         internal_static_tensorflow_CostGraphDef_Node_InputInfo_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_CostGraphDef_Node_InputInfo_descriptor,
             new java.lang.String[] { "PrecedingNode", "PrecedingPort", });
         internal_static_tensorflow_CostGraphDef_Node_OutputInfo_descriptor =
           internal_static_tensorflow_CostGraphDef_Node_descriptor.getNestedTypes().get(1);
         internal_static_tensorflow_CostGraphDef_Node_OutputInfo_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_CostGraphDef_Node_OutputInfo_descriptor,
             new java.lang.String[] { "Size", "AliasInputPort", "Shape", "Dtype", });
         internal_static_tensorflow_CostGraphDef_AggregatedCost_descriptor =
           internal_static_tensorflow_CostGraphDef_descriptor.getNestedTypes().get(1);
         internal_static_tensorflow_CostGraphDef_AggregatedCost_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_CostGraphDef_AggregatedCost_descriptor,
             new java.lang.String[] { "Cost", "Dimension", });
    +    descriptor.resolveAllFeaturesImmutable();
         org.tensorflow.proto.TensorShapeProtos.getDescriptor();
         org.tensorflow.proto.TypesProtos.getDescriptor();
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DataClass.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DataClass.java
    index 206e3647457..829ae281b70 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DataClass.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DataClass.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/summary.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -49,6 +51,15 @@ public enum DataClass
       UNRECOGNIZED(-1),
       ;
     
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      DataClass.class.getName());
    +  }
       /**
        * 
        * Unknown data class, used (implicitly) for legacy data. Will not be
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DataType.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DataType.java
    index b6148e7c600..efc05c83db4 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DataType.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DataType.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/types.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -174,12 +176,28 @@ public enum DataType
       /**
        * 
        * 2 NaNs (0bS1111111).
    -   * TODO - b/299182407: Leaving room for remaining float8 types.
    -   * DT_FLOAT8_E4M3FNUZ = 26;
    -   * DT_FLOAT8_E4M3B11FNUZ = 27;
    -   * DT_FLOAT8_E5M2FNUZ = 28;
        * 
    * + * DT_FLOAT8_E4M3FNUZ = 26; + */ + DT_FLOAT8_E4M3FNUZ(26), + /** + *
    +   * with NaN.
    +   * 
    + * + * DT_FLOAT8_E4M3B11FNUZ = 27; + */ + DT_FLOAT8_E4M3B11FNUZ(27), + /** + *
    +   * bias, finite-only, with NaNs.
    +   * 
    + * + * DT_FLOAT8_E5M2FNUZ = 28; + */ + DT_FLOAT8_E5M2FNUZ(28), + /** * DT_INT4 = 29; */ DT_INT4(29), @@ -187,6 +205,14 @@ public enum DataType * DT_UINT4 = 30; */ DT_UINT4(30), + /** + * DT_INT2 = 31; + */ + DT_INT2(31), + /** + * DT_UINT2 = 32; + */ + DT_UINT2(32), /** *
        * Do not use!  These are only for TF1's obsolete reference Variables.
    @@ -294,13 +320,18 @@ public enum DataType
        */
       DT_FLOAT8_E4M3FN_REF(125),
       /**
    -   * 
    -   * TODO - b/299182407: Leaving room for remaining float8 types.
    -   * DT_FLOAT8_E4M3FNUZ_REF = 126;
    -   * DT_FLOAT8_E4M3B11FNUZ_REF = 127;
    -   * DT_FLOAT8_E5M2FNUZ_REF = 128;
    -   * 
    - * + * DT_FLOAT8_E4M3FNUZ_REF = 126; + */ + DT_FLOAT8_E4M3FNUZ_REF(126), + /** + * DT_FLOAT8_E4M3B11FNUZ_REF = 127; + */ + DT_FLOAT8_E4M3B11FNUZ_REF(127), + /** + * DT_FLOAT8_E5M2FNUZ_REF = 128; + */ + DT_FLOAT8_E5M2FNUZ_REF(128), + /** * DT_INT4_REF = 129; */ DT_INT4_REF(129), @@ -308,9 +339,26 @@ public enum DataType * DT_UINT4_REF = 130; */ DT_UINT4_REF(130), + /** + * DT_INT2_REF = 131; + */ + DT_INT2_REF(131), + /** + * DT_UINT2_REF = 132; + */ + DT_UINT2_REF(132), UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + DataType.class.getName()); + } /** *
        * Not a legal value for DataType.  Used to indicate a DataType field
    @@ -472,12 +520,28 @@ public enum DataType
       /**
        * 
        * 2 NaNs (0bS1111111).
    -   * TODO - b/299182407: Leaving room for remaining float8 types.
    -   * DT_FLOAT8_E4M3FNUZ = 26;
    -   * DT_FLOAT8_E4M3B11FNUZ = 27;
    -   * DT_FLOAT8_E5M2FNUZ = 28;
        * 
    * + * DT_FLOAT8_E4M3FNUZ = 26; + */ + public static final int DT_FLOAT8_E4M3FNUZ_VALUE = 26; + /** + *
    +   * with NaN.
    +   * 
    + * + * DT_FLOAT8_E4M3B11FNUZ = 27; + */ + public static final int DT_FLOAT8_E4M3B11FNUZ_VALUE = 27; + /** + *
    +   * bias, finite-only, with NaNs.
    +   * 
    + * + * DT_FLOAT8_E5M2FNUZ = 28; + */ + public static final int DT_FLOAT8_E5M2FNUZ_VALUE = 28; + /** * DT_INT4 = 29; */ public static final int DT_INT4_VALUE = 29; @@ -485,6 +549,14 @@ public enum DataType * DT_UINT4 = 30; */ public static final int DT_UINT4_VALUE = 30; + /** + * DT_INT2 = 31; + */ + public static final int DT_INT2_VALUE = 31; + /** + * DT_UINT2 = 32; + */ + public static final int DT_UINT2_VALUE = 32; /** *
        * Do not use!  These are only for TF1's obsolete reference Variables.
    @@ -592,13 +664,18 @@ public enum DataType
        */
       public static final int DT_FLOAT8_E4M3FN_REF_VALUE = 125;
       /**
    -   * 
    -   * TODO - b/299182407: Leaving room for remaining float8 types.
    -   * DT_FLOAT8_E4M3FNUZ_REF = 126;
    -   * DT_FLOAT8_E4M3B11FNUZ_REF = 127;
    -   * DT_FLOAT8_E5M2FNUZ_REF = 128;
    -   * 
    - * + * DT_FLOAT8_E4M3FNUZ_REF = 126; + */ + public static final int DT_FLOAT8_E4M3FNUZ_REF_VALUE = 126; + /** + * DT_FLOAT8_E4M3B11FNUZ_REF = 127; + */ + public static final int DT_FLOAT8_E4M3B11FNUZ_REF_VALUE = 127; + /** + * DT_FLOAT8_E5M2FNUZ_REF = 128; + */ + public static final int DT_FLOAT8_E5M2FNUZ_REF_VALUE = 128; + /** * DT_INT4_REF = 129; */ public static final int DT_INT4_REF_VALUE = 129; @@ -606,6 +683,14 @@ public enum DataType * DT_UINT4_REF = 130; */ public static final int DT_UINT4_REF_VALUE = 130; + /** + * DT_INT2_REF = 131; + */ + public static final int DT_INT2_REF_VALUE = 131; + /** + * DT_UINT2_REF = 132; + */ + public static final int DT_UINT2_REF_VALUE = 132; public final int getNumber() { @@ -658,8 +743,13 @@ public static DataType forNumber(int value) { case 23: return DT_UINT64; case 24: return DT_FLOAT8_E5M2; case 25: return DT_FLOAT8_E4M3FN; + case 26: return DT_FLOAT8_E4M3FNUZ; + case 27: return DT_FLOAT8_E4M3B11FNUZ; + case 28: return DT_FLOAT8_E5M2FNUZ; case 29: return DT_INT4; case 30: return DT_UINT4; + case 31: return DT_INT2; + case 32: return DT_UINT2; case 101: return DT_FLOAT_REF; case 102: return DT_DOUBLE_REF; case 103: return DT_INT32_REF; @@ -685,8 +775,13 @@ public static DataType forNumber(int value) { case 123: return DT_UINT64_REF; case 124: return DT_FLOAT8_E5M2_REF; case 125: return DT_FLOAT8_E4M3FN_REF; + case 126: return DT_FLOAT8_E4M3FNUZ_REF; + case 127: return DT_FLOAT8_E4M3B11FNUZ_REF; + case 128: return DT_FLOAT8_E5M2FNUZ_REF; case 129: return DT_INT4_REF; case 130: return DT_UINT4_REF; + case 131: return DT_INT2_REF; + case 132: return DT_UINT2_REF; default: return null; } } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugEvent.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugEvent.java index 3abf7ccad39..8b27fc51240 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugEvent.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugEvent.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/protobuf/debug_event.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -11,36 +13,33 @@ * Protobuf type {@code tensorflow.DebugEvent} */ public final class DebugEvent extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.DebugEvent) DebugEventOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + DebugEvent.class.getName()); + } // Use DebugEvent.newBuilder() to construct. - private DebugEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DebugEvent(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private DebugEvent() { } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DebugEvent(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.DebugEventProtos.internal_static_tensorflow_DebugEvent_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.DebugEventProtos.internal_static_tensorflow_DebugEvent_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -48,6 +47,7 @@ protected java.lang.Object newInstance( } private int whatCase_ = 0; + @SuppressWarnings("serial") private java.lang.Object what_; public enum WhatCase implements com.google.protobuf.Internal.EnumLite, @@ -103,7 +103,7 @@ public int getNumber() { } public static final int WALL_TIME_FIELD_NUMBER = 1; - private double wallTime_; + private double wallTime_ = 0D; /** *
        * Timestamp in seconds (with microsecond precision).
    @@ -118,7 +118,7 @@ public double getWallTime() {
       }
     
       public static final int STEP_FIELD_NUMBER = 2;
    -  private long step_;
    +  private long step_ = 0L;
       /**
        * 
        * Step of training (if available).
    @@ -594,7 +594,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           output.writeMessage(10, (org.tensorflow.proto.GraphExecutionTrace) what_);
         }
         if (whatCase_ == 11) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 11, what_);
    +      com.google.protobuf.GeneratedMessage.writeString(output, 11, what_);
         }
         if (whatCase_ == 12) {
           output.writeMessage(12, (org.tensorflow.proto.DebuggedDevice) what_);
    @@ -645,7 +645,7 @@ public int getSerializedSize() {
             .computeMessageSize(10, (org.tensorflow.proto.GraphExecutionTrace) what_);
         }
         if (whatCase_ == 11) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, what_);
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(11, what_);
         }
         if (whatCase_ == 12) {
           size += com.google.protobuf.CodedOutputStream
    @@ -808,39 +808,41 @@ public static org.tensorflow.proto.DebugEvent parseFrom(
       }
       public static org.tensorflow.proto.DebugEvent parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.DebugEvent parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.DebugEvent parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.DebugEvent parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.DebugEvent parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.DebugEvent parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -860,7 +862,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -872,7 +874,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.DebugEvent}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.DebugEvent)
           org.tensorflow.proto.DebugEventOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -881,7 +883,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.DebugEventProtos.internal_static_tensorflow_DebugEvent_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -894,17 +896,16 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           wallTime_ = 0D;
    -
           step_ = 0L;
    -
           if (debugMetadataBuilder_ != null) {
             debugMetadataBuilder_.clear();
           }
    @@ -957,104 +958,59 @@ public org.tensorflow.proto.DebugEvent build() {
         @java.lang.Override
         public org.tensorflow.proto.DebugEvent buildPartial() {
           org.tensorflow.proto.DebugEvent result = new org.tensorflow.proto.DebugEvent(this);
    -      result.wallTime_ = wallTime_;
    -      result.step_ = step_;
    -      if (whatCase_ == 3) {
    -        if (debugMetadataBuilder_ == null) {
    -          result.what_ = what_;
    -        } else {
    -          result.what_ = debugMetadataBuilder_.build();
    -        }
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      buildPartialOneofs(result);
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartial0(org.tensorflow.proto.DebugEvent result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.wallTime_ = wallTime_;
           }
    -      if (whatCase_ == 4) {
    -        if (sourceFileBuilder_ == null) {
    -          result.what_ = what_;
    -        } else {
    -          result.what_ = sourceFileBuilder_.build();
    -        }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.step_ = step_;
           }
    -      if (whatCase_ == 6) {
    -        if (stackFrameWithIdBuilder_ == null) {
    -          result.what_ = what_;
    -        } else {
    -          result.what_ = stackFrameWithIdBuilder_.build();
    -        }
    +    }
    +
    +    private void buildPartialOneofs(org.tensorflow.proto.DebugEvent result) {
    +      result.whatCase_ = whatCase_;
    +      result.what_ = this.what_;
    +      if (whatCase_ == 3 &&
    +          debugMetadataBuilder_ != null) {
    +        result.what_ = debugMetadataBuilder_.build();
           }
    -      if (whatCase_ == 7) {
    -        if (graphOpCreationBuilder_ == null) {
    -          result.what_ = what_;
    -        } else {
    -          result.what_ = graphOpCreationBuilder_.build();
    -        }
    +      if (whatCase_ == 4 &&
    +          sourceFileBuilder_ != null) {
    +        result.what_ = sourceFileBuilder_.build();
           }
    -      if (whatCase_ == 8) {
    -        if (debuggedGraphBuilder_ == null) {
    -          result.what_ = what_;
    -        } else {
    -          result.what_ = debuggedGraphBuilder_.build();
    -        }
    +      if (whatCase_ == 6 &&
    +          stackFrameWithIdBuilder_ != null) {
    +        result.what_ = stackFrameWithIdBuilder_.build();
           }
    -      if (whatCase_ == 9) {
    -        if (executionBuilder_ == null) {
    -          result.what_ = what_;
    -        } else {
    -          result.what_ = executionBuilder_.build();
    -        }
    +      if (whatCase_ == 7 &&
    +          graphOpCreationBuilder_ != null) {
    +        result.what_ = graphOpCreationBuilder_.build();
           }
    -      if (whatCase_ == 10) {
    -        if (graphExecutionTraceBuilder_ == null) {
    -          result.what_ = what_;
    -        } else {
    -          result.what_ = graphExecutionTraceBuilder_.build();
    -        }
    +      if (whatCase_ == 8 &&
    +          debuggedGraphBuilder_ != null) {
    +        result.what_ = debuggedGraphBuilder_.build();
           }
    -      if (whatCase_ == 11) {
    -        result.what_ = what_;
    +      if (whatCase_ == 9 &&
    +          executionBuilder_ != null) {
    +        result.what_ = executionBuilder_.build();
           }
    -      if (whatCase_ == 12) {
    -        if (debuggedDeviceBuilder_ == null) {
    -          result.what_ = what_;
    -        } else {
    -          result.what_ = debuggedDeviceBuilder_.build();
    -        }
    +      if (whatCase_ == 10 &&
    +          graphExecutionTraceBuilder_ != null) {
    +        result.what_ = graphExecutionTraceBuilder_.build();
    +      }
    +      if (whatCase_ == 12 &&
    +          debuggedDeviceBuilder_ != null) {
    +        result.what_ = debuggedDeviceBuilder_.build();
           }
    -      result.whatCase_ = whatCase_;
    -      onBuilt();
    -      return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    -    }
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.DebugEvent) {
    @@ -1144,12 +1100,12 @@ public Builder mergeFrom(
                   break;
                 case 9: {
                   wallTime_ = input.readDouble();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 9
                 case 16: {
                   step_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 16
                 case 26: {
    @@ -1244,6 +1200,7 @@ public Builder clearWhat() {
           return this;
         }
     
    +    private int bitField0_;
     
         private double wallTime_ ;
         /**
    @@ -1268,8 +1225,9 @@ public double getWallTime() {
          * @return This builder for chaining.
          */
         public Builder setWallTime(double value) {
    -      
    +
           wallTime_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -1282,7 +1240,7 @@ public Builder setWallTime(double value) {
          * @return This builder for chaining.
          */
         public Builder clearWallTime() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000001);
           wallTime_ = 0D;
           onChanged();
           return this;
    @@ -1311,8 +1269,9 @@ public long getStep() {
          * @return This builder for chaining.
          */
         public Builder setStep(long value) {
    -      
    +
           step_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -1325,13 +1284,13 @@ public Builder setStep(long value) {
          * @return This builder for chaining.
          */
         public Builder clearStep() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000002);
           step_ = 0L;
           onChanged();
           return this;
         }
     
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.DebugMetadata, org.tensorflow.proto.DebugMetadata.Builder, org.tensorflow.proto.DebugMetadataOrBuilder> debugMetadataBuilder_;
         /**
          * 
    @@ -1490,14 +1449,14 @@ public org.tensorflow.proto.DebugMetadataOrBuilder getDebugMetadataOrBuilder() {
          *
          * .tensorflow.DebugMetadata debug_metadata = 3;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.DebugMetadata, org.tensorflow.proto.DebugMetadata.Builder, org.tensorflow.proto.DebugMetadataOrBuilder> 
             getDebugMetadataFieldBuilder() {
           if (debugMetadataBuilder_ == null) {
             if (!(whatCase_ == 3)) {
               what_ = org.tensorflow.proto.DebugMetadata.getDefaultInstance();
             }
    -        debugMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        debugMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.DebugMetadata, org.tensorflow.proto.DebugMetadata.Builder, org.tensorflow.proto.DebugMetadataOrBuilder>(
                     (org.tensorflow.proto.DebugMetadata) what_,
                     getParentForChildren(),
    @@ -1505,11 +1464,11 @@ public org.tensorflow.proto.DebugMetadataOrBuilder getDebugMetadataOrBuilder() {
             what_ = null;
           }
           whatCase_ = 3;
    -      onChanged();;
    +      onChanged();
           return debugMetadataBuilder_;
         }
     
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.SourceFile, org.tensorflow.proto.SourceFile.Builder, org.tensorflow.proto.SourceFileOrBuilder> sourceFileBuilder_;
         /**
          * 
    @@ -1668,14 +1627,14 @@ public org.tensorflow.proto.SourceFileOrBuilder getSourceFileOrBuilder() {
          *
          * .tensorflow.SourceFile source_file = 4;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.SourceFile, org.tensorflow.proto.SourceFile.Builder, org.tensorflow.proto.SourceFileOrBuilder> 
             getSourceFileFieldBuilder() {
           if (sourceFileBuilder_ == null) {
             if (!(whatCase_ == 4)) {
               what_ = org.tensorflow.proto.SourceFile.getDefaultInstance();
             }
    -        sourceFileBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        sourceFileBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.SourceFile, org.tensorflow.proto.SourceFile.Builder, org.tensorflow.proto.SourceFileOrBuilder>(
                     (org.tensorflow.proto.SourceFile) what_,
                     getParentForChildren(),
    @@ -1683,11 +1642,11 @@ public org.tensorflow.proto.SourceFileOrBuilder getSourceFileOrBuilder() {
             what_ = null;
           }
           whatCase_ = 4;
    -      onChanged();;
    +      onChanged();
           return sourceFileBuilder_;
         }
     
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.StackFrameWithId, org.tensorflow.proto.StackFrameWithId.Builder, org.tensorflow.proto.StackFrameWithIdOrBuilder> stackFrameWithIdBuilder_;
         /**
          * 
    @@ -1855,14 +1814,14 @@ public org.tensorflow.proto.StackFrameWithIdOrBuilder getStackFrameWithIdOrBuild
          *
          * .tensorflow.StackFrameWithId stack_frame_with_id = 6;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.StackFrameWithId, org.tensorflow.proto.StackFrameWithId.Builder, org.tensorflow.proto.StackFrameWithIdOrBuilder> 
             getStackFrameWithIdFieldBuilder() {
           if (stackFrameWithIdBuilder_ == null) {
             if (!(whatCase_ == 6)) {
               what_ = org.tensorflow.proto.StackFrameWithId.getDefaultInstance();
             }
    -        stackFrameWithIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        stackFrameWithIdBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.StackFrameWithId, org.tensorflow.proto.StackFrameWithId.Builder, org.tensorflow.proto.StackFrameWithIdOrBuilder>(
                     (org.tensorflow.proto.StackFrameWithId) what_,
                     getParentForChildren(),
    @@ -1870,11 +1829,11 @@ public org.tensorflow.proto.StackFrameWithIdOrBuilder getStackFrameWithIdOrBuild
             what_ = null;
           }
           whatCase_ = 6;
    -      onChanged();;
    +      onChanged();
           return stackFrameWithIdBuilder_;
         }
     
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.GraphOpCreation, org.tensorflow.proto.GraphOpCreation.Builder, org.tensorflow.proto.GraphOpCreationOrBuilder> graphOpCreationBuilder_;
         /**
          * 
    @@ -2042,14 +2001,14 @@ public org.tensorflow.proto.GraphOpCreationOrBuilder getGraphOpCreationOrBuilder
          *
          * .tensorflow.GraphOpCreation graph_op_creation = 7;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.GraphOpCreation, org.tensorflow.proto.GraphOpCreation.Builder, org.tensorflow.proto.GraphOpCreationOrBuilder> 
             getGraphOpCreationFieldBuilder() {
           if (graphOpCreationBuilder_ == null) {
             if (!(whatCase_ == 7)) {
               what_ = org.tensorflow.proto.GraphOpCreation.getDefaultInstance();
             }
    -        graphOpCreationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        graphOpCreationBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.GraphOpCreation, org.tensorflow.proto.GraphOpCreation.Builder, org.tensorflow.proto.GraphOpCreationOrBuilder>(
                     (org.tensorflow.proto.GraphOpCreation) what_,
                     getParentForChildren(),
    @@ -2057,11 +2016,11 @@ public org.tensorflow.proto.GraphOpCreationOrBuilder getGraphOpCreationOrBuilder
             what_ = null;
           }
           whatCase_ = 7;
    -      onChanged();;
    +      onChanged();
           return graphOpCreationBuilder_;
         }
     
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.DebuggedGraph, org.tensorflow.proto.DebuggedGraph.Builder, org.tensorflow.proto.DebuggedGraphOrBuilder> debuggedGraphBuilder_;
         /**
          * 
    @@ -2220,14 +2179,14 @@ public org.tensorflow.proto.DebuggedGraphOrBuilder getDebuggedGraphOrBuilder() {
          *
          * .tensorflow.DebuggedGraph debugged_graph = 8;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.DebuggedGraph, org.tensorflow.proto.DebuggedGraph.Builder, org.tensorflow.proto.DebuggedGraphOrBuilder> 
             getDebuggedGraphFieldBuilder() {
           if (debuggedGraphBuilder_ == null) {
             if (!(whatCase_ == 8)) {
               what_ = org.tensorflow.proto.DebuggedGraph.getDefaultInstance();
             }
    -        debuggedGraphBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        debuggedGraphBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.DebuggedGraph, org.tensorflow.proto.DebuggedGraph.Builder, org.tensorflow.proto.DebuggedGraphOrBuilder>(
                     (org.tensorflow.proto.DebuggedGraph) what_,
                     getParentForChildren(),
    @@ -2235,11 +2194,11 @@ public org.tensorflow.proto.DebuggedGraphOrBuilder getDebuggedGraphOrBuilder() {
             what_ = null;
           }
           whatCase_ = 8;
    -      onChanged();;
    +      onChanged();
           return debuggedGraphBuilder_;
         }
     
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.Execution, org.tensorflow.proto.Execution.Builder, org.tensorflow.proto.ExecutionOrBuilder> executionBuilder_;
         /**
          * 
    @@ -2398,14 +2357,14 @@ public org.tensorflow.proto.ExecutionOrBuilder getExecutionOrBuilder() {
          *
          * .tensorflow.Execution execution = 9;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.Execution, org.tensorflow.proto.Execution.Builder, org.tensorflow.proto.ExecutionOrBuilder> 
             getExecutionFieldBuilder() {
           if (executionBuilder_ == null) {
             if (!(whatCase_ == 9)) {
               what_ = org.tensorflow.proto.Execution.getDefaultInstance();
             }
    -        executionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        executionBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.Execution, org.tensorflow.proto.Execution.Builder, org.tensorflow.proto.ExecutionOrBuilder>(
                     (org.tensorflow.proto.Execution) what_,
                     getParentForChildren(),
    @@ -2413,11 +2372,11 @@ public org.tensorflow.proto.ExecutionOrBuilder getExecutionOrBuilder() {
             what_ = null;
           }
           whatCase_ = 9;
    -      onChanged();;
    +      onChanged();
           return executionBuilder_;
         }
     
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.GraphExecutionTrace, org.tensorflow.proto.GraphExecutionTrace.Builder, org.tensorflow.proto.GraphExecutionTraceOrBuilder> graphExecutionTraceBuilder_;
         /**
          * 
    @@ -2585,14 +2544,14 @@ public org.tensorflow.proto.GraphExecutionTraceOrBuilder getGraphExecutionTraceO
          *
          * .tensorflow.GraphExecutionTrace graph_execution_trace = 10;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.GraphExecutionTrace, org.tensorflow.proto.GraphExecutionTrace.Builder, org.tensorflow.proto.GraphExecutionTraceOrBuilder> 
             getGraphExecutionTraceFieldBuilder() {
           if (graphExecutionTraceBuilder_ == null) {
             if (!(whatCase_ == 10)) {
               what_ = org.tensorflow.proto.GraphExecutionTrace.getDefaultInstance();
             }
    -        graphExecutionTraceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        graphExecutionTraceBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.GraphExecutionTrace, org.tensorflow.proto.GraphExecutionTrace.Builder, org.tensorflow.proto.GraphExecutionTraceOrBuilder>(
                     (org.tensorflow.proto.GraphExecutionTrace) what_,
                     getParentForChildren(),
    @@ -2600,7 +2559,7 @@ public org.tensorflow.proto.GraphExecutionTraceOrBuilder getGraphExecutionTraceO
             what_ = null;
           }
           whatCase_ = 10;
    -      onChanged();;
    +      onChanged();
           return graphExecutionTraceBuilder_;
         }
     
    @@ -2684,10 +2643,8 @@ public java.lang.String getGraphId() {
          */
         public Builder setGraphId(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  whatCase_ = 11;
    +      if (value == null) { throw new NullPointerException(); }
    +      whatCase_ = 11;
           what_ = value;
           onChanged();
           return this;
    @@ -2721,17 +2678,15 @@ public Builder clearGraphId() {
          */
         public Builder setGraphIdBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           whatCase_ = 11;
           what_ = value;
           onChanged();
           return this;
         }
     
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.DebuggedDevice, org.tensorflow.proto.DebuggedDevice.Builder, org.tensorflow.proto.DebuggedDeviceOrBuilder> debuggedDeviceBuilder_;
         /**
          * 
    @@ -2890,14 +2845,14 @@ public org.tensorflow.proto.DebuggedDeviceOrBuilder getDebuggedDeviceOrBuilder()
          *
          * .tensorflow.DebuggedDevice debugged_device = 12;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.DebuggedDevice, org.tensorflow.proto.DebuggedDevice.Builder, org.tensorflow.proto.DebuggedDeviceOrBuilder> 
             getDebuggedDeviceFieldBuilder() {
           if (debuggedDeviceBuilder_ == null) {
             if (!(whatCase_ == 12)) {
               what_ = org.tensorflow.proto.DebuggedDevice.getDefaultInstance();
             }
    -        debuggedDeviceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        debuggedDeviceBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.DebuggedDevice, org.tensorflow.proto.DebuggedDevice.Builder, org.tensorflow.proto.DebuggedDeviceOrBuilder>(
                     (org.tensorflow.proto.DebuggedDevice) what_,
                     getParentForChildren(),
    @@ -2905,21 +2860,9 @@ public org.tensorflow.proto.DebuggedDeviceOrBuilder getDebuggedDeviceOrBuilder()
             what_ = null;
           }
           whatCase_ = 12;
    -      onChanged();;
    +      onChanged();
           return debuggedDeviceBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.DebugEvent)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugEventOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugEventOrBuilder.java
    index b50c80cb5bd..1b36f8a0ba4 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugEventOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugEventOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/debug_event.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -284,5 +286,5 @@ public interface DebugEventOrBuilder extends
        */
       org.tensorflow.proto.DebuggedDeviceOrBuilder getDebuggedDeviceOrBuilder();
     
    -  public org.tensorflow.proto.DebugEvent.WhatCase getWhatCase();
    +  org.tensorflow.proto.DebugEvent.WhatCase getWhatCase();
     }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugEventProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugEventProtos.java
    index 76475865cbd..1c92bcac9f3 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugEventProtos.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugEventProtos.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/debug_event.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class DebugEventProtos {
       private DebugEventProtos() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      DebugEventProtos.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,52 +28,52 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_DebugEvent_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_DebugEvent_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_DebugMetadata_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_DebugMetadata_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_SourceFile_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_SourceFile_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_StackFrameWithId_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_StackFrameWithId_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_CodeLocation_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_CodeLocation_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_GraphOpCreation_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_GraphOpCreation_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_DebuggedGraph_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_DebuggedGraph_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_DebuggedDevice_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_DebuggedDevice_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_Execution_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_Execution_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_GraphExecutionTrace_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_GraphExecutionTrace_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -140,63 +151,64 @@ public static void registerAllExtensions(
         internal_static_tensorflow_DebugEvent_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_DebugEvent_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_DebugEvent_descriptor,
             new java.lang.String[] { "WallTime", "Step", "DebugMetadata", "SourceFile", "StackFrameWithId", "GraphOpCreation", "DebuggedGraph", "Execution", "GraphExecutionTrace", "GraphId", "DebuggedDevice", "What", });
         internal_static_tensorflow_DebugMetadata_descriptor =
           getDescriptor().getMessageTypes().get(1);
         internal_static_tensorflow_DebugMetadata_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_DebugMetadata_descriptor,
             new java.lang.String[] { "TensorflowVersion", "FileVersion", "TfdbgRunId", });
         internal_static_tensorflow_SourceFile_descriptor =
           getDescriptor().getMessageTypes().get(2);
         internal_static_tensorflow_SourceFile_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_SourceFile_descriptor,
             new java.lang.String[] { "FilePath", "HostName", "Lines", });
         internal_static_tensorflow_StackFrameWithId_descriptor =
           getDescriptor().getMessageTypes().get(3);
         internal_static_tensorflow_StackFrameWithId_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_StackFrameWithId_descriptor,
             new java.lang.String[] { "Id", "FileLineCol", });
         internal_static_tensorflow_CodeLocation_descriptor =
           getDescriptor().getMessageTypes().get(4);
         internal_static_tensorflow_CodeLocation_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_CodeLocation_descriptor,
             new java.lang.String[] { "HostName", "StackFrameIds", });
         internal_static_tensorflow_GraphOpCreation_descriptor =
           getDescriptor().getMessageTypes().get(5);
         internal_static_tensorflow_GraphOpCreation_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_GraphOpCreation_descriptor,
             new java.lang.String[] { "OpType", "OpName", "GraphName", "GraphId", "DeviceName", "InputNames", "NumOutputs", "CodeLocation", "OutputTensorIds", });
         internal_static_tensorflow_DebuggedGraph_descriptor =
           getDescriptor().getMessageTypes().get(6);
         internal_static_tensorflow_DebuggedGraph_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_DebuggedGraph_descriptor,
             new java.lang.String[] { "GraphId", "GraphName", "InstrumentedOps", "OriginalGraphDef", "InstrumentedGraphDef", "OuterContextId", });
         internal_static_tensorflow_DebuggedDevice_descriptor =
           getDescriptor().getMessageTypes().get(7);
         internal_static_tensorflow_DebuggedDevice_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_DebuggedDevice_descriptor,
             new java.lang.String[] { "DeviceName", "DeviceId", });
         internal_static_tensorflow_Execution_descriptor =
           getDescriptor().getMessageTypes().get(8);
         internal_static_tensorflow_Execution_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_Execution_descriptor,
             new java.lang.String[] { "OpType", "NumOutputs", "GraphId", "InputTensorIds", "OutputTensorIds", "TensorDebugMode", "TensorProtos", "CodeLocation", "OutputTensorDeviceIds", });
         internal_static_tensorflow_GraphExecutionTrace_descriptor =
           getDescriptor().getMessageTypes().get(9);
         internal_static_tensorflow_GraphExecutionTrace_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_GraphExecutionTrace_descriptor,
             new java.lang.String[] { "TfdbgContextId", "OpName", "OutputSlot", "TensorDebugMode", "TensorProto", "DeviceName", });
    +    descriptor.resolveAllFeaturesImmutable();
         org.tensorflow.proto.GraphDebugInfoProtos.getDescriptor();
         org.tensorflow.proto.TensorProtos.getDescriptor();
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugMetadata.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugMetadata.java
    index 5011c29198b..8f70d7c9067 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugMetadata.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugMetadata.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/debug_event.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,12 +13,21 @@
      * Protobuf type {@code tensorflow.DebugMetadata}
      */
     public final class DebugMetadata extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.DebugMetadata)
         DebugMetadataOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      DebugMetadata.class.getName());
    +  }
       // Use DebugMetadata.newBuilder() to construct.
    -  private DebugMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private DebugMetadata(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private DebugMetadata() {
    @@ -25,25 +36,13 @@ private DebugMetadata() {
         tfdbgRunId_ = "";
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new DebugMetadata();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.DebugEventProtos.internal_static_tensorflow_DebugMetadata_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.DebugEventProtos.internal_static_tensorflow_DebugMetadata_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -51,7 +50,8 @@ protected java.lang.Object newInstance(
       }
     
       public static final int TENSORFLOW_VERSION_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object tensorflowVersion_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object tensorflowVersion_ = "";
       /**
        * 
        * Version of TensorFlow.
    @@ -97,7 +97,8 @@ public java.lang.String getTensorflowVersion() {
       }
     
       public static final int FILE_VERSION_FIELD_NUMBER = 2;
    -  private volatile java.lang.Object fileVersion_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object fileVersion_ = "";
       /**
        * 
        * Version of the DebugEvent file format.
    @@ -145,7 +146,8 @@ public java.lang.String getFileVersion() {
       }
     
       public static final int TFDBG_RUN_ID_FIELD_NUMBER = 3;
    -  private volatile java.lang.Object tfdbgRunId_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object tfdbgRunId_ = "";
       /**
        * 
        * A unique ID for the current run of tfdbg.
    @@ -210,14 +212,14 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tensorflowVersion_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tensorflowVersion_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tensorflowVersion_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, tensorflowVersion_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fileVersion_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, fileVersion_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(fileVersion_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 2, fileVersion_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tfdbgRunId_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, tfdbgRunId_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tfdbgRunId_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 3, tfdbgRunId_);
         }
         getUnknownFields().writeTo(output);
       }
    @@ -228,14 +230,14 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tensorflowVersion_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tensorflowVersion_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tensorflowVersion_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, tensorflowVersion_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fileVersion_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, fileVersion_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(fileVersion_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(2, fileVersion_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tfdbgRunId_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, tfdbgRunId_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tfdbgRunId_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(3, tfdbgRunId_);
         }
         size += getUnknownFields().getSerializedSize();
         memoizedSize = size;
    @@ -314,39 +316,41 @@ public static org.tensorflow.proto.DebugMetadata parseFrom(
       }
       public static org.tensorflow.proto.DebugMetadata parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.DebugMetadata parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.DebugMetadata parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.DebugMetadata parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.DebugMetadata parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.DebugMetadata parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -366,7 +370,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -378,7 +382,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.DebugMetadata}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.DebugMetadata)
           org.tensorflow.proto.DebugMetadataOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -387,7 +391,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.DebugEventProtos.internal_static_tensorflow_DebugMetadata_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -400,19 +404,17 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           tensorflowVersion_ = "";
    -
           fileVersion_ = "";
    -
           tfdbgRunId_ = "";
    -
           return this;
         }
     
    @@ -439,45 +441,24 @@ public org.tensorflow.proto.DebugMetadata build() {
         @java.lang.Override
         public org.tensorflow.proto.DebugMetadata buildPartial() {
           org.tensorflow.proto.DebugMetadata result = new org.tensorflow.proto.DebugMetadata(this);
    -      result.tensorflowVersion_ = tensorflowVersion_;
    -      result.fileVersion_ = fileVersion_;
    -      result.tfdbgRunId_ = tfdbgRunId_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.DebugMetadata result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.tensorflowVersion_ = tensorflowVersion_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.fileVersion_ = fileVersion_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.tfdbgRunId_ = tfdbgRunId_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.DebugMetadata) {
    @@ -492,14 +473,17 @@ public Builder mergeFrom(org.tensorflow.proto.DebugMetadata other) {
           if (other == org.tensorflow.proto.DebugMetadata.getDefaultInstance()) return this;
           if (!other.getTensorflowVersion().isEmpty()) {
             tensorflowVersion_ = other.tensorflowVersion_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (!other.getFileVersion().isEmpty()) {
             fileVersion_ = other.fileVersion_;
    +        bitField0_ |= 0x00000002;
             onChanged();
           }
           if (!other.getTfdbgRunId().isEmpty()) {
             tfdbgRunId_ = other.tfdbgRunId_;
    +        bitField0_ |= 0x00000004;
             onChanged();
           }
           this.mergeUnknownFields(other.getUnknownFields());
    @@ -530,17 +514,17 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   tensorflowVersion_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
                   fileVersion_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 case 26: {
                   tfdbgRunId_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 26
                 default: {
    @@ -558,6 +542,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private java.lang.Object tensorflowVersion_ = "";
         /**
    @@ -612,11 +597,9 @@ public java.lang.String getTensorflowVersion() {
          */
         public Builder setTensorflowVersion(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           tensorflowVersion_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -629,8 +612,8 @@ public Builder setTensorflowVersion(
          * @return This builder for chaining.
          */
         public Builder clearTensorflowVersion() {
    -      
           tensorflowVersion_ = getDefaultInstance().getTensorflowVersion();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -645,12 +628,10 @@ public Builder clearTensorflowVersion() {
          */
         public Builder setTensorflowVersionBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           tensorflowVersion_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -711,11 +692,9 @@ public java.lang.String getFileVersion() {
          */
         public Builder setFileVersion(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           fileVersion_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -729,8 +708,8 @@ public Builder setFileVersion(
          * @return This builder for chaining.
          */
         public Builder clearFileVersion() {
    -      
           fileVersion_ = getDefaultInstance().getFileVersion();
    +      bitField0_ = (bitField0_ & ~0x00000002);
           onChanged();
           return this;
         }
    @@ -746,12 +725,10 @@ public Builder clearFileVersion() {
          */
         public Builder setFileVersionBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           fileVersion_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -818,11 +795,9 @@ public java.lang.String getTfdbgRunId() {
          */
         public Builder setTfdbgRunId(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           tfdbgRunId_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -838,8 +813,8 @@ public Builder setTfdbgRunId(
          * @return This builder for chaining.
          */
         public Builder clearTfdbgRunId() {
    -      
           tfdbgRunId_ = getDefaultInstance().getTfdbgRunId();
    +      bitField0_ = (bitField0_ & ~0x00000004);
           onChanged();
           return this;
         }
    @@ -857,27 +832,13 @@ public Builder clearTfdbgRunId() {
          */
         public Builder setTfdbgRunIdBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           tfdbgRunId_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.DebugMetadata)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugMetadataOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugMetadataOrBuilder.java
    index cc682b4fa75..20d753b7194 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugMetadataOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugMetadataOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/debug_event.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugOptions.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugOptions.java
    index 2505c073620..2e7f0fdfeda 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugOptions.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugOptions.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/debug.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,37 +13,34 @@
      * Protobuf type {@code tensorflow.DebugOptions}
      */
     public final class DebugOptions extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.DebugOptions)
         DebugOptionsOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      DebugOptions.class.getName());
    +  }
       // Use DebugOptions.newBuilder() to construct.
    -  private DebugOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private DebugOptions(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private DebugOptions() {
         debugTensorWatchOpts_ = java.util.Collections.emptyList();
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new DebugOptions();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.DebugProtos.internal_static_tensorflow_DebugOptions_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.DebugProtos.internal_static_tensorflow_DebugOptions_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -49,6 +48,7 @@ protected java.lang.Object newInstance(
       }
     
       public static final int DEBUG_TENSOR_WATCH_OPTS_FIELD_NUMBER = 4;
    +  @SuppressWarnings("serial")
       private java.util.List debugTensorWatchOpts_;
       /**
        * 
    @@ -109,7 +109,7 @@ public org.tensorflow.proto.DebugTensorWatchOrBuilder getDebugTensorWatchOptsOrB
       }
     
       public static final int GLOBAL_STEP_FIELD_NUMBER = 10;
    -  private long globalStep_;
    +  private long globalStep_ = 0L;
       /**
        * 
        * Caller-specified global step count.
    @@ -126,7 +126,7 @@ public long getGlobalStep() {
       }
     
       public static final int RESET_DISK_BYTE_USAGE_FIELD_NUMBER = 11;
    -  private boolean resetDiskByteUsage_;
    +  private boolean resetDiskByteUsage_ = false;
       /**
        * 
        * Whether the total disk usage of tfdbg is to be reset to zero
    @@ -268,39 +268,41 @@ public static org.tensorflow.proto.DebugOptions parseFrom(
       }
       public static org.tensorflow.proto.DebugOptions parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.DebugOptions parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.DebugOptions parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.DebugOptions parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.DebugOptions parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.DebugOptions parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -320,7 +322,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -332,7 +334,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.DebugOptions}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.DebugOptions)
           org.tensorflow.proto.DebugOptionsOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -341,7 +343,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.DebugProtos.internal_static_tensorflow_DebugOptions_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -354,13 +356,14 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           if (debugTensorWatchOptsBuilder_ == null) {
             debugTensorWatchOpts_ = java.util.Collections.emptyList();
           } else {
    @@ -369,9 +372,7 @@ public Builder clear() {
           }
           bitField0_ = (bitField0_ & ~0x00000001);
           globalStep_ = 0L;
    -
           resetDiskByteUsage_ = false;
    -
           return this;
         }
     
    @@ -398,7 +399,13 @@ public org.tensorflow.proto.DebugOptions build() {
         @java.lang.Override
         public org.tensorflow.proto.DebugOptions buildPartial() {
           org.tensorflow.proto.DebugOptions result = new org.tensorflow.proto.DebugOptions(this);
    -      int from_bitField0_ = bitField0_;
    +      buildPartialRepeatedFields(result);
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartialRepeatedFields(org.tensorflow.proto.DebugOptions result) {
           if (debugTensorWatchOptsBuilder_ == null) {
             if (((bitField0_ & 0x00000001) != 0)) {
               debugTensorWatchOpts_ = java.util.Collections.unmodifiableList(debugTensorWatchOpts_);
    @@ -408,44 +415,18 @@ public org.tensorflow.proto.DebugOptions buildPartial() {
           } else {
             result.debugTensorWatchOpts_ = debugTensorWatchOptsBuilder_.build();
           }
    -      result.globalStep_ = globalStep_;
    -      result.resetDiskByteUsage_ = resetDiskByteUsage_;
    -      onBuilt();
    -      return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.DebugOptions result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.globalStep_ = globalStep_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.resetDiskByteUsage_ = resetDiskByteUsage_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.DebugOptions) {
    @@ -477,7 +458,7 @@ public Builder mergeFrom(org.tensorflow.proto.DebugOptions other) {
                 debugTensorWatchOpts_ = other.debugTensorWatchOpts_;
                 bitField0_ = (bitField0_ & ~0x00000001);
                 debugTensorWatchOptsBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getDebugTensorWatchOptsFieldBuilder() : null;
               } else {
                 debugTensorWatchOptsBuilder_.addAllMessages(other.debugTensorWatchOpts_);
    @@ -531,12 +512,12 @@ public Builder mergeFrom(
                 } // case 34
                 case 80: {
                   globalStep_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 80
                 case 88: {
                   resetDiskByteUsage_ = input.readBool();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 88
                 default: {
    @@ -565,7 +546,7 @@ private void ensureDebugTensorWatchOptsIsMutable() {
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.DebugTensorWatch, org.tensorflow.proto.DebugTensorWatch.Builder, org.tensorflow.proto.DebugTensorWatchOrBuilder> debugTensorWatchOptsBuilder_;
     
         /**
    @@ -853,11 +834,11 @@ public org.tensorflow.proto.DebugTensorWatch.Builder addDebugTensorWatchOptsBuil
              getDebugTensorWatchOptsBuilderList() {
           return getDebugTensorWatchOptsFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.DebugTensorWatch, org.tensorflow.proto.DebugTensorWatch.Builder, org.tensorflow.proto.DebugTensorWatchOrBuilder> 
             getDebugTensorWatchOptsFieldBuilder() {
           if (debugTensorWatchOptsBuilder_ == null) {
    -        debugTensorWatchOptsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        debugTensorWatchOptsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.DebugTensorWatch, org.tensorflow.proto.DebugTensorWatch.Builder, org.tensorflow.proto.DebugTensorWatchOrBuilder>(
                     debugTensorWatchOpts_,
                     ((bitField0_ & 0x00000001) != 0),
    @@ -895,8 +876,9 @@ public long getGlobalStep() {
          * @return This builder for chaining.
          */
         public Builder setGlobalStep(long value) {
    -      
    +
           globalStep_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -911,7 +893,7 @@ public Builder setGlobalStep(long value) {
          * @return This builder for chaining.
          */
         public Builder clearGlobalStep() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000002);
           globalStep_ = 0L;
           onChanged();
           return this;
    @@ -946,8 +928,9 @@ public boolean getResetDiskByteUsage() {
          * @return This builder for chaining.
          */
         public Builder setResetDiskByteUsage(boolean value) {
    -      
    +
           resetDiskByteUsage_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -963,23 +946,11 @@ public Builder setResetDiskByteUsage(boolean value) {
          * @return This builder for chaining.
          */
         public Builder clearResetDiskByteUsage() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000004);
           resetDiskByteUsage_ = false;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.DebugOptions)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugOptionsOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugOptionsOrBuilder.java
    index 6ab43626e54..ac859a7de1d 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugOptionsOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugOptionsOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/debug.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugProtos.java
    index 59e7c11fbef..ca250aff759 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugProtos.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugProtos.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/debug.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class DebugProtos {
       private DebugProtos() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      DebugProtos.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,22 +28,22 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_DebugTensorWatch_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_DebugTensorWatch_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_DebugOptions_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_DebugOptions_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_DebuggedSourceFile_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_DebuggedSourceFile_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_DebuggedSourceFiles_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_DebuggedSourceFiles_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -68,27 +79,28 @@ public static void registerAllExtensions(
         internal_static_tensorflow_DebugTensorWatch_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_DebugTensorWatch_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_DebugTensorWatch_descriptor,
             new java.lang.String[] { "NodeName", "OutputSlot", "DebugOps", "DebugUrls", "TolerateDebugOpCreationFailures", });
         internal_static_tensorflow_DebugOptions_descriptor =
           getDescriptor().getMessageTypes().get(1);
         internal_static_tensorflow_DebugOptions_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_DebugOptions_descriptor,
             new java.lang.String[] { "DebugTensorWatchOpts", "GlobalStep", "ResetDiskByteUsage", });
         internal_static_tensorflow_DebuggedSourceFile_descriptor =
           getDescriptor().getMessageTypes().get(2);
         internal_static_tensorflow_DebuggedSourceFile_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_DebuggedSourceFile_descriptor,
             new java.lang.String[] { "Host", "FilePath", "LastModified", "Bytes", "Lines", });
         internal_static_tensorflow_DebuggedSourceFiles_descriptor =
           getDescriptor().getMessageTypes().get(3);
         internal_static_tensorflow_DebuggedSourceFiles_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_DebuggedSourceFiles_descriptor,
             new java.lang.String[] { "SourceFiles", });
    +    descriptor.resolveAllFeaturesImmutable();
       }
     
       // @@protoc_insertion_point(outer_class_scope)
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugTensorWatch.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugTensorWatch.java
    index 660f78682c7..e1fc459a203 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugTensorWatch.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugTensorWatch.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/debug.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,39 +13,38 @@
      * Protobuf type {@code tensorflow.DebugTensorWatch}
      */
     public final class DebugTensorWatch extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.DebugTensorWatch)
         DebugTensorWatchOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      DebugTensorWatch.class.getName());
    +  }
       // Use DebugTensorWatch.newBuilder() to construct.
    -  private DebugTensorWatch(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private DebugTensorWatch(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private DebugTensorWatch() {
         nodeName_ = "";
    -    debugOps_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -    debugUrls_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +    debugOps_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
    +    debugUrls_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new DebugTensorWatch();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.DebugProtos.internal_static_tensorflow_DebugTensorWatch_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.DebugProtos.internal_static_tensorflow_DebugTensorWatch_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -51,7 +52,8 @@ protected java.lang.Object newInstance(
       }
     
       public static final int NODE_NAME_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object nodeName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object nodeName_ = "";
       /**
        * 
        * Name of the node to watch.
    @@ -101,7 +103,7 @@ public java.lang.String getNodeName() {
       }
     
       public static final int OUTPUT_SLOT_FIELD_NUMBER = 2;
    -  private int outputSlot_;
    +  private int outputSlot_ = 0;
       /**
        * 
        * Output slot to watch.
    @@ -120,7 +122,9 @@ public int getOutputSlot() {
       }
     
       public static final int DEBUG_OPS_FIELD_NUMBER = 3;
    -  private com.google.protobuf.LazyStringList debugOps_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.LazyStringArrayList debugOps_ =
    +      com.google.protobuf.LazyStringArrayList.emptyList();
       /**
        * 
        * Name(s) of the debugging op(s).
    @@ -179,20 +183,25 @@ public java.lang.String getDebugOps(int index) {
       }
     
       public static final int DEBUG_URLS_FIELD_NUMBER = 4;
    -  private com.google.protobuf.LazyStringList debugUrls_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.LazyStringArrayList debugUrls_ =
    +      com.google.protobuf.LazyStringArrayList.emptyList();
       /**
        * 
        * URL(s) for debug targets(s).
    +   *
        * Supported URL formats are:
    -   *   - file:///foo/tfdbg_dump: Writes out Event content to file
    -   *     /foo/tfdbg_dump.  Assumes all directories can be created if they don't
    -   *     already exist.
    -   *   - grpc://localhost:11011: Sends an RPC request to an EventListener
    -   *     service running at localhost:11011 with the event.
    -   *   - memcbk:///event_key: Routes tensors to clients using the
    -   *     callback registered with the DebugCallbackRegistry for event_key.
    +   * - file:///foo/tfdbg_dump: Writes out Event content to file
    +   * /foo/tfdbg_dump.  Assumes all directories can be created if they don't
    +   * already exist.
    +   * - grpc://localhost:11011: Sends an RPC request to an EventListener
    +   * service running at localhost:11011 with the event.
    +   * - memcbk:///event_key: Routes tensors to clients using the
    +   * callback registered with the DebugCallbackRegistry for event_key.
    +   *
        * Each debug op listed in debug_ops will publish its output tensor (debug
        * signal) to all URLs in debug_urls.
    +   *
        * N.B. Session::Run() supports concurrent invocations of the same inputs
        * (feed keys), outputs and target nodes. If such concurrent invocations
        * are to be debugged, the callers of Session::Run() must use distinct
    @@ -211,16 +220,19 @@ public java.lang.String getDebugOps(int index) {
       /**
        * 
        * URL(s) for debug targets(s).
    +   *
        * Supported URL formats are:
    -   *   - file:///foo/tfdbg_dump: Writes out Event content to file
    -   *     /foo/tfdbg_dump.  Assumes all directories can be created if they don't
    -   *     already exist.
    -   *   - grpc://localhost:11011: Sends an RPC request to an EventListener
    -   *     service running at localhost:11011 with the event.
    -   *   - memcbk:///event_key: Routes tensors to clients using the
    -   *     callback registered with the DebugCallbackRegistry for event_key.
    +   * - file:///foo/tfdbg_dump: Writes out Event content to file
    +   * /foo/tfdbg_dump.  Assumes all directories can be created if they don't
    +   * already exist.
    +   * - grpc://localhost:11011: Sends an RPC request to an EventListener
    +   * service running at localhost:11011 with the event.
    +   * - memcbk:///event_key: Routes tensors to clients using the
    +   * callback registered with the DebugCallbackRegistry for event_key.
    +   *
        * Each debug op listed in debug_ops will publish its output tensor (debug
        * signal) to all URLs in debug_urls.
    +   *
        * N.B. Session::Run() supports concurrent invocations of the same inputs
        * (feed keys), outputs and target nodes. If such concurrent invocations
        * are to be debugged, the callers of Session::Run() must use distinct
    @@ -238,16 +250,19 @@ public int getDebugUrlsCount() {
       /**
        * 
        * URL(s) for debug targets(s).
    +   *
        * Supported URL formats are:
    -   *   - file:///foo/tfdbg_dump: Writes out Event content to file
    -   *     /foo/tfdbg_dump.  Assumes all directories can be created if they don't
    -   *     already exist.
    -   *   - grpc://localhost:11011: Sends an RPC request to an EventListener
    -   *     service running at localhost:11011 with the event.
    -   *   - memcbk:///event_key: Routes tensors to clients using the
    -   *     callback registered with the DebugCallbackRegistry for event_key.
    +   * - file:///foo/tfdbg_dump: Writes out Event content to file
    +   * /foo/tfdbg_dump.  Assumes all directories can be created if they don't
    +   * already exist.
    +   * - grpc://localhost:11011: Sends an RPC request to an EventListener
    +   * service running at localhost:11011 with the event.
    +   * - memcbk:///event_key: Routes tensors to clients using the
    +   * callback registered with the DebugCallbackRegistry for event_key.
    +   *
        * Each debug op listed in debug_ops will publish its output tensor (debug
        * signal) to all URLs in debug_urls.
    +   *
        * N.B. Session::Run() supports concurrent invocations of the same inputs
        * (feed keys), outputs and target nodes. If such concurrent invocations
        * are to be debugged, the callers of Session::Run() must use distinct
    @@ -266,16 +281,19 @@ public java.lang.String getDebugUrls(int index) {
       /**
        * 
        * URL(s) for debug targets(s).
    +   *
        * Supported URL formats are:
    -   *   - file:///foo/tfdbg_dump: Writes out Event content to file
    -   *     /foo/tfdbg_dump.  Assumes all directories can be created if they don't
    -   *     already exist.
    -   *   - grpc://localhost:11011: Sends an RPC request to an EventListener
    -   *     service running at localhost:11011 with the event.
    -   *   - memcbk:///event_key: Routes tensors to clients using the
    -   *     callback registered with the DebugCallbackRegistry for event_key.
    +   * - file:///foo/tfdbg_dump: Writes out Event content to file
    +   * /foo/tfdbg_dump.  Assumes all directories can be created if they don't
    +   * already exist.
    +   * - grpc://localhost:11011: Sends an RPC request to an EventListener
    +   * service running at localhost:11011 with the event.
    +   * - memcbk:///event_key: Routes tensors to clients using the
    +   * callback registered with the DebugCallbackRegistry for event_key.
    +   *
        * Each debug op listed in debug_ops will publish its output tensor (debug
        * signal) to all URLs in debug_urls.
    +   *
        * N.B. Session::Run() supports concurrent invocations of the same inputs
        * (feed keys), outputs and target nodes. If such concurrent invocations
        * are to be debugged, the callers of Session::Run() must use distinct
    @@ -294,7 +312,7 @@ public java.lang.String getDebugUrls(int index) {
       }
     
       public static final int TOLERATE_DEBUG_OP_CREATION_FAILURES_FIELD_NUMBER = 5;
    -  private boolean tolerateDebugOpCreationFailures_;
    +  private boolean tolerateDebugOpCreationFailures_ = false;
       /**
        * 
        * Do not error out if debug op creation fails (e.g., due to dtype
    @@ -323,17 +341,17 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodeName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, nodeName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nodeName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, nodeName_);
         }
         if (outputSlot_ != 0) {
           output.writeInt32(2, outputSlot_);
         }
         for (int i = 0; i < debugOps_.size(); i++) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, debugOps_.getRaw(i));
    +      com.google.protobuf.GeneratedMessage.writeString(output, 3, debugOps_.getRaw(i));
         }
         for (int i = 0; i < debugUrls_.size(); i++) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, debugUrls_.getRaw(i));
    +      com.google.protobuf.GeneratedMessage.writeString(output, 4, debugUrls_.getRaw(i));
         }
         if (tolerateDebugOpCreationFailures_ != false) {
           output.writeBool(5, tolerateDebugOpCreationFailures_);
    @@ -347,8 +365,8 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodeName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, nodeName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nodeName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, nodeName_);
         }
         if (outputSlot_ != 0) {
           size += com.google.protobuf.CodedOutputStream
    @@ -464,39 +482,41 @@ public static org.tensorflow.proto.DebugTensorWatch parseFrom(
       }
       public static org.tensorflow.proto.DebugTensorWatch parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.DebugTensorWatch parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.DebugTensorWatch parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.DebugTensorWatch parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.DebugTensorWatch parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.DebugTensorWatch parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -516,7 +536,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -528,7 +548,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.DebugTensorWatch}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.DebugTensorWatch)
           org.tensorflow.proto.DebugTensorWatchOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -537,7 +557,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.DebugProtos.internal_static_tensorflow_DebugTensorWatch_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -550,23 +570,21 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           nodeName_ = "";
    -
           outputSlot_ = 0;
    -
    -      debugOps_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000001);
    -      debugUrls_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000002);
    +      debugOps_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
    +      debugUrls_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
           tolerateDebugOpCreationFailures_ = false;
    -
           return this;
         }
     
    @@ -593,56 +611,32 @@ public org.tensorflow.proto.DebugTensorWatch build() {
         @java.lang.Override
         public org.tensorflow.proto.DebugTensorWatch buildPartial() {
           org.tensorflow.proto.DebugTensorWatch result = new org.tensorflow.proto.DebugTensorWatch(this);
    -      int from_bitField0_ = bitField0_;
    -      result.nodeName_ = nodeName_;
    -      result.outputSlot_ = outputSlot_;
    -      if (((bitField0_ & 0x00000001) != 0)) {
    -        debugOps_ = debugOps_.getUnmodifiableView();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    -      }
    -      result.debugOps_ = debugOps_;
    -      if (((bitField0_ & 0x00000002) != 0)) {
    -        debugUrls_ = debugUrls_.getUnmodifiableView();
    -        bitField0_ = (bitField0_ & ~0x00000002);
    -      }
    -      result.debugUrls_ = debugUrls_;
    -      result.tolerateDebugOpCreationFailures_ = tolerateDebugOpCreationFailures_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.DebugTensorWatch result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.nodeName_ = nodeName_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.outputSlot_ = outputSlot_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        debugOps_.makeImmutable();
    +        result.debugOps_ = debugOps_;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        debugUrls_.makeImmutable();
    +        result.debugUrls_ = debugUrls_;
    +      }
    +      if (((from_bitField0_ & 0x00000010) != 0)) {
    +        result.tolerateDebugOpCreationFailures_ = tolerateDebugOpCreationFailures_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.DebugTensorWatch) {
    @@ -657,6 +651,7 @@ public Builder mergeFrom(org.tensorflow.proto.DebugTensorWatch other) {
           if (other == org.tensorflow.proto.DebugTensorWatch.getDefaultInstance()) return this;
           if (!other.getNodeName().isEmpty()) {
             nodeName_ = other.nodeName_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (other.getOutputSlot() != 0) {
    @@ -665,7 +660,7 @@ public Builder mergeFrom(org.tensorflow.proto.DebugTensorWatch other) {
           if (!other.debugOps_.isEmpty()) {
             if (debugOps_.isEmpty()) {
               debugOps_ = other.debugOps_;
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ |= 0x00000004;
             } else {
               ensureDebugOpsIsMutable();
               debugOps_.addAll(other.debugOps_);
    @@ -675,7 +670,7 @@ public Builder mergeFrom(org.tensorflow.proto.DebugTensorWatch other) {
           if (!other.debugUrls_.isEmpty()) {
             if (debugUrls_.isEmpty()) {
               debugUrls_ = other.debugUrls_;
    -          bitField0_ = (bitField0_ & ~0x00000002);
    +          bitField0_ |= 0x00000008;
             } else {
               ensureDebugUrlsIsMutable();
               debugUrls_.addAll(other.debugUrls_);
    @@ -713,12 +708,12 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   nodeName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 16: {
                   outputSlot_ = input.readInt32();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 16
                 case 26: {
    @@ -735,7 +730,7 @@ public Builder mergeFrom(
                 } // case 34
                 case 40: {
                   tolerateDebugOpCreationFailures_ = input.readBool();
    -
    +              bitField0_ |= 0x00000010;
                   break;
                 } // case 40
                 default: {
    @@ -814,11 +809,9 @@ public java.lang.String getNodeName() {
          */
         public Builder setNodeName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           nodeName_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -833,8 +826,8 @@ public Builder setNodeName(
          * @return This builder for chaining.
          */
         public Builder clearNodeName() {
    -      
           nodeName_ = getDefaultInstance().getNodeName();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -851,12 +844,10 @@ public Builder clearNodeName() {
          */
         public Builder setNodeNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           nodeName_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -892,8 +883,9 @@ public int getOutputSlot() {
          * @return This builder for chaining.
          */
         public Builder setOutputSlot(int value) {
    -      
    +
           outputSlot_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -910,18 +902,19 @@ public Builder setOutputSlot(int value) {
          * @return This builder for chaining.
          */
         public Builder clearOutputSlot() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000002);
           outputSlot_ = 0;
           onChanged();
           return this;
         }
     
    -    private com.google.protobuf.LazyStringList debugOps_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +    private com.google.protobuf.LazyStringArrayList debugOps_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         private void ensureDebugOpsIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    +      if (!debugOps_.isModifiable()) {
             debugOps_ = new com.google.protobuf.LazyStringArrayList(debugOps_);
    -        bitField0_ |= 0x00000001;
    -       }
    +      }
    +      bitField0_ |= 0x00000004;
         }
         /**
          * 
    @@ -935,7 +928,8 @@ private void ensureDebugOpsIsMutable() {
          */
         public com.google.protobuf.ProtocolStringList
             getDebugOpsList() {
    -      return debugOps_.getUnmodifiableView();
    +      debugOps_.makeImmutable();
    +      return debugOps_;
         }
         /**
          * 
    @@ -993,11 +987,10 @@ public java.lang.String getDebugOps(int index) {
          */
         public Builder setDebugOps(
             int index, java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureDebugOpsIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureDebugOpsIsMutable();
           debugOps_.set(index, value);
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -1014,11 +1007,10 @@ public Builder setDebugOps(
          */
         public Builder addDebugOps(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureDebugOpsIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureDebugOpsIsMutable();
           debugOps_.add(value);
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -1038,6 +1030,7 @@ public Builder addAllDebugOps(
           ensureDebugOpsIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, debugOps_);
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -1052,8 +1045,9 @@ public Builder addAllDebugOps(
          * @return This builder for chaining.
          */
         public Builder clearDebugOps() {
    -      debugOps_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      debugOps_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
    +      bitField0_ = (bitField0_ & ~0x00000004);;
           onChanged();
           return this;
         }
    @@ -1070,36 +1064,39 @@ public Builder clearDebugOps() {
          */
         public Builder addDebugOpsBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           ensureDebugOpsIsMutable();
           debugOps_.add(value);
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
     
    -    private com.google.protobuf.LazyStringList debugUrls_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +    private com.google.protobuf.LazyStringArrayList debugUrls_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         private void ensureDebugUrlsIsMutable() {
    -      if (!((bitField0_ & 0x00000002) != 0)) {
    +      if (!debugUrls_.isModifiable()) {
             debugUrls_ = new com.google.protobuf.LazyStringArrayList(debugUrls_);
    -        bitField0_ |= 0x00000002;
    -       }
    +      }
    +      bitField0_ |= 0x00000008;
         }
         /**
          * 
          * URL(s) for debug targets(s).
    +     *
          * Supported URL formats are:
    -     *   - file:///foo/tfdbg_dump: Writes out Event content to file
    -     *     /foo/tfdbg_dump.  Assumes all directories can be created if they don't
    -     *     already exist.
    -     *   - grpc://localhost:11011: Sends an RPC request to an EventListener
    -     *     service running at localhost:11011 with the event.
    -     *   - memcbk:///event_key: Routes tensors to clients using the
    -     *     callback registered with the DebugCallbackRegistry for event_key.
    +     * - file:///foo/tfdbg_dump: Writes out Event content to file
    +     * /foo/tfdbg_dump.  Assumes all directories can be created if they don't
    +     * already exist.
    +     * - grpc://localhost:11011: Sends an RPC request to an EventListener
    +     * service running at localhost:11011 with the event.
    +     * - memcbk:///event_key: Routes tensors to clients using the
    +     * callback registered with the DebugCallbackRegistry for event_key.
    +     *
          * Each debug op listed in debug_ops will publish its output tensor (debug
          * signal) to all URLs in debug_urls.
    +     *
          * N.B. Session::Run() supports concurrent invocations of the same inputs
          * (feed keys), outputs and target nodes. If such concurrent invocations
          * are to be debugged, the callers of Session::Run() must use distinct
    @@ -1113,21 +1110,25 @@ private void ensureDebugUrlsIsMutable() {
          */
         public com.google.protobuf.ProtocolStringList
             getDebugUrlsList() {
    -      return debugUrls_.getUnmodifiableView();
    +      debugUrls_.makeImmutable();
    +      return debugUrls_;
         }
         /**
          * 
          * URL(s) for debug targets(s).
    +     *
          * Supported URL formats are:
    -     *   - file:///foo/tfdbg_dump: Writes out Event content to file
    -     *     /foo/tfdbg_dump.  Assumes all directories can be created if they don't
    -     *     already exist.
    -     *   - grpc://localhost:11011: Sends an RPC request to an EventListener
    -     *     service running at localhost:11011 with the event.
    -     *   - memcbk:///event_key: Routes tensors to clients using the
    -     *     callback registered with the DebugCallbackRegistry for event_key.
    +     * - file:///foo/tfdbg_dump: Writes out Event content to file
    +     * /foo/tfdbg_dump.  Assumes all directories can be created if they don't
    +     * already exist.
    +     * - grpc://localhost:11011: Sends an RPC request to an EventListener
    +     * service running at localhost:11011 with the event.
    +     * - memcbk:///event_key: Routes tensors to clients using the
    +     * callback registered with the DebugCallbackRegistry for event_key.
    +     *
          * Each debug op listed in debug_ops will publish its output tensor (debug
          * signal) to all URLs in debug_urls.
    +     *
          * N.B. Session::Run() supports concurrent invocations of the same inputs
          * (feed keys), outputs and target nodes. If such concurrent invocations
          * are to be debugged, the callers of Session::Run() must use distinct
    @@ -1145,16 +1146,19 @@ public int getDebugUrlsCount() {
         /**
          * 
          * URL(s) for debug targets(s).
    +     *
          * Supported URL formats are:
    -     *   - file:///foo/tfdbg_dump: Writes out Event content to file
    -     *     /foo/tfdbg_dump.  Assumes all directories can be created if they don't
    -     *     already exist.
    -     *   - grpc://localhost:11011: Sends an RPC request to an EventListener
    -     *     service running at localhost:11011 with the event.
    -     *   - memcbk:///event_key: Routes tensors to clients using the
    -     *     callback registered with the DebugCallbackRegistry for event_key.
    +     * - file:///foo/tfdbg_dump: Writes out Event content to file
    +     * /foo/tfdbg_dump.  Assumes all directories can be created if they don't
    +     * already exist.
    +     * - grpc://localhost:11011: Sends an RPC request to an EventListener
    +     * service running at localhost:11011 with the event.
    +     * - memcbk:///event_key: Routes tensors to clients using the
    +     * callback registered with the DebugCallbackRegistry for event_key.
    +     *
          * Each debug op listed in debug_ops will publish its output tensor (debug
          * signal) to all URLs in debug_urls.
    +     *
          * N.B. Session::Run() supports concurrent invocations of the same inputs
          * (feed keys), outputs and target nodes. If such concurrent invocations
          * are to be debugged, the callers of Session::Run() must use distinct
    @@ -1173,16 +1177,19 @@ public java.lang.String getDebugUrls(int index) {
         /**
          * 
          * URL(s) for debug targets(s).
    +     *
          * Supported URL formats are:
    -     *   - file:///foo/tfdbg_dump: Writes out Event content to file
    -     *     /foo/tfdbg_dump.  Assumes all directories can be created if they don't
    -     *     already exist.
    -     *   - grpc://localhost:11011: Sends an RPC request to an EventListener
    -     *     service running at localhost:11011 with the event.
    -     *   - memcbk:///event_key: Routes tensors to clients using the
    -     *     callback registered with the DebugCallbackRegistry for event_key.
    +     * - file:///foo/tfdbg_dump: Writes out Event content to file
    +     * /foo/tfdbg_dump.  Assumes all directories can be created if they don't
    +     * already exist.
    +     * - grpc://localhost:11011: Sends an RPC request to an EventListener
    +     * service running at localhost:11011 with the event.
    +     * - memcbk:///event_key: Routes tensors to clients using the
    +     * callback registered with the DebugCallbackRegistry for event_key.
    +     *
          * Each debug op listed in debug_ops will publish its output tensor (debug
          * signal) to all URLs in debug_urls.
    +     *
          * N.B. Session::Run() supports concurrent invocations of the same inputs
          * (feed keys), outputs and target nodes. If such concurrent invocations
          * are to be debugged, the callers of Session::Run() must use distinct
    @@ -1202,16 +1209,19 @@ public java.lang.String getDebugUrls(int index) {
         /**
          * 
          * URL(s) for debug targets(s).
    +     *
          * Supported URL formats are:
    -     *   - file:///foo/tfdbg_dump: Writes out Event content to file
    -     *     /foo/tfdbg_dump.  Assumes all directories can be created if they don't
    -     *     already exist.
    -     *   - grpc://localhost:11011: Sends an RPC request to an EventListener
    -     *     service running at localhost:11011 with the event.
    -     *   - memcbk:///event_key: Routes tensors to clients using the
    -     *     callback registered with the DebugCallbackRegistry for event_key.
    +     * - file:///foo/tfdbg_dump: Writes out Event content to file
    +     * /foo/tfdbg_dump.  Assumes all directories can be created if they don't
    +     * already exist.
    +     * - grpc://localhost:11011: Sends an RPC request to an EventListener
    +     * service running at localhost:11011 with the event.
    +     * - memcbk:///event_key: Routes tensors to clients using the
    +     * callback registered with the DebugCallbackRegistry for event_key.
    +     *
          * Each debug op listed in debug_ops will publish its output tensor (debug
          * signal) to all URLs in debug_urls.
    +     *
          * N.B. Session::Run() supports concurrent invocations of the same inputs
          * (feed keys), outputs and target nodes. If such concurrent invocations
          * are to be debugged, the callers of Session::Run() must use distinct
    @@ -1227,27 +1237,29 @@ public java.lang.String getDebugUrls(int index) {
          */
         public Builder setDebugUrls(
             int index, java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureDebugUrlsIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureDebugUrlsIsMutable();
           debugUrls_.set(index, value);
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
         /**
          * 
          * URL(s) for debug targets(s).
    +     *
          * Supported URL formats are:
    -     *   - file:///foo/tfdbg_dump: Writes out Event content to file
    -     *     /foo/tfdbg_dump.  Assumes all directories can be created if they don't
    -     *     already exist.
    -     *   - grpc://localhost:11011: Sends an RPC request to an EventListener
    -     *     service running at localhost:11011 with the event.
    -     *   - memcbk:///event_key: Routes tensors to clients using the
    -     *     callback registered with the DebugCallbackRegistry for event_key.
    +     * - file:///foo/tfdbg_dump: Writes out Event content to file
    +     * /foo/tfdbg_dump.  Assumes all directories can be created if they don't
    +     * already exist.
    +     * - grpc://localhost:11011: Sends an RPC request to an EventListener
    +     * service running at localhost:11011 with the event.
    +     * - memcbk:///event_key: Routes tensors to clients using the
    +     * callback registered with the DebugCallbackRegistry for event_key.
    +     *
          * Each debug op listed in debug_ops will publish its output tensor (debug
          * signal) to all URLs in debug_urls.
    +     *
          * N.B. Session::Run() supports concurrent invocations of the same inputs
          * (feed keys), outputs and target nodes. If such concurrent invocations
          * are to be debugged, the callers of Session::Run() must use distinct
    @@ -1262,27 +1274,29 @@ public Builder setDebugUrls(
          */
         public Builder addDebugUrls(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureDebugUrlsIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureDebugUrlsIsMutable();
           debugUrls_.add(value);
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
         /**
          * 
          * URL(s) for debug targets(s).
    +     *
          * Supported URL formats are:
    -     *   - file:///foo/tfdbg_dump: Writes out Event content to file
    -     *     /foo/tfdbg_dump.  Assumes all directories can be created if they don't
    -     *     already exist.
    -     *   - grpc://localhost:11011: Sends an RPC request to an EventListener
    -     *     service running at localhost:11011 with the event.
    -     *   - memcbk:///event_key: Routes tensors to clients using the
    -     *     callback registered with the DebugCallbackRegistry for event_key.
    +     * - file:///foo/tfdbg_dump: Writes out Event content to file
    +     * /foo/tfdbg_dump.  Assumes all directories can be created if they don't
    +     * already exist.
    +     * - grpc://localhost:11011: Sends an RPC request to an EventListener
    +     * service running at localhost:11011 with the event.
    +     * - memcbk:///event_key: Routes tensors to clients using the
    +     * callback registered with the DebugCallbackRegistry for event_key.
    +     *
          * Each debug op listed in debug_ops will publish its output tensor (debug
          * signal) to all URLs in debug_urls.
    +     *
          * N.B. Session::Run() supports concurrent invocations of the same inputs
          * (feed keys), outputs and target nodes. If such concurrent invocations
          * are to be debugged, the callers of Session::Run() must use distinct
    @@ -1300,22 +1314,26 @@ public Builder addAllDebugUrls(
           ensureDebugUrlsIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, debugUrls_);
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
         /**
          * 
          * URL(s) for debug targets(s).
    +     *
          * Supported URL formats are:
    -     *   - file:///foo/tfdbg_dump: Writes out Event content to file
    -     *     /foo/tfdbg_dump.  Assumes all directories can be created if they don't
    -     *     already exist.
    -     *   - grpc://localhost:11011: Sends an RPC request to an EventListener
    -     *     service running at localhost:11011 with the event.
    -     *   - memcbk:///event_key: Routes tensors to clients using the
    -     *     callback registered with the DebugCallbackRegistry for event_key.
    +     * - file:///foo/tfdbg_dump: Writes out Event content to file
    +     * /foo/tfdbg_dump.  Assumes all directories can be created if they don't
    +     * already exist.
    +     * - grpc://localhost:11011: Sends an RPC request to an EventListener
    +     * service running at localhost:11011 with the event.
    +     * - memcbk:///event_key: Routes tensors to clients using the
    +     * callback registered with the DebugCallbackRegistry for event_key.
    +     *
          * Each debug op listed in debug_ops will publish its output tensor (debug
          * signal) to all URLs in debug_urls.
    +     *
          * N.B. Session::Run() supports concurrent invocations of the same inputs
          * (feed keys), outputs and target nodes. If such concurrent invocations
          * are to be debugged, the callers of Session::Run() must use distinct
    @@ -1328,24 +1346,28 @@ public Builder addAllDebugUrls(
          * @return This builder for chaining.
          */
         public Builder clearDebugUrls() {
    -      debugUrls_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000002);
    +      debugUrls_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
    +      bitField0_ = (bitField0_ & ~0x00000008);;
           onChanged();
           return this;
         }
         /**
          * 
          * URL(s) for debug targets(s).
    +     *
          * Supported URL formats are:
    -     *   - file:///foo/tfdbg_dump: Writes out Event content to file
    -     *     /foo/tfdbg_dump.  Assumes all directories can be created if they don't
    -     *     already exist.
    -     *   - grpc://localhost:11011: Sends an RPC request to an EventListener
    -     *     service running at localhost:11011 with the event.
    -     *   - memcbk:///event_key: Routes tensors to clients using the
    -     *     callback registered with the DebugCallbackRegistry for event_key.
    +     * - file:///foo/tfdbg_dump: Writes out Event content to file
    +     * /foo/tfdbg_dump.  Assumes all directories can be created if they don't
    +     * already exist.
    +     * - grpc://localhost:11011: Sends an RPC request to an EventListener
    +     * service running at localhost:11011 with the event.
    +     * - memcbk:///event_key: Routes tensors to clients using the
    +     * callback registered with the DebugCallbackRegistry for event_key.
    +     *
          * Each debug op listed in debug_ops will publish its output tensor (debug
          * signal) to all URLs in debug_urls.
    +     *
          * N.B. Session::Run() supports concurrent invocations of the same inputs
          * (feed keys), outputs and target nodes. If such concurrent invocations
          * are to be debugged, the callers of Session::Run() must use distinct
    @@ -1360,12 +1382,11 @@ public Builder clearDebugUrls() {
          */
         public Builder addDebugUrlsBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           ensureDebugUrlsIsMutable();
           debugUrls_.add(value);
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -1395,8 +1416,9 @@ public boolean getTolerateDebugOpCreationFailures() {
          * @return This builder for chaining.
          */
         public Builder setTolerateDebugOpCreationFailures(boolean value) {
    -      
    +
           tolerateDebugOpCreationFailures_ = value;
    +      bitField0_ |= 0x00000010;
           onChanged();
           return this;
         }
    @@ -1410,23 +1432,11 @@ public Builder setTolerateDebugOpCreationFailures(boolean value) {
          * @return This builder for chaining.
          */
         public Builder clearTolerateDebugOpCreationFailures() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000010);
           tolerateDebugOpCreationFailures_ = false;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.DebugTensorWatch)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugTensorWatchOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugTensorWatchOrBuilder.java
    index 8d7323db209..842457cd90f 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugTensorWatchOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugTensorWatchOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/debug.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -97,16 +99,19 @@ public interface DebugTensorWatchOrBuilder extends
       /**
        * 
        * URL(s) for debug targets(s).
    +   *
        * Supported URL formats are:
    -   *   - file:///foo/tfdbg_dump: Writes out Event content to file
    -   *     /foo/tfdbg_dump.  Assumes all directories can be created if they don't
    -   *     already exist.
    -   *   - grpc://localhost:11011: Sends an RPC request to an EventListener
    -   *     service running at localhost:11011 with the event.
    -   *   - memcbk:///event_key: Routes tensors to clients using the
    -   *     callback registered with the DebugCallbackRegistry for event_key.
    +   * - file:///foo/tfdbg_dump: Writes out Event content to file
    +   * /foo/tfdbg_dump.  Assumes all directories can be created if they don't
    +   * already exist.
    +   * - grpc://localhost:11011: Sends an RPC request to an EventListener
    +   * service running at localhost:11011 with the event.
    +   * - memcbk:///event_key: Routes tensors to clients using the
    +   * callback registered with the DebugCallbackRegistry for event_key.
    +   *
        * Each debug op listed in debug_ops will publish its output tensor (debug
        * signal) to all URLs in debug_urls.
    +   *
        * N.B. Session::Run() supports concurrent invocations of the same inputs
        * (feed keys), outputs and target nodes. If such concurrent invocations
        * are to be debugged, the callers of Session::Run() must use distinct
    @@ -123,16 +128,19 @@ public interface DebugTensorWatchOrBuilder extends
       /**
        * 
        * URL(s) for debug targets(s).
    +   *
        * Supported URL formats are:
    -   *   - file:///foo/tfdbg_dump: Writes out Event content to file
    -   *     /foo/tfdbg_dump.  Assumes all directories can be created if they don't
    -   *     already exist.
    -   *   - grpc://localhost:11011: Sends an RPC request to an EventListener
    -   *     service running at localhost:11011 with the event.
    -   *   - memcbk:///event_key: Routes tensors to clients using the
    -   *     callback registered with the DebugCallbackRegistry for event_key.
    +   * - file:///foo/tfdbg_dump: Writes out Event content to file
    +   * /foo/tfdbg_dump.  Assumes all directories can be created if they don't
    +   * already exist.
    +   * - grpc://localhost:11011: Sends an RPC request to an EventListener
    +   * service running at localhost:11011 with the event.
    +   * - memcbk:///event_key: Routes tensors to clients using the
    +   * callback registered with the DebugCallbackRegistry for event_key.
    +   *
        * Each debug op listed in debug_ops will publish its output tensor (debug
        * signal) to all URLs in debug_urls.
    +   *
        * N.B. Session::Run() supports concurrent invocations of the same inputs
        * (feed keys), outputs and target nodes. If such concurrent invocations
        * are to be debugged, the callers of Session::Run() must use distinct
    @@ -148,16 +156,19 @@ public interface DebugTensorWatchOrBuilder extends
       /**
        * 
        * URL(s) for debug targets(s).
    +   *
        * Supported URL formats are:
    -   *   - file:///foo/tfdbg_dump: Writes out Event content to file
    -   *     /foo/tfdbg_dump.  Assumes all directories can be created if they don't
    -   *     already exist.
    -   *   - grpc://localhost:11011: Sends an RPC request to an EventListener
    -   *     service running at localhost:11011 with the event.
    -   *   - memcbk:///event_key: Routes tensors to clients using the
    -   *     callback registered with the DebugCallbackRegistry for event_key.
    +   * - file:///foo/tfdbg_dump: Writes out Event content to file
    +   * /foo/tfdbg_dump.  Assumes all directories can be created if they don't
    +   * already exist.
    +   * - grpc://localhost:11011: Sends an RPC request to an EventListener
    +   * service running at localhost:11011 with the event.
    +   * - memcbk:///event_key: Routes tensors to clients using the
    +   * callback registered with the DebugCallbackRegistry for event_key.
    +   *
        * Each debug op listed in debug_ops will publish its output tensor (debug
        * signal) to all URLs in debug_urls.
    +   *
        * N.B. Session::Run() supports concurrent invocations of the same inputs
        * (feed keys), outputs and target nodes. If such concurrent invocations
        * are to be debugged, the callers of Session::Run() must use distinct
    @@ -174,16 +185,19 @@ public interface DebugTensorWatchOrBuilder extends
       /**
        * 
        * URL(s) for debug targets(s).
    +   *
        * Supported URL formats are:
    -   *   - file:///foo/tfdbg_dump: Writes out Event content to file
    -   *     /foo/tfdbg_dump.  Assumes all directories can be created if they don't
    -   *     already exist.
    -   *   - grpc://localhost:11011: Sends an RPC request to an EventListener
    -   *     service running at localhost:11011 with the event.
    -   *   - memcbk:///event_key: Routes tensors to clients using the
    -   *     callback registered with the DebugCallbackRegistry for event_key.
    +   * - file:///foo/tfdbg_dump: Writes out Event content to file
    +   * /foo/tfdbg_dump.  Assumes all directories can be created if they don't
    +   * already exist.
    +   * - grpc://localhost:11011: Sends an RPC request to an EventListener
    +   * service running at localhost:11011 with the event.
    +   * - memcbk:///event_key: Routes tensors to clients using the
    +   * callback registered with the DebugCallbackRegistry for event_key.
    +   *
        * Each debug op listed in debug_ops will publish its output tensor (debug
        * signal) to all URLs in debug_urls.
    +   *
        * N.B. Session::Run() supports concurrent invocations of the same inputs
        * (feed keys), outputs and target nodes. If such concurrent invocations
        * are to be debugged, the callers of Session::Run() must use distinct
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedDevice.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedDevice.java
    index c71b3e7eb99..d8d0b77e13c 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedDevice.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedDevice.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/debug_event.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,37 +13,34 @@
      * Protobuf type {@code tensorflow.DebuggedDevice}
      */
     public final class DebuggedDevice extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.DebuggedDevice)
         DebuggedDeviceOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      DebuggedDevice.class.getName());
    +  }
       // Use DebuggedDevice.newBuilder() to construct.
    -  private DebuggedDevice(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private DebuggedDevice(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private DebuggedDevice() {
         deviceName_ = "";
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new DebuggedDevice();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.DebugEventProtos.internal_static_tensorflow_DebuggedDevice_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.DebugEventProtos.internal_static_tensorflow_DebuggedDevice_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -49,7 +48,8 @@ protected java.lang.Object newInstance(
       }
     
       public static final int DEVICE_NAME_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object deviceName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object deviceName_ = "";
       /**
        * 
        * Name of the device.
    @@ -95,7 +95,7 @@ public java.lang.String getDeviceName() {
       }
     
       public static final int DEVICE_ID_FIELD_NUMBER = 2;
    -  private int deviceId_;
    +  private int deviceId_ = 0;
       /**
        * 
        * A debugger-generated ID for the device. Guaranteed to be unique within
    @@ -126,8 +126,8 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, deviceName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(deviceName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, deviceName_);
         }
         if (deviceId_ != 0) {
           output.writeInt32(2, deviceId_);
    @@ -141,8 +141,8 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, deviceName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(deviceName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, deviceName_);
         }
         if (deviceId_ != 0) {
           size += com.google.protobuf.CodedOutputStream
    @@ -221,39 +221,41 @@ public static org.tensorflow.proto.DebuggedDevice parseFrom(
       }
       public static org.tensorflow.proto.DebuggedDevice parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.DebuggedDevice parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.DebuggedDevice parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.DebuggedDevice parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.DebuggedDevice parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.DebuggedDevice parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -273,7 +275,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -285,7 +287,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.DebuggedDevice}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.DebuggedDevice)
           org.tensorflow.proto.DebuggedDeviceOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -294,7 +296,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.DebugEventProtos.internal_static_tensorflow_DebuggedDevice_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -307,17 +309,16 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           deviceName_ = "";
    -
           deviceId_ = 0;
    -
           return this;
         }
     
    @@ -344,44 +345,21 @@ public org.tensorflow.proto.DebuggedDevice build() {
         @java.lang.Override
         public org.tensorflow.proto.DebuggedDevice buildPartial() {
           org.tensorflow.proto.DebuggedDevice result = new org.tensorflow.proto.DebuggedDevice(this);
    -      result.deviceName_ = deviceName_;
    -      result.deviceId_ = deviceId_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.DebuggedDevice result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.deviceName_ = deviceName_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.deviceId_ = deviceId_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.DebuggedDevice) {
    @@ -396,6 +374,7 @@ public Builder mergeFrom(org.tensorflow.proto.DebuggedDevice other) {
           if (other == org.tensorflow.proto.DebuggedDevice.getDefaultInstance()) return this;
           if (!other.getDeviceName().isEmpty()) {
             deviceName_ = other.deviceName_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (other.getDeviceId() != 0) {
    @@ -429,12 +408,12 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   deviceName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 16: {
                   deviceId_ = input.readInt32();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 16
                 default: {
    @@ -452,6 +431,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private java.lang.Object deviceName_ = "";
         /**
    @@ -506,11 +486,9 @@ public java.lang.String getDeviceName() {
          */
         public Builder setDeviceName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           deviceName_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -523,8 +501,8 @@ public Builder setDeviceName(
          * @return This builder for chaining.
          */
         public Builder clearDeviceName() {
    -      
           deviceName_ = getDefaultInstance().getDeviceName();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -539,12 +517,10 @@ public Builder clearDeviceName() {
          */
         public Builder setDeviceNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           deviceName_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -578,8 +554,9 @@ public int getDeviceId() {
          * @return This builder for chaining.
          */
         public Builder setDeviceId(int value) {
    -      
    +
           deviceId_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -595,23 +572,11 @@ public Builder setDeviceId(int value) {
          * @return This builder for chaining.
          */
         public Builder clearDeviceId() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000002);
           deviceId_ = 0;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.DebuggedDevice)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedDeviceOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedDeviceOrBuilder.java
    index 2b24df1e4df..4544692e491 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedDeviceOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedDeviceOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/debug_event.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedGraph.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedGraph.java
    index f5fd44da761..d56c83a856d 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedGraph.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedGraph.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/debug_event.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,42 +13,40 @@
      * Protobuf type {@code tensorflow.DebuggedGraph}
      */
     public final class DebuggedGraph extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.DebuggedGraph)
         DebuggedGraphOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      DebuggedGraph.class.getName());
    +  }
       // Use DebuggedGraph.newBuilder() to construct.
    -  private DebuggedGraph(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private DebuggedGraph(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private DebuggedGraph() {
         graphId_ = "";
         graphName_ = "";
    -    instrumentedOps_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +    instrumentedOps_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         originalGraphDef_ = com.google.protobuf.ByteString.EMPTY;
         instrumentedGraphDef_ = com.google.protobuf.ByteString.EMPTY;
         outerContextId_ = "";
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new DebuggedGraph();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.DebugEventProtos.internal_static_tensorflow_DebuggedGraph_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.DebugEventProtos.internal_static_tensorflow_DebuggedGraph_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -54,7 +54,8 @@ protected java.lang.Object newInstance(
       }
     
       public static final int GRAPH_ID_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object graphId_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object graphId_ = "";
       /**
        * 
        * An ID for the graph.
    @@ -102,7 +103,8 @@ public java.lang.String getGraphId() {
       }
     
       public static final int GRAPH_NAME_FIELD_NUMBER = 2;
    -  private volatile java.lang.Object graphName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object graphName_ = "";
       /**
        * 
        * Name of the graph (if available).
    @@ -148,7 +150,9 @@ public java.lang.String getGraphName() {
       }
     
       public static final int INSTRUMENTED_OPS_FIELD_NUMBER = 3;
    -  private com.google.protobuf.LazyStringList instrumentedOps_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.LazyStringArrayList instrumentedOps_ =
    +      com.google.protobuf.LazyStringArrayList.emptyList();
       /**
        * 
        * Names of the instrumented ops. This can be used to look up op name
    @@ -203,7 +207,7 @@ public java.lang.String getInstrumentedOps(int index) {
       }
     
       public static final int ORIGINAL_GRAPH_DEF_FIELD_NUMBER = 4;
    -  private com.google.protobuf.ByteString originalGraphDef_;
    +  private com.google.protobuf.ByteString originalGraphDef_ = com.google.protobuf.ByteString.EMPTY;
       /**
        * 
        * Original (uninstrumented) GraphDef (if available).
    @@ -218,7 +222,7 @@ public com.google.protobuf.ByteString getOriginalGraphDef() {
       }
     
       public static final int INSTRUMENTED_GRAPH_DEF_FIELD_NUMBER = 5;
    -  private com.google.protobuf.ByteString instrumentedGraphDef_;
    +  private com.google.protobuf.ByteString instrumentedGraphDef_ = com.google.protobuf.ByteString.EMPTY;
       /**
        * 
        * An encoded version of a GraphDef.
    @@ -234,7 +238,8 @@ public com.google.protobuf.ByteString getInstrumentedGraphDef() {
       }
     
       public static final int OUTER_CONTEXT_ID_FIELD_NUMBER = 6;
    -  private volatile java.lang.Object outerContextId_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object outerContextId_ = "";
       /**
        * 
        * IDs of the immediate enclosing context (graph), if any.
    @@ -293,14 +298,14 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(graphId_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, graphId_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(graphId_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, graphId_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(graphName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, graphName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(graphName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 2, graphName_);
         }
         for (int i = 0; i < instrumentedOps_.size(); i++) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, instrumentedOps_.getRaw(i));
    +      com.google.protobuf.GeneratedMessage.writeString(output, 3, instrumentedOps_.getRaw(i));
         }
         if (!originalGraphDef_.isEmpty()) {
           output.writeBytes(4, originalGraphDef_);
    @@ -308,8 +313,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         if (!instrumentedGraphDef_.isEmpty()) {
           output.writeBytes(5, instrumentedGraphDef_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(outerContextId_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, outerContextId_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(outerContextId_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 6, outerContextId_);
         }
         getUnknownFields().writeTo(output);
       }
    @@ -320,11 +325,11 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(graphId_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, graphId_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(graphId_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, graphId_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(graphName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, graphName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(graphName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(2, graphName_);
         }
         {
           int dataSize = 0;
    @@ -342,8 +347,8 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeBytesSize(5, instrumentedGraphDef_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(outerContextId_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, outerContextId_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(outerContextId_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(6, outerContextId_);
         }
         size += getUnknownFields().getSerializedSize();
         memoizedSize = size;
    @@ -436,39 +441,41 @@ public static org.tensorflow.proto.DebuggedGraph parseFrom(
       }
       public static org.tensorflow.proto.DebuggedGraph parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.DebuggedGraph parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.DebuggedGraph parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.DebuggedGraph parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.DebuggedGraph parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.DebuggedGraph parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -488,7 +495,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -500,7 +507,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.DebuggedGraph}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.DebuggedGraph)
           org.tensorflow.proto.DebuggedGraphOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -509,7 +516,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.DebugEventProtos.internal_static_tensorflow_DebuggedGraph_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -522,25 +529,21 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           graphId_ = "";
    -
           graphName_ = "";
    -
    -      instrumentedOps_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      instrumentedOps_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
           originalGraphDef_ = com.google.protobuf.ByteString.EMPTY;
    -
           instrumentedGraphDef_ = com.google.protobuf.ByteString.EMPTY;
    -
           outerContextId_ = "";
    -
           return this;
         }
     
    @@ -567,53 +570,34 @@ public org.tensorflow.proto.DebuggedGraph build() {
         @java.lang.Override
         public org.tensorflow.proto.DebuggedGraph buildPartial() {
           org.tensorflow.proto.DebuggedGraph result = new org.tensorflow.proto.DebuggedGraph(this);
    -      int from_bitField0_ = bitField0_;
    -      result.graphId_ = graphId_;
    -      result.graphName_ = graphName_;
    -      if (((bitField0_ & 0x00000001) != 0)) {
    -        instrumentedOps_ = instrumentedOps_.getUnmodifiableView();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    -      }
    -      result.instrumentedOps_ = instrumentedOps_;
    -      result.originalGraphDef_ = originalGraphDef_;
    -      result.instrumentedGraphDef_ = instrumentedGraphDef_;
    -      result.outerContextId_ = outerContextId_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.DebuggedGraph result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.graphId_ = graphId_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.graphName_ = graphName_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        instrumentedOps_.makeImmutable();
    +        result.instrumentedOps_ = instrumentedOps_;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.originalGraphDef_ = originalGraphDef_;
    +      }
    +      if (((from_bitField0_ & 0x00000010) != 0)) {
    +        result.instrumentedGraphDef_ = instrumentedGraphDef_;
    +      }
    +      if (((from_bitField0_ & 0x00000020) != 0)) {
    +        result.outerContextId_ = outerContextId_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.DebuggedGraph) {
    @@ -628,16 +612,18 @@ public Builder mergeFrom(org.tensorflow.proto.DebuggedGraph other) {
           if (other == org.tensorflow.proto.DebuggedGraph.getDefaultInstance()) return this;
           if (!other.getGraphId().isEmpty()) {
             graphId_ = other.graphId_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (!other.getGraphName().isEmpty()) {
             graphName_ = other.graphName_;
    +        bitField0_ |= 0x00000002;
             onChanged();
           }
           if (!other.instrumentedOps_.isEmpty()) {
             if (instrumentedOps_.isEmpty()) {
               instrumentedOps_ = other.instrumentedOps_;
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ |= 0x00000004;
             } else {
               ensureInstrumentedOpsIsMutable();
               instrumentedOps_.addAll(other.instrumentedOps_);
    @@ -652,6 +638,7 @@ public Builder mergeFrom(org.tensorflow.proto.DebuggedGraph other) {
           }
           if (!other.getOuterContextId().isEmpty()) {
             outerContextId_ = other.outerContextId_;
    +        bitField0_ |= 0x00000020;
             onChanged();
           }
           this.mergeUnknownFields(other.getUnknownFields());
    @@ -682,12 +669,12 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   graphId_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
                   graphName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 case 26: {
    @@ -698,17 +685,17 @@ public Builder mergeFrom(
                 } // case 26
                 case 34: {
                   originalGraphDef_ = input.readBytes();
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 34
                 case 42: {
                   instrumentedGraphDef_ = input.readBytes();
    -
    +              bitField0_ |= 0x00000010;
                   break;
                 } // case 42
                 case 50: {
                   outerContextId_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000020;
                   break;
                 } // case 50
                 default: {
    @@ -784,11 +771,9 @@ public java.lang.String getGraphId() {
          */
         public Builder setGraphId(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           graphId_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -802,8 +787,8 @@ public Builder setGraphId(
          * @return This builder for chaining.
          */
         public Builder clearGraphId() {
    -      
           graphId_ = getDefaultInstance().getGraphId();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -819,12 +804,10 @@ public Builder clearGraphId() {
          */
         public Builder setGraphIdBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           graphId_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -882,11 +865,9 @@ public java.lang.String getGraphName() {
          */
         public Builder setGraphName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           graphName_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -899,8 +880,8 @@ public Builder setGraphName(
          * @return This builder for chaining.
          */
         public Builder clearGraphName() {
    -      
           graphName_ = getDefaultInstance().getGraphName();
    +      bitField0_ = (bitField0_ & ~0x00000002);
           onChanged();
           return this;
         }
    @@ -915,22 +896,21 @@ public Builder clearGraphName() {
          */
         public Builder setGraphNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           graphName_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
     
    -    private com.google.protobuf.LazyStringList instrumentedOps_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +    private com.google.protobuf.LazyStringArrayList instrumentedOps_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         private void ensureInstrumentedOpsIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    +      if (!instrumentedOps_.isModifiable()) {
             instrumentedOps_ = new com.google.protobuf.LazyStringArrayList(instrumentedOps_);
    -        bitField0_ |= 0x00000001;
    -       }
    +      }
    +      bitField0_ |= 0x00000004;
         }
         /**
          * 
    @@ -943,7 +923,8 @@ private void ensureInstrumentedOpsIsMutable() {
          */
         public com.google.protobuf.ProtocolStringList
             getInstrumentedOpsList() {
    -      return instrumentedOps_.getUnmodifiableView();
    +      instrumentedOps_.makeImmutable();
    +      return instrumentedOps_;
         }
         /**
          * 
    @@ -997,11 +978,10 @@ public java.lang.String getInstrumentedOps(int index) {
          */
         public Builder setInstrumentedOps(
             int index, java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureInstrumentedOpsIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureInstrumentedOpsIsMutable();
           instrumentedOps_.set(index, value);
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -1017,11 +997,10 @@ public Builder setInstrumentedOps(
          */
         public Builder addInstrumentedOps(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureInstrumentedOpsIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureInstrumentedOpsIsMutable();
           instrumentedOps_.add(value);
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -1040,6 +1019,7 @@ public Builder addAllInstrumentedOps(
           ensureInstrumentedOpsIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, instrumentedOps_);
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -1053,8 +1033,9 @@ public Builder addAllInstrumentedOps(
          * @return This builder for chaining.
          */
         public Builder clearInstrumentedOps() {
    -      instrumentedOps_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      instrumentedOps_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
    +      bitField0_ = (bitField0_ & ~0x00000004);;
           onChanged();
           return this;
         }
    @@ -1070,12 +1051,11 @@ public Builder clearInstrumentedOps() {
          */
         public Builder addInstrumentedOpsBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           ensureInstrumentedOpsIsMutable();
           instrumentedOps_.add(value);
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -1103,11 +1083,9 @@ public com.google.protobuf.ByteString getOriginalGraphDef() {
          * @return This builder for chaining.
          */
         public Builder setOriginalGraphDef(com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           originalGraphDef_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -1120,7 +1098,7 @@ public Builder setOriginalGraphDef(com.google.protobuf.ByteString value) {
          * @return This builder for chaining.
          */
         public Builder clearOriginalGraphDef() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000008);
           originalGraphDef_ = getDefaultInstance().getOriginalGraphDef();
           onChanged();
           return this;
    @@ -1151,11 +1129,9 @@ public com.google.protobuf.ByteString getInstrumentedGraphDef() {
          * @return This builder for chaining.
          */
         public Builder setInstrumentedGraphDef(com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           instrumentedGraphDef_ = value;
    +      bitField0_ |= 0x00000010;
           onChanged();
           return this;
         }
    @@ -1169,7 +1145,7 @@ public Builder setInstrumentedGraphDef(com.google.protobuf.ByteString value) {
          * @return This builder for chaining.
          */
         public Builder clearInstrumentedGraphDef() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000010);
           instrumentedGraphDef_ = getDefaultInstance().getInstrumentedGraphDef();
           onChanged();
           return this;
    @@ -1228,11 +1204,9 @@ public java.lang.String getOuterContextId() {
          */
         public Builder setOuterContextId(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           outerContextId_ = value;
    +      bitField0_ |= 0x00000020;
           onChanged();
           return this;
         }
    @@ -1245,8 +1219,8 @@ public Builder setOuterContextId(
          * @return This builder for chaining.
          */
         public Builder clearOuterContextId() {
    -      
           outerContextId_ = getDefaultInstance().getOuterContextId();
    +      bitField0_ = (bitField0_ & ~0x00000020);
           onChanged();
           return this;
         }
    @@ -1261,27 +1235,13 @@ public Builder clearOuterContextId() {
          */
         public Builder setOuterContextIdBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           outerContextId_ = value;
    +      bitField0_ |= 0x00000020;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.DebuggedGraph)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedGraphOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedGraphOrBuilder.java
    index 4118e356516..e4115e8f5f5 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedGraphOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedGraphOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/debug_event.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedSourceFile.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedSourceFile.java
    index 77ac7451f3e..66704f19966 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedSourceFile.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedSourceFile.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/debug.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,39 +9,37 @@
      * Protobuf type {@code tensorflow.DebuggedSourceFile}
      */
     public final class DebuggedSourceFile extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.DebuggedSourceFile)
         DebuggedSourceFileOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      DebuggedSourceFile.class.getName());
    +  }
       // Use DebuggedSourceFile.newBuilder() to construct.
    -  private DebuggedSourceFile(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private DebuggedSourceFile(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private DebuggedSourceFile() {
         host_ = "";
         filePath_ = "";
    -    lines_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -  }
    -
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new DebuggedSourceFile();
    +    lines_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
       }
     
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.DebugProtos.internal_static_tensorflow_DebuggedSourceFile_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.DebugProtos.internal_static_tensorflow_DebuggedSourceFile_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -47,7 +47,8 @@ protected java.lang.Object newInstance(
       }
     
       public static final int HOST_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object host_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object host_ = "";
       /**
        * 
        * The host name on which a source code file is located.
    @@ -93,7 +94,8 @@ public java.lang.String getHost() {
       }
     
       public static final int FILE_PATH_FIELD_NUMBER = 2;
    -  private volatile java.lang.Object filePath_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object filePath_ = "";
       /**
        * 
        * Path to the source code file.
    @@ -139,7 +141,7 @@ public java.lang.String getFilePath() {
       }
     
       public static final int LAST_MODIFIED_FIELD_NUMBER = 3;
    -  private long lastModified_;
    +  private long lastModified_ = 0L;
       /**
        * 
        * The timestamp at which the source code file is last modified.
    @@ -154,7 +156,7 @@ public long getLastModified() {
       }
     
       public static final int BYTES_FIELD_NUMBER = 4;
    -  private long bytes_;
    +  private long bytes_ = 0L;
       /**
        * 
        * Byte size of the file.
    @@ -169,7 +171,9 @@ public long getBytes() {
       }
     
       public static final int LINES_FIELD_NUMBER = 5;
    -  private com.google.protobuf.LazyStringList lines_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.LazyStringArrayList lines_ =
    +      com.google.protobuf.LazyStringArrayList.emptyList();
       /**
        * 
        * Line-by-line content of the source code file.
    @@ -233,11 +237,11 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(host_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, host_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(host_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, host_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filePath_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filePath_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filePath_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 2, filePath_);
         }
         if (lastModified_ != 0L) {
           output.writeInt64(3, lastModified_);
    @@ -246,7 +250,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           output.writeInt64(4, bytes_);
         }
         for (int i = 0; i < lines_.size(); i++) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, lines_.getRaw(i));
    +      com.google.protobuf.GeneratedMessage.writeString(output, 5, lines_.getRaw(i));
         }
         getUnknownFields().writeTo(output);
       }
    @@ -257,11 +261,11 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(host_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, host_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(host_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, host_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filePath_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filePath_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filePath_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(2, filePath_);
         }
         if (lastModified_ != 0L) {
           size += com.google.protobuf.CodedOutputStream
    @@ -368,39 +372,41 @@ public static org.tensorflow.proto.DebuggedSourceFile parseFrom(
       }
       public static org.tensorflow.proto.DebuggedSourceFile parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.DebuggedSourceFile parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.DebuggedSourceFile parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.DebuggedSourceFile parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.DebuggedSourceFile parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.DebuggedSourceFile parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -420,7 +426,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -428,7 +434,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.DebuggedSourceFile}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.DebuggedSourceFile)
           org.tensorflow.proto.DebuggedSourceFileOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -437,7 +443,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.DebugProtos.internal_static_tensorflow_DebuggedSourceFile_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -450,23 +456,20 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           host_ = "";
    -
           filePath_ = "";
    -
           lastModified_ = 0L;
    -
           bytes_ = 0L;
    -
    -      lines_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      lines_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
           return this;
         }
     
    @@ -493,52 +496,31 @@ public org.tensorflow.proto.DebuggedSourceFile build() {
         @java.lang.Override
         public org.tensorflow.proto.DebuggedSourceFile buildPartial() {
           org.tensorflow.proto.DebuggedSourceFile result = new org.tensorflow.proto.DebuggedSourceFile(this);
    -      int from_bitField0_ = bitField0_;
    -      result.host_ = host_;
    -      result.filePath_ = filePath_;
    -      result.lastModified_ = lastModified_;
    -      result.bytes_ = bytes_;
    -      if (((bitField0_ & 0x00000001) != 0)) {
    -        lines_ = lines_.getUnmodifiableView();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    -      }
    -      result.lines_ = lines_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.DebuggedSourceFile result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.host_ = host_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.filePath_ = filePath_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.lastModified_ = lastModified_;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.bytes_ = bytes_;
    +      }
    +      if (((from_bitField0_ & 0x00000010) != 0)) {
    +        lines_.makeImmutable();
    +        result.lines_ = lines_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.DebuggedSourceFile) {
    @@ -553,10 +535,12 @@ public Builder mergeFrom(org.tensorflow.proto.DebuggedSourceFile other) {
           if (other == org.tensorflow.proto.DebuggedSourceFile.getDefaultInstance()) return this;
           if (!other.getHost().isEmpty()) {
             host_ = other.host_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (!other.getFilePath().isEmpty()) {
             filePath_ = other.filePath_;
    +        bitField0_ |= 0x00000002;
             onChanged();
           }
           if (other.getLastModified() != 0L) {
    @@ -568,7 +552,7 @@ public Builder mergeFrom(org.tensorflow.proto.DebuggedSourceFile other) {
           if (!other.lines_.isEmpty()) {
             if (lines_.isEmpty()) {
               lines_ = other.lines_;
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ |= 0x00000010;
             } else {
               ensureLinesIsMutable();
               lines_.addAll(other.lines_);
    @@ -603,22 +587,22 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   host_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
                   filePath_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 case 24: {
                   lastModified_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 24
                 case 32: {
                   bytes_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 32
                 case 42: {
    @@ -697,11 +681,9 @@ public java.lang.String getHost() {
          */
         public Builder setHost(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           host_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -714,8 +696,8 @@ public Builder setHost(
          * @return This builder for chaining.
          */
         public Builder clearHost() {
    -      
           host_ = getDefaultInstance().getHost();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -730,12 +712,10 @@ public Builder clearHost() {
          */
         public Builder setHostBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           host_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -793,11 +773,9 @@ public java.lang.String getFilePath() {
          */
         public Builder setFilePath(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           filePath_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -810,8 +788,8 @@ public Builder setFilePath(
          * @return This builder for chaining.
          */
         public Builder clearFilePath() {
    -      
           filePath_ = getDefaultInstance().getFilePath();
    +      bitField0_ = (bitField0_ & ~0x00000002);
           onChanged();
           return this;
         }
    @@ -826,12 +804,10 @@ public Builder clearFilePath() {
          */
         public Builder setFilePathBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           filePath_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -859,8 +835,9 @@ public long getLastModified() {
          * @return This builder for chaining.
          */
         public Builder setLastModified(long value) {
    -      
    +
           lastModified_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -873,7 +850,7 @@ public Builder setLastModified(long value) {
          * @return This builder for chaining.
          */
         public Builder clearLastModified() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000004);
           lastModified_ = 0L;
           onChanged();
           return this;
    @@ -902,8 +879,9 @@ public long getBytes() {
          * @return This builder for chaining.
          */
         public Builder setBytes(long value) {
    -      
    +
           bytes_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -916,18 +894,19 @@ public Builder setBytes(long value) {
          * @return This builder for chaining.
          */
         public Builder clearBytes() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000008);
           bytes_ = 0L;
           onChanged();
           return this;
         }
     
    -    private com.google.protobuf.LazyStringList lines_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +    private com.google.protobuf.LazyStringArrayList lines_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         private void ensureLinesIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    +      if (!lines_.isModifiable()) {
             lines_ = new com.google.protobuf.LazyStringArrayList(lines_);
    -        bitField0_ |= 0x00000001;
    -       }
    +      }
    +      bitField0_ |= 0x00000010;
         }
         /**
          * 
    @@ -939,7 +918,8 @@ private void ensureLinesIsMutable() {
          */
         public com.google.protobuf.ProtocolStringList
             getLinesList() {
    -      return lines_.getUnmodifiableView();
    +      lines_.makeImmutable();
    +      return lines_;
         }
         /**
          * 
    @@ -989,11 +969,10 @@ public java.lang.String getLines(int index) {
          */
         public Builder setLines(
             int index, java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureLinesIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureLinesIsMutable();
           lines_.set(index, value);
    +      bitField0_ |= 0x00000010;
           onChanged();
           return this;
         }
    @@ -1008,11 +987,10 @@ public Builder setLines(
          */
         public Builder addLines(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureLinesIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureLinesIsMutable();
           lines_.add(value);
    +      bitField0_ |= 0x00000010;
           onChanged();
           return this;
         }
    @@ -1030,6 +1008,7 @@ public Builder addAllLines(
           ensureLinesIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, lines_);
    +      bitField0_ |= 0x00000010;
           onChanged();
           return this;
         }
    @@ -1042,8 +1021,9 @@ public Builder addAllLines(
          * @return This builder for chaining.
          */
         public Builder clearLines() {
    -      lines_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      lines_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
    +      bitField0_ = (bitField0_ & ~0x00000010);;
           onChanged();
           return this;
         }
    @@ -1058,27 +1038,14 @@ public Builder clearLines() {
          */
         public Builder addLinesBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           ensureLinesIsMutable();
           lines_.add(value);
    +      bitField0_ |= 0x00000010;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.DebuggedSourceFile)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedSourceFileOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedSourceFileOrBuilder.java
    index dd46e4ec55d..7ef7f4bae46 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedSourceFileOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedSourceFileOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/debug.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedSourceFiles.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedSourceFiles.java
    index e4591aba13f..878ca2718a3 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedSourceFiles.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedSourceFiles.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/debug.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,37 +9,34 @@
      * Protobuf type {@code tensorflow.DebuggedSourceFiles}
      */
     public final class DebuggedSourceFiles extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.DebuggedSourceFiles)
         DebuggedSourceFilesOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      DebuggedSourceFiles.class.getName());
    +  }
       // Use DebuggedSourceFiles.newBuilder() to construct.
    -  private DebuggedSourceFiles(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private DebuggedSourceFiles(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private DebuggedSourceFiles() {
         sourceFiles_ = java.util.Collections.emptyList();
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new DebuggedSourceFiles();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.DebugProtos.internal_static_tensorflow_DebuggedSourceFiles_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.DebugProtos.internal_static_tensorflow_DebuggedSourceFiles_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -45,6 +44,7 @@ protected java.lang.Object newInstance(
       }
     
       public static final int SOURCE_FILES_FIELD_NUMBER = 1;
    +  @SuppressWarnings("serial")
       private java.util.List sourceFiles_;
       /**
        * 
    @@ -205,39 +205,41 @@ public static org.tensorflow.proto.DebuggedSourceFiles parseFrom(
       }
       public static org.tensorflow.proto.DebuggedSourceFiles parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.DebuggedSourceFiles parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.DebuggedSourceFiles parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.DebuggedSourceFiles parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.DebuggedSourceFiles parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.DebuggedSourceFiles parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -257,7 +259,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -265,7 +267,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.DebuggedSourceFiles}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.DebuggedSourceFiles)
           org.tensorflow.proto.DebuggedSourceFilesOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -274,7 +276,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.DebugProtos.internal_static_tensorflow_DebuggedSourceFiles_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -287,13 +289,14 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           if (sourceFilesBuilder_ == null) {
             sourceFiles_ = java.util.Collections.emptyList();
           } else {
    @@ -327,7 +330,13 @@ public org.tensorflow.proto.DebuggedSourceFiles build() {
         @java.lang.Override
         public org.tensorflow.proto.DebuggedSourceFiles buildPartial() {
           org.tensorflow.proto.DebuggedSourceFiles result = new org.tensorflow.proto.DebuggedSourceFiles(this);
    -      int from_bitField0_ = bitField0_;
    +      buildPartialRepeatedFields(result);
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartialRepeatedFields(org.tensorflow.proto.DebuggedSourceFiles result) {
           if (sourceFilesBuilder_ == null) {
             if (((bitField0_ & 0x00000001) != 0)) {
               sourceFiles_ = java.util.Collections.unmodifiableList(sourceFiles_);
    @@ -337,42 +346,12 @@ public org.tensorflow.proto.DebuggedSourceFiles buildPartial() {
           } else {
             result.sourceFiles_ = sourceFilesBuilder_.build();
           }
    -      onBuilt();
    -      return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.DebuggedSourceFiles result) {
    +      int from_bitField0_ = bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.DebuggedSourceFiles) {
    @@ -404,7 +383,7 @@ public Builder mergeFrom(org.tensorflow.proto.DebuggedSourceFiles other) {
                 sourceFiles_ = other.sourceFiles_;
                 bitField0_ = (bitField0_ & ~0x00000001);
                 sourceFilesBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getSourceFilesFieldBuilder() : null;
               } else {
                 sourceFilesBuilder_.addAllMessages(other.sourceFiles_);
    @@ -476,7 +455,7 @@ private void ensureSourceFilesIsMutable() {
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.DebuggedSourceFile, org.tensorflow.proto.DebuggedSourceFile.Builder, org.tensorflow.proto.DebuggedSourceFileOrBuilder> sourceFilesBuilder_;
     
         /**
    @@ -764,11 +743,11 @@ public org.tensorflow.proto.DebuggedSourceFile.Builder addSourceFilesBuilder(
              getSourceFilesBuilderList() {
           return getSourceFilesFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.DebuggedSourceFile, org.tensorflow.proto.DebuggedSourceFile.Builder, org.tensorflow.proto.DebuggedSourceFileOrBuilder> 
             getSourceFilesFieldBuilder() {
           if (sourceFilesBuilder_ == null) {
    -        sourceFilesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        sourceFilesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.DebuggedSourceFile, org.tensorflow.proto.DebuggedSourceFile.Builder, org.tensorflow.proto.DebuggedSourceFileOrBuilder>(
                     sourceFiles_,
                     ((bitField0_ & 0x00000001) != 0),
    @@ -778,18 +757,6 @@ public org.tensorflow.proto.DebuggedSourceFile.Builder addSourceFilesBuilder(
           }
           return sourceFilesBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.DebuggedSourceFiles)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedSourceFilesOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedSourceFilesOrBuilder.java
    index d1371fa0576..143f2983d0f 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedSourceFilesOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedSourceFilesOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/debug.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceAttributes.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceAttributes.java
    index 44e03666490..47dfd9b5b6f 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceAttributes.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceAttributes.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/device_attributes.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,12 +9,21 @@
      * Protobuf type {@code tensorflow.DeviceAttributes}
      */
     public final class DeviceAttributes extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.DeviceAttributes)
         DeviceAttributesOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      DeviceAttributes.class.getName());
    +  }
       // Use DeviceAttributes.newBuilder() to construct.
    -  private DeviceAttributes(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private DeviceAttributes(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private DeviceAttributes() {
    @@ -21,33 +32,23 @@ private DeviceAttributes() {
         physicalDeviceDesc_ = "";
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new DeviceAttributes();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.DeviceAttributesProtos.internal_static_tensorflow_DeviceAttributes_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.DeviceAttributesProtos.internal_static_tensorflow_DeviceAttributes_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
                 org.tensorflow.proto.DeviceAttributes.class, org.tensorflow.proto.DeviceAttributes.Builder.class);
       }
     
    +  private int bitField0_;
       public static final int NAME_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object name_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object name_ = "";
       /**
        * 
        * Fully specified name of the device within a cluster.
    @@ -93,7 +94,8 @@ public java.lang.String getName() {
       }
     
       public static final int DEVICE_TYPE_FIELD_NUMBER = 2;
    -  private volatile java.lang.Object deviceType_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object deviceType_ = "";
       /**
        * 
        * String representation of device_type.
    @@ -139,7 +141,7 @@ public java.lang.String getDeviceType() {
       }
     
       public static final int MEMORY_LIMIT_FIELD_NUMBER = 4;
    -  private long memoryLimit_;
    +  private long memoryLimit_ = 0L;
       /**
        * 
        * Memory capacity of device in bytes.
    @@ -166,7 +168,7 @@ public long getMemoryLimit() {
        */
       @java.lang.Override
       public boolean hasLocality() {
    -    return locality_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * 
    @@ -191,11 +193,11 @@ public org.tensorflow.proto.DeviceLocality getLocality() {
        */
       @java.lang.Override
       public org.tensorflow.proto.DeviceLocalityOrBuilder getLocalityOrBuilder() {
    -    return getLocality();
    +    return locality_ == null ? org.tensorflow.proto.DeviceLocality.getDefaultInstance() : locality_;
       }
     
       public static final int INCARNATION_FIELD_NUMBER = 6;
    -  private long incarnation_;
    +  private long incarnation_ = 0L;
       /**
        * 
        * A device is assigned a global unique number each time it is
    @@ -211,7 +213,8 @@ public long getIncarnation() {
       }
     
       public static final int PHYSICAL_DEVICE_DESC_FIELD_NUMBER = 7;
    -  private volatile java.lang.Object physicalDeviceDesc_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object physicalDeviceDesc_ = "";
       /**
        * 
        * String representation of the physical device that this device maps to.
    @@ -257,7 +260,7 @@ public java.lang.String getPhysicalDeviceDesc() {
       }
     
       public static final int XLA_GLOBAL_ID_FIELD_NUMBER = 8;
    -  private long xlaGlobalId_;
    +  private long xlaGlobalId_ = 0L;
       /**
        * 
        * A physical device ID for use in XLA DeviceAssignments, unique across
    @@ -287,23 +290,23 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceType_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, deviceType_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(deviceType_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 2, deviceType_);
         }
         if (memoryLimit_ != 0L) {
           output.writeInt64(4, memoryLimit_);
         }
    -    if (locality_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(5, getLocality());
         }
         if (incarnation_ != 0L) {
           output.writeFixed64(6, incarnation_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(physicalDeviceDesc_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 7, physicalDeviceDesc_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(physicalDeviceDesc_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 7, physicalDeviceDesc_);
         }
         if (xlaGlobalId_ != 0L) {
           output.writeInt64(8, xlaGlobalId_);
    @@ -317,17 +320,17 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceType_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, deviceType_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(deviceType_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(2, deviceType_);
         }
         if (memoryLimit_ != 0L) {
           size += com.google.protobuf.CodedOutputStream
             .computeInt64Size(4, memoryLimit_);
         }
    -    if (locality_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(5, getLocality());
         }
    @@ -335,8 +338,8 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeFixed64Size(6, incarnation_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(physicalDeviceDesc_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, physicalDeviceDesc_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(physicalDeviceDesc_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(7, physicalDeviceDesc_);
         }
         if (xlaGlobalId_ != 0L) {
           size += com.google.protobuf.CodedOutputStream
    @@ -443,39 +446,41 @@ public static org.tensorflow.proto.DeviceAttributes parseFrom(
       }
       public static org.tensorflow.proto.DeviceAttributes parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.DeviceAttributes parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.DeviceAttributes parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.DeviceAttributes parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.DeviceAttributes parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.DeviceAttributes parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -495,7 +500,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -503,7 +508,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.DeviceAttributes}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.DeviceAttributes)
           org.tensorflow.proto.DeviceAttributesOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -512,7 +517,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.DeviceAttributesProtos.internal_static_tensorflow_DeviceAttributes_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -521,35 +526,35 @@ public static final class Builder extends
     
         // Construct using org.tensorflow.proto.DeviceAttributes.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getLocalityFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           name_ = "";
    -
           deviceType_ = "";
    -
           memoryLimit_ = 0L;
    -
    -      if (localityBuilder_ == null) {
    -        locality_ = null;
    -      } else {
    -        locality_ = null;
    +      locality_ = null;
    +      if (localityBuilder_ != null) {
    +        localityBuilder_.dispose();
             localityBuilder_ = null;
           }
           incarnation_ = 0L;
    -
           physicalDeviceDesc_ = "";
    -
           xlaGlobalId_ = 0L;
    -
           return this;
         }
     
    @@ -576,53 +581,41 @@ public org.tensorflow.proto.DeviceAttributes build() {
         @java.lang.Override
         public org.tensorflow.proto.DeviceAttributes buildPartial() {
           org.tensorflow.proto.DeviceAttributes result = new org.tensorflow.proto.DeviceAttributes(this);
    -      result.name_ = name_;
    -      result.deviceType_ = deviceType_;
    -      result.memoryLimit_ = memoryLimit_;
    -      if (localityBuilder_ == null) {
    -        result.locality_ = locality_;
    -      } else {
    -        result.locality_ = localityBuilder_.build();
    -      }
    -      result.incarnation_ = incarnation_;
    -      result.physicalDeviceDesc_ = physicalDeviceDesc_;
    -      result.xlaGlobalId_ = xlaGlobalId_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.DeviceAttributes result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.name_ = name_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.deviceType_ = deviceType_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.memoryLimit_ = memoryLimit_;
    +      }
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.locality_ = localityBuilder_ == null
    +            ? locality_
    +            : localityBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
    +      }
    +      if (((from_bitField0_ & 0x00000010) != 0)) {
    +        result.incarnation_ = incarnation_;
    +      }
    +      if (((from_bitField0_ & 0x00000020) != 0)) {
    +        result.physicalDeviceDesc_ = physicalDeviceDesc_;
    +      }
    +      if (((from_bitField0_ & 0x00000040) != 0)) {
    +        result.xlaGlobalId_ = xlaGlobalId_;
    +      }
    +      result.bitField0_ |= to_bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.DeviceAttributes) {
    @@ -637,10 +630,12 @@ public Builder mergeFrom(org.tensorflow.proto.DeviceAttributes other) {
           if (other == org.tensorflow.proto.DeviceAttributes.getDefaultInstance()) return this;
           if (!other.getName().isEmpty()) {
             name_ = other.name_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (!other.getDeviceType().isEmpty()) {
             deviceType_ = other.deviceType_;
    +        bitField0_ |= 0x00000002;
             onChanged();
           }
           if (other.getMemoryLimit() != 0L) {
    @@ -654,6 +649,7 @@ public Builder mergeFrom(org.tensorflow.proto.DeviceAttributes other) {
           }
           if (!other.getPhysicalDeviceDesc().isEmpty()) {
             physicalDeviceDesc_ = other.physicalDeviceDesc_;
    +        bitField0_ |= 0x00000020;
             onChanged();
           }
           if (other.getXlaGlobalId() != 0L) {
    @@ -687,39 +683,39 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   name_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
                   deviceType_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 case 32: {
                   memoryLimit_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 32
                 case 42: {
                   input.readMessage(
                       getLocalityFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 42
                 case 49: {
                   incarnation_ = input.readFixed64();
    -
    +              bitField0_ |= 0x00000010;
                   break;
                 } // case 49
                 case 58: {
                   physicalDeviceDesc_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000020;
                   break;
                 } // case 58
                 case 64: {
                   xlaGlobalId_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000040;
                   break;
                 } // case 64
                 default: {
    @@ -737,6 +733,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private java.lang.Object name_ = "";
         /**
    @@ -791,11 +788,9 @@ public java.lang.String getName() {
          */
         public Builder setName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           name_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -808,8 +803,8 @@ public Builder setName(
          * @return This builder for chaining.
          */
         public Builder clearName() {
    -      
           name_ = getDefaultInstance().getName();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -824,12 +819,10 @@ public Builder clearName() {
          */
         public Builder setNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           name_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -887,11 +880,9 @@ public java.lang.String getDeviceType() {
          */
         public Builder setDeviceType(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           deviceType_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -904,8 +895,8 @@ public Builder setDeviceType(
          * @return This builder for chaining.
          */
         public Builder clearDeviceType() {
    -      
           deviceType_ = getDefaultInstance().getDeviceType();
    +      bitField0_ = (bitField0_ & ~0x00000002);
           onChanged();
           return this;
         }
    @@ -920,12 +911,10 @@ public Builder clearDeviceType() {
          */
         public Builder setDeviceTypeBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           deviceType_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -953,8 +942,9 @@ public long getMemoryLimit() {
          * @return This builder for chaining.
          */
         public Builder setMemoryLimit(long value) {
    -      
    +
           memoryLimit_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -967,14 +957,14 @@ public Builder setMemoryLimit(long value) {
          * @return This builder for chaining.
          */
         public Builder clearMemoryLimit() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000004);
           memoryLimit_ = 0L;
           onChanged();
           return this;
         }
     
         private org.tensorflow.proto.DeviceLocality locality_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.DeviceLocality, org.tensorflow.proto.DeviceLocality.Builder, org.tensorflow.proto.DeviceLocalityOrBuilder> localityBuilder_;
         /**
          * 
    @@ -986,7 +976,7 @@ public Builder clearMemoryLimit() {
          * @return Whether the locality field is set.
          */
         public boolean hasLocality() {
    -      return localityBuilder_ != null || locality_ != null;
    +      return ((bitField0_ & 0x00000008) != 0);
         }
         /**
          * 
    @@ -1018,11 +1008,11 @@ public Builder setLocality(org.tensorflow.proto.DeviceLocality value) {
               throw new NullPointerException();
             }
             locality_ = value;
    -        onChanged();
           } else {
             localityBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000008;
    +      onChanged();
           return this;
         }
         /**
    @@ -1037,11 +1027,11 @@ public Builder setLocality(
             org.tensorflow.proto.DeviceLocality.Builder builderForValue) {
           if (localityBuilder_ == null) {
             locality_ = builderForValue.build();
    -        onChanged();
           } else {
             localityBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000008;
    +      onChanged();
           return this;
         }
         /**
    @@ -1054,17 +1044,20 @@ public Builder setLocality(
          */
         public Builder mergeLocality(org.tensorflow.proto.DeviceLocality value) {
           if (localityBuilder_ == null) {
    -        if (locality_ != null) {
    -          locality_ =
    -            org.tensorflow.proto.DeviceLocality.newBuilder(locality_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000008) != 0) &&
    +          locality_ != null &&
    +          locality_ != org.tensorflow.proto.DeviceLocality.getDefaultInstance()) {
    +          getLocalityBuilder().mergeFrom(value);
             } else {
               locality_ = value;
             }
    -        onChanged();
           } else {
             localityBuilder_.mergeFrom(value);
           }
    -
    +      if (locality_ != null) {
    +        bitField0_ |= 0x00000008;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -1076,14 +1069,13 @@ public Builder mergeLocality(org.tensorflow.proto.DeviceLocality value) {
          * .tensorflow.DeviceLocality locality = 5;
          */
         public Builder clearLocality() {
    -      if (localityBuilder_ == null) {
    -        locality_ = null;
    -        onChanged();
    -      } else {
    -        locality_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000008);
    +      locality_ = null;
    +      if (localityBuilder_ != null) {
    +        localityBuilder_.dispose();
             localityBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -1095,7 +1087,7 @@ public Builder clearLocality() {
          * .tensorflow.DeviceLocality locality = 5;
          */
         public org.tensorflow.proto.DeviceLocality.Builder getLocalityBuilder() {
    -      
    +      bitField0_ |= 0x00000008;
           onChanged();
           return getLocalityFieldBuilder().getBuilder();
         }
    @@ -1123,11 +1115,11 @@ public org.tensorflow.proto.DeviceLocalityOrBuilder getLocalityOrBuilder() {
          *
          * .tensorflow.DeviceLocality locality = 5;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.DeviceLocality, org.tensorflow.proto.DeviceLocality.Builder, org.tensorflow.proto.DeviceLocalityOrBuilder> 
             getLocalityFieldBuilder() {
           if (localityBuilder_ == null) {
    -        localityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        localityBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.DeviceLocality, org.tensorflow.proto.DeviceLocality.Builder, org.tensorflow.proto.DeviceLocalityOrBuilder>(
                     getLocality(),
                     getParentForChildren(),
    @@ -1162,8 +1154,9 @@ public long getIncarnation() {
          * @return This builder for chaining.
          */
         public Builder setIncarnation(long value) {
    -      
    +
           incarnation_ = value;
    +      bitField0_ |= 0x00000010;
           onChanged();
           return this;
         }
    @@ -1177,7 +1170,7 @@ public Builder setIncarnation(long value) {
          * @return This builder for chaining.
          */
         public Builder clearIncarnation() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000010);
           incarnation_ = 0L;
           onChanged();
           return this;
    @@ -1236,11 +1229,9 @@ public java.lang.String getPhysicalDeviceDesc() {
          */
         public Builder setPhysicalDeviceDesc(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           physicalDeviceDesc_ = value;
    +      bitField0_ |= 0x00000020;
           onChanged();
           return this;
         }
    @@ -1253,8 +1244,8 @@ public Builder setPhysicalDeviceDesc(
          * @return This builder for chaining.
          */
         public Builder clearPhysicalDeviceDesc() {
    -      
           physicalDeviceDesc_ = getDefaultInstance().getPhysicalDeviceDesc();
    +      bitField0_ = (bitField0_ & ~0x00000020);
           onChanged();
           return this;
         }
    @@ -1269,12 +1260,10 @@ public Builder clearPhysicalDeviceDesc() {
          */
         public Builder setPhysicalDeviceDescBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           physicalDeviceDesc_ = value;
    +      bitField0_ |= 0x00000020;
           onChanged();
           return this;
         }
    @@ -1306,8 +1295,9 @@ public long getXlaGlobalId() {
          * @return This builder for chaining.
          */
         public Builder setXlaGlobalId(long value) {
    -      
    +
           xlaGlobalId_ = value;
    +      bitField0_ |= 0x00000040;
           onChanged();
           return this;
         }
    @@ -1322,23 +1312,11 @@ public Builder setXlaGlobalId(long value) {
          * @return This builder for chaining.
          */
         public Builder clearXlaGlobalId() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000040);
           xlaGlobalId_ = 0L;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.DeviceAttributes)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceAttributesOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceAttributesOrBuilder.java
    index df70f5dc31d..4215a2a77bf 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceAttributesOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceAttributesOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/device_attributes.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceAttributesProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceAttributesProtos.java
    index 235a1bc6bed..fcfebe652af 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceAttributesProtos.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceAttributesProtos.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/device_attributes.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class DeviceAttributesProtos {
       private DeviceAttributesProtos() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      DeviceAttributesProtos.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,22 +28,22 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_InterconnectLink_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_InterconnectLink_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_LocalLinks_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_LocalLinks_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_DeviceLocality_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_DeviceLocality_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_DeviceAttributes_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_DeviceAttributes_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -67,27 +78,28 @@ public static void registerAllExtensions(
         internal_static_tensorflow_InterconnectLink_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_InterconnectLink_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_InterconnectLink_descriptor,
             new java.lang.String[] { "DeviceId", "Type", "Strength", });
         internal_static_tensorflow_LocalLinks_descriptor =
           getDescriptor().getMessageTypes().get(1);
         internal_static_tensorflow_LocalLinks_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_LocalLinks_descriptor,
             new java.lang.String[] { "Link", });
         internal_static_tensorflow_DeviceLocality_descriptor =
           getDescriptor().getMessageTypes().get(2);
         internal_static_tensorflow_DeviceLocality_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_DeviceLocality_descriptor,
             new java.lang.String[] { "BusId", "NumaNode", "Links", });
         internal_static_tensorflow_DeviceAttributes_descriptor =
           getDescriptor().getMessageTypes().get(3);
         internal_static_tensorflow_DeviceAttributes_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_DeviceAttributes_descriptor,
             new java.lang.String[] { "Name", "DeviceType", "MemoryLimit", "Locality", "Incarnation", "PhysicalDeviceDesc", "XlaGlobalId", });
    +    descriptor.resolveAllFeaturesImmutable();
       }
     
       // @@protoc_insertion_point(outer_class_scope)
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceFiltersProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceFiltersProtos.java
    index a3c1b43b4df..c8e12f949a0 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceFiltersProtos.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceFiltersProtos.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/device_filters.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class DeviceFiltersProtos {
       private DeviceFiltersProtos() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      DeviceFiltersProtos.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,22 +28,22 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_TaskDeviceFilters_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_TaskDeviceFilters_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_JobDeviceFilters_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_JobDeviceFilters_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_JobDeviceFilters_TasksEntry_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_JobDeviceFilters_TasksEntry_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_ClusterDeviceFilters_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_ClusterDeviceFilters_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -64,27 +75,28 @@ public static void registerAllExtensions(
         internal_static_tensorflow_TaskDeviceFilters_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_TaskDeviceFilters_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_TaskDeviceFilters_descriptor,
             new java.lang.String[] { "DeviceFilters", });
         internal_static_tensorflow_JobDeviceFilters_descriptor =
           getDescriptor().getMessageTypes().get(1);
         internal_static_tensorflow_JobDeviceFilters_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_JobDeviceFilters_descriptor,
             new java.lang.String[] { "Name", "Tasks", });
         internal_static_tensorflow_JobDeviceFilters_TasksEntry_descriptor =
           internal_static_tensorflow_JobDeviceFilters_descriptor.getNestedTypes().get(0);
         internal_static_tensorflow_JobDeviceFilters_TasksEntry_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_JobDeviceFilters_TasksEntry_descriptor,
             new java.lang.String[] { "Key", "Value", });
         internal_static_tensorflow_ClusterDeviceFilters_descriptor =
           getDescriptor().getMessageTypes().get(2);
         internal_static_tensorflow_ClusterDeviceFilters_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_ClusterDeviceFilters_descriptor,
             new java.lang.String[] { "Jobs", });
    +    descriptor.resolveAllFeaturesImmutable();
       }
     
       // @@protoc_insertion_point(outer_class_scope)
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceLocality.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceLocality.java
    index 3634671971a..518cc8fd33b 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceLocality.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceLocality.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/device_attributes.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,44 +9,42 @@
      * Protobuf type {@code tensorflow.DeviceLocality}
      */
     public final class DeviceLocality extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.DeviceLocality)
         DeviceLocalityOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      DeviceLocality.class.getName());
    +  }
       // Use DeviceLocality.newBuilder() to construct.
    -  private DeviceLocality(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private DeviceLocality(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private DeviceLocality() {
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new DeviceLocality();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.DeviceAttributesProtos.internal_static_tensorflow_DeviceLocality_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.DeviceAttributesProtos.internal_static_tensorflow_DeviceLocality_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
                 org.tensorflow.proto.DeviceLocality.class, org.tensorflow.proto.DeviceLocality.Builder.class);
       }
     
    +  private int bitField0_;
       public static final int BUS_ID_FIELD_NUMBER = 1;
    -  private int busId_;
    +  private int busId_ = 0;
       /**
        * 
        * Optional bus locality of device.  Default value of 0 means
    @@ -60,7 +60,7 @@ public int getBusId() {
       }
     
       public static final int NUMA_NODE_FIELD_NUMBER = 2;
    -  private int numaNode_;
    +  private int numaNode_ = 0;
       /**
        * 
        * Optional NUMA locality of device.
    @@ -86,7 +86,7 @@ public int getNumaNode() {
        */
       @java.lang.Override
       public boolean hasLinks() {
    -    return links_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * 
    @@ -109,7 +109,7 @@ public org.tensorflow.proto.LocalLinks getLinks() {
        */
       @java.lang.Override
       public org.tensorflow.proto.LocalLinksOrBuilder getLinksOrBuilder() {
    -    return getLinks();
    +    return links_ == null ? org.tensorflow.proto.LocalLinks.getDefaultInstance() : links_;
       }
     
       private byte memoizedIsInitialized = -1;
    @@ -132,7 +132,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         if (numaNode_ != 0) {
           output.writeInt32(2, numaNode_);
         }
    -    if (links_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(3, getLinks());
         }
         getUnknownFields().writeTo(output);
    @@ -152,7 +152,7 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeInt32Size(2, numaNode_);
         }
    -    if (links_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(3, getLinks());
         }
    @@ -238,39 +238,41 @@ public static org.tensorflow.proto.DeviceLocality parseFrom(
       }
       public static org.tensorflow.proto.DeviceLocality parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.DeviceLocality parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.DeviceLocality parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.DeviceLocality parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.DeviceLocality parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.DeviceLocality parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -290,7 +292,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -298,7 +300,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.DeviceLocality}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.DeviceLocality)
           org.tensorflow.proto.DeviceLocalityOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -307,7 +309,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.DeviceAttributesProtos.internal_static_tensorflow_DeviceLocality_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -316,25 +318,29 @@ public static final class Builder extends
     
         // Construct using org.tensorflow.proto.DeviceLocality.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getLinksFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           busId_ = 0;
    -
           numaNode_ = 0;
    -
    -      if (linksBuilder_ == null) {
    -        links_ = null;
    -      } else {
    -        links_ = null;
    +      links_ = null;
    +      if (linksBuilder_ != null) {
    +        linksBuilder_.dispose();
             linksBuilder_ = null;
           }
           return this;
    @@ -363,49 +369,29 @@ public org.tensorflow.proto.DeviceLocality build() {
         @java.lang.Override
         public org.tensorflow.proto.DeviceLocality buildPartial() {
           org.tensorflow.proto.DeviceLocality result = new org.tensorflow.proto.DeviceLocality(this);
    -      result.busId_ = busId_;
    -      result.numaNode_ = numaNode_;
    -      if (linksBuilder_ == null) {
    -        result.links_ = links_;
    -      } else {
    -        result.links_ = linksBuilder_.build();
    -      }
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.DeviceLocality result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.busId_ = busId_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.numaNode_ = numaNode_;
    +      }
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.links_ = linksBuilder_ == null
    +            ? links_
    +            : linksBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
    +      }
    +      result.bitField0_ |= to_bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.DeviceLocality) {
    @@ -455,19 +441,19 @@ public Builder mergeFrom(
                   break;
                 case 8: {
                   busId_ = input.readInt32();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 8
                 case 16: {
                   numaNode_ = input.readInt32();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 16
                 case 26: {
                   input.readMessage(
                       getLinksFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 26
                 default: {
    @@ -485,6 +471,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private int busId_ ;
         /**
    @@ -511,8 +498,9 @@ public int getBusId() {
          * @return This builder for chaining.
          */
         public Builder setBusId(int value) {
    -      
    +
           busId_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -526,7 +514,7 @@ public Builder setBusId(int value) {
          * @return This builder for chaining.
          */
         public Builder clearBusId() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000001);
           busId_ = 0;
           onChanged();
           return this;
    @@ -555,8 +543,9 @@ public int getNumaNode() {
          * @return This builder for chaining.
          */
         public Builder setNumaNode(int value) {
    -      
    +
           numaNode_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -569,14 +558,14 @@ public Builder setNumaNode(int value) {
          * @return This builder for chaining.
          */
         public Builder clearNumaNode() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000002);
           numaNode_ = 0;
           onChanged();
           return this;
         }
     
         private org.tensorflow.proto.LocalLinks links_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.LocalLinks, org.tensorflow.proto.LocalLinks.Builder, org.tensorflow.proto.LocalLinksOrBuilder> linksBuilder_;
         /**
          * 
    @@ -587,7 +576,7 @@ public Builder clearNumaNode() {
          * @return Whether the links field is set.
          */
         public boolean hasLinks() {
    -      return linksBuilder_ != null || links_ != null;
    +      return ((bitField0_ & 0x00000004) != 0);
         }
         /**
          * 
    @@ -617,11 +606,11 @@ public Builder setLinks(org.tensorflow.proto.LocalLinks value) {
               throw new NullPointerException();
             }
             links_ = value;
    -        onChanged();
           } else {
             linksBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000004;
    +      onChanged();
           return this;
         }
         /**
    @@ -635,11 +624,11 @@ public Builder setLinks(
             org.tensorflow.proto.LocalLinks.Builder builderForValue) {
           if (linksBuilder_ == null) {
             links_ = builderForValue.build();
    -        onChanged();
           } else {
             linksBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000004;
    +      onChanged();
           return this;
         }
         /**
    @@ -651,17 +640,20 @@ public Builder setLinks(
          */
         public Builder mergeLinks(org.tensorflow.proto.LocalLinks value) {
           if (linksBuilder_ == null) {
    -        if (links_ != null) {
    -          links_ =
    -            org.tensorflow.proto.LocalLinks.newBuilder(links_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000004) != 0) &&
    +          links_ != null &&
    +          links_ != org.tensorflow.proto.LocalLinks.getDefaultInstance()) {
    +          getLinksBuilder().mergeFrom(value);
             } else {
               links_ = value;
             }
    -        onChanged();
           } else {
             linksBuilder_.mergeFrom(value);
           }
    -
    +      if (links_ != null) {
    +        bitField0_ |= 0x00000004;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -672,14 +664,13 @@ public Builder mergeLinks(org.tensorflow.proto.LocalLinks value) {
          * .tensorflow.LocalLinks links = 3;
          */
         public Builder clearLinks() {
    -      if (linksBuilder_ == null) {
    -        links_ = null;
    -        onChanged();
    -      } else {
    -        links_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000004);
    +      links_ = null;
    +      if (linksBuilder_ != null) {
    +        linksBuilder_.dispose();
             linksBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -690,7 +681,7 @@ public Builder clearLinks() {
          * .tensorflow.LocalLinks links = 3;
          */
         public org.tensorflow.proto.LocalLinks.Builder getLinksBuilder() {
    -      
    +      bitField0_ |= 0x00000004;
           onChanged();
           return getLinksFieldBuilder().getBuilder();
         }
    @@ -716,11 +707,11 @@ public org.tensorflow.proto.LocalLinksOrBuilder getLinksOrBuilder() {
          *
          * .tensorflow.LocalLinks links = 3;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.LocalLinks, org.tensorflow.proto.LocalLinks.Builder, org.tensorflow.proto.LocalLinksOrBuilder> 
             getLinksFieldBuilder() {
           if (linksBuilder_ == null) {
    -        linksBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        linksBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.LocalLinks, org.tensorflow.proto.LocalLinks.Builder, org.tensorflow.proto.LocalLinksOrBuilder>(
                     getLinks(),
                     getParentForChildren(),
    @@ -729,18 +720,6 @@ public org.tensorflow.proto.LocalLinksOrBuilder getLinksOrBuilder() {
           }
           return linksBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.DeviceLocality)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceLocalityOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceLocalityOrBuilder.java
    index 5f5e16d0ee1..b236260b347 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceLocalityOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceLocalityOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/device_attributes.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DevicePropertiesProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DevicePropertiesProtos.java
    index 2ab281f964d..c02de359e02 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DevicePropertiesProtos.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DevicePropertiesProtos.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/device_properties.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class DevicePropertiesProtos {
       private DevicePropertiesProtos() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      DevicePropertiesProtos.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -141,7 +152,6 @@ boolean containsEnvironment(
          *
          * map<string, string> environment = 6;
          */
    -
         /* nullable */
     java.lang.String getEnvironmentOrDefault(
             java.lang.String key,
    @@ -155,7 +165,6 @@ java.lang.String getEnvironmentOrDefault(
          *
          * map<string, string> environment = 6;
          */
    -
         java.lang.String getEnvironmentOrThrow(
             java.lang.String key);
     
    @@ -234,12 +243,21 @@ java.lang.String getEnvironmentOrThrow(
        * Protobuf type {@code tensorflow.DeviceProperties}
        */
       public static final class DeviceProperties extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.DeviceProperties)
           DevicePropertiesOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        DeviceProperties.class.getName());
    +    }
         // Use DeviceProperties.newBuilder() to construct.
    -    private DeviceProperties(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private DeviceProperties(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private DeviceProperties() {
    @@ -248,18 +266,6 @@ private DeviceProperties() {
           model_ = "";
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new DeviceProperties();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.DevicePropertiesProtos.internal_static_tensorflow_DeviceProperties_descriptor;
    @@ -267,7 +273,7 @@ protected java.lang.Object newInstance(
     
         @SuppressWarnings({"rawtypes"})
         @java.lang.Override
    -    protected com.google.protobuf.MapField internalGetMapField(
    +    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
             int number) {
           switch (number) {
             case 6:
    @@ -278,7 +284,7 @@ protected com.google.protobuf.MapField internalGetMapField(
           }
         }
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.DevicePropertiesProtos.internal_static_tensorflow_DeviceProperties_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -286,7 +292,8 @@ protected com.google.protobuf.MapField internalGetMapField(
         }
     
         public static final int TYPE_FIELD_NUMBER = 1;
    -    private volatile java.lang.Object type_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object type_ = "";
         /**
          * 
          * Device type (CPU, GPU, ...)
    @@ -332,7 +339,8 @@ public java.lang.String getType() {
         }
     
         public static final int VENDOR_FIELD_NUMBER = 2;
    -    private volatile java.lang.Object vendor_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object vendor_ = "";
         /**
          * 
          * Vendor (Intel, nvidia, ...)
    @@ -378,7 +386,8 @@ public java.lang.String getVendor() {
         }
     
         public static final int MODEL_FIELD_NUMBER = 3;
    -    private volatile java.lang.Object model_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object model_ = "";
         /**
          * 
          * Model (Haswell, K40, ...)
    @@ -424,7 +433,7 @@ public java.lang.String getModel() {
         }
     
         public static final int FREQUENCY_FIELD_NUMBER = 4;
    -    private long frequency_;
    +    private long frequency_ = 0L;
         /**
          * 
          * Core Frequency in Mhz
    @@ -439,7 +448,7 @@ public long getFrequency() {
         }
     
         public static final int NUM_CORES_FIELD_NUMBER = 5;
    -    private long numCores_;
    +    private long numCores_ = 0L;
         /**
          * 
          * Number of cores
    @@ -465,6 +474,7 @@ private static final class EnvironmentDefaultEntryHolder {
                       com.google.protobuf.WireFormat.FieldType.STRING,
                       "");
         }
    +    @SuppressWarnings("serial")
         private com.google.protobuf.MapField<
             java.lang.String, java.lang.String> environment_;
         private com.google.protobuf.MapField
    @@ -475,7 +485,6 @@ private static final class EnvironmentDefaultEntryHolder {
           }
           return environment_;
         }
    -
         public int getEnvironmentCount() {
           return internalGetEnvironment().getMap().size();
         }
    @@ -487,7 +496,6 @@ public int getEnvironmentCount() {
          *
          * map<string, string> environment = 6;
          */
    -
         @java.lang.Override
         public boolean containsEnvironment(
             java.lang.String key) {
    @@ -511,7 +519,6 @@ public java.util.Map getEnvironment() {
          * map<string, string> environment = 6;
          */
         @java.lang.Override
    -
         public java.util.Map getEnvironmentMap() {
           return internalGetEnvironment().getMap();
         }
    @@ -524,10 +531,11 @@ public java.util.Map getEnvironmentMap() {
          * map<string, string> environment = 6;
          */
         @java.lang.Override
    -
    -    public java.lang.String getEnvironmentOrDefault(
    +    public /* nullable */
    +java.lang.String getEnvironmentOrDefault(
             java.lang.String key,
    -        java.lang.String defaultValue) {
    +        /* nullable */
    +java.lang.String defaultValue) {
           if (key == null) { throw new NullPointerException("map key"); }
           java.util.Map map =
               internalGetEnvironment().getMap();
    @@ -542,7 +550,6 @@ public java.lang.String getEnvironmentOrDefault(
          * map<string, string> environment = 6;
          */
         @java.lang.Override
    -
         public java.lang.String getEnvironmentOrThrow(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    @@ -555,7 +562,7 @@ public java.lang.String getEnvironmentOrThrow(
         }
     
         public static final int NUM_REGISTERS_FIELD_NUMBER = 7;
    -    private long numRegisters_;
    +    private long numRegisters_ = 0L;
         /**
          * 
          * Number of registers per core.
    @@ -570,7 +577,7 @@ public long getNumRegisters() {
         }
     
         public static final int L1_CACHE_SIZE_FIELD_NUMBER = 8;
    -    private long l1CacheSize_;
    +    private long l1CacheSize_ = 0L;
         /**
          * 
          * L1 cache size in bytes
    @@ -585,7 +592,7 @@ public long getL1CacheSize() {
         }
     
         public static final int L2_CACHE_SIZE_FIELD_NUMBER = 9;
    -    private long l2CacheSize_;
    +    private long l2CacheSize_ = 0L;
         /**
          * 
          * L2 cache size in bytes
    @@ -600,7 +607,7 @@ public long getL2CacheSize() {
         }
     
         public static final int L3_CACHE_SIZE_FIELD_NUMBER = 10;
    -    private long l3CacheSize_;
    +    private long l3CacheSize_ = 0L;
         /**
          * 
          * L3 cache size in bytes
    @@ -615,7 +622,7 @@ public long getL3CacheSize() {
         }
     
         public static final int SHARED_MEMORY_SIZE_PER_MULTIPROCESSOR_FIELD_NUMBER = 11;
    -    private long sharedMemorySizePerMultiprocessor_;
    +    private long sharedMemorySizePerMultiprocessor_ = 0L;
         /**
          * 
          * Shared memory size per multiprocessor in bytes. This field is
    @@ -631,7 +638,7 @@ public long getSharedMemorySizePerMultiprocessor() {
         }
     
         public static final int MEMORY_SIZE_FIELD_NUMBER = 12;
    -    private long memorySize_;
    +    private long memorySize_ = 0L;
         /**
          * 
          * Memory size in bytes
    @@ -646,7 +653,7 @@ public long getMemorySize() {
         }
     
         public static final int BANDWIDTH_FIELD_NUMBER = 13;
    -    private long bandwidth_;
    +    private long bandwidth_ = 0L;
         /**
          * 
          * Memory bandwidth in KB/s
    @@ -674,14 +681,14 @@ public final boolean isInitialized() {
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output)
                             throws java.io.IOException {
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(type_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 1, type_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vendor_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, vendor_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(vendor_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 2, vendor_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 3, model_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(model_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 3, model_);
           }
           if (frequency_ != 0L) {
             output.writeInt64(4, frequency_);
    @@ -689,7 +696,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           if (numCores_ != 0L) {
             output.writeInt64(5, numCores_);
           }
    -      com.google.protobuf.GeneratedMessageV3
    +      com.google.protobuf.GeneratedMessage
             .serializeStringMapTo(
               output,
               internalGetEnvironment(),
    @@ -725,14 +732,14 @@ public int getSerializedSize() {
           if (size != -1) return size;
     
           size = 0;
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(type_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, type_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vendor_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, vendor_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(vendor_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, vendor_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, model_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(model_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(3, model_);
           }
           if (frequency_ != 0L) {
             size += com.google.protobuf.CodedOutputStream
    @@ -908,39 +915,41 @@ public static org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties parse
         }
         public static org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -960,7 +969,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -968,7 +977,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.DeviceProperties}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.DeviceProperties)
             org.tensorflow.proto.DevicePropertiesProtos.DevicePropertiesOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -977,7 +986,7 @@ public static final class Builder extends
           }
     
           @SuppressWarnings({"rawtypes"})
    -      protected com.google.protobuf.MapField internalGetMapField(
    +      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
               int number) {
             switch (number) {
               case 6:
    @@ -988,7 +997,7 @@ protected com.google.protobuf.MapField internalGetMapField(
             }
           }
           @SuppressWarnings({"rawtypes"})
    -      protected com.google.protobuf.MapField internalGetMutableMapField(
    +      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
               int number) {
             switch (number) {
               case 6:
    @@ -999,7 +1008,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField(
             }
           }
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.DevicePropertiesProtos.internal_static_tensorflow_DeviceProperties_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -1012,38 +1021,27 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             type_ = "";
    -
             vendor_ = "";
    -
             model_ = "";
    -
             frequency_ = 0L;
    -
             numCores_ = 0L;
    -
             internalGetMutableEnvironment().clear();
             numRegisters_ = 0L;
    -
             l1CacheSize_ = 0L;
    -
             l2CacheSize_ = 0L;
    -
             l3CacheSize_ = 0L;
    -
             sharedMemorySizePerMultiprocessor_ = 0L;
    -
             memorySize_ = 0L;
    -
             bandwidth_ = 0L;
    -
             return this;
           }
     
    @@ -1070,57 +1068,55 @@ public org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties build() {
           @java.lang.Override
           public org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties buildPartial() {
             org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties result = new org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties(this);
    -        int from_bitField0_ = bitField0_;
    -        result.type_ = type_;
    -        result.vendor_ = vendor_;
    -        result.model_ = model_;
    -        result.frequency_ = frequency_;
    -        result.numCores_ = numCores_;
    -        result.environment_ = internalGetEnvironment();
    -        result.environment_.makeImmutable();
    -        result.numRegisters_ = numRegisters_;
    -        result.l1CacheSize_ = l1CacheSize_;
    -        result.l2CacheSize_ = l2CacheSize_;
    -        result.l3CacheSize_ = l3CacheSize_;
    -        result.sharedMemorySizePerMultiprocessor_ = sharedMemorySizePerMultiprocessor_;
    -        result.memorySize_ = memorySize_;
    -        result.bandwidth_ = bandwidth_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.type_ = type_;
    +        }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.vendor_ = vendor_;
    +        }
    +        if (((from_bitField0_ & 0x00000004) != 0)) {
    +          result.model_ = model_;
    +        }
    +        if (((from_bitField0_ & 0x00000008) != 0)) {
    +          result.frequency_ = frequency_;
    +        }
    +        if (((from_bitField0_ & 0x00000010) != 0)) {
    +          result.numCores_ = numCores_;
    +        }
    +        if (((from_bitField0_ & 0x00000020) != 0)) {
    +          result.environment_ = internalGetEnvironment();
    +          result.environment_.makeImmutable();
    +        }
    +        if (((from_bitField0_ & 0x00000040) != 0)) {
    +          result.numRegisters_ = numRegisters_;
    +        }
    +        if (((from_bitField0_ & 0x00000080) != 0)) {
    +          result.l1CacheSize_ = l1CacheSize_;
    +        }
    +        if (((from_bitField0_ & 0x00000100) != 0)) {
    +          result.l2CacheSize_ = l2CacheSize_;
    +        }
    +        if (((from_bitField0_ & 0x00000200) != 0)) {
    +          result.l3CacheSize_ = l3CacheSize_;
    +        }
    +        if (((from_bitField0_ & 0x00000400) != 0)) {
    +          result.sharedMemorySizePerMultiprocessor_ = sharedMemorySizePerMultiprocessor_;
    +        }
    +        if (((from_bitField0_ & 0x00000800) != 0)) {
    +          result.memorySize_ = memorySize_;
    +        }
    +        if (((from_bitField0_ & 0x00001000) != 0)) {
    +          result.bandwidth_ = bandwidth_;
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties) {
    @@ -1135,14 +1131,17 @@ public Builder mergeFrom(org.tensorflow.proto.DevicePropertiesProtos.DevicePrope
             if (other == org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties.getDefaultInstance()) return this;
             if (!other.getType().isEmpty()) {
               type_ = other.type_;
    +          bitField0_ |= 0x00000001;
               onChanged();
             }
             if (!other.getVendor().isEmpty()) {
               vendor_ = other.vendor_;
    +          bitField0_ |= 0x00000002;
               onChanged();
             }
             if (!other.getModel().isEmpty()) {
               model_ = other.model_;
    +          bitField0_ |= 0x00000004;
               onChanged();
             }
             if (other.getFrequency() != 0L) {
    @@ -1153,6 +1152,7 @@ public Builder mergeFrom(org.tensorflow.proto.DevicePropertiesProtos.DevicePrope
             }
             internalGetMutableEnvironment().mergeFrom(
                 other.internalGetEnvironment());
    +        bitField0_ |= 0x00000020;
             if (other.getNumRegisters() != 0L) {
               setNumRegisters(other.getNumRegisters());
             }
    @@ -1202,27 +1202,27 @@ public Builder mergeFrom(
                     break;
                   case 10: {
                     type_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 10
                   case 18: {
                     vendor_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 18
                   case 26: {
                     model_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000004;
                     break;
                   } // case 26
                   case 32: {
                     frequency_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000008;
                     break;
                   } // case 32
                   case 40: {
                     numCores_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000010;
                     break;
                   } // case 40
                   case 50: {
    @@ -1231,41 +1231,42 @@ public Builder mergeFrom(
                         EnvironmentDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
                     internalGetMutableEnvironment().getMutableMap().put(
                         environment__.getKey(), environment__.getValue());
    +                bitField0_ |= 0x00000020;
                     break;
                   } // case 50
                   case 56: {
                     numRegisters_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000040;
                     break;
                   } // case 56
                   case 64: {
                     l1CacheSize_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000080;
                     break;
                   } // case 64
                   case 72: {
                     l2CacheSize_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000100;
                     break;
                   } // case 72
                   case 80: {
                     l3CacheSize_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000200;
                     break;
                   } // case 80
                   case 88: {
                     sharedMemorySizePerMultiprocessor_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000400;
                     break;
                   } // case 88
                   case 96: {
                     memorySize_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000800;
                     break;
                   } // case 96
                   case 104: {
                     bandwidth_ = input.readInt64();
    -
    +                bitField0_ |= 0x00001000;
                     break;
                   } // case 104
                   default: {
    @@ -1338,11 +1339,9 @@ public java.lang.String getType() {
            */
           public Builder setType(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             type_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -1355,8 +1354,8 @@ public Builder setType(
            * @return This builder for chaining.
            */
           public Builder clearType() {
    -        
             type_ = getDefaultInstance().getType();
    +        bitField0_ = (bitField0_ & ~0x00000001);
             onChanged();
             return this;
           }
    @@ -1371,12 +1370,10 @@ public Builder clearType() {
            */
           public Builder setTypeBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             type_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -1434,11 +1431,9 @@ public java.lang.String getVendor() {
            */
           public Builder setVendor(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             vendor_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -1451,8 +1446,8 @@ public Builder setVendor(
            * @return This builder for chaining.
            */
           public Builder clearVendor() {
    -        
             vendor_ = getDefaultInstance().getVendor();
    +        bitField0_ = (bitField0_ & ~0x00000002);
             onChanged();
             return this;
           }
    @@ -1467,12 +1462,10 @@ public Builder clearVendor() {
            */
           public Builder setVendorBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             vendor_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -1530,11 +1523,9 @@ public java.lang.String getModel() {
            */
           public Builder setModel(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             model_ = value;
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -1547,8 +1538,8 @@ public Builder setModel(
            * @return This builder for chaining.
            */
           public Builder clearModel() {
    -        
             model_ = getDefaultInstance().getModel();
    +        bitField0_ = (bitField0_ & ~0x00000004);
             onChanged();
             return this;
           }
    @@ -1563,12 +1554,10 @@ public Builder clearModel() {
            */
           public Builder setModelBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             model_ = value;
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -1596,8 +1585,9 @@ public long getFrequency() {
            * @return This builder for chaining.
            */
           public Builder setFrequency(long value) {
    -        
    +
             frequency_ = value;
    +        bitField0_ |= 0x00000008;
             onChanged();
             return this;
           }
    @@ -1610,7 +1600,7 @@ public Builder setFrequency(long value) {
            * @return This builder for chaining.
            */
           public Builder clearFrequency() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000008);
             frequency_ = 0L;
             onChanged();
             return this;
    @@ -1639,8 +1629,9 @@ public long getNumCores() {
            * @return This builder for chaining.
            */
           public Builder setNumCores(long value) {
    -        
    +
             numCores_ = value;
    +        bitField0_ |= 0x00000010;
             onChanged();
             return this;
           }
    @@ -1653,7 +1644,7 @@ public Builder setNumCores(long value) {
            * @return This builder for chaining.
            */
           public Builder clearNumCores() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000010);
             numCores_ = 0L;
             onChanged();
             return this;
    @@ -1662,7 +1653,7 @@ public Builder clearNumCores() {
           private com.google.protobuf.MapField<
               java.lang.String, java.lang.String> environment_;
           private com.google.protobuf.MapField
    -      internalGetEnvironment() {
    +          internalGetEnvironment() {
             if (environment_ == null) {
               return com.google.protobuf.MapField.emptyMapField(
                   EnvironmentDefaultEntryHolder.defaultEntry);
    @@ -1670,8 +1661,7 @@ public Builder clearNumCores() {
             return environment_;
           }
           private com.google.protobuf.MapField
    -      internalGetMutableEnvironment() {
    -        onChanged();;
    +          internalGetMutableEnvironment() {
             if (environment_ == null) {
               environment_ = com.google.protobuf.MapField.newMapField(
                   EnvironmentDefaultEntryHolder.defaultEntry);
    @@ -1679,9 +1669,10 @@ public Builder clearNumCores() {
             if (!environment_.isMutable()) {
               environment_ = environment_.copy();
             }
    +        bitField0_ |= 0x00000020;
    +        onChanged();
             return environment_;
           }
    -
           public int getEnvironmentCount() {
             return internalGetEnvironment().getMap().size();
           }
    @@ -1693,7 +1684,6 @@ public int getEnvironmentCount() {
            *
            * map<string, string> environment = 6;
            */
    -
           @java.lang.Override
           public boolean containsEnvironment(
               java.lang.String key) {
    @@ -1717,7 +1707,6 @@ public java.util.Map getEnvironment() {
            * map<string, string> environment = 6;
            */
           @java.lang.Override
    -
           public java.util.Map getEnvironmentMap() {
             return internalGetEnvironment().getMap();
           }
    @@ -1730,10 +1719,11 @@ public java.util.Map getEnvironmentMap() {
            * map<string, string> environment = 6;
            */
           @java.lang.Override
    -
    -      public java.lang.String getEnvironmentOrDefault(
    +      public /* nullable */
    +java.lang.String getEnvironmentOrDefault(
               java.lang.String key,
    -          java.lang.String defaultValue) {
    +          /* nullable */
    +java.lang.String defaultValue) {
             if (key == null) { throw new NullPointerException("map key"); }
             java.util.Map map =
                 internalGetEnvironment().getMap();
    @@ -1748,7 +1738,6 @@ public java.lang.String getEnvironmentOrDefault(
            * map<string, string> environment = 6;
            */
           @java.lang.Override
    -
           public java.lang.String getEnvironmentOrThrow(
               java.lang.String key) {
             if (key == null) { throw new NullPointerException("map key"); }
    @@ -1759,8 +1748,8 @@ public java.lang.String getEnvironmentOrThrow(
             }
             return map.get(key);
           }
    -
           public Builder clearEnvironment() {
    +        bitField0_ = (bitField0_ & ~0x00000020);
             internalGetMutableEnvironment().getMutableMap()
                 .clear();
             return this;
    @@ -1773,7 +1762,6 @@ public Builder clearEnvironment() {
            *
            * map<string, string> environment = 6;
            */
    -
           public Builder removeEnvironment(
               java.lang.String key) {
             if (key == null) { throw new NullPointerException("map key"); }
    @@ -1786,7 +1774,8 @@ public Builder removeEnvironment(
            */
           @java.lang.Deprecated
           public java.util.Map
    -      getMutableEnvironment() {
    +          getMutableEnvironment() {
    +        bitField0_ |= 0x00000020;
             return internalGetMutableEnvironment().getMutableMap();
           }
           /**
    @@ -1801,12 +1790,10 @@ public Builder putEnvironment(
               java.lang.String key,
               java.lang.String value) {
             if (key == null) { throw new NullPointerException("map key"); }
    -        if (value == null) {
    -  throw new NullPointerException("map value");
    -}
    -
    +        if (value == null) { throw new NullPointerException("map value"); }
             internalGetMutableEnvironment().getMutableMap()
                 .put(key, value);
    +        bitField0_ |= 0x00000020;
             return this;
           }
           /**
    @@ -1817,11 +1804,11 @@ public Builder putEnvironment(
            *
            * map<string, string> environment = 6;
            */
    -
           public Builder putAllEnvironment(
               java.util.Map values) {
             internalGetMutableEnvironment().getMutableMap()
                 .putAll(values);
    +        bitField0_ |= 0x00000020;
             return this;
           }
     
    @@ -1848,8 +1835,9 @@ public long getNumRegisters() {
            * @return This builder for chaining.
            */
           public Builder setNumRegisters(long value) {
    -        
    +
             numRegisters_ = value;
    +        bitField0_ |= 0x00000040;
             onChanged();
             return this;
           }
    @@ -1862,7 +1850,7 @@ public Builder setNumRegisters(long value) {
            * @return This builder for chaining.
            */
           public Builder clearNumRegisters() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000040);
             numRegisters_ = 0L;
             onChanged();
             return this;
    @@ -1891,8 +1879,9 @@ public long getL1CacheSize() {
            * @return This builder for chaining.
            */
           public Builder setL1CacheSize(long value) {
    -        
    +
             l1CacheSize_ = value;
    +        bitField0_ |= 0x00000080;
             onChanged();
             return this;
           }
    @@ -1905,7 +1894,7 @@ public Builder setL1CacheSize(long value) {
            * @return This builder for chaining.
            */
           public Builder clearL1CacheSize() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000080);
             l1CacheSize_ = 0L;
             onChanged();
             return this;
    @@ -1934,8 +1923,9 @@ public long getL2CacheSize() {
            * @return This builder for chaining.
            */
           public Builder setL2CacheSize(long value) {
    -        
    +
             l2CacheSize_ = value;
    +        bitField0_ |= 0x00000100;
             onChanged();
             return this;
           }
    @@ -1948,7 +1938,7 @@ public Builder setL2CacheSize(long value) {
            * @return This builder for chaining.
            */
           public Builder clearL2CacheSize() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000100);
             l2CacheSize_ = 0L;
             onChanged();
             return this;
    @@ -1977,8 +1967,9 @@ public long getL3CacheSize() {
            * @return This builder for chaining.
            */
           public Builder setL3CacheSize(long value) {
    -        
    +
             l3CacheSize_ = value;
    +        bitField0_ |= 0x00000200;
             onChanged();
             return this;
           }
    @@ -1991,7 +1982,7 @@ public Builder setL3CacheSize(long value) {
            * @return This builder for chaining.
            */
           public Builder clearL3CacheSize() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000200);
             l3CacheSize_ = 0L;
             onChanged();
             return this;
    @@ -2022,8 +2013,9 @@ public long getSharedMemorySizePerMultiprocessor() {
            * @return This builder for chaining.
            */
           public Builder setSharedMemorySizePerMultiprocessor(long value) {
    -        
    +
             sharedMemorySizePerMultiprocessor_ = value;
    +        bitField0_ |= 0x00000400;
             onChanged();
             return this;
           }
    @@ -2037,7 +2029,7 @@ public Builder setSharedMemorySizePerMultiprocessor(long value) {
            * @return This builder for chaining.
            */
           public Builder clearSharedMemorySizePerMultiprocessor() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000400);
             sharedMemorySizePerMultiprocessor_ = 0L;
             onChanged();
             return this;
    @@ -2066,8 +2058,9 @@ public long getMemorySize() {
            * @return This builder for chaining.
            */
           public Builder setMemorySize(long value) {
    -        
    +
             memorySize_ = value;
    +        bitField0_ |= 0x00000800;
             onChanged();
             return this;
           }
    @@ -2080,7 +2073,7 @@ public Builder setMemorySize(long value) {
            * @return This builder for chaining.
            */
           public Builder clearMemorySize() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000800);
             memorySize_ = 0L;
             onChanged();
             return this;
    @@ -2109,8 +2102,9 @@ public long getBandwidth() {
            * @return This builder for chaining.
            */
           public Builder setBandwidth(long value) {
    -        
    +
             bandwidth_ = value;
    +        bitField0_ |= 0x00001000;
             onChanged();
             return this;
           }
    @@ -2123,23 +2117,11 @@ public Builder setBandwidth(long value) {
            * @return This builder for chaining.
            */
           public Builder clearBandwidth() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00001000);
             bandwidth_ = 0L;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.DeviceProperties)
         }
    @@ -2227,45 +2209,44 @@ public interface NamedDeviceOrBuilder extends
        * Protobuf type {@code tensorflow.NamedDevice}
        */
       public static final class NamedDevice extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.NamedDevice)
           NamedDeviceOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        NamedDevice.class.getName());
    +    }
         // Use NamedDevice.newBuilder() to construct.
    -    private NamedDevice(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private NamedDevice(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private NamedDevice() {
           name_ = "";
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new NamedDevice();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.DevicePropertiesProtos.internal_static_tensorflow_NamedDevice_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.DevicePropertiesProtos.internal_static_tensorflow_NamedDevice_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
                   org.tensorflow.proto.DevicePropertiesProtos.NamedDevice.class, org.tensorflow.proto.DevicePropertiesProtos.NamedDevice.Builder.class);
         }
     
    +    private int bitField0_;
         public static final int NAME_FIELD_NUMBER = 1;
    -    private volatile java.lang.Object name_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object name_ = "";
         /**
          * string name = 1;
          * @return The name.
    @@ -2310,7 +2291,7 @@ public java.lang.String getName() {
          */
         @java.lang.Override
         public boolean hasProperties() {
    -      return properties_ != null;
    +      return ((bitField0_ & 0x00000001) != 0);
         }
         /**
          * .tensorflow.DeviceProperties properties = 2;
    @@ -2325,7 +2306,7 @@ public org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties getPropertie
          */
         @java.lang.Override
         public org.tensorflow.proto.DevicePropertiesProtos.DevicePropertiesOrBuilder getPropertiesOrBuilder() {
    -      return getProperties();
    +      return properties_ == null ? org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties.getDefaultInstance() : properties_;
         }
     
         private byte memoizedIsInitialized = -1;
    @@ -2342,10 +2323,10 @@ public final boolean isInitialized() {
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output)
                             throws java.io.IOException {
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
           }
    -      if (properties_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             output.writeMessage(2, getProperties());
           }
           getUnknownFields().writeTo(output);
    @@ -2357,10 +2338,10 @@ public int getSerializedSize() {
           if (size != -1) return size;
     
           size = 0;
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
           }
    -      if (properties_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(2, getProperties());
           }
    @@ -2442,39 +2423,41 @@ public static org.tensorflow.proto.DevicePropertiesProtos.NamedDevice parseFrom(
         }
         public static org.tensorflow.proto.DevicePropertiesProtos.NamedDevice parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.DevicePropertiesProtos.NamedDevice parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.DevicePropertiesProtos.NamedDevice parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.DevicePropertiesProtos.NamedDevice parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.DevicePropertiesProtos.NamedDevice parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.DevicePropertiesProtos.NamedDevice parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -2494,7 +2477,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -2502,7 +2485,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.NamedDevice}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.NamedDevice)
             org.tensorflow.proto.DevicePropertiesProtos.NamedDeviceOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -2511,7 +2494,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.DevicePropertiesProtos.internal_static_tensorflow_NamedDevice_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -2520,23 +2503,28 @@ public static final class Builder extends
     
           // Construct using org.tensorflow.proto.DevicePropertiesProtos.NamedDevice.newBuilder()
           private Builder() {
    -
    +        maybeForceBuilderInitialization();
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
    -
    +        maybeForceBuilderInitialization();
    +      }
    +      private void maybeForceBuilderInitialization() {
    +        if (com.google.protobuf.GeneratedMessage
    +                .alwaysUseFieldBuilders) {
    +          getPropertiesFieldBuilder();
    +        }
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             name_ = "";
    -
    -        if (propertiesBuilder_ == null) {
    -          properties_ = null;
    -        } else {
    -          properties_ = null;
    +        properties_ = null;
    +        if (propertiesBuilder_ != null) {
    +          propertiesBuilder_.dispose();
               propertiesBuilder_ = null;
             }
             return this;
    @@ -2565,48 +2553,26 @@ public org.tensorflow.proto.DevicePropertiesProtos.NamedDevice build() {
           @java.lang.Override
           public org.tensorflow.proto.DevicePropertiesProtos.NamedDevice buildPartial() {
             org.tensorflow.proto.DevicePropertiesProtos.NamedDevice result = new org.tensorflow.proto.DevicePropertiesProtos.NamedDevice(this);
    -        result.name_ = name_;
    -        if (propertiesBuilder_ == null) {
    -          result.properties_ = properties_;
    -        } else {
    -          result.properties_ = propertiesBuilder_.build();
    -        }
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.DevicePropertiesProtos.NamedDevice result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.name_ = name_;
    +        }
    +        int to_bitField0_ = 0;
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.properties_ = propertiesBuilder_ == null
    +              ? properties_
    +              : propertiesBuilder_.build();
    +          to_bitField0_ |= 0x00000001;
    +        }
    +        result.bitField0_ |= to_bitField0_;
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.DevicePropertiesProtos.NamedDevice) {
    @@ -2621,6 +2587,7 @@ public Builder mergeFrom(org.tensorflow.proto.DevicePropertiesProtos.NamedDevice
             if (other == org.tensorflow.proto.DevicePropertiesProtos.NamedDevice.getDefaultInstance()) return this;
             if (!other.getName().isEmpty()) {
               name_ = other.name_;
    +          bitField0_ |= 0x00000001;
               onChanged();
             }
             if (other.hasProperties()) {
    @@ -2654,14 +2621,14 @@ public Builder mergeFrom(
                     break;
                   case 10: {
                     name_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 10
                   case 18: {
                     input.readMessage(
                         getPropertiesFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 18
                   default: {
    @@ -2679,6 +2646,7 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    +      private int bitField0_;
     
           private java.lang.Object name_ = "";
           /**
    @@ -2721,11 +2689,9 @@ public java.lang.String getName() {
            */
           public Builder setName(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             name_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -2734,8 +2700,8 @@ public Builder setName(
            * @return This builder for chaining.
            */
           public Builder clearName() {
    -        
             name_ = getDefaultInstance().getName();
    +        bitField0_ = (bitField0_ & ~0x00000001);
             onChanged();
             return this;
           }
    @@ -2746,25 +2712,23 @@ public Builder clearName() {
            */
           public Builder setNameBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             name_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
     
           private org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties properties_;
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties, org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties.Builder, org.tensorflow.proto.DevicePropertiesProtos.DevicePropertiesOrBuilder> propertiesBuilder_;
           /**
            * .tensorflow.DeviceProperties properties = 2;
            * @return Whether the properties field is set.
            */
           public boolean hasProperties() {
    -        return propertiesBuilder_ != null || properties_ != null;
    +        return ((bitField0_ & 0x00000002) != 0);
           }
           /**
            * .tensorflow.DeviceProperties properties = 2;
    @@ -2786,11 +2750,11 @@ public Builder setProperties(org.tensorflow.proto.DevicePropertiesProtos.DeviceP
                 throw new NullPointerException();
               }
               properties_ = value;
    -          onChanged();
             } else {
               propertiesBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000002;
    +        onChanged();
             return this;
           }
           /**
    @@ -2800,11 +2764,11 @@ public Builder setProperties(
               org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties.Builder builderForValue) {
             if (propertiesBuilder_ == null) {
               properties_ = builderForValue.build();
    -          onChanged();
             } else {
               propertiesBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000002;
    +        onChanged();
             return this;
           }
           /**
    @@ -2812,38 +2776,40 @@ public Builder setProperties(
            */
           public Builder mergeProperties(org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties value) {
             if (propertiesBuilder_ == null) {
    -          if (properties_ != null) {
    -            properties_ =
    -              org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties.newBuilder(properties_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000002) != 0) &&
    +            properties_ != null &&
    +            properties_ != org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties.getDefaultInstance()) {
    +            getPropertiesBuilder().mergeFrom(value);
               } else {
                 properties_ = value;
               }
    -          onChanged();
             } else {
               propertiesBuilder_.mergeFrom(value);
             }
    -
    +        if (properties_ != null) {
    +          bitField0_ |= 0x00000002;
    +          onChanged();
    +        }
             return this;
           }
           /**
            * .tensorflow.DeviceProperties properties = 2;
            */
           public Builder clearProperties() {
    -        if (propertiesBuilder_ == null) {
    -          properties_ = null;
    -          onChanged();
    -        } else {
    -          properties_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000002);
    +        properties_ = null;
    +        if (propertiesBuilder_ != null) {
    +          propertiesBuilder_.dispose();
               propertiesBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
            * .tensorflow.DeviceProperties properties = 2;
            */
           public org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties.Builder getPropertiesBuilder() {
    -        
    +        bitField0_ |= 0x00000002;
             onChanged();
             return getPropertiesFieldBuilder().getBuilder();
           }
    @@ -2861,11 +2827,11 @@ public org.tensorflow.proto.DevicePropertiesProtos.DevicePropertiesOrBuilder get
           /**
            * .tensorflow.DeviceProperties properties = 2;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties, org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties.Builder, org.tensorflow.proto.DevicePropertiesProtos.DevicePropertiesOrBuilder> 
               getPropertiesFieldBuilder() {
             if (propertiesBuilder_ == null) {
    -          propertiesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          propertiesBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties, org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties.Builder, org.tensorflow.proto.DevicePropertiesProtos.DevicePropertiesOrBuilder>(
                       getProperties(),
                       getParentForChildren(),
    @@ -2874,18 +2840,6 @@ public org.tensorflow.proto.DevicePropertiesProtos.DevicePropertiesOrBuilder get
             }
             return propertiesBuilder_;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.NamedDevice)
         }
    @@ -2941,17 +2895,17 @@ public org.tensorflow.proto.DevicePropertiesProtos.NamedDevice getDefaultInstanc
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_DeviceProperties_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_DeviceProperties_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_DeviceProperties_EnvironmentEntry_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_DeviceProperties_EnvironmentEntry_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_NamedDevice_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_NamedDevice_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -2988,21 +2942,22 @@ public org.tensorflow.proto.DevicePropertiesProtos.NamedDevice getDefaultInstanc
         internal_static_tensorflow_DeviceProperties_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_DeviceProperties_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_DeviceProperties_descriptor,
             new java.lang.String[] { "Type", "Vendor", "Model", "Frequency", "NumCores", "Environment", "NumRegisters", "L1CacheSize", "L2CacheSize", "L3CacheSize", "SharedMemorySizePerMultiprocessor", "MemorySize", "Bandwidth", });
         internal_static_tensorflow_DeviceProperties_EnvironmentEntry_descriptor =
           internal_static_tensorflow_DeviceProperties_descriptor.getNestedTypes().get(0);
         internal_static_tensorflow_DeviceProperties_EnvironmentEntry_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_DeviceProperties_EnvironmentEntry_descriptor,
             new java.lang.String[] { "Key", "Value", });
         internal_static_tensorflow_NamedDevice_descriptor =
           getDescriptor().getMessageTypes().get(1);
         internal_static_tensorflow_NamedDevice_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_NamedDevice_descriptor,
             new java.lang.String[] { "Name", "Properties", });
    +    descriptor.resolveAllFeaturesImmutable();
       }
     
       // @@protoc_insertion_point(outer_class_scope)
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceStepStats.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceStepStats.java
    index 9a419a9c426..5796f59a3a5 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceStepStats.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceStepStats.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/step_stats.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,12 +9,21 @@
      * Protobuf type {@code tensorflow.DeviceStepStats}
      */
     public final class DeviceStepStats extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.DeviceStepStats)
         DeviceStepStatsOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      DeviceStepStats.class.getName());
    +  }
       // Use DeviceStepStats.newBuilder() to construct.
    -  private DeviceStepStats(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private DeviceStepStats(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private DeviceStepStats() {
    @@ -20,18 +31,6 @@ private DeviceStepStats() {
         nodeStats_ = java.util.Collections.emptyList();
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new DeviceStepStats();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.StepStatsProtos.internal_static_tensorflow_DeviceStepStats_descriptor;
    @@ -39,7 +38,7 @@ protected java.lang.Object newInstance(
     
       @SuppressWarnings({"rawtypes"})
       @java.lang.Override
    -  protected com.google.protobuf.MapField internalGetMapField(
    +  protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
           int number) {
         switch (number) {
           case 3:
    @@ -50,7 +49,7 @@ protected com.google.protobuf.MapField internalGetMapField(
         }
       }
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.StepStatsProtos.internal_static_tensorflow_DeviceStepStats_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -58,7 +57,8 @@ protected com.google.protobuf.MapField internalGetMapField(
       }
     
       public static final int DEVICE_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object device_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object device_ = "";
       /**
        * string device = 1;
        * @return The device.
    @@ -96,6 +96,7 @@ public java.lang.String getDevice() {
       }
     
       public static final int NODE_STATS_FIELD_NUMBER = 2;
    +  @SuppressWarnings("serial")
       private java.util.List nodeStats_;
       /**
        * repeated .tensorflow.NodeExecStats node_stats = 2;
    @@ -147,6 +148,7 @@ private static final class ThreadNamesDefaultEntryHolder {
                     com.google.protobuf.WireFormat.FieldType.STRING,
                     "");
       }
    +  @SuppressWarnings("serial")
       private com.google.protobuf.MapField<
           java.lang.Integer, java.lang.String> threadNames_;
       private com.google.protobuf.MapField
    @@ -157,7 +159,6 @@ private static final class ThreadNamesDefaultEntryHolder {
         }
         return threadNames_;
       }
    -
       public int getThreadNamesCount() {
         return internalGetThreadNames().getMap().size();
       }
    @@ -168,11 +169,10 @@ public int getThreadNamesCount() {
        *
        * map<uint32, string> thread_names = 3;
        */
    -
       @java.lang.Override
       public boolean containsThreadNames(
           int key) {
    -    
    +
         return internalGetThreadNames().getMap().containsKey(key);
       }
       /**
    @@ -191,7 +191,6 @@ public java.util.Map getThreadNames() {
        * map<uint32, string> thread_names = 3;
        */
       @java.lang.Override
    -
       public java.util.Map getThreadNamesMap() {
         return internalGetThreadNames().getMap();
       }
    @@ -203,11 +202,12 @@ public java.util.Map getThreadNamesMap() {
        * map<uint32, string> thread_names = 3;
        */
       @java.lang.Override
    -
    -  public java.lang.String getThreadNamesOrDefault(
    +  public /* nullable */
    +java.lang.String getThreadNamesOrDefault(
           int key,
    -      java.lang.String defaultValue) {
    -    
    +      /* nullable */
    +java.lang.String defaultValue) {
    +
         java.util.Map map =
             internalGetThreadNames().getMap();
         return map.containsKey(key) ? map.get(key) : defaultValue;
    @@ -220,10 +220,9 @@ public java.lang.String getThreadNamesOrDefault(
        * map<uint32, string> thread_names = 3;
        */
       @java.lang.Override
    -
       public java.lang.String getThreadNamesOrThrow(
           int key) {
    -    
    +
         java.util.Map map =
             internalGetThreadNames().getMap();
         if (!map.containsKey(key)) {
    @@ -246,13 +245,13 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(device_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, device_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(device_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, device_);
         }
         for (int i = 0; i < nodeStats_.size(); i++) {
           output.writeMessage(2, nodeStats_.get(i));
         }
    -    com.google.protobuf.GeneratedMessageV3
    +    com.google.protobuf.GeneratedMessage
           .serializeIntegerMapTo(
             output,
             internalGetThreadNames(),
    @@ -267,8 +266,8 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(device_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, device_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(device_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, device_);
         }
         for (int i = 0; i < nodeStats_.size(); i++) {
           size += com.google.protobuf.CodedOutputStream
    @@ -365,39 +364,41 @@ public static org.tensorflow.proto.DeviceStepStats parseFrom(
       }
       public static org.tensorflow.proto.DeviceStepStats parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.DeviceStepStats parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.DeviceStepStats parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.DeviceStepStats parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.DeviceStepStats parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.DeviceStepStats parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -417,7 +418,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -425,7 +426,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.DeviceStepStats}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.DeviceStepStats)
           org.tensorflow.proto.DeviceStepStatsOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -434,7 +435,7 @@ public static final class Builder extends
         }
     
         @SuppressWarnings({"rawtypes"})
    -    protected com.google.protobuf.MapField internalGetMapField(
    +    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
             int number) {
           switch (number) {
             case 3:
    @@ -445,7 +446,7 @@ protected com.google.protobuf.MapField internalGetMapField(
           }
         }
         @SuppressWarnings({"rawtypes"})
    -    protected com.google.protobuf.MapField internalGetMutableMapField(
    +    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
             int number) {
           switch (number) {
             case 3:
    @@ -456,7 +457,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField(
           }
         }
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.StepStatsProtos.internal_static_tensorflow_DeviceStepStats_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -469,22 +470,22 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           device_ = "";
    -
           if (nodeStatsBuilder_ == null) {
             nodeStats_ = java.util.Collections.emptyList();
           } else {
             nodeStats_ = null;
             nodeStatsBuilder_.clear();
           }
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      bitField0_ = (bitField0_ & ~0x00000002);
           internalGetMutableThreadNames().clear();
           return this;
         }
    @@ -512,55 +513,35 @@ public org.tensorflow.proto.DeviceStepStats build() {
         @java.lang.Override
         public org.tensorflow.proto.DeviceStepStats buildPartial() {
           org.tensorflow.proto.DeviceStepStats result = new org.tensorflow.proto.DeviceStepStats(this);
    -      int from_bitField0_ = bitField0_;
    -      result.device_ = device_;
    +      buildPartialRepeatedFields(result);
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartialRepeatedFields(org.tensorflow.proto.DeviceStepStats result) {
           if (nodeStatsBuilder_ == null) {
    -        if (((bitField0_ & 0x00000001) != 0)) {
    +        if (((bitField0_ & 0x00000002) != 0)) {
               nodeStats_ = java.util.Collections.unmodifiableList(nodeStats_);
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ = (bitField0_ & ~0x00000002);
             }
             result.nodeStats_ = nodeStats_;
           } else {
             result.nodeStats_ = nodeStatsBuilder_.build();
           }
    -      result.threadNames_ = internalGetThreadNames();
    -      result.threadNames_.makeImmutable();
    -      onBuilt();
    -      return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.DeviceStepStats result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.device_ = device_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.threadNames_ = internalGetThreadNames();
    +        result.threadNames_.makeImmutable();
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.DeviceStepStats) {
    @@ -575,13 +556,14 @@ public Builder mergeFrom(org.tensorflow.proto.DeviceStepStats other) {
           if (other == org.tensorflow.proto.DeviceStepStats.getDefaultInstance()) return this;
           if (!other.getDevice().isEmpty()) {
             device_ = other.device_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (nodeStatsBuilder_ == null) {
             if (!other.nodeStats_.isEmpty()) {
               if (nodeStats_.isEmpty()) {
                 nodeStats_ = other.nodeStats_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000002);
               } else {
                 ensureNodeStatsIsMutable();
                 nodeStats_.addAll(other.nodeStats_);
    @@ -594,9 +576,9 @@ public Builder mergeFrom(org.tensorflow.proto.DeviceStepStats other) {
                 nodeStatsBuilder_.dispose();
                 nodeStatsBuilder_ = null;
                 nodeStats_ = other.nodeStats_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000002);
                 nodeStatsBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getNodeStatsFieldBuilder() : null;
               } else {
                 nodeStatsBuilder_.addAllMessages(other.nodeStats_);
    @@ -605,6 +587,7 @@ public Builder mergeFrom(org.tensorflow.proto.DeviceStepStats other) {
           }
           internalGetMutableThreadNames().mergeFrom(
               other.internalGetThreadNames());
    +      bitField0_ |= 0x00000004;
           this.mergeUnknownFields(other.getUnknownFields());
           onChanged();
           return this;
    @@ -633,7 +616,7 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   device_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
    @@ -655,6 +638,7 @@ public Builder mergeFrom(
                       ThreadNamesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
                   internalGetMutableThreadNames().getMutableMap().put(
                       threadNames__.getKey(), threadNames__.getValue());
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 26
                 default: {
    @@ -715,11 +699,9 @@ public java.lang.String getDevice() {
          */
         public Builder setDevice(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           device_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -728,8 +710,8 @@ public Builder setDevice(
          * @return This builder for chaining.
          */
         public Builder clearDevice() {
    -      
           device_ = getDefaultInstance().getDevice();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -740,12 +722,10 @@ public Builder clearDevice() {
          */
         public Builder setDeviceBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           device_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -753,13 +733,13 @@ public Builder setDeviceBytes(
         private java.util.List nodeStats_ =
           java.util.Collections.emptyList();
         private void ensureNodeStatsIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    +      if (!((bitField0_ & 0x00000002) != 0)) {
             nodeStats_ = new java.util.ArrayList(nodeStats_);
    -        bitField0_ |= 0x00000001;
    +        bitField0_ |= 0x00000002;
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.NodeExecStats, org.tensorflow.proto.NodeExecStats.Builder, org.tensorflow.proto.NodeExecStatsOrBuilder> nodeStatsBuilder_;
     
         /**
    @@ -905,7 +885,7 @@ public Builder addAllNodeStats(
         public Builder clearNodeStats() {
           if (nodeStatsBuilder_ == null) {
             nodeStats_ = java.util.Collections.emptyList();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        bitField0_ = (bitField0_ & ~0x00000002);
             onChanged();
           } else {
             nodeStatsBuilder_.clear();
    @@ -975,14 +955,14 @@ public org.tensorflow.proto.NodeExecStats.Builder addNodeStatsBuilder(
              getNodeStatsBuilderList() {
           return getNodeStatsFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.NodeExecStats, org.tensorflow.proto.NodeExecStats.Builder, org.tensorflow.proto.NodeExecStatsOrBuilder> 
             getNodeStatsFieldBuilder() {
           if (nodeStatsBuilder_ == null) {
    -        nodeStatsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        nodeStatsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.NodeExecStats, org.tensorflow.proto.NodeExecStats.Builder, org.tensorflow.proto.NodeExecStatsOrBuilder>(
                     nodeStats_,
    -                ((bitField0_ & 0x00000001) != 0),
    +                ((bitField0_ & 0x00000002) != 0),
                     getParentForChildren(),
                     isClean());
             nodeStats_ = null;
    @@ -993,7 +973,7 @@ public org.tensorflow.proto.NodeExecStats.Builder addNodeStatsBuilder(
         private com.google.protobuf.MapField<
             java.lang.Integer, java.lang.String> threadNames_;
         private com.google.protobuf.MapField
    -    internalGetThreadNames() {
    +        internalGetThreadNames() {
           if (threadNames_ == null) {
             return com.google.protobuf.MapField.emptyMapField(
                 ThreadNamesDefaultEntryHolder.defaultEntry);
    @@ -1001,8 +981,7 @@ public org.tensorflow.proto.NodeExecStats.Builder addNodeStatsBuilder(
           return threadNames_;
         }
         private com.google.protobuf.MapField
    -    internalGetMutableThreadNames() {
    -      onChanged();;
    +        internalGetMutableThreadNames() {
           if (threadNames_ == null) {
             threadNames_ = com.google.protobuf.MapField.newMapField(
                 ThreadNamesDefaultEntryHolder.defaultEntry);
    @@ -1010,9 +989,10 @@ public org.tensorflow.proto.NodeExecStats.Builder addNodeStatsBuilder(
           if (!threadNames_.isMutable()) {
             threadNames_ = threadNames_.copy();
           }
    +      bitField0_ |= 0x00000004;
    +      onChanged();
           return threadNames_;
         }
    -
         public int getThreadNamesCount() {
           return internalGetThreadNames().getMap().size();
         }
    @@ -1023,11 +1003,10 @@ public int getThreadNamesCount() {
          *
          * map<uint32, string> thread_names = 3;
          */
    -
         @java.lang.Override
         public boolean containsThreadNames(
             int key) {
    -      
    +
           return internalGetThreadNames().getMap().containsKey(key);
         }
         /**
    @@ -1046,7 +1025,6 @@ public java.util.Map getThreadNames() {
          * map<uint32, string> thread_names = 3;
          */
         @java.lang.Override
    -
         public java.util.Map getThreadNamesMap() {
           return internalGetThreadNames().getMap();
         }
    @@ -1058,11 +1036,12 @@ public java.util.Map getThreadNamesMap() {
          * map<uint32, string> thread_names = 3;
          */
         @java.lang.Override
    -
    -    public java.lang.String getThreadNamesOrDefault(
    +    public /* nullable */
    +java.lang.String getThreadNamesOrDefault(
             int key,
    -        java.lang.String defaultValue) {
    -      
    +        /* nullable */
    +java.lang.String defaultValue) {
    +
           java.util.Map map =
               internalGetThreadNames().getMap();
           return map.containsKey(key) ? map.get(key) : defaultValue;
    @@ -1075,10 +1054,9 @@ public java.lang.String getThreadNamesOrDefault(
          * map<uint32, string> thread_names = 3;
          */
         @java.lang.Override
    -
         public java.lang.String getThreadNamesOrThrow(
             int key) {
    -      
    +
           java.util.Map map =
               internalGetThreadNames().getMap();
           if (!map.containsKey(key)) {
    @@ -1086,8 +1064,8 @@ public java.lang.String getThreadNamesOrThrow(
           }
           return map.get(key);
         }
    -
         public Builder clearThreadNames() {
    +      bitField0_ = (bitField0_ & ~0x00000004);
           internalGetMutableThreadNames().getMutableMap()
               .clear();
           return this;
    @@ -1099,10 +1077,9 @@ public Builder clearThreadNames() {
          *
          * map<uint32, string> thread_names = 3;
          */
    -
         public Builder removeThreadNames(
             int key) {
    -      
    +
           internalGetMutableThreadNames().getMutableMap()
               .remove(key);
           return this;
    @@ -1112,7 +1089,8 @@ public Builder removeThreadNames(
          */
         @java.lang.Deprecated
         public java.util.Map
    -    getMutableThreadNames() {
    +        getMutableThreadNames() {
    +      bitField0_ |= 0x00000004;
           return internalGetMutableThreadNames().getMutableMap();
         }
         /**
    @@ -1125,13 +1103,11 @@ public Builder removeThreadNames(
         public Builder putThreadNames(
             int key,
             java.lang.String value) {
    -      
    -      if (value == null) {
    -  throw new NullPointerException("map value");
    -}
     
    +      if (value == null) { throw new NullPointerException("map value"); }
           internalGetMutableThreadNames().getMutableMap()
               .put(key, value);
    +      bitField0_ |= 0x00000004;
           return this;
         }
         /**
    @@ -1141,25 +1117,13 @@ public Builder putThreadNames(
          *
          * map<uint32, string> thread_names = 3;
          */
    -
         public Builder putAllThreadNames(
             java.util.Map values) {
           internalGetMutableThreadNames().getMutableMap()
               .putAll(values);
    +      bitField0_ |= 0x00000004;
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.DeviceStepStats)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceStepStatsOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceStepStatsOrBuilder.java
    index e96f3715f39..40b250d1ab8 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceStepStatsOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceStepStatsOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/step_stats.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -82,7 +84,6 @@ boolean containsThreadNames(
        *
        * map<uint32, string> thread_names = 3;
        */
    -
       /* nullable */
     java.lang.String getThreadNamesOrDefault(
           int key,
    @@ -95,7 +96,6 @@ java.lang.String getThreadNamesOrDefault(
        *
        * map<uint32, string> thread_names = 3;
        */
    -
       java.lang.String getThreadNamesOrThrow(
           int key);
     }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/EntryValue.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/EntryValue.java
    index 0b6ce2fef52..95d9ec9af7c 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/EntryValue.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/EntryValue.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: xla/tsl/protobuf/test_log.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,36 +9,33 @@
      * Protobuf type {@code tensorflow.EntryValue}
      */
     public final class EntryValue extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.EntryValue)
         EntryValueOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      EntryValue.class.getName());
    +  }
       // Use EntryValue.newBuilder() to construct.
    -  private EntryValue(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private EntryValue(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private EntryValue() {
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new EntryValue();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_EntryValue_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_EntryValue_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -44,6 +43,7 @@ protected java.lang.Object newInstance(
       }
     
       private int kindCase_ = 0;
    +  @SuppressWarnings("serial")
       private java.lang.Object kind_;
       public enum KindCase
           implements com.google.protobuf.Internal.EnumLite,
    @@ -176,7 +176,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
               1, (double)((java.lang.Double) kind_));
         }
         if (kindCase_ == 2) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, kind_);
    +      com.google.protobuf.GeneratedMessage.writeString(output, 2, kind_);
         }
         getUnknownFields().writeTo(output);
       }
    @@ -193,7 +193,7 @@ public int getSerializedSize() {
                 1, (double)((java.lang.Double) kind_));
         }
         if (kindCase_ == 2) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, kind_);
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(2, kind_);
         }
         size += getUnknownFields().getSerializedSize();
         memoizedSize = size;
    @@ -287,39 +287,41 @@ public static org.tensorflow.proto.EntryValue parseFrom(
       }
       public static org.tensorflow.proto.EntryValue parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.EntryValue parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.EntryValue parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.EntryValue parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.EntryValue parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.EntryValue parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -339,7 +341,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -347,7 +349,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.EntryValue}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.EntryValue)
           org.tensorflow.proto.EntryValueOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -356,7 +358,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_EntryValue_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -369,13 +371,14 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           kindCase_ = 0;
           kind_ = null;
           return this;
    @@ -404,49 +407,21 @@ public org.tensorflow.proto.EntryValue build() {
         @java.lang.Override
         public org.tensorflow.proto.EntryValue buildPartial() {
           org.tensorflow.proto.EntryValue result = new org.tensorflow.proto.EntryValue(this);
    -      if (kindCase_ == 1) {
    -        result.kind_ = kind_;
    -      }
    -      if (kindCase_ == 2) {
    -        result.kind_ = kind_;
    -      }
    -      result.kindCase_ = kindCase_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      buildPartialOneofs(result);
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    +    private void buildPartial0(org.tensorflow.proto.EntryValue result) {
    +      int from_bitField0_ = bitField0_;
         }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +
    +    private void buildPartialOneofs(org.tensorflow.proto.EntryValue result) {
    +      result.kindCase_ = kindCase_;
    +      result.kind_ = this.kind_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.EntryValue) {
    @@ -541,6 +516,7 @@ public Builder clearKind() {
           return this;
         }
     
    +    private int bitField0_;
     
         /**
          * double double_value = 1;
    @@ -565,6 +541,7 @@ public double getDoubleValue() {
          * @return This builder for chaining.
          */
         public Builder setDoubleValue(double value) {
    +
           kindCase_ = 1;
           kind_ = value;
           onChanged();
    @@ -643,10 +620,8 @@ public java.lang.String getStringValue() {
          */
         public Builder setStringValue(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  kindCase_ = 2;
    +      if (value == null) { throw new NullPointerException(); }
    +      kindCase_ = 2;
           kind_ = value;
           onChanged();
           return this;
    @@ -670,27 +645,13 @@ public Builder clearStringValue() {
          */
         public Builder setStringValueBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           kindCase_ = 2;
           kind_ = value;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.EntryValue)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/EntryValueOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/EntryValueOrBuilder.java
    index 6338554d477..19578965697 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/EntryValueOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/EntryValueOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: xla/tsl/protobuf/test_log.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -35,5 +37,5 @@ public interface EntryValueOrBuilder extends
       com.google.protobuf.ByteString
           getStringValueBytes();
     
    -  public org.tensorflow.proto.EntryValue.KindCase getKindCase();
    +  org.tensorflow.proto.EntryValue.KindCase getKindCase();
     }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ErrorCodes.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ErrorCodes.java
    index d7c465c4194..c717a8b23e5 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ErrorCodes.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ErrorCodes.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/lib/core/error_codes.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class ErrorCodes {
       private ErrorCodes() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      ErrorCodes.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -24,15 +35,16 @@ public static void registerAllExtensions(
       static {
         java.lang.String[] descriptorData = {
           "\n*tensorflow/core/lib/core/error_codes.p" +
    -      "roto\022\ntensorflow\032\036tsl/protobuf/error_cod" +
    -      "es.protoB\026\n\024org.tensorflow.protoP\000b\006prot" +
    -      "o3"
    +      "roto\022\ntensorflow\032\"xla/tsl/protobuf/error" +
    +      "_codes.protoB\026\n\024org.tensorflow.protoP\000b\006" +
    +      "proto3"
         };
         descriptor = com.google.protobuf.Descriptors.FileDescriptor
           .internalBuildGeneratedFileFrom(descriptorData,
             new com.google.protobuf.Descriptors.FileDescriptor[] {
               org.tensorflow.proto.error.ErrorCodesProtos.getDescriptor(),
             });
    +    descriptor.resolveAllFeaturesImmutable();
         org.tensorflow.proto.error.ErrorCodesProtos.getDescriptor();
       }
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Event.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Event.java
    index 9ceb8a3cc15..f8700f4727a 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Event.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Event.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/util/event.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -12,43 +14,42 @@
      * Protobuf type {@code tensorflow.Event}
      */
     public final class Event extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.Event)
         EventOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      Event.class.getName());
    +  }
       // Use Event.newBuilder() to construct.
    -  private Event(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private Event(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private Event() {
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new Event();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.EventProtos.internal_static_tensorflow_Event_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.EventProtos.internal_static_tensorflow_Event_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
                 org.tensorflow.proto.Event.class, org.tensorflow.proto.Event.Builder.class);
       }
     
    +  private int bitField0_;
       private int whatCase_ = 0;
    +  @SuppressWarnings("serial")
       private java.lang.Object what_;
       public enum WhatCase
           implements com.google.protobuf.Internal.EnumLite,
    @@ -100,7 +101,7 @@ public int getNumber() {
       }
     
       public static final int WALL_TIME_FIELD_NUMBER = 1;
    -  private double wallTime_;
    +  private double wallTime_ = 0D;
       /**
        * 
        * Timestamp of the event.
    @@ -115,7 +116,7 @@ public double getWallTime() {
       }
     
       public static final int STEP_FIELD_NUMBER = 2;
    -  private long step_;
    +  private long step_ = 0L;
       /**
        * 
        * Global step of the event.
    @@ -455,7 +456,7 @@ public com.google.protobuf.ByteString getMetaGraphDef() {
        */
       @java.lang.Override
       public boolean hasSourceMetadata() {
    -    return sourceMetadata_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * 
    @@ -480,7 +481,7 @@ public org.tensorflow.proto.SourceMetadata getSourceMetadata() {
        */
       @java.lang.Override
       public org.tensorflow.proto.SourceMetadataOrBuilder getSourceMetadataOrBuilder() {
    -    return getSourceMetadata();
    +    return sourceMetadata_ == null ? org.tensorflow.proto.SourceMetadata.getDefaultInstance() : sourceMetadata_;
       }
     
       private byte memoizedIsInitialized = -1;
    @@ -504,7 +505,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           output.writeInt64(2, step_);
         }
         if (whatCase_ == 3) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, what_);
    +      com.google.protobuf.GeneratedMessage.writeString(output, 3, what_);
         }
         if (whatCase_ == 4) {
           output.writeBytes(
    @@ -526,7 +527,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           output.writeBytes(
               9, (com.google.protobuf.ByteString) what_);
         }
    -    if (sourceMetadata_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(10, getSourceMetadata());
         }
         getUnknownFields().writeTo(output);
    @@ -547,7 +548,7 @@ public int getSerializedSize() {
             .computeInt64Size(2, step_);
         }
         if (whatCase_ == 3) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, what_);
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(3, what_);
         }
         if (whatCase_ == 4) {
           size += com.google.protobuf.CodedOutputStream
    @@ -575,7 +576,7 @@ public int getSerializedSize() {
             .computeBytesSize(
                 9, (com.google.protobuf.ByteString) what_);
         }
    -    if (sourceMetadata_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(10, getSourceMetadata());
         }
    @@ -729,39 +730,41 @@ public static org.tensorflow.proto.Event parseFrom(
       }
       public static org.tensorflow.proto.Event parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.Event parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.Event parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.Event parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.Event parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.Event parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -781,7 +784,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -794,7 +797,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.Event}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.Event)
           org.tensorflow.proto.EventOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -803,7 +806,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.EventProtos.internal_static_tensorflow_Event_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -812,21 +815,26 @@ public static final class Builder extends
     
         // Construct using org.tensorflow.proto.Event.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getSourceMetadataFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           wallTime_ = 0D;
    -
           step_ = 0L;
    -
           if (summaryBuilder_ != null) {
             summaryBuilder_.clear();
           }
    @@ -839,10 +847,9 @@ public Builder clear() {
           if (taggedRunMetadataBuilder_ != null) {
             taggedRunMetadataBuilder_.clear();
           }
    -      if (sourceMetadataBuilder_ == null) {
    -        sourceMetadata_ = null;
    -      } else {
    -        sourceMetadata_ = null;
    +      sourceMetadata_ = null;
    +      if (sourceMetadataBuilder_ != null) {
    +        sourceMetadataBuilder_.dispose();
             sourceMetadataBuilder_ = null;
           }
           whatCase_ = 0;
    @@ -873,87 +880,51 @@ public org.tensorflow.proto.Event build() {
         @java.lang.Override
         public org.tensorflow.proto.Event buildPartial() {
           org.tensorflow.proto.Event result = new org.tensorflow.proto.Event(this);
    -      result.wallTime_ = wallTime_;
    -      result.step_ = step_;
    -      if (whatCase_ == 3) {
    -        result.what_ = what_;
    -      }
    -      if (whatCase_ == 4) {
    -        result.what_ = what_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      buildPartialOneofs(result);
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartial0(org.tensorflow.proto.Event result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.wallTime_ = wallTime_;
           }
    -      if (whatCase_ == 5) {
    -        if (summaryBuilder_ == null) {
    -          result.what_ = what_;
    -        } else {
    -          result.what_ = summaryBuilder_.build();
    -        }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.step_ = step_;
           }
    -      if (whatCase_ == 6) {
    -        if (logMessageBuilder_ == null) {
    -          result.what_ = what_;
    -        } else {
    -          result.what_ = logMessageBuilder_.build();
    -        }
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000200) != 0)) {
    +        result.sourceMetadata_ = sourceMetadataBuilder_ == null
    +            ? sourceMetadata_
    +            : sourceMetadataBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
           }
    -      if (whatCase_ == 7) {
    -        if (sessionLogBuilder_ == null) {
    -          result.what_ = what_;
    -        } else {
    -          result.what_ = sessionLogBuilder_.build();
    -        }
    +      result.bitField0_ |= to_bitField0_;
    +    }
    +
    +    private void buildPartialOneofs(org.tensorflow.proto.Event result) {
    +      result.whatCase_ = whatCase_;
    +      result.what_ = this.what_;
    +      if (whatCase_ == 5 &&
    +          summaryBuilder_ != null) {
    +        result.what_ = summaryBuilder_.build();
           }
    -      if (whatCase_ == 8) {
    -        if (taggedRunMetadataBuilder_ == null) {
    -          result.what_ = what_;
    -        } else {
    -          result.what_ = taggedRunMetadataBuilder_.build();
    -        }
    +      if (whatCase_ == 6 &&
    +          logMessageBuilder_ != null) {
    +        result.what_ = logMessageBuilder_.build();
           }
    -      if (whatCase_ == 9) {
    -        result.what_ = what_;
    +      if (whatCase_ == 7 &&
    +          sessionLogBuilder_ != null) {
    +        result.what_ = sessionLogBuilder_.build();
           }
    -      if (sourceMetadataBuilder_ == null) {
    -        result.sourceMetadata_ = sourceMetadata_;
    -      } else {
    -        result.sourceMetadata_ = sourceMetadataBuilder_.build();
    +      if (whatCase_ == 8 &&
    +          taggedRunMetadataBuilder_ != null) {
    +        result.what_ = taggedRunMetadataBuilder_.build();
           }
    -      result.whatCase_ = whatCase_;
    -      onBuilt();
    -      return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    -    }
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.Event) {
    @@ -1038,12 +1009,12 @@ public Builder mergeFrom(
                   break;
                 case 9: {
                   wallTime_ = input.readDouble();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 9
                 case 16: {
                   step_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 16
                 case 26: {
    @@ -1094,7 +1065,7 @@ public Builder mergeFrom(
                   input.readMessage(
                       getSourceMetadataFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000200;
                   break;
                 } // case 82
                 default: {
    @@ -1127,6 +1098,7 @@ public Builder clearWhat() {
           return this;
         }
     
    +    private int bitField0_;
     
         private double wallTime_ ;
         /**
    @@ -1151,8 +1123,9 @@ public double getWallTime() {
          * @return This builder for chaining.
          */
         public Builder setWallTime(double value) {
    -      
    +
           wallTime_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -1165,7 +1138,7 @@ public Builder setWallTime(double value) {
          * @return This builder for chaining.
          */
         public Builder clearWallTime() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000001);
           wallTime_ = 0D;
           onChanged();
           return this;
    @@ -1194,8 +1167,9 @@ public long getStep() {
          * @return This builder for chaining.
          */
         public Builder setStep(long value) {
    -      
    +
           step_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -1208,7 +1182,7 @@ public Builder setStep(long value) {
          * @return This builder for chaining.
          */
         public Builder clearStep() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000002);
           step_ = 0L;
           onChanged();
           return this;
    @@ -1302,10 +1276,8 @@ public java.lang.String getFileVersion() {
          */
         public Builder setFileVersion(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  whatCase_ = 3;
    +      if (value == null) { throw new NullPointerException(); }
    +      whatCase_ = 3;
           what_ = value;
           onChanged();
           return this;
    @@ -1343,10 +1315,8 @@ public Builder clearFileVersion() {
          */
         public Builder setFileVersionBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           whatCase_ = 3;
           what_ = value;
           onChanged();
    @@ -1388,10 +1358,8 @@ public com.google.protobuf.ByteString getGraphDef() {
          * @return This builder for chaining.
          */
         public Builder setGraphDef(com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  whatCase_ = 4;
    +      if (value == null) { throw new NullPointerException(); }
    +      whatCase_ = 4;
           what_ = value;
           onChanged();
           return this;
    @@ -1413,7 +1381,7 @@ public Builder clearGraphDef() {
           return this;
         }
     
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.Summary, org.tensorflow.proto.Summary.Builder, org.tensorflow.proto.SummaryOrBuilder> summaryBuilder_;
         /**
          * 
    @@ -1572,14 +1540,14 @@ public org.tensorflow.proto.SummaryOrBuilder getSummaryOrBuilder() {
          *
          * .tensorflow.Summary summary = 5;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.Summary, org.tensorflow.proto.Summary.Builder, org.tensorflow.proto.SummaryOrBuilder> 
             getSummaryFieldBuilder() {
           if (summaryBuilder_ == null) {
             if (!(whatCase_ == 5)) {
               what_ = org.tensorflow.proto.Summary.getDefaultInstance();
             }
    -        summaryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        summaryBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.Summary, org.tensorflow.proto.Summary.Builder, org.tensorflow.proto.SummaryOrBuilder>(
                     (org.tensorflow.proto.Summary) what_,
                     getParentForChildren(),
    @@ -1587,11 +1555,11 @@ public org.tensorflow.proto.SummaryOrBuilder getSummaryOrBuilder() {
             what_ = null;
           }
           whatCase_ = 5;
    -      onChanged();;
    +      onChanged();
           return summaryBuilder_;
         }
     
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.LogMessage, org.tensorflow.proto.LogMessage.Builder, org.tensorflow.proto.LogMessageOrBuilder> logMessageBuilder_;
         /**
          * 
    @@ -1772,14 +1740,14 @@ public org.tensorflow.proto.SummaryOrBuilder getSummaryOrBuilder() {
          *
          * .tensorflow.LogMessage log_message = 6 [deprecated = true];
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.LogMessage, org.tensorflow.proto.LogMessage.Builder, org.tensorflow.proto.LogMessageOrBuilder> 
             getLogMessageFieldBuilder() {
           if (logMessageBuilder_ == null) {
             if (!(whatCase_ == 6)) {
               what_ = org.tensorflow.proto.LogMessage.getDefaultInstance();
             }
    -        logMessageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        logMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.LogMessage, org.tensorflow.proto.LogMessage.Builder, org.tensorflow.proto.LogMessageOrBuilder>(
                     (org.tensorflow.proto.LogMessage) what_,
                     getParentForChildren(),
    @@ -1787,11 +1755,11 @@ public org.tensorflow.proto.SummaryOrBuilder getSummaryOrBuilder() {
             what_ = null;
           }
           whatCase_ = 6;
    -      onChanged();;
    +      onChanged();
           return logMessageBuilder_;
         }
     
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.SessionLog, org.tensorflow.proto.SessionLog.Builder, org.tensorflow.proto.SessionLogOrBuilder> sessionLogBuilder_;
         /**
          * 
    @@ -1950,14 +1918,14 @@ public org.tensorflow.proto.SessionLogOrBuilder getSessionLogOrBuilder() {
          *
          * .tensorflow.SessionLog session_log = 7;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.SessionLog, org.tensorflow.proto.SessionLog.Builder, org.tensorflow.proto.SessionLogOrBuilder> 
             getSessionLogFieldBuilder() {
           if (sessionLogBuilder_ == null) {
             if (!(whatCase_ == 7)) {
               what_ = org.tensorflow.proto.SessionLog.getDefaultInstance();
             }
    -        sessionLogBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        sessionLogBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.SessionLog, org.tensorflow.proto.SessionLog.Builder, org.tensorflow.proto.SessionLogOrBuilder>(
                     (org.tensorflow.proto.SessionLog) what_,
                     getParentForChildren(),
    @@ -1965,11 +1933,11 @@ public org.tensorflow.proto.SessionLogOrBuilder getSessionLogOrBuilder() {
             what_ = null;
           }
           whatCase_ = 7;
    -      onChanged();;
    +      onChanged();
           return sessionLogBuilder_;
         }
     
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TaggedRunMetadata, org.tensorflow.proto.TaggedRunMetadata.Builder, org.tensorflow.proto.TaggedRunMetadataOrBuilder> taggedRunMetadataBuilder_;
         /**
          * 
    @@ -2128,14 +2096,14 @@ public org.tensorflow.proto.TaggedRunMetadataOrBuilder getTaggedRunMetadataOrBui
          *
          * .tensorflow.TaggedRunMetadata tagged_run_metadata = 8;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TaggedRunMetadata, org.tensorflow.proto.TaggedRunMetadata.Builder, org.tensorflow.proto.TaggedRunMetadataOrBuilder> 
             getTaggedRunMetadataFieldBuilder() {
           if (taggedRunMetadataBuilder_ == null) {
             if (!(whatCase_ == 8)) {
               what_ = org.tensorflow.proto.TaggedRunMetadata.getDefaultInstance();
             }
    -        taggedRunMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        taggedRunMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.TaggedRunMetadata, org.tensorflow.proto.TaggedRunMetadata.Builder, org.tensorflow.proto.TaggedRunMetadataOrBuilder>(
                     (org.tensorflow.proto.TaggedRunMetadata) what_,
                     getParentForChildren(),
    @@ -2143,7 +2111,7 @@ public org.tensorflow.proto.TaggedRunMetadataOrBuilder getTaggedRunMetadataOrBui
             what_ = null;
           }
           whatCase_ = 8;
    -      onChanged();;
    +      onChanged();
           return taggedRunMetadataBuilder_;
         }
     
    @@ -2182,10 +2150,8 @@ public com.google.protobuf.ByteString getMetaGraphDef() {
          * @return This builder for chaining.
          */
         public Builder setMetaGraphDef(com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  whatCase_ = 9;
    +      if (value == null) { throw new NullPointerException(); }
    +      whatCase_ = 9;
           what_ = value;
           onChanged();
           return this;
    @@ -2208,7 +2174,7 @@ public Builder clearMetaGraphDef() {
         }
     
         private org.tensorflow.proto.SourceMetadata sourceMetadata_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.SourceMetadata, org.tensorflow.proto.SourceMetadata.Builder, org.tensorflow.proto.SourceMetadataOrBuilder> sourceMetadataBuilder_;
         /**
          * 
    @@ -2220,7 +2186,7 @@ public Builder clearMetaGraphDef() {
          * @return Whether the sourceMetadata field is set.
          */
         public boolean hasSourceMetadata() {
    -      return sourceMetadataBuilder_ != null || sourceMetadata_ != null;
    +      return ((bitField0_ & 0x00000200) != 0);
         }
         /**
          * 
    @@ -2252,11 +2218,11 @@ public Builder setSourceMetadata(org.tensorflow.proto.SourceMetadata value) {
               throw new NullPointerException();
             }
             sourceMetadata_ = value;
    -        onChanged();
           } else {
             sourceMetadataBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000200;
    +      onChanged();
           return this;
         }
         /**
    @@ -2271,11 +2237,11 @@ public Builder setSourceMetadata(
             org.tensorflow.proto.SourceMetadata.Builder builderForValue) {
           if (sourceMetadataBuilder_ == null) {
             sourceMetadata_ = builderForValue.build();
    -        onChanged();
           } else {
             sourceMetadataBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000200;
    +      onChanged();
           return this;
         }
         /**
    @@ -2288,17 +2254,20 @@ public Builder setSourceMetadata(
          */
         public Builder mergeSourceMetadata(org.tensorflow.proto.SourceMetadata value) {
           if (sourceMetadataBuilder_ == null) {
    -        if (sourceMetadata_ != null) {
    -          sourceMetadata_ =
    -            org.tensorflow.proto.SourceMetadata.newBuilder(sourceMetadata_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000200) != 0) &&
    +          sourceMetadata_ != null &&
    +          sourceMetadata_ != org.tensorflow.proto.SourceMetadata.getDefaultInstance()) {
    +          getSourceMetadataBuilder().mergeFrom(value);
             } else {
               sourceMetadata_ = value;
             }
    -        onChanged();
           } else {
             sourceMetadataBuilder_.mergeFrom(value);
           }
    -
    +      if (sourceMetadata_ != null) {
    +        bitField0_ |= 0x00000200;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -2310,14 +2279,13 @@ public Builder mergeSourceMetadata(org.tensorflow.proto.SourceMetadata value) {
          * .tensorflow.SourceMetadata source_metadata = 10;
          */
         public Builder clearSourceMetadata() {
    -      if (sourceMetadataBuilder_ == null) {
    -        sourceMetadata_ = null;
    -        onChanged();
    -      } else {
    -        sourceMetadata_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000200);
    +      sourceMetadata_ = null;
    +      if (sourceMetadataBuilder_ != null) {
    +        sourceMetadataBuilder_.dispose();
             sourceMetadataBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -2329,7 +2297,7 @@ public Builder clearSourceMetadata() {
          * .tensorflow.SourceMetadata source_metadata = 10;
          */
         public org.tensorflow.proto.SourceMetadata.Builder getSourceMetadataBuilder() {
    -      
    +      bitField0_ |= 0x00000200;
           onChanged();
           return getSourceMetadataFieldBuilder().getBuilder();
         }
    @@ -2357,11 +2325,11 @@ public org.tensorflow.proto.SourceMetadataOrBuilder getSourceMetadataOrBuilder()
          *
          * .tensorflow.SourceMetadata source_metadata = 10;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.SourceMetadata, org.tensorflow.proto.SourceMetadata.Builder, org.tensorflow.proto.SourceMetadataOrBuilder> 
             getSourceMetadataFieldBuilder() {
           if (sourceMetadataBuilder_ == null) {
    -        sourceMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        sourceMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.SourceMetadata, org.tensorflow.proto.SourceMetadata.Builder, org.tensorflow.proto.SourceMetadataOrBuilder>(
                     getSourceMetadata(),
                     getParentForChildren(),
    @@ -2370,18 +2338,6 @@ public org.tensorflow.proto.SourceMetadataOrBuilder getSourceMetadataOrBuilder()
           }
           return sourceMetadataBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.Event)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/EventOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/EventOrBuilder.java
    index da3bf5e5619..61a590cfd66 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/EventOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/EventOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/util/event.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -251,5 +253,5 @@ public interface EventOrBuilder extends
        */
       org.tensorflow.proto.SourceMetadataOrBuilder getSourceMetadataOrBuilder();
     
    -  public org.tensorflow.proto.Event.WhatCase getWhatCase();
    +  org.tensorflow.proto.Event.WhatCase getWhatCase();
     }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/EventProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/EventProtos.java
    index d6e4f4e9898..ec026ec2e7f 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/EventProtos.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/EventProtos.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/util/event.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class EventProtos {
       private EventProtos() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      EventProtos.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,47 +28,47 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_Event_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_Event_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_SourceMetadata_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_SourceMetadata_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_LogMessage_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_LogMessage_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_SessionLog_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_SessionLog_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_TaggedRunMetadata_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_TaggedRunMetadata_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_WatchdogConfig_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_WatchdogConfig_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_RequestedExitCode_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_RequestedExitCode_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_WorkerHeartbeatRequest_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_WorkerHeartbeatRequest_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_WorkerHeartbeatResponse_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_WorkerHeartbeatResponse_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -118,57 +129,58 @@ public static void registerAllExtensions(
         internal_static_tensorflow_Event_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_Event_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_Event_descriptor,
             new java.lang.String[] { "WallTime", "Step", "FileVersion", "GraphDef", "Summary", "LogMessage", "SessionLog", "TaggedRunMetadata", "MetaGraphDef", "SourceMetadata", "What", });
         internal_static_tensorflow_SourceMetadata_descriptor =
           getDescriptor().getMessageTypes().get(1);
         internal_static_tensorflow_SourceMetadata_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_SourceMetadata_descriptor,
             new java.lang.String[] { "Writer", });
         internal_static_tensorflow_LogMessage_descriptor =
           getDescriptor().getMessageTypes().get(2);
         internal_static_tensorflow_LogMessage_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_LogMessage_descriptor,
             new java.lang.String[] { "Level", "Message", });
         internal_static_tensorflow_SessionLog_descriptor =
           getDescriptor().getMessageTypes().get(3);
         internal_static_tensorflow_SessionLog_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_SessionLog_descriptor,
             new java.lang.String[] { "Status", "CheckpointPath", "Msg", });
         internal_static_tensorflow_TaggedRunMetadata_descriptor =
           getDescriptor().getMessageTypes().get(4);
         internal_static_tensorflow_TaggedRunMetadata_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_TaggedRunMetadata_descriptor,
             new java.lang.String[] { "Tag", "RunMetadata", });
         internal_static_tensorflow_WatchdogConfig_descriptor =
           getDescriptor().getMessageTypes().get(5);
         internal_static_tensorflow_WatchdogConfig_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_WatchdogConfig_descriptor,
             new java.lang.String[] { "TimeoutMs", });
         internal_static_tensorflow_RequestedExitCode_descriptor =
           getDescriptor().getMessageTypes().get(6);
         internal_static_tensorflow_RequestedExitCode_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_RequestedExitCode_descriptor,
             new java.lang.String[] { "ExitCode", });
         internal_static_tensorflow_WorkerHeartbeatRequest_descriptor =
           getDescriptor().getMessageTypes().get(7);
         internal_static_tensorflow_WorkerHeartbeatRequest_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_WorkerHeartbeatRequest_descriptor,
             new java.lang.String[] { "ShutdownMode", "WatchdogConfig", "ExitCode", });
         internal_static_tensorflow_WorkerHeartbeatResponse_descriptor =
           getDescriptor().getMessageTypes().get(8);
         internal_static_tensorflow_WorkerHeartbeatResponse_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_WorkerHeartbeatResponse_descriptor,
             new java.lang.String[] { "HealthStatus", "WorkerLog", "Hostname", });
    +    descriptor.resolveAllFeaturesImmutable();
         org.tensorflow.proto.SummaryProtos.getDescriptor();
       }
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Example.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Example.java
    index 914933575bb..4f1f03853ec 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Example.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Example.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/example/example.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,42 +9,40 @@
      * Protobuf type {@code tensorflow.Example}
      */
     public final class Example extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.Example)
         ExampleOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      Example.class.getName());
    +  }
       // Use Example.newBuilder() to construct.
    -  private Example(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private Example(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private Example() {
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new Example();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.ExampleProtos.internal_static_tensorflow_Example_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.ExampleProtos.internal_static_tensorflow_Example_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
                 org.tensorflow.proto.Example.class, org.tensorflow.proto.Example.Builder.class);
       }
     
    +  private int bitField0_;
       public static final int FEATURES_FIELD_NUMBER = 1;
       private org.tensorflow.proto.Features features_;
       /**
    @@ -51,7 +51,7 @@ protected java.lang.Object newInstance(
        */
       @java.lang.Override
       public boolean hasFeatures() {
    -    return features_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * .tensorflow.Features features = 1;
    @@ -66,7 +66,7 @@ public org.tensorflow.proto.Features getFeatures() {
        */
       @java.lang.Override
       public org.tensorflow.proto.FeaturesOrBuilder getFeaturesOrBuilder() {
    -    return getFeatures();
    +    return features_ == null ? org.tensorflow.proto.Features.getDefaultInstance() : features_;
       }
     
       private byte memoizedIsInitialized = -1;
    @@ -83,7 +83,7 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (features_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(1, getFeatures());
         }
         getUnknownFields().writeTo(output);
    @@ -95,7 +95,7 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (features_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(1, getFeatures());
         }
    @@ -173,39 +173,41 @@ public static org.tensorflow.proto.Example parseFrom(
       }
       public static org.tensorflow.proto.Example parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.Example parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.Example parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.Example parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.Example parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.Example parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -225,7 +227,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -233,7 +235,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.Example}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.Example)
           org.tensorflow.proto.ExampleOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -242,7 +244,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.ExampleProtos.internal_static_tensorflow_Example_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -251,21 +253,27 @@ public static final class Builder extends
     
         // Construct using org.tensorflow.proto.Example.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getFeaturesFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    -      if (featuresBuilder_ == null) {
    -        features_ = null;
    -      } else {
    -        features_ = null;
    +      bitField0_ = 0;
    +      features_ = null;
    +      if (featuresBuilder_ != null) {
    +        featuresBuilder_.dispose();
             featuresBuilder_ = null;
           }
           return this;
    @@ -294,47 +302,23 @@ public org.tensorflow.proto.Example build() {
         @java.lang.Override
         public org.tensorflow.proto.Example buildPartial() {
           org.tensorflow.proto.Example result = new org.tensorflow.proto.Example(this);
    -      if (featuresBuilder_ == null) {
    -        result.features_ = features_;
    -      } else {
    -        result.features_ = featuresBuilder_.build();
    -      }
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.Example result) {
    +      int from_bitField0_ = bitField0_;
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.features_ = featuresBuilder_ == null
    +            ? features_
    +            : featuresBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
    +      }
    +      result.bitField0_ |= to_bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.Example) {
    @@ -380,7 +364,7 @@ public Builder mergeFrom(
                   input.readMessage(
                       getFeaturesFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 default: {
    @@ -398,16 +382,17 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private org.tensorflow.proto.Features features_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.Features, org.tensorflow.proto.Features.Builder, org.tensorflow.proto.FeaturesOrBuilder> featuresBuilder_;
         /**
          * .tensorflow.Features features = 1;
          * @return Whether the features field is set.
          */
         public boolean hasFeatures() {
    -      return featuresBuilder_ != null || features_ != null;
    +      return ((bitField0_ & 0x00000001) != 0);
         }
         /**
          * .tensorflow.Features features = 1;
    @@ -429,11 +414,11 @@ public Builder setFeatures(org.tensorflow.proto.Features value) {
               throw new NullPointerException();
             }
             features_ = value;
    -        onChanged();
           } else {
             featuresBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000001;
    +      onChanged();
           return this;
         }
         /**
    @@ -443,11 +428,11 @@ public Builder setFeatures(
             org.tensorflow.proto.Features.Builder builderForValue) {
           if (featuresBuilder_ == null) {
             features_ = builderForValue.build();
    -        onChanged();
           } else {
             featuresBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000001;
    +      onChanged();
           return this;
         }
         /**
    @@ -455,38 +440,40 @@ public Builder setFeatures(
          */
         public Builder mergeFeatures(org.tensorflow.proto.Features value) {
           if (featuresBuilder_ == null) {
    -        if (features_ != null) {
    -          features_ =
    -            org.tensorflow.proto.Features.newBuilder(features_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000001) != 0) &&
    +          features_ != null &&
    +          features_ != org.tensorflow.proto.Features.getDefaultInstance()) {
    +          getFeaturesBuilder().mergeFrom(value);
             } else {
               features_ = value;
             }
    -        onChanged();
           } else {
             featuresBuilder_.mergeFrom(value);
           }
    -
    +      if (features_ != null) {
    +        bitField0_ |= 0x00000001;
    +        onChanged();
    +      }
           return this;
         }
         /**
          * .tensorflow.Features features = 1;
          */
         public Builder clearFeatures() {
    -      if (featuresBuilder_ == null) {
    -        features_ = null;
    -        onChanged();
    -      } else {
    -        features_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000001);
    +      features_ = null;
    +      if (featuresBuilder_ != null) {
    +        featuresBuilder_.dispose();
             featuresBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
          * .tensorflow.Features features = 1;
          */
         public org.tensorflow.proto.Features.Builder getFeaturesBuilder() {
    -      
    +      bitField0_ |= 0x00000001;
           onChanged();
           return getFeaturesFieldBuilder().getBuilder();
         }
    @@ -504,11 +491,11 @@ public org.tensorflow.proto.FeaturesOrBuilder getFeaturesOrBuilder() {
         /**
          * .tensorflow.Features features = 1;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.Features, org.tensorflow.proto.Features.Builder, org.tensorflow.proto.FeaturesOrBuilder> 
             getFeaturesFieldBuilder() {
           if (featuresBuilder_ == null) {
    -        featuresBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        featuresBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.Features, org.tensorflow.proto.Features.Builder, org.tensorflow.proto.FeaturesOrBuilder>(
                     getFeatures(),
                     getParentForChildren(),
    @@ -517,18 +504,6 @@ public org.tensorflow.proto.FeaturesOrBuilder getFeaturesOrBuilder() {
           }
           return featuresBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.Example)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleOrBuilder.java
    index d886f35527c..090e50da446 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/example/example.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleParserConfiguration.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleParserConfiguration.java
    index 9a9e5a51d51..a74f6f6df59 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleParserConfiguration.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleParserConfiguration.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/example/example_parser_configuration.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,29 +9,26 @@
      * Protobuf type {@code tensorflow.ExampleParserConfiguration}
      */
     public final class ExampleParserConfiguration extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.ExampleParserConfiguration)
         ExampleParserConfigurationOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      ExampleParserConfiguration.class.getName());
    +  }
       // Use ExampleParserConfiguration.newBuilder() to construct.
    -  private ExampleParserConfiguration(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private ExampleParserConfiguration(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private ExampleParserConfiguration() {
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new ExampleParserConfiguration();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.ExampleParserConfigurationProtos.internal_static_tensorflow_ExampleParserConfiguration_descriptor;
    @@ -37,7 +36,7 @@ protected java.lang.Object newInstance(
     
       @SuppressWarnings({"rawtypes"})
       @java.lang.Override
    -  protected com.google.protobuf.MapField internalGetMapField(
    +  protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
           int number) {
         switch (number) {
           case 1:
    @@ -48,7 +47,7 @@ protected com.google.protobuf.MapField internalGetMapField(
         }
       }
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.ExampleParserConfigurationProtos.internal_static_tensorflow_ExampleParserConfiguration_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -67,6 +66,7 @@ private static final class FeatureMapDefaultEntryHolder {
                     com.google.protobuf.WireFormat.FieldType.MESSAGE,
                     org.tensorflow.proto.FeatureConfiguration.getDefaultInstance());
       }
    +  @SuppressWarnings("serial")
       private com.google.protobuf.MapField<
           java.lang.String, org.tensorflow.proto.FeatureConfiguration> featureMap_;
       private com.google.protobuf.MapField
    @@ -77,14 +77,12 @@ private static final class FeatureMapDefaultEntryHolder {
         }
         return featureMap_;
       }
    -
       public int getFeatureMapCount() {
         return internalGetFeatureMap().getMap().size();
       }
       /**
        * map<string, .tensorflow.FeatureConfiguration> feature_map = 1;
        */
    -
       @java.lang.Override
       public boolean containsFeatureMap(
           java.lang.String key) {
    @@ -103,7 +101,6 @@ public java.util.Mapmap<string, .tensorflow.FeatureConfiguration> feature_map = 1;
        */
       @java.lang.Override
    -
       public java.util.Map getFeatureMapMap() {
         return internalGetFeatureMap().getMap();
       }
    @@ -111,10 +108,11 @@ public java.util.Mapmap<string, .tensorflow.FeatureConfiguration> feature_map = 1;
        */
       @java.lang.Override
    -
    -  public org.tensorflow.proto.FeatureConfiguration getFeatureMapOrDefault(
    +  public /* nullable */
    +org.tensorflow.proto.FeatureConfiguration getFeatureMapOrDefault(
           java.lang.String key,
    -      org.tensorflow.proto.FeatureConfiguration defaultValue) {
    +      /* nullable */
    +org.tensorflow.proto.FeatureConfiguration defaultValue) {
         if (key == null) { throw new NullPointerException("map key"); }
         java.util.Map map =
             internalGetFeatureMap().getMap();
    @@ -124,7 +122,6 @@ public org.tensorflow.proto.FeatureConfiguration getFeatureMapOrDefault(
        * map<string, .tensorflow.FeatureConfiguration> feature_map = 1;
        */
       @java.lang.Override
    -
       public org.tensorflow.proto.FeatureConfiguration getFeatureMapOrThrow(
           java.lang.String key) {
         if (key == null) { throw new NullPointerException("map key"); }
    @@ -150,7 +147,7 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    com.google.protobuf.GeneratedMessageV3
    +    com.google.protobuf.GeneratedMessage
           .serializeStringMapTo(
             output,
             internalGetFeatureMap(),
    @@ -246,39 +243,41 @@ public static org.tensorflow.proto.ExampleParserConfiguration parseFrom(
       }
       public static org.tensorflow.proto.ExampleParserConfiguration parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.ExampleParserConfiguration parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.ExampleParserConfiguration parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.ExampleParserConfiguration parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.ExampleParserConfiguration parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.ExampleParserConfiguration parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -298,7 +297,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -306,7 +305,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.ExampleParserConfiguration}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.ExampleParserConfiguration)
           org.tensorflow.proto.ExampleParserConfigurationOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -315,7 +314,7 @@ public static final class Builder extends
         }
     
         @SuppressWarnings({"rawtypes"})
    -    protected com.google.protobuf.MapField internalGetMapField(
    +    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
             int number) {
           switch (number) {
             case 1:
    @@ -326,7 +325,7 @@ protected com.google.protobuf.MapField internalGetMapField(
           }
         }
         @SuppressWarnings({"rawtypes"})
    -    protected com.google.protobuf.MapField internalGetMutableMapField(
    +    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
             int number) {
           switch (number) {
             case 1:
    @@ -337,7 +336,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField(
           }
         }
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.ExampleParserConfigurationProtos.internal_static_tensorflow_ExampleParserConfiguration_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -350,13 +349,14 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           internalGetMutableFeatureMap().clear();
           return this;
         }
    @@ -384,45 +384,18 @@ public org.tensorflow.proto.ExampleParserConfiguration build() {
         @java.lang.Override
         public org.tensorflow.proto.ExampleParserConfiguration buildPartial() {
           org.tensorflow.proto.ExampleParserConfiguration result = new org.tensorflow.proto.ExampleParserConfiguration(this);
    -      int from_bitField0_ = bitField0_;
    -      result.featureMap_ = internalGetFeatureMap();
    -      result.featureMap_.makeImmutable();
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.ExampleParserConfiguration result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.featureMap_ = internalGetFeatureMap().build(FeatureMapDefaultEntryHolder.defaultEntry);
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.ExampleParserConfiguration) {
    @@ -437,6 +410,7 @@ public Builder mergeFrom(org.tensorflow.proto.ExampleParserConfiguration other)
           if (other == org.tensorflow.proto.ExampleParserConfiguration.getDefaultInstance()) return this;
           internalGetMutableFeatureMap().mergeFrom(
               other.internalGetFeatureMap());
    +      bitField0_ |= 0x00000001;
           this.mergeUnknownFields(other.getUnknownFields());
           onChanged();
           return this;
    @@ -467,8 +441,9 @@ public Builder mergeFrom(
                   com.google.protobuf.MapEntry
                   featureMap__ = input.readMessage(
                       FeatureMapDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
    -              internalGetMutableFeatureMap().getMutableMap().put(
    +              internalGetMutableFeatureMap().ensureBuilderMap().put(
                       featureMap__.getKey(), featureMap__.getValue());
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 default: {
    @@ -488,41 +463,49 @@ public Builder mergeFrom(
         }
         private int bitField0_;
     
    -    private com.google.protobuf.MapField<
    -        java.lang.String, org.tensorflow.proto.FeatureConfiguration> featureMap_;
    -    private com.google.protobuf.MapField
    -    internalGetFeatureMap() {
    +    private static final class FeatureMapConverter implements com.google.protobuf.MapFieldBuilder.Converter {
    +      @java.lang.Override
    +      public org.tensorflow.proto.FeatureConfiguration build(org.tensorflow.proto.FeatureConfigurationOrBuilder val) {
    +        if (val instanceof org.tensorflow.proto.FeatureConfiguration) { return (org.tensorflow.proto.FeatureConfiguration) val; }
    +        return ((org.tensorflow.proto.FeatureConfiguration.Builder) val).build();
    +      }
    +
    +      @java.lang.Override
    +      public com.google.protobuf.MapEntry defaultEntry() {
    +        return FeatureMapDefaultEntryHolder.defaultEntry;
    +      }
    +    };
    +    private static final FeatureMapConverter featureMapConverter = new FeatureMapConverter();
    +
    +    private com.google.protobuf.MapFieldBuilder<
    +        java.lang.String, org.tensorflow.proto.FeatureConfigurationOrBuilder, org.tensorflow.proto.FeatureConfiguration, org.tensorflow.proto.FeatureConfiguration.Builder> featureMap_;
    +    private com.google.protobuf.MapFieldBuilder
    +        internalGetFeatureMap() {
           if (featureMap_ == null) {
    -        return com.google.protobuf.MapField.emptyMapField(
    -            FeatureMapDefaultEntryHolder.defaultEntry);
    +        return new com.google.protobuf.MapFieldBuilder<>(featureMapConverter);
           }
           return featureMap_;
         }
    -    private com.google.protobuf.MapField
    -    internalGetMutableFeatureMap() {
    -      onChanged();;
    +    private com.google.protobuf.MapFieldBuilder
    +        internalGetMutableFeatureMap() {
           if (featureMap_ == null) {
    -        featureMap_ = com.google.protobuf.MapField.newMapField(
    -            FeatureMapDefaultEntryHolder.defaultEntry);
    -      }
    -      if (!featureMap_.isMutable()) {
    -        featureMap_ = featureMap_.copy();
    +        featureMap_ = new com.google.protobuf.MapFieldBuilder<>(featureMapConverter);
           }
    +      bitField0_ |= 0x00000001;
    +      onChanged();
           return featureMap_;
         }
    -
         public int getFeatureMapCount() {
    -      return internalGetFeatureMap().getMap().size();
    +      return internalGetFeatureMap().ensureBuilderMap().size();
         }
         /**
          * map<string, .tensorflow.FeatureConfiguration> feature_map = 1;
          */
    -
         @java.lang.Override
         public boolean containsFeatureMap(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      return internalGetFeatureMap().getMap().containsKey(key);
    +      return internalGetFeatureMap().ensureBuilderMap().containsKey(key);
         }
         /**
          * Use {@link #getFeatureMapMap()} instead.
    @@ -536,52 +519,47 @@ public java.util.Mapmap<string, .tensorflow.FeatureConfiguration> feature_map = 1;
          */
         @java.lang.Override
    -
         public java.util.Map getFeatureMapMap() {
    -      return internalGetFeatureMap().getMap();
    +      return internalGetFeatureMap().getImmutableMap();
         }
         /**
          * map<string, .tensorflow.FeatureConfiguration> feature_map = 1;
          */
         @java.lang.Override
    -
    -    public org.tensorflow.proto.FeatureConfiguration getFeatureMapOrDefault(
    +    public /* nullable */
    +org.tensorflow.proto.FeatureConfiguration getFeatureMapOrDefault(
             java.lang.String key,
    -        org.tensorflow.proto.FeatureConfiguration defaultValue) {
    +        /* nullable */
    +org.tensorflow.proto.FeatureConfiguration defaultValue) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      java.util.Map map =
    -          internalGetFeatureMap().getMap();
    -      return map.containsKey(key) ? map.get(key) : defaultValue;
    +      java.util.Map map = internalGetMutableFeatureMap().ensureBuilderMap();
    +      return map.containsKey(key) ? featureMapConverter.build(map.get(key)) : defaultValue;
         }
         /**
          * map<string, .tensorflow.FeatureConfiguration> feature_map = 1;
          */
         @java.lang.Override
    -
         public org.tensorflow.proto.FeatureConfiguration getFeatureMapOrThrow(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      java.util.Map map =
    -          internalGetFeatureMap().getMap();
    +      java.util.Map map = internalGetMutableFeatureMap().ensureBuilderMap();
           if (!map.containsKey(key)) {
             throw new java.lang.IllegalArgumentException();
           }
    -      return map.get(key);
    +      return featureMapConverter.build(map.get(key));
         }
    -
         public Builder clearFeatureMap() {
    -      internalGetMutableFeatureMap().getMutableMap()
    -          .clear();
    +      bitField0_ = (bitField0_ & ~0x00000001);
    +      internalGetMutableFeatureMap().clear();
           return this;
         }
         /**
          * map<string, .tensorflow.FeatureConfiguration> feature_map = 1;
          */
    -
         public Builder removeFeatureMap(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      internalGetMutableFeatureMap().getMutableMap()
    +      internalGetMutableFeatureMap().ensureBuilderMap()
               .remove(key);
           return this;
         }
    @@ -590,8 +568,9 @@ public Builder removeFeatureMap(
          */
         @java.lang.Deprecated
         public java.util.Map
    -    getMutableFeatureMap() {
    -      return internalGetMutableFeatureMap().getMutableMap();
    +        getMutableFeatureMap() {
    +      bitField0_ |= 0x00000001;
    +      return internalGetMutableFeatureMap().ensureMessageMap();
         }
         /**
          * map<string, .tensorflow.FeatureConfiguration> feature_map = 1;
    @@ -600,37 +579,45 @@ public Builder putFeatureMap(
             java.lang.String key,
             org.tensorflow.proto.FeatureConfiguration value) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      if (value == null) {
    -  throw new NullPointerException("map value");
    -}
    -
    -      internalGetMutableFeatureMap().getMutableMap()
    +      if (value == null) { throw new NullPointerException("map value"); }
    +      internalGetMutableFeatureMap().ensureBuilderMap()
               .put(key, value);
    +      bitField0_ |= 0x00000001;
           return this;
         }
         /**
          * map<string, .tensorflow.FeatureConfiguration> feature_map = 1;
          */
    -
         public Builder putAllFeatureMap(
             java.util.Map values) {
    -      internalGetMutableFeatureMap().getMutableMap()
    +      for (java.util.Map.Entry e : values.entrySet()) {
    +        if (e.getKey() == null || e.getValue() == null) {
    +          throw new NullPointerException();
    +        }
    +      }
    +      internalGetMutableFeatureMap().ensureBuilderMap()
               .putAll(values);
    +      bitField0_ |= 0x00000001;
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    +    /**
    +     * map<string, .tensorflow.FeatureConfiguration> feature_map = 1;
    +     */
    +    public org.tensorflow.proto.FeatureConfiguration.Builder putFeatureMapBuilderIfAbsent(
    +        java.lang.String key) {
    +      java.util.Map builderMap = internalGetMutableFeatureMap().ensureBuilderMap();
    +      org.tensorflow.proto.FeatureConfigurationOrBuilder entry = builderMap.get(key);
    +      if (entry == null) {
    +        entry = org.tensorflow.proto.FeatureConfiguration.newBuilder();
    +        builderMap.put(key, entry);
    +      }
    +      if (entry instanceof org.tensorflow.proto.FeatureConfiguration) {
    +        entry = ((org.tensorflow.proto.FeatureConfiguration) entry).toBuilder();
    +        builderMap.put(key, entry);
    +      }
    +      return (org.tensorflow.proto.FeatureConfiguration.Builder) entry;
         }
     
    -
         // @@protoc_insertion_point(builder_scope:tensorflow.ExampleParserConfiguration)
       }
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleParserConfigurationOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleParserConfigurationOrBuilder.java
    index 07a67ef3560..1f35e0642bc 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleParserConfigurationOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleParserConfigurationOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/example/example_parser_configuration.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -30,7 +32,6 @@ boolean containsFeatureMap(
       /**
        * map<string, .tensorflow.FeatureConfiguration> feature_map = 1;
        */
    -
       /* nullable */
     org.tensorflow.proto.FeatureConfiguration getFeatureMapOrDefault(
           java.lang.String key,
    @@ -39,7 +40,6 @@ org.tensorflow.proto.FeatureConfiguration getFeatureMapOrDefault(
       /**
        * map<string, .tensorflow.FeatureConfiguration> feature_map = 1;
        */
    -
       org.tensorflow.proto.FeatureConfiguration getFeatureMapOrThrow(
           java.lang.String key);
     }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleParserConfigurationProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleParserConfigurationProtos.java
    index 19c580bf65a..4d14ee3d4b8 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleParserConfigurationProtos.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleParserConfigurationProtos.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/example/example_parser_configuration.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class ExampleParserConfigurationProtos {
       private ExampleParserConfigurationProtos() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      ExampleParserConfigurationProtos.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,27 +28,27 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_VarLenFeatureProto_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_VarLenFeatureProto_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_FixedLenFeatureProto_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_FixedLenFeatureProto_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_FeatureConfiguration_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_FeatureConfiguration_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_ExampleParserConfiguration_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_ExampleParserConfiguration_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_ExampleParserConfiguration_FeatureMapEntry_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_ExampleParserConfiguration_FeatureMapEntry_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -86,33 +97,34 @@ public static void registerAllExtensions(
         internal_static_tensorflow_VarLenFeatureProto_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_VarLenFeatureProto_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_VarLenFeatureProto_descriptor,
             new java.lang.String[] { "Dtype", "ValuesOutputTensorName", "IndicesOutputTensorName", "ShapesOutputTensorName", });
         internal_static_tensorflow_FixedLenFeatureProto_descriptor =
           getDescriptor().getMessageTypes().get(1);
         internal_static_tensorflow_FixedLenFeatureProto_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_FixedLenFeatureProto_descriptor,
             new java.lang.String[] { "Dtype", "Shape", "DefaultValue", "ValuesOutputTensorName", });
         internal_static_tensorflow_FeatureConfiguration_descriptor =
           getDescriptor().getMessageTypes().get(2);
         internal_static_tensorflow_FeatureConfiguration_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_FeatureConfiguration_descriptor,
             new java.lang.String[] { "FixedLenFeature", "VarLenFeature", "Config", });
         internal_static_tensorflow_ExampleParserConfiguration_descriptor =
           getDescriptor().getMessageTypes().get(3);
         internal_static_tensorflow_ExampleParserConfiguration_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_ExampleParserConfiguration_descriptor,
             new java.lang.String[] { "FeatureMap", });
         internal_static_tensorflow_ExampleParserConfiguration_FeatureMapEntry_descriptor =
           internal_static_tensorflow_ExampleParserConfiguration_descriptor.getNestedTypes().get(0);
         internal_static_tensorflow_ExampleParserConfiguration_FeatureMapEntry_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_ExampleParserConfiguration_FeatureMapEntry_descriptor,
             new java.lang.String[] { "Key", "Value", });
    +    descriptor.resolveAllFeaturesImmutable();
         org.tensorflow.proto.TensorProtos.getDescriptor();
         org.tensorflow.proto.TensorShapeProtos.getDescriptor();
         org.tensorflow.proto.TypesProtos.getDescriptor();
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleProtos.java
    index 116f1ee7100..46f3017c277 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleProtos.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleProtos.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/example/example.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class ExampleProtos {
       private ExampleProtos() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      ExampleProtos.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,12 +28,12 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_Example_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_Example_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_SequenceExample_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_SequenceExample_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -52,15 +63,16 @@ public static void registerAllExtensions(
         internal_static_tensorflow_Example_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_Example_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_Example_descriptor,
             new java.lang.String[] { "Features", });
         internal_static_tensorflow_SequenceExample_descriptor =
           getDescriptor().getMessageTypes().get(1);
         internal_static_tensorflow_SequenceExample_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_SequenceExample_descriptor,
             new java.lang.String[] { "Context", "FeatureLists", });
    +    descriptor.resolveAllFeaturesImmutable();
         org.tensorflow.proto.FeatureProtos.getDescriptor();
       }
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Execution.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Execution.java
    index 0d61fd97501..46793096670 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Execution.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Execution.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/debug_event.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -13,12 +15,21 @@
      * Protobuf type {@code tensorflow.Execution}
      */
     public final class Execution extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.Execution)
         ExecutionOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      Execution.class.getName());
    +  }
       // Use Execution.newBuilder() to construct.
    -  private Execution(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private Execution(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private Execution() {
    @@ -31,33 +42,23 @@ private Execution() {
         outputTensorDeviceIds_ = emptyIntList();
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new Execution();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.DebugEventProtos.internal_static_tensorflow_Execution_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.DebugEventProtos.internal_static_tensorflow_Execution_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
                 org.tensorflow.proto.Execution.class, org.tensorflow.proto.Execution.Builder.class);
       }
     
    +  private int bitField0_;
       public static final int OP_TYPE_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object opType_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object opType_ = "";
       /**
        * 
        * Op type (e.g., "MatMul").
    @@ -105,7 +106,7 @@ public java.lang.String getOpType() {
       }
     
       public static final int NUM_OUTPUTS_FIELD_NUMBER = 2;
    -  private int numOutputs_;
    +  private int numOutputs_ = 0;
       /**
        * 
        * Number of output tensors.
    @@ -120,7 +121,8 @@ public int getNumOutputs() {
       }
     
       public static final int GRAPH_ID_FIELD_NUMBER = 3;
    -  private volatile java.lang.Object graphId_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object graphId_ = "";
       /**
        * 
        * The graph that's executed: applicable only to the eager
    @@ -168,7 +170,9 @@ public java.lang.String getGraphId() {
       }
     
       public static final int INPUT_TENSOR_IDS_FIELD_NUMBER = 4;
    -  private com.google.protobuf.Internal.LongList inputTensorIds_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.Internal.LongList inputTensorIds_ =
    +      emptyLongList();
       /**
        * 
        * IDs of the input tensors (if available).
    @@ -208,7 +212,9 @@ public long getInputTensorIds(int index) {
       private int inputTensorIdsMemoizedSerializedSize = -1;
     
       public static final int OUTPUT_TENSOR_IDS_FIELD_NUMBER = 5;
    -  private com.google.protobuf.Internal.LongList outputTensorIds_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.Internal.LongList outputTensorIds_ =
    +      emptyLongList();
       /**
        * 
        * IDs of the output tensors (if availbable).
    @@ -251,7 +257,7 @@ public long getOutputTensorIds(int index) {
       private int outputTensorIdsMemoizedSerializedSize = -1;
     
       public static final int TENSOR_DEBUG_MODE_FIELD_NUMBER = 6;
    -  private int tensorDebugMode_;
    +  private int tensorDebugMode_ = 0;
       /**
        * 
        * Type of the tensor value encapsulated in this proto.
    @@ -272,12 +278,12 @@ public long getOutputTensorIds(int index) {
        * @return The tensorDebugMode.
        */
       @java.lang.Override public org.tensorflow.proto.TensorDebugMode getTensorDebugMode() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.TensorDebugMode result = org.tensorflow.proto.TensorDebugMode.valueOf(tensorDebugMode_);
    +    org.tensorflow.proto.TensorDebugMode result = org.tensorflow.proto.TensorDebugMode.forNumber(tensorDebugMode_);
         return result == null ? org.tensorflow.proto.TensorDebugMode.UNRECOGNIZED : result;
       }
     
       public static final int TENSOR_PROTOS_FIELD_NUMBER = 7;
    +  @SuppressWarnings("serial")
       private java.util.List tensorProtos_;
       /**
        * 
    @@ -354,7 +360,7 @@ public org.tensorflow.proto.TensorProtoOrBuilder getTensorProtosOrBuilder(
        */
       @java.lang.Override
       public boolean hasCodeLocation() {
    -    return codeLocation_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * 
    @@ -377,11 +383,13 @@ public org.tensorflow.proto.CodeLocation getCodeLocation() {
        */
       @java.lang.Override
       public org.tensorflow.proto.CodeLocationOrBuilder getCodeLocationOrBuilder() {
    -    return getCodeLocation();
    +    return codeLocation_ == null ? org.tensorflow.proto.CodeLocation.getDefaultInstance() : codeLocation_;
       }
     
       public static final int OUTPUT_TENSOR_DEVICE_IDS_FIELD_NUMBER = 9;
    -  private com.google.protobuf.Internal.IntList outputTensorDeviceIds_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.Internal.IntList outputTensorDeviceIds_ =
    +      emptyIntList();
       /**
        * 
        * Debugged-generated IDs of the devices on which the output tensors reside.
    @@ -441,14 +449,14 @@ public final boolean isInitialized() {
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
         getSerializedSize();
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(opType_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, opType_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(opType_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, opType_);
         }
         if (numOutputs_ != 0) {
           output.writeInt32(2, numOutputs_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(graphId_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, graphId_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(graphId_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 3, graphId_);
         }
         if (getInputTensorIdsList().size() > 0) {
           output.writeUInt32NoTag(34);
    @@ -470,7 +478,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         for (int i = 0; i < tensorProtos_.size(); i++) {
           output.writeMessage(7, tensorProtos_.get(i));
         }
    -    if (codeLocation_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(8, getCodeLocation());
         }
         if (getOutputTensorDeviceIdsList().size() > 0) {
    @@ -489,15 +497,15 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(opType_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, opType_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(opType_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, opType_);
         }
         if (numOutputs_ != 0) {
           size += com.google.protobuf.CodedOutputStream
             .computeInt32Size(2, numOutputs_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(graphId_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, graphId_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(graphId_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(3, graphId_);
         }
         {
           int dataSize = 0;
    @@ -535,7 +543,7 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(7, tensorProtos_.get(i));
         }
    -    if (codeLocation_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(8, getCodeLocation());
         }
    @@ -666,39 +674,41 @@ public static org.tensorflow.proto.Execution parseFrom(
       }
       public static org.tensorflow.proto.Execution parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.Execution parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.Execution parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.Execution parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.Execution parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.Execution parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -718,7 +728,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -732,7 +742,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.Execution}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.Execution)
           org.tensorflow.proto.ExecutionOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -741,7 +751,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.DebugEventProtos.internal_static_tensorflow_Execution_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -750,44 +760,44 @@ public static final class Builder extends
     
         // Construct using org.tensorflow.proto.Execution.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getTensorProtosFieldBuilder();
    +        getCodeLocationFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           opType_ = "";
    -
           numOutputs_ = 0;
    -
           graphId_ = "";
    -
           inputTensorIds_ = emptyLongList();
    -      bitField0_ = (bitField0_ & ~0x00000001);
           outputTensorIds_ = emptyLongList();
    -      bitField0_ = (bitField0_ & ~0x00000002);
           tensorDebugMode_ = 0;
    -
           if (tensorProtosBuilder_ == null) {
             tensorProtos_ = java.util.Collections.emptyList();
           } else {
             tensorProtos_ = null;
             tensorProtosBuilder_.clear();
           }
    -      bitField0_ = (bitField0_ & ~0x00000004);
    -      if (codeLocationBuilder_ == null) {
    -        codeLocation_ = null;
    -      } else {
    -        codeLocation_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000040);
    +      codeLocation_ = null;
    +      if (codeLocationBuilder_ != null) {
    +        codeLocationBuilder_.dispose();
             codeLocationBuilder_ = null;
           }
           outputTensorDeviceIds_ = emptyIntList();
    -      bitField0_ = (bitField0_ & ~0x00000008);
           return this;
         }
     
    @@ -814,76 +824,60 @@ public org.tensorflow.proto.Execution build() {
         @java.lang.Override
         public org.tensorflow.proto.Execution buildPartial() {
           org.tensorflow.proto.Execution result = new org.tensorflow.proto.Execution(this);
    -      int from_bitField0_ = bitField0_;
    -      result.opType_ = opType_;
    -      result.numOutputs_ = numOutputs_;
    -      result.graphId_ = graphId_;
    -      if (((bitField0_ & 0x00000001) != 0)) {
    -        inputTensorIds_.makeImmutable();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    -      }
    -      result.inputTensorIds_ = inputTensorIds_;
    -      if (((bitField0_ & 0x00000002) != 0)) {
    -        outputTensorIds_.makeImmutable();
    -        bitField0_ = (bitField0_ & ~0x00000002);
    -      }
    -      result.outputTensorIds_ = outputTensorIds_;
    -      result.tensorDebugMode_ = tensorDebugMode_;
    +      buildPartialRepeatedFields(result);
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartialRepeatedFields(org.tensorflow.proto.Execution result) {
           if (tensorProtosBuilder_ == null) {
    -        if (((bitField0_ & 0x00000004) != 0)) {
    +        if (((bitField0_ & 0x00000040) != 0)) {
               tensorProtos_ = java.util.Collections.unmodifiableList(tensorProtos_);
    -          bitField0_ = (bitField0_ & ~0x00000004);
    +          bitField0_ = (bitField0_ & ~0x00000040);
             }
             result.tensorProtos_ = tensorProtos_;
           } else {
             result.tensorProtos_ = tensorProtosBuilder_.build();
           }
    -      if (codeLocationBuilder_ == null) {
    -        result.codeLocation_ = codeLocation_;
    -      } else {
    -        result.codeLocation_ = codeLocationBuilder_.build();
    +    }
    +
    +    private void buildPartial0(org.tensorflow.proto.Execution result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.opType_ = opType_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.numOutputs_ = numOutputs_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.graphId_ = graphId_;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        inputTensorIds_.makeImmutable();
    +        result.inputTensorIds_ = inputTensorIds_;
    +      }
    +      if (((from_bitField0_ & 0x00000010) != 0)) {
    +        outputTensorIds_.makeImmutable();
    +        result.outputTensorIds_ = outputTensorIds_;
           }
    -      if (((bitField0_ & 0x00000008) != 0)) {
    +      if (((from_bitField0_ & 0x00000020) != 0)) {
    +        result.tensorDebugMode_ = tensorDebugMode_;
    +      }
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000080) != 0)) {
    +        result.codeLocation_ = codeLocationBuilder_ == null
    +            ? codeLocation_
    +            : codeLocationBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
    +      }
    +      if (((from_bitField0_ & 0x00000100) != 0)) {
             outputTensorDeviceIds_.makeImmutable();
    -        bitField0_ = (bitField0_ & ~0x00000008);
    +        result.outputTensorDeviceIds_ = outputTensorDeviceIds_;
           }
    -      result.outputTensorDeviceIds_ = outputTensorDeviceIds_;
    -      onBuilt();
    -      return result;
    +      result.bitField0_ |= to_bitField0_;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    -    }
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.Execution) {
    @@ -898,6 +892,7 @@ public Builder mergeFrom(org.tensorflow.proto.Execution other) {
           if (other == org.tensorflow.proto.Execution.getDefaultInstance()) return this;
           if (!other.getOpType().isEmpty()) {
             opType_ = other.opType_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (other.getNumOutputs() != 0) {
    @@ -905,12 +900,14 @@ public Builder mergeFrom(org.tensorflow.proto.Execution other) {
           }
           if (!other.getGraphId().isEmpty()) {
             graphId_ = other.graphId_;
    +        bitField0_ |= 0x00000004;
             onChanged();
           }
           if (!other.inputTensorIds_.isEmpty()) {
             if (inputTensorIds_.isEmpty()) {
               inputTensorIds_ = other.inputTensorIds_;
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          inputTensorIds_.makeImmutable();
    +          bitField0_ |= 0x00000008;
             } else {
               ensureInputTensorIdsIsMutable();
               inputTensorIds_.addAll(other.inputTensorIds_);
    @@ -920,7 +917,8 @@ public Builder mergeFrom(org.tensorflow.proto.Execution other) {
           if (!other.outputTensorIds_.isEmpty()) {
             if (outputTensorIds_.isEmpty()) {
               outputTensorIds_ = other.outputTensorIds_;
    -          bitField0_ = (bitField0_ & ~0x00000002);
    +          outputTensorIds_.makeImmutable();
    +          bitField0_ |= 0x00000010;
             } else {
               ensureOutputTensorIdsIsMutable();
               outputTensorIds_.addAll(other.outputTensorIds_);
    @@ -934,7 +932,7 @@ public Builder mergeFrom(org.tensorflow.proto.Execution other) {
             if (!other.tensorProtos_.isEmpty()) {
               if (tensorProtos_.isEmpty()) {
                 tensorProtos_ = other.tensorProtos_;
    -            bitField0_ = (bitField0_ & ~0x00000004);
    +            bitField0_ = (bitField0_ & ~0x00000040);
               } else {
                 ensureTensorProtosIsMutable();
                 tensorProtos_.addAll(other.tensorProtos_);
    @@ -947,9 +945,9 @@ public Builder mergeFrom(org.tensorflow.proto.Execution other) {
                 tensorProtosBuilder_.dispose();
                 tensorProtosBuilder_ = null;
                 tensorProtos_ = other.tensorProtos_;
    -            bitField0_ = (bitField0_ & ~0x00000004);
    +            bitField0_ = (bitField0_ & ~0x00000040);
                 tensorProtosBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getTensorProtosFieldBuilder() : null;
               } else {
                 tensorProtosBuilder_.addAllMessages(other.tensorProtos_);
    @@ -962,7 +960,8 @@ public Builder mergeFrom(org.tensorflow.proto.Execution other) {
           if (!other.outputTensorDeviceIds_.isEmpty()) {
             if (outputTensorDeviceIds_.isEmpty()) {
               outputTensorDeviceIds_ = other.outputTensorDeviceIds_;
    -          bitField0_ = (bitField0_ & ~0x00000008);
    +          outputTensorDeviceIds_.makeImmutable();
    +          bitField0_ |= 0x00000100;
             } else {
               ensureOutputTensorDeviceIdsIsMutable();
               outputTensorDeviceIds_.addAll(other.outputTensorDeviceIds_);
    @@ -997,17 +996,17 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   opType_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 16: {
                   numOutputs_ = input.readInt32();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 16
                 case 26: {
                   graphId_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 26
                 case 32: {
    @@ -1044,7 +1043,7 @@ public Builder mergeFrom(
                 } // case 42
                 case 48: {
                   tensorDebugMode_ = input.readEnum();
    -
    +              bitField0_ |= 0x00000020;
                   break;
                 } // case 48
                 case 58: {
    @@ -1064,7 +1063,7 @@ public Builder mergeFrom(
                   input.readMessage(
                       getCodeLocationFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000080;
                   break;
                 } // case 66
                 case 72: {
    @@ -1156,11 +1155,9 @@ public java.lang.String getOpType() {
          */
         public Builder setOpType(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           opType_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -1174,8 +1171,8 @@ public Builder setOpType(
          * @return This builder for chaining.
          */
         public Builder clearOpType() {
    -      
           opType_ = getDefaultInstance().getOpType();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -1191,12 +1188,10 @@ public Builder clearOpType() {
          */
         public Builder setOpTypeBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           opType_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -1224,8 +1219,9 @@ public int getNumOutputs() {
          * @return This builder for chaining.
          */
         public Builder setNumOutputs(int value) {
    -      
    +
           numOutputs_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -1238,7 +1234,7 @@ public Builder setNumOutputs(int value) {
          * @return This builder for chaining.
          */
         public Builder clearNumOutputs() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000002);
           numOutputs_ = 0;
           onChanged();
           return this;
    @@ -1300,11 +1296,9 @@ public java.lang.String getGraphId() {
          */
         public Builder setGraphId(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           graphId_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -1318,8 +1312,8 @@ public Builder setGraphId(
          * @return This builder for chaining.
          */
         public Builder clearGraphId() {
    -      
           graphId_ = getDefaultInstance().getGraphId();
    +      bitField0_ = (bitField0_ & ~0x00000004);
           onChanged();
           return this;
         }
    @@ -1335,22 +1329,20 @@ public Builder clearGraphId() {
          */
         public Builder setGraphIdBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           graphId_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
     
         private com.google.protobuf.Internal.LongList inputTensorIds_ = emptyLongList();
         private void ensureInputTensorIdsIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    -        inputTensorIds_ = mutableCopy(inputTensorIds_);
    -        bitField0_ |= 0x00000001;
    -       }
    +      if (!inputTensorIds_.isModifiable()) {
    +        inputTensorIds_ = makeMutableCopy(inputTensorIds_);
    +      }
    +      bitField0_ |= 0x00000008;
         }
         /**
          * 
    @@ -1362,8 +1354,8 @@ private void ensureInputTensorIdsIsMutable() {
          */
         public java.util.List
             getInputTensorIdsList() {
    -      return ((bitField0_ & 0x00000001) != 0) ?
    -               java.util.Collections.unmodifiableList(inputTensorIds_) : inputTensorIds_;
    +      inputTensorIds_.makeImmutable();
    +      return inputTensorIds_;
         }
         /**
          * 
    @@ -1400,8 +1392,10 @@ public long getInputTensorIds(int index) {
          */
         public Builder setInputTensorIds(
             int index, long value) {
    +
           ensureInputTensorIdsIsMutable();
           inputTensorIds_.setLong(index, value);
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -1415,8 +1409,10 @@ public Builder setInputTensorIds(
          * @return This builder for chaining.
          */
         public Builder addInputTensorIds(long value) {
    +
           ensureInputTensorIdsIsMutable();
           inputTensorIds_.addLong(value);
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -1434,6 +1430,7 @@ public Builder addAllInputTensorIds(
           ensureInputTensorIdsIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, inputTensorIds_);
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -1447,17 +1444,17 @@ public Builder addAllInputTensorIds(
          */
         public Builder clearInputTensorIds() {
           inputTensorIds_ = emptyLongList();
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      bitField0_ = (bitField0_ & ~0x00000008);
           onChanged();
           return this;
         }
     
         private com.google.protobuf.Internal.LongList outputTensorIds_ = emptyLongList();
         private void ensureOutputTensorIdsIsMutable() {
    -      if (!((bitField0_ & 0x00000002) != 0)) {
    -        outputTensorIds_ = mutableCopy(outputTensorIds_);
    -        bitField0_ |= 0x00000002;
    -       }
    +      if (!outputTensorIds_.isModifiable()) {
    +        outputTensorIds_ = makeMutableCopy(outputTensorIds_);
    +      }
    +      bitField0_ |= 0x00000010;
         }
         /**
          * 
    @@ -1470,8 +1467,8 @@ private void ensureOutputTensorIdsIsMutable() {
          */
         public java.util.List
             getOutputTensorIdsList() {
    -      return ((bitField0_ & 0x00000002) != 0) ?
    -               java.util.Collections.unmodifiableList(outputTensorIds_) : outputTensorIds_;
    +      outputTensorIds_.makeImmutable();
    +      return outputTensorIds_;
         }
         /**
          * 
    @@ -1511,8 +1508,10 @@ public long getOutputTensorIds(int index) {
          */
         public Builder setOutputTensorIds(
             int index, long value) {
    +
           ensureOutputTensorIdsIsMutable();
           outputTensorIds_.setLong(index, value);
    +      bitField0_ |= 0x00000010;
           onChanged();
           return this;
         }
    @@ -1527,8 +1526,10 @@ public Builder setOutputTensorIds(
          * @return This builder for chaining.
          */
         public Builder addOutputTensorIds(long value) {
    +
           ensureOutputTensorIdsIsMutable();
           outputTensorIds_.addLong(value);
    +      bitField0_ |= 0x00000010;
           onChanged();
           return this;
         }
    @@ -1547,6 +1548,7 @@ public Builder addAllOutputTensorIds(
           ensureOutputTensorIdsIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, outputTensorIds_);
    +      bitField0_ |= 0x00000010;
           onChanged();
           return this;
         }
    @@ -1561,7 +1563,7 @@ public Builder addAllOutputTensorIds(
          */
         public Builder clearOutputTensorIds() {
           outputTensorIds_ = emptyLongList();
    -      bitField0_ = (bitField0_ & ~0x00000002);
    +      bitField0_ = (bitField0_ & ~0x00000010);
           onChanged();
           return this;
         }
    @@ -1588,8 +1590,8 @@ public Builder clearOutputTensorIds() {
          * @return This builder for chaining.
          */
         public Builder setTensorDebugModeValue(int value) {
    -      
           tensorDebugMode_ = value;
    +      bitField0_ |= 0x00000020;
           onChanged();
           return this;
         }
    @@ -1603,8 +1605,7 @@ public Builder setTensorDebugModeValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.TensorDebugMode getTensorDebugMode() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.TensorDebugMode result = org.tensorflow.proto.TensorDebugMode.valueOf(tensorDebugMode_);
    +      org.tensorflow.proto.TensorDebugMode result = org.tensorflow.proto.TensorDebugMode.forNumber(tensorDebugMode_);
           return result == null ? org.tensorflow.proto.TensorDebugMode.UNRECOGNIZED : result;
         }
         /**
    @@ -1620,7 +1621,7 @@ public Builder setTensorDebugMode(org.tensorflow.proto.TensorDebugMode value) {
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00000020;
           tensorDebugMode_ = value.getNumber();
           onChanged();
           return this;
    @@ -1634,7 +1635,7 @@ public Builder setTensorDebugMode(org.tensorflow.proto.TensorDebugMode value) {
          * @return This builder for chaining.
          */
         public Builder clearTensorDebugMode() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000020);
           tensorDebugMode_ = 0;
           onChanged();
           return this;
    @@ -1643,13 +1644,13 @@ public Builder clearTensorDebugMode() {
         private java.util.List tensorProtos_ =
           java.util.Collections.emptyList();
         private void ensureTensorProtosIsMutable() {
    -      if (!((bitField0_ & 0x00000004) != 0)) {
    +      if (!((bitField0_ & 0x00000040) != 0)) {
             tensorProtos_ = new java.util.ArrayList(tensorProtos_);
    -        bitField0_ |= 0x00000004;
    +        bitField0_ |= 0x00000040;
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> tensorProtosBuilder_;
     
         /**
    @@ -1850,7 +1851,7 @@ public Builder addAllTensorProtos(
         public Builder clearTensorProtos() {
           if (tensorProtosBuilder_ == null) {
             tensorProtos_ = java.util.Collections.emptyList();
    -        bitField0_ = (bitField0_ & ~0x00000004);
    +        bitField0_ = (bitField0_ & ~0x00000040);
             onChanged();
           } else {
             tensorProtosBuilder_.clear();
    @@ -1955,14 +1956,14 @@ public org.tensorflow.proto.TensorProto.Builder addTensorProtosBuilder(
              getTensorProtosBuilderList() {
           return getTensorProtosFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> 
             getTensorProtosFieldBuilder() {
           if (tensorProtosBuilder_ == null) {
    -        tensorProtosBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        tensorProtosBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder>(
                     tensorProtos_,
    -                ((bitField0_ & 0x00000004) != 0),
    +                ((bitField0_ & 0x00000040) != 0),
                     getParentForChildren(),
                     isClean());
             tensorProtos_ = null;
    @@ -1971,7 +1972,7 @@ public org.tensorflow.proto.TensorProto.Builder addTensorProtosBuilder(
         }
     
         private org.tensorflow.proto.CodeLocation codeLocation_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.CodeLocation, org.tensorflow.proto.CodeLocation.Builder, org.tensorflow.proto.CodeLocationOrBuilder> codeLocationBuilder_;
         /**
          * 
    @@ -1982,7 +1983,7 @@ public org.tensorflow.proto.TensorProto.Builder addTensorProtosBuilder(
          * @return Whether the codeLocation field is set.
          */
         public boolean hasCodeLocation() {
    -      return codeLocationBuilder_ != null || codeLocation_ != null;
    +      return ((bitField0_ & 0x00000080) != 0);
         }
         /**
          * 
    @@ -2012,11 +2013,11 @@ public Builder setCodeLocation(org.tensorflow.proto.CodeLocation value) {
               throw new NullPointerException();
             }
             codeLocation_ = value;
    -        onChanged();
           } else {
             codeLocationBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000080;
    +      onChanged();
           return this;
         }
         /**
    @@ -2030,11 +2031,11 @@ public Builder setCodeLocation(
             org.tensorflow.proto.CodeLocation.Builder builderForValue) {
           if (codeLocationBuilder_ == null) {
             codeLocation_ = builderForValue.build();
    -        onChanged();
           } else {
             codeLocationBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000080;
    +      onChanged();
           return this;
         }
         /**
    @@ -2046,17 +2047,20 @@ public Builder setCodeLocation(
          */
         public Builder mergeCodeLocation(org.tensorflow.proto.CodeLocation value) {
           if (codeLocationBuilder_ == null) {
    -        if (codeLocation_ != null) {
    -          codeLocation_ =
    -            org.tensorflow.proto.CodeLocation.newBuilder(codeLocation_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000080) != 0) &&
    +          codeLocation_ != null &&
    +          codeLocation_ != org.tensorflow.proto.CodeLocation.getDefaultInstance()) {
    +          getCodeLocationBuilder().mergeFrom(value);
             } else {
               codeLocation_ = value;
             }
    -        onChanged();
           } else {
             codeLocationBuilder_.mergeFrom(value);
           }
    -
    +      if (codeLocation_ != null) {
    +        bitField0_ |= 0x00000080;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -2067,14 +2071,13 @@ public Builder mergeCodeLocation(org.tensorflow.proto.CodeLocation value) {
          * .tensorflow.CodeLocation code_location = 8;
          */
         public Builder clearCodeLocation() {
    -      if (codeLocationBuilder_ == null) {
    -        codeLocation_ = null;
    -        onChanged();
    -      } else {
    -        codeLocation_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000080);
    +      codeLocation_ = null;
    +      if (codeLocationBuilder_ != null) {
    +        codeLocationBuilder_.dispose();
             codeLocationBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -2085,7 +2088,7 @@ public Builder clearCodeLocation() {
          * .tensorflow.CodeLocation code_location = 8;
          */
         public org.tensorflow.proto.CodeLocation.Builder getCodeLocationBuilder() {
    -      
    +      bitField0_ |= 0x00000080;
           onChanged();
           return getCodeLocationFieldBuilder().getBuilder();
         }
    @@ -2111,11 +2114,11 @@ public org.tensorflow.proto.CodeLocationOrBuilder getCodeLocationOrBuilder() {
          *
          * .tensorflow.CodeLocation code_location = 8;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.CodeLocation, org.tensorflow.proto.CodeLocation.Builder, org.tensorflow.proto.CodeLocationOrBuilder> 
             getCodeLocationFieldBuilder() {
           if (codeLocationBuilder_ == null) {
    -        codeLocationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        codeLocationBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.CodeLocation, org.tensorflow.proto.CodeLocation.Builder, org.tensorflow.proto.CodeLocationOrBuilder>(
                     getCodeLocation(),
                     getParentForChildren(),
    @@ -2127,10 +2130,10 @@ public org.tensorflow.proto.CodeLocationOrBuilder getCodeLocationOrBuilder() {
     
         private com.google.protobuf.Internal.IntList outputTensorDeviceIds_ = emptyIntList();
         private void ensureOutputTensorDeviceIdsIsMutable() {
    -      if (!((bitField0_ & 0x00000008) != 0)) {
    -        outputTensorDeviceIds_ = mutableCopy(outputTensorDeviceIds_);
    -        bitField0_ |= 0x00000008;
    -       }
    +      if (!outputTensorDeviceIds_.isModifiable()) {
    +        outputTensorDeviceIds_ = makeMutableCopy(outputTensorDeviceIds_);
    +      }
    +      bitField0_ |= 0x00000100;
         }
         /**
          * 
    @@ -2144,8 +2147,8 @@ private void ensureOutputTensorDeviceIdsIsMutable() {
          */
         public java.util.List
             getOutputTensorDeviceIdsList() {
    -      return ((bitField0_ & 0x00000008) != 0) ?
    -               java.util.Collections.unmodifiableList(outputTensorDeviceIds_) : outputTensorDeviceIds_;
    +      outputTensorDeviceIds_.makeImmutable();
    +      return outputTensorDeviceIds_;
         }
         /**
          * 
    @@ -2188,8 +2191,10 @@ public int getOutputTensorDeviceIds(int index) {
          */
         public Builder setOutputTensorDeviceIds(
             int index, int value) {
    +
           ensureOutputTensorDeviceIdsIsMutable();
           outputTensorDeviceIds_.setInt(index, value);
    +      bitField0_ |= 0x00000100;
           onChanged();
           return this;
         }
    @@ -2205,8 +2210,10 @@ public Builder setOutputTensorDeviceIds(
          * @return This builder for chaining.
          */
         public Builder addOutputTensorDeviceIds(int value) {
    +
           ensureOutputTensorDeviceIdsIsMutable();
           outputTensorDeviceIds_.addInt(value);
    +      bitField0_ |= 0x00000100;
           onChanged();
           return this;
         }
    @@ -2226,6 +2233,7 @@ public Builder addAllOutputTensorDeviceIds(
           ensureOutputTensorDeviceIdsIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, outputTensorDeviceIds_);
    +      bitField0_ |= 0x00000100;
           onChanged();
           return this;
         }
    @@ -2241,22 +2249,10 @@ public Builder addAllOutputTensorDeviceIds(
          */
         public Builder clearOutputTensorDeviceIds() {
           outputTensorDeviceIds_ = emptyIntList();
    -      bitField0_ = (bitField0_ & ~0x00000008);
    +      bitField0_ = (bitField0_ & ~0x00000100);
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.Execution)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExecutionOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExecutionOrBuilder.java
    index e9cf43ad319..1e95b376148 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExecutionOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExecutionOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/debug_event.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Feature.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Feature.java
    index 7f22afd33dc..000c9bda934 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Feature.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Feature.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/example/feature.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,36 +13,33 @@
      * Protobuf type {@code tensorflow.Feature}
      */
     public final class Feature extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.Feature)
         FeatureOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      Feature.class.getName());
    +  }
       // Use Feature.newBuilder() to construct.
    -  private Feature(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private Feature(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private Feature() {
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new Feature();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.FeatureProtos.internal_static_tensorflow_Feature_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.FeatureProtos.internal_static_tensorflow_Feature_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -48,6 +47,7 @@ protected java.lang.Object newInstance(
       }
     
       private int kindCase_ = 0;
    +  @SuppressWarnings("serial")
       private java.lang.Object kind_;
       public enum KindCase
           implements com.google.protobuf.Internal.EnumLite,
    @@ -325,39 +325,41 @@ public static org.tensorflow.proto.Feature parseFrom(
       }
       public static org.tensorflow.proto.Feature parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.Feature parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.Feature parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.Feature parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.Feature parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.Feature parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -377,7 +379,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -389,7 +391,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.Feature}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.Feature)
           org.tensorflow.proto.FeatureOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -398,7 +400,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.FeatureProtos.internal_static_tensorflow_Feature_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -411,13 +413,14 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           if (bytesListBuilder_ != null) {
             bytesListBuilder_.clear();
           }
    @@ -455,64 +458,33 @@ public org.tensorflow.proto.Feature build() {
         @java.lang.Override
         public org.tensorflow.proto.Feature buildPartial() {
           org.tensorflow.proto.Feature result = new org.tensorflow.proto.Feature(this);
    -      if (kindCase_ == 1) {
    -        if (bytesListBuilder_ == null) {
    -          result.kind_ = kind_;
    -        } else {
    -          result.kind_ = bytesListBuilder_.build();
    -        }
    -      }
    -      if (kindCase_ == 2) {
    -        if (floatListBuilder_ == null) {
    -          result.kind_ = kind_;
    -        } else {
    -          result.kind_ = floatListBuilder_.build();
    -        }
    -      }
    -      if (kindCase_ == 3) {
    -        if (int64ListBuilder_ == null) {
    -          result.kind_ = kind_;
    -        } else {
    -          result.kind_ = int64ListBuilder_.build();
    -        }
    -      }
    -      result.kindCase_ = kindCase_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      buildPartialOneofs(result);
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.Feature result) {
    +      int from_bitField0_ = bitField0_;
         }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +
    +    private void buildPartialOneofs(org.tensorflow.proto.Feature result) {
    +      result.kindCase_ = kindCase_;
    +      result.kind_ = this.kind_;
    +      if (kindCase_ == 1 &&
    +          bytesListBuilder_ != null) {
    +        result.kind_ = bytesListBuilder_.build();
    +      }
    +      if (kindCase_ == 2 &&
    +          floatListBuilder_ != null) {
    +        result.kind_ = floatListBuilder_.build();
    +      }
    +      if (kindCase_ == 3 &&
    +          int64ListBuilder_ != null) {
    +        result.kind_ = int64ListBuilder_.build();
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.Feature) {
    @@ -619,8 +591,9 @@ public Builder clearKind() {
           return this;
         }
     
    +    private int bitField0_;
     
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.BytesList, org.tensorflow.proto.BytesList.Builder, org.tensorflow.proto.BytesListOrBuilder> bytesListBuilder_;
         /**
          * .tensorflow.BytesList bytes_list = 1;
    @@ -743,14 +716,14 @@ public org.tensorflow.proto.BytesListOrBuilder getBytesListOrBuilder() {
         /**
          * .tensorflow.BytesList bytes_list = 1;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.BytesList, org.tensorflow.proto.BytesList.Builder, org.tensorflow.proto.BytesListOrBuilder> 
             getBytesListFieldBuilder() {
           if (bytesListBuilder_ == null) {
             if (!(kindCase_ == 1)) {
               kind_ = org.tensorflow.proto.BytesList.getDefaultInstance();
             }
    -        bytesListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        bytesListBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.BytesList, org.tensorflow.proto.BytesList.Builder, org.tensorflow.proto.BytesListOrBuilder>(
                     (org.tensorflow.proto.BytesList) kind_,
                     getParentForChildren(),
    @@ -758,11 +731,11 @@ public org.tensorflow.proto.BytesListOrBuilder getBytesListOrBuilder() {
             kind_ = null;
           }
           kindCase_ = 1;
    -      onChanged();;
    +      onChanged();
           return bytesListBuilder_;
         }
     
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.FloatList, org.tensorflow.proto.FloatList.Builder, org.tensorflow.proto.FloatListOrBuilder> floatListBuilder_;
         /**
          * .tensorflow.FloatList float_list = 2;
    @@ -885,14 +858,14 @@ public org.tensorflow.proto.FloatListOrBuilder getFloatListOrBuilder() {
         /**
          * .tensorflow.FloatList float_list = 2;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.FloatList, org.tensorflow.proto.FloatList.Builder, org.tensorflow.proto.FloatListOrBuilder> 
             getFloatListFieldBuilder() {
           if (floatListBuilder_ == null) {
             if (!(kindCase_ == 2)) {
               kind_ = org.tensorflow.proto.FloatList.getDefaultInstance();
             }
    -        floatListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        floatListBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.FloatList, org.tensorflow.proto.FloatList.Builder, org.tensorflow.proto.FloatListOrBuilder>(
                     (org.tensorflow.proto.FloatList) kind_,
                     getParentForChildren(),
    @@ -900,11 +873,11 @@ public org.tensorflow.proto.FloatListOrBuilder getFloatListOrBuilder() {
             kind_ = null;
           }
           kindCase_ = 2;
    -      onChanged();;
    +      onChanged();
           return floatListBuilder_;
         }
     
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.Int64List, org.tensorflow.proto.Int64List.Builder, org.tensorflow.proto.Int64ListOrBuilder> int64ListBuilder_;
         /**
          * .tensorflow.Int64List int64_list = 3;
    @@ -1027,14 +1000,14 @@ public org.tensorflow.proto.Int64ListOrBuilder getInt64ListOrBuilder() {
         /**
          * .tensorflow.Int64List int64_list = 3;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.Int64List, org.tensorflow.proto.Int64List.Builder, org.tensorflow.proto.Int64ListOrBuilder> 
             getInt64ListFieldBuilder() {
           if (int64ListBuilder_ == null) {
             if (!(kindCase_ == 3)) {
               kind_ = org.tensorflow.proto.Int64List.getDefaultInstance();
             }
    -        int64ListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        int64ListBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.Int64List, org.tensorflow.proto.Int64List.Builder, org.tensorflow.proto.Int64ListOrBuilder>(
                     (org.tensorflow.proto.Int64List) kind_,
                     getParentForChildren(),
    @@ -1042,21 +1015,9 @@ public org.tensorflow.proto.Int64ListOrBuilder getInt64ListOrBuilder() {
             kind_ = null;
           }
           kindCase_ = 3;
    -      onChanged();;
    +      onChanged();
           return int64ListBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.Feature)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureConfiguration.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureConfiguration.java
    index 38420c8b98e..98a591ecedb 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureConfiguration.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureConfiguration.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/example/example_parser_configuration.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,36 +9,33 @@
      * Protobuf type {@code tensorflow.FeatureConfiguration}
      */
     public final class FeatureConfiguration extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.FeatureConfiguration)
         FeatureConfigurationOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      FeatureConfiguration.class.getName());
    +  }
       // Use FeatureConfiguration.newBuilder() to construct.
    -  private FeatureConfiguration(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private FeatureConfiguration(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private FeatureConfiguration() {
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new FeatureConfiguration();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.ExampleParserConfigurationProtos.internal_static_tensorflow_FeatureConfiguration_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.ExampleParserConfigurationProtos.internal_static_tensorflow_FeatureConfiguration_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -44,6 +43,7 @@ protected java.lang.Object newInstance(
       }
     
       private int configCase_ = 0;
    +  @SuppressWarnings("serial")
       private java.lang.Object config_;
       public enum ConfigCase
           implements com.google.protobuf.Internal.EnumLite,
    @@ -273,39 +273,41 @@ public static org.tensorflow.proto.FeatureConfiguration parseFrom(
       }
       public static org.tensorflow.proto.FeatureConfiguration parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.FeatureConfiguration parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.FeatureConfiguration parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.FeatureConfiguration parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.FeatureConfiguration parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.FeatureConfiguration parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -325,7 +327,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -333,7 +335,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.FeatureConfiguration}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.FeatureConfiguration)
           org.tensorflow.proto.FeatureConfigurationOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -342,7 +344,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.ExampleParserConfigurationProtos.internal_static_tensorflow_FeatureConfiguration_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -355,13 +357,14 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           if (fixedLenFeatureBuilder_ != null) {
             fixedLenFeatureBuilder_.clear();
           }
    @@ -396,57 +399,29 @@ public org.tensorflow.proto.FeatureConfiguration build() {
         @java.lang.Override
         public org.tensorflow.proto.FeatureConfiguration buildPartial() {
           org.tensorflow.proto.FeatureConfiguration result = new org.tensorflow.proto.FeatureConfiguration(this);
    -      if (configCase_ == 1) {
    -        if (fixedLenFeatureBuilder_ == null) {
    -          result.config_ = config_;
    -        } else {
    -          result.config_ = fixedLenFeatureBuilder_.build();
    -        }
    -      }
    -      if (configCase_ == 2) {
    -        if (varLenFeatureBuilder_ == null) {
    -          result.config_ = config_;
    -        } else {
    -          result.config_ = varLenFeatureBuilder_.build();
    -        }
    -      }
    -      result.configCase_ = configCase_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      buildPartialOneofs(result);
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    +    private void buildPartial0(org.tensorflow.proto.FeatureConfiguration result) {
    +      int from_bitField0_ = bitField0_;
         }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +
    +    private void buildPartialOneofs(org.tensorflow.proto.FeatureConfiguration result) {
    +      result.configCase_ = configCase_;
    +      result.config_ = this.config_;
    +      if (configCase_ == 1 &&
    +          fixedLenFeatureBuilder_ != null) {
    +        result.config_ = fixedLenFeatureBuilder_.build();
    +      }
    +      if (configCase_ == 2 &&
    +          varLenFeatureBuilder_ != null) {
    +        result.config_ = varLenFeatureBuilder_.build();
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.FeatureConfiguration) {
    @@ -542,8 +517,9 @@ public Builder clearConfig() {
           return this;
         }
     
    +    private int bitField0_;
     
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.FixedLenFeatureProto, org.tensorflow.proto.FixedLenFeatureProto.Builder, org.tensorflow.proto.FixedLenFeatureProtoOrBuilder> fixedLenFeatureBuilder_;
         /**
          * .tensorflow.FixedLenFeatureProto fixed_len_feature = 1;
    @@ -666,14 +642,14 @@ public org.tensorflow.proto.FixedLenFeatureProtoOrBuilder getFixedLenFeatureOrBu
         /**
          * .tensorflow.FixedLenFeatureProto fixed_len_feature = 1;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.FixedLenFeatureProto, org.tensorflow.proto.FixedLenFeatureProto.Builder, org.tensorflow.proto.FixedLenFeatureProtoOrBuilder> 
             getFixedLenFeatureFieldBuilder() {
           if (fixedLenFeatureBuilder_ == null) {
             if (!(configCase_ == 1)) {
               config_ = org.tensorflow.proto.FixedLenFeatureProto.getDefaultInstance();
             }
    -        fixedLenFeatureBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        fixedLenFeatureBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.FixedLenFeatureProto, org.tensorflow.proto.FixedLenFeatureProto.Builder, org.tensorflow.proto.FixedLenFeatureProtoOrBuilder>(
                     (org.tensorflow.proto.FixedLenFeatureProto) config_,
                     getParentForChildren(),
    @@ -681,11 +657,11 @@ public org.tensorflow.proto.FixedLenFeatureProtoOrBuilder getFixedLenFeatureOrBu
             config_ = null;
           }
           configCase_ = 1;
    -      onChanged();;
    +      onChanged();
           return fixedLenFeatureBuilder_;
         }
     
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.VarLenFeatureProto, org.tensorflow.proto.VarLenFeatureProto.Builder, org.tensorflow.proto.VarLenFeatureProtoOrBuilder> varLenFeatureBuilder_;
         /**
          * .tensorflow.VarLenFeatureProto var_len_feature = 2;
    @@ -808,14 +784,14 @@ public org.tensorflow.proto.VarLenFeatureProtoOrBuilder getVarLenFeatureOrBuilde
         /**
          * .tensorflow.VarLenFeatureProto var_len_feature = 2;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.VarLenFeatureProto, org.tensorflow.proto.VarLenFeatureProto.Builder, org.tensorflow.proto.VarLenFeatureProtoOrBuilder> 
             getVarLenFeatureFieldBuilder() {
           if (varLenFeatureBuilder_ == null) {
             if (!(configCase_ == 2)) {
               config_ = org.tensorflow.proto.VarLenFeatureProto.getDefaultInstance();
             }
    -        varLenFeatureBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        varLenFeatureBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.VarLenFeatureProto, org.tensorflow.proto.VarLenFeatureProto.Builder, org.tensorflow.proto.VarLenFeatureProtoOrBuilder>(
                     (org.tensorflow.proto.VarLenFeatureProto) config_,
                     getParentForChildren(),
    @@ -823,21 +799,9 @@ public org.tensorflow.proto.VarLenFeatureProtoOrBuilder getVarLenFeatureOrBuilde
             config_ = null;
           }
           configCase_ = 2;
    -      onChanged();;
    +      onChanged();
           return varLenFeatureBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.FeatureConfiguration)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureConfigurationOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureConfigurationOrBuilder.java
    index f3e2b27d97e..7b6b97b7815 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureConfigurationOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureConfigurationOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/example/example_parser_configuration.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -37,5 +39,5 @@ public interface FeatureConfigurationOrBuilder extends
        */
       org.tensorflow.proto.VarLenFeatureProtoOrBuilder getVarLenFeatureOrBuilder();
     
    -  public org.tensorflow.proto.FeatureConfiguration.ConfigCase getConfigCase();
    +  org.tensorflow.proto.FeatureConfiguration.ConfigCase getConfigCase();
     }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureList.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureList.java
    index 82149e169c5..ee7c362045d 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureList.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureList.java
    @@ -1,13 +1,17 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/example/feature.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     /**
      * 
      * Containers for sequential data.
    + *
      * A FeatureList contains lists of Features.  These may hold zero or more
      * Feature values.
    + *
      * FeatureLists are organized into categories by name.  The FeatureLists message
      * contains the mapping from name to FeatureList.
      * 
    @@ -15,37 +19,34 @@ * Protobuf type {@code tensorflow.FeatureList} */ public final class FeatureList extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.FeatureList) FeatureListOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + FeatureList.class.getName()); + } // Use FeatureList.newBuilder() to construct. - private FeatureList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private FeatureList(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private FeatureList() { feature_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new FeatureList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.FeatureProtos.internal_static_tensorflow_FeatureList_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.FeatureProtos.internal_static_tensorflow_FeatureList_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -53,6 +54,7 @@ protected java.lang.Object newInstance( } public static final int FEATURE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List feature_; /** * repeated .tensorflow.Feature feature = 1; @@ -193,39 +195,41 @@ public static org.tensorflow.proto.FeatureList parseFrom( } public static org.tensorflow.proto.FeatureList parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.FeatureList parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.FeatureList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.FeatureList parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.FeatureList parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.FeatureList parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -245,15 +249,17 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
        * Containers for sequential data.
    +   *
        * A FeatureList contains lists of Features.  These may hold zero or more
        * Feature values.
    +   *
        * FeatureLists are organized into categories by name.  The FeatureLists message
        * contains the mapping from name to FeatureList.
        * 
    @@ -261,7 +267,7 @@ protected Builder newBuilderForType( * Protobuf type {@code tensorflow.FeatureList} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.FeatureList) org.tensorflow.proto.FeatureListOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -270,7 +276,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.FeatureProtos.internal_static_tensorflow_FeatureList_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -283,13 +289,14 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (featureBuilder_ == null) { feature_ = java.util.Collections.emptyList(); } else { @@ -323,7 +330,13 @@ public org.tensorflow.proto.FeatureList build() { @java.lang.Override public org.tensorflow.proto.FeatureList buildPartial() { org.tensorflow.proto.FeatureList result = new org.tensorflow.proto.FeatureList(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(org.tensorflow.proto.FeatureList result) { if (featureBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { feature_ = java.util.Collections.unmodifiableList(feature_); @@ -333,42 +346,12 @@ public org.tensorflow.proto.FeatureList buildPartial() { } else { result.feature_ = featureBuilder_.build(); } - onBuilt(); - return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.FeatureList result) { + int from_bitField0_ = bitField0_; } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.FeatureList) { @@ -400,7 +383,7 @@ public Builder mergeFrom(org.tensorflow.proto.FeatureList other) { feature_ = other.feature_; bitField0_ = (bitField0_ & ~0x00000001); featureBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getFeatureFieldBuilder() : null; } else { featureBuilder_.addAllMessages(other.feature_); @@ -472,7 +455,7 @@ private void ensureFeatureIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.Feature, org.tensorflow.proto.Feature.Builder, org.tensorflow.proto.FeatureOrBuilder> featureBuilder_; /** @@ -688,11 +671,11 @@ public org.tensorflow.proto.Feature.Builder addFeatureBuilder( getFeatureBuilderList() { return getFeatureFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.Feature, org.tensorflow.proto.Feature.Builder, org.tensorflow.proto.FeatureOrBuilder> getFeatureFieldBuilder() { if (featureBuilder_ == null) { - featureBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + featureBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.Feature, org.tensorflow.proto.Feature.Builder, org.tensorflow.proto.FeatureOrBuilder>( feature_, ((bitField0_ & 0x00000001) != 0), @@ -702,18 +685,6 @@ public org.tensorflow.proto.Feature.Builder addFeatureBuilder( } return featureBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.FeatureList) } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureListOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureListOrBuilder.java index 240b746c891..c777d2f0a4d 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureListOrBuilder.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureListOrBuilder.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/example/feature.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureLists.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureLists.java index 4130356123b..f69d92ebbcb 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureLists.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureLists.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/example/feature.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -7,29 +9,26 @@ * Protobuf type {@code tensorflow.FeatureLists} */ public final class FeatureLists extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.FeatureLists) FeatureListsOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + FeatureLists.class.getName()); + } // Use FeatureLists.newBuilder() to construct. - private FeatureLists(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private FeatureLists(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private FeatureLists() { } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new FeatureLists(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.FeatureProtos.internal_static_tensorflow_FeatureLists_descriptor; @@ -37,7 +36,7 @@ protected java.lang.Object newInstance( @SuppressWarnings({"rawtypes"}) @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 1: @@ -48,7 +47,7 @@ protected com.google.protobuf.MapField internalGetMapField( } } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.FeatureProtos.internal_static_tensorflow_FeatureLists_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -67,6 +66,7 @@ private static final class FeatureListDefaultEntryHolder { com.google.protobuf.WireFormat.FieldType.MESSAGE, org.tensorflow.proto.FeatureList.getDefaultInstance()); } + @SuppressWarnings("serial") private com.google.protobuf.MapField< java.lang.String, org.tensorflow.proto.FeatureList> featureList_; private com.google.protobuf.MapField @@ -77,7 +77,6 @@ private static final class FeatureListDefaultEntryHolder { } return featureList_; } - public int getFeatureListCount() { return internalGetFeatureList().getMap().size(); } @@ -88,7 +87,6 @@ public int getFeatureListCount() { * * map<string, .tensorflow.FeatureList> feature_list = 1; */ - @java.lang.Override public boolean containsFeatureList( java.lang.String key) { @@ -111,7 +109,6 @@ public java.util.Map getFeat * map<string, .tensorflow.FeatureList> feature_list = 1; */ @java.lang.Override - public java.util.Map getFeatureListMap() { return internalGetFeatureList().getMap(); } @@ -123,10 +120,11 @@ public java.util.Map getFeat * map<string, .tensorflow.FeatureList> feature_list = 1; */ @java.lang.Override - - public org.tensorflow.proto.FeatureList getFeatureListOrDefault( + public /* nullable */ +org.tensorflow.proto.FeatureList getFeatureListOrDefault( java.lang.String key, - org.tensorflow.proto.FeatureList defaultValue) { + /* nullable */ +org.tensorflow.proto.FeatureList defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetFeatureList().getMap(); @@ -140,7 +138,6 @@ public org.tensorflow.proto.FeatureList getFeatureListOrDefault( * map<string, .tensorflow.FeatureList> feature_list = 1; */ @java.lang.Override - public org.tensorflow.proto.FeatureList getFeatureListOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } @@ -166,7 +163,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3 + com.google.protobuf.GeneratedMessage .serializeStringMapTo( output, internalGetFeatureList(), @@ -262,39 +259,41 @@ public static org.tensorflow.proto.FeatureLists parseFrom( } public static org.tensorflow.proto.FeatureLists parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.FeatureLists parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.FeatureLists parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.FeatureLists parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.FeatureLists parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.FeatureLists parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -314,7 +313,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -322,7 +321,7 @@ protected Builder newBuilderForType( * Protobuf type {@code tensorflow.FeatureLists} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.FeatureLists) org.tensorflow.proto.FeatureListsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -331,7 +330,7 @@ public static final class Builder extends } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 1: @@ -342,7 +341,7 @@ protected com.google.protobuf.MapField internalGetMapField( } } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( int number) { switch (number) { case 1: @@ -353,7 +352,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField( } } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.FeatureProtos.internal_static_tensorflow_FeatureLists_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -366,13 +365,14 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; internalGetMutableFeatureList().clear(); return this; } @@ -400,45 +400,18 @@ public org.tensorflow.proto.FeatureLists build() { @java.lang.Override public org.tensorflow.proto.FeatureLists buildPartial() { org.tensorflow.proto.FeatureLists result = new org.tensorflow.proto.FeatureLists(this); - int from_bitField0_ = bitField0_; - result.featureList_ = internalGetFeatureList(); - result.featureList_.makeImmutable(); + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.FeatureLists result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.featureList_ = internalGetFeatureList().build(FeatureListDefaultEntryHolder.defaultEntry); + } } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.FeatureLists) { @@ -453,6 +426,7 @@ public Builder mergeFrom(org.tensorflow.proto.FeatureLists other) { if (other == org.tensorflow.proto.FeatureLists.getDefaultInstance()) return this; internalGetMutableFeatureList().mergeFrom( other.internalGetFeatureList()); + bitField0_ |= 0x00000001; this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -483,8 +457,9 @@ public Builder mergeFrom( com.google.protobuf.MapEntry featureList__ = input.readMessage( FeatureListDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableFeatureList().getMutableMap().put( + internalGetMutableFeatureList().ensureBuilderMap().put( featureList__.getKey(), featureList__.getValue()); + bitField0_ |= 0x00000001; break; } // case 10 default: { @@ -504,31 +479,40 @@ public Builder mergeFrom( } private int bitField0_; - private com.google.protobuf.MapField< - java.lang.String, org.tensorflow.proto.FeatureList> featureList_; - private com.google.protobuf.MapField - internalGetFeatureList() { + private static final class FeatureListConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public org.tensorflow.proto.FeatureList build(org.tensorflow.proto.FeatureListOrBuilder val) { + if (val instanceof org.tensorflow.proto.FeatureList) { return (org.tensorflow.proto.FeatureList) val; } + return ((org.tensorflow.proto.FeatureList.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return FeatureListDefaultEntryHolder.defaultEntry; + } + }; + private static final FeatureListConverter featureListConverter = new FeatureListConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, org.tensorflow.proto.FeatureListOrBuilder, org.tensorflow.proto.FeatureList, org.tensorflow.proto.FeatureList.Builder> featureList_; + private com.google.protobuf.MapFieldBuilder + internalGetFeatureList() { if (featureList_ == null) { - return com.google.protobuf.MapField.emptyMapField( - FeatureListDefaultEntryHolder.defaultEntry); + return new com.google.protobuf.MapFieldBuilder<>(featureListConverter); } return featureList_; } - private com.google.protobuf.MapField - internalGetMutableFeatureList() { - onChanged();; + private com.google.protobuf.MapFieldBuilder + internalGetMutableFeatureList() { if (featureList_ == null) { - featureList_ = com.google.protobuf.MapField.newMapField( - FeatureListDefaultEntryHolder.defaultEntry); - } - if (!featureList_.isMutable()) { - featureList_ = featureList_.copy(); + featureList_ = new com.google.protobuf.MapFieldBuilder<>(featureListConverter); } + bitField0_ |= 0x00000001; + onChanged(); return featureList_; } - public int getFeatureListCount() { - return internalGetFeatureList().getMap().size(); + return internalGetFeatureList().ensureBuilderMap().size(); } /** *
    @@ -537,12 +521,11 @@ public int getFeatureListCount() {
          *
          * map<string, .tensorflow.FeatureList> feature_list = 1;
          */
    -
         @java.lang.Override
         public boolean containsFeatureList(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      return internalGetFeatureList().getMap().containsKey(key);
    +      return internalGetFeatureList().ensureBuilderMap().containsKey(key);
         }
         /**
          * Use {@link #getFeatureListMap()} instead.
    @@ -560,9 +543,8 @@ public java.util.Map getFeat
          * map<string, .tensorflow.FeatureList> feature_list = 1;
          */
         @java.lang.Override
    -
         public java.util.Map getFeatureListMap() {
    -      return internalGetFeatureList().getMap();
    +      return internalGetFeatureList().getImmutableMap();
         }
         /**
          * 
    @@ -572,14 +554,14 @@ public java.util.Map getFeat
          * map<string, .tensorflow.FeatureList> feature_list = 1;
          */
         @java.lang.Override
    -
    -    public org.tensorflow.proto.FeatureList getFeatureListOrDefault(
    +    public /* nullable */
    +org.tensorflow.proto.FeatureList getFeatureListOrDefault(
             java.lang.String key,
    -        org.tensorflow.proto.FeatureList defaultValue) {
    +        /* nullable */
    +org.tensorflow.proto.FeatureList defaultValue) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      java.util.Map map =
    -          internalGetFeatureList().getMap();
    -      return map.containsKey(key) ? map.get(key) : defaultValue;
    +      java.util.Map map = internalGetMutableFeatureList().ensureBuilderMap();
    +      return map.containsKey(key) ? featureListConverter.build(map.get(key)) : defaultValue;
         }
         /**
          * 
    @@ -589,21 +571,18 @@ public org.tensorflow.proto.FeatureList getFeatureListOrDefault(
          * map<string, .tensorflow.FeatureList> feature_list = 1;
          */
         @java.lang.Override
    -
         public org.tensorflow.proto.FeatureList getFeatureListOrThrow(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      java.util.Map map =
    -          internalGetFeatureList().getMap();
    +      java.util.Map map = internalGetMutableFeatureList().ensureBuilderMap();
           if (!map.containsKey(key)) {
             throw new java.lang.IllegalArgumentException();
           }
    -      return map.get(key);
    +      return featureListConverter.build(map.get(key));
         }
    -
         public Builder clearFeatureList() {
    -      internalGetMutableFeatureList().getMutableMap()
    -          .clear();
    +      bitField0_ = (bitField0_ & ~0x00000001);
    +      internalGetMutableFeatureList().clear();
           return this;
         }
         /**
    @@ -613,11 +592,10 @@ public Builder clearFeatureList() {
          *
          * map<string, .tensorflow.FeatureList> feature_list = 1;
          */
    -
         public Builder removeFeatureList(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      internalGetMutableFeatureList().getMutableMap()
    +      internalGetMutableFeatureList().ensureBuilderMap()
               .remove(key);
           return this;
         }
    @@ -626,8 +604,9 @@ public Builder removeFeatureList(
          */
         @java.lang.Deprecated
         public java.util.Map
    -    getMutableFeatureList() {
    -      return internalGetMutableFeatureList().getMutableMap();
    +        getMutableFeatureList() {
    +      bitField0_ |= 0x00000001;
    +      return internalGetMutableFeatureList().ensureMessageMap();
         }
         /**
          * 
    @@ -640,12 +619,10 @@ public Builder putFeatureList(
             java.lang.String key,
             org.tensorflow.proto.FeatureList value) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      if (value == null) {
    -  throw new NullPointerException("map value");
    -}
    -
    -      internalGetMutableFeatureList().getMutableMap()
    +      if (value == null) { throw new NullPointerException("map value"); }
    +      internalGetMutableFeatureList().ensureBuilderMap()
               .put(key, value);
    +      bitField0_ |= 0x00000001;
           return this;
         }
         /**
    @@ -655,26 +632,40 @@ public Builder putFeatureList(
          *
          * map<string, .tensorflow.FeatureList> feature_list = 1;
          */
    -
         public Builder putAllFeatureList(
             java.util.Map values) {
    -      internalGetMutableFeatureList().getMutableMap()
    +      for (java.util.Map.Entry e : values.entrySet()) {
    +        if (e.getKey() == null || e.getValue() == null) {
    +          throw new NullPointerException();
    +        }
    +      }
    +      internalGetMutableFeatureList().ensureBuilderMap()
               .putAll(values);
    +      bitField0_ |= 0x00000001;
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    +    /**
    +     * 
    +     * Map from feature name to feature list.
    +     * 
    + * + * map<string, .tensorflow.FeatureList> feature_list = 1; + */ + public org.tensorflow.proto.FeatureList.Builder putFeatureListBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableFeatureList().ensureBuilderMap(); + org.tensorflow.proto.FeatureListOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = org.tensorflow.proto.FeatureList.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof org.tensorflow.proto.FeatureList) { + entry = ((org.tensorflow.proto.FeatureList) entry).toBuilder(); + builderMap.put(key, entry); + } + return (org.tensorflow.proto.FeatureList.Builder) entry; } - // @@protoc_insertion_point(builder_scope:tensorflow.FeatureLists) } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureListsOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureListsOrBuilder.java index 45212b0e47b..d42e63918ef 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureListsOrBuilder.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureListsOrBuilder.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/example/feature.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -46,7 +48,6 @@ boolean containsFeatureList( * * map<string, .tensorflow.FeatureList> feature_list = 1; */ - /* nullable */ org.tensorflow.proto.FeatureList getFeatureListOrDefault( java.lang.String key, @@ -59,7 +60,6 @@ org.tensorflow.proto.FeatureList getFeatureListOrDefault( * * map<string, .tensorflow.FeatureList> feature_list = 1; */ - org.tensorflow.proto.FeatureList getFeatureListOrThrow( java.lang.String key); } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureOrBuilder.java index c8a3567848b..04375d60edf 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureOrBuilder.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureOrBuilder.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/example/feature.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -52,5 +54,5 @@ public interface FeatureOrBuilder extends */ org.tensorflow.proto.Int64ListOrBuilder getInt64ListOrBuilder(); - public org.tensorflow.proto.Feature.KindCase getKindCase(); + org.tensorflow.proto.Feature.KindCase getKindCase(); } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureProtos.java index 386f7bcd035..056432bdb1a 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureProtos.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureProtos.java @@ -1,10 +1,21 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/example/feature.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; public final class FeatureProtos { private FeatureProtos() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + FeatureProtos.class.getName()); + } public static void registerAllExtensions( com.google.protobuf.ExtensionRegistryLite registry) { } @@ -17,47 +28,47 @@ public static void registerAllExtensions( static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_BytesList_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_BytesList_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_FloatList_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_FloatList_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_Int64List_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_Int64List_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_Feature_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_Feature_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_Features_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_Features_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_Features_FeatureEntry_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_Features_FeatureEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_FeatureList_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_FeatureList_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_FeatureLists_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_FeatureLists_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_FeatureLists_FeatureListEntry_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_FeatureLists_FeatureListEntry_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor @@ -70,24 +81,24 @@ public static void registerAllExtensions( java.lang.String[] descriptorData = { "\n%tensorflow/core/example/feature.proto\022" + "\ntensorflow\"\032\n\tBytesList\022\r\n\005value\030\001 \003(\014\"" + - "\036\n\tFloatList\022\021\n\005value\030\001 \003(\002B\002\020\001\"\036\n\tInt64" + - "List\022\021\n\005value\030\001 \003(\003B\002\020\001\"\230\001\n\007Feature\022+\n\nb" + - "ytes_list\030\001 \001(\0132\025.tensorflow.BytesListH\000" + - "\022+\n\nfloat_list\030\002 \001(\0132\025.tensorflow.FloatL" + - "istH\000\022+\n\nint64_list\030\003 \001(\0132\025.tensorflow.I" + - "nt64ListH\000B\006\n\004kind\"\203\001\n\010Features\0222\n\007featu" + - "re\030\001 \003(\0132!.tensorflow.Features.FeatureEn" + - "try\032C\n\014FeatureEntry\022\013\n\003key\030\001 \001(\t\022\"\n\005valu" + - "e\030\002 \001(\0132\023.tensorflow.Feature:\0028\001\"3\n\013Feat" + - "ureList\022$\n\007feature\030\001 \003(\0132\023.tensorflow.Fe" + - "ature\"\234\001\n\014FeatureLists\022?\n\014feature_list\030\001" + - " \003(\0132).tensorflow.FeatureLists.FeatureLi" + - "stEntry\032K\n\020FeatureListEntry\022\013\n\003key\030\001 \001(\t" + - "\022&\n\005value\030\002 \001(\0132\027.tensorflow.FeatureList" + - ":\0028\001B\177\n\024org.tensorflow.protoB\rFeaturePro" + - "tosP\001ZSgithub.com/tensorflow/tensorflow/" + - "tensorflow/go/core/example/example_proto" + - "s_go_proto\370\001\001b\006proto3" + "\036\n\tFloatList\022\021\n\005value\030\001 \003(\002B\002\020\001\" \n\tInt64" + + "List\022\023\n\005value\030\001 \003(\003B\004\020\0010\001\"\230\001\n\007Feature\022+\n" + + "\nbytes_list\030\001 \001(\0132\025.tensorflow.BytesList" + + "H\000\022+\n\nfloat_list\030\002 \001(\0132\025.tensorflow.Floa" + + "tListH\000\022+\n\nint64_list\030\003 \001(\0132\025.tensorflow" + + ".Int64ListH\000B\006\n\004kind\"\203\001\n\010Features\0222\n\007fea" + + "ture\030\001 \003(\0132!.tensorflow.Features.Feature" + + "Entry\032C\n\014FeatureEntry\022\013\n\003key\030\001 \001(\t\022\"\n\005va" + + "lue\030\002 \001(\0132\023.tensorflow.Feature:\0028\001\"3\n\013Fe" + + "atureList\022$\n\007feature\030\001 \003(\0132\023.tensorflow." + + "Feature\"\234\001\n\014FeatureLists\022?\n\014feature_list" + + "\030\001 \003(\0132).tensorflow.FeatureLists.Feature" + + "ListEntry\032K\n\020FeatureListEntry\022\013\n\003key\030\001 \001" + + "(\t\022&\n\005value\030\002 \001(\0132\027.tensorflow.FeatureLi" + + "st:\0028\001B\177\n\024org.tensorflow.protoB\rFeatureP" + + "rotosP\001ZSgithub.com/tensorflow/tensorflo" + + "w/tensorflow/go/core/example/example_pro" + + "tos_go_proto\370\001\001b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -96,57 +107,58 @@ public static void registerAllExtensions( internal_static_tensorflow_BytesList_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_tensorflow_BytesList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_BytesList_descriptor, new java.lang.String[] { "Value", }); internal_static_tensorflow_FloatList_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_tensorflow_FloatList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_FloatList_descriptor, new java.lang.String[] { "Value", }); internal_static_tensorflow_Int64List_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_tensorflow_Int64List_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_Int64List_descriptor, new java.lang.String[] { "Value", }); internal_static_tensorflow_Feature_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_tensorflow_Feature_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_Feature_descriptor, new java.lang.String[] { "BytesList", "FloatList", "Int64List", "Kind", }); internal_static_tensorflow_Features_descriptor = getDescriptor().getMessageTypes().get(4); internal_static_tensorflow_Features_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_Features_descriptor, new java.lang.String[] { "Feature", }); internal_static_tensorflow_Features_FeatureEntry_descriptor = internal_static_tensorflow_Features_descriptor.getNestedTypes().get(0); internal_static_tensorflow_Features_FeatureEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_Features_FeatureEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_tensorflow_FeatureList_descriptor = getDescriptor().getMessageTypes().get(5); internal_static_tensorflow_FeatureList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_FeatureList_descriptor, new java.lang.String[] { "Feature", }); internal_static_tensorflow_FeatureLists_descriptor = getDescriptor().getMessageTypes().get(6); internal_static_tensorflow_FeatureLists_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_FeatureLists_descriptor, new java.lang.String[] { "FeatureList", }); internal_static_tensorflow_FeatureLists_FeatureListEntry_descriptor = internal_static_tensorflow_FeatureLists_descriptor.getNestedTypes().get(0); internal_static_tensorflow_FeatureLists_FeatureListEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_FeatureLists_FeatureListEntry_descriptor, new java.lang.String[] { "Key", "Value", }); + descriptor.resolveAllFeaturesImmutable(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Features.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Features.java index a61b72f897e..09565c43a05 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Features.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Features.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/example/feature.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -7,29 +9,26 @@ * Protobuf type {@code tensorflow.Features} */ public final class Features extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.Features) FeaturesOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + Features.class.getName()); + } // Use Features.newBuilder() to construct. - private Features(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Features(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Features() { } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Features(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.FeatureProtos.internal_static_tensorflow_Features_descriptor; @@ -37,7 +36,7 @@ protected java.lang.Object newInstance( @SuppressWarnings({"rawtypes"}) @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 1: @@ -48,7 +47,7 @@ protected com.google.protobuf.MapField internalGetMapField( } } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.FeatureProtos.internal_static_tensorflow_Features_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -67,6 +66,7 @@ private static final class FeatureDefaultEntryHolder { com.google.protobuf.WireFormat.FieldType.MESSAGE, org.tensorflow.proto.Feature.getDefaultInstance()); } + @SuppressWarnings("serial") private com.google.protobuf.MapField< java.lang.String, org.tensorflow.proto.Feature> feature_; private com.google.protobuf.MapField @@ -77,7 +77,6 @@ private static final class FeatureDefaultEntryHolder { } return feature_; } - public int getFeatureCount() { return internalGetFeature().getMap().size(); } @@ -88,7 +87,6 @@ public int getFeatureCount() { * * map<string, .tensorflow.Feature> feature = 1; */ - @java.lang.Override public boolean containsFeature( java.lang.String key) { @@ -111,7 +109,6 @@ public java.util.Map getFeature( * map<string, .tensorflow.Feature> feature = 1; */ @java.lang.Override - public java.util.Map getFeatureMap() { return internalGetFeature().getMap(); } @@ -123,10 +120,11 @@ public java.util.Map getFeatureM * map<string, .tensorflow.Feature> feature = 1; */ @java.lang.Override - - public org.tensorflow.proto.Feature getFeatureOrDefault( + public /* nullable */ +org.tensorflow.proto.Feature getFeatureOrDefault( java.lang.String key, - org.tensorflow.proto.Feature defaultValue) { + /* nullable */ +org.tensorflow.proto.Feature defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetFeature().getMap(); @@ -140,7 +138,6 @@ public org.tensorflow.proto.Feature getFeatureOrDefault( * map<string, .tensorflow.Feature> feature = 1; */ @java.lang.Override - public org.tensorflow.proto.Feature getFeatureOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } @@ -166,7 +163,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3 + com.google.protobuf.GeneratedMessage .serializeStringMapTo( output, internalGetFeature(), @@ -262,39 +259,41 @@ public static org.tensorflow.proto.Features parseFrom( } public static org.tensorflow.proto.Features parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.Features parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.Features parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.Features parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.Features parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.Features parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -314,7 +313,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -322,7 +321,7 @@ protected Builder newBuilderForType( * Protobuf type {@code tensorflow.Features} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.Features) org.tensorflow.proto.FeaturesOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -331,7 +330,7 @@ public static final class Builder extends } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 1: @@ -342,7 +341,7 @@ protected com.google.protobuf.MapField internalGetMapField( } } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( int number) { switch (number) { case 1: @@ -353,7 +352,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField( } } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.FeatureProtos.internal_static_tensorflow_Features_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -366,13 +365,14 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; internalGetMutableFeature().clear(); return this; } @@ -400,45 +400,18 @@ public org.tensorflow.proto.Features build() { @java.lang.Override public org.tensorflow.proto.Features buildPartial() { org.tensorflow.proto.Features result = new org.tensorflow.proto.Features(this); - int from_bitField0_ = bitField0_; - result.feature_ = internalGetFeature(); - result.feature_.makeImmutable(); + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.Features result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.feature_ = internalGetFeature().build(FeatureDefaultEntryHolder.defaultEntry); + } } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.Features) { @@ -453,6 +426,7 @@ public Builder mergeFrom(org.tensorflow.proto.Features other) { if (other == org.tensorflow.proto.Features.getDefaultInstance()) return this; internalGetMutableFeature().mergeFrom( other.internalGetFeature()); + bitField0_ |= 0x00000001; this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -483,8 +457,9 @@ public Builder mergeFrom( com.google.protobuf.MapEntry feature__ = input.readMessage( FeatureDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableFeature().getMutableMap().put( + internalGetMutableFeature().ensureBuilderMap().put( feature__.getKey(), feature__.getValue()); + bitField0_ |= 0x00000001; break; } // case 10 default: { @@ -504,31 +479,40 @@ public Builder mergeFrom( } private int bitField0_; - private com.google.protobuf.MapField< - java.lang.String, org.tensorflow.proto.Feature> feature_; - private com.google.protobuf.MapField - internalGetFeature() { + private static final class FeatureConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public org.tensorflow.proto.Feature build(org.tensorflow.proto.FeatureOrBuilder val) { + if (val instanceof org.tensorflow.proto.Feature) { return (org.tensorflow.proto.Feature) val; } + return ((org.tensorflow.proto.Feature.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return FeatureDefaultEntryHolder.defaultEntry; + } + }; + private static final FeatureConverter featureConverter = new FeatureConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, org.tensorflow.proto.FeatureOrBuilder, org.tensorflow.proto.Feature, org.tensorflow.proto.Feature.Builder> feature_; + private com.google.protobuf.MapFieldBuilder + internalGetFeature() { if (feature_ == null) { - return com.google.protobuf.MapField.emptyMapField( - FeatureDefaultEntryHolder.defaultEntry); + return new com.google.protobuf.MapFieldBuilder<>(featureConverter); } return feature_; } - private com.google.protobuf.MapField - internalGetMutableFeature() { - onChanged();; + private com.google.protobuf.MapFieldBuilder + internalGetMutableFeature() { if (feature_ == null) { - feature_ = com.google.protobuf.MapField.newMapField( - FeatureDefaultEntryHolder.defaultEntry); - } - if (!feature_.isMutable()) { - feature_ = feature_.copy(); + feature_ = new com.google.protobuf.MapFieldBuilder<>(featureConverter); } + bitField0_ |= 0x00000001; + onChanged(); return feature_; } - public int getFeatureCount() { - return internalGetFeature().getMap().size(); + return internalGetFeature().ensureBuilderMap().size(); } /** *
    @@ -537,12 +521,11 @@ public int getFeatureCount() {
          *
          * map<string, .tensorflow.Feature> feature = 1;
          */
    -
         @java.lang.Override
         public boolean containsFeature(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      return internalGetFeature().getMap().containsKey(key);
    +      return internalGetFeature().ensureBuilderMap().containsKey(key);
         }
         /**
          * Use {@link #getFeatureMap()} instead.
    @@ -560,9 +543,8 @@ public java.util.Map getFeature(
          * map<string, .tensorflow.Feature> feature = 1;
          */
         @java.lang.Override
    -
         public java.util.Map getFeatureMap() {
    -      return internalGetFeature().getMap();
    +      return internalGetFeature().getImmutableMap();
         }
         /**
          * 
    @@ -572,14 +554,14 @@ public java.util.Map getFeatureM
          * map<string, .tensorflow.Feature> feature = 1;
          */
         @java.lang.Override
    -
    -    public org.tensorflow.proto.Feature getFeatureOrDefault(
    +    public /* nullable */
    +org.tensorflow.proto.Feature getFeatureOrDefault(
             java.lang.String key,
    -        org.tensorflow.proto.Feature defaultValue) {
    +        /* nullable */
    +org.tensorflow.proto.Feature defaultValue) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      java.util.Map map =
    -          internalGetFeature().getMap();
    -      return map.containsKey(key) ? map.get(key) : defaultValue;
    +      java.util.Map map = internalGetMutableFeature().ensureBuilderMap();
    +      return map.containsKey(key) ? featureConverter.build(map.get(key)) : defaultValue;
         }
         /**
          * 
    @@ -589,21 +571,18 @@ public org.tensorflow.proto.Feature getFeatureOrDefault(
          * map<string, .tensorflow.Feature> feature = 1;
          */
         @java.lang.Override
    -
         public org.tensorflow.proto.Feature getFeatureOrThrow(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      java.util.Map map =
    -          internalGetFeature().getMap();
    +      java.util.Map map = internalGetMutableFeature().ensureBuilderMap();
           if (!map.containsKey(key)) {
             throw new java.lang.IllegalArgumentException();
           }
    -      return map.get(key);
    +      return featureConverter.build(map.get(key));
         }
    -
         public Builder clearFeature() {
    -      internalGetMutableFeature().getMutableMap()
    -          .clear();
    +      bitField0_ = (bitField0_ & ~0x00000001);
    +      internalGetMutableFeature().clear();
           return this;
         }
         /**
    @@ -613,11 +592,10 @@ public Builder clearFeature() {
          *
          * map<string, .tensorflow.Feature> feature = 1;
          */
    -
         public Builder removeFeature(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      internalGetMutableFeature().getMutableMap()
    +      internalGetMutableFeature().ensureBuilderMap()
               .remove(key);
           return this;
         }
    @@ -626,8 +604,9 @@ public Builder removeFeature(
          */
         @java.lang.Deprecated
         public java.util.Map
    -    getMutableFeature() {
    -      return internalGetMutableFeature().getMutableMap();
    +        getMutableFeature() {
    +      bitField0_ |= 0x00000001;
    +      return internalGetMutableFeature().ensureMessageMap();
         }
         /**
          * 
    @@ -640,12 +619,10 @@ public Builder putFeature(
             java.lang.String key,
             org.tensorflow.proto.Feature value) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      if (value == null) {
    -  throw new NullPointerException("map value");
    -}
    -
    -      internalGetMutableFeature().getMutableMap()
    +      if (value == null) { throw new NullPointerException("map value"); }
    +      internalGetMutableFeature().ensureBuilderMap()
               .put(key, value);
    +      bitField0_ |= 0x00000001;
           return this;
         }
         /**
    @@ -655,26 +632,40 @@ public Builder putFeature(
          *
          * map<string, .tensorflow.Feature> feature = 1;
          */
    -
         public Builder putAllFeature(
             java.util.Map values) {
    -      internalGetMutableFeature().getMutableMap()
    +      for (java.util.Map.Entry e : values.entrySet()) {
    +        if (e.getKey() == null || e.getValue() == null) {
    +          throw new NullPointerException();
    +        }
    +      }
    +      internalGetMutableFeature().ensureBuilderMap()
               .putAll(values);
    +      bitField0_ |= 0x00000001;
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    +    /**
    +     * 
    +     * Map from feature name to feature.
    +     * 
    + * + * map<string, .tensorflow.Feature> feature = 1; + */ + public org.tensorflow.proto.Feature.Builder putFeatureBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableFeature().ensureBuilderMap(); + org.tensorflow.proto.FeatureOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = org.tensorflow.proto.Feature.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof org.tensorflow.proto.Feature) { + entry = ((org.tensorflow.proto.Feature) entry).toBuilder(); + builderMap.put(key, entry); + } + return (org.tensorflow.proto.Feature.Builder) entry; } - // @@protoc_insertion_point(builder_scope:tensorflow.Features) } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeaturesOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeaturesOrBuilder.java index 0d436b3ecba..ccc86b2da95 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeaturesOrBuilder.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeaturesOrBuilder.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/example/feature.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -46,7 +48,6 @@ boolean containsFeature( * * map<string, .tensorflow.Feature> feature = 1; */ - /* nullable */ org.tensorflow.proto.Feature getFeatureOrDefault( java.lang.String key, @@ -59,7 +60,6 @@ org.tensorflow.proto.Feature getFeatureOrDefault( * * map<string, .tensorflow.Feature> feature = 1; */ - org.tensorflow.proto.Feature getFeatureOrThrow( java.lang.String key); } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FingerprintDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FingerprintDef.java index b44f9065acb..d26cf3ac830 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FingerprintDef.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FingerprintDef.java @@ -1,11 +1,14 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/protobuf/fingerprint.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; /** *
      * Protocol buffer representing a SavedModel Fingerprint.
    + *
      * If there are multiple MetaGraphDefs in the SavedModel, the FingerprintDef
      * corresponds to the first one.
      * 
    @@ -13,44 +16,43 @@ * Protobuf type {@code tensorflow.FingerprintDef} */ public final class FingerprintDef extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.FingerprintDef) FingerprintDefOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + FingerprintDef.class.getName()); + } // Use FingerprintDef.newBuilder() to construct. - private FingerprintDef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private FingerprintDef(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private FingerprintDef() { + uuid_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new FingerprintDef(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.FingerprintProtos.internal_static_tensorflow_FingerprintDef_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.FingerprintProtos.internal_static_tensorflow_FingerprintDef_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.proto.FingerprintDef.class, org.tensorflow.proto.FingerprintDef.Builder.class); } + private int bitField0_; public static final int SAVED_MODEL_CHECKSUM_FIELD_NUMBER = 1; - private long savedModelChecksum_; + private long savedModelChecksum_ = 0L; /** *
        * Hash of the saved_model.pb, referred to as a "checksum".
    @@ -65,7 +67,7 @@ public long getSavedModelChecksum() {
       }
     
       public static final int GRAPH_DEF_PROGRAM_HASH_FIELD_NUMBER = 2;
    -  private long graphDefProgramHash_;
    +  private long graphDefProgramHash_ = 0L;
       /**
        * 
        * Hash of regularized graph_def.
    @@ -80,7 +82,7 @@ public long getGraphDefProgramHash() {
       }
     
       public static final int SIGNATURE_DEF_HASH_FIELD_NUMBER = 3;
    -  private long signatureDefHash_;
    +  private long signatureDefHash_ = 0L;
       /**
        * 
        * Hash of the regularized (sorted) SignatureDefs.
    @@ -95,7 +97,7 @@ public long getSignatureDefHash() {
       }
     
       public static final int SAVED_OBJECT_GRAPH_HASH_FIELD_NUMBER = 4;
    -  private long savedObjectGraphHash_;
    +  private long savedObjectGraphHash_ = 0L;
       /**
        * 
        * Hash of the regularized SavedObjectGraph.
    @@ -110,7 +112,7 @@ public long getSavedObjectGraphHash() {
       }
     
       public static final int CHECKPOINT_HASH_FIELD_NUMBER = 5;
    -  private long checkpointHash_;
    +  private long checkpointHash_ = 0L;
       /**
        * 
        * Hash of the checkpoint.
    @@ -124,6 +126,53 @@ public long getCheckpointHash() {
         return checkpointHash_;
       }
     
    +  public static final int UUID_FIELD_NUMBER = 7;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object uuid_ = "";
    +  /**
    +   * 
    +   * An UUID for the model, chosen at random, not related to the hashes.
    +   * 
    + * + * string uuid = 7; + * @return The uuid. + */ + @java.lang.Override + public java.lang.String getUuid() { + java.lang.Object ref = uuid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uuid_ = s; + return s; + } + } + /** + *
    +   * An UUID for the model, chosen at random, not related to the hashes.
    +   * 
    + * + * string uuid = 7; + * @return The bytes for uuid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUuidBytes() { + java.lang.Object ref = uuid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int VERSION_FIELD_NUMBER = 6; private org.tensorflow.proto.VersionDef version_; /** @@ -136,7 +185,7 @@ public long getCheckpointHash() { */ @java.lang.Override public boolean hasVersion() { - return version_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** *
    @@ -159,7 +208,7 @@ public org.tensorflow.proto.VersionDef getVersion() {
        */
       @java.lang.Override
       public org.tensorflow.proto.VersionDefOrBuilder getVersionOrBuilder() {
    -    return getVersion();
    +    return version_ == null ? org.tensorflow.proto.VersionDef.getDefaultInstance() : version_;
       }
     
       private byte memoizedIsInitialized = -1;
    @@ -191,9 +240,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         if (checkpointHash_ != 0L) {
           output.writeUInt64(5, checkpointHash_);
         }
    -    if (version_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(6, getVersion());
         }
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uuid_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 7, uuid_);
    +    }
         getUnknownFields().writeTo(output);
       }
     
    @@ -223,10 +275,13 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeUInt64Size(5, checkpointHash_);
         }
    -    if (version_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(6, getVersion());
         }
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uuid_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(7, uuid_);
    +    }
         size += getUnknownFields().getSerializedSize();
         memoizedSize = size;
         return size;
    @@ -252,6 +307,8 @@ public boolean equals(final java.lang.Object obj) {
             != other.getSavedObjectGraphHash()) return false;
         if (getCheckpointHash()
             != other.getCheckpointHash()) return false;
    +    if (!getUuid()
    +        .equals(other.getUuid())) return false;
         if (hasVersion() != other.hasVersion()) return false;
         if (hasVersion()) {
           if (!getVersion()
    @@ -283,6 +340,8 @@ public int hashCode() {
         hash = (37 * hash) + CHECKPOINT_HASH_FIELD_NUMBER;
         hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
             getCheckpointHash());
    +    hash = (37 * hash) + UUID_FIELD_NUMBER;
    +    hash = (53 * hash) + getUuid().hashCode();
         if (hasVersion()) {
           hash = (37 * hash) + VERSION_FIELD_NUMBER;
           hash = (53 * hash) + getVersion().hashCode();
    @@ -326,39 +385,41 @@ public static org.tensorflow.proto.FingerprintDef parseFrom(
       }
       public static org.tensorflow.proto.FingerprintDef parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.FingerprintDef parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.FingerprintDef parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.FingerprintDef parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.FingerprintDef parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.FingerprintDef parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -378,13 +439,14 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
       /**
        * 
        * Protocol buffer representing a SavedModel Fingerprint.
    +   *
        * If there are multiple MetaGraphDefs in the SavedModel, the FingerprintDef
        * corresponds to the first one.
        * 
    @@ -392,7 +454,7 @@ protected Builder newBuilderForType( * Protobuf type {@code tensorflow.FingerprintDef} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.FingerprintDef) org.tensorflow.proto.FingerprintDefOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -401,7 +463,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.FingerprintProtos.internal_static_tensorflow_FingerprintDef_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -410,31 +472,33 @@ public static final class Builder extends // Construct using org.tensorflow.proto.FingerprintDef.newBuilder() private Builder() { - + maybeForceBuilderInitialization(); } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getVersionFieldBuilder(); + } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; savedModelChecksum_ = 0L; - graphDefProgramHash_ = 0L; - signatureDefHash_ = 0L; - savedObjectGraphHash_ = 0L; - checkpointHash_ = 0L; - - if (versionBuilder_ == null) { - version_ = null; - } else { - version_ = null; + uuid_ = ""; + version_ = null; + if (versionBuilder_ != null) { + versionBuilder_.dispose(); versionBuilder_ = null; } return this; @@ -463,52 +527,41 @@ public org.tensorflow.proto.FingerprintDef build() { @java.lang.Override public org.tensorflow.proto.FingerprintDef buildPartial() { org.tensorflow.proto.FingerprintDef result = new org.tensorflow.proto.FingerprintDef(this); - result.savedModelChecksum_ = savedModelChecksum_; - result.graphDefProgramHash_ = graphDefProgramHash_; - result.signatureDefHash_ = signatureDefHash_; - result.savedObjectGraphHash_ = savedObjectGraphHash_; - result.checkpointHash_ = checkpointHash_; - if (versionBuilder_ == null) { - result.version_ = version_; - } else { - result.version_ = versionBuilder_.build(); - } + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.FingerprintDef result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.savedModelChecksum_ = savedModelChecksum_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.graphDefProgramHash_ = graphDefProgramHash_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.signatureDefHash_ = signatureDefHash_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.savedObjectGraphHash_ = savedObjectGraphHash_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.checkpointHash_ = checkpointHash_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.uuid_ = uuid_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000040) != 0)) { + result.version_ = versionBuilder_ == null + ? version_ + : versionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.FingerprintDef) { @@ -536,6 +589,11 @@ public Builder mergeFrom(org.tensorflow.proto.FingerprintDef other) { if (other.getCheckpointHash() != 0L) { setCheckpointHash(other.getCheckpointHash()); } + if (!other.getUuid().isEmpty()) { + uuid_ = other.uuid_; + bitField0_ |= 0x00000020; + onChanged(); + } if (other.hasVersion()) { mergeVersion(other.getVersion()); } @@ -567,36 +625,41 @@ public Builder mergeFrom( break; case 8: { savedModelChecksum_ = input.readUInt64(); - + bitField0_ |= 0x00000001; break; } // case 8 case 16: { graphDefProgramHash_ = input.readUInt64(); - + bitField0_ |= 0x00000002; break; } // case 16 case 24: { signatureDefHash_ = input.readUInt64(); - + bitField0_ |= 0x00000004; break; } // case 24 case 32: { savedObjectGraphHash_ = input.readUInt64(); - + bitField0_ |= 0x00000008; break; } // case 32 case 40: { checkpointHash_ = input.readUInt64(); - + bitField0_ |= 0x00000010; break; } // case 40 case 50: { input.readMessage( getVersionFieldBuilder().getBuilder(), extensionRegistry); - + bitField0_ |= 0x00000040; break; } // case 50 + case 58: { + uuid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 58 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -612,6 +675,7 @@ public Builder mergeFrom( } // finally return this; } + private int bitField0_; private long savedModelChecksum_ ; /** @@ -636,8 +700,9 @@ public long getSavedModelChecksum() { * @return This builder for chaining. */ public Builder setSavedModelChecksum(long value) { - + savedModelChecksum_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -650,7 +715,7 @@ public Builder setSavedModelChecksum(long value) { * @return This builder for chaining. */ public Builder clearSavedModelChecksum() { - + bitField0_ = (bitField0_ & ~0x00000001); savedModelChecksum_ = 0L; onChanged(); return this; @@ -679,8 +744,9 @@ public long getGraphDefProgramHash() { * @return This builder for chaining. */ public Builder setGraphDefProgramHash(long value) { - + graphDefProgramHash_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -693,7 +759,7 @@ public Builder setGraphDefProgramHash(long value) { * @return This builder for chaining. */ public Builder clearGraphDefProgramHash() { - + bitField0_ = (bitField0_ & ~0x00000002); graphDefProgramHash_ = 0L; onChanged(); return this; @@ -722,8 +788,9 @@ public long getSignatureDefHash() { * @return This builder for chaining. */ public Builder setSignatureDefHash(long value) { - + signatureDefHash_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -736,7 +803,7 @@ public Builder setSignatureDefHash(long value) { * @return This builder for chaining. */ public Builder clearSignatureDefHash() { - + bitField0_ = (bitField0_ & ~0x00000004); signatureDefHash_ = 0L; onChanged(); return this; @@ -765,8 +832,9 @@ public long getSavedObjectGraphHash() { * @return This builder for chaining. */ public Builder setSavedObjectGraphHash(long value) { - + savedObjectGraphHash_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -779,7 +847,7 @@ public Builder setSavedObjectGraphHash(long value) { * @return This builder for chaining. */ public Builder clearSavedObjectGraphHash() { - + bitField0_ = (bitField0_ & ~0x00000008); savedObjectGraphHash_ = 0L; onChanged(); return this; @@ -808,8 +876,9 @@ public long getCheckpointHash() { * @return This builder for chaining. */ public Builder setCheckpointHash(long value) { - + checkpointHash_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -822,14 +891,106 @@ public Builder setCheckpointHash(long value) { * @return This builder for chaining. */ public Builder clearCheckpointHash() { - + bitField0_ = (bitField0_ & ~0x00000010); checkpointHash_ = 0L; onChanged(); return this; } + private java.lang.Object uuid_ = ""; + /** + *
    +     * An UUID for the model, chosen at random, not related to the hashes.
    +     * 
    + * + * string uuid = 7; + * @return The uuid. + */ + public java.lang.String getUuid() { + java.lang.Object ref = uuid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uuid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
    +     * An UUID for the model, chosen at random, not related to the hashes.
    +     * 
    + * + * string uuid = 7; + * @return The bytes for uuid. + */ + public com.google.protobuf.ByteString + getUuidBytes() { + java.lang.Object ref = uuid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
    +     * An UUID for the model, chosen at random, not related to the hashes.
    +     * 
    + * + * string uuid = 7; + * @param value The uuid to set. + * @return This builder for chaining. + */ + public Builder setUuid( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + uuid_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
    +     * An UUID for the model, chosen at random, not related to the hashes.
    +     * 
    + * + * string uuid = 7; + * @return This builder for chaining. + */ + public Builder clearUuid() { + uuid_ = getDefaultInstance().getUuid(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
    +     * An UUID for the model, chosen at random, not related to the hashes.
    +     * 
    + * + * string uuid = 7; + * @param value The bytes for uuid to set. + * @return This builder for chaining. + */ + public Builder setUuidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + uuid_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + private org.tensorflow.proto.VersionDef version_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.VersionDef, org.tensorflow.proto.VersionDef.Builder, org.tensorflow.proto.VersionDefOrBuilder> versionBuilder_; /** *
    @@ -840,7 +1001,7 @@ public Builder clearCheckpointHash() {
          * @return Whether the version field is set.
          */
         public boolean hasVersion() {
    -      return versionBuilder_ != null || version_ != null;
    +      return ((bitField0_ & 0x00000040) != 0);
         }
         /**
          * 
    @@ -870,11 +1031,11 @@ public Builder setVersion(org.tensorflow.proto.VersionDef value) {
               throw new NullPointerException();
             }
             version_ = value;
    -        onChanged();
           } else {
             versionBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000040;
    +      onChanged();
           return this;
         }
         /**
    @@ -888,11 +1049,11 @@ public Builder setVersion(
             org.tensorflow.proto.VersionDef.Builder builderForValue) {
           if (versionBuilder_ == null) {
             version_ = builderForValue.build();
    -        onChanged();
           } else {
             versionBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000040;
    +      onChanged();
           return this;
         }
         /**
    @@ -904,17 +1065,20 @@ public Builder setVersion(
          */
         public Builder mergeVersion(org.tensorflow.proto.VersionDef value) {
           if (versionBuilder_ == null) {
    -        if (version_ != null) {
    -          version_ =
    -            org.tensorflow.proto.VersionDef.newBuilder(version_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000040) != 0) &&
    +          version_ != null &&
    +          version_ != org.tensorflow.proto.VersionDef.getDefaultInstance()) {
    +          getVersionBuilder().mergeFrom(value);
             } else {
               version_ = value;
             }
    -        onChanged();
           } else {
             versionBuilder_.mergeFrom(value);
           }
    -
    +      if (version_ != null) {
    +        bitField0_ |= 0x00000040;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -925,14 +1089,13 @@ public Builder mergeVersion(org.tensorflow.proto.VersionDef value) {
          * .tensorflow.VersionDef version = 6;
          */
         public Builder clearVersion() {
    -      if (versionBuilder_ == null) {
    -        version_ = null;
    -        onChanged();
    -      } else {
    -        version_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000040);
    +      version_ = null;
    +      if (versionBuilder_ != null) {
    +        versionBuilder_.dispose();
             versionBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -943,7 +1106,7 @@ public Builder clearVersion() {
          * .tensorflow.VersionDef version = 6;
          */
         public org.tensorflow.proto.VersionDef.Builder getVersionBuilder() {
    -      
    +      bitField0_ |= 0x00000040;
           onChanged();
           return getVersionFieldBuilder().getBuilder();
         }
    @@ -969,11 +1132,11 @@ public org.tensorflow.proto.VersionDefOrBuilder getVersionOrBuilder() {
          *
          * .tensorflow.VersionDef version = 6;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.VersionDef, org.tensorflow.proto.VersionDef.Builder, org.tensorflow.proto.VersionDefOrBuilder> 
             getVersionFieldBuilder() {
           if (versionBuilder_ == null) {
    -        versionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        versionBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.VersionDef, org.tensorflow.proto.VersionDef.Builder, org.tensorflow.proto.VersionDefOrBuilder>(
                     getVersion(),
                     getParentForChildren(),
    @@ -982,18 +1145,6 @@ public org.tensorflow.proto.VersionDefOrBuilder getVersionOrBuilder() {
           }
           return versionBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.FingerprintDef)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FingerprintDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FingerprintDefOrBuilder.java
    index d5741560102..1dc0c870f7d 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FingerprintDefOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FingerprintDefOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/fingerprint.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -57,6 +59,26 @@ public interface FingerprintDefOrBuilder extends
        */
       long getCheckpointHash();
     
    +  /**
    +   * 
    +   * An UUID for the model, chosen at random, not related to the hashes.
    +   * 
    + * + * string uuid = 7; + * @return The uuid. + */ + java.lang.String getUuid(); + /** + *
    +   * An UUID for the model, chosen at random, not related to the hashes.
    +   * 
    + * + * string uuid = 7; + * @return The bytes for uuid. + */ + com.google.protobuf.ByteString + getUuidBytes(); + /** *
        * Version specification of the fingerprint.
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FingerprintProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FingerprintProtos.java
    index 4d072ef3eef..734b9b30e63 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FingerprintProtos.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FingerprintProtos.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/fingerprint.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class FingerprintProtos {
       private FingerprintProtos() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      FingerprintProtos.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,7 +28,7 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_FingerprintDef_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_FingerprintDef_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -30,16 +41,16 @@ public static void registerAllExtensions(
         java.lang.String[] descriptorData = {
           "\n*tensorflow/core/protobuf/fingerprint.p" +
           "roto\022\ntensorflow\032(tensorflow/core/framew" +
    -      "ork/versions.proto\"\315\001\n\016FingerprintDef\022\034\n" +
    +      "ork/versions.proto\"\333\001\n\016FingerprintDef\022\034\n" +
           "\024saved_model_checksum\030\001 \001(\004\022\036\n\026graph_def" +
           "_program_hash\030\002 \001(\004\022\032\n\022signature_def_has" +
           "h\030\003 \001(\004\022\037\n\027saved_object_graph_hash\030\004 \001(\004" +
    -      "\022\027\n\017checkpoint_hash\030\005 \001(\004\022\'\n\007version\030\006 \001" +
    -      "(\0132\026.tensorflow.VersionDefB\205\001\n\024org.tenso" +
    -      "rflow.protoB\021FingerprintProtosP\001ZUgithub" +
    -      ".com/tensorflow/tensorflow/tensorflow/go" +
    -      "/core/protobuf/for_core_protos_go_proto\370" +
    -      "\001\001b\006proto3"
    +      "\022\027\n\017checkpoint_hash\030\005 \001(\004\022\014\n\004uuid\030\007 \001(\t\022" +
    +      "\'\n\007version\030\006 \001(\0132\026.tensorflow.VersionDef" +
    +      "B\205\001\n\024org.tensorflow.protoB\021FingerprintPr" +
    +      "otosP\001ZUgithub.com/tensorflow/tensorflow" +
    +      "/tensorflow/go/core/protobuf/for_core_pr" +
    +      "otos_go_proto\370\001\001b\006proto3"
         };
         descriptor = com.google.protobuf.Descriptors.FileDescriptor
           .internalBuildGeneratedFileFrom(descriptorData,
    @@ -49,9 +60,10 @@ public static void registerAllExtensions(
         internal_static_tensorflow_FingerprintDef_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_FingerprintDef_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_FingerprintDef_descriptor,
    -        new java.lang.String[] { "SavedModelChecksum", "GraphDefProgramHash", "SignatureDefHash", "SavedObjectGraphHash", "CheckpointHash", "Version", });
    +        new java.lang.String[] { "SavedModelChecksum", "GraphDefProgramHash", "SignatureDefHash", "SavedObjectGraphHash", "CheckpointHash", "Uuid", "Version", });
    +    descriptor.resolveAllFeaturesImmutable();
         org.tensorflow.proto.VersionsProtos.getDescriptor();
       }
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FixedLenFeatureProto.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FixedLenFeatureProto.java
    index 6972509cda3..70708dadbba 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FixedLenFeatureProto.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FixedLenFeatureProto.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/example/example_parser_configuration.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,12 +9,21 @@
      * Protobuf type {@code tensorflow.FixedLenFeatureProto}
      */
     public final class FixedLenFeatureProto extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.FixedLenFeatureProto)
         FixedLenFeatureProtoOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      FixedLenFeatureProto.class.getName());
    +  }
       // Use FixedLenFeatureProto.newBuilder() to construct.
    -  private FixedLenFeatureProto(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private FixedLenFeatureProto(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private FixedLenFeatureProto() {
    @@ -20,33 +31,22 @@ private FixedLenFeatureProto() {
         valuesOutputTensorName_ = "";
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new FixedLenFeatureProto();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.ExampleParserConfigurationProtos.internal_static_tensorflow_FixedLenFeatureProto_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.ExampleParserConfigurationProtos.internal_static_tensorflow_FixedLenFeatureProto_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
                 org.tensorflow.proto.FixedLenFeatureProto.class, org.tensorflow.proto.FixedLenFeatureProto.Builder.class);
       }
     
    +  private int bitField0_;
       public static final int DTYPE_FIELD_NUMBER = 1;
    -  private int dtype_;
    +  private int dtype_ = 0;
       /**
        * .tensorflow.DataType dtype = 1;
        * @return The enum numeric value on the wire for dtype.
    @@ -59,8 +59,7 @@ protected java.lang.Object newInstance(
        * @return The dtype.
        */
       @java.lang.Override public org.tensorflow.proto.DataType getDtype() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(dtype_);
    +    org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(dtype_);
         return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
       }
     
    @@ -72,7 +71,7 @@ protected java.lang.Object newInstance(
        */
       @java.lang.Override
       public boolean hasShape() {
    -    return shape_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * .tensorflow.TensorShapeProto shape = 2;
    @@ -87,7 +86,7 @@ public org.tensorflow.proto.TensorShapeProto getShape() {
        */
       @java.lang.Override
       public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
    -    return getShape();
    +    return shape_ == null ? org.tensorflow.proto.TensorShapeProto.getDefaultInstance() : shape_;
       }
     
       public static final int DEFAULT_VALUE_FIELD_NUMBER = 3;
    @@ -98,7 +97,7 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
        */
       @java.lang.Override
       public boolean hasDefaultValue() {
    -    return defaultValue_ != null;
    +    return ((bitField0_ & 0x00000002) != 0);
       }
       /**
        * .tensorflow.TensorProto default_value = 3;
    @@ -113,11 +112,12 @@ public org.tensorflow.proto.TensorProto getDefaultValue() {
        */
       @java.lang.Override
       public org.tensorflow.proto.TensorProtoOrBuilder getDefaultValueOrBuilder() {
    -    return getDefaultValue();
    +    return defaultValue_ == null ? org.tensorflow.proto.TensorProto.getDefaultInstance() : defaultValue_;
       }
     
       public static final int VALUES_OUTPUT_TENSOR_NAME_FIELD_NUMBER = 4;
    -  private volatile java.lang.Object valuesOutputTensorName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object valuesOutputTensorName_ = "";
       /**
        * string values_output_tensor_name = 4;
        * @return The valuesOutputTensorName.
    @@ -171,14 +171,14 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         if (dtype_ != org.tensorflow.proto.DataType.DT_INVALID.getNumber()) {
           output.writeEnum(1, dtype_);
         }
    -    if (shape_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(2, getShape());
         }
    -    if (defaultValue_ != null) {
    +    if (((bitField0_ & 0x00000002) != 0)) {
           output.writeMessage(3, getDefaultValue());
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(valuesOutputTensorName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, valuesOutputTensorName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(valuesOutputTensorName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 4, valuesOutputTensorName_);
         }
         getUnknownFields().writeTo(output);
       }
    @@ -193,16 +193,16 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeEnumSize(1, dtype_);
         }
    -    if (shape_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(2, getShape());
         }
    -    if (defaultValue_ != null) {
    +    if (((bitField0_ & 0x00000002) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(3, getDefaultValue());
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(valuesOutputTensorName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, valuesOutputTensorName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(valuesOutputTensorName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(4, valuesOutputTensorName_);
         }
         size += getUnknownFields().getSerializedSize();
         memoizedSize = size;
    @@ -294,39 +294,41 @@ public static org.tensorflow.proto.FixedLenFeatureProto parseFrom(
       }
       public static org.tensorflow.proto.FixedLenFeatureProto parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.FixedLenFeatureProto parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.FixedLenFeatureProto parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.FixedLenFeatureProto parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.FixedLenFeatureProto parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.FixedLenFeatureProto parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -346,7 +348,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -354,7 +356,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.FixedLenFeatureProto}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.FixedLenFeatureProto)
           org.tensorflow.proto.FixedLenFeatureProtoOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -363,7 +365,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.ExampleParserConfigurationProtos.internal_static_tensorflow_FixedLenFeatureProto_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -372,33 +374,37 @@ public static final class Builder extends
     
         // Construct using org.tensorflow.proto.FixedLenFeatureProto.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getShapeFieldBuilder();
    +        getDefaultValueFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           dtype_ = 0;
    -
    -      if (shapeBuilder_ == null) {
    -        shape_ = null;
    -      } else {
    -        shape_ = null;
    +      shape_ = null;
    +      if (shapeBuilder_ != null) {
    +        shapeBuilder_.dispose();
             shapeBuilder_ = null;
           }
    -      if (defaultValueBuilder_ == null) {
    -        defaultValue_ = null;
    -      } else {
    -        defaultValue_ = null;
    +      defaultValue_ = null;
    +      if (defaultValueBuilder_ != null) {
    +        defaultValueBuilder_.dispose();
             defaultValueBuilder_ = null;
           }
           valuesOutputTensorName_ = "";
    -
           return this;
         }
     
    @@ -425,54 +431,35 @@ public org.tensorflow.proto.FixedLenFeatureProto build() {
         @java.lang.Override
         public org.tensorflow.proto.FixedLenFeatureProto buildPartial() {
           org.tensorflow.proto.FixedLenFeatureProto result = new org.tensorflow.proto.FixedLenFeatureProto(this);
    -      result.dtype_ = dtype_;
    -      if (shapeBuilder_ == null) {
    -        result.shape_ = shape_;
    -      } else {
    -        result.shape_ = shapeBuilder_.build();
    -      }
    -      if (defaultValueBuilder_ == null) {
    -        result.defaultValue_ = defaultValue_;
    -      } else {
    -        result.defaultValue_ = defaultValueBuilder_.build();
    -      }
    -      result.valuesOutputTensorName_ = valuesOutputTensorName_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.FixedLenFeatureProto result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.dtype_ = dtype_;
    +      }
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.shape_ = shapeBuilder_ == null
    +            ? shape_
    +            : shapeBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.defaultValue_ = defaultValueBuilder_ == null
    +            ? defaultValue_
    +            : defaultValueBuilder_.build();
    +        to_bitField0_ |= 0x00000002;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.valuesOutputTensorName_ = valuesOutputTensorName_;
    +      }
    +      result.bitField0_ |= to_bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.FixedLenFeatureProto) {
    @@ -496,6 +483,7 @@ public Builder mergeFrom(org.tensorflow.proto.FixedLenFeatureProto other) {
           }
           if (!other.getValuesOutputTensorName().isEmpty()) {
             valuesOutputTensorName_ = other.valuesOutputTensorName_;
    +        bitField0_ |= 0x00000008;
             onChanged();
           }
           this.mergeUnknownFields(other.getUnknownFields());
    @@ -526,26 +514,26 @@ public Builder mergeFrom(
                   break;
                 case 8: {
                   dtype_ = input.readEnum();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 8
                 case 18: {
                   input.readMessage(
                       getShapeFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 case 26: {
                   input.readMessage(
                       getDefaultValueFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 26
                 case 34: {
                   valuesOutputTensorName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 34
                 default: {
    @@ -563,6 +551,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private int dtype_ = 0;
         /**
    @@ -578,8 +567,8 @@ public Builder mergeFrom(
          * @return This builder for chaining.
          */
         public Builder setDtypeValue(int value) {
    -      
           dtype_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -589,8 +578,7 @@ public Builder setDtypeValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.DataType getDtype() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(dtype_);
    +      org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(dtype_);
           return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
         }
         /**
    @@ -602,7 +590,7 @@ public Builder setDtype(org.tensorflow.proto.DataType value) {
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00000001;
           dtype_ = value.getNumber();
           onChanged();
           return this;
    @@ -612,21 +600,21 @@ public Builder setDtype(org.tensorflow.proto.DataType value) {
          * @return This builder for chaining.
          */
         public Builder clearDtype() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000001);
           dtype_ = 0;
           onChanged();
           return this;
         }
     
         private org.tensorflow.proto.TensorShapeProto shape_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> shapeBuilder_;
         /**
          * .tensorflow.TensorShapeProto shape = 2;
          * @return Whether the shape field is set.
          */
         public boolean hasShape() {
    -      return shapeBuilder_ != null || shape_ != null;
    +      return ((bitField0_ & 0x00000002) != 0);
         }
         /**
          * .tensorflow.TensorShapeProto shape = 2;
    @@ -648,11 +636,11 @@ public Builder setShape(org.tensorflow.proto.TensorShapeProto value) {
               throw new NullPointerException();
             }
             shape_ = value;
    -        onChanged();
           } else {
             shapeBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return this;
         }
         /**
    @@ -662,11 +650,11 @@ public Builder setShape(
             org.tensorflow.proto.TensorShapeProto.Builder builderForValue) {
           if (shapeBuilder_ == null) {
             shape_ = builderForValue.build();
    -        onChanged();
           } else {
             shapeBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return this;
         }
         /**
    @@ -674,38 +662,40 @@ public Builder setShape(
          */
         public Builder mergeShape(org.tensorflow.proto.TensorShapeProto value) {
           if (shapeBuilder_ == null) {
    -        if (shape_ != null) {
    -          shape_ =
    -            org.tensorflow.proto.TensorShapeProto.newBuilder(shape_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000002) != 0) &&
    +          shape_ != null &&
    +          shape_ != org.tensorflow.proto.TensorShapeProto.getDefaultInstance()) {
    +          getShapeBuilder().mergeFrom(value);
             } else {
               shape_ = value;
             }
    -        onChanged();
           } else {
             shapeBuilder_.mergeFrom(value);
           }
    -
    +      if (shape_ != null) {
    +        bitField0_ |= 0x00000002;
    +        onChanged();
    +      }
           return this;
         }
         /**
          * .tensorflow.TensorShapeProto shape = 2;
          */
         public Builder clearShape() {
    -      if (shapeBuilder_ == null) {
    -        shape_ = null;
    -        onChanged();
    -      } else {
    -        shape_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000002);
    +      shape_ = null;
    +      if (shapeBuilder_ != null) {
    +        shapeBuilder_.dispose();
             shapeBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
          * .tensorflow.TensorShapeProto shape = 2;
          */
         public org.tensorflow.proto.TensorShapeProto.Builder getShapeBuilder() {
    -      
    +      bitField0_ |= 0x00000002;
           onChanged();
           return getShapeFieldBuilder().getBuilder();
         }
    @@ -723,11 +713,11 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
         /**
          * .tensorflow.TensorShapeProto shape = 2;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> 
             getShapeFieldBuilder() {
           if (shapeBuilder_ == null) {
    -        shapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        shapeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder>(
                     getShape(),
                     getParentForChildren(),
    @@ -738,14 +728,14 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
         }
     
         private org.tensorflow.proto.TensorProto defaultValue_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> defaultValueBuilder_;
         /**
          * .tensorflow.TensorProto default_value = 3;
          * @return Whether the defaultValue field is set.
          */
         public boolean hasDefaultValue() {
    -      return defaultValueBuilder_ != null || defaultValue_ != null;
    +      return ((bitField0_ & 0x00000004) != 0);
         }
         /**
          * .tensorflow.TensorProto default_value = 3;
    @@ -767,11 +757,11 @@ public Builder setDefaultValue(org.tensorflow.proto.TensorProto value) {
               throw new NullPointerException();
             }
             defaultValue_ = value;
    -        onChanged();
           } else {
             defaultValueBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000004;
    +      onChanged();
           return this;
         }
         /**
    @@ -781,11 +771,11 @@ public Builder setDefaultValue(
             org.tensorflow.proto.TensorProto.Builder builderForValue) {
           if (defaultValueBuilder_ == null) {
             defaultValue_ = builderForValue.build();
    -        onChanged();
           } else {
             defaultValueBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000004;
    +      onChanged();
           return this;
         }
         /**
    @@ -793,38 +783,40 @@ public Builder setDefaultValue(
          */
         public Builder mergeDefaultValue(org.tensorflow.proto.TensorProto value) {
           if (defaultValueBuilder_ == null) {
    -        if (defaultValue_ != null) {
    -          defaultValue_ =
    -            org.tensorflow.proto.TensorProto.newBuilder(defaultValue_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000004) != 0) &&
    +          defaultValue_ != null &&
    +          defaultValue_ != org.tensorflow.proto.TensorProto.getDefaultInstance()) {
    +          getDefaultValueBuilder().mergeFrom(value);
             } else {
               defaultValue_ = value;
             }
    -        onChanged();
           } else {
             defaultValueBuilder_.mergeFrom(value);
           }
    -
    +      if (defaultValue_ != null) {
    +        bitField0_ |= 0x00000004;
    +        onChanged();
    +      }
           return this;
         }
         /**
          * .tensorflow.TensorProto default_value = 3;
          */
         public Builder clearDefaultValue() {
    -      if (defaultValueBuilder_ == null) {
    -        defaultValue_ = null;
    -        onChanged();
    -      } else {
    -        defaultValue_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000004);
    +      defaultValue_ = null;
    +      if (defaultValueBuilder_ != null) {
    +        defaultValueBuilder_.dispose();
             defaultValueBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
          * .tensorflow.TensorProto default_value = 3;
          */
         public org.tensorflow.proto.TensorProto.Builder getDefaultValueBuilder() {
    -      
    +      bitField0_ |= 0x00000004;
           onChanged();
           return getDefaultValueFieldBuilder().getBuilder();
         }
    @@ -842,11 +834,11 @@ public org.tensorflow.proto.TensorProtoOrBuilder getDefaultValueOrBuilder() {
         /**
          * .tensorflow.TensorProto default_value = 3;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> 
             getDefaultValueFieldBuilder() {
           if (defaultValueBuilder_ == null) {
    -        defaultValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        defaultValueBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder>(
                     getDefaultValue(),
                     getParentForChildren(),
    @@ -897,11 +889,9 @@ public java.lang.String getValuesOutputTensorName() {
          */
         public Builder setValuesOutputTensorName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           valuesOutputTensorName_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -910,8 +900,8 @@ public Builder setValuesOutputTensorName(
          * @return This builder for chaining.
          */
         public Builder clearValuesOutputTensorName() {
    -      
           valuesOutputTensorName_ = getDefaultInstance().getValuesOutputTensorName();
    +      bitField0_ = (bitField0_ & ~0x00000008);
           onChanged();
           return this;
         }
    @@ -922,27 +912,13 @@ public Builder clearValuesOutputTensorName() {
          */
         public Builder setValuesOutputTensorNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           valuesOutputTensorName_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.FixedLenFeatureProto)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FixedLenFeatureProtoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FixedLenFeatureProtoOrBuilder.java
    index c2ce843870f..e49042cfcae 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FixedLenFeatureProtoOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FixedLenFeatureProtoOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/example/example_parser_configuration.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FloatList.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FloatList.java
    index 859bdd63349..5997a988c59 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FloatList.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FloatList.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/example/feature.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,37 +9,34 @@
      * Protobuf type {@code tensorflow.FloatList}
      */
     public final class FloatList extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.FloatList)
         FloatListOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      FloatList.class.getName());
    +  }
       // Use FloatList.newBuilder() to construct.
    -  private FloatList(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private FloatList(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private FloatList() {
         value_ = emptyFloatList();
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new FloatList();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.FeatureProtos.internal_static_tensorflow_FloatList_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.FeatureProtos.internal_static_tensorflow_FloatList_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -45,7 +44,9 @@ protected java.lang.Object newInstance(
       }
     
       public static final int VALUE_FIELD_NUMBER = 1;
    -  private com.google.protobuf.Internal.FloatList value_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.Internal.FloatList value_ =
    +      emptyFloatList();
       /**
        * repeated float value = 1 [packed = true];
        * @return A list containing the value.
    @@ -185,39 +186,41 @@ public static org.tensorflow.proto.FloatList parseFrom(
       }
       public static org.tensorflow.proto.FloatList parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.FloatList parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.FloatList parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.FloatList parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.FloatList parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.FloatList parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -237,7 +240,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -245,7 +248,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.FloatList}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.FloatList)
           org.tensorflow.proto.FloatListOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -254,7 +257,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.FeatureProtos.internal_static_tensorflow_FloatList_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -267,15 +270,15 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           value_ = emptyFloatList();
    -      bitField0_ = (bitField0_ & ~0x00000001);
           return this;
         }
     
    @@ -302,48 +305,19 @@ public org.tensorflow.proto.FloatList build() {
         @java.lang.Override
         public org.tensorflow.proto.FloatList buildPartial() {
           org.tensorflow.proto.FloatList result = new org.tensorflow.proto.FloatList(this);
    -      int from_bitField0_ = bitField0_;
    -      if (((bitField0_ & 0x00000001) != 0)) {
    -        value_.makeImmutable();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    -      }
    -      result.value_ = value_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.FloatList result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        value_.makeImmutable();
    +        result.value_ = value_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.FloatList) {
    @@ -359,7 +333,8 @@ public Builder mergeFrom(org.tensorflow.proto.FloatList other) {
           if (!other.value_.isEmpty()) {
             if (value_.isEmpty()) {
               value_ = other.value_;
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          value_.makeImmutable();
    +          bitField0_ |= 0x00000001;
             } else {
               ensureValueIsMutable();
               value_.addAll(other.value_);
    @@ -401,7 +376,8 @@ public Builder mergeFrom(
                 case 10: {
                   int length = input.readRawVarint32();
                   int limit = input.pushLimit(length);
    -              ensureValueIsMutable();
    +              int alloc = length > 4096 ? 4096 : length;
    +              ensureValueIsMutable(alloc / 4);
                   while (input.getBytesUntilLimit() > 0) {
                     value_.addFloat(input.readFloat());
                   }
    @@ -427,10 +403,16 @@ public Builder mergeFrom(
     
         private com.google.protobuf.Internal.FloatList value_ = emptyFloatList();
         private void ensureValueIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    -        value_ = mutableCopy(value_);
    -        bitField0_ |= 0x00000001;
    -       }
    +      if (!value_.isModifiable()) {
    +        value_ = makeMutableCopy(value_);
    +      }
    +      bitField0_ |= 0x00000001;
    +    }
    +    private void ensureValueIsMutable(int capacity) {
    +      if (!value_.isModifiable()) {
    +        value_ = makeMutableCopy(value_, capacity);
    +      }
    +      bitField0_ |= 0x00000001;
         }
         /**
          * repeated float value = 1 [packed = true];
    @@ -438,8 +420,8 @@ private void ensureValueIsMutable() {
          */
         public java.util.List
             getValueList() {
    -      return ((bitField0_ & 0x00000001) != 0) ?
    -               java.util.Collections.unmodifiableList(value_) : value_;
    +      value_.makeImmutable();
    +      return value_;
         }
         /**
          * repeated float value = 1 [packed = true];
    @@ -464,8 +446,10 @@ public float getValue(int index) {
          */
         public Builder setValue(
             int index, float value) {
    +
           ensureValueIsMutable();
           value_.setFloat(index, value);
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -475,8 +459,10 @@ public Builder setValue(
          * @return This builder for chaining.
          */
         public Builder addValue(float value) {
    +
           ensureValueIsMutable();
           value_.addFloat(value);
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -490,6 +476,7 @@ public Builder addAllValue(
           ensureValueIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, value_);
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -503,18 +490,6 @@ public Builder clearValue() {
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.FloatList)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FloatListOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FloatListOrBuilder.java
    index 31a18866d89..3a09beb22bb 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FloatListOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FloatListOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/example/feature.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FullTypeDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FullTypeDef.java
    index 67347340a9f..52b9cac7116 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FullTypeDef.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FullTypeDef.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/full_type.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -14,12 +16,21 @@
      * Protobuf type {@code tensorflow.FullTypeDef}
      */
     public final class FullTypeDef extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.FullTypeDef)
         FullTypeDefOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      FullTypeDef.class.getName());
    +  }
       // Use FullTypeDef.newBuilder() to construct.
    -  private FullTypeDef(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private FullTypeDef(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private FullTypeDef() {
    @@ -27,25 +38,13 @@ private FullTypeDef() {
         args_ = java.util.Collections.emptyList();
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new FullTypeDef();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.FullTypeProtos.internal_static_tensorflow_FullTypeDef_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.FullTypeProtos.internal_static_tensorflow_FullTypeDef_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -53,6 +52,7 @@ protected java.lang.Object newInstance(
       }
     
       private int attrCase_ = 0;
    +  @SuppressWarnings("serial")
       private java.lang.Object attr_;
       public enum AttrCase
           implements com.google.protobuf.Internal.EnumLite,
    @@ -94,7 +94,7 @@ public int getNumber() {
       }
     
       public static final int TYPE_ID_FIELD_NUMBER = 1;
    -  private int typeId_;
    +  private int typeId_ = 0;
       /**
        * 
        * The principal type represented by this object. This may be a concrete type
    @@ -119,12 +119,12 @@ public int getNumber() {
        * @return The typeId.
        */
       @java.lang.Override public org.tensorflow.proto.FullTypeId getTypeId() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.FullTypeId result = org.tensorflow.proto.FullTypeId.valueOf(typeId_);
    +    org.tensorflow.proto.FullTypeId result = org.tensorflow.proto.FullTypeId.forNumber(typeId_);
         return result == null ? org.tensorflow.proto.FullTypeId.UNRECOGNIZED : result;
       }
     
       public static final int ARGS_FIELD_NUMBER = 2;
    +  @SuppressWarnings("serial")
       private java.util.List args_;
       /**
        * repeated .tensorflow.FullTypeDef args = 2;
    @@ -266,7 +266,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           output.writeMessage(2, args_.get(i));
         }
         if (attrCase_ == 3) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, attr_);
    +      com.google.protobuf.GeneratedMessage.writeString(output, 3, attr_);
         }
         if (attrCase_ == 4) {
           output.writeInt64(
    @@ -290,7 +290,7 @@ public int getSerializedSize() {
             .computeMessageSize(2, args_.get(i));
         }
         if (attrCase_ == 3) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, attr_);
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(3, attr_);
         }
         if (attrCase_ == 4) {
           size += com.google.protobuf.CodedOutputStream
    @@ -397,39 +397,41 @@ public static org.tensorflow.proto.FullTypeDef parseFrom(
       }
       public static org.tensorflow.proto.FullTypeDef parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.FullTypeDef parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.FullTypeDef parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.FullTypeDef parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.FullTypeDef parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.FullTypeDef parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -449,7 +451,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -464,7 +466,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.FullTypeDef}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.FullTypeDef)
           org.tensorflow.proto.FullTypeDefOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -473,7 +475,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.FullTypeProtos.internal_static_tensorflow_FullTypeDef_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -486,22 +488,22 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           typeId_ = 0;
    -
           if (argsBuilder_ == null) {
             args_ = java.util.Collections.emptyList();
           } else {
             args_ = null;
             argsBuilder_.clear();
           }
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      bitField0_ = (bitField0_ & ~0x00000002);
           attrCase_ = 0;
           attr_ = null;
           return this;
    @@ -530,60 +532,37 @@ public org.tensorflow.proto.FullTypeDef build() {
         @java.lang.Override
         public org.tensorflow.proto.FullTypeDef buildPartial() {
           org.tensorflow.proto.FullTypeDef result = new org.tensorflow.proto.FullTypeDef(this);
    -      int from_bitField0_ = bitField0_;
    -      result.typeId_ = typeId_;
    +      buildPartialRepeatedFields(result);
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      buildPartialOneofs(result);
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartialRepeatedFields(org.tensorflow.proto.FullTypeDef result) {
           if (argsBuilder_ == null) {
    -        if (((bitField0_ & 0x00000001) != 0)) {
    +        if (((bitField0_ & 0x00000002) != 0)) {
               args_ = java.util.Collections.unmodifiableList(args_);
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ = (bitField0_ & ~0x00000002);
             }
             result.args_ = args_;
           } else {
             result.args_ = argsBuilder_.build();
           }
    -      if (attrCase_ == 3) {
    -        result.attr_ = attr_;
    -      }
    -      if (attrCase_ == 4) {
    -        result.attr_ = attr_;
    -      }
    -      result.attrCase_ = attrCase_;
    -      onBuilt();
    -      return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    +    private void buildPartial0(org.tensorflow.proto.FullTypeDef result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.typeId_ = typeId_;
    +      }
         }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +
    +    private void buildPartialOneofs(org.tensorflow.proto.FullTypeDef result) {
    +      result.attrCase_ = attrCase_;
    +      result.attr_ = this.attr_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.FullTypeDef) {
    @@ -603,7 +582,7 @@ public Builder mergeFrom(org.tensorflow.proto.FullTypeDef other) {
             if (!other.args_.isEmpty()) {
               if (args_.isEmpty()) {
                 args_ = other.args_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000002);
               } else {
                 ensureArgsIsMutable();
                 args_.addAll(other.args_);
    @@ -616,9 +595,9 @@ public Builder mergeFrom(org.tensorflow.proto.FullTypeDef other) {
                 argsBuilder_.dispose();
                 argsBuilder_ = null;
                 args_ = other.args_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000002);
                 argsBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getArgsFieldBuilder() : null;
               } else {
                 argsBuilder_.addAllMessages(other.args_);
    @@ -668,7 +647,7 @@ public Builder mergeFrom(
                   break;
                 case 8: {
                   typeId_ = input.readEnum();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 8
                 case 18: {
    @@ -753,8 +732,8 @@ public Builder clearAttr() {
          * @return This builder for chaining.
          */
         public Builder setTypeIdValue(int value) {
    -      
           typeId_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -770,8 +749,7 @@ public Builder setTypeIdValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.FullTypeId getTypeId() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.FullTypeId result = org.tensorflow.proto.FullTypeId.valueOf(typeId_);
    +      org.tensorflow.proto.FullTypeId result = org.tensorflow.proto.FullTypeId.forNumber(typeId_);
           return result == null ? org.tensorflow.proto.FullTypeId.UNRECOGNIZED : result;
         }
         /**
    @@ -789,7 +767,7 @@ public Builder setTypeId(org.tensorflow.proto.FullTypeId value) {
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00000001;
           typeId_ = value.getNumber();
           onChanged();
           return this;
    @@ -805,7 +783,7 @@ public Builder setTypeId(org.tensorflow.proto.FullTypeId value) {
          * @return This builder for chaining.
          */
         public Builder clearTypeId() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000001);
           typeId_ = 0;
           onChanged();
           return this;
    @@ -814,13 +792,13 @@ public Builder clearTypeId() {
         private java.util.List args_ =
           java.util.Collections.emptyList();
         private void ensureArgsIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    +      if (!((bitField0_ & 0x00000002) != 0)) {
             args_ = new java.util.ArrayList(args_);
    -        bitField0_ |= 0x00000001;
    +        bitField0_ |= 0x00000002;
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.FullTypeDef, org.tensorflow.proto.FullTypeDef.Builder, org.tensorflow.proto.FullTypeDefOrBuilder> argsBuilder_;
     
         /**
    @@ -966,7 +944,7 @@ public Builder addAllArgs(
         public Builder clearArgs() {
           if (argsBuilder_ == null) {
             args_ = java.util.Collections.emptyList();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        bitField0_ = (bitField0_ & ~0x00000002);
             onChanged();
           } else {
             argsBuilder_.clear();
    @@ -1036,14 +1014,14 @@ public org.tensorflow.proto.FullTypeDef.Builder addArgsBuilder(
              getArgsBuilderList() {
           return getArgsFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.FullTypeDef, org.tensorflow.proto.FullTypeDef.Builder, org.tensorflow.proto.FullTypeDefOrBuilder> 
             getArgsFieldBuilder() {
           if (argsBuilder_ == null) {
    -        argsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        argsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.FullTypeDef, org.tensorflow.proto.FullTypeDef.Builder, org.tensorflow.proto.FullTypeDefOrBuilder>(
                     args_,
    -                ((bitField0_ & 0x00000001) != 0),
    +                ((bitField0_ & 0x00000002) != 0),
                     getParentForChildren(),
                     isClean());
             args_ = null;
    @@ -1111,10 +1089,8 @@ public java.lang.String getS() {
          */
         public Builder setS(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  attrCase_ = 3;
    +      if (value == null) { throw new NullPointerException(); }
    +      attrCase_ = 3;
           attr_ = value;
           onChanged();
           return this;
    @@ -1138,10 +1114,8 @@ public Builder clearS() {
          */
         public Builder setSBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           attrCase_ = 3;
           attr_ = value;
           onChanged();
    @@ -1183,6 +1157,7 @@ public long getI() {
          * @return This builder for chaining.
          */
         public Builder setI(long value) {
    +
           attrCase_ = 4;
           attr_ = value;
           onChanged();
    @@ -1204,18 +1179,6 @@ public Builder clearI() {
           }
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.FullTypeDef)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FullTypeDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FullTypeDefOrBuilder.java
    index 6fc125e608c..7c071d4dcde 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FullTypeDefOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FullTypeDefOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/full_type.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -90,5 +92,5 @@ org.tensorflow.proto.FullTypeDefOrBuilder getArgsOrBuilder(
        */
       long getI();
     
    -  public org.tensorflow.proto.FullTypeDef.AttrCase getAttrCase();
    +  org.tensorflow.proto.FullTypeDef.AttrCase getAttrCase();
     }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FullTypeId.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FullTypeId.java
    index 42db6640978..5f532bfd4e5 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FullTypeId.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FullTypeId.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/full_type.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -25,13 +27,14 @@ public enum FullTypeId
        * 
        * Type variables may serve as placeholder for any other type ID in type
        * templates.
    +   *
        * Examples:
    -   *   TFT_DATASET[TFT_VAR["T"]] is a Dataset returning a type indicated by "T".
    -   *   TFT_TENSOR[TFT_VAR["T"]] is a Tensor of n element type indicated by "T".
    -   *   TFT_TENSOR[TFT_VAR["T"]], TFT_TENSOR[TFT_VAR["T"]] are two tensors of
    -   *     identical element types.
    -   *   TFT_TENSOR[TFT_VAR["P"]], TFT_TENSOR[TFT_VAR["Q"]] are two tensors of
    -   *     independent element types.
    +   * TFT_DATASET[TFT_VAR["T"]] is a Dataset returning a type indicated by "T".
    +   * TFT_TENSOR[TFT_VAR["T"]] is a Tensor of n element type indicated by "T".
    +   * TFT_TENSOR[TFT_VAR["T"]], TFT_TENSOR[TFT_VAR["T"]] are two tensors of
    +   * identical element types.
    +   * TFT_TENSOR[TFT_VAR["P"]], TFT_TENSOR[TFT_VAR["Q"]] are two tensors of
    +   * independent element types.
        * 
    * * TFT_VAR = 1; @@ -53,9 +56,10 @@ public enum FullTypeId * The algebraic product type. This is an algebraic type that may be used just * for logical grouping. Not to confused with TFT_TUPLE which describes a * concrete object of several elements. + * * Example: - * TFT_DATASET[TFT_PRODUCT[TFT_TENSOR[TFT_INT32], TFT_TENSOR[TFT_FLOAT64]]] - * is a Dataset producing two tensors, an integer one and a float one. + * TFT_DATASET[TFT_PRODUCT[TFT_TENSOR[TFT_INT32], TFT_TENSOR[TFT_FLOAT64]]] + * is a Dataset producing two tensors, an integer one and a float one. *
    * * TFT_PRODUCT = 3; @@ -64,18 +68,20 @@ public enum FullTypeId /** *
        * Represents a named field, with the name stored in the attribute.
    +   *
        * Parametrization:
    -   *   TFT_NAMED[<type>]{<name>}
    -   *   * <type> is the type of the field
    -   *   * <name> is the field name, as string (thpugh can theoretically be an int
    -   *     as well)
    +   * TFT_NAMED[<type>]{<name>}
    +   * * <type> is the type of the field
    +   * * <name> is the field name, as string (thpugh can theoretically be an int
    +   * as well)
    +   *
        * Example:
    -   *   TFT_RECORD[
    -   *     TFT_NAMED[TFT_TENSOR[TFT_INT32]]{'foo'},
    -   *     TFT_NAMED[TFT_TENSOR[TFT_FLOAT32]]{'bar'},
    -   *   ]
    -   *     is a structure with two fields, an int tensor "foo" and a float tensor
    -   *     "bar".
    +   * TFT_RECORD[
    +   * TFT_NAMED[TFT_TENSOR[TFT_INT32]]{'foo'},
    +   * TFT_NAMED[TFT_TENSOR[TFT_FLOAT32]]{'bar'},
    +   * ]
    +   * is a structure with two fields, an int tensor "foo" and a float tensor
    +   * "bar".
        * 
    * * TFT_NAMED = 4; @@ -85,22 +91,24 @@ public enum FullTypeId *
        * Template definition. Expands the variables by repeating a template as
        * arguments of container.
    +   *
        * Parametrization:
    -   *   TFT_FOR_EACH[<container_type>, <template>, <expansions>]
    -   *   * <container_type> is the type of the container that the template will be
    -   *     expanded into
    -   *   * <template> is any type definition that potentially contains type
    -   *     variables
    -   *   * <expansions> is a TFT_VAR and may include more types in the future
    +   * TFT_FOR_EACH[<container_type>, <template>, <expansions>]
    +   * * <container_type> is the type of the container that the template will be
    +   * expanded into
    +   * * <template> is any type definition that potentially contains type
    +   * variables
    +   * * <expansions> is a TFT_VAR and may include more types in the future
    +   *
        * Example:
    -   *   TFT_FOR_EACH[
    -   *         TFT_PRODUCT,
    -   *         TFT_TENSOR[TFT_VAR["t"]],
    -   *         TFT_VAR["t"]
    -   *     ]
    -   *     will substitute a T = TFT_INT32 to TFT_PRODUCT[TFT_TENSOR[TFT_INT32]]
    -   *     and a T = (TFT_INT32, TFT_INT64) to
    -   *     TFT_PRODUCT[TFT_TENSOR[TFT_INT32], TFT_TENSOR[TFT_INT64]].
    +   * TFT_FOR_EACH[
    +   * TFT_PRODUCT,
    +   * TFT_TENSOR[TFT_VAR["t"]],
    +   * TFT_VAR["t"]
    +   * ]
    +   * will substitute a T = TFT_INT32 to TFT_PRODUCT[TFT_TENSOR[TFT_INT32]]
    +   * and a T = (TFT_INT32, TFT_INT64) to
    +   * TFT_PRODUCT[TFT_TENSOR[TFT_INT32], TFT_TENSOR[TFT_INT64]].
        * 
    * * TFT_FOR_EACH = 20; @@ -109,21 +117,23 @@ public enum FullTypeId /** *
        * Callable types describe functions and ops.
    +   *
        * Parametrization:
    -   *   TFT_CALLABLE[<arg type>, <return type>]
    -   *   * <arg type> is the type of the arguments; TFT_PRODUCT represents
    -   *   multiple
    -   *     arguments.
    -   *   * <return type> is the return type; TFT_PRODUCT represents multiple
    -   *     return values (that means that callables returning multiple things
    -   *     don't necessarily return a single tuple).
    +   * TFT_CALLABLE[<arg type>, <return type>]
    +   * * <arg type> is the type of the arguments; TFT_PRODUCT represents
    +   * multiple
    +   * arguments.
    +   * * <return type> is the return type; TFT_PRODUCT represents multiple
    +   * return values (that means that callables returning multiple things
    +   * don't necessarily return a single tuple).
    +   *
        * Example:
    -   *   TFT_CALLABLE[
    -   *     TFT_ANY,
    -   *     TFT_PRODUCT[TFT_TENSOR[TFT_INT32], TFT_TENSOR[TFT_FLOAT64]],
    -   *   ]
    -   *     is a callable with unspecified (for now) input arguments, and
    -   *     two return values of type tensor.
    +   * TFT_CALLABLE[
    +   * TFT_ANY,
    +   * TFT_PRODUCT[TFT_TENSOR[TFT_INT32], TFT_TENSOR[TFT_FLOAT64]],
    +   * ]
    +   * is a callable with unspecified (for now) input arguments, and
    +   * two return values of type tensor.
        * 
    * * TFT_CALLABLE = 100; @@ -132,15 +142,19 @@ public enum FullTypeId /** *
        * The usual Tensor. This is a parametric type.
    +   *
        * Parametrization:
    -   *   TFT_TENSOR[<element type>, <shape type>]
    -   *   * <element type> is currently limited to one of the element types
    -   *     defined below.
    -   *   * <shape type> is not yet defined, and may only be TFT_UNKNOWN for now.
    +   * TFT_TENSOR[<element type>, <shape type>]
    +   * * <element type> is currently limited to one of the element types
    +   * defined below.
    +   * * <shape type> is not yet defined, and may only be TFT_UNKNOWN for now.
    +   *
        * A TFT_SHAPE type will be defined in the future.
    +   *
        * Example:
    -   *   TFT_TENSOR[TFT_INT32, TFT_UNKNOWN]
    -   *     is a Tensor of int32 element type and unknown shape.
    +   * TFT_TENSOR[TFT_INT32, TFT_UNKNOWN]
    +   * is a Tensor of int32 element type and unknown shape.
    +   *
        * TODO(mdan): Define TFT_SHAPE and add more examples.
        * 
    * @@ -157,17 +171,19 @@ public enum FullTypeId * support efficient mutation semantics (i.e. element update) in the * user-facing API. * The element type may be generic or even TFT_ANY for a heterogenous list. + * * Parametrization: - * TFT_ARRAY[<element type>] - * * <element type> may be any concrete type. + * TFT_ARRAY[<element type>] + * * <element type> may be any concrete type. + * * Examples: - * TFT_ARRAY[TFT_TENSOR[TFT_INT32]] is a TensorArray holding int32 Tensors - * of any shape. - * TFT_ARRAY[TFT_TENSOR[TFT_UNKNOWN]] is a TensorArray holding Tensors of - * mixed element types. - * TFT_ARRAY[TFT_UNKNOWN] is a TensorArray holding any element type. - * TFT_ARRAY[] is equivalent to TFT_ARRAY[TFT_UNKNOWN]. - * TFT_ARRAY[TFT_ARRAY[]] is an array or arrays (of unknown types). + * TFT_ARRAY[TFT_TENSOR[TFT_INT32]] is a TensorArray holding int32 Tensors + * of any shape. + * TFT_ARRAY[TFT_TENSOR[TFT_UNKNOWN]] is a TensorArray holding Tensors of + * mixed element types. + * TFT_ARRAY[TFT_UNKNOWN] is a TensorArray holding any element type. + * TFT_ARRAY[] is equivalent to TFT_ARRAY[TFT_UNKNOWN]. + * TFT_ARRAY[TFT_ARRAY[]] is an array or arrays (of unknown types). *
    * * TFT_ARRAY = 1001; @@ -178,12 +194,14 @@ public enum FullTypeId * Optional (or tensorflow::OptionalVariant in the variant type registry). * This type represents a value that may either hold an element of a single * specified type, or nothing at all. + * * Parametrization: - * TFT_OPTIONAL[<element type>] - * * <element type> may be any concrete type. + * TFT_OPTIONAL[<element type>] + * * <element type> may be any concrete type. + * * Examples: - * TFT_OPTIONAL[TFT_TENSOR[TFT_INT32]] is an Optional holding an int32 - * Tensor of any shape. + * TFT_OPTIONAL[TFT_TENSOR[TFT_INT32]] is an Optional holding an int32 + * Tensor of any shape. *
    * * TFT_OPTIONAL = 1002; @@ -193,12 +211,14 @@ public enum FullTypeId *
        * Literal types describe compile-time constant values.
        * Literal types may also participate in dependent types.
    +   *
        * Parametrization:
    -   *   TFT_LITERAL[<value type>]{<value>}
    -   *   * <value type> may be any concrete type compatible that can hold <value>
    -   *   * <value> is the type's attribute, and holds the actual literal value
    +   * TFT_LITERAL[<value type>]{<value>}
    +   * * <value type> may be any concrete type compatible that can hold <value>
    +   * * <value> is the type's attribute, and holds the actual literal value
    +   *
        * Examples:
    -   *   TFT_LITERAL[TFT_INT32]{1} is the compile-time constant 1.
    +   * TFT_LITERAL[TFT_INT32]{1} is the compile-time constant 1.
        * 
    * * TFT_LITERAL = 1003; @@ -208,12 +228,14 @@ public enum FullTypeId *
        * Encoding types describe a value of a certain type, encoded as a different
        * type.
    +   *
        * Parametrization:
    -   *   TFT_ENCODED[<encoded type>, <encoding type>]
    -   *   * <encoded type> may be any type
    -   *   * <encoding type> may be any type
    +   * TFT_ENCODED[<encoded type>, <encoding type>]
    +   * * <encoded type> may be any type
    +   * * <encoding type> may be any type
    +   *
        * Examples:
    -   *   TFT_ENCODING[TFT_INT32, TFT_STRING] is an integer encoded as string.
    +   * TFT_ENCODING[TFT_INT32, TFT_STRING] is an integer encoded as string.
        * 
    * * TFT_ENCODED = 1004; @@ -226,9 +248,10 @@ public enum FullTypeId * Shape tensors have special, host-only placement, in contrast to * TFT_TENSOR[TFT_INT32] which is the type of a normal numeric tensor * with no special placement. + * * Examples: - * TFT_SHAPE_TENSOR[TFT_INT32] is the most common - * TFT_SHAPE_TENSOR[TFT_INT64] is also allowed + * TFT_SHAPE_TENSOR[TFT_INT32] is the most common + * TFT_SHAPE_TENSOR[TFT_INT64] is also allowed *
    * * TFT_SHAPE_TENSOR = 1005; @@ -329,14 +352,17 @@ public enum FullTypeId * mutation, and can potentially produce an infinite number of elements. * A datasets can produce logical structures (e.g. multiple elements). This * is expressed using TFT_PRODUCT. + * + * * Parametrization: TFT_DATASET[<element type>]. - * * <element type> may be a concrete type or a type symbol. It represents - * the data type of the elements produced by the dataset. + * * <element type> may be a concrete type or a type symbol. It represents + * the data type of the elements produced by the dataset. + * * Examples: - * TFT_DATSET[TFT_TENSOR[TFT_INT32]] is a Dataset producing single int32 - * Tensors of unknown shape. - * TFT_DATSET[TFT_PRODUCT[TFT_TENSOR[TFT_INT32], TFT_TENSOR[TFT_FLOAT32]] is - * a Dataset producing pairs of Tensors, one integer and one float. + * TFT_DATSET[TFT_TENSOR[TFT_INT32]] is a Dataset producing single int32 + * Tensors of unknown shape. + * TFT_DATSET[TFT_PRODUCT[TFT_TENSOR[TFT_INT32], TFT_TENSOR[TFT_FLOAT32]] is + * a Dataset producing pairs of Tensors, one integer and one float. * Note: The high ID number is to prepare for the eventuality that Datasets * will be supported by user types in the future. *
    @@ -347,6 +373,7 @@ public enum FullTypeId /** *
        * A ragged tensor created by tf.ragged ops and APIs.
    +   *
        * Parametrization: TFT_RAGGED[<element_type>].
        * 
    * @@ -357,9 +384,11 @@ public enum FullTypeId *
        * Iterators created by tf.data ops and APIs. Very similar to Datasets, except
        * they are mutable.
    +   *
    +   *
        * Parametrization: TFT_ITERATOR[<element type>].
    -   *   * <element type> may be a concrete type or a type symbol. It represents
    -   *     the data type of the elements produced by the dataset.
    +   * * <element type> may be a concrete type or a type symbol. It represents
    +   * the data type of the elements produced by the dataset.
        * 
    * * TFT_ITERATOR = 10104; @@ -374,6 +403,7 @@ public enum FullTypeId * available". * Mutex locks are the dynamic counterpart of control dependencies. * TODO(mdan): Properly document this thing. + * * Parametrization: TFT_MUTEX_LOCK[]. *
    * @@ -394,6 +424,15 @@ public enum FullTypeId UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + FullTypeId.class.getName()); + } /** *
        * The default represents an uninitialized values.
    @@ -406,13 +445,14 @@ public enum FullTypeId
        * 
        * Type variables may serve as placeholder for any other type ID in type
        * templates.
    +   *
        * Examples:
    -   *   TFT_DATASET[TFT_VAR["T"]] is a Dataset returning a type indicated by "T".
    -   *   TFT_TENSOR[TFT_VAR["T"]] is a Tensor of n element type indicated by "T".
    -   *   TFT_TENSOR[TFT_VAR["T"]], TFT_TENSOR[TFT_VAR["T"]] are two tensors of
    -   *     identical element types.
    -   *   TFT_TENSOR[TFT_VAR["P"]], TFT_TENSOR[TFT_VAR["Q"]] are two tensors of
    -   *     independent element types.
    +   * TFT_DATASET[TFT_VAR["T"]] is a Dataset returning a type indicated by "T".
    +   * TFT_TENSOR[TFT_VAR["T"]] is a Tensor of n element type indicated by "T".
    +   * TFT_TENSOR[TFT_VAR["T"]], TFT_TENSOR[TFT_VAR["T"]] are two tensors of
    +   * identical element types.
    +   * TFT_TENSOR[TFT_VAR["P"]], TFT_TENSOR[TFT_VAR["Q"]] are two tensors of
    +   * independent element types.
        * 
    * * TFT_VAR = 1; @@ -434,9 +474,10 @@ public enum FullTypeId * The algebraic product type. This is an algebraic type that may be used just * for logical grouping. Not to confused with TFT_TUPLE which describes a * concrete object of several elements. + * * Example: - * TFT_DATASET[TFT_PRODUCT[TFT_TENSOR[TFT_INT32], TFT_TENSOR[TFT_FLOAT64]]] - * is a Dataset producing two tensors, an integer one and a float one. + * TFT_DATASET[TFT_PRODUCT[TFT_TENSOR[TFT_INT32], TFT_TENSOR[TFT_FLOAT64]]] + * is a Dataset producing two tensors, an integer one and a float one. *
    * * TFT_PRODUCT = 3; @@ -445,18 +486,20 @@ public enum FullTypeId /** *
        * Represents a named field, with the name stored in the attribute.
    +   *
        * Parametrization:
    -   *   TFT_NAMED[<type>]{<name>}
    -   *   * <type> is the type of the field
    -   *   * <name> is the field name, as string (thpugh can theoretically be an int
    -   *     as well)
    +   * TFT_NAMED[<type>]{<name>}
    +   * * <type> is the type of the field
    +   * * <name> is the field name, as string (thpugh can theoretically be an int
    +   * as well)
    +   *
        * Example:
    -   *   TFT_RECORD[
    -   *     TFT_NAMED[TFT_TENSOR[TFT_INT32]]{'foo'},
    -   *     TFT_NAMED[TFT_TENSOR[TFT_FLOAT32]]{'bar'},
    -   *   ]
    -   *     is a structure with two fields, an int tensor "foo" and a float tensor
    -   *     "bar".
    +   * TFT_RECORD[
    +   * TFT_NAMED[TFT_TENSOR[TFT_INT32]]{'foo'},
    +   * TFT_NAMED[TFT_TENSOR[TFT_FLOAT32]]{'bar'},
    +   * ]
    +   * is a structure with two fields, an int tensor "foo" and a float tensor
    +   * "bar".
        * 
    * * TFT_NAMED = 4; @@ -466,22 +509,24 @@ public enum FullTypeId *
        * Template definition. Expands the variables by repeating a template as
        * arguments of container.
    +   *
        * Parametrization:
    -   *   TFT_FOR_EACH[<container_type>, <template>, <expansions>]
    -   *   * <container_type> is the type of the container that the template will be
    -   *     expanded into
    -   *   * <template> is any type definition that potentially contains type
    -   *     variables
    -   *   * <expansions> is a TFT_VAR and may include more types in the future
    +   * TFT_FOR_EACH[<container_type>, <template>, <expansions>]
    +   * * <container_type> is the type of the container that the template will be
    +   * expanded into
    +   * * <template> is any type definition that potentially contains type
    +   * variables
    +   * * <expansions> is a TFT_VAR and may include more types in the future
    +   *
        * Example:
    -   *   TFT_FOR_EACH[
    -   *         TFT_PRODUCT,
    -   *         TFT_TENSOR[TFT_VAR["t"]],
    -   *         TFT_VAR["t"]
    -   *     ]
    -   *     will substitute a T = TFT_INT32 to TFT_PRODUCT[TFT_TENSOR[TFT_INT32]]
    -   *     and a T = (TFT_INT32, TFT_INT64) to
    -   *     TFT_PRODUCT[TFT_TENSOR[TFT_INT32], TFT_TENSOR[TFT_INT64]].
    +   * TFT_FOR_EACH[
    +   * TFT_PRODUCT,
    +   * TFT_TENSOR[TFT_VAR["t"]],
    +   * TFT_VAR["t"]
    +   * ]
    +   * will substitute a T = TFT_INT32 to TFT_PRODUCT[TFT_TENSOR[TFT_INT32]]
    +   * and a T = (TFT_INT32, TFT_INT64) to
    +   * TFT_PRODUCT[TFT_TENSOR[TFT_INT32], TFT_TENSOR[TFT_INT64]].
        * 
    * * TFT_FOR_EACH = 20; @@ -490,21 +535,23 @@ public enum FullTypeId /** *
        * Callable types describe functions and ops.
    +   *
        * Parametrization:
    -   *   TFT_CALLABLE[<arg type>, <return type>]
    -   *   * <arg type> is the type of the arguments; TFT_PRODUCT represents
    -   *   multiple
    -   *     arguments.
    -   *   * <return type> is the return type; TFT_PRODUCT represents multiple
    -   *     return values (that means that callables returning multiple things
    -   *     don't necessarily return a single tuple).
    +   * TFT_CALLABLE[<arg type>, <return type>]
    +   * * <arg type> is the type of the arguments; TFT_PRODUCT represents
    +   * multiple
    +   * arguments.
    +   * * <return type> is the return type; TFT_PRODUCT represents multiple
    +   * return values (that means that callables returning multiple things
    +   * don't necessarily return a single tuple).
    +   *
        * Example:
    -   *   TFT_CALLABLE[
    -   *     TFT_ANY,
    -   *     TFT_PRODUCT[TFT_TENSOR[TFT_INT32], TFT_TENSOR[TFT_FLOAT64]],
    -   *   ]
    -   *     is a callable with unspecified (for now) input arguments, and
    -   *     two return values of type tensor.
    +   * TFT_CALLABLE[
    +   * TFT_ANY,
    +   * TFT_PRODUCT[TFT_TENSOR[TFT_INT32], TFT_TENSOR[TFT_FLOAT64]],
    +   * ]
    +   * is a callable with unspecified (for now) input arguments, and
    +   * two return values of type tensor.
        * 
    * * TFT_CALLABLE = 100; @@ -513,15 +560,19 @@ public enum FullTypeId /** *
        * The usual Tensor. This is a parametric type.
    +   *
        * Parametrization:
    -   *   TFT_TENSOR[<element type>, <shape type>]
    -   *   * <element type> is currently limited to one of the element types
    -   *     defined below.
    -   *   * <shape type> is not yet defined, and may only be TFT_UNKNOWN for now.
    +   * TFT_TENSOR[<element type>, <shape type>]
    +   * * <element type> is currently limited to one of the element types
    +   * defined below.
    +   * * <shape type> is not yet defined, and may only be TFT_UNKNOWN for now.
    +   *
        * A TFT_SHAPE type will be defined in the future.
    +   *
        * Example:
    -   *   TFT_TENSOR[TFT_INT32, TFT_UNKNOWN]
    -   *     is a Tensor of int32 element type and unknown shape.
    +   * TFT_TENSOR[TFT_INT32, TFT_UNKNOWN]
    +   * is a Tensor of int32 element type and unknown shape.
    +   *
        * TODO(mdan): Define TFT_SHAPE and add more examples.
        * 
    * @@ -538,17 +589,19 @@ public enum FullTypeId * support efficient mutation semantics (i.e. element update) in the * user-facing API. * The element type may be generic or even TFT_ANY for a heterogenous list. + * * Parametrization: - * TFT_ARRAY[<element type>] - * * <element type> may be any concrete type. + * TFT_ARRAY[<element type>] + * * <element type> may be any concrete type. + * * Examples: - * TFT_ARRAY[TFT_TENSOR[TFT_INT32]] is a TensorArray holding int32 Tensors - * of any shape. - * TFT_ARRAY[TFT_TENSOR[TFT_UNKNOWN]] is a TensorArray holding Tensors of - * mixed element types. - * TFT_ARRAY[TFT_UNKNOWN] is a TensorArray holding any element type. - * TFT_ARRAY[] is equivalent to TFT_ARRAY[TFT_UNKNOWN]. - * TFT_ARRAY[TFT_ARRAY[]] is an array or arrays (of unknown types). + * TFT_ARRAY[TFT_TENSOR[TFT_INT32]] is a TensorArray holding int32 Tensors + * of any shape. + * TFT_ARRAY[TFT_TENSOR[TFT_UNKNOWN]] is a TensorArray holding Tensors of + * mixed element types. + * TFT_ARRAY[TFT_UNKNOWN] is a TensorArray holding any element type. + * TFT_ARRAY[] is equivalent to TFT_ARRAY[TFT_UNKNOWN]. + * TFT_ARRAY[TFT_ARRAY[]] is an array or arrays (of unknown types). *
    * * TFT_ARRAY = 1001; @@ -559,12 +612,14 @@ public enum FullTypeId * Optional (or tensorflow::OptionalVariant in the variant type registry). * This type represents a value that may either hold an element of a single * specified type, or nothing at all. + * * Parametrization: - * TFT_OPTIONAL[<element type>] - * * <element type> may be any concrete type. + * TFT_OPTIONAL[<element type>] + * * <element type> may be any concrete type. + * * Examples: - * TFT_OPTIONAL[TFT_TENSOR[TFT_INT32]] is an Optional holding an int32 - * Tensor of any shape. + * TFT_OPTIONAL[TFT_TENSOR[TFT_INT32]] is an Optional holding an int32 + * Tensor of any shape. *
    * * TFT_OPTIONAL = 1002; @@ -574,12 +629,14 @@ public enum FullTypeId *
        * Literal types describe compile-time constant values.
        * Literal types may also participate in dependent types.
    +   *
        * Parametrization:
    -   *   TFT_LITERAL[<value type>]{<value>}
    -   *   * <value type> may be any concrete type compatible that can hold <value>
    -   *   * <value> is the type's attribute, and holds the actual literal value
    +   * TFT_LITERAL[<value type>]{<value>}
    +   * * <value type> may be any concrete type compatible that can hold <value>
    +   * * <value> is the type's attribute, and holds the actual literal value
    +   *
        * Examples:
    -   *   TFT_LITERAL[TFT_INT32]{1} is the compile-time constant 1.
    +   * TFT_LITERAL[TFT_INT32]{1} is the compile-time constant 1.
        * 
    * * TFT_LITERAL = 1003; @@ -589,12 +646,14 @@ public enum FullTypeId *
        * Encoding types describe a value of a certain type, encoded as a different
        * type.
    +   *
        * Parametrization:
    -   *   TFT_ENCODED[<encoded type>, <encoding type>]
    -   *   * <encoded type> may be any type
    -   *   * <encoding type> may be any type
    +   * TFT_ENCODED[<encoded type>, <encoding type>]
    +   * * <encoded type> may be any type
    +   * * <encoding type> may be any type
    +   *
        * Examples:
    -   *   TFT_ENCODING[TFT_INT32, TFT_STRING] is an integer encoded as string.
    +   * TFT_ENCODING[TFT_INT32, TFT_STRING] is an integer encoded as string.
        * 
    * * TFT_ENCODED = 1004; @@ -607,9 +666,10 @@ public enum FullTypeId * Shape tensors have special, host-only placement, in contrast to * TFT_TENSOR[TFT_INT32] which is the type of a normal numeric tensor * with no special placement. + * * Examples: - * TFT_SHAPE_TENSOR[TFT_INT32] is the most common - * TFT_SHAPE_TENSOR[TFT_INT64] is also allowed + * TFT_SHAPE_TENSOR[TFT_INT32] is the most common + * TFT_SHAPE_TENSOR[TFT_INT64] is also allowed *
    * * TFT_SHAPE_TENSOR = 1005; @@ -710,14 +770,17 @@ public enum FullTypeId * mutation, and can potentially produce an infinite number of elements. * A datasets can produce logical structures (e.g. multiple elements). This * is expressed using TFT_PRODUCT. + * + * * Parametrization: TFT_DATASET[<element type>]. - * * <element type> may be a concrete type or a type symbol. It represents - * the data type of the elements produced by the dataset. + * * <element type> may be a concrete type or a type symbol. It represents + * the data type of the elements produced by the dataset. + * * Examples: - * TFT_DATSET[TFT_TENSOR[TFT_INT32]] is a Dataset producing single int32 - * Tensors of unknown shape. - * TFT_DATSET[TFT_PRODUCT[TFT_TENSOR[TFT_INT32], TFT_TENSOR[TFT_FLOAT32]] is - * a Dataset producing pairs of Tensors, one integer and one float. + * TFT_DATSET[TFT_TENSOR[TFT_INT32]] is a Dataset producing single int32 + * Tensors of unknown shape. + * TFT_DATSET[TFT_PRODUCT[TFT_TENSOR[TFT_INT32], TFT_TENSOR[TFT_FLOAT32]] is + * a Dataset producing pairs of Tensors, one integer and one float. * Note: The high ID number is to prepare for the eventuality that Datasets * will be supported by user types in the future. *
    @@ -728,6 +791,7 @@ public enum FullTypeId /** *
        * A ragged tensor created by tf.ragged ops and APIs.
    +   *
        * Parametrization: TFT_RAGGED[<element_type>].
        * 
    * @@ -738,9 +802,11 @@ public enum FullTypeId *
        * Iterators created by tf.data ops and APIs. Very similar to Datasets, except
        * they are mutable.
    +   *
    +   *
        * Parametrization: TFT_ITERATOR[<element type>].
    -   *   * <element type> may be a concrete type or a type symbol. It represents
    -   *     the data type of the elements produced by the dataset.
    +   * * <element type> may be a concrete type or a type symbol. It represents
    +   * the data type of the elements produced by the dataset.
        * 
    * * TFT_ITERATOR = 10104; @@ -755,6 +821,7 @@ public enum FullTypeId * available". * Mutex locks are the dynamic counterpart of control dependencies. * TODO(mdan): Properly document this thing. + * * Parametrization: TFT_MUTEX_LOCK[]. *
    * diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FullTypeProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FullTypeProtos.java index ef59c5b9751..83bd2f467bd 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FullTypeProtos.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FullTypeProtos.java @@ -1,10 +1,21 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/framework/full_type.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; public final class FullTypeProtos { private FullTypeProtos() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + FullTypeProtos.class.getName()); + } public static void registerAllExtensions( com.google.protobuf.ExtensionRegistryLite registry) { } @@ -17,7 +28,7 @@ public static void registerAllExtensions( static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_FullTypeDef_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_FullTypeDef_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor @@ -60,9 +71,10 @@ public static void registerAllExtensions( internal_static_tensorflow_FullTypeDef_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_tensorflow_FullTypeDef_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_FullTypeDef_descriptor, new java.lang.String[] { "TypeId", "Args", "S", "I", "Attr", }); + descriptor.resolveAllFeaturesImmutable(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionDef.java index c6eb5cf8fef..aa45a3eb8d2 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionDef.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionDef.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/framework/function.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -8,37 +10,35 @@ * A function can be instantiated when the runtime can bind every attr * with a value. When a GraphDef has a call to a function, it must * have binding for every attr defined in the signature. + * * TODO(zhifengc): - * * device spec, etc. + * * device spec, etc. *
    * * Protobuf type {@code tensorflow.FunctionDef} */ public final class FunctionDef extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.FunctionDef) FunctionDefOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + FunctionDef.class.getName()); + } // Use FunctionDef.newBuilder() to construct. - private FunctionDef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private FunctionDef(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private FunctionDef() { nodeDef_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new FunctionDef(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.FunctionProtos.internal_static_tensorflow_FunctionDef_descriptor; @@ -46,7 +46,7 @@ protected java.lang.Object newInstance( @SuppressWarnings({"rawtypes"}) @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 5: @@ -65,7 +65,7 @@ protected com.google.protobuf.MapField internalGetMapField( } } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.FunctionProtos.internal_static_tensorflow_FunctionDef_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -99,7 +99,6 @@ boolean containsAttr( /** * map<string, .tensorflow.AttrValue> attr = 1; */ - /* nullable */ org.tensorflow.proto.AttrValue getAttrOrDefault( java.lang.String key, @@ -108,7 +107,6 @@ org.tensorflow.proto.AttrValue getAttrOrDefault( /** * map<string, .tensorflow.AttrValue> attr = 1; */ - org.tensorflow.proto.AttrValue getAttrOrThrow( java.lang.String key); } @@ -121,29 +119,26 @@ org.tensorflow.proto.AttrValue getAttrOrThrow( * Protobuf type {@code tensorflow.FunctionDef.ArgAttrs} */ public static final class ArgAttrs extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.FunctionDef.ArgAttrs) ArgAttrsOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + ArgAttrs.class.getName()); + } // Use ArgAttrs.newBuilder() to construct. - private ArgAttrs(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ArgAttrs(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private ArgAttrs() { } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ArgAttrs(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.FunctionProtos.internal_static_tensorflow_FunctionDef_ArgAttrs_descriptor; @@ -151,7 +146,7 @@ protected java.lang.Object newInstance( @SuppressWarnings({"rawtypes"}) @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 1: @@ -162,7 +157,7 @@ protected com.google.protobuf.MapField internalGetMapField( } } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.FunctionProtos.internal_static_tensorflow_FunctionDef_ArgAttrs_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -181,6 +176,7 @@ private static final class AttrDefaultEntryHolder { com.google.protobuf.WireFormat.FieldType.MESSAGE, org.tensorflow.proto.AttrValue.getDefaultInstance()); } + @SuppressWarnings("serial") private com.google.protobuf.MapField< java.lang.String, org.tensorflow.proto.AttrValue> attr_; private com.google.protobuf.MapField @@ -191,14 +187,12 @@ private static final class AttrDefaultEntryHolder { } return attr_; } - public int getAttrCount() { return internalGetAttr().getMap().size(); } /** * map<string, .tensorflow.AttrValue> attr = 1; */ - @java.lang.Override public boolean containsAttr( java.lang.String key) { @@ -217,7 +211,6 @@ public java.util.Map getAttr() * map<string, .tensorflow.AttrValue> attr = 1; */ @java.lang.Override - public java.util.Map getAttrMap() { return internalGetAttr().getMap(); } @@ -225,10 +218,11 @@ public java.util.Map getAttrMa * map<string, .tensorflow.AttrValue> attr = 1; */ @java.lang.Override - - public org.tensorflow.proto.AttrValue getAttrOrDefault( + public /* nullable */ +org.tensorflow.proto.AttrValue getAttrOrDefault( java.lang.String key, - org.tensorflow.proto.AttrValue defaultValue) { + /* nullable */ +org.tensorflow.proto.AttrValue defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetAttr().getMap(); @@ -238,7 +232,6 @@ public org.tensorflow.proto.AttrValue getAttrOrDefault( * map<string, .tensorflow.AttrValue> attr = 1; */ @java.lang.Override - public org.tensorflow.proto.AttrValue getAttrOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } @@ -264,7 +257,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3 + com.google.protobuf.GeneratedMessage .serializeStringMapTo( output, internalGetAttr(), @@ -360,39 +353,41 @@ public static org.tensorflow.proto.FunctionDef.ArgAttrs parseFrom( } public static org.tensorflow.proto.FunctionDef.ArgAttrs parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.FunctionDef.ArgAttrs parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.FunctionDef.ArgAttrs parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.FunctionDef.ArgAttrs parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.FunctionDef.ArgAttrs parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.FunctionDef.ArgAttrs parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -412,7 +407,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -425,7 +420,7 @@ protected Builder newBuilderForType( * Protobuf type {@code tensorflow.FunctionDef.ArgAttrs} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.FunctionDef.ArgAttrs) org.tensorflow.proto.FunctionDef.ArgAttrsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -434,7 +429,7 @@ public static final class Builder extends } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 1: @@ -445,7 +440,7 @@ protected com.google.protobuf.MapField internalGetMapField( } } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( int number) { switch (number) { case 1: @@ -456,7 +451,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField( } } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.FunctionProtos.internal_static_tensorflow_FunctionDef_ArgAttrs_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -469,13 +464,14 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; internalGetMutableAttr().clear(); return this; } @@ -503,45 +499,18 @@ public org.tensorflow.proto.FunctionDef.ArgAttrs build() { @java.lang.Override public org.tensorflow.proto.FunctionDef.ArgAttrs buildPartial() { org.tensorflow.proto.FunctionDef.ArgAttrs result = new org.tensorflow.proto.FunctionDef.ArgAttrs(this); - int from_bitField0_ = bitField0_; - result.attr_ = internalGetAttr(); - result.attr_.makeImmutable(); + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.FunctionDef.ArgAttrs result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.attr_ = internalGetAttr().build(AttrDefaultEntryHolder.defaultEntry); + } } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.FunctionDef.ArgAttrs) { @@ -556,6 +525,7 @@ public Builder mergeFrom(org.tensorflow.proto.FunctionDef.ArgAttrs other) { if (other == org.tensorflow.proto.FunctionDef.ArgAttrs.getDefaultInstance()) return this; internalGetMutableAttr().mergeFrom( other.internalGetAttr()); + bitField0_ |= 0x00000001; this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -586,8 +556,9 @@ public Builder mergeFrom( com.google.protobuf.MapEntry attr__ = input.readMessage( AttrDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableAttr().getMutableMap().put( + internalGetMutableAttr().ensureBuilderMap().put( attr__.getKey(), attr__.getValue()); + bitField0_ |= 0x00000001; break; } // case 10 default: { @@ -607,41 +578,49 @@ public Builder mergeFrom( } private int bitField0_; - private com.google.protobuf.MapField< - java.lang.String, org.tensorflow.proto.AttrValue> attr_; - private com.google.protobuf.MapField - internalGetAttr() { + private static final class AttrConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public org.tensorflow.proto.AttrValue build(org.tensorflow.proto.AttrValueOrBuilder val) { + if (val instanceof org.tensorflow.proto.AttrValue) { return (org.tensorflow.proto.AttrValue) val; } + return ((org.tensorflow.proto.AttrValue.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return AttrDefaultEntryHolder.defaultEntry; + } + }; + private static final AttrConverter attrConverter = new AttrConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, org.tensorflow.proto.AttrValueOrBuilder, org.tensorflow.proto.AttrValue, org.tensorflow.proto.AttrValue.Builder> attr_; + private com.google.protobuf.MapFieldBuilder + internalGetAttr() { if (attr_ == null) { - return com.google.protobuf.MapField.emptyMapField( - AttrDefaultEntryHolder.defaultEntry); + return new com.google.protobuf.MapFieldBuilder<>(attrConverter); } return attr_; } - private com.google.protobuf.MapField - internalGetMutableAttr() { - onChanged();; + private com.google.protobuf.MapFieldBuilder + internalGetMutableAttr() { if (attr_ == null) { - attr_ = com.google.protobuf.MapField.newMapField( - AttrDefaultEntryHolder.defaultEntry); - } - if (!attr_.isMutable()) { - attr_ = attr_.copy(); + attr_ = new com.google.protobuf.MapFieldBuilder<>(attrConverter); } + bitField0_ |= 0x00000001; + onChanged(); return attr_; } - public int getAttrCount() { - return internalGetAttr().getMap().size(); + return internalGetAttr().ensureBuilderMap().size(); } /** * map<string, .tensorflow.AttrValue> attr = 1; */ - @java.lang.Override public boolean containsAttr( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } - return internalGetAttr().getMap().containsKey(key); + return internalGetAttr().ensureBuilderMap().containsKey(key); } /** * Use {@link #getAttrMap()} instead. @@ -655,52 +634,47 @@ public java.util.Map getAttr() * map<string, .tensorflow.AttrValue> attr = 1; */ @java.lang.Override - public java.util.Map getAttrMap() { - return internalGetAttr().getMap(); + return internalGetAttr().getImmutableMap(); } /** * map<string, .tensorflow.AttrValue> attr = 1; */ @java.lang.Override - - public org.tensorflow.proto.AttrValue getAttrOrDefault( + public /* nullable */ +org.tensorflow.proto.AttrValue getAttrOrDefault( java.lang.String key, - org.tensorflow.proto.AttrValue defaultValue) { + /* nullable */ +org.tensorflow.proto.AttrValue defaultValue) { if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetAttr().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; + java.util.Map map = internalGetMutableAttr().ensureBuilderMap(); + return map.containsKey(key) ? attrConverter.build(map.get(key)) : defaultValue; } /** * map<string, .tensorflow.AttrValue> attr = 1; */ @java.lang.Override - public org.tensorflow.proto.AttrValue getAttrOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetAttr().getMap(); + java.util.Map map = internalGetMutableAttr().ensureBuilderMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } - return map.get(key); + return attrConverter.build(map.get(key)); } - public Builder clearAttr() { - internalGetMutableAttr().getMutableMap() - .clear(); + bitField0_ = (bitField0_ & ~0x00000001); + internalGetMutableAttr().clear(); return this; } /** * map<string, .tensorflow.AttrValue> attr = 1; */ - public Builder removeAttr( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableAttr().getMutableMap() + internalGetMutableAttr().ensureBuilderMap() .remove(key); return this; } @@ -709,8 +683,9 @@ public Builder removeAttr( */ @java.lang.Deprecated public java.util.Map - getMutableAttr() { - return internalGetMutableAttr().getMutableMap(); + getMutableAttr() { + bitField0_ |= 0x00000001; + return internalGetMutableAttr().ensureMessageMap(); } /** * map<string, .tensorflow.AttrValue> attr = 1; @@ -719,37 +694,45 @@ public Builder putAttr( java.lang.String key, org.tensorflow.proto.AttrValue value) { if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { - throw new NullPointerException("map value"); -} - - internalGetMutableAttr().getMutableMap() + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableAttr().ensureBuilderMap() .put(key, value); + bitField0_ |= 0x00000001; return this; } /** * map<string, .tensorflow.AttrValue> attr = 1; */ - public Builder putAllAttr( java.util.Map values) { - internalGetMutableAttr().getMutableMap() + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableAttr().ensureBuilderMap() .putAll(values); + bitField0_ |= 0x00000001; return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + /** + * map<string, .tensorflow.AttrValue> attr = 1; + */ + public org.tensorflow.proto.AttrValue.Builder putAttrBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableAttr().ensureBuilderMap(); + org.tensorflow.proto.AttrValueOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = org.tensorflow.proto.AttrValue.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof org.tensorflow.proto.AttrValue) { + entry = ((org.tensorflow.proto.AttrValue) entry).toBuilder(); + builderMap.put(key, entry); + } + return (org.tensorflow.proto.AttrValue.Builder) entry; } - // @@protoc_insertion_point(builder_scope:tensorflow.FunctionDef.ArgAttrs) } @@ -801,6 +784,7 @@ public org.tensorflow.proto.FunctionDef.ArgAttrs getDefaultInstanceForType() { } + private int bitField0_; public static final int SIGNATURE_FIELD_NUMBER = 1; private org.tensorflow.proto.OpDef signature_; /** @@ -814,7 +798,7 @@ public org.tensorflow.proto.FunctionDef.ArgAttrs getDefaultInstanceForType() { */ @java.lang.Override public boolean hasSignature() { - return signature_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** *
    @@ -839,7 +823,7 @@ public org.tensorflow.proto.OpDef getSignature() {
        */
       @java.lang.Override
       public org.tensorflow.proto.OpDefOrBuilder getSignatureOrBuilder() {
    -    return getSignature();
    +    return signature_ == null ? org.tensorflow.proto.OpDef.getDefaultInstance() : signature_;
       }
     
       public static final int ATTR_FIELD_NUMBER = 5;
    @@ -854,6 +838,7 @@ private static final class AttrDefaultEntryHolder {
                     com.google.protobuf.WireFormat.FieldType.MESSAGE,
                     org.tensorflow.proto.AttrValue.getDefaultInstance());
       }
    +  @SuppressWarnings("serial")
       private com.google.protobuf.MapField<
           java.lang.String, org.tensorflow.proto.AttrValue> attr_;
       private com.google.protobuf.MapField
    @@ -864,7 +849,6 @@ private static final class AttrDefaultEntryHolder {
         }
         return attr_;
       }
    -
       public int getAttrCount() {
         return internalGetAttr().getMap().size();
       }
    @@ -875,7 +859,6 @@ public int getAttrCount() {
        *
        * map<string, .tensorflow.AttrValue> attr = 5;
        */
    -
       @java.lang.Override
       public boolean containsAttr(
           java.lang.String key) {
    @@ -898,7 +881,6 @@ public java.util.Map getAttr()
        * map<string, .tensorflow.AttrValue> attr = 5;
        */
       @java.lang.Override
    -
       public java.util.Map getAttrMap() {
         return internalGetAttr().getMap();
       }
    @@ -910,10 +892,11 @@ public java.util.Map getAttrMa
        * map<string, .tensorflow.AttrValue> attr = 5;
        */
       @java.lang.Override
    -
    -  public org.tensorflow.proto.AttrValue getAttrOrDefault(
    +  public /* nullable */
    +org.tensorflow.proto.AttrValue getAttrOrDefault(
           java.lang.String key,
    -      org.tensorflow.proto.AttrValue defaultValue) {
    +      /* nullable */
    +org.tensorflow.proto.AttrValue defaultValue) {
         if (key == null) { throw new NullPointerException("map key"); }
         java.util.Map map =
             internalGetAttr().getMap();
    @@ -927,7 +910,6 @@ public org.tensorflow.proto.AttrValue getAttrOrDefault(
        * map<string, .tensorflow.AttrValue> attr = 5;
        */
       @java.lang.Override
    -
       public org.tensorflow.proto.AttrValue getAttrOrThrow(
           java.lang.String key) {
         if (key == null) { throw new NullPointerException("map key"); }
    @@ -951,6 +933,7 @@ private static final class ArgAttrDefaultEntryHolder {
                     com.google.protobuf.WireFormat.FieldType.MESSAGE,
                     org.tensorflow.proto.FunctionDef.ArgAttrs.getDefaultInstance());
       }
    +  @SuppressWarnings("serial")
       private com.google.protobuf.MapField<
           java.lang.Integer, org.tensorflow.proto.FunctionDef.ArgAttrs> argAttr_;
       private com.google.protobuf.MapField
    @@ -961,18 +944,16 @@ private static final class ArgAttrDefaultEntryHolder {
         }
         return argAttr_;
       }
    -
       public int getArgAttrCount() {
         return internalGetArgAttr().getMap().size();
       }
       /**
        * map<uint32, .tensorflow.FunctionDef.ArgAttrs> arg_attr = 7;
        */
    -
       @java.lang.Override
       public boolean containsArgAttr(
           int key) {
    -    
    +
         return internalGetArgAttr().getMap().containsKey(key);
       }
       /**
    @@ -987,7 +968,6 @@ public java.util.Mapmap<uint32, .tensorflow.FunctionDef.ArgAttrs> arg_attr = 7;
        */
       @java.lang.Override
    -
       public java.util.Map getArgAttrMap() {
         return internalGetArgAttr().getMap();
       }
    @@ -995,11 +975,12 @@ public java.util.Mapmap<uint32, .tensorflow.FunctionDef.ArgAttrs> arg_attr = 7;
        */
       @java.lang.Override
    -
    -  public org.tensorflow.proto.FunctionDef.ArgAttrs getArgAttrOrDefault(
    +  public /* nullable */
    +org.tensorflow.proto.FunctionDef.ArgAttrs getArgAttrOrDefault(
           int key,
    -      org.tensorflow.proto.FunctionDef.ArgAttrs defaultValue) {
    -    
    +      /* nullable */
    +org.tensorflow.proto.FunctionDef.ArgAttrs defaultValue) {
    +
         java.util.Map map =
             internalGetArgAttr().getMap();
         return map.containsKey(key) ? map.get(key) : defaultValue;
    @@ -1008,10 +989,9 @@ public org.tensorflow.proto.FunctionDef.ArgAttrs getArgAttrOrDefault(
        * map<uint32, .tensorflow.FunctionDef.ArgAttrs> arg_attr = 7;
        */
       @java.lang.Override
    -
       public org.tensorflow.proto.FunctionDef.ArgAttrs getArgAttrOrThrow(
           int key) {
    -    
    +
         java.util.Map map =
             internalGetArgAttr().getMap();
         if (!map.containsKey(key)) {
    @@ -1032,6 +1012,7 @@ private static final class ResourceArgUniqueIdDefaultEntryHolder {
                     com.google.protobuf.WireFormat.FieldType.UINT32,
                     0);
       }
    +  @SuppressWarnings("serial")
       private com.google.protobuf.MapField<
           java.lang.Integer, java.lang.Integer> resourceArgUniqueId_;
       private com.google.protobuf.MapField
    @@ -1042,7 +1023,6 @@ private static final class ResourceArgUniqueIdDefaultEntryHolder {
         }
         return resourceArgUniqueId_;
       }
    -
       public int getResourceArgUniqueIdCount() {
         return internalGetResourceArgUniqueId().getMap().size();
       }
    @@ -1051,19 +1031,20 @@ public int getResourceArgUniqueIdCount() {
        * Unique IDs for each resource argument, used to track aliasing resources. If
        * Argument A and Argument B alias each other, then
        * resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index].
    +   *
        * If this field is empty, none of the arguments could alias; otherwise, every
        * resource argument should have an entry in this field.
    +   *
        * When instantiated, the unique IDs will be attached to the _Arg nodes'
        * "_resource_arg_unique_id" attribute.
        * 
    * * map<uint32, uint32> resource_arg_unique_id = 8; */ - @java.lang.Override public boolean containsResourceArgUniqueId( int key) { - + return internalGetResourceArgUniqueId().getMap().containsKey(key); } /** @@ -1079,8 +1060,10 @@ public java.util.Map getResourceArgUniqueI * Unique IDs for each resource argument, used to track aliasing resources. If * Argument A and Argument B alias each other, then * resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index]. + * * If this field is empty, none of the arguments could alias; otherwise, every * resource argument should have an entry in this field. + * * When instantiated, the unique IDs will be attached to the _Arg nodes' * "_resource_arg_unique_id" attribute. *
    @@ -1088,7 +1071,6 @@ public java.util.Map getResourceArgUniqueI * map<uint32, uint32> resource_arg_unique_id = 8; */ @java.lang.Override - public java.util.Map getResourceArgUniqueIdMap() { return internalGetResourceArgUniqueId().getMap(); } @@ -1097,8 +1079,10 @@ public java.util.Map getResourceArgUniqueI * Unique IDs for each resource argument, used to track aliasing resources. If * Argument A and Argument B alias each other, then * resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index]. + * * If this field is empty, none of the arguments could alias; otherwise, every * resource argument should have an entry in this field. + * * When instantiated, the unique IDs will be attached to the _Arg nodes' * "_resource_arg_unique_id" attribute. *
    @@ -1106,11 +1090,10 @@ public java.util.Map getResourceArgUniqueI * map<uint32, uint32> resource_arg_unique_id = 8; */ @java.lang.Override - public int getResourceArgUniqueIdOrDefault( int key, int defaultValue) { - + java.util.Map map = internalGetResourceArgUniqueId().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; @@ -1120,8 +1103,10 @@ public int getResourceArgUniqueIdOrDefault( * Unique IDs for each resource argument, used to track aliasing resources. If * Argument A and Argument B alias each other, then * resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index]. + * * If this field is empty, none of the arguments could alias; otherwise, every * resource argument should have an entry in this field. + * * When instantiated, the unique IDs will be attached to the _Arg nodes' * "_resource_arg_unique_id" attribute. *
    @@ -1129,10 +1114,9 @@ public int getResourceArgUniqueIdOrDefault( * map<uint32, uint32> resource_arg_unique_id = 8; */ @java.lang.Override - public int getResourceArgUniqueIdOrThrow( int key) { - + java.util.Map map = internalGetResourceArgUniqueId().getMap(); if (!map.containsKey(key)) { @@ -1142,6 +1126,7 @@ public int getResourceArgUniqueIdOrThrow( } public static final int NODE_DEF_FIELD_NUMBER = 3; + @SuppressWarnings("serial") private java.util.List nodeDef_; /** *
    @@ -1223,6 +1208,7 @@ private static final class RetDefaultEntryHolder {
                     com.google.protobuf.WireFormat.FieldType.STRING,
                     "");
       }
    +  @SuppressWarnings("serial")
       private com.google.protobuf.MapField<
           java.lang.String, java.lang.String> ret_;
       private com.google.protobuf.MapField
    @@ -1233,7 +1219,6 @@ private static final class RetDefaultEntryHolder {
         }
         return ret_;
       }
    -
       public int getRetCount() {
         return internalGetRet().getMap().size();
       }
    @@ -1245,7 +1230,6 @@ public int getRetCount() {
        *
        * map<string, string> ret = 4;
        */
    -
       @java.lang.Override
       public boolean containsRet(
           java.lang.String key) {
    @@ -1269,7 +1253,6 @@ public java.util.Map getRet() {
        * map<string, string> ret = 4;
        */
       @java.lang.Override
    -
       public java.util.Map getRetMap() {
         return internalGetRet().getMap();
       }
    @@ -1282,10 +1265,11 @@ public java.util.Map getRetMap() {
        * map<string, string> ret = 4;
        */
       @java.lang.Override
    -
    -  public java.lang.String getRetOrDefault(
    +  public /* nullable */
    +java.lang.String getRetOrDefault(
           java.lang.String key,
    -      java.lang.String defaultValue) {
    +      /* nullable */
    +java.lang.String defaultValue) {
         if (key == null) { throw new NullPointerException("map key"); }
         java.util.Map map =
             internalGetRet().getMap();
    @@ -1300,7 +1284,6 @@ public java.lang.String getRetOrDefault(
        * map<string, string> ret = 4;
        */
       @java.lang.Override
    -
       public java.lang.String getRetOrThrow(
           java.lang.String key) {
         if (key == null) { throw new NullPointerException("map key"); }
    @@ -1324,6 +1307,7 @@ private static final class ControlRetDefaultEntryHolder {
                     com.google.protobuf.WireFormat.FieldType.STRING,
                     "");
       }
    +  @SuppressWarnings("serial")
       private com.google.protobuf.MapField<
           java.lang.String, java.lang.String> controlRet_;
       private com.google.protobuf.MapField
    @@ -1334,7 +1318,6 @@ private static final class ControlRetDefaultEntryHolder {
         }
         return controlRet_;
       }
    -
       public int getControlRetCount() {
         return internalGetControlRet().getMap().size();
       }
    @@ -1346,7 +1329,6 @@ public int getControlRetCount() {
        *
        * map<string, string> control_ret = 6;
        */
    -
       @java.lang.Override
       public boolean containsControlRet(
           java.lang.String key) {
    @@ -1370,7 +1352,6 @@ public java.util.Map getControlRet() {
        * map<string, string> control_ret = 6;
        */
       @java.lang.Override
    -
       public java.util.Map getControlRetMap() {
         return internalGetControlRet().getMap();
       }
    @@ -1383,10 +1364,11 @@ public java.util.Map getControlRetMap() {
        * map<string, string> control_ret = 6;
        */
       @java.lang.Override
    -
    -  public java.lang.String getControlRetOrDefault(
    +  public /* nullable */
    +java.lang.String getControlRetOrDefault(
           java.lang.String key,
    -      java.lang.String defaultValue) {
    +      /* nullable */
    +java.lang.String defaultValue) {
         if (key == null) { throw new NullPointerException("map key"); }
         java.util.Map map =
             internalGetControlRet().getMap();
    @@ -1401,7 +1383,6 @@ public java.lang.String getControlRetOrDefault(
        * map<string, string> control_ret = 6;
        */
       @java.lang.Override
    -
       public java.lang.String getControlRetOrThrow(
           java.lang.String key) {
         if (key == null) { throw new NullPointerException("map key"); }
    @@ -1427,37 +1408,37 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (signature_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(1, getSignature());
         }
         for (int i = 0; i < nodeDef_.size(); i++) {
           output.writeMessage(3, nodeDef_.get(i));
         }
    -    com.google.protobuf.GeneratedMessageV3
    +    com.google.protobuf.GeneratedMessage
           .serializeStringMapTo(
             output,
             internalGetRet(),
             RetDefaultEntryHolder.defaultEntry,
             4);
    -    com.google.protobuf.GeneratedMessageV3
    +    com.google.protobuf.GeneratedMessage
           .serializeStringMapTo(
             output,
             internalGetAttr(),
             AttrDefaultEntryHolder.defaultEntry,
             5);
    -    com.google.protobuf.GeneratedMessageV3
    +    com.google.protobuf.GeneratedMessage
           .serializeStringMapTo(
             output,
             internalGetControlRet(),
             ControlRetDefaultEntryHolder.defaultEntry,
             6);
    -    com.google.protobuf.GeneratedMessageV3
    +    com.google.protobuf.GeneratedMessage
           .serializeIntegerMapTo(
             output,
             internalGetArgAttr(),
             ArgAttrDefaultEntryHolder.defaultEntry,
             7);
    -    com.google.protobuf.GeneratedMessageV3
    +    com.google.protobuf.GeneratedMessage
           .serializeIntegerMapTo(
             output,
             internalGetResourceArgUniqueId(),
    @@ -1472,7 +1453,7 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (signature_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(1, getSignature());
         }
    @@ -1640,39 +1621,41 @@ public static org.tensorflow.proto.FunctionDef parseFrom(
       }
       public static org.tensorflow.proto.FunctionDef parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.FunctionDef parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.FunctionDef parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.FunctionDef parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.FunctionDef parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.FunctionDef parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -1692,7 +1675,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -1701,14 +1684,15 @@ protected Builder newBuilderForType(
        * A function can be instantiated when the runtime can bind every attr
        * with a value. When a GraphDef has a call to a function, it must
        * have binding for every attr defined in the signature.
    +   *
        * TODO(zhifengc):
    -   *   * device spec, etc.
    +   * * device spec, etc.
        * 
    * * Protobuf type {@code tensorflow.FunctionDef} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.FunctionDef) org.tensorflow.proto.FunctionDefOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -1717,7 +1701,7 @@ public static final class Builder extends } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 5: @@ -1736,7 +1720,7 @@ protected com.google.protobuf.MapField internalGetMapField( } } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( int number) { switch (number) { case 5: @@ -1755,7 +1739,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField( } } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.FunctionProtos.internal_static_tensorflow_FunctionDef_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -1764,21 +1748,28 @@ protected com.google.protobuf.MapField internalGetMutableMapField( // Construct using org.tensorflow.proto.FunctionDef.newBuilder() private Builder() { - + maybeForceBuilderInitialization(); } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getSignatureFieldBuilder(); + getNodeDefFieldBuilder(); + } } @java.lang.Override public Builder clear() { super.clear(); - if (signatureBuilder_ == null) { - signature_ = null; - } else { - signature_ = null; + bitField0_ = 0; + signature_ = null; + if (signatureBuilder_ != null) { + signatureBuilder_.dispose(); signatureBuilder_ = null; } internalGetMutableAttr().clear(); @@ -1790,7 +1781,7 @@ public Builder clear() { nodeDef_ = null; nodeDefBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); internalGetMutableRet().clear(); internalGetMutableControlRet().clear(); return this; @@ -1819,67 +1810,54 @@ public org.tensorflow.proto.FunctionDef build() { @java.lang.Override public org.tensorflow.proto.FunctionDef buildPartial() { org.tensorflow.proto.FunctionDef result = new org.tensorflow.proto.FunctionDef(this); - int from_bitField0_ = bitField0_; - if (signatureBuilder_ == null) { - result.signature_ = signature_; - } else { - result.signature_ = signatureBuilder_.build(); - } - result.attr_ = internalGetAttr(); - result.attr_.makeImmutable(); - result.argAttr_ = internalGetArgAttr(); - result.argAttr_.makeImmutable(); - result.resourceArgUniqueId_ = internalGetResourceArgUniqueId(); - result.resourceArgUniqueId_.makeImmutable(); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(org.tensorflow.proto.FunctionDef result) { if (nodeDefBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { + if (((bitField0_ & 0x00000010) != 0)) { nodeDef_ = java.util.Collections.unmodifiableList(nodeDef_); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); } result.nodeDef_ = nodeDef_; } else { result.nodeDef_ = nodeDefBuilder_.build(); } - result.ret_ = internalGetRet(); - result.ret_.makeImmutable(); - result.controlRet_ = internalGetControlRet(); - result.controlRet_.makeImmutable(); - onBuilt(); - return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.FunctionDef result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.signature_ = signatureBuilder_ == null + ? signature_ + : signatureBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.attr_ = internalGetAttr().build(AttrDefaultEntryHolder.defaultEntry); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.argAttr_ = internalGetArgAttr().build(ArgAttrDefaultEntryHolder.defaultEntry); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.resourceArgUniqueId_ = internalGetResourceArgUniqueId(); + result.resourceArgUniqueId_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.ret_ = internalGetRet(); + result.ret_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.controlRet_ = internalGetControlRet(); + result.controlRet_.makeImmutable(); + } + result.bitField0_ |= to_bitField0_; } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.FunctionDef) { @@ -1897,15 +1875,18 @@ public Builder mergeFrom(org.tensorflow.proto.FunctionDef other) { } internalGetMutableAttr().mergeFrom( other.internalGetAttr()); + bitField0_ |= 0x00000002; internalGetMutableArgAttr().mergeFrom( other.internalGetArgAttr()); + bitField0_ |= 0x00000004; internalGetMutableResourceArgUniqueId().mergeFrom( other.internalGetResourceArgUniqueId()); + bitField0_ |= 0x00000008; if (nodeDefBuilder_ == null) { if (!other.nodeDef_.isEmpty()) { if (nodeDef_.isEmpty()) { nodeDef_ = other.nodeDef_; - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); } else { ensureNodeDefIsMutable(); nodeDef_.addAll(other.nodeDef_); @@ -1918,9 +1899,9 @@ public Builder mergeFrom(org.tensorflow.proto.FunctionDef other) { nodeDefBuilder_.dispose(); nodeDefBuilder_ = null; nodeDef_ = other.nodeDef_; - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); nodeDefBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getNodeDefFieldBuilder() : null; } else { nodeDefBuilder_.addAllMessages(other.nodeDef_); @@ -1929,8 +1910,10 @@ public Builder mergeFrom(org.tensorflow.proto.FunctionDef other) { } internalGetMutableRet().mergeFrom( other.internalGetRet()); + bitField0_ |= 0x00000020; internalGetMutableControlRet().mergeFrom( other.internalGetControlRet()); + bitField0_ |= 0x00000040; this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1961,7 +1944,7 @@ public Builder mergeFrom( input.readMessage( getSignatureFieldBuilder().getBuilder(), extensionRegistry); - + bitField0_ |= 0x00000001; break; } // case 10 case 26: { @@ -1983,14 +1966,16 @@ public Builder mergeFrom( RetDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableRet().getMutableMap().put( ret__.getKey(), ret__.getValue()); + bitField0_ |= 0x00000020; break; } // case 34 case 42: { com.google.protobuf.MapEntry attr__ = input.readMessage( AttrDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableAttr().getMutableMap().put( + internalGetMutableAttr().ensureBuilderMap().put( attr__.getKey(), attr__.getValue()); + bitField0_ |= 0x00000002; break; } // case 42 case 50: { @@ -1999,14 +1984,16 @@ public Builder mergeFrom( ControlRetDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableControlRet().getMutableMap().put( controlRet__.getKey(), controlRet__.getValue()); + bitField0_ |= 0x00000040; break; } // case 50 case 58: { com.google.protobuf.MapEntry argAttr__ = input.readMessage( ArgAttrDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableArgAttr().getMutableMap().put( + internalGetMutableArgAttr().ensureBuilderMap().put( argAttr__.getKey(), argAttr__.getValue()); + bitField0_ |= 0x00000004; break; } // case 58 case 66: { @@ -2015,6 +2002,7 @@ public Builder mergeFrom( ResourceArgUniqueIdDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableResourceArgUniqueId().getMutableMap().put( resourceArgUniqueId__.getKey(), resourceArgUniqueId__.getValue()); + bitField0_ |= 0x00000008; break; } // case 66 default: { @@ -2035,7 +2023,7 @@ public Builder mergeFrom( private int bitField0_; private org.tensorflow.proto.OpDef signature_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.OpDef, org.tensorflow.proto.OpDef.Builder, org.tensorflow.proto.OpDefOrBuilder> signatureBuilder_; /** *
    @@ -2047,7 +2035,7 @@ public Builder mergeFrom(
          * @return Whether the signature field is set.
          */
         public boolean hasSignature() {
    -      return signatureBuilder_ != null || signature_ != null;
    +      return ((bitField0_ & 0x00000001) != 0);
         }
         /**
          * 
    @@ -2079,11 +2067,11 @@ public Builder setSignature(org.tensorflow.proto.OpDef value) {
               throw new NullPointerException();
             }
             signature_ = value;
    -        onChanged();
           } else {
             signatureBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000001;
    +      onChanged();
           return this;
         }
         /**
    @@ -2098,11 +2086,11 @@ public Builder setSignature(
             org.tensorflow.proto.OpDef.Builder builderForValue) {
           if (signatureBuilder_ == null) {
             signature_ = builderForValue.build();
    -        onChanged();
           } else {
             signatureBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000001;
    +      onChanged();
           return this;
         }
         /**
    @@ -2115,17 +2103,20 @@ public Builder setSignature(
          */
         public Builder mergeSignature(org.tensorflow.proto.OpDef value) {
           if (signatureBuilder_ == null) {
    -        if (signature_ != null) {
    -          signature_ =
    -            org.tensorflow.proto.OpDef.newBuilder(signature_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000001) != 0) &&
    +          signature_ != null &&
    +          signature_ != org.tensorflow.proto.OpDef.getDefaultInstance()) {
    +          getSignatureBuilder().mergeFrom(value);
             } else {
               signature_ = value;
             }
    -        onChanged();
           } else {
             signatureBuilder_.mergeFrom(value);
           }
    -
    +      if (signature_ != null) {
    +        bitField0_ |= 0x00000001;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -2137,14 +2128,13 @@ public Builder mergeSignature(org.tensorflow.proto.OpDef value) {
          * .tensorflow.OpDef signature = 1;
          */
         public Builder clearSignature() {
    -      if (signatureBuilder_ == null) {
    -        signature_ = null;
    -        onChanged();
    -      } else {
    -        signature_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000001);
    +      signature_ = null;
    +      if (signatureBuilder_ != null) {
    +        signatureBuilder_.dispose();
             signatureBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -2156,7 +2146,7 @@ public Builder clearSignature() {
          * .tensorflow.OpDef signature = 1;
          */
         public org.tensorflow.proto.OpDef.Builder getSignatureBuilder() {
    -      
    +      bitField0_ |= 0x00000001;
           onChanged();
           return getSignatureFieldBuilder().getBuilder();
         }
    @@ -2184,11 +2174,11 @@ public org.tensorflow.proto.OpDefOrBuilder getSignatureOrBuilder() {
          *
          * .tensorflow.OpDef signature = 1;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.OpDef, org.tensorflow.proto.OpDef.Builder, org.tensorflow.proto.OpDefOrBuilder> 
             getSignatureFieldBuilder() {
           if (signatureBuilder_ == null) {
    -        signatureBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        signatureBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.OpDef, org.tensorflow.proto.OpDef.Builder, org.tensorflow.proto.OpDefOrBuilder>(
                     getSignature(),
                     getParentForChildren(),
    @@ -2198,31 +2188,40 @@ public org.tensorflow.proto.OpDefOrBuilder getSignatureOrBuilder() {
           return signatureBuilder_;
         }
     
    -    private com.google.protobuf.MapField<
    -        java.lang.String, org.tensorflow.proto.AttrValue> attr_;
    -    private com.google.protobuf.MapField
    -    internalGetAttr() {
    +    private static final class AttrConverter implements com.google.protobuf.MapFieldBuilder.Converter {
    +      @java.lang.Override
    +      public org.tensorflow.proto.AttrValue build(org.tensorflow.proto.AttrValueOrBuilder val) {
    +        if (val instanceof org.tensorflow.proto.AttrValue) { return (org.tensorflow.proto.AttrValue) val; }
    +        return ((org.tensorflow.proto.AttrValue.Builder) val).build();
    +      }
    +
    +      @java.lang.Override
    +      public com.google.protobuf.MapEntry defaultEntry() {
    +        return AttrDefaultEntryHolder.defaultEntry;
    +      }
    +    };
    +    private static final AttrConverter attrConverter = new AttrConverter();
    +
    +    private com.google.protobuf.MapFieldBuilder<
    +        java.lang.String, org.tensorflow.proto.AttrValueOrBuilder, org.tensorflow.proto.AttrValue, org.tensorflow.proto.AttrValue.Builder> attr_;
    +    private com.google.protobuf.MapFieldBuilder
    +        internalGetAttr() {
           if (attr_ == null) {
    -        return com.google.protobuf.MapField.emptyMapField(
    -            AttrDefaultEntryHolder.defaultEntry);
    +        return new com.google.protobuf.MapFieldBuilder<>(attrConverter);
           }
           return attr_;
         }
    -    private com.google.protobuf.MapField
    -    internalGetMutableAttr() {
    -      onChanged();;
    +    private com.google.protobuf.MapFieldBuilder
    +        internalGetMutableAttr() {
           if (attr_ == null) {
    -        attr_ = com.google.protobuf.MapField.newMapField(
    -            AttrDefaultEntryHolder.defaultEntry);
    -      }
    -      if (!attr_.isMutable()) {
    -        attr_ = attr_.copy();
    +        attr_ = new com.google.protobuf.MapFieldBuilder<>(attrConverter);
           }
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return attr_;
         }
    -
         public int getAttrCount() {
    -      return internalGetAttr().getMap().size();
    +      return internalGetAttr().ensureBuilderMap().size();
         }
         /**
          * 
    @@ -2231,12 +2230,11 @@ public int getAttrCount() {
          *
          * map<string, .tensorflow.AttrValue> attr = 5;
          */
    -
         @java.lang.Override
         public boolean containsAttr(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      return internalGetAttr().getMap().containsKey(key);
    +      return internalGetAttr().ensureBuilderMap().containsKey(key);
         }
         /**
          * Use {@link #getAttrMap()} instead.
    @@ -2254,9 +2252,8 @@ public java.util.Map getAttr()
          * map<string, .tensorflow.AttrValue> attr = 5;
          */
         @java.lang.Override
    -
         public java.util.Map getAttrMap() {
    -      return internalGetAttr().getMap();
    +      return internalGetAttr().getImmutableMap();
         }
         /**
          * 
    @@ -2266,14 +2263,14 @@ public java.util.Map getAttrMa
          * map<string, .tensorflow.AttrValue> attr = 5;
          */
         @java.lang.Override
    -
    -    public org.tensorflow.proto.AttrValue getAttrOrDefault(
    +    public /* nullable */
    +org.tensorflow.proto.AttrValue getAttrOrDefault(
             java.lang.String key,
    -        org.tensorflow.proto.AttrValue defaultValue) {
    +        /* nullable */
    +org.tensorflow.proto.AttrValue defaultValue) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      java.util.Map map =
    -          internalGetAttr().getMap();
    -      return map.containsKey(key) ? map.get(key) : defaultValue;
    +      java.util.Map map = internalGetMutableAttr().ensureBuilderMap();
    +      return map.containsKey(key) ? attrConverter.build(map.get(key)) : defaultValue;
         }
         /**
          * 
    @@ -2283,21 +2280,18 @@ public org.tensorflow.proto.AttrValue getAttrOrDefault(
          * map<string, .tensorflow.AttrValue> attr = 5;
          */
         @java.lang.Override
    -
         public org.tensorflow.proto.AttrValue getAttrOrThrow(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      java.util.Map map =
    -          internalGetAttr().getMap();
    +      java.util.Map map = internalGetMutableAttr().ensureBuilderMap();
           if (!map.containsKey(key)) {
             throw new java.lang.IllegalArgumentException();
           }
    -      return map.get(key);
    +      return attrConverter.build(map.get(key));
         }
    -
         public Builder clearAttr() {
    -      internalGetMutableAttr().getMutableMap()
    -          .clear();
    +      bitField0_ = (bitField0_ & ~0x00000002);
    +      internalGetMutableAttr().clear();
           return this;
         }
         /**
    @@ -2307,11 +2301,10 @@ public Builder clearAttr() {
          *
          * map<string, .tensorflow.AttrValue> attr = 5;
          */
    -
         public Builder removeAttr(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      internalGetMutableAttr().getMutableMap()
    +      internalGetMutableAttr().ensureBuilderMap()
               .remove(key);
           return this;
         }
    @@ -2320,8 +2313,9 @@ public Builder removeAttr(
          */
         @java.lang.Deprecated
         public java.util.Map
    -    getMutableAttr() {
    -      return internalGetMutableAttr().getMutableMap();
    +        getMutableAttr() {
    +      bitField0_ |= 0x00000002;
    +      return internalGetMutableAttr().ensureMessageMap();
         }
         /**
          * 
    @@ -2334,12 +2328,10 @@ public Builder putAttr(
             java.lang.String key,
             org.tensorflow.proto.AttrValue value) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      if (value == null) {
    -  throw new NullPointerException("map value");
    -}
    -
    -      internalGetMutableAttr().getMutableMap()
    +      if (value == null) { throw new NullPointerException("map value"); }
    +      internalGetMutableAttr().ensureBuilderMap()
               .put(key, value);
    +      bitField0_ |= 0x00000002;
           return this;
         }
         /**
    @@ -2349,49 +2341,83 @@ public Builder putAttr(
          *
          * map<string, .tensorflow.AttrValue> attr = 5;
          */
    -
         public Builder putAllAttr(
             java.util.Map values) {
    -      internalGetMutableAttr().getMutableMap()
    +      for (java.util.Map.Entry e : values.entrySet()) {
    +        if (e.getKey() == null || e.getValue() == null) {
    +          throw new NullPointerException();
    +        }
    +      }
    +      internalGetMutableAttr().ensureBuilderMap()
               .putAll(values);
    +      bitField0_ |= 0x00000002;
           return this;
         }
    +    /**
    +     * 
    +     * Attributes specific to this function definition.
    +     * 
    + * + * map<string, .tensorflow.AttrValue> attr = 5; + */ + public org.tensorflow.proto.AttrValue.Builder putAttrBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableAttr().ensureBuilderMap(); + org.tensorflow.proto.AttrValueOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = org.tensorflow.proto.AttrValue.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof org.tensorflow.proto.AttrValue) { + entry = ((org.tensorflow.proto.AttrValue) entry).toBuilder(); + builderMap.put(key, entry); + } + return (org.tensorflow.proto.AttrValue.Builder) entry; + } - private com.google.protobuf.MapField< - java.lang.Integer, org.tensorflow.proto.FunctionDef.ArgAttrs> argAttr_; - private com.google.protobuf.MapField - internalGetArgAttr() { + private static final class ArgAttrConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public org.tensorflow.proto.FunctionDef.ArgAttrs build(org.tensorflow.proto.FunctionDef.ArgAttrsOrBuilder val) { + if (val instanceof org.tensorflow.proto.FunctionDef.ArgAttrs) { return (org.tensorflow.proto.FunctionDef.ArgAttrs) val; } + return ((org.tensorflow.proto.FunctionDef.ArgAttrs.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return ArgAttrDefaultEntryHolder.defaultEntry; + } + }; + private static final ArgAttrConverter argAttrConverter = new ArgAttrConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.Integer, org.tensorflow.proto.FunctionDef.ArgAttrsOrBuilder, org.tensorflow.proto.FunctionDef.ArgAttrs, org.tensorflow.proto.FunctionDef.ArgAttrs.Builder> argAttr_; + private com.google.protobuf.MapFieldBuilder + internalGetArgAttr() { if (argAttr_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ArgAttrDefaultEntryHolder.defaultEntry); + return new com.google.protobuf.MapFieldBuilder<>(argAttrConverter); } return argAttr_; } - private com.google.protobuf.MapField - internalGetMutableArgAttr() { - onChanged();; + private com.google.protobuf.MapFieldBuilder + internalGetMutableArgAttr() { if (argAttr_ == null) { - argAttr_ = com.google.protobuf.MapField.newMapField( - ArgAttrDefaultEntryHolder.defaultEntry); - } - if (!argAttr_.isMutable()) { - argAttr_ = argAttr_.copy(); + argAttr_ = new com.google.protobuf.MapFieldBuilder<>(argAttrConverter); } + bitField0_ |= 0x00000004; + onChanged(); return argAttr_; } - public int getArgAttrCount() { - return internalGetArgAttr().getMap().size(); + return internalGetArgAttr().ensureBuilderMap().size(); } /** * map<uint32, .tensorflow.FunctionDef.ArgAttrs> arg_attr = 7; */ - @java.lang.Override public boolean containsArgAttr( int key) { - - return internalGetArgAttr().getMap().containsKey(key); + + return internalGetArgAttr().ensureBuilderMap().containsKey(key); } /** * Use {@link #getArgAttrMap()} instead. @@ -2405,52 +2431,47 @@ public java.util.Mapmap<uint32, .tensorflow.FunctionDef.ArgAttrs> arg_attr = 7; */ @java.lang.Override - public java.util.Map getArgAttrMap() { - return internalGetArgAttr().getMap(); + return internalGetArgAttr().getImmutableMap(); } /** * map<uint32, .tensorflow.FunctionDef.ArgAttrs> arg_attr = 7; */ @java.lang.Override - - public org.tensorflow.proto.FunctionDef.ArgAttrs getArgAttrOrDefault( + public /* nullable */ +org.tensorflow.proto.FunctionDef.ArgAttrs getArgAttrOrDefault( int key, - org.tensorflow.proto.FunctionDef.ArgAttrs defaultValue) { - - java.util.Map map = - internalGetArgAttr().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; + /* nullable */ +org.tensorflow.proto.FunctionDef.ArgAttrs defaultValue) { + + java.util.Map map = internalGetMutableArgAttr().ensureBuilderMap(); + return map.containsKey(key) ? argAttrConverter.build(map.get(key)) : defaultValue; } /** * map<uint32, .tensorflow.FunctionDef.ArgAttrs> arg_attr = 7; */ @java.lang.Override - public org.tensorflow.proto.FunctionDef.ArgAttrs getArgAttrOrThrow( int key) { - - java.util.Map map = - internalGetArgAttr().getMap(); + + java.util.Map map = internalGetMutableArgAttr().ensureBuilderMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } - return map.get(key); + return argAttrConverter.build(map.get(key)); } - public Builder clearArgAttr() { - internalGetMutableArgAttr().getMutableMap() - .clear(); + bitField0_ = (bitField0_ & ~0x00000004); + internalGetMutableArgAttr().clear(); return this; } /** * map<uint32, .tensorflow.FunctionDef.ArgAttrs> arg_attr = 7; */ - public Builder removeArgAttr( int key) { - - internalGetMutableArgAttr().getMutableMap() + + internalGetMutableArgAttr().ensureBuilderMap() .remove(key); return this; } @@ -2459,8 +2480,9 @@ public Builder removeArgAttr( */ @java.lang.Deprecated public java.util.Map - getMutableArgAttr() { - return internalGetMutableArgAttr().getMutableMap(); + getMutableArgAttr() { + bitField0_ |= 0x00000004; + return internalGetMutableArgAttr().ensureMessageMap(); } /** * map<uint32, .tensorflow.FunctionDef.ArgAttrs> arg_attr = 7; @@ -2468,30 +2490,50 @@ public Builder removeArgAttr( public Builder putArgAttr( int key, org.tensorflow.proto.FunctionDef.ArgAttrs value) { - - if (value == null) { - throw new NullPointerException("map value"); -} - internalGetMutableArgAttr().getMutableMap() + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableArgAttr().ensureBuilderMap() .put(key, value); + bitField0_ |= 0x00000004; return this; } /** * map<uint32, .tensorflow.FunctionDef.ArgAttrs> arg_attr = 7; */ - public Builder putAllArgAttr( java.util.Map values) { - internalGetMutableArgAttr().getMutableMap() + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableArgAttr().ensureBuilderMap() .putAll(values); + bitField0_ |= 0x00000004; return this; } + /** + * map<uint32, .tensorflow.FunctionDef.ArgAttrs> arg_attr = 7; + */ + public org.tensorflow.proto.FunctionDef.ArgAttrs.Builder putArgAttrBuilderIfAbsent( + int key) { + java.util.Map builderMap = internalGetMutableArgAttr().ensureBuilderMap(); + org.tensorflow.proto.FunctionDef.ArgAttrsOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = org.tensorflow.proto.FunctionDef.ArgAttrs.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof org.tensorflow.proto.FunctionDef.ArgAttrs) { + entry = ((org.tensorflow.proto.FunctionDef.ArgAttrs) entry).toBuilder(); + builderMap.put(key, entry); + } + return (org.tensorflow.proto.FunctionDef.ArgAttrs.Builder) entry; + } private com.google.protobuf.MapField< java.lang.Integer, java.lang.Integer> resourceArgUniqueId_; private com.google.protobuf.MapField - internalGetResourceArgUniqueId() { + internalGetResourceArgUniqueId() { if (resourceArgUniqueId_ == null) { return com.google.protobuf.MapField.emptyMapField( ResourceArgUniqueIdDefaultEntryHolder.defaultEntry); @@ -2499,8 +2541,7 @@ public Builder putAllArgAttr( return resourceArgUniqueId_; } private com.google.protobuf.MapField - internalGetMutableResourceArgUniqueId() { - onChanged();; + internalGetMutableResourceArgUniqueId() { if (resourceArgUniqueId_ == null) { resourceArgUniqueId_ = com.google.protobuf.MapField.newMapField( ResourceArgUniqueIdDefaultEntryHolder.defaultEntry); @@ -2508,9 +2549,10 @@ public Builder putAllArgAttr( if (!resourceArgUniqueId_.isMutable()) { resourceArgUniqueId_ = resourceArgUniqueId_.copy(); } + bitField0_ |= 0x00000008; + onChanged(); return resourceArgUniqueId_; } - public int getResourceArgUniqueIdCount() { return internalGetResourceArgUniqueId().getMap().size(); } @@ -2519,19 +2561,20 @@ public int getResourceArgUniqueIdCount() { * Unique IDs for each resource argument, used to track aliasing resources. If * Argument A and Argument B alias each other, then * resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index]. + * * If this field is empty, none of the arguments could alias; otherwise, every * resource argument should have an entry in this field. + * * When instantiated, the unique IDs will be attached to the _Arg nodes' * "_resource_arg_unique_id" attribute. *
    * * map<uint32, uint32> resource_arg_unique_id = 8; */ - @java.lang.Override public boolean containsResourceArgUniqueId( int key) { - + return internalGetResourceArgUniqueId().getMap().containsKey(key); } /** @@ -2547,8 +2590,10 @@ public java.util.Map getResourceArgUniqueI * Unique IDs for each resource argument, used to track aliasing resources. If * Argument A and Argument B alias each other, then * resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index]. + * * If this field is empty, none of the arguments could alias; otherwise, every * resource argument should have an entry in this field. + * * When instantiated, the unique IDs will be attached to the _Arg nodes' * "_resource_arg_unique_id" attribute. *
    @@ -2556,7 +2601,6 @@ public java.util.Map getResourceArgUniqueI * map<uint32, uint32> resource_arg_unique_id = 8; */ @java.lang.Override - public java.util.Map getResourceArgUniqueIdMap() { return internalGetResourceArgUniqueId().getMap(); } @@ -2565,8 +2609,10 @@ public java.util.Map getResourceArgUniqueI * Unique IDs for each resource argument, used to track aliasing resources. If * Argument A and Argument B alias each other, then * resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index]. + * * If this field is empty, none of the arguments could alias; otherwise, every * resource argument should have an entry in this field. + * * When instantiated, the unique IDs will be attached to the _Arg nodes' * "_resource_arg_unique_id" attribute. *
    @@ -2574,11 +2620,10 @@ public java.util.Map getResourceArgUniqueI * map<uint32, uint32> resource_arg_unique_id = 8; */ @java.lang.Override - public int getResourceArgUniqueIdOrDefault( int key, int defaultValue) { - + java.util.Map map = internalGetResourceArgUniqueId().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; @@ -2588,8 +2633,10 @@ public int getResourceArgUniqueIdOrDefault( * Unique IDs for each resource argument, used to track aliasing resources. If * Argument A and Argument B alias each other, then * resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index]. + * * If this field is empty, none of the arguments could alias; otherwise, every * resource argument should have an entry in this field. + * * When instantiated, the unique IDs will be attached to the _Arg nodes' * "_resource_arg_unique_id" attribute. *
    @@ -2597,10 +2644,9 @@ public int getResourceArgUniqueIdOrDefault( * map<uint32, uint32> resource_arg_unique_id = 8; */ @java.lang.Override - public int getResourceArgUniqueIdOrThrow( int key) { - + java.util.Map map = internalGetResourceArgUniqueId().getMap(); if (!map.containsKey(key)) { @@ -2608,8 +2654,8 @@ public int getResourceArgUniqueIdOrThrow( } return map.get(key); } - public Builder clearResourceArgUniqueId() { + bitField0_ = (bitField0_ & ~0x00000008); internalGetMutableResourceArgUniqueId().getMutableMap() .clear(); return this; @@ -2619,18 +2665,19 @@ public Builder clearResourceArgUniqueId() { * Unique IDs for each resource argument, used to track aliasing resources. If * Argument A and Argument B alias each other, then * resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index]. + * * If this field is empty, none of the arguments could alias; otherwise, every * resource argument should have an entry in this field. + * * When instantiated, the unique IDs will be attached to the _Arg nodes' * "_resource_arg_unique_id" attribute. *
    * * map<uint32, uint32> resource_arg_unique_id = 8; */ - public Builder removeResourceArgUniqueId( int key) { - + internalGetMutableResourceArgUniqueId().getMutableMap() .remove(key); return this; @@ -2640,7 +2687,8 @@ public Builder removeResourceArgUniqueId( */ @java.lang.Deprecated public java.util.Map - getMutableResourceArgUniqueId() { + getMutableResourceArgUniqueId() { + bitField0_ |= 0x00000008; return internalGetMutableResourceArgUniqueId().getMutableMap(); } /** @@ -2648,8 +2696,10 @@ public Builder removeResourceArgUniqueId( * Unique IDs for each resource argument, used to track aliasing resources. If * Argument A and Argument B alias each other, then * resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index]. + * * If this field is empty, none of the arguments could alias; otherwise, every * resource argument should have an entry in this field. + * * When instantiated, the unique IDs will be attached to the _Arg nodes' * "_resource_arg_unique_id" attribute. *
    @@ -2659,10 +2709,11 @@ public Builder removeResourceArgUniqueId( public Builder putResourceArgUniqueId( int key, int value) { - - + + internalGetMutableResourceArgUniqueId().getMutableMap() .put(key, value); + bitField0_ |= 0x00000008; return this; } /** @@ -2670,32 +2721,34 @@ public Builder putResourceArgUniqueId( * Unique IDs for each resource argument, used to track aliasing resources. If * Argument A and Argument B alias each other, then * resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index]. + * * If this field is empty, none of the arguments could alias; otherwise, every * resource argument should have an entry in this field. + * * When instantiated, the unique IDs will be attached to the _Arg nodes' * "_resource_arg_unique_id" attribute. *
    * * map<uint32, uint32> resource_arg_unique_id = 8; */ - public Builder putAllResourceArgUniqueId( java.util.Map values) { internalGetMutableResourceArgUniqueId().getMutableMap() .putAll(values); + bitField0_ |= 0x00000008; return this; } private java.util.List nodeDef_ = java.util.Collections.emptyList(); private void ensureNodeDefIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { + if (!((bitField0_ & 0x00000010) != 0)) { nodeDef_ = new java.util.ArrayList(nodeDef_); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.NodeDef, org.tensorflow.proto.NodeDef.Builder, org.tensorflow.proto.NodeDefOrBuilder> nodeDefBuilder_; /** @@ -2907,7 +2960,7 @@ public Builder addAllNodeDef( public Builder clearNodeDef() { if (nodeDefBuilder_ == null) { nodeDef_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); onChanged(); } else { nodeDefBuilder_.clear(); @@ -3019,14 +3072,14 @@ public org.tensorflow.proto.NodeDef.Builder addNodeDefBuilder( getNodeDefBuilderList() { return getNodeDefFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.NodeDef, org.tensorflow.proto.NodeDef.Builder, org.tensorflow.proto.NodeDefOrBuilder> getNodeDefFieldBuilder() { if (nodeDefBuilder_ == null) { - nodeDefBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + nodeDefBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.NodeDef, org.tensorflow.proto.NodeDef.Builder, org.tensorflow.proto.NodeDefOrBuilder>( nodeDef_, - ((bitField0_ & 0x00000008) != 0), + ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); nodeDef_ = null; @@ -3037,7 +3090,7 @@ public org.tensorflow.proto.NodeDef.Builder addNodeDefBuilder( private com.google.protobuf.MapField< java.lang.String, java.lang.String> ret_; private com.google.protobuf.MapField - internalGetRet() { + internalGetRet() { if (ret_ == null) { return com.google.protobuf.MapField.emptyMapField( RetDefaultEntryHolder.defaultEntry); @@ -3045,8 +3098,7 @@ public org.tensorflow.proto.NodeDef.Builder addNodeDefBuilder( return ret_; } private com.google.protobuf.MapField - internalGetMutableRet() { - onChanged();; + internalGetMutableRet() { if (ret_ == null) { ret_ = com.google.protobuf.MapField.newMapField( RetDefaultEntryHolder.defaultEntry); @@ -3054,9 +3106,10 @@ public org.tensorflow.proto.NodeDef.Builder addNodeDefBuilder( if (!ret_.isMutable()) { ret_ = ret_.copy(); } + bitField0_ |= 0x00000020; + onChanged(); return ret_; } - public int getRetCount() { return internalGetRet().getMap().size(); } @@ -3068,7 +3121,6 @@ public int getRetCount() { * * map<string, string> ret = 4; */ - @java.lang.Override public boolean containsRet( java.lang.String key) { @@ -3092,7 +3144,6 @@ public java.util.Map getRet() { * map<string, string> ret = 4; */ @java.lang.Override - public java.util.Map getRetMap() { return internalGetRet().getMap(); } @@ -3105,10 +3156,11 @@ public java.util.Map getRetMap() { * map<string, string> ret = 4; */ @java.lang.Override - - public java.lang.String getRetOrDefault( + public /* nullable */ +java.lang.String getRetOrDefault( java.lang.String key, - java.lang.String defaultValue) { + /* nullable */ +java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetRet().getMap(); @@ -3123,7 +3175,6 @@ public java.lang.String getRetOrDefault( * map<string, string> ret = 4; */ @java.lang.Override - public java.lang.String getRetOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } @@ -3134,8 +3185,8 @@ public java.lang.String getRetOrThrow( } return map.get(key); } - public Builder clearRet() { + bitField0_ = (bitField0_ & ~0x00000020); internalGetMutableRet().getMutableMap() .clear(); return this; @@ -3148,7 +3199,6 @@ public Builder clearRet() { * * map<string, string> ret = 4; */ - public Builder removeRet( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } @@ -3161,7 +3211,8 @@ public Builder removeRet( */ @java.lang.Deprecated public java.util.Map - getMutableRet() { + getMutableRet() { + bitField0_ |= 0x00000020; return internalGetMutableRet().getMutableMap(); } /** @@ -3176,12 +3227,10 @@ public Builder putRet( java.lang.String key, java.lang.String value) { if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { - throw new NullPointerException("map value"); -} - + if (value == null) { throw new NullPointerException("map value"); } internalGetMutableRet().getMutableMap() .put(key, value); + bitField0_ |= 0x00000020; return this; } /** @@ -3192,18 +3241,18 @@ public Builder putRet( * * map<string, string> ret = 4; */ - public Builder putAllRet( java.util.Map values) { internalGetMutableRet().getMutableMap() .putAll(values); + bitField0_ |= 0x00000020; return this; } private com.google.protobuf.MapField< java.lang.String, java.lang.String> controlRet_; private com.google.protobuf.MapField - internalGetControlRet() { + internalGetControlRet() { if (controlRet_ == null) { return com.google.protobuf.MapField.emptyMapField( ControlRetDefaultEntryHolder.defaultEntry); @@ -3211,8 +3260,7 @@ public Builder putAllRet( return controlRet_; } private com.google.protobuf.MapField - internalGetMutableControlRet() { - onChanged();; + internalGetMutableControlRet() { if (controlRet_ == null) { controlRet_ = com.google.protobuf.MapField.newMapField( ControlRetDefaultEntryHolder.defaultEntry); @@ -3220,9 +3268,10 @@ public Builder putAllRet( if (!controlRet_.isMutable()) { controlRet_ = controlRet_.copy(); } + bitField0_ |= 0x00000040; + onChanged(); return controlRet_; } - public int getControlRetCount() { return internalGetControlRet().getMap().size(); } @@ -3234,7 +3283,6 @@ public int getControlRetCount() { * * map<string, string> control_ret = 6; */ - @java.lang.Override public boolean containsControlRet( java.lang.String key) { @@ -3258,7 +3306,6 @@ public java.util.Map getControlRet() { * map<string, string> control_ret = 6; */ @java.lang.Override - public java.util.Map getControlRetMap() { return internalGetControlRet().getMap(); } @@ -3271,10 +3318,11 @@ public java.util.Map getControlRetMap() { * map<string, string> control_ret = 6; */ @java.lang.Override - - public java.lang.String getControlRetOrDefault( + public /* nullable */ +java.lang.String getControlRetOrDefault( java.lang.String key, - java.lang.String defaultValue) { + /* nullable */ +java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetControlRet().getMap(); @@ -3289,7 +3337,6 @@ public java.lang.String getControlRetOrDefault( * map<string, string> control_ret = 6; */ @java.lang.Override - public java.lang.String getControlRetOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } @@ -3300,8 +3347,8 @@ public java.lang.String getControlRetOrThrow( } return map.get(key); } - public Builder clearControlRet() { + bitField0_ = (bitField0_ & ~0x00000040); internalGetMutableControlRet().getMutableMap() .clear(); return this; @@ -3314,7 +3361,6 @@ public Builder clearControlRet() { * * map<string, string> control_ret = 6; */ - public Builder removeControlRet( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } @@ -3327,7 +3373,8 @@ public Builder removeControlRet( */ @java.lang.Deprecated public java.util.Map - getMutableControlRet() { + getMutableControlRet() { + bitField0_ |= 0x00000040; return internalGetMutableControlRet().getMutableMap(); } /** @@ -3342,12 +3389,10 @@ public Builder putControlRet( java.lang.String key, java.lang.String value) { if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { - throw new NullPointerException("map value"); -} - + if (value == null) { throw new NullPointerException("map value"); } internalGetMutableControlRet().getMutableMap() .put(key, value); + bitField0_ |= 0x00000040; return this; } /** @@ -3358,25 +3403,13 @@ public Builder putControlRet( * * map<string, string> control_ret = 6; */ - public Builder putAllControlRet( java.util.Map values) { internalGetMutableControlRet().getMutableMap() .putAll(values); + bitField0_ |= 0x00000040; return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.FunctionDef) } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionDefLibrary.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionDefLibrary.java index 05fa7747079..13f92728ca4 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionDefLibrary.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionDefLibrary.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/framework/function.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -11,12 +13,21 @@ * Protobuf type {@code tensorflow.FunctionDefLibrary} */ public final class FunctionDefLibrary extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.FunctionDefLibrary) FunctionDefLibraryOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + FunctionDefLibrary.class.getName()); + } // Use FunctionDefLibrary.newBuilder() to construct. - private FunctionDefLibrary(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private FunctionDefLibrary(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private FunctionDefLibrary() { @@ -25,25 +36,13 @@ private FunctionDefLibrary() { registeredGradients_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new FunctionDefLibrary(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.FunctionProtos.internal_static_tensorflow_FunctionDefLibrary_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.FunctionProtos.internal_static_tensorflow_FunctionDefLibrary_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -51,6 +50,7 @@ protected java.lang.Object newInstance( } public static final int FUNCTION_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List function_; /** * repeated .tensorflow.FunctionDef function = 1; @@ -91,6 +91,7 @@ public org.tensorflow.proto.FunctionDefOrBuilder getFunctionOrBuilder( } public static final int GRADIENT_FIELD_NUMBER = 2; + @SuppressWarnings("serial") private java.util.List gradient_; /** * repeated .tensorflow.GradientDef gradient = 2; @@ -131,6 +132,7 @@ public org.tensorflow.proto.GradientDefOrBuilder getGradientOrBuilder( } public static final int REGISTERED_GRADIENTS_FIELD_NUMBER = 3; + @SuppressWarnings("serial") private java.util.List registeredGradients_; /** * repeated .tensorflow.RegisteredGradient registered_gradients = 3; @@ -297,39 +299,41 @@ public static org.tensorflow.proto.FunctionDefLibrary parseFrom( } public static org.tensorflow.proto.FunctionDefLibrary parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.FunctionDefLibrary parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.FunctionDefLibrary parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.FunctionDefLibrary parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.FunctionDefLibrary parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.FunctionDefLibrary parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -349,7 +353,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -361,7 +365,7 @@ protected Builder newBuilderForType( * Protobuf type {@code tensorflow.FunctionDefLibrary} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.FunctionDefLibrary) org.tensorflow.proto.FunctionDefLibraryOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -370,7 +374,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.FunctionProtos.internal_static_tensorflow_FunctionDefLibrary_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -383,13 +387,14 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (functionBuilder_ == null) { function_ = java.util.Collections.emptyList(); } else { @@ -437,7 +442,13 @@ public org.tensorflow.proto.FunctionDefLibrary build() { @java.lang.Override public org.tensorflow.proto.FunctionDefLibrary buildPartial() { org.tensorflow.proto.FunctionDefLibrary result = new org.tensorflow.proto.FunctionDefLibrary(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(org.tensorflow.proto.FunctionDefLibrary result) { if (functionBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { function_ = java.util.Collections.unmodifiableList(function_); @@ -465,42 +476,12 @@ public org.tensorflow.proto.FunctionDefLibrary buildPartial() { } else { result.registeredGradients_ = registeredGradientsBuilder_.build(); } - onBuilt(); - return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.FunctionDefLibrary result) { + int from_bitField0_ = bitField0_; } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.FunctionDefLibrary) { @@ -532,7 +513,7 @@ public Builder mergeFrom(org.tensorflow.proto.FunctionDefLibrary other) { function_ = other.function_; bitField0_ = (bitField0_ & ~0x00000001); functionBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getFunctionFieldBuilder() : null; } else { functionBuilder_.addAllMessages(other.function_); @@ -558,7 +539,7 @@ public Builder mergeFrom(org.tensorflow.proto.FunctionDefLibrary other) { gradient_ = other.gradient_; bitField0_ = (bitField0_ & ~0x00000002); gradientBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getGradientFieldBuilder() : null; } else { gradientBuilder_.addAllMessages(other.gradient_); @@ -584,7 +565,7 @@ public Builder mergeFrom(org.tensorflow.proto.FunctionDefLibrary other) { registeredGradients_ = other.registeredGradients_; bitField0_ = (bitField0_ & ~0x00000004); registeredGradientsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getRegisteredGradientsFieldBuilder() : null; } else { registeredGradientsBuilder_.addAllMessages(other.registeredGradients_); @@ -682,7 +663,7 @@ private void ensureFunctionIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.FunctionDef, org.tensorflow.proto.FunctionDef.Builder, org.tensorflow.proto.FunctionDefOrBuilder> functionBuilder_; /** @@ -898,11 +879,11 @@ public org.tensorflow.proto.FunctionDef.Builder addFunctionBuilder( getFunctionBuilderList() { return getFunctionFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.FunctionDef, org.tensorflow.proto.FunctionDef.Builder, org.tensorflow.proto.FunctionDefOrBuilder> getFunctionFieldBuilder() { if (functionBuilder_ == null) { - functionBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + functionBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.FunctionDef, org.tensorflow.proto.FunctionDef.Builder, org.tensorflow.proto.FunctionDefOrBuilder>( function_, ((bitField0_ & 0x00000001) != 0), @@ -922,7 +903,7 @@ private void ensureGradientIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.GradientDef, org.tensorflow.proto.GradientDef.Builder, org.tensorflow.proto.GradientDefOrBuilder> gradientBuilder_; /** @@ -1138,11 +1119,11 @@ public org.tensorflow.proto.GradientDef.Builder addGradientBuilder( getGradientBuilderList() { return getGradientFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.GradientDef, org.tensorflow.proto.GradientDef.Builder, org.tensorflow.proto.GradientDefOrBuilder> getGradientFieldBuilder() { if (gradientBuilder_ == null) { - gradientBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + gradientBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.GradientDef, org.tensorflow.proto.GradientDef.Builder, org.tensorflow.proto.GradientDefOrBuilder>( gradient_, ((bitField0_ & 0x00000002) != 0), @@ -1162,7 +1143,7 @@ private void ensureRegisteredGradientsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.RegisteredGradient, org.tensorflow.proto.RegisteredGradient.Builder, org.tensorflow.proto.RegisteredGradientOrBuilder> registeredGradientsBuilder_; /** @@ -1378,11 +1359,11 @@ public org.tensorflow.proto.RegisteredGradient.Builder addRegisteredGradientsBui getRegisteredGradientsBuilderList() { return getRegisteredGradientsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.RegisteredGradient, org.tensorflow.proto.RegisteredGradient.Builder, org.tensorflow.proto.RegisteredGradientOrBuilder> getRegisteredGradientsFieldBuilder() { if (registeredGradientsBuilder_ == null) { - registeredGradientsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + registeredGradientsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.RegisteredGradient, org.tensorflow.proto.RegisteredGradient.Builder, org.tensorflow.proto.RegisteredGradientOrBuilder>( registeredGradients_, ((bitField0_ & 0x00000004) != 0), @@ -1392,18 +1373,6 @@ public org.tensorflow.proto.RegisteredGradient.Builder addRegisteredGradientsBui } return registeredGradientsBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.FunctionDefLibrary) } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionDefLibraryOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionDefLibraryOrBuilder.java index f2169998270..5dfb6aefc69 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionDefLibraryOrBuilder.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionDefLibraryOrBuilder.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/framework/function.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionDefOrBuilder.java index f91238f01eb..cd87f92a585 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionDefOrBuilder.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionDefOrBuilder.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/framework/function.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -76,7 +78,6 @@ boolean containsAttr( * * map<string, .tensorflow.AttrValue> attr = 5; */ - /* nullable */ org.tensorflow.proto.AttrValue getAttrOrDefault( java.lang.String key, @@ -89,7 +90,6 @@ org.tensorflow.proto.AttrValue getAttrOrDefault( * * map<string, .tensorflow.AttrValue> attr = 5; */ - org.tensorflow.proto.AttrValue getAttrOrThrow( java.lang.String key); @@ -116,7 +116,6 @@ boolean containsArgAttr( /** * map<uint32, .tensorflow.FunctionDef.ArgAttrs> arg_attr = 7; */ - /* nullable */ org.tensorflow.proto.FunctionDef.ArgAttrs getArgAttrOrDefault( int key, @@ -125,7 +124,6 @@ org.tensorflow.proto.FunctionDef.ArgAttrs getArgAttrOrDefault( /** * map<uint32, .tensorflow.FunctionDef.ArgAttrs> arg_attr = 7; */ - org.tensorflow.proto.FunctionDef.ArgAttrs getArgAttrOrThrow( int key); @@ -134,8 +132,10 @@ org.tensorflow.proto.FunctionDef.ArgAttrs getArgAttrOrThrow( * Unique IDs for each resource argument, used to track aliasing resources. If * Argument A and Argument B alias each other, then * resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index]. + * * If this field is empty, none of the arguments could alias; otherwise, every * resource argument should have an entry in this field. + * * When instantiated, the unique IDs will be attached to the _Arg nodes' * "_resource_arg_unique_id" attribute. *
    @@ -148,8 +148,10 @@ org.tensorflow.proto.FunctionDef.ArgAttrs getArgAttrOrThrow( * Unique IDs for each resource argument, used to track aliasing resources. If * Argument A and Argument B alias each other, then * resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index]. + * * If this field is empty, none of the arguments could alias; otherwise, every * resource argument should have an entry in this field. + * * When instantiated, the unique IDs will be attached to the _Arg nodes' * "_resource_arg_unique_id" attribute. *
    @@ -169,8 +171,10 @@ boolean containsResourceArgUniqueId( * Unique IDs for each resource argument, used to track aliasing resources. If * Argument A and Argument B alias each other, then * resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index]. + * * If this field is empty, none of the arguments could alias; otherwise, every * resource argument should have an entry in this field. + * * When instantiated, the unique IDs will be attached to the _Arg nodes' * "_resource_arg_unique_id" attribute. *
    @@ -184,15 +188,16 @@ boolean containsResourceArgUniqueId( * Unique IDs for each resource argument, used to track aliasing resources. If * Argument A and Argument B alias each other, then * resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index]. + * * If this field is empty, none of the arguments could alias; otherwise, every * resource argument should have an entry in this field. + * * When instantiated, the unique IDs will be attached to the _Arg nodes' * "_resource_arg_unique_id" attribute. *
    * * map<uint32, uint32> resource_arg_unique_id = 8; */ - int getResourceArgUniqueIdOrDefault( int key, int defaultValue); @@ -201,15 +206,16 @@ int getResourceArgUniqueIdOrDefault( * Unique IDs for each resource argument, used to track aliasing resources. If * Argument A and Argument B alias each other, then * resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index]. + * * If this field is empty, none of the arguments could alias; otherwise, every * resource argument should have an entry in this field. + * * When instantiated, the unique IDs will be attached to the _Arg nodes' * "_resource_arg_unique_id" attribute. *
    * * map<uint32, uint32> resource_arg_unique_id = 8; */ - int getResourceArgUniqueIdOrThrow( int key); @@ -310,7 +316,6 @@ boolean containsRet( * * map<string, string> ret = 4; */ - /* nullable */ java.lang.String getRetOrDefault( java.lang.String key, @@ -324,7 +329,6 @@ java.lang.String getRetOrDefault( * * map<string, string> ret = 4; */ - java.lang.String getRetOrThrow( java.lang.String key); @@ -371,7 +375,6 @@ boolean containsControlRet( * * map<string, string> control_ret = 6; */ - /* nullable */ java.lang.String getControlRetOrDefault( java.lang.String key, @@ -385,7 +388,6 @@ java.lang.String getControlRetOrDefault( * * map<string, string> control_ret = 6; */ - java.lang.String getControlRetOrThrow( java.lang.String key); } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionProtos.java index 0c0f205de0b..202accf0318 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionProtos.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionProtos.java @@ -1,10 +1,21 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/framework/function.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; public final class FunctionProtos { private FunctionProtos() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + FunctionProtos.class.getName()); + } public static void registerAllExtensions( com.google.protobuf.ExtensionRegistryLite registry) { } @@ -17,57 +28,57 @@ public static void registerAllExtensions( static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_FunctionDefLibrary_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_FunctionDefLibrary_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_FunctionDef_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_FunctionDef_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_FunctionDef_AttrEntry_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_FunctionDef_AttrEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_FunctionDef_ArgAttrs_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_FunctionDef_ArgAttrs_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_FunctionDef_ArgAttrs_AttrEntry_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_FunctionDef_ArgAttrs_AttrEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_FunctionDef_ArgAttrEntry_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_FunctionDef_ArgAttrEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_FunctionDef_ResourceArgUniqueIdEntry_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_FunctionDef_ResourceArgUniqueIdEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_FunctionDef_RetEntry_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_FunctionDef_RetEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_FunctionDef_ControlRetEntry_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_FunctionDef_ControlRetEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_GradientDef_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_GradientDef_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_RegisteredGradient_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_RegisteredGradient_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor @@ -126,69 +137,70 @@ public static void registerAllExtensions( internal_static_tensorflow_FunctionDefLibrary_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_tensorflow_FunctionDefLibrary_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_FunctionDefLibrary_descriptor, new java.lang.String[] { "Function", "Gradient", "RegisteredGradients", }); internal_static_tensorflow_FunctionDef_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_tensorflow_FunctionDef_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_FunctionDef_descriptor, new java.lang.String[] { "Signature", "Attr", "ArgAttr", "ResourceArgUniqueId", "NodeDef", "Ret", "ControlRet", }); internal_static_tensorflow_FunctionDef_AttrEntry_descriptor = internal_static_tensorflow_FunctionDef_descriptor.getNestedTypes().get(0); internal_static_tensorflow_FunctionDef_AttrEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_FunctionDef_AttrEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_tensorflow_FunctionDef_ArgAttrs_descriptor = internal_static_tensorflow_FunctionDef_descriptor.getNestedTypes().get(1); internal_static_tensorflow_FunctionDef_ArgAttrs_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_FunctionDef_ArgAttrs_descriptor, new java.lang.String[] { "Attr", }); internal_static_tensorflow_FunctionDef_ArgAttrs_AttrEntry_descriptor = internal_static_tensorflow_FunctionDef_ArgAttrs_descriptor.getNestedTypes().get(0); internal_static_tensorflow_FunctionDef_ArgAttrs_AttrEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_FunctionDef_ArgAttrs_AttrEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_tensorflow_FunctionDef_ArgAttrEntry_descriptor = internal_static_tensorflow_FunctionDef_descriptor.getNestedTypes().get(2); internal_static_tensorflow_FunctionDef_ArgAttrEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_FunctionDef_ArgAttrEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_tensorflow_FunctionDef_ResourceArgUniqueIdEntry_descriptor = internal_static_tensorflow_FunctionDef_descriptor.getNestedTypes().get(3); internal_static_tensorflow_FunctionDef_ResourceArgUniqueIdEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_FunctionDef_ResourceArgUniqueIdEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_tensorflow_FunctionDef_RetEntry_descriptor = internal_static_tensorflow_FunctionDef_descriptor.getNestedTypes().get(4); internal_static_tensorflow_FunctionDef_RetEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_FunctionDef_RetEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_tensorflow_FunctionDef_ControlRetEntry_descriptor = internal_static_tensorflow_FunctionDef_descriptor.getNestedTypes().get(5); internal_static_tensorflow_FunctionDef_ControlRetEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_FunctionDef_ControlRetEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_tensorflow_GradientDef_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_tensorflow_GradientDef_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_GradientDef_descriptor, new java.lang.String[] { "FunctionName", "GradientFunc", }); internal_static_tensorflow_RegisteredGradient_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_tensorflow_RegisteredGradient_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_RegisteredGradient_descriptor, new java.lang.String[] { "GradientFunc", "RegisteredOpType", }); + descriptor.resolveAllFeaturesImmutable(); org.tensorflow.proto.AttrValueProtos.getDescriptor(); org.tensorflow.proto.NodeProto.getDescriptor(); org.tensorflow.proto.OpDefProtos.getDescriptor(); diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GPUInfo.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GPUInfo.java index 858f216fb45..32cf218ca81 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GPUInfo.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GPUInfo.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: xla/tsl/protobuf/test_log.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -7,12 +9,21 @@ * Protobuf type {@code tensorflow.GPUInfo} */ public final class GPUInfo extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.GPUInfo) GPUInfoOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + GPUInfo.class.getName()); + } // Use GPUInfo.newBuilder() to construct. - private GPUInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private GPUInfo(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private GPUInfo() { @@ -21,25 +32,13 @@ private GPUInfo() { busId_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GPUInfo(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_GPUInfo_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_GPUInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -47,7 +46,8 @@ protected java.lang.Object newInstance( } public static final int MODEL_FIELD_NUMBER = 1; - private volatile java.lang.Object model_; + @SuppressWarnings("serial") + private volatile java.lang.Object model_ = ""; /** *
        * e.g. "Tesla K40c"
    @@ -93,7 +93,8 @@ public java.lang.String getModel() {
       }
     
       public static final int UUID_FIELD_NUMBER = 2;
    -  private volatile java.lang.Object uuid_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object uuid_ = "";
       /**
        * 
        * Final entry in output of "nvidia-smi -L"
    @@ -139,7 +140,8 @@ public java.lang.String getUuid() {
       }
     
       public static final int BUS_ID_FIELD_NUMBER = 3;
    -  private volatile java.lang.Object busId_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object busId_ = "";
       /**
        * 
        * e.g. "0000:04:00.0"
    @@ -198,14 +200,14 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, model_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(model_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, model_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uuid_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uuid_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uuid_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 2, uuid_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(busId_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, busId_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(busId_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 3, busId_);
         }
         getUnknownFields().writeTo(output);
       }
    @@ -216,14 +218,14 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, model_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(model_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, model_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uuid_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uuid_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uuid_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(2, uuid_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(busId_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, busId_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(busId_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(3, busId_);
         }
         size += getUnknownFields().getSerializedSize();
         memoizedSize = size;
    @@ -302,39 +304,41 @@ public static org.tensorflow.proto.GPUInfo parseFrom(
       }
       public static org.tensorflow.proto.GPUInfo parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.GPUInfo parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.GPUInfo parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.GPUInfo parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.GPUInfo parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.GPUInfo parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -354,7 +358,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -362,7 +366,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.GPUInfo}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.GPUInfo)
           org.tensorflow.proto.GPUInfoOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -371,7 +375,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_GPUInfo_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -384,19 +388,17 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           model_ = "";
    -
           uuid_ = "";
    -
           busId_ = "";
    -
           return this;
         }
     
    @@ -423,45 +425,24 @@ public org.tensorflow.proto.GPUInfo build() {
         @java.lang.Override
         public org.tensorflow.proto.GPUInfo buildPartial() {
           org.tensorflow.proto.GPUInfo result = new org.tensorflow.proto.GPUInfo(this);
    -      result.model_ = model_;
    -      result.uuid_ = uuid_;
    -      result.busId_ = busId_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.GPUInfo result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.model_ = model_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.uuid_ = uuid_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.busId_ = busId_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.GPUInfo) {
    @@ -476,14 +457,17 @@ public Builder mergeFrom(org.tensorflow.proto.GPUInfo other) {
           if (other == org.tensorflow.proto.GPUInfo.getDefaultInstance()) return this;
           if (!other.getModel().isEmpty()) {
             model_ = other.model_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (!other.getUuid().isEmpty()) {
             uuid_ = other.uuid_;
    +        bitField0_ |= 0x00000002;
             onChanged();
           }
           if (!other.getBusId().isEmpty()) {
             busId_ = other.busId_;
    +        bitField0_ |= 0x00000004;
             onChanged();
           }
           this.mergeUnknownFields(other.getUnknownFields());
    @@ -514,17 +498,17 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   model_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
                   uuid_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 case 26: {
                   busId_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 26
                 default: {
    @@ -542,6 +526,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private java.lang.Object model_ = "";
         /**
    @@ -596,11 +581,9 @@ public java.lang.String getModel() {
          */
         public Builder setModel(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           model_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -613,8 +596,8 @@ public Builder setModel(
          * @return This builder for chaining.
          */
         public Builder clearModel() {
    -      
           model_ = getDefaultInstance().getModel();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -629,12 +612,10 @@ public Builder clearModel() {
          */
         public Builder setModelBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           model_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -692,11 +673,9 @@ public java.lang.String getUuid() {
          */
         public Builder setUuid(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           uuid_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -709,8 +688,8 @@ public Builder setUuid(
          * @return This builder for chaining.
          */
         public Builder clearUuid() {
    -      
           uuid_ = getDefaultInstance().getUuid();
    +      bitField0_ = (bitField0_ & ~0x00000002);
           onChanged();
           return this;
         }
    @@ -725,12 +704,10 @@ public Builder clearUuid() {
          */
         public Builder setUuidBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           uuid_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -788,11 +765,9 @@ public java.lang.String getBusId() {
          */
         public Builder setBusId(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           busId_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -805,8 +780,8 @@ public Builder setBusId(
          * @return This builder for chaining.
          */
         public Builder clearBusId() {
    -      
           busId_ = getDefaultInstance().getBusId();
    +      bitField0_ = (bitField0_ & ~0x00000004);
           onChanged();
           return this;
         }
    @@ -821,27 +796,13 @@ public Builder clearBusId() {
          */
         public Builder setBusIdBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           busId_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.GPUInfo)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GPUInfoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GPUInfoOrBuilder.java
    index 02d2cc61740..0520a0f68fb 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GPUInfoOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GPUInfoOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: xla/tsl/protobuf/test_log.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GPUOptions.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GPUOptions.java
    index d9db2330adb..b63a758033d 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GPUOptions.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GPUOptions.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/config.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,12 +9,21 @@
      * Protobuf type {@code tensorflow.GPUOptions}
      */
     public final class GPUOptions extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.GPUOptions)
         GPUOptionsOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      GPUOptions.class.getName());
    +  }
       // Use GPUOptions.newBuilder() to construct.
    -  private GPUOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private GPUOptions(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private GPUOptions() {
    @@ -20,25 +31,13 @@ private GPUOptions() {
         visibleDeviceList_ = "";
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new GPUOptions();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_GPUOptions_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_GPUOptions_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -60,32 +59,35 @@ public interface ExperimentalOrBuilder extends
          * devices and have the <id> field assigned sequentially starting from 0,
          * according to the order of the virtual devices determined by
          * device_ordinal and the location in the virtual device list.
    +     *
          * For example,
    -     *   visible_device_list = "1,0"
    -     *   virtual_devices { memory_limit: 1GB memory_limit: 2GB }
    -     *   virtual_devices { memory_limit: 3GB memory_limit: 4GB }
    +     * visible_device_list = "1,0"
    +     * virtual_devices { memory_limit: 1GB memory_limit: 2GB }
    +     * virtual_devices { memory_limit: 3GB memory_limit: 4GB }
          * will create 4 virtual devices as:
    -     *   /device:GPU:0 -> visible GPU 1 with 1GB memory
    -     *   /device:GPU:1 -> visible GPU 1 with 2GB memory
    -     *   /device:GPU:2 -> visible GPU 0 with 3GB memory
    -     *   /device:GPU:3 -> visible GPU 0 with 4GB memory
    +     * /device:GPU:0 -> visible GPU 1 with 1GB memory
    +     * /device:GPU:1 -> visible GPU 1 with 2GB memory
    +     * /device:GPU:2 -> visible GPU 0 with 3GB memory
    +     * /device:GPU:3 -> visible GPU 0 with 4GB memory
    +     *
          * but
    -     *   visible_device_list = "1,0"
    -     *   virtual_devices { memory_limit: 1GB memory_limit: 2GB
    -     *                     device_ordinal: 10 device_ordinal: 20}
    -     *   virtual_devices { memory_limit: 3GB memory_limit: 4GB
    -     *                     device_ordinal: 10 device_ordinal: 20}
    +     * visible_device_list = "1,0"
    +     * virtual_devices { memory_limit: 1GB memory_limit: 2GB
    +     * device_ordinal: 10 device_ordinal: 20}
    +     * virtual_devices { memory_limit: 3GB memory_limit: 4GB
    +     * device_ordinal: 10 device_ordinal: 20}
          * will create 4 virtual devices as:
    -     *   /device:GPU:0 -> visible GPU 1 with 1GB memory  (ordinal 10)
    -     *   /device:GPU:1 -> visible GPU 0 with 3GB memory  (ordinal 10)
    -     *   /device:GPU:2 -> visible GPU 1 with 2GB memory  (ordinal 20)
    -     *   /device:GPU:3 -> visible GPU 0 with 4GB memory  (ordinal 20)
    +     * /device:GPU:0 -> visible GPU 1 with 1GB memory  (ordinal 10)
    +     * /device:GPU:1 -> visible GPU 0 with 3GB memory  (ordinal 10)
    +     * /device:GPU:2 -> visible GPU 1 with 2GB memory  (ordinal 20)
    +     * /device:GPU:3 -> visible GPU 0 with 4GB memory  (ordinal 20)
    +     *
          * NOTE:
          * 1. It's invalid to set both this and "per_process_gpu_memory_fraction"
    -     *    at the same time.
    +     * at the same time.
          * 2. Currently this setting is per-process, not per-session. Using
    -     *    different settings in different sessions within same process will
    -     *    result in undefined behavior.
    +     * different settings in different sessions within same process will
    +     * result in undefined behavior.
          * 
    * * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; @@ -103,32 +105,35 @@ public interface ExperimentalOrBuilder extends * devices and have the <id> field assigned sequentially starting from 0, * according to the order of the virtual devices determined by * device_ordinal and the location in the virtual device list. + * * For example, - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB } - * virtual_devices { memory_limit: 3GB memory_limit: 4GB } + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB } + * virtual_devices { memory_limit: 3GB memory_limit: 4GB } * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory - * /device:GPU:1 -> visible GPU 1 with 2GB memory - * /device:GPU:2 -> visible GPU 0 with 3GB memory - * /device:GPU:3 -> visible GPU 0 with 4GB memory + * /device:GPU:0 -> visible GPU 1 with 1GB memory + * /device:GPU:1 -> visible GPU 1 with 2GB memory + * /device:GPU:2 -> visible GPU 0 with 3GB memory + * /device:GPU:3 -> visible GPU 0 with 4GB memory + * * but - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB - * device_ordinal: 10 device_ordinal: 20} - * virtual_devices { memory_limit: 3GB memory_limit: 4GB - * device_ordinal: 10 device_ordinal: 20} + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB + * device_ordinal: 10 device_ordinal: 20} + * virtual_devices { memory_limit: 3GB memory_limit: 4GB + * device_ordinal: 10 device_ordinal: 20} * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) - * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) - * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) - * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) + * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) + * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) + * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * * NOTE: * 1. It's invalid to set both this and "per_process_gpu_memory_fraction" - * at the same time. + * at the same time. * 2. Currently this setting is per-process, not per-session. Using - * different settings in different sessions within same process will - * result in undefined behavior. + * different settings in different sessions within same process will + * result in undefined behavior. *
    * * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; @@ -145,32 +150,35 @@ public interface ExperimentalOrBuilder extends * devices and have the <id> field assigned sequentially starting from 0, * according to the order of the virtual devices determined by * device_ordinal and the location in the virtual device list. + * * For example, - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB } - * virtual_devices { memory_limit: 3GB memory_limit: 4GB } + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB } + * virtual_devices { memory_limit: 3GB memory_limit: 4GB } * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory - * /device:GPU:1 -> visible GPU 1 with 2GB memory - * /device:GPU:2 -> visible GPU 0 with 3GB memory - * /device:GPU:3 -> visible GPU 0 with 4GB memory + * /device:GPU:0 -> visible GPU 1 with 1GB memory + * /device:GPU:1 -> visible GPU 1 with 2GB memory + * /device:GPU:2 -> visible GPU 0 with 3GB memory + * /device:GPU:3 -> visible GPU 0 with 4GB memory + * * but - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB - * device_ordinal: 10 device_ordinal: 20} - * virtual_devices { memory_limit: 3GB memory_limit: 4GB - * device_ordinal: 10 device_ordinal: 20} + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB + * device_ordinal: 10 device_ordinal: 20} + * virtual_devices { memory_limit: 3GB memory_limit: 4GB + * device_ordinal: 10 device_ordinal: 20} * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) - * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) - * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) - * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) + * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) + * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) + * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * * NOTE: * 1. It's invalid to set both this and "per_process_gpu_memory_fraction" - * at the same time. + * at the same time. * 2. Currently this setting is per-process, not per-session. Using - * different settings in different sessions within same process will - * result in undefined behavior. + * different settings in different sessions within same process will + * result in undefined behavior. *
    * * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; @@ -187,32 +195,35 @@ public interface ExperimentalOrBuilder extends * devices and have the <id> field assigned sequentially starting from 0, * according to the order of the virtual devices determined by * device_ordinal and the location in the virtual device list. + * * For example, - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB } - * virtual_devices { memory_limit: 3GB memory_limit: 4GB } + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB } + * virtual_devices { memory_limit: 3GB memory_limit: 4GB } * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory - * /device:GPU:1 -> visible GPU 1 with 2GB memory - * /device:GPU:2 -> visible GPU 0 with 3GB memory - * /device:GPU:3 -> visible GPU 0 with 4GB memory + * /device:GPU:0 -> visible GPU 1 with 1GB memory + * /device:GPU:1 -> visible GPU 1 with 2GB memory + * /device:GPU:2 -> visible GPU 0 with 3GB memory + * /device:GPU:3 -> visible GPU 0 with 4GB memory + * * but - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB - * device_ordinal: 10 device_ordinal: 20} - * virtual_devices { memory_limit: 3GB memory_limit: 4GB - * device_ordinal: 10 device_ordinal: 20} + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB + * device_ordinal: 10 device_ordinal: 20} + * virtual_devices { memory_limit: 3GB memory_limit: 4GB + * device_ordinal: 10 device_ordinal: 20} * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) - * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) - * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) - * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) + * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) + * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) + * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * * NOTE: * 1. It's invalid to set both this and "per_process_gpu_memory_fraction" - * at the same time. + * at the same time. * 2. Currently this setting is per-process, not per-session. Using - * different settings in different sessions within same process will - * result in undefined behavior. + * different settings in different sessions within same process will + * result in undefined behavior. *
    * * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; @@ -230,32 +241,35 @@ public interface ExperimentalOrBuilder extends * devices and have the <id> field assigned sequentially starting from 0, * according to the order of the virtual devices determined by * device_ordinal and the location in the virtual device list. + * * For example, - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB } - * virtual_devices { memory_limit: 3GB memory_limit: 4GB } + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB } + * virtual_devices { memory_limit: 3GB memory_limit: 4GB } * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory - * /device:GPU:1 -> visible GPU 1 with 2GB memory - * /device:GPU:2 -> visible GPU 0 with 3GB memory - * /device:GPU:3 -> visible GPU 0 with 4GB memory + * /device:GPU:0 -> visible GPU 1 with 1GB memory + * /device:GPU:1 -> visible GPU 1 with 2GB memory + * /device:GPU:2 -> visible GPU 0 with 3GB memory + * /device:GPU:3 -> visible GPU 0 with 4GB memory + * * but - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB - * device_ordinal: 10 device_ordinal: 20} - * virtual_devices { memory_limit: 3GB memory_limit: 4GB - * device_ordinal: 10 device_ordinal: 20} + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB + * device_ordinal: 10 device_ordinal: 20} + * virtual_devices { memory_limit: 3GB memory_limit: 4GB + * device_ordinal: 10 device_ordinal: 20} * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) - * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) - * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) - * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) + * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) + * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) + * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * * NOTE: * 1. It's invalid to set both this and "per_process_gpu_memory_fraction" - * at the same time. + * at the same time. * 2. Currently this setting is per-process, not per-session. Using - * different settings in different sessions within same process will - * result in undefined behavior. + * different settings in different sessions within same process will + * result in undefined behavior. *
    * * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; @@ -352,6 +366,7 @@ org.tensorflow.proto.GPUOptions.Experimental.VirtualDevicesOrBuilder getVirtualD * Parameters for GPUKernelTracker. By default no kernel tracking is done. * Note that timestamped_allocator is only effective if some tracking is * specified. + * * If kernel_tracker_max_interval = n > 0, then a tracking event * is inserted after every n kernels without an event. *
    @@ -444,6 +459,7 @@ org.tensorflow.proto.GPUOptions.Experimental.VirtualDevicesOrBuilder getVirtualD * If true, then the host allocator allocates its max memory all upfront and * never grows. This can be useful for latency-sensitive systems, because * growing the GPU host memory pool can be expensive. + * * You probably only want to use this in combination with * gpu_host_mem_limit_in_mb, because the default GPU host memory limit is * quite high. @@ -509,12 +525,21 @@ org.tensorflow.proto.GPUOptions.Experimental.VirtualDevicesOrBuilder getVirtualD * Protobuf type {@code tensorflow.GPUOptions.Experimental} */ public static final class Experimental extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.GPUOptions.Experimental) ExperimentalOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + Experimental.class.getName()); + } // Use Experimental.newBuilder() to construct. - private Experimental(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Experimental(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Experimental() { @@ -522,25 +547,13 @@ private Experimental() { collectiveRingOrder_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Experimental(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_GPUOptions_Experimental_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_GPUOptions_Experimental_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -558,6 +571,7 @@ public interface VirtualDevicesOrBuilder extends * corresponding visible GPU (see "virtual_devices" below). * If empty and `num_virtual_devices_per_gpu` is not set, it will create * single virtual device taking all available memory from the device. + * * For the concept of "visible" and "virtual" GPU, see the comments for * "visible_device_list" above for more information. *
    @@ -573,6 +587,7 @@ public interface VirtualDevicesOrBuilder extends * corresponding visible GPU (see "virtual_devices" below). * If empty and `num_virtual_devices_per_gpu` is not set, it will create * single virtual device taking all available memory from the device. + * * For the concept of "visible" and "virtual" GPU, see the comments for * "visible_device_list" above for more information. *
    @@ -588,6 +603,7 @@ public interface VirtualDevicesOrBuilder extends * corresponding visible GPU (see "virtual_devices" below). * If empty and `num_virtual_devices_per_gpu` is not set, it will create * single virtual device taking all available memory from the device. + * * For the concept of "visible" and "virtual" GPU, see the comments for * "visible_device_list" above for more information. *
    @@ -603,8 +619,10 @@ public interface VirtualDevicesOrBuilder extends * Priority values to use with the virtual devices. Use the cuda function * cudaDeviceGetStreamPriorityRange to query for valid range of values for * priority. + * * On a P4000 GPU with cuda 10.1, the priority range reported was 0 for * least priority and -1 for greatest priority. + * * If this field is not specified, then the virtual devices will be * created with the default. If this field has values set, then the size * of this must match with the above memory_limit_mb. @@ -619,8 +637,10 @@ public interface VirtualDevicesOrBuilder extends * Priority values to use with the virtual devices. Use the cuda function * cudaDeviceGetStreamPriorityRange to query for valid range of values for * priority. + * * On a P4000 GPU with cuda 10.1, the priority range reported was 0 for * least priority and -1 for greatest priority. + * * If this field is not specified, then the virtual devices will be * created with the default. If this field has values set, then the size * of this must match with the above memory_limit_mb. @@ -635,8 +655,10 @@ public interface VirtualDevicesOrBuilder extends * Priority values to use with the virtual devices. Use the cuda function * cudaDeviceGetStreamPriorityRange to query for valid range of values for * priority. + * * On a P4000 GPU with cuda 10.1, the priority range reported was 0 for * least priority and -1 for greatest priority. + * * If this field is not specified, then the virtual devices will be * created with the default. If this field has values set, then the size * of this must match with the above memory_limit_mb. @@ -695,12 +717,21 @@ public interface VirtualDevicesOrBuilder extends * Protobuf type {@code tensorflow.GPUOptions.Experimental.VirtualDevices} */ public static final class VirtualDevices extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.GPUOptions.Experimental.VirtualDevices) VirtualDevicesOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + VirtualDevices.class.getName()); + } // Use VirtualDevices.newBuilder() to construct. - private VirtualDevices(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private VirtualDevices(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private VirtualDevices() { @@ -709,25 +740,13 @@ private VirtualDevices() { deviceOrdinal_ = emptyIntList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new VirtualDevices(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_GPUOptions_Experimental_VirtualDevices_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_GPUOptions_Experimental_VirtualDevices_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -735,7 +754,9 @@ protected java.lang.Object newInstance( } public static final int MEMORY_LIMIT_MB_FIELD_NUMBER = 1; - private com.google.protobuf.Internal.FloatList memoryLimitMb_; + @SuppressWarnings("serial") + private com.google.protobuf.Internal.FloatList memoryLimitMb_ = + emptyFloatList(); /** *
            * Per "virtual" device memory limit, in MB. The number of elements in
    @@ -743,6 +764,7 @@ protected java.lang.Object newInstance(
            * corresponding visible GPU (see "virtual_devices" below).
            * If empty and `num_virtual_devices_per_gpu` is not set, it will create
            * single virtual device taking all available memory from the device.
    +       *
            * For the concept of "visible" and "virtual" GPU, see the comments for
            * "visible_device_list" above for more information.
            * 
    @@ -762,6 +784,7 @@ protected java.lang.Object newInstance( * corresponding visible GPU (see "virtual_devices" below). * If empty and `num_virtual_devices_per_gpu` is not set, it will create * single virtual device taking all available memory from the device. + * * For the concept of "visible" and "virtual" GPU, see the comments for * "visible_device_list" above for more information. *
    @@ -779,6 +802,7 @@ public int getMemoryLimitMbCount() { * corresponding visible GPU (see "virtual_devices" below). * If empty and `num_virtual_devices_per_gpu` is not set, it will create * single virtual device taking all available memory from the device. + * * For the concept of "visible" and "virtual" GPU, see the comments for * "visible_device_list" above for more information. *
    @@ -793,14 +817,18 @@ public float getMemoryLimitMb(int index) { private int memoryLimitMbMemoizedSerializedSize = -1; public static final int PRIORITY_FIELD_NUMBER = 2; - private com.google.protobuf.Internal.IntList priority_; + @SuppressWarnings("serial") + private com.google.protobuf.Internal.IntList priority_ = + emptyIntList(); /** *
            * Priority values to use with the virtual devices. Use the cuda function
            * cudaDeviceGetStreamPriorityRange to query for valid range of values for
            * priority.
    +       *
            * On a P4000 GPU with cuda 10.1, the priority range reported was 0 for
            * least priority and -1 for greatest priority.
    +       *
            * If this field is not specified, then the virtual devices will be
            * created with the default. If this field has values set, then the size
            * of this must match with the above memory_limit_mb.
    @@ -819,8 +847,10 @@ public float getMemoryLimitMb(int index) {
            * Priority values to use with the virtual devices. Use the cuda function
            * cudaDeviceGetStreamPriorityRange to query for valid range of values for
            * priority.
    +       *
            * On a P4000 GPU with cuda 10.1, the priority range reported was 0 for
            * least priority and -1 for greatest priority.
    +       *
            * If this field is not specified, then the virtual devices will be
            * created with the default. If this field has values set, then the size
            * of this must match with the above memory_limit_mb.
    @@ -837,8 +867,10 @@ public int getPriorityCount() {
            * Priority values to use with the virtual devices. Use the cuda function
            * cudaDeviceGetStreamPriorityRange to query for valid range of values for
            * priority.
    +       *
            * On a P4000 GPU with cuda 10.1, the priority range reported was 0 for
            * least priority and -1 for greatest priority.
    +       *
            * If this field is not specified, then the virtual devices will be
            * created with the default. If this field has values set, then the size
            * of this must match with the above memory_limit_mb.
    @@ -854,7 +886,9 @@ public int getPriority(int index) {
           private int priorityMemoizedSerializedSize = -1;
     
           public static final int DEVICE_ORDINAL_FIELD_NUMBER = 3;
    -      private com.google.protobuf.Internal.IntList deviceOrdinal_;
    +      @SuppressWarnings("serial")
    +      private com.google.protobuf.Internal.IntList deviceOrdinal_ =
    +          emptyIntList();
           /**
            * 
            * Virtual Device ordinal number determines the device ID of the device.
    @@ -1069,39 +1103,41 @@ public static org.tensorflow.proto.GPUOptions.Experimental.VirtualDevices parseF
           }
           public static org.tensorflow.proto.GPUOptions.Experimental.VirtualDevices parseFrom(java.io.InputStream input)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input);
           }
           public static org.tensorflow.proto.GPUOptions.Experimental.VirtualDevices parseFrom(
               java.io.InputStream input,
               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input, extensionRegistry);
           }
    +
           public static org.tensorflow.proto.GPUOptions.Experimental.VirtualDevices parseDelimitedFrom(java.io.InputStream input)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseDelimitedWithIOException(PARSER, input);
           }
    +
           public static org.tensorflow.proto.GPUOptions.Experimental.VirtualDevices parseDelimitedFrom(
               java.io.InputStream input,
               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
           }
           public static org.tensorflow.proto.GPUOptions.Experimental.VirtualDevices parseFrom(
               com.google.protobuf.CodedInputStream input)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input);
           }
           public static org.tensorflow.proto.GPUOptions.Experimental.VirtualDevices parseFrom(
               com.google.protobuf.CodedInputStream input,
               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input, extensionRegistry);
           }
     
    @@ -1121,7 +1157,7 @@ public Builder toBuilder() {
     
           @java.lang.Override
           protected Builder newBuilderForType(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             Builder builder = new Builder(parent);
             return builder;
           }
    @@ -1134,7 +1170,7 @@ protected Builder newBuilderForType(
            * Protobuf type {@code tensorflow.GPUOptions.Experimental.VirtualDevices}
            */
           public static final class Builder extends
    -          com.google.protobuf.GeneratedMessageV3.Builder implements
    +          com.google.protobuf.GeneratedMessage.Builder implements
               // @@protoc_insertion_point(builder_implements:tensorflow.GPUOptions.Experimental.VirtualDevices)
               org.tensorflow.proto.GPUOptions.Experimental.VirtualDevicesOrBuilder {
             public static final com.google.protobuf.Descriptors.Descriptor
    @@ -1143,7 +1179,7 @@ public static final class Builder extends
             }
     
             @java.lang.Override
    -        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +        protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
                 internalGetFieldAccessorTable() {
               return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_GPUOptions_Experimental_VirtualDevices_fieldAccessorTable
                   .ensureFieldAccessorsInitialized(
    @@ -1156,19 +1192,17 @@ private Builder() {
             }
     
             private Builder(
    -            com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +            com.google.protobuf.GeneratedMessage.BuilderParent parent) {
               super(parent);
     
             }
             @java.lang.Override
             public Builder clear() {
               super.clear();
    +          bitField0_ = 0;
               memoryLimitMb_ = emptyFloatList();
    -          bitField0_ = (bitField0_ & ~0x00000001);
               priority_ = emptyIntList();
    -          bitField0_ = (bitField0_ & ~0x00000002);
               deviceOrdinal_ = emptyIntList();
    -          bitField0_ = (bitField0_ & ~0x00000004);
               return this;
             }
     
    @@ -1195,58 +1229,27 @@ public org.tensorflow.proto.GPUOptions.Experimental.VirtualDevices build() {
             @java.lang.Override
             public org.tensorflow.proto.GPUOptions.Experimental.VirtualDevices buildPartial() {
               org.tensorflow.proto.GPUOptions.Experimental.VirtualDevices result = new org.tensorflow.proto.GPUOptions.Experimental.VirtualDevices(this);
    +          if (bitField0_ != 0) { buildPartial0(result); }
    +          onBuilt();
    +          return result;
    +        }
    +
    +        private void buildPartial0(org.tensorflow.proto.GPUOptions.Experimental.VirtualDevices result) {
               int from_bitField0_ = bitField0_;
    -          if (((bitField0_ & 0x00000001) != 0)) {
    +          if (((from_bitField0_ & 0x00000001) != 0)) {
                 memoryLimitMb_.makeImmutable();
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            result.memoryLimitMb_ = memoryLimitMb_;
               }
    -          result.memoryLimitMb_ = memoryLimitMb_;
    -          if (((bitField0_ & 0x00000002) != 0)) {
    +          if (((from_bitField0_ & 0x00000002) != 0)) {
                 priority_.makeImmutable();
    -            bitField0_ = (bitField0_ & ~0x00000002);
    +            result.priority_ = priority_;
               }
    -          result.priority_ = priority_;
    -          if (((bitField0_ & 0x00000004) != 0)) {
    +          if (((from_bitField0_ & 0x00000004) != 0)) {
                 deviceOrdinal_.makeImmutable();
    -            bitField0_ = (bitField0_ & ~0x00000004);
    +            result.deviceOrdinal_ = deviceOrdinal_;
               }
    -          result.deviceOrdinal_ = deviceOrdinal_;
    -          onBuilt();
    -          return result;
             }
     
    -        @java.lang.Override
    -        public Builder clone() {
    -          return super.clone();
    -        }
    -        @java.lang.Override
    -        public Builder setField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field,
    -            java.lang.Object value) {
    -          return super.setField(field, value);
    -        }
    -        @java.lang.Override
    -        public Builder clearField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field) {
    -          return super.clearField(field);
    -        }
    -        @java.lang.Override
    -        public Builder clearOneof(
    -            com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -          return super.clearOneof(oneof);
    -        }
    -        @java.lang.Override
    -        public Builder setRepeatedField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field,
    -            int index, java.lang.Object value) {
    -          return super.setRepeatedField(field, index, value);
    -        }
    -        @java.lang.Override
    -        public Builder addRepeatedField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field,
    -            java.lang.Object value) {
    -          return super.addRepeatedField(field, value);
    -        }
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.Message other) {
               if (other instanceof org.tensorflow.proto.GPUOptions.Experimental.VirtualDevices) {
    @@ -1262,7 +1265,8 @@ public Builder mergeFrom(org.tensorflow.proto.GPUOptions.Experimental.VirtualDev
               if (!other.memoryLimitMb_.isEmpty()) {
                 if (memoryLimitMb_.isEmpty()) {
                   memoryLimitMb_ = other.memoryLimitMb_;
    -              bitField0_ = (bitField0_ & ~0x00000001);
    +              memoryLimitMb_.makeImmutable();
    +              bitField0_ |= 0x00000001;
                 } else {
                   ensureMemoryLimitMbIsMutable();
                   memoryLimitMb_.addAll(other.memoryLimitMb_);
    @@ -1272,7 +1276,8 @@ public Builder mergeFrom(org.tensorflow.proto.GPUOptions.Experimental.VirtualDev
               if (!other.priority_.isEmpty()) {
                 if (priority_.isEmpty()) {
                   priority_ = other.priority_;
    -              bitField0_ = (bitField0_ & ~0x00000002);
    +              priority_.makeImmutable();
    +              bitField0_ |= 0x00000002;
                 } else {
                   ensurePriorityIsMutable();
                   priority_.addAll(other.priority_);
    @@ -1282,7 +1287,8 @@ public Builder mergeFrom(org.tensorflow.proto.GPUOptions.Experimental.VirtualDev
               if (!other.deviceOrdinal_.isEmpty()) {
                 if (deviceOrdinal_.isEmpty()) {
                   deviceOrdinal_ = other.deviceOrdinal_;
    -              bitField0_ = (bitField0_ & ~0x00000004);
    +              deviceOrdinal_.makeImmutable();
    +              bitField0_ |= 0x00000004;
                 } else {
                   ensureDeviceOrdinalIsMutable();
                   deviceOrdinal_.addAll(other.deviceOrdinal_);
    @@ -1324,7 +1330,8 @@ public Builder mergeFrom(
                     case 10: {
                       int length = input.readRawVarint32();
                       int limit = input.pushLimit(length);
    -                  ensureMemoryLimitMbIsMutable();
    +                  int alloc = length > 4096 ? 4096 : length;
    +                  ensureMemoryLimitMbIsMutable(alloc / 4);
                       while (input.getBytesUntilLimit() > 0) {
                         memoryLimitMb_.addFloat(input.readFloat());
                       }
    @@ -1382,10 +1389,16 @@ public Builder mergeFrom(
     
             private com.google.protobuf.Internal.FloatList memoryLimitMb_ = emptyFloatList();
             private void ensureMemoryLimitMbIsMutable() {
    -          if (!((bitField0_ & 0x00000001) != 0)) {
    -            memoryLimitMb_ = mutableCopy(memoryLimitMb_);
    -            bitField0_ |= 0x00000001;
    -           }
    +          if (!memoryLimitMb_.isModifiable()) {
    +            memoryLimitMb_ = makeMutableCopy(memoryLimitMb_);
    +          }
    +          bitField0_ |= 0x00000001;
    +        }
    +        private void ensureMemoryLimitMbIsMutable(int capacity) {
    +          if (!memoryLimitMb_.isModifiable()) {
    +            memoryLimitMb_ = makeMutableCopy(memoryLimitMb_, capacity);
    +          }
    +          bitField0_ |= 0x00000001;
             }
             /**
              * 
    @@ -1394,6 +1407,7 @@ private void ensureMemoryLimitMbIsMutable() {
              * corresponding visible GPU (see "virtual_devices" below).
              * If empty and `num_virtual_devices_per_gpu` is not set, it will create
              * single virtual device taking all available memory from the device.
    +         *
              * For the concept of "visible" and "virtual" GPU, see the comments for
              * "visible_device_list" above for more information.
              * 
    @@ -1403,8 +1417,8 @@ private void ensureMemoryLimitMbIsMutable() { */ public java.util.List getMemoryLimitMbList() { - return ((bitField0_ & 0x00000001) != 0) ? - java.util.Collections.unmodifiableList(memoryLimitMb_) : memoryLimitMb_; + memoryLimitMb_.makeImmutable(); + return memoryLimitMb_; } /** *
    @@ -1413,6 +1427,7 @@ private void ensureMemoryLimitMbIsMutable() {
              * corresponding visible GPU (see "virtual_devices" below).
              * If empty and `num_virtual_devices_per_gpu` is not set, it will create
              * single virtual device taking all available memory from the device.
    +         *
              * For the concept of "visible" and "virtual" GPU, see the comments for
              * "visible_device_list" above for more information.
              * 
    @@ -1430,6 +1445,7 @@ public int getMemoryLimitMbCount() { * corresponding visible GPU (see "virtual_devices" below). * If empty and `num_virtual_devices_per_gpu` is not set, it will create * single virtual device taking all available memory from the device. + * * For the concept of "visible" and "virtual" GPU, see the comments for * "visible_device_list" above for more information. *
    @@ -1448,6 +1464,7 @@ public float getMemoryLimitMb(int index) { * corresponding visible GPU (see "virtual_devices" below). * If empty and `num_virtual_devices_per_gpu` is not set, it will create * single virtual device taking all available memory from the device. + * * For the concept of "visible" and "virtual" GPU, see the comments for * "visible_device_list" above for more information. *
    @@ -1459,8 +1476,10 @@ public float getMemoryLimitMb(int index) { */ public Builder setMemoryLimitMb( int index, float value) { + ensureMemoryLimitMbIsMutable(); memoryLimitMb_.setFloat(index, value); + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -1471,6 +1490,7 @@ public Builder setMemoryLimitMb( * corresponding visible GPU (see "virtual_devices" below). * If empty and `num_virtual_devices_per_gpu` is not set, it will create * single virtual device taking all available memory from the device. + * * For the concept of "visible" and "virtual" GPU, see the comments for * "visible_device_list" above for more information. *
    @@ -1480,8 +1500,10 @@ public Builder setMemoryLimitMb( * @return This builder for chaining. */ public Builder addMemoryLimitMb(float value) { + ensureMemoryLimitMbIsMutable(); memoryLimitMb_.addFloat(value); + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -1492,6 +1514,7 @@ public Builder addMemoryLimitMb(float value) { * corresponding visible GPU (see "virtual_devices" below). * If empty and `num_virtual_devices_per_gpu` is not set, it will create * single virtual device taking all available memory from the device. + * * For the concept of "visible" and "virtual" GPU, see the comments for * "visible_device_list" above for more information. *
    @@ -1505,6 +1528,7 @@ public Builder addAllMemoryLimitMb( ensureMemoryLimitMbIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, memoryLimitMb_); + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -1515,6 +1539,7 @@ public Builder addAllMemoryLimitMb( * corresponding visible GPU (see "virtual_devices" below). * If empty and `num_virtual_devices_per_gpu` is not set, it will create * single virtual device taking all available memory from the device. + * * For the concept of "visible" and "virtual" GPU, see the comments for * "visible_device_list" above for more information. *
    @@ -1531,18 +1556,20 @@ public Builder clearMemoryLimitMb() { private com.google.protobuf.Internal.IntList priority_ = emptyIntList(); private void ensurePriorityIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - priority_ = mutableCopy(priority_); - bitField0_ |= 0x00000002; - } + if (!priority_.isModifiable()) { + priority_ = makeMutableCopy(priority_); + } + bitField0_ |= 0x00000002; } /** *
              * Priority values to use with the virtual devices. Use the cuda function
              * cudaDeviceGetStreamPriorityRange to query for valid range of values for
              * priority.
    +         *
              * On a P4000 GPU with cuda 10.1, the priority range reported was 0 for
              * least priority and -1 for greatest priority.
    +         *
              * If this field is not specified, then the virtual devices will be
              * created with the default. If this field has values set, then the size
              * of this must match with the above memory_limit_mb.
    @@ -1553,16 +1580,18 @@ private void ensurePriorityIsMutable() {
              */
             public java.util.List
                 getPriorityList() {
    -          return ((bitField0_ & 0x00000002) != 0) ?
    -                   java.util.Collections.unmodifiableList(priority_) : priority_;
    +          priority_.makeImmutable();
    +          return priority_;
             }
             /**
              * 
              * Priority values to use with the virtual devices. Use the cuda function
              * cudaDeviceGetStreamPriorityRange to query for valid range of values for
              * priority.
    +         *
              * On a P4000 GPU with cuda 10.1, the priority range reported was 0 for
              * least priority and -1 for greatest priority.
    +         *
              * If this field is not specified, then the virtual devices will be
              * created with the default. If this field has values set, then the size
              * of this must match with the above memory_limit_mb.
    @@ -1579,8 +1608,10 @@ public int getPriorityCount() {
              * Priority values to use with the virtual devices. Use the cuda function
              * cudaDeviceGetStreamPriorityRange to query for valid range of values for
              * priority.
    +         *
              * On a P4000 GPU with cuda 10.1, the priority range reported was 0 for
              * least priority and -1 for greatest priority.
    +         *
              * If this field is not specified, then the virtual devices will be
              * created with the default. If this field has values set, then the size
              * of this must match with the above memory_limit_mb.
    @@ -1598,8 +1629,10 @@ public int getPriority(int index) {
              * Priority values to use with the virtual devices. Use the cuda function
              * cudaDeviceGetStreamPriorityRange to query for valid range of values for
              * priority.
    +         *
              * On a P4000 GPU with cuda 10.1, the priority range reported was 0 for
              * least priority and -1 for greatest priority.
    +         *
              * If this field is not specified, then the virtual devices will be
              * created with the default. If this field has values set, then the size
              * of this must match with the above memory_limit_mb.
    @@ -1612,8 +1645,10 @@ public int getPriority(int index) {
              */
             public Builder setPriority(
                 int index, int value) {
    +
               ensurePriorityIsMutable();
               priority_.setInt(index, value);
    +          bitField0_ |= 0x00000002;
               onChanged();
               return this;
             }
    @@ -1622,8 +1657,10 @@ public Builder setPriority(
              * Priority values to use with the virtual devices. Use the cuda function
              * cudaDeviceGetStreamPriorityRange to query for valid range of values for
              * priority.
    +         *
              * On a P4000 GPU with cuda 10.1, the priority range reported was 0 for
              * least priority and -1 for greatest priority.
    +         *
              * If this field is not specified, then the virtual devices will be
              * created with the default. If this field has values set, then the size
              * of this must match with the above memory_limit_mb.
    @@ -1634,8 +1671,10 @@ public Builder setPriority(
              * @return This builder for chaining.
              */
             public Builder addPriority(int value) {
    +
               ensurePriorityIsMutable();
               priority_.addInt(value);
    +          bitField0_ |= 0x00000002;
               onChanged();
               return this;
             }
    @@ -1644,8 +1683,10 @@ public Builder addPriority(int value) {
              * Priority values to use with the virtual devices. Use the cuda function
              * cudaDeviceGetStreamPriorityRange to query for valid range of values for
              * priority.
    +         *
              * On a P4000 GPU with cuda 10.1, the priority range reported was 0 for
              * least priority and -1 for greatest priority.
    +         *
              * If this field is not specified, then the virtual devices will be
              * created with the default. If this field has values set, then the size
              * of this must match with the above memory_limit_mb.
    @@ -1660,6 +1701,7 @@ public Builder addAllPriority(
               ensurePriorityIsMutable();
               com.google.protobuf.AbstractMessageLite.Builder.addAll(
                   values, priority_);
    +          bitField0_ |= 0x00000002;
               onChanged();
               return this;
             }
    @@ -1668,8 +1710,10 @@ public Builder addAllPriority(
              * Priority values to use with the virtual devices. Use the cuda function
              * cudaDeviceGetStreamPriorityRange to query for valid range of values for
              * priority.
    +         *
              * On a P4000 GPU with cuda 10.1, the priority range reported was 0 for
              * least priority and -1 for greatest priority.
    +         *
              * If this field is not specified, then the virtual devices will be
              * created with the default. If this field has values set, then the size
              * of this must match with the above memory_limit_mb.
    @@ -1687,10 +1731,10 @@ public Builder clearPriority() {
     
             private com.google.protobuf.Internal.IntList deviceOrdinal_ = emptyIntList();
             private void ensureDeviceOrdinalIsMutable() {
    -          if (!((bitField0_ & 0x00000004) != 0)) {
    -            deviceOrdinal_ = mutableCopy(deviceOrdinal_);
    -            bitField0_ |= 0x00000004;
    -           }
    +          if (!deviceOrdinal_.isModifiable()) {
    +            deviceOrdinal_ = makeMutableCopy(deviceOrdinal_);
    +          }
    +          bitField0_ |= 0x00000004;
             }
             /**
              * 
    @@ -1705,8 +1749,8 @@ private void ensureDeviceOrdinalIsMutable() {
              */
             public java.util.List
                 getDeviceOrdinalList() {
    -          return ((bitField0_ & 0x00000004) != 0) ?
    -                   java.util.Collections.unmodifiableList(deviceOrdinal_) : deviceOrdinal_;
    +          deviceOrdinal_.makeImmutable();
    +          return deviceOrdinal_;
             }
             /**
              * 
    @@ -1752,8 +1796,10 @@ public int getDeviceOrdinal(int index) {
              */
             public Builder setDeviceOrdinal(
                 int index, int value) {
    +
               ensureDeviceOrdinalIsMutable();
               deviceOrdinal_.setInt(index, value);
    +          bitField0_ |= 0x00000004;
               onChanged();
               return this;
             }
    @@ -1770,8 +1816,10 @@ public Builder setDeviceOrdinal(
              * @return This builder for chaining.
              */
             public Builder addDeviceOrdinal(int value) {
    +
               ensureDeviceOrdinalIsMutable();
               deviceOrdinal_.addInt(value);
    +          bitField0_ |= 0x00000004;
               onChanged();
               return this;
             }
    @@ -1792,6 +1840,7 @@ public Builder addAllDeviceOrdinal(
               ensureDeviceOrdinalIsMutable();
               com.google.protobuf.AbstractMessageLite.Builder.addAll(
                   values, deviceOrdinal_);
    +          bitField0_ |= 0x00000004;
               onChanged();
               return this;
             }
    @@ -1812,18 +1861,6 @@ public Builder clearDeviceOrdinal() {
               onChanged();
               return this;
             }
    -        @java.lang.Override
    -        public final Builder setUnknownFields(
    -            final com.google.protobuf.UnknownFieldSet unknownFields) {
    -          return super.setUnknownFields(unknownFields);
    -        }
    -
    -        @java.lang.Override
    -        public final Builder mergeUnknownFields(
    -            final com.google.protobuf.UnknownFieldSet unknownFields) {
    -          return super.mergeUnknownFields(unknownFields);
    -        }
    -
     
             // @@protoc_insertion_point(builder_scope:tensorflow.GPUOptions.Experimental.VirtualDevices)
           }
    @@ -1933,36 +1970,33 @@ public interface StreamMergeOptionsOrBuilder extends
          * Protobuf type {@code tensorflow.GPUOptions.Experimental.StreamMergeOptions}
          */
         public static final class StreamMergeOptions extends
    -        com.google.protobuf.GeneratedMessageV3 implements
    +        com.google.protobuf.GeneratedMessage implements
             // @@protoc_insertion_point(message_implements:tensorflow.GPUOptions.Experimental.StreamMergeOptions)
             StreamMergeOptionsOrBuilder {
         private static final long serialVersionUID = 0L;
    +      static {
    +        com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +          com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +          /* major= */ 4,
    +          /* minor= */ 28,
    +          /* patch= */ 3,
    +          /* suffix= */ "",
    +          StreamMergeOptions.class.getName());
    +      }
           // Use StreamMergeOptions.newBuilder() to construct.
    -      private StreamMergeOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +      private StreamMergeOptions(com.google.protobuf.GeneratedMessage.Builder builder) {
             super(builder);
           }
           private StreamMergeOptions() {
           }
     
    -      @java.lang.Override
    -      @SuppressWarnings({"unused"})
    -      protected java.lang.Object newInstance(
    -          UnusedPrivateParameter unused) {
    -        return new StreamMergeOptions();
    -      }
    -
    -      @java.lang.Override
    -      public final com.google.protobuf.UnknownFieldSet
    -      getUnknownFields() {
    -        return this.unknownFields;
    -      }
           public static final com.google.protobuf.Descriptors.Descriptor
               getDescriptor() {
             return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_GPUOptions_Experimental_StreamMergeOptions_descriptor;
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_GPUOptions_Experimental_StreamMergeOptions_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -1970,7 +2004,7 @@ protected java.lang.Object newInstance(
           }
     
           public static final int MERGE_HOST_TO_DEVICE_STREAM_FIELD_NUMBER = 1;
    -      private boolean mergeHostToDeviceStream_;
    +      private boolean mergeHostToDeviceStream_ = false;
           /**
            * 
            * If true, the compute stream will be used for host_to_device copy as
    @@ -1989,7 +2023,7 @@ public boolean getMergeHostToDeviceStream() {
           }
     
           public static final int MERGE_DEVICE_TO_HOST_STREAM_FIELD_NUMBER = 2;
    -      private boolean mergeDeviceToHostStream_;
    +      private boolean mergeDeviceToHostStream_ = false;
           /**
            * 
            * If true, the compute stream will be used for device_to_host copy as
    @@ -2006,7 +2040,7 @@ public boolean getMergeDeviceToHostStream() {
           }
     
           public static final int MERGE_DEVICE_TO_DEVICE_STREAM_FIELD_NUMBER = 3;
    -      private boolean mergeDeviceToDeviceStream_;
    +      private boolean mergeDeviceToDeviceStream_ = false;
           /**
            * 
            * If true, the compute stream will be used for device_to_device copy as
    @@ -2148,39 +2182,41 @@ public static org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptions pa
           }
           public static org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptions parseFrom(java.io.InputStream input)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input);
           }
           public static org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptions parseFrom(
               java.io.InputStream input,
               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input, extensionRegistry);
           }
    +
           public static org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptions parseDelimitedFrom(java.io.InputStream input)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseDelimitedWithIOException(PARSER, input);
           }
    +
           public static org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptions parseDelimitedFrom(
               java.io.InputStream input,
               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
           }
           public static org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptions parseFrom(
               com.google.protobuf.CodedInputStream input)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input);
           }
           public static org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptions parseFrom(
               com.google.protobuf.CodedInputStream input,
               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input, extensionRegistry);
           }
     
    @@ -2200,7 +2236,7 @@ public Builder toBuilder() {
     
           @java.lang.Override
           protected Builder newBuilderForType(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             Builder builder = new Builder(parent);
             return builder;
           }
    @@ -2217,7 +2253,7 @@ protected Builder newBuilderForType(
            * Protobuf type {@code tensorflow.GPUOptions.Experimental.StreamMergeOptions}
            */
           public static final class Builder extends
    -          com.google.protobuf.GeneratedMessageV3.Builder implements
    +          com.google.protobuf.GeneratedMessage.Builder implements
               // @@protoc_insertion_point(builder_implements:tensorflow.GPUOptions.Experimental.StreamMergeOptions)
               org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptionsOrBuilder {
             public static final com.google.protobuf.Descriptors.Descriptor
    @@ -2226,7 +2262,7 @@ public static final class Builder extends
             }
     
             @java.lang.Override
    -        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +        protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
                 internalGetFieldAccessorTable() {
               return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_GPUOptions_Experimental_StreamMergeOptions_fieldAccessorTable
                   .ensureFieldAccessorsInitialized(
    @@ -2239,19 +2275,17 @@ private Builder() {
             }
     
             private Builder(
    -            com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +            com.google.protobuf.GeneratedMessage.BuilderParent parent) {
               super(parent);
     
             }
             @java.lang.Override
             public Builder clear() {
               super.clear();
    +          bitField0_ = 0;
               mergeHostToDeviceStream_ = false;
    -
               mergeDeviceToHostStream_ = false;
    -
               mergeDeviceToDeviceStream_ = false;
    -
               return this;
             }
     
    @@ -2278,45 +2312,24 @@ public org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptions build() {
             @java.lang.Override
             public org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptions buildPartial() {
               org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptions result = new org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptions(this);
    -          result.mergeHostToDeviceStream_ = mergeHostToDeviceStream_;
    -          result.mergeDeviceToHostStream_ = mergeDeviceToHostStream_;
    -          result.mergeDeviceToDeviceStream_ = mergeDeviceToDeviceStream_;
    +          if (bitField0_ != 0) { buildPartial0(result); }
               onBuilt();
               return result;
             }
     
    -        @java.lang.Override
    -        public Builder clone() {
    -          return super.clone();
    -        }
    -        @java.lang.Override
    -        public Builder setField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field,
    -            java.lang.Object value) {
    -          return super.setField(field, value);
    -        }
    -        @java.lang.Override
    -        public Builder clearField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field) {
    -          return super.clearField(field);
    -        }
    -        @java.lang.Override
    -        public Builder clearOneof(
    -            com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -          return super.clearOneof(oneof);
    -        }
    -        @java.lang.Override
    -        public Builder setRepeatedField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field,
    -            int index, java.lang.Object value) {
    -          return super.setRepeatedField(field, index, value);
    -        }
    -        @java.lang.Override
    -        public Builder addRepeatedField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field,
    -            java.lang.Object value) {
    -          return super.addRepeatedField(field, value);
    +        private void buildPartial0(org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptions result) {
    +          int from_bitField0_ = bitField0_;
    +          if (((from_bitField0_ & 0x00000001) != 0)) {
    +            result.mergeHostToDeviceStream_ = mergeHostToDeviceStream_;
    +          }
    +          if (((from_bitField0_ & 0x00000002) != 0)) {
    +            result.mergeDeviceToHostStream_ = mergeDeviceToHostStream_;
    +          }
    +          if (((from_bitField0_ & 0x00000004) != 0)) {
    +            result.mergeDeviceToDeviceStream_ = mergeDeviceToDeviceStream_;
    +          }
             }
    +
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.Message other) {
               if (other instanceof org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptions) {
    @@ -2366,17 +2379,17 @@ public Builder mergeFrom(
                       break;
                     case 8: {
                       mergeHostToDeviceStream_ = input.readBool();
    -
    +                  bitField0_ |= 0x00000001;
                       break;
                     } // case 8
                     case 16: {
                       mergeDeviceToHostStream_ = input.readBool();
    -
    +                  bitField0_ |= 0x00000002;
                       break;
                     } // case 16
                     case 24: {
                       mergeDeviceToDeviceStream_ = input.readBool();
    -
    +                  bitField0_ |= 0x00000004;
                       break;
                     } // case 24
                     default: {
    @@ -2394,6 +2407,7 @@ public Builder mergeFrom(
               } // finally
               return this;
             }
    +        private int bitField0_;
     
             private boolean mergeHostToDeviceStream_ ;
             /**
    @@ -2426,8 +2440,9 @@ public boolean getMergeHostToDeviceStream() {
              * @return This builder for chaining.
              */
             public Builder setMergeHostToDeviceStream(boolean value) {
    -          
    +
               mergeHostToDeviceStream_ = value;
    +          bitField0_ |= 0x00000001;
               onChanged();
               return this;
             }
    @@ -2444,7 +2459,7 @@ public Builder setMergeHostToDeviceStream(boolean value) {
              * @return This builder for chaining.
              */
             public Builder clearMergeHostToDeviceStream() {
    -          
    +          bitField0_ = (bitField0_ & ~0x00000001);
               mergeHostToDeviceStream_ = false;
               onChanged();
               return this;
    @@ -2477,8 +2492,9 @@ public boolean getMergeDeviceToHostStream() {
              * @return This builder for chaining.
              */
             public Builder setMergeDeviceToHostStream(boolean value) {
    -          
    +
               mergeDeviceToHostStream_ = value;
    +          bitField0_ |= 0x00000002;
               onChanged();
               return this;
             }
    @@ -2493,7 +2509,7 @@ public Builder setMergeDeviceToHostStream(boolean value) {
              * @return This builder for chaining.
              */
             public Builder clearMergeDeviceToHostStream() {
    -          
    +          bitField0_ = (bitField0_ & ~0x00000002);
               mergeDeviceToHostStream_ = false;
               onChanged();
               return this;
    @@ -2530,8 +2546,9 @@ public boolean getMergeDeviceToDeviceStream() {
              * @return This builder for chaining.
              */
             public Builder setMergeDeviceToDeviceStream(boolean value) {
    -          
    +
               mergeDeviceToDeviceStream_ = value;
    +          bitField0_ |= 0x00000004;
               onChanged();
               return this;
             }
    @@ -2548,23 +2565,11 @@ public Builder setMergeDeviceToDeviceStream(boolean value) {
              * @return This builder for chaining.
              */
             public Builder clearMergeDeviceToDeviceStream() {
    -          
    +          bitField0_ = (bitField0_ & ~0x00000004);
               mergeDeviceToDeviceStream_ = false;
               onChanged();
               return this;
             }
    -        @java.lang.Override
    -        public final Builder setUnknownFields(
    -            final com.google.protobuf.UnknownFieldSet unknownFields) {
    -          return super.setUnknownFields(unknownFields);
    -        }
    -
    -        @java.lang.Override
    -        public final Builder mergeUnknownFields(
    -            final com.google.protobuf.UnknownFieldSet unknownFields) {
    -          return super.mergeUnknownFields(unknownFields);
    -        }
    -
     
             // @@protoc_insertion_point(builder_scope:tensorflow.GPUOptions.Experimental.StreamMergeOptions)
           }
    @@ -2617,7 +2622,9 @@ public org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptions getDefaul
     
         }
     
    +    private int bitField0_;
         public static final int VIRTUAL_DEVICES_FIELD_NUMBER = 1;
    +    @SuppressWarnings("serial")
         private java.util.List virtualDevices_;
         /**
          * 
    @@ -2630,32 +2637,35 @@ public org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptions getDefaul
          * devices and have the <id> field assigned sequentially starting from 0,
          * according to the order of the virtual devices determined by
          * device_ordinal and the location in the virtual device list.
    +     *
          * For example,
    -     *   visible_device_list = "1,0"
    -     *   virtual_devices { memory_limit: 1GB memory_limit: 2GB }
    -     *   virtual_devices { memory_limit: 3GB memory_limit: 4GB }
    +     * visible_device_list = "1,0"
    +     * virtual_devices { memory_limit: 1GB memory_limit: 2GB }
    +     * virtual_devices { memory_limit: 3GB memory_limit: 4GB }
          * will create 4 virtual devices as:
    -     *   /device:GPU:0 -> visible GPU 1 with 1GB memory
    -     *   /device:GPU:1 -> visible GPU 1 with 2GB memory
    -     *   /device:GPU:2 -> visible GPU 0 with 3GB memory
    -     *   /device:GPU:3 -> visible GPU 0 with 4GB memory
    +     * /device:GPU:0 -> visible GPU 1 with 1GB memory
    +     * /device:GPU:1 -> visible GPU 1 with 2GB memory
    +     * /device:GPU:2 -> visible GPU 0 with 3GB memory
    +     * /device:GPU:3 -> visible GPU 0 with 4GB memory
    +     *
          * but
    -     *   visible_device_list = "1,0"
    -     *   virtual_devices { memory_limit: 1GB memory_limit: 2GB
    -     *                     device_ordinal: 10 device_ordinal: 20}
    -     *   virtual_devices { memory_limit: 3GB memory_limit: 4GB
    -     *                     device_ordinal: 10 device_ordinal: 20}
    +     * visible_device_list = "1,0"
    +     * virtual_devices { memory_limit: 1GB memory_limit: 2GB
    +     * device_ordinal: 10 device_ordinal: 20}
    +     * virtual_devices { memory_limit: 3GB memory_limit: 4GB
    +     * device_ordinal: 10 device_ordinal: 20}
          * will create 4 virtual devices as:
    -     *   /device:GPU:0 -> visible GPU 1 with 1GB memory  (ordinal 10)
    -     *   /device:GPU:1 -> visible GPU 0 with 3GB memory  (ordinal 10)
    -     *   /device:GPU:2 -> visible GPU 1 with 2GB memory  (ordinal 20)
    -     *   /device:GPU:3 -> visible GPU 0 with 4GB memory  (ordinal 20)
    +     * /device:GPU:0 -> visible GPU 1 with 1GB memory  (ordinal 10)
    +     * /device:GPU:1 -> visible GPU 0 with 3GB memory  (ordinal 10)
    +     * /device:GPU:2 -> visible GPU 1 with 2GB memory  (ordinal 20)
    +     * /device:GPU:3 -> visible GPU 0 with 4GB memory  (ordinal 20)
    +     *
          * NOTE:
          * 1. It's invalid to set both this and "per_process_gpu_memory_fraction"
    -     *    at the same time.
    +     * at the same time.
          * 2. Currently this setting is per-process, not per-session. Using
    -     *    different settings in different sessions within same process will
    -     *    result in undefined behavior.
    +     * different settings in different sessions within same process will
    +     * result in undefined behavior.
          * 
    * * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; @@ -2675,32 +2685,35 @@ public java.util.List * * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; @@ -2721,32 +2734,35 @@ public java.util.List * * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; @@ -2766,32 +2782,35 @@ public int getVirtualDevicesCount() { * devices and have the <id> field assigned sequentially starting from 0, * according to the order of the virtual devices determined by * device_ordinal and the location in the virtual device list. + * * For example, - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB } - * virtual_devices { memory_limit: 3GB memory_limit: 4GB } + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB } + * virtual_devices { memory_limit: 3GB memory_limit: 4GB } * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory - * /device:GPU:1 -> visible GPU 1 with 2GB memory - * /device:GPU:2 -> visible GPU 0 with 3GB memory - * /device:GPU:3 -> visible GPU 0 with 4GB memory + * /device:GPU:0 -> visible GPU 1 with 1GB memory + * /device:GPU:1 -> visible GPU 1 with 2GB memory + * /device:GPU:2 -> visible GPU 0 with 3GB memory + * /device:GPU:3 -> visible GPU 0 with 4GB memory + * * but - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB - * device_ordinal: 10 device_ordinal: 20} - * virtual_devices { memory_limit: 3GB memory_limit: 4GB - * device_ordinal: 10 device_ordinal: 20} + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB + * device_ordinal: 10 device_ordinal: 20} + * virtual_devices { memory_limit: 3GB memory_limit: 4GB + * device_ordinal: 10 device_ordinal: 20} * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) - * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) - * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) - * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) + * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) + * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) + * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * * NOTE: * 1. It's invalid to set both this and "per_process_gpu_memory_fraction" - * at the same time. + * at the same time. * 2. Currently this setting is per-process, not per-session. Using - * different settings in different sessions within same process will - * result in undefined behavior. + * different settings in different sessions within same process will + * result in undefined behavior. *
    * * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; @@ -2811,32 +2830,35 @@ public org.tensorflow.proto.GPUOptions.Experimental.VirtualDevices getVirtualDev * devices and have the <id> field assigned sequentially starting from 0, * according to the order of the virtual devices determined by * device_ordinal and the location in the virtual device list. + * * For example, - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB } - * virtual_devices { memory_limit: 3GB memory_limit: 4GB } + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB } + * virtual_devices { memory_limit: 3GB memory_limit: 4GB } * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory - * /device:GPU:1 -> visible GPU 1 with 2GB memory - * /device:GPU:2 -> visible GPU 0 with 3GB memory - * /device:GPU:3 -> visible GPU 0 with 4GB memory + * /device:GPU:0 -> visible GPU 1 with 1GB memory + * /device:GPU:1 -> visible GPU 1 with 2GB memory + * /device:GPU:2 -> visible GPU 0 with 3GB memory + * /device:GPU:3 -> visible GPU 0 with 4GB memory + * * but - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB - * device_ordinal: 10 device_ordinal: 20} - * virtual_devices { memory_limit: 3GB memory_limit: 4GB - * device_ordinal: 10 device_ordinal: 20} + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB + * device_ordinal: 10 device_ordinal: 20} + * virtual_devices { memory_limit: 3GB memory_limit: 4GB + * device_ordinal: 10 device_ordinal: 20} * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) - * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) - * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) - * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) + * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) + * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) + * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * * NOTE: * 1. It's invalid to set both this and "per_process_gpu_memory_fraction" - * at the same time. + * at the same time. * 2. Currently this setting is per-process, not per-session. Using - * different settings in different sessions within same process will - * result in undefined behavior. + * different settings in different sessions within same process will + * result in undefined behavior. *
    * * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; @@ -2848,7 +2870,7 @@ public org.tensorflow.proto.GPUOptions.Experimental.VirtualDevicesOrBuilder getV } public static final int NUM_VIRTUAL_DEVICES_PER_GPU_FIELD_NUMBER = 15; - private int numVirtualDevicesPerGpu_; + private int numVirtualDevicesPerGpu_ = 0; /** *
          * The number of virtual devices to create on each visible GPU. The
    @@ -2866,7 +2888,7 @@ public int getNumVirtualDevicesPerGpu() {
         }
     
         public static final int USE_UNIFIED_MEMORY_FIELD_NUMBER = 2;
    -    private boolean useUnifiedMemory_;
    +    private boolean useUnifiedMemory_ = false;
         /**
          * 
          * If true, uses CUDA unified memory for memory allocations. If
    @@ -2887,7 +2909,7 @@ public boolean getUseUnifiedMemory() {
         }
     
         public static final int NUM_DEV_TO_DEV_COPY_STREAMS_FIELD_NUMBER = 3;
    -    private int numDevToDevCopyStreams_;
    +    private int numDevToDevCopyStreams_ = 0;
         /**
          * 
          * If > 1, the number of device-to-device copy streams to create
    @@ -2904,7 +2926,8 @@ public int getNumDevToDevCopyStreams() {
         }
     
         public static final int COLLECTIVE_RING_ORDER_FIELD_NUMBER = 4;
    -    private volatile java.lang.Object collectiveRingOrder_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object collectiveRingOrder_ = "";
         /**
          * 
          * If non-empty, defines a good GPU ring order on a single worker based on
    @@ -2960,7 +2983,7 @@ public java.lang.String getCollectiveRingOrder() {
         }
     
         public static final int TIMESTAMPED_ALLOCATOR_FIELD_NUMBER = 5;
    -    private boolean timestampedAllocator_;
    +    private boolean timestampedAllocator_ = false;
         /**
          * 
          * If true then extra work is done by GPUDevice and GPUBFCAllocator to
    @@ -2978,12 +3001,13 @@ public boolean getTimestampedAllocator() {
         }
     
         public static final int KERNEL_TRACKER_MAX_INTERVAL_FIELD_NUMBER = 7;
    -    private int kernelTrackerMaxInterval_;
    +    private int kernelTrackerMaxInterval_ = 0;
         /**
          * 
          * Parameters for GPUKernelTracker.  By default no kernel tracking is done.
          * Note that timestamped_allocator is only effective if some tracking is
          * specified.
    +     *
          * If kernel_tracker_max_interval = n > 0, then a tracking event
          * is inserted after every n kernels without an event.
          * 
    @@ -2997,7 +3021,7 @@ public int getKernelTrackerMaxInterval() { } public static final int KERNEL_TRACKER_MAX_BYTES_FIELD_NUMBER = 8; - private int kernelTrackerMaxBytes_; + private int kernelTrackerMaxBytes_ = 0; /** *
          * If kernel_tracker_max_bytes = n > 0, then a tracking event is
    @@ -3016,7 +3040,7 @@ public int getKernelTrackerMaxBytes() {
         }
     
         public static final int KERNEL_TRACKER_MAX_PENDING_FIELD_NUMBER = 9;
    -    private int kernelTrackerMaxPending_;
    +    private int kernelTrackerMaxPending_ = 0;
         /**
          * 
          * If kernel_tracker_max_pending > 0 then no more than this many
    @@ -3034,7 +3058,7 @@ public int getKernelTrackerMaxPending() {
         }
     
         public static final int INTERNAL_FRAGMENTATION_FRACTION_FIELD_NUMBER = 10;
    -    private double internalFragmentationFraction_;
    +    private double internalFragmentationFraction_ = 0D;
         /**
          * 
          * BFC Allocator can return an allocated chunk of memory upto 2x the
    @@ -3057,7 +3081,7 @@ public double getInternalFragmentationFraction() {
         }
     
         public static final int USE_CUDA_MALLOC_ASYNC_FIELD_NUMBER = 11;
    -    private boolean useCudaMallocAsync_;
    +    private boolean useCudaMallocAsync_ = false;
         /**
          * 
          * When true, use CUDA cudaMallocAsync API instead of TF gpu allocator.
    @@ -3072,7 +3096,7 @@ public boolean getUseCudaMallocAsync() {
         }
     
         public static final int DISALLOW_RETRY_ON_ALLOCATION_FAILURE_FIELD_NUMBER = 12;
    -    private boolean disallowRetryOnAllocationFailure_;
    +    private boolean disallowRetryOnAllocationFailure_ = false;
         /**
          * 
          * By default, BFCAllocator may sleep when it runs out of memory, in the
    @@ -3089,7 +3113,7 @@ public boolean getDisallowRetryOnAllocationFailure() {
         }
     
         public static final int GPU_HOST_MEM_LIMIT_IN_MB_FIELD_NUMBER = 13;
    -    private float gpuHostMemLimitInMb_;
    +    private float gpuHostMemLimitInMb_ = 0F;
         /**
          * 
          * Memory limit for "GPU host allocator", aka pinned memory allocator.  This
    @@ -3105,12 +3129,13 @@ public float getGpuHostMemLimitInMb() {
         }
     
         public static final int GPU_HOST_MEM_DISALLOW_GROWTH_FIELD_NUMBER = 14;
    -    private boolean gpuHostMemDisallowGrowth_;
    +    private boolean gpuHostMemDisallowGrowth_ = false;
         /**
          * 
          * If true, then the host allocator allocates its max memory all upfront and
          * never grows.  This can be useful for latency-sensitive systems, because
          * growing the GPU host memory pool can be expensive.
    +     *
          * You probably only want to use this in combination with
          * gpu_host_mem_limit_in_mb, because the default GPU host memory limit is
          * quite high.
    @@ -3125,7 +3150,7 @@ public boolean getGpuHostMemDisallowGrowth() {
         }
     
         public static final int GPU_SYSTEM_MEMORY_SIZE_IN_MB_FIELD_NUMBER = 16;
    -    private int gpuSystemMemorySizeInMb_;
    +    private int gpuSystemMemorySizeInMb_ = 0;
         /**
          * 
          * Memory limit for gpu system. This can also be set by
    @@ -3144,7 +3169,7 @@ public int getGpuSystemMemorySizeInMb() {
         }
     
         public static final int POPULATE_PJRT_GPU_CLIENT_CREATION_INFO_FIELD_NUMBER = 17;
    -    private boolean populatePjrtGpuClientCreationInfo_;
    +    private boolean populatePjrtGpuClientCreationInfo_ = false;
         /**
          * 
          * If true, save information needed for created a PjRt GPU client for
    @@ -3160,7 +3185,7 @@ public boolean getPopulatePjrtGpuClientCreationInfo() {
         }
     
         public static final int NODE_ID_FIELD_NUMBER = 18;
    -    private int nodeId_;
    +    private int nodeId_ = 0;
         /**
          * 
          * node_id for use when creating a PjRt GPU client with remote devices,
    @@ -3183,7 +3208,7 @@ public int getNodeId() {
          */
         @java.lang.Override
         public boolean hasStreamMergeOptions() {
    -      return streamMergeOptions_ != null;
    +      return ((bitField0_ & 0x00000001) != 0);
         }
         /**
          * .tensorflow.GPUOptions.Experimental.StreamMergeOptions stream_merge_options = 19;
    @@ -3198,7 +3223,7 @@ public org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptions getStream
          */
         @java.lang.Override
         public org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptionsOrBuilder getStreamMergeOptionsOrBuilder() {
    -      return getStreamMergeOptions();
    +      return streamMergeOptions_ == null ? org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptions.getDefaultInstance() : streamMergeOptions_;
         }
     
         private byte memoizedIsInitialized = -1;
    @@ -3224,8 +3249,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           if (numDevToDevCopyStreams_ != 0) {
             output.writeInt32(3, numDevToDevCopyStreams_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(collectiveRingOrder_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 4, collectiveRingOrder_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(collectiveRingOrder_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 4, collectiveRingOrder_);
           }
           if (timestampedAllocator_ != false) {
             output.writeBool(5, timestampedAllocator_);
    @@ -3266,7 +3291,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           if (nodeId_ != 0) {
             output.writeInt32(18, nodeId_);
           }
    -      if (streamMergeOptions_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             output.writeMessage(19, getStreamMergeOptions());
           }
           getUnknownFields().writeTo(output);
    @@ -3290,8 +3315,8 @@ public int getSerializedSize() {
             size += com.google.protobuf.CodedOutputStream
               .computeInt32Size(3, numDevToDevCopyStreams_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(collectiveRingOrder_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, collectiveRingOrder_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(collectiveRingOrder_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(4, collectiveRingOrder_);
           }
           if (timestampedAllocator_ != false) {
             size += com.google.protobuf.CodedOutputStream
    @@ -3345,7 +3370,7 @@ public int getSerializedSize() {
             size += com.google.protobuf.CodedOutputStream
               .computeInt32Size(18, nodeId_);
           }
    -      if (streamMergeOptions_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(19, getStreamMergeOptions());
           }
    @@ -3503,39 +3528,41 @@ public static org.tensorflow.proto.GPUOptions.Experimental parseFrom(
         }
         public static org.tensorflow.proto.GPUOptions.Experimental parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.GPUOptions.Experimental parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.GPUOptions.Experimental parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.GPUOptions.Experimental parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.GPUOptions.Experimental parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.GPUOptions.Experimental parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -3555,7 +3582,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -3563,7 +3590,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.GPUOptions.Experimental}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.GPUOptions.Experimental)
             org.tensorflow.proto.GPUOptions.ExperimentalOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -3572,7 +3599,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_GPUOptions_Experimental_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -3581,17 +3608,25 @@ public static final class Builder extends
     
           // Construct using org.tensorflow.proto.GPUOptions.Experimental.newBuilder()
           private Builder() {
    -
    +        maybeForceBuilderInitialization();
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
    -
    +        maybeForceBuilderInitialization();
    +      }
    +      private void maybeForceBuilderInitialization() {
    +        if (com.google.protobuf.GeneratedMessage
    +                .alwaysUseFieldBuilders) {
    +          getVirtualDevicesFieldBuilder();
    +          getStreamMergeOptionsFieldBuilder();
    +        }
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             if (virtualDevicesBuilder_ == null) {
               virtualDevices_ = java.util.Collections.emptyList();
             } else {
    @@ -3600,41 +3635,24 @@ public Builder clear() {
             }
             bitField0_ = (bitField0_ & ~0x00000001);
             numVirtualDevicesPerGpu_ = 0;
    -
             useUnifiedMemory_ = false;
    -
             numDevToDevCopyStreams_ = 0;
    -
             collectiveRingOrder_ = "";
    -
             timestampedAllocator_ = false;
    -
             kernelTrackerMaxInterval_ = 0;
    -
             kernelTrackerMaxBytes_ = 0;
    -
             kernelTrackerMaxPending_ = 0;
    -
             internalFragmentationFraction_ = 0D;
    -
             useCudaMallocAsync_ = false;
    -
             disallowRetryOnAllocationFailure_ = false;
    -
             gpuHostMemLimitInMb_ = 0F;
    -
             gpuHostMemDisallowGrowth_ = false;
    -
             gpuSystemMemorySizeInMb_ = 0;
    -
             populatePjrtGpuClientCreationInfo_ = false;
    -
             nodeId_ = 0;
    -
    -        if (streamMergeOptionsBuilder_ == null) {
    -          streamMergeOptions_ = null;
    -        } else {
    -          streamMergeOptions_ = null;
    +        streamMergeOptions_ = null;
    +        if (streamMergeOptionsBuilder_ != null) {
    +          streamMergeOptionsBuilder_.dispose();
               streamMergeOptionsBuilder_ = null;
             }
             return this;
    @@ -3663,7 +3681,13 @@ public org.tensorflow.proto.GPUOptions.Experimental build() {
           @java.lang.Override
           public org.tensorflow.proto.GPUOptions.Experimental buildPartial() {
             org.tensorflow.proto.GPUOptions.Experimental result = new org.tensorflow.proto.GPUOptions.Experimental(this);
    -        int from_bitField0_ = bitField0_;
    +        buildPartialRepeatedFields(result);
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        onBuilt();
    +        return result;
    +      }
    +
    +      private void buildPartialRepeatedFields(org.tensorflow.proto.GPUOptions.Experimental result) {
             if (virtualDevicesBuilder_ == null) {
               if (((bitField0_ & 0x00000001) != 0)) {
                 virtualDevices_ = java.util.Collections.unmodifiableList(virtualDevices_);
    @@ -3673,63 +3697,68 @@ public org.tensorflow.proto.GPUOptions.Experimental buildPartial() {
             } else {
               result.virtualDevices_ = virtualDevicesBuilder_.build();
             }
    -        result.numVirtualDevicesPerGpu_ = numVirtualDevicesPerGpu_;
    -        result.useUnifiedMemory_ = useUnifiedMemory_;
    -        result.numDevToDevCopyStreams_ = numDevToDevCopyStreams_;
    -        result.collectiveRingOrder_ = collectiveRingOrder_;
    -        result.timestampedAllocator_ = timestampedAllocator_;
    -        result.kernelTrackerMaxInterval_ = kernelTrackerMaxInterval_;
    -        result.kernelTrackerMaxBytes_ = kernelTrackerMaxBytes_;
    -        result.kernelTrackerMaxPending_ = kernelTrackerMaxPending_;
    -        result.internalFragmentationFraction_ = internalFragmentationFraction_;
    -        result.useCudaMallocAsync_ = useCudaMallocAsync_;
    -        result.disallowRetryOnAllocationFailure_ = disallowRetryOnAllocationFailure_;
    -        result.gpuHostMemLimitInMb_ = gpuHostMemLimitInMb_;
    -        result.gpuHostMemDisallowGrowth_ = gpuHostMemDisallowGrowth_;
    -        result.gpuSystemMemorySizeInMb_ = gpuSystemMemorySizeInMb_;
    -        result.populatePjrtGpuClientCreationInfo_ = populatePjrtGpuClientCreationInfo_;
    -        result.nodeId_ = nodeId_;
    -        if (streamMergeOptionsBuilder_ == null) {
    -          result.streamMergeOptions_ = streamMergeOptions_;
    -        } else {
    -          result.streamMergeOptions_ = streamMergeOptionsBuilder_.build();
    -        }
    -        onBuilt();
    -        return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.GPUOptions.Experimental result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.numVirtualDevicesPerGpu_ = numVirtualDevicesPerGpu_;
    +        }
    +        if (((from_bitField0_ & 0x00000004) != 0)) {
    +          result.useUnifiedMemory_ = useUnifiedMemory_;
    +        }
    +        if (((from_bitField0_ & 0x00000008) != 0)) {
    +          result.numDevToDevCopyStreams_ = numDevToDevCopyStreams_;
    +        }
    +        if (((from_bitField0_ & 0x00000010) != 0)) {
    +          result.collectiveRingOrder_ = collectiveRingOrder_;
    +        }
    +        if (((from_bitField0_ & 0x00000020) != 0)) {
    +          result.timestampedAllocator_ = timestampedAllocator_;
    +        }
    +        if (((from_bitField0_ & 0x00000040) != 0)) {
    +          result.kernelTrackerMaxInterval_ = kernelTrackerMaxInterval_;
    +        }
    +        if (((from_bitField0_ & 0x00000080) != 0)) {
    +          result.kernelTrackerMaxBytes_ = kernelTrackerMaxBytes_;
    +        }
    +        if (((from_bitField0_ & 0x00000100) != 0)) {
    +          result.kernelTrackerMaxPending_ = kernelTrackerMaxPending_;
    +        }
    +        if (((from_bitField0_ & 0x00000200) != 0)) {
    +          result.internalFragmentationFraction_ = internalFragmentationFraction_;
    +        }
    +        if (((from_bitField0_ & 0x00000400) != 0)) {
    +          result.useCudaMallocAsync_ = useCudaMallocAsync_;
    +        }
    +        if (((from_bitField0_ & 0x00000800) != 0)) {
    +          result.disallowRetryOnAllocationFailure_ = disallowRetryOnAllocationFailure_;
    +        }
    +        if (((from_bitField0_ & 0x00001000) != 0)) {
    +          result.gpuHostMemLimitInMb_ = gpuHostMemLimitInMb_;
    +        }
    +        if (((from_bitField0_ & 0x00002000) != 0)) {
    +          result.gpuHostMemDisallowGrowth_ = gpuHostMemDisallowGrowth_;
    +        }
    +        if (((from_bitField0_ & 0x00004000) != 0)) {
    +          result.gpuSystemMemorySizeInMb_ = gpuSystemMemorySizeInMb_;
    +        }
    +        if (((from_bitField0_ & 0x00008000) != 0)) {
    +          result.populatePjrtGpuClientCreationInfo_ = populatePjrtGpuClientCreationInfo_;
    +        }
    +        if (((from_bitField0_ & 0x00010000) != 0)) {
    +          result.nodeId_ = nodeId_;
    +        }
    +        int to_bitField0_ = 0;
    +        if (((from_bitField0_ & 0x00020000) != 0)) {
    +          result.streamMergeOptions_ = streamMergeOptionsBuilder_ == null
    +              ? streamMergeOptions_
    +              : streamMergeOptionsBuilder_.build();
    +          to_bitField0_ |= 0x00000001;
    +        }
    +        result.bitField0_ |= to_bitField0_;
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.GPUOptions.Experimental) {
    @@ -3761,7 +3790,7 @@ public Builder mergeFrom(org.tensorflow.proto.GPUOptions.Experimental other) {
                   virtualDevices_ = other.virtualDevices_;
                   bitField0_ = (bitField0_ & ~0x00000001);
                   virtualDevicesBuilder_ = 
    -                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                        getVirtualDevicesFieldBuilder() : null;
                 } else {
                   virtualDevicesBuilder_.addAllMessages(other.virtualDevices_);
    @@ -3779,6 +3808,7 @@ public Builder mergeFrom(org.tensorflow.proto.GPUOptions.Experimental other) {
             }
             if (!other.getCollectiveRingOrder().isEmpty()) {
               collectiveRingOrder_ = other.collectiveRingOrder_;
    +          bitField0_ |= 0x00000010;
               onChanged();
             }
             if (other.getTimestampedAllocator() != false) {
    @@ -3861,89 +3891,89 @@ public Builder mergeFrom(
                   } // case 10
                   case 16: {
                     useUnifiedMemory_ = input.readBool();
    -
    +                bitField0_ |= 0x00000004;
                     break;
                   } // case 16
                   case 24: {
                     numDevToDevCopyStreams_ = input.readInt32();
    -
    +                bitField0_ |= 0x00000008;
                     break;
                   } // case 24
                   case 34: {
                     collectiveRingOrder_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000010;
                     break;
                   } // case 34
                   case 40: {
                     timestampedAllocator_ = input.readBool();
    -
    +                bitField0_ |= 0x00000020;
                     break;
                   } // case 40
                   case 56: {
                     kernelTrackerMaxInterval_ = input.readInt32();
    -
    +                bitField0_ |= 0x00000040;
                     break;
                   } // case 56
                   case 64: {
                     kernelTrackerMaxBytes_ = input.readInt32();
    -
    +                bitField0_ |= 0x00000080;
                     break;
                   } // case 64
                   case 72: {
                     kernelTrackerMaxPending_ = input.readInt32();
    -
    +                bitField0_ |= 0x00000100;
                     break;
                   } // case 72
                   case 81: {
                     internalFragmentationFraction_ = input.readDouble();
    -
    +                bitField0_ |= 0x00000200;
                     break;
                   } // case 81
                   case 88: {
                     useCudaMallocAsync_ = input.readBool();
    -
    +                bitField0_ |= 0x00000400;
                     break;
                   } // case 88
                   case 96: {
                     disallowRetryOnAllocationFailure_ = input.readBool();
    -
    +                bitField0_ |= 0x00000800;
                     break;
                   } // case 96
                   case 109: {
                     gpuHostMemLimitInMb_ = input.readFloat();
    -
    +                bitField0_ |= 0x00001000;
                     break;
                   } // case 109
                   case 112: {
                     gpuHostMemDisallowGrowth_ = input.readBool();
    -
    +                bitField0_ |= 0x00002000;
                     break;
                   } // case 112
                   case 120: {
                     numVirtualDevicesPerGpu_ = input.readInt32();
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 120
                   case 128: {
                     gpuSystemMemorySizeInMb_ = input.readInt32();
    -
    +                bitField0_ |= 0x00004000;
                     break;
                   } // case 128
                   case 136: {
                     populatePjrtGpuClientCreationInfo_ = input.readBool();
    -
    +                bitField0_ |= 0x00008000;
                     break;
                   } // case 136
                   case 144: {
                     nodeId_ = input.readInt32();
    -
    +                bitField0_ |= 0x00010000;
                     break;
                   } // case 144
                   case 154: {
                     input.readMessage(
                         getStreamMergeOptionsFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00020000;
                     break;
                   } // case 154
                   default: {
    @@ -3972,7 +4002,7 @@ private void ensureVirtualDevicesIsMutable() {
              }
           }
     
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.GPUOptions.Experimental.VirtualDevices, org.tensorflow.proto.GPUOptions.Experimental.VirtualDevices.Builder, org.tensorflow.proto.GPUOptions.Experimental.VirtualDevicesOrBuilder> virtualDevicesBuilder_;
     
           /**
    @@ -3986,32 +4016,35 @@ private void ensureVirtualDevicesIsMutable() {
            * devices and have the <id> field assigned sequentially starting from 0,
            * according to the order of the virtual devices determined by
            * device_ordinal and the location in the virtual device list.
    +       *
            * For example,
    -       *   visible_device_list = "1,0"
    -       *   virtual_devices { memory_limit: 1GB memory_limit: 2GB }
    -       *   virtual_devices { memory_limit: 3GB memory_limit: 4GB }
    +       * visible_device_list = "1,0"
    +       * virtual_devices { memory_limit: 1GB memory_limit: 2GB }
    +       * virtual_devices { memory_limit: 3GB memory_limit: 4GB }
            * will create 4 virtual devices as:
    -       *   /device:GPU:0 -> visible GPU 1 with 1GB memory
    -       *   /device:GPU:1 -> visible GPU 1 with 2GB memory
    -       *   /device:GPU:2 -> visible GPU 0 with 3GB memory
    -       *   /device:GPU:3 -> visible GPU 0 with 4GB memory
    +       * /device:GPU:0 -> visible GPU 1 with 1GB memory
    +       * /device:GPU:1 -> visible GPU 1 with 2GB memory
    +       * /device:GPU:2 -> visible GPU 0 with 3GB memory
    +       * /device:GPU:3 -> visible GPU 0 with 4GB memory
    +       *
            * but
    -       *   visible_device_list = "1,0"
    -       *   virtual_devices { memory_limit: 1GB memory_limit: 2GB
    -       *                     device_ordinal: 10 device_ordinal: 20}
    -       *   virtual_devices { memory_limit: 3GB memory_limit: 4GB
    -       *                     device_ordinal: 10 device_ordinal: 20}
    +       * visible_device_list = "1,0"
    +       * virtual_devices { memory_limit: 1GB memory_limit: 2GB
    +       * device_ordinal: 10 device_ordinal: 20}
    +       * virtual_devices { memory_limit: 3GB memory_limit: 4GB
    +       * device_ordinal: 10 device_ordinal: 20}
            * will create 4 virtual devices as:
    -       *   /device:GPU:0 -> visible GPU 1 with 1GB memory  (ordinal 10)
    -       *   /device:GPU:1 -> visible GPU 0 with 3GB memory  (ordinal 10)
    -       *   /device:GPU:2 -> visible GPU 1 with 2GB memory  (ordinal 20)
    -       *   /device:GPU:3 -> visible GPU 0 with 4GB memory  (ordinal 20)
    +       * /device:GPU:0 -> visible GPU 1 with 1GB memory  (ordinal 10)
    +       * /device:GPU:1 -> visible GPU 0 with 3GB memory  (ordinal 10)
    +       * /device:GPU:2 -> visible GPU 1 with 2GB memory  (ordinal 20)
    +       * /device:GPU:3 -> visible GPU 0 with 4GB memory  (ordinal 20)
    +       *
            * NOTE:
            * 1. It's invalid to set both this and "per_process_gpu_memory_fraction"
    -       *    at the same time.
    +       * at the same time.
            * 2. Currently this setting is per-process, not per-session. Using
    -       *    different settings in different sessions within same process will
    -       *    result in undefined behavior.
    +       * different settings in different sessions within same process will
    +       * result in undefined behavior.
            * 
    * * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; @@ -4034,32 +4067,35 @@ public java.util.List * * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; @@ -4082,32 +4118,35 @@ public int getVirtualDevicesCount() { * devices and have the <id> field assigned sequentially starting from 0, * according to the order of the virtual devices determined by * device_ordinal and the location in the virtual device list. + * * For example, - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB } - * virtual_devices { memory_limit: 3GB memory_limit: 4GB } + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB } + * virtual_devices { memory_limit: 3GB memory_limit: 4GB } * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory - * /device:GPU:1 -> visible GPU 1 with 2GB memory - * /device:GPU:2 -> visible GPU 0 with 3GB memory - * /device:GPU:3 -> visible GPU 0 with 4GB memory + * /device:GPU:0 -> visible GPU 1 with 1GB memory + * /device:GPU:1 -> visible GPU 1 with 2GB memory + * /device:GPU:2 -> visible GPU 0 with 3GB memory + * /device:GPU:3 -> visible GPU 0 with 4GB memory + * * but - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB - * device_ordinal: 10 device_ordinal: 20} - * virtual_devices { memory_limit: 3GB memory_limit: 4GB - * device_ordinal: 10 device_ordinal: 20} + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB + * device_ordinal: 10 device_ordinal: 20} + * virtual_devices { memory_limit: 3GB memory_limit: 4GB + * device_ordinal: 10 device_ordinal: 20} * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) - * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) - * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) - * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) + * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) + * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) + * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * * NOTE: * 1. It's invalid to set both this and "per_process_gpu_memory_fraction" - * at the same time. + * at the same time. * 2. Currently this setting is per-process, not per-session. Using - * different settings in different sessions within same process will - * result in undefined behavior. + * different settings in different sessions within same process will + * result in undefined behavior. *
    * * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; @@ -4130,32 +4169,35 @@ public org.tensorflow.proto.GPUOptions.Experimental.VirtualDevices getVirtualDev * devices and have the <id> field assigned sequentially starting from 0, * according to the order of the virtual devices determined by * device_ordinal and the location in the virtual device list. + * * For example, - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB } - * virtual_devices { memory_limit: 3GB memory_limit: 4GB } + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB } + * virtual_devices { memory_limit: 3GB memory_limit: 4GB } * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory - * /device:GPU:1 -> visible GPU 1 with 2GB memory - * /device:GPU:2 -> visible GPU 0 with 3GB memory - * /device:GPU:3 -> visible GPU 0 with 4GB memory + * /device:GPU:0 -> visible GPU 1 with 1GB memory + * /device:GPU:1 -> visible GPU 1 with 2GB memory + * /device:GPU:2 -> visible GPU 0 with 3GB memory + * /device:GPU:3 -> visible GPU 0 with 4GB memory + * * but - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB - * device_ordinal: 10 device_ordinal: 20} - * virtual_devices { memory_limit: 3GB memory_limit: 4GB - * device_ordinal: 10 device_ordinal: 20} + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB + * device_ordinal: 10 device_ordinal: 20} + * virtual_devices { memory_limit: 3GB memory_limit: 4GB + * device_ordinal: 10 device_ordinal: 20} * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) - * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) - * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) - * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) + * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) + * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) + * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * * NOTE: * 1. It's invalid to set both this and "per_process_gpu_memory_fraction" - * at the same time. + * at the same time. * 2. Currently this setting is per-process, not per-session. Using - * different settings in different sessions within same process will - * result in undefined behavior. + * different settings in different sessions within same process will + * result in undefined behavior. *
    * * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; @@ -4185,32 +4227,35 @@ public Builder setVirtualDevices( * devices and have the <id> field assigned sequentially starting from 0, * according to the order of the virtual devices determined by * device_ordinal and the location in the virtual device list. + * * For example, - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB } - * virtual_devices { memory_limit: 3GB memory_limit: 4GB } + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB } + * virtual_devices { memory_limit: 3GB memory_limit: 4GB } * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory - * /device:GPU:1 -> visible GPU 1 with 2GB memory - * /device:GPU:2 -> visible GPU 0 with 3GB memory - * /device:GPU:3 -> visible GPU 0 with 4GB memory + * /device:GPU:0 -> visible GPU 1 with 1GB memory + * /device:GPU:1 -> visible GPU 1 with 2GB memory + * /device:GPU:2 -> visible GPU 0 with 3GB memory + * /device:GPU:3 -> visible GPU 0 with 4GB memory + * * but - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB - * device_ordinal: 10 device_ordinal: 20} - * virtual_devices { memory_limit: 3GB memory_limit: 4GB - * device_ordinal: 10 device_ordinal: 20} + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB + * device_ordinal: 10 device_ordinal: 20} + * virtual_devices { memory_limit: 3GB memory_limit: 4GB + * device_ordinal: 10 device_ordinal: 20} * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) - * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) - * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) - * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) + * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) + * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) + * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * * NOTE: * 1. It's invalid to set both this and "per_process_gpu_memory_fraction" - * at the same time. + * at the same time. * 2. Currently this setting is per-process, not per-session. Using - * different settings in different sessions within same process will - * result in undefined behavior. + * different settings in different sessions within same process will + * result in undefined behavior. *
    * * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; @@ -4237,32 +4282,35 @@ public Builder setVirtualDevices( * devices and have the <id> field assigned sequentially starting from 0, * according to the order of the virtual devices determined by * device_ordinal and the location in the virtual device list. + * * For example, - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB } - * virtual_devices { memory_limit: 3GB memory_limit: 4GB } + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB } + * virtual_devices { memory_limit: 3GB memory_limit: 4GB } * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory - * /device:GPU:1 -> visible GPU 1 with 2GB memory - * /device:GPU:2 -> visible GPU 0 with 3GB memory - * /device:GPU:3 -> visible GPU 0 with 4GB memory + * /device:GPU:0 -> visible GPU 1 with 1GB memory + * /device:GPU:1 -> visible GPU 1 with 2GB memory + * /device:GPU:2 -> visible GPU 0 with 3GB memory + * /device:GPU:3 -> visible GPU 0 with 4GB memory + * * but - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB - * device_ordinal: 10 device_ordinal: 20} - * virtual_devices { memory_limit: 3GB memory_limit: 4GB - * device_ordinal: 10 device_ordinal: 20} + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB + * device_ordinal: 10 device_ordinal: 20} + * virtual_devices { memory_limit: 3GB memory_limit: 4GB + * device_ordinal: 10 device_ordinal: 20} * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) - * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) - * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) - * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) + * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) + * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) + * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * * NOTE: * 1. It's invalid to set both this and "per_process_gpu_memory_fraction" - * at the same time. + * at the same time. * 2. Currently this setting is per-process, not per-session. Using - * different settings in different sessions within same process will - * result in undefined behavior. + * different settings in different sessions within same process will + * result in undefined behavior. *
    * * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; @@ -4291,32 +4339,35 @@ public Builder addVirtualDevices(org.tensorflow.proto.GPUOptions.Experimental.Vi * devices and have the <id> field assigned sequentially starting from 0, * according to the order of the virtual devices determined by * device_ordinal and the location in the virtual device list. + * * For example, - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB } - * virtual_devices { memory_limit: 3GB memory_limit: 4GB } + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB } + * virtual_devices { memory_limit: 3GB memory_limit: 4GB } * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory - * /device:GPU:1 -> visible GPU 1 with 2GB memory - * /device:GPU:2 -> visible GPU 0 with 3GB memory - * /device:GPU:3 -> visible GPU 0 with 4GB memory + * /device:GPU:0 -> visible GPU 1 with 1GB memory + * /device:GPU:1 -> visible GPU 1 with 2GB memory + * /device:GPU:2 -> visible GPU 0 with 3GB memory + * /device:GPU:3 -> visible GPU 0 with 4GB memory + * * but - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB - * device_ordinal: 10 device_ordinal: 20} - * virtual_devices { memory_limit: 3GB memory_limit: 4GB - * device_ordinal: 10 device_ordinal: 20} + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB + * device_ordinal: 10 device_ordinal: 20} + * virtual_devices { memory_limit: 3GB memory_limit: 4GB + * device_ordinal: 10 device_ordinal: 20} * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) - * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) - * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) - * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) + * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) + * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) + * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * * NOTE: * 1. It's invalid to set both this and "per_process_gpu_memory_fraction" - * at the same time. + * at the same time. * 2. Currently this setting is per-process, not per-session. Using - * different settings in different sessions within same process will - * result in undefined behavior. + * different settings in different sessions within same process will + * result in undefined behavior. *
    * * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; @@ -4346,32 +4397,35 @@ public Builder addVirtualDevices( * devices and have the <id> field assigned sequentially starting from 0, * according to the order of the virtual devices determined by * device_ordinal and the location in the virtual device list. + * * For example, - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB } - * virtual_devices { memory_limit: 3GB memory_limit: 4GB } + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB } + * virtual_devices { memory_limit: 3GB memory_limit: 4GB } * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory - * /device:GPU:1 -> visible GPU 1 with 2GB memory - * /device:GPU:2 -> visible GPU 0 with 3GB memory - * /device:GPU:3 -> visible GPU 0 with 4GB memory + * /device:GPU:0 -> visible GPU 1 with 1GB memory + * /device:GPU:1 -> visible GPU 1 with 2GB memory + * /device:GPU:2 -> visible GPU 0 with 3GB memory + * /device:GPU:3 -> visible GPU 0 with 4GB memory + * * but - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB - * device_ordinal: 10 device_ordinal: 20} - * virtual_devices { memory_limit: 3GB memory_limit: 4GB - * device_ordinal: 10 device_ordinal: 20} + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB + * device_ordinal: 10 device_ordinal: 20} + * virtual_devices { memory_limit: 3GB memory_limit: 4GB + * device_ordinal: 10 device_ordinal: 20} * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) - * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) - * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) - * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) + * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) + * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) + * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * * NOTE: * 1. It's invalid to set both this and "per_process_gpu_memory_fraction" - * at the same time. + * at the same time. * 2. Currently this setting is per-process, not per-session. Using - * different settings in different sessions within same process will - * result in undefined behavior. + * different settings in different sessions within same process will + * result in undefined behavior. *
    * * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; @@ -4398,32 +4452,35 @@ public Builder addVirtualDevices( * devices and have the <id> field assigned sequentially starting from 0, * according to the order of the virtual devices determined by * device_ordinal and the location in the virtual device list. + * * For example, - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB } - * virtual_devices { memory_limit: 3GB memory_limit: 4GB } + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB } + * virtual_devices { memory_limit: 3GB memory_limit: 4GB } * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory - * /device:GPU:1 -> visible GPU 1 with 2GB memory - * /device:GPU:2 -> visible GPU 0 with 3GB memory - * /device:GPU:3 -> visible GPU 0 with 4GB memory + * /device:GPU:0 -> visible GPU 1 with 1GB memory + * /device:GPU:1 -> visible GPU 1 with 2GB memory + * /device:GPU:2 -> visible GPU 0 with 3GB memory + * /device:GPU:3 -> visible GPU 0 with 4GB memory + * * but - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB - * device_ordinal: 10 device_ordinal: 20} - * virtual_devices { memory_limit: 3GB memory_limit: 4GB - * device_ordinal: 10 device_ordinal: 20} + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB + * device_ordinal: 10 device_ordinal: 20} + * virtual_devices { memory_limit: 3GB memory_limit: 4GB + * device_ordinal: 10 device_ordinal: 20} * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) - * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) - * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) - * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) + * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) + * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) + * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * * NOTE: * 1. It's invalid to set both this and "per_process_gpu_memory_fraction" - * at the same time. + * at the same time. * 2. Currently this setting is per-process, not per-session. Using - * different settings in different sessions within same process will - * result in undefined behavior. + * different settings in different sessions within same process will + * result in undefined behavior. *
    * * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; @@ -4450,32 +4507,35 @@ public Builder addVirtualDevices( * devices and have the <id> field assigned sequentially starting from 0, * according to the order of the virtual devices determined by * device_ordinal and the location in the virtual device list. + * * For example, - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB } - * virtual_devices { memory_limit: 3GB memory_limit: 4GB } + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB } + * virtual_devices { memory_limit: 3GB memory_limit: 4GB } * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory - * /device:GPU:1 -> visible GPU 1 with 2GB memory - * /device:GPU:2 -> visible GPU 0 with 3GB memory - * /device:GPU:3 -> visible GPU 0 with 4GB memory + * /device:GPU:0 -> visible GPU 1 with 1GB memory + * /device:GPU:1 -> visible GPU 1 with 2GB memory + * /device:GPU:2 -> visible GPU 0 with 3GB memory + * /device:GPU:3 -> visible GPU 0 with 4GB memory + * * but - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB - * device_ordinal: 10 device_ordinal: 20} - * virtual_devices { memory_limit: 3GB memory_limit: 4GB - * device_ordinal: 10 device_ordinal: 20} + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB + * device_ordinal: 10 device_ordinal: 20} + * virtual_devices { memory_limit: 3GB memory_limit: 4GB + * device_ordinal: 10 device_ordinal: 20} * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) - * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) - * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) - * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) + * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) + * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) + * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * * NOTE: * 1. It's invalid to set both this and "per_process_gpu_memory_fraction" - * at the same time. + * at the same time. * 2. Currently this setting is per-process, not per-session. Using - * different settings in different sessions within same process will - * result in undefined behavior. + * different settings in different sessions within same process will + * result in undefined behavior. *
    * * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; @@ -4503,32 +4563,35 @@ public Builder addAllVirtualDevices( * devices and have the <id> field assigned sequentially starting from 0, * according to the order of the virtual devices determined by * device_ordinal and the location in the virtual device list. + * * For example, - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB } - * virtual_devices { memory_limit: 3GB memory_limit: 4GB } + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB } + * virtual_devices { memory_limit: 3GB memory_limit: 4GB } * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory - * /device:GPU:1 -> visible GPU 1 with 2GB memory - * /device:GPU:2 -> visible GPU 0 with 3GB memory - * /device:GPU:3 -> visible GPU 0 with 4GB memory + * /device:GPU:0 -> visible GPU 1 with 1GB memory + * /device:GPU:1 -> visible GPU 1 with 2GB memory + * /device:GPU:2 -> visible GPU 0 with 3GB memory + * /device:GPU:3 -> visible GPU 0 with 4GB memory + * * but - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB - * device_ordinal: 10 device_ordinal: 20} - * virtual_devices { memory_limit: 3GB memory_limit: 4GB - * device_ordinal: 10 device_ordinal: 20} + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB + * device_ordinal: 10 device_ordinal: 20} + * virtual_devices { memory_limit: 3GB memory_limit: 4GB + * device_ordinal: 10 device_ordinal: 20} * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) - * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) - * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) - * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) + * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) + * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) + * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * * NOTE: * 1. It's invalid to set both this and "per_process_gpu_memory_fraction" - * at the same time. + * at the same time. * 2. Currently this setting is per-process, not per-session. Using - * different settings in different sessions within same process will - * result in undefined behavior. + * different settings in different sessions within same process will + * result in undefined behavior. *
    * * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; @@ -4554,32 +4617,35 @@ public Builder clearVirtualDevices() { * devices and have the <id> field assigned sequentially starting from 0, * according to the order of the virtual devices determined by * device_ordinal and the location in the virtual device list. + * * For example, - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB } - * virtual_devices { memory_limit: 3GB memory_limit: 4GB } + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB } + * virtual_devices { memory_limit: 3GB memory_limit: 4GB } * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory - * /device:GPU:1 -> visible GPU 1 with 2GB memory - * /device:GPU:2 -> visible GPU 0 with 3GB memory - * /device:GPU:3 -> visible GPU 0 with 4GB memory + * /device:GPU:0 -> visible GPU 1 with 1GB memory + * /device:GPU:1 -> visible GPU 1 with 2GB memory + * /device:GPU:2 -> visible GPU 0 with 3GB memory + * /device:GPU:3 -> visible GPU 0 with 4GB memory + * * but - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB - * device_ordinal: 10 device_ordinal: 20} - * virtual_devices { memory_limit: 3GB memory_limit: 4GB - * device_ordinal: 10 device_ordinal: 20} + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB + * device_ordinal: 10 device_ordinal: 20} + * virtual_devices { memory_limit: 3GB memory_limit: 4GB + * device_ordinal: 10 device_ordinal: 20} * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) - * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) - * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) - * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) + * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) + * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) + * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * * NOTE: * 1. It's invalid to set both this and "per_process_gpu_memory_fraction" - * at the same time. + * at the same time. * 2. Currently this setting is per-process, not per-session. Using - * different settings in different sessions within same process will - * result in undefined behavior. + * different settings in different sessions within same process will + * result in undefined behavior. *
    * * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; @@ -4605,32 +4671,35 @@ public Builder removeVirtualDevices(int index) { * devices and have the <id> field assigned sequentially starting from 0, * according to the order of the virtual devices determined by * device_ordinal and the location in the virtual device list. + * * For example, - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB } - * virtual_devices { memory_limit: 3GB memory_limit: 4GB } + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB } + * virtual_devices { memory_limit: 3GB memory_limit: 4GB } * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory - * /device:GPU:1 -> visible GPU 1 with 2GB memory - * /device:GPU:2 -> visible GPU 0 with 3GB memory - * /device:GPU:3 -> visible GPU 0 with 4GB memory + * /device:GPU:0 -> visible GPU 1 with 1GB memory + * /device:GPU:1 -> visible GPU 1 with 2GB memory + * /device:GPU:2 -> visible GPU 0 with 3GB memory + * /device:GPU:3 -> visible GPU 0 with 4GB memory + * * but - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB - * device_ordinal: 10 device_ordinal: 20} - * virtual_devices { memory_limit: 3GB memory_limit: 4GB - * device_ordinal: 10 device_ordinal: 20} + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB + * device_ordinal: 10 device_ordinal: 20} + * virtual_devices { memory_limit: 3GB memory_limit: 4GB + * device_ordinal: 10 device_ordinal: 20} * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) - * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) - * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) - * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) + * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) + * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) + * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * * NOTE: * 1. It's invalid to set both this and "per_process_gpu_memory_fraction" - * at the same time. + * at the same time. * 2. Currently this setting is per-process, not per-session. Using - * different settings in different sessions within same process will - * result in undefined behavior. + * different settings in different sessions within same process will + * result in undefined behavior. *
    * * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; @@ -4650,32 +4719,35 @@ public org.tensorflow.proto.GPUOptions.Experimental.VirtualDevices.Builder getVi * devices and have the <id> field assigned sequentially starting from 0, * according to the order of the virtual devices determined by * device_ordinal and the location in the virtual device list. + * * For example, - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB } - * virtual_devices { memory_limit: 3GB memory_limit: 4GB } + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB } + * virtual_devices { memory_limit: 3GB memory_limit: 4GB } * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory - * /device:GPU:1 -> visible GPU 1 with 2GB memory - * /device:GPU:2 -> visible GPU 0 with 3GB memory - * /device:GPU:3 -> visible GPU 0 with 4GB memory + * /device:GPU:0 -> visible GPU 1 with 1GB memory + * /device:GPU:1 -> visible GPU 1 with 2GB memory + * /device:GPU:2 -> visible GPU 0 with 3GB memory + * /device:GPU:3 -> visible GPU 0 with 4GB memory + * * but - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB - * device_ordinal: 10 device_ordinal: 20} - * virtual_devices { memory_limit: 3GB memory_limit: 4GB - * device_ordinal: 10 device_ordinal: 20} + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB + * device_ordinal: 10 device_ordinal: 20} + * virtual_devices { memory_limit: 3GB memory_limit: 4GB + * device_ordinal: 10 device_ordinal: 20} * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) - * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) - * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) - * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) + * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) + * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) + * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * * NOTE: * 1. It's invalid to set both this and "per_process_gpu_memory_fraction" - * at the same time. + * at the same time. * 2. Currently this setting is per-process, not per-session. Using - * different settings in different sessions within same process will - * result in undefined behavior. + * different settings in different sessions within same process will + * result in undefined behavior. *
    * * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; @@ -4698,32 +4770,35 @@ public org.tensorflow.proto.GPUOptions.Experimental.VirtualDevicesOrBuilder getV * devices and have the <id> field assigned sequentially starting from 0, * according to the order of the virtual devices determined by * device_ordinal and the location in the virtual device list. + * * For example, - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB } - * virtual_devices { memory_limit: 3GB memory_limit: 4GB } + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB } + * virtual_devices { memory_limit: 3GB memory_limit: 4GB } * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory - * /device:GPU:1 -> visible GPU 1 with 2GB memory - * /device:GPU:2 -> visible GPU 0 with 3GB memory - * /device:GPU:3 -> visible GPU 0 with 4GB memory + * /device:GPU:0 -> visible GPU 1 with 1GB memory + * /device:GPU:1 -> visible GPU 1 with 2GB memory + * /device:GPU:2 -> visible GPU 0 with 3GB memory + * /device:GPU:3 -> visible GPU 0 with 4GB memory + * * but - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB - * device_ordinal: 10 device_ordinal: 20} - * virtual_devices { memory_limit: 3GB memory_limit: 4GB - * device_ordinal: 10 device_ordinal: 20} + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB + * device_ordinal: 10 device_ordinal: 20} + * virtual_devices { memory_limit: 3GB memory_limit: 4GB + * device_ordinal: 10 device_ordinal: 20} * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) - * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) - * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) - * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) + * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) + * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) + * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * * NOTE: * 1. It's invalid to set both this and "per_process_gpu_memory_fraction" - * at the same time. + * at the same time. * 2. Currently this setting is per-process, not per-session. Using - * different settings in different sessions within same process will - * result in undefined behavior. + * different settings in different sessions within same process will + * result in undefined behavior. *
    * * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; @@ -4747,32 +4822,35 @@ public org.tensorflow.proto.GPUOptions.Experimental.VirtualDevicesOrBuilder getV * devices and have the <id> field assigned sequentially starting from 0, * according to the order of the virtual devices determined by * device_ordinal and the location in the virtual device list. + * * For example, - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB } - * virtual_devices { memory_limit: 3GB memory_limit: 4GB } + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB } + * virtual_devices { memory_limit: 3GB memory_limit: 4GB } * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory - * /device:GPU:1 -> visible GPU 1 with 2GB memory - * /device:GPU:2 -> visible GPU 0 with 3GB memory - * /device:GPU:3 -> visible GPU 0 with 4GB memory + * /device:GPU:0 -> visible GPU 1 with 1GB memory + * /device:GPU:1 -> visible GPU 1 with 2GB memory + * /device:GPU:2 -> visible GPU 0 with 3GB memory + * /device:GPU:3 -> visible GPU 0 with 4GB memory + * * but - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB - * device_ordinal: 10 device_ordinal: 20} - * virtual_devices { memory_limit: 3GB memory_limit: 4GB - * device_ordinal: 10 device_ordinal: 20} + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB + * device_ordinal: 10 device_ordinal: 20} + * virtual_devices { memory_limit: 3GB memory_limit: 4GB + * device_ordinal: 10 device_ordinal: 20} * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) - * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) - * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) - * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) + * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) + * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) + * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * * NOTE: * 1. It's invalid to set both this and "per_process_gpu_memory_fraction" - * at the same time. + * at the same time. * 2. Currently this setting is per-process, not per-session. Using - * different settings in different sessions within same process will - * result in undefined behavior. + * different settings in different sessions within same process will + * result in undefined behavior. *
    * * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; @@ -4792,32 +4870,35 @@ public org.tensorflow.proto.GPUOptions.Experimental.VirtualDevices.Builder addVi * devices and have the <id> field assigned sequentially starting from 0, * according to the order of the virtual devices determined by * device_ordinal and the location in the virtual device list. + * * For example, - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB } - * virtual_devices { memory_limit: 3GB memory_limit: 4GB } + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB } + * virtual_devices { memory_limit: 3GB memory_limit: 4GB } * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory - * /device:GPU:1 -> visible GPU 1 with 2GB memory - * /device:GPU:2 -> visible GPU 0 with 3GB memory - * /device:GPU:3 -> visible GPU 0 with 4GB memory + * /device:GPU:0 -> visible GPU 1 with 1GB memory + * /device:GPU:1 -> visible GPU 1 with 2GB memory + * /device:GPU:2 -> visible GPU 0 with 3GB memory + * /device:GPU:3 -> visible GPU 0 with 4GB memory + * * but - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB - * device_ordinal: 10 device_ordinal: 20} - * virtual_devices { memory_limit: 3GB memory_limit: 4GB - * device_ordinal: 10 device_ordinal: 20} + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB + * device_ordinal: 10 device_ordinal: 20} + * virtual_devices { memory_limit: 3GB memory_limit: 4GB + * device_ordinal: 10 device_ordinal: 20} * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) - * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) - * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) - * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) + * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) + * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) + * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * * NOTE: * 1. It's invalid to set both this and "per_process_gpu_memory_fraction" - * at the same time. + * at the same time. * 2. Currently this setting is per-process, not per-session. Using - * different settings in different sessions within same process will - * result in undefined behavior. + * different settings in different sessions within same process will + * result in undefined behavior. *
    * * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; @@ -4838,32 +4919,35 @@ public org.tensorflow.proto.GPUOptions.Experimental.VirtualDevices.Builder addVi * devices and have the <id> field assigned sequentially starting from 0, * according to the order of the virtual devices determined by * device_ordinal and the location in the virtual device list. + * * For example, - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB } - * virtual_devices { memory_limit: 3GB memory_limit: 4GB } + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB } + * virtual_devices { memory_limit: 3GB memory_limit: 4GB } * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory - * /device:GPU:1 -> visible GPU 1 with 2GB memory - * /device:GPU:2 -> visible GPU 0 with 3GB memory - * /device:GPU:3 -> visible GPU 0 with 4GB memory + * /device:GPU:0 -> visible GPU 1 with 1GB memory + * /device:GPU:1 -> visible GPU 1 with 2GB memory + * /device:GPU:2 -> visible GPU 0 with 3GB memory + * /device:GPU:3 -> visible GPU 0 with 4GB memory + * * but - * visible_device_list = "1,0" - * virtual_devices { memory_limit: 1GB memory_limit: 2GB - * device_ordinal: 10 device_ordinal: 20} - * virtual_devices { memory_limit: 3GB memory_limit: 4GB - * device_ordinal: 10 device_ordinal: 20} + * visible_device_list = "1,0" + * virtual_devices { memory_limit: 1GB memory_limit: 2GB + * device_ordinal: 10 device_ordinal: 20} + * virtual_devices { memory_limit: 3GB memory_limit: 4GB + * device_ordinal: 10 device_ordinal: 20} * will create 4 virtual devices as: - * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) - * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) - * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) - * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) + * /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) + * /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) + * /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) + * * NOTE: * 1. It's invalid to set both this and "per_process_gpu_memory_fraction" - * at the same time. + * at the same time. * 2. Currently this setting is per-process, not per-session. Using - * different settings in different sessions within same process will - * result in undefined behavior. + * different settings in different sessions within same process will + * result in undefined behavior. *
    * * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; @@ -4872,11 +4956,11 @@ public org.tensorflow.proto.GPUOptions.Experimental.VirtualDevices.Builder addVi getVirtualDevicesBuilderList() { return getVirtualDevicesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.GPUOptions.Experimental.VirtualDevices, org.tensorflow.proto.GPUOptions.Experimental.VirtualDevices.Builder, org.tensorflow.proto.GPUOptions.Experimental.VirtualDevicesOrBuilder> getVirtualDevicesFieldBuilder() { if (virtualDevicesBuilder_ == null) { - virtualDevicesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + virtualDevicesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.GPUOptions.Experimental.VirtualDevices, org.tensorflow.proto.GPUOptions.Experimental.VirtualDevices.Builder, org.tensorflow.proto.GPUOptions.Experimental.VirtualDevicesOrBuilder>( virtualDevices_, ((bitField0_ & 0x00000001) != 0), @@ -4916,8 +5000,9 @@ public int getNumVirtualDevicesPerGpu() { * @return This builder for chaining. */ public Builder setNumVirtualDevicesPerGpu(int value) { - + numVirtualDevicesPerGpu_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -4933,7 +5018,7 @@ public Builder setNumVirtualDevicesPerGpu(int value) { * @return This builder for chaining. */ public Builder clearNumVirtualDevicesPerGpu() { - + bitField0_ = (bitField0_ & ~0x00000002); numVirtualDevicesPerGpu_ = 0; onChanged(); return this; @@ -4974,8 +5059,9 @@ public boolean getUseUnifiedMemory() { * @return This builder for chaining. */ public Builder setUseUnifiedMemory(boolean value) { - + useUnifiedMemory_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -4994,7 +5080,7 @@ public Builder setUseUnifiedMemory(boolean value) { * @return This builder for chaining. */ public Builder clearUseUnifiedMemory() { - + bitField0_ = (bitField0_ & ~0x00000004); useUnifiedMemory_ = false; onChanged(); return this; @@ -5027,8 +5113,9 @@ public int getNumDevToDevCopyStreams() { * @return This builder for chaining. */ public Builder setNumDevToDevCopyStreams(int value) { - + numDevToDevCopyStreams_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -5043,7 +5130,7 @@ public Builder setNumDevToDevCopyStreams(int value) { * @return This builder for chaining. */ public Builder clearNumDevToDevCopyStreams() { - + bitField0_ = (bitField0_ & ~0x00000008); numDevToDevCopyStreams_ = 0; onChanged(); return this; @@ -5117,11 +5204,9 @@ public java.lang.String getCollectiveRingOrder() { */ public Builder setCollectiveRingOrder( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } collectiveRingOrder_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -5139,8 +5224,8 @@ public Builder setCollectiveRingOrder( * @return This builder for chaining. */ public Builder clearCollectiveRingOrder() { - collectiveRingOrder_ = getDefaultInstance().getCollectiveRingOrder(); + bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } @@ -5160,12 +5245,10 @@ public Builder clearCollectiveRingOrder() { */ public Builder setCollectiveRingOrderBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); collectiveRingOrder_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -5199,8 +5282,9 @@ public boolean getTimestampedAllocator() { * @return This builder for chaining. */ public Builder setTimestampedAllocator(boolean value) { - + timestampedAllocator_ = value; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -5216,7 +5300,7 @@ public Builder setTimestampedAllocator(boolean value) { * @return This builder for chaining. */ public Builder clearTimestampedAllocator() { - + bitField0_ = (bitField0_ & ~0x00000020); timestampedAllocator_ = false; onChanged(); return this; @@ -5228,6 +5312,7 @@ public Builder clearTimestampedAllocator() { * Parameters for GPUKernelTracker. By default no kernel tracking is done. * Note that timestamped_allocator is only effective if some tracking is * specified. + * * If kernel_tracker_max_interval = n > 0, then a tracking event * is inserted after every n kernels without an event. *
    @@ -5244,6 +5329,7 @@ public int getKernelTrackerMaxInterval() { * Parameters for GPUKernelTracker. By default no kernel tracking is done. * Note that timestamped_allocator is only effective if some tracking is * specified. + * * If kernel_tracker_max_interval = n > 0, then a tracking event * is inserted after every n kernels without an event. *
    @@ -5253,8 +5339,9 @@ public int getKernelTrackerMaxInterval() { * @return This builder for chaining. */ public Builder setKernelTrackerMaxInterval(int value) { - + kernelTrackerMaxInterval_ = value; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -5263,6 +5350,7 @@ public Builder setKernelTrackerMaxInterval(int value) { * Parameters for GPUKernelTracker. By default no kernel tracking is done. * Note that timestamped_allocator is only effective if some tracking is * specified. + * * If kernel_tracker_max_interval = n > 0, then a tracking event * is inserted after every n kernels without an event. *
    @@ -5271,7 +5359,7 @@ public Builder setKernelTrackerMaxInterval(int value) { * @return This builder for chaining. */ public Builder clearKernelTrackerMaxInterval() { - + bitField0_ = (bitField0_ & ~0x00000040); kernelTrackerMaxInterval_ = 0; onChanged(); return this; @@ -5308,8 +5396,9 @@ public int getKernelTrackerMaxBytes() { * @return This builder for chaining. */ public Builder setKernelTrackerMaxBytes(int value) { - + kernelTrackerMaxBytes_ = value; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -5326,7 +5415,7 @@ public Builder setKernelTrackerMaxBytes(int value) { * @return This builder for chaining. */ public Builder clearKernelTrackerMaxBytes() { - + bitField0_ = (bitField0_ & ~0x00000080); kernelTrackerMaxBytes_ = 0; onChanged(); return this; @@ -5361,8 +5450,9 @@ public int getKernelTrackerMaxPending() { * @return This builder for chaining. */ public Builder setKernelTrackerMaxPending(int value) { - + kernelTrackerMaxPending_ = value; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -5378,7 +5468,7 @@ public Builder setKernelTrackerMaxPending(int value) { * @return This builder for chaining. */ public Builder clearKernelTrackerMaxPending() { - + bitField0_ = (bitField0_ & ~0x00000100); kernelTrackerMaxPending_ = 0; onChanged(); return this; @@ -5423,8 +5513,9 @@ public double getInternalFragmentationFraction() { * @return This builder for chaining. */ public Builder setInternalFragmentationFraction(double value) { - + internalFragmentationFraction_ = value; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -5445,7 +5536,7 @@ public Builder setInternalFragmentationFraction(double value) { * @return This builder for chaining. */ public Builder clearInternalFragmentationFraction() { - + bitField0_ = (bitField0_ & ~0x00000200); internalFragmentationFraction_ = 0D; onChanged(); return this; @@ -5474,8 +5565,9 @@ public boolean getUseCudaMallocAsync() { * @return This builder for chaining. */ public Builder setUseCudaMallocAsync(boolean value) { - + useCudaMallocAsync_ = value; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -5488,7 +5580,7 @@ public Builder setUseCudaMallocAsync(boolean value) { * @return This builder for chaining. */ public Builder clearUseCudaMallocAsync() { - + bitField0_ = (bitField0_ & ~0x00000400); useCudaMallocAsync_ = false; onChanged(); return this; @@ -5521,8 +5613,9 @@ public boolean getDisallowRetryOnAllocationFailure() { * @return This builder for chaining. */ public Builder setDisallowRetryOnAllocationFailure(boolean value) { - + disallowRetryOnAllocationFailure_ = value; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -5537,7 +5630,7 @@ public Builder setDisallowRetryOnAllocationFailure(boolean value) { * @return This builder for chaining. */ public Builder clearDisallowRetryOnAllocationFailure() { - + bitField0_ = (bitField0_ & ~0x00000800); disallowRetryOnAllocationFailure_ = false; onChanged(); return this; @@ -5568,8 +5661,9 @@ public float getGpuHostMemLimitInMb() { * @return This builder for chaining. */ public Builder setGpuHostMemLimitInMb(float value) { - + gpuHostMemLimitInMb_ = value; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -5583,7 +5677,7 @@ public Builder setGpuHostMemLimitInMb(float value) { * @return This builder for chaining. */ public Builder clearGpuHostMemLimitInMb() { - + bitField0_ = (bitField0_ & ~0x00001000); gpuHostMemLimitInMb_ = 0F; onChanged(); return this; @@ -5595,6 +5689,7 @@ public Builder clearGpuHostMemLimitInMb() { * If true, then the host allocator allocates its max memory all upfront and * never grows. This can be useful for latency-sensitive systems, because * growing the GPU host memory pool can be expensive. + * * You probably only want to use this in combination with * gpu_host_mem_limit_in_mb, because the default GPU host memory limit is * quite high. @@ -5612,6 +5707,7 @@ public boolean getGpuHostMemDisallowGrowth() { * If true, then the host allocator allocates its max memory all upfront and * never grows. This can be useful for latency-sensitive systems, because * growing the GPU host memory pool can be expensive. + * * You probably only want to use this in combination with * gpu_host_mem_limit_in_mb, because the default GPU host memory limit is * quite high. @@ -5622,8 +5718,9 @@ public boolean getGpuHostMemDisallowGrowth() { * @return This builder for chaining. */ public Builder setGpuHostMemDisallowGrowth(boolean value) { - + gpuHostMemDisallowGrowth_ = value; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -5632,6 +5729,7 @@ public Builder setGpuHostMemDisallowGrowth(boolean value) { * If true, then the host allocator allocates its max memory all upfront and * never grows. This can be useful for latency-sensitive systems, because * growing the GPU host memory pool can be expensive. + * * You probably only want to use this in combination with * gpu_host_mem_limit_in_mb, because the default GPU host memory limit is * quite high. @@ -5641,7 +5739,7 @@ public Builder setGpuHostMemDisallowGrowth(boolean value) { * @return This builder for chaining. */ public Builder clearGpuHostMemDisallowGrowth() { - + bitField0_ = (bitField0_ & ~0x00002000); gpuHostMemDisallowGrowth_ = false; onChanged(); return this; @@ -5678,8 +5776,9 @@ public int getGpuSystemMemorySizeInMb() { * @return This builder for chaining. */ public Builder setGpuSystemMemorySizeInMb(int value) { - + gpuSystemMemorySizeInMb_ = value; + bitField0_ |= 0x00004000; onChanged(); return this; } @@ -5696,7 +5795,7 @@ public Builder setGpuSystemMemorySizeInMb(int value) { * @return This builder for chaining. */ public Builder clearGpuSystemMemorySizeInMb() { - + bitField0_ = (bitField0_ & ~0x00004000); gpuSystemMemorySizeInMb_ = 0; onChanged(); return this; @@ -5727,8 +5826,9 @@ public boolean getPopulatePjrtGpuClientCreationInfo() { * @return This builder for chaining. */ public Builder setPopulatePjrtGpuClientCreationInfo(boolean value) { - + populatePjrtGpuClientCreationInfo_ = value; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -5742,7 +5842,7 @@ public Builder setPopulatePjrtGpuClientCreationInfo(boolean value) { * @return This builder for chaining. */ public Builder clearPopulatePjrtGpuClientCreationInfo() { - + bitField0_ = (bitField0_ & ~0x00008000); populatePjrtGpuClientCreationInfo_ = false; onChanged(); return this; @@ -5773,8 +5873,9 @@ public int getNodeId() { * @return This builder for chaining. */ public Builder setNodeId(int value) { - + nodeId_ = value; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -5788,21 +5889,21 @@ public Builder setNodeId(int value) { * @return This builder for chaining. */ public Builder clearNodeId() { - + bitField0_ = (bitField0_ & ~0x00010000); nodeId_ = 0; onChanged(); return this; } private org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptions streamMergeOptions_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptions, org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptions.Builder, org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptionsOrBuilder> streamMergeOptionsBuilder_; /** * .tensorflow.GPUOptions.Experimental.StreamMergeOptions stream_merge_options = 19; * @return Whether the streamMergeOptions field is set. */ public boolean hasStreamMergeOptions() { - return streamMergeOptionsBuilder_ != null || streamMergeOptions_ != null; + return ((bitField0_ & 0x00020000) != 0); } /** * .tensorflow.GPUOptions.Experimental.StreamMergeOptions stream_merge_options = 19; @@ -5824,11 +5925,11 @@ public Builder setStreamMergeOptions(org.tensorflow.proto.GPUOptions.Experimenta throw new NullPointerException(); } streamMergeOptions_ = value; - onChanged(); } else { streamMergeOptionsBuilder_.setMessage(value); } - + bitField0_ |= 0x00020000; + onChanged(); return this; } /** @@ -5838,11 +5939,11 @@ public Builder setStreamMergeOptions( org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptions.Builder builderForValue) { if (streamMergeOptionsBuilder_ == null) { streamMergeOptions_ = builderForValue.build(); - onChanged(); } else { streamMergeOptionsBuilder_.setMessage(builderForValue.build()); } - + bitField0_ |= 0x00020000; + onChanged(); return this; } /** @@ -5850,38 +5951,40 @@ public Builder setStreamMergeOptions( */ public Builder mergeStreamMergeOptions(org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptions value) { if (streamMergeOptionsBuilder_ == null) { - if (streamMergeOptions_ != null) { - streamMergeOptions_ = - org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptions.newBuilder(streamMergeOptions_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00020000) != 0) && + streamMergeOptions_ != null && + streamMergeOptions_ != org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptions.getDefaultInstance()) { + getStreamMergeOptionsBuilder().mergeFrom(value); } else { streamMergeOptions_ = value; } - onChanged(); } else { streamMergeOptionsBuilder_.mergeFrom(value); } - + if (streamMergeOptions_ != null) { + bitField0_ |= 0x00020000; + onChanged(); + } return this; } /** * .tensorflow.GPUOptions.Experimental.StreamMergeOptions stream_merge_options = 19; */ public Builder clearStreamMergeOptions() { - if (streamMergeOptionsBuilder_ == null) { - streamMergeOptions_ = null; - onChanged(); - } else { - streamMergeOptions_ = null; + bitField0_ = (bitField0_ & ~0x00020000); + streamMergeOptions_ = null; + if (streamMergeOptionsBuilder_ != null) { + streamMergeOptionsBuilder_.dispose(); streamMergeOptionsBuilder_ = null; } - + onChanged(); return this; } /** * .tensorflow.GPUOptions.Experimental.StreamMergeOptions stream_merge_options = 19; */ public org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptions.Builder getStreamMergeOptionsBuilder() { - + bitField0_ |= 0x00020000; onChanged(); return getStreamMergeOptionsFieldBuilder().getBuilder(); } @@ -5899,11 +6002,11 @@ public org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptionsOrBuilder /** * .tensorflow.GPUOptions.Experimental.StreamMergeOptions stream_merge_options = 19; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptions, org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptions.Builder, org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptionsOrBuilder> getStreamMergeOptionsFieldBuilder() { if (streamMergeOptionsBuilder_ == null) { - streamMergeOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + streamMergeOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptions, org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptions.Builder, org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptionsOrBuilder>( getStreamMergeOptions(), getParentForChildren(), @@ -5912,18 +6015,6 @@ public org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptionsOrBuilder } return streamMergeOptionsBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.GPUOptions.Experimental) } @@ -5976,14 +6067,17 @@ public org.tensorflow.proto.GPUOptions.Experimental getDefaultInstanceForType() } + private int bitField0_; public static final int PER_PROCESS_GPU_MEMORY_FRACTION_FIELD_NUMBER = 1; - private double perProcessGpuMemoryFraction_; + private double perProcessGpuMemoryFraction_ = 0D; /** *
        * Fraction of the total GPU memory to allocate for each process.
        * 1 means to allocate all of the GPU memory, 0.5 means the process
        * allocates up to ~50% of the total GPU memory.
    +   *
        * GPU memory is pre-allocated unless the allow_growth option is enabled.
    +   *
        * If greater than 1.0, uses CUDA unified memory to potentially oversubscribe
        * the amount of memory available on the GPU device by using host memory as a
        * swap space. Accessing memory not available on the device will be
    @@ -6006,7 +6100,7 @@ public double getPerProcessGpuMemoryFraction() {
       }
     
       public static final int ALLOW_GROWTH_FIELD_NUMBER = 4;
    -  private boolean allowGrowth_;
    +  private boolean allowGrowth_ = false;
       /**
        * 
        * If true, the allocator does not pre-allocate the entire specified
    @@ -6022,15 +6116,18 @@ public boolean getAllowGrowth() {
       }
     
       public static final int ALLOCATOR_TYPE_FIELD_NUMBER = 2;
    -  private volatile java.lang.Object allocatorType_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object allocatorType_ = "";
       /**
        * 
        * The type of GPU allocation strategy to use.
    +   *
        * Allowed values:
        * "": The empty string (default) uses a system-chosen default
    -   *     which may change over time.
    +   * which may change over time.
    +   *
        * "BFC": A "Best-fit with coalescing" algorithm, simplified from a
    -   *        version of dlmalloc.
    +   * version of dlmalloc.
        * 
    * * string allocator_type = 2; @@ -6052,11 +6149,13 @@ public java.lang.String getAllocatorType() { /** *
        * The type of GPU allocation strategy to use.
    +   *
        * Allowed values:
        * "": The empty string (default) uses a system-chosen default
    -   *     which may change over time.
    +   * which may change over time.
    +   *
        * "BFC": A "Best-fit with coalescing" algorithm, simplified from a
    -   *        version of dlmalloc.
    +   * version of dlmalloc.
        * 
    * * string allocator_type = 2; @@ -6078,7 +6177,7 @@ public java.lang.String getAllocatorType() { } public static final int DEFERRED_DELETION_BYTES_FIELD_NUMBER = 3; - private long deferredDeletionBytes_; + private long deferredDeletionBytes_ = 0L; /** *
        * Delay deletion of up to this many bytes to reduce the number of
    @@ -6095,7 +6194,8 @@ public long getDeferredDeletionBytes() {
       }
     
       public static final int VISIBLE_DEVICE_LIST_FIELD_NUMBER = 5;
    -  private volatile java.lang.Object visibleDeviceList_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object visibleDeviceList_ = "";
       /**
        * 
        * A comma-separated list of GPU ids that determines the 'visible'
    @@ -6105,19 +6205,25 @@ public long getDeferredDeletionBytes() {
        * then one would specify this field as "5,3".  This field is similar in
        * spirit to the CUDA_VISIBLE_DEVICES environment variable, except
        * it applies to the visible GPU devices in the process.
    +   *
        * NOTE:
        * 1. The GPU driver provides the process with the visible GPUs
    -   *    in an order which is not guaranteed to have any correlation to
    -   *    the *physical* GPU id in the machine.  This field is used for
    -   *    remapping "visible" to "virtual", which means this operates only
    -   *    after the process starts.  Users are required to use vendor
    -   *    specific mechanisms (e.g., CUDA_VISIBLE_DEVICES) to control the
    -   *    physical to visible device mapping prior to invoking TensorFlow.
    +   * in an order which is not guaranteed to have any correlation to
    +   * the *physical* GPU id in the machine.  This field is used for
    +   * remapping "visible" to "virtual", which means this operates only
    +   * after the process starts.  Users are required to use vendor
    +   * specific mechanisms (e.g., CUDA_VISIBLE_DEVICES) to control the
    +   * physical to visible device mapping prior to invoking TensorFlow.
        * 2. In the code, the ids in this list are also called "platform GPU id"s,
    -   *    and the 'virtual' ids of GPU devices (i.e. the ids in the device
    -   *    name "/device:GPU:<id>") are also called "TF GPU id"s. Please
    -   *    refer to third_party/tensorflow/core/common_runtime/gpu/gpu_id.h
    -   *    for more information.
    +   * and the 'virtual' ids of GPU devices (i.e. the ids in the device
    +   * name "/device:GPU:<id>") are also called "TF GPU id"s. Please
    +   * refer to third_party/tensorflow/core/common_runtime/gpu/gpu_id.h
    +   * for more information.
    +   * 3. The visible_device_list is also used for PluggableDevice. And
    +   * different types of PluggableDevices share this field. In that case,
    +   * the pluggable_device_type is used to distinguish them, making the
    +   * visible_device_list a list of <pluggable_device_type>:<device_index>,
    +   * e.g. "PluggableDeviceA:0,PluggableDeviceA:1,PluggableDeviceB:0".
        * 
    * * string visible_device_list = 5; @@ -6145,19 +6251,25 @@ public java.lang.String getVisibleDeviceList() { * then one would specify this field as "5,3". This field is similar in * spirit to the CUDA_VISIBLE_DEVICES environment variable, except * it applies to the visible GPU devices in the process. + * * NOTE: * 1. The GPU driver provides the process with the visible GPUs - * in an order which is not guaranteed to have any correlation to - * the *physical* GPU id in the machine. This field is used for - * remapping "visible" to "virtual", which means this operates only - * after the process starts. Users are required to use vendor - * specific mechanisms (e.g., CUDA_VISIBLE_DEVICES) to control the - * physical to visible device mapping prior to invoking TensorFlow. + * in an order which is not guaranteed to have any correlation to + * the *physical* GPU id in the machine. This field is used for + * remapping "visible" to "virtual", which means this operates only + * after the process starts. Users are required to use vendor + * specific mechanisms (e.g., CUDA_VISIBLE_DEVICES) to control the + * physical to visible device mapping prior to invoking TensorFlow. * 2. In the code, the ids in this list are also called "platform GPU id"s, - * and the 'virtual' ids of GPU devices (i.e. the ids in the device - * name "/device:GPU:<id>") are also called "TF GPU id"s. Please - * refer to third_party/tensorflow/core/common_runtime/gpu/gpu_id.h - * for more information. + * and the 'virtual' ids of GPU devices (i.e. the ids in the device + * name "/device:GPU:<id>") are also called "TF GPU id"s. Please + * refer to third_party/tensorflow/core/common_runtime/gpu/gpu_id.h + * for more information. + * 3. The visible_device_list is also used for PluggableDevice. And + * different types of PluggableDevices share this field. In that case, + * the pluggable_device_type is used to distinguish them, making the + * visible_device_list a list of <pluggable_device_type>:<device_index>, + * e.g. "PluggableDeviceA:0,PluggableDeviceA:1,PluggableDeviceB:0". *
    * * string visible_device_list = 5; @@ -6179,7 +6291,7 @@ public java.lang.String getVisibleDeviceList() { } public static final int POLLING_ACTIVE_DELAY_USECS_FIELD_NUMBER = 6; - private int pollingActiveDelayUsecs_; + private int pollingActiveDelayUsecs_ = 0; /** *
        * In the event polling loop sleep this many microseconds between
    @@ -6196,7 +6308,7 @@ public int getPollingActiveDelayUsecs() {
       }
     
       public static final int POLLING_INACTIVE_DELAY_MSECS_FIELD_NUMBER = 7;
    -  private int pollingInactiveDelayMsecs_;
    +  private int pollingInactiveDelayMsecs_ = 0;
       /**
        * 
        * This field is deprecated and ignored.
    @@ -6211,7 +6323,7 @@ public int getPollingInactiveDelayMsecs() {
       }
     
       public static final int FORCE_GPU_COMPATIBLE_FIELD_NUMBER = 8;
    -  private boolean forceGpuCompatible_;
    +  private boolean forceGpuCompatible_ = false;
       /**
        * 
        * Force all tensors to be gpu_compatible. On a GPU-enabled TensorFlow,
    @@ -6240,7 +6352,7 @@ public boolean getForceGpuCompatible() {
        * 
        * Everything inside experimental is subject to change and is not subject
        * to API stability guarantees in
    -   * https://www.tensorflow.org/guide/version_compat.
    +   * https://www.tensorflow.org/guide/versions.
        * 
    * * .tensorflow.GPUOptions.Experimental experimental = 9; @@ -6248,13 +6360,13 @@ public boolean getForceGpuCompatible() { */ @java.lang.Override public boolean hasExperimental() { - return experimental_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** *
        * Everything inside experimental is subject to change and is not subject
        * to API stability guarantees in
    -   * https://www.tensorflow.org/guide/version_compat.
    +   * https://www.tensorflow.org/guide/versions.
        * 
    * * .tensorflow.GPUOptions.Experimental experimental = 9; @@ -6268,14 +6380,14 @@ public org.tensorflow.proto.GPUOptions.Experimental getExperimental() { *
        * Everything inside experimental is subject to change and is not subject
        * to API stability guarantees in
    -   * https://www.tensorflow.org/guide/version_compat.
    +   * https://www.tensorflow.org/guide/versions.
        * 
    * * .tensorflow.GPUOptions.Experimental experimental = 9; */ @java.lang.Override public org.tensorflow.proto.GPUOptions.ExperimentalOrBuilder getExperimentalOrBuilder() { - return getExperimental(); + return experimental_ == null ? org.tensorflow.proto.GPUOptions.Experimental.getDefaultInstance() : experimental_; } private byte memoizedIsInitialized = -1; @@ -6295,8 +6407,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (java.lang.Double.doubleToRawLongBits(perProcessGpuMemoryFraction_) != 0) { output.writeDouble(1, perProcessGpuMemoryFraction_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(allocatorType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, allocatorType_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(allocatorType_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, allocatorType_); } if (deferredDeletionBytes_ != 0L) { output.writeInt64(3, deferredDeletionBytes_); @@ -6304,8 +6416,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (allowGrowth_ != false) { output.writeBool(4, allowGrowth_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(visibleDeviceList_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, visibleDeviceList_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(visibleDeviceList_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, visibleDeviceList_); } if (pollingActiveDelayUsecs_ != 0) { output.writeInt32(6, pollingActiveDelayUsecs_); @@ -6316,7 +6428,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (forceGpuCompatible_ != false) { output.writeBool(8, forceGpuCompatible_); } - if (experimental_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(9, getExperimental()); } getUnknownFields().writeTo(output); @@ -6332,8 +6444,8 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeDoubleSize(1, perProcessGpuMemoryFraction_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(allocatorType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, allocatorType_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(allocatorType_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, allocatorType_); } if (deferredDeletionBytes_ != 0L) { size += com.google.protobuf.CodedOutputStream @@ -6343,8 +6455,8 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBoolSize(4, allowGrowth_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(visibleDeviceList_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, visibleDeviceList_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(visibleDeviceList_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, visibleDeviceList_); } if (pollingActiveDelayUsecs_ != 0) { size += com.google.protobuf.CodedOutputStream @@ -6358,7 +6470,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBoolSize(8, forceGpuCompatible_); } - if (experimental_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(9, getExperimental()); } @@ -6473,39 +6585,41 @@ public static org.tensorflow.proto.GPUOptions parseFrom( } public static org.tensorflow.proto.GPUOptions parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.GPUOptions parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.GPUOptions parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.GPUOptions parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.GPUOptions parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.GPUOptions parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -6525,7 +6639,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -6533,7 +6647,7 @@ protected Builder newBuilderForType( * Protobuf type {@code tensorflow.GPUOptions} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.GPUOptions) org.tensorflow.proto.GPUOptionsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -6542,7 +6656,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_GPUOptions_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -6551,37 +6665,35 @@ public static final class Builder extends // Construct using org.tensorflow.proto.GPUOptions.newBuilder() private Builder() { - + maybeForceBuilderInitialization(); } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getExperimentalFieldBuilder(); + } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; perProcessGpuMemoryFraction_ = 0D; - allowGrowth_ = false; - allocatorType_ = ""; - deferredDeletionBytes_ = 0L; - visibleDeviceList_ = ""; - pollingActiveDelayUsecs_ = 0; - pollingInactiveDelayMsecs_ = 0; - forceGpuCompatible_ = false; - - if (experimentalBuilder_ == null) { - experimental_ = null; - } else { - experimental_ = null; + experimental_ = null; + if (experimentalBuilder_ != null) { + experimentalBuilder_.dispose(); experimentalBuilder_ = null; } return this; @@ -6610,55 +6722,47 @@ public org.tensorflow.proto.GPUOptions build() { @java.lang.Override public org.tensorflow.proto.GPUOptions buildPartial() { org.tensorflow.proto.GPUOptions result = new org.tensorflow.proto.GPUOptions(this); - result.perProcessGpuMemoryFraction_ = perProcessGpuMemoryFraction_; - result.allowGrowth_ = allowGrowth_; - result.allocatorType_ = allocatorType_; - result.deferredDeletionBytes_ = deferredDeletionBytes_; - result.visibleDeviceList_ = visibleDeviceList_; - result.pollingActiveDelayUsecs_ = pollingActiveDelayUsecs_; - result.pollingInactiveDelayMsecs_ = pollingInactiveDelayMsecs_; - result.forceGpuCompatible_ = forceGpuCompatible_; - if (experimentalBuilder_ == null) { - result.experimental_ = experimental_; - } else { - result.experimental_ = experimentalBuilder_.build(); - } + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.GPUOptions result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.perProcessGpuMemoryFraction_ = perProcessGpuMemoryFraction_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.allowGrowth_ = allowGrowth_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.allocatorType_ = allocatorType_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.deferredDeletionBytes_ = deferredDeletionBytes_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.visibleDeviceList_ = visibleDeviceList_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.pollingActiveDelayUsecs_ = pollingActiveDelayUsecs_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.pollingInactiveDelayMsecs_ = pollingInactiveDelayMsecs_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.forceGpuCompatible_ = forceGpuCompatible_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000100) != 0)) { + result.experimental_ = experimentalBuilder_ == null + ? experimental_ + : experimentalBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.GPUOptions) { @@ -6679,6 +6783,7 @@ public Builder mergeFrom(org.tensorflow.proto.GPUOptions other) { } if (!other.getAllocatorType().isEmpty()) { allocatorType_ = other.allocatorType_; + bitField0_ |= 0x00000004; onChanged(); } if (other.getDeferredDeletionBytes() != 0L) { @@ -6686,6 +6791,7 @@ public Builder mergeFrom(org.tensorflow.proto.GPUOptions other) { } if (!other.getVisibleDeviceList().isEmpty()) { visibleDeviceList_ = other.visibleDeviceList_; + bitField0_ |= 0x00000010; onChanged(); } if (other.getPollingActiveDelayUsecs() != 0) { @@ -6728,49 +6834,49 @@ public Builder mergeFrom( break; case 9: { perProcessGpuMemoryFraction_ = input.readDouble(); - + bitField0_ |= 0x00000001; break; } // case 9 case 18: { allocatorType_ = input.readStringRequireUtf8(); - + bitField0_ |= 0x00000004; break; } // case 18 case 24: { deferredDeletionBytes_ = input.readInt64(); - + bitField0_ |= 0x00000008; break; } // case 24 case 32: { allowGrowth_ = input.readBool(); - + bitField0_ |= 0x00000002; break; } // case 32 case 42: { visibleDeviceList_ = input.readStringRequireUtf8(); - + bitField0_ |= 0x00000010; break; } // case 42 case 48: { pollingActiveDelayUsecs_ = input.readInt32(); - + bitField0_ |= 0x00000020; break; } // case 48 case 56: { pollingInactiveDelayMsecs_ = input.readInt32(); - + bitField0_ |= 0x00000040; break; } // case 56 case 64: { forceGpuCompatible_ = input.readBool(); - + bitField0_ |= 0x00000080; break; } // case 64 case 74: { input.readMessage( getExperimentalFieldBuilder().getBuilder(), extensionRegistry); - + bitField0_ |= 0x00000100; break; } // case 74 default: { @@ -6788,6 +6894,7 @@ public Builder mergeFrom( } // finally return this; } + private int bitField0_; private double perProcessGpuMemoryFraction_ ; /** @@ -6795,7 +6902,9 @@ public Builder mergeFrom( * Fraction of the total GPU memory to allocate for each process. * 1 means to allocate all of the GPU memory, 0.5 means the process * allocates up to ~50% of the total GPU memory. + * * GPU memory is pre-allocated unless the allow_growth option is enabled. + * * If greater than 1.0, uses CUDA unified memory to potentially oversubscribe * the amount of memory available on the GPU device by using host memory as a * swap space. Accessing memory not available on the device will be @@ -6821,7 +6930,9 @@ public double getPerProcessGpuMemoryFraction() { * Fraction of the total GPU memory to allocate for each process. * 1 means to allocate all of the GPU memory, 0.5 means the process * allocates up to ~50% of the total GPU memory. + * * GPU memory is pre-allocated unless the allow_growth option is enabled. + * * If greater than 1.0, uses CUDA unified memory to potentially oversubscribe * the amount of memory available on the GPU device by using host memory as a * swap space. Accessing memory not available on the device will be @@ -6840,8 +6951,9 @@ public double getPerProcessGpuMemoryFraction() { * @return This builder for chaining. */ public Builder setPerProcessGpuMemoryFraction(double value) { - + perProcessGpuMemoryFraction_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -6850,7 +6962,9 @@ public Builder setPerProcessGpuMemoryFraction(double value) { * Fraction of the total GPU memory to allocate for each process. * 1 means to allocate all of the GPU memory, 0.5 means the process * allocates up to ~50% of the total GPU memory. + * * GPU memory is pre-allocated unless the allow_growth option is enabled. + * * If greater than 1.0, uses CUDA unified memory to potentially oversubscribe * the amount of memory available on the GPU device by using host memory as a * swap space. Accessing memory not available on the device will be @@ -6868,7 +6982,7 @@ public Builder setPerProcessGpuMemoryFraction(double value) { * @return This builder for chaining. */ public Builder clearPerProcessGpuMemoryFraction() { - + bitField0_ = (bitField0_ & ~0x00000001); perProcessGpuMemoryFraction_ = 0D; onChanged(); return this; @@ -6899,8 +7013,9 @@ public boolean getAllowGrowth() { * @return This builder for chaining. */ public Builder setAllowGrowth(boolean value) { - + allowGrowth_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -6914,7 +7029,7 @@ public Builder setAllowGrowth(boolean value) { * @return This builder for chaining. */ public Builder clearAllowGrowth() { - + bitField0_ = (bitField0_ & ~0x00000002); allowGrowth_ = false; onChanged(); return this; @@ -6924,11 +7039,13 @@ public Builder clearAllowGrowth() { /** *
          * The type of GPU allocation strategy to use.
    +     *
          * Allowed values:
          * "": The empty string (default) uses a system-chosen default
    -     *     which may change over time.
    +     * which may change over time.
    +     *
          * "BFC": A "Best-fit with coalescing" algorithm, simplified from a
    -     *        version of dlmalloc.
    +     * version of dlmalloc.
          * 
    * * string allocator_type = 2; @@ -6949,11 +7066,13 @@ public java.lang.String getAllocatorType() { /** *
          * The type of GPU allocation strategy to use.
    +     *
          * Allowed values:
          * "": The empty string (default) uses a system-chosen default
    -     *     which may change over time.
    +     * which may change over time.
    +     *
          * "BFC": A "Best-fit with coalescing" algorithm, simplified from a
    -     *        version of dlmalloc.
    +     * version of dlmalloc.
          * 
    * * string allocator_type = 2; @@ -6975,11 +7094,13 @@ public java.lang.String getAllocatorType() { /** *
          * The type of GPU allocation strategy to use.
    +     *
          * Allowed values:
          * "": The empty string (default) uses a system-chosen default
    -     *     which may change over time.
    +     * which may change over time.
    +     *
          * "BFC": A "Best-fit with coalescing" algorithm, simplified from a
    -     *        version of dlmalloc.
    +     * version of dlmalloc.
          * 
    * * string allocator_type = 2; @@ -6988,41 +7109,43 @@ public java.lang.String getAllocatorType() { */ public Builder setAllocatorType( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } allocatorType_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } /** *
          * The type of GPU allocation strategy to use.
    +     *
          * Allowed values:
          * "": The empty string (default) uses a system-chosen default
    -     *     which may change over time.
    +     * which may change over time.
    +     *
          * "BFC": A "Best-fit with coalescing" algorithm, simplified from a
    -     *        version of dlmalloc.
    +     * version of dlmalloc.
          * 
    * * string allocator_type = 2; * @return This builder for chaining. */ public Builder clearAllocatorType() { - allocatorType_ = getDefaultInstance().getAllocatorType(); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } /** *
          * The type of GPU allocation strategy to use.
    +     *
          * Allowed values:
          * "": The empty string (default) uses a system-chosen default
    -     *     which may change over time.
    +     * which may change over time.
    +     *
          * "BFC": A "Best-fit with coalescing" algorithm, simplified from a
    -     *        version of dlmalloc.
    +     * version of dlmalloc.
          * 
    * * string allocator_type = 2; @@ -7031,12 +7154,10 @@ public Builder clearAllocatorType() { */ public Builder setAllocatorTypeBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); allocatorType_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -7068,8 +7189,9 @@ public long getDeferredDeletionBytes() { * @return This builder for chaining. */ public Builder setDeferredDeletionBytes(long value) { - + deferredDeletionBytes_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -7084,7 +7206,7 @@ public Builder setDeferredDeletionBytes(long value) { * @return This builder for chaining. */ public Builder clearDeferredDeletionBytes() { - + bitField0_ = (bitField0_ & ~0x00000008); deferredDeletionBytes_ = 0L; onChanged(); return this; @@ -7100,19 +7222,25 @@ public Builder clearDeferredDeletionBytes() { * then one would specify this field as "5,3". This field is similar in * spirit to the CUDA_VISIBLE_DEVICES environment variable, except * it applies to the visible GPU devices in the process. + * * NOTE: * 1. The GPU driver provides the process with the visible GPUs - * in an order which is not guaranteed to have any correlation to - * the *physical* GPU id in the machine. This field is used for - * remapping "visible" to "virtual", which means this operates only - * after the process starts. Users are required to use vendor - * specific mechanisms (e.g., CUDA_VISIBLE_DEVICES) to control the - * physical to visible device mapping prior to invoking TensorFlow. + * in an order which is not guaranteed to have any correlation to + * the *physical* GPU id in the machine. This field is used for + * remapping "visible" to "virtual", which means this operates only + * after the process starts. Users are required to use vendor + * specific mechanisms (e.g., CUDA_VISIBLE_DEVICES) to control the + * physical to visible device mapping prior to invoking TensorFlow. * 2. In the code, the ids in this list are also called "platform GPU id"s, - * and the 'virtual' ids of GPU devices (i.e. the ids in the device - * name "/device:GPU:<id>") are also called "TF GPU id"s. Please - * refer to third_party/tensorflow/core/common_runtime/gpu/gpu_id.h - * for more information. + * and the 'virtual' ids of GPU devices (i.e. the ids in the device + * name "/device:GPU:<id>") are also called "TF GPU id"s. Please + * refer to third_party/tensorflow/core/common_runtime/gpu/gpu_id.h + * for more information. + * 3. The visible_device_list is also used for PluggableDevice. And + * different types of PluggableDevices share this field. In that case, + * the pluggable_device_type is used to distinguish them, making the + * visible_device_list a list of <pluggable_device_type>:<device_index>, + * e.g. "PluggableDeviceA:0,PluggableDeviceA:1,PluggableDeviceB:0". *
    * * string visible_device_list = 5; @@ -7139,19 +7267,25 @@ public java.lang.String getVisibleDeviceList() { * then one would specify this field as "5,3". This field is similar in * spirit to the CUDA_VISIBLE_DEVICES environment variable, except * it applies to the visible GPU devices in the process. + * * NOTE: * 1. The GPU driver provides the process with the visible GPUs - * in an order which is not guaranteed to have any correlation to - * the *physical* GPU id in the machine. This field is used for - * remapping "visible" to "virtual", which means this operates only - * after the process starts. Users are required to use vendor - * specific mechanisms (e.g., CUDA_VISIBLE_DEVICES) to control the - * physical to visible device mapping prior to invoking TensorFlow. + * in an order which is not guaranteed to have any correlation to + * the *physical* GPU id in the machine. This field is used for + * remapping "visible" to "virtual", which means this operates only + * after the process starts. Users are required to use vendor + * specific mechanisms (e.g., CUDA_VISIBLE_DEVICES) to control the + * physical to visible device mapping prior to invoking TensorFlow. * 2. In the code, the ids in this list are also called "platform GPU id"s, - * and the 'virtual' ids of GPU devices (i.e. the ids in the device - * name "/device:GPU:<id>") are also called "TF GPU id"s. Please - * refer to third_party/tensorflow/core/common_runtime/gpu/gpu_id.h - * for more information. + * and the 'virtual' ids of GPU devices (i.e. the ids in the device + * name "/device:GPU:<id>") are also called "TF GPU id"s. Please + * refer to third_party/tensorflow/core/common_runtime/gpu/gpu_id.h + * for more information. + * 3. The visible_device_list is also used for PluggableDevice. And + * different types of PluggableDevices share this field. In that case, + * the pluggable_device_type is used to distinguish them, making the + * visible_device_list a list of <pluggable_device_type>:<device_index>, + * e.g. "PluggableDeviceA:0,PluggableDeviceA:1,PluggableDeviceB:0". *
    * * string visible_device_list = 5; @@ -7179,19 +7313,25 @@ public java.lang.String getVisibleDeviceList() { * then one would specify this field as "5,3". This field is similar in * spirit to the CUDA_VISIBLE_DEVICES environment variable, except * it applies to the visible GPU devices in the process. + * * NOTE: * 1. The GPU driver provides the process with the visible GPUs - * in an order which is not guaranteed to have any correlation to - * the *physical* GPU id in the machine. This field is used for - * remapping "visible" to "virtual", which means this operates only - * after the process starts. Users are required to use vendor - * specific mechanisms (e.g., CUDA_VISIBLE_DEVICES) to control the - * physical to visible device mapping prior to invoking TensorFlow. + * in an order which is not guaranteed to have any correlation to + * the *physical* GPU id in the machine. This field is used for + * remapping "visible" to "virtual", which means this operates only + * after the process starts. Users are required to use vendor + * specific mechanisms (e.g., CUDA_VISIBLE_DEVICES) to control the + * physical to visible device mapping prior to invoking TensorFlow. * 2. In the code, the ids in this list are also called "platform GPU id"s, - * and the 'virtual' ids of GPU devices (i.e. the ids in the device - * name "/device:GPU:<id>") are also called "TF GPU id"s. Please - * refer to third_party/tensorflow/core/common_runtime/gpu/gpu_id.h - * for more information. + * and the 'virtual' ids of GPU devices (i.e. the ids in the device + * name "/device:GPU:<id>") are also called "TF GPU id"s. Please + * refer to third_party/tensorflow/core/common_runtime/gpu/gpu_id.h + * for more information. + * 3. The visible_device_list is also used for PluggableDevice. And + * different types of PluggableDevices share this field. In that case, + * the pluggable_device_type is used to distinguish them, making the + * visible_device_list a list of <pluggable_device_type>:<device_index>, + * e.g. "PluggableDeviceA:0,PluggableDeviceA:1,PluggableDeviceB:0". *
    * * string visible_device_list = 5; @@ -7200,11 +7340,9 @@ public java.lang.String getVisibleDeviceList() { */ public Builder setVisibleDeviceList( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } visibleDeviceList_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -7217,27 +7355,33 @@ public Builder setVisibleDeviceList( * then one would specify this field as "5,3". This field is similar in * spirit to the CUDA_VISIBLE_DEVICES environment variable, except * it applies to the visible GPU devices in the process. + * * NOTE: * 1. The GPU driver provides the process with the visible GPUs - * in an order which is not guaranteed to have any correlation to - * the *physical* GPU id in the machine. This field is used for - * remapping "visible" to "virtual", which means this operates only - * after the process starts. Users are required to use vendor - * specific mechanisms (e.g., CUDA_VISIBLE_DEVICES) to control the - * physical to visible device mapping prior to invoking TensorFlow. + * in an order which is not guaranteed to have any correlation to + * the *physical* GPU id in the machine. This field is used for + * remapping "visible" to "virtual", which means this operates only + * after the process starts. Users are required to use vendor + * specific mechanisms (e.g., CUDA_VISIBLE_DEVICES) to control the + * physical to visible device mapping prior to invoking TensorFlow. * 2. In the code, the ids in this list are also called "platform GPU id"s, - * and the 'virtual' ids of GPU devices (i.e. the ids in the device - * name "/device:GPU:<id>") are also called "TF GPU id"s. Please - * refer to third_party/tensorflow/core/common_runtime/gpu/gpu_id.h - * for more information. + * and the 'virtual' ids of GPU devices (i.e. the ids in the device + * name "/device:GPU:<id>") are also called "TF GPU id"s. Please + * refer to third_party/tensorflow/core/common_runtime/gpu/gpu_id.h + * for more information. + * 3. The visible_device_list is also used for PluggableDevice. And + * different types of PluggableDevices share this field. In that case, + * the pluggable_device_type is used to distinguish them, making the + * visible_device_list a list of <pluggable_device_type>:<device_index>, + * e.g. "PluggableDeviceA:0,PluggableDeviceA:1,PluggableDeviceB:0". *
    * * string visible_device_list = 5; * @return This builder for chaining. */ public Builder clearVisibleDeviceList() { - visibleDeviceList_ = getDefaultInstance().getVisibleDeviceList(); + bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } @@ -7250,19 +7394,25 @@ public Builder clearVisibleDeviceList() { * then one would specify this field as "5,3". This field is similar in * spirit to the CUDA_VISIBLE_DEVICES environment variable, except * it applies to the visible GPU devices in the process. + * * NOTE: * 1. The GPU driver provides the process with the visible GPUs - * in an order which is not guaranteed to have any correlation to - * the *physical* GPU id in the machine. This field is used for - * remapping "visible" to "virtual", which means this operates only - * after the process starts. Users are required to use vendor - * specific mechanisms (e.g., CUDA_VISIBLE_DEVICES) to control the - * physical to visible device mapping prior to invoking TensorFlow. + * in an order which is not guaranteed to have any correlation to + * the *physical* GPU id in the machine. This field is used for + * remapping "visible" to "virtual", which means this operates only + * after the process starts. Users are required to use vendor + * specific mechanisms (e.g., CUDA_VISIBLE_DEVICES) to control the + * physical to visible device mapping prior to invoking TensorFlow. * 2. In the code, the ids in this list are also called "platform GPU id"s, - * and the 'virtual' ids of GPU devices (i.e. the ids in the device - * name "/device:GPU:<id>") are also called "TF GPU id"s. Please - * refer to third_party/tensorflow/core/common_runtime/gpu/gpu_id.h - * for more information. + * and the 'virtual' ids of GPU devices (i.e. the ids in the device + * name "/device:GPU:<id>") are also called "TF GPU id"s. Please + * refer to third_party/tensorflow/core/common_runtime/gpu/gpu_id.h + * for more information. + * 3. The visible_device_list is also used for PluggableDevice. And + * different types of PluggableDevices share this field. In that case, + * the pluggable_device_type is used to distinguish them, making the + * visible_device_list a list of <pluggable_device_type>:<device_index>, + * e.g. "PluggableDeviceA:0,PluggableDeviceA:1,PluggableDeviceB:0". *
    * * string visible_device_list = 5; @@ -7271,12 +7421,10 @@ public Builder clearVisibleDeviceList() { */ public Builder setVisibleDeviceListBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); visibleDeviceList_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -7308,8 +7456,9 @@ public int getPollingActiveDelayUsecs() { * @return This builder for chaining. */ public Builder setPollingActiveDelayUsecs(int value) { - + pollingActiveDelayUsecs_ = value; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -7324,7 +7473,7 @@ public Builder setPollingActiveDelayUsecs(int value) { * @return This builder for chaining. */ public Builder clearPollingActiveDelayUsecs() { - + bitField0_ = (bitField0_ & ~0x00000020); pollingActiveDelayUsecs_ = 0; onChanged(); return this; @@ -7353,8 +7502,9 @@ public int getPollingInactiveDelayMsecs() { * @return This builder for chaining. */ public Builder setPollingInactiveDelayMsecs(int value) { - + pollingInactiveDelayMsecs_ = value; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -7367,7 +7517,7 @@ public Builder setPollingInactiveDelayMsecs(int value) { * @return This builder for chaining. */ public Builder clearPollingInactiveDelayMsecs() { - + bitField0_ = (bitField0_ & ~0x00000040); pollingInactiveDelayMsecs_ = 0; onChanged(); return this; @@ -7414,8 +7564,9 @@ public boolean getForceGpuCompatible() { * @return This builder for chaining. */ public Builder setForceGpuCompatible(boolean value) { - + forceGpuCompatible_ = value; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -7437,33 +7588,33 @@ public Builder setForceGpuCompatible(boolean value) { * @return This builder for chaining. */ public Builder clearForceGpuCompatible() { - + bitField0_ = (bitField0_ & ~0x00000080); forceGpuCompatible_ = false; onChanged(); return this; } private org.tensorflow.proto.GPUOptions.Experimental experimental_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.GPUOptions.Experimental, org.tensorflow.proto.GPUOptions.Experimental.Builder, org.tensorflow.proto.GPUOptions.ExperimentalOrBuilder> experimentalBuilder_; /** *
          * Everything inside experimental is subject to change and is not subject
          * to API stability guarantees in
    -     * https://www.tensorflow.org/guide/version_compat.
    +     * https://www.tensorflow.org/guide/versions.
          * 
    * * .tensorflow.GPUOptions.Experimental experimental = 9; * @return Whether the experimental field is set. */ public boolean hasExperimental() { - return experimentalBuilder_ != null || experimental_ != null; + return ((bitField0_ & 0x00000100) != 0); } /** *
          * Everything inside experimental is subject to change and is not subject
          * to API stability guarantees in
    -     * https://www.tensorflow.org/guide/version_compat.
    +     * https://www.tensorflow.org/guide/versions.
          * 
    * * .tensorflow.GPUOptions.Experimental experimental = 9; @@ -7480,7 +7631,7 @@ public org.tensorflow.proto.GPUOptions.Experimental getExperimental() { *
          * Everything inside experimental is subject to change and is not subject
          * to API stability guarantees in
    -     * https://www.tensorflow.org/guide/version_compat.
    +     * https://www.tensorflow.org/guide/versions.
          * 
    * * .tensorflow.GPUOptions.Experimental experimental = 9; @@ -7491,18 +7642,18 @@ public Builder setExperimental(org.tensorflow.proto.GPUOptions.Experimental valu throw new NullPointerException(); } experimental_ = value; - onChanged(); } else { experimentalBuilder_.setMessage(value); } - + bitField0_ |= 0x00000100; + onChanged(); return this; } /** *
          * Everything inside experimental is subject to change and is not subject
          * to API stability guarantees in
    -     * https://www.tensorflow.org/guide/version_compat.
    +     * https://www.tensorflow.org/guide/versions.
          * 
    * * .tensorflow.GPUOptions.Experimental experimental = 9; @@ -7511,68 +7662,70 @@ public Builder setExperimental( org.tensorflow.proto.GPUOptions.Experimental.Builder builderForValue) { if (experimentalBuilder_ == null) { experimental_ = builderForValue.build(); - onChanged(); } else { experimentalBuilder_.setMessage(builderForValue.build()); } - + bitField0_ |= 0x00000100; + onChanged(); return this; } /** *
          * Everything inside experimental is subject to change and is not subject
          * to API stability guarantees in
    -     * https://www.tensorflow.org/guide/version_compat.
    +     * https://www.tensorflow.org/guide/versions.
          * 
    * * .tensorflow.GPUOptions.Experimental experimental = 9; */ public Builder mergeExperimental(org.tensorflow.proto.GPUOptions.Experimental value) { if (experimentalBuilder_ == null) { - if (experimental_ != null) { - experimental_ = - org.tensorflow.proto.GPUOptions.Experimental.newBuilder(experimental_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000100) != 0) && + experimental_ != null && + experimental_ != org.tensorflow.proto.GPUOptions.Experimental.getDefaultInstance()) { + getExperimentalBuilder().mergeFrom(value); } else { experimental_ = value; } - onChanged(); } else { experimentalBuilder_.mergeFrom(value); } - + if (experimental_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } return this; } /** *
          * Everything inside experimental is subject to change and is not subject
          * to API stability guarantees in
    -     * https://www.tensorflow.org/guide/version_compat.
    +     * https://www.tensorflow.org/guide/versions.
          * 
    * * .tensorflow.GPUOptions.Experimental experimental = 9; */ public Builder clearExperimental() { - if (experimentalBuilder_ == null) { - experimental_ = null; - onChanged(); - } else { - experimental_ = null; + bitField0_ = (bitField0_ & ~0x00000100); + experimental_ = null; + if (experimentalBuilder_ != null) { + experimentalBuilder_.dispose(); experimentalBuilder_ = null; } - + onChanged(); return this; } /** *
          * Everything inside experimental is subject to change and is not subject
          * to API stability guarantees in
    -     * https://www.tensorflow.org/guide/version_compat.
    +     * https://www.tensorflow.org/guide/versions.
          * 
    * * .tensorflow.GPUOptions.Experimental experimental = 9; */ public org.tensorflow.proto.GPUOptions.Experimental.Builder getExperimentalBuilder() { - + bitField0_ |= 0x00000100; onChanged(); return getExperimentalFieldBuilder().getBuilder(); } @@ -7580,7 +7733,7 @@ public org.tensorflow.proto.GPUOptions.Experimental.Builder getExperimentalBuild *
          * Everything inside experimental is subject to change and is not subject
          * to API stability guarantees in
    -     * https://www.tensorflow.org/guide/version_compat.
    +     * https://www.tensorflow.org/guide/versions.
          * 
    * * .tensorflow.GPUOptions.Experimental experimental = 9; @@ -7597,16 +7750,16 @@ public org.tensorflow.proto.GPUOptions.ExperimentalOrBuilder getExperimentalOrBu *
          * Everything inside experimental is subject to change and is not subject
          * to API stability guarantees in
    -     * https://www.tensorflow.org/guide/version_compat.
    +     * https://www.tensorflow.org/guide/versions.
          * 
    * * .tensorflow.GPUOptions.Experimental experimental = 9; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.GPUOptions.Experimental, org.tensorflow.proto.GPUOptions.Experimental.Builder, org.tensorflow.proto.GPUOptions.ExperimentalOrBuilder> getExperimentalFieldBuilder() { if (experimentalBuilder_ == null) { - experimentalBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + experimentalBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.GPUOptions.Experimental, org.tensorflow.proto.GPUOptions.Experimental.Builder, org.tensorflow.proto.GPUOptions.ExperimentalOrBuilder>( getExperimental(), getParentForChildren(), @@ -7615,18 +7768,6 @@ public org.tensorflow.proto.GPUOptions.ExperimentalOrBuilder getExperimentalOrBu } return experimentalBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.GPUOptions) } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GPUOptionsOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GPUOptionsOrBuilder.java index b488c4d4e93..a1d86d2d9c9 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GPUOptionsOrBuilder.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GPUOptionsOrBuilder.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/protobuf/config.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -12,7 +14,9 @@ public interface GPUOptionsOrBuilder extends * Fraction of the total GPU memory to allocate for each process. * 1 means to allocate all of the GPU memory, 0.5 means the process * allocates up to ~50% of the total GPU memory. + * * GPU memory is pre-allocated unless the allow_growth option is enabled. + * * If greater than 1.0, uses CUDA unified memory to potentially oversubscribe * the amount of memory available on the GPU device by using host memory as a * swap space. Accessing memory not available on the device will be @@ -45,11 +49,13 @@ public interface GPUOptionsOrBuilder extends /** *
        * The type of GPU allocation strategy to use.
    +   *
        * Allowed values:
        * "": The empty string (default) uses a system-chosen default
    -   *     which may change over time.
    +   * which may change over time.
    +   *
        * "BFC": A "Best-fit with coalescing" algorithm, simplified from a
    -   *        version of dlmalloc.
    +   * version of dlmalloc.
        * 
    * * string allocator_type = 2; @@ -59,11 +65,13 @@ public interface GPUOptionsOrBuilder extends /** *
        * The type of GPU allocation strategy to use.
    +   *
        * Allowed values:
        * "": The empty string (default) uses a system-chosen default
    -   *     which may change over time.
    +   * which may change over time.
    +   *
        * "BFC": A "Best-fit with coalescing" algorithm, simplified from a
    -   *        version of dlmalloc.
    +   * version of dlmalloc.
        * 
    * * string allocator_type = 2; @@ -93,19 +101,25 @@ public interface GPUOptionsOrBuilder extends * then one would specify this field as "5,3". This field is similar in * spirit to the CUDA_VISIBLE_DEVICES environment variable, except * it applies to the visible GPU devices in the process. + * * NOTE: * 1. The GPU driver provides the process with the visible GPUs - * in an order which is not guaranteed to have any correlation to - * the *physical* GPU id in the machine. This field is used for - * remapping "visible" to "virtual", which means this operates only - * after the process starts. Users are required to use vendor - * specific mechanisms (e.g., CUDA_VISIBLE_DEVICES) to control the - * physical to visible device mapping prior to invoking TensorFlow. + * in an order which is not guaranteed to have any correlation to + * the *physical* GPU id in the machine. This field is used for + * remapping "visible" to "virtual", which means this operates only + * after the process starts. Users are required to use vendor + * specific mechanisms (e.g., CUDA_VISIBLE_DEVICES) to control the + * physical to visible device mapping prior to invoking TensorFlow. * 2. In the code, the ids in this list are also called "platform GPU id"s, - * and the 'virtual' ids of GPU devices (i.e. the ids in the device - * name "/device:GPU:<id>") are also called "TF GPU id"s. Please - * refer to third_party/tensorflow/core/common_runtime/gpu/gpu_id.h - * for more information. + * and the 'virtual' ids of GPU devices (i.e. the ids in the device + * name "/device:GPU:<id>") are also called "TF GPU id"s. Please + * refer to third_party/tensorflow/core/common_runtime/gpu/gpu_id.h + * for more information. + * 3. The visible_device_list is also used for PluggableDevice. And + * different types of PluggableDevices share this field. In that case, + * the pluggable_device_type is used to distinguish them, making the + * visible_device_list a list of <pluggable_device_type>:<device_index>, + * e.g. "PluggableDeviceA:0,PluggableDeviceA:1,PluggableDeviceB:0". *
    * * string visible_device_list = 5; @@ -121,19 +135,25 @@ public interface GPUOptionsOrBuilder extends * then one would specify this field as "5,3". This field is similar in * spirit to the CUDA_VISIBLE_DEVICES environment variable, except * it applies to the visible GPU devices in the process. + * * NOTE: * 1. The GPU driver provides the process with the visible GPUs - * in an order which is not guaranteed to have any correlation to - * the *physical* GPU id in the machine. This field is used for - * remapping "visible" to "virtual", which means this operates only - * after the process starts. Users are required to use vendor - * specific mechanisms (e.g., CUDA_VISIBLE_DEVICES) to control the - * physical to visible device mapping prior to invoking TensorFlow. + * in an order which is not guaranteed to have any correlation to + * the *physical* GPU id in the machine. This field is used for + * remapping "visible" to "virtual", which means this operates only + * after the process starts. Users are required to use vendor + * specific mechanisms (e.g., CUDA_VISIBLE_DEVICES) to control the + * physical to visible device mapping prior to invoking TensorFlow. * 2. In the code, the ids in this list are also called "platform GPU id"s, - * and the 'virtual' ids of GPU devices (i.e. the ids in the device - * name "/device:GPU:<id>") are also called "TF GPU id"s. Please - * refer to third_party/tensorflow/core/common_runtime/gpu/gpu_id.h - * for more information. + * and the 'virtual' ids of GPU devices (i.e. the ids in the device + * name "/device:GPU:<id>") are also called "TF GPU id"s. Please + * refer to third_party/tensorflow/core/common_runtime/gpu/gpu_id.h + * for more information. + * 3. The visible_device_list is also used for PluggableDevice. And + * different types of PluggableDevices share this field. In that case, + * the pluggable_device_type is used to distinguish them, making the + * visible_device_list a list of <pluggable_device_type>:<device_index>, + * e.g. "PluggableDeviceA:0,PluggableDeviceA:1,PluggableDeviceB:0". *
    * * string visible_device_list = 5; @@ -187,7 +207,7 @@ public interface GPUOptionsOrBuilder extends *
        * Everything inside experimental is subject to change and is not subject
        * to API stability guarantees in
    -   * https://www.tensorflow.org/guide/version_compat.
    +   * https://www.tensorflow.org/guide/versions.
        * 
    * * .tensorflow.GPUOptions.Experimental experimental = 9; @@ -198,7 +218,7 @@ public interface GPUOptionsOrBuilder extends *
        * Everything inside experimental is subject to change and is not subject
        * to API stability guarantees in
    -   * https://www.tensorflow.org/guide/version_compat.
    +   * https://www.tensorflow.org/guide/versions.
        * 
    * * .tensorflow.GPUOptions.Experimental experimental = 9; @@ -209,7 +229,7 @@ public interface GPUOptionsOrBuilder extends *
        * Everything inside experimental is subject to change and is not subject
        * to API stability guarantees in
    -   * https://www.tensorflow.org/guide/version_compat.
    +   * https://www.tensorflow.org/guide/versions.
        * 
    * * .tensorflow.GPUOptions.Experimental experimental = 9; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GradientDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GradientDef.java index bb6a6ce36c7..c7c4781cb88 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GradientDef.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GradientDef.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/framework/function.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -7,16 +9,19 @@ *
      * GradientDef defines the gradient function of a function defined in
      * a function library.
    + *
      * A gradient function g (specified by gradient_func) for a function f
      * (specified by function_name) must follow the following:
    + *
      * The function 'f' must be a numerical function which takes N inputs
      * and produces M outputs. Its gradient function 'g', which is a
      * function taking N + M inputs and produces N outputs.
    + *
      * I.e. if we have
    - *    (y1, y2, ..., y_M) = f(x1, x2, ..., x_N),
    + * (y1, y2, ..., y_M) = f(x1, x2, ..., x_N),
      * then, g is
    - *    (dL/dx1, dL/dx2, ..., dL/dx_N) = g(x1, x2, ..., x_N,
    - *                                      dL/dy1, dL/dy2, ..., dL/dy_M),
    + * (dL/dx1, dL/dx2, ..., dL/dx_N) = g(x1, x2, ..., x_N,
    + * dL/dy1, dL/dy2, ..., dL/dy_M),
      * where L is a scalar-value function of (x1, x2, ..., xN) (e.g., the
      * loss function). dL/dx_i is the partial derivative of L with respect
      * to x_i.
    @@ -25,12 +30,21 @@
      * Protobuf type {@code tensorflow.GradientDef}
      */
     public final class GradientDef extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.GradientDef)
         GradientDefOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      GradientDef.class.getName());
    +  }
       // Use GradientDef.newBuilder() to construct.
    -  private GradientDef(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private GradientDef(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private GradientDef() {
    @@ -38,25 +52,13 @@ private GradientDef() {
         gradientFunc_ = "";
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new GradientDef();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.FunctionProtos.internal_static_tensorflow_GradientDef_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.FunctionProtos.internal_static_tensorflow_GradientDef_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -64,7 +66,8 @@ protected java.lang.Object newInstance(
       }
     
       public static final int FUNCTION_NAME_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object functionName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object functionName_ = "";
       /**
        * 
        * The function name.
    @@ -110,7 +113,8 @@ public java.lang.String getFunctionName() {
       }
     
       public static final int GRADIENT_FUNC_FIELD_NUMBER = 2;
    -  private volatile java.lang.Object gradientFunc_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object gradientFunc_ = "";
       /**
        * 
        * The gradient function's name.
    @@ -169,11 +173,11 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(functionName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, functionName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(functionName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, functionName_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gradientFunc_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, gradientFunc_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(gradientFunc_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 2, gradientFunc_);
         }
         getUnknownFields().writeTo(output);
       }
    @@ -184,11 +188,11 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(functionName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, functionName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(functionName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, functionName_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gradientFunc_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, gradientFunc_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(gradientFunc_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(2, gradientFunc_);
         }
         size += getUnknownFields().getSerializedSize();
         memoizedSize = size;
    @@ -263,39 +267,41 @@ public static org.tensorflow.proto.GradientDef parseFrom(
       }
       public static org.tensorflow.proto.GradientDef parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.GradientDef parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.GradientDef parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.GradientDef parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.GradientDef parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.GradientDef parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -315,7 +321,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -323,16 +329,19 @@ protected Builder newBuilderForType(
        * 
        * GradientDef defines the gradient function of a function defined in
        * a function library.
    +   *
        * A gradient function g (specified by gradient_func) for a function f
        * (specified by function_name) must follow the following:
    +   *
        * The function 'f' must be a numerical function which takes N inputs
        * and produces M outputs. Its gradient function 'g', which is a
        * function taking N + M inputs and produces N outputs.
    +   *
        * I.e. if we have
    -   *    (y1, y2, ..., y_M) = f(x1, x2, ..., x_N),
    +   * (y1, y2, ..., y_M) = f(x1, x2, ..., x_N),
        * then, g is
    -   *    (dL/dx1, dL/dx2, ..., dL/dx_N) = g(x1, x2, ..., x_N,
    -   *                                      dL/dy1, dL/dy2, ..., dL/dy_M),
    +   * (dL/dx1, dL/dx2, ..., dL/dx_N) = g(x1, x2, ..., x_N,
    +   * dL/dy1, dL/dy2, ..., dL/dy_M),
        * where L is a scalar-value function of (x1, x2, ..., xN) (e.g., the
        * loss function). dL/dx_i is the partial derivative of L with respect
        * to x_i.
    @@ -341,7 +350,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.GradientDef}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.GradientDef)
           org.tensorflow.proto.GradientDefOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -350,7 +359,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.FunctionProtos.internal_static_tensorflow_GradientDef_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -363,17 +372,16 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           functionName_ = "";
    -
           gradientFunc_ = "";
    -
           return this;
         }
     
    @@ -400,44 +408,21 @@ public org.tensorflow.proto.GradientDef build() {
         @java.lang.Override
         public org.tensorflow.proto.GradientDef buildPartial() {
           org.tensorflow.proto.GradientDef result = new org.tensorflow.proto.GradientDef(this);
    -      result.functionName_ = functionName_;
    -      result.gradientFunc_ = gradientFunc_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.GradientDef result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.functionName_ = functionName_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.gradientFunc_ = gradientFunc_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.GradientDef) {
    @@ -452,10 +437,12 @@ public Builder mergeFrom(org.tensorflow.proto.GradientDef other) {
           if (other == org.tensorflow.proto.GradientDef.getDefaultInstance()) return this;
           if (!other.getFunctionName().isEmpty()) {
             functionName_ = other.functionName_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (!other.getGradientFunc().isEmpty()) {
             gradientFunc_ = other.gradientFunc_;
    +        bitField0_ |= 0x00000002;
             onChanged();
           }
           this.mergeUnknownFields(other.getUnknownFields());
    @@ -486,12 +473,12 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   functionName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
                   gradientFunc_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 default: {
    @@ -509,6 +496,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private java.lang.Object functionName_ = "";
         /**
    @@ -563,11 +551,9 @@ public java.lang.String getFunctionName() {
          */
         public Builder setFunctionName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           functionName_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -580,8 +566,8 @@ public Builder setFunctionName(
          * @return This builder for chaining.
          */
         public Builder clearFunctionName() {
    -      
           functionName_ = getDefaultInstance().getFunctionName();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -596,12 +582,10 @@ public Builder clearFunctionName() {
          */
         public Builder setFunctionNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           functionName_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -659,11 +643,9 @@ public java.lang.String getGradientFunc() {
          */
         public Builder setGradientFunc(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           gradientFunc_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -676,8 +658,8 @@ public Builder setGradientFunc(
          * @return This builder for chaining.
          */
         public Builder clearGradientFunc() {
    -      
           gradientFunc_ = getDefaultInstance().getGradientFunc();
    +      bitField0_ = (bitField0_ & ~0x00000002);
           onChanged();
           return this;
         }
    @@ -692,27 +674,13 @@ public Builder clearGradientFunc() {
          */
         public Builder setGradientFuncBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           gradientFunc_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.GradientDef)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GradientDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GradientDefOrBuilder.java
    index 7142b052e02..4d6181be00b 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GradientDefOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GradientDefOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/function.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDebugInfo.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDebugInfo.java
    index 1b475c9ec42..0c193e2f6eb 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDebugInfo.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDebugInfo.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/graph_debug_info.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,30 +9,28 @@
      * Protobuf type {@code tensorflow.GraphDebugInfo}
      */
     public final class GraphDebugInfo extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.GraphDebugInfo)
         GraphDebugInfoOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      GraphDebugInfo.class.getName());
    +  }
       // Use GraphDebugInfo.newBuilder() to construct.
    -  private GraphDebugInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private GraphDebugInfo(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private GraphDebugInfo() {
    -    files_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -  }
    -
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new GraphDebugInfo();
    +    files_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
       }
     
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.GraphDebugInfoProtos.internal_static_tensorflow_GraphDebugInfo_descriptor;
    @@ -38,7 +38,7 @@ protected java.lang.Object newInstance(
     
       @SuppressWarnings({"rawtypes"})
       @java.lang.Override
    -  protected com.google.protobuf.MapField internalGetMapField(
    +  protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
           int number) {
         switch (number) {
           case 4:
    @@ -55,7 +55,7 @@ protected com.google.protobuf.MapField internalGetMapField(
         }
       }
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.GraphDebugInfoProtos.internal_static_tensorflow_GraphDebugInfo_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -191,12 +191,21 @@ public interface FileLineColOrBuilder extends
        * Protobuf type {@code tensorflow.GraphDebugInfo.FileLineCol}
        */
       public static final class FileLineCol extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.GraphDebugInfo.FileLineCol)
           FileLineColOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        FileLineCol.class.getName());
    +    }
         // Use FileLineCol.newBuilder() to construct.
    -    private FileLineCol(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private FileLineCol(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private FileLineCol() {
    @@ -204,25 +213,13 @@ private FileLineCol() {
           code_ = "";
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new FileLineCol();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.GraphDebugInfoProtos.internal_static_tensorflow_GraphDebugInfo_FileLineCol_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.GraphDebugInfoProtos.internal_static_tensorflow_GraphDebugInfo_FileLineCol_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -231,7 +228,7 @@ protected java.lang.Object newInstance(
     
         private int bitField0_;
         public static final int FILE_INDEX_FIELD_NUMBER = 1;
    -    private int fileIndex_;
    +    private int fileIndex_ = 0;
         /**
          * 
          * File name index, which can be used to retrieve the file name string from
    @@ -260,7 +257,7 @@ public int getFileIndex() {
         }
     
         public static final int LINE_FIELD_NUMBER = 2;
    -    private int line_;
    +    private int line_ = 0;
         /**
          * 
          * Line number in the file.
    @@ -287,7 +284,7 @@ public int getLine() {
         }
     
         public static final int COL_FIELD_NUMBER = 3;
    -    private int col_;
    +    private int col_ = 0;
         /**
          * 
          * Col number in the file line.
    @@ -314,7 +311,8 @@ public int getCol() {
         }
     
         public static final int FUNC_FIELD_NUMBER = 4;
    -    private volatile java.lang.Object func_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object func_ = "";
         /**
          * 
          * Name of function contains the file line.
    @@ -374,7 +372,8 @@ public java.lang.String getFunc() {
         }
     
         public static final int CODE_FIELD_NUMBER = 5;
    -    private volatile java.lang.Object code_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object code_ = "";
         /**
          * 
          * Source code contained in this file line.
    @@ -457,10 +456,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
             output.writeInt32(3, col_);
           }
           if (((bitField0_ & 0x00000008) != 0)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 4, func_);
    +        com.google.protobuf.GeneratedMessage.writeString(output, 4, func_);
           }
           if (((bitField0_ & 0x00000010) != 0)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 5, code_);
    +        com.google.protobuf.GeneratedMessage.writeString(output, 5, code_);
           }
           getUnknownFields().writeTo(output);
         }
    @@ -484,10 +483,10 @@ public int getSerializedSize() {
               .computeInt32Size(3, col_);
           }
           if (((bitField0_ & 0x00000008) != 0)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, func_);
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(4, func_);
           }
           if (((bitField0_ & 0x00000010) != 0)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, code_);
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(5, code_);
           }
           size += getUnknownFields().getSerializedSize();
           memoizedSize = size;
    @@ -599,39 +598,41 @@ public static org.tensorflow.proto.GraphDebugInfo.FileLineCol parseFrom(
         }
         public static org.tensorflow.proto.GraphDebugInfo.FileLineCol parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.GraphDebugInfo.FileLineCol parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.GraphDebugInfo.FileLineCol parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.GraphDebugInfo.FileLineCol parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.GraphDebugInfo.FileLineCol parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.GraphDebugInfo.FileLineCol parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -651,7 +652,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -663,7 +664,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.GraphDebugInfo.FileLineCol}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.GraphDebugInfo.FileLineCol)
             org.tensorflow.proto.GraphDebugInfo.FileLineColOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -672,7 +673,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.GraphDebugInfoProtos.internal_static_tensorflow_GraphDebugInfo_FileLineCol_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -685,23 +686,19 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             fileIndex_ = 0;
    -        bitField0_ = (bitField0_ & ~0x00000001);
             line_ = 0;
    -        bitField0_ = (bitField0_ & ~0x00000002);
             col_ = 0;
    -        bitField0_ = (bitField0_ & ~0x00000004);
             func_ = "";
    -        bitField0_ = (bitField0_ & ~0x00000008);
             code_ = "";
    -        bitField0_ = (bitField0_ & ~0x00000010);
             return this;
           }
     
    @@ -728,6 +725,12 @@ public org.tensorflow.proto.GraphDebugInfo.FileLineCol build() {
           @java.lang.Override
           public org.tensorflow.proto.GraphDebugInfo.FileLineCol buildPartial() {
             org.tensorflow.proto.GraphDebugInfo.FileLineCol result = new org.tensorflow.proto.GraphDebugInfo.FileLineCol(this);
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        onBuilt();
    +        return result;
    +      }
    +
    +      private void buildPartial0(org.tensorflow.proto.GraphDebugInfo.FileLineCol result) {
             int from_bitField0_ = bitField0_;
             int to_bitField0_ = 0;
             if (((from_bitField0_ & 0x00000001) != 0)) {
    @@ -743,50 +746,16 @@ public org.tensorflow.proto.GraphDebugInfo.FileLineCol buildPartial() {
               to_bitField0_ |= 0x00000004;
             }
             if (((from_bitField0_ & 0x00000008) != 0)) {
    +          result.func_ = func_;
               to_bitField0_ |= 0x00000008;
             }
    -        result.func_ = func_;
             if (((from_bitField0_ & 0x00000010) != 0)) {
    +          result.code_ = code_;
               to_bitField0_ |= 0x00000010;
             }
    -        result.code_ = code_;
    -        result.bitField0_ = to_bitField0_;
    -        onBuilt();
    -        return result;
    +        result.bitField0_ |= to_bitField0_;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    -      }
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.GraphDebugInfo.FileLineCol) {
    @@ -809,13 +778,13 @@ public Builder mergeFrom(org.tensorflow.proto.GraphDebugInfo.FileLineCol other)
               setCol(other.getCol());
             }
             if (other.hasFunc()) {
    -          bitField0_ |= 0x00000008;
               func_ = other.func_;
    +          bitField0_ |= 0x00000008;
               onChanged();
             }
             if (other.hasCode()) {
    -          bitField0_ |= 0x00000010;
               code_ = other.code_;
    +          bitField0_ |= 0x00000010;
               onChanged();
             }
             this.mergeUnknownFields(other.getUnknownFields());
    @@ -924,8 +893,9 @@ public int getFileIndex() {
            * @return This builder for chaining.
            */
           public Builder setFileIndex(int value) {
    -        bitField0_ |= 0x00000001;
    +
             fileIndex_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -980,8 +950,9 @@ public int getLine() {
            * @return This builder for chaining.
            */
           public Builder setLine(int value) {
    -        bitField0_ |= 0x00000002;
    +
             line_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -1035,8 +1006,9 @@ public int getCol() {
            * @return This builder for chaining.
            */
           public Builder setCol(int value) {
    -        bitField0_ |= 0x00000004;
    +
             col_ = value;
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -1121,11 +1093,9 @@ public java.lang.String getFunc() {
            */
           public Builder setFunc(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  bitField0_ |= 0x00000008;
    +        if (value == null) { throw new NullPointerException(); }
             func_ = value;
    +        bitField0_ |= 0x00000008;
             onChanged();
             return this;
           }
    @@ -1138,8 +1108,8 @@ public Builder setFunc(
            * @return This builder for chaining.
            */
           public Builder clearFunc() {
    -        bitField0_ = (bitField0_ & ~0x00000008);
             func_ = getDefaultInstance().getFunc();
    +        bitField0_ = (bitField0_ & ~0x00000008);
             onChanged();
             return this;
           }
    @@ -1154,11 +1124,9 @@ public Builder clearFunc() {
            */
           public Builder setFuncBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  bitField0_ |= 0x00000008;
    +        if (value == null) { throw new NullPointerException(); }
             func_ = value;
    +        bitField0_ |= 0x00000008;
             onChanged();
             return this;
           }
    @@ -1229,11 +1197,9 @@ public java.lang.String getCode() {
            */
           public Builder setCode(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  bitField0_ |= 0x00000010;
    +        if (value == null) { throw new NullPointerException(); }
             code_ = value;
    +        bitField0_ |= 0x00000010;
             onChanged();
             return this;
           }
    @@ -1246,8 +1212,8 @@ public Builder setCode(
            * @return This builder for chaining.
            */
           public Builder clearCode() {
    -        bitField0_ = (bitField0_ & ~0x00000010);
             code_ = getDefaultInstance().getCode();
    +        bitField0_ = (bitField0_ & ~0x00000010);
             onChanged();
             return this;
           }
    @@ -1262,26 +1228,12 @@ public Builder clearCode() {
            */
           public Builder setCodeBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  bitField0_ |= 0x00000010;
    +        if (value == null) { throw new NullPointerException(); }
             code_ = value;
    +        bitField0_ |= 0x00000010;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.GraphDebugInfo.FileLineCol)
         }
    @@ -1296,7 +1248,7 @@ public static org.tensorflow.proto.GraphDebugInfo.FileLineCol getDefaultInstance
           return DEFAULT_INSTANCE;
         }
     
    -    @java.lang.Deprecated public static final com.google.protobuf.Parser
    +    private static final com.google.protobuf.Parser
             PARSER = new com.google.protobuf.AbstractParser() {
           @java.lang.Override
           public FileLineCol parsePartialFrom(
    @@ -1407,12 +1359,21 @@ org.tensorflow.proto.GraphDebugInfo.FileLineColOrBuilder getFileLineColsOrBuilde
        * Protobuf type {@code tensorflow.GraphDebugInfo.StackTrace}
        */
       public static final class StackTrace extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.GraphDebugInfo.StackTrace)
           StackTraceOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        StackTrace.class.getName());
    +    }
         // Use StackTrace.newBuilder() to construct.
    -    private StackTrace(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private StackTrace(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private StackTrace() {
    @@ -1420,25 +1381,13 @@ private StackTrace() {
           frameId_ = emptyLongList();
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new StackTrace();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.GraphDebugInfoProtos.internal_static_tensorflow_GraphDebugInfo_StackTrace_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.GraphDebugInfoProtos.internal_static_tensorflow_GraphDebugInfo_StackTrace_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -1446,6 +1395,7 @@ protected java.lang.Object newInstance(
         }
     
         public static final int FILE_LINE_COLS_FIELD_NUMBER = 1;
    +    @SuppressWarnings("serial")
         private java.util.List fileLineCols_;
         /**
          * 
    @@ -1506,7 +1456,9 @@ public org.tensorflow.proto.GraphDebugInfo.FileLineColOrBuilder getFileLineColsO
         }
     
         public static final int FRAME_ID_FIELD_NUMBER = 2;
    -    private com.google.protobuf.Internal.LongList frameId_;
    +    @SuppressWarnings("serial")
    +    private com.google.protobuf.Internal.LongList frameId_ =
    +        emptyLongList();
         /**
          * repeated fixed64 frame_id = 2 [packed = true];
          * @return A list containing the frameId.
    @@ -1659,39 +1611,41 @@ public static org.tensorflow.proto.GraphDebugInfo.StackTrace parseFrom(
         }
         public static org.tensorflow.proto.GraphDebugInfo.StackTrace parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.GraphDebugInfo.StackTrace parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.GraphDebugInfo.StackTrace parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.GraphDebugInfo.StackTrace parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.GraphDebugInfo.StackTrace parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.GraphDebugInfo.StackTrace parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -1711,7 +1665,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -1723,7 +1677,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.GraphDebugInfo.StackTrace}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.GraphDebugInfo.StackTrace)
             org.tensorflow.proto.GraphDebugInfo.StackTraceOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -1732,7 +1686,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.GraphDebugInfoProtos.internal_static_tensorflow_GraphDebugInfo_StackTrace_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -1745,13 +1699,14 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             if (fileLineColsBuilder_ == null) {
               fileLineCols_ = java.util.Collections.emptyList();
             } else {
    @@ -1760,7 +1715,6 @@ public Builder clear() {
             }
             bitField0_ = (bitField0_ & ~0x00000001);
             frameId_ = emptyLongList();
    -        bitField0_ = (bitField0_ & ~0x00000002);
             return this;
           }
     
    @@ -1787,7 +1741,13 @@ public org.tensorflow.proto.GraphDebugInfo.StackTrace build() {
           @java.lang.Override
           public org.tensorflow.proto.GraphDebugInfo.StackTrace buildPartial() {
             org.tensorflow.proto.GraphDebugInfo.StackTrace result = new org.tensorflow.proto.GraphDebugInfo.StackTrace(this);
    -        int from_bitField0_ = bitField0_;
    +        buildPartialRepeatedFields(result);
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        onBuilt();
    +        return result;
    +      }
    +
    +      private void buildPartialRepeatedFields(org.tensorflow.proto.GraphDebugInfo.StackTrace result) {
             if (fileLineColsBuilder_ == null) {
               if (((bitField0_ & 0x00000001) != 0)) {
                 fileLineCols_ = java.util.Collections.unmodifiableList(fileLineCols_);
    @@ -1797,47 +1757,16 @@ public org.tensorflow.proto.GraphDebugInfo.StackTrace buildPartial() {
             } else {
               result.fileLineCols_ = fileLineColsBuilder_.build();
             }
    -        if (((bitField0_ & 0x00000002) != 0)) {
    +      }
    +
    +      private void buildPartial0(org.tensorflow.proto.GraphDebugInfo.StackTrace result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
               frameId_.makeImmutable();
    -          bitField0_ = (bitField0_ & ~0x00000002);
    +          result.frameId_ = frameId_;
             }
    -        result.frameId_ = frameId_;
    -        onBuilt();
    -        return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    -      }
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.GraphDebugInfo.StackTrace) {
    @@ -1869,7 +1798,7 @@ public Builder mergeFrom(org.tensorflow.proto.GraphDebugInfo.StackTrace other) {
                   fileLineCols_ = other.fileLineCols_;
                   bitField0_ = (bitField0_ & ~0x00000001);
                   fileLineColsBuilder_ = 
    -                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                        getFileLineColsFieldBuilder() : null;
                 } else {
                   fileLineColsBuilder_.addAllMessages(other.fileLineCols_);
    @@ -1879,7 +1808,8 @@ public Builder mergeFrom(org.tensorflow.proto.GraphDebugInfo.StackTrace other) {
             if (!other.frameId_.isEmpty()) {
               if (frameId_.isEmpty()) {
                 frameId_ = other.frameId_;
    -            bitField0_ = (bitField0_ & ~0x00000002);
    +            frameId_.makeImmutable();
    +            bitField0_ |= 0x00000002;
               } else {
                 ensureFrameIdIsMutable();
                 frameId_.addAll(other.frameId_);
    @@ -1915,7 +1845,7 @@ public Builder mergeFrom(
                   case 10: {
                     org.tensorflow.proto.GraphDebugInfo.FileLineCol m =
                         input.readMessage(
    -                        org.tensorflow.proto.GraphDebugInfo.FileLineCol.PARSER,
    +                        org.tensorflow.proto.GraphDebugInfo.FileLineCol.parser(),
                             extensionRegistry);
                     if (fileLineColsBuilder_ == null) {
                       ensureFileLineColsIsMutable();
    @@ -1934,7 +1864,8 @@ public Builder mergeFrom(
                   case 18: {
                     int length = input.readRawVarint32();
                     int limit = input.pushLimit(length);
    -                ensureFrameIdIsMutable();
    +                int alloc = length > 4096 ? 4096 : length;
    +                ensureFrameIdIsMutable(alloc / 8);
                     while (input.getBytesUntilLimit() > 0) {
                       frameId_.addLong(input.readFixed64());
                     }
    @@ -1967,7 +1898,7 @@ private void ensureFileLineColsIsMutable() {
              }
           }
     
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.GraphDebugInfo.FileLineCol, org.tensorflow.proto.GraphDebugInfo.FileLineCol.Builder, org.tensorflow.proto.GraphDebugInfo.FileLineColOrBuilder> fileLineColsBuilder_;
     
           /**
    @@ -2255,11 +2186,11 @@ public org.tensorflow.proto.GraphDebugInfo.FileLineCol.Builder addFileLineColsBu
                getFileLineColsBuilderList() {
             return getFileLineColsFieldBuilder().getBuilderList();
           }
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.GraphDebugInfo.FileLineCol, org.tensorflow.proto.GraphDebugInfo.FileLineCol.Builder, org.tensorflow.proto.GraphDebugInfo.FileLineColOrBuilder> 
               getFileLineColsFieldBuilder() {
             if (fileLineColsBuilder_ == null) {
    -          fileLineColsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +          fileLineColsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                   org.tensorflow.proto.GraphDebugInfo.FileLineCol, org.tensorflow.proto.GraphDebugInfo.FileLineCol.Builder, org.tensorflow.proto.GraphDebugInfo.FileLineColOrBuilder>(
                       fileLineCols_,
                       ((bitField0_ & 0x00000001) != 0),
    @@ -2272,10 +2203,16 @@ public org.tensorflow.proto.GraphDebugInfo.FileLineCol.Builder addFileLineColsBu
     
           private com.google.protobuf.Internal.LongList frameId_ = emptyLongList();
           private void ensureFrameIdIsMutable() {
    -        if (!((bitField0_ & 0x00000002) != 0)) {
    -          frameId_ = mutableCopy(frameId_);
    -          bitField0_ |= 0x00000002;
    -         }
    +        if (!frameId_.isModifiable()) {
    +          frameId_ = makeMutableCopy(frameId_);
    +        }
    +        bitField0_ |= 0x00000002;
    +      }
    +      private void ensureFrameIdIsMutable(int capacity) {
    +        if (!frameId_.isModifiable()) {
    +          frameId_ = makeMutableCopy(frameId_, capacity);
    +        }
    +        bitField0_ |= 0x00000002;
           }
           /**
            * repeated fixed64 frame_id = 2 [packed = true];
    @@ -2283,8 +2220,8 @@ private void ensureFrameIdIsMutable() {
            */
           public java.util.List
               getFrameIdList() {
    -        return ((bitField0_ & 0x00000002) != 0) ?
    -                 java.util.Collections.unmodifiableList(frameId_) : frameId_;
    +        frameId_.makeImmutable();
    +        return frameId_;
           }
           /**
            * repeated fixed64 frame_id = 2 [packed = true];
    @@ -2309,8 +2246,10 @@ public long getFrameId(int index) {
            */
           public Builder setFrameId(
               int index, long value) {
    +
             ensureFrameIdIsMutable();
             frameId_.setLong(index, value);
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -2320,8 +2259,10 @@ public Builder setFrameId(
            * @return This builder for chaining.
            */
           public Builder addFrameId(long value) {
    +
             ensureFrameIdIsMutable();
             frameId_.addLong(value);
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -2335,6 +2276,7 @@ public Builder addAllFrameId(
             ensureFrameIdIsMutable();
             com.google.protobuf.AbstractMessageLite.Builder.addAll(
                 values, frameId_);
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -2348,18 +2290,6 @@ public Builder clearFrameId() {
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.GraphDebugInfo.StackTrace)
         }
    @@ -2374,7 +2304,7 @@ public static org.tensorflow.proto.GraphDebugInfo.StackTrace getDefaultInstance(
           return DEFAULT_INSTANCE;
         }
     
    -    @java.lang.Deprecated public static final com.google.protobuf.Parser
    +    private static final com.google.protobuf.Parser
             PARSER = new com.google.protobuf.AbstractParser() {
           @java.lang.Override
           public StackTrace parsePartialFrom(
    @@ -2413,7 +2343,9 @@ public org.tensorflow.proto.GraphDebugInfo.StackTrace getDefaultInstanceForType(
       }
     
       public static final int FILES_FIELD_NUMBER = 1;
    -  private com.google.protobuf.LazyStringList files_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.LazyStringArrayList files_ =
    +      com.google.protobuf.LazyStringArrayList.emptyList();
       /**
        * 
        * This stores all the source code file names and can be indexed by the
    @@ -2479,6 +2411,7 @@ private static final class FramesByIdDefaultEntryHolder {
                     com.google.protobuf.WireFormat.FieldType.MESSAGE,
                     org.tensorflow.proto.GraphDebugInfo.FileLineCol.getDefaultInstance());
       }
    +  @SuppressWarnings("serial")
       private com.google.protobuf.MapField<
           java.lang.Long, org.tensorflow.proto.GraphDebugInfo.FileLineCol> framesById_;
       private com.google.protobuf.MapField
    @@ -2489,7 +2422,6 @@ private static final class FramesByIdDefaultEntryHolder {
         }
         return framesById_;
       }
    -
       public int getFramesByIdCount() {
         return internalGetFramesById().getMap().size();
       }
    @@ -2501,11 +2433,10 @@ public int getFramesByIdCount() {
        *
        * map<fixed64, .tensorflow.GraphDebugInfo.FileLineCol> frames_by_id = 4;
        */
    -
       @java.lang.Override
       public boolean containsFramesById(
           long key) {
    -    
    +
         return internalGetFramesById().getMap().containsKey(key);
       }
       /**
    @@ -2525,7 +2456,6 @@ public java.util.Mapmap<fixed64, .tensorflow.GraphDebugInfo.FileLineCol> frames_by_id = 4;
        */
       @java.lang.Override
    -
       public java.util.Map getFramesByIdMap() {
         return internalGetFramesById().getMap();
       }
    @@ -2538,11 +2468,12 @@ public java.util.Mapmap<fixed64, .tensorflow.GraphDebugInfo.FileLineCol> frames_by_id = 4;
        */
       @java.lang.Override
    -
    -  public org.tensorflow.proto.GraphDebugInfo.FileLineCol getFramesByIdOrDefault(
    +  public /* nullable */
    +org.tensorflow.proto.GraphDebugInfo.FileLineCol getFramesByIdOrDefault(
           long key,
    -      org.tensorflow.proto.GraphDebugInfo.FileLineCol defaultValue) {
    -    
    +      /* nullable */
    +org.tensorflow.proto.GraphDebugInfo.FileLineCol defaultValue) {
    +
         java.util.Map map =
             internalGetFramesById().getMap();
         return map.containsKey(key) ? map.get(key) : defaultValue;
    @@ -2556,10 +2487,9 @@ public org.tensorflow.proto.GraphDebugInfo.FileLineCol getFramesByIdOrDefault(
        * map<fixed64, .tensorflow.GraphDebugInfo.FileLineCol> frames_by_id = 4;
        */
       @java.lang.Override
    -
       public org.tensorflow.proto.GraphDebugInfo.FileLineCol getFramesByIdOrThrow(
           long key) {
    -    
    +
         java.util.Map map =
             internalGetFramesById().getMap();
         if (!map.containsKey(key)) {
    @@ -2580,6 +2510,7 @@ private static final class TracesByIdDefaultEntryHolder {
                     com.google.protobuf.WireFormat.FieldType.MESSAGE,
                     org.tensorflow.proto.GraphDebugInfo.StackTrace.getDefaultInstance());
       }
    +  @SuppressWarnings("serial")
       private com.google.protobuf.MapField<
           java.lang.Long, org.tensorflow.proto.GraphDebugInfo.StackTrace> tracesById_;
       private com.google.protobuf.MapField
    @@ -2590,18 +2521,16 @@ private static final class TracesByIdDefaultEntryHolder {
         }
         return tracesById_;
       }
    -
       public int getTracesByIdCount() {
         return internalGetTracesById().getMap().size();
       }
       /**
        * map<fixed64, .tensorflow.GraphDebugInfo.StackTrace> traces_by_id = 6;
        */
    -
       @java.lang.Override
       public boolean containsTracesById(
           long key) {
    -    
    +
         return internalGetTracesById().getMap().containsKey(key);
       }
       /**
    @@ -2616,7 +2545,6 @@ public java.util.Mapmap<fixed64, .tensorflow.GraphDebugInfo.StackTrace> traces_by_id = 6;
        */
       @java.lang.Override
    -
       public java.util.Map getTracesByIdMap() {
         return internalGetTracesById().getMap();
       }
    @@ -2624,11 +2552,12 @@ public java.util.Mapmap<fixed64, .tensorflow.GraphDebugInfo.StackTrace> traces_by_id = 6;
        */
       @java.lang.Override
    -
    -  public org.tensorflow.proto.GraphDebugInfo.StackTrace getTracesByIdOrDefault(
    +  public /* nullable */
    +org.tensorflow.proto.GraphDebugInfo.StackTrace getTracesByIdOrDefault(
           long key,
    -      org.tensorflow.proto.GraphDebugInfo.StackTrace defaultValue) {
    -    
    +      /* nullable */
    +org.tensorflow.proto.GraphDebugInfo.StackTrace defaultValue) {
    +
         java.util.Map map =
             internalGetTracesById().getMap();
         return map.containsKey(key) ? map.get(key) : defaultValue;
    @@ -2637,10 +2566,9 @@ public org.tensorflow.proto.GraphDebugInfo.StackTrace getTracesByIdOrDefault(
        * map<fixed64, .tensorflow.GraphDebugInfo.StackTrace> traces_by_id = 6;
        */
       @java.lang.Override
    -
       public org.tensorflow.proto.GraphDebugInfo.StackTrace getTracesByIdOrThrow(
           long key) {
    -    
    +
         java.util.Map map =
             internalGetTracesById().getMap();
         if (!map.containsKey(key)) {
    @@ -2661,6 +2589,7 @@ private static final class TracesDefaultEntryHolder {
                     com.google.protobuf.WireFormat.FieldType.MESSAGE,
                     org.tensorflow.proto.GraphDebugInfo.StackTrace.getDefaultInstance());
       }
    +  @SuppressWarnings("serial")
       private com.google.protobuf.MapField<
           java.lang.String, org.tensorflow.proto.GraphDebugInfo.StackTrace> traces_;
       private com.google.protobuf.MapField
    @@ -2671,7 +2600,6 @@ private static final class TracesDefaultEntryHolder {
         }
         return traces_;
       }
    -
       public int getTracesCount() {
         return internalGetTraces().getMap().size();
       }
    @@ -2682,7 +2610,6 @@ public int getTracesCount() {
        *
        * map<string, .tensorflow.GraphDebugInfo.StackTrace> traces = 2;
        */
    -
       @java.lang.Override
       public boolean containsTraces(
           java.lang.String key) {
    @@ -2705,7 +2632,6 @@ public java.util.Mapmap<string, .tensorflow.GraphDebugInfo.StackTrace> traces = 2;
        */
       @java.lang.Override
    -
       public java.util.Map getTracesMap() {
         return internalGetTraces().getMap();
       }
    @@ -2717,10 +2643,11 @@ public java.util.Mapmap<string, .tensorflow.GraphDebugInfo.StackTrace> traces = 2;
        */
       @java.lang.Override
    -
    -  public org.tensorflow.proto.GraphDebugInfo.StackTrace getTracesOrDefault(
    +  public /* nullable */
    +org.tensorflow.proto.GraphDebugInfo.StackTrace getTracesOrDefault(
           java.lang.String key,
    -      org.tensorflow.proto.GraphDebugInfo.StackTrace defaultValue) {
    +      /* nullable */
    +org.tensorflow.proto.GraphDebugInfo.StackTrace defaultValue) {
         if (key == null) { throw new NullPointerException("map key"); }
         java.util.Map map =
             internalGetTraces().getMap();
    @@ -2734,7 +2661,6 @@ public org.tensorflow.proto.GraphDebugInfo.StackTrace getTracesOrDefault(
        * map<string, .tensorflow.GraphDebugInfo.StackTrace> traces = 2;
        */
       @java.lang.Override
    -
       public org.tensorflow.proto.GraphDebugInfo.StackTrace getTracesOrThrow(
           java.lang.String key) {
         if (key == null) { throw new NullPointerException("map key"); }
    @@ -2758,6 +2684,7 @@ private static final class NameToTraceIdDefaultEntryHolder {
                     com.google.protobuf.WireFormat.FieldType.FIXED64,
                     0L);
       }
    +  @SuppressWarnings("serial")
       private com.google.protobuf.MapField<
           java.lang.String, java.lang.Long> nameToTraceId_;
       private com.google.protobuf.MapField
    @@ -2768,16 +2695,16 @@ private static final class NameToTraceIdDefaultEntryHolder {
         }
         return nameToTraceId_;
       }
    -
       public int getNameToTraceIdCount() {
         return internalGetNameToTraceId().getMap().size();
       }
       /**
        * 
        * This maps a node name to a trace id contained in `traces_by_id`.
    +   *
        * The map key is a mangling of the containing function and op name with
        * syntax:
    -   *   op.name '@' func_name
    +   * op.name '@' func_name
        * For ops in the top-level graph, the func_name is the empty string and hence
        * the `@` may be ommitted.
        * Note that op names are restricted to a small number of characters which
    @@ -2789,7 +2716,6 @@ public int getNameToTraceIdCount() {
        *
        * map<string, fixed64> name_to_trace_id = 5;
        */
    -
       @java.lang.Override
       public boolean containsNameToTraceId(
           java.lang.String key) {
    @@ -2807,9 +2733,10 @@ public java.util.Map getNameToTraceId() {
       /**
        * 
        * This maps a node name to a trace id contained in `traces_by_id`.
    +   *
        * The map key is a mangling of the containing function and op name with
        * syntax:
    -   *   op.name '@' func_name
    +   * op.name '@' func_name
        * For ops in the top-level graph, the func_name is the empty string and hence
        * the `@` may be ommitted.
        * Note that op names are restricted to a small number of characters which
    @@ -2822,16 +2749,16 @@ public java.util.Map getNameToTraceId() {
        * map<string, fixed64> name_to_trace_id = 5;
        */
       @java.lang.Override
    -
       public java.util.Map getNameToTraceIdMap() {
         return internalGetNameToTraceId().getMap();
       }
       /**
        * 
        * This maps a node name to a trace id contained in `traces_by_id`.
    +   *
        * The map key is a mangling of the containing function and op name with
        * syntax:
    -   *   op.name '@' func_name
    +   * op.name '@' func_name
        * For ops in the top-level graph, the func_name is the empty string and hence
        * the `@` may be ommitted.
        * Note that op names are restricted to a small number of characters which
    @@ -2844,7 +2771,6 @@ public java.util.Map getNameToTraceIdMap() {
        * map<string, fixed64> name_to_trace_id = 5;
        */
       @java.lang.Override
    -
       public long getNameToTraceIdOrDefault(
           java.lang.String key,
           long defaultValue) {
    @@ -2856,9 +2782,10 @@ public long getNameToTraceIdOrDefault(
       /**
        * 
        * This maps a node name to a trace id contained in `traces_by_id`.
    +   *
        * The map key is a mangling of the containing function and op name with
        * syntax:
    -   *   op.name '@' func_name
    +   * op.name '@' func_name
        * For ops in the top-level graph, the func_name is the empty string and hence
        * the `@` may be ommitted.
        * Note that op names are restricted to a small number of characters which
    @@ -2871,7 +2798,6 @@ public long getNameToTraceIdOrDefault(
        * map<string, fixed64> name_to_trace_id = 5;
        */
       @java.lang.Override
    -
       public long getNameToTraceIdOrThrow(
           java.lang.String key) {
         if (key == null) { throw new NullPointerException("map key"); }
    @@ -2898,27 +2824,27 @@ public final boolean isInitialized() {
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
         for (int i = 0; i < files_.size(); i++) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, files_.getRaw(i));
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, files_.getRaw(i));
         }
    -    com.google.protobuf.GeneratedMessageV3
    +    com.google.protobuf.GeneratedMessage
           .serializeStringMapTo(
             output,
             internalGetTraces(),
             TracesDefaultEntryHolder.defaultEntry,
             2);
    -    com.google.protobuf.GeneratedMessageV3
    +    com.google.protobuf.GeneratedMessage
           .serializeLongMapTo(
             output,
             internalGetFramesById(),
             FramesByIdDefaultEntryHolder.defaultEntry,
             4);
    -    com.google.protobuf.GeneratedMessageV3
    +    com.google.protobuf.GeneratedMessage
           .serializeStringMapTo(
             output,
             internalGetNameToTraceId(),
             NameToTraceIdDefaultEntryHolder.defaultEntry,
             5);
    -    com.google.protobuf.GeneratedMessageV3
    +    com.google.protobuf.GeneratedMessage
           .serializeLongMapTo(
             output,
             internalGetTracesById(),
    @@ -3076,39 +3002,41 @@ public static org.tensorflow.proto.GraphDebugInfo parseFrom(
       }
       public static org.tensorflow.proto.GraphDebugInfo parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.GraphDebugInfo parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.GraphDebugInfo parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.GraphDebugInfo parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.GraphDebugInfo parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.GraphDebugInfo parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -3128,7 +3056,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -3136,7 +3064,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.GraphDebugInfo}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.GraphDebugInfo)
           org.tensorflow.proto.GraphDebugInfoOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -3145,7 +3073,7 @@ public static final class Builder extends
         }
     
         @SuppressWarnings({"rawtypes"})
    -    protected com.google.protobuf.MapField internalGetMapField(
    +    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
             int number) {
           switch (number) {
             case 4:
    @@ -3162,7 +3090,7 @@ protected com.google.protobuf.MapField internalGetMapField(
           }
         }
         @SuppressWarnings({"rawtypes"})
    -    protected com.google.protobuf.MapField internalGetMutableMapField(
    +    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
             int number) {
           switch (number) {
             case 4:
    @@ -3179,7 +3107,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField(
           }
         }
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.GraphDebugInfoProtos.internal_static_tensorflow_GraphDebugInfo_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -3192,15 +3120,16 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    -      files_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      bitField0_ = 0;
    +      files_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
           internalGetMutableFramesById().clear();
           internalGetMutableTracesById().clear();
           internalGetMutableTraces().clear();
    @@ -3231,56 +3160,32 @@ public org.tensorflow.proto.GraphDebugInfo build() {
         @java.lang.Override
         public org.tensorflow.proto.GraphDebugInfo buildPartial() {
           org.tensorflow.proto.GraphDebugInfo result = new org.tensorflow.proto.GraphDebugInfo(this);
    -      int from_bitField0_ = bitField0_;
    -      if (((bitField0_ & 0x00000001) != 0)) {
    -        files_ = files_.getUnmodifiableView();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    -      }
    -      result.files_ = files_;
    -      result.framesById_ = internalGetFramesById();
    -      result.framesById_.makeImmutable();
    -      result.tracesById_ = internalGetTracesById();
    -      result.tracesById_.makeImmutable();
    -      result.traces_ = internalGetTraces();
    -      result.traces_.makeImmutable();
    -      result.nameToTraceId_ = internalGetNameToTraceId();
    -      result.nameToTraceId_.makeImmutable();
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.GraphDebugInfo result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        files_.makeImmutable();
    +        result.files_ = files_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.framesById_ = internalGetFramesById().build(FramesByIdDefaultEntryHolder.defaultEntry);
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.tracesById_ = internalGetTracesById().build(TracesByIdDefaultEntryHolder.defaultEntry);
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.traces_ = internalGetTraces().build(TracesDefaultEntryHolder.defaultEntry);
    +      }
    +      if (((from_bitField0_ & 0x00000010) != 0)) {
    +        result.nameToTraceId_ = internalGetNameToTraceId();
    +        result.nameToTraceId_.makeImmutable();
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.GraphDebugInfo) {
    @@ -3296,7 +3201,7 @@ public Builder mergeFrom(org.tensorflow.proto.GraphDebugInfo other) {
           if (!other.files_.isEmpty()) {
             if (files_.isEmpty()) {
               files_ = other.files_;
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ |= 0x00000001;
             } else {
               ensureFilesIsMutable();
               files_.addAll(other.files_);
    @@ -3305,12 +3210,16 @@ public Builder mergeFrom(org.tensorflow.proto.GraphDebugInfo other) {
           }
           internalGetMutableFramesById().mergeFrom(
               other.internalGetFramesById());
    +      bitField0_ |= 0x00000002;
           internalGetMutableTracesById().mergeFrom(
               other.internalGetTracesById());
    +      bitField0_ |= 0x00000004;
           internalGetMutableTraces().mergeFrom(
               other.internalGetTraces());
    +      bitField0_ |= 0x00000008;
           internalGetMutableNameToTraceId().mergeFrom(
               other.internalGetNameToTraceId());
    +      bitField0_ |= 0x00000010;
           this.mergeUnknownFields(other.getUnknownFields());
           onChanged();
           return this;
    @@ -3347,16 +3256,18 @@ public Builder mergeFrom(
                   com.google.protobuf.MapEntry
                   traces__ = input.readMessage(
                       TracesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
    -              internalGetMutableTraces().getMutableMap().put(
    +              internalGetMutableTraces().ensureBuilderMap().put(
                       traces__.getKey(), traces__.getValue());
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 18
                 case 34: {
                   com.google.protobuf.MapEntry
                   framesById__ = input.readMessage(
                       FramesByIdDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
    -              internalGetMutableFramesById().getMutableMap().put(
    +              internalGetMutableFramesById().ensureBuilderMap().put(
                       framesById__.getKey(), framesById__.getValue());
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 34
                 case 42: {
    @@ -3365,14 +3276,16 @@ public Builder mergeFrom(
                       NameToTraceIdDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
                   internalGetMutableNameToTraceId().getMutableMap().put(
                       nameToTraceId__.getKey(), nameToTraceId__.getValue());
    +              bitField0_ |= 0x00000010;
                   break;
                 } // case 42
                 case 50: {
                   com.google.protobuf.MapEntry
                   tracesById__ = input.readMessage(
                       TracesByIdDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
    -              internalGetMutableTracesById().getMutableMap().put(
    +              internalGetMutableTracesById().ensureBuilderMap().put(
                       tracesById__.getKey(), tracesById__.getValue());
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 50
                 default: {
    @@ -3392,12 +3305,13 @@ public Builder mergeFrom(
         }
         private int bitField0_;
     
    -    private com.google.protobuf.LazyStringList files_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +    private com.google.protobuf.LazyStringArrayList files_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         private void ensureFilesIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    +      if (!files_.isModifiable()) {
             files_ = new com.google.protobuf.LazyStringArrayList(files_);
    -        bitField0_ |= 0x00000001;
    -       }
    +      }
    +      bitField0_ |= 0x00000001;
         }
         /**
          * 
    @@ -3410,7 +3324,8 @@ private void ensureFilesIsMutable() {
          */
         public com.google.protobuf.ProtocolStringList
             getFilesList() {
    -      return files_.getUnmodifiableView();
    +      files_.makeImmutable();
    +      return files_;
         }
         /**
          * 
    @@ -3464,11 +3379,10 @@ public java.lang.String getFiles(int index) {
          */
         public Builder setFiles(
             int index, java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureFilesIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureFilesIsMutable();
           files_.set(index, value);
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -3484,11 +3398,10 @@ public Builder setFiles(
          */
         public Builder addFiles(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureFilesIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureFilesIsMutable();
           files_.add(value);
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -3507,6 +3420,7 @@ public Builder addAllFiles(
           ensureFilesIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, files_);
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -3520,8 +3434,9 @@ public Builder addAllFiles(
          * @return This builder for chaining.
          */
         public Builder clearFiles() {
    -      files_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      files_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
    +      bitField0_ = (bitField0_ & ~0x00000001);;
           onChanged();
           return this;
         }
    @@ -3537,40 +3452,48 @@ public Builder clearFiles() {
          */
         public Builder addFilesBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureFilesIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureFilesIsMutable();
           files_.add(value);
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
     
    -    private com.google.protobuf.MapField<
    -        java.lang.Long, org.tensorflow.proto.GraphDebugInfo.FileLineCol> framesById_;
    -    private com.google.protobuf.MapField
    -    internalGetFramesById() {
    +    private static final class FramesByIdConverter implements com.google.protobuf.MapFieldBuilder.Converter {
    +      @java.lang.Override
    +      public org.tensorflow.proto.GraphDebugInfo.FileLineCol build(org.tensorflow.proto.GraphDebugInfo.FileLineColOrBuilder val) {
    +        if (val instanceof org.tensorflow.proto.GraphDebugInfo.FileLineCol) { return (org.tensorflow.proto.GraphDebugInfo.FileLineCol) val; }
    +        return ((org.tensorflow.proto.GraphDebugInfo.FileLineCol.Builder) val).build();
    +      }
    +
    +      @java.lang.Override
    +      public com.google.protobuf.MapEntry defaultEntry() {
    +        return FramesByIdDefaultEntryHolder.defaultEntry;
    +      }
    +    };
    +    private static final FramesByIdConverter framesByIdConverter = new FramesByIdConverter();
    +
    +    private com.google.protobuf.MapFieldBuilder<
    +        java.lang.Long, org.tensorflow.proto.GraphDebugInfo.FileLineColOrBuilder, org.tensorflow.proto.GraphDebugInfo.FileLineCol, org.tensorflow.proto.GraphDebugInfo.FileLineCol.Builder> framesById_;
    +    private com.google.protobuf.MapFieldBuilder
    +        internalGetFramesById() {
           if (framesById_ == null) {
    -        return com.google.protobuf.MapField.emptyMapField(
    -            FramesByIdDefaultEntryHolder.defaultEntry);
    +        return new com.google.protobuf.MapFieldBuilder<>(framesByIdConverter);
           }
           return framesById_;
         }
    -    private com.google.protobuf.MapField
    -    internalGetMutableFramesById() {
    -      onChanged();;
    +    private com.google.protobuf.MapFieldBuilder
    +        internalGetMutableFramesById() {
           if (framesById_ == null) {
    -        framesById_ = com.google.protobuf.MapField.newMapField(
    -            FramesByIdDefaultEntryHolder.defaultEntry);
    -      }
    -      if (!framesById_.isMutable()) {
    -        framesById_ = framesById_.copy();
    +        framesById_ = new com.google.protobuf.MapFieldBuilder<>(framesByIdConverter);
           }
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return framesById_;
         }
    -
         public int getFramesByIdCount() {
    -      return internalGetFramesById().getMap().size();
    +      return internalGetFramesById().ensureBuilderMap().size();
         }
         /**
          * 
    @@ -3580,12 +3503,11 @@ public int getFramesByIdCount() {
          *
          * map<fixed64, .tensorflow.GraphDebugInfo.FileLineCol> frames_by_id = 4;
          */
    -
         @java.lang.Override
         public boolean containsFramesById(
             long key) {
    -      
    -      return internalGetFramesById().getMap().containsKey(key);
    +
    +      return internalGetFramesById().ensureBuilderMap().containsKey(key);
         }
         /**
          * Use {@link #getFramesByIdMap()} instead.
    @@ -3604,9 +3526,8 @@ public java.util.Mapmap<fixed64, .tensorflow.GraphDebugInfo.FileLineCol> frames_by_id = 4;
          */
         @java.lang.Override
    -
         public java.util.Map getFramesByIdMap() {
    -      return internalGetFramesById().getMap();
    +      return internalGetFramesById().getImmutableMap();
         }
         /**
          * 
    @@ -3617,14 +3538,14 @@ public java.util.Mapmap<fixed64, .tensorflow.GraphDebugInfo.FileLineCol> frames_by_id = 4;
          */
         @java.lang.Override
    -
    -    public org.tensorflow.proto.GraphDebugInfo.FileLineCol getFramesByIdOrDefault(
    +    public /* nullable */
    +org.tensorflow.proto.GraphDebugInfo.FileLineCol getFramesByIdOrDefault(
             long key,
    -        org.tensorflow.proto.GraphDebugInfo.FileLineCol defaultValue) {
    -      
    -      java.util.Map map =
    -          internalGetFramesById().getMap();
    -      return map.containsKey(key) ? map.get(key) : defaultValue;
    +        /* nullable */
    +org.tensorflow.proto.GraphDebugInfo.FileLineCol defaultValue) {
    +
    +      java.util.Map map = internalGetMutableFramesById().ensureBuilderMap();
    +      return map.containsKey(key) ? framesByIdConverter.build(map.get(key)) : defaultValue;
         }
         /**
          * 
    @@ -3635,21 +3556,18 @@ public org.tensorflow.proto.GraphDebugInfo.FileLineCol getFramesByIdOrDefault(
          * map<fixed64, .tensorflow.GraphDebugInfo.FileLineCol> frames_by_id = 4;
          */
         @java.lang.Override
    -
         public org.tensorflow.proto.GraphDebugInfo.FileLineCol getFramesByIdOrThrow(
             long key) {
    -      
    -      java.util.Map map =
    -          internalGetFramesById().getMap();
    +
    +      java.util.Map map = internalGetMutableFramesById().ensureBuilderMap();
           if (!map.containsKey(key)) {
             throw new java.lang.IllegalArgumentException();
           }
    -      return map.get(key);
    +      return framesByIdConverter.build(map.get(key));
         }
    -
         public Builder clearFramesById() {
    -      internalGetMutableFramesById().getMutableMap()
    -          .clear();
    +      bitField0_ = (bitField0_ & ~0x00000002);
    +      internalGetMutableFramesById().clear();
           return this;
         }
         /**
    @@ -3660,11 +3578,10 @@ public Builder clearFramesById() {
          *
          * map<fixed64, .tensorflow.GraphDebugInfo.FileLineCol> frames_by_id = 4;
          */
    -
         public Builder removeFramesById(
             long key) {
    -      
    -      internalGetMutableFramesById().getMutableMap()
    +
    +      internalGetMutableFramesById().ensureBuilderMap()
               .remove(key);
           return this;
         }
    @@ -3673,8 +3590,9 @@ public Builder removeFramesById(
          */
         @java.lang.Deprecated
         public java.util.Map
    -    getMutableFramesById() {
    -      return internalGetMutableFramesById().getMutableMap();
    +        getMutableFramesById() {
    +      bitField0_ |= 0x00000002;
    +      return internalGetMutableFramesById().ensureMessageMap();
         }
         /**
          * 
    @@ -3687,13 +3605,11 @@ public Builder removeFramesById(
         public Builder putFramesById(
             long key,
             org.tensorflow.proto.GraphDebugInfo.FileLineCol value) {
    -      
    -      if (value == null) {
    -  throw new NullPointerException("map value");
    -}
     
    -      internalGetMutableFramesById().getMutableMap()
    +      if (value == null) { throw new NullPointerException("map value"); }
    +      internalGetMutableFramesById().ensureBuilderMap()
               .put(key, value);
    +      bitField0_ |= 0x00000002;
           return this;
         }
         /**
    @@ -3704,49 +3620,84 @@ public Builder putFramesById(
          *
          * map<fixed64, .tensorflow.GraphDebugInfo.FileLineCol> frames_by_id = 4;
          */
    -
         public Builder putAllFramesById(
             java.util.Map values) {
    -      internalGetMutableFramesById().getMutableMap()
    +      for (java.util.Map.Entry e : values.entrySet()) {
    +        if (e.getKey() == null || e.getValue() == null) {
    +          throw new NullPointerException();
    +        }
    +      }
    +      internalGetMutableFramesById().ensureBuilderMap()
               .putAll(values);
    +      bitField0_ |= 0x00000002;
           return this;
         }
    +    /**
    +     * 
    +     * Stack traces and frames are uniqueified during construction. These maps
    +     * index from the unique id for a frame/trace to the value.
    +     * 
    + * + * map<fixed64, .tensorflow.GraphDebugInfo.FileLineCol> frames_by_id = 4; + */ + public org.tensorflow.proto.GraphDebugInfo.FileLineCol.Builder putFramesByIdBuilderIfAbsent( + long key) { + java.util.Map builderMap = internalGetMutableFramesById().ensureBuilderMap(); + org.tensorflow.proto.GraphDebugInfo.FileLineColOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = org.tensorflow.proto.GraphDebugInfo.FileLineCol.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof org.tensorflow.proto.GraphDebugInfo.FileLineCol) { + entry = ((org.tensorflow.proto.GraphDebugInfo.FileLineCol) entry).toBuilder(); + builderMap.put(key, entry); + } + return (org.tensorflow.proto.GraphDebugInfo.FileLineCol.Builder) entry; + } - private com.google.protobuf.MapField< - java.lang.Long, org.tensorflow.proto.GraphDebugInfo.StackTrace> tracesById_; - private com.google.protobuf.MapField - internalGetTracesById() { + private static final class TracesByIdConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public org.tensorflow.proto.GraphDebugInfo.StackTrace build(org.tensorflow.proto.GraphDebugInfo.StackTraceOrBuilder val) { + if (val instanceof org.tensorflow.proto.GraphDebugInfo.StackTrace) { return (org.tensorflow.proto.GraphDebugInfo.StackTrace) val; } + return ((org.tensorflow.proto.GraphDebugInfo.StackTrace.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return TracesByIdDefaultEntryHolder.defaultEntry; + } + }; + private static final TracesByIdConverter tracesByIdConverter = new TracesByIdConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.Long, org.tensorflow.proto.GraphDebugInfo.StackTraceOrBuilder, org.tensorflow.proto.GraphDebugInfo.StackTrace, org.tensorflow.proto.GraphDebugInfo.StackTrace.Builder> tracesById_; + private com.google.protobuf.MapFieldBuilder + internalGetTracesById() { if (tracesById_ == null) { - return com.google.protobuf.MapField.emptyMapField( - TracesByIdDefaultEntryHolder.defaultEntry); + return new com.google.protobuf.MapFieldBuilder<>(tracesByIdConverter); } return tracesById_; } - private com.google.protobuf.MapField - internalGetMutableTracesById() { - onChanged();; + private com.google.protobuf.MapFieldBuilder + internalGetMutableTracesById() { if (tracesById_ == null) { - tracesById_ = com.google.protobuf.MapField.newMapField( - TracesByIdDefaultEntryHolder.defaultEntry); - } - if (!tracesById_.isMutable()) { - tracesById_ = tracesById_.copy(); + tracesById_ = new com.google.protobuf.MapFieldBuilder<>(tracesByIdConverter); } + bitField0_ |= 0x00000004; + onChanged(); return tracesById_; } - public int getTracesByIdCount() { - return internalGetTracesById().getMap().size(); + return internalGetTracesById().ensureBuilderMap().size(); } /** * map<fixed64, .tensorflow.GraphDebugInfo.StackTrace> traces_by_id = 6; */ - @java.lang.Override public boolean containsTracesById( long key) { - - return internalGetTracesById().getMap().containsKey(key); + + return internalGetTracesById().ensureBuilderMap().containsKey(key); } /** * Use {@link #getTracesByIdMap()} instead. @@ -3760,52 +3711,47 @@ public java.util.Mapmap<fixed64, .tensorflow.GraphDebugInfo.StackTrace> traces_by_id = 6; */ @java.lang.Override - public java.util.Map getTracesByIdMap() { - return internalGetTracesById().getMap(); + return internalGetTracesById().getImmutableMap(); } /** * map<fixed64, .tensorflow.GraphDebugInfo.StackTrace> traces_by_id = 6; */ @java.lang.Override - - public org.tensorflow.proto.GraphDebugInfo.StackTrace getTracesByIdOrDefault( + public /* nullable */ +org.tensorflow.proto.GraphDebugInfo.StackTrace getTracesByIdOrDefault( long key, - org.tensorflow.proto.GraphDebugInfo.StackTrace defaultValue) { - - java.util.Map map = - internalGetTracesById().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; + /* nullable */ +org.tensorflow.proto.GraphDebugInfo.StackTrace defaultValue) { + + java.util.Map map = internalGetMutableTracesById().ensureBuilderMap(); + return map.containsKey(key) ? tracesByIdConverter.build(map.get(key)) : defaultValue; } /** * map<fixed64, .tensorflow.GraphDebugInfo.StackTrace> traces_by_id = 6; */ @java.lang.Override - public org.tensorflow.proto.GraphDebugInfo.StackTrace getTracesByIdOrThrow( long key) { - - java.util.Map map = - internalGetTracesById().getMap(); + + java.util.Map map = internalGetMutableTracesById().ensureBuilderMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } - return map.get(key); + return tracesByIdConverter.build(map.get(key)); } - public Builder clearTracesById() { - internalGetMutableTracesById().getMutableMap() - .clear(); + bitField0_ = (bitField0_ & ~0x00000004); + internalGetMutableTracesById().clear(); return this; } /** * map<fixed64, .tensorflow.GraphDebugInfo.StackTrace> traces_by_id = 6; */ - public Builder removeTracesById( long key) { - - internalGetMutableTracesById().getMutableMap() + + internalGetMutableTracesById().ensureBuilderMap() .remove(key); return this; } @@ -3814,8 +3760,9 @@ public Builder removeTracesById( */ @java.lang.Deprecated public java.util.Map - getMutableTracesById() { - return internalGetMutableTracesById().getMutableMap(); + getMutableTracesById() { + bitField0_ |= 0x00000004; + return internalGetMutableTracesById().ensureMessageMap(); } /** * map<fixed64, .tensorflow.GraphDebugInfo.StackTrace> traces_by_id = 6; @@ -3823,51 +3770,80 @@ public Builder removeTracesById( public Builder putTracesById( long key, org.tensorflow.proto.GraphDebugInfo.StackTrace value) { - - if (value == null) { - throw new NullPointerException("map value"); -} - internalGetMutableTracesById().getMutableMap() + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableTracesById().ensureBuilderMap() .put(key, value); + bitField0_ |= 0x00000004; return this; } /** * map<fixed64, .tensorflow.GraphDebugInfo.StackTrace> traces_by_id = 6; */ - public Builder putAllTracesById( java.util.Map values) { - internalGetMutableTracesById().getMutableMap() + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableTracesById().ensureBuilderMap() .putAll(values); + bitField0_ |= 0x00000004; return this; } + /** + * map<fixed64, .tensorflow.GraphDebugInfo.StackTrace> traces_by_id = 6; + */ + public org.tensorflow.proto.GraphDebugInfo.StackTrace.Builder putTracesByIdBuilderIfAbsent( + long key) { + java.util.Map builderMap = internalGetMutableTracesById().ensureBuilderMap(); + org.tensorflow.proto.GraphDebugInfo.StackTraceOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = org.tensorflow.proto.GraphDebugInfo.StackTrace.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof org.tensorflow.proto.GraphDebugInfo.StackTrace) { + entry = ((org.tensorflow.proto.GraphDebugInfo.StackTrace) entry).toBuilder(); + builderMap.put(key, entry); + } + return (org.tensorflow.proto.GraphDebugInfo.StackTrace.Builder) entry; + } - private com.google.protobuf.MapField< - java.lang.String, org.tensorflow.proto.GraphDebugInfo.StackTrace> traces_; - private com.google.protobuf.MapField - internalGetTraces() { + private static final class TracesConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public org.tensorflow.proto.GraphDebugInfo.StackTrace build(org.tensorflow.proto.GraphDebugInfo.StackTraceOrBuilder val) { + if (val instanceof org.tensorflow.proto.GraphDebugInfo.StackTrace) { return (org.tensorflow.proto.GraphDebugInfo.StackTrace) val; } + return ((org.tensorflow.proto.GraphDebugInfo.StackTrace.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return TracesDefaultEntryHolder.defaultEntry; + } + }; + private static final TracesConverter tracesConverter = new TracesConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, org.tensorflow.proto.GraphDebugInfo.StackTraceOrBuilder, org.tensorflow.proto.GraphDebugInfo.StackTrace, org.tensorflow.proto.GraphDebugInfo.StackTrace.Builder> traces_; + private com.google.protobuf.MapFieldBuilder + internalGetTraces() { if (traces_ == null) { - return com.google.protobuf.MapField.emptyMapField( - TracesDefaultEntryHolder.defaultEntry); + return new com.google.protobuf.MapFieldBuilder<>(tracesConverter); } return traces_; } - private com.google.protobuf.MapField - internalGetMutableTraces() { - onChanged();; + private com.google.protobuf.MapFieldBuilder + internalGetMutableTraces() { if (traces_ == null) { - traces_ = com.google.protobuf.MapField.newMapField( - TracesDefaultEntryHolder.defaultEntry); - } - if (!traces_.isMutable()) { - traces_ = traces_.copy(); + traces_ = new com.google.protobuf.MapFieldBuilder<>(tracesConverter); } + bitField0_ |= 0x00000008; + onChanged(); return traces_; } - public int getTracesCount() { - return internalGetTraces().getMap().size(); + return internalGetTraces().ensureBuilderMap().size(); } /** *
    @@ -3876,12 +3852,11 @@ public int getTracesCount() {
          *
          * map<string, .tensorflow.GraphDebugInfo.StackTrace> traces = 2;
          */
    -
         @java.lang.Override
         public boolean containsTraces(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      return internalGetTraces().getMap().containsKey(key);
    +      return internalGetTraces().ensureBuilderMap().containsKey(key);
         }
         /**
          * Use {@link #getTracesMap()} instead.
    @@ -3899,9 +3874,8 @@ public java.util.Mapmap<string, .tensorflow.GraphDebugInfo.StackTrace> traces = 2;
          */
         @java.lang.Override
    -
         public java.util.Map getTracesMap() {
    -      return internalGetTraces().getMap();
    +      return internalGetTraces().getImmutableMap();
         }
         /**
          * 
    @@ -3911,14 +3885,14 @@ public java.util.Mapmap<string, .tensorflow.GraphDebugInfo.StackTrace> traces = 2;
          */
         @java.lang.Override
    -
    -    public org.tensorflow.proto.GraphDebugInfo.StackTrace getTracesOrDefault(
    +    public /* nullable */
    +org.tensorflow.proto.GraphDebugInfo.StackTrace getTracesOrDefault(
             java.lang.String key,
    -        org.tensorflow.proto.GraphDebugInfo.StackTrace defaultValue) {
    +        /* nullable */
    +org.tensorflow.proto.GraphDebugInfo.StackTrace defaultValue) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      java.util.Map map =
    -          internalGetTraces().getMap();
    -      return map.containsKey(key) ? map.get(key) : defaultValue;
    +      java.util.Map map = internalGetMutableTraces().ensureBuilderMap();
    +      return map.containsKey(key) ? tracesConverter.build(map.get(key)) : defaultValue;
         }
         /**
          * 
    @@ -3928,21 +3902,18 @@ public org.tensorflow.proto.GraphDebugInfo.StackTrace getTracesOrDefault(
          * map<string, .tensorflow.GraphDebugInfo.StackTrace> traces = 2;
          */
         @java.lang.Override
    -
         public org.tensorflow.proto.GraphDebugInfo.StackTrace getTracesOrThrow(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      java.util.Map map =
    -          internalGetTraces().getMap();
    +      java.util.Map map = internalGetMutableTraces().ensureBuilderMap();
           if (!map.containsKey(key)) {
             throw new java.lang.IllegalArgumentException();
           }
    -      return map.get(key);
    +      return tracesConverter.build(map.get(key));
         }
    -
         public Builder clearTraces() {
    -      internalGetMutableTraces().getMutableMap()
    -          .clear();
    +      bitField0_ = (bitField0_ & ~0x00000008);
    +      internalGetMutableTraces().clear();
           return this;
         }
         /**
    @@ -3952,11 +3923,10 @@ public Builder clearTraces() {
          *
          * map<string, .tensorflow.GraphDebugInfo.StackTrace> traces = 2;
          */
    -
         public Builder removeTraces(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      internalGetMutableTraces().getMutableMap()
    +      internalGetMutableTraces().ensureBuilderMap()
               .remove(key);
           return this;
         }
    @@ -3965,8 +3935,9 @@ public Builder removeTraces(
          */
         @java.lang.Deprecated
         public java.util.Map
    -    getMutableTraces() {
    -      return internalGetMutableTraces().getMutableMap();
    +        getMutableTraces() {
    +      bitField0_ |= 0x00000008;
    +      return internalGetMutableTraces().ensureMessageMap();
         }
         /**
          * 
    @@ -3979,12 +3950,10 @@ public Builder putTraces(
             java.lang.String key,
             org.tensorflow.proto.GraphDebugInfo.StackTrace value) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      if (value == null) {
    -  throw new NullPointerException("map value");
    -}
    -
    -      internalGetMutableTraces().getMutableMap()
    +      if (value == null) { throw new NullPointerException("map value"); }
    +      internalGetMutableTraces().ensureBuilderMap()
               .put(key, value);
    +      bitField0_ |= 0x00000008;
           return this;
         }
         /**
    @@ -3994,18 +3963,44 @@ public Builder putTraces(
          *
          * map<string, .tensorflow.GraphDebugInfo.StackTrace> traces = 2;
          */
    -
         public Builder putAllTraces(
             java.util.Map values) {
    -      internalGetMutableTraces().getMutableMap()
    +      for (java.util.Map.Entry e : values.entrySet()) {
    +        if (e.getKey() == null || e.getValue() == null) {
    +          throw new NullPointerException();
    +        }
    +      }
    +      internalGetMutableTraces().ensureBuilderMap()
               .putAll(values);
    +      bitField0_ |= 0x00000008;
           return this;
         }
    +    /**
    +     * 
    +     * Deprecated.
    +     * 
    + * + * map<string, .tensorflow.GraphDebugInfo.StackTrace> traces = 2; + */ + public org.tensorflow.proto.GraphDebugInfo.StackTrace.Builder putTracesBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableTraces().ensureBuilderMap(); + org.tensorflow.proto.GraphDebugInfo.StackTraceOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = org.tensorflow.proto.GraphDebugInfo.StackTrace.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof org.tensorflow.proto.GraphDebugInfo.StackTrace) { + entry = ((org.tensorflow.proto.GraphDebugInfo.StackTrace) entry).toBuilder(); + builderMap.put(key, entry); + } + return (org.tensorflow.proto.GraphDebugInfo.StackTrace.Builder) entry; + } private com.google.protobuf.MapField< java.lang.String, java.lang.Long> nameToTraceId_; private com.google.protobuf.MapField - internalGetNameToTraceId() { + internalGetNameToTraceId() { if (nameToTraceId_ == null) { return com.google.protobuf.MapField.emptyMapField( NameToTraceIdDefaultEntryHolder.defaultEntry); @@ -4013,8 +4008,7 @@ public Builder putAllTraces( return nameToTraceId_; } private com.google.protobuf.MapField - internalGetMutableNameToTraceId() { - onChanged();; + internalGetMutableNameToTraceId() { if (nameToTraceId_ == null) { nameToTraceId_ = com.google.protobuf.MapField.newMapField( NameToTraceIdDefaultEntryHolder.defaultEntry); @@ -4022,18 +4016,20 @@ public Builder putAllTraces( if (!nameToTraceId_.isMutable()) { nameToTraceId_ = nameToTraceId_.copy(); } + bitField0_ |= 0x00000010; + onChanged(); return nameToTraceId_; } - public int getNameToTraceIdCount() { return internalGetNameToTraceId().getMap().size(); } /** *
          * This maps a node name to a trace id contained in `traces_by_id`.
    +     *
          * The map key is a mangling of the containing function and op name with
          * syntax:
    -     *   op.name '@' func_name
    +     * op.name '@' func_name
          * For ops in the top-level graph, the func_name is the empty string and hence
          * the `@` may be ommitted.
          * Note that op names are restricted to a small number of characters which
    @@ -4045,7 +4041,6 @@ public int getNameToTraceIdCount() {
          *
          * map<string, fixed64> name_to_trace_id = 5;
          */
    -
         @java.lang.Override
         public boolean containsNameToTraceId(
             java.lang.String key) {
    @@ -4063,9 +4058,10 @@ public java.util.Map getNameToTraceId() {
         /**
          * 
          * This maps a node name to a trace id contained in `traces_by_id`.
    +     *
          * The map key is a mangling of the containing function and op name with
          * syntax:
    -     *   op.name '@' func_name
    +     * op.name '@' func_name
          * For ops in the top-level graph, the func_name is the empty string and hence
          * the `@` may be ommitted.
          * Note that op names are restricted to a small number of characters which
    @@ -4078,16 +4074,16 @@ public java.util.Map getNameToTraceId() {
          * map<string, fixed64> name_to_trace_id = 5;
          */
         @java.lang.Override
    -
         public java.util.Map getNameToTraceIdMap() {
           return internalGetNameToTraceId().getMap();
         }
         /**
          * 
          * This maps a node name to a trace id contained in `traces_by_id`.
    +     *
          * The map key is a mangling of the containing function and op name with
          * syntax:
    -     *   op.name '@' func_name
    +     * op.name '@' func_name
          * For ops in the top-level graph, the func_name is the empty string and hence
          * the `@` may be ommitted.
          * Note that op names are restricted to a small number of characters which
    @@ -4100,7 +4096,6 @@ public java.util.Map getNameToTraceIdMap() {
          * map<string, fixed64> name_to_trace_id = 5;
          */
         @java.lang.Override
    -
         public long getNameToTraceIdOrDefault(
             java.lang.String key,
             long defaultValue) {
    @@ -4112,9 +4107,10 @@ public long getNameToTraceIdOrDefault(
         /**
          * 
          * This maps a node name to a trace id contained in `traces_by_id`.
    +     *
          * The map key is a mangling of the containing function and op name with
          * syntax:
    -     *   op.name '@' func_name
    +     * op.name '@' func_name
          * For ops in the top-level graph, the func_name is the empty string and hence
          * the `@` may be ommitted.
          * Note that op names are restricted to a small number of characters which
    @@ -4127,7 +4123,6 @@ public long getNameToTraceIdOrDefault(
          * map<string, fixed64> name_to_trace_id = 5;
          */
         @java.lang.Override
    -
         public long getNameToTraceIdOrThrow(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    @@ -4138,8 +4133,8 @@ public long getNameToTraceIdOrThrow(
           }
           return map.get(key);
         }
    -
         public Builder clearNameToTraceId() {
    +      bitField0_ = (bitField0_ & ~0x00000010);
           internalGetMutableNameToTraceId().getMutableMap()
               .clear();
           return this;
    @@ -4147,9 +4142,10 @@ public Builder clearNameToTraceId() {
         /**
          * 
          * This maps a node name to a trace id contained in `traces_by_id`.
    +     *
          * The map key is a mangling of the containing function and op name with
          * syntax:
    -     *   op.name '@' func_name
    +     * op.name '@' func_name
          * For ops in the top-level graph, the func_name is the empty string and hence
          * the `@` may be ommitted.
          * Note that op names are restricted to a small number of characters which
    @@ -4161,7 +4157,6 @@ public Builder clearNameToTraceId() {
          *
          * map<string, fixed64> name_to_trace_id = 5;
          */
    -
         public Builder removeNameToTraceId(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    @@ -4174,15 +4169,17 @@ public Builder removeNameToTraceId(
          */
         @java.lang.Deprecated
         public java.util.Map
    -    getMutableNameToTraceId() {
    +        getMutableNameToTraceId() {
    +      bitField0_ |= 0x00000010;
           return internalGetMutableNameToTraceId().getMutableMap();
         }
         /**
          * 
          * This maps a node name to a trace id contained in `traces_by_id`.
    +     *
          * The map key is a mangling of the containing function and op name with
          * syntax:
    -     *   op.name '@' func_name
    +     * op.name '@' func_name
          * For ops in the top-level graph, the func_name is the empty string and hence
          * the `@` may be ommitted.
          * Note that op names are restricted to a small number of characters which
    @@ -4198,17 +4195,19 @@ public Builder putNameToTraceId(
             java.lang.String key,
             long value) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      
    +
           internalGetMutableNameToTraceId().getMutableMap()
               .put(key, value);
    +      bitField0_ |= 0x00000010;
           return this;
         }
         /**
          * 
          * This maps a node name to a trace id contained in `traces_by_id`.
    +     *
          * The map key is a mangling of the containing function and op name with
          * syntax:
    -     *   op.name '@' func_name
    +     * op.name '@' func_name
          * For ops in the top-level graph, the func_name is the empty string and hence
          * the `@` may be ommitted.
          * Note that op names are restricted to a small number of characters which
    @@ -4220,25 +4219,13 @@ public Builder putNameToTraceId(
          *
          * map<string, fixed64> name_to_trace_id = 5;
          */
    -
         public Builder putAllNameToTraceId(
             java.util.Map values) {
           internalGetMutableNameToTraceId().getMutableMap()
               .putAll(values);
    +      bitField0_ |= 0x00000010;
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.GraphDebugInfo)
       }
    @@ -4253,7 +4240,7 @@ public static org.tensorflow.proto.GraphDebugInfo getDefaultInstance() {
         return DEFAULT_INSTANCE;
       }
     
    -  @java.lang.Deprecated public static final com.google.protobuf.Parser
    +  private static final com.google.protobuf.Parser
           PARSER = new com.google.protobuf.AbstractParser() {
         @java.lang.Override
         public GraphDebugInfo parsePartialFrom(
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDebugInfoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDebugInfoOrBuilder.java
    index cebdb4772c0..1219fa49740 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDebugInfoOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDebugInfoOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/graph_debug_info.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -95,7 +97,6 @@ boolean containsFramesById(
        *
        * map<fixed64, .tensorflow.GraphDebugInfo.FileLineCol> frames_by_id = 4;
        */
    -
       /* nullable */
     org.tensorflow.proto.GraphDebugInfo.FileLineCol getFramesByIdOrDefault(
           long key,
    @@ -109,7 +110,6 @@ org.tensorflow.proto.GraphDebugInfo.FileLineCol getFramesByIdOrDefault(
        *
        * map<fixed64, .tensorflow.GraphDebugInfo.FileLineCol> frames_by_id = 4;
        */
    -
       org.tensorflow.proto.GraphDebugInfo.FileLineCol getFramesByIdOrThrow(
           long key);
     
    @@ -136,7 +136,6 @@ boolean containsTracesById(
       /**
        * map<fixed64, .tensorflow.GraphDebugInfo.StackTrace> traces_by_id = 6;
        */
    -
       /* nullable */
     org.tensorflow.proto.GraphDebugInfo.StackTrace getTracesByIdOrDefault(
           long key,
    @@ -145,7 +144,6 @@ org.tensorflow.proto.GraphDebugInfo.StackTrace getTracesByIdOrDefault(
       /**
        * map<fixed64, .tensorflow.GraphDebugInfo.StackTrace> traces_by_id = 6;
        */
    -
       org.tensorflow.proto.GraphDebugInfo.StackTrace getTracesByIdOrThrow(
           long key);
     
    @@ -188,7 +186,6 @@ boolean containsTraces(
        *
        * map<string, .tensorflow.GraphDebugInfo.StackTrace> traces = 2;
        */
    -
       /* nullable */
     org.tensorflow.proto.GraphDebugInfo.StackTrace getTracesOrDefault(
           java.lang.String key,
    @@ -201,16 +198,16 @@ org.tensorflow.proto.GraphDebugInfo.StackTrace getTracesOrDefault(
        *
        * map<string, .tensorflow.GraphDebugInfo.StackTrace> traces = 2;
        */
    -
       org.tensorflow.proto.GraphDebugInfo.StackTrace getTracesOrThrow(
           java.lang.String key);
     
       /**
        * 
        * This maps a node name to a trace id contained in `traces_by_id`.
    +   *
        * The map key is a mangling of the containing function and op name with
        * syntax:
    -   *   op.name '@' func_name
    +   * op.name '@' func_name
        * For ops in the top-level graph, the func_name is the empty string and hence
        * the `@` may be ommitted.
        * Note that op names are restricted to a small number of characters which
    @@ -226,9 +223,10 @@ org.tensorflow.proto.GraphDebugInfo.StackTrace getTracesOrThrow(
       /**
        * 
        * This maps a node name to a trace id contained in `traces_by_id`.
    +   *
        * The map key is a mangling of the containing function and op name with
        * syntax:
    -   *   op.name '@' func_name
    +   * op.name '@' func_name
        * For ops in the top-level graph, the func_name is the empty string and hence
        * the `@` may be ommitted.
        * Note that op names are restricted to a small number of characters which
    @@ -251,9 +249,10 @@ boolean containsNameToTraceId(
       /**
        * 
        * This maps a node name to a trace id contained in `traces_by_id`.
    +   *
        * The map key is a mangling of the containing function and op name with
        * syntax:
    -   *   op.name '@' func_name
    +   * op.name '@' func_name
        * For ops in the top-level graph, the func_name is the empty string and hence
        * the `@` may be ommitted.
        * Note that op names are restricted to a small number of characters which
    @@ -270,9 +269,10 @@ boolean containsNameToTraceId(
       /**
        * 
        * This maps a node name to a trace id contained in `traces_by_id`.
    +   *
        * The map key is a mangling of the containing function and op name with
        * syntax:
    -   *   op.name '@' func_name
    +   * op.name '@' func_name
        * For ops in the top-level graph, the func_name is the empty string and hence
        * the `@` may be ommitted.
        * Note that op names are restricted to a small number of characters which
    @@ -284,16 +284,16 @@ boolean containsNameToTraceId(
        *
        * map<string, fixed64> name_to_trace_id = 5;
        */
    -
       long getNameToTraceIdOrDefault(
           java.lang.String key,
           long defaultValue);
       /**
        * 
        * This maps a node name to a trace id contained in `traces_by_id`.
    +   *
        * The map key is a mangling of the containing function and op name with
        * syntax:
    -   *   op.name '@' func_name
    +   * op.name '@' func_name
        * For ops in the top-level graph, the func_name is the empty string and hence
        * the `@` may be ommitted.
        * Note that op names are restricted to a small number of characters which
    @@ -305,7 +305,6 @@ long getNameToTraceIdOrDefault(
        *
        * map<string, fixed64> name_to_trace_id = 5;
        */
    -
       long getNameToTraceIdOrThrow(
           java.lang.String key);
     }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDebugInfoProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDebugInfoProtos.java
    index ea8e2709a0f..65504f7b57b 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDebugInfoProtos.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDebugInfoProtos.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/graph_debug_info.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class GraphDebugInfoProtos {
       private GraphDebugInfoProtos() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      GraphDebugInfoProtos.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,37 +28,37 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_GraphDebugInfo_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_GraphDebugInfo_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_GraphDebugInfo_FileLineCol_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_GraphDebugInfo_FileLineCol_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_GraphDebugInfo_StackTrace_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_GraphDebugInfo_StackTrace_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_GraphDebugInfo_FramesByIdEntry_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_GraphDebugInfo_FramesByIdEntry_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_GraphDebugInfo_TracesByIdEntry_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_GraphDebugInfo_TracesByIdEntry_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_GraphDebugInfo_TracesEntry_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_GraphDebugInfo_TracesEntry_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_GraphDebugInfo_NameToTraceIdEntry_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_GraphDebugInfo_NameToTraceIdEntry_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -92,45 +103,46 @@ public static void registerAllExtensions(
         internal_static_tensorflow_GraphDebugInfo_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_GraphDebugInfo_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_GraphDebugInfo_descriptor,
             new java.lang.String[] { "Files", "FramesById", "TracesById", "Traces", "NameToTraceId", });
         internal_static_tensorflow_GraphDebugInfo_FileLineCol_descriptor =
           internal_static_tensorflow_GraphDebugInfo_descriptor.getNestedTypes().get(0);
         internal_static_tensorflow_GraphDebugInfo_FileLineCol_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_GraphDebugInfo_FileLineCol_descriptor,
             new java.lang.String[] { "FileIndex", "Line", "Col", "Func", "Code", });
         internal_static_tensorflow_GraphDebugInfo_StackTrace_descriptor =
           internal_static_tensorflow_GraphDebugInfo_descriptor.getNestedTypes().get(1);
         internal_static_tensorflow_GraphDebugInfo_StackTrace_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_GraphDebugInfo_StackTrace_descriptor,
             new java.lang.String[] { "FileLineCols", "FrameId", });
         internal_static_tensorflow_GraphDebugInfo_FramesByIdEntry_descriptor =
           internal_static_tensorflow_GraphDebugInfo_descriptor.getNestedTypes().get(2);
         internal_static_tensorflow_GraphDebugInfo_FramesByIdEntry_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_GraphDebugInfo_FramesByIdEntry_descriptor,
             new java.lang.String[] { "Key", "Value", });
         internal_static_tensorflow_GraphDebugInfo_TracesByIdEntry_descriptor =
           internal_static_tensorflow_GraphDebugInfo_descriptor.getNestedTypes().get(3);
         internal_static_tensorflow_GraphDebugInfo_TracesByIdEntry_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_GraphDebugInfo_TracesByIdEntry_descriptor,
             new java.lang.String[] { "Key", "Value", });
         internal_static_tensorflow_GraphDebugInfo_TracesEntry_descriptor =
           internal_static_tensorflow_GraphDebugInfo_descriptor.getNestedTypes().get(4);
         internal_static_tensorflow_GraphDebugInfo_TracesEntry_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_GraphDebugInfo_TracesEntry_descriptor,
             new java.lang.String[] { "Key", "Value", });
         internal_static_tensorflow_GraphDebugInfo_NameToTraceIdEntry_descriptor =
           internal_static_tensorflow_GraphDebugInfo_descriptor.getNestedTypes().get(5);
         internal_static_tensorflow_GraphDebugInfo_NameToTraceIdEntry_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_GraphDebugInfo_NameToTraceIdEntry_descriptor,
             new java.lang.String[] { "Key", "Value", });
    +    descriptor.resolveAllFeaturesImmutable();
       }
     
       // @@protoc_insertion_point(outer_class_scope)
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDef.java
    index aa542fe4a5e..412913cf499 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDef.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDef.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/graph.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,44 +13,43 @@
      * Protobuf type {@code tensorflow.GraphDef}
      */
     public final class GraphDef extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.GraphDef)
         GraphDefOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      GraphDef.class.getName());
    +  }
       // Use GraphDef.newBuilder() to construct.
    -  private GraphDef(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private GraphDef(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private GraphDef() {
         node_ = java.util.Collections.emptyList();
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new GraphDef();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.GraphProtos.internal_static_tensorflow_GraphDef_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.GraphProtos.internal_static_tensorflow_GraphDef_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
                 org.tensorflow.proto.GraphDef.class, org.tensorflow.proto.GraphDef.Builder.class);
       }
     
    +  private int bitField0_;
       public static final int NODE_FIELD_NUMBER = 1;
    +  @SuppressWarnings("serial")
       private java.util.List node_;
       /**
        * repeated .tensorflow.NodeDef node = 1;
    @@ -102,7 +103,7 @@ public org.tensorflow.proto.NodeDefOrBuilder getNodeOrBuilder(
        */
       @java.lang.Override
       public boolean hasVersions() {
    -    return versions_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * 
    @@ -129,11 +130,11 @@ public org.tensorflow.proto.VersionDef getVersions() {
        */
       @java.lang.Override
       public org.tensorflow.proto.VersionDefOrBuilder getVersionsOrBuilder() {
    -    return getVersions();
    +    return versions_ == null ? org.tensorflow.proto.VersionDef.getDefaultInstance() : versions_;
       }
     
       public static final int VERSION_FIELD_NUMBER = 3;
    -  private int version_;
    +  private int version_ = 0;
       /**
        * 
        * Deprecated single version field; use versions above instead.  Since all
    @@ -156,26 +157,31 @@ public org.tensorflow.proto.VersionDefOrBuilder getVersionsOrBuilder() {
       /**
        * 
        * "library" provides user-defined functions.
    +   *
        * Naming:
    -   *   * library.function.name are in a flat namespace.
    -   *     NOTE: We may need to change it to be hierarchical to support
    -   *     different orgs. E.g.,
    -   *     { "/google/nn", { ... }},
    -   *     { "/google/vision", { ... }}
    -   *     { "/org_foo/module_bar", { ... }}
    -   *     map<string, FunctionDefLib> named_lib;
    -   *   * If node[i].op is the name of one function in "library",
    -   *     node[i] is deemed as a function call. Otherwise, node[i].op
    -   *     must be a primitive operation supported by the runtime.
    +   * * library.function.name are in a flat namespace.
    +   * NOTE: We may need to change it to be hierarchical to support
    +   * different orgs. E.g.,
    +   * { "/google/nn", { ... }},
    +   * { "/google/vision", { ... }}
    +   * { "/org_foo/module_bar", { ... }}
    +   * map<string, FunctionDefLib> named_lib;
    +   * * If node[i].op is the name of one function in "library",
    +   * node[i] is deemed as a function call. Otherwise, node[i].op
    +   * must be a primitive operation supported by the runtime.
    +   *
    +   *
        * Function call semantics:
    -   *   * The callee may start execution as soon as some of its inputs
    -   *     are ready. The caller may want to use Tuple() mechanism to
    -   *     ensure all inputs are ready in the same time.
    -   *   * The consumer of return values may start executing as soon as
    -   *     the return values the consumer depends on are ready.  The
    -   *     consumer may want to use Tuple() mechanism to ensure the
    -   *     consumer does not start until all return values of the callee
    -   *     function are ready.
    +   *
    +   * * The callee may start execution as soon as some of its inputs
    +   * are ready. The caller may want to use Tuple() mechanism to
    +   * ensure all inputs are ready in the same time.
    +   *
    +   * * The consumer of return values may start executing as soon as
    +   * the return values the consumer depends on are ready.  The
    +   * consumer may want to use Tuple() mechanism to ensure the
    +   * consumer does not start until all return values of the callee
    +   * function are ready.
        * 
    * * .tensorflow.FunctionDefLibrary library = 2; @@ -183,31 +189,36 @@ public org.tensorflow.proto.VersionDefOrBuilder getVersionsOrBuilder() { */ @java.lang.Override public boolean hasLibrary() { - return library_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** *
        * "library" provides user-defined functions.
    +   *
        * Naming:
    -   *   * library.function.name are in a flat namespace.
    -   *     NOTE: We may need to change it to be hierarchical to support
    -   *     different orgs. E.g.,
    -   *     { "/google/nn", { ... }},
    -   *     { "/google/vision", { ... }}
    -   *     { "/org_foo/module_bar", { ... }}
    -   *     map<string, FunctionDefLib> named_lib;
    -   *   * If node[i].op is the name of one function in "library",
    -   *     node[i] is deemed as a function call. Otherwise, node[i].op
    -   *     must be a primitive operation supported by the runtime.
    +   * * library.function.name are in a flat namespace.
    +   * NOTE: We may need to change it to be hierarchical to support
    +   * different orgs. E.g.,
    +   * { "/google/nn", { ... }},
    +   * { "/google/vision", { ... }}
    +   * { "/org_foo/module_bar", { ... }}
    +   * map<string, FunctionDefLib> named_lib;
    +   * * If node[i].op is the name of one function in "library",
    +   * node[i] is deemed as a function call. Otherwise, node[i].op
    +   * must be a primitive operation supported by the runtime.
    +   *
    +   *
        * Function call semantics:
    -   *   * The callee may start execution as soon as some of its inputs
    -   *     are ready. The caller may want to use Tuple() mechanism to
    -   *     ensure all inputs are ready in the same time.
    -   *   * The consumer of return values may start executing as soon as
    -   *     the return values the consumer depends on are ready.  The
    -   *     consumer may want to use Tuple() mechanism to ensure the
    -   *     consumer does not start until all return values of the callee
    -   *     function are ready.
    +   *
    +   * * The callee may start execution as soon as some of its inputs
    +   * are ready. The caller may want to use Tuple() mechanism to
    +   * ensure all inputs are ready in the same time.
    +   *
    +   * * The consumer of return values may start executing as soon as
    +   * the return values the consumer depends on are ready.  The
    +   * consumer may want to use Tuple() mechanism to ensure the
    +   * consumer does not start until all return values of the callee
    +   * function are ready.
        * 
    * * .tensorflow.FunctionDefLibrary library = 2; @@ -220,33 +231,38 @@ public org.tensorflow.proto.FunctionDefLibrary getLibrary() { /** *
        * "library" provides user-defined functions.
    +   *
        * Naming:
    -   *   * library.function.name are in a flat namespace.
    -   *     NOTE: We may need to change it to be hierarchical to support
    -   *     different orgs. E.g.,
    -   *     { "/google/nn", { ... }},
    -   *     { "/google/vision", { ... }}
    -   *     { "/org_foo/module_bar", { ... }}
    -   *     map<string, FunctionDefLib> named_lib;
    -   *   * If node[i].op is the name of one function in "library",
    -   *     node[i] is deemed as a function call. Otherwise, node[i].op
    -   *     must be a primitive operation supported by the runtime.
    +   * * library.function.name are in a flat namespace.
    +   * NOTE: We may need to change it to be hierarchical to support
    +   * different orgs. E.g.,
    +   * { "/google/nn", { ... }},
    +   * { "/google/vision", { ... }}
    +   * { "/org_foo/module_bar", { ... }}
    +   * map<string, FunctionDefLib> named_lib;
    +   * * If node[i].op is the name of one function in "library",
    +   * node[i] is deemed as a function call. Otherwise, node[i].op
    +   * must be a primitive operation supported by the runtime.
    +   *
    +   *
        * Function call semantics:
    -   *   * The callee may start execution as soon as some of its inputs
    -   *     are ready. The caller may want to use Tuple() mechanism to
    -   *     ensure all inputs are ready in the same time.
    -   *   * The consumer of return values may start executing as soon as
    -   *     the return values the consumer depends on are ready.  The
    -   *     consumer may want to use Tuple() mechanism to ensure the
    -   *     consumer does not start until all return values of the callee
    -   *     function are ready.
    +   *
    +   * * The callee may start execution as soon as some of its inputs
    +   * are ready. The caller may want to use Tuple() mechanism to
    +   * ensure all inputs are ready in the same time.
    +   *
    +   * * The consumer of return values may start executing as soon as
    +   * the return values the consumer depends on are ready.  The
    +   * consumer may want to use Tuple() mechanism to ensure the
    +   * consumer does not start until all return values of the callee
    +   * function are ready.
        * 
    * * .tensorflow.FunctionDefLibrary library = 2; */ @java.lang.Override public org.tensorflow.proto.FunctionDefLibraryOrBuilder getLibraryOrBuilder() { - return getLibrary(); + return library_ == null ? org.tensorflow.proto.FunctionDefLibrary.getDefaultInstance() : library_; } public static final int DEBUG_INFO_FIELD_NUMBER = 5; @@ -261,7 +277,7 @@ public org.tensorflow.proto.FunctionDefLibraryOrBuilder getLibraryOrBuilder() { */ @java.lang.Override public boolean hasDebugInfo() { - return debugInfo_ != null; + return ((bitField0_ & 0x00000004) != 0); } /** *
    @@ -284,7 +300,7 @@ public org.tensorflow.proto.GraphDebugInfo getDebugInfo() {
        */
       @java.lang.Override
       public org.tensorflow.proto.GraphDebugInfoOrBuilder getDebugInfoOrBuilder() {
    -    return getDebugInfo();
    +    return debugInfo_ == null ? org.tensorflow.proto.GraphDebugInfo.getDefaultInstance() : debugInfo_;
       }
     
       private byte memoizedIsInitialized = -1;
    @@ -304,16 +320,16 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         for (int i = 0; i < node_.size(); i++) {
           output.writeMessage(1, node_.get(i));
         }
    -    if (library_ != null) {
    +    if (((bitField0_ & 0x00000002) != 0)) {
           output.writeMessage(2, getLibrary());
         }
         if (version_ != 0) {
           output.writeInt32(3, version_);
         }
    -    if (versions_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(4, getVersions());
         }
    -    if (debugInfo_ != null) {
    +    if (((bitField0_ & 0x00000004) != 0)) {
           output.writeMessage(5, getDebugInfo());
         }
         getUnknownFields().writeTo(output);
    @@ -329,7 +345,7 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(1, node_.get(i));
         }
    -    if (library_ != null) {
    +    if (((bitField0_ & 0x00000002) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(2, getLibrary());
         }
    @@ -337,11 +353,11 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeInt32Size(3, version_);
         }
    -    if (versions_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(4, getVersions());
         }
    -    if (debugInfo_ != null) {
    +    if (((bitField0_ & 0x00000004) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(5, getDebugInfo());
         }
    @@ -447,39 +463,41 @@ public static org.tensorflow.proto.GraphDef parseFrom(
       }
       public static org.tensorflow.proto.GraphDef parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.GraphDef parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.GraphDef parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.GraphDef parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.GraphDef parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.GraphDef parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -499,7 +517,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -511,7 +529,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.GraphDef}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.GraphDef)
           org.tensorflow.proto.GraphDefOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -520,7 +538,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.GraphProtos.internal_static_tensorflow_GraphDef_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -529,17 +547,27 @@ public static final class Builder extends
     
         // Construct using org.tensorflow.proto.GraphDef.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getNodeFieldBuilder();
    +        getVersionsFieldBuilder();
    +        getLibraryFieldBuilder();
    +        getDebugInfoFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           if (nodeBuilder_ == null) {
             node_ = java.util.Collections.emptyList();
           } else {
    @@ -547,24 +575,20 @@ public Builder clear() {
             nodeBuilder_.clear();
           }
           bitField0_ = (bitField0_ & ~0x00000001);
    -      if (versionsBuilder_ == null) {
    -        versions_ = null;
    -      } else {
    -        versions_ = null;
    +      versions_ = null;
    +      if (versionsBuilder_ != null) {
    +        versionsBuilder_.dispose();
             versionsBuilder_ = null;
           }
           version_ = 0;
    -
    -      if (libraryBuilder_ == null) {
    -        library_ = null;
    -      } else {
    -        library_ = null;
    +      library_ = null;
    +      if (libraryBuilder_ != null) {
    +        libraryBuilder_.dispose();
             libraryBuilder_ = null;
           }
    -      if (debugInfoBuilder_ == null) {
    -        debugInfo_ = null;
    -      } else {
    -        debugInfo_ = null;
    +      debugInfo_ = null;
    +      if (debugInfoBuilder_ != null) {
    +        debugInfoBuilder_.dispose();
             debugInfoBuilder_ = null;
           }
           return this;
    @@ -593,7 +617,13 @@ public org.tensorflow.proto.GraphDef build() {
         @java.lang.Override
         public org.tensorflow.proto.GraphDef buildPartial() {
           org.tensorflow.proto.GraphDef result = new org.tensorflow.proto.GraphDef(this);
    -      int from_bitField0_ = bitField0_;
    +      buildPartialRepeatedFields(result);
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartialRepeatedFields(org.tensorflow.proto.GraphDef result) {
           if (nodeBuilder_ == null) {
             if (((bitField0_ & 0x00000001) != 0)) {
               node_ = java.util.Collections.unmodifiableList(node_);
    @@ -603,58 +633,35 @@ public org.tensorflow.proto.GraphDef buildPartial() {
           } else {
             result.node_ = nodeBuilder_.build();
           }
    -      if (versionsBuilder_ == null) {
    -        result.versions_ = versions_;
    -      } else {
    -        result.versions_ = versionsBuilder_.build();
    +    }
    +
    +    private void buildPartial0(org.tensorflow.proto.GraphDef result) {
    +      int from_bitField0_ = bitField0_;
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.versions_ = versionsBuilder_ == null
    +            ? versions_
    +            : versionsBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
           }
    -      result.version_ = version_;
    -      if (libraryBuilder_ == null) {
    -        result.library_ = library_;
    -      } else {
    -        result.library_ = libraryBuilder_.build();
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.version_ = version_;
           }
    -      if (debugInfoBuilder_ == null) {
    -        result.debugInfo_ = debugInfo_;
    -      } else {
    -        result.debugInfo_ = debugInfoBuilder_.build();
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.library_ = libraryBuilder_ == null
    +            ? library_
    +            : libraryBuilder_.build();
    +        to_bitField0_ |= 0x00000002;
           }
    -      onBuilt();
    -      return result;
    +      if (((from_bitField0_ & 0x00000010) != 0)) {
    +        result.debugInfo_ = debugInfoBuilder_ == null
    +            ? debugInfo_
    +            : debugInfoBuilder_.build();
    +        to_bitField0_ |= 0x00000004;
    +      }
    +      result.bitField0_ |= to_bitField0_;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    -    }
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.GraphDef) {
    @@ -686,7 +693,7 @@ public Builder mergeFrom(org.tensorflow.proto.GraphDef other) {
                 node_ = other.node_;
                 bitField0_ = (bitField0_ & ~0x00000001);
                 nodeBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getNodeFieldBuilder() : null;
               } else {
                 nodeBuilder_.addAllMessages(other.node_);
    @@ -748,26 +755,26 @@ public Builder mergeFrom(
                   input.readMessage(
                       getLibraryFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 18
                 case 24: {
                   version_ = input.readInt32();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 24
                 case 34: {
                   input.readMessage(
                       getVersionsFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 34
                 case 42: {
                   input.readMessage(
                       getDebugInfoFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000010;
                   break;
                 } // case 42
                 default: {
    @@ -796,7 +803,7 @@ private void ensureNodeIsMutable() {
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.NodeDef, org.tensorflow.proto.NodeDef.Builder, org.tensorflow.proto.NodeDefOrBuilder> nodeBuilder_;
     
         /**
    @@ -1012,11 +1019,11 @@ public org.tensorflow.proto.NodeDef.Builder addNodeBuilder(
              getNodeBuilderList() {
           return getNodeFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.NodeDef, org.tensorflow.proto.NodeDef.Builder, org.tensorflow.proto.NodeDefOrBuilder> 
             getNodeFieldBuilder() {
           if (nodeBuilder_ == null) {
    -        nodeBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        nodeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.NodeDef, org.tensorflow.proto.NodeDef.Builder, org.tensorflow.proto.NodeDefOrBuilder>(
                     node_,
                     ((bitField0_ & 0x00000001) != 0),
    @@ -1028,7 +1035,7 @@ public org.tensorflow.proto.NodeDef.Builder addNodeBuilder(
         }
     
         private org.tensorflow.proto.VersionDef versions_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.VersionDef, org.tensorflow.proto.VersionDef.Builder, org.tensorflow.proto.VersionDefOrBuilder> versionsBuilder_;
         /**
          * 
    @@ -1041,7 +1048,7 @@ public org.tensorflow.proto.NodeDef.Builder addNodeBuilder(
          * @return Whether the versions field is set.
          */
         public boolean hasVersions() {
    -      return versionsBuilder_ != null || versions_ != null;
    +      return ((bitField0_ & 0x00000002) != 0);
         }
         /**
          * 
    @@ -1075,11 +1082,11 @@ public Builder setVersions(org.tensorflow.proto.VersionDef value) {
               throw new NullPointerException();
             }
             versions_ = value;
    -        onChanged();
           } else {
             versionsBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return this;
         }
         /**
    @@ -1095,11 +1102,11 @@ public Builder setVersions(
             org.tensorflow.proto.VersionDef.Builder builderForValue) {
           if (versionsBuilder_ == null) {
             versions_ = builderForValue.build();
    -        onChanged();
           } else {
             versionsBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return this;
         }
         /**
    @@ -1113,17 +1120,20 @@ public Builder setVersions(
          */
         public Builder mergeVersions(org.tensorflow.proto.VersionDef value) {
           if (versionsBuilder_ == null) {
    -        if (versions_ != null) {
    -          versions_ =
    -            org.tensorflow.proto.VersionDef.newBuilder(versions_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000002) != 0) &&
    +          versions_ != null &&
    +          versions_ != org.tensorflow.proto.VersionDef.getDefaultInstance()) {
    +          getVersionsBuilder().mergeFrom(value);
             } else {
               versions_ = value;
             }
    -        onChanged();
           } else {
             versionsBuilder_.mergeFrom(value);
           }
    -
    +      if (versions_ != null) {
    +        bitField0_ |= 0x00000002;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -1136,14 +1146,13 @@ public Builder mergeVersions(org.tensorflow.proto.VersionDef value) {
          * .tensorflow.VersionDef versions = 4;
          */
         public Builder clearVersions() {
    -      if (versionsBuilder_ == null) {
    -        versions_ = null;
    -        onChanged();
    -      } else {
    -        versions_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000002);
    +      versions_ = null;
    +      if (versionsBuilder_ != null) {
    +        versionsBuilder_.dispose();
             versionsBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -1156,7 +1165,7 @@ public Builder clearVersions() {
          * .tensorflow.VersionDef versions = 4;
          */
         public org.tensorflow.proto.VersionDef.Builder getVersionsBuilder() {
    -      
    +      bitField0_ |= 0x00000002;
           onChanged();
           return getVersionsFieldBuilder().getBuilder();
         }
    @@ -1186,11 +1195,11 @@ public org.tensorflow.proto.VersionDefOrBuilder getVersionsOrBuilder() {
          *
          * .tensorflow.VersionDef versions = 4;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.VersionDef, org.tensorflow.proto.VersionDef.Builder, org.tensorflow.proto.VersionDefOrBuilder> 
             getVersionsFieldBuilder() {
           if (versionsBuilder_ == null) {
    -        versionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        versionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.VersionDef, org.tensorflow.proto.VersionDef.Builder, org.tensorflow.proto.VersionDefOrBuilder>(
                     getVersions(),
                     getParentForChildren(),
    @@ -1231,8 +1240,9 @@ public org.tensorflow.proto.VersionDefOrBuilder getVersionsOrBuilder() {
          * @return This builder for chaining.
          */
         @java.lang.Deprecated public Builder setVersion(int value) {
    -      
    +
           version_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -1249,69 +1259,79 @@ public org.tensorflow.proto.VersionDefOrBuilder getVersionsOrBuilder() {
          * @return This builder for chaining.
          */
         @java.lang.Deprecated public Builder clearVersion() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000004);
           version_ = 0;
           onChanged();
           return this;
         }
     
         private org.tensorflow.proto.FunctionDefLibrary library_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.FunctionDefLibrary, org.tensorflow.proto.FunctionDefLibrary.Builder, org.tensorflow.proto.FunctionDefLibraryOrBuilder> libraryBuilder_;
         /**
          * 
          * "library" provides user-defined functions.
    +     *
          * Naming:
    -     *   * library.function.name are in a flat namespace.
    -     *     NOTE: We may need to change it to be hierarchical to support
    -     *     different orgs. E.g.,
    -     *     { "/google/nn", { ... }},
    -     *     { "/google/vision", { ... }}
    -     *     { "/org_foo/module_bar", { ... }}
    -     *     map<string, FunctionDefLib> named_lib;
    -     *   * If node[i].op is the name of one function in "library",
    -     *     node[i] is deemed as a function call. Otherwise, node[i].op
    -     *     must be a primitive operation supported by the runtime.
    +     * * library.function.name are in a flat namespace.
    +     * NOTE: We may need to change it to be hierarchical to support
    +     * different orgs. E.g.,
    +     * { "/google/nn", { ... }},
    +     * { "/google/vision", { ... }}
    +     * { "/org_foo/module_bar", { ... }}
    +     * map<string, FunctionDefLib> named_lib;
    +     * * If node[i].op is the name of one function in "library",
    +     * node[i] is deemed as a function call. Otherwise, node[i].op
    +     * must be a primitive operation supported by the runtime.
    +     *
    +     *
          * Function call semantics:
    -     *   * The callee may start execution as soon as some of its inputs
    -     *     are ready. The caller may want to use Tuple() mechanism to
    -     *     ensure all inputs are ready in the same time.
    -     *   * The consumer of return values may start executing as soon as
    -     *     the return values the consumer depends on are ready.  The
    -     *     consumer may want to use Tuple() mechanism to ensure the
    -     *     consumer does not start until all return values of the callee
    -     *     function are ready.
    +     *
    +     * * The callee may start execution as soon as some of its inputs
    +     * are ready. The caller may want to use Tuple() mechanism to
    +     * ensure all inputs are ready in the same time.
    +     *
    +     * * The consumer of return values may start executing as soon as
    +     * the return values the consumer depends on are ready.  The
    +     * consumer may want to use Tuple() mechanism to ensure the
    +     * consumer does not start until all return values of the callee
    +     * function are ready.
          * 
    * * .tensorflow.FunctionDefLibrary library = 2; * @return Whether the library field is set. */ public boolean hasLibrary() { - return libraryBuilder_ != null || library_ != null; + return ((bitField0_ & 0x00000008) != 0); } /** *
          * "library" provides user-defined functions.
    +     *
          * Naming:
    -     *   * library.function.name are in a flat namespace.
    -     *     NOTE: We may need to change it to be hierarchical to support
    -     *     different orgs. E.g.,
    -     *     { "/google/nn", { ... }},
    -     *     { "/google/vision", { ... }}
    -     *     { "/org_foo/module_bar", { ... }}
    -     *     map<string, FunctionDefLib> named_lib;
    -     *   * If node[i].op is the name of one function in "library",
    -     *     node[i] is deemed as a function call. Otherwise, node[i].op
    -     *     must be a primitive operation supported by the runtime.
    +     * * library.function.name are in a flat namespace.
    +     * NOTE: We may need to change it to be hierarchical to support
    +     * different orgs. E.g.,
    +     * { "/google/nn", { ... }},
    +     * { "/google/vision", { ... }}
    +     * { "/org_foo/module_bar", { ... }}
    +     * map<string, FunctionDefLib> named_lib;
    +     * * If node[i].op is the name of one function in "library",
    +     * node[i] is deemed as a function call. Otherwise, node[i].op
    +     * must be a primitive operation supported by the runtime.
    +     *
    +     *
          * Function call semantics:
    -     *   * The callee may start execution as soon as some of its inputs
    -     *     are ready. The caller may want to use Tuple() mechanism to
    -     *     ensure all inputs are ready in the same time.
    -     *   * The consumer of return values may start executing as soon as
    -     *     the return values the consumer depends on are ready.  The
    -     *     consumer may want to use Tuple() mechanism to ensure the
    -     *     consumer does not start until all return values of the callee
    -     *     function are ready.
    +     *
    +     * * The callee may start execution as soon as some of its inputs
    +     * are ready. The caller may want to use Tuple() mechanism to
    +     * ensure all inputs are ready in the same time.
    +     *
    +     * * The consumer of return values may start executing as soon as
    +     * the return values the consumer depends on are ready.  The
    +     * consumer may want to use Tuple() mechanism to ensure the
    +     * consumer does not start until all return values of the callee
    +     * function are ready.
          * 
    * * .tensorflow.FunctionDefLibrary library = 2; @@ -1327,26 +1347,31 @@ public org.tensorflow.proto.FunctionDefLibrary getLibrary() { /** *
          * "library" provides user-defined functions.
    +     *
          * Naming:
    -     *   * library.function.name are in a flat namespace.
    -     *     NOTE: We may need to change it to be hierarchical to support
    -     *     different orgs. E.g.,
    -     *     { "/google/nn", { ... }},
    -     *     { "/google/vision", { ... }}
    -     *     { "/org_foo/module_bar", { ... }}
    -     *     map<string, FunctionDefLib> named_lib;
    -     *   * If node[i].op is the name of one function in "library",
    -     *     node[i] is deemed as a function call. Otherwise, node[i].op
    -     *     must be a primitive operation supported by the runtime.
    +     * * library.function.name are in a flat namespace.
    +     * NOTE: We may need to change it to be hierarchical to support
    +     * different orgs. E.g.,
    +     * { "/google/nn", { ... }},
    +     * { "/google/vision", { ... }}
    +     * { "/org_foo/module_bar", { ... }}
    +     * map<string, FunctionDefLib> named_lib;
    +     * * If node[i].op is the name of one function in "library",
    +     * node[i] is deemed as a function call. Otherwise, node[i].op
    +     * must be a primitive operation supported by the runtime.
    +     *
    +     *
          * Function call semantics:
    -     *   * The callee may start execution as soon as some of its inputs
    -     *     are ready. The caller may want to use Tuple() mechanism to
    -     *     ensure all inputs are ready in the same time.
    -     *   * The consumer of return values may start executing as soon as
    -     *     the return values the consumer depends on are ready.  The
    -     *     consumer may want to use Tuple() mechanism to ensure the
    -     *     consumer does not start until all return values of the callee
    -     *     function are ready.
    +     *
    +     * * The callee may start execution as soon as some of its inputs
    +     * are ready. The caller may want to use Tuple() mechanism to
    +     * ensure all inputs are ready in the same time.
    +     *
    +     * * The consumer of return values may start executing as soon as
    +     * the return values the consumer depends on are ready.  The
    +     * consumer may want to use Tuple() mechanism to ensure the
    +     * consumer does not start until all return values of the callee
    +     * function are ready.
          * 
    * * .tensorflow.FunctionDefLibrary library = 2; @@ -1357,36 +1382,41 @@ public Builder setLibrary(org.tensorflow.proto.FunctionDefLibrary value) { throw new NullPointerException(); } library_ = value; - onChanged(); } else { libraryBuilder_.setMessage(value); } - + bitField0_ |= 0x00000008; + onChanged(); return this; } /** *
          * "library" provides user-defined functions.
    +     *
          * Naming:
    -     *   * library.function.name are in a flat namespace.
    -     *     NOTE: We may need to change it to be hierarchical to support
    -     *     different orgs. E.g.,
    -     *     { "/google/nn", { ... }},
    -     *     { "/google/vision", { ... }}
    -     *     { "/org_foo/module_bar", { ... }}
    -     *     map<string, FunctionDefLib> named_lib;
    -     *   * If node[i].op is the name of one function in "library",
    -     *     node[i] is deemed as a function call. Otherwise, node[i].op
    -     *     must be a primitive operation supported by the runtime.
    +     * * library.function.name are in a flat namespace.
    +     * NOTE: We may need to change it to be hierarchical to support
    +     * different orgs. E.g.,
    +     * { "/google/nn", { ... }},
    +     * { "/google/vision", { ... }}
    +     * { "/org_foo/module_bar", { ... }}
    +     * map<string, FunctionDefLib> named_lib;
    +     * * If node[i].op is the name of one function in "library",
    +     * node[i] is deemed as a function call. Otherwise, node[i].op
    +     * must be a primitive operation supported by the runtime.
    +     *
    +     *
          * Function call semantics:
    -     *   * The callee may start execution as soon as some of its inputs
    -     *     are ready. The caller may want to use Tuple() mechanism to
    -     *     ensure all inputs are ready in the same time.
    -     *   * The consumer of return values may start executing as soon as
    -     *     the return values the consumer depends on are ready.  The
    -     *     consumer may want to use Tuple() mechanism to ensure the
    -     *     consumer does not start until all return values of the callee
    -     *     function are ready.
    +     *
    +     * * The callee may start execution as soon as some of its inputs
    +     * are ready. The caller may want to use Tuple() mechanism to
    +     * ensure all inputs are ready in the same time.
    +     *
    +     * * The consumer of return values may start executing as soon as
    +     * the return values the consumer depends on are ready.  The
    +     * consumer may want to use Tuple() mechanism to ensure the
    +     * consumer does not start until all return values of the callee
    +     * function are ready.
          * 
    * * .tensorflow.FunctionDefLibrary library = 2; @@ -1395,148 +1425,170 @@ public Builder setLibrary( org.tensorflow.proto.FunctionDefLibrary.Builder builderForValue) { if (libraryBuilder_ == null) { library_ = builderForValue.build(); - onChanged(); } else { libraryBuilder_.setMessage(builderForValue.build()); } - + bitField0_ |= 0x00000008; + onChanged(); return this; } /** *
          * "library" provides user-defined functions.
    +     *
          * Naming:
    -     *   * library.function.name are in a flat namespace.
    -     *     NOTE: We may need to change it to be hierarchical to support
    -     *     different orgs. E.g.,
    -     *     { "/google/nn", { ... }},
    -     *     { "/google/vision", { ... }}
    -     *     { "/org_foo/module_bar", { ... }}
    -     *     map<string, FunctionDefLib> named_lib;
    -     *   * If node[i].op is the name of one function in "library",
    -     *     node[i] is deemed as a function call. Otherwise, node[i].op
    -     *     must be a primitive operation supported by the runtime.
    +     * * library.function.name are in a flat namespace.
    +     * NOTE: We may need to change it to be hierarchical to support
    +     * different orgs. E.g.,
    +     * { "/google/nn", { ... }},
    +     * { "/google/vision", { ... }}
    +     * { "/org_foo/module_bar", { ... }}
    +     * map<string, FunctionDefLib> named_lib;
    +     * * If node[i].op is the name of one function in "library",
    +     * node[i] is deemed as a function call. Otherwise, node[i].op
    +     * must be a primitive operation supported by the runtime.
    +     *
    +     *
          * Function call semantics:
    -     *   * The callee may start execution as soon as some of its inputs
    -     *     are ready. The caller may want to use Tuple() mechanism to
    -     *     ensure all inputs are ready in the same time.
    -     *   * The consumer of return values may start executing as soon as
    -     *     the return values the consumer depends on are ready.  The
    -     *     consumer may want to use Tuple() mechanism to ensure the
    -     *     consumer does not start until all return values of the callee
    -     *     function are ready.
    +     *
    +     * * The callee may start execution as soon as some of its inputs
    +     * are ready. The caller may want to use Tuple() mechanism to
    +     * ensure all inputs are ready in the same time.
    +     *
    +     * * The consumer of return values may start executing as soon as
    +     * the return values the consumer depends on are ready.  The
    +     * consumer may want to use Tuple() mechanism to ensure the
    +     * consumer does not start until all return values of the callee
    +     * function are ready.
          * 
    * * .tensorflow.FunctionDefLibrary library = 2; */ public Builder mergeLibrary(org.tensorflow.proto.FunctionDefLibrary value) { if (libraryBuilder_ == null) { - if (library_ != null) { - library_ = - org.tensorflow.proto.FunctionDefLibrary.newBuilder(library_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000008) != 0) && + library_ != null && + library_ != org.tensorflow.proto.FunctionDefLibrary.getDefaultInstance()) { + getLibraryBuilder().mergeFrom(value); } else { library_ = value; } - onChanged(); } else { libraryBuilder_.mergeFrom(value); } - + if (library_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } return this; } /** *
          * "library" provides user-defined functions.
    +     *
          * Naming:
    -     *   * library.function.name are in a flat namespace.
    -     *     NOTE: We may need to change it to be hierarchical to support
    -     *     different orgs. E.g.,
    -     *     { "/google/nn", { ... }},
    -     *     { "/google/vision", { ... }}
    -     *     { "/org_foo/module_bar", { ... }}
    -     *     map<string, FunctionDefLib> named_lib;
    -     *   * If node[i].op is the name of one function in "library",
    -     *     node[i] is deemed as a function call. Otherwise, node[i].op
    -     *     must be a primitive operation supported by the runtime.
    +     * * library.function.name are in a flat namespace.
    +     * NOTE: We may need to change it to be hierarchical to support
    +     * different orgs. E.g.,
    +     * { "/google/nn", { ... }},
    +     * { "/google/vision", { ... }}
    +     * { "/org_foo/module_bar", { ... }}
    +     * map<string, FunctionDefLib> named_lib;
    +     * * If node[i].op is the name of one function in "library",
    +     * node[i] is deemed as a function call. Otherwise, node[i].op
    +     * must be a primitive operation supported by the runtime.
    +     *
    +     *
          * Function call semantics:
    -     *   * The callee may start execution as soon as some of its inputs
    -     *     are ready. The caller may want to use Tuple() mechanism to
    -     *     ensure all inputs are ready in the same time.
    -     *   * The consumer of return values may start executing as soon as
    -     *     the return values the consumer depends on are ready.  The
    -     *     consumer may want to use Tuple() mechanism to ensure the
    -     *     consumer does not start until all return values of the callee
    -     *     function are ready.
    +     *
    +     * * The callee may start execution as soon as some of its inputs
    +     * are ready. The caller may want to use Tuple() mechanism to
    +     * ensure all inputs are ready in the same time.
    +     *
    +     * * The consumer of return values may start executing as soon as
    +     * the return values the consumer depends on are ready.  The
    +     * consumer may want to use Tuple() mechanism to ensure the
    +     * consumer does not start until all return values of the callee
    +     * function are ready.
          * 
    * * .tensorflow.FunctionDefLibrary library = 2; */ public Builder clearLibrary() { - if (libraryBuilder_ == null) { - library_ = null; - onChanged(); - } else { - library_ = null; + bitField0_ = (bitField0_ & ~0x00000008); + library_ = null; + if (libraryBuilder_ != null) { + libraryBuilder_.dispose(); libraryBuilder_ = null; } - + onChanged(); return this; } /** *
          * "library" provides user-defined functions.
    +     *
          * Naming:
    -     *   * library.function.name are in a flat namespace.
    -     *     NOTE: We may need to change it to be hierarchical to support
    -     *     different orgs. E.g.,
    -     *     { "/google/nn", { ... }},
    -     *     { "/google/vision", { ... }}
    -     *     { "/org_foo/module_bar", { ... }}
    -     *     map<string, FunctionDefLib> named_lib;
    -     *   * If node[i].op is the name of one function in "library",
    -     *     node[i] is deemed as a function call. Otherwise, node[i].op
    -     *     must be a primitive operation supported by the runtime.
    +     * * library.function.name are in a flat namespace.
    +     * NOTE: We may need to change it to be hierarchical to support
    +     * different orgs. E.g.,
    +     * { "/google/nn", { ... }},
    +     * { "/google/vision", { ... }}
    +     * { "/org_foo/module_bar", { ... }}
    +     * map<string, FunctionDefLib> named_lib;
    +     * * If node[i].op is the name of one function in "library",
    +     * node[i] is deemed as a function call. Otherwise, node[i].op
    +     * must be a primitive operation supported by the runtime.
    +     *
    +     *
          * Function call semantics:
    -     *   * The callee may start execution as soon as some of its inputs
    -     *     are ready. The caller may want to use Tuple() mechanism to
    -     *     ensure all inputs are ready in the same time.
    -     *   * The consumer of return values may start executing as soon as
    -     *     the return values the consumer depends on are ready.  The
    -     *     consumer may want to use Tuple() mechanism to ensure the
    -     *     consumer does not start until all return values of the callee
    -     *     function are ready.
    +     *
    +     * * The callee may start execution as soon as some of its inputs
    +     * are ready. The caller may want to use Tuple() mechanism to
    +     * ensure all inputs are ready in the same time.
    +     *
    +     * * The consumer of return values may start executing as soon as
    +     * the return values the consumer depends on are ready.  The
    +     * consumer may want to use Tuple() mechanism to ensure the
    +     * consumer does not start until all return values of the callee
    +     * function are ready.
          * 
    * * .tensorflow.FunctionDefLibrary library = 2; */ public org.tensorflow.proto.FunctionDefLibrary.Builder getLibraryBuilder() { - + bitField0_ |= 0x00000008; onChanged(); return getLibraryFieldBuilder().getBuilder(); } /** *
          * "library" provides user-defined functions.
    +     *
          * Naming:
    -     *   * library.function.name are in a flat namespace.
    -     *     NOTE: We may need to change it to be hierarchical to support
    -     *     different orgs. E.g.,
    -     *     { "/google/nn", { ... }},
    -     *     { "/google/vision", { ... }}
    -     *     { "/org_foo/module_bar", { ... }}
    -     *     map<string, FunctionDefLib> named_lib;
    -     *   * If node[i].op is the name of one function in "library",
    -     *     node[i] is deemed as a function call. Otherwise, node[i].op
    -     *     must be a primitive operation supported by the runtime.
    +     * * library.function.name are in a flat namespace.
    +     * NOTE: We may need to change it to be hierarchical to support
    +     * different orgs. E.g.,
    +     * { "/google/nn", { ... }},
    +     * { "/google/vision", { ... }}
    +     * { "/org_foo/module_bar", { ... }}
    +     * map<string, FunctionDefLib> named_lib;
    +     * * If node[i].op is the name of one function in "library",
    +     * node[i] is deemed as a function call. Otherwise, node[i].op
    +     * must be a primitive operation supported by the runtime.
    +     *
    +     *
          * Function call semantics:
    -     *   * The callee may start execution as soon as some of its inputs
    -     *     are ready. The caller may want to use Tuple() mechanism to
    -     *     ensure all inputs are ready in the same time.
    -     *   * The consumer of return values may start executing as soon as
    -     *     the return values the consumer depends on are ready.  The
    -     *     consumer may want to use Tuple() mechanism to ensure the
    -     *     consumer does not start until all return values of the callee
    -     *     function are ready.
    +     *
    +     * * The callee may start execution as soon as some of its inputs
    +     * are ready. The caller may want to use Tuple() mechanism to
    +     * ensure all inputs are ready in the same time.
    +     *
    +     * * The consumer of return values may start executing as soon as
    +     * the return values the consumer depends on are ready.  The
    +     * consumer may want to use Tuple() mechanism to ensure the
    +     * consumer does not start until all return values of the callee
    +     * function are ready.
          * 
    * * .tensorflow.FunctionDefLibrary library = 2; @@ -1552,35 +1604,40 @@ public org.tensorflow.proto.FunctionDefLibraryOrBuilder getLibraryOrBuilder() { /** *
          * "library" provides user-defined functions.
    +     *
          * Naming:
    -     *   * library.function.name are in a flat namespace.
    -     *     NOTE: We may need to change it to be hierarchical to support
    -     *     different orgs. E.g.,
    -     *     { "/google/nn", { ... }},
    -     *     { "/google/vision", { ... }}
    -     *     { "/org_foo/module_bar", { ... }}
    -     *     map<string, FunctionDefLib> named_lib;
    -     *   * If node[i].op is the name of one function in "library",
    -     *     node[i] is deemed as a function call. Otherwise, node[i].op
    -     *     must be a primitive operation supported by the runtime.
    +     * * library.function.name are in a flat namespace.
    +     * NOTE: We may need to change it to be hierarchical to support
    +     * different orgs. E.g.,
    +     * { "/google/nn", { ... }},
    +     * { "/google/vision", { ... }}
    +     * { "/org_foo/module_bar", { ... }}
    +     * map<string, FunctionDefLib> named_lib;
    +     * * If node[i].op is the name of one function in "library",
    +     * node[i] is deemed as a function call. Otherwise, node[i].op
    +     * must be a primitive operation supported by the runtime.
    +     *
    +     *
          * Function call semantics:
    -     *   * The callee may start execution as soon as some of its inputs
    -     *     are ready. The caller may want to use Tuple() mechanism to
    -     *     ensure all inputs are ready in the same time.
    -     *   * The consumer of return values may start executing as soon as
    -     *     the return values the consumer depends on are ready.  The
    -     *     consumer may want to use Tuple() mechanism to ensure the
    -     *     consumer does not start until all return values of the callee
    -     *     function are ready.
    +     *
    +     * * The callee may start execution as soon as some of its inputs
    +     * are ready. The caller may want to use Tuple() mechanism to
    +     * ensure all inputs are ready in the same time.
    +     *
    +     * * The consumer of return values may start executing as soon as
    +     * the return values the consumer depends on are ready.  The
    +     * consumer may want to use Tuple() mechanism to ensure the
    +     * consumer does not start until all return values of the callee
    +     * function are ready.
          * 
    * * .tensorflow.FunctionDefLibrary library = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.FunctionDefLibrary, org.tensorflow.proto.FunctionDefLibrary.Builder, org.tensorflow.proto.FunctionDefLibraryOrBuilder> getLibraryFieldBuilder() { if (libraryBuilder_ == null) { - libraryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + libraryBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.FunctionDefLibrary, org.tensorflow.proto.FunctionDefLibrary.Builder, org.tensorflow.proto.FunctionDefLibraryOrBuilder>( getLibrary(), getParentForChildren(), @@ -1591,7 +1648,7 @@ public org.tensorflow.proto.FunctionDefLibraryOrBuilder getLibraryOrBuilder() { } private org.tensorflow.proto.GraphDebugInfo debugInfo_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.GraphDebugInfo, org.tensorflow.proto.GraphDebugInfo.Builder, org.tensorflow.proto.GraphDebugInfoOrBuilder> debugInfoBuilder_; /** *
    @@ -1602,7 +1659,7 @@ public org.tensorflow.proto.FunctionDefLibraryOrBuilder getLibraryOrBuilder() {
          * @return Whether the debugInfo field is set.
          */
         public boolean hasDebugInfo() {
    -      return debugInfoBuilder_ != null || debugInfo_ != null;
    +      return ((bitField0_ & 0x00000010) != 0);
         }
         /**
          * 
    @@ -1632,11 +1689,11 @@ public Builder setDebugInfo(org.tensorflow.proto.GraphDebugInfo value) {
               throw new NullPointerException();
             }
             debugInfo_ = value;
    -        onChanged();
           } else {
             debugInfoBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000010;
    +      onChanged();
           return this;
         }
         /**
    @@ -1650,11 +1707,11 @@ public Builder setDebugInfo(
             org.tensorflow.proto.GraphDebugInfo.Builder builderForValue) {
           if (debugInfoBuilder_ == null) {
             debugInfo_ = builderForValue.build();
    -        onChanged();
           } else {
             debugInfoBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000010;
    +      onChanged();
           return this;
         }
         /**
    @@ -1666,17 +1723,20 @@ public Builder setDebugInfo(
          */
         public Builder mergeDebugInfo(org.tensorflow.proto.GraphDebugInfo value) {
           if (debugInfoBuilder_ == null) {
    -        if (debugInfo_ != null) {
    -          debugInfo_ =
    -            org.tensorflow.proto.GraphDebugInfo.newBuilder(debugInfo_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000010) != 0) &&
    +          debugInfo_ != null &&
    +          debugInfo_ != org.tensorflow.proto.GraphDebugInfo.getDefaultInstance()) {
    +          getDebugInfoBuilder().mergeFrom(value);
             } else {
               debugInfo_ = value;
             }
    -        onChanged();
           } else {
             debugInfoBuilder_.mergeFrom(value);
           }
    -
    +      if (debugInfo_ != null) {
    +        bitField0_ |= 0x00000010;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -1687,14 +1747,13 @@ public Builder mergeDebugInfo(org.tensorflow.proto.GraphDebugInfo value) {
          * .tensorflow.GraphDebugInfo debug_info = 5;
          */
         public Builder clearDebugInfo() {
    -      if (debugInfoBuilder_ == null) {
    -        debugInfo_ = null;
    -        onChanged();
    -      } else {
    -        debugInfo_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000010);
    +      debugInfo_ = null;
    +      if (debugInfoBuilder_ != null) {
    +        debugInfoBuilder_.dispose();
             debugInfoBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -1705,7 +1764,7 @@ public Builder clearDebugInfo() {
          * .tensorflow.GraphDebugInfo debug_info = 5;
          */
         public org.tensorflow.proto.GraphDebugInfo.Builder getDebugInfoBuilder() {
    -      
    +      bitField0_ |= 0x00000010;
           onChanged();
           return getDebugInfoFieldBuilder().getBuilder();
         }
    @@ -1731,11 +1790,11 @@ public org.tensorflow.proto.GraphDebugInfoOrBuilder getDebugInfoOrBuilder() {
          *
          * .tensorflow.GraphDebugInfo debug_info = 5;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.GraphDebugInfo, org.tensorflow.proto.GraphDebugInfo.Builder, org.tensorflow.proto.GraphDebugInfoOrBuilder> 
             getDebugInfoFieldBuilder() {
           if (debugInfoBuilder_ == null) {
    -        debugInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        debugInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.GraphDebugInfo, org.tensorflow.proto.GraphDebugInfo.Builder, org.tensorflow.proto.GraphDebugInfoOrBuilder>(
                     getDebugInfo(),
                     getParentForChildren(),
    @@ -1744,18 +1803,6 @@ public org.tensorflow.proto.GraphDebugInfoOrBuilder getDebugInfoOrBuilder() {
           }
           return debugInfoBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.GraphDef)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDefOrBuilder.java
    index fcfda580c22..aae20baf2ed 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDefOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDefOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/graph.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -81,26 +83,31 @@ org.tensorflow.proto.NodeDefOrBuilder getNodeOrBuilder(
       /**
        * 
        * "library" provides user-defined functions.
    +   *
        * Naming:
    -   *   * library.function.name are in a flat namespace.
    -   *     NOTE: We may need to change it to be hierarchical to support
    -   *     different orgs. E.g.,
    -   *     { "/google/nn", { ... }},
    -   *     { "/google/vision", { ... }}
    -   *     { "/org_foo/module_bar", { ... }}
    -   *     map<string, FunctionDefLib> named_lib;
    -   *   * If node[i].op is the name of one function in "library",
    -   *     node[i] is deemed as a function call. Otherwise, node[i].op
    -   *     must be a primitive operation supported by the runtime.
    +   * * library.function.name are in a flat namespace.
    +   * NOTE: We may need to change it to be hierarchical to support
    +   * different orgs. E.g.,
    +   * { "/google/nn", { ... }},
    +   * { "/google/vision", { ... }}
    +   * { "/org_foo/module_bar", { ... }}
    +   * map<string, FunctionDefLib> named_lib;
    +   * * If node[i].op is the name of one function in "library",
    +   * node[i] is deemed as a function call. Otherwise, node[i].op
    +   * must be a primitive operation supported by the runtime.
    +   *
    +   *
        * Function call semantics:
    -   *   * The callee may start execution as soon as some of its inputs
    -   *     are ready. The caller may want to use Tuple() mechanism to
    -   *     ensure all inputs are ready in the same time.
    -   *   * The consumer of return values may start executing as soon as
    -   *     the return values the consumer depends on are ready.  The
    -   *     consumer may want to use Tuple() mechanism to ensure the
    -   *     consumer does not start until all return values of the callee
    -   *     function are ready.
    +   *
    +   * * The callee may start execution as soon as some of its inputs
    +   * are ready. The caller may want to use Tuple() mechanism to
    +   * ensure all inputs are ready in the same time.
    +   *
    +   * * The consumer of return values may start executing as soon as
    +   * the return values the consumer depends on are ready.  The
    +   * consumer may want to use Tuple() mechanism to ensure the
    +   * consumer does not start until all return values of the callee
    +   * function are ready.
        * 
    * * .tensorflow.FunctionDefLibrary library = 2; @@ -110,26 +117,31 @@ org.tensorflow.proto.NodeDefOrBuilder getNodeOrBuilder( /** *
        * "library" provides user-defined functions.
    +   *
        * Naming:
    -   *   * library.function.name are in a flat namespace.
    -   *     NOTE: We may need to change it to be hierarchical to support
    -   *     different orgs. E.g.,
    -   *     { "/google/nn", { ... }},
    -   *     { "/google/vision", { ... }}
    -   *     { "/org_foo/module_bar", { ... }}
    -   *     map<string, FunctionDefLib> named_lib;
    -   *   * If node[i].op is the name of one function in "library",
    -   *     node[i] is deemed as a function call. Otherwise, node[i].op
    -   *     must be a primitive operation supported by the runtime.
    +   * * library.function.name are in a flat namespace.
    +   * NOTE: We may need to change it to be hierarchical to support
    +   * different orgs. E.g.,
    +   * { "/google/nn", { ... }},
    +   * { "/google/vision", { ... }}
    +   * { "/org_foo/module_bar", { ... }}
    +   * map<string, FunctionDefLib> named_lib;
    +   * * If node[i].op is the name of one function in "library",
    +   * node[i] is deemed as a function call. Otherwise, node[i].op
    +   * must be a primitive operation supported by the runtime.
    +   *
    +   *
        * Function call semantics:
    -   *   * The callee may start execution as soon as some of its inputs
    -   *     are ready. The caller may want to use Tuple() mechanism to
    -   *     ensure all inputs are ready in the same time.
    -   *   * The consumer of return values may start executing as soon as
    -   *     the return values the consumer depends on are ready.  The
    -   *     consumer may want to use Tuple() mechanism to ensure the
    -   *     consumer does not start until all return values of the callee
    -   *     function are ready.
    +   *
    +   * * The callee may start execution as soon as some of its inputs
    +   * are ready. The caller may want to use Tuple() mechanism to
    +   * ensure all inputs are ready in the same time.
    +   *
    +   * * The consumer of return values may start executing as soon as
    +   * the return values the consumer depends on are ready.  The
    +   * consumer may want to use Tuple() mechanism to ensure the
    +   * consumer does not start until all return values of the callee
    +   * function are ready.
        * 
    * * .tensorflow.FunctionDefLibrary library = 2; @@ -139,26 +151,31 @@ org.tensorflow.proto.NodeDefOrBuilder getNodeOrBuilder( /** *
        * "library" provides user-defined functions.
    +   *
        * Naming:
    -   *   * library.function.name are in a flat namespace.
    -   *     NOTE: We may need to change it to be hierarchical to support
    -   *     different orgs. E.g.,
    -   *     { "/google/nn", { ... }},
    -   *     { "/google/vision", { ... }}
    -   *     { "/org_foo/module_bar", { ... }}
    -   *     map<string, FunctionDefLib> named_lib;
    -   *   * If node[i].op is the name of one function in "library",
    -   *     node[i] is deemed as a function call. Otherwise, node[i].op
    -   *     must be a primitive operation supported by the runtime.
    +   * * library.function.name are in a flat namespace.
    +   * NOTE: We may need to change it to be hierarchical to support
    +   * different orgs. E.g.,
    +   * { "/google/nn", { ... }},
    +   * { "/google/vision", { ... }}
    +   * { "/org_foo/module_bar", { ... }}
    +   * map<string, FunctionDefLib> named_lib;
    +   * * If node[i].op is the name of one function in "library",
    +   * node[i] is deemed as a function call. Otherwise, node[i].op
    +   * must be a primitive operation supported by the runtime.
    +   *
    +   *
        * Function call semantics:
    -   *   * The callee may start execution as soon as some of its inputs
    -   *     are ready. The caller may want to use Tuple() mechanism to
    -   *     ensure all inputs are ready in the same time.
    -   *   * The consumer of return values may start executing as soon as
    -   *     the return values the consumer depends on are ready.  The
    -   *     consumer may want to use Tuple() mechanism to ensure the
    -   *     consumer does not start until all return values of the callee
    -   *     function are ready.
    +   *
    +   * * The callee may start execution as soon as some of its inputs
    +   * are ready. The caller may want to use Tuple() mechanism to
    +   * ensure all inputs are ready in the same time.
    +   *
    +   * * The consumer of return values may start executing as soon as
    +   * the return values the consumer depends on are ready.  The
    +   * consumer may want to use Tuple() mechanism to ensure the
    +   * consumer does not start until all return values of the callee
    +   * function are ready.
        * 
    * * .tensorflow.FunctionDefLibrary library = 2; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphExecutionTrace.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphExecutionTrace.java index 3458ea9b7e1..6295c31c0b3 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphExecutionTrace.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphExecutionTrace.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/protobuf/debug_event.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -16,12 +18,21 @@ * Protobuf type {@code tensorflow.GraphExecutionTrace} */ public final class GraphExecutionTrace extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.GraphExecutionTrace) GraphExecutionTraceOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + GraphExecutionTrace.class.getName()); + } // Use GraphExecutionTrace.newBuilder() to construct. - private GraphExecutionTrace(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private GraphExecutionTrace(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private GraphExecutionTrace() { @@ -31,33 +42,23 @@ private GraphExecutionTrace() { deviceName_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GraphExecutionTrace(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.DebugEventProtos.internal_static_tensorflow_GraphExecutionTrace_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.DebugEventProtos.internal_static_tensorflow_GraphExecutionTrace_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.proto.GraphExecutionTrace.class, org.tensorflow.proto.GraphExecutionTrace.Builder.class); } + private int bitField0_; public static final int TFDBG_CONTEXT_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object tfdbgContextId_; + @SuppressWarnings("serial") + private volatile java.lang.Object tfdbgContextId_ = ""; /** *
        * Unique ID of the context that the executed op(s) belong to (e.g., a
    @@ -105,7 +106,8 @@ public java.lang.String getTfdbgContextId() {
       }
     
       public static final int OP_NAME_FIELD_NUMBER = 2;
    -  private volatile java.lang.Object opName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object opName_ = "";
       /**
        * 
        * Name of the op (applicable only in the case of the `FULL_TENSOR` trace
    @@ -153,7 +155,7 @@ public java.lang.String getOpName() {
       }
     
       public static final int OUTPUT_SLOT_FIELD_NUMBER = 3;
    -  private int outputSlot_;
    +  private int outputSlot_ = 0;
       /**
        * 
        * Output slot of the tensor (applicable only in the case of the `FULL_TENSOR`
    @@ -169,7 +171,7 @@ public int getOutputSlot() {
       }
     
       public static final int TENSOR_DEBUG_MODE_FIELD_NUMBER = 4;
    -  private int tensorDebugMode_;
    +  private int tensorDebugMode_ = 0;
       /**
        * 
        * Type of the tensor value encapsulated in this proto.
    @@ -190,8 +192,7 @@ public int getOutputSlot() {
        * @return The tensorDebugMode.
        */
       @java.lang.Override public org.tensorflow.proto.TensorDebugMode getTensorDebugMode() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.TensorDebugMode result = org.tensorflow.proto.TensorDebugMode.valueOf(tensorDebugMode_);
    +    org.tensorflow.proto.TensorDebugMode result = org.tensorflow.proto.TensorDebugMode.forNumber(tensorDebugMode_);
         return result == null ? org.tensorflow.proto.TensorDebugMode.UNRECOGNIZED : result;
       }
     
    @@ -209,7 +210,7 @@ public int getOutputSlot() {
        */
       @java.lang.Override
       public boolean hasTensorProto() {
    -    return tensorProto_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * 
    @@ -236,11 +237,12 @@ public org.tensorflow.proto.TensorProto getTensorProto() {
        */
       @java.lang.Override
       public org.tensorflow.proto.TensorProtoOrBuilder getTensorProtoOrBuilder() {
    -    return getTensorProto();
    +    return tensorProto_ == null ? org.tensorflow.proto.TensorProto.getDefaultInstance() : tensorProto_;
       }
     
       public static final int DEVICE_NAME_FIELD_NUMBER = 6;
    -  private volatile java.lang.Object deviceName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object deviceName_ = "";
       /**
        * 
        * Name of the device that the op belongs to.
    @@ -299,11 +301,11 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tfdbgContextId_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tfdbgContextId_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tfdbgContextId_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, tfdbgContextId_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(opName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, opName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(opName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 2, opName_);
         }
         if (outputSlot_ != 0) {
           output.writeInt32(3, outputSlot_);
    @@ -311,11 +313,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         if (tensorDebugMode_ != org.tensorflow.proto.TensorDebugMode.UNSPECIFIED.getNumber()) {
           output.writeEnum(4, tensorDebugMode_);
         }
    -    if (tensorProto_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(5, getTensorProto());
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, deviceName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(deviceName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 6, deviceName_);
         }
         getUnknownFields().writeTo(output);
       }
    @@ -326,11 +328,11 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tfdbgContextId_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tfdbgContextId_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tfdbgContextId_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, tfdbgContextId_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(opName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, opName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(opName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(2, opName_);
         }
         if (outputSlot_ != 0) {
           size += com.google.protobuf.CodedOutputStream
    @@ -340,12 +342,12 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeEnumSize(4, tensorDebugMode_);
         }
    -    if (tensorProto_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(5, getTensorProto());
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, deviceName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(deviceName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(6, deviceName_);
         }
         size += getUnknownFields().getSerializedSize();
         memoizedSize = size;
    @@ -440,39 +442,41 @@ public static org.tensorflow.proto.GraphExecutionTrace parseFrom(
       }
       public static org.tensorflow.proto.GraphExecutionTrace parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.GraphExecutionTrace parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.GraphExecutionTrace parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.GraphExecutionTrace parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.GraphExecutionTrace parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.GraphExecutionTrace parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -492,7 +496,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -509,7 +513,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.GraphExecutionTrace}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.GraphExecutionTrace)
           org.tensorflow.proto.GraphExecutionTraceOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -518,7 +522,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.DebugEventProtos.internal_static_tensorflow_GraphExecutionTrace_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -527,33 +531,34 @@ public static final class Builder extends
     
         // Construct using org.tensorflow.proto.GraphExecutionTrace.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getTensorProtoFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           tfdbgContextId_ = "";
    -
           opName_ = "";
    -
           outputSlot_ = 0;
    -
           tensorDebugMode_ = 0;
    -
    -      if (tensorProtoBuilder_ == null) {
    -        tensorProto_ = null;
    -      } else {
    -        tensorProto_ = null;
    +      tensorProto_ = null;
    +      if (tensorProtoBuilder_ != null) {
    +        tensorProtoBuilder_.dispose();
             tensorProtoBuilder_ = null;
           }
           deviceName_ = "";
    -
           return this;
         }
     
    @@ -580,52 +585,38 @@ public org.tensorflow.proto.GraphExecutionTrace build() {
         @java.lang.Override
         public org.tensorflow.proto.GraphExecutionTrace buildPartial() {
           org.tensorflow.proto.GraphExecutionTrace result = new org.tensorflow.proto.GraphExecutionTrace(this);
    -      result.tfdbgContextId_ = tfdbgContextId_;
    -      result.opName_ = opName_;
    -      result.outputSlot_ = outputSlot_;
    -      result.tensorDebugMode_ = tensorDebugMode_;
    -      if (tensorProtoBuilder_ == null) {
    -        result.tensorProto_ = tensorProto_;
    -      } else {
    -        result.tensorProto_ = tensorProtoBuilder_.build();
    -      }
    -      result.deviceName_ = deviceName_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.GraphExecutionTrace result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.tfdbgContextId_ = tfdbgContextId_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.opName_ = opName_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.outputSlot_ = outputSlot_;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.tensorDebugMode_ = tensorDebugMode_;
    +      }
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000010) != 0)) {
    +        result.tensorProto_ = tensorProtoBuilder_ == null
    +            ? tensorProto_
    +            : tensorProtoBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
    +      }
    +      if (((from_bitField0_ & 0x00000020) != 0)) {
    +        result.deviceName_ = deviceName_;
    +      }
    +      result.bitField0_ |= to_bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.GraphExecutionTrace) {
    @@ -640,10 +631,12 @@ public Builder mergeFrom(org.tensorflow.proto.GraphExecutionTrace other) {
           if (other == org.tensorflow.proto.GraphExecutionTrace.getDefaultInstance()) return this;
           if (!other.getTfdbgContextId().isEmpty()) {
             tfdbgContextId_ = other.tfdbgContextId_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (!other.getOpName().isEmpty()) {
             opName_ = other.opName_;
    +        bitField0_ |= 0x00000002;
             onChanged();
           }
           if (other.getOutputSlot() != 0) {
    @@ -657,6 +650,7 @@ public Builder mergeFrom(org.tensorflow.proto.GraphExecutionTrace other) {
           }
           if (!other.getDeviceName().isEmpty()) {
             deviceName_ = other.deviceName_;
    +        bitField0_ |= 0x00000020;
             onChanged();
           }
           this.mergeUnknownFields(other.getUnknownFields());
    @@ -687,34 +681,34 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   tfdbgContextId_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
                   opName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 case 24: {
                   outputSlot_ = input.readInt32();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 24
                 case 32: {
                   tensorDebugMode_ = input.readEnum();
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 32
                 case 42: {
                   input.readMessage(
                       getTensorProtoFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000010;
                   break;
                 } // case 42
                 case 50: {
                   deviceName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000020;
                   break;
                 } // case 50
                 default: {
    @@ -732,6 +726,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private java.lang.Object tfdbgContextId_ = "";
         /**
    @@ -789,11 +784,9 @@ public java.lang.String getTfdbgContextId() {
          */
         public Builder setTfdbgContextId(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           tfdbgContextId_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -807,8 +800,8 @@ public Builder setTfdbgContextId(
          * @return This builder for chaining.
          */
         public Builder clearTfdbgContextId() {
    -      
           tfdbgContextId_ = getDefaultInstance().getTfdbgContextId();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -824,12 +817,10 @@ public Builder clearTfdbgContextId() {
          */
         public Builder setTfdbgContextIdBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           tfdbgContextId_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -890,11 +881,9 @@ public java.lang.String getOpName() {
          */
         public Builder setOpName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           opName_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -908,8 +897,8 @@ public Builder setOpName(
          * @return This builder for chaining.
          */
         public Builder clearOpName() {
    -      
           opName_ = getDefaultInstance().getOpName();
    +      bitField0_ = (bitField0_ & ~0x00000002);
           onChanged();
           return this;
         }
    @@ -925,12 +914,10 @@ public Builder clearOpName() {
          */
         public Builder setOpNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           opName_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -960,8 +947,9 @@ public int getOutputSlot() {
          * @return This builder for chaining.
          */
         public Builder setOutputSlot(int value) {
    -      
    +
           outputSlot_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -975,7 +963,7 @@ public Builder setOutputSlot(int value) {
          * @return This builder for chaining.
          */
         public Builder clearOutputSlot() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000004);
           outputSlot_ = 0;
           onChanged();
           return this;
    @@ -1003,8 +991,8 @@ public Builder clearOutputSlot() {
          * @return This builder for chaining.
          */
         public Builder setTensorDebugModeValue(int value) {
    -      
           tensorDebugMode_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -1018,8 +1006,7 @@ public Builder setTensorDebugModeValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.TensorDebugMode getTensorDebugMode() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.TensorDebugMode result = org.tensorflow.proto.TensorDebugMode.valueOf(tensorDebugMode_);
    +      org.tensorflow.proto.TensorDebugMode result = org.tensorflow.proto.TensorDebugMode.forNumber(tensorDebugMode_);
           return result == null ? org.tensorflow.proto.TensorDebugMode.UNRECOGNIZED : result;
         }
         /**
    @@ -1035,7 +1022,7 @@ public Builder setTensorDebugMode(org.tensorflow.proto.TensorDebugMode value) {
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00000008;
           tensorDebugMode_ = value.getNumber();
           onChanged();
           return this;
    @@ -1049,14 +1036,14 @@ public Builder setTensorDebugMode(org.tensorflow.proto.TensorDebugMode value) {
          * @return This builder for chaining.
          */
         public Builder clearTensorDebugMode() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000008);
           tensorDebugMode_ = 0;
           onChanged();
           return this;
         }
     
         private org.tensorflow.proto.TensorProto tensorProto_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> tensorProtoBuilder_;
         /**
          * 
    @@ -1069,7 +1056,7 @@ public Builder clearTensorDebugMode() {
          * @return Whether the tensorProto field is set.
          */
         public boolean hasTensorProto() {
    -      return tensorProtoBuilder_ != null || tensorProto_ != null;
    +      return ((bitField0_ & 0x00000010) != 0);
         }
         /**
          * 
    @@ -1103,11 +1090,11 @@ public Builder setTensorProto(org.tensorflow.proto.TensorProto value) {
               throw new NullPointerException();
             }
             tensorProto_ = value;
    -        onChanged();
           } else {
             tensorProtoBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000010;
    +      onChanged();
           return this;
         }
         /**
    @@ -1123,11 +1110,11 @@ public Builder setTensorProto(
             org.tensorflow.proto.TensorProto.Builder builderForValue) {
           if (tensorProtoBuilder_ == null) {
             tensorProto_ = builderForValue.build();
    -        onChanged();
           } else {
             tensorProtoBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000010;
    +      onChanged();
           return this;
         }
         /**
    @@ -1141,17 +1128,20 @@ public Builder setTensorProto(
          */
         public Builder mergeTensorProto(org.tensorflow.proto.TensorProto value) {
           if (tensorProtoBuilder_ == null) {
    -        if (tensorProto_ != null) {
    -          tensorProto_ =
    -            org.tensorflow.proto.TensorProto.newBuilder(tensorProto_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000010) != 0) &&
    +          tensorProto_ != null &&
    +          tensorProto_ != org.tensorflow.proto.TensorProto.getDefaultInstance()) {
    +          getTensorProtoBuilder().mergeFrom(value);
             } else {
               tensorProto_ = value;
             }
    -        onChanged();
           } else {
             tensorProtoBuilder_.mergeFrom(value);
           }
    -
    +      if (tensorProto_ != null) {
    +        bitField0_ |= 0x00000010;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -1164,14 +1154,13 @@ public Builder mergeTensorProto(org.tensorflow.proto.TensorProto value) {
          * .tensorflow.TensorProto tensor_proto = 5;
          */
         public Builder clearTensorProto() {
    -      if (tensorProtoBuilder_ == null) {
    -        tensorProto_ = null;
    -        onChanged();
    -      } else {
    -        tensorProto_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000010);
    +      tensorProto_ = null;
    +      if (tensorProtoBuilder_ != null) {
    +        tensorProtoBuilder_.dispose();
             tensorProtoBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -1184,7 +1173,7 @@ public Builder clearTensorProto() {
          * .tensorflow.TensorProto tensor_proto = 5;
          */
         public org.tensorflow.proto.TensorProto.Builder getTensorProtoBuilder() {
    -      
    +      bitField0_ |= 0x00000010;
           onChanged();
           return getTensorProtoFieldBuilder().getBuilder();
         }
    @@ -1214,11 +1203,11 @@ public org.tensorflow.proto.TensorProtoOrBuilder getTensorProtoOrBuilder() {
          *
          * .tensorflow.TensorProto tensor_proto = 5;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> 
             getTensorProtoFieldBuilder() {
           if (tensorProtoBuilder_ == null) {
    -        tensorProtoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        tensorProtoBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder>(
                     getTensorProto(),
                     getParentForChildren(),
    @@ -1281,11 +1270,9 @@ public java.lang.String getDeviceName() {
          */
         public Builder setDeviceName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           deviceName_ = value;
    +      bitField0_ |= 0x00000020;
           onChanged();
           return this;
         }
    @@ -1298,8 +1285,8 @@ public Builder setDeviceName(
          * @return This builder for chaining.
          */
         public Builder clearDeviceName() {
    -      
           deviceName_ = getDefaultInstance().getDeviceName();
    +      bitField0_ = (bitField0_ & ~0x00000020);
           onChanged();
           return this;
         }
    @@ -1314,27 +1301,13 @@ public Builder clearDeviceName() {
          */
         public Builder setDeviceNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           deviceName_ = value;
    +      bitField0_ |= 0x00000020;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.GraphExecutionTrace)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphExecutionTraceOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphExecutionTraceOrBuilder.java
    index b01de73732e..8ee56f2d353 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphExecutionTraceOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphExecutionTraceOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/debug_event.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphOpCreation.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphOpCreation.java
    index ca85e208dd1..1cfdf8f521b 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphOpCreation.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphOpCreation.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/debug_event.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,12 +13,21 @@
      * Protobuf type {@code tensorflow.GraphOpCreation}
      */
     public final class GraphOpCreation extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.GraphOpCreation)
         GraphOpCreationOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      GraphOpCreation.class.getName());
    +  }
       // Use GraphOpCreation.newBuilder() to construct.
    -  private GraphOpCreation(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private GraphOpCreation(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private GraphOpCreation() {
    @@ -25,37 +36,28 @@ private GraphOpCreation() {
         graphName_ = "";
         graphId_ = "";
         deviceName_ = "";
    -    inputNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +    inputNames_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         outputTensorIds_ = emptyIntList();
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new GraphOpCreation();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.DebugEventProtos.internal_static_tensorflow_GraphOpCreation_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.DebugEventProtos.internal_static_tensorflow_GraphOpCreation_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
                 org.tensorflow.proto.GraphOpCreation.class, org.tensorflow.proto.GraphOpCreation.Builder.class);
       }
     
    +  private int bitField0_;
       public static final int OP_TYPE_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object opType_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object opType_ = "";
       /**
        * 
        * Type of the op (e.g., "MatMul").
    @@ -101,7 +103,8 @@ public java.lang.String getOpType() {
       }
     
       public static final int OP_NAME_FIELD_NUMBER = 2;
    -  private volatile java.lang.Object opName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object opName_ = "";
       /**
        * 
        * Name of the op (e.g., "Dense/MatMul_1").
    @@ -147,7 +150,8 @@ public java.lang.String getOpName() {
       }
     
       public static final int GRAPH_NAME_FIELD_NUMBER = 3;
    -  private volatile java.lang.Object graphName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object graphName_ = "";
       /**
        * 
        * Name of the graph that the op is a part of (if available).
    @@ -193,7 +197,8 @@ public java.lang.String getGraphName() {
       }
     
       public static final int GRAPH_ID_FIELD_NUMBER = 4;
    -  private volatile java.lang.Object graphId_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object graphId_ = "";
       /**
        * 
        * Unique ID of the graph (generated by debugger).
    @@ -241,7 +246,8 @@ public java.lang.String getGraphId() {
       }
     
       public static final int DEVICE_NAME_FIELD_NUMBER = 5;
    -  private volatile java.lang.Object deviceName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object deviceName_ = "";
       /**
        * 
        * Name of the device that the op is assigned to (if available).
    @@ -287,7 +293,9 @@ public java.lang.String getDeviceName() {
       }
     
       public static final int INPUT_NAMES_FIELD_NUMBER = 6;
    -  private com.google.protobuf.LazyStringList inputNames_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.LazyStringArrayList inputNames_ =
    +      com.google.protobuf.LazyStringArrayList.emptyList();
       /**
        * 
        * Names of the input tensors to the op.
    @@ -338,7 +346,7 @@ public java.lang.String getInputNames(int index) {
       }
     
       public static final int NUM_OUTPUTS_FIELD_NUMBER = 7;
    -  private int numOutputs_;
    +  private int numOutputs_ = 0;
       /**
        * 
        * Number of output tensors emitted by the op.
    @@ -364,7 +372,7 @@ public int getNumOutputs() {
        */
       @java.lang.Override
       public boolean hasCodeLocation() {
    -    return codeLocation_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * 
    @@ -387,11 +395,13 @@ public org.tensorflow.proto.CodeLocation getCodeLocation() {
        */
       @java.lang.Override
       public org.tensorflow.proto.CodeLocationOrBuilder getCodeLocationOrBuilder() {
    -    return getCodeLocation();
    +    return codeLocation_ == null ? org.tensorflow.proto.CodeLocation.getDefaultInstance() : codeLocation_;
       }
     
       public static final int OUTPUT_TENSOR_IDS_FIELD_NUMBER = 9;
    -  private com.google.protobuf.Internal.IntList outputTensorIds_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.Internal.IntList outputTensorIds_ =
    +      emptyIntList();
       /**
        * 
        * Unique IDs for the output tensors of this op.
    @@ -445,28 +455,28 @@ public final boolean isInitialized() {
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
         getSerializedSize();
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(opType_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, opType_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(opType_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, opType_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(opName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, opName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(opName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 2, opName_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(graphName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, graphName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(graphName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 3, graphName_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(graphId_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, graphId_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(graphId_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 4, graphId_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, deviceName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(deviceName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 5, deviceName_);
         }
         for (int i = 0; i < inputNames_.size(); i++) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, inputNames_.getRaw(i));
    +      com.google.protobuf.GeneratedMessage.writeString(output, 6, inputNames_.getRaw(i));
         }
         if (numOutputs_ != 0) {
           output.writeInt32(7, numOutputs_);
         }
    -    if (codeLocation_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(8, getCodeLocation());
         }
         if (getOutputTensorIdsList().size() > 0) {
    @@ -485,20 +495,20 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(opType_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, opType_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(opType_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, opType_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(opName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, opName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(opName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(2, opName_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(graphName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, graphName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(graphName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(3, graphName_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(graphId_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, graphId_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(graphId_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(4, graphId_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, deviceName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(deviceName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(5, deviceName_);
         }
         {
           int dataSize = 0;
    @@ -512,7 +522,7 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeInt32Size(7, numOutputs_);
         }
    -    if (codeLocation_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(8, getCodeLocation());
         }
    @@ -640,39 +650,41 @@ public static org.tensorflow.proto.GraphOpCreation parseFrom(
       }
       public static org.tensorflow.proto.GraphOpCreation parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.GraphOpCreation parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.GraphOpCreation parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.GraphOpCreation parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.GraphOpCreation parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.GraphOpCreation parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -692,7 +704,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -704,7 +716,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.GraphOpCreation}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.GraphOpCreation)
           org.tensorflow.proto.GraphOpCreationOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -713,7 +725,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.DebugEventProtos.internal_static_tensorflow_GraphOpCreation_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -722,39 +734,38 @@ public static final class Builder extends
     
         // Construct using org.tensorflow.proto.GraphOpCreation.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getCodeLocationFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           opType_ = "";
    -
           opName_ = "";
    -
           graphName_ = "";
    -
           graphId_ = "";
    -
           deviceName_ = "";
    -
    -      inputNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      inputNames_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
           numOutputs_ = 0;
    -
    -      if (codeLocationBuilder_ == null) {
    -        codeLocation_ = null;
    -      } else {
    -        codeLocation_ = null;
    +      codeLocation_ = null;
    +      if (codeLocationBuilder_ != null) {
    +        codeLocationBuilder_.dispose();
             codeLocationBuilder_ = null;
           }
           outputTensorIds_ = emptyIntList();
    -      bitField0_ = (bitField0_ & ~0x00000002);
           return this;
         }
     
    @@ -781,64 +792,49 @@ public org.tensorflow.proto.GraphOpCreation build() {
         @java.lang.Override
         public org.tensorflow.proto.GraphOpCreation buildPartial() {
           org.tensorflow.proto.GraphOpCreation result = new org.tensorflow.proto.GraphOpCreation(this);
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartial0(org.tensorflow.proto.GraphOpCreation result) {
           int from_bitField0_ = bitField0_;
    -      result.opType_ = opType_;
    -      result.opName_ = opName_;
    -      result.graphName_ = graphName_;
    -      result.graphId_ = graphId_;
    -      result.deviceName_ = deviceName_;
    -      if (((bitField0_ & 0x00000001) != 0)) {
    -        inputNames_ = inputNames_.getUnmodifiableView();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.opType_ = opType_;
           }
    -      result.inputNames_ = inputNames_;
    -      result.numOutputs_ = numOutputs_;
    -      if (codeLocationBuilder_ == null) {
    -        result.codeLocation_ = codeLocation_;
    -      } else {
    -        result.codeLocation_ = codeLocationBuilder_.build();
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.opName_ = opName_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.graphName_ = graphName_;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.graphId_ = graphId_;
           }
    -      if (((bitField0_ & 0x00000002) != 0)) {
    +      if (((from_bitField0_ & 0x00000010) != 0)) {
    +        result.deviceName_ = deviceName_;
    +      }
    +      if (((from_bitField0_ & 0x00000020) != 0)) {
    +        inputNames_.makeImmutable();
    +        result.inputNames_ = inputNames_;
    +      }
    +      if (((from_bitField0_ & 0x00000040) != 0)) {
    +        result.numOutputs_ = numOutputs_;
    +      }
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000080) != 0)) {
    +        result.codeLocation_ = codeLocationBuilder_ == null
    +            ? codeLocation_
    +            : codeLocationBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
    +      }
    +      if (((from_bitField0_ & 0x00000100) != 0)) {
             outputTensorIds_.makeImmutable();
    -        bitField0_ = (bitField0_ & ~0x00000002);
    +        result.outputTensorIds_ = outputTensorIds_;
           }
    -      result.outputTensorIds_ = outputTensorIds_;
    -      onBuilt();
    -      return result;
    +      result.bitField0_ |= to_bitField0_;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    -    }
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.GraphOpCreation) {
    @@ -853,28 +849,33 @@ public Builder mergeFrom(org.tensorflow.proto.GraphOpCreation other) {
           if (other == org.tensorflow.proto.GraphOpCreation.getDefaultInstance()) return this;
           if (!other.getOpType().isEmpty()) {
             opType_ = other.opType_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (!other.getOpName().isEmpty()) {
             opName_ = other.opName_;
    +        bitField0_ |= 0x00000002;
             onChanged();
           }
           if (!other.getGraphName().isEmpty()) {
             graphName_ = other.graphName_;
    +        bitField0_ |= 0x00000004;
             onChanged();
           }
           if (!other.getGraphId().isEmpty()) {
             graphId_ = other.graphId_;
    +        bitField0_ |= 0x00000008;
             onChanged();
           }
           if (!other.getDeviceName().isEmpty()) {
             deviceName_ = other.deviceName_;
    +        bitField0_ |= 0x00000010;
             onChanged();
           }
           if (!other.inputNames_.isEmpty()) {
             if (inputNames_.isEmpty()) {
               inputNames_ = other.inputNames_;
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ |= 0x00000020;
             } else {
               ensureInputNamesIsMutable();
               inputNames_.addAll(other.inputNames_);
    @@ -890,7 +891,8 @@ public Builder mergeFrom(org.tensorflow.proto.GraphOpCreation other) {
           if (!other.outputTensorIds_.isEmpty()) {
             if (outputTensorIds_.isEmpty()) {
               outputTensorIds_ = other.outputTensorIds_;
    -          bitField0_ = (bitField0_ & ~0x00000002);
    +          outputTensorIds_.makeImmutable();
    +          bitField0_ |= 0x00000100;
             } else {
               ensureOutputTensorIdsIsMutable();
               outputTensorIds_.addAll(other.outputTensorIds_);
    @@ -925,27 +927,27 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   opType_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
                   opName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 case 26: {
                   graphName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 26
                 case 34: {
                   graphId_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 34
                 case 42: {
                   deviceName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000010;
                   break;
                 } // case 42
                 case 50: {
    @@ -956,14 +958,14 @@ public Builder mergeFrom(
                 } // case 50
                 case 56: {
                   numOutputs_ = input.readInt32();
    -
    +              bitField0_ |= 0x00000040;
                   break;
                 } // case 56
                 case 66: {
                   input.readMessage(
                       getCodeLocationFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000080;
                   break;
                 } // case 66
                 case 72: {
    @@ -1052,11 +1054,9 @@ public java.lang.String getOpType() {
          */
         public Builder setOpType(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           opType_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -1069,8 +1069,8 @@ public Builder setOpType(
          * @return This builder for chaining.
          */
         public Builder clearOpType() {
    -      
           opType_ = getDefaultInstance().getOpType();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -1085,12 +1085,10 @@ public Builder clearOpType() {
          */
         public Builder setOpTypeBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           opType_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -1148,11 +1146,9 @@ public java.lang.String getOpName() {
          */
         public Builder setOpName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           opName_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -1165,8 +1161,8 @@ public Builder setOpName(
          * @return This builder for chaining.
          */
         public Builder clearOpName() {
    -      
           opName_ = getDefaultInstance().getOpName();
    +      bitField0_ = (bitField0_ & ~0x00000002);
           onChanged();
           return this;
         }
    @@ -1181,12 +1177,10 @@ public Builder clearOpName() {
          */
         public Builder setOpNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           opName_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -1244,11 +1238,9 @@ public java.lang.String getGraphName() {
          */
         public Builder setGraphName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           graphName_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -1261,8 +1253,8 @@ public Builder setGraphName(
          * @return This builder for chaining.
          */
         public Builder clearGraphName() {
    -      
           graphName_ = getDefaultInstance().getGraphName();
    +      bitField0_ = (bitField0_ & ~0x00000004);
           onChanged();
           return this;
         }
    @@ -1277,12 +1269,10 @@ public Builder clearGraphName() {
          */
         public Builder setGraphNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           graphName_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -1343,11 +1333,9 @@ public java.lang.String getGraphId() {
          */
         public Builder setGraphId(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           graphId_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -1361,8 +1349,8 @@ public Builder setGraphId(
          * @return This builder for chaining.
          */
         public Builder clearGraphId() {
    -      
           graphId_ = getDefaultInstance().getGraphId();
    +      bitField0_ = (bitField0_ & ~0x00000008);
           onChanged();
           return this;
         }
    @@ -1378,12 +1366,10 @@ public Builder clearGraphId() {
          */
         public Builder setGraphIdBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           graphId_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -1441,11 +1427,9 @@ public java.lang.String getDeviceName() {
          */
         public Builder setDeviceName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           deviceName_ = value;
    +      bitField0_ |= 0x00000010;
           onChanged();
           return this;
         }
    @@ -1458,8 +1442,8 @@ public Builder setDeviceName(
          * @return This builder for chaining.
          */
         public Builder clearDeviceName() {
    -      
           deviceName_ = getDefaultInstance().getDeviceName();
    +      bitField0_ = (bitField0_ & ~0x00000010);
           onChanged();
           return this;
         }
    @@ -1474,22 +1458,21 @@ public Builder clearDeviceName() {
          */
         public Builder setDeviceNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           deviceName_ = value;
    +      bitField0_ |= 0x00000010;
           onChanged();
           return this;
         }
     
    -    private com.google.protobuf.LazyStringList inputNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +    private com.google.protobuf.LazyStringArrayList inputNames_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         private void ensureInputNamesIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    +      if (!inputNames_.isModifiable()) {
             inputNames_ = new com.google.protobuf.LazyStringArrayList(inputNames_);
    -        bitField0_ |= 0x00000001;
    -       }
    +      }
    +      bitField0_ |= 0x00000020;
         }
         /**
          * 
    @@ -1501,7 +1484,8 @@ private void ensureInputNamesIsMutable() {
          */
         public com.google.protobuf.ProtocolStringList
             getInputNamesList() {
    -      return inputNames_.getUnmodifiableView();
    +      inputNames_.makeImmutable();
    +      return inputNames_;
         }
         /**
          * 
    @@ -1551,11 +1535,10 @@ public java.lang.String getInputNames(int index) {
          */
         public Builder setInputNames(
             int index, java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureInputNamesIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureInputNamesIsMutable();
           inputNames_.set(index, value);
    +      bitField0_ |= 0x00000020;
           onChanged();
           return this;
         }
    @@ -1570,11 +1553,10 @@ public Builder setInputNames(
          */
         public Builder addInputNames(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureInputNamesIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureInputNamesIsMutable();
           inputNames_.add(value);
    +      bitField0_ |= 0x00000020;
           onChanged();
           return this;
         }
    @@ -1592,6 +1574,7 @@ public Builder addAllInputNames(
           ensureInputNamesIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, inputNames_);
    +      bitField0_ |= 0x00000020;
           onChanged();
           return this;
         }
    @@ -1604,8 +1587,9 @@ public Builder addAllInputNames(
          * @return This builder for chaining.
          */
         public Builder clearInputNames() {
    -      inputNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      inputNames_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
    +      bitField0_ = (bitField0_ & ~0x00000020);;
           onChanged();
           return this;
         }
    @@ -1620,12 +1604,11 @@ public Builder clearInputNames() {
          */
         public Builder addInputNamesBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           ensureInputNamesIsMutable();
           inputNames_.add(value);
    +      bitField0_ |= 0x00000020;
           onChanged();
           return this;
         }
    @@ -1653,8 +1636,9 @@ public int getNumOutputs() {
          * @return This builder for chaining.
          */
         public Builder setNumOutputs(int value) {
    -      
    +
           numOutputs_ = value;
    +      bitField0_ |= 0x00000040;
           onChanged();
           return this;
         }
    @@ -1667,14 +1651,14 @@ public Builder setNumOutputs(int value) {
          * @return This builder for chaining.
          */
         public Builder clearNumOutputs() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000040);
           numOutputs_ = 0;
           onChanged();
           return this;
         }
     
         private org.tensorflow.proto.CodeLocation codeLocation_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.CodeLocation, org.tensorflow.proto.CodeLocation.Builder, org.tensorflow.proto.CodeLocationOrBuilder> codeLocationBuilder_;
         /**
          * 
    @@ -1685,7 +1669,7 @@ public Builder clearNumOutputs() {
          * @return Whether the codeLocation field is set.
          */
         public boolean hasCodeLocation() {
    -      return codeLocationBuilder_ != null || codeLocation_ != null;
    +      return ((bitField0_ & 0x00000080) != 0);
         }
         /**
          * 
    @@ -1715,11 +1699,11 @@ public Builder setCodeLocation(org.tensorflow.proto.CodeLocation value) {
               throw new NullPointerException();
             }
             codeLocation_ = value;
    -        onChanged();
           } else {
             codeLocationBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000080;
    +      onChanged();
           return this;
         }
         /**
    @@ -1733,11 +1717,11 @@ public Builder setCodeLocation(
             org.tensorflow.proto.CodeLocation.Builder builderForValue) {
           if (codeLocationBuilder_ == null) {
             codeLocation_ = builderForValue.build();
    -        onChanged();
           } else {
             codeLocationBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000080;
    +      onChanged();
           return this;
         }
         /**
    @@ -1749,17 +1733,20 @@ public Builder setCodeLocation(
          */
         public Builder mergeCodeLocation(org.tensorflow.proto.CodeLocation value) {
           if (codeLocationBuilder_ == null) {
    -        if (codeLocation_ != null) {
    -          codeLocation_ =
    -            org.tensorflow.proto.CodeLocation.newBuilder(codeLocation_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000080) != 0) &&
    +          codeLocation_ != null &&
    +          codeLocation_ != org.tensorflow.proto.CodeLocation.getDefaultInstance()) {
    +          getCodeLocationBuilder().mergeFrom(value);
             } else {
               codeLocation_ = value;
             }
    -        onChanged();
           } else {
             codeLocationBuilder_.mergeFrom(value);
           }
    -
    +      if (codeLocation_ != null) {
    +        bitField0_ |= 0x00000080;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -1770,14 +1757,13 @@ public Builder mergeCodeLocation(org.tensorflow.proto.CodeLocation value) {
          * .tensorflow.CodeLocation code_location = 8;
          */
         public Builder clearCodeLocation() {
    -      if (codeLocationBuilder_ == null) {
    -        codeLocation_ = null;
    -        onChanged();
    -      } else {
    -        codeLocation_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000080);
    +      codeLocation_ = null;
    +      if (codeLocationBuilder_ != null) {
    +        codeLocationBuilder_.dispose();
             codeLocationBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -1788,7 +1774,7 @@ public Builder clearCodeLocation() {
          * .tensorflow.CodeLocation code_location = 8;
          */
         public org.tensorflow.proto.CodeLocation.Builder getCodeLocationBuilder() {
    -      
    +      bitField0_ |= 0x00000080;
           onChanged();
           return getCodeLocationFieldBuilder().getBuilder();
         }
    @@ -1814,11 +1800,11 @@ public org.tensorflow.proto.CodeLocationOrBuilder getCodeLocationOrBuilder() {
          *
          * .tensorflow.CodeLocation code_location = 8;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.CodeLocation, org.tensorflow.proto.CodeLocation.Builder, org.tensorflow.proto.CodeLocationOrBuilder> 
             getCodeLocationFieldBuilder() {
           if (codeLocationBuilder_ == null) {
    -        codeLocationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        codeLocationBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.CodeLocation, org.tensorflow.proto.CodeLocation.Builder, org.tensorflow.proto.CodeLocationOrBuilder>(
                     getCodeLocation(),
                     getParentForChildren(),
    @@ -1830,10 +1816,10 @@ public org.tensorflow.proto.CodeLocationOrBuilder getCodeLocationOrBuilder() {
     
         private com.google.protobuf.Internal.IntList outputTensorIds_ = emptyIntList();
         private void ensureOutputTensorIdsIsMutable() {
    -      if (!((bitField0_ & 0x00000002) != 0)) {
    -        outputTensorIds_ = mutableCopy(outputTensorIds_);
    -        bitField0_ |= 0x00000002;
    -       }
    +      if (!outputTensorIds_.isModifiable()) {
    +        outputTensorIds_ = makeMutableCopy(outputTensorIds_);
    +      }
    +      bitField0_ |= 0x00000100;
         }
         /**
          * 
    @@ -1845,8 +1831,8 @@ private void ensureOutputTensorIdsIsMutable() {
          */
         public java.util.List
             getOutputTensorIdsList() {
    -      return ((bitField0_ & 0x00000002) != 0) ?
    -               java.util.Collections.unmodifiableList(outputTensorIds_) : outputTensorIds_;
    +      outputTensorIds_.makeImmutable();
    +      return outputTensorIds_;
         }
         /**
          * 
    @@ -1883,8 +1869,10 @@ public int getOutputTensorIds(int index) {
          */
         public Builder setOutputTensorIds(
             int index, int value) {
    +
           ensureOutputTensorIdsIsMutable();
           outputTensorIds_.setInt(index, value);
    +      bitField0_ |= 0x00000100;
           onChanged();
           return this;
         }
    @@ -1898,8 +1886,10 @@ public Builder setOutputTensorIds(
          * @return This builder for chaining.
          */
         public Builder addOutputTensorIds(int value) {
    +
           ensureOutputTensorIdsIsMutable();
           outputTensorIds_.addInt(value);
    +      bitField0_ |= 0x00000100;
           onChanged();
           return this;
         }
    @@ -1917,6 +1907,7 @@ public Builder addAllOutputTensorIds(
           ensureOutputTensorIdsIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, outputTensorIds_);
    +      bitField0_ |= 0x00000100;
           onChanged();
           return this;
         }
    @@ -1930,22 +1921,10 @@ public Builder addAllOutputTensorIds(
          */
         public Builder clearOutputTensorIds() {
           outputTensorIds_ = emptyIntList();
    -      bitField0_ = (bitField0_ & ~0x00000002);
    +      bitField0_ = (bitField0_ & ~0x00000100);
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.GraphOpCreation)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphOpCreationOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphOpCreationOrBuilder.java
    index b89ff27bd26..f2a77fe07be 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphOpCreationOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphOpCreationOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/debug_event.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphOptions.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphOptions.java
    index 062e96016bd..db16e305ded 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphOptions.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphOptions.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/config.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,44 +9,42 @@
      * Protobuf type {@code tensorflow.GraphOptions}
      */
     public final class GraphOptions extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.GraphOptions)
         GraphOptionsOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      GraphOptions.class.getName());
    +  }
       // Use GraphOptions.newBuilder() to construct.
    -  private GraphOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private GraphOptions(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private GraphOptions() {
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new GraphOptions();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_GraphOptions_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_GraphOptions_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
                 org.tensorflow.proto.GraphOptions.class, org.tensorflow.proto.GraphOptions.Builder.class);
       }
     
    +  private int bitField0_;
       public static final int ENABLE_RECV_SCHEDULING_FIELD_NUMBER = 2;
    -  private boolean enableRecvScheduling_;
    +  private boolean enableRecvScheduling_ = false;
       /**
        * 
        * If true, use control flow to schedule the activation of Recv nodes.
    @@ -71,7 +71,7 @@ public boolean getEnableRecvScheduling() {
        */
       @java.lang.Override
       public boolean hasOptimizerOptions() {
    -    return optimizerOptions_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * 
    @@ -94,11 +94,11 @@ public org.tensorflow.proto.OptimizerOptions getOptimizerOptions() {
        */
       @java.lang.Override
       public org.tensorflow.proto.OptimizerOptionsOrBuilder getOptimizerOptionsOrBuilder() {
    -    return getOptimizerOptions();
    +    return optimizerOptions_ == null ? org.tensorflow.proto.OptimizerOptions.getDefaultInstance() : optimizerOptions_;
       }
     
       public static final int BUILD_COST_MODEL_FIELD_NUMBER = 4;
    -  private long buildCostModel_;
    +  private long buildCostModel_ = 0L;
       /**
        * 
        * The number of steps to run before returning a cost model detailing
    @@ -115,7 +115,7 @@ public long getBuildCostModel() {
       }
     
       public static final int BUILD_COST_MODEL_AFTER_FIELD_NUMBER = 9;
    -  private long buildCostModelAfter_;
    +  private long buildCostModelAfter_ = 0L;
       /**
        * 
        * The number of steps to skip before collecting statistics for the
    @@ -131,7 +131,7 @@ public long getBuildCostModelAfter() {
       }
     
       public static final int INFER_SHAPES_FIELD_NUMBER = 5;
    -  private boolean inferShapes_;
    +  private boolean inferShapes_ = false;
       /**
        * 
        * Annotate each Node with Op output shape data, to the extent it can
    @@ -147,10 +147,11 @@ public boolean getInferShapes() {
       }
     
       public static final int PLACE_PRUNED_GRAPH_FIELD_NUMBER = 6;
    -  private boolean placePrunedGraph_;
    +  private boolean placePrunedGraph_ = false;
       /**
        * 
        * Only place the subgraphs that are run, rather than the entire graph.
    +   *
        * This is useful for interactive graph building, where one might
        * produce graphs that cannot be placed during the debugging
        * process.  In particular, it allows the client to continue work in
    @@ -167,7 +168,7 @@ public boolean getPlacePrunedGraph() {
       }
     
       public static final int ENABLE_BFLOAT16_SENDRECV_FIELD_NUMBER = 7;
    -  private boolean enableBfloat16Sendrecv_;
    +  private boolean enableBfloat16Sendrecv_ = false;
       /**
        * 
        * If true, transfer float values between processes as bfloat16.
    @@ -182,7 +183,7 @@ public boolean getEnableBfloat16Sendrecv() {
       }
     
       public static final int TIMELINE_STEP_FIELD_NUMBER = 8;
    -  private int timelineStep_;
    +  private int timelineStep_ = 0;
       /**
        * 
        * If > 0, record a timeline every this many steps.
    @@ -211,7 +212,7 @@ public int getTimelineStep() {
        */
       @java.lang.Override
       public boolean hasRewriteOptions() {
    -    return rewriteOptions_ != null;
    +    return ((bitField0_ & 0x00000002) != 0);
       }
       /**
        * 
    @@ -238,7 +239,7 @@ public org.tensorflow.proto.RewriterConfig getRewriteOptions() {
        */
       @java.lang.Override
       public org.tensorflow.proto.RewriterConfigOrBuilder getRewriteOptionsOrBuilder() {
    -    return getRewriteOptions();
    +    return rewriteOptions_ == null ? org.tensorflow.proto.RewriterConfig.getDefaultInstance() : rewriteOptions_;
       }
     
       private byte memoizedIsInitialized = -1;
    @@ -258,7 +259,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         if (enableRecvScheduling_ != false) {
           output.writeBool(2, enableRecvScheduling_);
         }
    -    if (optimizerOptions_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(3, getOptimizerOptions());
         }
         if (buildCostModel_ != 0L) {
    @@ -279,7 +280,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         if (buildCostModelAfter_ != 0L) {
           output.writeInt64(9, buildCostModelAfter_);
         }
    -    if (rewriteOptions_ != null) {
    +    if (((bitField0_ & 0x00000002) != 0)) {
           output.writeMessage(10, getRewriteOptions());
         }
         getUnknownFields().writeTo(output);
    @@ -295,7 +296,7 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeBoolSize(2, enableRecvScheduling_);
         }
    -    if (optimizerOptions_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(3, getOptimizerOptions());
         }
    @@ -323,7 +324,7 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeInt64Size(9, buildCostModelAfter_);
         }
    -    if (rewriteOptions_ != null) {
    +    if (((bitField0_ & 0x00000002) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(10, getRewriteOptions());
         }
    @@ -444,39 +445,41 @@ public static org.tensorflow.proto.GraphOptions parseFrom(
       }
       public static org.tensorflow.proto.GraphOptions parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.GraphOptions parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.GraphOptions parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.GraphOptions parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.GraphOptions parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.GraphOptions parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -496,7 +499,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -504,7 +507,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.GraphOptions}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.GraphOptions)
           org.tensorflow.proto.GraphOptionsOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -513,7 +516,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_GraphOptions_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -522,41 +525,40 @@ public static final class Builder extends
     
         // Construct using org.tensorflow.proto.GraphOptions.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getOptimizerOptionsFieldBuilder();
    +        getRewriteOptionsFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           enableRecvScheduling_ = false;
    -
    -      if (optimizerOptionsBuilder_ == null) {
    -        optimizerOptions_ = null;
    -      } else {
    -        optimizerOptions_ = null;
    +      optimizerOptions_ = null;
    +      if (optimizerOptionsBuilder_ != null) {
    +        optimizerOptionsBuilder_.dispose();
             optimizerOptionsBuilder_ = null;
           }
           buildCostModel_ = 0L;
    -
           buildCostModelAfter_ = 0L;
    -
           inferShapes_ = false;
    -
           placePrunedGraph_ = false;
    -
           enableBfloat16Sendrecv_ = false;
    -
           timelineStep_ = 0;
    -
    -      if (rewriteOptionsBuilder_ == null) {
    -        rewriteOptions_ = null;
    -      } else {
    -        rewriteOptions_ = null;
    +      rewriteOptions_ = null;
    +      if (rewriteOptionsBuilder_ != null) {
    +        rewriteOptionsBuilder_.dispose();
             rewriteOptionsBuilder_ = null;
           }
           return this;
    @@ -585,59 +587,50 @@ public org.tensorflow.proto.GraphOptions build() {
         @java.lang.Override
         public org.tensorflow.proto.GraphOptions buildPartial() {
           org.tensorflow.proto.GraphOptions result = new org.tensorflow.proto.GraphOptions(this);
    -      result.enableRecvScheduling_ = enableRecvScheduling_;
    -      if (optimizerOptionsBuilder_ == null) {
    -        result.optimizerOptions_ = optimizerOptions_;
    -      } else {
    -        result.optimizerOptions_ = optimizerOptionsBuilder_.build();
    -      }
    -      result.buildCostModel_ = buildCostModel_;
    -      result.buildCostModelAfter_ = buildCostModelAfter_;
    -      result.inferShapes_ = inferShapes_;
    -      result.placePrunedGraph_ = placePrunedGraph_;
    -      result.enableBfloat16Sendrecv_ = enableBfloat16Sendrecv_;
    -      result.timelineStep_ = timelineStep_;
    -      if (rewriteOptionsBuilder_ == null) {
    -        result.rewriteOptions_ = rewriteOptions_;
    -      } else {
    -        result.rewriteOptions_ = rewriteOptionsBuilder_.build();
    -      }
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.GraphOptions result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.enableRecvScheduling_ = enableRecvScheduling_;
    +      }
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.optimizerOptions_ = optimizerOptionsBuilder_ == null
    +            ? optimizerOptions_
    +            : optimizerOptionsBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.buildCostModel_ = buildCostModel_;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.buildCostModelAfter_ = buildCostModelAfter_;
    +      }
    +      if (((from_bitField0_ & 0x00000010) != 0)) {
    +        result.inferShapes_ = inferShapes_;
    +      }
    +      if (((from_bitField0_ & 0x00000020) != 0)) {
    +        result.placePrunedGraph_ = placePrunedGraph_;
    +      }
    +      if (((from_bitField0_ & 0x00000040) != 0)) {
    +        result.enableBfloat16Sendrecv_ = enableBfloat16Sendrecv_;
    +      }
    +      if (((from_bitField0_ & 0x00000080) != 0)) {
    +        result.timelineStep_ = timelineStep_;
    +      }
    +      if (((from_bitField0_ & 0x00000100) != 0)) {
    +        result.rewriteOptions_ = rewriteOptionsBuilder_ == null
    +            ? rewriteOptions_
    +            : rewriteOptionsBuilder_.build();
    +        to_bitField0_ |= 0x00000002;
    +      }
    +      result.bitField0_ |= to_bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.GraphOptions) {
    @@ -705,51 +698,51 @@ public Builder mergeFrom(
                   break;
                 case 16: {
                   enableRecvScheduling_ = input.readBool();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 16
                 case 26: {
                   input.readMessage(
                       getOptimizerOptionsFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 26
                 case 32: {
                   buildCostModel_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 32
                 case 40: {
                   inferShapes_ = input.readBool();
    -
    +              bitField0_ |= 0x00000010;
                   break;
                 } // case 40
                 case 48: {
                   placePrunedGraph_ = input.readBool();
    -
    +              bitField0_ |= 0x00000020;
                   break;
                 } // case 48
                 case 56: {
                   enableBfloat16Sendrecv_ = input.readBool();
    -
    +              bitField0_ |= 0x00000040;
                   break;
                 } // case 56
                 case 64: {
                   timelineStep_ = input.readInt32();
    -
    +              bitField0_ |= 0x00000080;
                   break;
                 } // case 64
                 case 72: {
                   buildCostModelAfter_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 72
                 case 82: {
                   input.readMessage(
                       getRewriteOptionsFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000100;
                   break;
                 } // case 82
                 default: {
    @@ -767,6 +760,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private boolean enableRecvScheduling_ ;
         /**
    @@ -793,8 +787,9 @@ public boolean getEnableRecvScheduling() {
          * @return This builder for chaining.
          */
         public Builder setEnableRecvScheduling(boolean value) {
    -      
    +
           enableRecvScheduling_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -808,14 +803,14 @@ public Builder setEnableRecvScheduling(boolean value) {
          * @return This builder for chaining.
          */
         public Builder clearEnableRecvScheduling() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000001);
           enableRecvScheduling_ = false;
           onChanged();
           return this;
         }
     
         private org.tensorflow.proto.OptimizerOptions optimizerOptions_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.OptimizerOptions, org.tensorflow.proto.OptimizerOptions.Builder, org.tensorflow.proto.OptimizerOptionsOrBuilder> optimizerOptionsBuilder_;
         /**
          * 
    @@ -826,7 +821,7 @@ public Builder clearEnableRecvScheduling() {
          * @return Whether the optimizerOptions field is set.
          */
         public boolean hasOptimizerOptions() {
    -      return optimizerOptionsBuilder_ != null || optimizerOptions_ != null;
    +      return ((bitField0_ & 0x00000002) != 0);
         }
         /**
          * 
    @@ -856,11 +851,11 @@ public Builder setOptimizerOptions(org.tensorflow.proto.OptimizerOptions value)
               throw new NullPointerException();
             }
             optimizerOptions_ = value;
    -        onChanged();
           } else {
             optimizerOptionsBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return this;
         }
         /**
    @@ -874,11 +869,11 @@ public Builder setOptimizerOptions(
             org.tensorflow.proto.OptimizerOptions.Builder builderForValue) {
           if (optimizerOptionsBuilder_ == null) {
             optimizerOptions_ = builderForValue.build();
    -        onChanged();
           } else {
             optimizerOptionsBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return this;
         }
         /**
    @@ -890,17 +885,20 @@ public Builder setOptimizerOptions(
          */
         public Builder mergeOptimizerOptions(org.tensorflow.proto.OptimizerOptions value) {
           if (optimizerOptionsBuilder_ == null) {
    -        if (optimizerOptions_ != null) {
    -          optimizerOptions_ =
    -            org.tensorflow.proto.OptimizerOptions.newBuilder(optimizerOptions_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000002) != 0) &&
    +          optimizerOptions_ != null &&
    +          optimizerOptions_ != org.tensorflow.proto.OptimizerOptions.getDefaultInstance()) {
    +          getOptimizerOptionsBuilder().mergeFrom(value);
             } else {
               optimizerOptions_ = value;
             }
    -        onChanged();
           } else {
             optimizerOptionsBuilder_.mergeFrom(value);
           }
    -
    +      if (optimizerOptions_ != null) {
    +        bitField0_ |= 0x00000002;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -911,14 +909,13 @@ public Builder mergeOptimizerOptions(org.tensorflow.proto.OptimizerOptions value
          * .tensorflow.OptimizerOptions optimizer_options = 3;
          */
         public Builder clearOptimizerOptions() {
    -      if (optimizerOptionsBuilder_ == null) {
    -        optimizerOptions_ = null;
    -        onChanged();
    -      } else {
    -        optimizerOptions_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000002);
    +      optimizerOptions_ = null;
    +      if (optimizerOptionsBuilder_ != null) {
    +        optimizerOptionsBuilder_.dispose();
             optimizerOptionsBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -929,7 +926,7 @@ public Builder clearOptimizerOptions() {
          * .tensorflow.OptimizerOptions optimizer_options = 3;
          */
         public org.tensorflow.proto.OptimizerOptions.Builder getOptimizerOptionsBuilder() {
    -      
    +      bitField0_ |= 0x00000002;
           onChanged();
           return getOptimizerOptionsFieldBuilder().getBuilder();
         }
    @@ -955,11 +952,11 @@ public org.tensorflow.proto.OptimizerOptionsOrBuilder getOptimizerOptionsOrBuild
          *
          * .tensorflow.OptimizerOptions optimizer_options = 3;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.OptimizerOptions, org.tensorflow.proto.OptimizerOptions.Builder, org.tensorflow.proto.OptimizerOptionsOrBuilder> 
             getOptimizerOptionsFieldBuilder() {
           if (optimizerOptionsBuilder_ == null) {
    -        optimizerOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        optimizerOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.OptimizerOptions, org.tensorflow.proto.OptimizerOptions.Builder, org.tensorflow.proto.OptimizerOptionsOrBuilder>(
                     getOptimizerOptions(),
                     getParentForChildren(),
    @@ -996,8 +993,9 @@ public long getBuildCostModel() {
          * @return This builder for chaining.
          */
         public Builder setBuildCostModel(long value) {
    -      
    +
           buildCostModel_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -1012,7 +1010,7 @@ public Builder setBuildCostModel(long value) {
          * @return This builder for chaining.
          */
         public Builder clearBuildCostModel() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000004);
           buildCostModel_ = 0L;
           onChanged();
           return this;
    @@ -1043,8 +1041,9 @@ public long getBuildCostModelAfter() {
          * @return This builder for chaining.
          */
         public Builder setBuildCostModelAfter(long value) {
    -      
    +
           buildCostModelAfter_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -1058,7 +1057,7 @@ public Builder setBuildCostModelAfter(long value) {
          * @return This builder for chaining.
          */
         public Builder clearBuildCostModelAfter() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000008);
           buildCostModelAfter_ = 0L;
           onChanged();
           return this;
    @@ -1089,8 +1088,9 @@ public boolean getInferShapes() {
          * @return This builder for chaining.
          */
         public Builder setInferShapes(boolean value) {
    -      
    +
           inferShapes_ = value;
    +      bitField0_ |= 0x00000010;
           onChanged();
           return this;
         }
    @@ -1104,7 +1104,7 @@ public Builder setInferShapes(boolean value) {
          * @return This builder for chaining.
          */
         public Builder clearInferShapes() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000010);
           inferShapes_ = false;
           onChanged();
           return this;
    @@ -1114,6 +1114,7 @@ public Builder clearInferShapes() {
         /**
          * 
          * Only place the subgraphs that are run, rather than the entire graph.
    +     *
          * This is useful for interactive graph building, where one might
          * produce graphs that cannot be placed during the debugging
          * process.  In particular, it allows the client to continue work in
    @@ -1131,6 +1132,7 @@ public boolean getPlacePrunedGraph() {
         /**
          * 
          * Only place the subgraphs that are run, rather than the entire graph.
    +     *
          * This is useful for interactive graph building, where one might
          * produce graphs that cannot be placed during the debugging
          * process.  In particular, it allows the client to continue work in
    @@ -1143,14 +1145,16 @@ public boolean getPlacePrunedGraph() {
          * @return This builder for chaining.
          */
         public Builder setPlacePrunedGraph(boolean value) {
    -      
    +
           placePrunedGraph_ = value;
    +      bitField0_ |= 0x00000020;
           onChanged();
           return this;
         }
         /**
          * 
          * Only place the subgraphs that are run, rather than the entire graph.
    +     *
          * This is useful for interactive graph building, where one might
          * produce graphs that cannot be placed during the debugging
          * process.  In particular, it allows the client to continue work in
    @@ -1162,7 +1166,7 @@ public Builder setPlacePrunedGraph(boolean value) {
          * @return This builder for chaining.
          */
         public Builder clearPlacePrunedGraph() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000020);
           placePrunedGraph_ = false;
           onChanged();
           return this;
    @@ -1191,8 +1195,9 @@ public boolean getEnableBfloat16Sendrecv() {
          * @return This builder for chaining.
          */
         public Builder setEnableBfloat16Sendrecv(boolean value) {
    -      
    +
           enableBfloat16Sendrecv_ = value;
    +      bitField0_ |= 0x00000040;
           onChanged();
           return this;
         }
    @@ -1205,7 +1210,7 @@ public Builder setEnableBfloat16Sendrecv(boolean value) {
          * @return This builder for chaining.
          */
         public Builder clearEnableBfloat16Sendrecv() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000040);
           enableBfloat16Sendrecv_ = false;
           onChanged();
           return this;
    @@ -1236,8 +1241,9 @@ public int getTimelineStep() {
          * @return This builder for chaining.
          */
         public Builder setTimelineStep(int value) {
    -      
    +
           timelineStep_ = value;
    +      bitField0_ |= 0x00000080;
           onChanged();
           return this;
         }
    @@ -1251,14 +1257,14 @@ public Builder setTimelineStep(int value) {
          * @return This builder for chaining.
          */
         public Builder clearTimelineStep() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000080);
           timelineStep_ = 0;
           onChanged();
           return this;
         }
     
         private org.tensorflow.proto.RewriterConfig rewriteOptions_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.RewriterConfig, org.tensorflow.proto.RewriterConfig.Builder, org.tensorflow.proto.RewriterConfigOrBuilder> rewriteOptionsBuilder_;
         /**
          * 
    @@ -1271,7 +1277,7 @@ public Builder clearTimelineStep() {
          * @return Whether the rewriteOptions field is set.
          */
         public boolean hasRewriteOptions() {
    -      return rewriteOptionsBuilder_ != null || rewriteOptions_ != null;
    +      return ((bitField0_ & 0x00000100) != 0);
         }
         /**
          * 
    @@ -1305,11 +1311,11 @@ public Builder setRewriteOptions(org.tensorflow.proto.RewriterConfig value) {
               throw new NullPointerException();
             }
             rewriteOptions_ = value;
    -        onChanged();
           } else {
             rewriteOptionsBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000100;
    +      onChanged();
           return this;
         }
         /**
    @@ -1325,11 +1331,11 @@ public Builder setRewriteOptions(
             org.tensorflow.proto.RewriterConfig.Builder builderForValue) {
           if (rewriteOptionsBuilder_ == null) {
             rewriteOptions_ = builderForValue.build();
    -        onChanged();
           } else {
             rewriteOptionsBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000100;
    +      onChanged();
           return this;
         }
         /**
    @@ -1343,17 +1349,20 @@ public Builder setRewriteOptions(
          */
         public Builder mergeRewriteOptions(org.tensorflow.proto.RewriterConfig value) {
           if (rewriteOptionsBuilder_ == null) {
    -        if (rewriteOptions_ != null) {
    -          rewriteOptions_ =
    -            org.tensorflow.proto.RewriterConfig.newBuilder(rewriteOptions_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000100) != 0) &&
    +          rewriteOptions_ != null &&
    +          rewriteOptions_ != org.tensorflow.proto.RewriterConfig.getDefaultInstance()) {
    +          getRewriteOptionsBuilder().mergeFrom(value);
             } else {
               rewriteOptions_ = value;
             }
    -        onChanged();
           } else {
             rewriteOptionsBuilder_.mergeFrom(value);
           }
    -
    +      if (rewriteOptions_ != null) {
    +        bitField0_ |= 0x00000100;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -1366,14 +1375,13 @@ public Builder mergeRewriteOptions(org.tensorflow.proto.RewriterConfig value) {
          * .tensorflow.RewriterConfig rewrite_options = 10;
          */
         public Builder clearRewriteOptions() {
    -      if (rewriteOptionsBuilder_ == null) {
    -        rewriteOptions_ = null;
    -        onChanged();
    -      } else {
    -        rewriteOptions_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000100);
    +      rewriteOptions_ = null;
    +      if (rewriteOptionsBuilder_ != null) {
    +        rewriteOptionsBuilder_.dispose();
             rewriteOptionsBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -1386,7 +1394,7 @@ public Builder clearRewriteOptions() {
          * .tensorflow.RewriterConfig rewrite_options = 10;
          */
         public org.tensorflow.proto.RewriterConfig.Builder getRewriteOptionsBuilder() {
    -      
    +      bitField0_ |= 0x00000100;
           onChanged();
           return getRewriteOptionsFieldBuilder().getBuilder();
         }
    @@ -1416,11 +1424,11 @@ public org.tensorflow.proto.RewriterConfigOrBuilder getRewriteOptionsOrBuilder()
          *
          * .tensorflow.RewriterConfig rewrite_options = 10;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.RewriterConfig, org.tensorflow.proto.RewriterConfig.Builder, org.tensorflow.proto.RewriterConfigOrBuilder> 
             getRewriteOptionsFieldBuilder() {
           if (rewriteOptionsBuilder_ == null) {
    -        rewriteOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        rewriteOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.RewriterConfig, org.tensorflow.proto.RewriterConfig.Builder, org.tensorflow.proto.RewriterConfigOrBuilder>(
                     getRewriteOptions(),
                     getParentForChildren(),
    @@ -1429,18 +1437,6 @@ public org.tensorflow.proto.RewriterConfigOrBuilder getRewriteOptionsOrBuilder()
           }
           return rewriteOptionsBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.GraphOptions)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphOptionsOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphOptionsOrBuilder.java
    index 279f39ab0b1..7f2113d9509 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphOptionsOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphOptionsOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/config.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -82,6 +84,7 @@ public interface GraphOptionsOrBuilder extends
       /**
        * 
        * Only place the subgraphs that are run, rather than the entire graph.
    +   *
        * This is useful for interactive graph building, where one might
        * produce graphs that cannot be placed during the debugging
        * process.  In particular, it allows the client to continue work in
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphProtos.java
    index 05e2337b81e..213acdde175 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphProtos.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphProtos.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/graph.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class GraphProtos {
       private GraphProtos() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      GraphProtos.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,7 +28,7 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_GraphDef_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_GraphDef_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -55,9 +66,10 @@ public static void registerAllExtensions(
         internal_static_tensorflow_GraphDef_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_GraphDef_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_GraphDef_descriptor,
             new java.lang.String[] { "Node", "Versions", "Version", "Library", "DebugInfo", });
    +    descriptor.resolveAllFeaturesImmutable();
         org.tensorflow.proto.FunctionProtos.getDescriptor();
         org.tensorflow.proto.GraphDebugInfoProtos.getDescriptor();
         org.tensorflow.proto.NodeProto.getDescriptor();
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferConstNodeInfo.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferConstNodeInfo.java
    index 9671b60a763..4c40a27b902 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferConstNodeInfo.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferConstNodeInfo.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/graph_transfer_info.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,12 +9,21 @@
      * Protobuf type {@code tensorflow.GraphTransferConstNodeInfo}
      */
     public final class GraphTransferConstNodeInfo extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.GraphTransferConstNodeInfo)
         GraphTransferConstNodeInfoOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      GraphTransferConstNodeInfo.class.getName());
    +  }
       // Use GraphTransferConstNodeInfo.newBuilder() to construct.
    -  private GraphTransferConstNodeInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private GraphTransferConstNodeInfo(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private GraphTransferConstNodeInfo() {
    @@ -22,25 +33,13 @@ private GraphTransferConstNodeInfo() {
         dtype_ = 0;
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new GraphTransferConstNodeInfo();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferConstNodeInfo_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferConstNodeInfo_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -48,7 +47,8 @@ protected java.lang.Object newInstance(
       }
     
       public static final int NAME_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object name_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object name_ = "";
       /**
        * string name = 1;
        * @return The name.
    @@ -86,7 +86,7 @@ public java.lang.String getName() {
       }
     
       public static final int NODE_ID_FIELD_NUMBER = 2;
    -  private int nodeId_;
    +  private int nodeId_ = 0;
       /**
        * int32 node_id = 2;
        * @return The nodeId.
    @@ -97,7 +97,9 @@ public int getNodeId() {
       }
     
       public static final int SHAPE_FIELD_NUMBER = 3;
    -  private com.google.protobuf.Internal.LongList shape_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.Internal.LongList shape_ =
    +      emptyLongList();
       /**
        * repeated int64 shape = 3;
        * @return A list containing the shape.
    @@ -125,7 +127,7 @@ public long getShape(int index) {
       private int shapeMemoizedSerializedSize = -1;
     
       public static final int DATA_FIELD_NUMBER = 4;
    -  private com.google.protobuf.ByteString data_;
    +  private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY;
       /**
        * bytes data = 4;
        * @return The data.
    @@ -136,7 +138,7 @@ public com.google.protobuf.ByteString getData() {
       }
     
       public static final int DTYPE_FIELD_NUMBER = 5;
    -  private int dtype_;
    +  private int dtype_ = 0;
       /**
        * .tensorflow.DataType dtype = 5;
        * @return The enum numeric value on the wire for dtype.
    @@ -149,8 +151,7 @@ public com.google.protobuf.ByteString getData() {
        * @return The dtype.
        */
       @java.lang.Override public org.tensorflow.proto.DataType getDtype() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(dtype_);
    +    org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(dtype_);
         return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
       }
     
    @@ -169,8 +170,8 @@ public final boolean isInitialized() {
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
         getSerializedSize();
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
         }
         if (nodeId_ != 0) {
           output.writeInt32(2, nodeId_);
    @@ -197,8 +198,8 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
         }
         if (nodeId_ != 0) {
           size += com.google.protobuf.CodedOutputStream
    @@ -312,39 +313,41 @@ public static org.tensorflow.proto.GraphTransferConstNodeInfo parseFrom(
       }
       public static org.tensorflow.proto.GraphTransferConstNodeInfo parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.GraphTransferConstNodeInfo parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.GraphTransferConstNodeInfo parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.GraphTransferConstNodeInfo parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.GraphTransferConstNodeInfo parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.GraphTransferConstNodeInfo parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -364,7 +367,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -372,7 +375,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.GraphTransferConstNodeInfo}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.GraphTransferConstNodeInfo)
           org.tensorflow.proto.GraphTransferConstNodeInfoOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -381,7 +384,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferConstNodeInfo_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -394,23 +397,19 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           name_ = "";
    -
           nodeId_ = 0;
    -
           shape_ = emptyLongList();
    -      bitField0_ = (bitField0_ & ~0x00000001);
           data_ = com.google.protobuf.ByteString.EMPTY;
    -
           dtype_ = 0;
    -
           return this;
         }
     
    @@ -437,52 +436,31 @@ public org.tensorflow.proto.GraphTransferConstNodeInfo build() {
         @java.lang.Override
         public org.tensorflow.proto.GraphTransferConstNodeInfo buildPartial() {
           org.tensorflow.proto.GraphTransferConstNodeInfo result = new org.tensorflow.proto.GraphTransferConstNodeInfo(this);
    -      int from_bitField0_ = bitField0_;
    -      result.name_ = name_;
    -      result.nodeId_ = nodeId_;
    -      if (((bitField0_ & 0x00000001) != 0)) {
    -        shape_.makeImmutable();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    -      }
    -      result.shape_ = shape_;
    -      result.data_ = data_;
    -      result.dtype_ = dtype_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.GraphTransferConstNodeInfo result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.name_ = name_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.nodeId_ = nodeId_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        shape_.makeImmutable();
    +        result.shape_ = shape_;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.data_ = data_;
    +      }
    +      if (((from_bitField0_ & 0x00000010) != 0)) {
    +        result.dtype_ = dtype_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.GraphTransferConstNodeInfo) {
    @@ -497,6 +475,7 @@ public Builder mergeFrom(org.tensorflow.proto.GraphTransferConstNodeInfo other)
           if (other == org.tensorflow.proto.GraphTransferConstNodeInfo.getDefaultInstance()) return this;
           if (!other.getName().isEmpty()) {
             name_ = other.name_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (other.getNodeId() != 0) {
    @@ -505,7 +484,8 @@ public Builder mergeFrom(org.tensorflow.proto.GraphTransferConstNodeInfo other)
           if (!other.shape_.isEmpty()) {
             if (shape_.isEmpty()) {
               shape_ = other.shape_;
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          shape_.makeImmutable();
    +          bitField0_ |= 0x00000004;
             } else {
               ensureShapeIsMutable();
               shape_.addAll(other.shape_);
    @@ -546,12 +526,12 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   name_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 16: {
                   nodeId_ = input.readInt32();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 16
                 case 24: {
    @@ -572,12 +552,12 @@ public Builder mergeFrom(
                 } // case 26
                 case 34: {
                   data_ = input.readBytes();
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 34
                 case 40: {
                   dtype_ = input.readEnum();
    -
    +              bitField0_ |= 0x00000010;
                   break;
                 } // case 40
                 default: {
    @@ -638,11 +618,9 @@ public java.lang.String getName() {
          */
         public Builder setName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           name_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -651,8 +629,8 @@ public Builder setName(
          * @return This builder for chaining.
          */
         public Builder clearName() {
    -      
           name_ = getDefaultInstance().getName();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -663,12 +641,10 @@ public Builder clearName() {
          */
         public Builder setNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           name_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -688,8 +664,9 @@ public int getNodeId() {
          * @return This builder for chaining.
          */
         public Builder setNodeId(int value) {
    -      
    +
           nodeId_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -698,7 +675,7 @@ public Builder setNodeId(int value) {
          * @return This builder for chaining.
          */
         public Builder clearNodeId() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000002);
           nodeId_ = 0;
           onChanged();
           return this;
    @@ -706,10 +683,10 @@ public Builder clearNodeId() {
     
         private com.google.protobuf.Internal.LongList shape_ = emptyLongList();
         private void ensureShapeIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    -        shape_ = mutableCopy(shape_);
    -        bitField0_ |= 0x00000001;
    -       }
    +      if (!shape_.isModifiable()) {
    +        shape_ = makeMutableCopy(shape_);
    +      }
    +      bitField0_ |= 0x00000004;
         }
         /**
          * repeated int64 shape = 3;
    @@ -717,8 +694,8 @@ private void ensureShapeIsMutable() {
          */
         public java.util.List
             getShapeList() {
    -      return ((bitField0_ & 0x00000001) != 0) ?
    -               java.util.Collections.unmodifiableList(shape_) : shape_;
    +      shape_.makeImmutable();
    +      return shape_;
         }
         /**
          * repeated int64 shape = 3;
    @@ -743,8 +720,10 @@ public long getShape(int index) {
          */
         public Builder setShape(
             int index, long value) {
    +
           ensureShapeIsMutable();
           shape_.setLong(index, value);
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -754,8 +733,10 @@ public Builder setShape(
          * @return This builder for chaining.
          */
         public Builder addShape(long value) {
    +
           ensureShapeIsMutable();
           shape_.addLong(value);
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -769,6 +750,7 @@ public Builder addAllShape(
           ensureShapeIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, shape_);
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -778,7 +760,7 @@ public Builder addAllShape(
          */
         public Builder clearShape() {
           shape_ = emptyLongList();
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      bitField0_ = (bitField0_ & ~0x00000004);
           onChanged();
           return this;
         }
    @@ -798,11 +780,9 @@ public com.google.protobuf.ByteString getData() {
          * @return This builder for chaining.
          */
         public Builder setData(com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           data_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -811,7 +791,7 @@ public Builder setData(com.google.protobuf.ByteString value) {
          * @return This builder for chaining.
          */
         public Builder clearData() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000008);
           data_ = getDefaultInstance().getData();
           onChanged();
           return this;
    @@ -831,8 +811,8 @@ public Builder clearData() {
          * @return This builder for chaining.
          */
         public Builder setDtypeValue(int value) {
    -      
           dtype_ = value;
    +      bitField0_ |= 0x00000010;
           onChanged();
           return this;
         }
    @@ -842,8 +822,7 @@ public Builder setDtypeValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.DataType getDtype() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(dtype_);
    +      org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(dtype_);
           return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
         }
         /**
    @@ -855,7 +834,7 @@ public Builder setDtype(org.tensorflow.proto.DataType value) {
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00000010;
           dtype_ = value.getNumber();
           onChanged();
           return this;
    @@ -865,23 +844,11 @@ public Builder setDtype(org.tensorflow.proto.DataType value) {
          * @return This builder for chaining.
          */
         public Builder clearDtype() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000010);
           dtype_ = 0;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.GraphTransferConstNodeInfo)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferConstNodeInfoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferConstNodeInfoOrBuilder.java
    index b77bf57be9c..642428d772f 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferConstNodeInfoOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferConstNodeInfoOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/graph_transfer_info.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferGraphInputNodeInfo.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferGraphInputNodeInfo.java
    index 12f7c5ae7f6..2c57c86a711 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferGraphInputNodeInfo.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferGraphInputNodeInfo.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/graph_transfer_info.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,12 +9,21 @@
      * Protobuf type {@code tensorflow.GraphTransferGraphInputNodeInfo}
      */
     public final class GraphTransferGraphInputNodeInfo extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.GraphTransferGraphInputNodeInfo)
         GraphTransferGraphInputNodeInfoOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      GraphTransferGraphInputNodeInfo.class.getName());
    +  }
       // Use GraphTransferGraphInputNodeInfo.newBuilder() to construct.
    -  private GraphTransferGraphInputNodeInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private GraphTransferGraphInputNodeInfo(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private GraphTransferGraphInputNodeInfo() {
    @@ -21,25 +32,13 @@ private GraphTransferGraphInputNodeInfo() {
         dtype_ = 0;
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new GraphTransferGraphInputNodeInfo();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferGraphInputNodeInfo_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferGraphInputNodeInfo_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -47,7 +46,8 @@ protected java.lang.Object newInstance(
       }
     
       public static final int NAME_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object name_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object name_ = "";
       /**
        * string name = 1;
        * @return The name.
    @@ -85,7 +85,9 @@ public java.lang.String getName() {
       }
     
       public static final int SHAPE_FIELD_NUMBER = 2;
    -  private com.google.protobuf.Internal.LongList shape_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.Internal.LongList shape_ =
    +      emptyLongList();
       /**
        * repeated int64 shape = 2;
        * @return A list containing the shape.
    @@ -113,7 +115,7 @@ public long getShape(int index) {
       private int shapeMemoizedSerializedSize = -1;
     
       public static final int DTYPE_FIELD_NUMBER = 3;
    -  private int dtype_;
    +  private int dtype_ = 0;
       /**
        * .tensorflow.DataType dtype = 3;
        * @return The enum numeric value on the wire for dtype.
    @@ -126,8 +128,7 @@ public long getShape(int index) {
        * @return The dtype.
        */
       @java.lang.Override public org.tensorflow.proto.DataType getDtype() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(dtype_);
    +    org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(dtype_);
         return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
       }
     
    @@ -146,8 +147,8 @@ public final boolean isInitialized() {
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
         getSerializedSize();
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
         }
         if (getShapeList().size() > 0) {
           output.writeUInt32NoTag(18);
    @@ -168,8 +169,8 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
         }
         {
           int dataSize = 0;
    @@ -267,39 +268,41 @@ public static org.tensorflow.proto.GraphTransferGraphInputNodeInfo parseFrom(
       }
       public static org.tensorflow.proto.GraphTransferGraphInputNodeInfo parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.GraphTransferGraphInputNodeInfo parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.GraphTransferGraphInputNodeInfo parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.GraphTransferGraphInputNodeInfo parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.GraphTransferGraphInputNodeInfo parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.GraphTransferGraphInputNodeInfo parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -319,7 +322,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -327,7 +330,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.GraphTransferGraphInputNodeInfo}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.GraphTransferGraphInputNodeInfo)
           org.tensorflow.proto.GraphTransferGraphInputNodeInfoOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -336,7 +339,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferGraphInputNodeInfo_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -349,19 +352,17 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           name_ = "";
    -
           shape_ = emptyLongList();
    -      bitField0_ = (bitField0_ & ~0x00000001);
           dtype_ = 0;
    -
           return this;
         }
     
    @@ -388,50 +389,25 @@ public org.tensorflow.proto.GraphTransferGraphInputNodeInfo build() {
         @java.lang.Override
         public org.tensorflow.proto.GraphTransferGraphInputNodeInfo buildPartial() {
           org.tensorflow.proto.GraphTransferGraphInputNodeInfo result = new org.tensorflow.proto.GraphTransferGraphInputNodeInfo(this);
    -      int from_bitField0_ = bitField0_;
    -      result.name_ = name_;
    -      if (((bitField0_ & 0x00000001) != 0)) {
    -        shape_.makeImmutable();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    -      }
    -      result.shape_ = shape_;
    -      result.dtype_ = dtype_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.GraphTransferGraphInputNodeInfo result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.name_ = name_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        shape_.makeImmutable();
    +        result.shape_ = shape_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.dtype_ = dtype_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.GraphTransferGraphInputNodeInfo) {
    @@ -446,12 +422,14 @@ public Builder mergeFrom(org.tensorflow.proto.GraphTransferGraphInputNodeInfo ot
           if (other == org.tensorflow.proto.GraphTransferGraphInputNodeInfo.getDefaultInstance()) return this;
           if (!other.getName().isEmpty()) {
             name_ = other.name_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (!other.shape_.isEmpty()) {
             if (shape_.isEmpty()) {
               shape_ = other.shape_;
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          shape_.makeImmutable();
    +          bitField0_ |= 0x00000002;
             } else {
               ensureShapeIsMutable();
               shape_.addAll(other.shape_);
    @@ -489,7 +467,7 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   name_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 16: {
    @@ -510,7 +488,7 @@ public Builder mergeFrom(
                 } // case 18
                 case 24: {
                   dtype_ = input.readEnum();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 24
                 default: {
    @@ -571,11 +549,9 @@ public java.lang.String getName() {
          */
         public Builder setName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           name_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -584,8 +560,8 @@ public Builder setName(
          * @return This builder for chaining.
          */
         public Builder clearName() {
    -      
           name_ = getDefaultInstance().getName();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -596,22 +572,20 @@ public Builder clearName() {
          */
         public Builder setNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           name_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
     
         private com.google.protobuf.Internal.LongList shape_ = emptyLongList();
         private void ensureShapeIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    -        shape_ = mutableCopy(shape_);
    -        bitField0_ |= 0x00000001;
    -       }
    +      if (!shape_.isModifiable()) {
    +        shape_ = makeMutableCopy(shape_);
    +      }
    +      bitField0_ |= 0x00000002;
         }
         /**
          * repeated int64 shape = 2;
    @@ -619,8 +593,8 @@ private void ensureShapeIsMutable() {
          */
         public java.util.List
             getShapeList() {
    -      return ((bitField0_ & 0x00000001) != 0) ?
    -               java.util.Collections.unmodifiableList(shape_) : shape_;
    +      shape_.makeImmutable();
    +      return shape_;
         }
         /**
          * repeated int64 shape = 2;
    @@ -645,8 +619,10 @@ public long getShape(int index) {
          */
         public Builder setShape(
             int index, long value) {
    +
           ensureShapeIsMutable();
           shape_.setLong(index, value);
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -656,8 +632,10 @@ public Builder setShape(
          * @return This builder for chaining.
          */
         public Builder addShape(long value) {
    +
           ensureShapeIsMutable();
           shape_.addLong(value);
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -671,6 +649,7 @@ public Builder addAllShape(
           ensureShapeIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, shape_);
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -680,7 +659,7 @@ public Builder addAllShape(
          */
         public Builder clearShape() {
           shape_ = emptyLongList();
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      bitField0_ = (bitField0_ & ~0x00000002);
           onChanged();
           return this;
         }
    @@ -699,8 +678,8 @@ public Builder clearShape() {
          * @return This builder for chaining.
          */
         public Builder setDtypeValue(int value) {
    -      
           dtype_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -710,8 +689,7 @@ public Builder setDtypeValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.DataType getDtype() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(dtype_);
    +      org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(dtype_);
           return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
         }
         /**
    @@ -723,7 +701,7 @@ public Builder setDtype(org.tensorflow.proto.DataType value) {
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00000004;
           dtype_ = value.getNumber();
           onChanged();
           return this;
    @@ -733,23 +711,11 @@ public Builder setDtype(org.tensorflow.proto.DataType value) {
          * @return This builder for chaining.
          */
         public Builder clearDtype() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000004);
           dtype_ = 0;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.GraphTransferGraphInputNodeInfo)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferGraphInputNodeInfoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferGraphInputNodeInfoOrBuilder.java
    index cf9985eff27..3b063adca63 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferGraphInputNodeInfoOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferGraphInputNodeInfoOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/graph_transfer_info.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferGraphOutputNodeInfo.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferGraphOutputNodeInfo.java
    index 530c70ff61f..2968ce25539 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferGraphOutputNodeInfo.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferGraphOutputNodeInfo.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/graph_transfer_info.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,12 +9,21 @@
      * Protobuf type {@code tensorflow.GraphTransferGraphOutputNodeInfo}
      */
     public final class GraphTransferGraphOutputNodeInfo extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.GraphTransferGraphOutputNodeInfo)
         GraphTransferGraphOutputNodeInfoOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      GraphTransferGraphOutputNodeInfo.class.getName());
    +  }
       // Use GraphTransferGraphOutputNodeInfo.newBuilder() to construct.
    -  private GraphTransferGraphOutputNodeInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private GraphTransferGraphOutputNodeInfo(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private GraphTransferGraphOutputNodeInfo() {
    @@ -21,25 +32,13 @@ private GraphTransferGraphOutputNodeInfo() {
         dtype_ = 0;
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new GraphTransferGraphOutputNodeInfo();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferGraphOutputNodeInfo_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferGraphOutputNodeInfo_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -47,7 +46,8 @@ protected java.lang.Object newInstance(
       }
     
       public static final int NAME_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object name_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object name_ = "";
       /**
        * string name = 1;
        * @return The name.
    @@ -85,7 +85,9 @@ public java.lang.String getName() {
       }
     
       public static final int SHAPE_FIELD_NUMBER = 2;
    -  private com.google.protobuf.Internal.LongList shape_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.Internal.LongList shape_ =
    +      emptyLongList();
       /**
        * repeated int64 shape = 2;
        * @return A list containing the shape.
    @@ -113,7 +115,7 @@ public long getShape(int index) {
       private int shapeMemoizedSerializedSize = -1;
     
       public static final int DTYPE_FIELD_NUMBER = 3;
    -  private int dtype_;
    +  private int dtype_ = 0;
       /**
        * .tensorflow.DataType dtype = 3;
        * @return The enum numeric value on the wire for dtype.
    @@ -126,8 +128,7 @@ public long getShape(int index) {
        * @return The dtype.
        */
       @java.lang.Override public org.tensorflow.proto.DataType getDtype() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(dtype_);
    +    org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(dtype_);
         return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
       }
     
    @@ -146,8 +147,8 @@ public final boolean isInitialized() {
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
         getSerializedSize();
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
         }
         if (getShapeList().size() > 0) {
           output.writeUInt32NoTag(18);
    @@ -168,8 +169,8 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
         }
         {
           int dataSize = 0;
    @@ -267,39 +268,41 @@ public static org.tensorflow.proto.GraphTransferGraphOutputNodeInfo parseFrom(
       }
       public static org.tensorflow.proto.GraphTransferGraphOutputNodeInfo parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.GraphTransferGraphOutputNodeInfo parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.GraphTransferGraphOutputNodeInfo parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.GraphTransferGraphOutputNodeInfo parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.GraphTransferGraphOutputNodeInfo parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.GraphTransferGraphOutputNodeInfo parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -319,7 +322,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -327,7 +330,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.GraphTransferGraphOutputNodeInfo}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.GraphTransferGraphOutputNodeInfo)
           org.tensorflow.proto.GraphTransferGraphOutputNodeInfoOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -336,7 +339,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferGraphOutputNodeInfo_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -349,19 +352,17 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           name_ = "";
    -
           shape_ = emptyLongList();
    -      bitField0_ = (bitField0_ & ~0x00000001);
           dtype_ = 0;
    -
           return this;
         }
     
    @@ -388,50 +389,25 @@ public org.tensorflow.proto.GraphTransferGraphOutputNodeInfo build() {
         @java.lang.Override
         public org.tensorflow.proto.GraphTransferGraphOutputNodeInfo buildPartial() {
           org.tensorflow.proto.GraphTransferGraphOutputNodeInfo result = new org.tensorflow.proto.GraphTransferGraphOutputNodeInfo(this);
    -      int from_bitField0_ = bitField0_;
    -      result.name_ = name_;
    -      if (((bitField0_ & 0x00000001) != 0)) {
    -        shape_.makeImmutable();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    -      }
    -      result.shape_ = shape_;
    -      result.dtype_ = dtype_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.GraphTransferGraphOutputNodeInfo result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.name_ = name_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        shape_.makeImmutable();
    +        result.shape_ = shape_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.dtype_ = dtype_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.GraphTransferGraphOutputNodeInfo) {
    @@ -446,12 +422,14 @@ public Builder mergeFrom(org.tensorflow.proto.GraphTransferGraphOutputNodeInfo o
           if (other == org.tensorflow.proto.GraphTransferGraphOutputNodeInfo.getDefaultInstance()) return this;
           if (!other.getName().isEmpty()) {
             name_ = other.name_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (!other.shape_.isEmpty()) {
             if (shape_.isEmpty()) {
               shape_ = other.shape_;
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          shape_.makeImmutable();
    +          bitField0_ |= 0x00000002;
             } else {
               ensureShapeIsMutable();
               shape_.addAll(other.shape_);
    @@ -489,7 +467,7 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   name_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 16: {
    @@ -510,7 +488,7 @@ public Builder mergeFrom(
                 } // case 18
                 case 24: {
                   dtype_ = input.readEnum();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 24
                 default: {
    @@ -571,11 +549,9 @@ public java.lang.String getName() {
          */
         public Builder setName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           name_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -584,8 +560,8 @@ public Builder setName(
          * @return This builder for chaining.
          */
         public Builder clearName() {
    -      
           name_ = getDefaultInstance().getName();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -596,22 +572,20 @@ public Builder clearName() {
          */
         public Builder setNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           name_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
     
         private com.google.protobuf.Internal.LongList shape_ = emptyLongList();
         private void ensureShapeIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    -        shape_ = mutableCopy(shape_);
    -        bitField0_ |= 0x00000001;
    -       }
    +      if (!shape_.isModifiable()) {
    +        shape_ = makeMutableCopy(shape_);
    +      }
    +      bitField0_ |= 0x00000002;
         }
         /**
          * repeated int64 shape = 2;
    @@ -619,8 +593,8 @@ private void ensureShapeIsMutable() {
          */
         public java.util.List
             getShapeList() {
    -      return ((bitField0_ & 0x00000001) != 0) ?
    -               java.util.Collections.unmodifiableList(shape_) : shape_;
    +      shape_.makeImmutable();
    +      return shape_;
         }
         /**
          * repeated int64 shape = 2;
    @@ -645,8 +619,10 @@ public long getShape(int index) {
          */
         public Builder setShape(
             int index, long value) {
    +
           ensureShapeIsMutable();
           shape_.setLong(index, value);
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -656,8 +632,10 @@ public Builder setShape(
          * @return This builder for chaining.
          */
         public Builder addShape(long value) {
    +
           ensureShapeIsMutable();
           shape_.addLong(value);
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -671,6 +649,7 @@ public Builder addAllShape(
           ensureShapeIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, shape_);
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -680,7 +659,7 @@ public Builder addAllShape(
          */
         public Builder clearShape() {
           shape_ = emptyLongList();
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      bitField0_ = (bitField0_ & ~0x00000002);
           onChanged();
           return this;
         }
    @@ -699,8 +678,8 @@ public Builder clearShape() {
          * @return This builder for chaining.
          */
         public Builder setDtypeValue(int value) {
    -      
           dtype_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -710,8 +689,7 @@ public Builder setDtypeValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.DataType getDtype() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(dtype_);
    +      org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(dtype_);
           return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
         }
         /**
    @@ -723,7 +701,7 @@ public Builder setDtype(org.tensorflow.proto.DataType value) {
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00000004;
           dtype_ = value.getNumber();
           onChanged();
           return this;
    @@ -733,23 +711,11 @@ public Builder setDtype(org.tensorflow.proto.DataType value) {
          * @return This builder for chaining.
          */
         public Builder clearDtype() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000004);
           dtype_ = 0;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.GraphTransferGraphOutputNodeInfo)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferGraphOutputNodeInfoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferGraphOutputNodeInfoOrBuilder.java
    index 5ab55651662..f645fdf04f7 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferGraphOutputNodeInfoOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferGraphOutputNodeInfoOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/graph_transfer_info.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferInfo.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferInfo.java
    index f7f38d543f8..b5bf73cd37c 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferInfo.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferInfo.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/graph_transfer_info.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -13,12 +15,21 @@
      * Protobuf type {@code tensorflow.GraphTransferInfo}
      */
     public final class GraphTransferInfo extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.GraphTransferInfo)
         GraphTransferInfoOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      GraphTransferInfo.class.getName());
    +  }
       // Use GraphTransferInfo.newBuilder() to construct.
    -  private GraphTransferInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private GraphTransferInfo(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private GraphTransferInfo() {
    @@ -31,25 +42,13 @@ private GraphTransferInfo() {
         destination_ = 0;
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new GraphTransferInfo();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferInfo_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferInfo_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -72,6 +71,15 @@ public enum Destination
         UNRECOGNIZED(-1),
         ;
     
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        Destination.class.getName());
    +    }
         /**
          * NOP = 0;
          */
    @@ -165,6 +173,7 @@ private Destination(int value) {
       }
     
       public static final int NODE_INFO_FIELD_NUMBER = 1;
    +  @SuppressWarnings("serial")
       private java.util.List nodeInfo_;
       /**
        * repeated .tensorflow.GraphTransferNodeInfo node_info = 1;
    @@ -205,6 +214,7 @@ public org.tensorflow.proto.GraphTransferNodeInfoOrBuilder getNodeInfoOrBuilder(
       }
     
       public static final int CONST_NODE_INFO_FIELD_NUMBER = 2;
    +  @SuppressWarnings("serial")
       private java.util.List constNodeInfo_;
       /**
        * repeated .tensorflow.GraphTransferConstNodeInfo const_node_info = 2;
    @@ -245,6 +255,7 @@ public org.tensorflow.proto.GraphTransferConstNodeInfoOrBuilder getConstNodeInfo
       }
     
       public static final int NODE_INPUT_INFO_FIELD_NUMBER = 3;
    +  @SuppressWarnings("serial")
       private java.util.List nodeInputInfo_;
       /**
        * repeated .tensorflow.GraphTransferNodeInputInfo node_input_info = 3;
    @@ -285,6 +296,7 @@ public org.tensorflow.proto.GraphTransferNodeInputInfoOrBuilder getNodeInputInfo
       }
     
       public static final int NODE_OUTPUT_INFO_FIELD_NUMBER = 4;
    +  @SuppressWarnings("serial")
       private java.util.List nodeOutputInfo_;
       /**
        * repeated .tensorflow.GraphTransferNodeOutputInfo node_output_info = 4;
    @@ -325,6 +337,7 @@ public org.tensorflow.proto.GraphTransferNodeOutputInfoOrBuilder getNodeOutputIn
       }
     
       public static final int GRAPH_INPUT_NODE_INFO_FIELD_NUMBER = 5;
    +  @SuppressWarnings("serial")
       private java.util.List graphInputNodeInfo_;
       /**
        * 
    @@ -385,6 +398,7 @@ public org.tensorflow.proto.GraphTransferGraphInputNodeInfoOrBuilder getGraphInp
       }
     
       public static final int GRAPH_OUTPUT_NODE_INFO_FIELD_NUMBER = 6;
    +  @SuppressWarnings("serial")
       private java.util.List graphOutputNodeInfo_;
       /**
        * repeated .tensorflow.GraphTransferGraphOutputNodeInfo graph_output_node_info = 6;
    @@ -425,7 +439,7 @@ public org.tensorflow.proto.GraphTransferGraphOutputNodeInfoOrBuilder getGraphOu
       }
     
       public static final int DESTINATION_FIELD_NUMBER = 7;
    -  private int destination_;
    +  private int destination_ = 0;
       /**
        * 
        * Destination of graph transfer
    @@ -446,8 +460,7 @@ public org.tensorflow.proto.GraphTransferGraphOutputNodeInfoOrBuilder getGraphOu
        * @return The destination.
        */
       @java.lang.Override public org.tensorflow.proto.GraphTransferInfo.Destination getDestination() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.GraphTransferInfo.Destination result = org.tensorflow.proto.GraphTransferInfo.Destination.valueOf(destination_);
    +    org.tensorflow.proto.GraphTransferInfo.Destination result = org.tensorflow.proto.GraphTransferInfo.Destination.forNumber(destination_);
         return result == null ? org.tensorflow.proto.GraphTransferInfo.Destination.UNRECOGNIZED : result;
       }
     
    @@ -627,39 +640,41 @@ public static org.tensorflow.proto.GraphTransferInfo parseFrom(
       }
       public static org.tensorflow.proto.GraphTransferInfo parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.GraphTransferInfo parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.GraphTransferInfo parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.GraphTransferInfo parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.GraphTransferInfo parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.GraphTransferInfo parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -679,7 +694,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -693,7 +708,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.GraphTransferInfo}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.GraphTransferInfo)
           org.tensorflow.proto.GraphTransferInfoOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -702,7 +717,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferInfo_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -715,13 +730,14 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           if (nodeInfoBuilder_ == null) {
             nodeInfo_ = java.util.Collections.emptyList();
           } else {
    @@ -765,7 +781,6 @@ public Builder clear() {
           }
           bitField0_ = (bitField0_ & ~0x00000020);
           destination_ = 0;
    -
           return this;
         }
     
    @@ -792,7 +807,13 @@ public org.tensorflow.proto.GraphTransferInfo build() {
         @java.lang.Override
         public org.tensorflow.proto.GraphTransferInfo buildPartial() {
           org.tensorflow.proto.GraphTransferInfo result = new org.tensorflow.proto.GraphTransferInfo(this);
    -      int from_bitField0_ = bitField0_;
    +      buildPartialRepeatedFields(result);
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartialRepeatedFields(org.tensorflow.proto.GraphTransferInfo result) {
           if (nodeInfoBuilder_ == null) {
             if (((bitField0_ & 0x00000001) != 0)) {
               nodeInfo_ = java.util.Collections.unmodifiableList(nodeInfo_);
    @@ -847,43 +868,15 @@ public org.tensorflow.proto.GraphTransferInfo buildPartial() {
           } else {
             result.graphOutputNodeInfo_ = graphOutputNodeInfoBuilder_.build();
           }
    -      result.destination_ = destination_;
    -      onBuilt();
    -      return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.GraphTransferInfo result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000040) != 0)) {
    +        result.destination_ = destination_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.GraphTransferInfo) {
    @@ -915,7 +908,7 @@ public Builder mergeFrom(org.tensorflow.proto.GraphTransferInfo other) {
                 nodeInfo_ = other.nodeInfo_;
                 bitField0_ = (bitField0_ & ~0x00000001);
                 nodeInfoBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getNodeInfoFieldBuilder() : null;
               } else {
                 nodeInfoBuilder_.addAllMessages(other.nodeInfo_);
    @@ -941,7 +934,7 @@ public Builder mergeFrom(org.tensorflow.proto.GraphTransferInfo other) {
                 constNodeInfo_ = other.constNodeInfo_;
                 bitField0_ = (bitField0_ & ~0x00000002);
                 constNodeInfoBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getConstNodeInfoFieldBuilder() : null;
               } else {
                 constNodeInfoBuilder_.addAllMessages(other.constNodeInfo_);
    @@ -967,7 +960,7 @@ public Builder mergeFrom(org.tensorflow.proto.GraphTransferInfo other) {
                 nodeInputInfo_ = other.nodeInputInfo_;
                 bitField0_ = (bitField0_ & ~0x00000004);
                 nodeInputInfoBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getNodeInputInfoFieldBuilder() : null;
               } else {
                 nodeInputInfoBuilder_.addAllMessages(other.nodeInputInfo_);
    @@ -993,7 +986,7 @@ public Builder mergeFrom(org.tensorflow.proto.GraphTransferInfo other) {
                 nodeOutputInfo_ = other.nodeOutputInfo_;
                 bitField0_ = (bitField0_ & ~0x00000008);
                 nodeOutputInfoBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getNodeOutputInfoFieldBuilder() : null;
               } else {
                 nodeOutputInfoBuilder_.addAllMessages(other.nodeOutputInfo_);
    @@ -1019,7 +1012,7 @@ public Builder mergeFrom(org.tensorflow.proto.GraphTransferInfo other) {
                 graphInputNodeInfo_ = other.graphInputNodeInfo_;
                 bitField0_ = (bitField0_ & ~0x00000010);
                 graphInputNodeInfoBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getGraphInputNodeInfoFieldBuilder() : null;
               } else {
                 graphInputNodeInfoBuilder_.addAllMessages(other.graphInputNodeInfo_);
    @@ -1045,7 +1038,7 @@ public Builder mergeFrom(org.tensorflow.proto.GraphTransferInfo other) {
                 graphOutputNodeInfo_ = other.graphOutputNodeInfo_;
                 bitField0_ = (bitField0_ & ~0x00000020);
                 graphOutputNodeInfoBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getGraphOutputNodeInfoFieldBuilder() : null;
               } else {
                 graphOutputNodeInfoBuilder_.addAllMessages(other.graphOutputNodeInfo_);
    @@ -1161,7 +1154,7 @@ public Builder mergeFrom(
                 } // case 50
                 case 56: {
                   destination_ = input.readEnum();
    -
    +              bitField0_ |= 0x00000040;
                   break;
                 } // case 56
                 default: {
    @@ -1190,7 +1183,7 @@ private void ensureNodeInfoIsMutable() {
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.GraphTransferNodeInfo, org.tensorflow.proto.GraphTransferNodeInfo.Builder, org.tensorflow.proto.GraphTransferNodeInfoOrBuilder> nodeInfoBuilder_;
     
         /**
    @@ -1406,11 +1399,11 @@ public org.tensorflow.proto.GraphTransferNodeInfo.Builder addNodeInfoBuilder(
              getNodeInfoBuilderList() {
           return getNodeInfoFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.GraphTransferNodeInfo, org.tensorflow.proto.GraphTransferNodeInfo.Builder, org.tensorflow.proto.GraphTransferNodeInfoOrBuilder> 
             getNodeInfoFieldBuilder() {
           if (nodeInfoBuilder_ == null) {
    -        nodeInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        nodeInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.GraphTransferNodeInfo, org.tensorflow.proto.GraphTransferNodeInfo.Builder, org.tensorflow.proto.GraphTransferNodeInfoOrBuilder>(
                     nodeInfo_,
                     ((bitField0_ & 0x00000001) != 0),
    @@ -1430,7 +1423,7 @@ private void ensureConstNodeInfoIsMutable() {
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.GraphTransferConstNodeInfo, org.tensorflow.proto.GraphTransferConstNodeInfo.Builder, org.tensorflow.proto.GraphTransferConstNodeInfoOrBuilder> constNodeInfoBuilder_;
     
         /**
    @@ -1646,11 +1639,11 @@ public org.tensorflow.proto.GraphTransferConstNodeInfo.Builder addConstNodeInfoB
              getConstNodeInfoBuilderList() {
           return getConstNodeInfoFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.GraphTransferConstNodeInfo, org.tensorflow.proto.GraphTransferConstNodeInfo.Builder, org.tensorflow.proto.GraphTransferConstNodeInfoOrBuilder> 
             getConstNodeInfoFieldBuilder() {
           if (constNodeInfoBuilder_ == null) {
    -        constNodeInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        constNodeInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.GraphTransferConstNodeInfo, org.tensorflow.proto.GraphTransferConstNodeInfo.Builder, org.tensorflow.proto.GraphTransferConstNodeInfoOrBuilder>(
                     constNodeInfo_,
                     ((bitField0_ & 0x00000002) != 0),
    @@ -1670,7 +1663,7 @@ private void ensureNodeInputInfoIsMutable() {
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.GraphTransferNodeInputInfo, org.tensorflow.proto.GraphTransferNodeInputInfo.Builder, org.tensorflow.proto.GraphTransferNodeInputInfoOrBuilder> nodeInputInfoBuilder_;
     
         /**
    @@ -1886,11 +1879,11 @@ public org.tensorflow.proto.GraphTransferNodeInputInfo.Builder addNodeInputInfoB
              getNodeInputInfoBuilderList() {
           return getNodeInputInfoFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.GraphTransferNodeInputInfo, org.tensorflow.proto.GraphTransferNodeInputInfo.Builder, org.tensorflow.proto.GraphTransferNodeInputInfoOrBuilder> 
             getNodeInputInfoFieldBuilder() {
           if (nodeInputInfoBuilder_ == null) {
    -        nodeInputInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        nodeInputInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.GraphTransferNodeInputInfo, org.tensorflow.proto.GraphTransferNodeInputInfo.Builder, org.tensorflow.proto.GraphTransferNodeInputInfoOrBuilder>(
                     nodeInputInfo_,
                     ((bitField0_ & 0x00000004) != 0),
    @@ -1910,7 +1903,7 @@ private void ensureNodeOutputInfoIsMutable() {
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.GraphTransferNodeOutputInfo, org.tensorflow.proto.GraphTransferNodeOutputInfo.Builder, org.tensorflow.proto.GraphTransferNodeOutputInfoOrBuilder> nodeOutputInfoBuilder_;
     
         /**
    @@ -2126,11 +2119,11 @@ public org.tensorflow.proto.GraphTransferNodeOutputInfo.Builder addNodeOutputInf
              getNodeOutputInfoBuilderList() {
           return getNodeOutputInfoFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.GraphTransferNodeOutputInfo, org.tensorflow.proto.GraphTransferNodeOutputInfo.Builder, org.tensorflow.proto.GraphTransferNodeOutputInfoOrBuilder> 
             getNodeOutputInfoFieldBuilder() {
           if (nodeOutputInfoBuilder_ == null) {
    -        nodeOutputInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        nodeOutputInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.GraphTransferNodeOutputInfo, org.tensorflow.proto.GraphTransferNodeOutputInfo.Builder, org.tensorflow.proto.GraphTransferNodeOutputInfoOrBuilder>(
                     nodeOutputInfo_,
                     ((bitField0_ & 0x00000008) != 0),
    @@ -2150,7 +2143,7 @@ private void ensureGraphInputNodeInfoIsMutable() {
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.GraphTransferGraphInputNodeInfo, org.tensorflow.proto.GraphTransferGraphInputNodeInfo.Builder, org.tensorflow.proto.GraphTransferGraphInputNodeInfoOrBuilder> graphInputNodeInfoBuilder_;
     
         /**
    @@ -2438,11 +2431,11 @@ public org.tensorflow.proto.GraphTransferGraphInputNodeInfo.Builder addGraphInpu
              getGraphInputNodeInfoBuilderList() {
           return getGraphInputNodeInfoFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.GraphTransferGraphInputNodeInfo, org.tensorflow.proto.GraphTransferGraphInputNodeInfo.Builder, org.tensorflow.proto.GraphTransferGraphInputNodeInfoOrBuilder> 
             getGraphInputNodeInfoFieldBuilder() {
           if (graphInputNodeInfoBuilder_ == null) {
    -        graphInputNodeInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        graphInputNodeInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.GraphTransferGraphInputNodeInfo, org.tensorflow.proto.GraphTransferGraphInputNodeInfo.Builder, org.tensorflow.proto.GraphTransferGraphInputNodeInfoOrBuilder>(
                     graphInputNodeInfo_,
                     ((bitField0_ & 0x00000010) != 0),
    @@ -2462,7 +2455,7 @@ private void ensureGraphOutputNodeInfoIsMutable() {
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.GraphTransferGraphOutputNodeInfo, org.tensorflow.proto.GraphTransferGraphOutputNodeInfo.Builder, org.tensorflow.proto.GraphTransferGraphOutputNodeInfoOrBuilder> graphOutputNodeInfoBuilder_;
     
         /**
    @@ -2678,11 +2671,11 @@ public org.tensorflow.proto.GraphTransferGraphOutputNodeInfo.Builder addGraphOut
              getGraphOutputNodeInfoBuilderList() {
           return getGraphOutputNodeInfoFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.GraphTransferGraphOutputNodeInfo, org.tensorflow.proto.GraphTransferGraphOutputNodeInfo.Builder, org.tensorflow.proto.GraphTransferGraphOutputNodeInfoOrBuilder> 
             getGraphOutputNodeInfoFieldBuilder() {
           if (graphOutputNodeInfoBuilder_ == null) {
    -        graphOutputNodeInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        graphOutputNodeInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.GraphTransferGraphOutputNodeInfo, org.tensorflow.proto.GraphTransferGraphOutputNodeInfo.Builder, org.tensorflow.proto.GraphTransferGraphOutputNodeInfoOrBuilder>(
                     graphOutputNodeInfo_,
                     ((bitField0_ & 0x00000020) != 0),
    @@ -2715,8 +2708,8 @@ public org.tensorflow.proto.GraphTransferGraphOutputNodeInfo.Builder addGraphOut
          * @return This builder for chaining.
          */
         public Builder setDestinationValue(int value) {
    -      
           destination_ = value;
    +      bitField0_ |= 0x00000040;
           onChanged();
           return this;
         }
    @@ -2730,8 +2723,7 @@ public Builder setDestinationValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.GraphTransferInfo.Destination getDestination() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.GraphTransferInfo.Destination result = org.tensorflow.proto.GraphTransferInfo.Destination.valueOf(destination_);
    +      org.tensorflow.proto.GraphTransferInfo.Destination result = org.tensorflow.proto.GraphTransferInfo.Destination.forNumber(destination_);
           return result == null ? org.tensorflow.proto.GraphTransferInfo.Destination.UNRECOGNIZED : result;
         }
         /**
    @@ -2747,7 +2739,7 @@ public Builder setDestination(org.tensorflow.proto.GraphTransferInfo.Destination
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00000040;
           destination_ = value.getNumber();
           onChanged();
           return this;
    @@ -2761,23 +2753,11 @@ public Builder setDestination(org.tensorflow.proto.GraphTransferInfo.Destination
          * @return This builder for chaining.
          */
         public Builder clearDestination() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000040);
           destination_ = 0;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.GraphTransferInfo)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferInfoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferInfoOrBuilder.java
    index 82d8c157811..037aa6c37d2 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferInfoOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferInfoOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/graph_transfer_info.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferInfoProto.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferInfoProto.java
    index ac0ad341e2a..2bc9df9dcf6 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferInfoProto.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferInfoProto.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/graph_transfer_info.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class GraphTransferInfoProto {
       private GraphTransferInfoProto() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      GraphTransferInfoProto.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,42 +28,42 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_GraphTransferNodeInput_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_GraphTransferNodeInput_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_GraphTransferNodeInfo_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_GraphTransferNodeInfo_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_GraphTransferConstNodeInfo_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_GraphTransferConstNodeInfo_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_GraphTransferNodeInputInfo_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_GraphTransferNodeInputInfo_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_GraphTransferNodeOutputInfo_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_GraphTransferNodeOutputInfo_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_GraphTransferGraphInputNodeInfo_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_GraphTransferGraphInputNodeInfo_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_GraphTransferGraphOutputNodeInfo_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_GraphTransferGraphOutputNodeInfo_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_GraphTransferInfo_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_GraphTransferInfo_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -110,51 +121,52 @@ public static void registerAllExtensions(
         internal_static_tensorflow_GraphTransferNodeInput_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_GraphTransferNodeInput_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_GraphTransferNodeInput_descriptor,
             new java.lang.String[] { "NodeId", "OutputPort", });
         internal_static_tensorflow_GraphTransferNodeInfo_descriptor =
           getDescriptor().getMessageTypes().get(1);
         internal_static_tensorflow_GraphTransferNodeInfo_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_GraphTransferNodeInfo_descriptor,
             new java.lang.String[] { "Name", "NodeId", "TypeName", "SocOpId", "PaddingId", "InputCount", "OutputCount", });
         internal_static_tensorflow_GraphTransferConstNodeInfo_descriptor =
           getDescriptor().getMessageTypes().get(2);
         internal_static_tensorflow_GraphTransferConstNodeInfo_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_GraphTransferConstNodeInfo_descriptor,
             new java.lang.String[] { "Name", "NodeId", "Shape", "Data", "Dtype", });
         internal_static_tensorflow_GraphTransferNodeInputInfo_descriptor =
           getDescriptor().getMessageTypes().get(3);
         internal_static_tensorflow_GraphTransferNodeInputInfo_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_GraphTransferNodeInputInfo_descriptor,
             new java.lang.String[] { "NodeId", "NodeInput", });
         internal_static_tensorflow_GraphTransferNodeOutputInfo_descriptor =
           getDescriptor().getMessageTypes().get(4);
         internal_static_tensorflow_GraphTransferNodeOutputInfo_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_GraphTransferNodeOutputInfo_descriptor,
             new java.lang.String[] { "NodeId", "MaxByteSize", });
         internal_static_tensorflow_GraphTransferGraphInputNodeInfo_descriptor =
           getDescriptor().getMessageTypes().get(5);
         internal_static_tensorflow_GraphTransferGraphInputNodeInfo_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_GraphTransferGraphInputNodeInfo_descriptor,
             new java.lang.String[] { "Name", "Shape", "Dtype", });
         internal_static_tensorflow_GraphTransferGraphOutputNodeInfo_descriptor =
           getDescriptor().getMessageTypes().get(6);
         internal_static_tensorflow_GraphTransferGraphOutputNodeInfo_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_GraphTransferGraphOutputNodeInfo_descriptor,
             new java.lang.String[] { "Name", "Shape", "Dtype", });
         internal_static_tensorflow_GraphTransferInfo_descriptor =
           getDescriptor().getMessageTypes().get(7);
         internal_static_tensorflow_GraphTransferInfo_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_GraphTransferInfo_descriptor,
             new java.lang.String[] { "NodeInfo", "ConstNodeInfo", "NodeInputInfo", "NodeOutputInfo", "GraphInputNodeInfo", "GraphOutputNodeInfo", "Destination", });
    +    descriptor.resolveAllFeaturesImmutable();
         org.tensorflow.proto.TypesProtos.getDescriptor();
       }
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInfo.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInfo.java
    index 4b2dd25d352..9dba76360d4 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInfo.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInfo.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/graph_transfer_info.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,12 +9,21 @@
      * Protobuf type {@code tensorflow.GraphTransferNodeInfo}
      */
     public final class GraphTransferNodeInfo extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.GraphTransferNodeInfo)
         GraphTransferNodeInfoOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      GraphTransferNodeInfo.class.getName());
    +  }
       // Use GraphTransferNodeInfo.newBuilder() to construct.
    -  private GraphTransferNodeInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private GraphTransferNodeInfo(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private GraphTransferNodeInfo() {
    @@ -20,25 +31,13 @@ private GraphTransferNodeInfo() {
         typeName_ = "";
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new GraphTransferNodeInfo();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferNodeInfo_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferNodeInfo_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -46,7 +45,8 @@ protected java.lang.Object newInstance(
       }
     
       public static final int NAME_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object name_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object name_ = "";
       /**
        * string name = 1;
        * @return The name.
    @@ -84,7 +84,7 @@ public java.lang.String getName() {
       }
     
       public static final int NODE_ID_FIELD_NUMBER = 2;
    -  private int nodeId_;
    +  private int nodeId_ = 0;
       /**
        * int32 node_id = 2;
        * @return The nodeId.
    @@ -95,7 +95,8 @@ public int getNodeId() {
       }
     
       public static final int TYPE_NAME_FIELD_NUMBER = 3;
    -  private volatile java.lang.Object typeName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object typeName_ = "";
       /**
        * string type_name = 3;
        * @return The typeName.
    @@ -133,7 +134,7 @@ public java.lang.String getTypeName() {
       }
     
       public static final int SOC_OP_ID_FIELD_NUMBER = 4;
    -  private int socOpId_;
    +  private int socOpId_ = 0;
       /**
        * int32 soc_op_id = 4;
        * @return The socOpId.
    @@ -144,7 +145,7 @@ public int getSocOpId() {
       }
     
       public static final int PADDING_ID_FIELD_NUMBER = 5;
    -  private int paddingId_;
    +  private int paddingId_ = 0;
       /**
        * int32 padding_id = 5;
        * @return The paddingId.
    @@ -155,7 +156,7 @@ public int getPaddingId() {
       }
     
       public static final int INPUT_COUNT_FIELD_NUMBER = 6;
    -  private int inputCount_;
    +  private int inputCount_ = 0;
       /**
        * int32 input_count = 6;
        * @return The inputCount.
    @@ -166,7 +167,7 @@ public int getInputCount() {
       }
     
       public static final int OUTPUT_COUNT_FIELD_NUMBER = 7;
    -  private int outputCount_;
    +  private int outputCount_ = 0;
       /**
        * int32 output_count = 7;
        * @return The outputCount.
    @@ -190,14 +191,14 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
         }
         if (nodeId_ != 0) {
           output.writeInt32(2, nodeId_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(typeName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, typeName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(typeName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 3, typeName_);
         }
         if (socOpId_ != 0) {
           output.writeInt32(4, socOpId_);
    @@ -220,15 +221,15 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
         }
         if (nodeId_ != 0) {
           size += com.google.protobuf.CodedOutputStream
             .computeInt32Size(2, nodeId_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(typeName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, typeName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(typeName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(3, typeName_);
         }
         if (socOpId_ != 0) {
           size += com.google.protobuf.CodedOutputStream
    @@ -339,39 +340,41 @@ public static org.tensorflow.proto.GraphTransferNodeInfo parseFrom(
       }
       public static org.tensorflow.proto.GraphTransferNodeInfo parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.GraphTransferNodeInfo parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.GraphTransferNodeInfo parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.GraphTransferNodeInfo parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.GraphTransferNodeInfo parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.GraphTransferNodeInfo parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -391,7 +394,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -399,7 +402,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.GraphTransferNodeInfo}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.GraphTransferNodeInfo)
           org.tensorflow.proto.GraphTransferNodeInfoOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -408,7 +411,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferNodeInfo_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -421,27 +424,21 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           name_ = "";
    -
           nodeId_ = 0;
    -
           typeName_ = "";
    -
           socOpId_ = 0;
    -
           paddingId_ = 0;
    -
           inputCount_ = 0;
    -
           outputCount_ = 0;
    -
           return this;
         }
     
    @@ -468,49 +465,36 @@ public org.tensorflow.proto.GraphTransferNodeInfo build() {
         @java.lang.Override
         public org.tensorflow.proto.GraphTransferNodeInfo buildPartial() {
           org.tensorflow.proto.GraphTransferNodeInfo result = new org.tensorflow.proto.GraphTransferNodeInfo(this);
    -      result.name_ = name_;
    -      result.nodeId_ = nodeId_;
    -      result.typeName_ = typeName_;
    -      result.socOpId_ = socOpId_;
    -      result.paddingId_ = paddingId_;
    -      result.inputCount_ = inputCount_;
    -      result.outputCount_ = outputCount_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.GraphTransferNodeInfo result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.name_ = name_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.nodeId_ = nodeId_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.typeName_ = typeName_;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.socOpId_ = socOpId_;
    +      }
    +      if (((from_bitField0_ & 0x00000010) != 0)) {
    +        result.paddingId_ = paddingId_;
    +      }
    +      if (((from_bitField0_ & 0x00000020) != 0)) {
    +        result.inputCount_ = inputCount_;
    +      }
    +      if (((from_bitField0_ & 0x00000040) != 0)) {
    +        result.outputCount_ = outputCount_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.GraphTransferNodeInfo) {
    @@ -525,6 +509,7 @@ public Builder mergeFrom(org.tensorflow.proto.GraphTransferNodeInfo other) {
           if (other == org.tensorflow.proto.GraphTransferNodeInfo.getDefaultInstance()) return this;
           if (!other.getName().isEmpty()) {
             name_ = other.name_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (other.getNodeId() != 0) {
    @@ -532,6 +517,7 @@ public Builder mergeFrom(org.tensorflow.proto.GraphTransferNodeInfo other) {
           }
           if (!other.getTypeName().isEmpty()) {
             typeName_ = other.typeName_;
    +        bitField0_ |= 0x00000004;
             onChanged();
           }
           if (other.getSocOpId() != 0) {
    @@ -574,37 +560,37 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   name_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 16: {
                   nodeId_ = input.readInt32();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 16
                 case 26: {
                   typeName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 26
                 case 32: {
                   socOpId_ = input.readInt32();
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 32
                 case 40: {
                   paddingId_ = input.readInt32();
    -
    +              bitField0_ |= 0x00000010;
                   break;
                 } // case 40
                 case 48: {
                   inputCount_ = input.readInt32();
    -
    +              bitField0_ |= 0x00000020;
                   break;
                 } // case 48
                 case 56: {
                   outputCount_ = input.readInt32();
    -
    +              bitField0_ |= 0x00000040;
                   break;
                 } // case 56
                 default: {
    @@ -622,6 +608,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private java.lang.Object name_ = "";
         /**
    @@ -664,11 +651,9 @@ public java.lang.String getName() {
          */
         public Builder setName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           name_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -677,8 +662,8 @@ public Builder setName(
          * @return This builder for chaining.
          */
         public Builder clearName() {
    -      
           name_ = getDefaultInstance().getName();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -689,12 +674,10 @@ public Builder clearName() {
          */
         public Builder setNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           name_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -714,8 +697,9 @@ public int getNodeId() {
          * @return This builder for chaining.
          */
         public Builder setNodeId(int value) {
    -      
    +
           nodeId_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -724,7 +708,7 @@ public Builder setNodeId(int value) {
          * @return This builder for chaining.
          */
         public Builder clearNodeId() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000002);
           nodeId_ = 0;
           onChanged();
           return this;
    @@ -771,11 +755,9 @@ public java.lang.String getTypeName() {
          */
         public Builder setTypeName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           typeName_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -784,8 +766,8 @@ public Builder setTypeName(
          * @return This builder for chaining.
          */
         public Builder clearTypeName() {
    -      
           typeName_ = getDefaultInstance().getTypeName();
    +      bitField0_ = (bitField0_ & ~0x00000004);
           onChanged();
           return this;
         }
    @@ -796,12 +778,10 @@ public Builder clearTypeName() {
          */
         public Builder setTypeNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           typeName_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -821,8 +801,9 @@ public int getSocOpId() {
          * @return This builder for chaining.
          */
         public Builder setSocOpId(int value) {
    -      
    +
           socOpId_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -831,7 +812,7 @@ public Builder setSocOpId(int value) {
          * @return This builder for chaining.
          */
         public Builder clearSocOpId() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000008);
           socOpId_ = 0;
           onChanged();
           return this;
    @@ -852,8 +833,9 @@ public int getPaddingId() {
          * @return This builder for chaining.
          */
         public Builder setPaddingId(int value) {
    -      
    +
           paddingId_ = value;
    +      bitField0_ |= 0x00000010;
           onChanged();
           return this;
         }
    @@ -862,7 +844,7 @@ public Builder setPaddingId(int value) {
          * @return This builder for chaining.
          */
         public Builder clearPaddingId() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000010);
           paddingId_ = 0;
           onChanged();
           return this;
    @@ -883,8 +865,9 @@ public int getInputCount() {
          * @return This builder for chaining.
          */
         public Builder setInputCount(int value) {
    -      
    +
           inputCount_ = value;
    +      bitField0_ |= 0x00000020;
           onChanged();
           return this;
         }
    @@ -893,7 +876,7 @@ public Builder setInputCount(int value) {
          * @return This builder for chaining.
          */
         public Builder clearInputCount() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000020);
           inputCount_ = 0;
           onChanged();
           return this;
    @@ -914,8 +897,9 @@ public int getOutputCount() {
          * @return This builder for chaining.
          */
         public Builder setOutputCount(int value) {
    -      
    +
           outputCount_ = value;
    +      bitField0_ |= 0x00000040;
           onChanged();
           return this;
         }
    @@ -924,23 +908,11 @@ public Builder setOutputCount(int value) {
          * @return This builder for chaining.
          */
         public Builder clearOutputCount() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000040);
           outputCount_ = 0;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.GraphTransferNodeInfo)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInfoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInfoOrBuilder.java
    index 0eb48a9479c..01ef2545a87 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInfoOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInfoOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/graph_transfer_info.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInput.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInput.java
    index ec051732443..0400ad21f83 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInput.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInput.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/graph_transfer_info.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,36 +9,33 @@
      * Protobuf type {@code tensorflow.GraphTransferNodeInput}
      */
     public final class GraphTransferNodeInput extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.GraphTransferNodeInput)
         GraphTransferNodeInputOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      GraphTransferNodeInput.class.getName());
    +  }
       // Use GraphTransferNodeInput.newBuilder() to construct.
    -  private GraphTransferNodeInput(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private GraphTransferNodeInput(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private GraphTransferNodeInput() {
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new GraphTransferNodeInput();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferNodeInput_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferNodeInput_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -44,7 +43,7 @@ protected java.lang.Object newInstance(
       }
     
       public static final int NODE_ID_FIELD_NUMBER = 1;
    -  private int nodeId_;
    +  private int nodeId_ = 0;
       /**
        * int32 node_id = 1;
        * @return The nodeId.
    @@ -55,7 +54,7 @@ public int getNodeId() {
       }
     
       public static final int OUTPUT_PORT_FIELD_NUMBER = 2;
    -  private int outputPort_;
    +  private int outputPort_ = 0;
       /**
        * int32 output_port = 2;
        * @return The outputPort.
    @@ -175,39 +174,41 @@ public static org.tensorflow.proto.GraphTransferNodeInput parseFrom(
       }
       public static org.tensorflow.proto.GraphTransferNodeInput parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.GraphTransferNodeInput parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.GraphTransferNodeInput parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.GraphTransferNodeInput parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.GraphTransferNodeInput parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.GraphTransferNodeInput parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -227,7 +228,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -235,7 +236,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.GraphTransferNodeInput}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.GraphTransferNodeInput)
           org.tensorflow.proto.GraphTransferNodeInputOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -244,7 +245,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferNodeInput_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -257,17 +258,16 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           nodeId_ = 0;
    -
           outputPort_ = 0;
    -
           return this;
         }
     
    @@ -294,44 +294,21 @@ public org.tensorflow.proto.GraphTransferNodeInput build() {
         @java.lang.Override
         public org.tensorflow.proto.GraphTransferNodeInput buildPartial() {
           org.tensorflow.proto.GraphTransferNodeInput result = new org.tensorflow.proto.GraphTransferNodeInput(this);
    -      result.nodeId_ = nodeId_;
    -      result.outputPort_ = outputPort_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.GraphTransferNodeInput result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.nodeId_ = nodeId_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.outputPort_ = outputPort_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.GraphTransferNodeInput) {
    @@ -378,12 +355,12 @@ public Builder mergeFrom(
                   break;
                 case 8: {
                   nodeId_ = input.readInt32();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 8
                 case 16: {
                   outputPort_ = input.readInt32();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 16
                 default: {
    @@ -401,6 +378,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private int nodeId_ ;
         /**
    @@ -417,8 +395,9 @@ public int getNodeId() {
          * @return This builder for chaining.
          */
         public Builder setNodeId(int value) {
    -      
    +
           nodeId_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -427,7 +406,7 @@ public Builder setNodeId(int value) {
          * @return This builder for chaining.
          */
         public Builder clearNodeId() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000001);
           nodeId_ = 0;
           onChanged();
           return this;
    @@ -448,8 +427,9 @@ public int getOutputPort() {
          * @return This builder for chaining.
          */
         public Builder setOutputPort(int value) {
    -      
    +
           outputPort_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -458,23 +438,11 @@ public Builder setOutputPort(int value) {
          * @return This builder for chaining.
          */
         public Builder clearOutputPort() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000002);
           outputPort_ = 0;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.GraphTransferNodeInput)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInputInfo.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInputInfo.java
    index 5c374398df3..93f82e0e8c8 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInputInfo.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInputInfo.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/graph_transfer_info.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,37 +9,34 @@
      * Protobuf type {@code tensorflow.GraphTransferNodeInputInfo}
      */
     public final class GraphTransferNodeInputInfo extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.GraphTransferNodeInputInfo)
         GraphTransferNodeInputInfoOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      GraphTransferNodeInputInfo.class.getName());
    +  }
       // Use GraphTransferNodeInputInfo.newBuilder() to construct.
    -  private GraphTransferNodeInputInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private GraphTransferNodeInputInfo(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private GraphTransferNodeInputInfo() {
         nodeInput_ = java.util.Collections.emptyList();
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new GraphTransferNodeInputInfo();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferNodeInputInfo_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferNodeInputInfo_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -45,7 +44,7 @@ protected java.lang.Object newInstance(
       }
     
       public static final int NODE_ID_FIELD_NUMBER = 1;
    -  private int nodeId_;
    +  private int nodeId_ = 0;
       /**
        * int32 node_id = 1;
        * @return The nodeId.
    @@ -56,6 +55,7 @@ public int getNodeId() {
       }
     
       public static final int NODE_INPUT_FIELD_NUMBER = 2;
    +  @SuppressWarnings("serial")
       private java.util.List nodeInput_;
       /**
        * repeated .tensorflow.GraphTransferNodeInput node_input = 2;
    @@ -207,39 +207,41 @@ public static org.tensorflow.proto.GraphTransferNodeInputInfo parseFrom(
       }
       public static org.tensorflow.proto.GraphTransferNodeInputInfo parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.GraphTransferNodeInputInfo parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.GraphTransferNodeInputInfo parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.GraphTransferNodeInputInfo parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.GraphTransferNodeInputInfo parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.GraphTransferNodeInputInfo parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -259,7 +261,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -267,7 +269,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.GraphTransferNodeInputInfo}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.GraphTransferNodeInputInfo)
           org.tensorflow.proto.GraphTransferNodeInputInfoOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -276,7 +278,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferNodeInputInfo_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -289,22 +291,22 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           nodeId_ = 0;
    -
           if (nodeInputBuilder_ == null) {
             nodeInput_ = java.util.Collections.emptyList();
           } else {
             nodeInput_ = null;
             nodeInputBuilder_.clear();
           }
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      bitField0_ = (bitField0_ & ~0x00000002);
           return this;
         }
     
    @@ -331,53 +333,31 @@ public org.tensorflow.proto.GraphTransferNodeInputInfo build() {
         @java.lang.Override
         public org.tensorflow.proto.GraphTransferNodeInputInfo buildPartial() {
           org.tensorflow.proto.GraphTransferNodeInputInfo result = new org.tensorflow.proto.GraphTransferNodeInputInfo(this);
    -      int from_bitField0_ = bitField0_;
    -      result.nodeId_ = nodeId_;
    +      buildPartialRepeatedFields(result);
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartialRepeatedFields(org.tensorflow.proto.GraphTransferNodeInputInfo result) {
           if (nodeInputBuilder_ == null) {
    -        if (((bitField0_ & 0x00000001) != 0)) {
    +        if (((bitField0_ & 0x00000002) != 0)) {
               nodeInput_ = java.util.Collections.unmodifiableList(nodeInput_);
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ = (bitField0_ & ~0x00000002);
             }
             result.nodeInput_ = nodeInput_;
           } else {
             result.nodeInput_ = nodeInputBuilder_.build();
           }
    -      onBuilt();
    -      return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.GraphTransferNodeInputInfo result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.nodeId_ = nodeId_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.GraphTransferNodeInputInfo) {
    @@ -397,7 +377,7 @@ public Builder mergeFrom(org.tensorflow.proto.GraphTransferNodeInputInfo other)
             if (!other.nodeInput_.isEmpty()) {
               if (nodeInput_.isEmpty()) {
                 nodeInput_ = other.nodeInput_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000002);
               } else {
                 ensureNodeInputIsMutable();
                 nodeInput_.addAll(other.nodeInput_);
    @@ -410,9 +390,9 @@ public Builder mergeFrom(org.tensorflow.proto.GraphTransferNodeInputInfo other)
                 nodeInputBuilder_.dispose();
                 nodeInputBuilder_ = null;
                 nodeInput_ = other.nodeInput_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000002);
                 nodeInputBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getNodeInputFieldBuilder() : null;
               } else {
                 nodeInputBuilder_.addAllMessages(other.nodeInput_);
    @@ -447,7 +427,7 @@ public Builder mergeFrom(
                   break;
                 case 8: {
                   nodeId_ = input.readInt32();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 8
                 case 18: {
    @@ -495,8 +475,9 @@ public int getNodeId() {
          * @return This builder for chaining.
          */
         public Builder setNodeId(int value) {
    -      
    +
           nodeId_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -505,7 +486,7 @@ public Builder setNodeId(int value) {
          * @return This builder for chaining.
          */
         public Builder clearNodeId() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000001);
           nodeId_ = 0;
           onChanged();
           return this;
    @@ -514,13 +495,13 @@ public Builder clearNodeId() {
         private java.util.List nodeInput_ =
           java.util.Collections.emptyList();
         private void ensureNodeInputIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    +      if (!((bitField0_ & 0x00000002) != 0)) {
             nodeInput_ = new java.util.ArrayList(nodeInput_);
    -        bitField0_ |= 0x00000001;
    +        bitField0_ |= 0x00000002;
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.GraphTransferNodeInput, org.tensorflow.proto.GraphTransferNodeInput.Builder, org.tensorflow.proto.GraphTransferNodeInputOrBuilder> nodeInputBuilder_;
     
         /**
    @@ -666,7 +647,7 @@ public Builder addAllNodeInput(
         public Builder clearNodeInput() {
           if (nodeInputBuilder_ == null) {
             nodeInput_ = java.util.Collections.emptyList();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        bitField0_ = (bitField0_ & ~0x00000002);
             onChanged();
           } else {
             nodeInputBuilder_.clear();
    @@ -736,32 +717,20 @@ public org.tensorflow.proto.GraphTransferNodeInput.Builder addNodeInputBuilder(
              getNodeInputBuilderList() {
           return getNodeInputFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.GraphTransferNodeInput, org.tensorflow.proto.GraphTransferNodeInput.Builder, org.tensorflow.proto.GraphTransferNodeInputOrBuilder> 
             getNodeInputFieldBuilder() {
           if (nodeInputBuilder_ == null) {
    -        nodeInputBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        nodeInputBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.GraphTransferNodeInput, org.tensorflow.proto.GraphTransferNodeInput.Builder, org.tensorflow.proto.GraphTransferNodeInputOrBuilder>(
                     nodeInput_,
    -                ((bitField0_ & 0x00000001) != 0),
    +                ((bitField0_ & 0x00000002) != 0),
                     getParentForChildren(),
                     isClean());
             nodeInput_ = null;
           }
           return nodeInputBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.GraphTransferNodeInputInfo)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInputInfoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInputInfoOrBuilder.java
    index 3d093918c21..391ca3f1e24 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInputInfoOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInputInfoOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/graph_transfer_info.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInputOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInputOrBuilder.java
    index 91bac32cd4c..dd8ac32649e 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInputOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInputOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/graph_transfer_info.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeOutputInfo.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeOutputInfo.java
    index b12463e4c80..b42b3fb547c 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeOutputInfo.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeOutputInfo.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/graph_transfer_info.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,37 +9,34 @@
      * Protobuf type {@code tensorflow.GraphTransferNodeOutputInfo}
      */
     public final class GraphTransferNodeOutputInfo extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.GraphTransferNodeOutputInfo)
         GraphTransferNodeOutputInfoOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      GraphTransferNodeOutputInfo.class.getName());
    +  }
       // Use GraphTransferNodeOutputInfo.newBuilder() to construct.
    -  private GraphTransferNodeOutputInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private GraphTransferNodeOutputInfo(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private GraphTransferNodeOutputInfo() {
         maxByteSize_ = emptyIntList();
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new GraphTransferNodeOutputInfo();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferNodeOutputInfo_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferNodeOutputInfo_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -45,7 +44,7 @@ protected java.lang.Object newInstance(
       }
     
       public static final int NODE_ID_FIELD_NUMBER = 1;
    -  private int nodeId_;
    +  private int nodeId_ = 0;
       /**
        * int32 node_id = 1;
        * @return The nodeId.
    @@ -56,7 +55,9 @@ public int getNodeId() {
       }
     
       public static final int MAX_BYTE_SIZE_FIELD_NUMBER = 2;
    -  private com.google.protobuf.Internal.IntList maxByteSize_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.Internal.IntList maxByteSize_ =
    +      emptyIntList();
       /**
        * repeated int32 max_byte_size = 2;
        * @return A list containing the maxByteSize.
    @@ -210,39 +211,41 @@ public static org.tensorflow.proto.GraphTransferNodeOutputInfo parseFrom(
       }
       public static org.tensorflow.proto.GraphTransferNodeOutputInfo parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.GraphTransferNodeOutputInfo parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.GraphTransferNodeOutputInfo parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.GraphTransferNodeOutputInfo parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.GraphTransferNodeOutputInfo parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.GraphTransferNodeOutputInfo parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -262,7 +265,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -270,7 +273,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.GraphTransferNodeOutputInfo}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.GraphTransferNodeOutputInfo)
           org.tensorflow.proto.GraphTransferNodeOutputInfoOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -279,7 +282,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.GraphTransferInfoProto.internal_static_tensorflow_GraphTransferNodeOutputInfo_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -292,17 +295,16 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           nodeId_ = 0;
    -
           maxByteSize_ = emptyIntList();
    -      bitField0_ = (bitField0_ & ~0x00000001);
           return this;
         }
     
    @@ -329,49 +331,22 @@ public org.tensorflow.proto.GraphTransferNodeOutputInfo build() {
         @java.lang.Override
         public org.tensorflow.proto.GraphTransferNodeOutputInfo buildPartial() {
           org.tensorflow.proto.GraphTransferNodeOutputInfo result = new org.tensorflow.proto.GraphTransferNodeOutputInfo(this);
    -      int from_bitField0_ = bitField0_;
    -      result.nodeId_ = nodeId_;
    -      if (((bitField0_ & 0x00000001) != 0)) {
    -        maxByteSize_.makeImmutable();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    -      }
    -      result.maxByteSize_ = maxByteSize_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.GraphTransferNodeOutputInfo result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.nodeId_ = nodeId_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        maxByteSize_.makeImmutable();
    +        result.maxByteSize_ = maxByteSize_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.GraphTransferNodeOutputInfo) {
    @@ -390,7 +365,8 @@ public Builder mergeFrom(org.tensorflow.proto.GraphTransferNodeOutputInfo other)
           if (!other.maxByteSize_.isEmpty()) {
             if (maxByteSize_.isEmpty()) {
               maxByteSize_ = other.maxByteSize_;
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          maxByteSize_.makeImmutable();
    +          bitField0_ |= 0x00000002;
             } else {
               ensureMaxByteSizeIsMutable();
               maxByteSize_.addAll(other.maxByteSize_);
    @@ -425,7 +401,7 @@ public Builder mergeFrom(
                   break;
                 case 8: {
                   nodeId_ = input.readInt32();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 8
                 case 16: {
    @@ -476,8 +452,9 @@ public int getNodeId() {
          * @return This builder for chaining.
          */
         public Builder setNodeId(int value) {
    -      
    +
           nodeId_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -486,7 +463,7 @@ public Builder setNodeId(int value) {
          * @return This builder for chaining.
          */
         public Builder clearNodeId() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000001);
           nodeId_ = 0;
           onChanged();
           return this;
    @@ -494,10 +471,10 @@ public Builder clearNodeId() {
     
         private com.google.protobuf.Internal.IntList maxByteSize_ = emptyIntList();
         private void ensureMaxByteSizeIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    -        maxByteSize_ = mutableCopy(maxByteSize_);
    -        bitField0_ |= 0x00000001;
    -       }
    +      if (!maxByteSize_.isModifiable()) {
    +        maxByteSize_ = makeMutableCopy(maxByteSize_);
    +      }
    +      bitField0_ |= 0x00000002;
         }
         /**
          * repeated int32 max_byte_size = 2;
    @@ -505,8 +482,8 @@ private void ensureMaxByteSizeIsMutable() {
          */
         public java.util.List
             getMaxByteSizeList() {
    -      return ((bitField0_ & 0x00000001) != 0) ?
    -               java.util.Collections.unmodifiableList(maxByteSize_) : maxByteSize_;
    +      maxByteSize_.makeImmutable();
    +      return maxByteSize_;
         }
         /**
          * repeated int32 max_byte_size = 2;
    @@ -531,8 +508,10 @@ public int getMaxByteSize(int index) {
          */
         public Builder setMaxByteSize(
             int index, int value) {
    +
           ensureMaxByteSizeIsMutable();
           maxByteSize_.setInt(index, value);
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -542,8 +521,10 @@ public Builder setMaxByteSize(
          * @return This builder for chaining.
          */
         public Builder addMaxByteSize(int value) {
    +
           ensureMaxByteSizeIsMutable();
           maxByteSize_.addInt(value);
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -557,6 +538,7 @@ public Builder addAllMaxByteSize(
           ensureMaxByteSizeIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, maxByteSize_);
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -566,22 +548,10 @@ public Builder addAllMaxByteSize(
          */
         public Builder clearMaxByteSize() {
           maxByteSize_ = emptyIntList();
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      bitField0_ = (bitField0_ & ~0x00000002);
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.GraphTransferNodeOutputInfo)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeOutputInfoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeOutputInfoOrBuilder.java
    index a9bd5aa77a8..562283cc21f 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeOutputInfoOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeOutputInfoOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/graph_transfer_info.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Histogram.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Histogram.java
    index 3b6ed7fa83e..5567c346630 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Histogram.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Histogram.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    -// source: tsl/protobuf/histogram.proto
    +// NO CHECKED-IN PROTOBUF GENCODE
    +// source: xla/tsl/protobuf/histogram.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class Histogram {
       private Histogram() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      Histogram.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,7 +28,7 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_HistogramProto_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_HistogramProto_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -28,13 +39,14 @@ public static void registerAllExtensions(
           descriptor;
       static {
         java.lang.String[] descriptorData = {
    -      "\n\034tsl/protobuf/histogram.proto\022\ntensorfl" +
    -      "ow\"\207\001\n\016HistogramProto\022\013\n\003min\030\001 \001(\001\022\013\n\003ma" +
    -      "x\030\002 \001(\001\022\013\n\003num\030\003 \001(\001\022\013\n\003sum\030\004 \001(\001\022\023\n\013sum" +
    -      "_squares\030\005 \001(\001\022\030\n\014bucket_limit\030\006 \003(\001B\002\020\001" +
    -      "\022\022\n\006bucket\030\007 \003(\001B\002\020\001BX\n\024org.tensorflow.p" +
    -      "rotoP\001Z;github.com/google/tsl/tsl/go/cor" +
    -      "e/protobuf/summary_go_proto\370\001\001b\006proto3"
    +      "\n xla/tsl/protobuf/histogram.proto\022\ntens" +
    +      "orflow\"\207\001\n\016HistogramProto\022\013\n\003min\030\001 \001(\001\022\013" +
    +      "\n\003max\030\002 \001(\001\022\013\n\003num\030\003 \001(\001\022\013\n\003sum\030\004 \001(\001\022\023\n" +
    +      "\013sum_squares\030\005 \001(\001\022\030\n\014bucket_limit\030\006 \003(\001" +
    +      "B\002\020\001\022\022\n\006bucket\030\007 \003(\001B\002\020\001BX\n\024org.tensorfl" +
    +      "ow.protoP\001Z;github.com/google/tsl/tsl/go" +
    +      "/core/protobuf/summary_go_proto\370\001\001b\006prot" +
    +      "o3"
         };
         descriptor = com.google.protobuf.Descriptors.FileDescriptor
           .internalBuildGeneratedFileFrom(descriptorData,
    @@ -43,9 +55,10 @@ public static void registerAllExtensions(
         internal_static_tensorflow_HistogramProto_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_HistogramProto_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_HistogramProto_descriptor,
             new java.lang.String[] { "Min", "Max", "Num", "Sum", "SumSquares", "BucketLimit", "Bucket", });
    +    descriptor.resolveAllFeaturesImmutable();
       }
     
       // @@protoc_insertion_point(outer_class_scope)
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/HistogramProto.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/HistogramProto.java
    index a07ba3f74de..669741c85a8 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/HistogramProto.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/HistogramProto.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    -// source: tsl/protobuf/histogram.proto
    +// NO CHECKED-IN PROTOBUF GENCODE
    +// source: xla/tsl/protobuf/histogram.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -12,12 +14,21 @@
      * Protobuf type {@code tensorflow.HistogramProto}
      */
     public final class HistogramProto extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.HistogramProto)
         HistogramProtoOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      HistogramProto.class.getName());
    +  }
       // Use HistogramProto.newBuilder() to construct.
    -  private HistogramProto(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private HistogramProto(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private HistogramProto() {
    @@ -25,25 +36,13 @@ private HistogramProto() {
         bucket_ = emptyDoubleList();
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new HistogramProto();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.Histogram.internal_static_tensorflow_HistogramProto_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.Histogram.internal_static_tensorflow_HistogramProto_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -51,7 +50,7 @@ protected java.lang.Object newInstance(
       }
     
       public static final int MIN_FIELD_NUMBER = 1;
    -  private double min_;
    +  private double min_ = 0D;
       /**
        * double min = 1;
        * @return The min.
    @@ -62,7 +61,7 @@ public double getMin() {
       }
     
       public static final int MAX_FIELD_NUMBER = 2;
    -  private double max_;
    +  private double max_ = 0D;
       /**
        * double max = 2;
        * @return The max.
    @@ -73,7 +72,7 @@ public double getMax() {
       }
     
       public static final int NUM_FIELD_NUMBER = 3;
    -  private double num_;
    +  private double num_ = 0D;
       /**
        * double num = 3;
        * @return The num.
    @@ -84,7 +83,7 @@ public double getNum() {
       }
     
       public static final int SUM_FIELD_NUMBER = 4;
    -  private double sum_;
    +  private double sum_ = 0D;
       /**
        * double sum = 4;
        * @return The sum.
    @@ -95,7 +94,7 @@ public double getSum() {
       }
     
       public static final int SUM_SQUARES_FIELD_NUMBER = 5;
    -  private double sumSquares_;
    +  private double sumSquares_ = 0D;
       /**
        * double sum_squares = 5;
        * @return The sumSquares.
    @@ -106,14 +105,16 @@ public double getSumSquares() {
       }
     
       public static final int BUCKET_LIMIT_FIELD_NUMBER = 6;
    -  private com.google.protobuf.Internal.DoubleList bucketLimit_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.Internal.DoubleList bucketLimit_ =
    +      emptyDoubleList();
       /**
        * 
        * Parallel arrays encoding the bucket boundaries and the bucket values.
        * bucket(i) is the count for the bucket i.  The range for
        * a bucket is:
    -   *   i == 0:  -DBL_MAX .. bucket_limit(0)
    -   *   i != 0:  bucket_limit(i-1) .. bucket_limit(i)
    +   * i == 0:  -DBL_MAX .. bucket_limit(0)
    +   * i != 0:  bucket_limit(i-1) .. bucket_limit(i)
        * 
    * * repeated double bucket_limit = 6 [packed = true]; @@ -129,8 +130,8 @@ public double getSumSquares() { * Parallel arrays encoding the bucket boundaries and the bucket values. * bucket(i) is the count for the bucket i. The range for * a bucket is: - * i == 0: -DBL_MAX .. bucket_limit(0) - * i != 0: bucket_limit(i-1) .. bucket_limit(i) + * i == 0: -DBL_MAX .. bucket_limit(0) + * i != 0: bucket_limit(i-1) .. bucket_limit(i) *
    * * repeated double bucket_limit = 6 [packed = true]; @@ -144,8 +145,8 @@ public int getBucketLimitCount() { * Parallel arrays encoding the bucket boundaries and the bucket values. * bucket(i) is the count for the bucket i. The range for * a bucket is: - * i == 0: -DBL_MAX .. bucket_limit(0) - * i != 0: bucket_limit(i-1) .. bucket_limit(i) + * i == 0: -DBL_MAX .. bucket_limit(0) + * i != 0: bucket_limit(i-1) .. bucket_limit(i) *
    * * repeated double bucket_limit = 6 [packed = true]; @@ -158,7 +159,9 @@ public double getBucketLimit(int index) { private int bucketLimitMemoizedSerializedSize = -1; public static final int BUCKET_FIELD_NUMBER = 7; - private com.google.protobuf.Internal.DoubleList bucket_; + @SuppressWarnings("serial") + private com.google.protobuf.Internal.DoubleList bucket_ = + emptyDoubleList(); /** * repeated double bucket = 7 [packed = true]; * @return A list containing the bucket. @@ -387,39 +390,41 @@ public static org.tensorflow.proto.HistogramProto parseFrom( } public static org.tensorflow.proto.HistogramProto parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.HistogramProto parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.HistogramProto parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.HistogramProto parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.HistogramProto parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.HistogramProto parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -439,7 +444,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -452,7 +457,7 @@ protected Builder newBuilderForType( * Protobuf type {@code tensorflow.HistogramProto} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.HistogramProto) org.tensorflow.proto.HistogramProtoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -461,7 +466,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.Histogram.internal_static_tensorflow_HistogramProto_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -474,27 +479,21 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; min_ = 0D; - max_ = 0D; - num_ = 0D; - sum_ = 0D; - sumSquares_ = 0D; - bucketLimit_ = emptyDoubleList(); - bitField0_ = (bitField0_ & ~0x00000001); bucket_ = emptyDoubleList(); - bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -521,58 +520,38 @@ public org.tensorflow.proto.HistogramProto build() { @java.lang.Override public org.tensorflow.proto.HistogramProto buildPartial() { org.tensorflow.proto.HistogramProto result = new org.tensorflow.proto.HistogramProto(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(org.tensorflow.proto.HistogramProto result) { int from_bitField0_ = bitField0_; - result.min_ = min_; - result.max_ = max_; - result.num_ = num_; - result.sum_ = sum_; - result.sumSquares_ = sumSquares_; - if (((bitField0_ & 0x00000001) != 0)) { + if (((from_bitField0_ & 0x00000001) != 0)) { + result.min_ = min_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.max_ = max_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.num_ = num_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.sum_ = sum_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.sumSquares_ = sumSquares_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { bucketLimit_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000001); + result.bucketLimit_ = bucketLimit_; } - result.bucketLimit_ = bucketLimit_; - if (((bitField0_ & 0x00000002) != 0)) { + if (((from_bitField0_ & 0x00000040) != 0)) { bucket_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000002); + result.bucket_ = bucket_; } - result.bucket_ = bucket_; - onBuilt(); - return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.HistogramProto) { @@ -603,7 +582,8 @@ public Builder mergeFrom(org.tensorflow.proto.HistogramProto other) { if (!other.bucketLimit_.isEmpty()) { if (bucketLimit_.isEmpty()) { bucketLimit_ = other.bucketLimit_; - bitField0_ = (bitField0_ & ~0x00000001); + bucketLimit_.makeImmutable(); + bitField0_ |= 0x00000020; } else { ensureBucketLimitIsMutable(); bucketLimit_.addAll(other.bucketLimit_); @@ -613,7 +593,8 @@ public Builder mergeFrom(org.tensorflow.proto.HistogramProto other) { if (!other.bucket_.isEmpty()) { if (bucket_.isEmpty()) { bucket_ = other.bucket_; - bitField0_ = (bitField0_ & ~0x00000002); + bucket_.makeImmutable(); + bitField0_ |= 0x00000040; } else { ensureBucketIsMutable(); bucket_.addAll(other.bucket_); @@ -648,27 +629,27 @@ public Builder mergeFrom( break; case 9: { min_ = input.readDouble(); - + bitField0_ |= 0x00000001; break; } // case 9 case 17: { max_ = input.readDouble(); - + bitField0_ |= 0x00000002; break; } // case 17 case 25: { num_ = input.readDouble(); - + bitField0_ |= 0x00000004; break; } // case 25 case 33: { sum_ = input.readDouble(); - + bitField0_ |= 0x00000008; break; } // case 33 case 41: { sumSquares_ = input.readDouble(); - + bitField0_ |= 0x00000010; break; } // case 41 case 49: { @@ -680,7 +661,8 @@ public Builder mergeFrom( case 50: { int length = input.readRawVarint32(); int limit = input.pushLimit(length); - ensureBucketLimitIsMutable(); + int alloc = length > 4096 ? 4096 : length; + ensureBucketLimitIsMutable(alloc / 8); while (input.getBytesUntilLimit() > 0) { bucketLimit_.addDouble(input.readDouble()); } @@ -696,7 +678,8 @@ public Builder mergeFrom( case 58: { int length = input.readRawVarint32(); int limit = input.pushLimit(length); - ensureBucketIsMutable(); + int alloc = length > 4096 ? 4096 : length; + ensureBucketIsMutable(alloc / 8); while (input.getBytesUntilLimit() > 0) { bucket_.addDouble(input.readDouble()); } @@ -735,8 +718,9 @@ public double getMin() { * @return This builder for chaining. */ public Builder setMin(double value) { - + min_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -745,7 +729,7 @@ public Builder setMin(double value) { * @return This builder for chaining. */ public Builder clearMin() { - + bitField0_ = (bitField0_ & ~0x00000001); min_ = 0D; onChanged(); return this; @@ -766,8 +750,9 @@ public double getMax() { * @return This builder for chaining. */ public Builder setMax(double value) { - + max_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -776,7 +761,7 @@ public Builder setMax(double value) { * @return This builder for chaining. */ public Builder clearMax() { - + bitField0_ = (bitField0_ & ~0x00000002); max_ = 0D; onChanged(); return this; @@ -797,8 +782,9 @@ public double getNum() { * @return This builder for chaining. */ public Builder setNum(double value) { - + num_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -807,7 +793,7 @@ public Builder setNum(double value) { * @return This builder for chaining. */ public Builder clearNum() { - + bitField0_ = (bitField0_ & ~0x00000004); num_ = 0D; onChanged(); return this; @@ -828,8 +814,9 @@ public double getSum() { * @return This builder for chaining. */ public Builder setSum(double value) { - + sum_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -838,7 +825,7 @@ public Builder setSum(double value) { * @return This builder for chaining. */ public Builder clearSum() { - + bitField0_ = (bitField0_ & ~0x00000008); sum_ = 0D; onChanged(); return this; @@ -859,8 +846,9 @@ public double getSumSquares() { * @return This builder for chaining. */ public Builder setSumSquares(double value) { - + sumSquares_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -869,7 +857,7 @@ public Builder setSumSquares(double value) { * @return This builder for chaining. */ public Builder clearSumSquares() { - + bitField0_ = (bitField0_ & ~0x00000010); sumSquares_ = 0D; onChanged(); return this; @@ -877,18 +865,24 @@ public Builder clearSumSquares() { private com.google.protobuf.Internal.DoubleList bucketLimit_ = emptyDoubleList(); private void ensureBucketLimitIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - bucketLimit_ = mutableCopy(bucketLimit_); - bitField0_ |= 0x00000001; - } + if (!bucketLimit_.isModifiable()) { + bucketLimit_ = makeMutableCopy(bucketLimit_); + } + bitField0_ |= 0x00000020; + } + private void ensureBucketLimitIsMutable(int capacity) { + if (!bucketLimit_.isModifiable()) { + bucketLimit_ = makeMutableCopy(bucketLimit_, capacity); + } + bitField0_ |= 0x00000020; } /** *
          * Parallel arrays encoding the bucket boundaries and the bucket values.
          * bucket(i) is the count for the bucket i.  The range for
          * a bucket is:
    -     *   i == 0:  -DBL_MAX .. bucket_limit(0)
    -     *   i != 0:  bucket_limit(i-1) .. bucket_limit(i)
    +     * i == 0:  -DBL_MAX .. bucket_limit(0)
    +     * i != 0:  bucket_limit(i-1) .. bucket_limit(i)
          * 
    * * repeated double bucket_limit = 6 [packed = true]; @@ -896,16 +890,16 @@ private void ensureBucketLimitIsMutable() { */ public java.util.List getBucketLimitList() { - return ((bitField0_ & 0x00000001) != 0) ? - java.util.Collections.unmodifiableList(bucketLimit_) : bucketLimit_; + bucketLimit_.makeImmutable(); + return bucketLimit_; } /** *
          * Parallel arrays encoding the bucket boundaries and the bucket values.
          * bucket(i) is the count for the bucket i.  The range for
          * a bucket is:
    -     *   i == 0:  -DBL_MAX .. bucket_limit(0)
    -     *   i != 0:  bucket_limit(i-1) .. bucket_limit(i)
    +     * i == 0:  -DBL_MAX .. bucket_limit(0)
    +     * i != 0:  bucket_limit(i-1) .. bucket_limit(i)
          * 
    * * repeated double bucket_limit = 6 [packed = true]; @@ -919,8 +913,8 @@ public int getBucketLimitCount() { * Parallel arrays encoding the bucket boundaries and the bucket values. * bucket(i) is the count for the bucket i. The range for * a bucket is: - * i == 0: -DBL_MAX .. bucket_limit(0) - * i != 0: bucket_limit(i-1) .. bucket_limit(i) + * i == 0: -DBL_MAX .. bucket_limit(0) + * i != 0: bucket_limit(i-1) .. bucket_limit(i) *
    * * repeated double bucket_limit = 6 [packed = true]; @@ -935,8 +929,8 @@ public double getBucketLimit(int index) { * Parallel arrays encoding the bucket boundaries and the bucket values. * bucket(i) is the count for the bucket i. The range for * a bucket is: - * i == 0: -DBL_MAX .. bucket_limit(0) - * i != 0: bucket_limit(i-1) .. bucket_limit(i) + * i == 0: -DBL_MAX .. bucket_limit(0) + * i != 0: bucket_limit(i-1) .. bucket_limit(i) *
    * * repeated double bucket_limit = 6 [packed = true]; @@ -946,8 +940,10 @@ public double getBucketLimit(int index) { */ public Builder setBucketLimit( int index, double value) { + ensureBucketLimitIsMutable(); bucketLimit_.setDouble(index, value); + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -956,8 +952,8 @@ public Builder setBucketLimit( * Parallel arrays encoding the bucket boundaries and the bucket values. * bucket(i) is the count for the bucket i. The range for * a bucket is: - * i == 0: -DBL_MAX .. bucket_limit(0) - * i != 0: bucket_limit(i-1) .. bucket_limit(i) + * i == 0: -DBL_MAX .. bucket_limit(0) + * i != 0: bucket_limit(i-1) .. bucket_limit(i) *
    * * repeated double bucket_limit = 6 [packed = true]; @@ -965,8 +961,10 @@ public Builder setBucketLimit( * @return This builder for chaining. */ public Builder addBucketLimit(double value) { + ensureBucketLimitIsMutable(); bucketLimit_.addDouble(value); + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -975,8 +973,8 @@ public Builder addBucketLimit(double value) { * Parallel arrays encoding the bucket boundaries and the bucket values. * bucket(i) is the count for the bucket i. The range for * a bucket is: - * i == 0: -DBL_MAX .. bucket_limit(0) - * i != 0: bucket_limit(i-1) .. bucket_limit(i) + * i == 0: -DBL_MAX .. bucket_limit(0) + * i != 0: bucket_limit(i-1) .. bucket_limit(i) *
    * * repeated double bucket_limit = 6 [packed = true]; @@ -988,6 +986,7 @@ public Builder addAllBucketLimit( ensureBucketLimitIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, bucketLimit_); + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -996,8 +995,8 @@ public Builder addAllBucketLimit( * Parallel arrays encoding the bucket boundaries and the bucket values. * bucket(i) is the count for the bucket i. The range for * a bucket is: - * i == 0: -DBL_MAX .. bucket_limit(0) - * i != 0: bucket_limit(i-1) .. bucket_limit(i) + * i == 0: -DBL_MAX .. bucket_limit(0) + * i != 0: bucket_limit(i-1) .. bucket_limit(i) *
    * * repeated double bucket_limit = 6 [packed = true]; @@ -1005,17 +1004,23 @@ public Builder addAllBucketLimit( */ public Builder clearBucketLimit() { bucketLimit_ = emptyDoubleList(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } private com.google.protobuf.Internal.DoubleList bucket_ = emptyDoubleList(); private void ensureBucketIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - bucket_ = mutableCopy(bucket_); - bitField0_ |= 0x00000002; - } + if (!bucket_.isModifiable()) { + bucket_ = makeMutableCopy(bucket_); + } + bitField0_ |= 0x00000040; + } + private void ensureBucketIsMutable(int capacity) { + if (!bucket_.isModifiable()) { + bucket_ = makeMutableCopy(bucket_, capacity); + } + bitField0_ |= 0x00000040; } /** * repeated double bucket = 7 [packed = true]; @@ -1023,8 +1028,8 @@ private void ensureBucketIsMutable() { */ public java.util.List getBucketList() { - return ((bitField0_ & 0x00000002) != 0) ? - java.util.Collections.unmodifiableList(bucket_) : bucket_; + bucket_.makeImmutable(); + return bucket_; } /** * repeated double bucket = 7 [packed = true]; @@ -1049,8 +1054,10 @@ public double getBucket(int index) { */ public Builder setBucket( int index, double value) { + ensureBucketIsMutable(); bucket_.setDouble(index, value); + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -1060,8 +1067,10 @@ public Builder setBucket( * @return This builder for chaining. */ public Builder addBucket(double value) { + ensureBucketIsMutable(); bucket_.addDouble(value); + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -1075,6 +1084,7 @@ public Builder addAllBucket( ensureBucketIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, bucket_); + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -1084,22 +1094,10 @@ public Builder addAllBucket( */ public Builder clearBucket() { bucket_ = emptyDoubleList(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000040); onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.HistogramProto) } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/HistogramProtoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/HistogramProtoOrBuilder.java index 1430829e55e..9c644fa0611 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/HistogramProtoOrBuilder.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/HistogramProtoOrBuilder.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tsl/protobuf/histogram.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: xla/tsl/protobuf/histogram.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -42,8 +44,8 @@ public interface HistogramProtoOrBuilder extends * Parallel arrays encoding the bucket boundaries and the bucket values. * bucket(i) is the count for the bucket i. The range for * a bucket is: - * i == 0: -DBL_MAX .. bucket_limit(0) - * i != 0: bucket_limit(i-1) .. bucket_limit(i) + * i == 0: -DBL_MAX .. bucket_limit(0) + * i != 0: bucket_limit(i-1) .. bucket_limit(i) *
    * * repeated double bucket_limit = 6 [packed = true]; @@ -55,8 +57,8 @@ public interface HistogramProtoOrBuilder extends * Parallel arrays encoding the bucket boundaries and the bucket values. * bucket(i) is the count for the bucket i. The range for * a bucket is: - * i == 0: -DBL_MAX .. bucket_limit(0) - * i != 0: bucket_limit(i-1) .. bucket_limit(i) + * i == 0: -DBL_MAX .. bucket_limit(0) + * i != 0: bucket_limit(i-1) .. bucket_limit(i) *
    * * repeated double bucket_limit = 6 [packed = true]; @@ -68,8 +70,8 @@ public interface HistogramProtoOrBuilder extends * Parallel arrays encoding the bucket boundaries and the bucket values. * bucket(i) is the count for the bucket i. The range for * a bucket is: - * i == 0: -DBL_MAX .. bucket_limit(0) - * i != 0: bucket_limit(i-1) .. bucket_limit(i) + * i == 0: -DBL_MAX .. bucket_limit(0) + * i != 0: bucket_limit(i-1) .. bucket_limit(i) *
    * * repeated double bucket_limit = 6 [packed = true]; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Int64List.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Int64List.java index b136f0d1862..82bf09b381d 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Int64List.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Int64List.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/example/feature.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -7,37 +9,34 @@ * Protobuf type {@code tensorflow.Int64List} */ public final class Int64List extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.Int64List) Int64ListOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + Int64List.class.getName()); + } // Use Int64List.newBuilder() to construct. - private Int64List(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Int64List(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Int64List() { value_ = emptyLongList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Int64List(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.FeatureProtos.internal_static_tensorflow_Int64List_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.FeatureProtos.internal_static_tensorflow_Int64List_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -45,9 +44,11 @@ protected java.lang.Object newInstance( } public static final int VALUE_FIELD_NUMBER = 1; - private com.google.protobuf.Internal.LongList value_; + @SuppressWarnings("serial") + private com.google.protobuf.Internal.LongList value_ = + emptyLongList(); /** - * repeated int64 value = 1 [packed = true]; + * repeated int64 value = 1 [packed = true, jstype = JS_STRING]; * @return A list containing the value. */ @java.lang.Override @@ -56,14 +57,14 @@ protected java.lang.Object newInstance( return value_; } /** - * repeated int64 value = 1 [packed = true]; + * repeated int64 value = 1 [packed = true, jstype = JS_STRING]; * @return The count of value. */ public int getValueCount() { return value_.size(); } /** - * repeated int64 value = 1 [packed = true]; + * repeated int64 value = 1 [packed = true, jstype = JS_STRING]; * @param index The index of the element to return. * @return The value at the given index. */ @@ -188,39 +189,41 @@ public static org.tensorflow.proto.Int64List parseFrom( } public static org.tensorflow.proto.Int64List parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.Int64List parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.Int64List parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.Int64List parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.Int64List parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.Int64List parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -240,7 +243,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -248,7 +251,7 @@ protected Builder newBuilderForType( * Protobuf type {@code tensorflow.Int64List} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.Int64List) org.tensorflow.proto.Int64ListOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -257,7 +260,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.FeatureProtos.internal_static_tensorflow_Int64List_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -270,15 +273,15 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; value_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -305,48 +308,19 @@ public org.tensorflow.proto.Int64List build() { @java.lang.Override public org.tensorflow.proto.Int64List buildPartial() { org.tensorflow.proto.Int64List result = new org.tensorflow.proto.Int64List(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - value_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.value_ = value_; + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.Int64List result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + value_.makeImmutable(); + result.value_ = value_; + } } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.Int64List) { @@ -362,7 +336,8 @@ public Builder mergeFrom(org.tensorflow.proto.Int64List other) { if (!other.value_.isEmpty()) { if (value_.isEmpty()) { value_ = other.value_; - bitField0_ = (bitField0_ & ~0x00000001); + value_.makeImmutable(); + bitField0_ |= 0x00000001; } else { ensureValueIsMutable(); value_.addAll(other.value_); @@ -430,29 +405,29 @@ public Builder mergeFrom( private com.google.protobuf.Internal.LongList value_ = emptyLongList(); private void ensureValueIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - value_ = mutableCopy(value_); - bitField0_ |= 0x00000001; - } + if (!value_.isModifiable()) { + value_ = makeMutableCopy(value_); + } + bitField0_ |= 0x00000001; } /** - * repeated int64 value = 1 [packed = true]; + * repeated int64 value = 1 [packed = true, jstype = JS_STRING]; * @return A list containing the value. */ public java.util.List getValueList() { - return ((bitField0_ & 0x00000001) != 0) ? - java.util.Collections.unmodifiableList(value_) : value_; + value_.makeImmutable(); + return value_; } /** - * repeated int64 value = 1 [packed = true]; + * repeated int64 value = 1 [packed = true, jstype = JS_STRING]; * @return The count of value. */ public int getValueCount() { return value_.size(); } /** - * repeated int64 value = 1 [packed = true]; + * repeated int64 value = 1 [packed = true, jstype = JS_STRING]; * @param index The index of the element to return. * @return The value at the given index. */ @@ -460,31 +435,35 @@ public long getValue(int index) { return value_.getLong(index); } /** - * repeated int64 value = 1 [packed = true]; + * repeated int64 value = 1 [packed = true, jstype = JS_STRING]; * @param index The index to set the value at. * @param value The value to set. * @return This builder for chaining. */ public Builder setValue( int index, long value) { + ensureValueIsMutable(); value_.setLong(index, value); + bitField0_ |= 0x00000001; onChanged(); return this; } /** - * repeated int64 value = 1 [packed = true]; + * repeated int64 value = 1 [packed = true, jstype = JS_STRING]; * @param value The value to add. * @return This builder for chaining. */ public Builder addValue(long value) { + ensureValueIsMutable(); value_.addLong(value); + bitField0_ |= 0x00000001; onChanged(); return this; } /** - * repeated int64 value = 1 [packed = true]; + * repeated int64 value = 1 [packed = true, jstype = JS_STRING]; * @param values The value to add. * @return This builder for chaining. */ @@ -493,11 +472,12 @@ public Builder addAllValue( ensureValueIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, value_); + bitField0_ |= 0x00000001; onChanged(); return this; } /** - * repeated int64 value = 1 [packed = true]; + * repeated int64 value = 1 [packed = true, jstype = JS_STRING]; * @return This builder for chaining. */ public Builder clearValue() { @@ -506,18 +486,6 @@ public Builder clearValue() { onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.Int64List) } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Int64ListOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Int64ListOrBuilder.java index bd79fb6e240..e1d8271d30d 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Int64ListOrBuilder.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Int64ListOrBuilder.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/example/feature.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -8,17 +10,17 @@ public interface Int64ListOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * repeated int64 value = 1 [packed = true]; + * repeated int64 value = 1 [packed = true, jstype = JS_STRING]; * @return A list containing the value. */ java.util.List getValueList(); /** - * repeated int64 value = 1 [packed = true]; + * repeated int64 value = 1 [packed = true, jstype = JS_STRING]; * @return The count of value. */ int getValueCount(); /** - * repeated int64 value = 1 [packed = true]; + * repeated int64 value = 1 [packed = true, jstype = JS_STRING]; * @param index The index of the element to return. * @return The value at the given index. */ diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/InterconnectLink.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/InterconnectLink.java index 46794a5cdfe..e544fdbcd0e 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/InterconnectLink.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/InterconnectLink.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/framework/device_attributes.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -7,37 +9,34 @@ * Protobuf type {@code tensorflow.InterconnectLink} */ public final class InterconnectLink extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.InterconnectLink) InterconnectLinkOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + InterconnectLink.class.getName()); + } // Use InterconnectLink.newBuilder() to construct. - private InterconnectLink(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private InterconnectLink(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private InterconnectLink() { type_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new InterconnectLink(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.DeviceAttributesProtos.internal_static_tensorflow_InterconnectLink_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.DeviceAttributesProtos.internal_static_tensorflow_InterconnectLink_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -45,7 +44,7 @@ protected java.lang.Object newInstance( } public static final int DEVICE_ID_FIELD_NUMBER = 1; - private int deviceId_; + private int deviceId_ = 0; /** * int32 device_id = 1; * @return The deviceId. @@ -56,7 +55,8 @@ public int getDeviceId() { } public static final int TYPE_FIELD_NUMBER = 2; - private volatile java.lang.Object type_; + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; /** * string type = 2; * @return The type. @@ -94,7 +94,7 @@ public java.lang.String getType() { } public static final int STRENGTH_FIELD_NUMBER = 3; - private int strength_; + private int strength_ = 0; /** * int32 strength = 3; * @return The strength. @@ -121,8 +121,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (deviceId_ != 0) { output.writeInt32(1, deviceId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, type_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, type_); } if (strength_ != 0) { output.writeInt32(3, strength_); @@ -140,8 +140,8 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeInt32Size(1, deviceId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, type_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, type_); } if (strength_ != 0) { size += com.google.protobuf.CodedOutputStream @@ -224,39 +224,41 @@ public static org.tensorflow.proto.InterconnectLink parseFrom( } public static org.tensorflow.proto.InterconnectLink parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.InterconnectLink parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.InterconnectLink parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.InterconnectLink parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.InterconnectLink parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.InterconnectLink parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -276,7 +278,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -284,7 +286,7 @@ protected Builder newBuilderForType( * Protobuf type {@code tensorflow.InterconnectLink} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.InterconnectLink) org.tensorflow.proto.InterconnectLinkOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -293,7 +295,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.DeviceAttributesProtos.internal_static_tensorflow_InterconnectLink_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -306,19 +308,17 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; deviceId_ = 0; - type_ = ""; - strength_ = 0; - return this; } @@ -345,45 +345,24 @@ public org.tensorflow.proto.InterconnectLink build() { @java.lang.Override public org.tensorflow.proto.InterconnectLink buildPartial() { org.tensorflow.proto.InterconnectLink result = new org.tensorflow.proto.InterconnectLink(this); - result.deviceId_ = deviceId_; - result.type_ = type_; - result.strength_ = strength_; + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.InterconnectLink result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.deviceId_ = deviceId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.strength_ = strength_; + } } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.InterconnectLink) { @@ -401,6 +380,7 @@ public Builder mergeFrom(org.tensorflow.proto.InterconnectLink other) { } if (!other.getType().isEmpty()) { type_ = other.type_; + bitField0_ |= 0x00000002; onChanged(); } if (other.getStrength() != 0) { @@ -434,17 +414,17 @@ public Builder mergeFrom( break; case 8: { deviceId_ = input.readInt32(); - + bitField0_ |= 0x00000001; break; } // case 8 case 18: { type_ = input.readStringRequireUtf8(); - + bitField0_ |= 0x00000002; break; } // case 18 case 24: { strength_ = input.readInt32(); - + bitField0_ |= 0x00000004; break; } // case 24 default: { @@ -462,6 +442,7 @@ public Builder mergeFrom( } // finally return this; } + private int bitField0_; private int deviceId_ ; /** @@ -478,8 +459,9 @@ public int getDeviceId() { * @return This builder for chaining. */ public Builder setDeviceId(int value) { - + deviceId_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -488,7 +470,7 @@ public Builder setDeviceId(int value) { * @return This builder for chaining. */ public Builder clearDeviceId() { - + bitField0_ = (bitField0_ & ~0x00000001); deviceId_ = 0; onChanged(); return this; @@ -535,11 +517,9 @@ public java.lang.String getType() { */ public Builder setType( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } type_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -548,8 +528,8 @@ public Builder setType( * @return This builder for chaining. */ public Builder clearType() { - type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -560,12 +540,10 @@ public Builder clearType() { */ public Builder setTypeBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); type_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -585,8 +563,9 @@ public int getStrength() { * @return This builder for chaining. */ public Builder setStrength(int value) { - + strength_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -595,23 +574,11 @@ public Builder setStrength(int value) { * @return This builder for chaining. */ public Builder clearStrength() { - + bitField0_ = (bitField0_ & ~0x00000004); strength_ = 0; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.InterconnectLink) } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/InterconnectLinkOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/InterconnectLinkOrBuilder.java index cfa368ba915..fa3786c27ca 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/InterconnectLinkOrBuilder.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/InterconnectLinkOrBuilder.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/framework/device_attributes.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/JobDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/JobDef.java index e131789b1fc..0e6e8660937 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/JobDef.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/JobDef.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/protobuf/cluster.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -11,30 +13,27 @@ * Protobuf type {@code tensorflow.JobDef} */ public final class JobDef extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.JobDef) JobDefOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + JobDef.class.getName()); + } // Use JobDef.newBuilder() to construct. - private JobDef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private JobDef(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private JobDef() { name_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new JobDef(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.ClusterProtos.internal_static_tensorflow_JobDef_descriptor; @@ -42,7 +41,7 @@ protected java.lang.Object newInstance( @SuppressWarnings({"rawtypes"}) @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 2: @@ -53,7 +52,7 @@ protected com.google.protobuf.MapField internalGetMapField( } } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.ClusterProtos.internal_static_tensorflow_JobDef_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -61,7 +60,8 @@ protected com.google.protobuf.MapField internalGetMapField( } public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; /** *
        * The name of this job.
    @@ -118,6 +118,7 @@ private static final class TasksDefaultEntryHolder {
                     com.google.protobuf.WireFormat.FieldType.STRING,
                     "");
       }
    +  @SuppressWarnings("serial")
       private com.google.protobuf.MapField<
           java.lang.Integer, java.lang.String> tasks_;
       private com.google.protobuf.MapField
    @@ -128,27 +129,27 @@ private static final class TasksDefaultEntryHolder {
         }
         return tasks_;
       }
    -
       public int getTasksCount() {
         return internalGetTasks().getMap().size();
       }
       /**
        * 
        * Mapping from task ID to "hostname:port" string.
    +   *
        * If the `name` field contains "worker", and the `tasks` map contains a
        * mapping from 7 to "example.org:2222", then the device prefix
        * "/job:worker/task:7" will be assigned to "example.org:2222".
    +   *
        * If a job has multiple replicas, host-ports will be comma-delimited, with
        * one entry for each replica.
        * 
    * * map<int32, string> tasks = 2; */ - @java.lang.Override public boolean containsTasks( int key) { - + return internalGetTasks().getMap().containsKey(key); } /** @@ -162,9 +163,11 @@ public java.util.Map getTasks() { /** *
        * Mapping from task ID to "hostname:port" string.
    +   *
        * If the `name` field contains "worker", and the `tasks` map contains a
        * mapping from 7 to "example.org:2222", then the device prefix
        * "/job:worker/task:7" will be assigned to "example.org:2222".
    +   *
        * If a job has multiple replicas, host-ports will be comma-delimited, with
        * one entry for each replica.
        * 
    @@ -172,16 +175,17 @@ public java.util.Map getTasks() { * map<int32, string> tasks = 2; */ @java.lang.Override - public java.util.Map getTasksMap() { return internalGetTasks().getMap(); } /** *
        * Mapping from task ID to "hostname:port" string.
    +   *
        * If the `name` field contains "worker", and the `tasks` map contains a
        * mapping from 7 to "example.org:2222", then the device prefix
        * "/job:worker/task:7" will be assigned to "example.org:2222".
    +   *
        * If a job has multiple replicas, host-ports will be comma-delimited, with
        * one entry for each replica.
        * 
    @@ -189,11 +193,12 @@ public java.util.Map getTasksMap() { * map<int32, string> tasks = 2; */ @java.lang.Override - - public java.lang.String getTasksOrDefault( + public /* nullable */ +java.lang.String getTasksOrDefault( int key, - java.lang.String defaultValue) { - + /* nullable */ +java.lang.String defaultValue) { + java.util.Map map = internalGetTasks().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; @@ -201,9 +206,11 @@ public java.lang.String getTasksOrDefault( /** *
        * Mapping from task ID to "hostname:port" string.
    +   *
        * If the `name` field contains "worker", and the `tasks` map contains a
        * mapping from 7 to "example.org:2222", then the device prefix
        * "/job:worker/task:7" will be assigned to "example.org:2222".
    +   *
        * If a job has multiple replicas, host-ports will be comma-delimited, with
        * one entry for each replica.
        * 
    @@ -211,10 +218,9 @@ public java.lang.String getTasksOrDefault( * map<int32, string> tasks = 2; */ @java.lang.Override - public java.lang.String getTasksOrThrow( int key) { - + java.util.Map map = internalGetTasks().getMap(); if (!map.containsKey(key)) { @@ -237,10 +243,10 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } - com.google.protobuf.GeneratedMessageV3 + com.google.protobuf.GeneratedMessage .serializeIntegerMapTo( output, internalGetTasks(), @@ -255,8 +261,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } for (java.util.Map.Entry entry : internalGetTasks().getMap().entrySet()) { @@ -343,39 +349,41 @@ public static org.tensorflow.proto.JobDef parseFrom( } public static org.tensorflow.proto.JobDef parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.JobDef parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.JobDef parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.JobDef parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.JobDef parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.JobDef parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -395,7 +403,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -407,7 +415,7 @@ protected Builder newBuilderForType( * Protobuf type {@code tensorflow.JobDef} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.JobDef) org.tensorflow.proto.JobDefOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -416,7 +424,7 @@ public static final class Builder extends } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 2: @@ -427,7 +435,7 @@ protected com.google.protobuf.MapField internalGetMapField( } } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( int number) { switch (number) { case 2: @@ -438,7 +446,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField( } } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.ClusterProtos.internal_static_tensorflow_JobDef_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -451,15 +459,15 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; name_ = ""; - internalGetMutableTasks().clear(); return this; } @@ -487,46 +495,22 @@ public org.tensorflow.proto.JobDef build() { @java.lang.Override public org.tensorflow.proto.JobDef buildPartial() { org.tensorflow.proto.JobDef result = new org.tensorflow.proto.JobDef(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.tasks_ = internalGetTasks(); - result.tasks_.makeImmutable(); + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.JobDef result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.tasks_ = internalGetTasks(); + result.tasks_.makeImmutable(); + } } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.JobDef) { @@ -541,10 +525,12 @@ public Builder mergeFrom(org.tensorflow.proto.JobDef other) { if (other == org.tensorflow.proto.JobDef.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; + bitField0_ |= 0x00000001; onChanged(); } internalGetMutableTasks().mergeFrom( other.internalGetTasks()); + bitField0_ |= 0x00000002; this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -573,7 +559,7 @@ public Builder mergeFrom( break; case 10: { name_ = input.readStringRequireUtf8(); - + bitField0_ |= 0x00000001; break; } // case 10 case 18: { @@ -582,6 +568,7 @@ public Builder mergeFrom( TasksDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableTasks().getMutableMap().put( tasks__.getKey(), tasks__.getValue()); + bitField0_ |= 0x00000002; break; } // case 18 default: { @@ -654,11 +641,9 @@ public java.lang.String getName() { */ public Builder setName( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } name_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -671,8 +656,8 @@ public Builder setName( * @return This builder for chaining. */ public Builder clearName() { - name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -687,12 +672,10 @@ public Builder clearName() { */ public Builder setNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); name_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -700,7 +683,7 @@ public Builder setNameBytes( private com.google.protobuf.MapField< java.lang.Integer, java.lang.String> tasks_; private com.google.protobuf.MapField - internalGetTasks() { + internalGetTasks() { if (tasks_ == null) { return com.google.protobuf.MapField.emptyMapField( TasksDefaultEntryHolder.defaultEntry); @@ -708,8 +691,7 @@ public Builder setNameBytes( return tasks_; } private com.google.protobuf.MapField - internalGetMutableTasks() { - onChanged();; + internalGetMutableTasks() { if (tasks_ == null) { tasks_ = com.google.protobuf.MapField.newMapField( TasksDefaultEntryHolder.defaultEntry); @@ -717,29 +699,31 @@ public Builder setNameBytes( if (!tasks_.isMutable()) { tasks_ = tasks_.copy(); } + bitField0_ |= 0x00000002; + onChanged(); return tasks_; } - public int getTasksCount() { return internalGetTasks().getMap().size(); } /** *
          * Mapping from task ID to "hostname:port" string.
    +     *
          * If the `name` field contains "worker", and the `tasks` map contains a
          * mapping from 7 to "example.org:2222", then the device prefix
          * "/job:worker/task:7" will be assigned to "example.org:2222".
    +     *
          * If a job has multiple replicas, host-ports will be comma-delimited, with
          * one entry for each replica.
          * 
    * * map<int32, string> tasks = 2; */ - @java.lang.Override public boolean containsTasks( int key) { - + return internalGetTasks().getMap().containsKey(key); } /** @@ -753,9 +737,11 @@ public java.util.Map getTasks() { /** *
          * Mapping from task ID to "hostname:port" string.
    +     *
          * If the `name` field contains "worker", and the `tasks` map contains a
          * mapping from 7 to "example.org:2222", then the device prefix
          * "/job:worker/task:7" will be assigned to "example.org:2222".
    +     *
          * If a job has multiple replicas, host-ports will be comma-delimited, with
          * one entry for each replica.
          * 
    @@ -763,16 +749,17 @@ public java.util.Map getTasks() { * map<int32, string> tasks = 2; */ @java.lang.Override - public java.util.Map getTasksMap() { return internalGetTasks().getMap(); } /** *
          * Mapping from task ID to "hostname:port" string.
    +     *
          * If the `name` field contains "worker", and the `tasks` map contains a
          * mapping from 7 to "example.org:2222", then the device prefix
          * "/job:worker/task:7" will be assigned to "example.org:2222".
    +     *
          * If a job has multiple replicas, host-ports will be comma-delimited, with
          * one entry for each replica.
          * 
    @@ -780,11 +767,12 @@ public java.util.Map getTasksMap() { * map<int32, string> tasks = 2; */ @java.lang.Override - - public java.lang.String getTasksOrDefault( + public /* nullable */ +java.lang.String getTasksOrDefault( int key, - java.lang.String defaultValue) { - + /* nullable */ +java.lang.String defaultValue) { + java.util.Map map = internalGetTasks().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; @@ -792,9 +780,11 @@ public java.lang.String getTasksOrDefault( /** *
          * Mapping from task ID to "hostname:port" string.
    +     *
          * If the `name` field contains "worker", and the `tasks` map contains a
          * mapping from 7 to "example.org:2222", then the device prefix
          * "/job:worker/task:7" will be assigned to "example.org:2222".
    +     *
          * If a job has multiple replicas, host-ports will be comma-delimited, with
          * one entry for each replica.
          * 
    @@ -802,10 +792,9 @@ public java.lang.String getTasksOrDefault( * map<int32, string> tasks = 2; */ @java.lang.Override - public java.lang.String getTasksOrThrow( int key) { - + java.util.Map map = internalGetTasks().getMap(); if (!map.containsKey(key)) { @@ -813,8 +802,8 @@ public java.lang.String getTasksOrThrow( } return map.get(key); } - public Builder clearTasks() { + bitField0_ = (bitField0_ & ~0x00000002); internalGetMutableTasks().getMutableMap() .clear(); return this; @@ -822,19 +811,20 @@ public Builder clearTasks() { /** *
          * Mapping from task ID to "hostname:port" string.
    +     *
          * If the `name` field contains "worker", and the `tasks` map contains a
          * mapping from 7 to "example.org:2222", then the device prefix
          * "/job:worker/task:7" will be assigned to "example.org:2222".
    +     *
          * If a job has multiple replicas, host-ports will be comma-delimited, with
          * one entry for each replica.
          * 
    * * map<int32, string> tasks = 2; */ - public Builder removeTasks( int key) { - + internalGetMutableTasks().getMutableMap() .remove(key); return this; @@ -844,15 +834,18 @@ public Builder removeTasks( */ @java.lang.Deprecated public java.util.Map - getMutableTasks() { + getMutableTasks() { + bitField0_ |= 0x00000002; return internalGetMutableTasks().getMutableMap(); } /** *
          * Mapping from task ID to "hostname:port" string.
    +     *
          * If the `name` field contains "worker", and the `tasks` map contains a
          * mapping from 7 to "example.org:2222", then the device prefix
          * "/job:worker/task:7" will be assigned to "example.org:2222".
    +     *
          * If a job has multiple replicas, host-ports will be comma-delimited, with
          * one entry for each replica.
          * 
    @@ -862,46 +855,34 @@ public Builder removeTasks( public Builder putTasks( int key, java.lang.String value) { - - if (value == null) { - throw new NullPointerException("map value"); -} + if (value == null) { throw new NullPointerException("map value"); } internalGetMutableTasks().getMutableMap() .put(key, value); + bitField0_ |= 0x00000002; return this; } /** *
          * Mapping from task ID to "hostname:port" string.
    +     *
          * If the `name` field contains "worker", and the `tasks` map contains a
          * mapping from 7 to "example.org:2222", then the device prefix
          * "/job:worker/task:7" will be assigned to "example.org:2222".
    +     *
          * If a job has multiple replicas, host-ports will be comma-delimited, with
          * one entry for each replica.
          * 
    * * map<int32, string> tasks = 2; */ - public Builder putAllTasks( java.util.Map values) { internalGetMutableTasks().getMutableMap() .putAll(values); + bitField0_ |= 0x00000002; return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.JobDef) } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/JobDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/JobDefOrBuilder.java index f7ba9e5e2f7..3de76e91c40 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/JobDefOrBuilder.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/JobDefOrBuilder.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/protobuf/cluster.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -30,9 +32,11 @@ public interface JobDefOrBuilder extends /** *
        * Mapping from task ID to "hostname:port" string.
    +   *
        * If the `name` field contains "worker", and the `tasks` map contains a
        * mapping from 7 to "example.org:2222", then the device prefix
        * "/job:worker/task:7" will be assigned to "example.org:2222".
    +   *
        * If a job has multiple replicas, host-ports will be comma-delimited, with
        * one entry for each replica.
        * 
    @@ -43,9 +47,11 @@ public interface JobDefOrBuilder extends /** *
        * Mapping from task ID to "hostname:port" string.
    +   *
        * If the `name` field contains "worker", and the `tasks` map contains a
        * mapping from 7 to "example.org:2222", then the device prefix
        * "/job:worker/task:7" will be assigned to "example.org:2222".
    +   *
        * If a job has multiple replicas, host-ports will be comma-delimited, with
        * one entry for each replica.
        * 
    @@ -63,9 +69,11 @@ boolean containsTasks( /** *
        * Mapping from task ID to "hostname:port" string.
    +   *
        * If the `name` field contains "worker", and the `tasks` map contains a
        * mapping from 7 to "example.org:2222", then the device prefix
        * "/job:worker/task:7" will be assigned to "example.org:2222".
    +   *
        * If a job has multiple replicas, host-ports will be comma-delimited, with
        * one entry for each replica.
        * 
    @@ -77,16 +85,17 @@ boolean containsTasks( /** *
        * Mapping from task ID to "hostname:port" string.
    +   *
        * If the `name` field contains "worker", and the `tasks` map contains a
        * mapping from 7 to "example.org:2222", then the device prefix
        * "/job:worker/task:7" will be assigned to "example.org:2222".
    +   *
        * If a job has multiple replicas, host-ports will be comma-delimited, with
        * one entry for each replica.
        * 
    * * map<int32, string> tasks = 2; */ - /* nullable */ java.lang.String getTasksOrDefault( int key, @@ -95,16 +104,17 @@ java.lang.String getTasksOrDefault( /** *
        * Mapping from task ID to "hostname:port" string.
    +   *
        * If the `name` field contains "worker", and the `tasks` map contains a
        * mapping from 7 to "example.org:2222", then the device prefix
        * "/job:worker/task:7" will be assigned to "example.org:2222".
    +   *
        * If a job has multiple replicas, host-ports will be comma-delimited, with
        * one entry for each replica.
        * 
    * * map<int32, string> tasks = 2; */ - java.lang.String getTasksOrThrow( int key); } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/JobDeviceFilters.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/JobDeviceFilters.java index 606381d8fb2..cbddbbfd0d0 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/JobDeviceFilters.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/JobDeviceFilters.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/protobuf/device_filters.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -11,30 +13,27 @@ * Protobuf type {@code tensorflow.JobDeviceFilters} */ public final class JobDeviceFilters extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.JobDeviceFilters) JobDeviceFiltersOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + JobDeviceFilters.class.getName()); + } // Use JobDeviceFilters.newBuilder() to construct. - private JobDeviceFilters(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private JobDeviceFilters(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private JobDeviceFilters() { name_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new JobDeviceFilters(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.DeviceFiltersProtos.internal_static_tensorflow_JobDeviceFilters_descriptor; @@ -42,7 +41,7 @@ protected java.lang.Object newInstance( @SuppressWarnings({"rawtypes"}) @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 2: @@ -53,7 +52,7 @@ protected com.google.protobuf.MapField internalGetMapField( } } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.DeviceFiltersProtos.internal_static_tensorflow_JobDeviceFilters_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -61,7 +60,8 @@ protected com.google.protobuf.MapField internalGetMapField( } public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; /** *
        * The name of this job.
    @@ -118,6 +118,7 @@ private static final class TasksDefaultEntryHolder {
                     com.google.protobuf.WireFormat.FieldType.MESSAGE,
                     org.tensorflow.proto.TaskDeviceFilters.getDefaultInstance());
       }
    +  @SuppressWarnings("serial")
       private com.google.protobuf.MapField<
           java.lang.Integer, org.tensorflow.proto.TaskDeviceFilters> tasks_;
       private com.google.protobuf.MapField
    @@ -128,7 +129,6 @@ private static final class TasksDefaultEntryHolder {
         }
         return tasks_;
       }
    -
       public int getTasksCount() {
         return internalGetTasks().getMap().size();
       }
    @@ -139,11 +139,10 @@ public int getTasksCount() {
        *
        * map<int32, .tensorflow.TaskDeviceFilters> tasks = 2;
        */
    -
       @java.lang.Override
       public boolean containsTasks(
           int key) {
    -    
    +
         return internalGetTasks().getMap().containsKey(key);
       }
       /**
    @@ -162,7 +161,6 @@ public java.util.Map
        * map<int32, .tensorflow.TaskDeviceFilters> tasks = 2;
        */
       @java.lang.Override
    -
       public java.util.Map getTasksMap() {
         return internalGetTasks().getMap();
       }
    @@ -174,11 +172,12 @@ public java.util.Map
        * map<int32, .tensorflow.TaskDeviceFilters> tasks = 2;
        */
       @java.lang.Override
    -
    -  public org.tensorflow.proto.TaskDeviceFilters getTasksOrDefault(
    +  public /* nullable */
    +org.tensorflow.proto.TaskDeviceFilters getTasksOrDefault(
           int key,
    -      org.tensorflow.proto.TaskDeviceFilters defaultValue) {
    -    
    +      /* nullable */
    +org.tensorflow.proto.TaskDeviceFilters defaultValue) {
    +
         java.util.Map map =
             internalGetTasks().getMap();
         return map.containsKey(key) ? map.get(key) : defaultValue;
    @@ -191,10 +190,9 @@ public org.tensorflow.proto.TaskDeviceFilters getTasksOrDefault(
        * map<int32, .tensorflow.TaskDeviceFilters> tasks = 2;
        */
       @java.lang.Override
    -
       public org.tensorflow.proto.TaskDeviceFilters getTasksOrThrow(
           int key) {
    -    
    +
         java.util.Map map =
             internalGetTasks().getMap();
         if (!map.containsKey(key)) {
    @@ -217,10 +215,10 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
         }
    -    com.google.protobuf.GeneratedMessageV3
    +    com.google.protobuf.GeneratedMessage
           .serializeIntegerMapTo(
             output,
             internalGetTasks(),
    @@ -235,8 +233,8 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
         }
         for (java.util.Map.Entry entry
              : internalGetTasks().getMap().entrySet()) {
    @@ -323,39 +321,41 @@ public static org.tensorflow.proto.JobDeviceFilters parseFrom(
       }
       public static org.tensorflow.proto.JobDeviceFilters parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.JobDeviceFilters parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.JobDeviceFilters parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.JobDeviceFilters parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.JobDeviceFilters parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.JobDeviceFilters parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -375,7 +375,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -387,7 +387,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.JobDeviceFilters}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.JobDeviceFilters)
           org.tensorflow.proto.JobDeviceFiltersOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -396,7 +396,7 @@ public static final class Builder extends
         }
     
         @SuppressWarnings({"rawtypes"})
    -    protected com.google.protobuf.MapField internalGetMapField(
    +    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
             int number) {
           switch (number) {
             case 2:
    @@ -407,7 +407,7 @@ protected com.google.protobuf.MapField internalGetMapField(
           }
         }
         @SuppressWarnings({"rawtypes"})
    -    protected com.google.protobuf.MapField internalGetMutableMapField(
    +    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
             int number) {
           switch (number) {
             case 2:
    @@ -418,7 +418,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField(
           }
         }
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.DeviceFiltersProtos.internal_static_tensorflow_JobDeviceFilters_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -431,15 +431,15 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           name_ = "";
    -
           internalGetMutableTasks().clear();
           return this;
         }
    @@ -467,46 +467,21 @@ public org.tensorflow.proto.JobDeviceFilters build() {
         @java.lang.Override
         public org.tensorflow.proto.JobDeviceFilters buildPartial() {
           org.tensorflow.proto.JobDeviceFilters result = new org.tensorflow.proto.JobDeviceFilters(this);
    -      int from_bitField0_ = bitField0_;
    -      result.name_ = name_;
    -      result.tasks_ = internalGetTasks();
    -      result.tasks_.makeImmutable();
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.JobDeviceFilters result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.name_ = name_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.tasks_ = internalGetTasks().build(TasksDefaultEntryHolder.defaultEntry);
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.JobDeviceFilters) {
    @@ -521,10 +496,12 @@ public Builder mergeFrom(org.tensorflow.proto.JobDeviceFilters other) {
           if (other == org.tensorflow.proto.JobDeviceFilters.getDefaultInstance()) return this;
           if (!other.getName().isEmpty()) {
             name_ = other.name_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           internalGetMutableTasks().mergeFrom(
               other.internalGetTasks());
    +      bitField0_ |= 0x00000002;
           this.mergeUnknownFields(other.getUnknownFields());
           onChanged();
           return this;
    @@ -553,15 +530,16 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   name_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
                   com.google.protobuf.MapEntry
                   tasks__ = input.readMessage(
                       TasksDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
    -              internalGetMutableTasks().getMutableMap().put(
    +              internalGetMutableTasks().ensureBuilderMap().put(
                       tasks__.getKey(), tasks__.getValue());
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 default: {
    @@ -634,11 +612,9 @@ public java.lang.String getName() {
          */
         public Builder setName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           name_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -651,8 +627,8 @@ public Builder setName(
          * @return This builder for chaining.
          */
         public Builder clearName() {
    -      
           name_ = getDefaultInstance().getName();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -667,41 +643,48 @@ public Builder clearName() {
          */
         public Builder setNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           name_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
     
    -    private com.google.protobuf.MapField<
    -        java.lang.Integer, org.tensorflow.proto.TaskDeviceFilters> tasks_;
    -    private com.google.protobuf.MapField
    -    internalGetTasks() {
    +    private static final class TasksConverter implements com.google.protobuf.MapFieldBuilder.Converter {
    +      @java.lang.Override
    +      public org.tensorflow.proto.TaskDeviceFilters build(org.tensorflow.proto.TaskDeviceFiltersOrBuilder val) {
    +        if (val instanceof org.tensorflow.proto.TaskDeviceFilters) { return (org.tensorflow.proto.TaskDeviceFilters) val; }
    +        return ((org.tensorflow.proto.TaskDeviceFilters.Builder) val).build();
    +      }
    +
    +      @java.lang.Override
    +      public com.google.protobuf.MapEntry defaultEntry() {
    +        return TasksDefaultEntryHolder.defaultEntry;
    +      }
    +    };
    +    private static final TasksConverter tasksConverter = new TasksConverter();
    +
    +    private com.google.protobuf.MapFieldBuilder<
    +        java.lang.Integer, org.tensorflow.proto.TaskDeviceFiltersOrBuilder, org.tensorflow.proto.TaskDeviceFilters, org.tensorflow.proto.TaskDeviceFilters.Builder> tasks_;
    +    private com.google.protobuf.MapFieldBuilder
    +        internalGetTasks() {
           if (tasks_ == null) {
    -        return com.google.protobuf.MapField.emptyMapField(
    -            TasksDefaultEntryHolder.defaultEntry);
    +        return new com.google.protobuf.MapFieldBuilder<>(tasksConverter);
           }
           return tasks_;
         }
    -    private com.google.protobuf.MapField
    -    internalGetMutableTasks() {
    -      onChanged();;
    +    private com.google.protobuf.MapFieldBuilder
    +        internalGetMutableTasks() {
           if (tasks_ == null) {
    -        tasks_ = com.google.protobuf.MapField.newMapField(
    -            TasksDefaultEntryHolder.defaultEntry);
    -      }
    -      if (!tasks_.isMutable()) {
    -        tasks_ = tasks_.copy();
    +        tasks_ = new com.google.protobuf.MapFieldBuilder<>(tasksConverter);
           }
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return tasks_;
         }
    -
         public int getTasksCount() {
    -      return internalGetTasks().getMap().size();
    +      return internalGetTasks().ensureBuilderMap().size();
         }
         /**
          * 
    @@ -710,12 +693,11 @@ public int getTasksCount() {
          *
          * map<int32, .tensorflow.TaskDeviceFilters> tasks = 2;
          */
    -
         @java.lang.Override
         public boolean containsTasks(
             int key) {
    -      
    -      return internalGetTasks().getMap().containsKey(key);
    +
    +      return internalGetTasks().ensureBuilderMap().containsKey(key);
         }
         /**
          * Use {@link #getTasksMap()} instead.
    @@ -733,9 +715,8 @@ public java.util.Map
          * map<int32, .tensorflow.TaskDeviceFilters> tasks = 2;
          */
         @java.lang.Override
    -
         public java.util.Map getTasksMap() {
    -      return internalGetTasks().getMap();
    +      return internalGetTasks().getImmutableMap();
         }
         /**
          * 
    @@ -745,14 +726,14 @@ public java.util.Map
          * map<int32, .tensorflow.TaskDeviceFilters> tasks = 2;
          */
         @java.lang.Override
    -
    -    public org.tensorflow.proto.TaskDeviceFilters getTasksOrDefault(
    +    public /* nullable */
    +org.tensorflow.proto.TaskDeviceFilters getTasksOrDefault(
             int key,
    -        org.tensorflow.proto.TaskDeviceFilters defaultValue) {
    -      
    -      java.util.Map map =
    -          internalGetTasks().getMap();
    -      return map.containsKey(key) ? map.get(key) : defaultValue;
    +        /* nullable */
    +org.tensorflow.proto.TaskDeviceFilters defaultValue) {
    +
    +      java.util.Map map = internalGetMutableTasks().ensureBuilderMap();
    +      return map.containsKey(key) ? tasksConverter.build(map.get(key)) : defaultValue;
         }
         /**
          * 
    @@ -762,21 +743,18 @@ public org.tensorflow.proto.TaskDeviceFilters getTasksOrDefault(
          * map<int32, .tensorflow.TaskDeviceFilters> tasks = 2;
          */
         @java.lang.Override
    -
         public org.tensorflow.proto.TaskDeviceFilters getTasksOrThrow(
             int key) {
    -      
    -      java.util.Map map =
    -          internalGetTasks().getMap();
    +
    +      java.util.Map map = internalGetMutableTasks().ensureBuilderMap();
           if (!map.containsKey(key)) {
             throw new java.lang.IllegalArgumentException();
           }
    -      return map.get(key);
    +      return tasksConverter.build(map.get(key));
         }
    -
         public Builder clearTasks() {
    -      internalGetMutableTasks().getMutableMap()
    -          .clear();
    +      bitField0_ = (bitField0_ & ~0x00000002);
    +      internalGetMutableTasks().clear();
           return this;
         }
         /**
    @@ -786,11 +764,10 @@ public Builder clearTasks() {
          *
          * map<int32, .tensorflow.TaskDeviceFilters> tasks = 2;
          */
    -
         public Builder removeTasks(
             int key) {
    -      
    -      internalGetMutableTasks().getMutableMap()
    +
    +      internalGetMutableTasks().ensureBuilderMap()
               .remove(key);
           return this;
         }
    @@ -799,8 +776,9 @@ public Builder removeTasks(
          */
         @java.lang.Deprecated
         public java.util.Map
    -    getMutableTasks() {
    -      return internalGetMutableTasks().getMutableMap();
    +        getMutableTasks() {
    +      bitField0_ |= 0x00000002;
    +      return internalGetMutableTasks().ensureMessageMap();
         }
         /**
          * 
    @@ -812,13 +790,11 @@ public Builder removeTasks(
         public Builder putTasks(
             int key,
             org.tensorflow.proto.TaskDeviceFilters value) {
    -      
    -      if (value == null) {
    -  throw new NullPointerException("map value");
    -}
     
    -      internalGetMutableTasks().getMutableMap()
    +      if (value == null) { throw new NullPointerException("map value"); }
    +      internalGetMutableTasks().ensureBuilderMap()
               .put(key, value);
    +      bitField0_ |= 0x00000002;
           return this;
         }
         /**
    @@ -828,26 +804,40 @@ public Builder putTasks(
          *
          * map<int32, .tensorflow.TaskDeviceFilters> tasks = 2;
          */
    -
         public Builder putAllTasks(
             java.util.Map values) {
    -      internalGetMutableTasks().getMutableMap()
    +      for (java.util.Map.Entry e : values.entrySet()) {
    +        if (e.getKey() == null || e.getValue() == null) {
    +          throw new NullPointerException();
    +        }
    +      }
    +      internalGetMutableTasks().ensureBuilderMap()
               .putAll(values);
    +      bitField0_ |= 0x00000002;
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    +    /**
    +     * 
    +     * Mapping from task ID to task device filters.
    +     * 
    + * + * map<int32, .tensorflow.TaskDeviceFilters> tasks = 2; + */ + public org.tensorflow.proto.TaskDeviceFilters.Builder putTasksBuilderIfAbsent( + int key) { + java.util.Map builderMap = internalGetMutableTasks().ensureBuilderMap(); + org.tensorflow.proto.TaskDeviceFiltersOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = org.tensorflow.proto.TaskDeviceFilters.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof org.tensorflow.proto.TaskDeviceFilters) { + entry = ((org.tensorflow.proto.TaskDeviceFilters) entry).toBuilder(); + builderMap.put(key, entry); + } + return (org.tensorflow.proto.TaskDeviceFilters.Builder) entry; } - // @@protoc_insertion_point(builder_scope:tensorflow.JobDeviceFilters) } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/JobDeviceFiltersOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/JobDeviceFiltersOrBuilder.java index 7108c3d23ce..3988b3ef971 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/JobDeviceFiltersOrBuilder.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/JobDeviceFiltersOrBuilder.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/protobuf/device_filters.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -66,7 +68,6 @@ boolean containsTasks( * * map<int32, .tensorflow.TaskDeviceFilters> tasks = 2; */ - /* nullable */ org.tensorflow.proto.TaskDeviceFilters getTasksOrDefault( int key, @@ -79,7 +80,6 @@ org.tensorflow.proto.TaskDeviceFilters getTasksOrDefault( * * map<int32, .tensorflow.TaskDeviceFilters> tasks = 2; */ - org.tensorflow.proto.TaskDeviceFilters getTasksOrThrow( int key); } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelDef.java index 760847ecb03..8efe1c1e228 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelDef.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelDef.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/framework/kernel_def.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -7,41 +9,39 @@ * Protobuf type {@code tensorflow.KernelDef} */ public final class KernelDef extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.KernelDef) KernelDefOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + KernelDef.class.getName()); + } // Use KernelDef.newBuilder() to construct. - private KernelDef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private KernelDef(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private KernelDef() { op_ = ""; deviceType_ = ""; constraint_ = java.util.Collections.emptyList(); - hostMemoryArg_ = com.google.protobuf.LazyStringArrayList.EMPTY; + hostMemoryArg_ = + com.google.protobuf.LazyStringArrayList.emptyList(); label_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new KernelDef(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.KernelDefProtos.internal_static_tensorflow_KernelDef_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.KernelDefProtos.internal_static_tensorflow_KernelDef_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -106,45 +106,44 @@ public interface AttrConstraintOrBuilder extends * Protobuf type {@code tensorflow.KernelDef.AttrConstraint} */ public static final class AttrConstraint extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.KernelDef.AttrConstraint) AttrConstraintOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + AttrConstraint.class.getName()); + } // Use AttrConstraint.newBuilder() to construct. - private AttrConstraint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private AttrConstraint(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private AttrConstraint() { name_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AttrConstraint(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.KernelDefProtos.internal_static_tensorflow_KernelDef_AttrConstraint_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.KernelDefProtos.internal_static_tensorflow_KernelDef_AttrConstraint_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.proto.KernelDef.AttrConstraint.class, org.tensorflow.proto.KernelDef.AttrConstraint.Builder.class); } + private int bitField0_; public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; /** *
          * Name of an attr from the Op.
    @@ -202,7 +201,7 @@ public java.lang.String getName() {
          */
         @java.lang.Override
         public boolean hasAllowedValues() {
    -      return allowedValues_ != null;
    +      return ((bitField0_ & 0x00000001) != 0);
         }
         /**
          * 
    @@ -227,7 +226,7 @@ public org.tensorflow.proto.AttrValue getAllowedValues() {
          */
         @java.lang.Override
         public org.tensorflow.proto.AttrValueOrBuilder getAllowedValuesOrBuilder() {
    -      return getAllowedValues();
    +      return allowedValues_ == null ? org.tensorflow.proto.AttrValue.getDefaultInstance() : allowedValues_;
         }
     
         private byte memoizedIsInitialized = -1;
    @@ -244,10 +243,10 @@ public final boolean isInitialized() {
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output)
                             throws java.io.IOException {
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
           }
    -      if (allowedValues_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             output.writeMessage(2, getAllowedValues());
           }
           getUnknownFields().writeTo(output);
    @@ -259,10 +258,10 @@ public int getSerializedSize() {
           if (size != -1) return size;
     
           size = 0;
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
           }
    -      if (allowedValues_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(2, getAllowedValues());
           }
    @@ -344,39 +343,41 @@ public static org.tensorflow.proto.KernelDef.AttrConstraint parseFrom(
         }
         public static org.tensorflow.proto.KernelDef.AttrConstraint parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.KernelDef.AttrConstraint parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.KernelDef.AttrConstraint parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.KernelDef.AttrConstraint parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.KernelDef.AttrConstraint parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.KernelDef.AttrConstraint parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -396,7 +397,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -404,7 +405,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.KernelDef.AttrConstraint}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.KernelDef.AttrConstraint)
             org.tensorflow.proto.KernelDef.AttrConstraintOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -413,7 +414,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.KernelDefProtos.internal_static_tensorflow_KernelDef_AttrConstraint_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -422,23 +423,28 @@ public static final class Builder extends
     
           // Construct using org.tensorflow.proto.KernelDef.AttrConstraint.newBuilder()
           private Builder() {
    -
    +        maybeForceBuilderInitialization();
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
    -
    +        maybeForceBuilderInitialization();
    +      }
    +      private void maybeForceBuilderInitialization() {
    +        if (com.google.protobuf.GeneratedMessage
    +                .alwaysUseFieldBuilders) {
    +          getAllowedValuesFieldBuilder();
    +        }
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             name_ = "";
    -
    -        if (allowedValuesBuilder_ == null) {
    -          allowedValues_ = null;
    -        } else {
    -          allowedValues_ = null;
    +        allowedValues_ = null;
    +        if (allowedValuesBuilder_ != null) {
    +          allowedValuesBuilder_.dispose();
               allowedValuesBuilder_ = null;
             }
             return this;
    @@ -467,48 +473,26 @@ public org.tensorflow.proto.KernelDef.AttrConstraint build() {
           @java.lang.Override
           public org.tensorflow.proto.KernelDef.AttrConstraint buildPartial() {
             org.tensorflow.proto.KernelDef.AttrConstraint result = new org.tensorflow.proto.KernelDef.AttrConstraint(this);
    -        result.name_ = name_;
    -        if (allowedValuesBuilder_ == null) {
    -          result.allowedValues_ = allowedValues_;
    -        } else {
    -          result.allowedValues_ = allowedValuesBuilder_.build();
    -        }
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.KernelDef.AttrConstraint result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.name_ = name_;
    +        }
    +        int to_bitField0_ = 0;
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.allowedValues_ = allowedValuesBuilder_ == null
    +              ? allowedValues_
    +              : allowedValuesBuilder_.build();
    +          to_bitField0_ |= 0x00000001;
    +        }
    +        result.bitField0_ |= to_bitField0_;
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.KernelDef.AttrConstraint) {
    @@ -523,6 +507,7 @@ public Builder mergeFrom(org.tensorflow.proto.KernelDef.AttrConstraint other) {
             if (other == org.tensorflow.proto.KernelDef.AttrConstraint.getDefaultInstance()) return this;
             if (!other.getName().isEmpty()) {
               name_ = other.name_;
    +          bitField0_ |= 0x00000001;
               onChanged();
             }
             if (other.hasAllowedValues()) {
    @@ -556,14 +541,14 @@ public Builder mergeFrom(
                     break;
                   case 10: {
                     name_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 10
                   case 18: {
                     input.readMessage(
                         getAllowedValuesFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 18
                   default: {
    @@ -581,6 +566,7 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    +      private int bitField0_;
     
           private java.lang.Object name_ = "";
           /**
    @@ -635,11 +621,9 @@ public java.lang.String getName() {
            */
           public Builder setName(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             name_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -652,8 +636,8 @@ public Builder setName(
            * @return This builder for chaining.
            */
           public Builder clearName() {
    -        
             name_ = getDefaultInstance().getName();
    +        bitField0_ = (bitField0_ & ~0x00000001);
             onChanged();
             return this;
           }
    @@ -668,18 +652,16 @@ public Builder clearName() {
            */
           public Builder setNameBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             name_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
     
           private org.tensorflow.proto.AttrValue allowedValues_;
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.AttrValue, org.tensorflow.proto.AttrValue.Builder, org.tensorflow.proto.AttrValueOrBuilder> allowedValuesBuilder_;
           /**
            * 
    @@ -691,7 +673,7 @@ public Builder setNameBytes(
            * @return Whether the allowedValues field is set.
            */
           public boolean hasAllowedValues() {
    -        return allowedValuesBuilder_ != null || allowedValues_ != null;
    +        return ((bitField0_ & 0x00000002) != 0);
           }
           /**
            * 
    @@ -723,11 +705,11 @@ public Builder setAllowedValues(org.tensorflow.proto.AttrValue value) {
                 throw new NullPointerException();
               }
               allowedValues_ = value;
    -          onChanged();
             } else {
               allowedValuesBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000002;
    +        onChanged();
             return this;
           }
           /**
    @@ -742,11 +724,11 @@ public Builder setAllowedValues(
               org.tensorflow.proto.AttrValue.Builder builderForValue) {
             if (allowedValuesBuilder_ == null) {
               allowedValues_ = builderForValue.build();
    -          onChanged();
             } else {
               allowedValuesBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000002;
    +        onChanged();
             return this;
           }
           /**
    @@ -759,17 +741,20 @@ public Builder setAllowedValues(
            */
           public Builder mergeAllowedValues(org.tensorflow.proto.AttrValue value) {
             if (allowedValuesBuilder_ == null) {
    -          if (allowedValues_ != null) {
    -            allowedValues_ =
    -              org.tensorflow.proto.AttrValue.newBuilder(allowedValues_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000002) != 0) &&
    +            allowedValues_ != null &&
    +            allowedValues_ != org.tensorflow.proto.AttrValue.getDefaultInstance()) {
    +            getAllowedValuesBuilder().mergeFrom(value);
               } else {
                 allowedValues_ = value;
               }
    -          onChanged();
             } else {
               allowedValuesBuilder_.mergeFrom(value);
             }
    -
    +        if (allowedValues_ != null) {
    +          bitField0_ |= 0x00000002;
    +          onChanged();
    +        }
             return this;
           }
           /**
    @@ -781,14 +766,13 @@ public Builder mergeAllowedValues(org.tensorflow.proto.AttrValue value) {
            * .tensorflow.AttrValue allowed_values = 2;
            */
           public Builder clearAllowedValues() {
    -        if (allowedValuesBuilder_ == null) {
    -          allowedValues_ = null;
    -          onChanged();
    -        } else {
    -          allowedValues_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000002);
    +        allowedValues_ = null;
    +        if (allowedValuesBuilder_ != null) {
    +          allowedValuesBuilder_.dispose();
               allowedValuesBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
    @@ -800,7 +784,7 @@ public Builder clearAllowedValues() {
            * .tensorflow.AttrValue allowed_values = 2;
            */
           public org.tensorflow.proto.AttrValue.Builder getAllowedValuesBuilder() {
    -        
    +        bitField0_ |= 0x00000002;
             onChanged();
             return getAllowedValuesFieldBuilder().getBuilder();
           }
    @@ -828,11 +812,11 @@ public org.tensorflow.proto.AttrValueOrBuilder getAllowedValuesOrBuilder() {
            *
            * .tensorflow.AttrValue allowed_values = 2;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.AttrValue, org.tensorflow.proto.AttrValue.Builder, org.tensorflow.proto.AttrValueOrBuilder> 
               getAllowedValuesFieldBuilder() {
             if (allowedValuesBuilder_ == null) {
    -          allowedValuesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          allowedValuesBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.AttrValue, org.tensorflow.proto.AttrValue.Builder, org.tensorflow.proto.AttrValueOrBuilder>(
                       getAllowedValues(),
                       getParentForChildren(),
    @@ -841,18 +825,6 @@ public org.tensorflow.proto.AttrValueOrBuilder getAllowedValuesOrBuilder() {
             }
             return allowedValuesBuilder_;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.KernelDef.AttrConstraint)
         }
    @@ -906,7 +878,8 @@ public org.tensorflow.proto.KernelDef.AttrConstraint getDefaultInstanceForType()
       }
     
       public static final int OP_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object op_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object op_ = "";
       /**
        * 
        * Must match the name of an Op.
    @@ -952,7 +925,8 @@ public java.lang.String getOp() {
       }
     
       public static final int DEVICE_TYPE_FIELD_NUMBER = 2;
    -  private volatile java.lang.Object deviceType_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object deviceType_ = "";
       /**
        * 
        * Type of device this kernel runs on.
    @@ -998,6 +972,7 @@ public java.lang.String getDeviceType() {
       }
     
       public static final int CONSTRAINT_FIELD_NUMBER = 3;
    +  @SuppressWarnings("serial")
       private java.util.List constraint_;
       /**
        * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3;
    @@ -1038,7 +1013,9 @@ public org.tensorflow.proto.KernelDef.AttrConstraintOrBuilder getConstraintOrBui
       }
     
       public static final int HOST_MEMORY_ARG_FIELD_NUMBER = 4;
    -  private com.google.protobuf.LazyStringList hostMemoryArg_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.LazyStringArrayList hostMemoryArg_ =
    +      com.google.protobuf.LazyStringArrayList.emptyList();
       /**
        * 
        * Names of the Op's input_/output_args that reside in host memory
    @@ -1093,7 +1070,8 @@ public java.lang.String getHostMemoryArg(int index) {
       }
     
       public static final int LABEL_FIELD_NUMBER = 5;
    -  private volatile java.lang.Object label_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object label_ = "";
       /**
        * 
        * This allows experimental kernels to be registered for an op that
    @@ -1143,7 +1121,7 @@ public java.lang.String getLabel() {
       }
     
       public static final int PRIORITY_FIELD_NUMBER = 6;
    -  private int priority_;
    +  private int priority_ = 0;
       /**
        * 
        * Prioritization of kernel amongst different devices. By default we assume
    @@ -1173,20 +1151,20 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(op_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, op_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(op_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, op_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceType_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, deviceType_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(deviceType_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 2, deviceType_);
         }
         for (int i = 0; i < constraint_.size(); i++) {
           output.writeMessage(3, constraint_.get(i));
         }
         for (int i = 0; i < hostMemoryArg_.size(); i++) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, hostMemoryArg_.getRaw(i));
    +      com.google.protobuf.GeneratedMessage.writeString(output, 4, hostMemoryArg_.getRaw(i));
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, label_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(label_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 5, label_);
         }
         if (priority_ != 0) {
           output.writeInt32(6, priority_);
    @@ -1200,11 +1178,11 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(op_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, op_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(op_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, op_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceType_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, deviceType_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(deviceType_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(2, deviceType_);
         }
         for (int i = 0; i < constraint_.size(); i++) {
           size += com.google.protobuf.CodedOutputStream
    @@ -1218,8 +1196,8 @@ public int getSerializedSize() {
           size += dataSize;
           size += 1 * getHostMemoryArgList().size();
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, label_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(label_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(5, label_);
         }
         if (priority_ != 0) {
           size += com.google.protobuf.CodedOutputStream
    @@ -1318,39 +1296,41 @@ public static org.tensorflow.proto.KernelDef parseFrom(
       }
       public static org.tensorflow.proto.KernelDef parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.KernelDef parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.KernelDef parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.KernelDef parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.KernelDef parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.KernelDef parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -1370,7 +1350,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -1378,7 +1358,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.KernelDef}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.KernelDef)
           org.tensorflow.proto.KernelDefOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -1387,7 +1367,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.KernelDefProtos.internal_static_tensorflow_KernelDef_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -1400,30 +1380,27 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           op_ = "";
    -
           deviceType_ = "";
    -
           if (constraintBuilder_ == null) {
             constraint_ = java.util.Collections.emptyList();
           } else {
             constraint_ = null;
             constraintBuilder_.clear();
           }
    -      bitField0_ = (bitField0_ & ~0x00000001);
    -      hostMemoryArg_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000002);
    +      bitField0_ = (bitField0_ & ~0x00000004);
    +      hostMemoryArg_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
           label_ = "";
    -
           priority_ = 0;
    -
           return this;
         }
     
    @@ -1450,61 +1427,44 @@ public org.tensorflow.proto.KernelDef build() {
         @java.lang.Override
         public org.tensorflow.proto.KernelDef buildPartial() {
           org.tensorflow.proto.KernelDef result = new org.tensorflow.proto.KernelDef(this);
    -      int from_bitField0_ = bitField0_;
    -      result.op_ = op_;
    -      result.deviceType_ = deviceType_;
    +      buildPartialRepeatedFields(result);
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartialRepeatedFields(org.tensorflow.proto.KernelDef result) {
           if (constraintBuilder_ == null) {
    -        if (((bitField0_ & 0x00000001) != 0)) {
    +        if (((bitField0_ & 0x00000004) != 0)) {
               constraint_ = java.util.Collections.unmodifiableList(constraint_);
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ = (bitField0_ & ~0x00000004);
             }
             result.constraint_ = constraint_;
           } else {
             result.constraint_ = constraintBuilder_.build();
           }
    -      if (((bitField0_ & 0x00000002) != 0)) {
    -        hostMemoryArg_ = hostMemoryArg_.getUnmodifiableView();
    -        bitField0_ = (bitField0_ & ~0x00000002);
    -      }
    -      result.hostMemoryArg_ = hostMemoryArg_;
    -      result.label_ = label_;
    -      result.priority_ = priority_;
    -      onBuilt();
    -      return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.KernelDef result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.op_ = op_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.deviceType_ = deviceType_;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        hostMemoryArg_.makeImmutable();
    +        result.hostMemoryArg_ = hostMemoryArg_;
    +      }
    +      if (((from_bitField0_ & 0x00000010) != 0)) {
    +        result.label_ = label_;
    +      }
    +      if (((from_bitField0_ & 0x00000020) != 0)) {
    +        result.priority_ = priority_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.KernelDef) {
    @@ -1519,17 +1479,19 @@ public Builder mergeFrom(org.tensorflow.proto.KernelDef other) {
           if (other == org.tensorflow.proto.KernelDef.getDefaultInstance()) return this;
           if (!other.getOp().isEmpty()) {
             op_ = other.op_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (!other.getDeviceType().isEmpty()) {
             deviceType_ = other.deviceType_;
    +        bitField0_ |= 0x00000002;
             onChanged();
           }
           if (constraintBuilder_ == null) {
             if (!other.constraint_.isEmpty()) {
               if (constraint_.isEmpty()) {
                 constraint_ = other.constraint_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000004);
               } else {
                 ensureConstraintIsMutable();
                 constraint_.addAll(other.constraint_);
    @@ -1542,9 +1504,9 @@ public Builder mergeFrom(org.tensorflow.proto.KernelDef other) {
                 constraintBuilder_.dispose();
                 constraintBuilder_ = null;
                 constraint_ = other.constraint_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000004);
                 constraintBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getConstraintFieldBuilder() : null;
               } else {
                 constraintBuilder_.addAllMessages(other.constraint_);
    @@ -1554,7 +1516,7 @@ public Builder mergeFrom(org.tensorflow.proto.KernelDef other) {
           if (!other.hostMemoryArg_.isEmpty()) {
             if (hostMemoryArg_.isEmpty()) {
               hostMemoryArg_ = other.hostMemoryArg_;
    -          bitField0_ = (bitField0_ & ~0x00000002);
    +          bitField0_ |= 0x00000008;
             } else {
               ensureHostMemoryArgIsMutable();
               hostMemoryArg_.addAll(other.hostMemoryArg_);
    @@ -1563,6 +1525,7 @@ public Builder mergeFrom(org.tensorflow.proto.KernelDef other) {
           }
           if (!other.getLabel().isEmpty()) {
             label_ = other.label_;
    +        bitField0_ |= 0x00000010;
             onChanged();
           }
           if (other.getPriority() != 0) {
    @@ -1596,12 +1559,12 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   op_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
                   deviceType_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 case 26: {
    @@ -1625,12 +1588,12 @@ public Builder mergeFrom(
                 } // case 34
                 case 42: {
                   label_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000010;
                   break;
                 } // case 42
                 case 48: {
                   priority_ = input.readInt32();
    -
    +              bitField0_ |= 0x00000020;
                   break;
                 } // case 48
                 default: {
    @@ -1703,11 +1666,9 @@ public java.lang.String getOp() {
          */
         public Builder setOp(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           op_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -1720,8 +1681,8 @@ public Builder setOp(
          * @return This builder for chaining.
          */
         public Builder clearOp() {
    -      
           op_ = getDefaultInstance().getOp();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -1736,12 +1697,10 @@ public Builder clearOp() {
          */
         public Builder setOpBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           op_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -1799,11 +1758,9 @@ public java.lang.String getDeviceType() {
          */
         public Builder setDeviceType(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           deviceType_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -1816,8 +1773,8 @@ public Builder setDeviceType(
          * @return This builder for chaining.
          */
         public Builder clearDeviceType() {
    -      
           deviceType_ = getDefaultInstance().getDeviceType();
    +      bitField0_ = (bitField0_ & ~0x00000002);
           onChanged();
           return this;
         }
    @@ -1832,12 +1789,10 @@ public Builder clearDeviceType() {
          */
         public Builder setDeviceTypeBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           deviceType_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -1845,13 +1800,13 @@ public Builder setDeviceTypeBytes(
         private java.util.List constraint_ =
           java.util.Collections.emptyList();
         private void ensureConstraintIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    +      if (!((bitField0_ & 0x00000004) != 0)) {
             constraint_ = new java.util.ArrayList(constraint_);
    -        bitField0_ |= 0x00000001;
    +        bitField0_ |= 0x00000004;
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.KernelDef.AttrConstraint, org.tensorflow.proto.KernelDef.AttrConstraint.Builder, org.tensorflow.proto.KernelDef.AttrConstraintOrBuilder> constraintBuilder_;
     
         /**
    @@ -1997,7 +1952,7 @@ public Builder addAllConstraint(
         public Builder clearConstraint() {
           if (constraintBuilder_ == null) {
             constraint_ = java.util.Collections.emptyList();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        bitField0_ = (bitField0_ & ~0x00000004);
             onChanged();
           } else {
             constraintBuilder_.clear();
    @@ -2067,14 +2022,14 @@ public org.tensorflow.proto.KernelDef.AttrConstraint.Builder addConstraintBuilde
              getConstraintBuilderList() {
           return getConstraintFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.KernelDef.AttrConstraint, org.tensorflow.proto.KernelDef.AttrConstraint.Builder, org.tensorflow.proto.KernelDef.AttrConstraintOrBuilder> 
             getConstraintFieldBuilder() {
           if (constraintBuilder_ == null) {
    -        constraintBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        constraintBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.KernelDef.AttrConstraint, org.tensorflow.proto.KernelDef.AttrConstraint.Builder, org.tensorflow.proto.KernelDef.AttrConstraintOrBuilder>(
                     constraint_,
    -                ((bitField0_ & 0x00000001) != 0),
    +                ((bitField0_ & 0x00000004) != 0),
                     getParentForChildren(),
                     isClean());
             constraint_ = null;
    @@ -2082,12 +2037,13 @@ public org.tensorflow.proto.KernelDef.AttrConstraint.Builder addConstraintBuilde
           return constraintBuilder_;
         }
     
    -    private com.google.protobuf.LazyStringList hostMemoryArg_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +    private com.google.protobuf.LazyStringArrayList hostMemoryArg_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         private void ensureHostMemoryArgIsMutable() {
    -      if (!((bitField0_ & 0x00000002) != 0)) {
    +      if (!hostMemoryArg_.isModifiable()) {
             hostMemoryArg_ = new com.google.protobuf.LazyStringArrayList(hostMemoryArg_);
    -        bitField0_ |= 0x00000002;
    -       }
    +      }
    +      bitField0_ |= 0x00000008;
         }
         /**
          * 
    @@ -2100,7 +2056,8 @@ private void ensureHostMemoryArgIsMutable() {
          */
         public com.google.protobuf.ProtocolStringList
             getHostMemoryArgList() {
    -      return hostMemoryArg_.getUnmodifiableView();
    +      hostMemoryArg_.makeImmutable();
    +      return hostMemoryArg_;
         }
         /**
          * 
    @@ -2154,11 +2111,10 @@ public java.lang.String getHostMemoryArg(int index) {
          */
         public Builder setHostMemoryArg(
             int index, java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureHostMemoryArgIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureHostMemoryArgIsMutable();
           hostMemoryArg_.set(index, value);
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -2174,11 +2130,10 @@ public Builder setHostMemoryArg(
          */
         public Builder addHostMemoryArg(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureHostMemoryArgIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureHostMemoryArgIsMutable();
           hostMemoryArg_.add(value);
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -2197,6 +2152,7 @@ public Builder addAllHostMemoryArg(
           ensureHostMemoryArgIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, hostMemoryArg_);
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -2210,8 +2166,9 @@ public Builder addAllHostMemoryArg(
          * @return This builder for chaining.
          */
         public Builder clearHostMemoryArg() {
    -      hostMemoryArg_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000002);
    +      hostMemoryArg_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
    +      bitField0_ = (bitField0_ & ~0x00000008);;
           onChanged();
           return this;
         }
    @@ -2227,12 +2184,11 @@ public Builder clearHostMemoryArg() {
          */
         public Builder addHostMemoryArgBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           ensureHostMemoryArgIsMutable();
           hostMemoryArg_.add(value);
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -2296,11 +2252,9 @@ public java.lang.String getLabel() {
          */
         public Builder setLabel(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           label_ = value;
    +      bitField0_ |= 0x00000010;
           onChanged();
           return this;
         }
    @@ -2315,8 +2269,8 @@ public Builder setLabel(
          * @return This builder for chaining.
          */
         public Builder clearLabel() {
    -      
           label_ = getDefaultInstance().getLabel();
    +      bitField0_ = (bitField0_ & ~0x00000010);
           onChanged();
           return this;
         }
    @@ -2333,12 +2287,10 @@ public Builder clearLabel() {
          */
         public Builder setLabelBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           label_ = value;
    +      bitField0_ |= 0x00000010;
           onChanged();
           return this;
         }
    @@ -2370,8 +2322,9 @@ public int getPriority() {
          * @return This builder for chaining.
          */
         public Builder setPriority(int value) {
    -      
    +
           priority_ = value;
    +      bitField0_ |= 0x00000020;
           onChanged();
           return this;
         }
    @@ -2386,23 +2339,11 @@ public Builder setPriority(int value) {
          * @return This builder for chaining.
          */
         public Builder clearPriority() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000020);
           priority_ = 0;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.KernelDef)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelDefOrBuilder.java
    index 52343e9893f..33d6bc783ed 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelDefOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelDefOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/kernel_def.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelDefProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelDefProtos.java
    index d2ed48b1d61..6186e35bccd 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelDefProtos.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelDefProtos.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/kernel_def.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class KernelDefProtos {
       private KernelDefProtos() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      KernelDefProtos.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,17 +28,17 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_KernelDef_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_KernelDef_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_KernelDef_AttrConstraint_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_KernelDef_AttrConstraint_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_KernelList_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_KernelList_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -61,21 +72,22 @@ public static void registerAllExtensions(
         internal_static_tensorflow_KernelDef_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_KernelDef_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_KernelDef_descriptor,
             new java.lang.String[] { "Op", "DeviceType", "Constraint", "HostMemoryArg", "Label", "Priority", });
         internal_static_tensorflow_KernelDef_AttrConstraint_descriptor =
           internal_static_tensorflow_KernelDef_descriptor.getNestedTypes().get(0);
         internal_static_tensorflow_KernelDef_AttrConstraint_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_KernelDef_AttrConstraint_descriptor,
             new java.lang.String[] { "Name", "AllowedValues", });
         internal_static_tensorflow_KernelList_descriptor =
           getDescriptor().getMessageTypes().get(1);
         internal_static_tensorflow_KernelList_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_KernelList_descriptor,
             new java.lang.String[] { "Kernel", });
    +    descriptor.resolveAllFeaturesImmutable();
         org.tensorflow.proto.AttrValueProtos.getDescriptor();
       }
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelList.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelList.java
    index 500c9070a49..add0709c673 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelList.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelList.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/kernel_def.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,37 +13,34 @@
      * Protobuf type {@code tensorflow.KernelList}
      */
     public final class KernelList extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.KernelList)
         KernelListOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      KernelList.class.getName());
    +  }
       // Use KernelList.newBuilder() to construct.
    -  private KernelList(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private KernelList(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private KernelList() {
         kernel_ = java.util.Collections.emptyList();
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new KernelList();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.KernelDefProtos.internal_static_tensorflow_KernelList_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.KernelDefProtos.internal_static_tensorflow_KernelList_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -49,6 +48,7 @@ protected java.lang.Object newInstance(
       }
     
       public static final int KERNEL_FIELD_NUMBER = 1;
    +  @SuppressWarnings("serial")
       private java.util.List kernel_;
       /**
        * repeated .tensorflow.KernelDef kernel = 1;
    @@ -189,39 +189,41 @@ public static org.tensorflow.proto.KernelList parseFrom(
       }
       public static org.tensorflow.proto.KernelList parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.KernelList parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.KernelList parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.KernelList parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.KernelList parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.KernelList parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -241,7 +243,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -253,7 +255,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.KernelList}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.KernelList)
           org.tensorflow.proto.KernelListOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -262,7 +264,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.KernelDefProtos.internal_static_tensorflow_KernelList_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -275,13 +277,14 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           if (kernelBuilder_ == null) {
             kernel_ = java.util.Collections.emptyList();
           } else {
    @@ -315,7 +318,13 @@ public org.tensorflow.proto.KernelList build() {
         @java.lang.Override
         public org.tensorflow.proto.KernelList buildPartial() {
           org.tensorflow.proto.KernelList result = new org.tensorflow.proto.KernelList(this);
    -      int from_bitField0_ = bitField0_;
    +      buildPartialRepeatedFields(result);
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartialRepeatedFields(org.tensorflow.proto.KernelList result) {
           if (kernelBuilder_ == null) {
             if (((bitField0_ & 0x00000001) != 0)) {
               kernel_ = java.util.Collections.unmodifiableList(kernel_);
    @@ -325,42 +334,12 @@ public org.tensorflow.proto.KernelList buildPartial() {
           } else {
             result.kernel_ = kernelBuilder_.build();
           }
    -      onBuilt();
    -      return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.KernelList result) {
    +      int from_bitField0_ = bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.KernelList) {
    @@ -392,7 +371,7 @@ public Builder mergeFrom(org.tensorflow.proto.KernelList other) {
                 kernel_ = other.kernel_;
                 bitField0_ = (bitField0_ & ~0x00000001);
                 kernelBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getKernelFieldBuilder() : null;
               } else {
                 kernelBuilder_.addAllMessages(other.kernel_);
    @@ -464,7 +443,7 @@ private void ensureKernelIsMutable() {
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.KernelDef, org.tensorflow.proto.KernelDef.Builder, org.tensorflow.proto.KernelDefOrBuilder> kernelBuilder_;
     
         /**
    @@ -680,11 +659,11 @@ public org.tensorflow.proto.KernelDef.Builder addKernelBuilder(
              getKernelBuilderList() {
           return getKernelFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.KernelDef, org.tensorflow.proto.KernelDef.Builder, org.tensorflow.proto.KernelDefOrBuilder> 
             getKernelFieldBuilder() {
           if (kernelBuilder_ == null) {
    -        kernelBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        kernelBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.KernelDef, org.tensorflow.proto.KernelDef.Builder, org.tensorflow.proto.KernelDefOrBuilder>(
                     kernel_,
                     ((bitField0_ & 0x00000001) != 0),
    @@ -694,18 +673,6 @@ public org.tensorflow.proto.KernelDef.Builder addKernelBuilder(
           }
           return kernelBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.KernelList)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelListOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelListOrBuilder.java
    index a9ec75e9381..ef703603a2b 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelListOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelListOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/kernel_def.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LocalLinks.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LocalLinks.java
    index 4733ac82cb9..d17b6ea169f 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LocalLinks.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LocalLinks.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/device_attributes.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,37 +9,34 @@
      * Protobuf type {@code tensorflow.LocalLinks}
      */
     public final class LocalLinks extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.LocalLinks)
         LocalLinksOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      LocalLinks.class.getName());
    +  }
       // Use LocalLinks.newBuilder() to construct.
    -  private LocalLinks(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private LocalLinks(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private LocalLinks() {
         link_ = java.util.Collections.emptyList();
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new LocalLinks();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.DeviceAttributesProtos.internal_static_tensorflow_LocalLinks_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.DeviceAttributesProtos.internal_static_tensorflow_LocalLinks_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -45,6 +44,7 @@ protected java.lang.Object newInstance(
       }
     
       public static final int LINK_FIELD_NUMBER = 1;
    +  @SuppressWarnings("serial")
       private java.util.List link_;
       /**
        * repeated .tensorflow.InterconnectLink link = 1;
    @@ -185,39 +185,41 @@ public static org.tensorflow.proto.LocalLinks parseFrom(
       }
       public static org.tensorflow.proto.LocalLinks parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.LocalLinks parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.LocalLinks parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.LocalLinks parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.LocalLinks parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.LocalLinks parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -237,7 +239,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -245,7 +247,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.LocalLinks}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.LocalLinks)
           org.tensorflow.proto.LocalLinksOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -254,7 +256,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.DeviceAttributesProtos.internal_static_tensorflow_LocalLinks_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -267,13 +269,14 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           if (linkBuilder_ == null) {
             link_ = java.util.Collections.emptyList();
           } else {
    @@ -307,7 +310,13 @@ public org.tensorflow.proto.LocalLinks build() {
         @java.lang.Override
         public org.tensorflow.proto.LocalLinks buildPartial() {
           org.tensorflow.proto.LocalLinks result = new org.tensorflow.proto.LocalLinks(this);
    -      int from_bitField0_ = bitField0_;
    +      buildPartialRepeatedFields(result);
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartialRepeatedFields(org.tensorflow.proto.LocalLinks result) {
           if (linkBuilder_ == null) {
             if (((bitField0_ & 0x00000001) != 0)) {
               link_ = java.util.Collections.unmodifiableList(link_);
    @@ -317,42 +326,12 @@ public org.tensorflow.proto.LocalLinks buildPartial() {
           } else {
             result.link_ = linkBuilder_.build();
           }
    -      onBuilt();
    -      return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.LocalLinks result) {
    +      int from_bitField0_ = bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.LocalLinks) {
    @@ -384,7 +363,7 @@ public Builder mergeFrom(org.tensorflow.proto.LocalLinks other) {
                 link_ = other.link_;
                 bitField0_ = (bitField0_ & ~0x00000001);
                 linkBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getLinkFieldBuilder() : null;
               } else {
                 linkBuilder_.addAllMessages(other.link_);
    @@ -456,7 +435,7 @@ private void ensureLinkIsMutable() {
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.InterconnectLink, org.tensorflow.proto.InterconnectLink.Builder, org.tensorflow.proto.InterconnectLinkOrBuilder> linkBuilder_;
     
         /**
    @@ -672,11 +651,11 @@ public org.tensorflow.proto.InterconnectLink.Builder addLinkBuilder(
              getLinkBuilderList() {
           return getLinkFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.InterconnectLink, org.tensorflow.proto.InterconnectLink.Builder, org.tensorflow.proto.InterconnectLinkOrBuilder> 
             getLinkFieldBuilder() {
           if (linkBuilder_ == null) {
    -        linkBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        linkBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.InterconnectLink, org.tensorflow.proto.InterconnectLink.Builder, org.tensorflow.proto.InterconnectLinkOrBuilder>(
                     link_,
                     ((bitField0_ & 0x00000001) != 0),
    @@ -686,18 +665,6 @@ public org.tensorflow.proto.InterconnectLink.Builder addLinkBuilder(
           }
           return linkBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.LocalLinks)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LocalLinksOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LocalLinksOrBuilder.java
    index 7a512b29fd0..408b99a6c97 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LocalLinksOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LocalLinksOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/device_attributes.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LogMemoryProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LogMemoryProtos.java
    index 47a2758c7a0..847171ae16e 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LogMemoryProtos.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LogMemoryProtos.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/log_memory.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class LogMemoryProtos {
       private LogMemoryProtos() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      LogMemoryProtos.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,32 +28,32 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_MemoryLogStep_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_MemoryLogStep_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_MemoryLogTensorAllocation_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_MemoryLogTensorAllocation_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_MemoryLogTensorDeallocation_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_MemoryLogTensorDeallocation_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_MemoryLogTensorOutput_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_MemoryLogTensorOutput_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_MemoryLogRawAllocation_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_MemoryLogRawAllocation_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_MemoryLogRawDeallocation_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_MemoryLogRawDeallocation_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -85,39 +96,40 @@ public static void registerAllExtensions(
         internal_static_tensorflow_MemoryLogStep_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_MemoryLogStep_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_MemoryLogStep_descriptor,
             new java.lang.String[] { "StepId", "Handle", });
         internal_static_tensorflow_MemoryLogTensorAllocation_descriptor =
           getDescriptor().getMessageTypes().get(1);
         internal_static_tensorflow_MemoryLogTensorAllocation_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_MemoryLogTensorAllocation_descriptor,
             new java.lang.String[] { "StepId", "KernelName", "Tensor", });
         internal_static_tensorflow_MemoryLogTensorDeallocation_descriptor =
           getDescriptor().getMessageTypes().get(2);
         internal_static_tensorflow_MemoryLogTensorDeallocation_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_MemoryLogTensorDeallocation_descriptor,
             new java.lang.String[] { "AllocationId", "AllocatorName", });
         internal_static_tensorflow_MemoryLogTensorOutput_descriptor =
           getDescriptor().getMessageTypes().get(3);
         internal_static_tensorflow_MemoryLogTensorOutput_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_MemoryLogTensorOutput_descriptor,
             new java.lang.String[] { "StepId", "KernelName", "Index", "Tensor", });
         internal_static_tensorflow_MemoryLogRawAllocation_descriptor =
           getDescriptor().getMessageTypes().get(4);
         internal_static_tensorflow_MemoryLogRawAllocation_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_MemoryLogRawAllocation_descriptor,
             new java.lang.String[] { "StepId", "Operation", "NumBytes", "Ptr", "AllocationId", "AllocatorName", });
         internal_static_tensorflow_MemoryLogRawDeallocation_descriptor =
           getDescriptor().getMessageTypes().get(5);
         internal_static_tensorflow_MemoryLogRawDeallocation_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_MemoryLogRawDeallocation_descriptor,
             new java.lang.String[] { "StepId", "Operation", "AllocationId", "AllocatorName", "Deferred", });
    +    descriptor.resolveAllFeaturesImmutable();
         org.tensorflow.proto.TensorDescriptionProtos.getDescriptor();
       }
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LogMessage.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LogMessage.java
    index 2000eb7bfdc..d18b8648fbd 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LogMessage.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LogMessage.java
    @@ -1,11 +1,14 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/util/event.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     /**
      * 
      * Protocol buffer used for logging messages to the events file.
    + *
      * This was theoretically used by the defunct tensorboard_logging module, which
      * has been removed; this message is now deprecated and should not be used.
      * 
    @@ -13,12 +16,21 @@ * Protobuf type {@code tensorflow.LogMessage} */ @java.lang.Deprecated public final class LogMessage extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.LogMessage) LogMessageOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + LogMessage.class.getName()); + } // Use LogMessage.newBuilder() to construct. - private LogMessage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private LogMessage(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private LogMessage() { @@ -26,25 +38,13 @@ private LogMessage() { message_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new LogMessage(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.EventProtos.internal_static_tensorflow_LogMessage_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.EventProtos.internal_static_tensorflow_LogMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -90,6 +90,15 @@ protected java.lang.Object newInstance( UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + Level.class.getName()); + } /** * UNKNOWN = 0; */ @@ -210,7 +219,7 @@ private Level(int value) { } public static final int LEVEL_FIELD_NUMBER = 1; - private int level_; + private int level_ = 0; /** * .tensorflow.LogMessage.Level level = 1; * @return The enum numeric value on the wire for level. @@ -223,13 +232,13 @@ private Level(int value) { * @return The level. */ @java.lang.Override public org.tensorflow.proto.LogMessage.Level getLevel() { - @SuppressWarnings("deprecation") - org.tensorflow.proto.LogMessage.Level result = org.tensorflow.proto.LogMessage.Level.valueOf(level_); + org.tensorflow.proto.LogMessage.Level result = org.tensorflow.proto.LogMessage.Level.forNumber(level_); return result == null ? org.tensorflow.proto.LogMessage.Level.UNRECOGNIZED : result; } public static final int MESSAGE_FIELD_NUMBER = 2; - private volatile java.lang.Object message_; + @SuppressWarnings("serial") + private volatile java.lang.Object message_ = ""; /** * string message = 2; * @return The message. @@ -283,8 +292,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (level_ != org.tensorflow.proto.LogMessage.Level.UNKNOWN.getNumber()) { output.writeEnum(1, level_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, message_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(message_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, message_); } getUnknownFields().writeTo(output); } @@ -299,8 +308,8 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, level_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, message_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(message_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, message_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -374,39 +383,41 @@ public static org.tensorflow.proto.LogMessage parseFrom( } public static org.tensorflow.proto.LogMessage parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.LogMessage parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.LogMessage parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.LogMessage parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.LogMessage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.LogMessage parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -426,13 +437,14 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
        * Protocol buffer used for logging messages to the events file.
    +   *
        * This was theoretically used by the defunct tensorboard_logging module, which
        * has been removed; this message is now deprecated and should not be used.
        * 
    @@ -440,7 +452,7 @@ protected Builder newBuilderForType( * Protobuf type {@code tensorflow.LogMessage} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.LogMessage) org.tensorflow.proto.LogMessageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -449,7 +461,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.EventProtos.internal_static_tensorflow_LogMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -462,17 +474,16 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; level_ = 0; - message_ = ""; - return this; } @@ -499,44 +510,21 @@ public org.tensorflow.proto.LogMessage build() { @java.lang.Override public org.tensorflow.proto.LogMessage buildPartial() { org.tensorflow.proto.LogMessage result = new org.tensorflow.proto.LogMessage(this); - result.level_ = level_; - result.message_ = message_; + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.LogMessage result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.level_ = level_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.message_ = message_; + } } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.LogMessage) { @@ -554,6 +542,7 @@ public Builder mergeFrom(org.tensorflow.proto.LogMessage other) { } if (!other.getMessage().isEmpty()) { message_ = other.message_; + bitField0_ |= 0x00000002; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); @@ -584,12 +573,12 @@ public Builder mergeFrom( break; case 8: { level_ = input.readEnum(); - + bitField0_ |= 0x00000001; break; } // case 8 case 18: { message_ = input.readStringRequireUtf8(); - + bitField0_ |= 0x00000002; break; } // case 18 default: { @@ -607,6 +596,7 @@ public Builder mergeFrom( } // finally return this; } + private int bitField0_; private int level_ = 0; /** @@ -622,8 +612,8 @@ public Builder mergeFrom( * @return This builder for chaining. */ public Builder setLevelValue(int value) { - level_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -633,8 +623,7 @@ public Builder setLevelValue(int value) { */ @java.lang.Override public org.tensorflow.proto.LogMessage.Level getLevel() { - @SuppressWarnings("deprecation") - org.tensorflow.proto.LogMessage.Level result = org.tensorflow.proto.LogMessage.Level.valueOf(level_); + org.tensorflow.proto.LogMessage.Level result = org.tensorflow.proto.LogMessage.Level.forNumber(level_); return result == null ? org.tensorflow.proto.LogMessage.Level.UNRECOGNIZED : result; } /** @@ -646,7 +635,7 @@ public Builder setLevel(org.tensorflow.proto.LogMessage.Level value) { if (value == null) { throw new NullPointerException(); } - + bitField0_ |= 0x00000001; level_ = value.getNumber(); onChanged(); return this; @@ -656,7 +645,7 @@ public Builder setLevel(org.tensorflow.proto.LogMessage.Level value) { * @return This builder for chaining. */ public Builder clearLevel() { - + bitField0_ = (bitField0_ & ~0x00000001); level_ = 0; onChanged(); return this; @@ -703,11 +692,9 @@ public java.lang.String getMessage() { */ public Builder setMessage( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } message_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -716,8 +703,8 @@ public Builder setMessage( * @return This builder for chaining. */ public Builder clearMessage() { - message_ = getDefaultInstance().getMessage(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -728,27 +715,13 @@ public Builder clearMessage() { */ public Builder setMessageBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); message_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.LogMessage) } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LogMessageOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LogMessageOrBuilder.java index d4aaa8c5471..4174158b973 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LogMessageOrBuilder.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LogMessageOrBuilder.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/util/event.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MachineConfiguration.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MachineConfiguration.java index 6dbc6ce6f3b..9d7cc47a571 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MachineConfiguration.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MachineConfiguration.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: xla/tsl/protobuf/test_log.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -7,12 +9,21 @@ * Protobuf type {@code tensorflow.MachineConfiguration} */ public final class MachineConfiguration extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.MachineConfiguration) MachineConfigurationOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + MachineConfiguration.class.getName()); + } // Use MachineConfiguration.newBuilder() to construct. - private MachineConfiguration(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private MachineConfiguration(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private MachineConfiguration() { @@ -22,33 +33,23 @@ private MachineConfiguration() { availableDeviceInfo_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new MachineConfiguration(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_MachineConfiguration_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_MachineConfiguration_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.proto.MachineConfiguration.class, org.tensorflow.proto.MachineConfiguration.Builder.class); } + private int bitField0_; public static final int HOSTNAME_FIELD_NUMBER = 1; - private volatile java.lang.Object hostname_; + @SuppressWarnings("serial") + private volatile java.lang.Object hostname_ = ""; /** *
        * Host name of machine that ran the benchmark.
    @@ -94,7 +95,8 @@ public java.lang.String getHostname() {
       }
     
       public static final int SERIAL_IDENTIFIER_FIELD_NUMBER = 7;
    -  private volatile java.lang.Object serialIdentifier_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object serialIdentifier_ = "";
       /**
        * 
        * Unique serial number of the machine.
    @@ -151,7 +153,7 @@ public java.lang.String getSerialIdentifier() {
        */
       @java.lang.Override
       public boolean hasPlatformInfo() {
    -    return platformInfo_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * 
    @@ -174,7 +176,7 @@ public org.tensorflow.proto.PlatformInfo getPlatformInfo() {
        */
       @java.lang.Override
       public org.tensorflow.proto.PlatformInfoOrBuilder getPlatformInfoOrBuilder() {
    -    return getPlatformInfo();
    +    return platformInfo_ == null ? org.tensorflow.proto.PlatformInfo.getDefaultInstance() : platformInfo_;
       }
     
       public static final int CPU_INFO_FIELD_NUMBER = 3;
    @@ -189,7 +191,7 @@ public org.tensorflow.proto.PlatformInfoOrBuilder getPlatformInfoOrBuilder() {
        */
       @java.lang.Override
       public boolean hasCpuInfo() {
    -    return cpuInfo_ != null;
    +    return ((bitField0_ & 0x00000002) != 0);
       }
       /**
        * 
    @@ -212,10 +214,11 @@ public org.tensorflow.proto.CPUInfo getCpuInfo() {
        */
       @java.lang.Override
       public org.tensorflow.proto.CPUInfoOrBuilder getCpuInfoOrBuilder() {
    -    return getCpuInfo();
    +    return cpuInfo_ == null ? org.tensorflow.proto.CPUInfo.getDefaultInstance() : cpuInfo_;
       }
     
       public static final int DEVICE_INFO_FIELD_NUMBER = 4;
    +  @SuppressWarnings("serial")
       private java.util.List deviceInfo_;
       /**
        * 
    @@ -276,6 +279,7 @@ public com.google.protobuf.AnyOrBuilder getDeviceInfoOrBuilder(
       }
     
       public static final int AVAILABLE_DEVICE_INFO_FIELD_NUMBER = 5;
    +  @SuppressWarnings("serial")
       private java.util.List availableDeviceInfo_;
       /**
        * 
    @@ -343,7 +347,7 @@ public org.tensorflow.proto.AvailableDeviceInfoOrBuilder getAvailableDeviceInfoO
        */
       @java.lang.Override
       public boolean hasMemoryInfo() {
    -    return memoryInfo_ != null;
    +    return ((bitField0_ & 0x00000004) != 0);
       }
       /**
        * .tensorflow.MemoryInfo memory_info = 6;
    @@ -358,7 +362,7 @@ public org.tensorflow.proto.MemoryInfo getMemoryInfo() {
        */
       @java.lang.Override
       public org.tensorflow.proto.MemoryInfoOrBuilder getMemoryInfoOrBuilder() {
    -    return getMemoryInfo();
    +    return memoryInfo_ == null ? org.tensorflow.proto.MemoryInfo.getDefaultInstance() : memoryInfo_;
       }
     
       private byte memoizedIsInitialized = -1;
    @@ -375,13 +379,13 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hostname_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, hostname_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(hostname_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, hostname_);
         }
    -    if (platformInfo_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(2, getPlatformInfo());
         }
    -    if (cpuInfo_ != null) {
    +    if (((bitField0_ & 0x00000002) != 0)) {
           output.writeMessage(3, getCpuInfo());
         }
         for (int i = 0; i < deviceInfo_.size(); i++) {
    @@ -390,11 +394,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         for (int i = 0; i < availableDeviceInfo_.size(); i++) {
           output.writeMessage(5, availableDeviceInfo_.get(i));
         }
    -    if (memoryInfo_ != null) {
    +    if (((bitField0_ & 0x00000004) != 0)) {
           output.writeMessage(6, getMemoryInfo());
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serialIdentifier_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 7, serialIdentifier_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serialIdentifier_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 7, serialIdentifier_);
         }
         getUnknownFields().writeTo(output);
       }
    @@ -405,14 +409,14 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hostname_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, hostname_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(hostname_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, hostname_);
         }
    -    if (platformInfo_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(2, getPlatformInfo());
         }
    -    if (cpuInfo_ != null) {
    +    if (((bitField0_ & 0x00000002) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(3, getCpuInfo());
         }
    @@ -424,12 +428,12 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(5, availableDeviceInfo_.get(i));
         }
    -    if (memoryInfo_ != null) {
    +    if (((bitField0_ & 0x00000004) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(6, getMemoryInfo());
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serialIdentifier_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, serialIdentifier_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serialIdentifier_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(7, serialIdentifier_);
         }
         size += getUnknownFields().getSerializedSize();
         memoizedSize = size;
    @@ -543,39 +547,41 @@ public static org.tensorflow.proto.MachineConfiguration parseFrom(
       }
       public static org.tensorflow.proto.MachineConfiguration parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.MachineConfiguration parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.MachineConfiguration parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.MachineConfiguration parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.MachineConfiguration parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.MachineConfiguration parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -595,7 +601,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -603,7 +609,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.MachineConfiguration}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.MachineConfiguration)
           org.tensorflow.proto.MachineConfigurationOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -612,7 +618,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_MachineConfiguration_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -621,31 +627,38 @@ public static final class Builder extends
     
         // Construct using org.tensorflow.proto.MachineConfiguration.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getPlatformInfoFieldBuilder();
    +        getCpuInfoFieldBuilder();
    +        getDeviceInfoFieldBuilder();
    +        getAvailableDeviceInfoFieldBuilder();
    +        getMemoryInfoFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           hostname_ = "";
    -
           serialIdentifier_ = "";
    -
    -      if (platformInfoBuilder_ == null) {
    -        platformInfo_ = null;
    -      } else {
    -        platformInfo_ = null;
    +      platformInfo_ = null;
    +      if (platformInfoBuilder_ != null) {
    +        platformInfoBuilder_.dispose();
             platformInfoBuilder_ = null;
           }
    -      if (cpuInfoBuilder_ == null) {
    -        cpuInfo_ = null;
    -      } else {
    -        cpuInfo_ = null;
    +      cpuInfo_ = null;
    +      if (cpuInfoBuilder_ != null) {
    +        cpuInfoBuilder_.dispose();
             cpuInfoBuilder_ = null;
           }
           if (deviceInfoBuilder_ == null) {
    @@ -654,18 +667,17 @@ public Builder clear() {
             deviceInfo_ = null;
             deviceInfoBuilder_.clear();
           }
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      bitField0_ = (bitField0_ & ~0x00000010);
           if (availableDeviceInfoBuilder_ == null) {
             availableDeviceInfo_ = java.util.Collections.emptyList();
           } else {
             availableDeviceInfo_ = null;
             availableDeviceInfoBuilder_.clear();
           }
    -      bitField0_ = (bitField0_ & ~0x00000002);
    -      if (memoryInfoBuilder_ == null) {
    -        memoryInfo_ = null;
    -      } else {
    -        memoryInfo_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000020);
    +      memoryInfo_ = null;
    +      if (memoryInfoBuilder_ != null) {
    +        memoryInfoBuilder_.dispose();
             memoryInfoBuilder_ = null;
           }
           return this;
    @@ -694,78 +706,63 @@ public org.tensorflow.proto.MachineConfiguration build() {
         @java.lang.Override
         public org.tensorflow.proto.MachineConfiguration buildPartial() {
           org.tensorflow.proto.MachineConfiguration result = new org.tensorflow.proto.MachineConfiguration(this);
    -      int from_bitField0_ = bitField0_;
    -      result.hostname_ = hostname_;
    -      result.serialIdentifier_ = serialIdentifier_;
    -      if (platformInfoBuilder_ == null) {
    -        result.platformInfo_ = platformInfo_;
    -      } else {
    -        result.platformInfo_ = platformInfoBuilder_.build();
    -      }
    -      if (cpuInfoBuilder_ == null) {
    -        result.cpuInfo_ = cpuInfo_;
    -      } else {
    -        result.cpuInfo_ = cpuInfoBuilder_.build();
    -      }
    +      buildPartialRepeatedFields(result);
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartialRepeatedFields(org.tensorflow.proto.MachineConfiguration result) {
           if (deviceInfoBuilder_ == null) {
    -        if (((bitField0_ & 0x00000001) != 0)) {
    +        if (((bitField0_ & 0x00000010) != 0)) {
               deviceInfo_ = java.util.Collections.unmodifiableList(deviceInfo_);
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ = (bitField0_ & ~0x00000010);
             }
             result.deviceInfo_ = deviceInfo_;
           } else {
             result.deviceInfo_ = deviceInfoBuilder_.build();
           }
           if (availableDeviceInfoBuilder_ == null) {
    -        if (((bitField0_ & 0x00000002) != 0)) {
    +        if (((bitField0_ & 0x00000020) != 0)) {
               availableDeviceInfo_ = java.util.Collections.unmodifiableList(availableDeviceInfo_);
    -          bitField0_ = (bitField0_ & ~0x00000002);
    +          bitField0_ = (bitField0_ & ~0x00000020);
             }
             result.availableDeviceInfo_ = availableDeviceInfo_;
           } else {
             result.availableDeviceInfo_ = availableDeviceInfoBuilder_.build();
           }
    -      if (memoryInfoBuilder_ == null) {
    -        result.memoryInfo_ = memoryInfo_;
    -      } else {
    -        result.memoryInfo_ = memoryInfoBuilder_.build();
    -      }
    -      onBuilt();
    -      return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.MachineConfiguration result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.hostname_ = hostname_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.serialIdentifier_ = serialIdentifier_;
    +      }
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.platformInfo_ = platformInfoBuilder_ == null
    +            ? platformInfo_
    +            : platformInfoBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.cpuInfo_ = cpuInfoBuilder_ == null
    +            ? cpuInfo_
    +            : cpuInfoBuilder_.build();
    +        to_bitField0_ |= 0x00000002;
    +      }
    +      if (((from_bitField0_ & 0x00000040) != 0)) {
    +        result.memoryInfo_ = memoryInfoBuilder_ == null
    +            ? memoryInfo_
    +            : memoryInfoBuilder_.build();
    +        to_bitField0_ |= 0x00000004;
    +      }
    +      result.bitField0_ |= to_bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.MachineConfiguration) {
    @@ -780,10 +777,12 @@ public Builder mergeFrom(org.tensorflow.proto.MachineConfiguration other) {
           if (other == org.tensorflow.proto.MachineConfiguration.getDefaultInstance()) return this;
           if (!other.getHostname().isEmpty()) {
             hostname_ = other.hostname_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (!other.getSerialIdentifier().isEmpty()) {
             serialIdentifier_ = other.serialIdentifier_;
    +        bitField0_ |= 0x00000002;
             onChanged();
           }
           if (other.hasPlatformInfo()) {
    @@ -796,7 +795,7 @@ public Builder mergeFrom(org.tensorflow.proto.MachineConfiguration other) {
             if (!other.deviceInfo_.isEmpty()) {
               if (deviceInfo_.isEmpty()) {
                 deviceInfo_ = other.deviceInfo_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000010);
               } else {
                 ensureDeviceInfoIsMutable();
                 deviceInfo_.addAll(other.deviceInfo_);
    @@ -809,9 +808,9 @@ public Builder mergeFrom(org.tensorflow.proto.MachineConfiguration other) {
                 deviceInfoBuilder_.dispose();
                 deviceInfoBuilder_ = null;
                 deviceInfo_ = other.deviceInfo_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000010);
                 deviceInfoBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getDeviceInfoFieldBuilder() : null;
               } else {
                 deviceInfoBuilder_.addAllMessages(other.deviceInfo_);
    @@ -822,7 +821,7 @@ public Builder mergeFrom(org.tensorflow.proto.MachineConfiguration other) {
             if (!other.availableDeviceInfo_.isEmpty()) {
               if (availableDeviceInfo_.isEmpty()) {
                 availableDeviceInfo_ = other.availableDeviceInfo_;
    -            bitField0_ = (bitField0_ & ~0x00000002);
    +            bitField0_ = (bitField0_ & ~0x00000020);
               } else {
                 ensureAvailableDeviceInfoIsMutable();
                 availableDeviceInfo_.addAll(other.availableDeviceInfo_);
    @@ -835,9 +834,9 @@ public Builder mergeFrom(org.tensorflow.proto.MachineConfiguration other) {
                 availableDeviceInfoBuilder_.dispose();
                 availableDeviceInfoBuilder_ = null;
                 availableDeviceInfo_ = other.availableDeviceInfo_;
    -            bitField0_ = (bitField0_ & ~0x00000002);
    +            bitField0_ = (bitField0_ & ~0x00000020);
                 availableDeviceInfoBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getAvailableDeviceInfoFieldBuilder() : null;
               } else {
                 availableDeviceInfoBuilder_.addAllMessages(other.availableDeviceInfo_);
    @@ -875,21 +874,21 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   hostname_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
                   input.readMessage(
                       getPlatformInfoFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 18
                 case 26: {
                   input.readMessage(
                       getCpuInfoFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 26
                 case 34: {
    @@ -922,12 +921,12 @@ public Builder mergeFrom(
                   input.readMessage(
                       getMemoryInfoFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000040;
                   break;
                 } // case 50
                 case 58: {
                   serialIdentifier_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 58
                 default: {
    @@ -1000,11 +999,9 @@ public java.lang.String getHostname() {
          */
         public Builder setHostname(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           hostname_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -1017,8 +1014,8 @@ public Builder setHostname(
          * @return This builder for chaining.
          */
         public Builder clearHostname() {
    -      
           hostname_ = getDefaultInstance().getHostname();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -1033,12 +1030,10 @@ public Builder clearHostname() {
          */
         public Builder setHostnameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           hostname_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -1096,11 +1091,9 @@ public java.lang.String getSerialIdentifier() {
          */
         public Builder setSerialIdentifier(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           serialIdentifier_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -1113,8 +1106,8 @@ public Builder setSerialIdentifier(
          * @return This builder for chaining.
          */
         public Builder clearSerialIdentifier() {
    -      
           serialIdentifier_ = getDefaultInstance().getSerialIdentifier();
    +      bitField0_ = (bitField0_ & ~0x00000002);
           onChanged();
           return this;
         }
    @@ -1129,18 +1122,16 @@ public Builder clearSerialIdentifier() {
          */
         public Builder setSerialIdentifierBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           serialIdentifier_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
     
         private org.tensorflow.proto.PlatformInfo platformInfo_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.PlatformInfo, org.tensorflow.proto.PlatformInfo.Builder, org.tensorflow.proto.PlatformInfoOrBuilder> platformInfoBuilder_;
         /**
          * 
    @@ -1151,7 +1142,7 @@ public Builder setSerialIdentifierBytes(
          * @return Whether the platformInfo field is set.
          */
         public boolean hasPlatformInfo() {
    -      return platformInfoBuilder_ != null || platformInfo_ != null;
    +      return ((bitField0_ & 0x00000004) != 0);
         }
         /**
          * 
    @@ -1181,11 +1172,11 @@ public Builder setPlatformInfo(org.tensorflow.proto.PlatformInfo value) {
               throw new NullPointerException();
             }
             platformInfo_ = value;
    -        onChanged();
           } else {
             platformInfoBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000004;
    +      onChanged();
           return this;
         }
         /**
    @@ -1199,11 +1190,11 @@ public Builder setPlatformInfo(
             org.tensorflow.proto.PlatformInfo.Builder builderForValue) {
           if (platformInfoBuilder_ == null) {
             platformInfo_ = builderForValue.build();
    -        onChanged();
           } else {
             platformInfoBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000004;
    +      onChanged();
           return this;
         }
         /**
    @@ -1215,17 +1206,20 @@ public Builder setPlatformInfo(
          */
         public Builder mergePlatformInfo(org.tensorflow.proto.PlatformInfo value) {
           if (platformInfoBuilder_ == null) {
    -        if (platformInfo_ != null) {
    -          platformInfo_ =
    -            org.tensorflow.proto.PlatformInfo.newBuilder(platformInfo_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000004) != 0) &&
    +          platformInfo_ != null &&
    +          platformInfo_ != org.tensorflow.proto.PlatformInfo.getDefaultInstance()) {
    +          getPlatformInfoBuilder().mergeFrom(value);
             } else {
               platformInfo_ = value;
             }
    -        onChanged();
           } else {
             platformInfoBuilder_.mergeFrom(value);
           }
    -
    +      if (platformInfo_ != null) {
    +        bitField0_ |= 0x00000004;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -1236,14 +1230,13 @@ public Builder mergePlatformInfo(org.tensorflow.proto.PlatformInfo value) {
          * .tensorflow.PlatformInfo platform_info = 2;
          */
         public Builder clearPlatformInfo() {
    -      if (platformInfoBuilder_ == null) {
    -        platformInfo_ = null;
    -        onChanged();
    -      } else {
    -        platformInfo_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000004);
    +      platformInfo_ = null;
    +      if (platformInfoBuilder_ != null) {
    +        platformInfoBuilder_.dispose();
             platformInfoBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -1254,7 +1247,7 @@ public Builder clearPlatformInfo() {
          * .tensorflow.PlatformInfo platform_info = 2;
          */
         public org.tensorflow.proto.PlatformInfo.Builder getPlatformInfoBuilder() {
    -      
    +      bitField0_ |= 0x00000004;
           onChanged();
           return getPlatformInfoFieldBuilder().getBuilder();
         }
    @@ -1280,11 +1273,11 @@ public org.tensorflow.proto.PlatformInfoOrBuilder getPlatformInfoOrBuilder() {
          *
          * .tensorflow.PlatformInfo platform_info = 2;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.PlatformInfo, org.tensorflow.proto.PlatformInfo.Builder, org.tensorflow.proto.PlatformInfoOrBuilder> 
             getPlatformInfoFieldBuilder() {
           if (platformInfoBuilder_ == null) {
    -        platformInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        platformInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.PlatformInfo, org.tensorflow.proto.PlatformInfo.Builder, org.tensorflow.proto.PlatformInfoOrBuilder>(
                     getPlatformInfo(),
                     getParentForChildren(),
    @@ -1295,7 +1288,7 @@ public org.tensorflow.proto.PlatformInfoOrBuilder getPlatformInfoOrBuilder() {
         }
     
         private org.tensorflow.proto.CPUInfo cpuInfo_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.CPUInfo, org.tensorflow.proto.CPUInfo.Builder, org.tensorflow.proto.CPUInfoOrBuilder> cpuInfoBuilder_;
         /**
          * 
    @@ -1306,7 +1299,7 @@ public org.tensorflow.proto.PlatformInfoOrBuilder getPlatformInfoOrBuilder() {
          * @return Whether the cpuInfo field is set.
          */
         public boolean hasCpuInfo() {
    -      return cpuInfoBuilder_ != null || cpuInfo_ != null;
    +      return ((bitField0_ & 0x00000008) != 0);
         }
         /**
          * 
    @@ -1336,11 +1329,11 @@ public Builder setCpuInfo(org.tensorflow.proto.CPUInfo value) {
               throw new NullPointerException();
             }
             cpuInfo_ = value;
    -        onChanged();
           } else {
             cpuInfoBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000008;
    +      onChanged();
           return this;
         }
         /**
    @@ -1354,11 +1347,11 @@ public Builder setCpuInfo(
             org.tensorflow.proto.CPUInfo.Builder builderForValue) {
           if (cpuInfoBuilder_ == null) {
             cpuInfo_ = builderForValue.build();
    -        onChanged();
           } else {
             cpuInfoBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000008;
    +      onChanged();
           return this;
         }
         /**
    @@ -1370,17 +1363,20 @@ public Builder setCpuInfo(
          */
         public Builder mergeCpuInfo(org.tensorflow.proto.CPUInfo value) {
           if (cpuInfoBuilder_ == null) {
    -        if (cpuInfo_ != null) {
    -          cpuInfo_ =
    -            org.tensorflow.proto.CPUInfo.newBuilder(cpuInfo_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000008) != 0) &&
    +          cpuInfo_ != null &&
    +          cpuInfo_ != org.tensorflow.proto.CPUInfo.getDefaultInstance()) {
    +          getCpuInfoBuilder().mergeFrom(value);
             } else {
               cpuInfo_ = value;
             }
    -        onChanged();
           } else {
             cpuInfoBuilder_.mergeFrom(value);
           }
    -
    +      if (cpuInfo_ != null) {
    +        bitField0_ |= 0x00000008;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -1391,14 +1387,13 @@ public Builder mergeCpuInfo(org.tensorflow.proto.CPUInfo value) {
          * .tensorflow.CPUInfo cpu_info = 3;
          */
         public Builder clearCpuInfo() {
    -      if (cpuInfoBuilder_ == null) {
    -        cpuInfo_ = null;
    -        onChanged();
    -      } else {
    -        cpuInfo_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000008);
    +      cpuInfo_ = null;
    +      if (cpuInfoBuilder_ != null) {
    +        cpuInfoBuilder_.dispose();
             cpuInfoBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -1409,7 +1404,7 @@ public Builder clearCpuInfo() {
          * .tensorflow.CPUInfo cpu_info = 3;
          */
         public org.tensorflow.proto.CPUInfo.Builder getCpuInfoBuilder() {
    -      
    +      bitField0_ |= 0x00000008;
           onChanged();
           return getCpuInfoFieldBuilder().getBuilder();
         }
    @@ -1435,11 +1430,11 @@ public org.tensorflow.proto.CPUInfoOrBuilder getCpuInfoOrBuilder() {
          *
          * .tensorflow.CPUInfo cpu_info = 3;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.CPUInfo, org.tensorflow.proto.CPUInfo.Builder, org.tensorflow.proto.CPUInfoOrBuilder> 
             getCpuInfoFieldBuilder() {
           if (cpuInfoBuilder_ == null) {
    -        cpuInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        cpuInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.CPUInfo, org.tensorflow.proto.CPUInfo.Builder, org.tensorflow.proto.CPUInfoOrBuilder>(
                     getCpuInfo(),
                     getParentForChildren(),
    @@ -1452,13 +1447,13 @@ public org.tensorflow.proto.CPUInfoOrBuilder getCpuInfoOrBuilder() {
         private java.util.List deviceInfo_ =
           java.util.Collections.emptyList();
         private void ensureDeviceInfoIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    +      if (!((bitField0_ & 0x00000010) != 0)) {
             deviceInfo_ = new java.util.ArrayList(deviceInfo_);
    -        bitField0_ |= 0x00000001;
    +        bitField0_ |= 0x00000010;
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> deviceInfoBuilder_;
     
         /**
    @@ -1648,7 +1643,7 @@ public Builder addAllDeviceInfo(
         public Builder clearDeviceInfo() {
           if (deviceInfoBuilder_ == null) {
             deviceInfo_ = java.util.Collections.emptyList();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        bitField0_ = (bitField0_ & ~0x00000010);
             onChanged();
           } else {
             deviceInfoBuilder_.clear();
    @@ -1746,14 +1741,14 @@ public com.google.protobuf.Any.Builder addDeviceInfoBuilder(
              getDeviceInfoBuilderList() {
           return getDeviceInfoFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> 
             getDeviceInfoFieldBuilder() {
           if (deviceInfoBuilder_ == null) {
    -        deviceInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        deviceInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>(
                     deviceInfo_,
    -                ((bitField0_ & 0x00000001) != 0),
    +                ((bitField0_ & 0x00000010) != 0),
                     getParentForChildren(),
                     isClean());
             deviceInfo_ = null;
    @@ -1764,13 +1759,13 @@ public com.google.protobuf.Any.Builder addDeviceInfoBuilder(
         private java.util.List availableDeviceInfo_ =
           java.util.Collections.emptyList();
         private void ensureAvailableDeviceInfoIsMutable() {
    -      if (!((bitField0_ & 0x00000002) != 0)) {
    +      if (!((bitField0_ & 0x00000020) != 0)) {
             availableDeviceInfo_ = new java.util.ArrayList(availableDeviceInfo_);
    -        bitField0_ |= 0x00000002;
    +        bitField0_ |= 0x00000020;
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.AvailableDeviceInfo, org.tensorflow.proto.AvailableDeviceInfo.Builder, org.tensorflow.proto.AvailableDeviceInfoOrBuilder> availableDeviceInfoBuilder_;
     
         /**
    @@ -1960,7 +1955,7 @@ public Builder addAllAvailableDeviceInfo(
         public Builder clearAvailableDeviceInfo() {
           if (availableDeviceInfoBuilder_ == null) {
             availableDeviceInfo_ = java.util.Collections.emptyList();
    -        bitField0_ = (bitField0_ & ~0x00000002);
    +        bitField0_ = (bitField0_ & ~0x00000020);
             onChanged();
           } else {
             availableDeviceInfoBuilder_.clear();
    @@ -2058,14 +2053,14 @@ public org.tensorflow.proto.AvailableDeviceInfo.Builder addAvailableDeviceInfoBu
              getAvailableDeviceInfoBuilderList() {
           return getAvailableDeviceInfoFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.AvailableDeviceInfo, org.tensorflow.proto.AvailableDeviceInfo.Builder, org.tensorflow.proto.AvailableDeviceInfoOrBuilder> 
             getAvailableDeviceInfoFieldBuilder() {
           if (availableDeviceInfoBuilder_ == null) {
    -        availableDeviceInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        availableDeviceInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.AvailableDeviceInfo, org.tensorflow.proto.AvailableDeviceInfo.Builder, org.tensorflow.proto.AvailableDeviceInfoOrBuilder>(
                     availableDeviceInfo_,
    -                ((bitField0_ & 0x00000002) != 0),
    +                ((bitField0_ & 0x00000020) != 0),
                     getParentForChildren(),
                     isClean());
             availableDeviceInfo_ = null;
    @@ -2074,14 +2069,14 @@ public org.tensorflow.proto.AvailableDeviceInfo.Builder addAvailableDeviceInfoBu
         }
     
         private org.tensorflow.proto.MemoryInfo memoryInfo_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.MemoryInfo, org.tensorflow.proto.MemoryInfo.Builder, org.tensorflow.proto.MemoryInfoOrBuilder> memoryInfoBuilder_;
         /**
          * .tensorflow.MemoryInfo memory_info = 6;
          * @return Whether the memoryInfo field is set.
          */
         public boolean hasMemoryInfo() {
    -      return memoryInfoBuilder_ != null || memoryInfo_ != null;
    +      return ((bitField0_ & 0x00000040) != 0);
         }
         /**
          * .tensorflow.MemoryInfo memory_info = 6;
    @@ -2103,11 +2098,11 @@ public Builder setMemoryInfo(org.tensorflow.proto.MemoryInfo value) {
               throw new NullPointerException();
             }
             memoryInfo_ = value;
    -        onChanged();
           } else {
             memoryInfoBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000040;
    +      onChanged();
           return this;
         }
         /**
    @@ -2117,11 +2112,11 @@ public Builder setMemoryInfo(
             org.tensorflow.proto.MemoryInfo.Builder builderForValue) {
           if (memoryInfoBuilder_ == null) {
             memoryInfo_ = builderForValue.build();
    -        onChanged();
           } else {
             memoryInfoBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000040;
    +      onChanged();
           return this;
         }
         /**
    @@ -2129,38 +2124,40 @@ public Builder setMemoryInfo(
          */
         public Builder mergeMemoryInfo(org.tensorflow.proto.MemoryInfo value) {
           if (memoryInfoBuilder_ == null) {
    -        if (memoryInfo_ != null) {
    -          memoryInfo_ =
    -            org.tensorflow.proto.MemoryInfo.newBuilder(memoryInfo_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000040) != 0) &&
    +          memoryInfo_ != null &&
    +          memoryInfo_ != org.tensorflow.proto.MemoryInfo.getDefaultInstance()) {
    +          getMemoryInfoBuilder().mergeFrom(value);
             } else {
               memoryInfo_ = value;
             }
    -        onChanged();
           } else {
             memoryInfoBuilder_.mergeFrom(value);
           }
    -
    +      if (memoryInfo_ != null) {
    +        bitField0_ |= 0x00000040;
    +        onChanged();
    +      }
           return this;
         }
         /**
          * .tensorflow.MemoryInfo memory_info = 6;
          */
         public Builder clearMemoryInfo() {
    -      if (memoryInfoBuilder_ == null) {
    -        memoryInfo_ = null;
    -        onChanged();
    -      } else {
    -        memoryInfo_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000040);
    +      memoryInfo_ = null;
    +      if (memoryInfoBuilder_ != null) {
    +        memoryInfoBuilder_.dispose();
             memoryInfoBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
          * .tensorflow.MemoryInfo memory_info = 6;
          */
         public org.tensorflow.proto.MemoryInfo.Builder getMemoryInfoBuilder() {
    -      
    +      bitField0_ |= 0x00000040;
           onChanged();
           return getMemoryInfoFieldBuilder().getBuilder();
         }
    @@ -2178,11 +2175,11 @@ public org.tensorflow.proto.MemoryInfoOrBuilder getMemoryInfoOrBuilder() {
         /**
          * .tensorflow.MemoryInfo memory_info = 6;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.MemoryInfo, org.tensorflow.proto.MemoryInfo.Builder, org.tensorflow.proto.MemoryInfoOrBuilder> 
             getMemoryInfoFieldBuilder() {
           if (memoryInfoBuilder_ == null) {
    -        memoryInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        memoryInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.MemoryInfo, org.tensorflow.proto.MemoryInfo.Builder, org.tensorflow.proto.MemoryInfoOrBuilder>(
                     getMemoryInfo(),
                     getParentForChildren(),
    @@ -2191,18 +2188,6 @@ public org.tensorflow.proto.MemoryInfoOrBuilder getMemoryInfoOrBuilder() {
           }
           return memoryInfoBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.MachineConfiguration)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MachineConfigurationOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MachineConfigurationOrBuilder.java
    index e3c944d06be..05929ab4e94 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MachineConfigurationOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MachineConfigurationOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: xla/tsl/protobuf/test_log.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemmappedFileSystem.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemmappedFileSystem.java
    index 49ea2902bf0..e76113f6643 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemmappedFileSystem.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemmappedFileSystem.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/util/memmapped_file_system.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class MemmappedFileSystem {
       private MemmappedFileSystem() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      MemmappedFileSystem.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -50,37 +61,34 @@ public interface MemmappedFileSystemDirectoryElementOrBuilder extends
        * Protobuf type {@code tensorflow.MemmappedFileSystemDirectoryElement}
        */
       public static final class MemmappedFileSystemDirectoryElement extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.MemmappedFileSystemDirectoryElement)
           MemmappedFileSystemDirectoryElementOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        MemmappedFileSystemDirectoryElement.class.getName());
    +    }
         // Use MemmappedFileSystemDirectoryElement.newBuilder() to construct.
    -    private MemmappedFileSystemDirectoryElement(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private MemmappedFileSystemDirectoryElement(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private MemmappedFileSystemDirectoryElement() {
           name_ = "";
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new MemmappedFileSystemDirectoryElement();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.MemmappedFileSystem.internal_static_tensorflow_MemmappedFileSystemDirectoryElement_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.MemmappedFileSystem.internal_static_tensorflow_MemmappedFileSystemDirectoryElement_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -88,7 +96,7 @@ protected java.lang.Object newInstance(
         }
     
         public static final int OFFSET_FIELD_NUMBER = 1;
    -    private long offset_;
    +    private long offset_ = 0L;
         /**
          * uint64 offset = 1;
          * @return The offset.
    @@ -99,7 +107,8 @@ public long getOffset() {
         }
     
         public static final int NAME_FIELD_NUMBER = 2;
    -    private volatile java.lang.Object name_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object name_ = "";
         /**
          * string name = 2;
          * @return The name.
    @@ -137,7 +146,7 @@ public java.lang.String getName() {
         }
     
         public static final int LENGTH_FIELD_NUMBER = 3;
    -    private long length_;
    +    private long length_ = 0L;
         /**
          * uint64 length = 3;
          * @return The length.
    @@ -164,8 +173,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           if (offset_ != 0L) {
             output.writeUInt64(1, offset_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 2, name_);
           }
           if (length_ != 0L) {
             output.writeUInt64(3, length_);
    @@ -183,8 +192,8 @@ public int getSerializedSize() {
             size += com.google.protobuf.CodedOutputStream
               .computeUInt64Size(1, offset_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, name_);
           }
           if (length_ != 0L) {
             size += com.google.protobuf.CodedOutputStream
    @@ -269,39 +278,41 @@ public static org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirect
         }
         public static org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryElement parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryElement parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryElement parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryElement parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryElement parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryElement parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -321,7 +332,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -333,7 +344,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.MemmappedFileSystemDirectoryElement}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.MemmappedFileSystemDirectoryElement)
             org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryElementOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -342,7 +353,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.MemmappedFileSystem.internal_static_tensorflow_MemmappedFileSystemDirectoryElement_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -355,19 +366,17 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             offset_ = 0L;
    -
             name_ = "";
    -
             length_ = 0L;
    -
             return this;
           }
     
    @@ -394,45 +403,24 @@ public org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryElem
           @java.lang.Override
           public org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryElement buildPartial() {
             org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryElement result = new org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryElement(this);
    -        result.offset_ = offset_;
    -        result.name_ = name_;
    -        result.length_ = length_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryElement result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.offset_ = offset_;
    +        }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.name_ = name_;
    +        }
    +        if (((from_bitField0_ & 0x00000004) != 0)) {
    +          result.length_ = length_;
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryElement) {
    @@ -450,6 +438,7 @@ public Builder mergeFrom(org.tensorflow.proto.MemmappedFileSystem.MemmappedFileS
             }
             if (!other.getName().isEmpty()) {
               name_ = other.name_;
    +          bitField0_ |= 0x00000002;
               onChanged();
             }
             if (other.getLength() != 0L) {
    @@ -483,17 +472,17 @@ public Builder mergeFrom(
                     break;
                   case 8: {
                     offset_ = input.readUInt64();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 8
                   case 18: {
                     name_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 18
                   case 24: {
                     length_ = input.readUInt64();
    -
    +                bitField0_ |= 0x00000004;
                     break;
                   } // case 24
                   default: {
    @@ -511,6 +500,7 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    +      private int bitField0_;
     
           private long offset_ ;
           /**
    @@ -527,8 +517,9 @@ public long getOffset() {
            * @return This builder for chaining.
            */
           public Builder setOffset(long value) {
    -        
    +
             offset_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -537,7 +528,7 @@ public Builder setOffset(long value) {
            * @return This builder for chaining.
            */
           public Builder clearOffset() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000001);
             offset_ = 0L;
             onChanged();
             return this;
    @@ -584,11 +575,9 @@ public java.lang.String getName() {
            */
           public Builder setName(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             name_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -597,8 +586,8 @@ public Builder setName(
            * @return This builder for chaining.
            */
           public Builder clearName() {
    -        
             name_ = getDefaultInstance().getName();
    +        bitField0_ = (bitField0_ & ~0x00000002);
             onChanged();
             return this;
           }
    @@ -609,12 +598,10 @@ public Builder clearName() {
            */
           public Builder setNameBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             name_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -634,8 +621,9 @@ public long getLength() {
            * @return This builder for chaining.
            */
           public Builder setLength(long value) {
    -        
    +
             length_ = value;
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -644,23 +632,11 @@ public Builder setLength(long value) {
            * @return This builder for chaining.
            */
           public Builder clearLength() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000004);
             length_ = 0L;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.MemmappedFileSystemDirectoryElement)
         }
    @@ -749,37 +725,34 @@ org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryElementOrBu
        * Protobuf type {@code tensorflow.MemmappedFileSystemDirectory}
        */
       public static final class MemmappedFileSystemDirectory extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.MemmappedFileSystemDirectory)
           MemmappedFileSystemDirectoryOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        MemmappedFileSystemDirectory.class.getName());
    +    }
         // Use MemmappedFileSystemDirectory.newBuilder() to construct.
    -    private MemmappedFileSystemDirectory(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private MemmappedFileSystemDirectory(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private MemmappedFileSystemDirectory() {
           element_ = java.util.Collections.emptyList();
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new MemmappedFileSystemDirectory();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.MemmappedFileSystem.internal_static_tensorflow_MemmappedFileSystemDirectory_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.MemmappedFileSystem.internal_static_tensorflow_MemmappedFileSystemDirectory_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -787,6 +760,7 @@ protected java.lang.Object newInstance(
         }
     
         public static final int ELEMENT_FIELD_NUMBER = 1;
    +    @SuppressWarnings("serial")
         private java.util.List element_;
         /**
          * repeated .tensorflow.MemmappedFileSystemDirectoryElement element = 1;
    @@ -927,39 +901,41 @@ public static org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirect
         }
         public static org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectory parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectory parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectory parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectory parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectory parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectory parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -979,7 +955,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -991,7 +967,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.MemmappedFileSystemDirectory}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.MemmappedFileSystemDirectory)
             org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -1000,7 +976,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.MemmappedFileSystem.internal_static_tensorflow_MemmappedFileSystemDirectory_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -1013,13 +989,14 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             if (elementBuilder_ == null) {
               element_ = java.util.Collections.emptyList();
             } else {
    @@ -1053,7 +1030,13 @@ public org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectory bui
           @java.lang.Override
           public org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectory buildPartial() {
             org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectory result = new org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectory(this);
    -        int from_bitField0_ = bitField0_;
    +        buildPartialRepeatedFields(result);
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        onBuilt();
    +        return result;
    +      }
    +
    +      private void buildPartialRepeatedFields(org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectory result) {
             if (elementBuilder_ == null) {
               if (((bitField0_ & 0x00000001) != 0)) {
                 element_ = java.util.Collections.unmodifiableList(element_);
    @@ -1063,42 +1046,12 @@ public org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectory bui
             } else {
               result.element_ = elementBuilder_.build();
             }
    -        onBuilt();
    -        return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectory result) {
    +        int from_bitField0_ = bitField0_;
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectory) {
    @@ -1130,7 +1083,7 @@ public Builder mergeFrom(org.tensorflow.proto.MemmappedFileSystem.MemmappedFileS
                   element_ = other.element_;
                   bitField0_ = (bitField0_ & ~0x00000001);
                   elementBuilder_ = 
    -                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                        getElementFieldBuilder() : null;
                 } else {
                   elementBuilder_.addAllMessages(other.element_);
    @@ -1202,7 +1155,7 @@ private void ensureElementIsMutable() {
              }
           }
     
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryElement, org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryElement.Builder, org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryElementOrBuilder> elementBuilder_;
     
           /**
    @@ -1418,11 +1371,11 @@ public org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryElem
                getElementBuilderList() {
             return getElementFieldBuilder().getBuilderList();
           }
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryElement, org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryElement.Builder, org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryElementOrBuilder> 
               getElementFieldBuilder() {
             if (elementBuilder_ == null) {
    -          elementBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +          elementBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                   org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryElement, org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryElement.Builder, org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryElementOrBuilder>(
                       element_,
                       ((bitField0_ & 0x00000001) != 0),
    @@ -1432,18 +1385,6 @@ public org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryElem
             }
             return elementBuilder_;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.MemmappedFileSystemDirectory)
         }
    @@ -1499,12 +1440,12 @@ public org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectory get
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_MemmappedFileSystemDirectoryElement_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_MemmappedFileSystemDirectoryElement_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_MemmappedFileSystemDirectory_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_MemmappedFileSystemDirectory_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -1530,15 +1471,16 @@ public org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectory get
         internal_static_tensorflow_MemmappedFileSystemDirectoryElement_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_MemmappedFileSystemDirectoryElement_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_MemmappedFileSystemDirectoryElement_descriptor,
             new java.lang.String[] { "Offset", "Name", "Length", });
         internal_static_tensorflow_MemmappedFileSystemDirectory_descriptor =
           getDescriptor().getMessageTypes().get(1);
         internal_static_tensorflow_MemmappedFileSystemDirectory_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_MemmappedFileSystemDirectory_descriptor,
             new java.lang.String[] { "Element", });
    +    descriptor.resolveAllFeaturesImmutable();
       }
     
       // @@protoc_insertion_point(outer_class_scope)
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryInfo.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryInfo.java
    index d351a728e2a..7154821aa85 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryInfo.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryInfo.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: xla/tsl/protobuf/test_log.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,36 +9,33 @@
      * Protobuf type {@code tensorflow.MemoryInfo}
      */
     public final class MemoryInfo extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.MemoryInfo)
         MemoryInfoOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      MemoryInfo.class.getName());
    +  }
       // Use MemoryInfo.newBuilder() to construct.
    -  private MemoryInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private MemoryInfo(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private MemoryInfo() {
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new MemoryInfo();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_MemoryInfo_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_MemoryInfo_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -44,7 +43,7 @@ protected java.lang.Object newInstance(
       }
     
       public static final int TOTAL_FIELD_NUMBER = 1;
    -  private long total_;
    +  private long total_ = 0L;
       /**
        * 
        * Total virtual memory in bytes
    @@ -59,7 +58,7 @@ public long getTotal() {
       }
     
       public static final int AVAILABLE_FIELD_NUMBER = 2;
    -  private long available_;
    +  private long available_ = 0L;
       /**
        * 
        * Immediately available memory in bytes
    @@ -185,39 +184,41 @@ public static org.tensorflow.proto.MemoryInfo parseFrom(
       }
       public static org.tensorflow.proto.MemoryInfo parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.MemoryInfo parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.MemoryInfo parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.MemoryInfo parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.MemoryInfo parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.MemoryInfo parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -237,7 +238,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -245,7 +246,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.MemoryInfo}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.MemoryInfo)
           org.tensorflow.proto.MemoryInfoOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -254,7 +255,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_MemoryInfo_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -267,17 +268,16 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           total_ = 0L;
    -
           available_ = 0L;
    -
           return this;
         }
     
    @@ -304,44 +304,21 @@ public org.tensorflow.proto.MemoryInfo build() {
         @java.lang.Override
         public org.tensorflow.proto.MemoryInfo buildPartial() {
           org.tensorflow.proto.MemoryInfo result = new org.tensorflow.proto.MemoryInfo(this);
    -      result.total_ = total_;
    -      result.available_ = available_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.MemoryInfo result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.total_ = total_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.available_ = available_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.MemoryInfo) {
    @@ -388,12 +365,12 @@ public Builder mergeFrom(
                   break;
                 case 8: {
                   total_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 8
                 case 16: {
                   available_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 16
                 default: {
    @@ -411,6 +388,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private long total_ ;
         /**
    @@ -435,8 +413,9 @@ public long getTotal() {
          * @return This builder for chaining.
          */
         public Builder setTotal(long value) {
    -      
    +
           total_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -449,7 +428,7 @@ public Builder setTotal(long value) {
          * @return This builder for chaining.
          */
         public Builder clearTotal() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000001);
           total_ = 0L;
           onChanged();
           return this;
    @@ -478,8 +457,9 @@ public long getAvailable() {
          * @return This builder for chaining.
          */
         public Builder setAvailable(long value) {
    -      
    +
           available_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -492,23 +472,11 @@ public Builder setAvailable(long value) {
          * @return This builder for chaining.
          */
         public Builder clearAvailable() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000002);
           available_ = 0L;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.MemoryInfo)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryInfoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryInfoOrBuilder.java
    index 6a2f7e6c9e8..15da16855ac 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryInfoOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryInfoOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: xla/tsl/protobuf/test_log.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogRawAllocation.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogRawAllocation.java
    index e4e9ac919d4..1f7d254c4cd 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogRawAllocation.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogRawAllocation.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/log_memory.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,12 +9,21 @@
      * Protobuf type {@code tensorflow.MemoryLogRawAllocation}
      */
     public final class MemoryLogRawAllocation extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.MemoryLogRawAllocation)
         MemoryLogRawAllocationOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      MemoryLogRawAllocation.class.getName());
    +  }
       // Use MemoryLogRawAllocation.newBuilder() to construct.
    -  private MemoryLogRawAllocation(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private MemoryLogRawAllocation(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private MemoryLogRawAllocation() {
    @@ -20,25 +31,13 @@ private MemoryLogRawAllocation() {
         allocatorName_ = "";
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new MemoryLogRawAllocation();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.LogMemoryProtos.internal_static_tensorflow_MemoryLogRawAllocation_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.LogMemoryProtos.internal_static_tensorflow_MemoryLogRawAllocation_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -46,7 +45,7 @@ protected java.lang.Object newInstance(
       }
     
       public static final int STEP_ID_FIELD_NUMBER = 1;
    -  private long stepId_;
    +  private long stepId_ = 0L;
       /**
        * 
        * Process-unique step id.
    @@ -61,7 +60,8 @@ public long getStepId() {
       }
     
       public static final int OPERATION_FIELD_NUMBER = 2;
    -  private volatile java.lang.Object operation_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object operation_ = "";
       /**
        * 
        * Name of the operation making the allocation.
    @@ -107,7 +107,7 @@ public java.lang.String getOperation() {
       }
     
       public static final int NUM_BYTES_FIELD_NUMBER = 3;
    -  private long numBytes_;
    +  private long numBytes_ = 0L;
       /**
        * 
        * Number of bytes in the allocation.
    @@ -122,7 +122,7 @@ public long getNumBytes() {
       }
     
       public static final int PTR_FIELD_NUMBER = 4;
    -  private long ptr_;
    +  private long ptr_ = 0L;
       /**
        * 
        * Address of the allocation.
    @@ -137,7 +137,7 @@ public long getPtr() {
       }
     
       public static final int ALLOCATION_ID_FIELD_NUMBER = 5;
    -  private long allocationId_;
    +  private long allocationId_ = 0L;
       /**
        * 
        * Id of the tensor buffer being allocated, used to match to a
    @@ -153,7 +153,8 @@ public long getAllocationId() {
       }
     
       public static final int ALLOCATOR_NAME_FIELD_NUMBER = 6;
    -  private volatile java.lang.Object allocatorName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object allocatorName_ = "";
       /**
        * 
        * Name of the allocator used.
    @@ -215,8 +216,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         if (stepId_ != 0L) {
           output.writeInt64(1, stepId_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operation_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, operation_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(operation_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 2, operation_);
         }
         if (numBytes_ != 0L) {
           output.writeInt64(3, numBytes_);
    @@ -227,8 +228,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         if (allocationId_ != 0L) {
           output.writeInt64(5, allocationId_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(allocatorName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, allocatorName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(allocatorName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 6, allocatorName_);
         }
         getUnknownFields().writeTo(output);
       }
    @@ -243,8 +244,8 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeInt64Size(1, stepId_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operation_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, operation_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(operation_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(2, operation_);
         }
         if (numBytes_ != 0L) {
           size += com.google.protobuf.CodedOutputStream
    @@ -258,8 +259,8 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeInt64Size(5, allocationId_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(allocatorName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, allocatorName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(allocatorName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(6, allocatorName_);
         }
         size += getUnknownFields().getSerializedSize();
         memoizedSize = size;
    @@ -354,39 +355,41 @@ public static org.tensorflow.proto.MemoryLogRawAllocation parseFrom(
       }
       public static org.tensorflow.proto.MemoryLogRawAllocation parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.MemoryLogRawAllocation parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.MemoryLogRawAllocation parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.MemoryLogRawAllocation parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.MemoryLogRawAllocation parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.MemoryLogRawAllocation parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -406,7 +409,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -414,7 +417,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.MemoryLogRawAllocation}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.MemoryLogRawAllocation)
           org.tensorflow.proto.MemoryLogRawAllocationOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -423,7 +426,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.LogMemoryProtos.internal_static_tensorflow_MemoryLogRawAllocation_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -436,25 +439,20 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           stepId_ = 0L;
    -
           operation_ = "";
    -
           numBytes_ = 0L;
    -
           ptr_ = 0L;
    -
           allocationId_ = 0L;
    -
           allocatorName_ = "";
    -
           return this;
         }
     
    @@ -481,48 +479,33 @@ public org.tensorflow.proto.MemoryLogRawAllocation build() {
         @java.lang.Override
         public org.tensorflow.proto.MemoryLogRawAllocation buildPartial() {
           org.tensorflow.proto.MemoryLogRawAllocation result = new org.tensorflow.proto.MemoryLogRawAllocation(this);
    -      result.stepId_ = stepId_;
    -      result.operation_ = operation_;
    -      result.numBytes_ = numBytes_;
    -      result.ptr_ = ptr_;
    -      result.allocationId_ = allocationId_;
    -      result.allocatorName_ = allocatorName_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.MemoryLogRawAllocation result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.stepId_ = stepId_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.operation_ = operation_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.numBytes_ = numBytes_;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.ptr_ = ptr_;
    +      }
    +      if (((from_bitField0_ & 0x00000010) != 0)) {
    +        result.allocationId_ = allocationId_;
    +      }
    +      if (((from_bitField0_ & 0x00000020) != 0)) {
    +        result.allocatorName_ = allocatorName_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.MemoryLogRawAllocation) {
    @@ -540,6 +523,7 @@ public Builder mergeFrom(org.tensorflow.proto.MemoryLogRawAllocation other) {
           }
           if (!other.getOperation().isEmpty()) {
             operation_ = other.operation_;
    +        bitField0_ |= 0x00000002;
             onChanged();
           }
           if (other.getNumBytes() != 0L) {
    @@ -553,6 +537,7 @@ public Builder mergeFrom(org.tensorflow.proto.MemoryLogRawAllocation other) {
           }
           if (!other.getAllocatorName().isEmpty()) {
             allocatorName_ = other.allocatorName_;
    +        bitField0_ |= 0x00000020;
             onChanged();
           }
           this.mergeUnknownFields(other.getUnknownFields());
    @@ -583,32 +568,32 @@ public Builder mergeFrom(
                   break;
                 case 8: {
                   stepId_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 8
                 case 18: {
                   operation_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 case 24: {
                   numBytes_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 24
                 case 32: {
                   ptr_ = input.readUInt64();
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 32
                 case 40: {
                   allocationId_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000010;
                   break;
                 } // case 40
                 case 50: {
                   allocatorName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000020;
                   break;
                 } // case 50
                 default: {
    @@ -626,6 +611,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private long stepId_ ;
         /**
    @@ -650,8 +636,9 @@ public long getStepId() {
          * @return This builder for chaining.
          */
         public Builder setStepId(long value) {
    -      
    +
           stepId_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -664,7 +651,7 @@ public Builder setStepId(long value) {
          * @return This builder for chaining.
          */
         public Builder clearStepId() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000001);
           stepId_ = 0L;
           onChanged();
           return this;
    @@ -723,11 +710,9 @@ public java.lang.String getOperation() {
          */
         public Builder setOperation(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           operation_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -740,8 +725,8 @@ public Builder setOperation(
          * @return This builder for chaining.
          */
         public Builder clearOperation() {
    -      
           operation_ = getDefaultInstance().getOperation();
    +      bitField0_ = (bitField0_ & ~0x00000002);
           onChanged();
           return this;
         }
    @@ -756,12 +741,10 @@ public Builder clearOperation() {
          */
         public Builder setOperationBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           operation_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -789,8 +772,9 @@ public long getNumBytes() {
          * @return This builder for chaining.
          */
         public Builder setNumBytes(long value) {
    -      
    +
           numBytes_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -803,7 +787,7 @@ public Builder setNumBytes(long value) {
          * @return This builder for chaining.
          */
         public Builder clearNumBytes() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000004);
           numBytes_ = 0L;
           onChanged();
           return this;
    @@ -832,8 +816,9 @@ public long getPtr() {
          * @return This builder for chaining.
          */
         public Builder setPtr(long value) {
    -      
    +
           ptr_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -846,7 +831,7 @@ public Builder setPtr(long value) {
          * @return This builder for chaining.
          */
         public Builder clearPtr() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000008);
           ptr_ = 0L;
           onChanged();
           return this;
    @@ -877,8 +862,9 @@ public long getAllocationId() {
          * @return This builder for chaining.
          */
         public Builder setAllocationId(long value) {
    -      
    +
           allocationId_ = value;
    +      bitField0_ |= 0x00000010;
           onChanged();
           return this;
         }
    @@ -892,7 +878,7 @@ public Builder setAllocationId(long value) {
          * @return This builder for chaining.
          */
         public Builder clearAllocationId() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000010);
           allocationId_ = 0L;
           onChanged();
           return this;
    @@ -951,11 +937,9 @@ public java.lang.String getAllocatorName() {
          */
         public Builder setAllocatorName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           allocatorName_ = value;
    +      bitField0_ |= 0x00000020;
           onChanged();
           return this;
         }
    @@ -968,8 +952,8 @@ public Builder setAllocatorName(
          * @return This builder for chaining.
          */
         public Builder clearAllocatorName() {
    -      
           allocatorName_ = getDefaultInstance().getAllocatorName();
    +      bitField0_ = (bitField0_ & ~0x00000020);
           onChanged();
           return this;
         }
    @@ -984,27 +968,13 @@ public Builder clearAllocatorName() {
          */
         public Builder setAllocatorNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           allocatorName_ = value;
    +      bitField0_ |= 0x00000020;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.MemoryLogRawAllocation)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogRawAllocationOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogRawAllocationOrBuilder.java
    index 16ac2cd7764..82a9160572d 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogRawAllocationOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogRawAllocationOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/log_memory.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogRawDeallocation.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogRawDeallocation.java
    index 73c1437212c..1215138ec89 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogRawDeallocation.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogRawDeallocation.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/log_memory.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,12 +9,21 @@
      * Protobuf type {@code tensorflow.MemoryLogRawDeallocation}
      */
     public final class MemoryLogRawDeallocation extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.MemoryLogRawDeallocation)
         MemoryLogRawDeallocationOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      MemoryLogRawDeallocation.class.getName());
    +  }
       // Use MemoryLogRawDeallocation.newBuilder() to construct.
    -  private MemoryLogRawDeallocation(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private MemoryLogRawDeallocation(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private MemoryLogRawDeallocation() {
    @@ -20,25 +31,13 @@ private MemoryLogRawDeallocation() {
         allocatorName_ = "";
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new MemoryLogRawDeallocation();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.LogMemoryProtos.internal_static_tensorflow_MemoryLogRawDeallocation_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.LogMemoryProtos.internal_static_tensorflow_MemoryLogRawDeallocation_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -46,7 +45,7 @@ protected java.lang.Object newInstance(
       }
     
       public static final int STEP_ID_FIELD_NUMBER = 1;
    -  private long stepId_;
    +  private long stepId_ = 0L;
       /**
        * 
        * Process-unique step id.
    @@ -61,7 +60,8 @@ public long getStepId() {
       }
     
       public static final int OPERATION_FIELD_NUMBER = 2;
    -  private volatile java.lang.Object operation_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object operation_ = "";
       /**
        * 
        * Name of the operation making the deallocation.
    @@ -107,7 +107,7 @@ public java.lang.String getOperation() {
       }
     
       public static final int ALLOCATION_ID_FIELD_NUMBER = 3;
    -  private long allocationId_;
    +  private long allocationId_ = 0L;
       /**
        * 
        * Id of the tensor buffer being deallocated, used to match to a
    @@ -123,7 +123,8 @@ public long getAllocationId() {
       }
     
       public static final int ALLOCATOR_NAME_FIELD_NUMBER = 4;
    -  private volatile java.lang.Object allocatorName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object allocatorName_ = "";
       /**
        * 
        * Name of the allocator used.
    @@ -169,7 +170,7 @@ public java.lang.String getAllocatorName() {
       }
     
       public static final int DEFERRED_FIELD_NUMBER = 5;
    -  private boolean deferred_;
    +  private boolean deferred_ = false;
       /**
        * 
        * True if the deallocation is queued and will be performed later,
    @@ -201,14 +202,14 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         if (stepId_ != 0L) {
           output.writeInt64(1, stepId_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operation_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, operation_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(operation_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 2, operation_);
         }
         if (allocationId_ != 0L) {
           output.writeInt64(3, allocationId_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(allocatorName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, allocatorName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(allocatorName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 4, allocatorName_);
         }
         if (deferred_ != false) {
           output.writeBool(5, deferred_);
    @@ -226,15 +227,15 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeInt64Size(1, stepId_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operation_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, operation_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(operation_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(2, operation_);
         }
         if (allocationId_ != 0L) {
           size += com.google.protobuf.CodedOutputStream
             .computeInt64Size(3, allocationId_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(allocatorName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, allocatorName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(allocatorName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(4, allocatorName_);
         }
         if (deferred_ != false) {
           size += com.google.protobuf.CodedOutputStream
    @@ -328,39 +329,41 @@ public static org.tensorflow.proto.MemoryLogRawDeallocation parseFrom(
       }
       public static org.tensorflow.proto.MemoryLogRawDeallocation parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.MemoryLogRawDeallocation parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.MemoryLogRawDeallocation parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.MemoryLogRawDeallocation parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.MemoryLogRawDeallocation parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.MemoryLogRawDeallocation parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -380,7 +383,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -388,7 +391,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.MemoryLogRawDeallocation}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.MemoryLogRawDeallocation)
           org.tensorflow.proto.MemoryLogRawDeallocationOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -397,7 +400,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.LogMemoryProtos.internal_static_tensorflow_MemoryLogRawDeallocation_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -410,23 +413,19 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           stepId_ = 0L;
    -
           operation_ = "";
    -
           allocationId_ = 0L;
    -
           allocatorName_ = "";
    -
           deferred_ = false;
    -
           return this;
         }
     
    @@ -453,47 +452,30 @@ public org.tensorflow.proto.MemoryLogRawDeallocation build() {
         @java.lang.Override
         public org.tensorflow.proto.MemoryLogRawDeallocation buildPartial() {
           org.tensorflow.proto.MemoryLogRawDeallocation result = new org.tensorflow.proto.MemoryLogRawDeallocation(this);
    -      result.stepId_ = stepId_;
    -      result.operation_ = operation_;
    -      result.allocationId_ = allocationId_;
    -      result.allocatorName_ = allocatorName_;
    -      result.deferred_ = deferred_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.MemoryLogRawDeallocation result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.stepId_ = stepId_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.operation_ = operation_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.allocationId_ = allocationId_;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.allocatorName_ = allocatorName_;
    +      }
    +      if (((from_bitField0_ & 0x00000010) != 0)) {
    +        result.deferred_ = deferred_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.MemoryLogRawDeallocation) {
    @@ -511,6 +493,7 @@ public Builder mergeFrom(org.tensorflow.proto.MemoryLogRawDeallocation other) {
           }
           if (!other.getOperation().isEmpty()) {
             operation_ = other.operation_;
    +        bitField0_ |= 0x00000002;
             onChanged();
           }
           if (other.getAllocationId() != 0L) {
    @@ -518,6 +501,7 @@ public Builder mergeFrom(org.tensorflow.proto.MemoryLogRawDeallocation other) {
           }
           if (!other.getAllocatorName().isEmpty()) {
             allocatorName_ = other.allocatorName_;
    +        bitField0_ |= 0x00000008;
             onChanged();
           }
           if (other.getDeferred() != false) {
    @@ -551,27 +535,27 @@ public Builder mergeFrom(
                   break;
                 case 8: {
                   stepId_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 8
                 case 18: {
                   operation_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 case 24: {
                   allocationId_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 24
                 case 34: {
                   allocatorName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 34
                 case 40: {
                   deferred_ = input.readBool();
    -
    +              bitField0_ |= 0x00000010;
                   break;
                 } // case 40
                 default: {
    @@ -589,6 +573,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private long stepId_ ;
         /**
    @@ -613,8 +598,9 @@ public long getStepId() {
          * @return This builder for chaining.
          */
         public Builder setStepId(long value) {
    -      
    +
           stepId_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -627,7 +613,7 @@ public Builder setStepId(long value) {
          * @return This builder for chaining.
          */
         public Builder clearStepId() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000001);
           stepId_ = 0L;
           onChanged();
           return this;
    @@ -686,11 +672,9 @@ public java.lang.String getOperation() {
          */
         public Builder setOperation(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           operation_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -703,8 +687,8 @@ public Builder setOperation(
          * @return This builder for chaining.
          */
         public Builder clearOperation() {
    -      
           operation_ = getDefaultInstance().getOperation();
    +      bitField0_ = (bitField0_ & ~0x00000002);
           onChanged();
           return this;
         }
    @@ -719,12 +703,10 @@ public Builder clearOperation() {
          */
         public Builder setOperationBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           operation_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -754,8 +736,9 @@ public long getAllocationId() {
          * @return This builder for chaining.
          */
         public Builder setAllocationId(long value) {
    -      
    +
           allocationId_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -769,7 +752,7 @@ public Builder setAllocationId(long value) {
          * @return This builder for chaining.
          */
         public Builder clearAllocationId() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000004);
           allocationId_ = 0L;
           onChanged();
           return this;
    @@ -828,11 +811,9 @@ public java.lang.String getAllocatorName() {
          */
         public Builder setAllocatorName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           allocatorName_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -845,8 +826,8 @@ public Builder setAllocatorName(
          * @return This builder for chaining.
          */
         public Builder clearAllocatorName() {
    -      
           allocatorName_ = getDefaultInstance().getAllocatorName();
    +      bitField0_ = (bitField0_ & ~0x00000008);
           onChanged();
           return this;
         }
    @@ -861,12 +842,10 @@ public Builder clearAllocatorName() {
          */
         public Builder setAllocatorNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           allocatorName_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -896,8 +875,9 @@ public boolean getDeferred() {
          * @return This builder for chaining.
          */
         public Builder setDeferred(boolean value) {
    -      
    +
           deferred_ = value;
    +      bitField0_ |= 0x00000010;
           onChanged();
           return this;
         }
    @@ -911,23 +891,11 @@ public Builder setDeferred(boolean value) {
          * @return This builder for chaining.
          */
         public Builder clearDeferred() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000010);
           deferred_ = false;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.MemoryLogRawDeallocation)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogRawDeallocationOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogRawDeallocationOrBuilder.java
    index bd951f2940d..485bb3ff60d 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogRawDeallocationOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogRawDeallocationOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/log_memory.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogStep.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogStep.java
    index 44a87c97310..0f191d9751d 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogStep.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogStep.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/log_memory.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,37 +9,34 @@
      * Protobuf type {@code tensorflow.MemoryLogStep}
      */
     public final class MemoryLogStep extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.MemoryLogStep)
         MemoryLogStepOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      MemoryLogStep.class.getName());
    +  }
       // Use MemoryLogStep.newBuilder() to construct.
    -  private MemoryLogStep(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private MemoryLogStep(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private MemoryLogStep() {
         handle_ = "";
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new MemoryLogStep();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.LogMemoryProtos.internal_static_tensorflow_MemoryLogStep_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.LogMemoryProtos.internal_static_tensorflow_MemoryLogStep_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -45,7 +44,7 @@ protected java.lang.Object newInstance(
       }
     
       public static final int STEP_ID_FIELD_NUMBER = 1;
    -  private long stepId_;
    +  private long stepId_ = 0L;
       /**
        * 
        * Process-unique step id.
    @@ -60,7 +59,8 @@ public long getStepId() {
       }
     
       public static final int HANDLE_FIELD_NUMBER = 2;
    -  private volatile java.lang.Object handle_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object handle_ = "";
       /**
        * 
        * Handle describing the feeds and fetches of the step.
    @@ -122,8 +122,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         if (stepId_ != 0L) {
           output.writeInt64(1, stepId_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(handle_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, handle_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(handle_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 2, handle_);
         }
         getUnknownFields().writeTo(output);
       }
    @@ -138,8 +138,8 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeInt64Size(1, stepId_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(handle_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, handle_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(handle_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(2, handle_);
         }
         size += getUnknownFields().getSerializedSize();
         memoizedSize = size;
    @@ -215,39 +215,41 @@ public static org.tensorflow.proto.MemoryLogStep parseFrom(
       }
       public static org.tensorflow.proto.MemoryLogStep parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.MemoryLogStep parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.MemoryLogStep parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.MemoryLogStep parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.MemoryLogStep parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.MemoryLogStep parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -267,7 +269,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -275,7 +277,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.MemoryLogStep}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.MemoryLogStep)
           org.tensorflow.proto.MemoryLogStepOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -284,7 +286,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.LogMemoryProtos.internal_static_tensorflow_MemoryLogStep_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -297,17 +299,16 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           stepId_ = 0L;
    -
           handle_ = "";
    -
           return this;
         }
     
    @@ -334,44 +335,21 @@ public org.tensorflow.proto.MemoryLogStep build() {
         @java.lang.Override
         public org.tensorflow.proto.MemoryLogStep buildPartial() {
           org.tensorflow.proto.MemoryLogStep result = new org.tensorflow.proto.MemoryLogStep(this);
    -      result.stepId_ = stepId_;
    -      result.handle_ = handle_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.MemoryLogStep result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.stepId_ = stepId_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.handle_ = handle_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.MemoryLogStep) {
    @@ -389,6 +367,7 @@ public Builder mergeFrom(org.tensorflow.proto.MemoryLogStep other) {
           }
           if (!other.getHandle().isEmpty()) {
             handle_ = other.handle_;
    +        bitField0_ |= 0x00000002;
             onChanged();
           }
           this.mergeUnknownFields(other.getUnknownFields());
    @@ -419,12 +398,12 @@ public Builder mergeFrom(
                   break;
                 case 8: {
                   stepId_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 8
                 case 18: {
                   handle_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 default: {
    @@ -442,6 +421,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private long stepId_ ;
         /**
    @@ -466,8 +446,9 @@ public long getStepId() {
          * @return This builder for chaining.
          */
         public Builder setStepId(long value) {
    -      
    +
           stepId_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -480,7 +461,7 @@ public Builder setStepId(long value) {
          * @return This builder for chaining.
          */
         public Builder clearStepId() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000001);
           stepId_ = 0L;
           onChanged();
           return this;
    @@ -539,11 +520,9 @@ public java.lang.String getHandle() {
          */
         public Builder setHandle(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           handle_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -556,8 +535,8 @@ public Builder setHandle(
          * @return This builder for chaining.
          */
         public Builder clearHandle() {
    -      
           handle_ = getDefaultInstance().getHandle();
    +      bitField0_ = (bitField0_ & ~0x00000002);
           onChanged();
           return this;
         }
    @@ -572,27 +551,13 @@ public Builder clearHandle() {
          */
         public Builder setHandleBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           handle_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.MemoryLogStep)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogStepOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogStepOrBuilder.java
    index d6ff942a982..39d7ad3312b 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogStepOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogStepOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/log_memory.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorAllocation.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorAllocation.java
    index f80a91ed246..a2f153d0515 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorAllocation.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorAllocation.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/log_memory.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,45 +9,43 @@
      * Protobuf type {@code tensorflow.MemoryLogTensorAllocation}
      */
     public final class MemoryLogTensorAllocation extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.MemoryLogTensorAllocation)
         MemoryLogTensorAllocationOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      MemoryLogTensorAllocation.class.getName());
    +  }
       // Use MemoryLogTensorAllocation.newBuilder() to construct.
    -  private MemoryLogTensorAllocation(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private MemoryLogTensorAllocation(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private MemoryLogTensorAllocation() {
         kernelName_ = "";
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new MemoryLogTensorAllocation();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.LogMemoryProtos.internal_static_tensorflow_MemoryLogTensorAllocation_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.LogMemoryProtos.internal_static_tensorflow_MemoryLogTensorAllocation_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
                 org.tensorflow.proto.MemoryLogTensorAllocation.class, org.tensorflow.proto.MemoryLogTensorAllocation.Builder.class);
       }
     
    +  private int bitField0_;
       public static final int STEP_ID_FIELD_NUMBER = 1;
    -  private long stepId_;
    +  private long stepId_ = 0L;
       /**
        * 
        * Process-unique step id.
    @@ -60,7 +60,8 @@ public long getStepId() {
       }
     
       public static final int KERNEL_NAME_FIELD_NUMBER = 2;
    -  private volatile java.lang.Object kernelName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object kernelName_ = "";
       /**
        * 
        * Name of the kernel making the allocation as set in GraphDef,
    @@ -119,7 +120,7 @@ public java.lang.String getKernelName() {
        */
       @java.lang.Override
       public boolean hasTensor() {
    -    return tensor_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * 
    @@ -142,7 +143,7 @@ public org.tensorflow.proto.TensorDescription getTensor() {
        */
       @java.lang.Override
       public org.tensorflow.proto.TensorDescriptionOrBuilder getTensorOrBuilder() {
    -    return getTensor();
    +    return tensor_ == null ? org.tensorflow.proto.TensorDescription.getDefaultInstance() : tensor_;
       }
     
       private byte memoizedIsInitialized = -1;
    @@ -162,10 +163,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         if (stepId_ != 0L) {
           output.writeInt64(1, stepId_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kernelName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, kernelName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kernelName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 2, kernelName_);
         }
    -    if (tensor_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(3, getTensor());
         }
         getUnknownFields().writeTo(output);
    @@ -181,10 +182,10 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeInt64Size(1, stepId_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kernelName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, kernelName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kernelName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(2, kernelName_);
         }
    -    if (tensor_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(3, getTensor());
         }
    @@ -271,39 +272,41 @@ public static org.tensorflow.proto.MemoryLogTensorAllocation parseFrom(
       }
       public static org.tensorflow.proto.MemoryLogTensorAllocation parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.MemoryLogTensorAllocation parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.MemoryLogTensorAllocation parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.MemoryLogTensorAllocation parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.MemoryLogTensorAllocation parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.MemoryLogTensorAllocation parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -323,7 +326,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -331,7 +334,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.MemoryLogTensorAllocation}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.MemoryLogTensorAllocation)
           org.tensorflow.proto.MemoryLogTensorAllocationOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -340,7 +343,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.LogMemoryProtos.internal_static_tensorflow_MemoryLogTensorAllocation_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -349,25 +352,29 @@ public static final class Builder extends
     
         // Construct using org.tensorflow.proto.MemoryLogTensorAllocation.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getTensorFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           stepId_ = 0L;
    -
           kernelName_ = "";
    -
    -      if (tensorBuilder_ == null) {
    -        tensor_ = null;
    -      } else {
    -        tensor_ = null;
    +      tensor_ = null;
    +      if (tensorBuilder_ != null) {
    +        tensorBuilder_.dispose();
             tensorBuilder_ = null;
           }
           return this;
    @@ -396,49 +403,29 @@ public org.tensorflow.proto.MemoryLogTensorAllocation build() {
         @java.lang.Override
         public org.tensorflow.proto.MemoryLogTensorAllocation buildPartial() {
           org.tensorflow.proto.MemoryLogTensorAllocation result = new org.tensorflow.proto.MemoryLogTensorAllocation(this);
    -      result.stepId_ = stepId_;
    -      result.kernelName_ = kernelName_;
    -      if (tensorBuilder_ == null) {
    -        result.tensor_ = tensor_;
    -      } else {
    -        result.tensor_ = tensorBuilder_.build();
    -      }
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.MemoryLogTensorAllocation result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.stepId_ = stepId_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.kernelName_ = kernelName_;
    +      }
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.tensor_ = tensorBuilder_ == null
    +            ? tensor_
    +            : tensorBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
    +      }
    +      result.bitField0_ |= to_bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.MemoryLogTensorAllocation) {
    @@ -456,6 +443,7 @@ public Builder mergeFrom(org.tensorflow.proto.MemoryLogTensorAllocation other) {
           }
           if (!other.getKernelName().isEmpty()) {
             kernelName_ = other.kernelName_;
    +        bitField0_ |= 0x00000002;
             onChanged();
           }
           if (other.hasTensor()) {
    @@ -489,19 +477,19 @@ public Builder mergeFrom(
                   break;
                 case 8: {
                   stepId_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 8
                 case 18: {
                   kernelName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 case 26: {
                   input.readMessage(
                       getTensorFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 26
                 default: {
    @@ -519,6 +507,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private long stepId_ ;
         /**
    @@ -543,8 +532,9 @@ public long getStepId() {
          * @return This builder for chaining.
          */
         public Builder setStepId(long value) {
    -      
    +
           stepId_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -557,7 +547,7 @@ public Builder setStepId(long value) {
          * @return This builder for chaining.
          */
         public Builder clearStepId() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000001);
           stepId_ = 0L;
           onChanged();
           return this;
    @@ -619,11 +609,9 @@ public java.lang.String getKernelName() {
          */
         public Builder setKernelName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           kernelName_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -637,8 +625,8 @@ public Builder setKernelName(
          * @return This builder for chaining.
          */
         public Builder clearKernelName() {
    -      
           kernelName_ = getDefaultInstance().getKernelName();
    +      bitField0_ = (bitField0_ & ~0x00000002);
           onChanged();
           return this;
         }
    @@ -654,18 +642,16 @@ public Builder clearKernelName() {
          */
         public Builder setKernelNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           kernelName_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
     
         private org.tensorflow.proto.TensorDescription tensor_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorDescription, org.tensorflow.proto.TensorDescription.Builder, org.tensorflow.proto.TensorDescriptionOrBuilder> tensorBuilder_;
         /**
          * 
    @@ -676,7 +662,7 @@ public Builder setKernelNameBytes(
          * @return Whether the tensor field is set.
          */
         public boolean hasTensor() {
    -      return tensorBuilder_ != null || tensor_ != null;
    +      return ((bitField0_ & 0x00000004) != 0);
         }
         /**
          * 
    @@ -706,11 +692,11 @@ public Builder setTensor(org.tensorflow.proto.TensorDescription value) {
               throw new NullPointerException();
             }
             tensor_ = value;
    -        onChanged();
           } else {
             tensorBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000004;
    +      onChanged();
           return this;
         }
         /**
    @@ -724,11 +710,11 @@ public Builder setTensor(
             org.tensorflow.proto.TensorDescription.Builder builderForValue) {
           if (tensorBuilder_ == null) {
             tensor_ = builderForValue.build();
    -        onChanged();
           } else {
             tensorBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000004;
    +      onChanged();
           return this;
         }
         /**
    @@ -740,17 +726,20 @@ public Builder setTensor(
          */
         public Builder mergeTensor(org.tensorflow.proto.TensorDescription value) {
           if (tensorBuilder_ == null) {
    -        if (tensor_ != null) {
    -          tensor_ =
    -            org.tensorflow.proto.TensorDescription.newBuilder(tensor_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000004) != 0) &&
    +          tensor_ != null &&
    +          tensor_ != org.tensorflow.proto.TensorDescription.getDefaultInstance()) {
    +          getTensorBuilder().mergeFrom(value);
             } else {
               tensor_ = value;
             }
    -        onChanged();
           } else {
             tensorBuilder_.mergeFrom(value);
           }
    -
    +      if (tensor_ != null) {
    +        bitField0_ |= 0x00000004;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -761,14 +750,13 @@ public Builder mergeTensor(org.tensorflow.proto.TensorDescription value) {
          * .tensorflow.TensorDescription tensor = 3;
          */
         public Builder clearTensor() {
    -      if (tensorBuilder_ == null) {
    -        tensor_ = null;
    -        onChanged();
    -      } else {
    -        tensor_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000004);
    +      tensor_ = null;
    +      if (tensorBuilder_ != null) {
    +        tensorBuilder_.dispose();
             tensorBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -779,7 +767,7 @@ public Builder clearTensor() {
          * .tensorflow.TensorDescription tensor = 3;
          */
         public org.tensorflow.proto.TensorDescription.Builder getTensorBuilder() {
    -      
    +      bitField0_ |= 0x00000004;
           onChanged();
           return getTensorFieldBuilder().getBuilder();
         }
    @@ -805,11 +793,11 @@ public org.tensorflow.proto.TensorDescriptionOrBuilder getTensorOrBuilder() {
          *
          * .tensorflow.TensorDescription tensor = 3;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorDescription, org.tensorflow.proto.TensorDescription.Builder, org.tensorflow.proto.TensorDescriptionOrBuilder> 
             getTensorFieldBuilder() {
           if (tensorBuilder_ == null) {
    -        tensorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        tensorBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.TensorDescription, org.tensorflow.proto.TensorDescription.Builder, org.tensorflow.proto.TensorDescriptionOrBuilder>(
                     getTensor(),
                     getParentForChildren(),
    @@ -818,18 +806,6 @@ public org.tensorflow.proto.TensorDescriptionOrBuilder getTensorOrBuilder() {
           }
           return tensorBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.MemoryLogTensorAllocation)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorAllocationOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorAllocationOrBuilder.java
    index be0aa265bc7..c8c3c7dd79f 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorAllocationOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorAllocationOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/log_memory.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorDeallocation.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorDeallocation.java
    index d6d7695b47f..2cd7114b7f1 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorDeallocation.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorDeallocation.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/log_memory.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,37 +9,34 @@
      * Protobuf type {@code tensorflow.MemoryLogTensorDeallocation}
      */
     public final class MemoryLogTensorDeallocation extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.MemoryLogTensorDeallocation)
         MemoryLogTensorDeallocationOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      MemoryLogTensorDeallocation.class.getName());
    +  }
       // Use MemoryLogTensorDeallocation.newBuilder() to construct.
    -  private MemoryLogTensorDeallocation(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private MemoryLogTensorDeallocation(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private MemoryLogTensorDeallocation() {
         allocatorName_ = "";
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new MemoryLogTensorDeallocation();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.LogMemoryProtos.internal_static_tensorflow_MemoryLogTensorDeallocation_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.LogMemoryProtos.internal_static_tensorflow_MemoryLogTensorDeallocation_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -45,7 +44,7 @@ protected java.lang.Object newInstance(
       }
     
       public static final int ALLOCATION_ID_FIELD_NUMBER = 1;
    -  private long allocationId_;
    +  private long allocationId_ = 0L;
       /**
        * 
        * Id of the tensor buffer being deallocated, used to match to a
    @@ -61,7 +60,8 @@ public long getAllocationId() {
       }
     
       public static final int ALLOCATOR_NAME_FIELD_NUMBER = 2;
    -  private volatile java.lang.Object allocatorName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object allocatorName_ = "";
       /**
        * 
        * Name of the allocator used.
    @@ -123,8 +123,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         if (allocationId_ != 0L) {
           output.writeInt64(1, allocationId_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(allocatorName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, allocatorName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(allocatorName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 2, allocatorName_);
         }
         getUnknownFields().writeTo(output);
       }
    @@ -139,8 +139,8 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeInt64Size(1, allocationId_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(allocatorName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, allocatorName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(allocatorName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(2, allocatorName_);
         }
         size += getUnknownFields().getSerializedSize();
         memoizedSize = size;
    @@ -216,39 +216,41 @@ public static org.tensorflow.proto.MemoryLogTensorDeallocation parseFrom(
       }
       public static org.tensorflow.proto.MemoryLogTensorDeallocation parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.MemoryLogTensorDeallocation parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.MemoryLogTensorDeallocation parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.MemoryLogTensorDeallocation parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.MemoryLogTensorDeallocation parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.MemoryLogTensorDeallocation parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -268,7 +270,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -276,7 +278,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.MemoryLogTensorDeallocation}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.MemoryLogTensorDeallocation)
           org.tensorflow.proto.MemoryLogTensorDeallocationOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -285,7 +287,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.LogMemoryProtos.internal_static_tensorflow_MemoryLogTensorDeallocation_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -298,17 +300,16 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           allocationId_ = 0L;
    -
           allocatorName_ = "";
    -
           return this;
         }
     
    @@ -335,44 +336,21 @@ public org.tensorflow.proto.MemoryLogTensorDeallocation build() {
         @java.lang.Override
         public org.tensorflow.proto.MemoryLogTensorDeallocation buildPartial() {
           org.tensorflow.proto.MemoryLogTensorDeallocation result = new org.tensorflow.proto.MemoryLogTensorDeallocation(this);
    -      result.allocationId_ = allocationId_;
    -      result.allocatorName_ = allocatorName_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.MemoryLogTensorDeallocation result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.allocationId_ = allocationId_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.allocatorName_ = allocatorName_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.MemoryLogTensorDeallocation) {
    @@ -390,6 +368,7 @@ public Builder mergeFrom(org.tensorflow.proto.MemoryLogTensorDeallocation other)
           }
           if (!other.getAllocatorName().isEmpty()) {
             allocatorName_ = other.allocatorName_;
    +        bitField0_ |= 0x00000002;
             onChanged();
           }
           this.mergeUnknownFields(other.getUnknownFields());
    @@ -420,12 +399,12 @@ public Builder mergeFrom(
                   break;
                 case 8: {
                   allocationId_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 8
                 case 18: {
                   allocatorName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 default: {
    @@ -443,6 +422,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private long allocationId_ ;
         /**
    @@ -469,8 +449,9 @@ public long getAllocationId() {
          * @return This builder for chaining.
          */
         public Builder setAllocationId(long value) {
    -      
    +
           allocationId_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -484,7 +465,7 @@ public Builder setAllocationId(long value) {
          * @return This builder for chaining.
          */
         public Builder clearAllocationId() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000001);
           allocationId_ = 0L;
           onChanged();
           return this;
    @@ -543,11 +524,9 @@ public java.lang.String getAllocatorName() {
          */
         public Builder setAllocatorName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           allocatorName_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -560,8 +539,8 @@ public Builder setAllocatorName(
          * @return This builder for chaining.
          */
         public Builder clearAllocatorName() {
    -      
           allocatorName_ = getDefaultInstance().getAllocatorName();
    +      bitField0_ = (bitField0_ & ~0x00000002);
           onChanged();
           return this;
         }
    @@ -576,27 +555,13 @@ public Builder clearAllocatorName() {
          */
         public Builder setAllocatorNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           allocatorName_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.MemoryLogTensorDeallocation)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorDeallocationOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorDeallocationOrBuilder.java
    index 36bdc3ceaaa..e3e45595114 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorDeallocationOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorDeallocationOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/log_memory.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorOutput.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorOutput.java
    index 28e5b83c11c..2916c4a1637 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorOutput.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorOutput.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/log_memory.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,45 +9,43 @@
      * Protobuf type {@code tensorflow.MemoryLogTensorOutput}
      */
     public final class MemoryLogTensorOutput extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.MemoryLogTensorOutput)
         MemoryLogTensorOutputOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      MemoryLogTensorOutput.class.getName());
    +  }
       // Use MemoryLogTensorOutput.newBuilder() to construct.
    -  private MemoryLogTensorOutput(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private MemoryLogTensorOutput(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private MemoryLogTensorOutput() {
         kernelName_ = "";
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new MemoryLogTensorOutput();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.LogMemoryProtos.internal_static_tensorflow_MemoryLogTensorOutput_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.LogMemoryProtos.internal_static_tensorflow_MemoryLogTensorOutput_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
                 org.tensorflow.proto.MemoryLogTensorOutput.class, org.tensorflow.proto.MemoryLogTensorOutput.Builder.class);
       }
     
    +  private int bitField0_;
       public static final int STEP_ID_FIELD_NUMBER = 1;
    -  private long stepId_;
    +  private long stepId_ = 0L;
       /**
        * 
        * Process-unique step id.
    @@ -60,7 +60,8 @@ public long getStepId() {
       }
     
       public static final int KERNEL_NAME_FIELD_NUMBER = 2;
    -  private volatile java.lang.Object kernelName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object kernelName_ = "";
       /**
        * 
        * Name of the kernel producing an output as set in GraphDef, e.g.,
    @@ -108,7 +109,7 @@ public java.lang.String getKernelName() {
       }
     
       public static final int INDEX_FIELD_NUMBER = 3;
    -  private int index_;
    +  private int index_ = 0;
       /**
        * 
        * Index of the output being set.
    @@ -134,7 +135,7 @@ public int getIndex() {
        */
       @java.lang.Override
       public boolean hasTensor() {
    -    return tensor_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * 
    @@ -157,7 +158,7 @@ public org.tensorflow.proto.TensorDescription getTensor() {
        */
       @java.lang.Override
       public org.tensorflow.proto.TensorDescriptionOrBuilder getTensorOrBuilder() {
    -    return getTensor();
    +    return tensor_ == null ? org.tensorflow.proto.TensorDescription.getDefaultInstance() : tensor_;
       }
     
       private byte memoizedIsInitialized = -1;
    @@ -177,13 +178,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         if (stepId_ != 0L) {
           output.writeInt64(1, stepId_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kernelName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, kernelName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kernelName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 2, kernelName_);
         }
         if (index_ != 0) {
           output.writeInt32(3, index_);
         }
    -    if (tensor_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(4, getTensor());
         }
         getUnknownFields().writeTo(output);
    @@ -199,14 +200,14 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeInt64Size(1, stepId_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kernelName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, kernelName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kernelName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(2, kernelName_);
         }
         if (index_ != 0) {
           size += com.google.protobuf.CodedOutputStream
             .computeInt32Size(3, index_);
         }
    -    if (tensor_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(4, getTensor());
         }
    @@ -297,39 +298,41 @@ public static org.tensorflow.proto.MemoryLogTensorOutput parseFrom(
       }
       public static org.tensorflow.proto.MemoryLogTensorOutput parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.MemoryLogTensorOutput parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.MemoryLogTensorOutput parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.MemoryLogTensorOutput parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.MemoryLogTensorOutput parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.MemoryLogTensorOutput parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -349,7 +352,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -357,7 +360,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.MemoryLogTensorOutput}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.MemoryLogTensorOutput)
           org.tensorflow.proto.MemoryLogTensorOutputOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -366,7 +369,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.LogMemoryProtos.internal_static_tensorflow_MemoryLogTensorOutput_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -375,27 +378,30 @@ public static final class Builder extends
     
         // Construct using org.tensorflow.proto.MemoryLogTensorOutput.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getTensorFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           stepId_ = 0L;
    -
           kernelName_ = "";
    -
           index_ = 0;
    -
    -      if (tensorBuilder_ == null) {
    -        tensor_ = null;
    -      } else {
    -        tensor_ = null;
    +      tensor_ = null;
    +      if (tensorBuilder_ != null) {
    +        tensorBuilder_.dispose();
             tensorBuilder_ = null;
           }
           return this;
    @@ -424,50 +430,32 @@ public org.tensorflow.proto.MemoryLogTensorOutput build() {
         @java.lang.Override
         public org.tensorflow.proto.MemoryLogTensorOutput buildPartial() {
           org.tensorflow.proto.MemoryLogTensorOutput result = new org.tensorflow.proto.MemoryLogTensorOutput(this);
    -      result.stepId_ = stepId_;
    -      result.kernelName_ = kernelName_;
    -      result.index_ = index_;
    -      if (tensorBuilder_ == null) {
    -        result.tensor_ = tensor_;
    -      } else {
    -        result.tensor_ = tensorBuilder_.build();
    -      }
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.MemoryLogTensorOutput result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.stepId_ = stepId_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.kernelName_ = kernelName_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.index_ = index_;
    +      }
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.tensor_ = tensorBuilder_ == null
    +            ? tensor_
    +            : tensorBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
    +      }
    +      result.bitField0_ |= to_bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.MemoryLogTensorOutput) {
    @@ -485,6 +473,7 @@ public Builder mergeFrom(org.tensorflow.proto.MemoryLogTensorOutput other) {
           }
           if (!other.getKernelName().isEmpty()) {
             kernelName_ = other.kernelName_;
    +        bitField0_ |= 0x00000002;
             onChanged();
           }
           if (other.getIndex() != 0) {
    @@ -521,24 +510,24 @@ public Builder mergeFrom(
                   break;
                 case 8: {
                   stepId_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 8
                 case 18: {
                   kernelName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 case 24: {
                   index_ = input.readInt32();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 24
                 case 34: {
                   input.readMessage(
                       getTensorFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 34
                 default: {
    @@ -556,6 +545,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private long stepId_ ;
         /**
    @@ -580,8 +570,9 @@ public long getStepId() {
          * @return This builder for chaining.
          */
         public Builder setStepId(long value) {
    -      
    +
           stepId_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -594,7 +585,7 @@ public Builder setStepId(long value) {
          * @return This builder for chaining.
          */
         public Builder clearStepId() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000001);
           stepId_ = 0L;
           onChanged();
           return this;
    @@ -656,11 +647,9 @@ public java.lang.String getKernelName() {
          */
         public Builder setKernelName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           kernelName_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -674,8 +663,8 @@ public Builder setKernelName(
          * @return This builder for chaining.
          */
         public Builder clearKernelName() {
    -      
           kernelName_ = getDefaultInstance().getKernelName();
    +      bitField0_ = (bitField0_ & ~0x00000002);
           onChanged();
           return this;
         }
    @@ -691,12 +680,10 @@ public Builder clearKernelName() {
          */
         public Builder setKernelNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           kernelName_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -724,8 +711,9 @@ public int getIndex() {
          * @return This builder for chaining.
          */
         public Builder setIndex(int value) {
    -      
    +
           index_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -738,14 +726,14 @@ public Builder setIndex(int value) {
          * @return This builder for chaining.
          */
         public Builder clearIndex() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000004);
           index_ = 0;
           onChanged();
           return this;
         }
     
         private org.tensorflow.proto.TensorDescription tensor_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorDescription, org.tensorflow.proto.TensorDescription.Builder, org.tensorflow.proto.TensorDescriptionOrBuilder> tensorBuilder_;
         /**
          * 
    @@ -756,7 +744,7 @@ public Builder clearIndex() {
          * @return Whether the tensor field is set.
          */
         public boolean hasTensor() {
    -      return tensorBuilder_ != null || tensor_ != null;
    +      return ((bitField0_ & 0x00000008) != 0);
         }
         /**
          * 
    @@ -786,11 +774,11 @@ public Builder setTensor(org.tensorflow.proto.TensorDescription value) {
               throw new NullPointerException();
             }
             tensor_ = value;
    -        onChanged();
           } else {
             tensorBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000008;
    +      onChanged();
           return this;
         }
         /**
    @@ -804,11 +792,11 @@ public Builder setTensor(
             org.tensorflow.proto.TensorDescription.Builder builderForValue) {
           if (tensorBuilder_ == null) {
             tensor_ = builderForValue.build();
    -        onChanged();
           } else {
             tensorBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000008;
    +      onChanged();
           return this;
         }
         /**
    @@ -820,17 +808,20 @@ public Builder setTensor(
          */
         public Builder mergeTensor(org.tensorflow.proto.TensorDescription value) {
           if (tensorBuilder_ == null) {
    -        if (tensor_ != null) {
    -          tensor_ =
    -            org.tensorflow.proto.TensorDescription.newBuilder(tensor_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000008) != 0) &&
    +          tensor_ != null &&
    +          tensor_ != org.tensorflow.proto.TensorDescription.getDefaultInstance()) {
    +          getTensorBuilder().mergeFrom(value);
             } else {
               tensor_ = value;
             }
    -        onChanged();
           } else {
             tensorBuilder_.mergeFrom(value);
           }
    -
    +      if (tensor_ != null) {
    +        bitField0_ |= 0x00000008;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -841,14 +832,13 @@ public Builder mergeTensor(org.tensorflow.proto.TensorDescription value) {
          * .tensorflow.TensorDescription tensor = 4;
          */
         public Builder clearTensor() {
    -      if (tensorBuilder_ == null) {
    -        tensor_ = null;
    -        onChanged();
    -      } else {
    -        tensor_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000008);
    +      tensor_ = null;
    +      if (tensorBuilder_ != null) {
    +        tensorBuilder_.dispose();
             tensorBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -859,7 +849,7 @@ public Builder clearTensor() {
          * .tensorflow.TensorDescription tensor = 4;
          */
         public org.tensorflow.proto.TensorDescription.Builder getTensorBuilder() {
    -      
    +      bitField0_ |= 0x00000008;
           onChanged();
           return getTensorFieldBuilder().getBuilder();
         }
    @@ -885,11 +875,11 @@ public org.tensorflow.proto.TensorDescriptionOrBuilder getTensorOrBuilder() {
          *
          * .tensorflow.TensorDescription tensor = 4;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorDescription, org.tensorflow.proto.TensorDescription.Builder, org.tensorflow.proto.TensorDescriptionOrBuilder> 
             getTensorFieldBuilder() {
           if (tensorBuilder_ == null) {
    -        tensorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        tensorBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.TensorDescription, org.tensorflow.proto.TensorDescription.Builder, org.tensorflow.proto.TensorDescriptionOrBuilder>(
                     getTensor(),
                     getParentForChildren(),
    @@ -898,18 +888,6 @@ public org.tensorflow.proto.TensorDescriptionOrBuilder getTensorOrBuilder() {
           }
           return tensorBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.MemoryLogTensorOutput)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorOutputOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorOutputOrBuilder.java
    index 97a99804141..b85bb1491aa 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorOutputOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorOutputOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/log_memory.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryStats.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryStats.java
    index 354c9e5dfb2..dbb3b986b34 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryStats.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryStats.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/step_stats.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,12 +13,21 @@
      * Protobuf type {@code tensorflow.MemoryStats}
      */
     public final class MemoryStats extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.MemoryStats)
         MemoryStatsOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      MemoryStats.class.getName());
    +  }
       // Use MemoryStats.newBuilder() to construct.
    -  private MemoryStats(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private MemoryStats(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private MemoryStats() {
    @@ -24,25 +35,13 @@ private MemoryStats() {
         devicePersistentTensorAllocIds_ = emptyLongList();
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new MemoryStats();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.StepStatsProtos.internal_static_tensorflow_MemoryStats_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.StepStatsProtos.internal_static_tensorflow_MemoryStats_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -50,7 +49,7 @@ protected java.lang.Object newInstance(
       }
     
       public static final int TEMP_MEMORY_SIZE_FIELD_NUMBER = 1;
    -  private long tempMemorySize_;
    +  private long tempMemorySize_ = 0L;
       /**
        * int64 temp_memory_size = 1;
        * @return The tempMemorySize.
    @@ -61,7 +60,7 @@ public long getTempMemorySize() {
       }
     
       public static final int PERSISTENT_MEMORY_SIZE_FIELD_NUMBER = 3;
    -  private long persistentMemorySize_;
    +  private long persistentMemorySize_ = 0L;
       /**
        * int64 persistent_memory_size = 3;
        * @return The persistentMemorySize.
    @@ -72,7 +71,9 @@ public long getPersistentMemorySize() {
       }
     
       public static final int PERSISTENT_TENSOR_ALLOC_IDS_FIELD_NUMBER = 5;
    -  private com.google.protobuf.Internal.LongList persistentTensorAllocIds_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.Internal.LongList persistentTensorAllocIds_ =
    +      emptyLongList();
       /**
        * repeated int64 persistent_tensor_alloc_ids = 5;
        * @return A list containing the persistentTensorAllocIds.
    @@ -100,7 +101,7 @@ public long getPersistentTensorAllocIds(int index) {
       private int persistentTensorAllocIdsMemoizedSerializedSize = -1;
     
       public static final int DEVICE_TEMP_MEMORY_SIZE_FIELD_NUMBER = 2;
    -  private long deviceTempMemorySize_;
    +  private long deviceTempMemorySize_ = 0L;
       /**
        * int64 device_temp_memory_size = 2 [deprecated = true];
        * @deprecated tensorflow.MemoryStats.device_temp_memory_size is deprecated.
    @@ -113,7 +114,7 @@ public long getPersistentTensorAllocIds(int index) {
       }
     
       public static final int DEVICE_PERSISTENT_MEMORY_SIZE_FIELD_NUMBER = 4;
    -  private long devicePersistentMemorySize_;
    +  private long devicePersistentMemorySize_ = 0L;
       /**
        * int64 device_persistent_memory_size = 4 [deprecated = true];
        * @deprecated tensorflow.MemoryStats.device_persistent_memory_size is deprecated.
    @@ -126,7 +127,9 @@ public long getPersistentTensorAllocIds(int index) {
       }
     
       public static final int DEVICE_PERSISTENT_TENSOR_ALLOC_IDS_FIELD_NUMBER = 6;
    -  private com.google.protobuf.Internal.LongList devicePersistentTensorAllocIds_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.Internal.LongList devicePersistentTensorAllocIds_ =
    +      emptyLongList();
       /**
        * repeated int64 device_persistent_tensor_alloc_ids = 6 [deprecated = true];
        * @deprecated tensorflow.MemoryStats.device_persistent_tensor_alloc_ids is deprecated.
    @@ -350,39 +353,41 @@ public static org.tensorflow.proto.MemoryStats parseFrom(
       }
       public static org.tensorflow.proto.MemoryStats parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.MemoryStats parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.MemoryStats parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.MemoryStats parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.MemoryStats parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.MemoryStats parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -402,7 +407,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -414,7 +419,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.MemoryStats}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.MemoryStats)
           org.tensorflow.proto.MemoryStatsOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -423,7 +428,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.StepStatsProtos.internal_static_tensorflow_MemoryStats_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -436,25 +441,20 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           tempMemorySize_ = 0L;
    -
           persistentMemorySize_ = 0L;
    -
           persistentTensorAllocIds_ = emptyLongList();
    -      bitField0_ = (bitField0_ & ~0x00000001);
           deviceTempMemorySize_ = 0L;
    -
           devicePersistentMemorySize_ = 0L;
    -
           devicePersistentTensorAllocIds_ = emptyLongList();
    -      bitField0_ = (bitField0_ & ~0x00000002);
           return this;
         }
     
    @@ -481,57 +481,35 @@ public org.tensorflow.proto.MemoryStats build() {
         @java.lang.Override
         public org.tensorflow.proto.MemoryStats buildPartial() {
           org.tensorflow.proto.MemoryStats result = new org.tensorflow.proto.MemoryStats(this);
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartial0(org.tensorflow.proto.MemoryStats result) {
           int from_bitField0_ = bitField0_;
    -      result.tempMemorySize_ = tempMemorySize_;
    -      result.persistentMemorySize_ = persistentMemorySize_;
    -      if (((bitField0_ & 0x00000001) != 0)) {
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.tempMemorySize_ = tempMemorySize_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.persistentMemorySize_ = persistentMemorySize_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
             persistentTensorAllocIds_.makeImmutable();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        result.persistentTensorAllocIds_ = persistentTensorAllocIds_;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.deviceTempMemorySize_ = deviceTempMemorySize_;
           }
    -      result.persistentTensorAllocIds_ = persistentTensorAllocIds_;
    -      result.deviceTempMemorySize_ = deviceTempMemorySize_;
    -      result.devicePersistentMemorySize_ = devicePersistentMemorySize_;
    -      if (((bitField0_ & 0x00000002) != 0)) {
    +      if (((from_bitField0_ & 0x00000010) != 0)) {
    +        result.devicePersistentMemorySize_ = devicePersistentMemorySize_;
    +      }
    +      if (((from_bitField0_ & 0x00000020) != 0)) {
             devicePersistentTensorAllocIds_.makeImmutable();
    -        bitField0_ = (bitField0_ & ~0x00000002);
    +        result.devicePersistentTensorAllocIds_ = devicePersistentTensorAllocIds_;
           }
    -      result.devicePersistentTensorAllocIds_ = devicePersistentTensorAllocIds_;
    -      onBuilt();
    -      return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    -    }
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.MemoryStats) {
    @@ -553,7 +531,8 @@ public Builder mergeFrom(org.tensorflow.proto.MemoryStats other) {
           if (!other.persistentTensorAllocIds_.isEmpty()) {
             if (persistentTensorAllocIds_.isEmpty()) {
               persistentTensorAllocIds_ = other.persistentTensorAllocIds_;
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          persistentTensorAllocIds_.makeImmutable();
    +          bitField0_ |= 0x00000004;
             } else {
               ensurePersistentTensorAllocIdsIsMutable();
               persistentTensorAllocIds_.addAll(other.persistentTensorAllocIds_);
    @@ -569,7 +548,8 @@ public Builder mergeFrom(org.tensorflow.proto.MemoryStats other) {
           if (!other.devicePersistentTensorAllocIds_.isEmpty()) {
             if (devicePersistentTensorAllocIds_.isEmpty()) {
               devicePersistentTensorAllocIds_ = other.devicePersistentTensorAllocIds_;
    -          bitField0_ = (bitField0_ & ~0x00000002);
    +          devicePersistentTensorAllocIds_.makeImmutable();
    +          bitField0_ |= 0x00000020;
             } else {
               ensureDevicePersistentTensorAllocIdsIsMutable();
               devicePersistentTensorAllocIds_.addAll(other.devicePersistentTensorAllocIds_);
    @@ -604,22 +584,22 @@ public Builder mergeFrom(
                   break;
                 case 8: {
                   tempMemorySize_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 8
                 case 16: {
                   deviceTempMemorySize_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 16
                 case 24: {
                   persistentMemorySize_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 24
                 case 32: {
                   devicePersistentMemorySize_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000010;
                   break;
                 } // case 32
                 case 40: {
    @@ -686,8 +666,9 @@ public long getTempMemorySize() {
          * @return This builder for chaining.
          */
         public Builder setTempMemorySize(long value) {
    -      
    +
           tempMemorySize_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -696,7 +677,7 @@ public Builder setTempMemorySize(long value) {
          * @return This builder for chaining.
          */
         public Builder clearTempMemorySize() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000001);
           tempMemorySize_ = 0L;
           onChanged();
           return this;
    @@ -717,8 +698,9 @@ public long getPersistentMemorySize() {
          * @return This builder for chaining.
          */
         public Builder setPersistentMemorySize(long value) {
    -      
    +
           persistentMemorySize_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -727,7 +709,7 @@ public Builder setPersistentMemorySize(long value) {
          * @return This builder for chaining.
          */
         public Builder clearPersistentMemorySize() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000002);
           persistentMemorySize_ = 0L;
           onChanged();
           return this;
    @@ -735,10 +717,10 @@ public Builder clearPersistentMemorySize() {
     
         private com.google.protobuf.Internal.LongList persistentTensorAllocIds_ = emptyLongList();
         private void ensurePersistentTensorAllocIdsIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    -        persistentTensorAllocIds_ = mutableCopy(persistentTensorAllocIds_);
    -        bitField0_ |= 0x00000001;
    -       }
    +      if (!persistentTensorAllocIds_.isModifiable()) {
    +        persistentTensorAllocIds_ = makeMutableCopy(persistentTensorAllocIds_);
    +      }
    +      bitField0_ |= 0x00000004;
         }
         /**
          * repeated int64 persistent_tensor_alloc_ids = 5;
    @@ -746,8 +728,8 @@ private void ensurePersistentTensorAllocIdsIsMutable() {
          */
         public java.util.List
             getPersistentTensorAllocIdsList() {
    -      return ((bitField0_ & 0x00000001) != 0) ?
    -               java.util.Collections.unmodifiableList(persistentTensorAllocIds_) : persistentTensorAllocIds_;
    +      persistentTensorAllocIds_.makeImmutable();
    +      return persistentTensorAllocIds_;
         }
         /**
          * repeated int64 persistent_tensor_alloc_ids = 5;
    @@ -772,8 +754,10 @@ public long getPersistentTensorAllocIds(int index) {
          */
         public Builder setPersistentTensorAllocIds(
             int index, long value) {
    +
           ensurePersistentTensorAllocIdsIsMutable();
           persistentTensorAllocIds_.setLong(index, value);
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -783,8 +767,10 @@ public Builder setPersistentTensorAllocIds(
          * @return This builder for chaining.
          */
         public Builder addPersistentTensorAllocIds(long value) {
    +
           ensurePersistentTensorAllocIdsIsMutable();
           persistentTensorAllocIds_.addLong(value);
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -798,6 +784,7 @@ public Builder addAllPersistentTensorAllocIds(
           ensurePersistentTensorAllocIdsIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, persistentTensorAllocIds_);
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -807,7 +794,7 @@ public Builder addAllPersistentTensorAllocIds(
          */
         public Builder clearPersistentTensorAllocIds() {
           persistentTensorAllocIds_ = emptyLongList();
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      bitField0_ = (bitField0_ & ~0x00000004);
           onChanged();
           return this;
         }
    @@ -831,8 +818,9 @@ public Builder clearPersistentTensorAllocIds() {
          * @return This builder for chaining.
          */
         @java.lang.Deprecated public Builder setDeviceTempMemorySize(long value) {
    -      
    +
           deviceTempMemorySize_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -843,7 +831,7 @@ public Builder clearPersistentTensorAllocIds() {
          * @return This builder for chaining.
          */
         @java.lang.Deprecated public Builder clearDeviceTempMemorySize() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000008);
           deviceTempMemorySize_ = 0L;
           onChanged();
           return this;
    @@ -868,8 +856,9 @@ public Builder clearPersistentTensorAllocIds() {
          * @return This builder for chaining.
          */
         @java.lang.Deprecated public Builder setDevicePersistentMemorySize(long value) {
    -      
    +
           devicePersistentMemorySize_ = value;
    +      bitField0_ |= 0x00000010;
           onChanged();
           return this;
         }
    @@ -880,7 +869,7 @@ public Builder clearPersistentTensorAllocIds() {
          * @return This builder for chaining.
          */
         @java.lang.Deprecated public Builder clearDevicePersistentMemorySize() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000010);
           devicePersistentMemorySize_ = 0L;
           onChanged();
           return this;
    @@ -888,10 +877,10 @@ public Builder clearPersistentTensorAllocIds() {
     
         private com.google.protobuf.Internal.LongList devicePersistentTensorAllocIds_ = emptyLongList();
         private void ensureDevicePersistentTensorAllocIdsIsMutable() {
    -      if (!((bitField0_ & 0x00000002) != 0)) {
    -        devicePersistentTensorAllocIds_ = mutableCopy(devicePersistentTensorAllocIds_);
    -        bitField0_ |= 0x00000002;
    -       }
    +      if (!devicePersistentTensorAllocIds_.isModifiable()) {
    +        devicePersistentTensorAllocIds_ = makeMutableCopy(devicePersistentTensorAllocIds_);
    +      }
    +      bitField0_ |= 0x00000020;
         }
         /**
          * repeated int64 device_persistent_tensor_alloc_ids = 6 [deprecated = true];
    @@ -901,8 +890,8 @@ private void ensureDevicePersistentTensorAllocIdsIsMutable() {
          */
         @java.lang.Deprecated public java.util.List
             getDevicePersistentTensorAllocIdsList() {
    -      return ((bitField0_ & 0x00000002) != 0) ?
    -               java.util.Collections.unmodifiableList(devicePersistentTensorAllocIds_) : devicePersistentTensorAllocIds_;
    +      devicePersistentTensorAllocIds_.makeImmutable();
    +      return devicePersistentTensorAllocIds_;
         }
         /**
          * repeated int64 device_persistent_tensor_alloc_ids = 6 [deprecated = true];
    @@ -933,8 +922,10 @@ private void ensureDevicePersistentTensorAllocIdsIsMutable() {
          */
         @java.lang.Deprecated public Builder setDevicePersistentTensorAllocIds(
             int index, long value) {
    +
           ensureDevicePersistentTensorAllocIdsIsMutable();
           devicePersistentTensorAllocIds_.setLong(index, value);
    +      bitField0_ |= 0x00000020;
           onChanged();
           return this;
         }
    @@ -946,8 +937,10 @@ private void ensureDevicePersistentTensorAllocIdsIsMutable() {
          * @return This builder for chaining.
          */
         @java.lang.Deprecated public Builder addDevicePersistentTensorAllocIds(long value) {
    +
           ensureDevicePersistentTensorAllocIdsIsMutable();
           devicePersistentTensorAllocIds_.addLong(value);
    +      bitField0_ |= 0x00000020;
           onChanged();
           return this;
         }
    @@ -963,6 +956,7 @@ private void ensureDevicePersistentTensorAllocIdsIsMutable() {
           ensureDevicePersistentTensorAllocIdsIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, devicePersistentTensorAllocIds_);
    +      bitField0_ |= 0x00000020;
           onChanged();
           return this;
         }
    @@ -974,22 +968,10 @@ private void ensureDevicePersistentTensorAllocIdsIsMutable() {
          */
         @java.lang.Deprecated public Builder clearDevicePersistentTensorAllocIds() {
           devicePersistentTensorAllocIds_ = emptyLongList();
    -      bitField0_ = (bitField0_ & ~0x00000002);
    +      bitField0_ = (bitField0_ & ~0x00000020);
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.MemoryStats)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryStatsOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryStatsOrBuilder.java
    index 00814311c14..3c04e6831dd 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryStatsOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryStatsOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/step_stats.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetaGraphDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetaGraphDef.java
    index c01e3be793a..8dfe44e7a05 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetaGraphDef.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetaGraphDef.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/meta_graph.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -10,41 +12,38 @@
      * objects necessary for running computation in a graph when crossing the
      * process boundary. It can be used for long term storage of graphs,
      * cross-language execution of graphs, etc.
    - *   MetaInfoDef
    - *   GraphDef
    - *   SaverDef
    - *   CollectionDef
    - *   TensorInfo
    - *   SignatureDef
    + * MetaInfoDef
    + * GraphDef
    + * SaverDef
    + * CollectionDef
    + * TensorInfo
    + * SignatureDef
      * 
    * * Protobuf type {@code tensorflow.MetaGraphDef} */ public final class MetaGraphDef extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.MetaGraphDef) MetaGraphDefOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + MetaGraphDef.class.getName()); + } // Use MetaGraphDef.newBuilder() to construct. - private MetaGraphDef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private MetaGraphDef(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private MetaGraphDef() { assetFileDef_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new MetaGraphDef(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.MetaGraphProtos.internal_static_tensorflow_MetaGraphDef_descriptor; @@ -52,7 +51,7 @@ protected java.lang.Object newInstance( @SuppressWarnings({"rawtypes"}) @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 4: @@ -65,7 +64,7 @@ protected com.google.protobuf.MapField internalGetMapField( } } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.MetaGraphProtos.internal_static_tensorflow_MetaGraphDef_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -161,6 +160,7 @@ public interface MetaInfoDefOrBuilder extends /** *
          * User supplied tag(s) on the meta_graph and included graph_def.
    +     *
          * MetaGraphDefs should be tagged with their capabilities or use-cases.
          * Examples: "train", "serve", "gpu", "tpu", etc.
          * These tags enable loaders to access the MetaGraph(s) appropriate for a
    @@ -175,6 +175,7 @@ public interface MetaInfoDefOrBuilder extends
         /**
          * 
          * User supplied tag(s) on the meta_graph and included graph_def.
    +     *
          * MetaGraphDefs should be tagged with their capabilities or use-cases.
          * Examples: "train", "serve", "gpu", "tpu", etc.
          * These tags enable loaders to access the MetaGraph(s) appropriate for a
    @@ -188,6 +189,7 @@ public interface MetaInfoDefOrBuilder extends
         /**
          * 
          * User supplied tag(s) on the meta_graph and included graph_def.
    +     *
          * MetaGraphDefs should be tagged with their capabilities or use-cases.
          * Examples: "train", "serve", "gpu", "tpu", etc.
          * These tags enable loaders to access the MetaGraph(s) appropriate for a
    @@ -202,6 +204,7 @@ public interface MetaInfoDefOrBuilder extends
         /**
          * 
          * User supplied tag(s) on the meta_graph and included graph_def.
    +     *
          * MetaGraphDefs should be tagged with their capabilities or use-cases.
          * Examples: "train", "serve", "gpu", "tpu", etc.
          * These tags enable loaders to access the MetaGraph(s) appropriate for a
    @@ -313,7 +316,6 @@ boolean containsFunctionAliases(
          *
          * map<string, string> function_aliases = 8;
          */
    -
         /* nullable */
     java.lang.String getFunctionAliasesOrDefault(
             java.lang.String key,
    @@ -326,7 +328,6 @@ java.lang.String getFunctionAliasesOrDefault(
          *
          * map<string, string> function_aliases = 8;
          */
    -
         java.lang.String getFunctionAliasesOrThrow(
             java.lang.String key);
       }
    @@ -339,33 +340,31 @@ java.lang.String getFunctionAliasesOrThrow(
        * Protobuf type {@code tensorflow.MetaGraphDef.MetaInfoDef}
        */
       public static final class MetaInfoDef extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.MetaGraphDef.MetaInfoDef)
           MetaInfoDefOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        MetaInfoDef.class.getName());
    +    }
         // Use MetaInfoDef.newBuilder() to construct.
    -    private MetaInfoDef(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private MetaInfoDef(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private MetaInfoDef() {
           metaGraphVersion_ = "";
    -      tags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +      tags_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
           tensorflowVersion_ = "";
           tensorflowGitVersion_ = "";
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new MetaInfoDef();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.MetaGraphProtos.internal_static_tensorflow_MetaGraphDef_MetaInfoDef_descriptor;
    @@ -373,7 +372,7 @@ protected java.lang.Object newInstance(
     
         @SuppressWarnings({"rawtypes"})
         @java.lang.Override
    -    protected com.google.protobuf.MapField internalGetMapField(
    +    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
             int number) {
           switch (number) {
             case 8:
    @@ -384,15 +383,17 @@ protected com.google.protobuf.MapField internalGetMapField(
           }
         }
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.MetaGraphProtos.internal_static_tensorflow_MetaGraphDef_MetaInfoDef_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
                   org.tensorflow.proto.MetaGraphDef.MetaInfoDef.class, org.tensorflow.proto.MetaGraphDef.MetaInfoDef.Builder.class);
         }
     
    +    private int bitField0_;
         public static final int META_GRAPH_VERSION_FIELD_NUMBER = 1;
    -    private volatile java.lang.Object metaGraphVersion_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object metaGraphVersion_ = "";
         /**
          * 
          * User specified Version string. Can be the name of the model and revision,
    @@ -452,7 +453,7 @@ public java.lang.String getMetaGraphVersion() {
          */
         @java.lang.Override
         public boolean hasStrippedOpList() {
    -      return strippedOpList_ != null;
    +      return ((bitField0_ & 0x00000001) != 0);
         }
         /**
          * 
    @@ -477,7 +478,7 @@ public org.tensorflow.proto.OpList getStrippedOpList() {
          */
         @java.lang.Override
         public org.tensorflow.proto.OpListOrBuilder getStrippedOpListOrBuilder() {
    -      return getStrippedOpList();
    +      return strippedOpList_ == null ? org.tensorflow.proto.OpList.getDefaultInstance() : strippedOpList_;
         }
     
         public static final int ANY_INFO_FIELD_NUMBER = 3;
    @@ -493,7 +494,7 @@ public org.tensorflow.proto.OpListOrBuilder getStrippedOpListOrBuilder() {
          */
         @java.lang.Override
         public boolean hasAnyInfo() {
    -      return anyInfo_ != null;
    +      return ((bitField0_ & 0x00000002) != 0);
         }
         /**
          * 
    @@ -518,14 +519,17 @@ public com.google.protobuf.Any getAnyInfo() {
          */
         @java.lang.Override
         public com.google.protobuf.AnyOrBuilder getAnyInfoOrBuilder() {
    -      return getAnyInfo();
    +      return anyInfo_ == null ? com.google.protobuf.Any.getDefaultInstance() : anyInfo_;
         }
     
         public static final int TAGS_FIELD_NUMBER = 4;
    -    private com.google.protobuf.LazyStringList tags_;
    +    @SuppressWarnings("serial")
    +    private com.google.protobuf.LazyStringArrayList tags_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         /**
          * 
          * User supplied tag(s) on the meta_graph and included graph_def.
    +     *
          * MetaGraphDefs should be tagged with their capabilities or use-cases.
          * Examples: "train", "serve", "gpu", "tpu", etc.
          * These tags enable loaders to access the MetaGraph(s) appropriate for a
    @@ -542,6 +546,7 @@ public com.google.protobuf.AnyOrBuilder getAnyInfoOrBuilder() {
         /**
          * 
          * User supplied tag(s) on the meta_graph and included graph_def.
    +     *
          * MetaGraphDefs should be tagged with their capabilities or use-cases.
          * Examples: "train", "serve", "gpu", "tpu", etc.
          * These tags enable loaders to access the MetaGraph(s) appropriate for a
    @@ -557,6 +562,7 @@ public int getTagsCount() {
         /**
          * 
          * User supplied tag(s) on the meta_graph and included graph_def.
    +     *
          * MetaGraphDefs should be tagged with their capabilities or use-cases.
          * Examples: "train", "serve", "gpu", "tpu", etc.
          * These tags enable loaders to access the MetaGraph(s) appropriate for a
    @@ -573,6 +579,7 @@ public java.lang.String getTags(int index) {
         /**
          * 
          * User supplied tag(s) on the meta_graph and included graph_def.
    +     *
          * MetaGraphDefs should be tagged with their capabilities or use-cases.
          * Examples: "train", "serve", "gpu", "tpu", etc.
          * These tags enable loaders to access the MetaGraph(s) appropriate for a
    @@ -589,7 +596,8 @@ public java.lang.String getTags(int index) {
         }
     
         public static final int TENSORFLOW_VERSION_FIELD_NUMBER = 5;
    -    private volatile java.lang.Object tensorflowVersion_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object tensorflowVersion_ = "";
         /**
          * 
          * The __version__ string of the tensorflow build used to write this graph.
    @@ -639,7 +647,8 @@ public java.lang.String getTensorflowVersion() {
         }
     
         public static final int TENSORFLOW_GIT_VERSION_FIELD_NUMBER = 6;
    -    private volatile java.lang.Object tensorflowGitVersion_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object tensorflowGitVersion_ = "";
         /**
          * 
          * The __git_version__ string of the tensorflow build used to write this
    @@ -689,7 +698,7 @@ public java.lang.String getTensorflowGitVersion() {
         }
     
         public static final int STRIPPED_DEFAULT_ATTRS_FIELD_NUMBER = 7;
    -    private boolean strippedDefaultAttrs_;
    +    private boolean strippedDefaultAttrs_ = false;
         /**
          * 
          * A flag to denote whether default-valued attrs have been stripped from
    @@ -716,6 +725,7 @@ private static final class FunctionAliasesDefaultEntryHolder {
                       com.google.protobuf.WireFormat.FieldType.STRING,
                       "");
         }
    +    @SuppressWarnings("serial")
         private com.google.protobuf.MapField<
             java.lang.String, java.lang.String> functionAliases_;
         private com.google.protobuf.MapField
    @@ -726,7 +736,6 @@ private static final class FunctionAliasesDefaultEntryHolder {
           }
           return functionAliases_;
         }
    -
         public int getFunctionAliasesCount() {
           return internalGetFunctionAliases().getMap().size();
         }
    @@ -737,7 +746,6 @@ public int getFunctionAliasesCount() {
          *
          * map<string, string> function_aliases = 8;
          */
    -
         @java.lang.Override
         public boolean containsFunctionAliases(
             java.lang.String key) {
    @@ -760,7 +768,6 @@ public java.util.Map getFunctionAliases() {
          * map<string, string> function_aliases = 8;
          */
         @java.lang.Override
    -
         public java.util.Map getFunctionAliasesMap() {
           return internalGetFunctionAliases().getMap();
         }
    @@ -772,10 +779,11 @@ public java.util.Map getFunctionAliasesMap()
          * map<string, string> function_aliases = 8;
          */
         @java.lang.Override
    -
    -    public java.lang.String getFunctionAliasesOrDefault(
    +    public /* nullable */
    +java.lang.String getFunctionAliasesOrDefault(
             java.lang.String key,
    -        java.lang.String defaultValue) {
    +        /* nullable */
    +java.lang.String defaultValue) {
           if (key == null) { throw new NullPointerException("map key"); }
           java.util.Map map =
               internalGetFunctionAliases().getMap();
    @@ -789,7 +797,6 @@ public java.lang.String getFunctionAliasesOrDefault(
          * map<string, string> function_aliases = 8;
          */
         @java.lang.Override
    -
         public java.lang.String getFunctionAliasesOrThrow(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    @@ -815,28 +822,28 @@ public final boolean isInitialized() {
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output)
                             throws java.io.IOException {
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(metaGraphVersion_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, metaGraphVersion_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(metaGraphVersion_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 1, metaGraphVersion_);
           }
    -      if (strippedOpList_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             output.writeMessage(2, getStrippedOpList());
           }
    -      if (anyInfo_ != null) {
    +      if (((bitField0_ & 0x00000002) != 0)) {
             output.writeMessage(3, getAnyInfo());
           }
           for (int i = 0; i < tags_.size(); i++) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 4, tags_.getRaw(i));
    +        com.google.protobuf.GeneratedMessage.writeString(output, 4, tags_.getRaw(i));
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tensorflowVersion_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 5, tensorflowVersion_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tensorflowVersion_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 5, tensorflowVersion_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tensorflowGitVersion_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 6, tensorflowGitVersion_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tensorflowGitVersion_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 6, tensorflowGitVersion_);
           }
           if (strippedDefaultAttrs_ != false) {
             output.writeBool(7, strippedDefaultAttrs_);
           }
    -      com.google.protobuf.GeneratedMessageV3
    +      com.google.protobuf.GeneratedMessage
             .serializeStringMapTo(
               output,
               internalGetFunctionAliases(),
    @@ -851,14 +858,14 @@ public int getSerializedSize() {
           if (size != -1) return size;
     
           size = 0;
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(metaGraphVersion_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, metaGraphVersion_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(metaGraphVersion_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, metaGraphVersion_);
           }
    -      if (strippedOpList_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(2, getStrippedOpList());
           }
    -      if (anyInfo_ != null) {
    +      if (((bitField0_ & 0x00000002) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(3, getAnyInfo());
           }
    @@ -870,11 +877,11 @@ public int getSerializedSize() {
             size += dataSize;
             size += 1 * getTagsList().size();
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tensorflowVersion_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, tensorflowVersion_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tensorflowVersion_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(5, tensorflowVersion_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tensorflowGitVersion_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, tensorflowGitVersion_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tensorflowGitVersion_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(6, tensorflowGitVersion_);
           }
           if (strippedDefaultAttrs_ != false) {
             size += com.google.protobuf.CodedOutputStream
    @@ -1002,39 +1009,41 @@ public static org.tensorflow.proto.MetaGraphDef.MetaInfoDef parseFrom(
         }
         public static org.tensorflow.proto.MetaGraphDef.MetaInfoDef parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.MetaGraphDef.MetaInfoDef parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.MetaGraphDef.MetaInfoDef parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.MetaGraphDef.MetaInfoDef parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.MetaGraphDef.MetaInfoDef parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.MetaGraphDef.MetaInfoDef parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -1054,7 +1063,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -1067,7 +1076,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.MetaGraphDef.MetaInfoDef}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.MetaGraphDef.MetaInfoDef)
             org.tensorflow.proto.MetaGraphDef.MetaInfoDefOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -1076,7 +1085,7 @@ public static final class Builder extends
           }
     
           @SuppressWarnings({"rawtypes"})
    -      protected com.google.protobuf.MapField internalGetMapField(
    +      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
               int number) {
             switch (number) {
               case 8:
    @@ -1087,7 +1096,7 @@ protected com.google.protobuf.MapField internalGetMapField(
             }
           }
           @SuppressWarnings({"rawtypes"})
    -      protected com.google.protobuf.MapField internalGetMutableMapField(
    +      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
               int number) {
             switch (number) {
               case 8:
    @@ -1098,7 +1107,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField(
             }
           }
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.MetaGraphProtos.internal_static_tensorflow_MetaGraphDef_MetaInfoDef_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -1107,39 +1116,41 @@ protected com.google.protobuf.MapField internalGetMutableMapField(
     
           // Construct using org.tensorflow.proto.MetaGraphDef.MetaInfoDef.newBuilder()
           private Builder() {
    -
    +        maybeForceBuilderInitialization();
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
    -
    +        maybeForceBuilderInitialization();
    +      }
    +      private void maybeForceBuilderInitialization() {
    +        if (com.google.protobuf.GeneratedMessage
    +                .alwaysUseFieldBuilders) {
    +          getStrippedOpListFieldBuilder();
    +          getAnyInfoFieldBuilder();
    +        }
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             metaGraphVersion_ = "";
    -
    -        if (strippedOpListBuilder_ == null) {
    -          strippedOpList_ = null;
    -        } else {
    -          strippedOpList_ = null;
    +        strippedOpList_ = null;
    +        if (strippedOpListBuilder_ != null) {
    +          strippedOpListBuilder_.dispose();
               strippedOpListBuilder_ = null;
             }
    -        if (anyInfoBuilder_ == null) {
    -          anyInfo_ = null;
    -        } else {
    -          anyInfo_ = null;
    +        anyInfo_ = null;
    +        if (anyInfoBuilder_ != null) {
    +          anyInfoBuilder_.dispose();
               anyInfoBuilder_ = null;
             }
    -        tags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        tags_ =
    +            com.google.protobuf.LazyStringArrayList.emptyList();
             tensorflowVersion_ = "";
    -
             tensorflowGitVersion_ = "";
    -
             strippedDefaultAttrs_ = false;
    -
             internalGetMutableFunctionAliases().clear();
             return this;
           }
    @@ -1167,64 +1178,49 @@ public org.tensorflow.proto.MetaGraphDef.MetaInfoDef build() {
           @java.lang.Override
           public org.tensorflow.proto.MetaGraphDef.MetaInfoDef buildPartial() {
             org.tensorflow.proto.MetaGraphDef.MetaInfoDef result = new org.tensorflow.proto.MetaGraphDef.MetaInfoDef(this);
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        onBuilt();
    +        return result;
    +      }
    +
    +      private void buildPartial0(org.tensorflow.proto.MetaGraphDef.MetaInfoDef result) {
             int from_bitField0_ = bitField0_;
    -        result.metaGraphVersion_ = metaGraphVersion_;
    -        if (strippedOpListBuilder_ == null) {
    -          result.strippedOpList_ = strippedOpList_;
    -        } else {
    -          result.strippedOpList_ = strippedOpListBuilder_.build();
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.metaGraphVersion_ = metaGraphVersion_;
             }
    -        if (anyInfoBuilder_ == null) {
    -          result.anyInfo_ = anyInfo_;
    -        } else {
    -          result.anyInfo_ = anyInfoBuilder_.build();
    +        int to_bitField0_ = 0;
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.strippedOpList_ = strippedOpListBuilder_ == null
    +              ? strippedOpList_
    +              : strippedOpListBuilder_.build();
    +          to_bitField0_ |= 0x00000001;
             }
    -        if (((bitField0_ & 0x00000001) != 0)) {
    -          tags_ = tags_.getUnmodifiableView();
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +        if (((from_bitField0_ & 0x00000004) != 0)) {
    +          result.anyInfo_ = anyInfoBuilder_ == null
    +              ? anyInfo_
    +              : anyInfoBuilder_.build();
    +          to_bitField0_ |= 0x00000002;
             }
    -        result.tags_ = tags_;
    -        result.tensorflowVersion_ = tensorflowVersion_;
    -        result.tensorflowGitVersion_ = tensorflowGitVersion_;
    -        result.strippedDefaultAttrs_ = strippedDefaultAttrs_;
    -        result.functionAliases_ = internalGetFunctionAliases();
    -        result.functionAliases_.makeImmutable();
    -        onBuilt();
    -        return result;
    +        if (((from_bitField0_ & 0x00000008) != 0)) {
    +          tags_.makeImmutable();
    +          result.tags_ = tags_;
    +        }
    +        if (((from_bitField0_ & 0x00000010) != 0)) {
    +          result.tensorflowVersion_ = tensorflowVersion_;
    +        }
    +        if (((from_bitField0_ & 0x00000020) != 0)) {
    +          result.tensorflowGitVersion_ = tensorflowGitVersion_;
    +        }
    +        if (((from_bitField0_ & 0x00000040) != 0)) {
    +          result.strippedDefaultAttrs_ = strippedDefaultAttrs_;
    +        }
    +        if (((from_bitField0_ & 0x00000080) != 0)) {
    +          result.functionAliases_ = internalGetFunctionAliases();
    +          result.functionAliases_.makeImmutable();
    +        }
    +        result.bitField0_ |= to_bitField0_;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    -      }
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.MetaGraphDef.MetaInfoDef) {
    @@ -1239,6 +1235,7 @@ public Builder mergeFrom(org.tensorflow.proto.MetaGraphDef.MetaInfoDef other) {
             if (other == org.tensorflow.proto.MetaGraphDef.MetaInfoDef.getDefaultInstance()) return this;
             if (!other.getMetaGraphVersion().isEmpty()) {
               metaGraphVersion_ = other.metaGraphVersion_;
    +          bitField0_ |= 0x00000001;
               onChanged();
             }
             if (other.hasStrippedOpList()) {
    @@ -1250,7 +1247,7 @@ public Builder mergeFrom(org.tensorflow.proto.MetaGraphDef.MetaInfoDef other) {
             if (!other.tags_.isEmpty()) {
               if (tags_.isEmpty()) {
                 tags_ = other.tags_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ |= 0x00000008;
               } else {
                 ensureTagsIsMutable();
                 tags_.addAll(other.tags_);
    @@ -1259,10 +1256,12 @@ public Builder mergeFrom(org.tensorflow.proto.MetaGraphDef.MetaInfoDef other) {
             }
             if (!other.getTensorflowVersion().isEmpty()) {
               tensorflowVersion_ = other.tensorflowVersion_;
    +          bitField0_ |= 0x00000010;
               onChanged();
             }
             if (!other.getTensorflowGitVersion().isEmpty()) {
               tensorflowGitVersion_ = other.tensorflowGitVersion_;
    +          bitField0_ |= 0x00000020;
               onChanged();
             }
             if (other.getStrippedDefaultAttrs() != false) {
    @@ -1270,6 +1269,7 @@ public Builder mergeFrom(org.tensorflow.proto.MetaGraphDef.MetaInfoDef other) {
             }
             internalGetMutableFunctionAliases().mergeFrom(
                 other.internalGetFunctionAliases());
    +        bitField0_ |= 0x00000080;
             this.mergeUnknownFields(other.getUnknownFields());
             onChanged();
             return this;
    @@ -1298,21 +1298,21 @@ public Builder mergeFrom(
                     break;
                   case 10: {
                     metaGraphVersion_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 10
                   case 18: {
                     input.readMessage(
                         getStrippedOpListFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 18
                   case 26: {
                     input.readMessage(
                         getAnyInfoFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00000004;
                     break;
                   } // case 26
                   case 34: {
    @@ -1323,17 +1323,17 @@ public Builder mergeFrom(
                   } // case 34
                   case 42: {
                     tensorflowVersion_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000010;
                     break;
                   } // case 42
                   case 50: {
                     tensorflowGitVersion_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000020;
                     break;
                   } // case 50
                   case 56: {
                     strippedDefaultAttrs_ = input.readBool();
    -
    +                bitField0_ |= 0x00000040;
                     break;
                   } // case 56
                   case 66: {
    @@ -1342,6 +1342,7 @@ public Builder mergeFrom(
                         FunctionAliasesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
                     internalGetMutableFunctionAliases().getMutableMap().put(
                         functionAliases__.getKey(), functionAliases__.getValue());
    +                bitField0_ |= 0x00000080;
                     break;
                   } // case 66
                   default: {
    @@ -1417,11 +1418,9 @@ public java.lang.String getMetaGraphVersion() {
            */
           public Builder setMetaGraphVersion(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             metaGraphVersion_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -1435,8 +1434,8 @@ public Builder setMetaGraphVersion(
            * @return This builder for chaining.
            */
           public Builder clearMetaGraphVersion() {
    -        
             metaGraphVersion_ = getDefaultInstance().getMetaGraphVersion();
    +        bitField0_ = (bitField0_ & ~0x00000001);
             onChanged();
             return this;
           }
    @@ -1452,18 +1451,16 @@ public Builder clearMetaGraphVersion() {
            */
           public Builder setMetaGraphVersionBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             metaGraphVersion_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
     
           private org.tensorflow.proto.OpList strippedOpList_;
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.OpList, org.tensorflow.proto.OpList.Builder, org.tensorflow.proto.OpListOrBuilder> strippedOpListBuilder_;
           /**
            * 
    @@ -1475,7 +1472,7 @@ public Builder setMetaGraphVersionBytes(
            * @return Whether the strippedOpList field is set.
            */
           public boolean hasStrippedOpList() {
    -        return strippedOpListBuilder_ != null || strippedOpList_ != null;
    +        return ((bitField0_ & 0x00000002) != 0);
           }
           /**
            * 
    @@ -1507,11 +1504,11 @@ public Builder setStrippedOpList(org.tensorflow.proto.OpList value) {
                 throw new NullPointerException();
               }
               strippedOpList_ = value;
    -          onChanged();
             } else {
               strippedOpListBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000002;
    +        onChanged();
             return this;
           }
           /**
    @@ -1526,11 +1523,11 @@ public Builder setStrippedOpList(
               org.tensorflow.proto.OpList.Builder builderForValue) {
             if (strippedOpListBuilder_ == null) {
               strippedOpList_ = builderForValue.build();
    -          onChanged();
             } else {
               strippedOpListBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000002;
    +        onChanged();
             return this;
           }
           /**
    @@ -1543,17 +1540,20 @@ public Builder setStrippedOpList(
            */
           public Builder mergeStrippedOpList(org.tensorflow.proto.OpList value) {
             if (strippedOpListBuilder_ == null) {
    -          if (strippedOpList_ != null) {
    -            strippedOpList_ =
    -              org.tensorflow.proto.OpList.newBuilder(strippedOpList_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000002) != 0) &&
    +            strippedOpList_ != null &&
    +            strippedOpList_ != org.tensorflow.proto.OpList.getDefaultInstance()) {
    +            getStrippedOpListBuilder().mergeFrom(value);
               } else {
                 strippedOpList_ = value;
               }
    -          onChanged();
             } else {
               strippedOpListBuilder_.mergeFrom(value);
             }
    -
    +        if (strippedOpList_ != null) {
    +          bitField0_ |= 0x00000002;
    +          onChanged();
    +        }
             return this;
           }
           /**
    @@ -1565,14 +1565,13 @@ public Builder mergeStrippedOpList(org.tensorflow.proto.OpList value) {
            * .tensorflow.OpList stripped_op_list = 2;
            */
           public Builder clearStrippedOpList() {
    -        if (strippedOpListBuilder_ == null) {
    -          strippedOpList_ = null;
    -          onChanged();
    -        } else {
    -          strippedOpList_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000002);
    +        strippedOpList_ = null;
    +        if (strippedOpListBuilder_ != null) {
    +          strippedOpListBuilder_.dispose();
               strippedOpListBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
    @@ -1584,7 +1583,7 @@ public Builder clearStrippedOpList() {
            * .tensorflow.OpList stripped_op_list = 2;
            */
           public org.tensorflow.proto.OpList.Builder getStrippedOpListBuilder() {
    -        
    +        bitField0_ |= 0x00000002;
             onChanged();
             return getStrippedOpListFieldBuilder().getBuilder();
           }
    @@ -1612,11 +1611,11 @@ public org.tensorflow.proto.OpListOrBuilder getStrippedOpListOrBuilder() {
            *
            * .tensorflow.OpList stripped_op_list = 2;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.OpList, org.tensorflow.proto.OpList.Builder, org.tensorflow.proto.OpListOrBuilder> 
               getStrippedOpListFieldBuilder() {
             if (strippedOpListBuilder_ == null) {
    -          strippedOpListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          strippedOpListBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.OpList, org.tensorflow.proto.OpList.Builder, org.tensorflow.proto.OpListOrBuilder>(
                       getStrippedOpList(),
                       getParentForChildren(),
    @@ -1627,7 +1626,7 @@ public org.tensorflow.proto.OpListOrBuilder getStrippedOpListOrBuilder() {
           }
     
           private com.google.protobuf.Any anyInfo_;
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> anyInfoBuilder_;
           /**
            * 
    @@ -1639,7 +1638,7 @@ public org.tensorflow.proto.OpListOrBuilder getStrippedOpListOrBuilder() {
            * @return Whether the anyInfo field is set.
            */
           public boolean hasAnyInfo() {
    -        return anyInfoBuilder_ != null || anyInfo_ != null;
    +        return ((bitField0_ & 0x00000004) != 0);
           }
           /**
            * 
    @@ -1671,11 +1670,11 @@ public Builder setAnyInfo(com.google.protobuf.Any value) {
                 throw new NullPointerException();
               }
               anyInfo_ = value;
    -          onChanged();
             } else {
               anyInfoBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000004;
    +        onChanged();
             return this;
           }
           /**
    @@ -1690,11 +1689,11 @@ public Builder setAnyInfo(
               com.google.protobuf.Any.Builder builderForValue) {
             if (anyInfoBuilder_ == null) {
               anyInfo_ = builderForValue.build();
    -          onChanged();
             } else {
               anyInfoBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000004;
    +        onChanged();
             return this;
           }
           /**
    @@ -1707,17 +1706,20 @@ public Builder setAnyInfo(
            */
           public Builder mergeAnyInfo(com.google.protobuf.Any value) {
             if (anyInfoBuilder_ == null) {
    -          if (anyInfo_ != null) {
    -            anyInfo_ =
    -              com.google.protobuf.Any.newBuilder(anyInfo_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000004) != 0) &&
    +            anyInfo_ != null &&
    +            anyInfo_ != com.google.protobuf.Any.getDefaultInstance()) {
    +            getAnyInfoBuilder().mergeFrom(value);
               } else {
                 anyInfo_ = value;
               }
    -          onChanged();
             } else {
               anyInfoBuilder_.mergeFrom(value);
             }
    -
    +        if (anyInfo_ != null) {
    +          bitField0_ |= 0x00000004;
    +          onChanged();
    +        }
             return this;
           }
           /**
    @@ -1729,14 +1731,13 @@ public Builder mergeAnyInfo(com.google.protobuf.Any value) {
            * .google.protobuf.Any any_info = 3;
            */
           public Builder clearAnyInfo() {
    -        if (anyInfoBuilder_ == null) {
    -          anyInfo_ = null;
    -          onChanged();
    -        } else {
    -          anyInfo_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000004);
    +        anyInfo_ = null;
    +        if (anyInfoBuilder_ != null) {
    +          anyInfoBuilder_.dispose();
               anyInfoBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
    @@ -1748,7 +1749,7 @@ public Builder clearAnyInfo() {
            * .google.protobuf.Any any_info = 3;
            */
           public com.google.protobuf.Any.Builder getAnyInfoBuilder() {
    -        
    +        bitField0_ |= 0x00000004;
             onChanged();
             return getAnyInfoFieldBuilder().getBuilder();
           }
    @@ -1776,11 +1777,11 @@ public com.google.protobuf.AnyOrBuilder getAnyInfoOrBuilder() {
            *
            * .google.protobuf.Any any_info = 3;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> 
               getAnyInfoFieldBuilder() {
             if (anyInfoBuilder_ == null) {
    -          anyInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          anyInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>(
                       getAnyInfo(),
                       getParentForChildren(),
    @@ -1790,16 +1791,18 @@ public com.google.protobuf.AnyOrBuilder getAnyInfoOrBuilder() {
             return anyInfoBuilder_;
           }
     
    -      private com.google.protobuf.LazyStringList tags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +      private com.google.protobuf.LazyStringArrayList tags_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
           private void ensureTagsIsMutable() {
    -        if (!((bitField0_ & 0x00000001) != 0)) {
    +        if (!tags_.isModifiable()) {
               tags_ = new com.google.protobuf.LazyStringArrayList(tags_);
    -          bitField0_ |= 0x00000001;
    -         }
    +        }
    +        bitField0_ |= 0x00000008;
           }
           /**
            * 
            * User supplied tag(s) on the meta_graph and included graph_def.
    +       *
            * MetaGraphDefs should be tagged with their capabilities or use-cases.
            * Examples: "train", "serve", "gpu", "tpu", etc.
            * These tags enable loaders to access the MetaGraph(s) appropriate for a
    @@ -1811,11 +1814,13 @@ private void ensureTagsIsMutable() {
            */
           public com.google.protobuf.ProtocolStringList
               getTagsList() {
    -        return tags_.getUnmodifiableView();
    +        tags_.makeImmutable();
    +        return tags_;
           }
           /**
            * 
            * User supplied tag(s) on the meta_graph and included graph_def.
    +       *
            * MetaGraphDefs should be tagged with their capabilities or use-cases.
            * Examples: "train", "serve", "gpu", "tpu", etc.
            * These tags enable loaders to access the MetaGraph(s) appropriate for a
    @@ -1831,6 +1836,7 @@ public int getTagsCount() {
           /**
            * 
            * User supplied tag(s) on the meta_graph and included graph_def.
    +       *
            * MetaGraphDefs should be tagged with their capabilities or use-cases.
            * Examples: "train", "serve", "gpu", "tpu", etc.
            * These tags enable loaders to access the MetaGraph(s) appropriate for a
    @@ -1847,6 +1853,7 @@ public java.lang.String getTags(int index) {
           /**
            * 
            * User supplied tag(s) on the meta_graph and included graph_def.
    +       *
            * MetaGraphDefs should be tagged with their capabilities or use-cases.
            * Examples: "train", "serve", "gpu", "tpu", etc.
            * These tags enable loaders to access the MetaGraph(s) appropriate for a
    @@ -1864,6 +1871,7 @@ public java.lang.String getTags(int index) {
           /**
            * 
            * User supplied tag(s) on the meta_graph and included graph_def.
    +       *
            * MetaGraphDefs should be tagged with their capabilities or use-cases.
            * Examples: "train", "serve", "gpu", "tpu", etc.
            * These tags enable loaders to access the MetaGraph(s) appropriate for a
    @@ -1877,17 +1885,17 @@ public java.lang.String getTags(int index) {
            */
           public Builder setTags(
               int index, java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureTagsIsMutable();
    +        if (value == null) { throw new NullPointerException(); }
    +        ensureTagsIsMutable();
             tags_.set(index, value);
    +        bitField0_ |= 0x00000008;
             onChanged();
             return this;
           }
           /**
            * 
            * User supplied tag(s) on the meta_graph and included graph_def.
    +       *
            * MetaGraphDefs should be tagged with their capabilities or use-cases.
            * Examples: "train", "serve", "gpu", "tpu", etc.
            * These tags enable loaders to access the MetaGraph(s) appropriate for a
    @@ -1900,17 +1908,17 @@ public Builder setTags(
            */
           public Builder addTags(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureTagsIsMutable();
    +        if (value == null) { throw new NullPointerException(); }
    +        ensureTagsIsMutable();
             tags_.add(value);
    +        bitField0_ |= 0x00000008;
             onChanged();
             return this;
           }
           /**
            * 
            * User supplied tag(s) on the meta_graph and included graph_def.
    +       *
            * MetaGraphDefs should be tagged with their capabilities or use-cases.
            * Examples: "train", "serve", "gpu", "tpu", etc.
            * These tags enable loaders to access the MetaGraph(s) appropriate for a
    @@ -1926,12 +1934,14 @@ public Builder addAllTags(
             ensureTagsIsMutable();
             com.google.protobuf.AbstractMessageLite.Builder.addAll(
                 values, tags_);
    +        bitField0_ |= 0x00000008;
             onChanged();
             return this;
           }
           /**
            * 
            * User supplied tag(s) on the meta_graph and included graph_def.
    +       *
            * MetaGraphDefs should be tagged with their capabilities or use-cases.
            * Examples: "train", "serve", "gpu", "tpu", etc.
            * These tags enable loaders to access the MetaGraph(s) appropriate for a
    @@ -1942,14 +1952,16 @@ public Builder addAllTags(
            * @return This builder for chaining.
            */
           public Builder clearTags() {
    -        tags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        tags_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
    +        bitField0_ = (bitField0_ & ~0x00000008);;
             onChanged();
             return this;
           }
           /**
            * 
            * User supplied tag(s) on the meta_graph and included graph_def.
    +       *
            * MetaGraphDefs should be tagged with their capabilities or use-cases.
            * Examples: "train", "serve", "gpu", "tpu", etc.
            * These tags enable loaders to access the MetaGraph(s) appropriate for a
    @@ -1962,12 +1974,11 @@ public Builder clearTags() {
            */
           public Builder addTagsBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             ensureTagsIsMutable();
             tags_.add(value);
    +        bitField0_ |= 0x00000008;
             onChanged();
             return this;
           }
    @@ -2031,11 +2042,9 @@ public java.lang.String getTensorflowVersion() {
            */
           public Builder setTensorflowVersion(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             tensorflowVersion_ = value;
    +        bitField0_ |= 0x00000010;
             onChanged();
             return this;
           }
    @@ -2050,8 +2059,8 @@ public Builder setTensorflowVersion(
            * @return This builder for chaining.
            */
           public Builder clearTensorflowVersion() {
    -        
             tensorflowVersion_ = getDefaultInstance().getTensorflowVersion();
    +        bitField0_ = (bitField0_ & ~0x00000010);
             onChanged();
             return this;
           }
    @@ -2068,12 +2077,10 @@ public Builder clearTensorflowVersion() {
            */
           public Builder setTensorflowVersionBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             tensorflowVersion_ = value;
    +        bitField0_ |= 0x00000010;
             onChanged();
             return this;
           }
    @@ -2137,11 +2144,9 @@ public java.lang.String getTensorflowGitVersion() {
            */
           public Builder setTensorflowGitVersion(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             tensorflowGitVersion_ = value;
    +        bitField0_ |= 0x00000020;
             onChanged();
             return this;
           }
    @@ -2156,8 +2161,8 @@ public Builder setTensorflowGitVersion(
            * @return This builder for chaining.
            */
           public Builder clearTensorflowGitVersion() {
    -        
             tensorflowGitVersion_ = getDefaultInstance().getTensorflowGitVersion();
    +        bitField0_ = (bitField0_ & ~0x00000020);
             onChanged();
             return this;
           }
    @@ -2174,12 +2179,10 @@ public Builder clearTensorflowGitVersion() {
            */
           public Builder setTensorflowGitVersionBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             tensorflowGitVersion_ = value;
    +        bitField0_ |= 0x00000020;
             onChanged();
             return this;
           }
    @@ -2209,8 +2212,9 @@ public boolean getStrippedDefaultAttrs() {
            * @return This builder for chaining.
            */
           public Builder setStrippedDefaultAttrs(boolean value) {
    -        
    +
             strippedDefaultAttrs_ = value;
    +        bitField0_ |= 0x00000040;
             onChanged();
             return this;
           }
    @@ -2224,7 +2228,7 @@ public Builder setStrippedDefaultAttrs(boolean value) {
            * @return This builder for chaining.
            */
           public Builder clearStrippedDefaultAttrs() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000040);
             strippedDefaultAttrs_ = false;
             onChanged();
             return this;
    @@ -2233,7 +2237,7 @@ public Builder clearStrippedDefaultAttrs() {
           private com.google.protobuf.MapField<
               java.lang.String, java.lang.String> functionAliases_;
           private com.google.protobuf.MapField
    -      internalGetFunctionAliases() {
    +          internalGetFunctionAliases() {
             if (functionAliases_ == null) {
               return com.google.protobuf.MapField.emptyMapField(
                   FunctionAliasesDefaultEntryHolder.defaultEntry);
    @@ -2241,8 +2245,7 @@ public Builder clearStrippedDefaultAttrs() {
             return functionAliases_;
           }
           private com.google.protobuf.MapField
    -      internalGetMutableFunctionAliases() {
    -        onChanged();;
    +          internalGetMutableFunctionAliases() {
             if (functionAliases_ == null) {
               functionAliases_ = com.google.protobuf.MapField.newMapField(
                   FunctionAliasesDefaultEntryHolder.defaultEntry);
    @@ -2250,9 +2253,10 @@ public Builder clearStrippedDefaultAttrs() {
             if (!functionAliases_.isMutable()) {
               functionAliases_ = functionAliases_.copy();
             }
    +        bitField0_ |= 0x00000080;
    +        onChanged();
             return functionAliases_;
           }
    -
           public int getFunctionAliasesCount() {
             return internalGetFunctionAliases().getMap().size();
           }
    @@ -2263,7 +2267,6 @@ public int getFunctionAliasesCount() {
            *
            * map<string, string> function_aliases = 8;
            */
    -
           @java.lang.Override
           public boolean containsFunctionAliases(
               java.lang.String key) {
    @@ -2286,7 +2289,6 @@ public java.util.Map getFunctionAliases() {
            * map<string, string> function_aliases = 8;
            */
           @java.lang.Override
    -
           public java.util.Map getFunctionAliasesMap() {
             return internalGetFunctionAliases().getMap();
           }
    @@ -2298,10 +2300,11 @@ public java.util.Map getFunctionAliasesMap()
            * map<string, string> function_aliases = 8;
            */
           @java.lang.Override
    -
    -      public java.lang.String getFunctionAliasesOrDefault(
    +      public /* nullable */
    +java.lang.String getFunctionAliasesOrDefault(
               java.lang.String key,
    -          java.lang.String defaultValue) {
    +          /* nullable */
    +java.lang.String defaultValue) {
             if (key == null) { throw new NullPointerException("map key"); }
             java.util.Map map =
                 internalGetFunctionAliases().getMap();
    @@ -2315,7 +2318,6 @@ public java.lang.String getFunctionAliasesOrDefault(
            * map<string, string> function_aliases = 8;
            */
           @java.lang.Override
    -
           public java.lang.String getFunctionAliasesOrThrow(
               java.lang.String key) {
             if (key == null) { throw new NullPointerException("map key"); }
    @@ -2326,8 +2328,8 @@ public java.lang.String getFunctionAliasesOrThrow(
             }
             return map.get(key);
           }
    -
           public Builder clearFunctionAliases() {
    +        bitField0_ = (bitField0_ & ~0x00000080);
             internalGetMutableFunctionAliases().getMutableMap()
                 .clear();
             return this;
    @@ -2339,7 +2341,6 @@ public Builder clearFunctionAliases() {
            *
            * map<string, string> function_aliases = 8;
            */
    -
           public Builder removeFunctionAliases(
               java.lang.String key) {
             if (key == null) { throw new NullPointerException("map key"); }
    @@ -2352,7 +2353,8 @@ public Builder removeFunctionAliases(
            */
           @java.lang.Deprecated
           public java.util.Map
    -      getMutableFunctionAliases() {
    +          getMutableFunctionAliases() {
    +        bitField0_ |= 0x00000080;
             return internalGetMutableFunctionAliases().getMutableMap();
           }
           /**
    @@ -2366,12 +2368,10 @@ public Builder putFunctionAliases(
               java.lang.String key,
               java.lang.String value) {
             if (key == null) { throw new NullPointerException("map key"); }
    -        if (value == null) {
    -  throw new NullPointerException("map value");
    -}
    -
    +        if (value == null) { throw new NullPointerException("map value"); }
             internalGetMutableFunctionAliases().getMutableMap()
                 .put(key, value);
    +        bitField0_ |= 0x00000080;
             return this;
           }
           /**
    @@ -2381,25 +2381,13 @@ public Builder putFunctionAliases(
            *
            * map<string, string> function_aliases = 8;
            */
    -
           public Builder putAllFunctionAliases(
               java.util.Map values) {
             internalGetMutableFunctionAliases().getMutableMap()
                 .putAll(values);
    +        bitField0_ |= 0x00000080;
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.MetaGraphDef.MetaInfoDef)
         }
    @@ -2452,6 +2440,7 @@ public org.tensorflow.proto.MetaGraphDef.MetaInfoDef getDefaultInstanceForType()
     
       }
     
    +  private int bitField0_;
       public static final int META_INFO_DEF_FIELD_NUMBER = 1;
       private org.tensorflow.proto.MetaGraphDef.MetaInfoDef metaInfoDef_;
       /**
    @@ -2460,7 +2449,7 @@ public org.tensorflow.proto.MetaGraphDef.MetaInfoDef getDefaultInstanceForType()
        */
       @java.lang.Override
       public boolean hasMetaInfoDef() {
    -    return metaInfoDef_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * .tensorflow.MetaGraphDef.MetaInfoDef meta_info_def = 1;
    @@ -2475,7 +2464,7 @@ public org.tensorflow.proto.MetaGraphDef.MetaInfoDef getMetaInfoDef() {
        */
       @java.lang.Override
       public org.tensorflow.proto.MetaGraphDef.MetaInfoDefOrBuilder getMetaInfoDefOrBuilder() {
    -    return getMetaInfoDef();
    +    return metaInfoDef_ == null ? org.tensorflow.proto.MetaGraphDef.MetaInfoDef.getDefaultInstance() : metaInfoDef_;
       }
     
       public static final int GRAPH_DEF_FIELD_NUMBER = 2;
    @@ -2490,7 +2479,7 @@ public org.tensorflow.proto.MetaGraphDef.MetaInfoDefOrBuilder getMetaInfoDefOrBu
        */
       @java.lang.Override
       public boolean hasGraphDef() {
    -    return graphDef_ != null;
    +    return ((bitField0_ & 0x00000002) != 0);
       }
       /**
        * 
    @@ -2513,7 +2502,7 @@ public org.tensorflow.proto.GraphDef getGraphDef() {
        */
       @java.lang.Override
       public org.tensorflow.proto.GraphDefOrBuilder getGraphDefOrBuilder() {
    -    return getGraphDef();
    +    return graphDef_ == null ? org.tensorflow.proto.GraphDef.getDefaultInstance() : graphDef_;
       }
     
       public static final int SAVER_DEF_FIELD_NUMBER = 3;
    @@ -2528,7 +2517,7 @@ public org.tensorflow.proto.GraphDefOrBuilder getGraphDefOrBuilder() {
        */
       @java.lang.Override
       public boolean hasSaverDef() {
    -    return saverDef_ != null;
    +    return ((bitField0_ & 0x00000004) != 0);
       }
       /**
        * 
    @@ -2551,7 +2540,7 @@ public org.tensorflow.proto.SaverDef getSaverDef() {
        */
       @java.lang.Override
       public org.tensorflow.proto.SaverDefOrBuilder getSaverDefOrBuilder() {
    -    return getSaverDef();
    +    return saverDef_ == null ? org.tensorflow.proto.SaverDef.getDefaultInstance() : saverDef_;
       }
     
       public static final int COLLECTION_DEF_FIELD_NUMBER = 4;
    @@ -2566,6 +2555,7 @@ private static final class CollectionDefDefaultEntryHolder {
                     com.google.protobuf.WireFormat.FieldType.MESSAGE,
                     org.tensorflow.proto.CollectionDef.getDefaultInstance());
       }
    +  @SuppressWarnings("serial")
       private com.google.protobuf.MapField<
           java.lang.String, org.tensorflow.proto.CollectionDef> collectionDef_;
       private com.google.protobuf.MapField
    @@ -2576,7 +2566,6 @@ private static final class CollectionDefDefaultEntryHolder {
         }
         return collectionDef_;
       }
    -
       public int getCollectionDefCount() {
         return internalGetCollectionDef().getMap().size();
       }
    @@ -2588,7 +2577,6 @@ public int getCollectionDefCount() {
        *
        * map<string, .tensorflow.CollectionDef> collection_def = 4;
        */
    -
       @java.lang.Override
       public boolean containsCollectionDef(
           java.lang.String key) {
    @@ -2612,7 +2600,6 @@ public java.util.Map getCo
        * map<string, .tensorflow.CollectionDef> collection_def = 4;
        */
       @java.lang.Override
    -
       public java.util.Map getCollectionDefMap() {
         return internalGetCollectionDef().getMap();
       }
    @@ -2625,10 +2612,11 @@ public java.util.Map getCo
        * map<string, .tensorflow.CollectionDef> collection_def = 4;
        */
       @java.lang.Override
    -
    -  public org.tensorflow.proto.CollectionDef getCollectionDefOrDefault(
    +  public /* nullable */
    +org.tensorflow.proto.CollectionDef getCollectionDefOrDefault(
           java.lang.String key,
    -      org.tensorflow.proto.CollectionDef defaultValue) {
    +      /* nullable */
    +org.tensorflow.proto.CollectionDef defaultValue) {
         if (key == null) { throw new NullPointerException("map key"); }
         java.util.Map map =
             internalGetCollectionDef().getMap();
    @@ -2643,7 +2631,6 @@ public org.tensorflow.proto.CollectionDef getCollectionDefOrDefault(
        * map<string, .tensorflow.CollectionDef> collection_def = 4;
        */
       @java.lang.Override
    -
       public org.tensorflow.proto.CollectionDef getCollectionDefOrThrow(
           java.lang.String key) {
         if (key == null) { throw new NullPointerException("map key"); }
    @@ -2667,6 +2654,7 @@ private static final class SignatureDefDefaultEntryHolder {
                     com.google.protobuf.WireFormat.FieldType.MESSAGE,
                     org.tensorflow.proto.SignatureDef.getDefaultInstance());
       }
    +  @SuppressWarnings("serial")
       private com.google.protobuf.MapField<
           java.lang.String, org.tensorflow.proto.SignatureDef> signatureDef_;
       private com.google.protobuf.MapField
    @@ -2677,7 +2665,6 @@ private static final class SignatureDefDefaultEntryHolder {
         }
         return signatureDef_;
       }
    -
       public int getSignatureDefCount() {
         return internalGetSignatureDef().getMap().size();
       }
    @@ -2689,7 +2676,6 @@ public int getSignatureDefCount() {
        *
        * map<string, .tensorflow.SignatureDef> signature_def = 5;
        */
    -
       @java.lang.Override
       public boolean containsSignatureDef(
           java.lang.String key) {
    @@ -2713,7 +2699,6 @@ public java.util.Map getSig
        * map<string, .tensorflow.SignatureDef> signature_def = 5;
        */
       @java.lang.Override
    -
       public java.util.Map getSignatureDefMap() {
         return internalGetSignatureDef().getMap();
       }
    @@ -2726,10 +2711,11 @@ public java.util.Map getSig
        * map<string, .tensorflow.SignatureDef> signature_def = 5;
        */
       @java.lang.Override
    -
    -  public org.tensorflow.proto.SignatureDef getSignatureDefOrDefault(
    +  public /* nullable */
    +org.tensorflow.proto.SignatureDef getSignatureDefOrDefault(
           java.lang.String key,
    -      org.tensorflow.proto.SignatureDef defaultValue) {
    +      /* nullable */
    +org.tensorflow.proto.SignatureDef defaultValue) {
         if (key == null) { throw new NullPointerException("map key"); }
         java.util.Map map =
             internalGetSignatureDef().getMap();
    @@ -2744,7 +2730,6 @@ public org.tensorflow.proto.SignatureDef getSignatureDefOrDefault(
        * map<string, .tensorflow.SignatureDef> signature_def = 5;
        */
       @java.lang.Override
    -
       public org.tensorflow.proto.SignatureDef getSignatureDefOrThrow(
           java.lang.String key) {
         if (key == null) { throw new NullPointerException("map key"); }
    @@ -2757,6 +2742,7 @@ public org.tensorflow.proto.SignatureDef getSignatureDefOrThrow(
       }
     
       public static final int ASSET_FILE_DEF_FIELD_NUMBER = 6;
    +  @SuppressWarnings("serial")
       private java.util.List assetFileDef_;
       /**
        * 
    @@ -2828,7 +2814,7 @@ public org.tensorflow.proto.AssetFileDefOrBuilder getAssetFileDefOrBuilder(
        */
       @java.lang.Override
       public boolean hasObjectGraphDef() {
    -    return objectGraphDef_ != null;
    +    return ((bitField0_ & 0x00000008) != 0);
       }
       /**
        * 
    @@ -2851,7 +2837,7 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraph getObjec
        */
       @java.lang.Override
       public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraphOrBuilder getObjectGraphDefOrBuilder() {
    -    return getObjectGraphDef();
    +    return objectGraphDef_ == null ? org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraph.getDefaultInstance() : objectGraphDef_;
       }
     
       private byte memoizedIsInitialized = -1;
    @@ -2868,22 +2854,22 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (metaInfoDef_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(1, getMetaInfoDef());
         }
    -    if (graphDef_ != null) {
    +    if (((bitField0_ & 0x00000002) != 0)) {
           output.writeMessage(2, getGraphDef());
         }
    -    if (saverDef_ != null) {
    +    if (((bitField0_ & 0x00000004) != 0)) {
           output.writeMessage(3, getSaverDef());
         }
    -    com.google.protobuf.GeneratedMessageV3
    +    com.google.protobuf.GeneratedMessage
           .serializeStringMapTo(
             output,
             internalGetCollectionDef(),
             CollectionDefDefaultEntryHolder.defaultEntry,
             4);
    -    com.google.protobuf.GeneratedMessageV3
    +    com.google.protobuf.GeneratedMessage
           .serializeStringMapTo(
             output,
             internalGetSignatureDef(),
    @@ -2892,7 +2878,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         for (int i = 0; i < assetFileDef_.size(); i++) {
           output.writeMessage(6, assetFileDef_.get(i));
         }
    -    if (objectGraphDef_ != null) {
    +    if (((bitField0_ & 0x00000008) != 0)) {
           output.writeMessage(7, getObjectGraphDef());
         }
         getUnknownFields().writeTo(output);
    @@ -2904,15 +2890,15 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (metaInfoDef_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(1, getMetaInfoDef());
         }
    -    if (graphDef_ != null) {
    +    if (((bitField0_ & 0x00000002) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(2, getGraphDef());
         }
    -    if (saverDef_ != null) {
    +    if (((bitField0_ & 0x00000004) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(3, getSaverDef());
         }
    @@ -2940,7 +2926,7 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(6, assetFileDef_.get(i));
         }
    -    if (objectGraphDef_ != null) {
    +    if (((bitField0_ & 0x00000008) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(7, getObjectGraphDef());
         }
    @@ -3063,39 +3049,41 @@ public static org.tensorflow.proto.MetaGraphDef parseFrom(
       }
       public static org.tensorflow.proto.MetaGraphDef parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.MetaGraphDef parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.MetaGraphDef parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.MetaGraphDef parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.MetaGraphDef parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.MetaGraphDef parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -3115,7 +3103,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -3126,18 +3114,18 @@ protected Builder newBuilderForType(
        * objects necessary for running computation in a graph when crossing the
        * process boundary. It can be used for long term storage of graphs,
        * cross-language execution of graphs, etc.
    -   *   MetaInfoDef
    -   *   GraphDef
    -   *   SaverDef
    -   *   CollectionDef
    -   *   TensorInfo
    -   *   SignatureDef
    +   * MetaInfoDef
    +   * GraphDef
    +   * SaverDef
    +   * CollectionDef
    +   * TensorInfo
    +   * SignatureDef
        * 
    * * Protobuf type {@code tensorflow.MetaGraphDef} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.MetaGraphDef) org.tensorflow.proto.MetaGraphDefOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -3146,7 +3134,7 @@ public static final class Builder extends } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 4: @@ -3159,7 +3147,7 @@ protected com.google.protobuf.MapField internalGetMapField( } } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( int number) { switch (number) { case 4: @@ -3172,7 +3160,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField( } } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.MetaGraphProtos.internal_static_tensorflow_MetaGraphDef_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -3181,33 +3169,41 @@ protected com.google.protobuf.MapField internalGetMutableMapField( // Construct using org.tensorflow.proto.MetaGraphDef.newBuilder() private Builder() { - + maybeForceBuilderInitialization(); } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getMetaInfoDefFieldBuilder(); + getGraphDefFieldBuilder(); + getSaverDefFieldBuilder(); + getAssetFileDefFieldBuilder(); + getObjectGraphDefFieldBuilder(); + } } @java.lang.Override public Builder clear() { super.clear(); - if (metaInfoDefBuilder_ == null) { - metaInfoDef_ = null; - } else { - metaInfoDef_ = null; + bitField0_ = 0; + metaInfoDef_ = null; + if (metaInfoDefBuilder_ != null) { + metaInfoDefBuilder_.dispose(); metaInfoDefBuilder_ = null; } - if (graphDefBuilder_ == null) { - graphDef_ = null; - } else { - graphDef_ = null; + graphDef_ = null; + if (graphDefBuilder_ != null) { + graphDefBuilder_.dispose(); graphDefBuilder_ = null; } - if (saverDefBuilder_ == null) { - saverDef_ = null; - } else { - saverDef_ = null; + saverDef_ = null; + if (saverDefBuilder_ != null) { + saverDefBuilder_.dispose(); saverDefBuilder_ = null; } internalGetMutableCollectionDef().clear(); @@ -3218,11 +3214,10 @@ public Builder clear() { assetFileDef_ = null; assetFileDefBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000004); - if (objectGraphDefBuilder_ == null) { - objectGraphDef_ = null; - } else { - objectGraphDef_ = null; + bitField0_ = (bitField0_ & ~0x00000020); + objectGraphDef_ = null; + if (objectGraphDefBuilder_ != null) { + objectGraphDefBuilder_.dispose(); objectGraphDefBuilder_ = null; } return this; @@ -3251,76 +3246,60 @@ public org.tensorflow.proto.MetaGraphDef build() { @java.lang.Override public org.tensorflow.proto.MetaGraphDef buildPartial() { org.tensorflow.proto.MetaGraphDef result = new org.tensorflow.proto.MetaGraphDef(this); - int from_bitField0_ = bitField0_; - if (metaInfoDefBuilder_ == null) { - result.metaInfoDef_ = metaInfoDef_; - } else { - result.metaInfoDef_ = metaInfoDefBuilder_.build(); - } - if (graphDefBuilder_ == null) { - result.graphDef_ = graphDef_; - } else { - result.graphDef_ = graphDefBuilder_.build(); - } - if (saverDefBuilder_ == null) { - result.saverDef_ = saverDef_; - } else { - result.saverDef_ = saverDefBuilder_.build(); - } - result.collectionDef_ = internalGetCollectionDef(); - result.collectionDef_.makeImmutable(); - result.signatureDef_ = internalGetSignatureDef(); - result.signatureDef_.makeImmutable(); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(org.tensorflow.proto.MetaGraphDef result) { if (assetFileDefBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { + if (((bitField0_ & 0x00000020) != 0)) { assetFileDef_ = java.util.Collections.unmodifiableList(assetFileDef_); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000020); } result.assetFileDef_ = assetFileDef_; } else { result.assetFileDef_ = assetFileDefBuilder_.build(); } - if (objectGraphDefBuilder_ == null) { - result.objectGraphDef_ = objectGraphDef_; - } else { - result.objectGraphDef_ = objectGraphDefBuilder_.build(); - } - onBuilt(); - return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.MetaGraphDef result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.metaInfoDef_ = metaInfoDefBuilder_ == null + ? metaInfoDef_ + : metaInfoDefBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.graphDef_ = graphDefBuilder_ == null + ? graphDef_ + : graphDefBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.saverDef_ = saverDefBuilder_ == null + ? saverDef_ + : saverDefBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.collectionDef_ = internalGetCollectionDef().build(CollectionDefDefaultEntryHolder.defaultEntry); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.signatureDef_ = internalGetSignatureDef().build(SignatureDefDefaultEntryHolder.defaultEntry); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.objectGraphDef_ = objectGraphDefBuilder_ == null + ? objectGraphDef_ + : objectGraphDefBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + result.bitField0_ |= to_bitField0_; } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.MetaGraphDef) { @@ -3344,13 +3323,15 @@ public Builder mergeFrom(org.tensorflow.proto.MetaGraphDef other) { } internalGetMutableCollectionDef().mergeFrom( other.internalGetCollectionDef()); + bitField0_ |= 0x00000008; internalGetMutableSignatureDef().mergeFrom( other.internalGetSignatureDef()); + bitField0_ |= 0x00000010; if (assetFileDefBuilder_ == null) { if (!other.assetFileDef_.isEmpty()) { if (assetFileDef_.isEmpty()) { assetFileDef_ = other.assetFileDef_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000020); } else { ensureAssetFileDefIsMutable(); assetFileDef_.addAll(other.assetFileDef_); @@ -3363,9 +3344,9 @@ public Builder mergeFrom(org.tensorflow.proto.MetaGraphDef other) { assetFileDefBuilder_.dispose(); assetFileDefBuilder_ = null; assetFileDef_ = other.assetFileDef_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000020); assetFileDefBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getAssetFileDefFieldBuilder() : null; } else { assetFileDefBuilder_.addAllMessages(other.assetFileDef_); @@ -3405,37 +3386,39 @@ public Builder mergeFrom( input.readMessage( getMetaInfoDefFieldBuilder().getBuilder(), extensionRegistry); - + bitField0_ |= 0x00000001; break; } // case 10 case 18: { input.readMessage( getGraphDefFieldBuilder().getBuilder(), extensionRegistry); - + bitField0_ |= 0x00000002; break; } // case 18 case 26: { input.readMessage( getSaverDefFieldBuilder().getBuilder(), extensionRegistry); - + bitField0_ |= 0x00000004; break; } // case 26 case 34: { com.google.protobuf.MapEntry collectionDef__ = input.readMessage( CollectionDefDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableCollectionDef().getMutableMap().put( + internalGetMutableCollectionDef().ensureBuilderMap().put( collectionDef__.getKey(), collectionDef__.getValue()); + bitField0_ |= 0x00000008; break; } // case 34 case 42: { com.google.protobuf.MapEntry signatureDef__ = input.readMessage( SignatureDefDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableSignatureDef().getMutableMap().put( + internalGetMutableSignatureDef().ensureBuilderMap().put( signatureDef__.getKey(), signatureDef__.getValue()); + bitField0_ |= 0x00000010; break; } // case 42 case 50: { @@ -3455,7 +3438,7 @@ public Builder mergeFrom( input.readMessage( getObjectGraphDefFieldBuilder().getBuilder(), extensionRegistry); - + bitField0_ |= 0x00000040; break; } // case 58 default: { @@ -3476,14 +3459,14 @@ public Builder mergeFrom( private int bitField0_; private org.tensorflow.proto.MetaGraphDef.MetaInfoDef metaInfoDef_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.MetaGraphDef.MetaInfoDef, org.tensorflow.proto.MetaGraphDef.MetaInfoDef.Builder, org.tensorflow.proto.MetaGraphDef.MetaInfoDefOrBuilder> metaInfoDefBuilder_; /** * .tensorflow.MetaGraphDef.MetaInfoDef meta_info_def = 1; * @return Whether the metaInfoDef field is set. */ public boolean hasMetaInfoDef() { - return metaInfoDefBuilder_ != null || metaInfoDef_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * .tensorflow.MetaGraphDef.MetaInfoDef meta_info_def = 1; @@ -3505,11 +3488,11 @@ public Builder setMetaInfoDef(org.tensorflow.proto.MetaGraphDef.MetaInfoDef valu throw new NullPointerException(); } metaInfoDef_ = value; - onChanged(); } else { metaInfoDefBuilder_.setMessage(value); } - + bitField0_ |= 0x00000001; + onChanged(); return this; } /** @@ -3519,11 +3502,11 @@ public Builder setMetaInfoDef( org.tensorflow.proto.MetaGraphDef.MetaInfoDef.Builder builderForValue) { if (metaInfoDefBuilder_ == null) { metaInfoDef_ = builderForValue.build(); - onChanged(); } else { metaInfoDefBuilder_.setMessage(builderForValue.build()); } - + bitField0_ |= 0x00000001; + onChanged(); return this; } /** @@ -3531,38 +3514,40 @@ public Builder setMetaInfoDef( */ public Builder mergeMetaInfoDef(org.tensorflow.proto.MetaGraphDef.MetaInfoDef value) { if (metaInfoDefBuilder_ == null) { - if (metaInfoDef_ != null) { - metaInfoDef_ = - org.tensorflow.proto.MetaGraphDef.MetaInfoDef.newBuilder(metaInfoDef_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && + metaInfoDef_ != null && + metaInfoDef_ != org.tensorflow.proto.MetaGraphDef.MetaInfoDef.getDefaultInstance()) { + getMetaInfoDefBuilder().mergeFrom(value); } else { metaInfoDef_ = value; } - onChanged(); } else { metaInfoDefBuilder_.mergeFrom(value); } - + if (metaInfoDef_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } return this; } /** * .tensorflow.MetaGraphDef.MetaInfoDef meta_info_def = 1; */ public Builder clearMetaInfoDef() { - if (metaInfoDefBuilder_ == null) { - metaInfoDef_ = null; - onChanged(); - } else { - metaInfoDef_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + metaInfoDef_ = null; + if (metaInfoDefBuilder_ != null) { + metaInfoDefBuilder_.dispose(); metaInfoDefBuilder_ = null; } - + onChanged(); return this; } /** * .tensorflow.MetaGraphDef.MetaInfoDef meta_info_def = 1; */ public org.tensorflow.proto.MetaGraphDef.MetaInfoDef.Builder getMetaInfoDefBuilder() { - + bitField0_ |= 0x00000001; onChanged(); return getMetaInfoDefFieldBuilder().getBuilder(); } @@ -3580,11 +3565,11 @@ public org.tensorflow.proto.MetaGraphDef.MetaInfoDefOrBuilder getMetaInfoDefOrBu /** * .tensorflow.MetaGraphDef.MetaInfoDef meta_info_def = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.MetaGraphDef.MetaInfoDef, org.tensorflow.proto.MetaGraphDef.MetaInfoDef.Builder, org.tensorflow.proto.MetaGraphDef.MetaInfoDefOrBuilder> getMetaInfoDefFieldBuilder() { if (metaInfoDefBuilder_ == null) { - metaInfoDefBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + metaInfoDefBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.MetaGraphDef.MetaInfoDef, org.tensorflow.proto.MetaGraphDef.MetaInfoDef.Builder, org.tensorflow.proto.MetaGraphDef.MetaInfoDefOrBuilder>( getMetaInfoDef(), getParentForChildren(), @@ -3595,7 +3580,7 @@ public org.tensorflow.proto.MetaGraphDef.MetaInfoDefOrBuilder getMetaInfoDefOrBu } private org.tensorflow.proto.GraphDef graphDef_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.GraphDef, org.tensorflow.proto.GraphDef.Builder, org.tensorflow.proto.GraphDefOrBuilder> graphDefBuilder_; /** *
    @@ -3606,7 +3591,7 @@ public org.tensorflow.proto.MetaGraphDef.MetaInfoDefOrBuilder getMetaInfoDefOrBu
          * @return Whether the graphDef field is set.
          */
         public boolean hasGraphDef() {
    -      return graphDefBuilder_ != null || graphDef_ != null;
    +      return ((bitField0_ & 0x00000002) != 0);
         }
         /**
          * 
    @@ -3636,11 +3621,11 @@ public Builder setGraphDef(org.tensorflow.proto.GraphDef value) {
               throw new NullPointerException();
             }
             graphDef_ = value;
    -        onChanged();
           } else {
             graphDefBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return this;
         }
         /**
    @@ -3654,11 +3639,11 @@ public Builder setGraphDef(
             org.tensorflow.proto.GraphDef.Builder builderForValue) {
           if (graphDefBuilder_ == null) {
             graphDef_ = builderForValue.build();
    -        onChanged();
           } else {
             graphDefBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return this;
         }
         /**
    @@ -3670,17 +3655,20 @@ public Builder setGraphDef(
          */
         public Builder mergeGraphDef(org.tensorflow.proto.GraphDef value) {
           if (graphDefBuilder_ == null) {
    -        if (graphDef_ != null) {
    -          graphDef_ =
    -            org.tensorflow.proto.GraphDef.newBuilder(graphDef_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000002) != 0) &&
    +          graphDef_ != null &&
    +          graphDef_ != org.tensorflow.proto.GraphDef.getDefaultInstance()) {
    +          getGraphDefBuilder().mergeFrom(value);
             } else {
               graphDef_ = value;
             }
    -        onChanged();
           } else {
             graphDefBuilder_.mergeFrom(value);
           }
    -
    +      if (graphDef_ != null) {
    +        bitField0_ |= 0x00000002;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -3691,14 +3679,13 @@ public Builder mergeGraphDef(org.tensorflow.proto.GraphDef value) {
          * .tensorflow.GraphDef graph_def = 2;
          */
         public Builder clearGraphDef() {
    -      if (graphDefBuilder_ == null) {
    -        graphDef_ = null;
    -        onChanged();
    -      } else {
    -        graphDef_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000002);
    +      graphDef_ = null;
    +      if (graphDefBuilder_ != null) {
    +        graphDefBuilder_.dispose();
             graphDefBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -3709,7 +3696,7 @@ public Builder clearGraphDef() {
          * .tensorflow.GraphDef graph_def = 2;
          */
         public org.tensorflow.proto.GraphDef.Builder getGraphDefBuilder() {
    -      
    +      bitField0_ |= 0x00000002;
           onChanged();
           return getGraphDefFieldBuilder().getBuilder();
         }
    @@ -3735,11 +3722,11 @@ public org.tensorflow.proto.GraphDefOrBuilder getGraphDefOrBuilder() {
          *
          * .tensorflow.GraphDef graph_def = 2;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.GraphDef, org.tensorflow.proto.GraphDef.Builder, org.tensorflow.proto.GraphDefOrBuilder> 
             getGraphDefFieldBuilder() {
           if (graphDefBuilder_ == null) {
    -        graphDefBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        graphDefBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.GraphDef, org.tensorflow.proto.GraphDef.Builder, org.tensorflow.proto.GraphDefOrBuilder>(
                     getGraphDef(),
                     getParentForChildren(),
    @@ -3750,7 +3737,7 @@ public org.tensorflow.proto.GraphDefOrBuilder getGraphDefOrBuilder() {
         }
     
         private org.tensorflow.proto.SaverDef saverDef_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.SaverDef, org.tensorflow.proto.SaverDef.Builder, org.tensorflow.proto.SaverDefOrBuilder> saverDefBuilder_;
         /**
          * 
    @@ -3761,7 +3748,7 @@ public org.tensorflow.proto.GraphDefOrBuilder getGraphDefOrBuilder() {
          * @return Whether the saverDef field is set.
          */
         public boolean hasSaverDef() {
    -      return saverDefBuilder_ != null || saverDef_ != null;
    +      return ((bitField0_ & 0x00000004) != 0);
         }
         /**
          * 
    @@ -3791,11 +3778,11 @@ public Builder setSaverDef(org.tensorflow.proto.SaverDef value) {
               throw new NullPointerException();
             }
             saverDef_ = value;
    -        onChanged();
           } else {
             saverDefBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000004;
    +      onChanged();
           return this;
         }
         /**
    @@ -3809,11 +3796,11 @@ public Builder setSaverDef(
             org.tensorflow.proto.SaverDef.Builder builderForValue) {
           if (saverDefBuilder_ == null) {
             saverDef_ = builderForValue.build();
    -        onChanged();
           } else {
             saverDefBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000004;
    +      onChanged();
           return this;
         }
         /**
    @@ -3825,17 +3812,20 @@ public Builder setSaverDef(
          */
         public Builder mergeSaverDef(org.tensorflow.proto.SaverDef value) {
           if (saverDefBuilder_ == null) {
    -        if (saverDef_ != null) {
    -          saverDef_ =
    -            org.tensorflow.proto.SaverDef.newBuilder(saverDef_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000004) != 0) &&
    +          saverDef_ != null &&
    +          saverDef_ != org.tensorflow.proto.SaverDef.getDefaultInstance()) {
    +          getSaverDefBuilder().mergeFrom(value);
             } else {
               saverDef_ = value;
             }
    -        onChanged();
           } else {
             saverDefBuilder_.mergeFrom(value);
           }
    -
    +      if (saverDef_ != null) {
    +        bitField0_ |= 0x00000004;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -3846,14 +3836,13 @@ public Builder mergeSaverDef(org.tensorflow.proto.SaverDef value) {
          * .tensorflow.SaverDef saver_def = 3;
          */
         public Builder clearSaverDef() {
    -      if (saverDefBuilder_ == null) {
    -        saverDef_ = null;
    -        onChanged();
    -      } else {
    -        saverDef_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000004);
    +      saverDef_ = null;
    +      if (saverDefBuilder_ != null) {
    +        saverDefBuilder_.dispose();
             saverDefBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -3864,7 +3853,7 @@ public Builder clearSaverDef() {
          * .tensorflow.SaverDef saver_def = 3;
          */
         public org.tensorflow.proto.SaverDef.Builder getSaverDefBuilder() {
    -      
    +      bitField0_ |= 0x00000004;
           onChanged();
           return getSaverDefFieldBuilder().getBuilder();
         }
    @@ -3890,11 +3879,11 @@ public org.tensorflow.proto.SaverDefOrBuilder getSaverDefOrBuilder() {
          *
          * .tensorflow.SaverDef saver_def = 3;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.SaverDef, org.tensorflow.proto.SaverDef.Builder, org.tensorflow.proto.SaverDefOrBuilder> 
             getSaverDefFieldBuilder() {
           if (saverDefBuilder_ == null) {
    -        saverDefBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        saverDefBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.SaverDef, org.tensorflow.proto.SaverDef.Builder, org.tensorflow.proto.SaverDefOrBuilder>(
                     getSaverDef(),
                     getParentForChildren(),
    @@ -3904,31 +3893,40 @@ public org.tensorflow.proto.SaverDefOrBuilder getSaverDefOrBuilder() {
           return saverDefBuilder_;
         }
     
    -    private com.google.protobuf.MapField<
    -        java.lang.String, org.tensorflow.proto.CollectionDef> collectionDef_;
    -    private com.google.protobuf.MapField
    -    internalGetCollectionDef() {
    +    private static final class CollectionDefConverter implements com.google.protobuf.MapFieldBuilder.Converter {
    +      @java.lang.Override
    +      public org.tensorflow.proto.CollectionDef build(org.tensorflow.proto.CollectionDefOrBuilder val) {
    +        if (val instanceof org.tensorflow.proto.CollectionDef) { return (org.tensorflow.proto.CollectionDef) val; }
    +        return ((org.tensorflow.proto.CollectionDef.Builder) val).build();
    +      }
    +
    +      @java.lang.Override
    +      public com.google.protobuf.MapEntry defaultEntry() {
    +        return CollectionDefDefaultEntryHolder.defaultEntry;
    +      }
    +    };
    +    private static final CollectionDefConverter collectionDefConverter = new CollectionDefConverter();
    +
    +    private com.google.protobuf.MapFieldBuilder<
    +        java.lang.String, org.tensorflow.proto.CollectionDefOrBuilder, org.tensorflow.proto.CollectionDef, org.tensorflow.proto.CollectionDef.Builder> collectionDef_;
    +    private com.google.protobuf.MapFieldBuilder
    +        internalGetCollectionDef() {
           if (collectionDef_ == null) {
    -        return com.google.protobuf.MapField.emptyMapField(
    -            CollectionDefDefaultEntryHolder.defaultEntry);
    +        return new com.google.protobuf.MapFieldBuilder<>(collectionDefConverter);
           }
           return collectionDef_;
         }
    -    private com.google.protobuf.MapField
    -    internalGetMutableCollectionDef() {
    -      onChanged();;
    +    private com.google.protobuf.MapFieldBuilder
    +        internalGetMutableCollectionDef() {
           if (collectionDef_ == null) {
    -        collectionDef_ = com.google.protobuf.MapField.newMapField(
    -            CollectionDefDefaultEntryHolder.defaultEntry);
    -      }
    -      if (!collectionDef_.isMutable()) {
    -        collectionDef_ = collectionDef_.copy();
    +        collectionDef_ = new com.google.protobuf.MapFieldBuilder<>(collectionDefConverter);
           }
    +      bitField0_ |= 0x00000008;
    +      onChanged();
           return collectionDef_;
         }
    -
         public int getCollectionDefCount() {
    -      return internalGetCollectionDef().getMap().size();
    +      return internalGetCollectionDef().ensureBuilderMap().size();
         }
         /**
          * 
    @@ -3938,12 +3936,11 @@ public int getCollectionDefCount() {
          *
          * map<string, .tensorflow.CollectionDef> collection_def = 4;
          */
    -
         @java.lang.Override
         public boolean containsCollectionDef(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      return internalGetCollectionDef().getMap().containsKey(key);
    +      return internalGetCollectionDef().ensureBuilderMap().containsKey(key);
         }
         /**
          * Use {@link #getCollectionDefMap()} instead.
    @@ -3962,9 +3959,8 @@ public java.util.Map getCo
          * map<string, .tensorflow.CollectionDef> collection_def = 4;
          */
         @java.lang.Override
    -
         public java.util.Map getCollectionDefMap() {
    -      return internalGetCollectionDef().getMap();
    +      return internalGetCollectionDef().getImmutableMap();
         }
         /**
          * 
    @@ -3975,14 +3971,14 @@ public java.util.Map getCo
          * map<string, .tensorflow.CollectionDef> collection_def = 4;
          */
         @java.lang.Override
    -
    -    public org.tensorflow.proto.CollectionDef getCollectionDefOrDefault(
    +    public /* nullable */
    +org.tensorflow.proto.CollectionDef getCollectionDefOrDefault(
             java.lang.String key,
    -        org.tensorflow.proto.CollectionDef defaultValue) {
    +        /* nullable */
    +org.tensorflow.proto.CollectionDef defaultValue) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      java.util.Map map =
    -          internalGetCollectionDef().getMap();
    -      return map.containsKey(key) ? map.get(key) : defaultValue;
    +      java.util.Map map = internalGetMutableCollectionDef().ensureBuilderMap();
    +      return map.containsKey(key) ? collectionDefConverter.build(map.get(key)) : defaultValue;
         }
         /**
          * 
    @@ -3993,21 +3989,18 @@ public org.tensorflow.proto.CollectionDef getCollectionDefOrDefault(
          * map<string, .tensorflow.CollectionDef> collection_def = 4;
          */
         @java.lang.Override
    -
         public org.tensorflow.proto.CollectionDef getCollectionDefOrThrow(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      java.util.Map map =
    -          internalGetCollectionDef().getMap();
    +      java.util.Map map = internalGetMutableCollectionDef().ensureBuilderMap();
           if (!map.containsKey(key)) {
             throw new java.lang.IllegalArgumentException();
           }
    -      return map.get(key);
    +      return collectionDefConverter.build(map.get(key));
         }
    -
         public Builder clearCollectionDef() {
    -      internalGetMutableCollectionDef().getMutableMap()
    -          .clear();
    +      bitField0_ = (bitField0_ & ~0x00000008);
    +      internalGetMutableCollectionDef().clear();
           return this;
         }
         /**
    @@ -4018,11 +4011,10 @@ public Builder clearCollectionDef() {
          *
          * map<string, .tensorflow.CollectionDef> collection_def = 4;
          */
    -
         public Builder removeCollectionDef(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      internalGetMutableCollectionDef().getMutableMap()
    +      internalGetMutableCollectionDef().ensureBuilderMap()
               .remove(key);
           return this;
         }
    @@ -4031,8 +4023,9 @@ public Builder removeCollectionDef(
          */
         @java.lang.Deprecated
         public java.util.Map
    -    getMutableCollectionDef() {
    -      return internalGetMutableCollectionDef().getMutableMap();
    +        getMutableCollectionDef() {
    +      bitField0_ |= 0x00000008;
    +      return internalGetMutableCollectionDef().ensureMessageMap();
         }
         /**
          * 
    @@ -4046,12 +4039,10 @@ public Builder putCollectionDef(
             java.lang.String key,
             org.tensorflow.proto.CollectionDef value) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      if (value == null) {
    -  throw new NullPointerException("map value");
    -}
    -
    -      internalGetMutableCollectionDef().getMutableMap()
    +      if (value == null) { throw new NullPointerException("map value"); }
    +      internalGetMutableCollectionDef().ensureBuilderMap()
               .put(key, value);
    +      bitField0_ |= 0x00000008;
           return this;
         }
         /**
    @@ -4062,39 +4053,75 @@ public Builder putCollectionDef(
          *
          * map<string, .tensorflow.CollectionDef> collection_def = 4;
          */
    -
         public Builder putAllCollectionDef(
             java.util.Map values) {
    -      internalGetMutableCollectionDef().getMutableMap()
    +      for (java.util.Map.Entry e : values.entrySet()) {
    +        if (e.getKey() == null || e.getValue() == null) {
    +          throw new NullPointerException();
    +        }
    +      }
    +      internalGetMutableCollectionDef().ensureBuilderMap()
               .putAll(values);
    +      bitField0_ |= 0x00000008;
           return this;
         }
    +    /**
    +     * 
    +     * collection_def: Map from collection name to collections.
    +     * See CollectionDef section for details.
    +     * 
    + * + * map<string, .tensorflow.CollectionDef> collection_def = 4; + */ + public org.tensorflow.proto.CollectionDef.Builder putCollectionDefBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableCollectionDef().ensureBuilderMap(); + org.tensorflow.proto.CollectionDefOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = org.tensorflow.proto.CollectionDef.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof org.tensorflow.proto.CollectionDef) { + entry = ((org.tensorflow.proto.CollectionDef) entry).toBuilder(); + builderMap.put(key, entry); + } + return (org.tensorflow.proto.CollectionDef.Builder) entry; + } - private com.google.protobuf.MapField< - java.lang.String, org.tensorflow.proto.SignatureDef> signatureDef_; - private com.google.protobuf.MapField - internalGetSignatureDef() { + private static final class SignatureDefConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public org.tensorflow.proto.SignatureDef build(org.tensorflow.proto.SignatureDefOrBuilder val) { + if (val instanceof org.tensorflow.proto.SignatureDef) { return (org.tensorflow.proto.SignatureDef) val; } + return ((org.tensorflow.proto.SignatureDef.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return SignatureDefDefaultEntryHolder.defaultEntry; + } + }; + private static final SignatureDefConverter signatureDefConverter = new SignatureDefConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, org.tensorflow.proto.SignatureDefOrBuilder, org.tensorflow.proto.SignatureDef, org.tensorflow.proto.SignatureDef.Builder> signatureDef_; + private com.google.protobuf.MapFieldBuilder + internalGetSignatureDef() { if (signatureDef_ == null) { - return com.google.protobuf.MapField.emptyMapField( - SignatureDefDefaultEntryHolder.defaultEntry); + return new com.google.protobuf.MapFieldBuilder<>(signatureDefConverter); } return signatureDef_; } - private com.google.protobuf.MapField - internalGetMutableSignatureDef() { - onChanged();; + private com.google.protobuf.MapFieldBuilder + internalGetMutableSignatureDef() { if (signatureDef_ == null) { - signatureDef_ = com.google.protobuf.MapField.newMapField( - SignatureDefDefaultEntryHolder.defaultEntry); - } - if (!signatureDef_.isMutable()) { - signatureDef_ = signatureDef_.copy(); + signatureDef_ = new com.google.protobuf.MapFieldBuilder<>(signatureDefConverter); } + bitField0_ |= 0x00000010; + onChanged(); return signatureDef_; } - public int getSignatureDefCount() { - return internalGetSignatureDef().getMap().size(); + return internalGetSignatureDef().ensureBuilderMap().size(); } /** *
    @@ -4104,12 +4131,11 @@ public int getSignatureDefCount() {
          *
          * map<string, .tensorflow.SignatureDef> signature_def = 5;
          */
    -
         @java.lang.Override
         public boolean containsSignatureDef(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      return internalGetSignatureDef().getMap().containsKey(key);
    +      return internalGetSignatureDef().ensureBuilderMap().containsKey(key);
         }
         /**
          * Use {@link #getSignatureDefMap()} instead.
    @@ -4128,9 +4154,8 @@ public java.util.Map getSig
          * map<string, .tensorflow.SignatureDef> signature_def = 5;
          */
         @java.lang.Override
    -
         public java.util.Map getSignatureDefMap() {
    -      return internalGetSignatureDef().getMap();
    +      return internalGetSignatureDef().getImmutableMap();
         }
         /**
          * 
    @@ -4141,14 +4166,14 @@ public java.util.Map getSig
          * map<string, .tensorflow.SignatureDef> signature_def = 5;
          */
         @java.lang.Override
    -
    -    public org.tensorflow.proto.SignatureDef getSignatureDefOrDefault(
    +    public /* nullable */
    +org.tensorflow.proto.SignatureDef getSignatureDefOrDefault(
             java.lang.String key,
    -        org.tensorflow.proto.SignatureDef defaultValue) {
    +        /* nullable */
    +org.tensorflow.proto.SignatureDef defaultValue) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      java.util.Map map =
    -          internalGetSignatureDef().getMap();
    -      return map.containsKey(key) ? map.get(key) : defaultValue;
    +      java.util.Map map = internalGetMutableSignatureDef().ensureBuilderMap();
    +      return map.containsKey(key) ? signatureDefConverter.build(map.get(key)) : defaultValue;
         }
         /**
          * 
    @@ -4159,21 +4184,18 @@ public org.tensorflow.proto.SignatureDef getSignatureDefOrDefault(
          * map<string, .tensorflow.SignatureDef> signature_def = 5;
          */
         @java.lang.Override
    -
         public org.tensorflow.proto.SignatureDef getSignatureDefOrThrow(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      java.util.Map map =
    -          internalGetSignatureDef().getMap();
    +      java.util.Map map = internalGetMutableSignatureDef().ensureBuilderMap();
           if (!map.containsKey(key)) {
             throw new java.lang.IllegalArgumentException();
           }
    -      return map.get(key);
    +      return signatureDefConverter.build(map.get(key));
         }
    -
         public Builder clearSignatureDef() {
    -      internalGetMutableSignatureDef().getMutableMap()
    -          .clear();
    +      bitField0_ = (bitField0_ & ~0x00000010);
    +      internalGetMutableSignatureDef().clear();
           return this;
         }
         /**
    @@ -4184,11 +4206,10 @@ public Builder clearSignatureDef() {
          *
          * map<string, .tensorflow.SignatureDef> signature_def = 5;
          */
    -
         public Builder removeSignatureDef(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      internalGetMutableSignatureDef().getMutableMap()
    +      internalGetMutableSignatureDef().ensureBuilderMap()
               .remove(key);
           return this;
         }
    @@ -4197,8 +4218,9 @@ public Builder removeSignatureDef(
          */
         @java.lang.Deprecated
         public java.util.Map
    -    getMutableSignatureDef() {
    -      return internalGetMutableSignatureDef().getMutableMap();
    +        getMutableSignatureDef() {
    +      bitField0_ |= 0x00000010;
    +      return internalGetMutableSignatureDef().ensureMessageMap();
         }
         /**
          * 
    @@ -4212,12 +4234,10 @@ public Builder putSignatureDef(
             java.lang.String key,
             org.tensorflow.proto.SignatureDef value) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      if (value == null) {
    -  throw new NullPointerException("map value");
    -}
    -
    -      internalGetMutableSignatureDef().getMutableMap()
    +      if (value == null) { throw new NullPointerException("map value"); }
    +      internalGetMutableSignatureDef().ensureBuilderMap()
               .put(key, value);
    +      bitField0_ |= 0x00000010;
           return this;
         }
         /**
    @@ -4228,24 +4248,51 @@ public Builder putSignatureDef(
          *
          * map<string, .tensorflow.SignatureDef> signature_def = 5;
          */
    -
         public Builder putAllSignatureDef(
             java.util.Map values) {
    -      internalGetMutableSignatureDef().getMutableMap()
    +      for (java.util.Map.Entry e : values.entrySet()) {
    +        if (e.getKey() == null || e.getValue() == null) {
    +          throw new NullPointerException();
    +        }
    +      }
    +      internalGetMutableSignatureDef().ensureBuilderMap()
               .putAll(values);
    +      bitField0_ |= 0x00000010;
           return this;
         }
    +    /**
    +     * 
    +     * signature_def: Map from user supplied key for a signature to a single
    +     * SignatureDef.
    +     * 
    + * + * map<string, .tensorflow.SignatureDef> signature_def = 5; + */ + public org.tensorflow.proto.SignatureDef.Builder putSignatureDefBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableSignatureDef().ensureBuilderMap(); + org.tensorflow.proto.SignatureDefOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = org.tensorflow.proto.SignatureDef.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof org.tensorflow.proto.SignatureDef) { + entry = ((org.tensorflow.proto.SignatureDef) entry).toBuilder(); + builderMap.put(key, entry); + } + return (org.tensorflow.proto.SignatureDef.Builder) entry; + } private java.util.List assetFileDef_ = java.util.Collections.emptyList(); private void ensureAssetFileDefIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { + if (!((bitField0_ & 0x00000020) != 0)) { assetFileDef_ = new java.util.ArrayList(assetFileDef_); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000020; } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.AssetFileDef, org.tensorflow.proto.AssetFileDef.Builder, org.tensorflow.proto.AssetFileDefOrBuilder> assetFileDefBuilder_; /** @@ -4435,7 +4482,7 @@ public Builder addAllAssetFileDef( public Builder clearAssetFileDef() { if (assetFileDefBuilder_ == null) { assetFileDef_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000020); onChanged(); } else { assetFileDefBuilder_.clear(); @@ -4533,14 +4580,14 @@ public org.tensorflow.proto.AssetFileDef.Builder addAssetFileDefBuilder( getAssetFileDefBuilderList() { return getAssetFileDefFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.AssetFileDef, org.tensorflow.proto.AssetFileDef.Builder, org.tensorflow.proto.AssetFileDefOrBuilder> getAssetFileDefFieldBuilder() { if (assetFileDefBuilder_ == null) { - assetFileDefBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + assetFileDefBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.AssetFileDef, org.tensorflow.proto.AssetFileDef.Builder, org.tensorflow.proto.AssetFileDefOrBuilder>( assetFileDef_, - ((bitField0_ & 0x00000004) != 0), + ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); assetFileDef_ = null; @@ -4549,7 +4596,7 @@ public org.tensorflow.proto.AssetFileDef.Builder addAssetFileDefBuilder( } private org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraph objectGraphDef_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraph, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraph.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraphOrBuilder> objectGraphDefBuilder_; /** *
    @@ -4560,7 +4607,7 @@ public org.tensorflow.proto.AssetFileDef.Builder addAssetFileDefBuilder(
          * @return Whether the objectGraphDef field is set.
          */
         public boolean hasObjectGraphDef() {
    -      return objectGraphDefBuilder_ != null || objectGraphDef_ != null;
    +      return ((bitField0_ & 0x00000040) != 0);
         }
         /**
          * 
    @@ -4590,11 +4637,11 @@ public Builder setObjectGraphDef(org.tensorflow.proto.SavedObjectGraphOuterClass
               throw new NullPointerException();
             }
             objectGraphDef_ = value;
    -        onChanged();
           } else {
             objectGraphDefBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000040;
    +      onChanged();
           return this;
         }
         /**
    @@ -4608,11 +4655,11 @@ public Builder setObjectGraphDef(
             org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraph.Builder builderForValue) {
           if (objectGraphDefBuilder_ == null) {
             objectGraphDef_ = builderForValue.build();
    -        onChanged();
           } else {
             objectGraphDefBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000040;
    +      onChanged();
           return this;
         }
         /**
    @@ -4624,17 +4671,20 @@ public Builder setObjectGraphDef(
          */
         public Builder mergeObjectGraphDef(org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraph value) {
           if (objectGraphDefBuilder_ == null) {
    -        if (objectGraphDef_ != null) {
    -          objectGraphDef_ =
    -            org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraph.newBuilder(objectGraphDef_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000040) != 0) &&
    +          objectGraphDef_ != null &&
    +          objectGraphDef_ != org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraph.getDefaultInstance()) {
    +          getObjectGraphDefBuilder().mergeFrom(value);
             } else {
               objectGraphDef_ = value;
             }
    -        onChanged();
           } else {
             objectGraphDefBuilder_.mergeFrom(value);
           }
    -
    +      if (objectGraphDef_ != null) {
    +        bitField0_ |= 0x00000040;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -4645,14 +4695,13 @@ public Builder mergeObjectGraphDef(org.tensorflow.proto.SavedObjectGraphOuterCla
          * .tensorflow.SavedObjectGraph object_graph_def = 7;
          */
         public Builder clearObjectGraphDef() {
    -      if (objectGraphDefBuilder_ == null) {
    -        objectGraphDef_ = null;
    -        onChanged();
    -      } else {
    -        objectGraphDef_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000040);
    +      objectGraphDef_ = null;
    +      if (objectGraphDefBuilder_ != null) {
    +        objectGraphDefBuilder_.dispose();
             objectGraphDefBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -4663,7 +4712,7 @@ public Builder clearObjectGraphDef() {
          * .tensorflow.SavedObjectGraph object_graph_def = 7;
          */
         public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraph.Builder getObjectGraphDefBuilder() {
    -      
    +      bitField0_ |= 0x00000040;
           onChanged();
           return getObjectGraphDefFieldBuilder().getBuilder();
         }
    @@ -4689,11 +4738,11 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraphOrBuilder
          *
          * .tensorflow.SavedObjectGraph object_graph_def = 7;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraph, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraph.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraphOrBuilder> 
             getObjectGraphDefFieldBuilder() {
           if (objectGraphDefBuilder_ == null) {
    -        objectGraphDefBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        objectGraphDefBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraph, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraph.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraphOrBuilder>(
                     getObjectGraphDef(),
                     getParentForChildren(),
    @@ -4702,18 +4751,6 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraphOrBuilder
           }
           return objectGraphDefBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.MetaGraphDef)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetaGraphDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetaGraphDefOrBuilder.java
    index e23f6dedca5..510b6c87bbc 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetaGraphDefOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetaGraphDefOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/meta_graph.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -119,7 +121,6 @@ boolean containsCollectionDef(
        *
        * map<string, .tensorflow.CollectionDef> collection_def = 4;
        */
    -
       /* nullable */
     org.tensorflow.proto.CollectionDef getCollectionDefOrDefault(
           java.lang.String key,
    @@ -133,7 +134,6 @@ org.tensorflow.proto.CollectionDef getCollectionDefOrDefault(
        *
        * map<string, .tensorflow.CollectionDef> collection_def = 4;
        */
    -
       org.tensorflow.proto.CollectionDef getCollectionDefOrThrow(
           java.lang.String key);
     
    @@ -180,7 +180,6 @@ boolean containsSignatureDef(
        *
        * map<string, .tensorflow.SignatureDef> signature_def = 5;
        */
    -
       /* nullable */
     org.tensorflow.proto.SignatureDef getSignatureDefOrDefault(
           java.lang.String key,
    @@ -194,7 +193,6 @@ org.tensorflow.proto.SignatureDef getSignatureDefOrDefault(
        *
        * map<string, .tensorflow.SignatureDef> signature_def = 5;
        */
    -
       org.tensorflow.proto.SignatureDef getSignatureDefOrThrow(
           java.lang.String key);
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetaGraphProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetaGraphProtos.java
    index 021071a2533..eb8242aed48 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetaGraphProtos.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetaGraphProtos.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/meta_graph.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class MetaGraphProtos {
       private MetaGraphProtos() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      MetaGraphProtos.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,97 +28,97 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_MetaGraphDef_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_MetaGraphDef_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_MetaGraphDef_MetaInfoDef_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_MetaGraphDef_MetaInfoDef_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_MetaGraphDef_CollectionDefEntry_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_MetaGraphDef_CollectionDefEntry_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_MetaGraphDef_SignatureDefEntry_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_MetaGraphDef_SignatureDefEntry_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_CollectionDef_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_CollectionDef_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_CollectionDef_NodeList_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_CollectionDef_NodeList_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_CollectionDef_BytesList_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_CollectionDef_BytesList_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_CollectionDef_Int64List_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_CollectionDef_Int64List_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_CollectionDef_FloatList_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_CollectionDef_FloatList_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_CollectionDef_AnyList_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_CollectionDef_AnyList_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_TensorInfo_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_TensorInfo_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_TensorInfo_CooSparse_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_TensorInfo_CooSparse_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_TensorInfo_CompositeTensor_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_TensorInfo_CompositeTensor_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_SignatureDef_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_SignatureDef_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_SignatureDef_InputsEntry_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_SignatureDef_InputsEntry_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_SignatureDef_OutputsEntry_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_SignatureDef_OutputsEntry_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_SignatureDef_DefaultsEntry_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_SignatureDef_DefaultsEntry_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_AssetFileDef_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_AssetFileDef_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -209,117 +220,118 @@ public static void registerAllExtensions(
         internal_static_tensorflow_MetaGraphDef_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_MetaGraphDef_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_MetaGraphDef_descriptor,
             new java.lang.String[] { "MetaInfoDef", "GraphDef", "SaverDef", "CollectionDef", "SignatureDef", "AssetFileDef", "ObjectGraphDef", });
         internal_static_tensorflow_MetaGraphDef_MetaInfoDef_descriptor =
           internal_static_tensorflow_MetaGraphDef_descriptor.getNestedTypes().get(0);
         internal_static_tensorflow_MetaGraphDef_MetaInfoDef_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_MetaGraphDef_MetaInfoDef_descriptor,
             new java.lang.String[] { "MetaGraphVersion", "StrippedOpList", "AnyInfo", "Tags", "TensorflowVersion", "TensorflowGitVersion", "StrippedDefaultAttrs", "FunctionAliases", });
         internal_static_tensorflow_MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_descriptor =
           internal_static_tensorflow_MetaGraphDef_MetaInfoDef_descriptor.getNestedTypes().get(0);
         internal_static_tensorflow_MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_descriptor,
             new java.lang.String[] { "Key", "Value", });
         internal_static_tensorflow_MetaGraphDef_CollectionDefEntry_descriptor =
           internal_static_tensorflow_MetaGraphDef_descriptor.getNestedTypes().get(1);
         internal_static_tensorflow_MetaGraphDef_CollectionDefEntry_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_MetaGraphDef_CollectionDefEntry_descriptor,
             new java.lang.String[] { "Key", "Value", });
         internal_static_tensorflow_MetaGraphDef_SignatureDefEntry_descriptor =
           internal_static_tensorflow_MetaGraphDef_descriptor.getNestedTypes().get(2);
         internal_static_tensorflow_MetaGraphDef_SignatureDefEntry_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_MetaGraphDef_SignatureDefEntry_descriptor,
             new java.lang.String[] { "Key", "Value", });
         internal_static_tensorflow_CollectionDef_descriptor =
           getDescriptor().getMessageTypes().get(1);
         internal_static_tensorflow_CollectionDef_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_CollectionDef_descriptor,
             new java.lang.String[] { "NodeList", "BytesList", "Int64List", "FloatList", "AnyList", "Kind", });
         internal_static_tensorflow_CollectionDef_NodeList_descriptor =
           internal_static_tensorflow_CollectionDef_descriptor.getNestedTypes().get(0);
         internal_static_tensorflow_CollectionDef_NodeList_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_CollectionDef_NodeList_descriptor,
             new java.lang.String[] { "Value", });
         internal_static_tensorflow_CollectionDef_BytesList_descriptor =
           internal_static_tensorflow_CollectionDef_descriptor.getNestedTypes().get(1);
         internal_static_tensorflow_CollectionDef_BytesList_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_CollectionDef_BytesList_descriptor,
             new java.lang.String[] { "Value", });
         internal_static_tensorflow_CollectionDef_Int64List_descriptor =
           internal_static_tensorflow_CollectionDef_descriptor.getNestedTypes().get(2);
         internal_static_tensorflow_CollectionDef_Int64List_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_CollectionDef_Int64List_descriptor,
             new java.lang.String[] { "Value", });
         internal_static_tensorflow_CollectionDef_FloatList_descriptor =
           internal_static_tensorflow_CollectionDef_descriptor.getNestedTypes().get(3);
         internal_static_tensorflow_CollectionDef_FloatList_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_CollectionDef_FloatList_descriptor,
             new java.lang.String[] { "Value", });
         internal_static_tensorflow_CollectionDef_AnyList_descriptor =
           internal_static_tensorflow_CollectionDef_descriptor.getNestedTypes().get(4);
         internal_static_tensorflow_CollectionDef_AnyList_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_CollectionDef_AnyList_descriptor,
             new java.lang.String[] { "Value", });
         internal_static_tensorflow_TensorInfo_descriptor =
           getDescriptor().getMessageTypes().get(2);
         internal_static_tensorflow_TensorInfo_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_TensorInfo_descriptor,
             new java.lang.String[] { "Name", "CooSparse", "CompositeTensor", "Dtype", "TensorShape", "Encoding", });
         internal_static_tensorflow_TensorInfo_CooSparse_descriptor =
           internal_static_tensorflow_TensorInfo_descriptor.getNestedTypes().get(0);
         internal_static_tensorflow_TensorInfo_CooSparse_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_TensorInfo_CooSparse_descriptor,
             new java.lang.String[] { "ValuesTensorName", "IndicesTensorName", "DenseShapeTensorName", });
         internal_static_tensorflow_TensorInfo_CompositeTensor_descriptor =
           internal_static_tensorflow_TensorInfo_descriptor.getNestedTypes().get(1);
         internal_static_tensorflow_TensorInfo_CompositeTensor_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_TensorInfo_CompositeTensor_descriptor,
             new java.lang.String[] { "TypeSpec", "Components", });
         internal_static_tensorflow_SignatureDef_descriptor =
           getDescriptor().getMessageTypes().get(3);
         internal_static_tensorflow_SignatureDef_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_SignatureDef_descriptor,
             new java.lang.String[] { "Inputs", "Outputs", "MethodName", "Defaults", });
         internal_static_tensorflow_SignatureDef_InputsEntry_descriptor =
           internal_static_tensorflow_SignatureDef_descriptor.getNestedTypes().get(0);
         internal_static_tensorflow_SignatureDef_InputsEntry_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_SignatureDef_InputsEntry_descriptor,
             new java.lang.String[] { "Key", "Value", });
         internal_static_tensorflow_SignatureDef_OutputsEntry_descriptor =
           internal_static_tensorflow_SignatureDef_descriptor.getNestedTypes().get(1);
         internal_static_tensorflow_SignatureDef_OutputsEntry_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_SignatureDef_OutputsEntry_descriptor,
             new java.lang.String[] { "Key", "Value", });
         internal_static_tensorflow_SignatureDef_DefaultsEntry_descriptor =
           internal_static_tensorflow_SignatureDef_descriptor.getNestedTypes().get(2);
         internal_static_tensorflow_SignatureDef_DefaultsEntry_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_SignatureDef_DefaultsEntry_descriptor,
             new java.lang.String[] { "Key", "Value", });
         internal_static_tensorflow_AssetFileDef_descriptor =
           getDescriptor().getMessageTypes().get(4);
         internal_static_tensorflow_AssetFileDef_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_AssetFileDef_descriptor,
             new java.lang.String[] { "TensorInfo", "Filename", });
    +    descriptor.resolveAllFeaturesImmutable();
         com.google.protobuf.AnyProto.getDescriptor();
         org.tensorflow.proto.GraphProtos.getDescriptor();
         org.tensorflow.proto.OpDefProtos.getDescriptor();
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetricEntry.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetricEntry.java
    index d9454e9bc70..b0190343737 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetricEntry.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetricEntry.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: xla/tsl/protobuf/test_log.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,45 +9,44 @@
      * Protobuf type {@code tensorflow.MetricEntry}
      */
     public final class MetricEntry extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.MetricEntry)
         MetricEntryOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      MetricEntry.class.getName());
    +  }
       // Use MetricEntry.newBuilder() to construct.
    -  private MetricEntry(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private MetricEntry(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private MetricEntry() {
         name_ = "";
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new MetricEntry();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_MetricEntry_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_MetricEntry_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
                 org.tensorflow.proto.MetricEntry.class, org.tensorflow.proto.MetricEntry.Builder.class);
       }
     
    +  private int bitField0_;
       public static final int NAME_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object name_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object name_ = "";
       /**
        * 
        * Metric name
    @@ -91,7 +92,7 @@ public java.lang.String getName() {
       }
     
       public static final int VALUE_FIELD_NUMBER = 2;
    -  private double value_;
    +  private double value_ = 0D;
       /**
        * 
        * Metric value
    @@ -117,7 +118,7 @@ public double getValue() {
        */
       @java.lang.Override
       public boolean hasMinValue() {
    -    return minValue_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * 
    @@ -140,7 +141,7 @@ public com.google.protobuf.DoubleValue getMinValue() {
        */
       @java.lang.Override
       public com.google.protobuf.DoubleValueOrBuilder getMinValueOrBuilder() {
    -    return getMinValue();
    +    return minValue_ == null ? com.google.protobuf.DoubleValue.getDefaultInstance() : minValue_;
       }
     
       public static final int MAX_VALUE_FIELD_NUMBER = 4;
    @@ -155,7 +156,7 @@ public com.google.protobuf.DoubleValueOrBuilder getMinValueOrBuilder() {
        */
       @java.lang.Override
       public boolean hasMaxValue() {
    -    return maxValue_ != null;
    +    return ((bitField0_ & 0x00000002) != 0);
       }
       /**
        * 
    @@ -178,7 +179,7 @@ public com.google.protobuf.DoubleValue getMaxValue() {
        */
       @java.lang.Override
       public com.google.protobuf.DoubleValueOrBuilder getMaxValueOrBuilder() {
    -    return getMaxValue();
    +    return maxValue_ == null ? com.google.protobuf.DoubleValue.getDefaultInstance() : maxValue_;
       }
     
       private byte memoizedIsInitialized = -1;
    @@ -195,16 +196,16 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
         }
         if (java.lang.Double.doubleToRawLongBits(value_) != 0) {
           output.writeDouble(2, value_);
         }
    -    if (minValue_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(3, getMinValue());
         }
    -    if (maxValue_ != null) {
    +    if (((bitField0_ & 0x00000002) != 0)) {
           output.writeMessage(4, getMaxValue());
         }
         getUnknownFields().writeTo(output);
    @@ -216,18 +217,18 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
         }
         if (java.lang.Double.doubleToRawLongBits(value_) != 0) {
           size += com.google.protobuf.CodedOutputStream
             .computeDoubleSize(2, value_);
         }
    -    if (minValue_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(3, getMinValue());
         }
    -    if (maxValue_ != null) {
    +    if (((bitField0_ & 0x00000002) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(4, getMaxValue());
         }
    @@ -324,39 +325,41 @@ public static org.tensorflow.proto.MetricEntry parseFrom(
       }
       public static org.tensorflow.proto.MetricEntry parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.MetricEntry parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.MetricEntry parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.MetricEntry parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.MetricEntry parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.MetricEntry parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -376,7 +379,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -384,7 +387,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.MetricEntry}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.MetricEntry)
           org.tensorflow.proto.MetricEntryOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -393,7 +396,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_MetricEntry_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -402,31 +405,35 @@ public static final class Builder extends
     
         // Construct using org.tensorflow.proto.MetricEntry.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getMinValueFieldBuilder();
    +        getMaxValueFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           name_ = "";
    -
           value_ = 0D;
    -
    -      if (minValueBuilder_ == null) {
    -        minValue_ = null;
    -      } else {
    -        minValue_ = null;
    +      minValue_ = null;
    +      if (minValueBuilder_ != null) {
    +        minValueBuilder_.dispose();
             minValueBuilder_ = null;
           }
    -      if (maxValueBuilder_ == null) {
    -        maxValue_ = null;
    -      } else {
    -        maxValue_ = null;
    +      maxValue_ = null;
    +      if (maxValueBuilder_ != null) {
    +        maxValueBuilder_.dispose();
             maxValueBuilder_ = null;
           }
           return this;
    @@ -455,54 +462,35 @@ public org.tensorflow.proto.MetricEntry build() {
         @java.lang.Override
         public org.tensorflow.proto.MetricEntry buildPartial() {
           org.tensorflow.proto.MetricEntry result = new org.tensorflow.proto.MetricEntry(this);
    -      result.name_ = name_;
    -      result.value_ = value_;
    -      if (minValueBuilder_ == null) {
    -        result.minValue_ = minValue_;
    -      } else {
    -        result.minValue_ = minValueBuilder_.build();
    -      }
    -      if (maxValueBuilder_ == null) {
    -        result.maxValue_ = maxValue_;
    -      } else {
    -        result.maxValue_ = maxValueBuilder_.build();
    -      }
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.MetricEntry result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.name_ = name_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.value_ = value_;
    +      }
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.minValue_ = minValueBuilder_ == null
    +            ? minValue_
    +            : minValueBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.maxValue_ = maxValueBuilder_ == null
    +            ? maxValue_
    +            : maxValueBuilder_.build();
    +        to_bitField0_ |= 0x00000002;
    +      }
    +      result.bitField0_ |= to_bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.MetricEntry) {
    @@ -517,6 +505,7 @@ public Builder mergeFrom(org.tensorflow.proto.MetricEntry other) {
           if (other == org.tensorflow.proto.MetricEntry.getDefaultInstance()) return this;
           if (!other.getName().isEmpty()) {
             name_ = other.name_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (other.getValue() != 0D) {
    @@ -556,26 +545,26 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   name_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 17: {
                   value_ = input.readDouble();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 17
                 case 26: {
                   input.readMessage(
                       getMinValueFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 26
                 case 34: {
                   input.readMessage(
                       getMaxValueFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 34
                 default: {
    @@ -593,6 +582,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private java.lang.Object name_ = "";
         /**
    @@ -647,11 +637,9 @@ public java.lang.String getName() {
          */
         public Builder setName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           name_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -664,8 +652,8 @@ public Builder setName(
          * @return This builder for chaining.
          */
         public Builder clearName() {
    -      
           name_ = getDefaultInstance().getName();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -680,12 +668,10 @@ public Builder clearName() {
          */
         public Builder setNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           name_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -713,8 +699,9 @@ public double getValue() {
          * @return This builder for chaining.
          */
         public Builder setValue(double value) {
    -      
    +
           value_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -727,14 +714,14 @@ public Builder setValue(double value) {
          * @return This builder for chaining.
          */
         public Builder clearValue() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000002);
           value_ = 0D;
           onChanged();
           return this;
         }
     
         private com.google.protobuf.DoubleValue minValue_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             com.google.protobuf.DoubleValue, com.google.protobuf.DoubleValue.Builder, com.google.protobuf.DoubleValueOrBuilder> minValueBuilder_;
         /**
          * 
    @@ -745,7 +732,7 @@ public Builder clearValue() {
          * @return Whether the minValue field is set.
          */
         public boolean hasMinValue() {
    -      return minValueBuilder_ != null || minValue_ != null;
    +      return ((bitField0_ & 0x00000004) != 0);
         }
         /**
          * 
    @@ -775,11 +762,11 @@ public Builder setMinValue(com.google.protobuf.DoubleValue value) {
               throw new NullPointerException();
             }
             minValue_ = value;
    -        onChanged();
           } else {
             minValueBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000004;
    +      onChanged();
           return this;
         }
         /**
    @@ -793,11 +780,11 @@ public Builder setMinValue(
             com.google.protobuf.DoubleValue.Builder builderForValue) {
           if (minValueBuilder_ == null) {
             minValue_ = builderForValue.build();
    -        onChanged();
           } else {
             minValueBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000004;
    +      onChanged();
           return this;
         }
         /**
    @@ -809,17 +796,20 @@ public Builder setMinValue(
          */
         public Builder mergeMinValue(com.google.protobuf.DoubleValue value) {
           if (minValueBuilder_ == null) {
    -        if (minValue_ != null) {
    -          minValue_ =
    -            com.google.protobuf.DoubleValue.newBuilder(minValue_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000004) != 0) &&
    +          minValue_ != null &&
    +          minValue_ != com.google.protobuf.DoubleValue.getDefaultInstance()) {
    +          getMinValueBuilder().mergeFrom(value);
             } else {
               minValue_ = value;
             }
    -        onChanged();
           } else {
             minValueBuilder_.mergeFrom(value);
           }
    -
    +      if (minValue_ != null) {
    +        bitField0_ |= 0x00000004;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -830,14 +820,13 @@ public Builder mergeMinValue(com.google.protobuf.DoubleValue value) {
          * .google.protobuf.DoubleValue min_value = 3;
          */
         public Builder clearMinValue() {
    -      if (minValueBuilder_ == null) {
    -        minValue_ = null;
    -        onChanged();
    -      } else {
    -        minValue_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000004);
    +      minValue_ = null;
    +      if (minValueBuilder_ != null) {
    +        minValueBuilder_.dispose();
             minValueBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -848,7 +837,7 @@ public Builder clearMinValue() {
          * .google.protobuf.DoubleValue min_value = 3;
          */
         public com.google.protobuf.DoubleValue.Builder getMinValueBuilder() {
    -      
    +      bitField0_ |= 0x00000004;
           onChanged();
           return getMinValueFieldBuilder().getBuilder();
         }
    @@ -874,11 +863,11 @@ public com.google.protobuf.DoubleValueOrBuilder getMinValueOrBuilder() {
          *
          * .google.protobuf.DoubleValue min_value = 3;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             com.google.protobuf.DoubleValue, com.google.protobuf.DoubleValue.Builder, com.google.protobuf.DoubleValueOrBuilder> 
             getMinValueFieldBuilder() {
           if (minValueBuilder_ == null) {
    -        minValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        minValueBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 com.google.protobuf.DoubleValue, com.google.protobuf.DoubleValue.Builder, com.google.protobuf.DoubleValueOrBuilder>(
                     getMinValue(),
                     getParentForChildren(),
    @@ -889,7 +878,7 @@ public com.google.protobuf.DoubleValueOrBuilder getMinValueOrBuilder() {
         }
     
         private com.google.protobuf.DoubleValue maxValue_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             com.google.protobuf.DoubleValue, com.google.protobuf.DoubleValue.Builder, com.google.protobuf.DoubleValueOrBuilder> maxValueBuilder_;
         /**
          * 
    @@ -900,7 +889,7 @@ public com.google.protobuf.DoubleValueOrBuilder getMinValueOrBuilder() {
          * @return Whether the maxValue field is set.
          */
         public boolean hasMaxValue() {
    -      return maxValueBuilder_ != null || maxValue_ != null;
    +      return ((bitField0_ & 0x00000008) != 0);
         }
         /**
          * 
    @@ -930,11 +919,11 @@ public Builder setMaxValue(com.google.protobuf.DoubleValue value) {
               throw new NullPointerException();
             }
             maxValue_ = value;
    -        onChanged();
           } else {
             maxValueBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000008;
    +      onChanged();
           return this;
         }
         /**
    @@ -948,11 +937,11 @@ public Builder setMaxValue(
             com.google.protobuf.DoubleValue.Builder builderForValue) {
           if (maxValueBuilder_ == null) {
             maxValue_ = builderForValue.build();
    -        onChanged();
           } else {
             maxValueBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000008;
    +      onChanged();
           return this;
         }
         /**
    @@ -964,17 +953,20 @@ public Builder setMaxValue(
          */
         public Builder mergeMaxValue(com.google.protobuf.DoubleValue value) {
           if (maxValueBuilder_ == null) {
    -        if (maxValue_ != null) {
    -          maxValue_ =
    -            com.google.protobuf.DoubleValue.newBuilder(maxValue_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000008) != 0) &&
    +          maxValue_ != null &&
    +          maxValue_ != com.google.protobuf.DoubleValue.getDefaultInstance()) {
    +          getMaxValueBuilder().mergeFrom(value);
             } else {
               maxValue_ = value;
             }
    -        onChanged();
           } else {
             maxValueBuilder_.mergeFrom(value);
           }
    -
    +      if (maxValue_ != null) {
    +        bitField0_ |= 0x00000008;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -985,14 +977,13 @@ public Builder mergeMaxValue(com.google.protobuf.DoubleValue value) {
          * .google.protobuf.DoubleValue max_value = 4;
          */
         public Builder clearMaxValue() {
    -      if (maxValueBuilder_ == null) {
    -        maxValue_ = null;
    -        onChanged();
    -      } else {
    -        maxValue_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000008);
    +      maxValue_ = null;
    +      if (maxValueBuilder_ != null) {
    +        maxValueBuilder_.dispose();
             maxValueBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -1003,7 +994,7 @@ public Builder clearMaxValue() {
          * .google.protobuf.DoubleValue max_value = 4;
          */
         public com.google.protobuf.DoubleValue.Builder getMaxValueBuilder() {
    -      
    +      bitField0_ |= 0x00000008;
           onChanged();
           return getMaxValueFieldBuilder().getBuilder();
         }
    @@ -1029,11 +1020,11 @@ public com.google.protobuf.DoubleValueOrBuilder getMaxValueOrBuilder() {
          *
          * .google.protobuf.DoubleValue max_value = 4;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             com.google.protobuf.DoubleValue, com.google.protobuf.DoubleValue.Builder, com.google.protobuf.DoubleValueOrBuilder> 
             getMaxValueFieldBuilder() {
           if (maxValueBuilder_ == null) {
    -        maxValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        maxValueBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 com.google.protobuf.DoubleValue, com.google.protobuf.DoubleValue.Builder, com.google.protobuf.DoubleValueOrBuilder>(
                     getMaxValue(),
                     getParentForChildren(),
    @@ -1042,18 +1033,6 @@ public com.google.protobuf.DoubleValueOrBuilder getMaxValueOrBuilder() {
           }
           return maxValueBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.MetricEntry)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetricEntryOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetricEntryOrBuilder.java
    index e8f2867a14a..3d0eec363a3 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetricEntryOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetricEntryOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: xla/tsl/protobuf/test_log.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NameAttrList.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NameAttrList.java
    index f187a27a267..b79641012af 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NameAttrList.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NameAttrList.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/attr_value.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -12,30 +14,27 @@
      * Protobuf type {@code tensorflow.NameAttrList}
      */
     public final class NameAttrList extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.NameAttrList)
         NameAttrListOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      NameAttrList.class.getName());
    +  }
       // Use NameAttrList.newBuilder() to construct.
    -  private NameAttrList(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private NameAttrList(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private NameAttrList() {
         name_ = "";
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new NameAttrList();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.AttrValueProtos.internal_static_tensorflow_NameAttrList_descriptor;
    @@ -43,7 +42,7 @@ protected java.lang.Object newInstance(
     
       @SuppressWarnings({"rawtypes"})
       @java.lang.Override
    -  protected com.google.protobuf.MapField internalGetMapField(
    +  protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
           int number) {
         switch (number) {
           case 2:
    @@ -54,7 +53,7 @@ protected com.google.protobuf.MapField internalGetMapField(
         }
       }
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.AttrValueProtos.internal_static_tensorflow_NameAttrList_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -62,7 +61,8 @@ protected com.google.protobuf.MapField internalGetMapField(
       }
     
       public static final int NAME_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object name_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object name_ = "";
       /**
        * string name = 1;
        * @return The name.
    @@ -111,6 +111,7 @@ private static final class AttrDefaultEntryHolder {
                     com.google.protobuf.WireFormat.FieldType.MESSAGE,
                     org.tensorflow.proto.AttrValue.getDefaultInstance());
       }
    +  @SuppressWarnings("serial")
       private com.google.protobuf.MapField<
           java.lang.String, org.tensorflow.proto.AttrValue> attr_;
       private com.google.protobuf.MapField
    @@ -121,14 +122,12 @@ private static final class AttrDefaultEntryHolder {
         }
         return attr_;
       }
    -
       public int getAttrCount() {
         return internalGetAttr().getMap().size();
       }
       /**
        * map<string, .tensorflow.AttrValue> attr = 2;
        */
    -
       @java.lang.Override
       public boolean containsAttr(
           java.lang.String key) {
    @@ -147,7 +146,6 @@ public java.util.Map getAttr()
        * map<string, .tensorflow.AttrValue> attr = 2;
        */
       @java.lang.Override
    -
       public java.util.Map getAttrMap() {
         return internalGetAttr().getMap();
       }
    @@ -155,10 +153,11 @@ public java.util.Map getAttrMa
        * map<string, .tensorflow.AttrValue> attr = 2;
        */
       @java.lang.Override
    -
    -  public org.tensorflow.proto.AttrValue getAttrOrDefault(
    +  public /* nullable */
    +org.tensorflow.proto.AttrValue getAttrOrDefault(
           java.lang.String key,
    -      org.tensorflow.proto.AttrValue defaultValue) {
    +      /* nullable */
    +org.tensorflow.proto.AttrValue defaultValue) {
         if (key == null) { throw new NullPointerException("map key"); }
         java.util.Map map =
             internalGetAttr().getMap();
    @@ -168,7 +167,6 @@ public org.tensorflow.proto.AttrValue getAttrOrDefault(
        * map<string, .tensorflow.AttrValue> attr = 2;
        */
       @java.lang.Override
    -
       public org.tensorflow.proto.AttrValue getAttrOrThrow(
           java.lang.String key) {
         if (key == null) { throw new NullPointerException("map key"); }
    @@ -194,10 +192,10 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
         }
    -    com.google.protobuf.GeneratedMessageV3
    +    com.google.protobuf.GeneratedMessage
           .serializeStringMapTo(
             output,
             internalGetAttr(),
    @@ -212,8 +210,8 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
         }
         for (java.util.Map.Entry entry
              : internalGetAttr().getMap().entrySet()) {
    @@ -300,39 +298,41 @@ public static org.tensorflow.proto.NameAttrList parseFrom(
       }
       public static org.tensorflow.proto.NameAttrList parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.NameAttrList parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.NameAttrList parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.NameAttrList parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.NameAttrList parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.NameAttrList parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -352,7 +352,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -365,7 +365,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.NameAttrList}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.NameAttrList)
           org.tensorflow.proto.NameAttrListOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -374,7 +374,7 @@ public static final class Builder extends
         }
     
         @SuppressWarnings({"rawtypes"})
    -    protected com.google.protobuf.MapField internalGetMapField(
    +    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
             int number) {
           switch (number) {
             case 2:
    @@ -385,7 +385,7 @@ protected com.google.protobuf.MapField internalGetMapField(
           }
         }
         @SuppressWarnings({"rawtypes"})
    -    protected com.google.protobuf.MapField internalGetMutableMapField(
    +    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
             int number) {
           switch (number) {
             case 2:
    @@ -396,7 +396,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField(
           }
         }
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.AttrValueProtos.internal_static_tensorflow_NameAttrList_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -409,15 +409,15 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           name_ = "";
    -
           internalGetMutableAttr().clear();
           return this;
         }
    @@ -445,46 +445,21 @@ public org.tensorflow.proto.NameAttrList build() {
         @java.lang.Override
         public org.tensorflow.proto.NameAttrList buildPartial() {
           org.tensorflow.proto.NameAttrList result = new org.tensorflow.proto.NameAttrList(this);
    -      int from_bitField0_ = bitField0_;
    -      result.name_ = name_;
    -      result.attr_ = internalGetAttr();
    -      result.attr_.makeImmutable();
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.NameAttrList result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.name_ = name_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.attr_ = internalGetAttr().build(AttrDefaultEntryHolder.defaultEntry);
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.NameAttrList) {
    @@ -499,10 +474,12 @@ public Builder mergeFrom(org.tensorflow.proto.NameAttrList other) {
           if (other == org.tensorflow.proto.NameAttrList.getDefaultInstance()) return this;
           if (!other.getName().isEmpty()) {
             name_ = other.name_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           internalGetMutableAttr().mergeFrom(
               other.internalGetAttr());
    +      bitField0_ |= 0x00000002;
           this.mergeUnknownFields(other.getUnknownFields());
           onChanged();
           return this;
    @@ -531,15 +508,16 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   name_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
                   com.google.protobuf.MapEntry
                   attr__ = input.readMessage(
                       AttrDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
    -              internalGetMutableAttr().getMutableMap().put(
    +              internalGetMutableAttr().ensureBuilderMap().put(
                       attr__.getKey(), attr__.getValue());
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 default: {
    @@ -600,11 +578,9 @@ public java.lang.String getName() {
          */
         public Builder setName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           name_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -613,8 +589,8 @@ public Builder setName(
          * @return This builder for chaining.
          */
         public Builder clearName() {
    -      
           name_ = getDefaultInstance().getName();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -625,51 +601,57 @@ public Builder clearName() {
          */
         public Builder setNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           name_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
     
    -    private com.google.protobuf.MapField<
    -        java.lang.String, org.tensorflow.proto.AttrValue> attr_;
    -    private com.google.protobuf.MapField
    -    internalGetAttr() {
    +    private static final class AttrConverter implements com.google.protobuf.MapFieldBuilder.Converter {
    +      @java.lang.Override
    +      public org.tensorflow.proto.AttrValue build(org.tensorflow.proto.AttrValueOrBuilder val) {
    +        if (val instanceof org.tensorflow.proto.AttrValue) { return (org.tensorflow.proto.AttrValue) val; }
    +        return ((org.tensorflow.proto.AttrValue.Builder) val).build();
    +      }
    +
    +      @java.lang.Override
    +      public com.google.protobuf.MapEntry defaultEntry() {
    +        return AttrDefaultEntryHolder.defaultEntry;
    +      }
    +    };
    +    private static final AttrConverter attrConverter = new AttrConverter();
    +
    +    private com.google.protobuf.MapFieldBuilder<
    +        java.lang.String, org.tensorflow.proto.AttrValueOrBuilder, org.tensorflow.proto.AttrValue, org.tensorflow.proto.AttrValue.Builder> attr_;
    +    private com.google.protobuf.MapFieldBuilder
    +        internalGetAttr() {
           if (attr_ == null) {
    -        return com.google.protobuf.MapField.emptyMapField(
    -            AttrDefaultEntryHolder.defaultEntry);
    +        return new com.google.protobuf.MapFieldBuilder<>(attrConverter);
           }
           return attr_;
         }
    -    private com.google.protobuf.MapField
    -    internalGetMutableAttr() {
    -      onChanged();;
    +    private com.google.protobuf.MapFieldBuilder
    +        internalGetMutableAttr() {
           if (attr_ == null) {
    -        attr_ = com.google.protobuf.MapField.newMapField(
    -            AttrDefaultEntryHolder.defaultEntry);
    -      }
    -      if (!attr_.isMutable()) {
    -        attr_ = attr_.copy();
    +        attr_ = new com.google.protobuf.MapFieldBuilder<>(attrConverter);
           }
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return attr_;
         }
    -
         public int getAttrCount() {
    -      return internalGetAttr().getMap().size();
    +      return internalGetAttr().ensureBuilderMap().size();
         }
         /**
          * map<string, .tensorflow.AttrValue> attr = 2;
          */
    -
         @java.lang.Override
         public boolean containsAttr(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      return internalGetAttr().getMap().containsKey(key);
    +      return internalGetAttr().ensureBuilderMap().containsKey(key);
         }
         /**
          * Use {@link #getAttrMap()} instead.
    @@ -683,52 +665,47 @@ public java.util.Map getAttr()
          * map<string, .tensorflow.AttrValue> attr = 2;
          */
         @java.lang.Override
    -
         public java.util.Map getAttrMap() {
    -      return internalGetAttr().getMap();
    +      return internalGetAttr().getImmutableMap();
         }
         /**
          * map<string, .tensorflow.AttrValue> attr = 2;
          */
         @java.lang.Override
    -
    -    public org.tensorflow.proto.AttrValue getAttrOrDefault(
    +    public /* nullable */
    +org.tensorflow.proto.AttrValue getAttrOrDefault(
             java.lang.String key,
    -        org.tensorflow.proto.AttrValue defaultValue) {
    +        /* nullable */
    +org.tensorflow.proto.AttrValue defaultValue) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      java.util.Map map =
    -          internalGetAttr().getMap();
    -      return map.containsKey(key) ? map.get(key) : defaultValue;
    +      java.util.Map map = internalGetMutableAttr().ensureBuilderMap();
    +      return map.containsKey(key) ? attrConverter.build(map.get(key)) : defaultValue;
         }
         /**
          * map<string, .tensorflow.AttrValue> attr = 2;
          */
         @java.lang.Override
    -
         public org.tensorflow.proto.AttrValue getAttrOrThrow(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      java.util.Map map =
    -          internalGetAttr().getMap();
    +      java.util.Map map = internalGetMutableAttr().ensureBuilderMap();
           if (!map.containsKey(key)) {
             throw new java.lang.IllegalArgumentException();
           }
    -      return map.get(key);
    +      return attrConverter.build(map.get(key));
         }
    -
         public Builder clearAttr() {
    -      internalGetMutableAttr().getMutableMap()
    -          .clear();
    +      bitField0_ = (bitField0_ & ~0x00000002);
    +      internalGetMutableAttr().clear();
           return this;
         }
         /**
          * map<string, .tensorflow.AttrValue> attr = 2;
          */
    -
         public Builder removeAttr(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      internalGetMutableAttr().getMutableMap()
    +      internalGetMutableAttr().ensureBuilderMap()
               .remove(key);
           return this;
         }
    @@ -737,8 +714,9 @@ public Builder removeAttr(
          */
         @java.lang.Deprecated
         public java.util.Map
    -    getMutableAttr() {
    -      return internalGetMutableAttr().getMutableMap();
    +        getMutableAttr() {
    +      bitField0_ |= 0x00000002;
    +      return internalGetMutableAttr().ensureMessageMap();
         }
         /**
          * map<string, .tensorflow.AttrValue> attr = 2;
    @@ -747,37 +725,45 @@ public Builder putAttr(
             java.lang.String key,
             org.tensorflow.proto.AttrValue value) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      if (value == null) {
    -  throw new NullPointerException("map value");
    -}
    -
    -      internalGetMutableAttr().getMutableMap()
    +      if (value == null) { throw new NullPointerException("map value"); }
    +      internalGetMutableAttr().ensureBuilderMap()
               .put(key, value);
    +      bitField0_ |= 0x00000002;
           return this;
         }
         /**
          * map<string, .tensorflow.AttrValue> attr = 2;
          */
    -
         public Builder putAllAttr(
             java.util.Map values) {
    -      internalGetMutableAttr().getMutableMap()
    +      for (java.util.Map.Entry e : values.entrySet()) {
    +        if (e.getKey() == null || e.getValue() == null) {
    +          throw new NullPointerException();
    +        }
    +      }
    +      internalGetMutableAttr().ensureBuilderMap()
               .putAll(values);
    +      bitField0_ |= 0x00000002;
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    +    /**
    +     * map<string, .tensorflow.AttrValue> attr = 2;
    +     */
    +    public org.tensorflow.proto.AttrValue.Builder putAttrBuilderIfAbsent(
    +        java.lang.String key) {
    +      java.util.Map builderMap = internalGetMutableAttr().ensureBuilderMap();
    +      org.tensorflow.proto.AttrValueOrBuilder entry = builderMap.get(key);
    +      if (entry == null) {
    +        entry = org.tensorflow.proto.AttrValue.newBuilder();
    +        builderMap.put(key, entry);
    +      }
    +      if (entry instanceof org.tensorflow.proto.AttrValue) {
    +        entry = ((org.tensorflow.proto.AttrValue) entry).toBuilder();
    +        builderMap.put(key, entry);
    +      }
    +      return (org.tensorflow.proto.AttrValue.Builder) entry;
         }
     
    -
         // @@protoc_insertion_point(builder_scope:tensorflow.NameAttrList)
       }
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NameAttrListOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NameAttrListOrBuilder.java
    index 19f5a7d4b1b..132bb9b6aa8 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NameAttrListOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NameAttrListOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/attr_value.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -42,7 +44,6 @@ boolean containsAttr(
       /**
        * map<string, .tensorflow.AttrValue> attr = 2;
        */
    -
       /* nullable */
     org.tensorflow.proto.AttrValue getAttrOrDefault(
           java.lang.String key,
    @@ -51,7 +52,6 @@ org.tensorflow.proto.AttrValue getAttrOrDefault(
       /**
        * map<string, .tensorflow.AttrValue> attr = 2;
        */
    -
       org.tensorflow.proto.AttrValue getAttrOrThrow(
           java.lang.String key);
     }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NamedTensorProto.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NamedTensorProto.java
    index 7fd86079e17..ac9667ae7b8 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NamedTensorProto.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NamedTensorProto.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/named_tensor.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,45 +13,44 @@
      * Protobuf type {@code tensorflow.NamedTensorProto}
      */
     public final class NamedTensorProto extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.NamedTensorProto)
         NamedTensorProtoOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      NamedTensorProto.class.getName());
    +  }
       // Use NamedTensorProto.newBuilder() to construct.
    -  private NamedTensorProto(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private NamedTensorProto(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private NamedTensorProto() {
         name_ = "";
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new NamedTensorProto();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.NamedTensorProtos.internal_static_tensorflow_NamedTensorProto_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.NamedTensorProtos.internal_static_tensorflow_NamedTensorProto_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
                 org.tensorflow.proto.NamedTensorProto.class, org.tensorflow.proto.NamedTensorProto.Builder.class);
       }
     
    +  private int bitField0_;
       public static final int NAME_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object name_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object name_ = "";
       /**
        * 
        * Name of the tensor.
    @@ -100,6 +101,7 @@ public java.lang.String getName() {
        * 
        * The client can populate a TensorProto using a tensorflow::Tensor`, or
        * directly using the protobuf field accessors.
    +   *
        * The client specifies whether the returned tensor values should be
        * filled tensor fields (float_val, int_val, etc.) or encoded in a
        * compact form in tensor.tensor_content.
    @@ -110,12 +112,13 @@ public java.lang.String getName() {
        */
       @java.lang.Override
       public boolean hasTensor() {
    -    return tensor_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * 
        * The client can populate a TensorProto using a tensorflow::Tensor`, or
        * directly using the protobuf field accessors.
    +   *
        * The client specifies whether the returned tensor values should be
        * filled tensor fields (float_val, int_val, etc.) or encoded in a
        * compact form in tensor.tensor_content.
    @@ -132,6 +135,7 @@ public org.tensorflow.proto.TensorProto getTensor() {
        * 
        * The client can populate a TensorProto using a tensorflow::Tensor`, or
        * directly using the protobuf field accessors.
    +   *
        * The client specifies whether the returned tensor values should be
        * filled tensor fields (float_val, int_val, etc.) or encoded in a
        * compact form in tensor.tensor_content.
    @@ -141,7 +145,7 @@ public org.tensorflow.proto.TensorProto getTensor() {
        */
       @java.lang.Override
       public org.tensorflow.proto.TensorProtoOrBuilder getTensorOrBuilder() {
    -    return getTensor();
    +    return tensor_ == null ? org.tensorflow.proto.TensorProto.getDefaultInstance() : tensor_;
       }
     
       private byte memoizedIsInitialized = -1;
    @@ -158,10 +162,10 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
         }
    -    if (tensor_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(2, getTensor());
         }
         getUnknownFields().writeTo(output);
    @@ -173,10 +177,10 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
         }
    -    if (tensor_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(2, getTensor());
         }
    @@ -258,39 +262,41 @@ public static org.tensorflow.proto.NamedTensorProto parseFrom(
       }
       public static org.tensorflow.proto.NamedTensorProto parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.NamedTensorProto parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.NamedTensorProto parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.NamedTensorProto parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.NamedTensorProto parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.NamedTensorProto parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -310,7 +316,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -322,7 +328,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.NamedTensorProto}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.NamedTensorProto)
           org.tensorflow.proto.NamedTensorProtoOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -331,7 +337,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.NamedTensorProtos.internal_static_tensorflow_NamedTensorProto_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -340,23 +346,28 @@ public static final class Builder extends
     
         // Construct using org.tensorflow.proto.NamedTensorProto.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getTensorFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           name_ = "";
    -
    -      if (tensorBuilder_ == null) {
    -        tensor_ = null;
    -      } else {
    -        tensor_ = null;
    +      tensor_ = null;
    +      if (tensorBuilder_ != null) {
    +        tensorBuilder_.dispose();
             tensorBuilder_ = null;
           }
           return this;
    @@ -385,48 +396,26 @@ public org.tensorflow.proto.NamedTensorProto build() {
         @java.lang.Override
         public org.tensorflow.proto.NamedTensorProto buildPartial() {
           org.tensorflow.proto.NamedTensorProto result = new org.tensorflow.proto.NamedTensorProto(this);
    -      result.name_ = name_;
    -      if (tensorBuilder_ == null) {
    -        result.tensor_ = tensor_;
    -      } else {
    -        result.tensor_ = tensorBuilder_.build();
    -      }
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.NamedTensorProto result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.name_ = name_;
    +      }
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.tensor_ = tensorBuilder_ == null
    +            ? tensor_
    +            : tensorBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
    +      }
    +      result.bitField0_ |= to_bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.NamedTensorProto) {
    @@ -441,6 +430,7 @@ public Builder mergeFrom(org.tensorflow.proto.NamedTensorProto other) {
           if (other == org.tensorflow.proto.NamedTensorProto.getDefaultInstance()) return this;
           if (!other.getName().isEmpty()) {
             name_ = other.name_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (other.hasTensor()) {
    @@ -474,14 +464,14 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   name_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
                   input.readMessage(
                       getTensorFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 default: {
    @@ -499,6 +489,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private java.lang.Object name_ = "";
         /**
    @@ -553,11 +544,9 @@ public java.lang.String getName() {
          */
         public Builder setName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           name_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -570,8 +559,8 @@ public Builder setName(
          * @return This builder for chaining.
          */
         public Builder clearName() {
    -      
           name_ = getDefaultInstance().getName();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -586,23 +575,22 @@ public Builder clearName() {
          */
         public Builder setNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           name_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
     
         private org.tensorflow.proto.TensorProto tensor_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> tensorBuilder_;
         /**
          * 
          * The client can populate a TensorProto using a tensorflow::Tensor`, or
          * directly using the protobuf field accessors.
    +     *
          * The client specifies whether the returned tensor values should be
          * filled tensor fields (float_val, int_val, etc.) or encoded in a
          * compact form in tensor.tensor_content.
    @@ -612,12 +600,13 @@ public Builder setNameBytes(
          * @return Whether the tensor field is set.
          */
         public boolean hasTensor() {
    -      return tensorBuilder_ != null || tensor_ != null;
    +      return ((bitField0_ & 0x00000002) != 0);
         }
         /**
          * 
          * The client can populate a TensorProto using a tensorflow::Tensor`, or
          * directly using the protobuf field accessors.
    +     *
          * The client specifies whether the returned tensor values should be
          * filled tensor fields (float_val, int_val, etc.) or encoded in a
          * compact form in tensor.tensor_content.
    @@ -637,6 +626,7 @@ public org.tensorflow.proto.TensorProto getTensor() {
          * 
          * The client can populate a TensorProto using a tensorflow::Tensor`, or
          * directly using the protobuf field accessors.
    +     *
          * The client specifies whether the returned tensor values should be
          * filled tensor fields (float_val, int_val, etc.) or encoded in a
          * compact form in tensor.tensor_content.
    @@ -650,17 +640,18 @@ public Builder setTensor(org.tensorflow.proto.TensorProto value) {
               throw new NullPointerException();
             }
             tensor_ = value;
    -        onChanged();
           } else {
             tensorBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return this;
         }
         /**
          * 
          * The client can populate a TensorProto using a tensorflow::Tensor`, or
          * directly using the protobuf field accessors.
    +     *
          * The client specifies whether the returned tensor values should be
          * filled tensor fields (float_val, int_val, etc.) or encoded in a
          * compact form in tensor.tensor_content.
    @@ -672,17 +663,18 @@ public Builder setTensor(
             org.tensorflow.proto.TensorProto.Builder builderForValue) {
           if (tensorBuilder_ == null) {
             tensor_ = builderForValue.build();
    -        onChanged();
           } else {
             tensorBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return this;
         }
         /**
          * 
          * The client can populate a TensorProto using a tensorflow::Tensor`, or
          * directly using the protobuf field accessors.
    +     *
          * The client specifies whether the returned tensor values should be
          * filled tensor fields (float_val, int_val, etc.) or encoded in a
          * compact form in tensor.tensor_content.
    @@ -692,23 +684,27 @@ public Builder setTensor(
          */
         public Builder mergeTensor(org.tensorflow.proto.TensorProto value) {
           if (tensorBuilder_ == null) {
    -        if (tensor_ != null) {
    -          tensor_ =
    -            org.tensorflow.proto.TensorProto.newBuilder(tensor_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000002) != 0) &&
    +          tensor_ != null &&
    +          tensor_ != org.tensorflow.proto.TensorProto.getDefaultInstance()) {
    +          getTensorBuilder().mergeFrom(value);
             } else {
               tensor_ = value;
             }
    -        onChanged();
           } else {
             tensorBuilder_.mergeFrom(value);
           }
    -
    +      if (tensor_ != null) {
    +        bitField0_ |= 0x00000002;
    +        onChanged();
    +      }
           return this;
         }
         /**
          * 
          * The client can populate a TensorProto using a tensorflow::Tensor`, or
          * directly using the protobuf field accessors.
    +     *
          * The client specifies whether the returned tensor values should be
          * filled tensor fields (float_val, int_val, etc.) or encoded in a
          * compact form in tensor.tensor_content.
    @@ -717,20 +713,20 @@ public Builder mergeTensor(org.tensorflow.proto.TensorProto value) {
          * .tensorflow.TensorProto tensor = 2;
          */
         public Builder clearTensor() {
    -      if (tensorBuilder_ == null) {
    -        tensor_ = null;
    -        onChanged();
    -      } else {
    -        tensor_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000002);
    +      tensor_ = null;
    +      if (tensorBuilder_ != null) {
    +        tensorBuilder_.dispose();
             tensorBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
          * 
          * The client can populate a TensorProto using a tensorflow::Tensor`, or
          * directly using the protobuf field accessors.
    +     *
          * The client specifies whether the returned tensor values should be
          * filled tensor fields (float_val, int_val, etc.) or encoded in a
          * compact form in tensor.tensor_content.
    @@ -739,7 +735,7 @@ public Builder clearTensor() {
          * .tensorflow.TensorProto tensor = 2;
          */
         public org.tensorflow.proto.TensorProto.Builder getTensorBuilder() {
    -      
    +      bitField0_ |= 0x00000002;
           onChanged();
           return getTensorFieldBuilder().getBuilder();
         }
    @@ -747,6 +743,7 @@ public org.tensorflow.proto.TensorProto.Builder getTensorBuilder() {
          * 
          * The client can populate a TensorProto using a tensorflow::Tensor`, or
          * directly using the protobuf field accessors.
    +     *
          * The client specifies whether the returned tensor values should be
          * filled tensor fields (float_val, int_val, etc.) or encoded in a
          * compact form in tensor.tensor_content.
    @@ -766,6 +763,7 @@ public org.tensorflow.proto.TensorProtoOrBuilder getTensorOrBuilder() {
          * 
          * The client can populate a TensorProto using a tensorflow::Tensor`, or
          * directly using the protobuf field accessors.
    +     *
          * The client specifies whether the returned tensor values should be
          * filled tensor fields (float_val, int_val, etc.) or encoded in a
          * compact form in tensor.tensor_content.
    @@ -773,11 +771,11 @@ public org.tensorflow.proto.TensorProtoOrBuilder getTensorOrBuilder() {
          *
          * .tensorflow.TensorProto tensor = 2;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> 
             getTensorFieldBuilder() {
           if (tensorBuilder_ == null) {
    -        tensorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        tensorBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder>(
                     getTensor(),
                     getParentForChildren(),
    @@ -786,18 +784,6 @@ public org.tensorflow.proto.TensorProtoOrBuilder getTensorOrBuilder() {
           }
           return tensorBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.NamedTensorProto)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NamedTensorProtoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NamedTensorProtoOrBuilder.java
    index 93096b794c0..236bd5974fe 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NamedTensorProtoOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NamedTensorProtoOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/named_tensor.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -31,6 +33,7 @@ public interface NamedTensorProtoOrBuilder extends
        * 
        * The client can populate a TensorProto using a tensorflow::Tensor`, or
        * directly using the protobuf field accessors.
    +   *
        * The client specifies whether the returned tensor values should be
        * filled tensor fields (float_val, int_val, etc.) or encoded in a
        * compact form in tensor.tensor_content.
    @@ -44,6 +47,7 @@ public interface NamedTensorProtoOrBuilder extends
        * 
        * The client can populate a TensorProto using a tensorflow::Tensor`, or
        * directly using the protobuf field accessors.
    +   *
        * The client specifies whether the returned tensor values should be
        * filled tensor fields (float_val, int_val, etc.) or encoded in a
        * compact form in tensor.tensor_content.
    @@ -57,6 +61,7 @@ public interface NamedTensorProtoOrBuilder extends
        * 
        * The client can populate a TensorProto using a tensorflow::Tensor`, or
        * directly using the protobuf field accessors.
    +   *
        * The client specifies whether the returned tensor values should be
        * filled tensor fields (float_val, int_val, etc.) or encoded in a
        * compact form in tensor.tensor_content.
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NamedTensorProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NamedTensorProtos.java
    index 8b98e05145e..bbc43be0671 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NamedTensorProtos.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NamedTensorProtos.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/named_tensor.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class NamedTensorProtos {
       private NamedTensorProtos() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      NamedTensorProtos.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,7 +28,7 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_NamedTensorProto_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_NamedTensorProto_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -45,9 +56,10 @@ public static void registerAllExtensions(
         internal_static_tensorflow_NamedTensorProto_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_NamedTensorProto_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_NamedTensorProto_descriptor,
             new java.lang.String[] { "Name", "Tensor", });
    +    descriptor.resolveAllFeaturesImmutable();
         org.tensorflow.proto.TensorProtos.getDescriptor();
       }
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeDef.java
    index 2097dfee0c9..c6490a052ac 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeDef.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeDef.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/node_def.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,33 +9,31 @@
      * Protobuf type {@code tensorflow.NodeDef}
      */
     public final class NodeDef extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.NodeDef)
         NodeDefOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      NodeDef.class.getName());
    +  }
       // Use NodeDef.newBuilder() to construct.
    -  private NodeDef(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private NodeDef(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private NodeDef() {
         name_ = "";
         op_ = "";
    -    input_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +    input_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         device_ = "";
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new NodeDef();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.NodeProto.internal_static_tensorflow_NodeDef_descriptor;
    @@ -41,7 +41,7 @@ protected java.lang.Object newInstance(
     
       @SuppressWarnings({"rawtypes"})
       @java.lang.Override
    -  protected com.google.protobuf.MapField internalGetMapField(
    +  protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
           int number) {
         switch (number) {
           case 5:
    @@ -52,7 +52,7 @@ protected com.google.protobuf.MapField internalGetMapField(
         }
       }
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.NodeProto.internal_static_tensorflow_NodeDef_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -66,6 +66,7 @@ public interface ExperimentalDebugInfoOrBuilder extends
         /**
          * 
          * Opaque string inserted into error messages created by the runtime.
    +     *
          * This is intended to store the list of names of the nodes from the
          * original graph that this node was derived. For example if this node, say
          * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
    @@ -81,6 +82,7 @@ public interface ExperimentalDebugInfoOrBuilder extends
         /**
          * 
          * Opaque string inserted into error messages created by the runtime.
    +     *
          * This is intended to store the list of names of the nodes from the
          * original graph that this node was derived. For example if this node, say
          * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
    @@ -95,6 +97,7 @@ public interface ExperimentalDebugInfoOrBuilder extends
         /**
          * 
          * Opaque string inserted into error messages created by the runtime.
    +     *
          * This is intended to store the list of names of the nodes from the
          * original graph that this node was derived. For example if this node, say
          * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
    @@ -110,6 +113,7 @@ public interface ExperimentalDebugInfoOrBuilder extends
         /**
          * 
          * Opaque string inserted into error messages created by the runtime.
    +     *
          * This is intended to store the list of names of the nodes from the
          * original graph that this node was derived. For example if this node, say
          * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
    @@ -193,38 +197,37 @@ public interface ExperimentalDebugInfoOrBuilder extends
        * Protobuf type {@code tensorflow.NodeDef.ExperimentalDebugInfo}
        */
       public static final class ExperimentalDebugInfo extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.NodeDef.ExperimentalDebugInfo)
           ExperimentalDebugInfoOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        ExperimentalDebugInfo.class.getName());
    +    }
         // Use ExperimentalDebugInfo.newBuilder() to construct.
    -    private ExperimentalDebugInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private ExperimentalDebugInfo(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private ExperimentalDebugInfo() {
    -      originalNodeNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      originalFuncNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +      originalNodeNames_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
    +      originalFuncNames_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new ExperimentalDebugInfo();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.NodeProto.internal_static_tensorflow_NodeDef_ExperimentalDebugInfo_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.NodeProto.internal_static_tensorflow_NodeDef_ExperimentalDebugInfo_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -232,10 +235,13 @@ protected java.lang.Object newInstance(
         }
     
         public static final int ORIGINAL_NODE_NAMES_FIELD_NUMBER = 1;
    -    private com.google.protobuf.LazyStringList originalNodeNames_;
    +    @SuppressWarnings("serial")
    +    private com.google.protobuf.LazyStringArrayList originalNodeNames_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         /**
          * 
          * Opaque string inserted into error messages created by the runtime.
    +     *
          * This is intended to store the list of names of the nodes from the
          * original graph that this node was derived. For example if this node, say
          * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
    @@ -253,6 +259,7 @@ protected java.lang.Object newInstance(
         /**
          * 
          * Opaque string inserted into error messages created by the runtime.
    +     *
          * This is intended to store the list of names of the nodes from the
          * original graph that this node was derived. For example if this node, say
          * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
    @@ -269,6 +276,7 @@ public int getOriginalNodeNamesCount() {
         /**
          * 
          * Opaque string inserted into error messages created by the runtime.
    +     *
          * This is intended to store the list of names of the nodes from the
          * original graph that this node was derived. For example if this node, say
          * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
    @@ -286,6 +294,7 @@ public java.lang.String getOriginalNodeNames(int index) {
         /**
          * 
          * Opaque string inserted into error messages created by the runtime.
    +     *
          * This is intended to store the list of names of the nodes from the
          * original graph that this node was derived. For example if this node, say
          * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
    @@ -303,7 +312,9 @@ public java.lang.String getOriginalNodeNames(int index) {
         }
     
         public static final int ORIGINAL_FUNC_NAMES_FIELD_NUMBER = 2;
    -    private com.google.protobuf.LazyStringList originalFuncNames_;
    +    @SuppressWarnings("serial")
    +    private com.google.protobuf.LazyStringArrayList originalFuncNames_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         /**
          * 
          * This is intended to store the list of names of the functions from the
    @@ -392,10 +403,10 @@ public final boolean isInitialized() {
         public void writeTo(com.google.protobuf.CodedOutputStream output)
                             throws java.io.IOException {
           for (int i = 0; i < originalNodeNames_.size(); i++) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, originalNodeNames_.getRaw(i));
    +        com.google.protobuf.GeneratedMessage.writeString(output, 1, originalNodeNames_.getRaw(i));
           }
           for (int i = 0; i < originalFuncNames_.size(); i++) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, originalFuncNames_.getRaw(i));
    +        com.google.protobuf.GeneratedMessage.writeString(output, 2, originalFuncNames_.getRaw(i));
           }
           getUnknownFields().writeTo(output);
         }
    @@ -499,39 +510,41 @@ public static org.tensorflow.proto.NodeDef.ExperimentalDebugInfo parseFrom(
         }
         public static org.tensorflow.proto.NodeDef.ExperimentalDebugInfo parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.NodeDef.ExperimentalDebugInfo parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.NodeDef.ExperimentalDebugInfo parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.NodeDef.ExperimentalDebugInfo parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.NodeDef.ExperimentalDebugInfo parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.NodeDef.ExperimentalDebugInfo parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -551,7 +564,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -559,7 +572,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.NodeDef.ExperimentalDebugInfo}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.NodeDef.ExperimentalDebugInfo)
             org.tensorflow.proto.NodeDef.ExperimentalDebugInfoOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -568,7 +581,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.NodeProto.internal_static_tensorflow_NodeDef_ExperimentalDebugInfo_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -581,17 +594,18 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    -        originalNodeNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -        bitField0_ = (bitField0_ & ~0x00000001);
    -        originalFuncNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -        bitField0_ = (bitField0_ & ~0x00000002);
    +        bitField0_ = 0;
    +        originalNodeNames_ =
    +            com.google.protobuf.LazyStringArrayList.emptyList();
    +        originalFuncNames_ =
    +            com.google.protobuf.LazyStringArrayList.emptyList();
             return this;
           }
     
    @@ -618,53 +632,23 @@ public org.tensorflow.proto.NodeDef.ExperimentalDebugInfo build() {
           @java.lang.Override
           public org.tensorflow.proto.NodeDef.ExperimentalDebugInfo buildPartial() {
             org.tensorflow.proto.NodeDef.ExperimentalDebugInfo result = new org.tensorflow.proto.NodeDef.ExperimentalDebugInfo(this);
    -        int from_bitField0_ = bitField0_;
    -        if (((bitField0_ & 0x00000001) != 0)) {
    -          originalNodeNames_ = originalNodeNames_.getUnmodifiableView();
    -          bitField0_ = (bitField0_ & ~0x00000001);
    -        }
    -        result.originalNodeNames_ = originalNodeNames_;
    -        if (((bitField0_ & 0x00000002) != 0)) {
    -          originalFuncNames_ = originalFuncNames_.getUnmodifiableView();
    -          bitField0_ = (bitField0_ & ~0x00000002);
    -        }
    -        result.originalFuncNames_ = originalFuncNames_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.NodeDef.ExperimentalDebugInfo result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          originalNodeNames_.makeImmutable();
    +          result.originalNodeNames_ = originalNodeNames_;
    +        }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          originalFuncNames_.makeImmutable();
    +          result.originalFuncNames_ = originalFuncNames_;
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.NodeDef.ExperimentalDebugInfo) {
    @@ -680,7 +664,7 @@ public Builder mergeFrom(org.tensorflow.proto.NodeDef.ExperimentalDebugInfo othe
             if (!other.originalNodeNames_.isEmpty()) {
               if (originalNodeNames_.isEmpty()) {
                 originalNodeNames_ = other.originalNodeNames_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ |= 0x00000001;
               } else {
                 ensureOriginalNodeNamesIsMutable();
                 originalNodeNames_.addAll(other.originalNodeNames_);
    @@ -690,7 +674,7 @@ public Builder mergeFrom(org.tensorflow.proto.NodeDef.ExperimentalDebugInfo othe
             if (!other.originalFuncNames_.isEmpty()) {
               if (originalFuncNames_.isEmpty()) {
                 originalFuncNames_ = other.originalFuncNames_;
    -            bitField0_ = (bitField0_ & ~0x00000002);
    +            bitField0_ |= 0x00000002;
               } else {
                 ensureOriginalFuncNamesIsMutable();
                 originalFuncNames_.addAll(other.originalFuncNames_);
    @@ -752,16 +736,18 @@ public Builder mergeFrom(
           }
           private int bitField0_;
     
    -      private com.google.protobuf.LazyStringList originalNodeNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +      private com.google.protobuf.LazyStringArrayList originalNodeNames_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
           private void ensureOriginalNodeNamesIsMutable() {
    -        if (!((bitField0_ & 0x00000001) != 0)) {
    +        if (!originalNodeNames_.isModifiable()) {
               originalNodeNames_ = new com.google.protobuf.LazyStringArrayList(originalNodeNames_);
    -          bitField0_ |= 0x00000001;
    -         }
    +        }
    +        bitField0_ |= 0x00000001;
           }
           /**
            * 
            * Opaque string inserted into error messages created by the runtime.
    +       *
            * This is intended to store the list of names of the nodes from the
            * original graph that this node was derived. For example if this node, say
            * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
    @@ -774,11 +760,13 @@ private void ensureOriginalNodeNamesIsMutable() {
            */
           public com.google.protobuf.ProtocolStringList
               getOriginalNodeNamesList() {
    -        return originalNodeNames_.getUnmodifiableView();
    +        originalNodeNames_.makeImmutable();
    +        return originalNodeNames_;
           }
           /**
            * 
            * Opaque string inserted into error messages created by the runtime.
    +       *
            * This is intended to store the list of names of the nodes from the
            * original graph that this node was derived. For example if this node, say
            * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
    @@ -795,6 +783,7 @@ public int getOriginalNodeNamesCount() {
           /**
            * 
            * Opaque string inserted into error messages created by the runtime.
    +       *
            * This is intended to store the list of names of the nodes from the
            * original graph that this node was derived. For example if this node, say
            * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
    @@ -812,6 +801,7 @@ public java.lang.String getOriginalNodeNames(int index) {
           /**
            * 
            * Opaque string inserted into error messages created by the runtime.
    +       *
            * This is intended to store the list of names of the nodes from the
            * original graph that this node was derived. For example if this node, say
            * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
    @@ -830,6 +820,7 @@ public java.lang.String getOriginalNodeNames(int index) {
           /**
            * 
            * Opaque string inserted into error messages created by the runtime.
    +       *
            * This is intended to store the list of names of the nodes from the
            * original graph that this node was derived. For example if this node, say
            * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
    @@ -844,17 +835,17 @@ public java.lang.String getOriginalNodeNames(int index) {
            */
           public Builder setOriginalNodeNames(
               int index, java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureOriginalNodeNamesIsMutable();
    +        if (value == null) { throw new NullPointerException(); }
    +        ensureOriginalNodeNamesIsMutable();
             originalNodeNames_.set(index, value);
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
           /**
            * 
            * Opaque string inserted into error messages created by the runtime.
    +       *
            * This is intended to store the list of names of the nodes from the
            * original graph that this node was derived. For example if this node, say
            * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
    @@ -868,17 +859,17 @@ public Builder setOriginalNodeNames(
            */
           public Builder addOriginalNodeNames(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureOriginalNodeNamesIsMutable();
    +        if (value == null) { throw new NullPointerException(); }
    +        ensureOriginalNodeNamesIsMutable();
             originalNodeNames_.add(value);
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
           /**
            * 
            * Opaque string inserted into error messages created by the runtime.
    +       *
            * This is intended to store the list of names of the nodes from the
            * original graph that this node was derived. For example if this node, say
            * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
    @@ -895,12 +886,14 @@ public Builder addAllOriginalNodeNames(
             ensureOriginalNodeNamesIsMutable();
             com.google.protobuf.AbstractMessageLite.Builder.addAll(
                 values, originalNodeNames_);
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
           /**
            * 
            * Opaque string inserted into error messages created by the runtime.
    +       *
            * This is intended to store the list of names of the nodes from the
            * original graph that this node was derived. For example if this node, say
            * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
    @@ -912,14 +905,16 @@ public Builder addAllOriginalNodeNames(
            * @return This builder for chaining.
            */
           public Builder clearOriginalNodeNames() {
    -        originalNodeNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        originalNodeNames_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
    +        bitField0_ = (bitField0_ & ~0x00000001);;
             onChanged();
             return this;
           }
           /**
            * 
            * Opaque string inserted into error messages created by the runtime.
    +       *
            * This is intended to store the list of names of the nodes from the
            * original graph that this node was derived. For example if this node, say
            * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
    @@ -933,22 +928,22 @@ public Builder clearOriginalNodeNames() {
            */
           public Builder addOriginalNodeNamesBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             ensureOriginalNodeNamesIsMutable();
             originalNodeNames_.add(value);
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
     
    -      private com.google.protobuf.LazyStringList originalFuncNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +      private com.google.protobuf.LazyStringArrayList originalFuncNames_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
           private void ensureOriginalFuncNamesIsMutable() {
    -        if (!((bitField0_ & 0x00000002) != 0)) {
    +        if (!originalFuncNames_.isModifiable()) {
               originalFuncNames_ = new com.google.protobuf.LazyStringArrayList(originalFuncNames_);
    -          bitField0_ |= 0x00000002;
    -         }
    +        }
    +        bitField0_ |= 0x00000002;
           }
           /**
            * 
    @@ -966,7 +961,8 @@ private void ensureOriginalFuncNamesIsMutable() {
            */
           public com.google.protobuf.ProtocolStringList
               getOriginalFuncNamesList() {
    -        return originalFuncNames_.getUnmodifiableView();
    +        originalFuncNames_.makeImmutable();
    +        return originalFuncNames_;
           }
           /**
            * 
    @@ -1040,11 +1036,10 @@ public java.lang.String getOriginalFuncNames(int index) {
            */
           public Builder setOriginalFuncNames(
               int index, java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureOriginalFuncNamesIsMutable();
    +        if (value == null) { throw new NullPointerException(); }
    +        ensureOriginalFuncNamesIsMutable();
             originalFuncNames_.set(index, value);
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -1065,11 +1060,10 @@ public Builder setOriginalFuncNames(
            */
           public Builder addOriginalFuncNames(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureOriginalFuncNamesIsMutable();
    +        if (value == null) { throw new NullPointerException(); }
    +        ensureOriginalFuncNamesIsMutable();
             originalFuncNames_.add(value);
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -1093,6 +1087,7 @@ public Builder addAllOriginalFuncNames(
             ensureOriginalFuncNamesIsMutable();
             com.google.protobuf.AbstractMessageLite.Builder.addAll(
                 values, originalFuncNames_);
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -1111,8 +1106,9 @@ public Builder addAllOriginalFuncNames(
            * @return This builder for chaining.
            */
           public Builder clearOriginalFuncNames() {
    -        originalFuncNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -        bitField0_ = (bitField0_ & ~0x00000002);
    +        originalFuncNames_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
    +        bitField0_ = (bitField0_ & ~0x00000002);;
             onChanged();
             return this;
           }
    @@ -1133,27 +1129,14 @@ public Builder clearOriginalFuncNames() {
            */
           public Builder addOriginalFuncNamesBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             ensureOriginalFuncNamesIsMutable();
             originalFuncNames_.add(value);
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.NodeDef.ExperimentalDebugInfo)
         }
    @@ -1206,8 +1189,10 @@ public org.tensorflow.proto.NodeDef.ExperimentalDebugInfo getDefaultInstanceForT
     
       }
     
    +  private int bitField0_;
       public static final int NAME_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object name_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object name_ = "";
       /**
        * 
        * The name given to this operator. Used for naming inputs,
    @@ -1257,7 +1242,8 @@ public java.lang.String getName() {
       }
     
       public static final int OP_FIELD_NUMBER = 2;
    -  private volatile java.lang.Object op_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object op_ = "";
       /**
        * 
        * The operation name.  There may be custom parameters in attrs.
    @@ -1305,7 +1291,9 @@ public java.lang.String getOp() {
       }
     
       public static final int INPUT_FIELD_NUMBER = 3;
    -  private com.google.protobuf.LazyStringList input_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.LazyStringArrayList input_ =
    +      com.google.protobuf.LazyStringArrayList.emptyList();
       /**
        * 
        * Each input is "node:src_output" with "node" being a string name and
    @@ -1372,22 +1360,27 @@ public java.lang.String getInput(int index) {
       }
     
       public static final int DEVICE_FIELD_NUMBER = 4;
    -  private volatile java.lang.Object device_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object device_ = "";
       /**
        * 
        * A (possibly partial) specification for the device on which this
        * node should be placed.
        * The expected syntax for this string is as follows:
    +   *
        * DEVICE_SPEC ::= PARTIAL_SPEC
    +   *
        * PARTIAL_SPEC ::= ("/" CONSTRAINT) *
        * CONSTRAINT ::= ("job:" JOB_NAME)
    -   *              | ("replica:" [1-9][0-9]*)
    -   *              | ("task:" [1-9][0-9]*)
    -   *              | ("device:" [A-Za-z]* ":" ([1-9][0-9]* | "*") )
    +   * | ("replica:" [1-9][0-9]*)
    +   * | ("task:" [1-9][0-9]*)
    +   * | ("device:" [A-Za-z]* ":" ([1-9][0-9]* | "*") )
    +   *
        * Valid values for this string include:
        * * "/job:worker/replica:0/task:1/device:GPU:3"  (full specification)
        * * "/job:worker/device:GPU:3"                   (partial specification)
        * * ""                                    (no specification)
    +   *
        * If the constraints do not resolve to a single device (or if this
        * field is empty or not present), the runtime will attempt to
        * choose a device automatically.
    @@ -1414,16 +1407,20 @@ public java.lang.String getDevice() {
        * A (possibly partial) specification for the device on which this
        * node should be placed.
        * The expected syntax for this string is as follows:
    +   *
        * DEVICE_SPEC ::= PARTIAL_SPEC
    +   *
        * PARTIAL_SPEC ::= ("/" CONSTRAINT) *
        * CONSTRAINT ::= ("job:" JOB_NAME)
    -   *              | ("replica:" [1-9][0-9]*)
    -   *              | ("task:" [1-9][0-9]*)
    -   *              | ("device:" [A-Za-z]* ":" ([1-9][0-9]* | "*") )
    +   * | ("replica:" [1-9][0-9]*)
    +   * | ("task:" [1-9][0-9]*)
    +   * | ("device:" [A-Za-z]* ":" ([1-9][0-9]* | "*") )
    +   *
        * Valid values for this string include:
        * * "/job:worker/replica:0/task:1/device:GPU:3"  (full specification)
        * * "/job:worker/device:GPU:3"                   (partial specification)
        * * ""                                    (no specification)
    +   *
        * If the constraints do not resolve to a single device (or if this
        * field is empty or not present), the runtime will attempt to
        * choose a device automatically.
    @@ -1459,6 +1456,7 @@ private static final class AttrDefaultEntryHolder {
                     com.google.protobuf.WireFormat.FieldType.MESSAGE,
                     org.tensorflow.proto.AttrValue.getDefaultInstance());
       }
    +  @SuppressWarnings("serial")
       private com.google.protobuf.MapField<
           java.lang.String, org.tensorflow.proto.AttrValue> attr_;
       private com.google.protobuf.MapField
    @@ -1469,7 +1467,6 @@ private static final class AttrDefaultEntryHolder {
         }
         return attr_;
       }
    -
       public int getAttrCount() {
         return internalGetAttr().getMap().size();
       }
    @@ -1491,7 +1488,6 @@ public int getAttrCount() {
        *
        * map<string, .tensorflow.AttrValue> attr = 5;
        */
    -
       @java.lang.Override
       public boolean containsAttr(
           java.lang.String key) {
    @@ -1525,7 +1521,6 @@ public java.util.Map getAttr()
        * map<string, .tensorflow.AttrValue> attr = 5;
        */
       @java.lang.Override
    -
       public java.util.Map getAttrMap() {
         return internalGetAttr().getMap();
       }
    @@ -1548,10 +1543,11 @@ public java.util.Map getAttrMa
        * map<string, .tensorflow.AttrValue> attr = 5;
        */
       @java.lang.Override
    -
    -  public org.tensorflow.proto.AttrValue getAttrOrDefault(
    +  public /* nullable */
    +org.tensorflow.proto.AttrValue getAttrOrDefault(
           java.lang.String key,
    -      org.tensorflow.proto.AttrValue defaultValue) {
    +      /* nullable */
    +org.tensorflow.proto.AttrValue defaultValue) {
         if (key == null) { throw new NullPointerException("map key"); }
         java.util.Map map =
             internalGetAttr().getMap();
    @@ -1576,7 +1572,6 @@ public org.tensorflow.proto.AttrValue getAttrOrDefault(
        * map<string, .tensorflow.AttrValue> attr = 5;
        */
       @java.lang.Override
    -
       public org.tensorflow.proto.AttrValue getAttrOrThrow(
           java.lang.String key) {
         if (key == null) { throw new NullPointerException("map key"); }
    @@ -1600,7 +1595,7 @@ public org.tensorflow.proto.AttrValue getAttrOrThrow(
        */
       @java.lang.Override
       public boolean hasExperimentalDebugInfo() {
    -    return experimentalDebugInfo_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * 
    @@ -1623,7 +1618,7 @@ public org.tensorflow.proto.NodeDef.ExperimentalDebugInfo getExperimentalDebugIn
        */
       @java.lang.Override
       public org.tensorflow.proto.NodeDef.ExperimentalDebugInfoOrBuilder getExperimentalDebugInfoOrBuilder() {
    -    return getExperimentalDebugInfo();
    +    return experimentalDebugInfo_ == null ? org.tensorflow.proto.NodeDef.ExperimentalDebugInfo.getDefaultInstance() : experimentalDebugInfo_;
       }
     
       public static final int EXPERIMENTAL_TYPE_FIELD_NUMBER = 7;
    @@ -1641,7 +1636,7 @@ public org.tensorflow.proto.NodeDef.ExperimentalDebugInfoOrBuilder getExperiment
        */
       @java.lang.Override
       public boolean hasExperimentalType() {
    -    return experimentalType_ != null;
    +    return ((bitField0_ & 0x00000002) != 0);
       }
       /**
        * 
    @@ -1670,7 +1665,7 @@ public org.tensorflow.proto.FullTypeDef getExperimentalType() {
        */
       @java.lang.Override
       public org.tensorflow.proto.FullTypeDefOrBuilder getExperimentalTypeOrBuilder() {
    -    return getExperimentalType();
    +    return experimentalType_ == null ? org.tensorflow.proto.FullTypeDef.getDefaultInstance() : experimentalType_;
       }
     
       private byte memoizedIsInitialized = -1;
    @@ -1687,28 +1682,28 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(op_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, op_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(op_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 2, op_);
         }
         for (int i = 0; i < input_.size(); i++) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, input_.getRaw(i));
    +      com.google.protobuf.GeneratedMessage.writeString(output, 3, input_.getRaw(i));
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(device_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, device_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(device_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 4, device_);
         }
    -    com.google.protobuf.GeneratedMessageV3
    +    com.google.protobuf.GeneratedMessage
           .serializeStringMapTo(
             output,
             internalGetAttr(),
             AttrDefaultEntryHolder.defaultEntry,
             5);
    -    if (experimentalDebugInfo_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(6, getExperimentalDebugInfo());
         }
    -    if (experimentalType_ != null) {
    +    if (((bitField0_ & 0x00000002) != 0)) {
           output.writeMessage(7, getExperimentalType());
         }
         getUnknownFields().writeTo(output);
    @@ -1720,11 +1715,11 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(op_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, op_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(op_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(2, op_);
         }
         {
           int dataSize = 0;
    @@ -1734,8 +1729,8 @@ public int getSerializedSize() {
           size += dataSize;
           size += 1 * getInputList().size();
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(device_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, device_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(device_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(4, device_);
         }
         for (java.util.Map.Entry entry
              : internalGetAttr().getMap().entrySet()) {
    @@ -1747,11 +1742,11 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(5, attr__);
         }
    -    if (experimentalDebugInfo_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(6, getExperimentalDebugInfo());
         }
    -    if (experimentalType_ != null) {
    +    if (((bitField0_ & 0x00000002) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(7, getExperimentalType());
         }
    @@ -1862,39 +1857,41 @@ public static org.tensorflow.proto.NodeDef parseFrom(
       }
       public static org.tensorflow.proto.NodeDef parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.NodeDef parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.NodeDef parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.NodeDef parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.NodeDef parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.NodeDef parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -1914,7 +1911,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -1922,7 +1919,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.NodeDef}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.NodeDef)
           org.tensorflow.proto.NodeDefOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -1931,7 +1928,7 @@ public static final class Builder extends
         }
     
         @SuppressWarnings({"rawtypes"})
    -    protected com.google.protobuf.MapField internalGetMapField(
    +    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
             int number) {
           switch (number) {
             case 5:
    @@ -1942,7 +1939,7 @@ protected com.google.protobuf.MapField internalGetMapField(
           }
         }
         @SuppressWarnings({"rawtypes"})
    -    protected com.google.protobuf.MapField internalGetMutableMapField(
    +    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
             int number) {
           switch (number) {
             case 5:
    @@ -1953,7 +1950,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField(
           }
         }
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.NodeProto.internal_static_tensorflow_NodeDef_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -1962,36 +1959,39 @@ protected com.google.protobuf.MapField internalGetMutableMapField(
     
         // Construct using org.tensorflow.proto.NodeDef.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getExperimentalDebugInfoFieldBuilder();
    +        getExperimentalTypeFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           name_ = "";
    -
           op_ = "";
    -
    -      input_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      input_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
           device_ = "";
    -
           internalGetMutableAttr().clear();
    -      if (experimentalDebugInfoBuilder_ == null) {
    -        experimentalDebugInfo_ = null;
    -      } else {
    -        experimentalDebugInfo_ = null;
    +      experimentalDebugInfo_ = null;
    +      if (experimentalDebugInfoBuilder_ != null) {
    +        experimentalDebugInfoBuilder_.dispose();
             experimentalDebugInfoBuilder_ = null;
           }
    -      if (experimentalTypeBuilder_ == null) {
    -        experimentalType_ = null;
    -      } else {
    -        experimentalType_ = null;
    +      experimentalType_ = null;
    +      if (experimentalTypeBuilder_ != null) {
    +        experimentalTypeBuilder_.dispose();
             experimentalTypeBuilder_ = null;
           }
           return this;
    @@ -2020,63 +2020,45 @@ public org.tensorflow.proto.NodeDef build() {
         @java.lang.Override
         public org.tensorflow.proto.NodeDef buildPartial() {
           org.tensorflow.proto.NodeDef result = new org.tensorflow.proto.NodeDef(this);
    -      int from_bitField0_ = bitField0_;
    -      result.name_ = name_;
    -      result.op_ = op_;
    -      if (((bitField0_ & 0x00000001) != 0)) {
    -        input_ = input_.getUnmodifiableView();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    -      }
    -      result.input_ = input_;
    -      result.device_ = device_;
    -      result.attr_ = internalGetAttr();
    -      result.attr_.makeImmutable();
    -      if (experimentalDebugInfoBuilder_ == null) {
    -        result.experimentalDebugInfo_ = experimentalDebugInfo_;
    -      } else {
    -        result.experimentalDebugInfo_ = experimentalDebugInfoBuilder_.build();
    -      }
    -      if (experimentalTypeBuilder_ == null) {
    -        result.experimentalType_ = experimentalType_;
    -      } else {
    -        result.experimentalType_ = experimentalTypeBuilder_.build();
    -      }
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.NodeDef result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.name_ = name_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.op_ = op_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        input_.makeImmutable();
    +        result.input_ = input_;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.device_ = device_;
    +      }
    +      if (((from_bitField0_ & 0x00000010) != 0)) {
    +        result.attr_ = internalGetAttr().build(AttrDefaultEntryHolder.defaultEntry);
    +      }
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000020) != 0)) {
    +        result.experimentalDebugInfo_ = experimentalDebugInfoBuilder_ == null
    +            ? experimentalDebugInfo_
    +            : experimentalDebugInfoBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
    +      }
    +      if (((from_bitField0_ & 0x00000040) != 0)) {
    +        result.experimentalType_ = experimentalTypeBuilder_ == null
    +            ? experimentalType_
    +            : experimentalTypeBuilder_.build();
    +        to_bitField0_ |= 0x00000002;
    +      }
    +      result.bitField0_ |= to_bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.NodeDef) {
    @@ -2091,16 +2073,18 @@ public Builder mergeFrom(org.tensorflow.proto.NodeDef other) {
           if (other == org.tensorflow.proto.NodeDef.getDefaultInstance()) return this;
           if (!other.getName().isEmpty()) {
             name_ = other.name_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (!other.getOp().isEmpty()) {
             op_ = other.op_;
    +        bitField0_ |= 0x00000002;
             onChanged();
           }
           if (!other.input_.isEmpty()) {
             if (input_.isEmpty()) {
               input_ = other.input_;
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ |= 0x00000004;
             } else {
               ensureInputIsMutable();
               input_.addAll(other.input_);
    @@ -2109,10 +2093,12 @@ public Builder mergeFrom(org.tensorflow.proto.NodeDef other) {
           }
           if (!other.getDevice().isEmpty()) {
             device_ = other.device_;
    +        bitField0_ |= 0x00000008;
             onChanged();
           }
           internalGetMutableAttr().mergeFrom(
               other.internalGetAttr());
    +      bitField0_ |= 0x00000010;
           if (other.hasExperimentalDebugInfo()) {
             mergeExperimentalDebugInfo(other.getExperimentalDebugInfo());
           }
    @@ -2147,12 +2133,12 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   name_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
                   op_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 case 26: {
    @@ -2163,29 +2149,30 @@ public Builder mergeFrom(
                 } // case 26
                 case 34: {
                   device_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 34
                 case 42: {
                   com.google.protobuf.MapEntry
                   attr__ = input.readMessage(
                       AttrDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
    -              internalGetMutableAttr().getMutableMap().put(
    +              internalGetMutableAttr().ensureBuilderMap().put(
                       attr__.getKey(), attr__.getValue());
    +              bitField0_ |= 0x00000010;
                   break;
                 } // case 42
                 case 50: {
                   input.readMessage(
                       getExperimentalDebugInfoFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000020;
                   break;
                 } // case 50
                 case 58: {
                   input.readMessage(
                       getExperimentalTypeFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000040;
                   break;
                 } // case 58
                 default: {
    @@ -2264,11 +2251,9 @@ public java.lang.String getName() {
          */
         public Builder setName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           name_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -2283,8 +2268,8 @@ public Builder setName(
          * @return This builder for chaining.
          */
         public Builder clearName() {
    -      
           name_ = getDefaultInstance().getName();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -2301,12 +2286,10 @@ public Builder clearName() {
          */
         public Builder setNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           name_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -2367,11 +2350,9 @@ public java.lang.String getOp() {
          */
         public Builder setOp(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           op_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -2385,8 +2366,8 @@ public Builder setOp(
          * @return This builder for chaining.
          */
         public Builder clearOp() {
    -      
           op_ = getDefaultInstance().getOp();
    +      bitField0_ = (bitField0_ & ~0x00000002);
           onChanged();
           return this;
         }
    @@ -2402,22 +2383,21 @@ public Builder clearOp() {
          */
         public Builder setOpBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           op_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
     
    -    private com.google.protobuf.LazyStringList input_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +    private com.google.protobuf.LazyStringArrayList input_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         private void ensureInputIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    +      if (!input_.isModifiable()) {
             input_ = new com.google.protobuf.LazyStringArrayList(input_);
    -        bitField0_ |= 0x00000001;
    -       }
    +      }
    +      bitField0_ |= 0x00000004;
         }
         /**
          * 
    @@ -2433,7 +2413,8 @@ private void ensureInputIsMutable() {
          */
         public com.google.protobuf.ProtocolStringList
             getInputList() {
    -      return input_.getUnmodifiableView();
    +      input_.makeImmutable();
    +      return input_;
         }
         /**
          * 
    @@ -2499,11 +2480,10 @@ public java.lang.String getInput(int index) {
          */
         public Builder setInput(
             int index, java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureInputIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureInputIsMutable();
           input_.set(index, value);
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -2522,11 +2502,10 @@ public Builder setInput(
          */
         public Builder addInput(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureInputIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureInputIsMutable();
           input_.add(value);
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -2548,6 +2527,7 @@ public Builder addAllInput(
           ensureInputIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, input_);
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -2564,8 +2544,9 @@ public Builder addAllInput(
          * @return This builder for chaining.
          */
         public Builder clearInput() {
    -      input_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      input_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
    +      bitField0_ = (bitField0_ & ~0x00000004);;
           onChanged();
           return this;
         }
    @@ -2584,12 +2565,11 @@ public Builder clearInput() {
          */
         public Builder addInputBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           ensureInputIsMutable();
           input_.add(value);
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -2600,16 +2580,20 @@ public Builder addInputBytes(
          * A (possibly partial) specification for the device on which this
          * node should be placed.
          * The expected syntax for this string is as follows:
    +     *
          * DEVICE_SPEC ::= PARTIAL_SPEC
    +     *
          * PARTIAL_SPEC ::= ("/" CONSTRAINT) *
          * CONSTRAINT ::= ("job:" JOB_NAME)
    -     *              | ("replica:" [1-9][0-9]*)
    -     *              | ("task:" [1-9][0-9]*)
    -     *              | ("device:" [A-Za-z]* ":" ([1-9][0-9]* | "*") )
    +     * | ("replica:" [1-9][0-9]*)
    +     * | ("task:" [1-9][0-9]*)
    +     * | ("device:" [A-Za-z]* ":" ([1-9][0-9]* | "*") )
    +     *
          * Valid values for this string include:
          * * "/job:worker/replica:0/task:1/device:GPU:3"  (full specification)
          * * "/job:worker/device:GPU:3"                   (partial specification)
          * * ""                                    (no specification)
    +     *
          * If the constraints do not resolve to a single device (or if this
          * field is empty or not present), the runtime will attempt to
          * choose a device automatically.
    @@ -2635,16 +2619,20 @@ public java.lang.String getDevice() {
          * A (possibly partial) specification for the device on which this
          * node should be placed.
          * The expected syntax for this string is as follows:
    +     *
          * DEVICE_SPEC ::= PARTIAL_SPEC
    +     *
          * PARTIAL_SPEC ::= ("/" CONSTRAINT) *
          * CONSTRAINT ::= ("job:" JOB_NAME)
    -     *              | ("replica:" [1-9][0-9]*)
    -     *              | ("task:" [1-9][0-9]*)
    -     *              | ("device:" [A-Za-z]* ":" ([1-9][0-9]* | "*") )
    +     * | ("replica:" [1-9][0-9]*)
    +     * | ("task:" [1-9][0-9]*)
    +     * | ("device:" [A-Za-z]* ":" ([1-9][0-9]* | "*") )
    +     *
          * Valid values for this string include:
          * * "/job:worker/replica:0/task:1/device:GPU:3"  (full specification)
          * * "/job:worker/device:GPU:3"                   (partial specification)
          * * ""                                    (no specification)
    +     *
          * If the constraints do not resolve to a single device (or if this
          * field is empty or not present), the runtime will attempt to
          * choose a device automatically.
    @@ -2671,16 +2659,20 @@ public java.lang.String getDevice() {
          * A (possibly partial) specification for the device on which this
          * node should be placed.
          * The expected syntax for this string is as follows:
    +     *
          * DEVICE_SPEC ::= PARTIAL_SPEC
    +     *
          * PARTIAL_SPEC ::= ("/" CONSTRAINT) *
          * CONSTRAINT ::= ("job:" JOB_NAME)
    -     *              | ("replica:" [1-9][0-9]*)
    -     *              | ("task:" [1-9][0-9]*)
    -     *              | ("device:" [A-Za-z]* ":" ([1-9][0-9]* | "*") )
    +     * | ("replica:" [1-9][0-9]*)
    +     * | ("task:" [1-9][0-9]*)
    +     * | ("device:" [A-Za-z]* ":" ([1-9][0-9]* | "*") )
    +     *
          * Valid values for this string include:
          * * "/job:worker/replica:0/task:1/device:GPU:3"  (full specification)
          * * "/job:worker/device:GPU:3"                   (partial specification)
          * * ""                                    (no specification)
    +     *
          * If the constraints do not resolve to a single device (or if this
          * field is empty or not present), the runtime will attempt to
          * choose a device automatically.
    @@ -2692,11 +2684,9 @@ public java.lang.String getDevice() {
          */
         public Builder setDevice(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           device_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -2705,16 +2695,20 @@ public Builder setDevice(
          * A (possibly partial) specification for the device on which this
          * node should be placed.
          * The expected syntax for this string is as follows:
    +     *
          * DEVICE_SPEC ::= PARTIAL_SPEC
    +     *
          * PARTIAL_SPEC ::= ("/" CONSTRAINT) *
          * CONSTRAINT ::= ("job:" JOB_NAME)
    -     *              | ("replica:" [1-9][0-9]*)
    -     *              | ("task:" [1-9][0-9]*)
    -     *              | ("device:" [A-Za-z]* ":" ([1-9][0-9]* | "*") )
    +     * | ("replica:" [1-9][0-9]*)
    +     * | ("task:" [1-9][0-9]*)
    +     * | ("device:" [A-Za-z]* ":" ([1-9][0-9]* | "*") )
    +     *
          * Valid values for this string include:
          * * "/job:worker/replica:0/task:1/device:GPU:3"  (full specification)
          * * "/job:worker/device:GPU:3"                   (partial specification)
          * * ""                                    (no specification)
    +     *
          * If the constraints do not resolve to a single device (or if this
          * field is empty or not present), the runtime will attempt to
          * choose a device automatically.
    @@ -2724,8 +2718,8 @@ public Builder setDevice(
          * @return This builder for chaining.
          */
         public Builder clearDevice() {
    -      
           device_ = getDefaultInstance().getDevice();
    +      bitField0_ = (bitField0_ & ~0x00000008);
           onChanged();
           return this;
         }
    @@ -2734,16 +2728,20 @@ public Builder clearDevice() {
          * A (possibly partial) specification for the device on which this
          * node should be placed.
          * The expected syntax for this string is as follows:
    +     *
          * DEVICE_SPEC ::= PARTIAL_SPEC
    +     *
          * PARTIAL_SPEC ::= ("/" CONSTRAINT) *
          * CONSTRAINT ::= ("job:" JOB_NAME)
    -     *              | ("replica:" [1-9][0-9]*)
    -     *              | ("task:" [1-9][0-9]*)
    -     *              | ("device:" [A-Za-z]* ":" ([1-9][0-9]* | "*") )
    +     * | ("replica:" [1-9][0-9]*)
    +     * | ("task:" [1-9][0-9]*)
    +     * | ("device:" [A-Za-z]* ":" ([1-9][0-9]* | "*") )
    +     *
          * Valid values for this string include:
          * * "/job:worker/replica:0/task:1/device:GPU:3"  (full specification)
          * * "/job:worker/device:GPU:3"                   (partial specification)
          * * ""                                    (no specification)
    +     *
          * If the constraints do not resolve to a single device (or if this
          * field is empty or not present), the runtime will attempt to
          * choose a device automatically.
    @@ -2755,41 +2753,48 @@ public Builder clearDevice() {
          */
         public Builder setDeviceBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           device_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
     
    -    private com.google.protobuf.MapField<
    -        java.lang.String, org.tensorflow.proto.AttrValue> attr_;
    -    private com.google.protobuf.MapField
    -    internalGetAttr() {
    +    private static final class AttrConverter implements com.google.protobuf.MapFieldBuilder.Converter {
    +      @java.lang.Override
    +      public org.tensorflow.proto.AttrValue build(org.tensorflow.proto.AttrValueOrBuilder val) {
    +        if (val instanceof org.tensorflow.proto.AttrValue) { return (org.tensorflow.proto.AttrValue) val; }
    +        return ((org.tensorflow.proto.AttrValue.Builder) val).build();
    +      }
    +
    +      @java.lang.Override
    +      public com.google.protobuf.MapEntry defaultEntry() {
    +        return AttrDefaultEntryHolder.defaultEntry;
    +      }
    +    };
    +    private static final AttrConverter attrConverter = new AttrConverter();
    +
    +    private com.google.protobuf.MapFieldBuilder<
    +        java.lang.String, org.tensorflow.proto.AttrValueOrBuilder, org.tensorflow.proto.AttrValue, org.tensorflow.proto.AttrValue.Builder> attr_;
    +    private com.google.protobuf.MapFieldBuilder
    +        internalGetAttr() {
           if (attr_ == null) {
    -        return com.google.protobuf.MapField.emptyMapField(
    -            AttrDefaultEntryHolder.defaultEntry);
    +        return new com.google.protobuf.MapFieldBuilder<>(attrConverter);
           }
           return attr_;
         }
    -    private com.google.protobuf.MapField
    -    internalGetMutableAttr() {
    -      onChanged();;
    +    private com.google.protobuf.MapFieldBuilder
    +        internalGetMutableAttr() {
           if (attr_ == null) {
    -        attr_ = com.google.protobuf.MapField.newMapField(
    -            AttrDefaultEntryHolder.defaultEntry);
    -      }
    -      if (!attr_.isMutable()) {
    -        attr_ = attr_.copy();
    +        attr_ = new com.google.protobuf.MapFieldBuilder<>(attrConverter);
           }
    +      bitField0_ |= 0x00000010;
    +      onChanged();
           return attr_;
         }
    -
         public int getAttrCount() {
    -      return internalGetAttr().getMap().size();
    +      return internalGetAttr().ensureBuilderMap().size();
         }
         /**
          * 
    @@ -2809,12 +2814,11 @@ public int getAttrCount() {
          *
          * map<string, .tensorflow.AttrValue> attr = 5;
          */
    -
         @java.lang.Override
         public boolean containsAttr(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      return internalGetAttr().getMap().containsKey(key);
    +      return internalGetAttr().ensureBuilderMap().containsKey(key);
         }
         /**
          * Use {@link #getAttrMap()} instead.
    @@ -2843,9 +2847,8 @@ public java.util.Map getAttr()
          * map<string, .tensorflow.AttrValue> attr = 5;
          */
         @java.lang.Override
    -
         public java.util.Map getAttrMap() {
    -      return internalGetAttr().getMap();
    +      return internalGetAttr().getImmutableMap();
         }
         /**
          * 
    @@ -2866,14 +2869,14 @@ public java.util.Map getAttrMa
          * map<string, .tensorflow.AttrValue> attr = 5;
          */
         @java.lang.Override
    -
    -    public org.tensorflow.proto.AttrValue getAttrOrDefault(
    +    public /* nullable */
    +org.tensorflow.proto.AttrValue getAttrOrDefault(
             java.lang.String key,
    -        org.tensorflow.proto.AttrValue defaultValue) {
    +        /* nullable */
    +org.tensorflow.proto.AttrValue defaultValue) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      java.util.Map map =
    -          internalGetAttr().getMap();
    -      return map.containsKey(key) ? map.get(key) : defaultValue;
    +      java.util.Map map = internalGetMutableAttr().ensureBuilderMap();
    +      return map.containsKey(key) ? attrConverter.build(map.get(key)) : defaultValue;
         }
         /**
          * 
    @@ -2894,21 +2897,18 @@ public org.tensorflow.proto.AttrValue getAttrOrDefault(
          * map<string, .tensorflow.AttrValue> attr = 5;
          */
         @java.lang.Override
    -
         public org.tensorflow.proto.AttrValue getAttrOrThrow(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      java.util.Map map =
    -          internalGetAttr().getMap();
    +      java.util.Map map = internalGetMutableAttr().ensureBuilderMap();
           if (!map.containsKey(key)) {
             throw new java.lang.IllegalArgumentException();
           }
    -      return map.get(key);
    +      return attrConverter.build(map.get(key));
         }
    -
         public Builder clearAttr() {
    -      internalGetMutableAttr().getMutableMap()
    -          .clear();
    +      bitField0_ = (bitField0_ & ~0x00000010);
    +      internalGetMutableAttr().clear();
           return this;
         }
         /**
    @@ -2929,11 +2929,10 @@ public Builder clearAttr() {
          *
          * map<string, .tensorflow.AttrValue> attr = 5;
          */
    -
         public Builder removeAttr(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      internalGetMutableAttr().getMutableMap()
    +      internalGetMutableAttr().ensureBuilderMap()
               .remove(key);
           return this;
         }
    @@ -2942,8 +2941,9 @@ public Builder removeAttr(
          */
         @java.lang.Deprecated
         public java.util.Map
    -    getMutableAttr() {
    -      return internalGetMutableAttr().getMutableMap();
    +        getMutableAttr() {
    +      bitField0_ |= 0x00000010;
    +      return internalGetMutableAttr().ensureMessageMap();
         }
         /**
          * 
    @@ -2967,12 +2967,10 @@ public Builder putAttr(
             java.lang.String key,
             org.tensorflow.proto.AttrValue value) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      if (value == null) {
    -  throw new NullPointerException("map value");
    -}
    -
    -      internalGetMutableAttr().getMutableMap()
    +      if (value == null) { throw new NullPointerException("map value"); }
    +      internalGetMutableAttr().ensureBuilderMap()
               .put(key, value);
    +      bitField0_ |= 0x00000010;
           return this;
         }
         /**
    @@ -2993,16 +2991,53 @@ public Builder putAttr(
          *
          * map<string, .tensorflow.AttrValue> attr = 5;
          */
    -
         public Builder putAllAttr(
             java.util.Map values) {
    -      internalGetMutableAttr().getMutableMap()
    +      for (java.util.Map.Entry e : values.entrySet()) {
    +        if (e.getKey() == null || e.getValue() == null) {
    +          throw new NullPointerException();
    +        }
    +      }
    +      internalGetMutableAttr().ensureBuilderMap()
               .putAll(values);
    +      bitField0_ |= 0x00000010;
           return this;
         }
    +    /**
    +     * 
    +     * Operation-specific graph-construction-time configuration.
    +     * Note that this should include all attrs defined in the
    +     * corresponding OpDef, including those with a value matching
    +     * the default -- this allows the default to change and makes
    +     * NodeDefs easier to interpret on their own.  However, if
    +     * an attr with a default is not specified in this list, the
    +     * default will be used.
    +     * The "names" (keys) must match the regexp "[a-z][a-z0-9_]+" (and
    +     * one of the names from the corresponding OpDef's attr field).
    +     * The values must have a type matching the corresponding OpDef
    +     * attr's type field.
    +     * TODO(josh11b): Add some examples here showing best practices.
    +     * 
    + * + * map<string, .tensorflow.AttrValue> attr = 5; + */ + public org.tensorflow.proto.AttrValue.Builder putAttrBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableAttr().ensureBuilderMap(); + org.tensorflow.proto.AttrValueOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = org.tensorflow.proto.AttrValue.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof org.tensorflow.proto.AttrValue) { + entry = ((org.tensorflow.proto.AttrValue) entry).toBuilder(); + builderMap.put(key, entry); + } + return (org.tensorflow.proto.AttrValue.Builder) entry; + } private org.tensorflow.proto.NodeDef.ExperimentalDebugInfo experimentalDebugInfo_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.NodeDef.ExperimentalDebugInfo, org.tensorflow.proto.NodeDef.ExperimentalDebugInfo.Builder, org.tensorflow.proto.NodeDef.ExperimentalDebugInfoOrBuilder> experimentalDebugInfoBuilder_; /** *
    @@ -3013,7 +3048,7 @@ public Builder putAllAttr(
          * @return Whether the experimentalDebugInfo field is set.
          */
         public boolean hasExperimentalDebugInfo() {
    -      return experimentalDebugInfoBuilder_ != null || experimentalDebugInfo_ != null;
    +      return ((bitField0_ & 0x00000020) != 0);
         }
         /**
          * 
    @@ -3043,11 +3078,11 @@ public Builder setExperimentalDebugInfo(org.tensorflow.proto.NodeDef.Experimenta
               throw new NullPointerException();
             }
             experimentalDebugInfo_ = value;
    -        onChanged();
           } else {
             experimentalDebugInfoBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000020;
    +      onChanged();
           return this;
         }
         /**
    @@ -3061,11 +3096,11 @@ public Builder setExperimentalDebugInfo(
             org.tensorflow.proto.NodeDef.ExperimentalDebugInfo.Builder builderForValue) {
           if (experimentalDebugInfoBuilder_ == null) {
             experimentalDebugInfo_ = builderForValue.build();
    -        onChanged();
           } else {
             experimentalDebugInfoBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000020;
    +      onChanged();
           return this;
         }
         /**
    @@ -3077,17 +3112,20 @@ public Builder setExperimentalDebugInfo(
          */
         public Builder mergeExperimentalDebugInfo(org.tensorflow.proto.NodeDef.ExperimentalDebugInfo value) {
           if (experimentalDebugInfoBuilder_ == null) {
    -        if (experimentalDebugInfo_ != null) {
    -          experimentalDebugInfo_ =
    -            org.tensorflow.proto.NodeDef.ExperimentalDebugInfo.newBuilder(experimentalDebugInfo_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000020) != 0) &&
    +          experimentalDebugInfo_ != null &&
    +          experimentalDebugInfo_ != org.tensorflow.proto.NodeDef.ExperimentalDebugInfo.getDefaultInstance()) {
    +          getExperimentalDebugInfoBuilder().mergeFrom(value);
             } else {
               experimentalDebugInfo_ = value;
             }
    -        onChanged();
           } else {
             experimentalDebugInfoBuilder_.mergeFrom(value);
           }
    -
    +      if (experimentalDebugInfo_ != null) {
    +        bitField0_ |= 0x00000020;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -3098,14 +3136,13 @@ public Builder mergeExperimentalDebugInfo(org.tensorflow.proto.NodeDef.Experimen
          * .tensorflow.NodeDef.ExperimentalDebugInfo experimental_debug_info = 6;
          */
         public Builder clearExperimentalDebugInfo() {
    -      if (experimentalDebugInfoBuilder_ == null) {
    -        experimentalDebugInfo_ = null;
    -        onChanged();
    -      } else {
    -        experimentalDebugInfo_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000020);
    +      experimentalDebugInfo_ = null;
    +      if (experimentalDebugInfoBuilder_ != null) {
    +        experimentalDebugInfoBuilder_.dispose();
             experimentalDebugInfoBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -3116,7 +3153,7 @@ public Builder clearExperimentalDebugInfo() {
          * .tensorflow.NodeDef.ExperimentalDebugInfo experimental_debug_info = 6;
          */
         public org.tensorflow.proto.NodeDef.ExperimentalDebugInfo.Builder getExperimentalDebugInfoBuilder() {
    -      
    +      bitField0_ |= 0x00000020;
           onChanged();
           return getExperimentalDebugInfoFieldBuilder().getBuilder();
         }
    @@ -3142,11 +3179,11 @@ public org.tensorflow.proto.NodeDef.ExperimentalDebugInfoOrBuilder getExperiment
          *
          * .tensorflow.NodeDef.ExperimentalDebugInfo experimental_debug_info = 6;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.NodeDef.ExperimentalDebugInfo, org.tensorflow.proto.NodeDef.ExperimentalDebugInfo.Builder, org.tensorflow.proto.NodeDef.ExperimentalDebugInfoOrBuilder> 
             getExperimentalDebugInfoFieldBuilder() {
           if (experimentalDebugInfoBuilder_ == null) {
    -        experimentalDebugInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        experimentalDebugInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.NodeDef.ExperimentalDebugInfo, org.tensorflow.proto.NodeDef.ExperimentalDebugInfo.Builder, org.tensorflow.proto.NodeDef.ExperimentalDebugInfoOrBuilder>(
                     getExperimentalDebugInfo(),
                     getParentForChildren(),
    @@ -3157,7 +3194,7 @@ public org.tensorflow.proto.NodeDef.ExperimentalDebugInfoOrBuilder getExperiment
         }
     
         private org.tensorflow.proto.FullTypeDef experimentalType_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.FullTypeDef, org.tensorflow.proto.FullTypeDef.Builder, org.tensorflow.proto.FullTypeDefOrBuilder> experimentalTypeBuilder_;
         /**
          * 
    @@ -3171,7 +3208,7 @@ public org.tensorflow.proto.NodeDef.ExperimentalDebugInfoOrBuilder getExperiment
          * @return Whether the experimentalType field is set.
          */
         public boolean hasExperimentalType() {
    -      return experimentalTypeBuilder_ != null || experimentalType_ != null;
    +      return ((bitField0_ & 0x00000040) != 0);
         }
         /**
          * 
    @@ -3207,11 +3244,11 @@ public Builder setExperimentalType(org.tensorflow.proto.FullTypeDef value) {
               throw new NullPointerException();
             }
             experimentalType_ = value;
    -        onChanged();
           } else {
             experimentalTypeBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000040;
    +      onChanged();
           return this;
         }
         /**
    @@ -3228,11 +3265,11 @@ public Builder setExperimentalType(
             org.tensorflow.proto.FullTypeDef.Builder builderForValue) {
           if (experimentalTypeBuilder_ == null) {
             experimentalType_ = builderForValue.build();
    -        onChanged();
           } else {
             experimentalTypeBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000040;
    +      onChanged();
           return this;
         }
         /**
    @@ -3247,17 +3284,20 @@ public Builder setExperimentalType(
          */
         public Builder mergeExperimentalType(org.tensorflow.proto.FullTypeDef value) {
           if (experimentalTypeBuilder_ == null) {
    -        if (experimentalType_ != null) {
    -          experimentalType_ =
    -            org.tensorflow.proto.FullTypeDef.newBuilder(experimentalType_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000040) != 0) &&
    +          experimentalType_ != null &&
    +          experimentalType_ != org.tensorflow.proto.FullTypeDef.getDefaultInstance()) {
    +          getExperimentalTypeBuilder().mergeFrom(value);
             } else {
               experimentalType_ = value;
             }
    -        onChanged();
           } else {
             experimentalTypeBuilder_.mergeFrom(value);
           }
    -
    +      if (experimentalType_ != null) {
    +        bitField0_ |= 0x00000040;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -3271,14 +3311,13 @@ public Builder mergeExperimentalType(org.tensorflow.proto.FullTypeDef value) {
          * .tensorflow.FullTypeDef experimental_type = 7;
          */
         public Builder clearExperimentalType() {
    -      if (experimentalTypeBuilder_ == null) {
    -        experimentalType_ = null;
    -        onChanged();
    -      } else {
    -        experimentalType_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000040);
    +      experimentalType_ = null;
    +      if (experimentalTypeBuilder_ != null) {
    +        experimentalTypeBuilder_.dispose();
             experimentalTypeBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -3292,7 +3331,7 @@ public Builder clearExperimentalType() {
          * .tensorflow.FullTypeDef experimental_type = 7;
          */
         public org.tensorflow.proto.FullTypeDef.Builder getExperimentalTypeBuilder() {
    -      
    +      bitField0_ |= 0x00000040;
           onChanged();
           return getExperimentalTypeFieldBuilder().getBuilder();
         }
    @@ -3324,11 +3363,11 @@ public org.tensorflow.proto.FullTypeDefOrBuilder getExperimentalTypeOrBuilder()
          *
          * .tensorflow.FullTypeDef experimental_type = 7;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.FullTypeDef, org.tensorflow.proto.FullTypeDef.Builder, org.tensorflow.proto.FullTypeDefOrBuilder> 
             getExperimentalTypeFieldBuilder() {
           if (experimentalTypeBuilder_ == null) {
    -        experimentalTypeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        experimentalTypeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.FullTypeDef, org.tensorflow.proto.FullTypeDef.Builder, org.tensorflow.proto.FullTypeDefOrBuilder>(
                     getExperimentalType(),
                     getParentForChildren(),
    @@ -3337,18 +3376,6 @@ public org.tensorflow.proto.FullTypeDefOrBuilder getExperimentalTypeOrBuilder()
           }
           return experimentalTypeBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.NodeDef)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeDefOrBuilder.java
    index d45520f0666..481d28e251a 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeDefOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeDefOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/node_def.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -115,16 +117,20 @@ public interface NodeDefOrBuilder extends
        * A (possibly partial) specification for the device on which this
        * node should be placed.
        * The expected syntax for this string is as follows:
    +   *
        * DEVICE_SPEC ::= PARTIAL_SPEC
    +   *
        * PARTIAL_SPEC ::= ("/" CONSTRAINT) *
        * CONSTRAINT ::= ("job:" JOB_NAME)
    -   *              | ("replica:" [1-9][0-9]*)
    -   *              | ("task:" [1-9][0-9]*)
    -   *              | ("device:" [A-Za-z]* ":" ([1-9][0-9]* | "*") )
    +   * | ("replica:" [1-9][0-9]*)
    +   * | ("task:" [1-9][0-9]*)
    +   * | ("device:" [A-Za-z]* ":" ([1-9][0-9]* | "*") )
    +   *
        * Valid values for this string include:
        * * "/job:worker/replica:0/task:1/device:GPU:3"  (full specification)
        * * "/job:worker/device:GPU:3"                   (partial specification)
        * * ""                                    (no specification)
    +   *
        * If the constraints do not resolve to a single device (or if this
        * field is empty or not present), the runtime will attempt to
        * choose a device automatically.
    @@ -139,16 +145,20 @@ public interface NodeDefOrBuilder extends
        * A (possibly partial) specification for the device on which this
        * node should be placed.
        * The expected syntax for this string is as follows:
    +   *
        * DEVICE_SPEC ::= PARTIAL_SPEC
    +   *
        * PARTIAL_SPEC ::= ("/" CONSTRAINT) *
        * CONSTRAINT ::= ("job:" JOB_NAME)
    -   *              | ("replica:" [1-9][0-9]*)
    -   *              | ("task:" [1-9][0-9]*)
    -   *              | ("device:" [A-Za-z]* ":" ([1-9][0-9]* | "*") )
    +   * | ("replica:" [1-9][0-9]*)
    +   * | ("task:" [1-9][0-9]*)
    +   * | ("device:" [A-Za-z]* ":" ([1-9][0-9]* | "*") )
    +   *
        * Valid values for this string include:
        * * "/job:worker/replica:0/task:1/device:GPU:3"  (full specification)
        * * "/job:worker/device:GPU:3"                   (partial specification)
        * * ""                                    (no specification)
    +   *
        * If the constraints do not resolve to a single device (or if this
        * field is empty or not present), the runtime will attempt to
        * choose a device automatically.
    @@ -243,7 +253,6 @@ boolean containsAttr(
        *
        * map<string, .tensorflow.AttrValue> attr = 5;
        */
    -
       /* nullable */
     org.tensorflow.proto.AttrValue getAttrOrDefault(
           java.lang.String key,
    @@ -267,7 +276,6 @@ org.tensorflow.proto.AttrValue getAttrOrDefault(
        *
        * map<string, .tensorflow.AttrValue> attr = 5;
        */
    -
       org.tensorflow.proto.AttrValue getAttrOrThrow(
           java.lang.String key);
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeExecStats.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeExecStats.java
    index 1e8c3783451..64c5fad07c0 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeExecStats.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeExecStats.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/step_stats.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,12 +13,21 @@
      * Protobuf type {@code tensorflow.NodeExecStats}
      */
     public final class NodeExecStats extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.NodeExecStats)
         NodeExecStatsOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      NodeExecStats.class.getName());
    +  }
       // Use NodeExecStats.newBuilder() to construct.
    -  private NodeExecStats(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private NodeExecStats(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private NodeExecStats() {
    @@ -27,33 +38,23 @@ private NodeExecStats() {
         referencedTensor_ = java.util.Collections.emptyList();
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new NodeExecStats();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.StepStatsProtos.internal_static_tensorflow_NodeExecStats_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.StepStatsProtos.internal_static_tensorflow_NodeExecStats_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
                 org.tensorflow.proto.NodeExecStats.class, org.tensorflow.proto.NodeExecStats.Builder.class);
       }
     
    +  private int bitField0_;
       public static final int NODE_NAME_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object nodeName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object nodeName_ = "";
       /**
        * 
        * TODO(tucker): Use some more compact form of node identity than
    @@ -105,7 +106,7 @@ public java.lang.String getNodeName() {
       }
     
       public static final int ALL_START_MICROS_FIELD_NUMBER = 2;
    -  private long allStartMicros_;
    +  private long allStartMicros_ = 0L;
       /**
        * int64 all_start_micros = 2;
        * @return The allStartMicros.
    @@ -116,7 +117,7 @@ public long getAllStartMicros() {
       }
     
       public static final int OP_START_REL_MICROS_FIELD_NUMBER = 3;
    -  private long opStartRelMicros_;
    +  private long opStartRelMicros_ = 0L;
       /**
        * int64 op_start_rel_micros = 3;
        * @return The opStartRelMicros.
    @@ -127,7 +128,7 @@ public long getOpStartRelMicros() {
       }
     
       public static final int OP_END_REL_MICROS_FIELD_NUMBER = 4;
    -  private long opEndRelMicros_;
    +  private long opEndRelMicros_ = 0L;
       /**
        * int64 op_end_rel_micros = 4;
        * @return The opEndRelMicros.
    @@ -138,7 +139,7 @@ public long getOpEndRelMicros() {
       }
     
       public static final int ALL_END_REL_MICROS_FIELD_NUMBER = 5;
    -  private long allEndRelMicros_;
    +  private long allEndRelMicros_ = 0L;
       /**
        * int64 all_end_rel_micros = 5;
        * @return The allEndRelMicros.
    @@ -149,6 +150,7 @@ public long getAllEndRelMicros() {
       }
     
       public static final int MEMORY_FIELD_NUMBER = 6;
    +  @SuppressWarnings("serial")
       private java.util.List memory_;
       /**
        * repeated .tensorflow.AllocatorMemoryUsed memory = 6;
    @@ -189,6 +191,7 @@ public org.tensorflow.proto.AllocatorMemoryUsedOrBuilder getMemoryOrBuilder(
       }
     
       public static final int OUTPUT_FIELD_NUMBER = 7;
    +  @SuppressWarnings("serial")
       private java.util.List output_;
       /**
        * repeated .tensorflow.NodeOutput output = 7;
    @@ -229,7 +232,8 @@ public org.tensorflow.proto.NodeOutputOrBuilder getOutputOrBuilder(
       }
     
       public static final int TIMELINE_LABEL_FIELD_NUMBER = 8;
    -  private volatile java.lang.Object timelineLabel_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object timelineLabel_ = "";
       /**
        * string timeline_label = 8;
        * @return The timelineLabel.
    @@ -267,7 +271,7 @@ public java.lang.String getTimelineLabel() {
       }
     
       public static final int SCHEDULED_MICROS_FIELD_NUMBER = 9;
    -  private long scheduledMicros_;
    +  private long scheduledMicros_ = 0L;
       /**
        * int64 scheduled_micros = 9;
        * @return The scheduledMicros.
    @@ -278,7 +282,7 @@ public long getScheduledMicros() {
       }
     
       public static final int THREAD_ID_FIELD_NUMBER = 10;
    -  private int threadId_;
    +  private int threadId_ = 0;
       /**
        * uint32 thread_id = 10;
        * @return The threadId.
    @@ -289,6 +293,7 @@ public int getThreadId() {
       }
     
       public static final int REFERENCED_TENSOR_FIELD_NUMBER = 11;
    +  @SuppressWarnings("serial")
       private java.util.List referencedTensor_;
       /**
        * repeated .tensorflow.AllocationDescription referenced_tensor = 11;
    @@ -336,7 +341,7 @@ public org.tensorflow.proto.AllocationDescriptionOrBuilder getReferencedTensorOr
        */
       @java.lang.Override
       public boolean hasMemoryStats() {
    -    return memoryStats_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * .tensorflow.MemoryStats memory_stats = 12;
    @@ -351,11 +356,11 @@ public org.tensorflow.proto.MemoryStats getMemoryStats() {
        */
       @java.lang.Override
       public org.tensorflow.proto.MemoryStatsOrBuilder getMemoryStatsOrBuilder() {
    -    return getMemoryStats();
    +    return memoryStats_ == null ? org.tensorflow.proto.MemoryStats.getDefaultInstance() : memoryStats_;
       }
     
       public static final int ALL_START_NANOS_FIELD_NUMBER = 13;
    -  private long allStartNanos_;
    +  private long allStartNanos_ = 0L;
       /**
        * int64 all_start_nanos = 13;
        * @return The allStartNanos.
    @@ -366,7 +371,7 @@ public long getAllStartNanos() {
       }
     
       public static final int OP_START_REL_NANOS_FIELD_NUMBER = 14;
    -  private long opStartRelNanos_;
    +  private long opStartRelNanos_ = 0L;
       /**
        * int64 op_start_rel_nanos = 14;
        * @return The opStartRelNanos.
    @@ -377,7 +382,7 @@ public long getOpStartRelNanos() {
       }
     
       public static final int OP_END_REL_NANOS_FIELD_NUMBER = 15;
    -  private long opEndRelNanos_;
    +  private long opEndRelNanos_ = 0L;
       /**
        * int64 op_end_rel_nanos = 15;
        * @return The opEndRelNanos.
    @@ -388,7 +393,7 @@ public long getOpEndRelNanos() {
       }
     
       public static final int ALL_END_REL_NANOS_FIELD_NUMBER = 16;
    -  private long allEndRelNanos_;
    +  private long allEndRelNanos_ = 0L;
       /**
        * int64 all_end_rel_nanos = 16;
        * @return The allEndRelNanos.
    @@ -399,7 +404,7 @@ public long getAllEndRelNanos() {
       }
     
       public static final int SCHEDULED_NANOS_FIELD_NUMBER = 17;
    -  private long scheduledNanos_;
    +  private long scheduledNanos_ = 0L;
       /**
        * int64 scheduled_nanos = 17;
        * @return The scheduledNanos.
    @@ -423,8 +428,8 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodeName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, nodeName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nodeName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, nodeName_);
         }
         if (allStartMicros_ != 0L) {
           output.writeInt64(2, allStartMicros_);
    @@ -444,8 +449,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         for (int i = 0; i < output_.size(); i++) {
           output.writeMessage(7, output_.get(i));
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(timelineLabel_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 8, timelineLabel_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(timelineLabel_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 8, timelineLabel_);
         }
         if (scheduledMicros_ != 0L) {
           output.writeInt64(9, scheduledMicros_);
    @@ -456,7 +461,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         for (int i = 0; i < referencedTensor_.size(); i++) {
           output.writeMessage(11, referencedTensor_.get(i));
         }
    -    if (memoryStats_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(12, getMemoryStats());
         }
         if (allStartNanos_ != 0L) {
    @@ -483,8 +488,8 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodeName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, nodeName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nodeName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, nodeName_);
         }
         if (allStartMicros_ != 0L) {
           size += com.google.protobuf.CodedOutputStream
    @@ -510,8 +515,8 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(7, output_.get(i));
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(timelineLabel_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, timelineLabel_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(timelineLabel_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(8, timelineLabel_);
         }
         if (scheduledMicros_ != 0L) {
           size += com.google.protobuf.CodedOutputStream
    @@ -525,7 +530,7 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(11, referencedTensor_.get(i));
         }
    -    if (memoryStats_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(12, getMemoryStats());
         }
    @@ -703,39 +708,41 @@ public static org.tensorflow.proto.NodeExecStats parseFrom(
       }
       public static org.tensorflow.proto.NodeExecStats parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.NodeExecStats parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.NodeExecStats parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.NodeExecStats parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.NodeExecStats parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.NodeExecStats parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -755,7 +762,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -767,7 +774,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.NodeExecStats}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.NodeExecStats)
           org.tensorflow.proto.NodeExecStatsOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -776,7 +783,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.StepStatsProtos.internal_static_tensorflow_NodeExecStats_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -785,70 +792,66 @@ public static final class Builder extends
     
         // Construct using org.tensorflow.proto.NodeExecStats.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getMemoryFieldBuilder();
    +        getOutputFieldBuilder();
    +        getReferencedTensorFieldBuilder();
    +        getMemoryStatsFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           nodeName_ = "";
    -
           allStartMicros_ = 0L;
    -
           opStartRelMicros_ = 0L;
    -
           opEndRelMicros_ = 0L;
    -
           allEndRelMicros_ = 0L;
    -
           if (memoryBuilder_ == null) {
             memory_ = java.util.Collections.emptyList();
           } else {
             memory_ = null;
             memoryBuilder_.clear();
           }
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      bitField0_ = (bitField0_ & ~0x00000020);
           if (outputBuilder_ == null) {
             output_ = java.util.Collections.emptyList();
           } else {
             output_ = null;
             outputBuilder_.clear();
           }
    -      bitField0_ = (bitField0_ & ~0x00000002);
    +      bitField0_ = (bitField0_ & ~0x00000040);
           timelineLabel_ = "";
    -
           scheduledMicros_ = 0L;
    -
           threadId_ = 0;
    -
           if (referencedTensorBuilder_ == null) {
             referencedTensor_ = java.util.Collections.emptyList();
           } else {
             referencedTensor_ = null;
             referencedTensorBuilder_.clear();
           }
    -      bitField0_ = (bitField0_ & ~0x00000004);
    -      if (memoryStatsBuilder_ == null) {
    -        memoryStats_ = null;
    -      } else {
    -        memoryStats_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000400);
    +      memoryStats_ = null;
    +      if (memoryStatsBuilder_ != null) {
    +        memoryStatsBuilder_.dispose();
             memoryStatsBuilder_ = null;
           }
           allStartNanos_ = 0L;
    -
           opStartRelNanos_ = 0L;
    -
           opEndRelNanos_ = 0L;
    -
           allEndRelNanos_ = 0L;
    -
           scheduledNanos_ = 0L;
    -
           return this;
         }
     
    @@ -875,88 +878,93 @@ public org.tensorflow.proto.NodeExecStats build() {
         @java.lang.Override
         public org.tensorflow.proto.NodeExecStats buildPartial() {
           org.tensorflow.proto.NodeExecStats result = new org.tensorflow.proto.NodeExecStats(this);
    -      int from_bitField0_ = bitField0_;
    -      result.nodeName_ = nodeName_;
    -      result.allStartMicros_ = allStartMicros_;
    -      result.opStartRelMicros_ = opStartRelMicros_;
    -      result.opEndRelMicros_ = opEndRelMicros_;
    -      result.allEndRelMicros_ = allEndRelMicros_;
    +      buildPartialRepeatedFields(result);
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartialRepeatedFields(org.tensorflow.proto.NodeExecStats result) {
           if (memoryBuilder_ == null) {
    -        if (((bitField0_ & 0x00000001) != 0)) {
    +        if (((bitField0_ & 0x00000020) != 0)) {
               memory_ = java.util.Collections.unmodifiableList(memory_);
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ = (bitField0_ & ~0x00000020);
             }
             result.memory_ = memory_;
           } else {
             result.memory_ = memoryBuilder_.build();
           }
           if (outputBuilder_ == null) {
    -        if (((bitField0_ & 0x00000002) != 0)) {
    +        if (((bitField0_ & 0x00000040) != 0)) {
               output_ = java.util.Collections.unmodifiableList(output_);
    -          bitField0_ = (bitField0_ & ~0x00000002);
    +          bitField0_ = (bitField0_ & ~0x00000040);
             }
             result.output_ = output_;
           } else {
             result.output_ = outputBuilder_.build();
           }
    -      result.timelineLabel_ = timelineLabel_;
    -      result.scheduledMicros_ = scheduledMicros_;
    -      result.threadId_ = threadId_;
           if (referencedTensorBuilder_ == null) {
    -        if (((bitField0_ & 0x00000004) != 0)) {
    +        if (((bitField0_ & 0x00000400) != 0)) {
               referencedTensor_ = java.util.Collections.unmodifiableList(referencedTensor_);
    -          bitField0_ = (bitField0_ & ~0x00000004);
    +          bitField0_ = (bitField0_ & ~0x00000400);
             }
             result.referencedTensor_ = referencedTensor_;
           } else {
             result.referencedTensor_ = referencedTensorBuilder_.build();
           }
    -      if (memoryStatsBuilder_ == null) {
    -        result.memoryStats_ = memoryStats_;
    -      } else {
    -        result.memoryStats_ = memoryStatsBuilder_.build();
    -      }
    -      result.allStartNanos_ = allStartNanos_;
    -      result.opStartRelNanos_ = opStartRelNanos_;
    -      result.opEndRelNanos_ = opEndRelNanos_;
    -      result.allEndRelNanos_ = allEndRelNanos_;
    -      result.scheduledNanos_ = scheduledNanos_;
    -      onBuilt();
    -      return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.NodeExecStats result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.nodeName_ = nodeName_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.allStartMicros_ = allStartMicros_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.opStartRelMicros_ = opStartRelMicros_;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.opEndRelMicros_ = opEndRelMicros_;
    +      }
    +      if (((from_bitField0_ & 0x00000010) != 0)) {
    +        result.allEndRelMicros_ = allEndRelMicros_;
    +      }
    +      if (((from_bitField0_ & 0x00000080) != 0)) {
    +        result.timelineLabel_ = timelineLabel_;
    +      }
    +      if (((from_bitField0_ & 0x00000100) != 0)) {
    +        result.scheduledMicros_ = scheduledMicros_;
    +      }
    +      if (((from_bitField0_ & 0x00000200) != 0)) {
    +        result.threadId_ = threadId_;
    +      }
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000800) != 0)) {
    +        result.memoryStats_ = memoryStatsBuilder_ == null
    +            ? memoryStats_
    +            : memoryStatsBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
    +      }
    +      if (((from_bitField0_ & 0x00001000) != 0)) {
    +        result.allStartNanos_ = allStartNanos_;
    +      }
    +      if (((from_bitField0_ & 0x00002000) != 0)) {
    +        result.opStartRelNanos_ = opStartRelNanos_;
    +      }
    +      if (((from_bitField0_ & 0x00004000) != 0)) {
    +        result.opEndRelNanos_ = opEndRelNanos_;
    +      }
    +      if (((from_bitField0_ & 0x00008000) != 0)) {
    +        result.allEndRelNanos_ = allEndRelNanos_;
    +      }
    +      if (((from_bitField0_ & 0x00010000) != 0)) {
    +        result.scheduledNanos_ = scheduledNanos_;
    +      }
    +      result.bitField0_ |= to_bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.NodeExecStats) {
    @@ -971,6 +979,7 @@ public Builder mergeFrom(org.tensorflow.proto.NodeExecStats other) {
           if (other == org.tensorflow.proto.NodeExecStats.getDefaultInstance()) return this;
           if (!other.getNodeName().isEmpty()) {
             nodeName_ = other.nodeName_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (other.getAllStartMicros() != 0L) {
    @@ -989,7 +998,7 @@ public Builder mergeFrom(org.tensorflow.proto.NodeExecStats other) {
             if (!other.memory_.isEmpty()) {
               if (memory_.isEmpty()) {
                 memory_ = other.memory_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000020);
               } else {
                 ensureMemoryIsMutable();
                 memory_.addAll(other.memory_);
    @@ -1002,9 +1011,9 @@ public Builder mergeFrom(org.tensorflow.proto.NodeExecStats other) {
                 memoryBuilder_.dispose();
                 memoryBuilder_ = null;
                 memory_ = other.memory_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000020);
                 memoryBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getMemoryFieldBuilder() : null;
               } else {
                 memoryBuilder_.addAllMessages(other.memory_);
    @@ -1015,7 +1024,7 @@ public Builder mergeFrom(org.tensorflow.proto.NodeExecStats other) {
             if (!other.output_.isEmpty()) {
               if (output_.isEmpty()) {
                 output_ = other.output_;
    -            bitField0_ = (bitField0_ & ~0x00000002);
    +            bitField0_ = (bitField0_ & ~0x00000040);
               } else {
                 ensureOutputIsMutable();
                 output_.addAll(other.output_);
    @@ -1028,9 +1037,9 @@ public Builder mergeFrom(org.tensorflow.proto.NodeExecStats other) {
                 outputBuilder_.dispose();
                 outputBuilder_ = null;
                 output_ = other.output_;
    -            bitField0_ = (bitField0_ & ~0x00000002);
    +            bitField0_ = (bitField0_ & ~0x00000040);
                 outputBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getOutputFieldBuilder() : null;
               } else {
                 outputBuilder_.addAllMessages(other.output_);
    @@ -1039,6 +1048,7 @@ public Builder mergeFrom(org.tensorflow.proto.NodeExecStats other) {
           }
           if (!other.getTimelineLabel().isEmpty()) {
             timelineLabel_ = other.timelineLabel_;
    +        bitField0_ |= 0x00000080;
             onChanged();
           }
           if (other.getScheduledMicros() != 0L) {
    @@ -1051,7 +1061,7 @@ public Builder mergeFrom(org.tensorflow.proto.NodeExecStats other) {
             if (!other.referencedTensor_.isEmpty()) {
               if (referencedTensor_.isEmpty()) {
                 referencedTensor_ = other.referencedTensor_;
    -            bitField0_ = (bitField0_ & ~0x00000004);
    +            bitField0_ = (bitField0_ & ~0x00000400);
               } else {
                 ensureReferencedTensorIsMutable();
                 referencedTensor_.addAll(other.referencedTensor_);
    @@ -1064,9 +1074,9 @@ public Builder mergeFrom(org.tensorflow.proto.NodeExecStats other) {
                 referencedTensorBuilder_.dispose();
                 referencedTensorBuilder_ = null;
                 referencedTensor_ = other.referencedTensor_;
    -            bitField0_ = (bitField0_ & ~0x00000004);
    +            bitField0_ = (bitField0_ & ~0x00000400);
                 referencedTensorBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getReferencedTensorFieldBuilder() : null;
               } else {
                 referencedTensorBuilder_.addAllMessages(other.referencedTensor_);
    @@ -1119,27 +1129,27 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   nodeName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 16: {
                   allStartMicros_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 16
                 case 24: {
                   opStartRelMicros_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 24
                 case 32: {
                   opEndRelMicros_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 32
                 case 40: {
                   allEndRelMicros_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000010;
                   break;
                 } // case 40
                 case 50: {
    @@ -1170,17 +1180,17 @@ public Builder mergeFrom(
                 } // case 58
                 case 66: {
                   timelineLabel_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000080;
                   break;
                 } // case 66
                 case 72: {
                   scheduledMicros_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000100;
                   break;
                 } // case 72
                 case 80: {
                   threadId_ = input.readUInt32();
    -
    +              bitField0_ |= 0x00000200;
                   break;
                 } // case 80
                 case 90: {
    @@ -1200,32 +1210,32 @@ public Builder mergeFrom(
                   input.readMessage(
                       getMemoryStatsFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000800;
                   break;
                 } // case 98
                 case 104: {
                   allStartNanos_ = input.readInt64();
    -
    +              bitField0_ |= 0x00001000;
                   break;
                 } // case 104
                 case 112: {
                   opStartRelNanos_ = input.readInt64();
    -
    +              bitField0_ |= 0x00002000;
                   break;
                 } // case 112
                 case 120: {
                   opEndRelNanos_ = input.readInt64();
    -
    +              bitField0_ |= 0x00004000;
                   break;
                 } // case 120
                 case 128: {
                   allEndRelNanos_ = input.readInt64();
    -
    +              bitField0_ |= 0x00008000;
                   break;
                 } // case 128
                 case 136: {
                   scheduledNanos_ = input.readInt64();
    -
    +              bitField0_ |= 0x00010000;
                   break;
                 } // case 136
                 default: {
    @@ -1307,11 +1317,9 @@ public java.lang.String getNodeName() {
          */
         public Builder setNodeName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           nodeName_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -1327,8 +1335,8 @@ public Builder setNodeName(
          * @return This builder for chaining.
          */
         public Builder clearNodeName() {
    -      
           nodeName_ = getDefaultInstance().getNodeName();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -1346,12 +1354,10 @@ public Builder clearNodeName() {
          */
         public Builder setNodeNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           nodeName_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -1371,8 +1377,9 @@ public long getAllStartMicros() {
          * @return This builder for chaining.
          */
         public Builder setAllStartMicros(long value) {
    -      
    +
           allStartMicros_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -1381,7 +1388,7 @@ public Builder setAllStartMicros(long value) {
          * @return This builder for chaining.
          */
         public Builder clearAllStartMicros() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000002);
           allStartMicros_ = 0L;
           onChanged();
           return this;
    @@ -1402,8 +1409,9 @@ public long getOpStartRelMicros() {
          * @return This builder for chaining.
          */
         public Builder setOpStartRelMicros(long value) {
    -      
    +
           opStartRelMicros_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -1412,7 +1420,7 @@ public Builder setOpStartRelMicros(long value) {
          * @return This builder for chaining.
          */
         public Builder clearOpStartRelMicros() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000004);
           opStartRelMicros_ = 0L;
           onChanged();
           return this;
    @@ -1433,8 +1441,9 @@ public long getOpEndRelMicros() {
          * @return This builder for chaining.
          */
         public Builder setOpEndRelMicros(long value) {
    -      
    +
           opEndRelMicros_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -1443,7 +1452,7 @@ public Builder setOpEndRelMicros(long value) {
          * @return This builder for chaining.
          */
         public Builder clearOpEndRelMicros() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000008);
           opEndRelMicros_ = 0L;
           onChanged();
           return this;
    @@ -1464,8 +1473,9 @@ public long getAllEndRelMicros() {
          * @return This builder for chaining.
          */
         public Builder setAllEndRelMicros(long value) {
    -      
    +
           allEndRelMicros_ = value;
    +      bitField0_ |= 0x00000010;
           onChanged();
           return this;
         }
    @@ -1474,7 +1484,7 @@ public Builder setAllEndRelMicros(long value) {
          * @return This builder for chaining.
          */
         public Builder clearAllEndRelMicros() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000010);
           allEndRelMicros_ = 0L;
           onChanged();
           return this;
    @@ -1483,13 +1493,13 @@ public Builder clearAllEndRelMicros() {
         private java.util.List memory_ =
           java.util.Collections.emptyList();
         private void ensureMemoryIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    +      if (!((bitField0_ & 0x00000020) != 0)) {
             memory_ = new java.util.ArrayList(memory_);
    -        bitField0_ |= 0x00000001;
    +        bitField0_ |= 0x00000020;
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.AllocatorMemoryUsed, org.tensorflow.proto.AllocatorMemoryUsed.Builder, org.tensorflow.proto.AllocatorMemoryUsedOrBuilder> memoryBuilder_;
     
         /**
    @@ -1635,7 +1645,7 @@ public Builder addAllMemory(
         public Builder clearMemory() {
           if (memoryBuilder_ == null) {
             memory_ = java.util.Collections.emptyList();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        bitField0_ = (bitField0_ & ~0x00000020);
             onChanged();
           } else {
             memoryBuilder_.clear();
    @@ -1705,14 +1715,14 @@ public org.tensorflow.proto.AllocatorMemoryUsed.Builder addMemoryBuilder(
              getMemoryBuilderList() {
           return getMemoryFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.AllocatorMemoryUsed, org.tensorflow.proto.AllocatorMemoryUsed.Builder, org.tensorflow.proto.AllocatorMemoryUsedOrBuilder> 
             getMemoryFieldBuilder() {
           if (memoryBuilder_ == null) {
    -        memoryBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        memoryBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.AllocatorMemoryUsed, org.tensorflow.proto.AllocatorMemoryUsed.Builder, org.tensorflow.proto.AllocatorMemoryUsedOrBuilder>(
                     memory_,
    -                ((bitField0_ & 0x00000001) != 0),
    +                ((bitField0_ & 0x00000020) != 0),
                     getParentForChildren(),
                     isClean());
             memory_ = null;
    @@ -1723,13 +1733,13 @@ public org.tensorflow.proto.AllocatorMemoryUsed.Builder addMemoryBuilder(
         private java.util.List output_ =
           java.util.Collections.emptyList();
         private void ensureOutputIsMutable() {
    -      if (!((bitField0_ & 0x00000002) != 0)) {
    +      if (!((bitField0_ & 0x00000040) != 0)) {
             output_ = new java.util.ArrayList(output_);
    -        bitField0_ |= 0x00000002;
    +        bitField0_ |= 0x00000040;
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.NodeOutput, org.tensorflow.proto.NodeOutput.Builder, org.tensorflow.proto.NodeOutputOrBuilder> outputBuilder_;
     
         /**
    @@ -1875,7 +1885,7 @@ public Builder addAllOutput(
         public Builder clearOutput() {
           if (outputBuilder_ == null) {
             output_ = java.util.Collections.emptyList();
    -        bitField0_ = (bitField0_ & ~0x00000002);
    +        bitField0_ = (bitField0_ & ~0x00000040);
             onChanged();
           } else {
             outputBuilder_.clear();
    @@ -1945,14 +1955,14 @@ public org.tensorflow.proto.NodeOutput.Builder addOutputBuilder(
              getOutputBuilderList() {
           return getOutputFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.NodeOutput, org.tensorflow.proto.NodeOutput.Builder, org.tensorflow.proto.NodeOutputOrBuilder> 
             getOutputFieldBuilder() {
           if (outputBuilder_ == null) {
    -        outputBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        outputBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.NodeOutput, org.tensorflow.proto.NodeOutput.Builder, org.tensorflow.proto.NodeOutputOrBuilder>(
                     output_,
    -                ((bitField0_ & 0x00000002) != 0),
    +                ((bitField0_ & 0x00000040) != 0),
                     getParentForChildren(),
                     isClean());
             output_ = null;
    @@ -2001,11 +2011,9 @@ public java.lang.String getTimelineLabel() {
          */
         public Builder setTimelineLabel(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           timelineLabel_ = value;
    +      bitField0_ |= 0x00000080;
           onChanged();
           return this;
         }
    @@ -2014,8 +2022,8 @@ public Builder setTimelineLabel(
          * @return This builder for chaining.
          */
         public Builder clearTimelineLabel() {
    -      
           timelineLabel_ = getDefaultInstance().getTimelineLabel();
    +      bitField0_ = (bitField0_ & ~0x00000080);
           onChanged();
           return this;
         }
    @@ -2026,12 +2034,10 @@ public Builder clearTimelineLabel() {
          */
         public Builder setTimelineLabelBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           timelineLabel_ = value;
    +      bitField0_ |= 0x00000080;
           onChanged();
           return this;
         }
    @@ -2051,8 +2057,9 @@ public long getScheduledMicros() {
          * @return This builder for chaining.
          */
         public Builder setScheduledMicros(long value) {
    -      
    +
           scheduledMicros_ = value;
    +      bitField0_ |= 0x00000100;
           onChanged();
           return this;
         }
    @@ -2061,7 +2068,7 @@ public Builder setScheduledMicros(long value) {
          * @return This builder for chaining.
          */
         public Builder clearScheduledMicros() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000100);
           scheduledMicros_ = 0L;
           onChanged();
           return this;
    @@ -2082,8 +2089,9 @@ public int getThreadId() {
          * @return This builder for chaining.
          */
         public Builder setThreadId(int value) {
    -      
    +
           threadId_ = value;
    +      bitField0_ |= 0x00000200;
           onChanged();
           return this;
         }
    @@ -2092,7 +2100,7 @@ public Builder setThreadId(int value) {
          * @return This builder for chaining.
          */
         public Builder clearThreadId() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000200);
           threadId_ = 0;
           onChanged();
           return this;
    @@ -2101,13 +2109,13 @@ public Builder clearThreadId() {
         private java.util.List referencedTensor_ =
           java.util.Collections.emptyList();
         private void ensureReferencedTensorIsMutable() {
    -      if (!((bitField0_ & 0x00000004) != 0)) {
    +      if (!((bitField0_ & 0x00000400) != 0)) {
             referencedTensor_ = new java.util.ArrayList(referencedTensor_);
    -        bitField0_ |= 0x00000004;
    +        bitField0_ |= 0x00000400;
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.AllocationDescription, org.tensorflow.proto.AllocationDescription.Builder, org.tensorflow.proto.AllocationDescriptionOrBuilder> referencedTensorBuilder_;
     
         /**
    @@ -2253,7 +2261,7 @@ public Builder addAllReferencedTensor(
         public Builder clearReferencedTensor() {
           if (referencedTensorBuilder_ == null) {
             referencedTensor_ = java.util.Collections.emptyList();
    -        bitField0_ = (bitField0_ & ~0x00000004);
    +        bitField0_ = (bitField0_ & ~0x00000400);
             onChanged();
           } else {
             referencedTensorBuilder_.clear();
    @@ -2323,14 +2331,14 @@ public org.tensorflow.proto.AllocationDescription.Builder addReferencedTensorBui
              getReferencedTensorBuilderList() {
           return getReferencedTensorFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.AllocationDescription, org.tensorflow.proto.AllocationDescription.Builder, org.tensorflow.proto.AllocationDescriptionOrBuilder> 
             getReferencedTensorFieldBuilder() {
           if (referencedTensorBuilder_ == null) {
    -        referencedTensorBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        referencedTensorBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.AllocationDescription, org.tensorflow.proto.AllocationDescription.Builder, org.tensorflow.proto.AllocationDescriptionOrBuilder>(
                     referencedTensor_,
    -                ((bitField0_ & 0x00000004) != 0),
    +                ((bitField0_ & 0x00000400) != 0),
                     getParentForChildren(),
                     isClean());
             referencedTensor_ = null;
    @@ -2339,14 +2347,14 @@ public org.tensorflow.proto.AllocationDescription.Builder addReferencedTensorBui
         }
     
         private org.tensorflow.proto.MemoryStats memoryStats_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.MemoryStats, org.tensorflow.proto.MemoryStats.Builder, org.tensorflow.proto.MemoryStatsOrBuilder> memoryStatsBuilder_;
         /**
          * .tensorflow.MemoryStats memory_stats = 12;
          * @return Whether the memoryStats field is set.
          */
         public boolean hasMemoryStats() {
    -      return memoryStatsBuilder_ != null || memoryStats_ != null;
    +      return ((bitField0_ & 0x00000800) != 0);
         }
         /**
          * .tensorflow.MemoryStats memory_stats = 12;
    @@ -2368,11 +2376,11 @@ public Builder setMemoryStats(org.tensorflow.proto.MemoryStats value) {
               throw new NullPointerException();
             }
             memoryStats_ = value;
    -        onChanged();
           } else {
             memoryStatsBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000800;
    +      onChanged();
           return this;
         }
         /**
    @@ -2382,11 +2390,11 @@ public Builder setMemoryStats(
             org.tensorflow.proto.MemoryStats.Builder builderForValue) {
           if (memoryStatsBuilder_ == null) {
             memoryStats_ = builderForValue.build();
    -        onChanged();
           } else {
             memoryStatsBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000800;
    +      onChanged();
           return this;
         }
         /**
    @@ -2394,38 +2402,40 @@ public Builder setMemoryStats(
          */
         public Builder mergeMemoryStats(org.tensorflow.proto.MemoryStats value) {
           if (memoryStatsBuilder_ == null) {
    -        if (memoryStats_ != null) {
    -          memoryStats_ =
    -            org.tensorflow.proto.MemoryStats.newBuilder(memoryStats_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000800) != 0) &&
    +          memoryStats_ != null &&
    +          memoryStats_ != org.tensorflow.proto.MemoryStats.getDefaultInstance()) {
    +          getMemoryStatsBuilder().mergeFrom(value);
             } else {
               memoryStats_ = value;
             }
    -        onChanged();
           } else {
             memoryStatsBuilder_.mergeFrom(value);
           }
    -
    +      if (memoryStats_ != null) {
    +        bitField0_ |= 0x00000800;
    +        onChanged();
    +      }
           return this;
         }
         /**
          * .tensorflow.MemoryStats memory_stats = 12;
          */
         public Builder clearMemoryStats() {
    -      if (memoryStatsBuilder_ == null) {
    -        memoryStats_ = null;
    -        onChanged();
    -      } else {
    -        memoryStats_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000800);
    +      memoryStats_ = null;
    +      if (memoryStatsBuilder_ != null) {
    +        memoryStatsBuilder_.dispose();
             memoryStatsBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
          * .tensorflow.MemoryStats memory_stats = 12;
          */
         public org.tensorflow.proto.MemoryStats.Builder getMemoryStatsBuilder() {
    -      
    +      bitField0_ |= 0x00000800;
           onChanged();
           return getMemoryStatsFieldBuilder().getBuilder();
         }
    @@ -2443,11 +2453,11 @@ public org.tensorflow.proto.MemoryStatsOrBuilder getMemoryStatsOrBuilder() {
         /**
          * .tensorflow.MemoryStats memory_stats = 12;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.MemoryStats, org.tensorflow.proto.MemoryStats.Builder, org.tensorflow.proto.MemoryStatsOrBuilder> 
             getMemoryStatsFieldBuilder() {
           if (memoryStatsBuilder_ == null) {
    -        memoryStatsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        memoryStatsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.MemoryStats, org.tensorflow.proto.MemoryStats.Builder, org.tensorflow.proto.MemoryStatsOrBuilder>(
                     getMemoryStats(),
                     getParentForChildren(),
    @@ -2472,8 +2482,9 @@ public long getAllStartNanos() {
          * @return This builder for chaining.
          */
         public Builder setAllStartNanos(long value) {
    -      
    +
           allStartNanos_ = value;
    +      bitField0_ |= 0x00001000;
           onChanged();
           return this;
         }
    @@ -2482,7 +2493,7 @@ public Builder setAllStartNanos(long value) {
          * @return This builder for chaining.
          */
         public Builder clearAllStartNanos() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00001000);
           allStartNanos_ = 0L;
           onChanged();
           return this;
    @@ -2503,8 +2514,9 @@ public long getOpStartRelNanos() {
          * @return This builder for chaining.
          */
         public Builder setOpStartRelNanos(long value) {
    -      
    +
           opStartRelNanos_ = value;
    +      bitField0_ |= 0x00002000;
           onChanged();
           return this;
         }
    @@ -2513,7 +2525,7 @@ public Builder setOpStartRelNanos(long value) {
          * @return This builder for chaining.
          */
         public Builder clearOpStartRelNanos() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00002000);
           opStartRelNanos_ = 0L;
           onChanged();
           return this;
    @@ -2534,8 +2546,9 @@ public long getOpEndRelNanos() {
          * @return This builder for chaining.
          */
         public Builder setOpEndRelNanos(long value) {
    -      
    +
           opEndRelNanos_ = value;
    +      bitField0_ |= 0x00004000;
           onChanged();
           return this;
         }
    @@ -2544,7 +2557,7 @@ public Builder setOpEndRelNanos(long value) {
          * @return This builder for chaining.
          */
         public Builder clearOpEndRelNanos() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00004000);
           opEndRelNanos_ = 0L;
           onChanged();
           return this;
    @@ -2565,8 +2578,9 @@ public long getAllEndRelNanos() {
          * @return This builder for chaining.
          */
         public Builder setAllEndRelNanos(long value) {
    -      
    +
           allEndRelNanos_ = value;
    +      bitField0_ |= 0x00008000;
           onChanged();
           return this;
         }
    @@ -2575,7 +2589,7 @@ public Builder setAllEndRelNanos(long value) {
          * @return This builder for chaining.
          */
         public Builder clearAllEndRelNanos() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00008000);
           allEndRelNanos_ = 0L;
           onChanged();
           return this;
    @@ -2596,8 +2610,9 @@ public long getScheduledNanos() {
          * @return This builder for chaining.
          */
         public Builder setScheduledNanos(long value) {
    -      
    +
           scheduledNanos_ = value;
    +      bitField0_ |= 0x00010000;
           onChanged();
           return this;
         }
    @@ -2606,23 +2621,11 @@ public Builder setScheduledNanos(long value) {
          * @return This builder for chaining.
          */
         public Builder clearScheduledNanos() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00010000);
           scheduledNanos_ = 0L;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.NodeExecStats)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeExecStatsOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeExecStatsOrBuilder.java
    index 69f96e57ac1..96407c0f8eb 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeExecStatsOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeExecStatsOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/step_stats.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeOutput.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeOutput.java
    index b5899cd827f..d7d647f0d7c 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeOutput.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeOutput.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/step_stats.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,44 +13,42 @@
      * Protobuf type {@code tensorflow.NodeOutput}
      */
     public final class NodeOutput extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.NodeOutput)
         NodeOutputOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      NodeOutput.class.getName());
    +  }
       // Use NodeOutput.newBuilder() to construct.
    -  private NodeOutput(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private NodeOutput(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private NodeOutput() {
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new NodeOutput();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.StepStatsProtos.internal_static_tensorflow_NodeOutput_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.StepStatsProtos.internal_static_tensorflow_NodeOutput_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
                 org.tensorflow.proto.NodeOutput.class, org.tensorflow.proto.NodeOutput.Builder.class);
       }
     
    +  private int bitField0_;
       public static final int SLOT_FIELD_NUMBER = 1;
    -  private int slot_;
    +  private int slot_ = 0;
       /**
        * int32 slot = 1;
        * @return The slot.
    @@ -66,7 +66,7 @@ public int getSlot() {
        */
       @java.lang.Override
       public boolean hasTensorDescription() {
    -    return tensorDescription_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * .tensorflow.TensorDescription tensor_description = 3;
    @@ -81,7 +81,7 @@ public org.tensorflow.proto.TensorDescription getTensorDescription() {
        */
       @java.lang.Override
       public org.tensorflow.proto.TensorDescriptionOrBuilder getTensorDescriptionOrBuilder() {
    -    return getTensorDescription();
    +    return tensorDescription_ == null ? org.tensorflow.proto.TensorDescription.getDefaultInstance() : tensorDescription_;
       }
     
       private byte memoizedIsInitialized = -1;
    @@ -101,7 +101,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         if (slot_ != 0) {
           output.writeInt32(1, slot_);
         }
    -    if (tensorDescription_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(3, getTensorDescription());
         }
         getUnknownFields().writeTo(output);
    @@ -117,7 +117,7 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeInt32Size(1, slot_);
         }
    -    if (tensorDescription_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(3, getTensorDescription());
         }
    @@ -199,39 +199,41 @@ public static org.tensorflow.proto.NodeOutput parseFrom(
       }
       public static org.tensorflow.proto.NodeOutput parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.NodeOutput parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.NodeOutput parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.NodeOutput parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.NodeOutput parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.NodeOutput parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -251,7 +253,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -263,7 +265,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.NodeOutput}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.NodeOutput)
           org.tensorflow.proto.NodeOutputOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -272,7 +274,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.StepStatsProtos.internal_static_tensorflow_NodeOutput_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -281,23 +283,28 @@ public static final class Builder extends
     
         // Construct using org.tensorflow.proto.NodeOutput.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getTensorDescriptionFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           slot_ = 0;
    -
    -      if (tensorDescriptionBuilder_ == null) {
    -        tensorDescription_ = null;
    -      } else {
    -        tensorDescription_ = null;
    +      tensorDescription_ = null;
    +      if (tensorDescriptionBuilder_ != null) {
    +        tensorDescriptionBuilder_.dispose();
             tensorDescriptionBuilder_ = null;
           }
           return this;
    @@ -326,48 +333,26 @@ public org.tensorflow.proto.NodeOutput build() {
         @java.lang.Override
         public org.tensorflow.proto.NodeOutput buildPartial() {
           org.tensorflow.proto.NodeOutput result = new org.tensorflow.proto.NodeOutput(this);
    -      result.slot_ = slot_;
    -      if (tensorDescriptionBuilder_ == null) {
    -        result.tensorDescription_ = tensorDescription_;
    -      } else {
    -        result.tensorDescription_ = tensorDescriptionBuilder_.build();
    -      }
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.NodeOutput result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.slot_ = slot_;
    +      }
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.tensorDescription_ = tensorDescriptionBuilder_ == null
    +            ? tensorDescription_
    +            : tensorDescriptionBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
    +      }
    +      result.bitField0_ |= to_bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.NodeOutput) {
    @@ -414,14 +399,14 @@ public Builder mergeFrom(
                   break;
                 case 8: {
                   slot_ = input.readInt32();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 8
                 case 26: {
                   input.readMessage(
                       getTensorDescriptionFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 26
                 default: {
    @@ -439,6 +424,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private int slot_ ;
         /**
    @@ -455,8 +441,9 @@ public int getSlot() {
          * @return This builder for chaining.
          */
         public Builder setSlot(int value) {
    -      
    +
           slot_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -465,21 +452,21 @@ public Builder setSlot(int value) {
          * @return This builder for chaining.
          */
         public Builder clearSlot() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000001);
           slot_ = 0;
           onChanged();
           return this;
         }
     
         private org.tensorflow.proto.TensorDescription tensorDescription_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorDescription, org.tensorflow.proto.TensorDescription.Builder, org.tensorflow.proto.TensorDescriptionOrBuilder> tensorDescriptionBuilder_;
         /**
          * .tensorflow.TensorDescription tensor_description = 3;
          * @return Whether the tensorDescription field is set.
          */
         public boolean hasTensorDescription() {
    -      return tensorDescriptionBuilder_ != null || tensorDescription_ != null;
    +      return ((bitField0_ & 0x00000002) != 0);
         }
         /**
          * .tensorflow.TensorDescription tensor_description = 3;
    @@ -501,11 +488,11 @@ public Builder setTensorDescription(org.tensorflow.proto.TensorDescription value
               throw new NullPointerException();
             }
             tensorDescription_ = value;
    -        onChanged();
           } else {
             tensorDescriptionBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return this;
         }
         /**
    @@ -515,11 +502,11 @@ public Builder setTensorDescription(
             org.tensorflow.proto.TensorDescription.Builder builderForValue) {
           if (tensorDescriptionBuilder_ == null) {
             tensorDescription_ = builderForValue.build();
    -        onChanged();
           } else {
             tensorDescriptionBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return this;
         }
         /**
    @@ -527,38 +514,40 @@ public Builder setTensorDescription(
          */
         public Builder mergeTensorDescription(org.tensorflow.proto.TensorDescription value) {
           if (tensorDescriptionBuilder_ == null) {
    -        if (tensorDescription_ != null) {
    -          tensorDescription_ =
    -            org.tensorflow.proto.TensorDescription.newBuilder(tensorDescription_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000002) != 0) &&
    +          tensorDescription_ != null &&
    +          tensorDescription_ != org.tensorflow.proto.TensorDescription.getDefaultInstance()) {
    +          getTensorDescriptionBuilder().mergeFrom(value);
             } else {
               tensorDescription_ = value;
             }
    -        onChanged();
           } else {
             tensorDescriptionBuilder_.mergeFrom(value);
           }
    -
    +      if (tensorDescription_ != null) {
    +        bitField0_ |= 0x00000002;
    +        onChanged();
    +      }
           return this;
         }
         /**
          * .tensorflow.TensorDescription tensor_description = 3;
          */
         public Builder clearTensorDescription() {
    -      if (tensorDescriptionBuilder_ == null) {
    -        tensorDescription_ = null;
    -        onChanged();
    -      } else {
    -        tensorDescription_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000002);
    +      tensorDescription_ = null;
    +      if (tensorDescriptionBuilder_ != null) {
    +        tensorDescriptionBuilder_.dispose();
             tensorDescriptionBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
          * .tensorflow.TensorDescription tensor_description = 3;
          */
         public org.tensorflow.proto.TensorDescription.Builder getTensorDescriptionBuilder() {
    -      
    +      bitField0_ |= 0x00000002;
           onChanged();
           return getTensorDescriptionFieldBuilder().getBuilder();
         }
    @@ -576,11 +565,11 @@ public org.tensorflow.proto.TensorDescriptionOrBuilder getTensorDescriptionOrBui
         /**
          * .tensorflow.TensorDescription tensor_description = 3;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorDescription, org.tensorflow.proto.TensorDescription.Builder, org.tensorflow.proto.TensorDescriptionOrBuilder> 
             getTensorDescriptionFieldBuilder() {
           if (tensorDescriptionBuilder_ == null) {
    -        tensorDescriptionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        tensorDescriptionBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.TensorDescription, org.tensorflow.proto.TensorDescription.Builder, org.tensorflow.proto.TensorDescriptionOrBuilder>(
                     getTensorDescription(),
                     getParentForChildren(),
    @@ -589,18 +578,6 @@ public org.tensorflow.proto.TensorDescriptionOrBuilder getTensorDescriptionOrBui
           }
           return tensorDescriptionBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.NodeOutput)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeOutputOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeOutputOrBuilder.java
    index cf84ea50f58..544c48d05df 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeOutputOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeOutputOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/step_stats.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeProto.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeProto.java
    index 9799c5cc513..8e3f1a3aed9 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeProto.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeProto.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/node_def.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class NodeProto {
       private NodeProto() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      NodeProto.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,17 +28,17 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_NodeDef_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_NodeDef_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_NodeDef_AttrEntry_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_NodeDef_AttrEntry_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_NodeDef_ExperimentalDebugInfo_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_NodeDef_ExperimentalDebugInfo_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -65,21 +76,22 @@ public static void registerAllExtensions(
         internal_static_tensorflow_NodeDef_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_NodeDef_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_NodeDef_descriptor,
             new java.lang.String[] { "Name", "Op", "Input", "Device", "Attr", "ExperimentalDebugInfo", "ExperimentalType", });
         internal_static_tensorflow_NodeDef_AttrEntry_descriptor =
           internal_static_tensorflow_NodeDef_descriptor.getNestedTypes().get(0);
         internal_static_tensorflow_NodeDef_AttrEntry_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_NodeDef_AttrEntry_descriptor,
             new java.lang.String[] { "Key", "Value", });
         internal_static_tensorflow_NodeDef_ExperimentalDebugInfo_descriptor =
           internal_static_tensorflow_NodeDef_descriptor.getNestedTypes().get(1);
         internal_static_tensorflow_NodeDef_ExperimentalDebugInfo_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_NodeDef_ExperimentalDebugInfo_descriptor,
             new java.lang.String[] { "OriginalNodeNames", "OriginalFuncNames", });
    +    descriptor.resolveAllFeaturesImmutable();
         org.tensorflow.proto.AttrValueProtos.getDescriptor();
         org.tensorflow.proto.FullTypeProtos.getDescriptor();
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDef.java
    index 6e4dbde8067..e24a3dd5e36 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDef.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDef.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/op_def.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -13,43 +15,41 @@
      * Protobuf type {@code tensorflow.OpDef}
      */
     public final class OpDef extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.OpDef)
         OpDefOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      OpDef.class.getName());
    +  }
       // Use OpDef.newBuilder() to construct.
    -  private OpDef(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private OpDef(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private OpDef() {
         name_ = "";
         inputArg_ = java.util.Collections.emptyList();
         outputArg_ = java.util.Collections.emptyList();
    -    controlOutput_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +    controlOutput_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         attr_ = java.util.Collections.emptyList();
         summary_ = "";
         description_ = "";
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new OpDef();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.OpDefProtos.internal_static_tensorflow_OpDef_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.OpDefProtos.internal_static_tensorflow_OpDef_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -105,13 +105,13 @@ public interface ArgDefOrBuilder extends
          * Describes the type of one or more tensors that are accepted/produced
          * by this input/output arg.  The only legal combinations are:
          * * For a single tensor: either the "type" field is set or the
    -     *   "type_attr" field is set to the name of an attr with type "type".
    +     * "type_attr" field is set to the name of an attr with type "type".
          * * For a sequence of tensors with the same type: the "number_attr"
    -     *   field will be set to the name of an attr with type "int", and
    -     *   either the "type" or "type_attr" field will be set as for
    -     *   single tensors.
    +     * field will be set to the name of an attr with type "int", and
    +     * either the "type" or "type_attr" field will be set as for
    +     * single tensors.
          * * For a sequence of tensors, the "type_list_attr" field will be set
    -     *   to the name of an attr with type "list(type)".
    +     * to the name of an attr with type "list(type)".
          * 
    * * .tensorflow.DataType type = 3; @@ -123,13 +123,13 @@ public interface ArgDefOrBuilder extends * Describes the type of one or more tensors that are accepted/produced * by this input/output arg. The only legal combinations are: * * For a single tensor: either the "type" field is set or the - * "type_attr" field is set to the name of an attr with type "type". + * "type_attr" field is set to the name of an attr with type "type". * * For a sequence of tensors with the same type: the "number_attr" - * field will be set to the name of an attr with type "int", and - * either the "type" or "type_attr" field will be set as for - * single tensors. + * field will be set to the name of an attr with type "int", and + * either the "type" or "type_attr" field will be set as for + * single tensors. * * For a sequence of tensors, the "type_list_attr" field will be set - * to the name of an attr with type "list(type)". + * to the name of an attr with type "list(type)". *
    * * .tensorflow.DataType type = 3; @@ -246,7 +246,7 @@ org.tensorflow.proto.ResourceHandleProto.DtypeAndShapeOrBuilder getHandleDataOrB /** *
          * For inputs: if true, the inputs are required to be refs.
    -     *   By default, inputs can be either refs or non-refs.
    +     * By default, inputs can be either refs or non-refs.
          * For outputs: if true, outputs are refs, otherwise they are not.
          * 
    * @@ -262,6 +262,7 @@ org.tensorflow.proto.ResourceHandleProto.DtypeAndShapeOrBuilder getHandleDataOrB * etc. into a unified representation. * This declaration may contain non-concrete types (for example, * Tensor<TypeVar<'T'>> is a valid type declaration. + * * Note: this is a transient field. The long-term aim is to represent the * entire OpDef as a single type: a callable. In that context, this field is * just the type of a single argument. @@ -278,6 +279,7 @@ org.tensorflow.proto.ResourceHandleProto.DtypeAndShapeOrBuilder getHandleDataOrB * etc. into a unified representation. * This declaration may contain non-concrete types (for example, * Tensor<TypeVar<'T'>> is a valid type declaration. + * * Note: this is a transient field. The long-term aim is to represent the * entire OpDef as a single type: a callable. In that context, this field is * just the type of a single argument. @@ -294,6 +296,7 @@ org.tensorflow.proto.ResourceHandleProto.DtypeAndShapeOrBuilder getHandleDataOrB * etc. into a unified representation. * This declaration may contain non-concrete types (for example, * Tensor<TypeVar<'T'>> is a valid type declaration. + * * Note: this is a transient field. The long-term aim is to represent the * entire OpDef as a single type: a callable. In that context, this field is * just the type of a single argument. @@ -311,12 +314,21 @@ org.tensorflow.proto.ResourceHandleProto.DtypeAndShapeOrBuilder getHandleDataOrB * Protobuf type {@code tensorflow.OpDef.ArgDef} */ public static final class ArgDef extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.OpDef.ArgDef) ArgDefOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + ArgDef.class.getName()); + } // Use ArgDef.newBuilder() to construct. - private ArgDef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ArgDef(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private ArgDef() { @@ -329,33 +341,23 @@ private ArgDef() { handleData_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ArgDef(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.OpDefProtos.internal_static_tensorflow_OpDef_ArgDef_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.OpDefProtos.internal_static_tensorflow_OpDef_ArgDef_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.proto.OpDef.ArgDef.class, org.tensorflow.proto.OpDef.ArgDef.Builder.class); } + private int bitField0_; public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; /** *
          * Name for the input/output.  Should match the regexp "[a-z][a-z0-9_]*".
    @@ -401,7 +403,8 @@ public java.lang.String getName() {
         }
     
         public static final int DESCRIPTION_FIELD_NUMBER = 2;
    -    private volatile java.lang.Object description_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object description_ = "";
         /**
          * 
          * Human readable description.
    @@ -447,19 +450,19 @@ public java.lang.String getDescription() {
         }
     
         public static final int TYPE_FIELD_NUMBER = 3;
    -    private int type_;
    +    private int type_ = 0;
         /**
          * 
          * Describes the type of one or more tensors that are accepted/produced
          * by this input/output arg.  The only legal combinations are:
          * * For a single tensor: either the "type" field is set or the
    -     *   "type_attr" field is set to the name of an attr with type "type".
    +     * "type_attr" field is set to the name of an attr with type "type".
          * * For a sequence of tensors with the same type: the "number_attr"
    -     *   field will be set to the name of an attr with type "int", and
    -     *   either the "type" or "type_attr" field will be set as for
    -     *   single tensors.
    +     * field will be set to the name of an attr with type "int", and
    +     * either the "type" or "type_attr" field will be set as for
    +     * single tensors.
          * * For a sequence of tensors, the "type_list_attr" field will be set
    -     *   to the name of an attr with type "list(type)".
    +     * to the name of an attr with type "list(type)".
          * 
    * * .tensorflow.DataType type = 3; @@ -473,26 +476,26 @@ public java.lang.String getDescription() { * Describes the type of one or more tensors that are accepted/produced * by this input/output arg. The only legal combinations are: * * For a single tensor: either the "type" field is set or the - * "type_attr" field is set to the name of an attr with type "type". + * "type_attr" field is set to the name of an attr with type "type". * * For a sequence of tensors with the same type: the "number_attr" - * field will be set to the name of an attr with type "int", and - * either the "type" or "type_attr" field will be set as for - * single tensors. + * field will be set to the name of an attr with type "int", and + * either the "type" or "type_attr" field will be set as for + * single tensors. * * For a sequence of tensors, the "type_list_attr" field will be set - * to the name of an attr with type "list(type)". + * to the name of an attr with type "list(type)". *
    * * .tensorflow.DataType type = 3; * @return The type. */ @java.lang.Override public org.tensorflow.proto.DataType getType() { - @SuppressWarnings("deprecation") - org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(type_); + org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(type_); return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result; } public static final int TYPE_ATTR_FIELD_NUMBER = 4; - private volatile java.lang.Object typeAttr_; + @SuppressWarnings("serial") + private volatile java.lang.Object typeAttr_ = ""; /** *
          * if specified, attr must have type "type"
    @@ -538,7 +541,8 @@ public java.lang.String getTypeAttr() {
         }
     
         public static final int NUMBER_ATTR_FIELD_NUMBER = 5;
    -    private volatile java.lang.Object numberAttr_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object numberAttr_ = "";
         /**
          * 
          * if specified, attr must have type "int"
    @@ -584,7 +588,8 @@ public java.lang.String getNumberAttr() {
         }
     
         public static final int TYPE_LIST_ATTR_FIELD_NUMBER = 6;
    -    private volatile java.lang.Object typeListAttr_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object typeListAttr_ = "";
         /**
          * 
          * If specified, attr must have type "list(type)", and none of
    @@ -632,6 +637,7 @@ public java.lang.String getTypeListAttr() {
         }
     
         public static final int HANDLE_DATA_FIELD_NUMBER = 7;
    +    @SuppressWarnings("serial")
         private java.util.List handleData_;
         /**
          * 
    @@ -692,11 +698,11 @@ public org.tensorflow.proto.ResourceHandleProto.DtypeAndShapeOrBuilder getHandle
         }
     
         public static final int IS_REF_FIELD_NUMBER = 16;
    -    private boolean isRef_;
    +    private boolean isRef_ = false;
         /**
          * 
          * For inputs: if true, the inputs are required to be refs.
    -     *   By default, inputs can be either refs or non-refs.
    +     * By default, inputs can be either refs or non-refs.
          * For outputs: if true, outputs are refs, otherwise they are not.
          * 
    * @@ -717,6 +723,7 @@ public boolean getIsRef() { * etc. into a unified representation. * This declaration may contain non-concrete types (for example, * Tensor<TypeVar<'T'>> is a valid type declaration. + * * Note: this is a transient field. The long-term aim is to represent the * entire OpDef as a single type: a callable. In that context, this field is * just the type of a single argument. @@ -727,7 +734,7 @@ public boolean getIsRef() { */ @java.lang.Override public boolean hasExperimentalFullType() { - return experimentalFullType_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** *
    @@ -736,6 +743,7 @@ public boolean hasExperimentalFullType() {
          * etc. into a unified representation.
          * This declaration may contain non-concrete types (for example,
          * Tensor<TypeVar<'T'>> is a valid type declaration.
    +     *
          * Note: this is a transient field. The long-term aim is to represent the
          * entire OpDef as a single type: a callable. In that context, this field is
          * just the type of a single argument.
    @@ -755,6 +763,7 @@ public org.tensorflow.proto.FullTypeDef getExperimentalFullType() {
          * etc. into a unified representation.
          * This declaration may contain non-concrete types (for example,
          * Tensor<TypeVar<'T'>> is a valid type declaration.
    +     *
          * Note: this is a transient field. The long-term aim is to represent the
          * entire OpDef as a single type: a callable. In that context, this field is
          * just the type of a single argument.
    @@ -764,7 +773,7 @@ public org.tensorflow.proto.FullTypeDef getExperimentalFullType() {
          */
         @java.lang.Override
         public org.tensorflow.proto.FullTypeDefOrBuilder getExperimentalFullTypeOrBuilder() {
    -      return getExperimentalFullType();
    +      return experimentalFullType_ == null ? org.tensorflow.proto.FullTypeDef.getDefaultInstance() : experimentalFullType_;
         }
     
         private byte memoizedIsInitialized = -1;
    @@ -781,23 +790,23 @@ public final boolean isInitialized() {
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output)
                             throws java.io.IOException {
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 2, description_);
           }
           if (type_ != org.tensorflow.proto.DataType.DT_INVALID.getNumber()) {
             output.writeEnum(3, type_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(typeAttr_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 4, typeAttr_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(typeAttr_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 4, typeAttr_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(numberAttr_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 5, numberAttr_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(numberAttr_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 5, numberAttr_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(typeListAttr_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 6, typeListAttr_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(typeListAttr_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 6, typeListAttr_);
           }
           for (int i = 0; i < handleData_.size(); i++) {
             output.writeMessage(7, handleData_.get(i));
    @@ -805,7 +814,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           if (isRef_ != false) {
             output.writeBool(16, isRef_);
           }
    -      if (experimentalFullType_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             output.writeMessage(17, getExperimentalFullType());
           }
           getUnknownFields().writeTo(output);
    @@ -817,24 +826,24 @@ public int getSerializedSize() {
           if (size != -1) return size;
     
           size = 0;
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, description_);
           }
           if (type_ != org.tensorflow.proto.DataType.DT_INVALID.getNumber()) {
             size += com.google.protobuf.CodedOutputStream
               .computeEnumSize(3, type_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(typeAttr_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, typeAttr_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(typeAttr_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(4, typeAttr_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(numberAttr_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, numberAttr_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(numberAttr_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(5, numberAttr_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(typeListAttr_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, typeListAttr_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(typeListAttr_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(6, typeListAttr_);
           }
           for (int i = 0; i < handleData_.size(); i++) {
             size += com.google.protobuf.CodedOutputStream
    @@ -844,7 +853,7 @@ public int getSerializedSize() {
             size += com.google.protobuf.CodedOutputStream
               .computeBoolSize(16, isRef_);
           }
    -      if (experimentalFullType_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(17, getExperimentalFullType());
           }
    @@ -956,39 +965,41 @@ public static org.tensorflow.proto.OpDef.ArgDef parseFrom(
         }
         public static org.tensorflow.proto.OpDef.ArgDef parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.OpDef.ArgDef parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.OpDef.ArgDef parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.OpDef.ArgDef parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.OpDef.ArgDef parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.OpDef.ArgDef parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -1008,7 +1019,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -1020,7 +1031,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.OpDef.ArgDef}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.OpDef.ArgDef)
             org.tensorflow.proto.OpDef.ArgDefOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -1029,7 +1040,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.OpDefProtos.internal_static_tensorflow_OpDef_ArgDef_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -1038,42 +1049,42 @@ public static final class Builder extends
     
           // Construct using org.tensorflow.proto.OpDef.ArgDef.newBuilder()
           private Builder() {
    -
    +        maybeForceBuilderInitialization();
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
    -
    +        maybeForceBuilderInitialization();
    +      }
    +      private void maybeForceBuilderInitialization() {
    +        if (com.google.protobuf.GeneratedMessage
    +                .alwaysUseFieldBuilders) {
    +          getHandleDataFieldBuilder();
    +          getExperimentalFullTypeFieldBuilder();
    +        }
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             name_ = "";
    -
             description_ = "";
    -
             type_ = 0;
    -
             typeAttr_ = "";
    -
             numberAttr_ = "";
    -
             typeListAttr_ = "";
    -
             if (handleDataBuilder_ == null) {
               handleData_ = java.util.Collections.emptyList();
             } else {
               handleData_ = null;
               handleDataBuilder_.clear();
             }
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        bitField0_ = (bitField0_ & ~0x00000040);
             isRef_ = false;
    -
    -        if (experimentalFullTypeBuilder_ == null) {
    -          experimentalFullType_ = null;
    -        } else {
    -          experimentalFullType_ = null;
    +        experimentalFullType_ = null;
    +        if (experimentalFullTypeBuilder_ != null) {
    +          experimentalFullTypeBuilder_.dispose();
               experimentalFullTypeBuilder_ = null;
             }
             return this;
    @@ -1102,64 +1113,57 @@ public org.tensorflow.proto.OpDef.ArgDef build() {
           @java.lang.Override
           public org.tensorflow.proto.OpDef.ArgDef buildPartial() {
             org.tensorflow.proto.OpDef.ArgDef result = new org.tensorflow.proto.OpDef.ArgDef(this);
    -        int from_bitField0_ = bitField0_;
    -        result.name_ = name_;
    -        result.description_ = description_;
    -        result.type_ = type_;
    -        result.typeAttr_ = typeAttr_;
    -        result.numberAttr_ = numberAttr_;
    -        result.typeListAttr_ = typeListAttr_;
    +        buildPartialRepeatedFields(result);
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        onBuilt();
    +        return result;
    +      }
    +
    +      private void buildPartialRepeatedFields(org.tensorflow.proto.OpDef.ArgDef result) {
             if (handleDataBuilder_ == null) {
    -          if (((bitField0_ & 0x00000001) != 0)) {
    +          if (((bitField0_ & 0x00000040) != 0)) {
                 handleData_ = java.util.Collections.unmodifiableList(handleData_);
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000040);
               }
               result.handleData_ = handleData_;
             } else {
               result.handleData_ = handleDataBuilder_.build();
             }
    -        result.isRef_ = isRef_;
    -        if (experimentalFullTypeBuilder_ == null) {
    -          result.experimentalFullType_ = experimentalFullType_;
    -        } else {
    -          result.experimentalFullType_ = experimentalFullTypeBuilder_.build();
    -        }
    -        onBuilt();
    -        return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.OpDef.ArgDef result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.name_ = name_;
    +        }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.description_ = description_;
    +        }
    +        if (((from_bitField0_ & 0x00000004) != 0)) {
    +          result.type_ = type_;
    +        }
    +        if (((from_bitField0_ & 0x00000008) != 0)) {
    +          result.typeAttr_ = typeAttr_;
    +        }
    +        if (((from_bitField0_ & 0x00000010) != 0)) {
    +          result.numberAttr_ = numberAttr_;
    +        }
    +        if (((from_bitField0_ & 0x00000020) != 0)) {
    +          result.typeListAttr_ = typeListAttr_;
    +        }
    +        if (((from_bitField0_ & 0x00000080) != 0)) {
    +          result.isRef_ = isRef_;
    +        }
    +        int to_bitField0_ = 0;
    +        if (((from_bitField0_ & 0x00000100) != 0)) {
    +          result.experimentalFullType_ = experimentalFullTypeBuilder_ == null
    +              ? experimentalFullType_
    +              : experimentalFullTypeBuilder_.build();
    +          to_bitField0_ |= 0x00000001;
    +        }
    +        result.bitField0_ |= to_bitField0_;
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.OpDef.ArgDef) {
    @@ -1174,10 +1178,12 @@ public Builder mergeFrom(org.tensorflow.proto.OpDef.ArgDef other) {
             if (other == org.tensorflow.proto.OpDef.ArgDef.getDefaultInstance()) return this;
             if (!other.getName().isEmpty()) {
               name_ = other.name_;
    +          bitField0_ |= 0x00000001;
               onChanged();
             }
             if (!other.getDescription().isEmpty()) {
               description_ = other.description_;
    +          bitField0_ |= 0x00000002;
               onChanged();
             }
             if (other.type_ != 0) {
    @@ -1185,21 +1191,24 @@ public Builder mergeFrom(org.tensorflow.proto.OpDef.ArgDef other) {
             }
             if (!other.getTypeAttr().isEmpty()) {
               typeAttr_ = other.typeAttr_;
    +          bitField0_ |= 0x00000008;
               onChanged();
             }
             if (!other.getNumberAttr().isEmpty()) {
               numberAttr_ = other.numberAttr_;
    +          bitField0_ |= 0x00000010;
               onChanged();
             }
             if (!other.getTypeListAttr().isEmpty()) {
               typeListAttr_ = other.typeListAttr_;
    +          bitField0_ |= 0x00000020;
               onChanged();
             }
             if (handleDataBuilder_ == null) {
               if (!other.handleData_.isEmpty()) {
                 if (handleData_.isEmpty()) {
                   handleData_ = other.handleData_;
    -              bitField0_ = (bitField0_ & ~0x00000001);
    +              bitField0_ = (bitField0_ & ~0x00000040);
                 } else {
                   ensureHandleDataIsMutable();
                   handleData_.addAll(other.handleData_);
    @@ -1212,9 +1221,9 @@ public Builder mergeFrom(org.tensorflow.proto.OpDef.ArgDef other) {
                   handleDataBuilder_.dispose();
                   handleDataBuilder_ = null;
                   handleData_ = other.handleData_;
    -              bitField0_ = (bitField0_ & ~0x00000001);
    +              bitField0_ = (bitField0_ & ~0x00000040);
                   handleDataBuilder_ = 
    -                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                        getHandleDataFieldBuilder() : null;
                 } else {
                   handleDataBuilder_.addAllMessages(other.handleData_);
    @@ -1255,32 +1264,32 @@ public Builder mergeFrom(
                     break;
                   case 10: {
                     name_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 10
                   case 18: {
                     description_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 18
                   case 24: {
                     type_ = input.readEnum();
    -
    +                bitField0_ |= 0x00000004;
                     break;
                   } // case 24
                   case 34: {
                     typeAttr_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000008;
                     break;
                   } // case 34
                   case 42: {
                     numberAttr_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000010;
                     break;
                   } // case 42
                   case 50: {
                     typeListAttr_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000020;
                     break;
                   } // case 50
                   case 58: {
    @@ -1298,14 +1307,14 @@ public Builder mergeFrom(
                   } // case 58
                   case 128: {
                     isRef_ = input.readBool();
    -
    +                bitField0_ |= 0x00000080;
                     break;
                   } // case 128
                   case 138: {
                     input.readMessage(
                         getExperimentalFullTypeFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00000100;
                     break;
                   } // case 138
                   default: {
    @@ -1378,11 +1387,9 @@ public java.lang.String getName() {
            */
           public Builder setName(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             name_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -1395,8 +1402,8 @@ public Builder setName(
            * @return This builder for chaining.
            */
           public Builder clearName() {
    -        
             name_ = getDefaultInstance().getName();
    +        bitField0_ = (bitField0_ & ~0x00000001);
             onChanged();
             return this;
           }
    @@ -1411,12 +1418,10 @@ public Builder clearName() {
            */
           public Builder setNameBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             name_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -1474,11 +1479,9 @@ public java.lang.String getDescription() {
            */
           public Builder setDescription(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             description_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -1491,8 +1494,8 @@ public Builder setDescription(
            * @return This builder for chaining.
            */
           public Builder clearDescription() {
    -        
             description_ = getDefaultInstance().getDescription();
    +        bitField0_ = (bitField0_ & ~0x00000002);
             onChanged();
             return this;
           }
    @@ -1507,12 +1510,10 @@ public Builder clearDescription() {
            */
           public Builder setDescriptionBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             description_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -1523,13 +1524,13 @@ public Builder setDescriptionBytes(
            * Describes the type of one or more tensors that are accepted/produced
            * by this input/output arg.  The only legal combinations are:
            * * For a single tensor: either the "type" field is set or the
    -       *   "type_attr" field is set to the name of an attr with type "type".
    +       * "type_attr" field is set to the name of an attr with type "type".
            * * For a sequence of tensors with the same type: the "number_attr"
    -       *   field will be set to the name of an attr with type "int", and
    -       *   either the "type" or "type_attr" field will be set as for
    -       *   single tensors.
    +       * field will be set to the name of an attr with type "int", and
    +       * either the "type" or "type_attr" field will be set as for
    +       * single tensors.
            * * For a sequence of tensors, the "type_list_attr" field will be set
    -       *   to the name of an attr with type "list(type)".
    +       * to the name of an attr with type "list(type)".
            * 
    * * .tensorflow.DataType type = 3; @@ -1543,13 +1544,13 @@ public Builder setDescriptionBytes( * Describes the type of one or more tensors that are accepted/produced * by this input/output arg. The only legal combinations are: * * For a single tensor: either the "type" field is set or the - * "type_attr" field is set to the name of an attr with type "type". + * "type_attr" field is set to the name of an attr with type "type". * * For a sequence of tensors with the same type: the "number_attr" - * field will be set to the name of an attr with type "int", and - * either the "type" or "type_attr" field will be set as for - * single tensors. + * field will be set to the name of an attr with type "int", and + * either the "type" or "type_attr" field will be set as for + * single tensors. * * For a sequence of tensors, the "type_list_attr" field will be set - * to the name of an attr with type "list(type)". + * to the name of an attr with type "list(type)". *
    * * .tensorflow.DataType type = 3; @@ -1557,8 +1558,8 @@ public Builder setDescriptionBytes( * @return This builder for chaining. */ public Builder setTypeValue(int value) { - type_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -1567,13 +1568,13 @@ public Builder setTypeValue(int value) { * Describes the type of one or more tensors that are accepted/produced * by this input/output arg. The only legal combinations are: * * For a single tensor: either the "type" field is set or the - * "type_attr" field is set to the name of an attr with type "type". + * "type_attr" field is set to the name of an attr with type "type". * * For a sequence of tensors with the same type: the "number_attr" - * field will be set to the name of an attr with type "int", and - * either the "type" or "type_attr" field will be set as for - * single tensors. + * field will be set to the name of an attr with type "int", and + * either the "type" or "type_attr" field will be set as for + * single tensors. * * For a sequence of tensors, the "type_list_attr" field will be set - * to the name of an attr with type "list(type)". + * to the name of an attr with type "list(type)". *
    * * .tensorflow.DataType type = 3; @@ -1581,8 +1582,7 @@ public Builder setTypeValue(int value) { */ @java.lang.Override public org.tensorflow.proto.DataType getType() { - @SuppressWarnings("deprecation") - org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(type_); + org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(type_); return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result; } /** @@ -1590,13 +1590,13 @@ public org.tensorflow.proto.DataType getType() { * Describes the type of one or more tensors that are accepted/produced * by this input/output arg. The only legal combinations are: * * For a single tensor: either the "type" field is set or the - * "type_attr" field is set to the name of an attr with type "type". + * "type_attr" field is set to the name of an attr with type "type". * * For a sequence of tensors with the same type: the "number_attr" - * field will be set to the name of an attr with type "int", and - * either the "type" or "type_attr" field will be set as for - * single tensors. + * field will be set to the name of an attr with type "int", and + * either the "type" or "type_attr" field will be set as for + * single tensors. * * For a sequence of tensors, the "type_list_attr" field will be set - * to the name of an attr with type "list(type)". + * to the name of an attr with type "list(type)". *
    * * .tensorflow.DataType type = 3; @@ -1607,7 +1607,7 @@ public Builder setType(org.tensorflow.proto.DataType value) { if (value == null) { throw new NullPointerException(); } - + bitField0_ |= 0x00000004; type_ = value.getNumber(); onChanged(); return this; @@ -1617,20 +1617,20 @@ public Builder setType(org.tensorflow.proto.DataType value) { * Describes the type of one or more tensors that are accepted/produced * by this input/output arg. The only legal combinations are: * * For a single tensor: either the "type" field is set or the - * "type_attr" field is set to the name of an attr with type "type". + * "type_attr" field is set to the name of an attr with type "type". * * For a sequence of tensors with the same type: the "number_attr" - * field will be set to the name of an attr with type "int", and - * either the "type" or "type_attr" field will be set as for - * single tensors. + * field will be set to the name of an attr with type "int", and + * either the "type" or "type_attr" field will be set as for + * single tensors. * * For a sequence of tensors, the "type_list_attr" field will be set - * to the name of an attr with type "list(type)". + * to the name of an attr with type "list(type)". *
    * * .tensorflow.DataType type = 3; * @return This builder for chaining. */ public Builder clearType() { - + bitField0_ = (bitField0_ & ~0x00000004); type_ = 0; onChanged(); return this; @@ -1689,11 +1689,9 @@ public java.lang.String getTypeAttr() { */ public Builder setTypeAttr( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } typeAttr_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1706,8 +1704,8 @@ public Builder setTypeAttr( * @return This builder for chaining. */ public Builder clearTypeAttr() { - typeAttr_ = getDefaultInstance().getTypeAttr(); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } @@ -1722,12 +1720,10 @@ public Builder clearTypeAttr() { */ public Builder setTypeAttrBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); typeAttr_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1785,11 +1781,9 @@ public java.lang.String getNumberAttr() { */ public Builder setNumberAttr( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } numberAttr_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -1802,8 +1796,8 @@ public Builder setNumberAttr( * @return This builder for chaining. */ public Builder clearNumberAttr() { - numberAttr_ = getDefaultInstance().getNumberAttr(); + bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } @@ -1818,12 +1812,10 @@ public Builder clearNumberAttr() { */ public Builder setNumberAttrBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); numberAttr_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -1884,11 +1876,9 @@ public java.lang.String getTypeListAttr() { */ public Builder setTypeListAttr( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } typeListAttr_ = value; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -1902,8 +1892,8 @@ public Builder setTypeListAttr( * @return This builder for chaining. */ public Builder clearTypeListAttr() { - typeListAttr_ = getDefaultInstance().getTypeListAttr(); + bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } @@ -1919,12 +1909,10 @@ public Builder clearTypeListAttr() { */ public Builder setTypeListAttrBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); typeListAttr_ = value; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -1932,13 +1920,13 @@ public Builder setTypeListAttrBytes( private java.util.List handleData_ = java.util.Collections.emptyList(); private void ensureHandleDataIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!((bitField0_ & 0x00000040) != 0)) { handleData_ = new java.util.ArrayList(handleData_); - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000040; } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.ResourceHandleProto.DtypeAndShape, org.tensorflow.proto.ResourceHandleProto.DtypeAndShape.Builder, org.tensorflow.proto.ResourceHandleProto.DtypeAndShapeOrBuilder> handleDataBuilder_; /** @@ -2128,7 +2116,7 @@ public Builder addAllHandleData( public Builder clearHandleData() { if (handleDataBuilder_ == null) { handleData_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000040); onChanged(); } else { handleDataBuilder_.clear(); @@ -2226,14 +2214,14 @@ public org.tensorflow.proto.ResourceHandleProto.DtypeAndShape.Builder addHandleD getHandleDataBuilderList() { return getHandleDataFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.ResourceHandleProto.DtypeAndShape, org.tensorflow.proto.ResourceHandleProto.DtypeAndShape.Builder, org.tensorflow.proto.ResourceHandleProto.DtypeAndShapeOrBuilder> getHandleDataFieldBuilder() { if (handleDataBuilder_ == null) { - handleDataBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + handleDataBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.ResourceHandleProto.DtypeAndShape, org.tensorflow.proto.ResourceHandleProto.DtypeAndShape.Builder, org.tensorflow.proto.ResourceHandleProto.DtypeAndShapeOrBuilder>( handleData_, - ((bitField0_ & 0x00000001) != 0), + ((bitField0_ & 0x00000040) != 0), getParentForChildren(), isClean()); handleData_ = null; @@ -2245,7 +2233,7 @@ public org.tensorflow.proto.ResourceHandleProto.DtypeAndShape.Builder addHandleD /** *
            * For inputs: if true, the inputs are required to be refs.
    -       *   By default, inputs can be either refs or non-refs.
    +       * By default, inputs can be either refs or non-refs.
            * For outputs: if true, outputs are refs, otherwise they are not.
            * 
    * @@ -2259,7 +2247,7 @@ public boolean getIsRef() { /** *
            * For inputs: if true, the inputs are required to be refs.
    -       *   By default, inputs can be either refs or non-refs.
    +       * By default, inputs can be either refs or non-refs.
            * For outputs: if true, outputs are refs, otherwise they are not.
            * 
    * @@ -2268,15 +2256,16 @@ public boolean getIsRef() { * @return This builder for chaining. */ public Builder setIsRef(boolean value) { - + isRef_ = value; + bitField0_ |= 0x00000080; onChanged(); return this; } /** *
            * For inputs: if true, the inputs are required to be refs.
    -       *   By default, inputs can be either refs or non-refs.
    +       * By default, inputs can be either refs or non-refs.
            * For outputs: if true, outputs are refs, otherwise they are not.
            * 
    * @@ -2284,14 +2273,14 @@ public Builder setIsRef(boolean value) { * @return This builder for chaining. */ public Builder clearIsRef() { - + bitField0_ = (bitField0_ & ~0x00000080); isRef_ = false; onChanged(); return this; } private org.tensorflow.proto.FullTypeDef experimentalFullType_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.FullTypeDef, org.tensorflow.proto.FullTypeDef.Builder, org.tensorflow.proto.FullTypeDefOrBuilder> experimentalFullTypeBuilder_; /** *
    @@ -2300,6 +2289,7 @@ public Builder clearIsRef() {
            * etc. into a unified representation.
            * This declaration may contain non-concrete types (for example,
            * Tensor<TypeVar<'T'>> is a valid type declaration.
    +       *
            * Note: this is a transient field. The long-term aim is to represent the
            * entire OpDef as a single type: a callable. In that context, this field is
            * just the type of a single argument.
    @@ -2309,7 +2299,7 @@ public Builder clearIsRef() {
            * @return Whether the experimentalFullType field is set.
            */
           public boolean hasExperimentalFullType() {
    -        return experimentalFullTypeBuilder_ != null || experimentalFullType_ != null;
    +        return ((bitField0_ & 0x00000100) != 0);
           }
           /**
            * 
    @@ -2318,6 +2308,7 @@ public boolean hasExperimentalFullType() {
            * etc. into a unified representation.
            * This declaration may contain non-concrete types (for example,
            * Tensor<TypeVar<'T'>> is a valid type declaration.
    +       *
            * Note: this is a transient field. The long-term aim is to represent the
            * entire OpDef as a single type: a callable. In that context, this field is
            * just the type of a single argument.
    @@ -2340,6 +2331,7 @@ public org.tensorflow.proto.FullTypeDef getExperimentalFullType() {
            * etc. into a unified representation.
            * This declaration may contain non-concrete types (for example,
            * Tensor<TypeVar<'T'>> is a valid type declaration.
    +       *
            * Note: this is a transient field. The long-term aim is to represent the
            * entire OpDef as a single type: a callable. In that context, this field is
            * just the type of a single argument.
    @@ -2353,11 +2345,11 @@ public Builder setExperimentalFullType(org.tensorflow.proto.FullTypeDef value) {
                 throw new NullPointerException();
               }
               experimentalFullType_ = value;
    -          onChanged();
             } else {
               experimentalFullTypeBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000100;
    +        onChanged();
             return this;
           }
           /**
    @@ -2367,6 +2359,7 @@ public Builder setExperimentalFullType(org.tensorflow.proto.FullTypeDef value) {
            * etc. into a unified representation.
            * This declaration may contain non-concrete types (for example,
            * Tensor<TypeVar<'T'>> is a valid type declaration.
    +       *
            * Note: this is a transient field. The long-term aim is to represent the
            * entire OpDef as a single type: a callable. In that context, this field is
            * just the type of a single argument.
    @@ -2378,11 +2371,11 @@ public Builder setExperimentalFullType(
               org.tensorflow.proto.FullTypeDef.Builder builderForValue) {
             if (experimentalFullTypeBuilder_ == null) {
               experimentalFullType_ = builderForValue.build();
    -          onChanged();
             } else {
               experimentalFullTypeBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000100;
    +        onChanged();
             return this;
           }
           /**
    @@ -2392,6 +2385,7 @@ public Builder setExperimentalFullType(
            * etc. into a unified representation.
            * This declaration may contain non-concrete types (for example,
            * Tensor<TypeVar<'T'>> is a valid type declaration.
    +       *
            * Note: this is a transient field. The long-term aim is to represent the
            * entire OpDef as a single type: a callable. In that context, this field is
            * just the type of a single argument.
    @@ -2401,17 +2395,20 @@ public Builder setExperimentalFullType(
            */
           public Builder mergeExperimentalFullType(org.tensorflow.proto.FullTypeDef value) {
             if (experimentalFullTypeBuilder_ == null) {
    -          if (experimentalFullType_ != null) {
    -            experimentalFullType_ =
    -              org.tensorflow.proto.FullTypeDef.newBuilder(experimentalFullType_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000100) != 0) &&
    +            experimentalFullType_ != null &&
    +            experimentalFullType_ != org.tensorflow.proto.FullTypeDef.getDefaultInstance()) {
    +            getExperimentalFullTypeBuilder().mergeFrom(value);
               } else {
                 experimentalFullType_ = value;
               }
    -          onChanged();
             } else {
               experimentalFullTypeBuilder_.mergeFrom(value);
             }
    -
    +        if (experimentalFullType_ != null) {
    +          bitField0_ |= 0x00000100;
    +          onChanged();
    +        }
             return this;
           }
           /**
    @@ -2421,6 +2418,7 @@ public Builder mergeExperimentalFullType(org.tensorflow.proto.FullTypeDef value)
            * etc. into a unified representation.
            * This declaration may contain non-concrete types (for example,
            * Tensor<TypeVar<'T'>> is a valid type declaration.
    +       *
            * Note: this is a transient field. The long-term aim is to represent the
            * entire OpDef as a single type: a callable. In that context, this field is
            * just the type of a single argument.
    @@ -2429,14 +2427,13 @@ public Builder mergeExperimentalFullType(org.tensorflow.proto.FullTypeDef value)
            * .tensorflow.FullTypeDef experimental_full_type = 17;
            */
           public Builder clearExperimentalFullType() {
    -        if (experimentalFullTypeBuilder_ == null) {
    -          experimentalFullType_ = null;
    -          onChanged();
    -        } else {
    -          experimentalFullType_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000100);
    +        experimentalFullType_ = null;
    +        if (experimentalFullTypeBuilder_ != null) {
    +          experimentalFullTypeBuilder_.dispose();
               experimentalFullTypeBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
    @@ -2446,6 +2443,7 @@ public Builder clearExperimentalFullType() {
            * etc. into a unified representation.
            * This declaration may contain non-concrete types (for example,
            * Tensor<TypeVar<'T'>> is a valid type declaration.
    +       *
            * Note: this is a transient field. The long-term aim is to represent the
            * entire OpDef as a single type: a callable. In that context, this field is
            * just the type of a single argument.
    @@ -2454,7 +2452,7 @@ public Builder clearExperimentalFullType() {
            * .tensorflow.FullTypeDef experimental_full_type = 17;
            */
           public org.tensorflow.proto.FullTypeDef.Builder getExperimentalFullTypeBuilder() {
    -        
    +        bitField0_ |= 0x00000100;
             onChanged();
             return getExperimentalFullTypeFieldBuilder().getBuilder();
           }
    @@ -2465,6 +2463,7 @@ public org.tensorflow.proto.FullTypeDef.Builder getExperimentalFullTypeBuilder()
            * etc. into a unified representation.
            * This declaration may contain non-concrete types (for example,
            * Tensor<TypeVar<'T'>> is a valid type declaration.
    +       *
            * Note: this is a transient field. The long-term aim is to represent the
            * entire OpDef as a single type: a callable. In that context, this field is
            * just the type of a single argument.
    @@ -2487,6 +2486,7 @@ public org.tensorflow.proto.FullTypeDefOrBuilder getExperimentalFullTypeOrBuilde
            * etc. into a unified representation.
            * This declaration may contain non-concrete types (for example,
            * Tensor<TypeVar<'T'>> is a valid type declaration.
    +       *
            * Note: this is a transient field. The long-term aim is to represent the
            * entire OpDef as a single type: a callable. In that context, this field is
            * just the type of a single argument.
    @@ -2494,11 +2494,11 @@ public org.tensorflow.proto.FullTypeDefOrBuilder getExperimentalFullTypeOrBuilde
            *
            * .tensorflow.FullTypeDef experimental_full_type = 17;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.FullTypeDef, org.tensorflow.proto.FullTypeDef.Builder, org.tensorflow.proto.FullTypeDefOrBuilder> 
               getExperimentalFullTypeFieldBuilder() {
             if (experimentalFullTypeBuilder_ == null) {
    -          experimentalFullTypeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          experimentalFullTypeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.FullTypeDef, org.tensorflow.proto.FullTypeDef.Builder, org.tensorflow.proto.FullTypeDefOrBuilder>(
                       getExperimentalFullType(),
                       getParentForChildren(),
    @@ -2507,18 +2507,6 @@ public org.tensorflow.proto.FullTypeDefOrBuilder getExperimentalFullTypeOrBuilde
             }
             return experimentalFullTypeBuilder_;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.OpDef.ArgDef)
         }
    @@ -2740,12 +2728,21 @@ public interface AttrDefOrBuilder extends
        * Protobuf type {@code tensorflow.OpDef.AttrDef}
        */
       public static final class AttrDef extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.OpDef.AttrDef)
           AttrDefOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        AttrDef.class.getName());
    +    }
         // Use AttrDef.newBuilder() to construct.
    -    private AttrDef(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private AttrDef(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private AttrDef() {
    @@ -2754,33 +2751,23 @@ private AttrDef() {
           description_ = "";
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new AttrDef();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.OpDefProtos.internal_static_tensorflow_OpDef_AttrDef_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.OpDefProtos.internal_static_tensorflow_OpDef_AttrDef_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
                   org.tensorflow.proto.OpDef.AttrDef.class, org.tensorflow.proto.OpDef.AttrDef.Builder.class);
         }
     
    +    private int bitField0_;
         public static final int NAME_FIELD_NUMBER = 1;
    -    private volatile java.lang.Object name_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object name_ = "";
         /**
          * 
          * A descriptive name for the argument.  May be used, e.g. by the
    @@ -2830,7 +2817,8 @@ public java.lang.String getName() {
         }
     
         public static final int TYPE_FIELD_NUMBER = 2;
    -    private volatile java.lang.Object type_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object type_ = "";
         /**
          * 
          * One of the type names from attr_value.proto ("string", "list(string)",
    @@ -2890,7 +2878,7 @@ public java.lang.String getType() {
          */
         @java.lang.Override
         public boolean hasDefaultValue() {
    -      return defaultValue_ != null;
    +      return ((bitField0_ & 0x00000001) != 0);
         }
         /**
          * 
    @@ -2915,11 +2903,12 @@ public org.tensorflow.proto.AttrValue getDefaultValue() {
          */
         @java.lang.Override
         public org.tensorflow.proto.AttrValueOrBuilder getDefaultValueOrBuilder() {
    -      return getDefaultValue();
    +      return defaultValue_ == null ? org.tensorflow.proto.AttrValue.getDefaultInstance() : defaultValue_;
         }
     
         public static final int DESCRIPTION_FIELD_NUMBER = 4;
    -    private volatile java.lang.Object description_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object description_ = "";
         /**
          * 
          * Human-readable description.
    @@ -2965,7 +2954,7 @@ public java.lang.String getDescription() {
         }
     
         public static final int HAS_MINIMUM_FIELD_NUMBER = 5;
    -    private boolean hasMinimum_;
    +    private boolean hasMinimum_ = false;
         /**
          * 
          * For type == "int", this is a minimum value.  For "list(___)"
    @@ -2981,7 +2970,7 @@ public boolean getHasMinimum() {
         }
     
         public static final int MINIMUM_FIELD_NUMBER = 6;
    -    private long minimum_;
    +    private long minimum_ = 0L;
         /**
          * int64 minimum = 6;
          * @return The minimum.
    @@ -3008,7 +2997,7 @@ public long getMinimum() {
          */
         @java.lang.Override
         public boolean hasAllowedValues() {
    -      return allowedValues_ != null;
    +      return ((bitField0_ & 0x00000002) != 0);
         }
         /**
          * 
    @@ -3041,7 +3030,7 @@ public org.tensorflow.proto.AttrValue getAllowedValues() {
          */
         @java.lang.Override
         public org.tensorflow.proto.AttrValueOrBuilder getAllowedValuesOrBuilder() {
    -      return getAllowedValues();
    +      return allowedValues_ == null ? org.tensorflow.proto.AttrValue.getDefaultInstance() : allowedValues_;
         }
     
         private byte memoizedIsInitialized = -1;
    @@ -3058,17 +3047,17 @@ public final boolean isInitialized() {
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output)
                             throws java.io.IOException {
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, type_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(type_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 2, type_);
           }
    -      if (defaultValue_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             output.writeMessage(3, getDefaultValue());
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 4, description_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 4, description_);
           }
           if (hasMinimum_ != false) {
             output.writeBool(5, hasMinimum_);
    @@ -3076,7 +3065,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           if (minimum_ != 0L) {
             output.writeInt64(6, minimum_);
           }
    -      if (allowedValues_ != null) {
    +      if (((bitField0_ & 0x00000002) != 0)) {
             output.writeMessage(7, getAllowedValues());
           }
           getUnknownFields().writeTo(output);
    @@ -3088,18 +3077,18 @@ public int getSerializedSize() {
           if (size != -1) return size;
     
           size = 0;
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, type_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(type_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, type_);
           }
    -      if (defaultValue_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(3, getDefaultValue());
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, description_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(4, description_);
           }
           if (hasMinimum_ != false) {
             size += com.google.protobuf.CodedOutputStream
    @@ -3109,7 +3098,7 @@ public int getSerializedSize() {
             size += com.google.protobuf.CodedOutputStream
               .computeInt64Size(6, minimum_);
           }
    -      if (allowedValues_ != null) {
    +      if (((bitField0_ & 0x00000002) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(7, getAllowedValues());
           }
    @@ -3218,39 +3207,41 @@ public static org.tensorflow.proto.OpDef.AttrDef parseFrom(
         }
         public static org.tensorflow.proto.OpDef.AttrDef parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.OpDef.AttrDef parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.OpDef.AttrDef parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.OpDef.AttrDef parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.OpDef.AttrDef parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.OpDef.AttrDef parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -3270,7 +3261,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -3284,7 +3275,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.OpDef.AttrDef}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.OpDef.AttrDef)
             org.tensorflow.proto.OpDef.AttrDefOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -3293,7 +3284,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.OpDefProtos.internal_static_tensorflow_OpDef_AttrDef_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -3302,37 +3293,38 @@ public static final class Builder extends
     
           // Construct using org.tensorflow.proto.OpDef.AttrDef.newBuilder()
           private Builder() {
    -
    +        maybeForceBuilderInitialization();
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
    -
    +        maybeForceBuilderInitialization();
    +      }
    +      private void maybeForceBuilderInitialization() {
    +        if (com.google.protobuf.GeneratedMessage
    +                .alwaysUseFieldBuilders) {
    +          getDefaultValueFieldBuilder();
    +          getAllowedValuesFieldBuilder();
    +        }
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             name_ = "";
    -
             type_ = "";
    -
    -        if (defaultValueBuilder_ == null) {
    -          defaultValue_ = null;
    -        } else {
    -          defaultValue_ = null;
    +        defaultValue_ = null;
    +        if (defaultValueBuilder_ != null) {
    +          defaultValueBuilder_.dispose();
               defaultValueBuilder_ = null;
             }
             description_ = "";
    -
             hasMinimum_ = false;
    -
             minimum_ = 0L;
    -
    -        if (allowedValuesBuilder_ == null) {
    -          allowedValues_ = null;
    -        } else {
    -          allowedValues_ = null;
    +        allowedValues_ = null;
    +        if (allowedValuesBuilder_ != null) {
    +          allowedValuesBuilder_.dispose();
               allowedValuesBuilder_ = null;
             }
             return this;
    @@ -3361,57 +3353,44 @@ public org.tensorflow.proto.OpDef.AttrDef build() {
           @java.lang.Override
           public org.tensorflow.proto.OpDef.AttrDef buildPartial() {
             org.tensorflow.proto.OpDef.AttrDef result = new org.tensorflow.proto.OpDef.AttrDef(this);
    -        result.name_ = name_;
    -        result.type_ = type_;
    -        if (defaultValueBuilder_ == null) {
    -          result.defaultValue_ = defaultValue_;
    -        } else {
    -          result.defaultValue_ = defaultValueBuilder_.build();
    -        }
    -        result.description_ = description_;
    -        result.hasMinimum_ = hasMinimum_;
    -        result.minimum_ = minimum_;
    -        if (allowedValuesBuilder_ == null) {
    -          result.allowedValues_ = allowedValues_;
    -        } else {
    -          result.allowedValues_ = allowedValuesBuilder_.build();
    -        }
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.OpDef.AttrDef result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.name_ = name_;
    +        }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.type_ = type_;
    +        }
    +        int to_bitField0_ = 0;
    +        if (((from_bitField0_ & 0x00000004) != 0)) {
    +          result.defaultValue_ = defaultValueBuilder_ == null
    +              ? defaultValue_
    +              : defaultValueBuilder_.build();
    +          to_bitField0_ |= 0x00000001;
    +        }
    +        if (((from_bitField0_ & 0x00000008) != 0)) {
    +          result.description_ = description_;
    +        }
    +        if (((from_bitField0_ & 0x00000010) != 0)) {
    +          result.hasMinimum_ = hasMinimum_;
    +        }
    +        if (((from_bitField0_ & 0x00000020) != 0)) {
    +          result.minimum_ = minimum_;
    +        }
    +        if (((from_bitField0_ & 0x00000040) != 0)) {
    +          result.allowedValues_ = allowedValuesBuilder_ == null
    +              ? allowedValues_
    +              : allowedValuesBuilder_.build();
    +          to_bitField0_ |= 0x00000002;
    +        }
    +        result.bitField0_ |= to_bitField0_;
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.OpDef.AttrDef) {
    @@ -3426,10 +3405,12 @@ public Builder mergeFrom(org.tensorflow.proto.OpDef.AttrDef other) {
             if (other == org.tensorflow.proto.OpDef.AttrDef.getDefaultInstance()) return this;
             if (!other.getName().isEmpty()) {
               name_ = other.name_;
    +          bitField0_ |= 0x00000001;
               onChanged();
             }
             if (!other.getType().isEmpty()) {
               type_ = other.type_;
    +          bitField0_ |= 0x00000002;
               onChanged();
             }
             if (other.hasDefaultValue()) {
    @@ -3437,6 +3418,7 @@ public Builder mergeFrom(org.tensorflow.proto.OpDef.AttrDef other) {
             }
             if (!other.getDescription().isEmpty()) {
               description_ = other.description_;
    +          bitField0_ |= 0x00000008;
               onChanged();
             }
             if (other.getHasMinimum() != false) {
    @@ -3476,41 +3458,41 @@ public Builder mergeFrom(
                     break;
                   case 10: {
                     name_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 10
                   case 18: {
                     type_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 18
                   case 26: {
                     input.readMessage(
                         getDefaultValueFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00000004;
                     break;
                   } // case 26
                   case 34: {
                     description_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000008;
                     break;
                   } // case 34
                   case 40: {
                     hasMinimum_ = input.readBool();
    -
    +                bitField0_ |= 0x00000010;
                     break;
                   } // case 40
                   case 48: {
                     minimum_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000020;
                     break;
                   } // case 48
                   case 58: {
                     input.readMessage(
                         getAllowedValuesFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00000040;
                     break;
                   } // case 58
                   default: {
    @@ -3528,6 +3510,7 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    +      private int bitField0_;
     
           private java.lang.Object name_ = "";
           /**
    @@ -3588,11 +3571,9 @@ public java.lang.String getName() {
            */
           public Builder setName(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             name_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -3607,8 +3588,8 @@ public Builder setName(
            * @return This builder for chaining.
            */
           public Builder clearName() {
    -        
             name_ = getDefaultInstance().getName();
    +        bitField0_ = (bitField0_ & ~0x00000001);
             onChanged();
             return this;
           }
    @@ -3625,12 +3606,10 @@ public Builder clearName() {
            */
           public Builder setNameBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             name_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -3691,11 +3670,9 @@ public java.lang.String getType() {
            */
           public Builder setType(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             type_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -3709,8 +3686,8 @@ public Builder setType(
            * @return This builder for chaining.
            */
           public Builder clearType() {
    -        
             type_ = getDefaultInstance().getType();
    +        bitField0_ = (bitField0_ & ~0x00000002);
             onChanged();
             return this;
           }
    @@ -3726,18 +3703,16 @@ public Builder clearType() {
            */
           public Builder setTypeBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             type_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
     
           private org.tensorflow.proto.AttrValue defaultValue_;
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.AttrValue, org.tensorflow.proto.AttrValue.Builder, org.tensorflow.proto.AttrValueOrBuilder> defaultValueBuilder_;
           /**
            * 
    @@ -3749,7 +3724,7 @@ public Builder setTypeBytes(
            * @return Whether the defaultValue field is set.
            */
           public boolean hasDefaultValue() {
    -        return defaultValueBuilder_ != null || defaultValue_ != null;
    +        return ((bitField0_ & 0x00000004) != 0);
           }
           /**
            * 
    @@ -3781,11 +3756,11 @@ public Builder setDefaultValue(org.tensorflow.proto.AttrValue value) {
                 throw new NullPointerException();
               }
               defaultValue_ = value;
    -          onChanged();
             } else {
               defaultValueBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000004;
    +        onChanged();
             return this;
           }
           /**
    @@ -3800,11 +3775,11 @@ public Builder setDefaultValue(
               org.tensorflow.proto.AttrValue.Builder builderForValue) {
             if (defaultValueBuilder_ == null) {
               defaultValue_ = builderForValue.build();
    -          onChanged();
             } else {
               defaultValueBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000004;
    +        onChanged();
             return this;
           }
           /**
    @@ -3817,17 +3792,20 @@ public Builder setDefaultValue(
            */
           public Builder mergeDefaultValue(org.tensorflow.proto.AttrValue value) {
             if (defaultValueBuilder_ == null) {
    -          if (defaultValue_ != null) {
    -            defaultValue_ =
    -              org.tensorflow.proto.AttrValue.newBuilder(defaultValue_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000004) != 0) &&
    +            defaultValue_ != null &&
    +            defaultValue_ != org.tensorflow.proto.AttrValue.getDefaultInstance()) {
    +            getDefaultValueBuilder().mergeFrom(value);
               } else {
                 defaultValue_ = value;
               }
    -          onChanged();
             } else {
               defaultValueBuilder_.mergeFrom(value);
             }
    -
    +        if (defaultValue_ != null) {
    +          bitField0_ |= 0x00000004;
    +          onChanged();
    +        }
             return this;
           }
           /**
    @@ -3839,14 +3817,13 @@ public Builder mergeDefaultValue(org.tensorflow.proto.AttrValue value) {
            * .tensorflow.AttrValue default_value = 3;
            */
           public Builder clearDefaultValue() {
    -        if (defaultValueBuilder_ == null) {
    -          defaultValue_ = null;
    -          onChanged();
    -        } else {
    -          defaultValue_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000004);
    +        defaultValue_ = null;
    +        if (defaultValueBuilder_ != null) {
    +          defaultValueBuilder_.dispose();
               defaultValueBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
    @@ -3858,7 +3835,7 @@ public Builder clearDefaultValue() {
            * .tensorflow.AttrValue default_value = 3;
            */
           public org.tensorflow.proto.AttrValue.Builder getDefaultValueBuilder() {
    -        
    +        bitField0_ |= 0x00000004;
             onChanged();
             return getDefaultValueFieldBuilder().getBuilder();
           }
    @@ -3886,11 +3863,11 @@ public org.tensorflow.proto.AttrValueOrBuilder getDefaultValueOrBuilder() {
            *
            * .tensorflow.AttrValue default_value = 3;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.AttrValue, org.tensorflow.proto.AttrValue.Builder, org.tensorflow.proto.AttrValueOrBuilder> 
               getDefaultValueFieldBuilder() {
             if (defaultValueBuilder_ == null) {
    -          defaultValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          defaultValueBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.AttrValue, org.tensorflow.proto.AttrValue.Builder, org.tensorflow.proto.AttrValueOrBuilder>(
                       getDefaultValue(),
                       getParentForChildren(),
    @@ -3953,11 +3930,9 @@ public java.lang.String getDescription() {
            */
           public Builder setDescription(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             description_ = value;
    +        bitField0_ |= 0x00000008;
             onChanged();
             return this;
           }
    @@ -3970,8 +3945,8 @@ public Builder setDescription(
            * @return This builder for chaining.
            */
           public Builder clearDescription() {
    -        
             description_ = getDefaultInstance().getDescription();
    +        bitField0_ = (bitField0_ & ~0x00000008);
             onChanged();
             return this;
           }
    @@ -3986,12 +3961,10 @@ public Builder clearDescription() {
            */
           public Builder setDescriptionBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             description_ = value;
    +        bitField0_ |= 0x00000008;
             onChanged();
             return this;
           }
    @@ -4021,8 +3994,9 @@ public boolean getHasMinimum() {
            * @return This builder for chaining.
            */
           public Builder setHasMinimum(boolean value) {
    -        
    +
             hasMinimum_ = value;
    +        bitField0_ |= 0x00000010;
             onChanged();
             return this;
           }
    @@ -4036,7 +4010,7 @@ public Builder setHasMinimum(boolean value) {
            * @return This builder for chaining.
            */
           public Builder clearHasMinimum() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000010);
             hasMinimum_ = false;
             onChanged();
             return this;
    @@ -4057,8 +4031,9 @@ public long getMinimum() {
            * @return This builder for chaining.
            */
           public Builder setMinimum(long value) {
    -        
    +
             minimum_ = value;
    +        bitField0_ |= 0x00000020;
             onChanged();
             return this;
           }
    @@ -4067,14 +4042,14 @@ public Builder setMinimum(long value) {
            * @return This builder for chaining.
            */
           public Builder clearMinimum() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000020);
             minimum_ = 0L;
             onChanged();
             return this;
           }
     
           private org.tensorflow.proto.AttrValue allowedValues_;
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.AttrValue, org.tensorflow.proto.AttrValue.Builder, org.tensorflow.proto.AttrValueOrBuilder> allowedValuesBuilder_;
           /**
            * 
    @@ -4090,7 +4065,7 @@ public Builder clearMinimum() {
            * @return Whether the allowedValues field is set.
            */
           public boolean hasAllowedValues() {
    -        return allowedValuesBuilder_ != null || allowedValues_ != null;
    +        return ((bitField0_ & 0x00000040) != 0);
           }
           /**
            * 
    @@ -4130,11 +4105,11 @@ public Builder setAllowedValues(org.tensorflow.proto.AttrValue value) {
                 throw new NullPointerException();
               }
               allowedValues_ = value;
    -          onChanged();
             } else {
               allowedValuesBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000040;
    +        onChanged();
             return this;
           }
           /**
    @@ -4153,11 +4128,11 @@ public Builder setAllowedValues(
               org.tensorflow.proto.AttrValue.Builder builderForValue) {
             if (allowedValuesBuilder_ == null) {
               allowedValues_ = builderForValue.build();
    -          onChanged();
             } else {
               allowedValuesBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000040;
    +        onChanged();
             return this;
           }
           /**
    @@ -4174,17 +4149,20 @@ public Builder setAllowedValues(
            */
           public Builder mergeAllowedValues(org.tensorflow.proto.AttrValue value) {
             if (allowedValuesBuilder_ == null) {
    -          if (allowedValues_ != null) {
    -            allowedValues_ =
    -              org.tensorflow.proto.AttrValue.newBuilder(allowedValues_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000040) != 0) &&
    +            allowedValues_ != null &&
    +            allowedValues_ != org.tensorflow.proto.AttrValue.getDefaultInstance()) {
    +            getAllowedValuesBuilder().mergeFrom(value);
               } else {
                 allowedValues_ = value;
               }
    -          onChanged();
             } else {
               allowedValuesBuilder_.mergeFrom(value);
             }
    -
    +        if (allowedValues_ != null) {
    +          bitField0_ |= 0x00000040;
    +          onChanged();
    +        }
             return this;
           }
           /**
    @@ -4200,14 +4178,13 @@ public Builder mergeAllowedValues(org.tensorflow.proto.AttrValue value) {
            * .tensorflow.AttrValue allowed_values = 7;
            */
           public Builder clearAllowedValues() {
    -        if (allowedValuesBuilder_ == null) {
    -          allowedValues_ = null;
    -          onChanged();
    -        } else {
    -          allowedValues_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000040);
    +        allowedValues_ = null;
    +        if (allowedValuesBuilder_ != null) {
    +          allowedValuesBuilder_.dispose();
               allowedValuesBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
    @@ -4223,7 +4200,7 @@ public Builder clearAllowedValues() {
            * .tensorflow.AttrValue allowed_values = 7;
            */
           public org.tensorflow.proto.AttrValue.Builder getAllowedValuesBuilder() {
    -        
    +        bitField0_ |= 0x00000040;
             onChanged();
             return getAllowedValuesFieldBuilder().getBuilder();
           }
    @@ -4259,11 +4236,11 @@ public org.tensorflow.proto.AttrValueOrBuilder getAllowedValuesOrBuilder() {
            *
            * .tensorflow.AttrValue allowed_values = 7;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.AttrValue, org.tensorflow.proto.AttrValue.Builder, org.tensorflow.proto.AttrValueOrBuilder> 
               getAllowedValuesFieldBuilder() {
             if (allowedValuesBuilder_ == null) {
    -          allowedValuesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          allowedValuesBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.AttrValue, org.tensorflow.proto.AttrValue.Builder, org.tensorflow.proto.AttrValueOrBuilder>(
                       getAllowedValues(),
                       getParentForChildren(),
    @@ -4272,18 +4249,6 @@ public org.tensorflow.proto.AttrValueOrBuilder getAllowedValuesOrBuilder() {
             }
             return allowedValuesBuilder_;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.OpDef.AttrDef)
         }
    @@ -4336,8 +4301,10 @@ public org.tensorflow.proto.OpDef.AttrDef getDefaultInstanceForType() {
     
       }
     
    +  private int bitField0_;
       public static final int NAME_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object name_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object name_ = "";
       /**
        * 
        * Op names starting with an underscore are reserved for internal use.
    @@ -4385,6 +4352,7 @@ public java.lang.String getName() {
       }
     
       public static final int INPUT_ARG_FIELD_NUMBER = 2;
    +  @SuppressWarnings("serial")
       private java.util.List inputArg_;
       /**
        * 
    @@ -4445,6 +4413,7 @@ public org.tensorflow.proto.OpDef.ArgDefOrBuilder getInputArgOrBuilder(
       }
     
       public static final int OUTPUT_ARG_FIELD_NUMBER = 3;
    +  @SuppressWarnings("serial")
       private java.util.List outputArg_;
       /**
        * 
    @@ -4505,7 +4474,9 @@ public org.tensorflow.proto.OpDef.ArgDefOrBuilder getOutputArgOrBuilder(
       }
     
       public static final int CONTROL_OUTPUT_FIELD_NUMBER = 20;
    -  private com.google.protobuf.LazyStringList controlOutput_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.LazyStringArrayList controlOutput_ =
    +      com.google.protobuf.LazyStringArrayList.emptyList();
       /**
        * 
        * Named control outputs for this operation. Useful only for composite
    @@ -4560,6 +4531,7 @@ public java.lang.String getControlOutput(int index) {
       }
     
       public static final int ATTR_FIELD_NUMBER = 4;
    +  @SuppressWarnings("serial")
       private java.util.List attr_;
       /**
        * repeated .tensorflow.OpDef.AttrDef attr = 4;
    @@ -4611,7 +4583,7 @@ public org.tensorflow.proto.OpDef.AttrDefOrBuilder getAttrOrBuilder(
        */
       @java.lang.Override
       public boolean hasDeprecation() {
    -    return deprecation_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * 
    @@ -4634,11 +4606,12 @@ public org.tensorflow.proto.OpDeprecation getDeprecation() {
        */
       @java.lang.Override
       public org.tensorflow.proto.OpDeprecationOrBuilder getDeprecationOrBuilder() {
    -    return getDeprecation();
    +    return deprecation_ == null ? org.tensorflow.proto.OpDeprecation.getDefaultInstance() : deprecation_;
       }
     
       public static final int SUMMARY_FIELD_NUMBER = 5;
    -  private volatile java.lang.Object summary_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object summary_ = "";
       /**
        * 
        * One-line human-readable description of what the Op does.
    @@ -4684,7 +4657,8 @@ public java.lang.String getSummary() {
       }
     
       public static final int DESCRIPTION_FIELD_NUMBER = 6;
    -  private volatile java.lang.Object description_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object description_ = "";
       /**
        * 
        * Additional, longer human-readable description of what the Op does.
    @@ -4730,7 +4704,7 @@ public java.lang.String getDescription() {
       }
     
       public static final int IS_COMMUTATIVE_FIELD_NUMBER = 18;
    -  private boolean isCommutative_;
    +  private boolean isCommutative_ = false;
       /**
        * 
        * True if the operation is commutative ("op(a,b) == op(b,a)" for all inputs)
    @@ -4745,7 +4719,7 @@ public boolean getIsCommutative() {
       }
     
       public static final int IS_AGGREGATE_FIELD_NUMBER = 16;
    -  private boolean isAggregate_;
    +  private boolean isAggregate_ = false;
       /**
        * 
        * If is_aggregate is true, then this operation accepts N >= 2
    @@ -4767,7 +4741,7 @@ public boolean getIsAggregate() {
       }
     
       public static final int IS_STATEFUL_FIELD_NUMBER = 17;
    -  private boolean isStateful_;
    +  private boolean isStateful_ = false;
       /**
        * 
        * Ops are marked as stateful if their behavior depends on some state beyond
    @@ -4775,6 +4749,7 @@ public boolean getIsAggregate() {
        * a side-effect (e.g. printing or asserting ops). Equivalently, stateless ops
        * must always produce the same output for the same input and have
        * no side-effects.
    +   *
        * By default Ops may be moved between devices.  Stateful ops should
        * either not be moved, or should only be moved if that state can also
        * be moved (e.g. via some sort of save / restore).
    @@ -4791,7 +4766,7 @@ public boolean getIsStateful() {
       }
     
       public static final int ALLOWS_UNINITIALIZED_INPUT_FIELD_NUMBER = 19;
    -  private boolean allowsUninitializedInput_;
    +  private boolean allowsUninitializedInput_ = false;
       /**
        * 
        * By default, all inputs to an Op must be initialized Tensors.  Ops
    @@ -4809,7 +4784,7 @@ public boolean getAllowsUninitializedInput() {
       }
     
       public static final int IS_DISTRIBUTED_COMMUNICATION_FIELD_NUMBER = 21;
    -  private boolean isDistributedCommunication_;
    +  private boolean isDistributedCommunication_ = false;
       /**
        * 
        * Indicates whether the op implementation uses distributed communication.
    @@ -4839,8 +4814,8 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
         }
         for (int i = 0; i < inputArg_.size(); i++) {
           output.writeMessage(2, inputArg_.get(i));
    @@ -4851,13 +4826,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         for (int i = 0; i < attr_.size(); i++) {
           output.writeMessage(4, attr_.get(i));
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(summary_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, summary_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(summary_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 5, summary_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 6, description_);
         }
    -    if (deprecation_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(8, getDeprecation());
         }
         if (isAggregate_ != false) {
    @@ -4873,7 +4848,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           output.writeBool(19, allowsUninitializedInput_);
         }
         for (int i = 0; i < controlOutput_.size(); i++) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 20, controlOutput_.getRaw(i));
    +      com.google.protobuf.GeneratedMessage.writeString(output, 20, controlOutput_.getRaw(i));
         }
         if (isDistributedCommunication_ != false) {
           output.writeBool(21, isDistributedCommunication_);
    @@ -4887,8 +4862,8 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
         }
         for (int i = 0; i < inputArg_.size(); i++) {
           size += com.google.protobuf.CodedOutputStream
    @@ -4902,13 +4877,13 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(4, attr_.get(i));
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(summary_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, summary_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(summary_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(5, summary_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(6, description_);
         }
    -    if (deprecation_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(8, getDeprecation());
         }
    @@ -5075,39 +5050,41 @@ public static org.tensorflow.proto.OpDef parseFrom(
       }
       public static org.tensorflow.proto.OpDef parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.OpDef parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.OpDef parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.OpDef parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.OpDef parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.OpDef parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -5127,7 +5104,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -5141,7 +5118,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.OpDef}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.OpDef)
           org.tensorflow.proto.OpDefOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -5150,7 +5127,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.OpDefProtos.internal_static_tensorflow_OpDef_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -5159,62 +5136,63 @@ public static final class Builder extends
     
         // Construct using org.tensorflow.proto.OpDef.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getInputArgFieldBuilder();
    +        getOutputArgFieldBuilder();
    +        getAttrFieldBuilder();
    +        getDeprecationFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           name_ = "";
    -
           if (inputArgBuilder_ == null) {
             inputArg_ = java.util.Collections.emptyList();
           } else {
             inputArg_ = null;
             inputArgBuilder_.clear();
           }
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      bitField0_ = (bitField0_ & ~0x00000002);
           if (outputArgBuilder_ == null) {
             outputArg_ = java.util.Collections.emptyList();
           } else {
             outputArg_ = null;
             outputArgBuilder_.clear();
           }
    -      bitField0_ = (bitField0_ & ~0x00000002);
    -      controlOutput_ = com.google.protobuf.LazyStringArrayList.EMPTY;
           bitField0_ = (bitField0_ & ~0x00000004);
    +      controlOutput_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
           if (attrBuilder_ == null) {
             attr_ = java.util.Collections.emptyList();
           } else {
             attr_ = null;
             attrBuilder_.clear();
           }
    -      bitField0_ = (bitField0_ & ~0x00000008);
    -      if (deprecationBuilder_ == null) {
    -        deprecation_ = null;
    -      } else {
    -        deprecation_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000010);
    +      deprecation_ = null;
    +      if (deprecationBuilder_ != null) {
    +        deprecationBuilder_.dispose();
             deprecationBuilder_ = null;
           }
           summary_ = "";
    -
           description_ = "";
    -
           isCommutative_ = false;
    -
           isAggregate_ = false;
    -
           isStateful_ = false;
    -
           allowsUninitializedInput_ = false;
    -
           isDistributedCommunication_ = false;
    -
           return this;
         }
     
    @@ -5241,88 +5219,82 @@ public org.tensorflow.proto.OpDef build() {
         @java.lang.Override
         public org.tensorflow.proto.OpDef buildPartial() {
           org.tensorflow.proto.OpDef result = new org.tensorflow.proto.OpDef(this);
    -      int from_bitField0_ = bitField0_;
    -      result.name_ = name_;
    +      buildPartialRepeatedFields(result);
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartialRepeatedFields(org.tensorflow.proto.OpDef result) {
           if (inputArgBuilder_ == null) {
    -        if (((bitField0_ & 0x00000001) != 0)) {
    +        if (((bitField0_ & 0x00000002) != 0)) {
               inputArg_ = java.util.Collections.unmodifiableList(inputArg_);
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ = (bitField0_ & ~0x00000002);
             }
             result.inputArg_ = inputArg_;
           } else {
             result.inputArg_ = inputArgBuilder_.build();
           }
           if (outputArgBuilder_ == null) {
    -        if (((bitField0_ & 0x00000002) != 0)) {
    +        if (((bitField0_ & 0x00000004) != 0)) {
               outputArg_ = java.util.Collections.unmodifiableList(outputArg_);
    -          bitField0_ = (bitField0_ & ~0x00000002);
    +          bitField0_ = (bitField0_ & ~0x00000004);
             }
             result.outputArg_ = outputArg_;
           } else {
             result.outputArg_ = outputArgBuilder_.build();
           }
    -      if (((bitField0_ & 0x00000004) != 0)) {
    -        controlOutput_ = controlOutput_.getUnmodifiableView();
    -        bitField0_ = (bitField0_ & ~0x00000004);
    -      }
    -      result.controlOutput_ = controlOutput_;
           if (attrBuilder_ == null) {
    -        if (((bitField0_ & 0x00000008) != 0)) {
    +        if (((bitField0_ & 0x00000010) != 0)) {
               attr_ = java.util.Collections.unmodifiableList(attr_);
    -          bitField0_ = (bitField0_ & ~0x00000008);
    +          bitField0_ = (bitField0_ & ~0x00000010);
             }
             result.attr_ = attr_;
           } else {
             result.attr_ = attrBuilder_.build();
           }
    -      if (deprecationBuilder_ == null) {
    -        result.deprecation_ = deprecation_;
    -      } else {
    -        result.deprecation_ = deprecationBuilder_.build();
    -      }
    -      result.summary_ = summary_;
    -      result.description_ = description_;
    -      result.isCommutative_ = isCommutative_;
    -      result.isAggregate_ = isAggregate_;
    -      result.isStateful_ = isStateful_;
    -      result.allowsUninitializedInput_ = allowsUninitializedInput_;
    -      result.isDistributedCommunication_ = isDistributedCommunication_;
    -      onBuilt();
    -      return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.OpDef result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.name_ = name_;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        controlOutput_.makeImmutable();
    +        result.controlOutput_ = controlOutput_;
    +      }
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000020) != 0)) {
    +        result.deprecation_ = deprecationBuilder_ == null
    +            ? deprecation_
    +            : deprecationBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
    +      }
    +      if (((from_bitField0_ & 0x00000040) != 0)) {
    +        result.summary_ = summary_;
    +      }
    +      if (((from_bitField0_ & 0x00000080) != 0)) {
    +        result.description_ = description_;
    +      }
    +      if (((from_bitField0_ & 0x00000100) != 0)) {
    +        result.isCommutative_ = isCommutative_;
    +      }
    +      if (((from_bitField0_ & 0x00000200) != 0)) {
    +        result.isAggregate_ = isAggregate_;
    +      }
    +      if (((from_bitField0_ & 0x00000400) != 0)) {
    +        result.isStateful_ = isStateful_;
    +      }
    +      if (((from_bitField0_ & 0x00000800) != 0)) {
    +        result.allowsUninitializedInput_ = allowsUninitializedInput_;
    +      }
    +      if (((from_bitField0_ & 0x00001000) != 0)) {
    +        result.isDistributedCommunication_ = isDistributedCommunication_;
    +      }
    +      result.bitField0_ |= to_bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.OpDef) {
    @@ -5337,13 +5309,14 @@ public Builder mergeFrom(org.tensorflow.proto.OpDef other) {
           if (other == org.tensorflow.proto.OpDef.getDefaultInstance()) return this;
           if (!other.getName().isEmpty()) {
             name_ = other.name_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (inputArgBuilder_ == null) {
             if (!other.inputArg_.isEmpty()) {
               if (inputArg_.isEmpty()) {
                 inputArg_ = other.inputArg_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000002);
               } else {
                 ensureInputArgIsMutable();
                 inputArg_.addAll(other.inputArg_);
    @@ -5356,9 +5329,9 @@ public Builder mergeFrom(org.tensorflow.proto.OpDef other) {
                 inputArgBuilder_.dispose();
                 inputArgBuilder_ = null;
                 inputArg_ = other.inputArg_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000002);
                 inputArgBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getInputArgFieldBuilder() : null;
               } else {
                 inputArgBuilder_.addAllMessages(other.inputArg_);
    @@ -5369,7 +5342,7 @@ public Builder mergeFrom(org.tensorflow.proto.OpDef other) {
             if (!other.outputArg_.isEmpty()) {
               if (outputArg_.isEmpty()) {
                 outputArg_ = other.outputArg_;
    -            bitField0_ = (bitField0_ & ~0x00000002);
    +            bitField0_ = (bitField0_ & ~0x00000004);
               } else {
                 ensureOutputArgIsMutable();
                 outputArg_.addAll(other.outputArg_);
    @@ -5382,9 +5355,9 @@ public Builder mergeFrom(org.tensorflow.proto.OpDef other) {
                 outputArgBuilder_.dispose();
                 outputArgBuilder_ = null;
                 outputArg_ = other.outputArg_;
    -            bitField0_ = (bitField0_ & ~0x00000002);
    +            bitField0_ = (bitField0_ & ~0x00000004);
                 outputArgBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getOutputArgFieldBuilder() : null;
               } else {
                 outputArgBuilder_.addAllMessages(other.outputArg_);
    @@ -5394,7 +5367,7 @@ public Builder mergeFrom(org.tensorflow.proto.OpDef other) {
           if (!other.controlOutput_.isEmpty()) {
             if (controlOutput_.isEmpty()) {
               controlOutput_ = other.controlOutput_;
    -          bitField0_ = (bitField0_ & ~0x00000004);
    +          bitField0_ |= 0x00000008;
             } else {
               ensureControlOutputIsMutable();
               controlOutput_.addAll(other.controlOutput_);
    @@ -5405,7 +5378,7 @@ public Builder mergeFrom(org.tensorflow.proto.OpDef other) {
             if (!other.attr_.isEmpty()) {
               if (attr_.isEmpty()) {
                 attr_ = other.attr_;
    -            bitField0_ = (bitField0_ & ~0x00000008);
    +            bitField0_ = (bitField0_ & ~0x00000010);
               } else {
                 ensureAttrIsMutable();
                 attr_.addAll(other.attr_);
    @@ -5418,9 +5391,9 @@ public Builder mergeFrom(org.tensorflow.proto.OpDef other) {
                 attrBuilder_.dispose();
                 attrBuilder_ = null;
                 attr_ = other.attr_;
    -            bitField0_ = (bitField0_ & ~0x00000008);
    +            bitField0_ = (bitField0_ & ~0x00000010);
                 attrBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getAttrFieldBuilder() : null;
               } else {
                 attrBuilder_.addAllMessages(other.attr_);
    @@ -5432,10 +5405,12 @@ public Builder mergeFrom(org.tensorflow.proto.OpDef other) {
           }
           if (!other.getSummary().isEmpty()) {
             summary_ = other.summary_;
    +        bitField0_ |= 0x00000040;
             onChanged();
           }
           if (!other.getDescription().isEmpty()) {
             description_ = other.description_;
    +        bitField0_ |= 0x00000080;
             onChanged();
           }
           if (other.getIsCommutative() != false) {
    @@ -5481,7 +5456,7 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   name_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
    @@ -5525,39 +5500,39 @@ public Builder mergeFrom(
                 } // case 34
                 case 42: {
                   summary_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000040;
                   break;
                 } // case 42
                 case 50: {
                   description_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000080;
                   break;
                 } // case 50
                 case 66: {
                   input.readMessage(
                       getDeprecationFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000020;
                   break;
                 } // case 66
                 case 128: {
                   isAggregate_ = input.readBool();
    -
    +              bitField0_ |= 0x00000200;
                   break;
                 } // case 128
                 case 136: {
                   isStateful_ = input.readBool();
    -
    +              bitField0_ |= 0x00000400;
                   break;
                 } // case 136
                 case 144: {
                   isCommutative_ = input.readBool();
    -
    +              bitField0_ |= 0x00000100;
                   break;
                 } // case 144
                 case 152: {
                   allowsUninitializedInput_ = input.readBool();
    -
    +              bitField0_ |= 0x00000800;
                   break;
                 } // case 152
                 case 162: {
    @@ -5568,7 +5543,7 @@ public Builder mergeFrom(
                 } // case 162
                 case 168: {
                   isDistributedCommunication_ = input.readBool();
    -
    +              bitField0_ |= 0x00001000;
                   break;
                 } // case 168
                 default: {
    @@ -5644,11 +5619,9 @@ public java.lang.String getName() {
          */
         public Builder setName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           name_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -5662,8 +5635,8 @@ public Builder setName(
          * @return This builder for chaining.
          */
         public Builder clearName() {
    -      
           name_ = getDefaultInstance().getName();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -5679,12 +5652,10 @@ public Builder clearName() {
          */
         public Builder setNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           name_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -5692,13 +5663,13 @@ public Builder setNameBytes(
         private java.util.List inputArg_ =
           java.util.Collections.emptyList();
         private void ensureInputArgIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    +      if (!((bitField0_ & 0x00000002) != 0)) {
             inputArg_ = new java.util.ArrayList(inputArg_);
    -        bitField0_ |= 0x00000001;
    +        bitField0_ |= 0x00000002;
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.OpDef.ArgDef, org.tensorflow.proto.OpDef.ArgDef.Builder, org.tensorflow.proto.OpDef.ArgDefOrBuilder> inputArgBuilder_;
     
         /**
    @@ -5888,7 +5859,7 @@ public Builder addAllInputArg(
         public Builder clearInputArg() {
           if (inputArgBuilder_ == null) {
             inputArg_ = java.util.Collections.emptyList();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        bitField0_ = (bitField0_ & ~0x00000002);
             onChanged();
           } else {
             inputArgBuilder_.clear();
    @@ -5986,14 +5957,14 @@ public org.tensorflow.proto.OpDef.ArgDef.Builder addInputArgBuilder(
              getInputArgBuilderList() {
           return getInputArgFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.OpDef.ArgDef, org.tensorflow.proto.OpDef.ArgDef.Builder, org.tensorflow.proto.OpDef.ArgDefOrBuilder> 
             getInputArgFieldBuilder() {
           if (inputArgBuilder_ == null) {
    -        inputArgBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        inputArgBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.OpDef.ArgDef, org.tensorflow.proto.OpDef.ArgDef.Builder, org.tensorflow.proto.OpDef.ArgDefOrBuilder>(
                     inputArg_,
    -                ((bitField0_ & 0x00000001) != 0),
    +                ((bitField0_ & 0x00000002) != 0),
                     getParentForChildren(),
                     isClean());
             inputArg_ = null;
    @@ -6004,13 +5975,13 @@ public org.tensorflow.proto.OpDef.ArgDef.Builder addInputArgBuilder(
         private java.util.List outputArg_ =
           java.util.Collections.emptyList();
         private void ensureOutputArgIsMutable() {
    -      if (!((bitField0_ & 0x00000002) != 0)) {
    +      if (!((bitField0_ & 0x00000004) != 0)) {
             outputArg_ = new java.util.ArrayList(outputArg_);
    -        bitField0_ |= 0x00000002;
    +        bitField0_ |= 0x00000004;
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.OpDef.ArgDef, org.tensorflow.proto.OpDef.ArgDef.Builder, org.tensorflow.proto.OpDef.ArgDefOrBuilder> outputArgBuilder_;
     
         /**
    @@ -6200,7 +6171,7 @@ public Builder addAllOutputArg(
         public Builder clearOutputArg() {
           if (outputArgBuilder_ == null) {
             outputArg_ = java.util.Collections.emptyList();
    -        bitField0_ = (bitField0_ & ~0x00000002);
    +        bitField0_ = (bitField0_ & ~0x00000004);
             onChanged();
           } else {
             outputArgBuilder_.clear();
    @@ -6298,14 +6269,14 @@ public org.tensorflow.proto.OpDef.ArgDef.Builder addOutputArgBuilder(
              getOutputArgBuilderList() {
           return getOutputArgFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.OpDef.ArgDef, org.tensorflow.proto.OpDef.ArgDef.Builder, org.tensorflow.proto.OpDef.ArgDefOrBuilder> 
             getOutputArgFieldBuilder() {
           if (outputArgBuilder_ == null) {
    -        outputArgBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        outputArgBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.OpDef.ArgDef, org.tensorflow.proto.OpDef.ArgDef.Builder, org.tensorflow.proto.OpDef.ArgDefOrBuilder>(
                     outputArg_,
    -                ((bitField0_ & 0x00000002) != 0),
    +                ((bitField0_ & 0x00000004) != 0),
                     getParentForChildren(),
                     isClean());
             outputArg_ = null;
    @@ -6313,12 +6284,13 @@ public org.tensorflow.proto.OpDef.ArgDef.Builder addOutputArgBuilder(
           return outputArgBuilder_;
         }
     
    -    private com.google.protobuf.LazyStringList controlOutput_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +    private com.google.protobuf.LazyStringArrayList controlOutput_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         private void ensureControlOutputIsMutable() {
    -      if (!((bitField0_ & 0x00000004) != 0)) {
    +      if (!controlOutput_.isModifiable()) {
             controlOutput_ = new com.google.protobuf.LazyStringArrayList(controlOutput_);
    -        bitField0_ |= 0x00000004;
    -       }
    +      }
    +      bitField0_ |= 0x00000008;
         }
         /**
          * 
    @@ -6331,7 +6303,8 @@ private void ensureControlOutputIsMutable() {
          */
         public com.google.protobuf.ProtocolStringList
             getControlOutputList() {
    -      return controlOutput_.getUnmodifiableView();
    +      controlOutput_.makeImmutable();
    +      return controlOutput_;
         }
         /**
          * 
    @@ -6385,11 +6358,10 @@ public java.lang.String getControlOutput(int index) {
          */
         public Builder setControlOutput(
             int index, java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureControlOutputIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureControlOutputIsMutable();
           controlOutput_.set(index, value);
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -6405,11 +6377,10 @@ public Builder setControlOutput(
          */
         public Builder addControlOutput(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureControlOutputIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureControlOutputIsMutable();
           controlOutput_.add(value);
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -6428,6 +6399,7 @@ public Builder addAllControlOutput(
           ensureControlOutputIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, controlOutput_);
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -6441,8 +6413,9 @@ public Builder addAllControlOutput(
          * @return This builder for chaining.
          */
         public Builder clearControlOutput() {
    -      controlOutput_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000004);
    +      controlOutput_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
    +      bitField0_ = (bitField0_ & ~0x00000008);;
           onChanged();
           return this;
         }
    @@ -6458,12 +6431,11 @@ public Builder clearControlOutput() {
          */
         public Builder addControlOutputBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           ensureControlOutputIsMutable();
           controlOutput_.add(value);
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -6471,13 +6443,13 @@ public Builder addControlOutputBytes(
         private java.util.List attr_ =
           java.util.Collections.emptyList();
         private void ensureAttrIsMutable() {
    -      if (!((bitField0_ & 0x00000008) != 0)) {
    +      if (!((bitField0_ & 0x00000010) != 0)) {
             attr_ = new java.util.ArrayList(attr_);
    -        bitField0_ |= 0x00000008;
    +        bitField0_ |= 0x00000010;
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.OpDef.AttrDef, org.tensorflow.proto.OpDef.AttrDef.Builder, org.tensorflow.proto.OpDef.AttrDefOrBuilder> attrBuilder_;
     
         /**
    @@ -6623,7 +6595,7 @@ public Builder addAllAttr(
         public Builder clearAttr() {
           if (attrBuilder_ == null) {
             attr_ = java.util.Collections.emptyList();
    -        bitField0_ = (bitField0_ & ~0x00000008);
    +        bitField0_ = (bitField0_ & ~0x00000010);
             onChanged();
           } else {
             attrBuilder_.clear();
    @@ -6693,14 +6665,14 @@ public org.tensorflow.proto.OpDef.AttrDef.Builder addAttrBuilder(
              getAttrBuilderList() {
           return getAttrFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.OpDef.AttrDef, org.tensorflow.proto.OpDef.AttrDef.Builder, org.tensorflow.proto.OpDef.AttrDefOrBuilder> 
             getAttrFieldBuilder() {
           if (attrBuilder_ == null) {
    -        attrBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        attrBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.OpDef.AttrDef, org.tensorflow.proto.OpDef.AttrDef.Builder, org.tensorflow.proto.OpDef.AttrDefOrBuilder>(
                     attr_,
    -                ((bitField0_ & 0x00000008) != 0),
    +                ((bitField0_ & 0x00000010) != 0),
                     getParentForChildren(),
                     isClean());
             attr_ = null;
    @@ -6709,7 +6681,7 @@ public org.tensorflow.proto.OpDef.AttrDef.Builder addAttrBuilder(
         }
     
         private org.tensorflow.proto.OpDeprecation deprecation_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.OpDeprecation, org.tensorflow.proto.OpDeprecation.Builder, org.tensorflow.proto.OpDeprecationOrBuilder> deprecationBuilder_;
         /**
          * 
    @@ -6720,7 +6692,7 @@ public org.tensorflow.proto.OpDef.AttrDef.Builder addAttrBuilder(
          * @return Whether the deprecation field is set.
          */
         public boolean hasDeprecation() {
    -      return deprecationBuilder_ != null || deprecation_ != null;
    +      return ((bitField0_ & 0x00000020) != 0);
         }
         /**
          * 
    @@ -6750,11 +6722,11 @@ public Builder setDeprecation(org.tensorflow.proto.OpDeprecation value) {
               throw new NullPointerException();
             }
             deprecation_ = value;
    -        onChanged();
           } else {
             deprecationBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000020;
    +      onChanged();
           return this;
         }
         /**
    @@ -6768,11 +6740,11 @@ public Builder setDeprecation(
             org.tensorflow.proto.OpDeprecation.Builder builderForValue) {
           if (deprecationBuilder_ == null) {
             deprecation_ = builderForValue.build();
    -        onChanged();
           } else {
             deprecationBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000020;
    +      onChanged();
           return this;
         }
         /**
    @@ -6784,17 +6756,20 @@ public Builder setDeprecation(
          */
         public Builder mergeDeprecation(org.tensorflow.proto.OpDeprecation value) {
           if (deprecationBuilder_ == null) {
    -        if (deprecation_ != null) {
    -          deprecation_ =
    -            org.tensorflow.proto.OpDeprecation.newBuilder(deprecation_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000020) != 0) &&
    +          deprecation_ != null &&
    +          deprecation_ != org.tensorflow.proto.OpDeprecation.getDefaultInstance()) {
    +          getDeprecationBuilder().mergeFrom(value);
             } else {
               deprecation_ = value;
             }
    -        onChanged();
           } else {
             deprecationBuilder_.mergeFrom(value);
           }
    -
    +      if (deprecation_ != null) {
    +        bitField0_ |= 0x00000020;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -6805,14 +6780,13 @@ public Builder mergeDeprecation(org.tensorflow.proto.OpDeprecation value) {
          * .tensorflow.OpDeprecation deprecation = 8;
          */
         public Builder clearDeprecation() {
    -      if (deprecationBuilder_ == null) {
    -        deprecation_ = null;
    -        onChanged();
    -      } else {
    -        deprecation_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000020);
    +      deprecation_ = null;
    +      if (deprecationBuilder_ != null) {
    +        deprecationBuilder_.dispose();
             deprecationBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -6823,7 +6797,7 @@ public Builder clearDeprecation() {
          * .tensorflow.OpDeprecation deprecation = 8;
          */
         public org.tensorflow.proto.OpDeprecation.Builder getDeprecationBuilder() {
    -      
    +      bitField0_ |= 0x00000020;
           onChanged();
           return getDeprecationFieldBuilder().getBuilder();
         }
    @@ -6849,11 +6823,11 @@ public org.tensorflow.proto.OpDeprecationOrBuilder getDeprecationOrBuilder() {
          *
          * .tensorflow.OpDeprecation deprecation = 8;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.OpDeprecation, org.tensorflow.proto.OpDeprecation.Builder, org.tensorflow.proto.OpDeprecationOrBuilder> 
             getDeprecationFieldBuilder() {
           if (deprecationBuilder_ == null) {
    -        deprecationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        deprecationBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.OpDeprecation, org.tensorflow.proto.OpDeprecation.Builder, org.tensorflow.proto.OpDeprecationOrBuilder>(
                     getDeprecation(),
                     getParentForChildren(),
    @@ -6916,11 +6890,9 @@ public java.lang.String getSummary() {
          */
         public Builder setSummary(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           summary_ = value;
    +      bitField0_ |= 0x00000040;
           onChanged();
           return this;
         }
    @@ -6933,8 +6905,8 @@ public Builder setSummary(
          * @return This builder for chaining.
          */
         public Builder clearSummary() {
    -      
           summary_ = getDefaultInstance().getSummary();
    +      bitField0_ = (bitField0_ & ~0x00000040);
           onChanged();
           return this;
         }
    @@ -6949,12 +6921,10 @@ public Builder clearSummary() {
          */
         public Builder setSummaryBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           summary_ = value;
    +      bitField0_ |= 0x00000040;
           onChanged();
           return this;
         }
    @@ -7012,11 +6982,9 @@ public java.lang.String getDescription() {
          */
         public Builder setDescription(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           description_ = value;
    +      bitField0_ |= 0x00000080;
           onChanged();
           return this;
         }
    @@ -7029,8 +6997,8 @@ public Builder setDescription(
          * @return This builder for chaining.
          */
         public Builder clearDescription() {
    -      
           description_ = getDefaultInstance().getDescription();
    +      bitField0_ = (bitField0_ & ~0x00000080);
           onChanged();
           return this;
         }
    @@ -7045,12 +7013,10 @@ public Builder clearDescription() {
          */
         public Builder setDescriptionBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           description_ = value;
    +      bitField0_ |= 0x00000080;
           onChanged();
           return this;
         }
    @@ -7078,8 +7044,9 @@ public boolean getIsCommutative() {
          * @return This builder for chaining.
          */
         public Builder setIsCommutative(boolean value) {
    -      
    +
           isCommutative_ = value;
    +      bitField0_ |= 0x00000100;
           onChanged();
           return this;
         }
    @@ -7092,7 +7059,7 @@ public Builder setIsCommutative(boolean value) {
          * @return This builder for chaining.
          */
         public Builder clearIsCommutative() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000100);
           isCommutative_ = false;
           onChanged();
           return this;
    @@ -7135,8 +7102,9 @@ public boolean getIsAggregate() {
          * @return This builder for chaining.
          */
         public Builder setIsAggregate(boolean value) {
    -      
    +
           isAggregate_ = value;
    +      bitField0_ |= 0x00000200;
           onChanged();
           return this;
         }
    @@ -7156,7 +7124,7 @@ public Builder setIsAggregate(boolean value) {
          * @return This builder for chaining.
          */
         public Builder clearIsAggregate() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000200);
           isAggregate_ = false;
           onChanged();
           return this;
    @@ -7170,6 +7138,7 @@ public Builder clearIsAggregate() {
          * a side-effect (e.g. printing or asserting ops). Equivalently, stateless ops
          * must always produce the same output for the same input and have
          * no side-effects.
    +     *
          * By default Ops may be moved between devices.  Stateful ops should
          * either not be moved, or should only be moved if that state can also
          * be moved (e.g. via some sort of save / restore).
    @@ -7191,6 +7160,7 @@ public boolean getIsStateful() {
          * a side-effect (e.g. printing or asserting ops). Equivalently, stateless ops
          * must always produce the same output for the same input and have
          * no side-effects.
    +     *
          * By default Ops may be moved between devices.  Stateful ops should
          * either not be moved, or should only be moved if that state can also
          * be moved (e.g. via some sort of save / restore).
    @@ -7203,8 +7173,9 @@ public boolean getIsStateful() {
          * @return This builder for chaining.
          */
         public Builder setIsStateful(boolean value) {
    -      
    +
           isStateful_ = value;
    +      bitField0_ |= 0x00000400;
           onChanged();
           return this;
         }
    @@ -7215,6 +7186,7 @@ public Builder setIsStateful(boolean value) {
          * a side-effect (e.g. printing or asserting ops). Equivalently, stateless ops
          * must always produce the same output for the same input and have
          * no side-effects.
    +     *
          * By default Ops may be moved between devices.  Stateful ops should
          * either not be moved, or should only be moved if that state can also
          * be moved (e.g. via some sort of save / restore).
    @@ -7226,7 +7198,7 @@ public Builder setIsStateful(boolean value) {
          * @return This builder for chaining.
          */
         public Builder clearIsStateful() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000400);
           isStateful_ = false;
           onChanged();
           return this;
    @@ -7261,8 +7233,9 @@ public boolean getAllowsUninitializedInput() {
          * @return This builder for chaining.
          */
         public Builder setAllowsUninitializedInput(boolean value) {
    -      
    +
           allowsUninitializedInput_ = value;
    +      bitField0_ |= 0x00000800;
           onChanged();
           return this;
         }
    @@ -7278,7 +7251,7 @@ public Builder setAllowsUninitializedInput(boolean value) {
          * @return This builder for chaining.
          */
         public Builder clearAllowsUninitializedInput() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000800);
           allowsUninitializedInput_ = false;
           onChanged();
           return this;
    @@ -7311,8 +7284,9 @@ public boolean getIsDistributedCommunication() {
          * @return This builder for chaining.
          */
         public Builder setIsDistributedCommunication(boolean value) {
    -      
    +
           isDistributedCommunication_ = value;
    +      bitField0_ |= 0x00001000;
           onChanged();
           return this;
         }
    @@ -7327,23 +7301,11 @@ public Builder setIsDistributedCommunication(boolean value) {
          * @return This builder for chaining.
          */
         public Builder clearIsDistributedCommunication() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00001000);
           isDistributedCommunication_ = false;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.OpDef)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDefOrBuilder.java
    index 65df7e4bbe1..598ed6ae27c 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDefOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDefOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/op_def.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -287,6 +289,7 @@ org.tensorflow.proto.OpDef.AttrDefOrBuilder getAttrOrBuilder(
        * a side-effect (e.g. printing or asserting ops). Equivalently, stateless ops
        * must always produce the same output for the same input and have
        * no side-effects.
    +   *
        * By default Ops may be moved between devices.  Stateful ops should
        * either not be moved, or should only be moved if that state can also
        * be moved (e.g. via some sort of save / restore).
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDefProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDefProtos.java
    index f19f72b5012..a840147d89e 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDefProtos.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDefProtos.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/op_def.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class OpDefProtos {
       private OpDefProtos() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      OpDefProtos.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,27 +28,27 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_OpDef_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_OpDef_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_OpDef_ArgDef_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_OpDef_ArgDef_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_OpDef_AttrDef_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_OpDef_AttrDef_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_OpDeprecation_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_OpDeprecation_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_OpList_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_OpList_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -94,33 +105,34 @@ public static void registerAllExtensions(
         internal_static_tensorflow_OpDef_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_OpDef_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_OpDef_descriptor,
             new java.lang.String[] { "Name", "InputArg", "OutputArg", "ControlOutput", "Attr", "Deprecation", "Summary", "Description", "IsCommutative", "IsAggregate", "IsStateful", "AllowsUninitializedInput", "IsDistributedCommunication", });
         internal_static_tensorflow_OpDef_ArgDef_descriptor =
           internal_static_tensorflow_OpDef_descriptor.getNestedTypes().get(0);
         internal_static_tensorflow_OpDef_ArgDef_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_OpDef_ArgDef_descriptor,
             new java.lang.String[] { "Name", "Description", "Type", "TypeAttr", "NumberAttr", "TypeListAttr", "HandleData", "IsRef", "ExperimentalFullType", });
         internal_static_tensorflow_OpDef_AttrDef_descriptor =
           internal_static_tensorflow_OpDef_descriptor.getNestedTypes().get(1);
         internal_static_tensorflow_OpDef_AttrDef_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_OpDef_AttrDef_descriptor,
             new java.lang.String[] { "Name", "Type", "DefaultValue", "Description", "HasMinimum", "Minimum", "AllowedValues", });
         internal_static_tensorflow_OpDeprecation_descriptor =
           getDescriptor().getMessageTypes().get(1);
         internal_static_tensorflow_OpDeprecation_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_OpDeprecation_descriptor,
             new java.lang.String[] { "Version", "Explanation", });
         internal_static_tensorflow_OpList_descriptor =
           getDescriptor().getMessageTypes().get(2);
         internal_static_tensorflow_OpList_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_OpList_descriptor,
             new java.lang.String[] { "Op", });
    +    descriptor.resolveAllFeaturesImmutable();
         org.tensorflow.proto.AttrValueProtos.getDescriptor();
         org.tensorflow.proto.FullTypeProtos.getDescriptor();
         org.tensorflow.proto.ResourceHandle.getDescriptor();
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDeprecation.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDeprecation.java
    index 36bbe4851b8..984020421f7 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDeprecation.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDeprecation.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/op_def.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,37 +13,34 @@
      * Protobuf type {@code tensorflow.OpDeprecation}
      */
     public final class OpDeprecation extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.OpDeprecation)
         OpDeprecationOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      OpDeprecation.class.getName());
    +  }
       // Use OpDeprecation.newBuilder() to construct.
    -  private OpDeprecation(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private OpDeprecation(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private OpDeprecation() {
         explanation_ = "";
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new OpDeprecation();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.OpDefProtos.internal_static_tensorflow_OpDeprecation_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.OpDefProtos.internal_static_tensorflow_OpDeprecation_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -49,7 +48,7 @@ protected java.lang.Object newInstance(
       }
     
       public static final int VERSION_FIELD_NUMBER = 1;
    -  private int version_;
    +  private int version_ = 0;
       /**
        * 
        * First GraphDef version at which the op is disallowed.
    @@ -64,7 +63,8 @@ public int getVersion() {
       }
     
       public static final int EXPLANATION_FIELD_NUMBER = 2;
    -  private volatile java.lang.Object explanation_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object explanation_ = "";
       /**
        * 
        * Explanation of why it was deprecated and what to use instead.
    @@ -126,8 +126,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         if (version_ != 0) {
           output.writeInt32(1, version_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(explanation_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, explanation_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(explanation_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 2, explanation_);
         }
         getUnknownFields().writeTo(output);
       }
    @@ -142,8 +142,8 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeInt32Size(1, version_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(explanation_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, explanation_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(explanation_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(2, explanation_);
         }
         size += getUnknownFields().getSerializedSize();
         memoizedSize = size;
    @@ -218,39 +218,41 @@ public static org.tensorflow.proto.OpDeprecation parseFrom(
       }
       public static org.tensorflow.proto.OpDeprecation parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.OpDeprecation parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.OpDeprecation parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.OpDeprecation parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.OpDeprecation parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.OpDeprecation parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -270,7 +272,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -282,7 +284,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.OpDeprecation}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.OpDeprecation)
           org.tensorflow.proto.OpDeprecationOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -291,7 +293,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.OpDefProtos.internal_static_tensorflow_OpDeprecation_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -304,17 +306,16 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           version_ = 0;
    -
           explanation_ = "";
    -
           return this;
         }
     
    @@ -341,44 +342,21 @@ public org.tensorflow.proto.OpDeprecation build() {
         @java.lang.Override
         public org.tensorflow.proto.OpDeprecation buildPartial() {
           org.tensorflow.proto.OpDeprecation result = new org.tensorflow.proto.OpDeprecation(this);
    -      result.version_ = version_;
    -      result.explanation_ = explanation_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.OpDeprecation result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.version_ = version_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.explanation_ = explanation_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.OpDeprecation) {
    @@ -396,6 +374,7 @@ public Builder mergeFrom(org.tensorflow.proto.OpDeprecation other) {
           }
           if (!other.getExplanation().isEmpty()) {
             explanation_ = other.explanation_;
    +        bitField0_ |= 0x00000002;
             onChanged();
           }
           this.mergeUnknownFields(other.getUnknownFields());
    @@ -426,12 +405,12 @@ public Builder mergeFrom(
                   break;
                 case 8: {
                   version_ = input.readInt32();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 8
                 case 18: {
                   explanation_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 default: {
    @@ -449,6 +428,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private int version_ ;
         /**
    @@ -473,8 +453,9 @@ public int getVersion() {
          * @return This builder for chaining.
          */
         public Builder setVersion(int value) {
    -      
    +
           version_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -487,7 +468,7 @@ public Builder setVersion(int value) {
          * @return This builder for chaining.
          */
         public Builder clearVersion() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000001);
           version_ = 0;
           onChanged();
           return this;
    @@ -546,11 +527,9 @@ public java.lang.String getExplanation() {
          */
         public Builder setExplanation(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           explanation_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -563,8 +542,8 @@ public Builder setExplanation(
          * @return This builder for chaining.
          */
         public Builder clearExplanation() {
    -      
           explanation_ = getDefaultInstance().getExplanation();
    +      bitField0_ = (bitField0_ & ~0x00000002);
           onChanged();
           return this;
         }
    @@ -579,27 +558,13 @@ public Builder clearExplanation() {
          */
         public Builder setExplanationBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           explanation_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.OpDeprecation)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDeprecationOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDeprecationOrBuilder.java
    index 2ae5686c536..e88fe5daf67 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDeprecationOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDeprecationOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/op_def.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpList.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpList.java
    index 9e609472f97..6af1a400c7c 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpList.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpList.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/op_def.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,37 +13,34 @@
      * Protobuf type {@code tensorflow.OpList}
      */
     public final class OpList extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.OpList)
         OpListOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      OpList.class.getName());
    +  }
       // Use OpList.newBuilder() to construct.
    -  private OpList(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private OpList(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private OpList() {
         op_ = java.util.Collections.emptyList();
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new OpList();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.OpDefProtos.internal_static_tensorflow_OpList_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.OpDefProtos.internal_static_tensorflow_OpList_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -49,6 +48,7 @@ protected java.lang.Object newInstance(
       }
     
       public static final int OP_FIELD_NUMBER = 1;
    +  @SuppressWarnings("serial")
       private java.util.List op_;
       /**
        * repeated .tensorflow.OpDef op = 1;
    @@ -189,39 +189,41 @@ public static org.tensorflow.proto.OpList parseFrom(
       }
       public static org.tensorflow.proto.OpList parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.OpList parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.OpList parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.OpList parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.OpList parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.OpList parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -241,7 +243,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -253,7 +255,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.OpList}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.OpList)
           org.tensorflow.proto.OpListOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -262,7 +264,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.OpDefProtos.internal_static_tensorflow_OpList_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -275,13 +277,14 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           if (opBuilder_ == null) {
             op_ = java.util.Collections.emptyList();
           } else {
    @@ -315,7 +318,13 @@ public org.tensorflow.proto.OpList build() {
         @java.lang.Override
         public org.tensorflow.proto.OpList buildPartial() {
           org.tensorflow.proto.OpList result = new org.tensorflow.proto.OpList(this);
    -      int from_bitField0_ = bitField0_;
    +      buildPartialRepeatedFields(result);
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartialRepeatedFields(org.tensorflow.proto.OpList result) {
           if (opBuilder_ == null) {
             if (((bitField0_ & 0x00000001) != 0)) {
               op_ = java.util.Collections.unmodifiableList(op_);
    @@ -325,42 +334,12 @@ public org.tensorflow.proto.OpList buildPartial() {
           } else {
             result.op_ = opBuilder_.build();
           }
    -      onBuilt();
    -      return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.OpList result) {
    +      int from_bitField0_ = bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.OpList) {
    @@ -392,7 +371,7 @@ public Builder mergeFrom(org.tensorflow.proto.OpList other) {
                 op_ = other.op_;
                 bitField0_ = (bitField0_ & ~0x00000001);
                 opBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getOpFieldBuilder() : null;
               } else {
                 opBuilder_.addAllMessages(other.op_);
    @@ -464,7 +443,7 @@ private void ensureOpIsMutable() {
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.OpDef, org.tensorflow.proto.OpDef.Builder, org.tensorflow.proto.OpDefOrBuilder> opBuilder_;
     
         /**
    @@ -680,11 +659,11 @@ public org.tensorflow.proto.OpDef.Builder addOpBuilder(
              getOpBuilderList() {
           return getOpFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.OpDef, org.tensorflow.proto.OpDef.Builder, org.tensorflow.proto.OpDefOrBuilder> 
             getOpFieldBuilder() {
           if (opBuilder_ == null) {
    -        opBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        opBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.OpDef, org.tensorflow.proto.OpDef.Builder, org.tensorflow.proto.OpDefOrBuilder>(
                     op_,
                     ((bitField0_ & 0x00000001) != 0),
    @@ -694,18 +673,6 @@ public org.tensorflow.proto.OpDef.Builder addOpBuilder(
           }
           return opBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.OpList)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpListOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpListOrBuilder.java
    index f3a2c2b3d78..5e13bc021f6 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpListOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpListOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/op_def.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpPerformanceData.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpPerformanceData.java
    index 20e07da09d4..a6c88007b41 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpPerformanceData.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpPerformanceData.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/grappler/costs/op_performance_data.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class OpPerformanceData {
       private OpPerformanceData() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      OpPerformanceData.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -32,36 +43,33 @@ public interface SessionInfoOrBuilder extends
        * Protobuf type {@code tensorflow.SessionInfo}
        */
       public static final class SessionInfo extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.SessionInfo)
           SessionInfoOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        SessionInfo.class.getName());
    +    }
         // Use SessionInfo.newBuilder() to construct.
    -    private SessionInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private SessionInfo(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private SessionInfo() {
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new SessionInfo();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.OpPerformanceData.internal_static_tensorflow_SessionInfo_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.OpPerformanceData.internal_static_tensorflow_SessionInfo_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -69,7 +77,7 @@ protected java.lang.Object newInstance(
         }
     
         public static final int INTRA_OP_PARALLELISM_FIELD_NUMBER = 1;
    -    private long intraOpParallelism_;
    +    private long intraOpParallelism_ = 0L;
         /**
          * int64 intra_op_parallelism = 1;
          * @return The intraOpParallelism.
    @@ -179,39 +187,41 @@ public static org.tensorflow.proto.OpPerformanceData.SessionInfo parseFrom(
         }
         public static org.tensorflow.proto.OpPerformanceData.SessionInfo parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.OpPerformanceData.SessionInfo parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.OpPerformanceData.SessionInfo parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.OpPerformanceData.SessionInfo parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.OpPerformanceData.SessionInfo parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.OpPerformanceData.SessionInfo parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -231,7 +241,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -243,7 +253,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.SessionInfo}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.SessionInfo)
             org.tensorflow.proto.OpPerformanceData.SessionInfoOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -252,7 +262,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.OpPerformanceData.internal_static_tensorflow_SessionInfo_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -265,15 +275,15 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             intraOpParallelism_ = 0L;
    -
             return this;
           }
     
    @@ -300,43 +310,18 @@ public org.tensorflow.proto.OpPerformanceData.SessionInfo build() {
           @java.lang.Override
           public org.tensorflow.proto.OpPerformanceData.SessionInfo buildPartial() {
             org.tensorflow.proto.OpPerformanceData.SessionInfo result = new org.tensorflow.proto.OpPerformanceData.SessionInfo(this);
    -        result.intraOpParallelism_ = intraOpParallelism_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.OpPerformanceData.SessionInfo result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.intraOpParallelism_ = intraOpParallelism_;
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.OpPerformanceData.SessionInfo) {
    @@ -380,7 +365,7 @@ public Builder mergeFrom(
                     break;
                   case 8: {
                     intraOpParallelism_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 8
                   default: {
    @@ -398,6 +383,7 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    +      private int bitField0_;
     
           private long intraOpParallelism_ ;
           /**
    @@ -414,8 +400,9 @@ public long getIntraOpParallelism() {
            * @return This builder for chaining.
            */
           public Builder setIntraOpParallelism(long value) {
    -        
    +
             intraOpParallelism_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -424,23 +411,11 @@ public Builder setIntraOpParallelism(long value) {
            * @return This builder for chaining.
            */
           public Builder clearIntraOpParallelism() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000001);
             intraOpParallelism_ = 0L;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.SessionInfo)
         }
    @@ -556,7 +531,6 @@ boolean containsAttr(
          *
          * map<string, .tensorflow.AttrValue> attr = 2;
          */
    -
         /* nullable */
     org.tensorflow.proto.AttrValue getAttrOrDefault(
             java.lang.String key,
    @@ -569,7 +543,6 @@ org.tensorflow.proto.AttrValue getAttrOrDefault(
          *
          * map<string, .tensorflow.AttrValue> attr = 2;
          */
    -
         org.tensorflow.proto.AttrValue getAttrOrThrow(
             java.lang.String key);
     
    @@ -704,12 +677,21 @@ org.tensorflow.proto.OpPerformanceData.OpInfo.TensorPropertiesOrBuilder getOutpu
        * Protobuf type {@code tensorflow.OpInfo}
        */
       public static final class OpInfo extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.OpInfo)
           OpInfoOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        OpInfo.class.getName());
    +    }
         // Use OpInfo.newBuilder() to construct.
    -    private OpInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private OpInfo(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private OpInfo() {
    @@ -718,18 +700,6 @@ private OpInfo() {
           outputs_ = java.util.Collections.emptyList();
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new OpInfo();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.OpPerformanceData.internal_static_tensorflow_OpInfo_descriptor;
    @@ -737,7 +707,7 @@ protected java.lang.Object newInstance(
     
         @SuppressWarnings({"rawtypes"})
         @java.lang.Override
    -    protected com.google.protobuf.MapField internalGetMapField(
    +    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
             int number) {
           switch (number) {
             case 2:
    @@ -748,7 +718,7 @@ protected com.google.protobuf.MapField internalGetMapField(
           }
         }
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.OpPerformanceData.internal_static_tensorflow_OpInfo_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -808,45 +778,43 @@ public interface TensorPropertiesOrBuilder extends
          * Protobuf type {@code tensorflow.OpInfo.TensorProperties}
          */
         public static final class TensorProperties extends
    -        com.google.protobuf.GeneratedMessageV3 implements
    +        com.google.protobuf.GeneratedMessage implements
             // @@protoc_insertion_point(message_implements:tensorflow.OpInfo.TensorProperties)
             TensorPropertiesOrBuilder {
         private static final long serialVersionUID = 0L;
    +      static {
    +        com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +          com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +          /* major= */ 4,
    +          /* minor= */ 28,
    +          /* patch= */ 3,
    +          /* suffix= */ "",
    +          TensorProperties.class.getName());
    +      }
           // Use TensorProperties.newBuilder() to construct.
    -      private TensorProperties(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +      private TensorProperties(com.google.protobuf.GeneratedMessage.Builder builder) {
             super(builder);
           }
           private TensorProperties() {
             dtype_ = 0;
           }
     
    -      @java.lang.Override
    -      @SuppressWarnings({"unused"})
    -      protected java.lang.Object newInstance(
    -          UnusedPrivateParameter unused) {
    -        return new TensorProperties();
    -      }
    -
    -      @java.lang.Override
    -      public final com.google.protobuf.UnknownFieldSet
    -      getUnknownFields() {
    -        return this.unknownFields;
    -      }
           public static final com.google.protobuf.Descriptors.Descriptor
               getDescriptor() {
             return org.tensorflow.proto.OpPerformanceData.internal_static_tensorflow_OpInfo_TensorProperties_descriptor;
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.OpPerformanceData.internal_static_tensorflow_OpInfo_TensorProperties_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
                     org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties.class, org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties.Builder.class);
           }
     
    +      private int bitField0_;
           public static final int DTYPE_FIELD_NUMBER = 1;
    -      private int dtype_;
    +      private int dtype_ = 0;
           /**
            * .tensorflow.DataType dtype = 1;
            * @return The enum numeric value on the wire for dtype.
    @@ -859,8 +827,7 @@ protected java.lang.Object newInstance(
            * @return The dtype.
            */
           @java.lang.Override public org.tensorflow.proto.DataType getDtype() {
    -        @SuppressWarnings("deprecation")
    -        org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(dtype_);
    +        org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(dtype_);
             return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
           }
     
    @@ -872,7 +839,7 @@ protected java.lang.Object newInstance(
            */
           @java.lang.Override
           public boolean hasShape() {
    -        return shape_ != null;
    +        return ((bitField0_ & 0x00000001) != 0);
           }
           /**
            * .tensorflow.TensorShapeProto shape = 2;
    @@ -887,7 +854,7 @@ public org.tensorflow.proto.TensorShapeProto getShape() {
            */
           @java.lang.Override
           public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
    -        return getShape();
    +        return shape_ == null ? org.tensorflow.proto.TensorShapeProto.getDefaultInstance() : shape_;
           }
     
           public static final int VALUE_FIELD_NUMBER = 3;
    @@ -898,7 +865,7 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
            */
           @java.lang.Override
           public boolean hasValue() {
    -        return value_ != null;
    +        return ((bitField0_ & 0x00000002) != 0);
           }
           /**
            * .tensorflow.TensorProto value = 3;
    @@ -913,7 +880,7 @@ public org.tensorflow.proto.TensorProto getValue() {
            */
           @java.lang.Override
           public org.tensorflow.proto.TensorProtoOrBuilder getValueOrBuilder() {
    -        return getValue();
    +        return value_ == null ? org.tensorflow.proto.TensorProto.getDefaultInstance() : value_;
           }
     
           private byte memoizedIsInitialized = -1;
    @@ -933,10 +900,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
             if (dtype_ != org.tensorflow.proto.DataType.DT_INVALID.getNumber()) {
               output.writeEnum(1, dtype_);
             }
    -        if (shape_ != null) {
    +        if (((bitField0_ & 0x00000001) != 0)) {
               output.writeMessage(2, getShape());
             }
    -        if (value_ != null) {
    +        if (((bitField0_ & 0x00000002) != 0)) {
               output.writeMessage(3, getValue());
             }
             getUnknownFields().writeTo(output);
    @@ -952,11 +919,11 @@ public int getSerializedSize() {
               size += com.google.protobuf.CodedOutputStream
                 .computeEnumSize(1, dtype_);
             }
    -        if (shape_ != null) {
    +        if (((bitField0_ & 0x00000001) != 0)) {
               size += com.google.protobuf.CodedOutputStream
                 .computeMessageSize(2, getShape());
             }
    -        if (value_ != null) {
    +        if (((bitField0_ & 0x00000002) != 0)) {
               size += com.google.protobuf.CodedOutputStream
                 .computeMessageSize(3, getValue());
             }
    @@ -1046,39 +1013,41 @@ public static org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties par
           }
           public static org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties parseFrom(java.io.InputStream input)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input);
           }
           public static org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties parseFrom(
               java.io.InputStream input,
               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input, extensionRegistry);
           }
    +
           public static org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties parseDelimitedFrom(java.io.InputStream input)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseDelimitedWithIOException(PARSER, input);
           }
    +
           public static org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties parseDelimitedFrom(
               java.io.InputStream input,
               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
           }
           public static org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties parseFrom(
               com.google.protobuf.CodedInputStream input)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input);
           }
           public static org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties parseFrom(
               com.google.protobuf.CodedInputStream input,
               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input, extensionRegistry);
           }
     
    @@ -1098,7 +1067,7 @@ public Builder toBuilder() {
     
           @java.lang.Override
           protected Builder newBuilderForType(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             Builder builder = new Builder(parent);
             return builder;
           }
    @@ -1110,7 +1079,7 @@ protected Builder newBuilderForType(
            * Protobuf type {@code tensorflow.OpInfo.TensorProperties}
            */
           public static final class Builder extends
    -          com.google.protobuf.GeneratedMessageV3.Builder implements
    +          com.google.protobuf.GeneratedMessage.Builder implements
               // @@protoc_insertion_point(builder_implements:tensorflow.OpInfo.TensorProperties)
               org.tensorflow.proto.OpPerformanceData.OpInfo.TensorPropertiesOrBuilder {
             public static final com.google.protobuf.Descriptors.Descriptor
    @@ -1119,7 +1088,7 @@ public static final class Builder extends
             }
     
             @java.lang.Override
    -        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +        protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
                 internalGetFieldAccessorTable() {
               return org.tensorflow.proto.OpPerformanceData.internal_static_tensorflow_OpInfo_TensorProperties_fieldAccessorTable
                   .ensureFieldAccessorsInitialized(
    @@ -1128,29 +1097,34 @@ public static final class Builder extends
     
             // Construct using org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties.newBuilder()
             private Builder() {
    -
    +          maybeForceBuilderInitialization();
             }
     
             private Builder(
    -            com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +            com.google.protobuf.GeneratedMessage.BuilderParent parent) {
               super(parent);
    -
    +          maybeForceBuilderInitialization();
    +        }
    +        private void maybeForceBuilderInitialization() {
    +          if (com.google.protobuf.GeneratedMessage
    +                  .alwaysUseFieldBuilders) {
    +            getShapeFieldBuilder();
    +            getValueFieldBuilder();
    +          }
             }
             @java.lang.Override
             public Builder clear() {
               super.clear();
    +          bitField0_ = 0;
               dtype_ = 0;
    -
    -          if (shapeBuilder_ == null) {
    -            shape_ = null;
    -          } else {
    -            shape_ = null;
    +          shape_ = null;
    +          if (shapeBuilder_ != null) {
    +            shapeBuilder_.dispose();
                 shapeBuilder_ = null;
               }
    -          if (valueBuilder_ == null) {
    -            value_ = null;
    -          } else {
    -            value_ = null;
    +          value_ = null;
    +          if (valueBuilder_ != null) {
    +            valueBuilder_.dispose();
                 valueBuilder_ = null;
               }
               return this;
    @@ -1179,53 +1153,32 @@ public org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties build() {
             @java.lang.Override
             public org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties buildPartial() {
               org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties result = new org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties(this);
    -          result.dtype_ = dtype_;
    -          if (shapeBuilder_ == null) {
    -            result.shape_ = shape_;
    -          } else {
    -            result.shape_ = shapeBuilder_.build();
    -          }
    -          if (valueBuilder_ == null) {
    -            result.value_ = value_;
    -          } else {
    -            result.value_ = valueBuilder_.build();
    -          }
    +          if (bitField0_ != 0) { buildPartial0(result); }
               onBuilt();
               return result;
             }
     
    -        @java.lang.Override
    -        public Builder clone() {
    -          return super.clone();
    -        }
    -        @java.lang.Override
    -        public Builder setField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field,
    -            java.lang.Object value) {
    -          return super.setField(field, value);
    -        }
    -        @java.lang.Override
    -        public Builder clearField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field) {
    -          return super.clearField(field);
    -        }
    -        @java.lang.Override
    -        public Builder clearOneof(
    -            com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -          return super.clearOneof(oneof);
    -        }
    -        @java.lang.Override
    -        public Builder setRepeatedField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field,
    -            int index, java.lang.Object value) {
    -          return super.setRepeatedField(field, index, value);
    -        }
    -        @java.lang.Override
    -        public Builder addRepeatedField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field,
    -            java.lang.Object value) {
    -          return super.addRepeatedField(field, value);
    +        private void buildPartial0(org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties result) {
    +          int from_bitField0_ = bitField0_;
    +          if (((from_bitField0_ & 0x00000001) != 0)) {
    +            result.dtype_ = dtype_;
    +          }
    +          int to_bitField0_ = 0;
    +          if (((from_bitField0_ & 0x00000002) != 0)) {
    +            result.shape_ = shapeBuilder_ == null
    +                ? shape_
    +                : shapeBuilder_.build();
    +            to_bitField0_ |= 0x00000001;
    +          }
    +          if (((from_bitField0_ & 0x00000004) != 0)) {
    +            result.value_ = valueBuilder_ == null
    +                ? value_
    +                : valueBuilder_.build();
    +            to_bitField0_ |= 0x00000002;
    +          }
    +          result.bitField0_ |= to_bitField0_;
             }
    +
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.Message other) {
               if (other instanceof org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties) {
    @@ -1275,21 +1228,21 @@ public Builder mergeFrom(
                       break;
                     case 8: {
                       dtype_ = input.readEnum();
    -
    +                  bitField0_ |= 0x00000001;
                       break;
                     } // case 8
                     case 18: {
                       input.readMessage(
                           getShapeFieldBuilder().getBuilder(),
                           extensionRegistry);
    -
    +                  bitField0_ |= 0x00000002;
                       break;
                     } // case 18
                     case 26: {
                       input.readMessage(
                           getValueFieldBuilder().getBuilder(),
                           extensionRegistry);
    -
    +                  bitField0_ |= 0x00000004;
                       break;
                     } // case 26
                     default: {
    @@ -1307,6 +1260,7 @@ public Builder mergeFrom(
               } // finally
               return this;
             }
    +        private int bitField0_;
     
             private int dtype_ = 0;
             /**
    @@ -1322,8 +1276,8 @@ public Builder mergeFrom(
              * @return This builder for chaining.
              */
             public Builder setDtypeValue(int value) {
    -          
               dtype_ = value;
    +          bitField0_ |= 0x00000001;
               onChanged();
               return this;
             }
    @@ -1333,8 +1287,7 @@ public Builder setDtypeValue(int value) {
              */
             @java.lang.Override
             public org.tensorflow.proto.DataType getDtype() {
    -          @SuppressWarnings("deprecation")
    -          org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(dtype_);
    +          org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(dtype_);
               return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
             }
             /**
    @@ -1346,7 +1299,7 @@ public Builder setDtype(org.tensorflow.proto.DataType value) {
               if (value == null) {
                 throw new NullPointerException();
               }
    -          
    +          bitField0_ |= 0x00000001;
               dtype_ = value.getNumber();
               onChanged();
               return this;
    @@ -1356,21 +1309,21 @@ public Builder setDtype(org.tensorflow.proto.DataType value) {
              * @return This builder for chaining.
              */
             public Builder clearDtype() {
    -          
    +          bitField0_ = (bitField0_ & ~0x00000001);
               dtype_ = 0;
               onChanged();
               return this;
             }
     
             private org.tensorflow.proto.TensorShapeProto shape_;
    -        private com.google.protobuf.SingleFieldBuilderV3<
    +        private com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> shapeBuilder_;
             /**
              * .tensorflow.TensorShapeProto shape = 2;
              * @return Whether the shape field is set.
              */
             public boolean hasShape() {
    -          return shapeBuilder_ != null || shape_ != null;
    +          return ((bitField0_ & 0x00000002) != 0);
             }
             /**
              * .tensorflow.TensorShapeProto shape = 2;
    @@ -1392,11 +1345,11 @@ public Builder setShape(org.tensorflow.proto.TensorShapeProto value) {
                   throw new NullPointerException();
                 }
                 shape_ = value;
    -            onChanged();
               } else {
                 shapeBuilder_.setMessage(value);
               }
    -
    +          bitField0_ |= 0x00000002;
    +          onChanged();
               return this;
             }
             /**
    @@ -1406,11 +1359,11 @@ public Builder setShape(
                 org.tensorflow.proto.TensorShapeProto.Builder builderForValue) {
               if (shapeBuilder_ == null) {
                 shape_ = builderForValue.build();
    -            onChanged();
               } else {
                 shapeBuilder_.setMessage(builderForValue.build());
               }
    -
    +          bitField0_ |= 0x00000002;
    +          onChanged();
               return this;
             }
             /**
    @@ -1418,38 +1371,40 @@ public Builder setShape(
              */
             public Builder mergeShape(org.tensorflow.proto.TensorShapeProto value) {
               if (shapeBuilder_ == null) {
    -            if (shape_ != null) {
    -              shape_ =
    -                org.tensorflow.proto.TensorShapeProto.newBuilder(shape_).mergeFrom(value).buildPartial();
    +            if (((bitField0_ & 0x00000002) != 0) &&
    +              shape_ != null &&
    +              shape_ != org.tensorflow.proto.TensorShapeProto.getDefaultInstance()) {
    +              getShapeBuilder().mergeFrom(value);
                 } else {
                   shape_ = value;
                 }
    -            onChanged();
               } else {
                 shapeBuilder_.mergeFrom(value);
               }
    -
    +          if (shape_ != null) {
    +            bitField0_ |= 0x00000002;
    +            onChanged();
    +          }
               return this;
             }
             /**
              * .tensorflow.TensorShapeProto shape = 2;
              */
             public Builder clearShape() {
    -          if (shapeBuilder_ == null) {
    -            shape_ = null;
    -            onChanged();
    -          } else {
    -            shape_ = null;
    +          bitField0_ = (bitField0_ & ~0x00000002);
    +          shape_ = null;
    +          if (shapeBuilder_ != null) {
    +            shapeBuilder_.dispose();
                 shapeBuilder_ = null;
               }
    -
    +          onChanged();
               return this;
             }
             /**
              * .tensorflow.TensorShapeProto shape = 2;
              */
             public org.tensorflow.proto.TensorShapeProto.Builder getShapeBuilder() {
    -          
    +          bitField0_ |= 0x00000002;
               onChanged();
               return getShapeFieldBuilder().getBuilder();
             }
    @@ -1467,11 +1422,11 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
             /**
              * .tensorflow.TensorShapeProto shape = 2;
              */
    -        private com.google.protobuf.SingleFieldBuilderV3<
    +        private com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> 
                 getShapeFieldBuilder() {
               if (shapeBuilder_ == null) {
    -            shapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +            shapeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                     org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder>(
                         getShape(),
                         getParentForChildren(),
    @@ -1482,14 +1437,14 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
             }
     
             private org.tensorflow.proto.TensorProto value_;
    -        private com.google.protobuf.SingleFieldBuilderV3<
    +        private com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> valueBuilder_;
             /**
              * .tensorflow.TensorProto value = 3;
              * @return Whether the value field is set.
              */
             public boolean hasValue() {
    -          return valueBuilder_ != null || value_ != null;
    +          return ((bitField0_ & 0x00000004) != 0);
             }
             /**
              * .tensorflow.TensorProto value = 3;
    @@ -1511,11 +1466,11 @@ public Builder setValue(org.tensorflow.proto.TensorProto value) {
                   throw new NullPointerException();
                 }
                 value_ = value;
    -            onChanged();
               } else {
                 valueBuilder_.setMessage(value);
               }
    -
    +          bitField0_ |= 0x00000004;
    +          onChanged();
               return this;
             }
             /**
    @@ -1525,11 +1480,11 @@ public Builder setValue(
                 org.tensorflow.proto.TensorProto.Builder builderForValue) {
               if (valueBuilder_ == null) {
                 value_ = builderForValue.build();
    -            onChanged();
               } else {
                 valueBuilder_.setMessage(builderForValue.build());
               }
    -
    +          bitField0_ |= 0x00000004;
    +          onChanged();
               return this;
             }
             /**
    @@ -1537,38 +1492,40 @@ public Builder setValue(
              */
             public Builder mergeValue(org.tensorflow.proto.TensorProto value) {
               if (valueBuilder_ == null) {
    -            if (value_ != null) {
    -              value_ =
    -                org.tensorflow.proto.TensorProto.newBuilder(value_).mergeFrom(value).buildPartial();
    +            if (((bitField0_ & 0x00000004) != 0) &&
    +              value_ != null &&
    +              value_ != org.tensorflow.proto.TensorProto.getDefaultInstance()) {
    +              getValueBuilder().mergeFrom(value);
                 } else {
                   value_ = value;
                 }
    -            onChanged();
               } else {
                 valueBuilder_.mergeFrom(value);
               }
    -
    +          if (value_ != null) {
    +            bitField0_ |= 0x00000004;
    +            onChanged();
    +          }
               return this;
             }
             /**
              * .tensorflow.TensorProto value = 3;
              */
             public Builder clearValue() {
    -          if (valueBuilder_ == null) {
    -            value_ = null;
    -            onChanged();
    -          } else {
    -            value_ = null;
    +          bitField0_ = (bitField0_ & ~0x00000004);
    +          value_ = null;
    +          if (valueBuilder_ != null) {
    +            valueBuilder_.dispose();
                 valueBuilder_ = null;
               }
    -
    +          onChanged();
               return this;
             }
             /**
              * .tensorflow.TensorProto value = 3;
              */
             public org.tensorflow.proto.TensorProto.Builder getValueBuilder() {
    -          
    +          bitField0_ |= 0x00000004;
               onChanged();
               return getValueFieldBuilder().getBuilder();
             }
    @@ -1586,11 +1543,11 @@ public org.tensorflow.proto.TensorProtoOrBuilder getValueOrBuilder() {
             /**
              * .tensorflow.TensorProto value = 3;
              */
    -        private com.google.protobuf.SingleFieldBuilderV3<
    +        private com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> 
                 getValueFieldBuilder() {
               if (valueBuilder_ == null) {
    -            valueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +            valueBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                     org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder>(
                         getValue(),
                         getParentForChildren(),
    @@ -1599,18 +1556,6 @@ public org.tensorflow.proto.TensorProtoOrBuilder getValueOrBuilder() {
               }
               return valueBuilder_;
             }
    -        @java.lang.Override
    -        public final Builder setUnknownFields(
    -            final com.google.protobuf.UnknownFieldSet unknownFields) {
    -          return super.setUnknownFields(unknownFields);
    -        }
    -
    -        @java.lang.Override
    -        public final Builder mergeUnknownFields(
    -            final com.google.protobuf.UnknownFieldSet unknownFields) {
    -          return super.mergeUnknownFields(unknownFields);
    -        }
    -
     
             // @@protoc_insertion_point(builder_scope:tensorflow.OpInfo.TensorProperties)
           }
    @@ -1663,8 +1608,10 @@ public org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties getDefault
     
         }
     
    +    private int bitField0_;
         public static final int OP_FIELD_NUMBER = 1;
    -    private volatile java.lang.Object op_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object op_ = "";
         /**
          * 
          * The operation name.  There may be custom parameters in attrs.
    @@ -1721,6 +1668,7 @@ private static final class AttrDefaultEntryHolder {
                       com.google.protobuf.WireFormat.FieldType.MESSAGE,
                       org.tensorflow.proto.AttrValue.getDefaultInstance());
         }
    +    @SuppressWarnings("serial")
         private com.google.protobuf.MapField<
             java.lang.String, org.tensorflow.proto.AttrValue> attr_;
         private com.google.protobuf.MapField
    @@ -1731,7 +1679,6 @@ private static final class AttrDefaultEntryHolder {
           }
           return attr_;
         }
    -
         public int getAttrCount() {
           return internalGetAttr().getMap().size();
         }
    @@ -1742,7 +1689,6 @@ public int getAttrCount() {
          *
          * map<string, .tensorflow.AttrValue> attr = 2;
          */
    -
         @java.lang.Override
         public boolean containsAttr(
             java.lang.String key) {
    @@ -1765,7 +1711,6 @@ public java.util.Map getAttr()
          * map<string, .tensorflow.AttrValue> attr = 2;
          */
         @java.lang.Override
    -
         public java.util.Map getAttrMap() {
           return internalGetAttr().getMap();
         }
    @@ -1777,10 +1722,11 @@ public java.util.Map getAttrMa
          * map<string, .tensorflow.AttrValue> attr = 2;
          */
         @java.lang.Override
    -
    -    public org.tensorflow.proto.AttrValue getAttrOrDefault(
    +    public /* nullable */
    +org.tensorflow.proto.AttrValue getAttrOrDefault(
             java.lang.String key,
    -        org.tensorflow.proto.AttrValue defaultValue) {
    +        /* nullable */
    +org.tensorflow.proto.AttrValue defaultValue) {
           if (key == null) { throw new NullPointerException("map key"); }
           java.util.Map map =
               internalGetAttr().getMap();
    @@ -1794,7 +1740,6 @@ public org.tensorflow.proto.AttrValue getAttrOrDefault(
          * map<string, .tensorflow.AttrValue> attr = 2;
          */
         @java.lang.Override
    -
         public org.tensorflow.proto.AttrValue getAttrOrThrow(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    @@ -1807,6 +1752,7 @@ public org.tensorflow.proto.AttrValue getAttrOrThrow(
         }
     
         public static final int INPUTS_FIELD_NUMBER = 3;
    +    @SuppressWarnings("serial")
         private java.util.List inputs_;
         /**
          * repeated .tensorflow.OpInfo.TensorProperties inputs = 3;
    @@ -1847,6 +1793,7 @@ public org.tensorflow.proto.OpPerformanceData.OpInfo.TensorPropertiesOrBuilder g
         }
     
         public static final int OUTPUTS_FIELD_NUMBER = 5;
    +    @SuppressWarnings("serial")
         private java.util.List outputs_;
         /**
          * 
    @@ -1918,7 +1865,7 @@ public org.tensorflow.proto.OpPerformanceData.OpInfo.TensorPropertiesOrBuilder g
          */
         @java.lang.Override
         public boolean hasDevice() {
    -      return device_ != null;
    +      return ((bitField0_ & 0x00000001) != 0);
         }
         /**
          * 
    @@ -1941,7 +1888,7 @@ public org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties getDevice()
          */
         @java.lang.Override
         public org.tensorflow.proto.DevicePropertiesProtos.DevicePropertiesOrBuilder getDeviceOrBuilder() {
    -      return getDevice();
    +      return device_ == null ? org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties.getDefaultInstance() : device_;
         }
     
         public static final int SESSION_INFO_FIELD_NUMBER = 6;
    @@ -1956,7 +1903,7 @@ public org.tensorflow.proto.DevicePropertiesProtos.DevicePropertiesOrBuilder get
          */
         @java.lang.Override
         public boolean hasSessionInfo() {
    -      return sessionInfo_ != null;
    +      return ((bitField0_ & 0x00000002) != 0);
         }
         /**
          * 
    @@ -1979,7 +1926,7 @@ public org.tensorflow.proto.OpPerformanceData.SessionInfo getSessionInfo() {
          */
         @java.lang.Override
         public org.tensorflow.proto.OpPerformanceData.SessionInfoOrBuilder getSessionInfoOrBuilder() {
    -      return getSessionInfo();
    +      return sessionInfo_ == null ? org.tensorflow.proto.OpPerformanceData.SessionInfo.getDefaultInstance() : sessionInfo_;
         }
     
         private byte memoizedIsInitialized = -1;
    @@ -1996,10 +1943,10 @@ public final boolean isInitialized() {
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output)
                             throws java.io.IOException {
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(op_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, op_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(op_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 1, op_);
           }
    -      com.google.protobuf.GeneratedMessageV3
    +      com.google.protobuf.GeneratedMessage
             .serializeStringMapTo(
               output,
               internalGetAttr(),
    @@ -2008,13 +1955,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           for (int i = 0; i < inputs_.size(); i++) {
             output.writeMessage(3, inputs_.get(i));
           }
    -      if (device_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             output.writeMessage(4, getDevice());
           }
           for (int i = 0; i < outputs_.size(); i++) {
             output.writeMessage(5, outputs_.get(i));
           }
    -      if (sessionInfo_ != null) {
    +      if (((bitField0_ & 0x00000002) != 0)) {
             output.writeMessage(6, getSessionInfo());
           }
           getUnknownFields().writeTo(output);
    @@ -2026,8 +1973,8 @@ public int getSerializedSize() {
           if (size != -1) return size;
     
           size = 0;
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(op_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, op_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(op_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, op_);
           }
           for (java.util.Map.Entry entry
                : internalGetAttr().getMap().entrySet()) {
    @@ -2043,7 +1990,7 @@ public int getSerializedSize() {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(3, inputs_.get(i));
           }
    -      if (device_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(4, getDevice());
           }
    @@ -2051,7 +1998,7 @@ public int getSerializedSize() {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(5, outputs_.get(i));
           }
    -      if (sessionInfo_ != null) {
    +      if (((bitField0_ & 0x00000002) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(6, getSessionInfo());
           }
    @@ -2160,39 +2107,41 @@ public static org.tensorflow.proto.OpPerformanceData.OpInfo parseFrom(
         }
         public static org.tensorflow.proto.OpPerformanceData.OpInfo parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.OpPerformanceData.OpInfo parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.OpPerformanceData.OpInfo parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.OpPerformanceData.OpInfo parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.OpPerformanceData.OpInfo parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.OpPerformanceData.OpInfo parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -2212,7 +2161,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -2225,7 +2174,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.OpInfo}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.OpInfo)
             org.tensorflow.proto.OpPerformanceData.OpInfoOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -2234,7 +2183,7 @@ public static final class Builder extends
           }
     
           @SuppressWarnings({"rawtypes"})
    -      protected com.google.protobuf.MapField internalGetMapField(
    +      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
               int number) {
             switch (number) {
               case 2:
    @@ -2245,7 +2194,7 @@ protected com.google.protobuf.MapField internalGetMapField(
             }
           }
           @SuppressWarnings({"rawtypes"})
    -      protected com.google.protobuf.MapField internalGetMutableMapField(
    +      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
               int number) {
             switch (number) {
               case 2:
    @@ -2256,7 +2205,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField(
             }
           }
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.OpPerformanceData.internal_static_tensorflow_OpInfo_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -2265,19 +2214,28 @@ protected com.google.protobuf.MapField internalGetMutableMapField(
     
           // Construct using org.tensorflow.proto.OpPerformanceData.OpInfo.newBuilder()
           private Builder() {
    -
    +        maybeForceBuilderInitialization();
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
    -
    +        maybeForceBuilderInitialization();
    +      }
    +      private void maybeForceBuilderInitialization() {
    +        if (com.google.protobuf.GeneratedMessage
    +                .alwaysUseFieldBuilders) {
    +          getInputsFieldBuilder();
    +          getOutputsFieldBuilder();
    +          getDeviceFieldBuilder();
    +          getSessionInfoFieldBuilder();
    +        }
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             op_ = "";
    -
             internalGetMutableAttr().clear();
             if (inputsBuilder_ == null) {
               inputs_ = java.util.Collections.emptyList();
    @@ -2285,24 +2243,22 @@ public Builder clear() {
               inputs_ = null;
               inputsBuilder_.clear();
             }
    -        bitField0_ = (bitField0_ & ~0x00000002);
    +        bitField0_ = (bitField0_ & ~0x00000004);
             if (outputsBuilder_ == null) {
               outputs_ = java.util.Collections.emptyList();
             } else {
               outputs_ = null;
               outputsBuilder_.clear();
             }
    -        bitField0_ = (bitField0_ & ~0x00000004);
    -        if (deviceBuilder_ == null) {
    -          device_ = null;
    -        } else {
    -          device_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000008);
    +        device_ = null;
    +        if (deviceBuilder_ != null) {
    +          deviceBuilder_.dispose();
               deviceBuilder_ = null;
             }
    -        if (sessionInfoBuilder_ == null) {
    -          sessionInfo_ = null;
    -        } else {
    -          sessionInfo_ = null;
    +        sessionInfo_ = null;
    +        if (sessionInfoBuilder_ != null) {
    +          sessionInfoBuilder_.dispose();
               sessionInfoBuilder_ = null;
             }
             return this;
    @@ -2331,74 +2287,57 @@ public org.tensorflow.proto.OpPerformanceData.OpInfo build() {
           @java.lang.Override
           public org.tensorflow.proto.OpPerformanceData.OpInfo buildPartial() {
             org.tensorflow.proto.OpPerformanceData.OpInfo result = new org.tensorflow.proto.OpPerformanceData.OpInfo(this);
    -        int from_bitField0_ = bitField0_;
    -        result.op_ = op_;
    -        result.attr_ = internalGetAttr();
    -        result.attr_.makeImmutable();
    +        buildPartialRepeatedFields(result);
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        onBuilt();
    +        return result;
    +      }
    +
    +      private void buildPartialRepeatedFields(org.tensorflow.proto.OpPerformanceData.OpInfo result) {
             if (inputsBuilder_ == null) {
    -          if (((bitField0_ & 0x00000002) != 0)) {
    +          if (((bitField0_ & 0x00000004) != 0)) {
                 inputs_ = java.util.Collections.unmodifiableList(inputs_);
    -            bitField0_ = (bitField0_ & ~0x00000002);
    +            bitField0_ = (bitField0_ & ~0x00000004);
               }
               result.inputs_ = inputs_;
             } else {
               result.inputs_ = inputsBuilder_.build();
             }
             if (outputsBuilder_ == null) {
    -          if (((bitField0_ & 0x00000004) != 0)) {
    +          if (((bitField0_ & 0x00000008) != 0)) {
                 outputs_ = java.util.Collections.unmodifiableList(outputs_);
    -            bitField0_ = (bitField0_ & ~0x00000004);
    +            bitField0_ = (bitField0_ & ~0x00000008);
               }
               result.outputs_ = outputs_;
             } else {
               result.outputs_ = outputsBuilder_.build();
             }
    -        if (deviceBuilder_ == null) {
    -          result.device_ = device_;
    -        } else {
    -          result.device_ = deviceBuilder_.build();
    +      }
    +
    +      private void buildPartial0(org.tensorflow.proto.OpPerformanceData.OpInfo result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.op_ = op_;
             }
    -        if (sessionInfoBuilder_ == null) {
    -          result.sessionInfo_ = sessionInfo_;
    -        } else {
    -          result.sessionInfo_ = sessionInfoBuilder_.build();
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.attr_ = internalGetAttr().build(AttrDefaultEntryHolder.defaultEntry);
             }
    -        onBuilt();
    -        return result;
    +        int to_bitField0_ = 0;
    +        if (((from_bitField0_ & 0x00000010) != 0)) {
    +          result.device_ = deviceBuilder_ == null
    +              ? device_
    +              : deviceBuilder_.build();
    +          to_bitField0_ |= 0x00000001;
    +        }
    +        if (((from_bitField0_ & 0x00000020) != 0)) {
    +          result.sessionInfo_ = sessionInfoBuilder_ == null
    +              ? sessionInfo_
    +              : sessionInfoBuilder_.build();
    +          to_bitField0_ |= 0x00000002;
    +        }
    +        result.bitField0_ |= to_bitField0_;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    -      }
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.OpPerformanceData.OpInfo) {
    @@ -2413,15 +2352,17 @@ public Builder mergeFrom(org.tensorflow.proto.OpPerformanceData.OpInfo other) {
             if (other == org.tensorflow.proto.OpPerformanceData.OpInfo.getDefaultInstance()) return this;
             if (!other.getOp().isEmpty()) {
               op_ = other.op_;
    +          bitField0_ |= 0x00000001;
               onChanged();
             }
             internalGetMutableAttr().mergeFrom(
                 other.internalGetAttr());
    +        bitField0_ |= 0x00000002;
             if (inputsBuilder_ == null) {
               if (!other.inputs_.isEmpty()) {
                 if (inputs_.isEmpty()) {
                   inputs_ = other.inputs_;
    -              bitField0_ = (bitField0_ & ~0x00000002);
    +              bitField0_ = (bitField0_ & ~0x00000004);
                 } else {
                   ensureInputsIsMutable();
                   inputs_.addAll(other.inputs_);
    @@ -2434,9 +2375,9 @@ public Builder mergeFrom(org.tensorflow.proto.OpPerformanceData.OpInfo other) {
                   inputsBuilder_.dispose();
                   inputsBuilder_ = null;
                   inputs_ = other.inputs_;
    -              bitField0_ = (bitField0_ & ~0x00000002);
    +              bitField0_ = (bitField0_ & ~0x00000004);
                   inputsBuilder_ = 
    -                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                        getInputsFieldBuilder() : null;
                 } else {
                   inputsBuilder_.addAllMessages(other.inputs_);
    @@ -2447,7 +2388,7 @@ public Builder mergeFrom(org.tensorflow.proto.OpPerformanceData.OpInfo other) {
               if (!other.outputs_.isEmpty()) {
                 if (outputs_.isEmpty()) {
                   outputs_ = other.outputs_;
    -              bitField0_ = (bitField0_ & ~0x00000004);
    +              bitField0_ = (bitField0_ & ~0x00000008);
                 } else {
                   ensureOutputsIsMutable();
                   outputs_.addAll(other.outputs_);
    @@ -2460,9 +2401,9 @@ public Builder mergeFrom(org.tensorflow.proto.OpPerformanceData.OpInfo other) {
                   outputsBuilder_.dispose();
                   outputsBuilder_ = null;
                   outputs_ = other.outputs_;
    -              bitField0_ = (bitField0_ & ~0x00000004);
    +              bitField0_ = (bitField0_ & ~0x00000008);
                   outputsBuilder_ = 
    -                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                        getOutputsFieldBuilder() : null;
                 } else {
                   outputsBuilder_.addAllMessages(other.outputs_);
    @@ -2503,15 +2444,16 @@ public Builder mergeFrom(
                     break;
                   case 10: {
                     op_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 10
                   case 18: {
                     com.google.protobuf.MapEntry
                     attr__ = input.readMessage(
                         AttrDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
    -                internalGetMutableAttr().getMutableMap().put(
    +                internalGetMutableAttr().ensureBuilderMap().put(
                         attr__.getKey(), attr__.getValue());
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 18
                   case 26: {
    @@ -2531,7 +2473,7 @@ public Builder mergeFrom(
                     input.readMessage(
                         getDeviceFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00000010;
                     break;
                   } // case 34
                   case 42: {
    @@ -2551,7 +2493,7 @@ public Builder mergeFrom(
                     input.readMessage(
                         getSessionInfoFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00000020;
                     break;
                   } // case 50
                   default: {
    @@ -2624,11 +2566,9 @@ public java.lang.String getOp() {
            */
           public Builder setOp(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             op_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -2641,8 +2581,8 @@ public Builder setOp(
            * @return This builder for chaining.
            */
           public Builder clearOp() {
    -        
             op_ = getDefaultInstance().getOp();
    +        bitField0_ = (bitField0_ & ~0x00000001);
             onChanged();
             return this;
           }
    @@ -2657,41 +2597,48 @@ public Builder clearOp() {
            */
           public Builder setOpBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             op_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
     
    -      private com.google.protobuf.MapField<
    -          java.lang.String, org.tensorflow.proto.AttrValue> attr_;
    -      private com.google.protobuf.MapField
    -      internalGetAttr() {
    +      private static final class AttrConverter implements com.google.protobuf.MapFieldBuilder.Converter {
    +        @java.lang.Override
    +        public org.tensorflow.proto.AttrValue build(org.tensorflow.proto.AttrValueOrBuilder val) {
    +          if (val instanceof org.tensorflow.proto.AttrValue) { return (org.tensorflow.proto.AttrValue) val; }
    +          return ((org.tensorflow.proto.AttrValue.Builder) val).build();
    +        }
    +
    +        @java.lang.Override
    +        public com.google.protobuf.MapEntry defaultEntry() {
    +          return AttrDefaultEntryHolder.defaultEntry;
    +        }
    +      };
    +      private static final AttrConverter attrConverter = new AttrConverter();
    +
    +      private com.google.protobuf.MapFieldBuilder<
    +          java.lang.String, org.tensorflow.proto.AttrValueOrBuilder, org.tensorflow.proto.AttrValue, org.tensorflow.proto.AttrValue.Builder> attr_;
    +      private com.google.protobuf.MapFieldBuilder
    +          internalGetAttr() {
             if (attr_ == null) {
    -          return com.google.protobuf.MapField.emptyMapField(
    -              AttrDefaultEntryHolder.defaultEntry);
    +          return new com.google.protobuf.MapFieldBuilder<>(attrConverter);
             }
             return attr_;
           }
    -      private com.google.protobuf.MapField
    -      internalGetMutableAttr() {
    -        onChanged();;
    +      private com.google.protobuf.MapFieldBuilder
    +          internalGetMutableAttr() {
             if (attr_ == null) {
    -          attr_ = com.google.protobuf.MapField.newMapField(
    -              AttrDefaultEntryHolder.defaultEntry);
    -        }
    -        if (!attr_.isMutable()) {
    -          attr_ = attr_.copy();
    +          attr_ = new com.google.protobuf.MapFieldBuilder<>(attrConverter);
             }
    +        bitField0_ |= 0x00000002;
    +        onChanged();
             return attr_;
           }
    -
           public int getAttrCount() {
    -        return internalGetAttr().getMap().size();
    +        return internalGetAttr().ensureBuilderMap().size();
           }
           /**
            * 
    @@ -2700,12 +2647,11 @@ public int getAttrCount() {
            *
            * map<string, .tensorflow.AttrValue> attr = 2;
            */
    -
           @java.lang.Override
           public boolean containsAttr(
               java.lang.String key) {
             if (key == null) { throw new NullPointerException("map key"); }
    -        return internalGetAttr().getMap().containsKey(key);
    +        return internalGetAttr().ensureBuilderMap().containsKey(key);
           }
           /**
            * Use {@link #getAttrMap()} instead.
    @@ -2723,9 +2669,8 @@ public java.util.Map getAttr()
            * map<string, .tensorflow.AttrValue> attr = 2;
            */
           @java.lang.Override
    -
           public java.util.Map getAttrMap() {
    -        return internalGetAttr().getMap();
    +        return internalGetAttr().getImmutableMap();
           }
           /**
            * 
    @@ -2735,14 +2680,14 @@ public java.util.Map getAttrMa
            * map<string, .tensorflow.AttrValue> attr = 2;
            */
           @java.lang.Override
    -
    -      public org.tensorflow.proto.AttrValue getAttrOrDefault(
    +      public /* nullable */
    +org.tensorflow.proto.AttrValue getAttrOrDefault(
               java.lang.String key,
    -          org.tensorflow.proto.AttrValue defaultValue) {
    +          /* nullable */
    +org.tensorflow.proto.AttrValue defaultValue) {
             if (key == null) { throw new NullPointerException("map key"); }
    -        java.util.Map map =
    -            internalGetAttr().getMap();
    -        return map.containsKey(key) ? map.get(key) : defaultValue;
    +        java.util.Map map = internalGetMutableAttr().ensureBuilderMap();
    +        return map.containsKey(key) ? attrConverter.build(map.get(key)) : defaultValue;
           }
           /**
            * 
    @@ -2752,21 +2697,18 @@ public org.tensorflow.proto.AttrValue getAttrOrDefault(
            * map<string, .tensorflow.AttrValue> attr = 2;
            */
           @java.lang.Override
    -
           public org.tensorflow.proto.AttrValue getAttrOrThrow(
               java.lang.String key) {
             if (key == null) { throw new NullPointerException("map key"); }
    -        java.util.Map map =
    -            internalGetAttr().getMap();
    +        java.util.Map map = internalGetMutableAttr().ensureBuilderMap();
             if (!map.containsKey(key)) {
               throw new java.lang.IllegalArgumentException();
             }
    -        return map.get(key);
    +        return attrConverter.build(map.get(key));
           }
    -
           public Builder clearAttr() {
    -        internalGetMutableAttr().getMutableMap()
    -            .clear();
    +        bitField0_ = (bitField0_ & ~0x00000002);
    +        internalGetMutableAttr().clear();
             return this;
           }
           /**
    @@ -2776,11 +2718,10 @@ public Builder clearAttr() {
            *
            * map<string, .tensorflow.AttrValue> attr = 2;
            */
    -
           public Builder removeAttr(
               java.lang.String key) {
             if (key == null) { throw new NullPointerException("map key"); }
    -        internalGetMutableAttr().getMutableMap()
    +        internalGetMutableAttr().ensureBuilderMap()
                 .remove(key);
             return this;
           }
    @@ -2789,8 +2730,9 @@ public Builder removeAttr(
            */
           @java.lang.Deprecated
           public java.util.Map
    -      getMutableAttr() {
    -        return internalGetMutableAttr().getMutableMap();
    +          getMutableAttr() {
    +        bitField0_ |= 0x00000002;
    +        return internalGetMutableAttr().ensureMessageMap();
           }
           /**
            * 
    @@ -2803,12 +2745,10 @@ public Builder putAttr(
               java.lang.String key,
               org.tensorflow.proto.AttrValue value) {
             if (key == null) { throw new NullPointerException("map key"); }
    -        if (value == null) {
    -  throw new NullPointerException("map value");
    -}
    -
    -        internalGetMutableAttr().getMutableMap()
    +        if (value == null) { throw new NullPointerException("map value"); }
    +        internalGetMutableAttr().ensureBuilderMap()
                 .put(key, value);
    +        bitField0_ |= 0x00000002;
             return this;
           }
           /**
    @@ -2818,24 +2758,50 @@ public Builder putAttr(
            *
            * map<string, .tensorflow.AttrValue> attr = 2;
            */
    -
           public Builder putAllAttr(
               java.util.Map values) {
    -        internalGetMutableAttr().getMutableMap()
    +        for (java.util.Map.Entry e : values.entrySet()) {
    +          if (e.getKey() == null || e.getValue() == null) {
    +            throw new NullPointerException();
    +          }
    +        }
    +        internalGetMutableAttr().ensureBuilderMap()
                 .putAll(values);
    +        bitField0_ |= 0x00000002;
             return this;
           }
    +      /**
    +       * 
    +       * Custom parameters impacting the behavior of the op.
    +       * 
    + * + * map<string, .tensorflow.AttrValue> attr = 2; + */ + public org.tensorflow.proto.AttrValue.Builder putAttrBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableAttr().ensureBuilderMap(); + org.tensorflow.proto.AttrValueOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = org.tensorflow.proto.AttrValue.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof org.tensorflow.proto.AttrValue) { + entry = ((org.tensorflow.proto.AttrValue) entry).toBuilder(); + builderMap.put(key, entry); + } + return (org.tensorflow.proto.AttrValue.Builder) entry; + } private java.util.List inputs_ = java.util.Collections.emptyList(); private void ensureInputsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { + if (!((bitField0_ & 0x00000004) != 0)) { inputs_ = new java.util.ArrayList(inputs_); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties, org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties.Builder, org.tensorflow.proto.OpPerformanceData.OpInfo.TensorPropertiesOrBuilder> inputsBuilder_; /** @@ -2981,7 +2947,7 @@ public Builder addAllInputs( public Builder clearInputs() { if (inputsBuilder_ == null) { inputs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { inputsBuilder_.clear(); @@ -3051,14 +3017,14 @@ public org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties.Builder ad getInputsBuilderList() { return getInputsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties, org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties.Builder, org.tensorflow.proto.OpPerformanceData.OpInfo.TensorPropertiesOrBuilder> getInputsFieldBuilder() { if (inputsBuilder_ == null) { - inputsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + inputsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties, org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties.Builder, org.tensorflow.proto.OpPerformanceData.OpInfo.TensorPropertiesOrBuilder>( inputs_, - ((bitField0_ & 0x00000002) != 0), + ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); inputs_ = null; @@ -3069,13 +3035,13 @@ public org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties.Builder ad private java.util.List outputs_ = java.util.Collections.emptyList(); private void ensureOutputsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { + if (!((bitField0_ & 0x00000008) != 0)) { outputs_ = new java.util.ArrayList(outputs_); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties, org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties.Builder, org.tensorflow.proto.OpPerformanceData.OpInfo.TensorPropertiesOrBuilder> outputsBuilder_; /** @@ -3265,7 +3231,7 @@ public Builder addAllOutputs( public Builder clearOutputs() { if (outputsBuilder_ == null) { outputs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { outputsBuilder_.clear(); @@ -3363,14 +3329,14 @@ public org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties.Builder ad getOutputsBuilderList() { return getOutputsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties, org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties.Builder, org.tensorflow.proto.OpPerformanceData.OpInfo.TensorPropertiesOrBuilder> getOutputsFieldBuilder() { if (outputsBuilder_ == null) { - outputsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + outputsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties, org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties.Builder, org.tensorflow.proto.OpPerformanceData.OpInfo.TensorPropertiesOrBuilder>( outputs_, - ((bitField0_ & 0x00000004) != 0), + ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); outputs_ = null; @@ -3379,7 +3345,7 @@ public org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties.Builder ad } private org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties device_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties, org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties.Builder, org.tensorflow.proto.DevicePropertiesProtos.DevicePropertiesOrBuilder> deviceBuilder_; /** *
    @@ -3390,7 +3356,7 @@ public org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties.Builder ad
            * @return Whether the device field is set.
            */
           public boolean hasDevice() {
    -        return deviceBuilder_ != null || device_ != null;
    +        return ((bitField0_ & 0x00000010) != 0);
           }
           /**
            * 
    @@ -3420,11 +3386,11 @@ public Builder setDevice(org.tensorflow.proto.DevicePropertiesProtos.DevicePrope
                 throw new NullPointerException();
               }
               device_ = value;
    -          onChanged();
             } else {
               deviceBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000010;
    +        onChanged();
             return this;
           }
           /**
    @@ -3438,11 +3404,11 @@ public Builder setDevice(
               org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties.Builder builderForValue) {
             if (deviceBuilder_ == null) {
               device_ = builderForValue.build();
    -          onChanged();
             } else {
               deviceBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000010;
    +        onChanged();
             return this;
           }
           /**
    @@ -3454,17 +3420,20 @@ public Builder setDevice(
            */
           public Builder mergeDevice(org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties value) {
             if (deviceBuilder_ == null) {
    -          if (device_ != null) {
    -            device_ =
    -              org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties.newBuilder(device_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000010) != 0) &&
    +            device_ != null &&
    +            device_ != org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties.getDefaultInstance()) {
    +            getDeviceBuilder().mergeFrom(value);
               } else {
                 device_ = value;
               }
    -          onChanged();
             } else {
               deviceBuilder_.mergeFrom(value);
             }
    -
    +        if (device_ != null) {
    +          bitField0_ |= 0x00000010;
    +          onChanged();
    +        }
             return this;
           }
           /**
    @@ -3475,14 +3444,13 @@ public Builder mergeDevice(org.tensorflow.proto.DevicePropertiesProtos.DevicePro
            * .tensorflow.DeviceProperties device = 4;
            */
           public Builder clearDevice() {
    -        if (deviceBuilder_ == null) {
    -          device_ = null;
    -          onChanged();
    -        } else {
    -          device_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000010);
    +        device_ = null;
    +        if (deviceBuilder_ != null) {
    +          deviceBuilder_.dispose();
               deviceBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
    @@ -3493,7 +3461,7 @@ public Builder clearDevice() {
            * .tensorflow.DeviceProperties device = 4;
            */
           public org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties.Builder getDeviceBuilder() {
    -        
    +        bitField0_ |= 0x00000010;
             onChanged();
             return getDeviceFieldBuilder().getBuilder();
           }
    @@ -3519,11 +3487,11 @@ public org.tensorflow.proto.DevicePropertiesProtos.DevicePropertiesOrBuilder get
            *
            * .tensorflow.DeviceProperties device = 4;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties, org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties.Builder, org.tensorflow.proto.DevicePropertiesProtos.DevicePropertiesOrBuilder> 
               getDeviceFieldBuilder() {
             if (deviceBuilder_ == null) {
    -          deviceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          deviceBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties, org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties.Builder, org.tensorflow.proto.DevicePropertiesProtos.DevicePropertiesOrBuilder>(
                       getDevice(),
                       getParentForChildren(),
    @@ -3534,7 +3502,7 @@ public org.tensorflow.proto.DevicePropertiesProtos.DevicePropertiesOrBuilder get
           }
     
           private org.tensorflow.proto.OpPerformanceData.SessionInfo sessionInfo_;
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.OpPerformanceData.SessionInfo, org.tensorflow.proto.OpPerformanceData.SessionInfo.Builder, org.tensorflow.proto.OpPerformanceData.SessionInfoOrBuilder> sessionInfoBuilder_;
           /**
            * 
    @@ -3545,7 +3513,7 @@ public org.tensorflow.proto.DevicePropertiesProtos.DevicePropertiesOrBuilder get
            * @return Whether the sessionInfo field is set.
            */
           public boolean hasSessionInfo() {
    -        return sessionInfoBuilder_ != null || sessionInfo_ != null;
    +        return ((bitField0_ & 0x00000020) != 0);
           }
           /**
            * 
    @@ -3575,11 +3543,11 @@ public Builder setSessionInfo(org.tensorflow.proto.OpPerformanceData.SessionInfo
                 throw new NullPointerException();
               }
               sessionInfo_ = value;
    -          onChanged();
             } else {
               sessionInfoBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000020;
    +        onChanged();
             return this;
           }
           /**
    @@ -3593,11 +3561,11 @@ public Builder setSessionInfo(
               org.tensorflow.proto.OpPerformanceData.SessionInfo.Builder builderForValue) {
             if (sessionInfoBuilder_ == null) {
               sessionInfo_ = builderForValue.build();
    -          onChanged();
             } else {
               sessionInfoBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000020;
    +        onChanged();
             return this;
           }
           /**
    @@ -3609,17 +3577,20 @@ public Builder setSessionInfo(
            */
           public Builder mergeSessionInfo(org.tensorflow.proto.OpPerformanceData.SessionInfo value) {
             if (sessionInfoBuilder_ == null) {
    -          if (sessionInfo_ != null) {
    -            sessionInfo_ =
    -              org.tensorflow.proto.OpPerformanceData.SessionInfo.newBuilder(sessionInfo_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000020) != 0) &&
    +            sessionInfo_ != null &&
    +            sessionInfo_ != org.tensorflow.proto.OpPerformanceData.SessionInfo.getDefaultInstance()) {
    +            getSessionInfoBuilder().mergeFrom(value);
               } else {
                 sessionInfo_ = value;
               }
    -          onChanged();
             } else {
               sessionInfoBuilder_.mergeFrom(value);
             }
    -
    +        if (sessionInfo_ != null) {
    +          bitField0_ |= 0x00000020;
    +          onChanged();
    +        }
             return this;
           }
           /**
    @@ -3630,14 +3601,13 @@ public Builder mergeSessionInfo(org.tensorflow.proto.OpPerformanceData.SessionIn
            * .tensorflow.SessionInfo session_info = 6;
            */
           public Builder clearSessionInfo() {
    -        if (sessionInfoBuilder_ == null) {
    -          sessionInfo_ = null;
    -          onChanged();
    -        } else {
    -          sessionInfo_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000020);
    +        sessionInfo_ = null;
    +        if (sessionInfoBuilder_ != null) {
    +          sessionInfoBuilder_.dispose();
               sessionInfoBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
    @@ -3648,7 +3618,7 @@ public Builder clearSessionInfo() {
            * .tensorflow.SessionInfo session_info = 6;
            */
           public org.tensorflow.proto.OpPerformanceData.SessionInfo.Builder getSessionInfoBuilder() {
    -        
    +        bitField0_ |= 0x00000020;
             onChanged();
             return getSessionInfoFieldBuilder().getBuilder();
           }
    @@ -3674,11 +3644,11 @@ public org.tensorflow.proto.OpPerformanceData.SessionInfoOrBuilder getSessionInf
            *
            * .tensorflow.SessionInfo session_info = 6;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.OpPerformanceData.SessionInfo, org.tensorflow.proto.OpPerformanceData.SessionInfo.Builder, org.tensorflow.proto.OpPerformanceData.SessionInfoOrBuilder> 
               getSessionInfoFieldBuilder() {
             if (sessionInfoBuilder_ == null) {
    -          sessionInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          sessionInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.OpPerformanceData.SessionInfo, org.tensorflow.proto.OpPerformanceData.SessionInfo.Builder, org.tensorflow.proto.OpPerformanceData.SessionInfoOrBuilder>(
                       getSessionInfo(),
                       getParentForChildren(),
    @@ -3687,18 +3657,6 @@ public org.tensorflow.proto.OpPerformanceData.SessionInfoOrBuilder getSessionInf
             }
             return sessionInfoBuilder_;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.OpInfo)
         }
    @@ -3771,36 +3729,33 @@ public interface NormalDistributionOrBuilder extends
        * Protobuf type {@code tensorflow.NormalDistribution}
        */
       public static final class NormalDistribution extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.NormalDistribution)
           NormalDistributionOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        NormalDistribution.class.getName());
    +    }
         // Use NormalDistribution.newBuilder() to construct.
    -    private NormalDistribution(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private NormalDistribution(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private NormalDistribution() {
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new NormalDistribution();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.OpPerformanceData.internal_static_tensorflow_NormalDistribution_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.OpPerformanceData.internal_static_tensorflow_NormalDistribution_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -3808,7 +3763,7 @@ protected java.lang.Object newInstance(
         }
     
         public static final int MU_FIELD_NUMBER = 1;
    -    private double mu_;
    +    private double mu_ = 0D;
         /**
          * double mu = 1;
          * @return The mu.
    @@ -3819,7 +3774,7 @@ public double getMu() {
         }
     
         public static final int SIGMA_FIELD_NUMBER = 2;
    -    private double sigma_;
    +    private double sigma_ = 0D;
         /**
          * double sigma = 2;
          * @return The sigma.
    @@ -3943,39 +3898,41 @@ public static org.tensorflow.proto.OpPerformanceData.NormalDistribution parseFro
         }
         public static org.tensorflow.proto.OpPerformanceData.NormalDistribution parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.OpPerformanceData.NormalDistribution parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.OpPerformanceData.NormalDistribution parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.OpPerformanceData.NormalDistribution parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.OpPerformanceData.NormalDistribution parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.OpPerformanceData.NormalDistribution parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -3995,7 +3952,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -4003,7 +3960,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.NormalDistribution}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.NormalDistribution)
             org.tensorflow.proto.OpPerformanceData.NormalDistributionOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -4012,7 +3969,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.OpPerformanceData.internal_static_tensorflow_NormalDistribution_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -4025,17 +3982,16 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             mu_ = 0D;
    -
             sigma_ = 0D;
    -
             return this;
           }
     
    @@ -4062,44 +4018,21 @@ public org.tensorflow.proto.OpPerformanceData.NormalDistribution build() {
           @java.lang.Override
           public org.tensorflow.proto.OpPerformanceData.NormalDistribution buildPartial() {
             org.tensorflow.proto.OpPerformanceData.NormalDistribution result = new org.tensorflow.proto.OpPerformanceData.NormalDistribution(this);
    -        result.mu_ = mu_;
    -        result.sigma_ = sigma_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.OpPerformanceData.NormalDistribution result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.mu_ = mu_;
    +        }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.sigma_ = sigma_;
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.OpPerformanceData.NormalDistribution) {
    @@ -4146,12 +4079,12 @@ public Builder mergeFrom(
                     break;
                   case 9: {
                     mu_ = input.readDouble();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 9
                   case 17: {
                     sigma_ = input.readDouble();
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 17
                   default: {
    @@ -4169,6 +4102,7 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    +      private int bitField0_;
     
           private double mu_ ;
           /**
    @@ -4185,8 +4119,9 @@ public double getMu() {
            * @return This builder for chaining.
            */
           public Builder setMu(double value) {
    -        
    +
             mu_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -4195,7 +4130,7 @@ public Builder setMu(double value) {
            * @return This builder for chaining.
            */
           public Builder clearMu() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000001);
             mu_ = 0D;
             onChanged();
             return this;
    @@ -4216,8 +4151,9 @@ public double getSigma() {
            * @return This builder for chaining.
            */
           public Builder setSigma(double value) {
    -        
    +
             sigma_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -4226,23 +4162,11 @@ public Builder setSigma(double value) {
            * @return This builder for chaining.
            */
           public Builder clearSigma() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000002);
             sigma_ = 0D;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.NormalDistribution)
         }
    @@ -4315,36 +4239,33 @@ public interface LogNormalDistributionOrBuilder extends
        * Protobuf type {@code tensorflow.LogNormalDistribution}
        */
       public static final class LogNormalDistribution extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.LogNormalDistribution)
           LogNormalDistributionOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        LogNormalDistribution.class.getName());
    +    }
         // Use LogNormalDistribution.newBuilder() to construct.
    -    private LogNormalDistribution(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private LogNormalDistribution(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private LogNormalDistribution() {
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new LogNormalDistribution();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.OpPerformanceData.internal_static_tensorflow_LogNormalDistribution_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.OpPerformanceData.internal_static_tensorflow_LogNormalDistribution_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -4352,7 +4273,7 @@ protected java.lang.Object newInstance(
         }
     
         public static final int MU_FIELD_NUMBER = 1;
    -    private double mu_;
    +    private double mu_ = 0D;
         /**
          * double mu = 1;
          * @return The mu.
    @@ -4363,7 +4284,7 @@ public double getMu() {
         }
     
         public static final int SIGMA_FIELD_NUMBER = 2;
    -    private double sigma_;
    +    private double sigma_ = 0D;
         /**
          * double sigma = 2;
          * @return The sigma.
    @@ -4487,39 +4408,41 @@ public static org.tensorflow.proto.OpPerformanceData.LogNormalDistribution parse
         }
         public static org.tensorflow.proto.OpPerformanceData.LogNormalDistribution parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.OpPerformanceData.LogNormalDistribution parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.OpPerformanceData.LogNormalDistribution parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.OpPerformanceData.LogNormalDistribution parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.OpPerformanceData.LogNormalDistribution parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.OpPerformanceData.LogNormalDistribution parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -4539,7 +4462,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -4547,7 +4470,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.LogNormalDistribution}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.LogNormalDistribution)
             org.tensorflow.proto.OpPerformanceData.LogNormalDistributionOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -4556,7 +4479,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.OpPerformanceData.internal_static_tensorflow_LogNormalDistribution_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -4569,17 +4492,16 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             mu_ = 0D;
    -
             sigma_ = 0D;
    -
             return this;
           }
     
    @@ -4606,44 +4528,21 @@ public org.tensorflow.proto.OpPerformanceData.LogNormalDistribution build() {
           @java.lang.Override
           public org.tensorflow.proto.OpPerformanceData.LogNormalDistribution buildPartial() {
             org.tensorflow.proto.OpPerformanceData.LogNormalDistribution result = new org.tensorflow.proto.OpPerformanceData.LogNormalDistribution(this);
    -        result.mu_ = mu_;
    -        result.sigma_ = sigma_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.OpPerformanceData.LogNormalDistribution result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.mu_ = mu_;
    +        }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.sigma_ = sigma_;
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.OpPerformanceData.LogNormalDistribution) {
    @@ -4690,12 +4589,12 @@ public Builder mergeFrom(
                     break;
                   case 9: {
                     mu_ = input.readDouble();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 9
                   case 17: {
                     sigma_ = input.readDouble();
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 17
                   default: {
    @@ -4713,6 +4612,7 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    +      private int bitField0_;
     
           private double mu_ ;
           /**
    @@ -4729,8 +4629,9 @@ public double getMu() {
            * @return This builder for chaining.
            */
           public Builder setMu(double value) {
    -        
    +
             mu_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -4739,7 +4640,7 @@ public Builder setMu(double value) {
            * @return This builder for chaining.
            */
           public Builder clearMu() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000001);
             mu_ = 0D;
             onChanged();
             return this;
    @@ -4760,8 +4661,9 @@ public double getSigma() {
            * @return This builder for chaining.
            */
           public Builder setSigma(double value) {
    -        
    +
             sigma_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -4770,23 +4672,11 @@ public Builder setSigma(double value) {
            * @return This builder for chaining.
            */
           public Builder clearSigma() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000002);
             sigma_ = 0D;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.LogNormalDistribution)
         }
    @@ -5028,7 +4918,7 @@ public interface OpPerformanceOrBuilder extends
          */
         org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemoryOrBuilder getOpMemoryOrBuilder();
     
    -    public org.tensorflow.proto.OpPerformanceData.OpPerformance.ExecutionTimeCase getExecutionTimeCase();
    +    org.tensorflow.proto.OpPerformanceData.OpPerformance.ExecutionTimeCase getExecutionTimeCase();
       }
       /**
        * 
    @@ -5038,37 +4928,34 @@ public interface OpPerformanceOrBuilder extends
        * Protobuf type {@code tensorflow.OpPerformance}
        */
       public static final class OpPerformance extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.OpPerformance)
           OpPerformanceOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        OpPerformance.class.getName());
    +    }
         // Use OpPerformance.newBuilder() to construct.
    -    private OpPerformance(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private OpPerformance(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private OpPerformance() {
           node_ = "";
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new OpPerformance();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.OpPerformanceData.internal_static_tensorflow_OpPerformance_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.OpPerformanceData.internal_static_tensorflow_OpPerformance_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -5148,37 +5035,34 @@ public interface OpMemoryOrBuilder extends
          * Protobuf type {@code tensorflow.OpPerformance.OpMemory}
          */
         public static final class OpMemory extends
    -        com.google.protobuf.GeneratedMessageV3 implements
    +        com.google.protobuf.GeneratedMessage implements
             // @@protoc_insertion_point(message_implements:tensorflow.OpPerformance.OpMemory)
             OpMemoryOrBuilder {
         private static final long serialVersionUID = 0L;
    +      static {
    +        com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +          com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +          /* major= */ 4,
    +          /* minor= */ 28,
    +          /* patch= */ 3,
    +          /* suffix= */ "",
    +          OpMemory.class.getName());
    +      }
           // Use OpMemory.newBuilder() to construct.
    -      private OpMemory(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +      private OpMemory(com.google.protobuf.GeneratedMessage.Builder builder) {
             super(builder);
           }
           private OpMemory() {
             outputMemory_ = emptyLongList();
           }
     
    -      @java.lang.Override
    -      @SuppressWarnings({"unused"})
    -      protected java.lang.Object newInstance(
    -          UnusedPrivateParameter unused) {
    -        return new OpMemory();
    -      }
    -
    -      @java.lang.Override
    -      public final com.google.protobuf.UnknownFieldSet
    -      getUnknownFields() {
    -        return this.unknownFields;
    -      }
           public static final com.google.protobuf.Descriptors.Descriptor
               getDescriptor() {
             return org.tensorflow.proto.OpPerformanceData.internal_static_tensorflow_OpPerformance_OpMemory_descriptor;
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.OpPerformanceData.internal_static_tensorflow_OpPerformance_OpMemory_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -5186,7 +5070,9 @@ protected java.lang.Object newInstance(
           }
     
           public static final int OUTPUT_MEMORY_FIELD_NUMBER = 1;
    -      private com.google.protobuf.Internal.LongList outputMemory_;
    +      @SuppressWarnings("serial")
    +      private com.google.protobuf.Internal.LongList outputMemory_ =
    +          emptyLongList();
           /**
            * 
            * The output information may have memory usage and output shapes.
    @@ -5226,7 +5112,7 @@ public long getOutputMemory(int index) {
           private int outputMemoryMemoizedSerializedSize = -1;
     
           public static final int TEMP_MEMORY_FIELD_NUMBER = 2;
    -      private long tempMemory_;
    +      private long tempMemory_ = 0L;
           /**
            * 
            * Temp and persistent memory allocated by this node.
    @@ -5241,7 +5127,7 @@ public long getTempMemory() {
           }
     
           public static final int PERSISTENT_MEMORY_FIELD_NUMBER = 4;
    -      private long persistentMemory_;
    +      private long persistentMemory_ = 0L;
           /**
            * int64 persistent_memory = 4;
            * @return The persistentMemory.
    @@ -5252,7 +5138,7 @@ public long getPersistentMemory() {
           }
     
           public static final int DEVICE_TEMP_MEMORY_FIELD_NUMBER = 3;
    -      private long deviceTempMemory_;
    +      private long deviceTempMemory_ = 0L;
           /**
            * int64 device_temp_memory = 3 [deprecated = true];
            * @deprecated tensorflow.OpPerformance.OpMemory.device_temp_memory is deprecated.
    @@ -5265,7 +5151,7 @@ public long getPersistentMemory() {
           }
     
           public static final int DEVICE_PERSISTENT_MEMORY_FIELD_NUMBER = 5;
    -      private long devicePersistentMemory_;
    +      private long devicePersistentMemory_ = 0L;
           /**
            * int64 device_persistent_memory = 5 [deprecated = true];
            * @deprecated tensorflow.OpPerformance.OpMemory.device_persistent_memory is deprecated.
    @@ -5441,39 +5327,41 @@ public static org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemory pars
           }
           public static org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemory parseFrom(java.io.InputStream input)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input);
           }
           public static org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemory parseFrom(
               java.io.InputStream input,
               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input, extensionRegistry);
           }
    +
           public static org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemory parseDelimitedFrom(java.io.InputStream input)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseDelimitedWithIOException(PARSER, input);
           }
    +
           public static org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemory parseDelimitedFrom(
               java.io.InputStream input,
               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
           }
           public static org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemory parseFrom(
               com.google.protobuf.CodedInputStream input)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input);
           }
           public static org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemory parseFrom(
               com.google.protobuf.CodedInputStream input,
               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input, extensionRegistry);
           }
     
    @@ -5493,7 +5381,7 @@ public Builder toBuilder() {
     
           @java.lang.Override
           protected Builder newBuilderForType(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             Builder builder = new Builder(parent);
             return builder;
           }
    @@ -5505,7 +5393,7 @@ protected Builder newBuilderForType(
            * Protobuf type {@code tensorflow.OpPerformance.OpMemory}
            */
           public static final class Builder extends
    -          com.google.protobuf.GeneratedMessageV3.Builder implements
    +          com.google.protobuf.GeneratedMessage.Builder implements
               // @@protoc_insertion_point(builder_implements:tensorflow.OpPerformance.OpMemory)
               org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemoryOrBuilder {
             public static final com.google.protobuf.Descriptors.Descriptor
    @@ -5514,7 +5402,7 @@ public static final class Builder extends
             }
     
             @java.lang.Override
    -        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +        protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
                 internalGetFieldAccessorTable() {
               return org.tensorflow.proto.OpPerformanceData.internal_static_tensorflow_OpPerformance_OpMemory_fieldAccessorTable
                   .ensureFieldAccessorsInitialized(
    @@ -5527,23 +5415,19 @@ private Builder() {
             }
     
             private Builder(
    -            com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +            com.google.protobuf.GeneratedMessage.BuilderParent parent) {
               super(parent);
     
             }
             @java.lang.Override
             public Builder clear() {
               super.clear();
    +          bitField0_ = 0;
               outputMemory_ = emptyLongList();
    -          bitField0_ = (bitField0_ & ~0x00000001);
               tempMemory_ = 0L;
    -
               persistentMemory_ = 0L;
    -
               deviceTempMemory_ = 0L;
    -
               devicePersistentMemory_ = 0L;
    -
               return this;
             }
     
    @@ -5570,52 +5454,31 @@ public org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemory build() {
             @java.lang.Override
             public org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemory buildPartial() {
               org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemory result = new org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemory(this);
    -          int from_bitField0_ = bitField0_;
    -          if (((bitField0_ & 0x00000001) != 0)) {
    -            outputMemory_.makeImmutable();
    -            bitField0_ = (bitField0_ & ~0x00000001);
    -          }
    -          result.outputMemory_ = outputMemory_;
    -          result.tempMemory_ = tempMemory_;
    -          result.persistentMemory_ = persistentMemory_;
    -          result.deviceTempMemory_ = deviceTempMemory_;
    -          result.devicePersistentMemory_ = devicePersistentMemory_;
    +          if (bitField0_ != 0) { buildPartial0(result); }
               onBuilt();
               return result;
             }
     
    -        @java.lang.Override
    -        public Builder clone() {
    -          return super.clone();
    -        }
    -        @java.lang.Override
    -        public Builder setField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field,
    -            java.lang.Object value) {
    -          return super.setField(field, value);
    -        }
    -        @java.lang.Override
    -        public Builder clearField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field) {
    -          return super.clearField(field);
    -        }
    -        @java.lang.Override
    -        public Builder clearOneof(
    -            com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -          return super.clearOneof(oneof);
    -        }
    -        @java.lang.Override
    -        public Builder setRepeatedField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field,
    -            int index, java.lang.Object value) {
    -          return super.setRepeatedField(field, index, value);
    -        }
    -        @java.lang.Override
    -        public Builder addRepeatedField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field,
    -            java.lang.Object value) {
    -          return super.addRepeatedField(field, value);
    +        private void buildPartial0(org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemory result) {
    +          int from_bitField0_ = bitField0_;
    +          if (((from_bitField0_ & 0x00000001) != 0)) {
    +            outputMemory_.makeImmutable();
    +            result.outputMemory_ = outputMemory_;
    +          }
    +          if (((from_bitField0_ & 0x00000002) != 0)) {
    +            result.tempMemory_ = tempMemory_;
    +          }
    +          if (((from_bitField0_ & 0x00000004) != 0)) {
    +            result.persistentMemory_ = persistentMemory_;
    +          }
    +          if (((from_bitField0_ & 0x00000008) != 0)) {
    +            result.deviceTempMemory_ = deviceTempMemory_;
    +          }
    +          if (((from_bitField0_ & 0x00000010) != 0)) {
    +            result.devicePersistentMemory_ = devicePersistentMemory_;
    +          }
             }
    +
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.Message other) {
               if (other instanceof org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemory) {
    @@ -5631,7 +5494,8 @@ public Builder mergeFrom(org.tensorflow.proto.OpPerformanceData.OpPerformance.Op
               if (!other.outputMemory_.isEmpty()) {
                 if (outputMemory_.isEmpty()) {
                   outputMemory_ = other.outputMemory_;
    -              bitField0_ = (bitField0_ & ~0x00000001);
    +              outputMemory_.makeImmutable();
    +              bitField0_ |= 0x00000001;
                 } else {
                   ensureOutputMemoryIsMutable();
                   outputMemory_.addAll(other.outputMemory_);
    @@ -5694,22 +5558,22 @@ public Builder mergeFrom(
                     } // case 10
                     case 16: {
                       tempMemory_ = input.readInt64();
    -
    +                  bitField0_ |= 0x00000002;
                       break;
                     } // case 16
                     case 24: {
                       deviceTempMemory_ = input.readInt64();
    -
    +                  bitField0_ |= 0x00000008;
                       break;
                     } // case 24
                     case 32: {
                       persistentMemory_ = input.readInt64();
    -
    +                  bitField0_ |= 0x00000004;
                       break;
                     } // case 32
                     case 40: {
                       devicePersistentMemory_ = input.readInt64();
    -
    +                  bitField0_ |= 0x00000010;
                       break;
                     } // case 40
                     default: {
    @@ -5731,10 +5595,10 @@ public Builder mergeFrom(
     
             private com.google.protobuf.Internal.LongList outputMemory_ = emptyLongList();
             private void ensureOutputMemoryIsMutable() {
    -          if (!((bitField0_ & 0x00000001) != 0)) {
    -            outputMemory_ = mutableCopy(outputMemory_);
    -            bitField0_ |= 0x00000001;
    -           }
    +          if (!outputMemory_.isModifiable()) {
    +            outputMemory_ = makeMutableCopy(outputMemory_);
    +          }
    +          bitField0_ |= 0x00000001;
             }
             /**
              * 
    @@ -5746,8 +5610,8 @@ private void ensureOutputMemoryIsMutable() {
              */
             public java.util.List
                 getOutputMemoryList() {
    -          return ((bitField0_ & 0x00000001) != 0) ?
    -                   java.util.Collections.unmodifiableList(outputMemory_) : outputMemory_;
    +          outputMemory_.makeImmutable();
    +          return outputMemory_;
             }
             /**
              * 
    @@ -5784,8 +5648,10 @@ public long getOutputMemory(int index) {
              */
             public Builder setOutputMemory(
                 int index, long value) {
    +
               ensureOutputMemoryIsMutable();
               outputMemory_.setLong(index, value);
    +          bitField0_ |= 0x00000001;
               onChanged();
               return this;
             }
    @@ -5799,8 +5665,10 @@ public Builder setOutputMemory(
              * @return This builder for chaining.
              */
             public Builder addOutputMemory(long value) {
    +
               ensureOutputMemoryIsMutable();
               outputMemory_.addLong(value);
    +          bitField0_ |= 0x00000001;
               onChanged();
               return this;
             }
    @@ -5818,6 +5686,7 @@ public Builder addAllOutputMemory(
               ensureOutputMemoryIsMutable();
               com.google.protobuf.AbstractMessageLite.Builder.addAll(
                   values, outputMemory_);
    +          bitField0_ |= 0x00000001;
               onChanged();
               return this;
             }
    @@ -5859,8 +5728,9 @@ public long getTempMemory() {
              * @return This builder for chaining.
              */
             public Builder setTempMemory(long value) {
    -          
    +
               tempMemory_ = value;
    +          bitField0_ |= 0x00000002;
               onChanged();
               return this;
             }
    @@ -5873,7 +5743,7 @@ public Builder setTempMemory(long value) {
              * @return This builder for chaining.
              */
             public Builder clearTempMemory() {
    -          
    +          bitField0_ = (bitField0_ & ~0x00000002);
               tempMemory_ = 0L;
               onChanged();
               return this;
    @@ -5894,8 +5764,9 @@ public long getPersistentMemory() {
              * @return This builder for chaining.
              */
             public Builder setPersistentMemory(long value) {
    -          
    +
               persistentMemory_ = value;
    +          bitField0_ |= 0x00000004;
               onChanged();
               return this;
             }
    @@ -5904,7 +5775,7 @@ public Builder setPersistentMemory(long value) {
              * @return This builder for chaining.
              */
             public Builder clearPersistentMemory() {
    -          
    +          bitField0_ = (bitField0_ & ~0x00000004);
               persistentMemory_ = 0L;
               onChanged();
               return this;
    @@ -5929,8 +5800,9 @@ public Builder clearPersistentMemory() {
              * @return This builder for chaining.
              */
             @java.lang.Deprecated public Builder setDeviceTempMemory(long value) {
    -          
    +
               deviceTempMemory_ = value;
    +          bitField0_ |= 0x00000008;
               onChanged();
               return this;
             }
    @@ -5941,7 +5813,7 @@ public Builder clearPersistentMemory() {
              * @return This builder for chaining.
              */
             @java.lang.Deprecated public Builder clearDeviceTempMemory() {
    -          
    +          bitField0_ = (bitField0_ & ~0x00000008);
               deviceTempMemory_ = 0L;
               onChanged();
               return this;
    @@ -5966,8 +5838,9 @@ public Builder clearPersistentMemory() {
              * @return This builder for chaining.
              */
             @java.lang.Deprecated public Builder setDevicePersistentMemory(long value) {
    -          
    +
               devicePersistentMemory_ = value;
    +          bitField0_ |= 0x00000010;
               onChanged();
               return this;
             }
    @@ -5978,23 +5851,11 @@ public Builder clearPersistentMemory() {
              * @return This builder for chaining.
              */
             @java.lang.Deprecated public Builder clearDevicePersistentMemory() {
    -          
    +          bitField0_ = (bitField0_ & ~0x00000010);
               devicePersistentMemory_ = 0L;
               onChanged();
               return this;
             }
    -        @java.lang.Override
    -        public final Builder setUnknownFields(
    -            final com.google.protobuf.UnknownFieldSet unknownFields) {
    -          return super.setUnknownFields(unknownFields);
    -        }
    -
    -        @java.lang.Override
    -        public final Builder mergeUnknownFields(
    -            final com.google.protobuf.UnknownFieldSet unknownFields) {
    -          return super.mergeUnknownFields(unknownFields);
    -        }
    -
     
             // @@protoc_insertion_point(builder_scope:tensorflow.OpPerformance.OpMemory)
           }
    @@ -6047,7 +5908,9 @@ public org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemory getDefaultI
     
         }
     
    +    private int bitField0_;
         private int executionTimeCase_ = 0;
    +    @SuppressWarnings("serial")
         private java.lang.Object executionTime_;
         public enum ExecutionTimeCase
             implements com.google.protobuf.Internal.EnumLite,
    @@ -6100,7 +5963,7 @@ public int getNumber() {
          */
         @java.lang.Override
         public boolean hasOp() {
    -      return op_ != null;
    +      return ((bitField0_ & 0x00000001) != 0);
         }
         /**
          * 
    @@ -6123,7 +5986,7 @@ public org.tensorflow.proto.OpPerformanceData.OpInfo getOp() {
          */
         @java.lang.Override
         public org.tensorflow.proto.OpPerformanceData.OpInfoOrBuilder getOpOrBuilder() {
    -      return getOp();
    +      return op_ == null ? org.tensorflow.proto.OpPerformanceData.OpInfo.getDefaultInstance() : op_;
         }
     
         public static final int SESSION_INFO_FIELD_NUMBER = 12;
    @@ -6140,7 +6003,7 @@ public org.tensorflow.proto.OpPerformanceData.OpInfoOrBuilder getOpOrBuilder() {
          */
         @java.lang.Override
         @java.lang.Deprecated public boolean hasSessionInfo() {
    -      return sessionInfo_ != null;
    +      return ((bitField0_ & 0x00000002) != 0);
         }
         /**
          * 
    @@ -6165,11 +6028,12 @@ public org.tensorflow.proto.OpPerformanceData.OpInfoOrBuilder getOpOrBuilder() {
          */
         @java.lang.Override
         @java.lang.Deprecated public org.tensorflow.proto.OpPerformanceData.SessionInfoOrBuilder getSessionInfoOrBuilder() {
    -      return getSessionInfo();
    +      return sessionInfo_ == null ? org.tensorflow.proto.OpPerformanceData.SessionInfo.getDefaultInstance() : sessionInfo_;
         }
     
         public static final int NODE_FIELD_NUMBER = 5;
    -    private volatile java.lang.Object node_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object node_ = "";
         /**
          * 
          * The node name (optional). Makes it easier to associate the performance data
    @@ -6217,7 +6081,7 @@ public java.lang.String getNode() {
         }
     
         public static final int TEMPORARY_MEMORY_SIZE_FIELD_NUMBER = 2;
    -    private long temporaryMemorySize_;
    +    private long temporaryMemorySize_ = 0L;
         /**
          * 
          * Temporary memory used by this node (in bytes).
    @@ -6232,7 +6096,7 @@ public long getTemporaryMemorySize() {
         }
     
         public static final int COMPUTE_COST_FIELD_NUMBER = 3;
    -    private long computeCost_;
    +    private long computeCost_ = 0L;
         /**
          * 
          * Time it takes to run the op (in nanoseconds).
    @@ -6247,7 +6111,7 @@ public long getComputeCost() {
         }
     
         public static final int COMPUTE_TIME_FIELD_NUMBER = 6;
    -    private long computeTime_;
    +    private long computeTime_ = 0L;
         /**
          * 
          * Analytical compute cost (in nanoseconds).
    @@ -6262,7 +6126,7 @@ public long getComputeTime() {
         }
     
         public static final int MEMORY_TIME_FIELD_NUMBER = 7;
    -    private long memoryTime_;
    +    private long memoryTime_ = 0L;
         /**
          * 
          * Analytical memory access cost (in nanoseconds).
    @@ -6277,7 +6141,7 @@ public long getMemoryTime() {
         }
     
         public static final int COMPUTE_EFFICIENCY_FIELD_NUMBER = 4;
    -    private double computeEfficiency_;
    +    private double computeEfficiency_ = 0D;
         /**
          * 
          * Percentage of theoretical compute performance.
    @@ -6292,7 +6156,7 @@ public double getComputeEfficiency() {
         }
     
         public static final int MEMORY_EFFICIENCY_FIELD_NUMBER = 8;
    -    private double memoryEfficiency_;
    +    private double memoryEfficiency_ = 0D;
         /**
          * 
          * Percentage of theoretical memory performance.
    @@ -6376,7 +6240,7 @@ public org.tensorflow.proto.OpPerformanceData.LogNormalDistributionOrBuilder get
          */
         @java.lang.Override
         public boolean hasOpMemory() {
    -      return opMemory_ != null;
    +      return ((bitField0_ & 0x00000004) != 0);
         }
         /**
          * .tensorflow.OpPerformance.OpMemory op_memory = 9;
    @@ -6391,7 +6255,7 @@ public org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemory getOpMemory
          */
         @java.lang.Override
         public org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemoryOrBuilder getOpMemoryOrBuilder() {
    -      return getOpMemory();
    +      return opMemory_ == null ? org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemory.getDefaultInstance() : opMemory_;
         }
     
         private byte memoizedIsInitialized = -1;
    @@ -6408,7 +6272,7 @@ public final boolean isInitialized() {
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output)
                             throws java.io.IOException {
    -      if (op_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             output.writeMessage(1, getOp());
           }
           if (temporaryMemorySize_ != 0L) {
    @@ -6420,8 +6284,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           if (java.lang.Double.doubleToRawLongBits(computeEfficiency_) != 0) {
             output.writeDouble(4, computeEfficiency_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(node_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 5, node_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(node_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 5, node_);
           }
           if (computeTime_ != 0L) {
             output.writeInt64(6, computeTime_);
    @@ -6432,7 +6296,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           if (java.lang.Double.doubleToRawLongBits(memoryEfficiency_) != 0) {
             output.writeDouble(8, memoryEfficiency_);
           }
    -      if (opMemory_ != null) {
    +      if (((bitField0_ & 0x00000004) != 0)) {
             output.writeMessage(9, getOpMemory());
           }
           if (executionTimeCase_ == 10) {
    @@ -6441,7 +6305,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           if (executionTimeCase_ == 11) {
             output.writeMessage(11, (org.tensorflow.proto.OpPerformanceData.LogNormalDistribution) executionTime_);
           }
    -      if (sessionInfo_ != null) {
    +      if (((bitField0_ & 0x00000002) != 0)) {
             output.writeMessage(12, getSessionInfo());
           }
           getUnknownFields().writeTo(output);
    @@ -6453,7 +6317,7 @@ public int getSerializedSize() {
           if (size != -1) return size;
     
           size = 0;
    -      if (op_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(1, getOp());
           }
    @@ -6469,8 +6333,8 @@ public int getSerializedSize() {
             size += com.google.protobuf.CodedOutputStream
               .computeDoubleSize(4, computeEfficiency_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(node_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, node_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(node_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(5, node_);
           }
           if (computeTime_ != 0L) {
             size += com.google.protobuf.CodedOutputStream
    @@ -6484,7 +6348,7 @@ public int getSerializedSize() {
             size += com.google.protobuf.CodedOutputStream
               .computeDoubleSize(8, memoryEfficiency_);
           }
    -      if (opMemory_ != null) {
    +      if (((bitField0_ & 0x00000004) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(9, getOpMemory());
           }
    @@ -6496,7 +6360,7 @@ public int getSerializedSize() {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(11, (org.tensorflow.proto.OpPerformanceData.LogNormalDistribution) executionTime_);
           }
    -      if (sessionInfo_ != null) {
    +      if (((bitField0_ & 0x00000002) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(12, getSessionInfo());
           }
    @@ -6653,39 +6517,41 @@ public static org.tensorflow.proto.OpPerformanceData.OpPerformance parseFrom(
         }
         public static org.tensorflow.proto.OpPerformanceData.OpPerformance parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.OpPerformanceData.OpPerformance parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.OpPerformanceData.OpPerformance parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.OpPerformanceData.OpPerformance parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.OpPerformanceData.OpPerformance parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.OpPerformanceData.OpPerformance parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -6705,7 +6571,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -6717,7 +6583,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.OpPerformance}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.OpPerformance)
             org.tensorflow.proto.OpPerformanceData.OpPerformanceOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -6726,7 +6592,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.OpPerformanceData.internal_static_tensorflow_OpPerformance_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -6735,53 +6601,52 @@ public static final class Builder extends
     
           // Construct using org.tensorflow.proto.OpPerformanceData.OpPerformance.newBuilder()
           private Builder() {
    -
    +        maybeForceBuilderInitialization();
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
    -
    +        maybeForceBuilderInitialization();
    +      }
    +      private void maybeForceBuilderInitialization() {
    +        if (com.google.protobuf.GeneratedMessage
    +                .alwaysUseFieldBuilders) {
    +          getOpFieldBuilder();
    +          getSessionInfoFieldBuilder();
    +          getOpMemoryFieldBuilder();
    +        }
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    -        if (opBuilder_ == null) {
    -          op_ = null;
    -        } else {
    -          op_ = null;
    +        bitField0_ = 0;
    +        op_ = null;
    +        if (opBuilder_ != null) {
    +          opBuilder_.dispose();
               opBuilder_ = null;
             }
    -        if (sessionInfoBuilder_ == null) {
    -          sessionInfo_ = null;
    -        } else {
    -          sessionInfo_ = null;
    +        sessionInfo_ = null;
    +        if (sessionInfoBuilder_ != null) {
    +          sessionInfoBuilder_.dispose();
               sessionInfoBuilder_ = null;
             }
             node_ = "";
    -
             temporaryMemorySize_ = 0L;
    -
             computeCost_ = 0L;
    -
             computeTime_ = 0L;
    -
             memoryTime_ = 0L;
    -
             computeEfficiency_ = 0D;
    -
             memoryEfficiency_ = 0D;
    -
             if (executionTimeNormalBuilder_ != null) {
               executionTimeNormalBuilder_.clear();
             }
             if (executionTimeLogNormalBuilder_ != null) {
               executionTimeLogNormalBuilder_.clear();
             }
    -        if (opMemoryBuilder_ == null) {
    -          opMemory_ = null;
    -        } else {
    -          opMemory_ = null;
    +        opMemory_ = null;
    +        if (opMemoryBuilder_ != null) {
    +          opMemoryBuilder_.dispose();
               opMemoryBuilder_ = null;
             }
             executionTimeCase_ = 0;
    @@ -6812,79 +6677,70 @@ public org.tensorflow.proto.OpPerformanceData.OpPerformance build() {
           @java.lang.Override
           public org.tensorflow.proto.OpPerformanceData.OpPerformance buildPartial() {
             org.tensorflow.proto.OpPerformanceData.OpPerformance result = new org.tensorflow.proto.OpPerformanceData.OpPerformance(this);
    -        if (opBuilder_ == null) {
    -          result.op_ = op_;
    -        } else {
    -          result.op_ = opBuilder_.build();
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        buildPartialOneofs(result);
    +        onBuilt();
    +        return result;
    +      }
    +
    +      private void buildPartial0(org.tensorflow.proto.OpPerformanceData.OpPerformance result) {
    +        int from_bitField0_ = bitField0_;
    +        int to_bitField0_ = 0;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.op_ = opBuilder_ == null
    +              ? op_
    +              : opBuilder_.build();
    +          to_bitField0_ |= 0x00000001;
             }
    -        if (sessionInfoBuilder_ == null) {
    -          result.sessionInfo_ = sessionInfo_;
    -        } else {
    -          result.sessionInfo_ = sessionInfoBuilder_.build();
    -        }
    -        result.node_ = node_;
    -        result.temporaryMemorySize_ = temporaryMemorySize_;
    -        result.computeCost_ = computeCost_;
    -        result.computeTime_ = computeTime_;
    -        result.memoryTime_ = memoryTime_;
    -        result.computeEfficiency_ = computeEfficiency_;
    -        result.memoryEfficiency_ = memoryEfficiency_;
    -        if (executionTimeCase_ == 10) {
    -          if (executionTimeNormalBuilder_ == null) {
    -            result.executionTime_ = executionTime_;
    -          } else {
    -            result.executionTime_ = executionTimeNormalBuilder_.build();
    -          }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.sessionInfo_ = sessionInfoBuilder_ == null
    +              ? sessionInfo_
    +              : sessionInfoBuilder_.build();
    +          to_bitField0_ |= 0x00000002;
             }
    -        if (executionTimeCase_ == 11) {
    -          if (executionTimeLogNormalBuilder_ == null) {
    -            result.executionTime_ = executionTime_;
    -          } else {
    -            result.executionTime_ = executionTimeLogNormalBuilder_.build();
    -          }
    +        if (((from_bitField0_ & 0x00000004) != 0)) {
    +          result.node_ = node_;
             }
    -        if (opMemoryBuilder_ == null) {
    -          result.opMemory_ = opMemory_;
    -        } else {
    -          result.opMemory_ = opMemoryBuilder_.build();
    +        if (((from_bitField0_ & 0x00000008) != 0)) {
    +          result.temporaryMemorySize_ = temporaryMemorySize_;
             }
    -        result.executionTimeCase_ = executionTimeCase_;
    -        onBuilt();
    -        return result;
    +        if (((from_bitField0_ & 0x00000010) != 0)) {
    +          result.computeCost_ = computeCost_;
    +        }
    +        if (((from_bitField0_ & 0x00000020) != 0)) {
    +          result.computeTime_ = computeTime_;
    +        }
    +        if (((from_bitField0_ & 0x00000040) != 0)) {
    +          result.memoryTime_ = memoryTime_;
    +        }
    +        if (((from_bitField0_ & 0x00000080) != 0)) {
    +          result.computeEfficiency_ = computeEfficiency_;
    +        }
    +        if (((from_bitField0_ & 0x00000100) != 0)) {
    +          result.memoryEfficiency_ = memoryEfficiency_;
    +        }
    +        if (((from_bitField0_ & 0x00000800) != 0)) {
    +          result.opMemory_ = opMemoryBuilder_ == null
    +              ? opMemory_
    +              : opMemoryBuilder_.build();
    +          to_bitField0_ |= 0x00000004;
    +        }
    +        result.bitField0_ |= to_bitField0_;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartialOneofs(org.tensorflow.proto.OpPerformanceData.OpPerformance result) {
    +        result.executionTimeCase_ = executionTimeCase_;
    +        result.executionTime_ = this.executionTime_;
    +        if (executionTimeCase_ == 10 &&
    +            executionTimeNormalBuilder_ != null) {
    +          result.executionTime_ = executionTimeNormalBuilder_.build();
    +        }
    +        if (executionTimeCase_ == 11 &&
    +            executionTimeLogNormalBuilder_ != null) {
    +          result.executionTime_ = executionTimeLogNormalBuilder_.build();
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.OpPerformanceData.OpPerformance) {
    @@ -6905,6 +6761,7 @@ public Builder mergeFrom(org.tensorflow.proto.OpPerformanceData.OpPerformance ot
             }
             if (!other.getNode().isEmpty()) {
               node_ = other.node_;
    +          bitField0_ |= 0x00000004;
               onChanged();
             }
             if (other.getTemporaryMemorySize() != 0L) {
    @@ -6971,49 +6828,49 @@ public Builder mergeFrom(
                     input.readMessage(
                         getOpFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 10
                   case 16: {
                     temporaryMemorySize_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000008;
                     break;
                   } // case 16
                   case 24: {
                     computeCost_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000010;
                     break;
                   } // case 24
                   case 33: {
                     computeEfficiency_ = input.readDouble();
    -
    +                bitField0_ |= 0x00000080;
                     break;
                   } // case 33
                   case 42: {
                     node_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000004;
                     break;
                   } // case 42
                   case 48: {
                     computeTime_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000020;
                     break;
                   } // case 48
                   case 56: {
                     memoryTime_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000040;
                     break;
                   } // case 56
                   case 65: {
                     memoryEfficiency_ = input.readDouble();
    -
    +                bitField0_ |= 0x00000100;
                     break;
                   } // case 65
                   case 74: {
                     input.readMessage(
                         getOpMemoryFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00000800;
                     break;
                   } // case 74
                   case 82: {
    @@ -7034,7 +6891,7 @@ public Builder mergeFrom(
                     input.readMessage(
                         getSessionInfoFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 98
                   default: {
    @@ -7067,9 +6924,10 @@ public Builder clearExecutionTime() {
             return this;
           }
     
    +      private int bitField0_;
     
           private org.tensorflow.proto.OpPerformanceData.OpInfo op_;
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.OpPerformanceData.OpInfo, org.tensorflow.proto.OpPerformanceData.OpInfo.Builder, org.tensorflow.proto.OpPerformanceData.OpInfoOrBuilder> opBuilder_;
           /**
            * 
    @@ -7080,7 +6938,7 @@ public Builder clearExecutionTime() {
            * @return Whether the op field is set.
            */
           public boolean hasOp() {
    -        return opBuilder_ != null || op_ != null;
    +        return ((bitField0_ & 0x00000001) != 0);
           }
           /**
            * 
    @@ -7110,11 +6968,11 @@ public Builder setOp(org.tensorflow.proto.OpPerformanceData.OpInfo value) {
                 throw new NullPointerException();
               }
               op_ = value;
    -          onChanged();
             } else {
               opBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000001;
    +        onChanged();
             return this;
           }
           /**
    @@ -7128,11 +6986,11 @@ public Builder setOp(
               org.tensorflow.proto.OpPerformanceData.OpInfo.Builder builderForValue) {
             if (opBuilder_ == null) {
               op_ = builderForValue.build();
    -          onChanged();
             } else {
               opBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000001;
    +        onChanged();
             return this;
           }
           /**
    @@ -7144,17 +7002,20 @@ public Builder setOp(
            */
           public Builder mergeOp(org.tensorflow.proto.OpPerformanceData.OpInfo value) {
             if (opBuilder_ == null) {
    -          if (op_ != null) {
    -            op_ =
    -              org.tensorflow.proto.OpPerformanceData.OpInfo.newBuilder(op_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000001) != 0) &&
    +            op_ != null &&
    +            op_ != org.tensorflow.proto.OpPerformanceData.OpInfo.getDefaultInstance()) {
    +            getOpBuilder().mergeFrom(value);
               } else {
                 op_ = value;
               }
    -          onChanged();
             } else {
               opBuilder_.mergeFrom(value);
             }
    -
    +        if (op_ != null) {
    +          bitField0_ |= 0x00000001;
    +          onChanged();
    +        }
             return this;
           }
           /**
    @@ -7165,14 +7026,13 @@ public Builder mergeOp(org.tensorflow.proto.OpPerformanceData.OpInfo value) {
            * .tensorflow.OpInfo op = 1;
            */
           public Builder clearOp() {
    -        if (opBuilder_ == null) {
    -          op_ = null;
    -          onChanged();
    -        } else {
    -          op_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000001);
    +        op_ = null;
    +        if (opBuilder_ != null) {
    +          opBuilder_.dispose();
               opBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
    @@ -7183,7 +7043,7 @@ public Builder clearOp() {
            * .tensorflow.OpInfo op = 1;
            */
           public org.tensorflow.proto.OpPerformanceData.OpInfo.Builder getOpBuilder() {
    -        
    +        bitField0_ |= 0x00000001;
             onChanged();
             return getOpFieldBuilder().getBuilder();
           }
    @@ -7209,11 +7069,11 @@ public org.tensorflow.proto.OpPerformanceData.OpInfoOrBuilder getOpOrBuilder() {
            *
            * .tensorflow.OpInfo op = 1;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.OpPerformanceData.OpInfo, org.tensorflow.proto.OpPerformanceData.OpInfo.Builder, org.tensorflow.proto.OpPerformanceData.OpInfoOrBuilder> 
               getOpFieldBuilder() {
             if (opBuilder_ == null) {
    -          opBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          opBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.OpPerformanceData.OpInfo, org.tensorflow.proto.OpPerformanceData.OpInfo.Builder, org.tensorflow.proto.OpPerformanceData.OpInfoOrBuilder>(
                       getOp(),
                       getParentForChildren(),
    @@ -7224,7 +7084,7 @@ public org.tensorflow.proto.OpPerformanceData.OpInfoOrBuilder getOpOrBuilder() {
           }
     
           private org.tensorflow.proto.OpPerformanceData.SessionInfo sessionInfo_;
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.OpPerformanceData.SessionInfo, org.tensorflow.proto.OpPerformanceData.SessionInfo.Builder, org.tensorflow.proto.OpPerformanceData.SessionInfoOrBuilder> sessionInfoBuilder_;
           /**
            * 
    @@ -7237,7 +7097,7 @@ public org.tensorflow.proto.OpPerformanceData.OpInfoOrBuilder getOpOrBuilder() {
            * @return Whether the sessionInfo field is set.
            */
           @java.lang.Deprecated public boolean hasSessionInfo() {
    -        return sessionInfoBuilder_ != null || sessionInfo_ != null;
    +        return ((bitField0_ & 0x00000002) != 0);
           }
           /**
            * 
    @@ -7269,11 +7129,11 @@ public org.tensorflow.proto.OpPerformanceData.OpInfoOrBuilder getOpOrBuilder() {
                 throw new NullPointerException();
               }
               sessionInfo_ = value;
    -          onChanged();
             } else {
               sessionInfoBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000002;
    +        onChanged();
             return this;
           }
           /**
    @@ -7287,11 +7147,11 @@ public org.tensorflow.proto.OpPerformanceData.OpInfoOrBuilder getOpOrBuilder() {
               org.tensorflow.proto.OpPerformanceData.SessionInfo.Builder builderForValue) {
             if (sessionInfoBuilder_ == null) {
               sessionInfo_ = builderForValue.build();
    -          onChanged();
             } else {
               sessionInfoBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000002;
    +        onChanged();
             return this;
           }
           /**
    @@ -7303,17 +7163,20 @@ public org.tensorflow.proto.OpPerformanceData.OpInfoOrBuilder getOpOrBuilder() {
            */
           @java.lang.Deprecated public Builder mergeSessionInfo(org.tensorflow.proto.OpPerformanceData.SessionInfo value) {
             if (sessionInfoBuilder_ == null) {
    -          if (sessionInfo_ != null) {
    -            sessionInfo_ =
    -              org.tensorflow.proto.OpPerformanceData.SessionInfo.newBuilder(sessionInfo_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000002) != 0) &&
    +            sessionInfo_ != null &&
    +            sessionInfo_ != org.tensorflow.proto.OpPerformanceData.SessionInfo.getDefaultInstance()) {
    +            getSessionInfoBuilder().mergeFrom(value);
               } else {
                 sessionInfo_ = value;
               }
    -          onChanged();
             } else {
               sessionInfoBuilder_.mergeFrom(value);
             }
    -
    +        if (sessionInfo_ != null) {
    +          bitField0_ |= 0x00000002;
    +          onChanged();
    +        }
             return this;
           }
           /**
    @@ -7324,14 +7187,13 @@ public org.tensorflow.proto.OpPerformanceData.OpInfoOrBuilder getOpOrBuilder() {
            * .tensorflow.SessionInfo session_info = 12 [deprecated = true];
            */
           @java.lang.Deprecated public Builder clearSessionInfo() {
    -        if (sessionInfoBuilder_ == null) {
    -          sessionInfo_ = null;
    -          onChanged();
    -        } else {
    -          sessionInfo_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000002);
    +        sessionInfo_ = null;
    +        if (sessionInfoBuilder_ != null) {
    +          sessionInfoBuilder_.dispose();
               sessionInfoBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
    @@ -7342,7 +7204,7 @@ public org.tensorflow.proto.OpPerformanceData.OpInfoOrBuilder getOpOrBuilder() {
            * .tensorflow.SessionInfo session_info = 12 [deprecated = true];
            */
           @java.lang.Deprecated public org.tensorflow.proto.OpPerformanceData.SessionInfo.Builder getSessionInfoBuilder() {
    -        
    +        bitField0_ |= 0x00000002;
             onChanged();
             return getSessionInfoFieldBuilder().getBuilder();
           }
    @@ -7368,11 +7230,11 @@ public org.tensorflow.proto.OpPerformanceData.OpInfoOrBuilder getOpOrBuilder() {
            *
            * .tensorflow.SessionInfo session_info = 12 [deprecated = true];
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.OpPerformanceData.SessionInfo, org.tensorflow.proto.OpPerformanceData.SessionInfo.Builder, org.tensorflow.proto.OpPerformanceData.SessionInfoOrBuilder> 
               getSessionInfoFieldBuilder() {
             if (sessionInfoBuilder_ == null) {
    -          sessionInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          sessionInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.OpPerformanceData.SessionInfo, org.tensorflow.proto.OpPerformanceData.SessionInfo.Builder, org.tensorflow.proto.OpPerformanceData.SessionInfoOrBuilder>(
                       getSessionInfo(),
                       getParentForChildren(),
    @@ -7438,11 +7300,9 @@ public java.lang.String getNode() {
            */
           public Builder setNode(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             node_ = value;
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -7456,8 +7316,8 @@ public Builder setNode(
            * @return This builder for chaining.
            */
           public Builder clearNode() {
    -        
             node_ = getDefaultInstance().getNode();
    +        bitField0_ = (bitField0_ & ~0x00000004);
             onChanged();
             return this;
           }
    @@ -7473,12 +7333,10 @@ public Builder clearNode() {
            */
           public Builder setNodeBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             node_ = value;
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -7506,8 +7364,9 @@ public long getTemporaryMemorySize() {
            * @return This builder for chaining.
            */
           public Builder setTemporaryMemorySize(long value) {
    -        
    +
             temporaryMemorySize_ = value;
    +        bitField0_ |= 0x00000008;
             onChanged();
             return this;
           }
    @@ -7520,7 +7379,7 @@ public Builder setTemporaryMemorySize(long value) {
            * @return This builder for chaining.
            */
           public Builder clearTemporaryMemorySize() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000008);
             temporaryMemorySize_ = 0L;
             onChanged();
             return this;
    @@ -7549,8 +7408,9 @@ public long getComputeCost() {
            * @return This builder for chaining.
            */
           public Builder setComputeCost(long value) {
    -        
    +
             computeCost_ = value;
    +        bitField0_ |= 0x00000010;
             onChanged();
             return this;
           }
    @@ -7563,7 +7423,7 @@ public Builder setComputeCost(long value) {
            * @return This builder for chaining.
            */
           public Builder clearComputeCost() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000010);
             computeCost_ = 0L;
             onChanged();
             return this;
    @@ -7592,8 +7452,9 @@ public long getComputeTime() {
            * @return This builder for chaining.
            */
           public Builder setComputeTime(long value) {
    -        
    +
             computeTime_ = value;
    +        bitField0_ |= 0x00000020;
             onChanged();
             return this;
           }
    @@ -7606,7 +7467,7 @@ public Builder setComputeTime(long value) {
            * @return This builder for chaining.
            */
           public Builder clearComputeTime() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000020);
             computeTime_ = 0L;
             onChanged();
             return this;
    @@ -7635,8 +7496,9 @@ public long getMemoryTime() {
            * @return This builder for chaining.
            */
           public Builder setMemoryTime(long value) {
    -        
    +
             memoryTime_ = value;
    +        bitField0_ |= 0x00000040;
             onChanged();
             return this;
           }
    @@ -7649,7 +7511,7 @@ public Builder setMemoryTime(long value) {
            * @return This builder for chaining.
            */
           public Builder clearMemoryTime() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000040);
             memoryTime_ = 0L;
             onChanged();
             return this;
    @@ -7678,8 +7540,9 @@ public double getComputeEfficiency() {
            * @return This builder for chaining.
            */
           public Builder setComputeEfficiency(double value) {
    -        
    +
             computeEfficiency_ = value;
    +        bitField0_ |= 0x00000080;
             onChanged();
             return this;
           }
    @@ -7692,7 +7555,7 @@ public Builder setComputeEfficiency(double value) {
            * @return This builder for chaining.
            */
           public Builder clearComputeEfficiency() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000080);
             computeEfficiency_ = 0D;
             onChanged();
             return this;
    @@ -7721,8 +7584,9 @@ public double getMemoryEfficiency() {
            * @return This builder for chaining.
            */
           public Builder setMemoryEfficiency(double value) {
    -        
    +
             memoryEfficiency_ = value;
    +        bitField0_ |= 0x00000100;
             onChanged();
             return this;
           }
    @@ -7735,13 +7599,13 @@ public Builder setMemoryEfficiency(double value) {
            * @return This builder for chaining.
            */
           public Builder clearMemoryEfficiency() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000100);
             memoryEfficiency_ = 0D;
             onChanged();
             return this;
           }
     
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.OpPerformanceData.NormalDistribution, org.tensorflow.proto.OpPerformanceData.NormalDistribution.Builder, org.tensorflow.proto.OpPerformanceData.NormalDistributionOrBuilder> executionTimeNormalBuilder_;
           /**
            * .tensorflow.NormalDistribution execution_time_normal = 10;
    @@ -7864,14 +7728,14 @@ public org.tensorflow.proto.OpPerformanceData.NormalDistributionOrBuilder getExe
           /**
            * .tensorflow.NormalDistribution execution_time_normal = 10;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.OpPerformanceData.NormalDistribution, org.tensorflow.proto.OpPerformanceData.NormalDistribution.Builder, org.tensorflow.proto.OpPerformanceData.NormalDistributionOrBuilder> 
               getExecutionTimeNormalFieldBuilder() {
             if (executionTimeNormalBuilder_ == null) {
               if (!(executionTimeCase_ == 10)) {
                 executionTime_ = org.tensorflow.proto.OpPerformanceData.NormalDistribution.getDefaultInstance();
               }
    -          executionTimeNormalBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          executionTimeNormalBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.OpPerformanceData.NormalDistribution, org.tensorflow.proto.OpPerformanceData.NormalDistribution.Builder, org.tensorflow.proto.OpPerformanceData.NormalDistributionOrBuilder>(
                       (org.tensorflow.proto.OpPerformanceData.NormalDistribution) executionTime_,
                       getParentForChildren(),
    @@ -7879,11 +7743,11 @@ public org.tensorflow.proto.OpPerformanceData.NormalDistributionOrBuilder getExe
               executionTime_ = null;
             }
             executionTimeCase_ = 10;
    -        onChanged();;
    +        onChanged();
             return executionTimeNormalBuilder_;
           }
     
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.OpPerformanceData.LogNormalDistribution, org.tensorflow.proto.OpPerformanceData.LogNormalDistribution.Builder, org.tensorflow.proto.OpPerformanceData.LogNormalDistributionOrBuilder> executionTimeLogNormalBuilder_;
           /**
            * .tensorflow.LogNormalDistribution execution_time_log_normal = 11;
    @@ -8006,14 +7870,14 @@ public org.tensorflow.proto.OpPerformanceData.LogNormalDistributionOrBuilder get
           /**
            * .tensorflow.LogNormalDistribution execution_time_log_normal = 11;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.OpPerformanceData.LogNormalDistribution, org.tensorflow.proto.OpPerformanceData.LogNormalDistribution.Builder, org.tensorflow.proto.OpPerformanceData.LogNormalDistributionOrBuilder> 
               getExecutionTimeLogNormalFieldBuilder() {
             if (executionTimeLogNormalBuilder_ == null) {
               if (!(executionTimeCase_ == 11)) {
                 executionTime_ = org.tensorflow.proto.OpPerformanceData.LogNormalDistribution.getDefaultInstance();
               }
    -          executionTimeLogNormalBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          executionTimeLogNormalBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.OpPerformanceData.LogNormalDistribution, org.tensorflow.proto.OpPerformanceData.LogNormalDistribution.Builder, org.tensorflow.proto.OpPerformanceData.LogNormalDistributionOrBuilder>(
                       (org.tensorflow.proto.OpPerformanceData.LogNormalDistribution) executionTime_,
                       getParentForChildren(),
    @@ -8021,19 +7885,19 @@ public org.tensorflow.proto.OpPerformanceData.LogNormalDistributionOrBuilder get
               executionTime_ = null;
             }
             executionTimeCase_ = 11;
    -        onChanged();;
    +        onChanged();
             return executionTimeLogNormalBuilder_;
           }
     
           private org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemory opMemory_;
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemory, org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemory.Builder, org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemoryOrBuilder> opMemoryBuilder_;
           /**
            * .tensorflow.OpPerformance.OpMemory op_memory = 9;
            * @return Whether the opMemory field is set.
            */
           public boolean hasOpMemory() {
    -        return opMemoryBuilder_ != null || opMemory_ != null;
    +        return ((bitField0_ & 0x00000800) != 0);
           }
           /**
            * .tensorflow.OpPerformance.OpMemory op_memory = 9;
    @@ -8055,11 +7919,11 @@ public Builder setOpMemory(org.tensorflow.proto.OpPerformanceData.OpPerformance.
                 throw new NullPointerException();
               }
               opMemory_ = value;
    -          onChanged();
             } else {
               opMemoryBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000800;
    +        onChanged();
             return this;
           }
           /**
    @@ -8069,11 +7933,11 @@ public Builder setOpMemory(
               org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemory.Builder builderForValue) {
             if (opMemoryBuilder_ == null) {
               opMemory_ = builderForValue.build();
    -          onChanged();
             } else {
               opMemoryBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000800;
    +        onChanged();
             return this;
           }
           /**
    @@ -8081,38 +7945,40 @@ public Builder setOpMemory(
            */
           public Builder mergeOpMemory(org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemory value) {
             if (opMemoryBuilder_ == null) {
    -          if (opMemory_ != null) {
    -            opMemory_ =
    -              org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemory.newBuilder(opMemory_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000800) != 0) &&
    +            opMemory_ != null &&
    +            opMemory_ != org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemory.getDefaultInstance()) {
    +            getOpMemoryBuilder().mergeFrom(value);
               } else {
                 opMemory_ = value;
               }
    -          onChanged();
             } else {
               opMemoryBuilder_.mergeFrom(value);
             }
    -
    +        if (opMemory_ != null) {
    +          bitField0_ |= 0x00000800;
    +          onChanged();
    +        }
             return this;
           }
           /**
            * .tensorflow.OpPerformance.OpMemory op_memory = 9;
            */
           public Builder clearOpMemory() {
    -        if (opMemoryBuilder_ == null) {
    -          opMemory_ = null;
    -          onChanged();
    -        } else {
    -          opMemory_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000800);
    +        opMemory_ = null;
    +        if (opMemoryBuilder_ != null) {
    +          opMemoryBuilder_.dispose();
               opMemoryBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
            * .tensorflow.OpPerformance.OpMemory op_memory = 9;
            */
           public org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemory.Builder getOpMemoryBuilder() {
    -        
    +        bitField0_ |= 0x00000800;
             onChanged();
             return getOpMemoryFieldBuilder().getBuilder();
           }
    @@ -8130,11 +7996,11 @@ public org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemoryOrBuilder ge
           /**
            * .tensorflow.OpPerformance.OpMemory op_memory = 9;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemory, org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemory.Builder, org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemoryOrBuilder> 
               getOpMemoryFieldBuilder() {
             if (opMemoryBuilder_ == null) {
    -          opMemoryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          opMemoryBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemory, org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemory.Builder, org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemoryOrBuilder>(
                       getOpMemory(),
                       getParentForChildren(),
    @@ -8143,18 +8009,6 @@ public org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemoryOrBuilder ge
             }
             return opMemoryBuilder_;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.OpPerformance)
         }
    @@ -8243,37 +8097,34 @@ org.tensorflow.proto.OpPerformanceData.OpPerformanceOrBuilder getOpPerformanceOr
        * Protobuf type {@code tensorflow.OpPerformanceList}
        */
       public static final class OpPerformanceList extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.OpPerformanceList)
           OpPerformanceListOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        OpPerformanceList.class.getName());
    +    }
         // Use OpPerformanceList.newBuilder() to construct.
    -    private OpPerformanceList(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private OpPerformanceList(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private OpPerformanceList() {
           opPerformance_ = java.util.Collections.emptyList();
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new OpPerformanceList();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.OpPerformanceData.internal_static_tensorflow_OpPerformanceList_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.OpPerformanceData.internal_static_tensorflow_OpPerformanceList_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -8281,6 +8132,7 @@ protected java.lang.Object newInstance(
         }
     
         public static final int OP_PERFORMANCE_FIELD_NUMBER = 1;
    +    @SuppressWarnings("serial")
         private java.util.List opPerformance_;
         /**
          * repeated .tensorflow.OpPerformance op_performance = 1;
    @@ -8421,39 +8273,41 @@ public static org.tensorflow.proto.OpPerformanceData.OpPerformanceList parseFrom
         }
         public static org.tensorflow.proto.OpPerformanceData.OpPerformanceList parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.OpPerformanceData.OpPerformanceList parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.OpPerformanceData.OpPerformanceList parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.OpPerformanceData.OpPerformanceList parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.OpPerformanceData.OpPerformanceList parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.OpPerformanceData.OpPerformanceList parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -8473,7 +8327,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -8485,7 +8339,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.OpPerformanceList}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.OpPerformanceList)
             org.tensorflow.proto.OpPerformanceData.OpPerformanceListOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -8494,7 +8348,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.OpPerformanceData.internal_static_tensorflow_OpPerformanceList_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -8507,13 +8361,14 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             if (opPerformanceBuilder_ == null) {
               opPerformance_ = java.util.Collections.emptyList();
             } else {
    @@ -8547,7 +8402,13 @@ public org.tensorflow.proto.OpPerformanceData.OpPerformanceList build() {
           @java.lang.Override
           public org.tensorflow.proto.OpPerformanceData.OpPerformanceList buildPartial() {
             org.tensorflow.proto.OpPerformanceData.OpPerformanceList result = new org.tensorflow.proto.OpPerformanceData.OpPerformanceList(this);
    -        int from_bitField0_ = bitField0_;
    +        buildPartialRepeatedFields(result);
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        onBuilt();
    +        return result;
    +      }
    +
    +      private void buildPartialRepeatedFields(org.tensorflow.proto.OpPerformanceData.OpPerformanceList result) {
             if (opPerformanceBuilder_ == null) {
               if (((bitField0_ & 0x00000001) != 0)) {
                 opPerformance_ = java.util.Collections.unmodifiableList(opPerformance_);
    @@ -8557,42 +8418,12 @@ public org.tensorflow.proto.OpPerformanceData.OpPerformanceList buildPartial() {
             } else {
               result.opPerformance_ = opPerformanceBuilder_.build();
             }
    -        onBuilt();
    -        return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.OpPerformanceData.OpPerformanceList result) {
    +        int from_bitField0_ = bitField0_;
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.OpPerformanceData.OpPerformanceList) {
    @@ -8624,7 +8455,7 @@ public Builder mergeFrom(org.tensorflow.proto.OpPerformanceData.OpPerformanceLis
                   opPerformance_ = other.opPerformance_;
                   bitField0_ = (bitField0_ & ~0x00000001);
                   opPerformanceBuilder_ = 
    -                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                        getOpPerformanceFieldBuilder() : null;
                 } else {
                   opPerformanceBuilder_.addAllMessages(other.opPerformance_);
    @@ -8696,7 +8527,7 @@ private void ensureOpPerformanceIsMutable() {
              }
           }
     
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.OpPerformanceData.OpPerformance, org.tensorflow.proto.OpPerformanceData.OpPerformance.Builder, org.tensorflow.proto.OpPerformanceData.OpPerformanceOrBuilder> opPerformanceBuilder_;
     
           /**
    @@ -8912,11 +8743,11 @@ public org.tensorflow.proto.OpPerformanceData.OpPerformance.Builder addOpPerform
                getOpPerformanceBuilderList() {
             return getOpPerformanceFieldBuilder().getBuilderList();
           }
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.OpPerformanceData.OpPerformance, org.tensorflow.proto.OpPerformanceData.OpPerformance.Builder, org.tensorflow.proto.OpPerformanceData.OpPerformanceOrBuilder> 
               getOpPerformanceFieldBuilder() {
             if (opPerformanceBuilder_ == null) {
    -          opPerformanceBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +          opPerformanceBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                   org.tensorflow.proto.OpPerformanceData.OpPerformance, org.tensorflow.proto.OpPerformanceData.OpPerformance.Builder, org.tensorflow.proto.OpPerformanceData.OpPerformanceOrBuilder>(
                       opPerformance_,
                       ((bitField0_ & 0x00000001) != 0),
    @@ -8926,18 +8757,6 @@ public org.tensorflow.proto.OpPerformanceData.OpPerformance.Builder addOpPerform
             }
             return opPerformanceBuilder_;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.OpPerformanceList)
         }
    @@ -8993,47 +8812,47 @@ public org.tensorflow.proto.OpPerformanceData.OpPerformanceList getDefaultInstan
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_SessionInfo_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_SessionInfo_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_OpInfo_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_OpInfo_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_OpInfo_AttrEntry_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_OpInfo_AttrEntry_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_OpInfo_TensorProperties_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_OpInfo_TensorProperties_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_NormalDistribution_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_NormalDistribution_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_LogNormalDistribution_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_LogNormalDistribution_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_OpPerformance_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_OpPerformance_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_OpPerformance_OpMemory_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_OpPerformance_OpMemory_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_OpPerformanceList_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_OpPerformanceList_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -9099,57 +8918,58 @@ public org.tensorflow.proto.OpPerformanceData.OpPerformanceList getDefaultInstan
         internal_static_tensorflow_SessionInfo_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_SessionInfo_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_SessionInfo_descriptor,
             new java.lang.String[] { "IntraOpParallelism", });
         internal_static_tensorflow_OpInfo_descriptor =
           getDescriptor().getMessageTypes().get(1);
         internal_static_tensorflow_OpInfo_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_OpInfo_descriptor,
             new java.lang.String[] { "Op", "Attr", "Inputs", "Outputs", "Device", "SessionInfo", });
         internal_static_tensorflow_OpInfo_AttrEntry_descriptor =
           internal_static_tensorflow_OpInfo_descriptor.getNestedTypes().get(0);
         internal_static_tensorflow_OpInfo_AttrEntry_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_OpInfo_AttrEntry_descriptor,
             new java.lang.String[] { "Key", "Value", });
         internal_static_tensorflow_OpInfo_TensorProperties_descriptor =
           internal_static_tensorflow_OpInfo_descriptor.getNestedTypes().get(1);
         internal_static_tensorflow_OpInfo_TensorProperties_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_OpInfo_TensorProperties_descriptor,
             new java.lang.String[] { "Dtype", "Shape", "Value", });
         internal_static_tensorflow_NormalDistribution_descriptor =
           getDescriptor().getMessageTypes().get(2);
         internal_static_tensorflow_NormalDistribution_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_NormalDistribution_descriptor,
             new java.lang.String[] { "Mu", "Sigma", });
         internal_static_tensorflow_LogNormalDistribution_descriptor =
           getDescriptor().getMessageTypes().get(3);
         internal_static_tensorflow_LogNormalDistribution_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_LogNormalDistribution_descriptor,
             new java.lang.String[] { "Mu", "Sigma", });
         internal_static_tensorflow_OpPerformance_descriptor =
           getDescriptor().getMessageTypes().get(4);
         internal_static_tensorflow_OpPerformance_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_OpPerformance_descriptor,
             new java.lang.String[] { "Op", "SessionInfo", "Node", "TemporaryMemorySize", "ComputeCost", "ComputeTime", "MemoryTime", "ComputeEfficiency", "MemoryEfficiency", "ExecutionTimeNormal", "ExecutionTimeLogNormal", "OpMemory", "ExecutionTime", });
         internal_static_tensorflow_OpPerformance_OpMemory_descriptor =
           internal_static_tensorflow_OpPerformance_descriptor.getNestedTypes().get(0);
         internal_static_tensorflow_OpPerformance_OpMemory_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_OpPerformance_OpMemory_descriptor,
             new java.lang.String[] { "OutputMemory", "TempMemory", "PersistentMemory", "DeviceTempMemory", "DevicePersistentMemory", });
         internal_static_tensorflow_OpPerformanceList_descriptor =
           getDescriptor().getMessageTypes().get(5);
         internal_static_tensorflow_OpPerformanceList_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_OpPerformanceList_descriptor,
             new java.lang.String[] { "OpPerformance", });
    +    descriptor.resolveAllFeaturesImmutable();
         org.tensorflow.proto.TensorProtos.getDescriptor();
         org.tensorflow.proto.TensorShapeProtos.getDescriptor();
         org.tensorflow.proto.TypesProtos.getDescriptor();
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OptimizedFunctionGraphOuterClass.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OptimizedFunctionGraphOuterClass.java
    index 70e1dc2e94d..324e2a3431c 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OptimizedFunctionGraphOuterClass.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OptimizedFunctionGraphOuterClass.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/optimized_function_graph.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class OptimizedFunctionGraphOuterClass {
       private OptimizedFunctionGraphOuterClass() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      OptimizedFunctionGraphOuterClass.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -110,7 +121,6 @@ boolean containsNodeNameToControlRet(
          *
          * map<string, string> node_name_to_control_ret = 3;
          */
    -
         /* nullable */
     java.lang.String getNodeNameToControlRetOrDefault(
             java.lang.String key,
    @@ -124,7 +134,6 @@ java.lang.String getNodeNameToControlRetOrDefault(
          *
          * map<string, string> node_name_to_control_ret = 3;
          */
    -
         java.lang.String getNodeNameToControlRetOrThrow(
             java.lang.String key);
     
    @@ -252,32 +261,29 @@ java.lang.String getNodeNameToControlRetOrThrow(
        * Protobuf type {@code tensorflow.OptimizedFunctionGraph}
        */
       public static final class OptimizedFunctionGraph extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.OptimizedFunctionGraph)
           OptimizedFunctionGraphOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        OptimizedFunctionGraph.class.getName());
    +    }
         // Use OptimizedFunctionGraph.newBuilder() to construct.
    -    private OptimizedFunctionGraph(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private OptimizedFunctionGraph(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private OptimizedFunctionGraph() {
           name_ = "";
    -      retTypes_ = java.util.Collections.emptyList();
    +      retTypes_ = emptyIntList();
           source_ = 0;
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new OptimizedFunctionGraph();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.OptimizedFunctionGraphOuterClass.internal_static_tensorflow_OptimizedFunctionGraph_descriptor;
    @@ -285,7 +291,7 @@ protected java.lang.Object newInstance(
     
         @SuppressWarnings({"rawtypes"})
         @java.lang.Override
    -    protected com.google.protobuf.MapField internalGetMapField(
    +    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
             int number) {
           switch (number) {
             case 3:
    @@ -296,7 +302,7 @@ protected com.google.protobuf.MapField internalGetMapField(
           }
         }
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.OptimizedFunctionGraphOuterClass.internal_static_tensorflow_OptimizedFunctionGraph_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -306,8 +312,10 @@ protected com.google.protobuf.MapField internalGetMapField(
         /**
          * 
          * Enum for distinguishing the origin where the proto is created.
    +     *
          * AOT: proto is created in ahead-of-time environment, which can be different
          * from the environment where the graph is actually executed.
    +     *
          * JIT: proto is created in just-in-time execution, which has the same
          * environment as the one the graph is actually executed.
          * 
    @@ -331,6 +339,15 @@ public enum OptimizationSource UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + OptimizationSource.class.getName()); + } /** * SOURCE_UNSPECIFIED = 0; */ @@ -430,7 +447,8 @@ private OptimizationSource(int value) { private int bitField0_; public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; /** *
          * Function name. It can be a human-readable SignatureDef's method name, or a
    @@ -489,7 +507,7 @@ public java.lang.String getName() {
          */
         @java.lang.Override
         public boolean hasFunctionGraph() {
    -      return functionGraph_ != null;
    +      return ((bitField0_ & 0x00000001) != 0);
         }
         /**
          * 
    @@ -512,7 +530,7 @@ public org.tensorflow.proto.GraphDef getFunctionGraph() {
          */
         @java.lang.Override
         public org.tensorflow.proto.GraphDefOrBuilder getFunctionGraphOrBuilder() {
    -      return getFunctionGraph();
    +      return functionGraph_ == null ? org.tensorflow.proto.GraphDef.getDefaultInstance() : functionGraph_;
         }
     
         public static final int NODE_NAME_TO_CONTROL_RET_FIELD_NUMBER = 3;
    @@ -527,6 +545,7 @@ private static final class NodeNameToControlRetDefaultEntryHolder {
                       com.google.protobuf.WireFormat.FieldType.STRING,
                       "");
         }
    +    @SuppressWarnings("serial")
         private com.google.protobuf.MapField<
             java.lang.String, java.lang.String> nodeNameToControlRet_;
         private com.google.protobuf.MapField
    @@ -537,7 +556,6 @@ private static final class NodeNameToControlRetDefaultEntryHolder {
           }
           return nodeNameToControlRet_;
         }
    -
         public int getNodeNameToControlRetCount() {
           return internalGetNodeNameToControlRet().getMap().size();
         }
    @@ -549,7 +567,6 @@ public int getNodeNameToControlRetCount() {
          *
          * map<string, string> node_name_to_control_ret = 3;
          */
    -
         @java.lang.Override
         public boolean containsNodeNameToControlRet(
             java.lang.String key) {
    @@ -573,7 +590,6 @@ public java.util.Map getNodeNameToControlRet
          * map<string, string> node_name_to_control_ret = 3;
          */
         @java.lang.Override
    -
         public java.util.Map getNodeNameToControlRetMap() {
           return internalGetNodeNameToControlRet().getMap();
         }
    @@ -586,10 +602,11 @@ public java.util.Map getNodeNameToControlRet
          * map<string, string> node_name_to_control_ret = 3;
          */
         @java.lang.Override
    -
    -    public java.lang.String getNodeNameToControlRetOrDefault(
    +    public /* nullable */
    +java.lang.String getNodeNameToControlRetOrDefault(
             java.lang.String key,
    -        java.lang.String defaultValue) {
    +        /* nullable */
    +java.lang.String defaultValue) {
           if (key == null) { throw new NullPointerException("map key"); }
           java.util.Map map =
               internalGetNodeNameToControlRet().getMap();
    @@ -604,7 +621,6 @@ public java.lang.String getNodeNameToControlRetOrDefault(
          * map<string, string> node_name_to_control_ret = 3;
          */
         @java.lang.Override
    -
         public java.lang.String getNodeNameToControlRetOrThrow(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    @@ -617,14 +633,14 @@ public java.lang.String getNodeNameToControlRetOrThrow(
         }
     
         public static final int RET_TYPES_FIELD_NUMBER = 4;
    -    private java.util.List retTypes_;
    -    private static final com.google.protobuf.Internal.ListAdapter.Converter<
    -        java.lang.Integer, org.tensorflow.proto.DataType> retTypes_converter_ =
    -            new com.google.protobuf.Internal.ListAdapter.Converter<
    -                java.lang.Integer, org.tensorflow.proto.DataType>() {
    -              public org.tensorflow.proto.DataType convert(java.lang.Integer from) {
    -                @SuppressWarnings("deprecation")
    -                org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(from);
    +    @SuppressWarnings("serial")
    +    private com.google.protobuf.Internal.IntList retTypes_;
    +    private static final com.google.protobuf.Internal.IntListAdapter.IntConverter<
    +        org.tensorflow.proto.DataType> retTypes_converter_ =
    +            new com.google.protobuf.Internal.IntListAdapter.IntConverter<
    +                org.tensorflow.proto.DataType>() {
    +              public org.tensorflow.proto.DataType convert(int from) {
    +                org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(from);
                     return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
                   }
                 };
    @@ -639,8 +655,8 @@ public org.tensorflow.proto.DataType convert(java.lang.Integer from) {
          */
         @java.lang.Override
         public java.util.List getRetTypesList() {
    -      return new com.google.protobuf.Internal.ListAdapter<
    -          java.lang.Integer, org.tensorflow.proto.DataType>(retTypes_, retTypes_converter_);
    +      return new com.google.protobuf.Internal.IntListAdapter<
    +          org.tensorflow.proto.DataType>(retTypes_, retTypes_converter_);
         }
         /**
          * 
    @@ -667,7 +683,7 @@ public int getRetTypesCount() {
          */
         @java.lang.Override
         public org.tensorflow.proto.DataType getRetTypes(int index) {
    -      return retTypes_converter_.convert(retTypes_.get(index));
    +      return retTypes_converter_.convert(retTypes_.getInt(index));
         }
         /**
          * 
    @@ -695,12 +711,12 @@ public org.tensorflow.proto.DataType getRetTypes(int index) {
          */
         @java.lang.Override
         public int getRetTypesValue(int index) {
    -      return retTypes_.get(index);
    +      return retTypes_.getInt(index);
         }
         private int retTypesMemoizedSerializedSize;
     
         public static final int NUM_RETURN_NODES_FIELD_NUMBER = 5;
    -    private int numReturnNodes_;
    +    private int numReturnNodes_ = 0;
         /**
          * 
          * Number of return nodes. This is an output of graph preprocessing.
    @@ -715,7 +731,7 @@ public int getNumReturnNodes() {
         }
     
         public static final int SOURCE_FIELD_NUMBER = 7;
    -    private int source_;
    +    private int source_ = 0;
         /**
          * 
          * Indicates the source environment where this proto is generated.
    @@ -725,7 +741,7 @@ public int getNumReturnNodes() {
          * @return Whether the source field is set.
          */
         @java.lang.Override public boolean hasSource() {
    -      return ((bitField0_ & 0x00000001) != 0);
    +      return ((bitField0_ & 0x00000002) != 0);
         }
         /**
          * 
    @@ -747,13 +763,12 @@ public int getNumReturnNodes() {
          * @return The source.
          */
         @java.lang.Override public org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFunctionGraph.OptimizationSource getSource() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFunctionGraph.OptimizationSource result = org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFunctionGraph.OptimizationSource.valueOf(source_);
    +      org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFunctionGraph.OptimizationSource result = org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFunctionGraph.OptimizationSource.forNumber(source_);
           return result == null ? org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFunctionGraph.OptimizationSource.UNRECOGNIZED : result;
         }
     
         public static final int OPTIMIZATION_TIME_USECS_FIELD_NUMBER = 8;
    -    private long optimizationTimeUsecs_;
    +    private long optimizationTimeUsecs_ = 0L;
         /**
          * 
          * Time (in microseconds) spent on running the graph optimization passes for
    @@ -765,7 +780,7 @@ public int getNumReturnNodes() {
          */
         @java.lang.Override
         public boolean hasOptimizationTimeUsecs() {
    -      return ((bitField0_ & 0x00000002) != 0);
    +      return ((bitField0_ & 0x00000004) != 0);
         }
         /**
          * 
    @@ -796,13 +811,13 @@ public final boolean isInitialized() {
         public void writeTo(com.google.protobuf.CodedOutputStream output)
                             throws java.io.IOException {
           getSerializedSize();
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
           }
    -      if (functionGraph_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             output.writeMessage(2, getFunctionGraph());
           }
    -      com.google.protobuf.GeneratedMessageV3
    +      com.google.protobuf.GeneratedMessage
             .serializeStringMapTo(
               output,
               internalGetNodeNameToControlRet(),
    @@ -813,15 +828,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
             output.writeUInt32NoTag(retTypesMemoizedSerializedSize);
           }
           for (int i = 0; i < retTypes_.size(); i++) {
    -        output.writeEnumNoTag(retTypes_.get(i));
    +        output.writeEnumNoTag(retTypes_.getInt(i));
           }
           if (numReturnNodes_ != 0) {
             output.writeUInt32(5, numReturnNodes_);
           }
    -      if (((bitField0_ & 0x00000001) != 0)) {
    +      if (((bitField0_ & 0x00000002) != 0)) {
             output.writeEnum(7, source_);
           }
    -      if (((bitField0_ & 0x00000002) != 0)) {
    +      if (((bitField0_ & 0x00000004) != 0)) {
             output.writeUInt64(8, optimizationTimeUsecs_);
           }
           getUnknownFields().writeTo(output);
    @@ -833,10 +848,10 @@ public int getSerializedSize() {
           if (size != -1) return size;
     
           size = 0;
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
           }
    -      if (functionGraph_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(2, getFunctionGraph());
           }
    @@ -854,7 +869,7 @@ public int getSerializedSize() {
             int dataSize = 0;
             for (int i = 0; i < retTypes_.size(); i++) {
               dataSize += com.google.protobuf.CodedOutputStream
    -            .computeEnumSizeNoTag(retTypes_.get(i));
    +            .computeEnumSizeNoTag(retTypes_.getInt(i));
             }
             size += dataSize;
             if (!getRetTypesList().isEmpty()) {  size += 1;
    @@ -866,11 +881,11 @@ public int getSerializedSize() {
             size += com.google.protobuf.CodedOutputStream
               .computeUInt32Size(5, numReturnNodes_);
           }
    -      if (((bitField0_ & 0x00000001) != 0)) {
    +      if (((bitField0_ & 0x00000002) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeEnumSize(7, source_);
           }
    -      if (((bitField0_ & 0x00000002) != 0)) {
    +      if (((bitField0_ & 0x00000004) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeUInt64Size(8, optimizationTimeUsecs_);
           }
    @@ -985,39 +1000,41 @@ public static org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFun
         }
         public static org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFunctionGraph parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFunctionGraph parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFunctionGraph parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFunctionGraph parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFunctionGraph parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFunctionGraph parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -1037,7 +1054,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -1052,7 +1069,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.OptimizedFunctionGraph}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.OptimizedFunctionGraph)
             org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFunctionGraphOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -1061,7 +1078,7 @@ public static final class Builder extends
           }
     
           @SuppressWarnings({"rawtypes"})
    -      protected com.google.protobuf.MapField internalGetMapField(
    +      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
               int number) {
             switch (number) {
               case 3:
    @@ -1072,7 +1089,7 @@ protected com.google.protobuf.MapField internalGetMapField(
             }
           }
           @SuppressWarnings({"rawtypes"})
    -      protected com.google.protobuf.MapField internalGetMutableMapField(
    +      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
               int number) {
             switch (number) {
               case 3:
    @@ -1083,7 +1100,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField(
             }
           }
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.OptimizedFunctionGraphOuterClass.internal_static_tensorflow_OptimizedFunctionGraph_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -1092,34 +1109,36 @@ protected com.google.protobuf.MapField internalGetMutableMapField(
     
           // Construct using org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFunctionGraph.newBuilder()
           private Builder() {
    -
    +        maybeForceBuilderInitialization();
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
    -
    +        maybeForceBuilderInitialization();
    +      }
    +      private void maybeForceBuilderInitialization() {
    +        if (com.google.protobuf.GeneratedMessage
    +                .alwaysUseFieldBuilders) {
    +          getFunctionGraphFieldBuilder();
    +        }
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             name_ = "";
    -
    -        if (functionGraphBuilder_ == null) {
    -          functionGraph_ = null;
    -        } else {
    -          functionGraph_ = null;
    +        functionGraph_ = null;
    +        if (functionGraphBuilder_ != null) {
    +          functionGraphBuilder_.dispose();
               functionGraphBuilder_ = null;
             }
             internalGetMutableNodeNameToControlRet().clear();
    -        retTypes_ = java.util.Collections.emptyList();
    -        bitField0_ = (bitField0_ & ~0x00000002);
    +        retTypes_ = emptyIntList();
    +        bitField0_ = (bitField0_ & ~0x00000008);
             numReturnNodes_ = 0;
    -
             source_ = 0;
    -        bitField0_ = (bitField0_ & ~0x00000004);
             optimizationTimeUsecs_ = 0L;
    -        bitField0_ = (bitField0_ & ~0x00000008);
             return this;
           }
     
    @@ -1146,67 +1165,50 @@ public org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFunctionGr
           @java.lang.Override
           public org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFunctionGraph buildPartial() {
             org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFunctionGraph result = new org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFunctionGraph(this);
    +        buildPartialRepeatedFields(result);
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        onBuilt();
    +        return result;
    +      }
    +
    +      private void buildPartialRepeatedFields(org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFunctionGraph result) {
    +        if (((bitField0_ & 0x00000008) != 0)) {
    +          retTypes_.makeImmutable();
    +          bitField0_ = (bitField0_ & ~0x00000008);
    +        }
    +        result.retTypes_ = retTypes_;
    +      }
    +
    +      private void buildPartial0(org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFunctionGraph result) {
             int from_bitField0_ = bitField0_;
    -        int to_bitField0_ = 0;
    -        result.name_ = name_;
    -        if (functionGraphBuilder_ == null) {
    -          result.functionGraph_ = functionGraph_;
    -        } else {
    -          result.functionGraph_ = functionGraphBuilder_.build();
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.name_ = name_;
             }
    -        result.nodeNameToControlRet_ = internalGetNodeNameToControlRet();
    -        result.nodeNameToControlRet_.makeImmutable();
    -        if (((bitField0_ & 0x00000002) != 0)) {
    -          retTypes_ = java.util.Collections.unmodifiableList(retTypes_);
    -          bitField0_ = (bitField0_ & ~0x00000002);
    +        int to_bitField0_ = 0;
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.functionGraph_ = functionGraphBuilder_ == null
    +              ? functionGraph_
    +              : functionGraphBuilder_.build();
    +          to_bitField0_ |= 0x00000001;
             }
    -        result.retTypes_ = retTypes_;
    -        result.numReturnNodes_ = numReturnNodes_;
             if (((from_bitField0_ & 0x00000004) != 0)) {
    -          to_bitField0_ |= 0x00000001;
    +          result.nodeNameToControlRet_ = internalGetNodeNameToControlRet();
    +          result.nodeNameToControlRet_.makeImmutable();
             }
    -        result.source_ = source_;
    -        if (((from_bitField0_ & 0x00000008) != 0)) {
    -          result.optimizationTimeUsecs_ = optimizationTimeUsecs_;
    +        if (((from_bitField0_ & 0x00000010) != 0)) {
    +          result.numReturnNodes_ = numReturnNodes_;
    +        }
    +        if (((from_bitField0_ & 0x00000020) != 0)) {
    +          result.source_ = source_;
               to_bitField0_ |= 0x00000002;
             }
    -        result.bitField0_ = to_bitField0_;
    -        onBuilt();
    -        return result;
    +        if (((from_bitField0_ & 0x00000040) != 0)) {
    +          result.optimizationTimeUsecs_ = optimizationTimeUsecs_;
    +          to_bitField0_ |= 0x00000004;
    +        }
    +        result.bitField0_ |= to_bitField0_;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    -      }
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFunctionGraph) {
    @@ -1221,6 +1223,7 @@ public Builder mergeFrom(org.tensorflow.proto.OptimizedFunctionGraphOuterClass.O
             if (other == org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFunctionGraph.getDefaultInstance()) return this;
             if (!other.getName().isEmpty()) {
               name_ = other.name_;
    +          bitField0_ |= 0x00000001;
               onChanged();
             }
             if (other.hasFunctionGraph()) {
    @@ -1228,10 +1231,11 @@ public Builder mergeFrom(org.tensorflow.proto.OptimizedFunctionGraphOuterClass.O
             }
             internalGetMutableNodeNameToControlRet().mergeFrom(
                 other.internalGetNodeNameToControlRet());
    +        bitField0_ |= 0x00000004;
             if (!other.retTypes_.isEmpty()) {
               if (retTypes_.isEmpty()) {
                 retTypes_ = other.retTypes_;
    -            bitField0_ = (bitField0_ & ~0x00000002);
    +            bitField0_ = (bitField0_ & ~0x00000008);
               } else {
                 ensureRetTypesIsMutable();
                 retTypes_.addAll(other.retTypes_);
    @@ -1275,14 +1279,14 @@ public Builder mergeFrom(
                     break;
                   case 10: {
                     name_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 10
                   case 18: {
                     input.readMessage(
                         getFunctionGraphFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 18
                   case 26: {
    @@ -1291,12 +1295,13 @@ public Builder mergeFrom(
                         NodeNameToControlRetDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
                     internalGetMutableNodeNameToControlRet().getMutableMap().put(
                         nodeNameToControlRet__.getKey(), nodeNameToControlRet__.getValue());
    +                bitField0_ |= 0x00000004;
                     break;
                   } // case 26
                   case 32: {
                     int tmpRaw = input.readEnum();
                     ensureRetTypesIsMutable();
    -                retTypes_.add(tmpRaw);
    +                retTypes_.addInt(tmpRaw);
                     break;
                   } // case 32
                   case 34: {
    @@ -1305,24 +1310,24 @@ public Builder mergeFrom(
                     while(input.getBytesUntilLimit() > 0) {
                       int tmpRaw = input.readEnum();
                       ensureRetTypesIsMutable();
    -                  retTypes_.add(tmpRaw);
    +                  retTypes_.addInt(tmpRaw);
                     }
                     input.popLimit(oldLimit);
                     break;
                   } // case 34
                   case 40: {
                     numReturnNodes_ = input.readUInt32();
    -
    +                bitField0_ |= 0x00000010;
                     break;
                   } // case 40
                   case 56: {
                     source_ = input.readEnum();
    -                bitField0_ |= 0x00000004;
    +                bitField0_ |= 0x00000020;
                     break;
                   } // case 56
                   case 64: {
                     optimizationTimeUsecs_ = input.readUInt64();
    -                bitField0_ |= 0x00000008;
    +                bitField0_ |= 0x00000040;
                     break;
                   } // case 64
                   default: {
    @@ -1398,11 +1403,9 @@ public java.lang.String getName() {
            */
           public Builder setName(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             name_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -1416,8 +1419,8 @@ public Builder setName(
            * @return This builder for chaining.
            */
           public Builder clearName() {
    -        
             name_ = getDefaultInstance().getName();
    +        bitField0_ = (bitField0_ & ~0x00000001);
             onChanged();
             return this;
           }
    @@ -1433,18 +1436,16 @@ public Builder clearName() {
            */
           public Builder setNameBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             name_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
     
           private org.tensorflow.proto.GraphDef functionGraph_;
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.GraphDef, org.tensorflow.proto.GraphDef.Builder, org.tensorflow.proto.GraphDefOrBuilder> functionGraphBuilder_;
           /**
            * 
    @@ -1455,7 +1456,7 @@ public Builder setNameBytes(
            * @return Whether the functionGraph field is set.
            */
           public boolean hasFunctionGraph() {
    -        return functionGraphBuilder_ != null || functionGraph_ != null;
    +        return ((bitField0_ & 0x00000002) != 0);
           }
           /**
            * 
    @@ -1485,11 +1486,11 @@ public Builder setFunctionGraph(org.tensorflow.proto.GraphDef value) {
                 throw new NullPointerException();
               }
               functionGraph_ = value;
    -          onChanged();
             } else {
               functionGraphBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000002;
    +        onChanged();
             return this;
           }
           /**
    @@ -1503,11 +1504,11 @@ public Builder setFunctionGraph(
               org.tensorflow.proto.GraphDef.Builder builderForValue) {
             if (functionGraphBuilder_ == null) {
               functionGraph_ = builderForValue.build();
    -          onChanged();
             } else {
               functionGraphBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000002;
    +        onChanged();
             return this;
           }
           /**
    @@ -1519,17 +1520,20 @@ public Builder setFunctionGraph(
            */
           public Builder mergeFunctionGraph(org.tensorflow.proto.GraphDef value) {
             if (functionGraphBuilder_ == null) {
    -          if (functionGraph_ != null) {
    -            functionGraph_ =
    -              org.tensorflow.proto.GraphDef.newBuilder(functionGraph_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000002) != 0) &&
    +            functionGraph_ != null &&
    +            functionGraph_ != org.tensorflow.proto.GraphDef.getDefaultInstance()) {
    +            getFunctionGraphBuilder().mergeFrom(value);
               } else {
                 functionGraph_ = value;
               }
    -          onChanged();
             } else {
               functionGraphBuilder_.mergeFrom(value);
             }
    -
    +        if (functionGraph_ != null) {
    +          bitField0_ |= 0x00000002;
    +          onChanged();
    +        }
             return this;
           }
           /**
    @@ -1540,14 +1544,13 @@ public Builder mergeFunctionGraph(org.tensorflow.proto.GraphDef value) {
            * .tensorflow.GraphDef function_graph = 2;
            */
           public Builder clearFunctionGraph() {
    -        if (functionGraphBuilder_ == null) {
    -          functionGraph_ = null;
    -          onChanged();
    -        } else {
    -          functionGraph_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000002);
    +        functionGraph_ = null;
    +        if (functionGraphBuilder_ != null) {
    +          functionGraphBuilder_.dispose();
               functionGraphBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
    @@ -1558,7 +1561,7 @@ public Builder clearFunctionGraph() {
            * .tensorflow.GraphDef function_graph = 2;
            */
           public org.tensorflow.proto.GraphDef.Builder getFunctionGraphBuilder() {
    -        
    +        bitField0_ |= 0x00000002;
             onChanged();
             return getFunctionGraphFieldBuilder().getBuilder();
           }
    @@ -1584,11 +1587,11 @@ public org.tensorflow.proto.GraphDefOrBuilder getFunctionGraphOrBuilder() {
            *
            * .tensorflow.GraphDef function_graph = 2;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.GraphDef, org.tensorflow.proto.GraphDef.Builder, org.tensorflow.proto.GraphDefOrBuilder> 
               getFunctionGraphFieldBuilder() {
             if (functionGraphBuilder_ == null) {
    -          functionGraphBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          functionGraphBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.GraphDef, org.tensorflow.proto.GraphDef.Builder, org.tensorflow.proto.GraphDefOrBuilder>(
                       getFunctionGraph(),
                       getParentForChildren(),
    @@ -1601,7 +1604,7 @@ public org.tensorflow.proto.GraphDefOrBuilder getFunctionGraphOrBuilder() {
           private com.google.protobuf.MapField<
               java.lang.String, java.lang.String> nodeNameToControlRet_;
           private com.google.protobuf.MapField
    -      internalGetNodeNameToControlRet() {
    +          internalGetNodeNameToControlRet() {
             if (nodeNameToControlRet_ == null) {
               return com.google.protobuf.MapField.emptyMapField(
                   NodeNameToControlRetDefaultEntryHolder.defaultEntry);
    @@ -1609,8 +1612,7 @@ public org.tensorflow.proto.GraphDefOrBuilder getFunctionGraphOrBuilder() {
             return nodeNameToControlRet_;
           }
           private com.google.protobuf.MapField
    -      internalGetMutableNodeNameToControlRet() {
    -        onChanged();;
    +          internalGetMutableNodeNameToControlRet() {
             if (nodeNameToControlRet_ == null) {
               nodeNameToControlRet_ = com.google.protobuf.MapField.newMapField(
                   NodeNameToControlRetDefaultEntryHolder.defaultEntry);
    @@ -1618,9 +1620,10 @@ public org.tensorflow.proto.GraphDefOrBuilder getFunctionGraphOrBuilder() {
             if (!nodeNameToControlRet_.isMutable()) {
               nodeNameToControlRet_ = nodeNameToControlRet_.copy();
             }
    +        bitField0_ |= 0x00000004;
    +        onChanged();
             return nodeNameToControlRet_;
           }
    -
           public int getNodeNameToControlRetCount() {
             return internalGetNodeNameToControlRet().getMap().size();
           }
    @@ -1632,7 +1635,6 @@ public int getNodeNameToControlRetCount() {
            *
            * map<string, string> node_name_to_control_ret = 3;
            */
    -
           @java.lang.Override
           public boolean containsNodeNameToControlRet(
               java.lang.String key) {
    @@ -1656,7 +1658,6 @@ public java.util.Map getNodeNameToControlRet
            * map<string, string> node_name_to_control_ret = 3;
            */
           @java.lang.Override
    -
           public java.util.Map getNodeNameToControlRetMap() {
             return internalGetNodeNameToControlRet().getMap();
           }
    @@ -1669,10 +1670,11 @@ public java.util.Map getNodeNameToControlRet
            * map<string, string> node_name_to_control_ret = 3;
            */
           @java.lang.Override
    -
    -      public java.lang.String getNodeNameToControlRetOrDefault(
    +      public /* nullable */
    +java.lang.String getNodeNameToControlRetOrDefault(
               java.lang.String key,
    -          java.lang.String defaultValue) {
    +          /* nullable */
    +java.lang.String defaultValue) {
             if (key == null) { throw new NullPointerException("map key"); }
             java.util.Map map =
                 internalGetNodeNameToControlRet().getMap();
    @@ -1687,7 +1689,6 @@ public java.lang.String getNodeNameToControlRetOrDefault(
            * map<string, string> node_name_to_control_ret = 3;
            */
           @java.lang.Override
    -
           public java.lang.String getNodeNameToControlRetOrThrow(
               java.lang.String key) {
             if (key == null) { throw new NullPointerException("map key"); }
    @@ -1698,8 +1699,8 @@ public java.lang.String getNodeNameToControlRetOrThrow(
             }
             return map.get(key);
           }
    -
           public Builder clearNodeNameToControlRet() {
    +        bitField0_ = (bitField0_ & ~0x00000004);
             internalGetMutableNodeNameToControlRet().getMutableMap()
                 .clear();
             return this;
    @@ -1712,7 +1713,6 @@ public Builder clearNodeNameToControlRet() {
            *
            * map<string, string> node_name_to_control_ret = 3;
            */
    -
           public Builder removeNodeNameToControlRet(
               java.lang.String key) {
             if (key == null) { throw new NullPointerException("map key"); }
    @@ -1725,7 +1725,8 @@ public Builder removeNodeNameToControlRet(
            */
           @java.lang.Deprecated
           public java.util.Map
    -      getMutableNodeNameToControlRet() {
    +          getMutableNodeNameToControlRet() {
    +        bitField0_ |= 0x00000004;
             return internalGetMutableNodeNameToControlRet().getMutableMap();
           }
           /**
    @@ -1740,12 +1741,10 @@ public Builder putNodeNameToControlRet(
               java.lang.String key,
               java.lang.String value) {
             if (key == null) { throw new NullPointerException("map key"); }
    -        if (value == null) {
    -  throw new NullPointerException("map value");
    -}
    -
    +        if (value == null) { throw new NullPointerException("map value"); }
             internalGetMutableNodeNameToControlRet().getMutableMap()
                 .put(key, value);
    +        bitField0_ |= 0x00000004;
             return this;
           }
           /**
    @@ -1756,20 +1755,20 @@ public Builder putNodeNameToControlRet(
            *
            * map<string, string> node_name_to_control_ret = 3;
            */
    -
           public Builder putAllNodeNameToControlRet(
               java.util.Map values) {
             internalGetMutableNodeNameToControlRet().getMutableMap()
                 .putAll(values);
    +        bitField0_ |= 0x00000004;
             return this;
           }
     
    -      private java.util.List retTypes_ =
    -        java.util.Collections.emptyList();
    +      private com.google.protobuf.Internal.IntList retTypes_ =
    +        emptyIntList();
           private void ensureRetTypesIsMutable() {
    -        if (!((bitField0_ & 0x00000002) != 0)) {
    -          retTypes_ = new java.util.ArrayList(retTypes_);
    -          bitField0_ |= 0x00000002;
    +        if (!((bitField0_ & 0x00000008) != 0)) {
    +          retTypes_ = makeMutableCopy(retTypes_);
    +          bitField0_ |= 0x00000008;
             }
           }
           /**
    @@ -1782,8 +1781,8 @@ private void ensureRetTypesIsMutable() {
            * @return A list containing the retTypes.
            */
           public java.util.List getRetTypesList() {
    -        return new com.google.protobuf.Internal.ListAdapter<
    -            java.lang.Integer, org.tensorflow.proto.DataType>(retTypes_, retTypes_converter_);
    +        return new com.google.protobuf.Internal.IntListAdapter<
    +            org.tensorflow.proto.DataType>(retTypes_, retTypes_converter_);
           }
           /**
            * 
    @@ -1808,7 +1807,7 @@ public int getRetTypesCount() {
            * @return The retTypes at the given index.
            */
           public org.tensorflow.proto.DataType getRetTypes(int index) {
    -        return retTypes_converter_.convert(retTypes_.get(index));
    +        return retTypes_converter_.convert(retTypes_.getInt(index));
           }
           /**
            * 
    @@ -1827,7 +1826,7 @@ public Builder setRetTypes(
               throw new NullPointerException();
             }
             ensureRetTypesIsMutable();
    -        retTypes_.set(index, value.getNumber());
    +        retTypes_.setInt(index, value.getNumber());
             onChanged();
             return this;
           }
    @@ -1846,7 +1845,7 @@ public Builder addRetTypes(org.tensorflow.proto.DataType value) {
               throw new NullPointerException();
             }
             ensureRetTypesIsMutable();
    -        retTypes_.add(value.getNumber());
    +        retTypes_.addInt(value.getNumber());
             onChanged();
             return this;
           }
    @@ -1864,7 +1863,7 @@ public Builder addAllRetTypes(
               java.lang.Iterable values) {
             ensureRetTypesIsMutable();
             for (org.tensorflow.proto.DataType value : values) {
    -          retTypes_.add(value.getNumber());
    +          retTypes_.addInt(value.getNumber());
             }
             onChanged();
             return this;
    @@ -1879,8 +1878,8 @@ public Builder addAllRetTypes(
            * @return This builder for chaining.
            */
           public Builder clearRetTypes() {
    -        retTypes_ = java.util.Collections.emptyList();
    -        bitField0_ = (bitField0_ & ~0x00000002);
    +        retTypes_ = emptyIntList();
    +        bitField0_ = (bitField0_ & ~0x00000008);
             onChanged();
             return this;
           }
    @@ -1908,7 +1907,7 @@ public Builder clearRetTypes() {
            * @return The enum numeric value on the wire of retTypes at the given index.
            */
           public int getRetTypesValue(int index) {
    -        return retTypes_.get(index);
    +        return retTypes_.getInt(index);
           }
           /**
            * 
    @@ -1924,7 +1923,7 @@ public int getRetTypesValue(int index) {
           public Builder setRetTypesValue(
               int index, int value) {
             ensureRetTypesIsMutable();
    -        retTypes_.set(index, value);
    +        retTypes_.setInt(index, value);
             onChanged();
             return this;
           }
    @@ -1940,7 +1939,7 @@ public Builder setRetTypesValue(
            */
           public Builder addRetTypesValue(int value) {
             ensureRetTypesIsMutable();
    -        retTypes_.add(value);
    +        retTypes_.addInt(value);
             onChanged();
             return this;
           }
    @@ -1958,7 +1957,7 @@ public Builder addAllRetTypesValue(
               java.lang.Iterable values) {
             ensureRetTypesIsMutable();
             for (int value : values) {
    -          retTypes_.add(value);
    +          retTypes_.addInt(value);
             }
             onChanged();
             return this;
    @@ -1987,8 +1986,9 @@ public int getNumReturnNodes() {
            * @return This builder for chaining.
            */
           public Builder setNumReturnNodes(int value) {
    -        
    +
             numReturnNodes_ = value;
    +        bitField0_ |= 0x00000010;
             onChanged();
             return this;
           }
    @@ -2001,7 +2001,7 @@ public Builder setNumReturnNodes(int value) {
            * @return This builder for chaining.
            */
           public Builder clearNumReturnNodes() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000010);
             numReturnNodes_ = 0;
             onChanged();
             return this;
    @@ -2017,7 +2017,7 @@ public Builder clearNumReturnNodes() {
            * @return Whether the source field is set.
            */
           @java.lang.Override public boolean hasSource() {
    -        return ((bitField0_ & 0x00000004) != 0);
    +        return ((bitField0_ & 0x00000020) != 0);
           }
           /**
            * 
    @@ -2040,8 +2040,8 @@ public Builder clearNumReturnNodes() {
            * @return This builder for chaining.
            */
           public Builder setSourceValue(int value) {
    -        bitField0_ |= 0x00000004;
             source_ = value;
    +        bitField0_ |= 0x00000020;
             onChanged();
             return this;
           }
    @@ -2055,8 +2055,7 @@ public Builder setSourceValue(int value) {
            */
           @java.lang.Override
           public org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFunctionGraph.OptimizationSource getSource() {
    -        @SuppressWarnings("deprecation")
    -        org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFunctionGraph.OptimizationSource result = org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFunctionGraph.OptimizationSource.valueOf(source_);
    +        org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFunctionGraph.OptimizationSource result = org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFunctionGraph.OptimizationSource.forNumber(source_);
             return result == null ? org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFunctionGraph.OptimizationSource.UNRECOGNIZED : result;
           }
           /**
    @@ -2072,7 +2071,7 @@ public Builder setSource(org.tensorflow.proto.OptimizedFunctionGraphOuterClass.O
             if (value == null) {
               throw new NullPointerException();
             }
    -        bitField0_ |= 0x00000004;
    +        bitField0_ |= 0x00000020;
             source_ = value.getNumber();
             onChanged();
             return this;
    @@ -2086,7 +2085,7 @@ public Builder setSource(org.tensorflow.proto.OptimizedFunctionGraphOuterClass.O
            * @return This builder for chaining.
            */
           public Builder clearSource() {
    -        bitField0_ = (bitField0_ & ~0x00000004);
    +        bitField0_ = (bitField0_ & ~0x00000020);
             source_ = 0;
             onChanged();
             return this;
    @@ -2104,7 +2103,7 @@ public Builder clearSource() {
            */
           @java.lang.Override
           public boolean hasOptimizationTimeUsecs() {
    -        return ((bitField0_ & 0x00000008) != 0);
    +        return ((bitField0_ & 0x00000040) != 0);
           }
           /**
            * 
    @@ -2130,8 +2129,9 @@ public long getOptimizationTimeUsecs() {
            * @return This builder for chaining.
            */
           public Builder setOptimizationTimeUsecs(long value) {
    -        bitField0_ |= 0x00000008;
    +
             optimizationTimeUsecs_ = value;
    +        bitField0_ |= 0x00000040;
             onChanged();
             return this;
           }
    @@ -2145,23 +2145,11 @@ public Builder setOptimizationTimeUsecs(long value) {
            * @return This builder for chaining.
            */
           public Builder clearOptimizationTimeUsecs() {
    -        bitField0_ = (bitField0_ & ~0x00000008);
    +        bitField0_ = (bitField0_ & ~0x00000040);
             optimizationTimeUsecs_ = 0L;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.OptimizedFunctionGraph)
         }
    @@ -2217,12 +2205,12 @@ public org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFunctionGr
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_OptimizedFunctionGraph_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_OptimizedFunctionGraph_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_OptimizedFunctionGraph_NodeNameToControlRetEntry_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_OptimizedFunctionGraph_NodeNameToControlRetEntry_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -2261,15 +2249,16 @@ public org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFunctionGr
         internal_static_tensorflow_OptimizedFunctionGraph_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_OptimizedFunctionGraph_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_OptimizedFunctionGraph_descriptor,
    -        new java.lang.String[] { "Name", "FunctionGraph", "NodeNameToControlRet", "RetTypes", "NumReturnNodes", "Source", "OptimizationTimeUsecs", "Source", "OptimizationTimeUsecs", });
    +        new java.lang.String[] { "Name", "FunctionGraph", "NodeNameToControlRet", "RetTypes", "NumReturnNodes", "Source", "OptimizationTimeUsecs", });
         internal_static_tensorflow_OptimizedFunctionGraph_NodeNameToControlRetEntry_descriptor =
           internal_static_tensorflow_OptimizedFunctionGraph_descriptor.getNestedTypes().get(0);
         internal_static_tensorflow_OptimizedFunctionGraph_NodeNameToControlRetEntry_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_OptimizedFunctionGraph_NodeNameToControlRetEntry_descriptor,
             new java.lang.String[] { "Key", "Value", });
    +    descriptor.resolveAllFeaturesImmutable();
         org.tensorflow.proto.GraphProtos.getDescriptor();
         org.tensorflow.proto.TypesProtos.getDescriptor();
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OptimizerOptions.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OptimizerOptions.java
    index 3d35bce9caf..3db93f28f92 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OptimizerOptions.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OptimizerOptions.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/config.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,12 +13,21 @@
      * Protobuf type {@code tensorflow.OptimizerOptions}
      */
     public final class OptimizerOptions extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.OptimizerOptions)
         OptimizerOptionsOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      OptimizerOptions.class.getName());
    +  }
       // Use OptimizerOptions.newBuilder() to construct.
    -  private OptimizerOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private OptimizerOptions(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private OptimizerOptions() {
    @@ -24,25 +35,13 @@ private OptimizerOptions() {
         globalJitLevel_ = 0;
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new OptimizerOptions();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_OptimizerOptions_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_OptimizerOptions_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -80,6 +79,15 @@ public enum Level
         UNRECOGNIZED(-1),
         ;
     
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        Level.class.getName());
    +    }
         /**
          * 
          * L1 is the default level.
    @@ -222,6 +230,15 @@ public enum GlobalJitLevel
         UNRECOGNIZED(-1),
         ;
     
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        GlobalJitLevel.class.getName());
    +    }
         /**
          * 
          * Default setting ("off" now, but later expected to be "on")
    @@ -336,7 +353,7 @@ private GlobalJitLevel(int value) {
       }
     
       public static final int DO_COMMON_SUBEXPRESSION_ELIMINATION_FIELD_NUMBER = 1;
    -  private boolean doCommonSubexpressionElimination_;
    +  private boolean doCommonSubexpressionElimination_ = false;
       /**
        * 
        * If true, optimize the graph using common subexpression elimination.
    @@ -354,7 +371,7 @@ public boolean getDoCommonSubexpressionElimination() {
       }
     
       public static final int DO_CONSTANT_FOLDING_FIELD_NUMBER = 2;
    -  private boolean doConstantFolding_;
    +  private boolean doConstantFolding_ = false;
       /**
        * 
        * If true, perform constant folding optimization on the graph.
    @@ -371,7 +388,7 @@ public boolean getDoConstantFolding() {
       }
     
       public static final int MAX_FOLDED_CONSTANT_IN_BYTES_FIELD_NUMBER = 6;
    -  private long maxFoldedConstantInBytes_;
    +  private long maxFoldedConstantInBytes_ = 0L;
       /**
        * 
        * Constant folding optimization replaces tensors whose values can be
    @@ -390,7 +407,7 @@ public long getMaxFoldedConstantInBytes() {
       }
     
       public static final int DO_FUNCTION_INLINING_FIELD_NUMBER = 4;
    -  private boolean doFunctionInlining_;
    +  private boolean doFunctionInlining_ = false;
       /**
        * 
        * If true, perform function inlining on the graph.
    @@ -405,7 +422,7 @@ public boolean getDoFunctionInlining() {
       }
     
       public static final int OPT_LEVEL_FIELD_NUMBER = 3;
    -  private int optLevel_;
    +  private int optLevel_ = 0;
       /**
        * 
        * Overall optimization level. The actual optimizations applied will be the
    @@ -428,13 +445,12 @@ public boolean getDoFunctionInlining() {
        * @return The optLevel.
        */
       @java.lang.Override public org.tensorflow.proto.OptimizerOptions.Level getOptLevel() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.OptimizerOptions.Level result = org.tensorflow.proto.OptimizerOptions.Level.valueOf(optLevel_);
    +    org.tensorflow.proto.OptimizerOptions.Level result = org.tensorflow.proto.OptimizerOptions.Level.forNumber(optLevel_);
         return result == null ? org.tensorflow.proto.OptimizerOptions.Level.UNRECOGNIZED : result;
       }
     
       public static final int GLOBAL_JIT_LEVEL_FIELD_NUMBER = 5;
    -  private int globalJitLevel_;
    +  private int globalJitLevel_ = 0;
       /**
        * .tensorflow.OptimizerOptions.GlobalJitLevel global_jit_level = 5;
        * @return The enum numeric value on the wire for globalJitLevel.
    @@ -447,18 +463,17 @@ public boolean getDoFunctionInlining() {
        * @return The globalJitLevel.
        */
       @java.lang.Override public org.tensorflow.proto.OptimizerOptions.GlobalJitLevel getGlobalJitLevel() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.OptimizerOptions.GlobalJitLevel result = org.tensorflow.proto.OptimizerOptions.GlobalJitLevel.valueOf(globalJitLevel_);
    +    org.tensorflow.proto.OptimizerOptions.GlobalJitLevel result = org.tensorflow.proto.OptimizerOptions.GlobalJitLevel.forNumber(globalJitLevel_);
         return result == null ? org.tensorflow.proto.OptimizerOptions.GlobalJitLevel.UNRECOGNIZED : result;
       }
     
       public static final int CPU_GLOBAL_JIT_FIELD_NUMBER = 7;
    -  private boolean cpuGlobalJit_;
    +  private boolean cpuGlobalJit_ = false;
       /**
        * 
        * CPU code will be autoclustered only if global_jit_level >= ON_1 and either:
    -   *  - this flag is true, or
    -   *  - TF_XLA_FLAGS contains --tf_xla_cpu_global_jit=true.
    +   * - this flag is true, or
    +   * - TF_XLA_FLAGS contains --tf_xla_cpu_global_jit=true.
        * 
    * * bool cpu_global_jit = 7; @@ -637,39 +652,41 @@ public static org.tensorflow.proto.OptimizerOptions parseFrom( } public static org.tensorflow.proto.OptimizerOptions parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.OptimizerOptions parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.OptimizerOptions parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.OptimizerOptions parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.OptimizerOptions parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.OptimizerOptions parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -689,7 +706,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -701,7 +718,7 @@ protected Builder newBuilderForType( * Protobuf type {@code tensorflow.OptimizerOptions} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.OptimizerOptions) org.tensorflow.proto.OptimizerOptionsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -710,7 +727,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_OptimizerOptions_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -723,27 +740,21 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; doCommonSubexpressionElimination_ = false; - doConstantFolding_ = false; - maxFoldedConstantInBytes_ = 0L; - doFunctionInlining_ = false; - optLevel_ = 0; - globalJitLevel_ = 0; - cpuGlobalJit_ = false; - return this; } @@ -770,49 +781,36 @@ public org.tensorflow.proto.OptimizerOptions build() { @java.lang.Override public org.tensorflow.proto.OptimizerOptions buildPartial() { org.tensorflow.proto.OptimizerOptions result = new org.tensorflow.proto.OptimizerOptions(this); - result.doCommonSubexpressionElimination_ = doCommonSubexpressionElimination_; - result.doConstantFolding_ = doConstantFolding_; - result.maxFoldedConstantInBytes_ = maxFoldedConstantInBytes_; - result.doFunctionInlining_ = doFunctionInlining_; - result.optLevel_ = optLevel_; - result.globalJitLevel_ = globalJitLevel_; - result.cpuGlobalJit_ = cpuGlobalJit_; + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.OptimizerOptions result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.doCommonSubexpressionElimination_ = doCommonSubexpressionElimination_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.doConstantFolding_ = doConstantFolding_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.maxFoldedConstantInBytes_ = maxFoldedConstantInBytes_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.doFunctionInlining_ = doFunctionInlining_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.optLevel_ = optLevel_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.globalJitLevel_ = globalJitLevel_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.cpuGlobalJit_ = cpuGlobalJit_; + } } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.OptimizerOptions) { @@ -874,37 +872,37 @@ public Builder mergeFrom( break; case 8: { doCommonSubexpressionElimination_ = input.readBool(); - + bitField0_ |= 0x00000001; break; } // case 8 case 16: { doConstantFolding_ = input.readBool(); - + bitField0_ |= 0x00000002; break; } // case 16 case 24: { optLevel_ = input.readEnum(); - + bitField0_ |= 0x00000010; break; } // case 24 case 32: { doFunctionInlining_ = input.readBool(); - + bitField0_ |= 0x00000008; break; } // case 32 case 40: { globalJitLevel_ = input.readEnum(); - + bitField0_ |= 0x00000020; break; } // case 40 case 48: { maxFoldedConstantInBytes_ = input.readInt64(); - + bitField0_ |= 0x00000004; break; } // case 48 case 56: { cpuGlobalJit_ = input.readBool(); - + bitField0_ |= 0x00000040; break; } // case 56 default: { @@ -922,6 +920,7 @@ public Builder mergeFrom( } // finally return this; } + private int bitField0_; private boolean doCommonSubexpressionElimination_ ; /** @@ -952,8 +951,9 @@ public boolean getDoCommonSubexpressionElimination() { * @return This builder for chaining. */ public Builder setDoCommonSubexpressionElimination(boolean value) { - + doCommonSubexpressionElimination_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -969,7 +969,7 @@ public Builder setDoCommonSubexpressionElimination(boolean value) { * @return This builder for chaining. */ public Builder clearDoCommonSubexpressionElimination() { - + bitField0_ = (bitField0_ & ~0x00000001); doCommonSubexpressionElimination_ = false; onChanged(); return this; @@ -1002,8 +1002,9 @@ public boolean getDoConstantFolding() { * @return This builder for chaining. */ public Builder setDoConstantFolding(boolean value) { - + doConstantFolding_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -1018,7 +1019,7 @@ public Builder setDoConstantFolding(boolean value) { * @return This builder for chaining. */ public Builder clearDoConstantFolding() { - + bitField0_ = (bitField0_ & ~0x00000002); doConstantFolding_ = false; onChanged(); return this; @@ -1055,8 +1056,9 @@ public long getMaxFoldedConstantInBytes() { * @return This builder for chaining. */ public Builder setMaxFoldedConstantInBytes(long value) { - + maxFoldedConstantInBytes_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -1073,7 +1075,7 @@ public Builder setMaxFoldedConstantInBytes(long value) { * @return This builder for chaining. */ public Builder clearMaxFoldedConstantInBytes() { - + bitField0_ = (bitField0_ & ~0x00000004); maxFoldedConstantInBytes_ = 0L; onChanged(); return this; @@ -1102,8 +1104,9 @@ public boolean getDoFunctionInlining() { * @return This builder for chaining. */ public Builder setDoFunctionInlining(boolean value) { - + doFunctionInlining_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1116,7 +1119,7 @@ public Builder setDoFunctionInlining(boolean value) { * @return This builder for chaining. */ public Builder clearDoFunctionInlining() { - + bitField0_ = (bitField0_ & ~0x00000008); doFunctionInlining_ = false; onChanged(); return this; @@ -1146,8 +1149,8 @@ public Builder clearDoFunctionInlining() { * @return This builder for chaining. */ public Builder setOptLevelValue(int value) { - optLevel_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -1162,8 +1165,7 @@ public Builder setOptLevelValue(int value) { */ @java.lang.Override public org.tensorflow.proto.OptimizerOptions.Level getOptLevel() { - @SuppressWarnings("deprecation") - org.tensorflow.proto.OptimizerOptions.Level result = org.tensorflow.proto.OptimizerOptions.Level.valueOf(optLevel_); + org.tensorflow.proto.OptimizerOptions.Level result = org.tensorflow.proto.OptimizerOptions.Level.forNumber(optLevel_); return result == null ? org.tensorflow.proto.OptimizerOptions.Level.UNRECOGNIZED : result; } /** @@ -1180,7 +1182,7 @@ public Builder setOptLevel(org.tensorflow.proto.OptimizerOptions.Level value) { if (value == null) { throw new NullPointerException(); } - + bitField0_ |= 0x00000010; optLevel_ = value.getNumber(); onChanged(); return this; @@ -1195,7 +1197,7 @@ public Builder setOptLevel(org.tensorflow.proto.OptimizerOptions.Level value) { * @return This builder for chaining. */ public Builder clearOptLevel() { - + bitField0_ = (bitField0_ & ~0x00000010); optLevel_ = 0; onChanged(); return this; @@ -1215,8 +1217,8 @@ public Builder clearOptLevel() { * @return This builder for chaining. */ public Builder setGlobalJitLevelValue(int value) { - globalJitLevel_ = value; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -1226,8 +1228,7 @@ public Builder setGlobalJitLevelValue(int value) { */ @java.lang.Override public org.tensorflow.proto.OptimizerOptions.GlobalJitLevel getGlobalJitLevel() { - @SuppressWarnings("deprecation") - org.tensorflow.proto.OptimizerOptions.GlobalJitLevel result = org.tensorflow.proto.OptimizerOptions.GlobalJitLevel.valueOf(globalJitLevel_); + org.tensorflow.proto.OptimizerOptions.GlobalJitLevel result = org.tensorflow.proto.OptimizerOptions.GlobalJitLevel.forNumber(globalJitLevel_); return result == null ? org.tensorflow.proto.OptimizerOptions.GlobalJitLevel.UNRECOGNIZED : result; } /** @@ -1239,7 +1240,7 @@ public Builder setGlobalJitLevel(org.tensorflow.proto.OptimizerOptions.GlobalJit if (value == null) { throw new NullPointerException(); } - + bitField0_ |= 0x00000020; globalJitLevel_ = value.getNumber(); onChanged(); return this; @@ -1249,7 +1250,7 @@ public Builder setGlobalJitLevel(org.tensorflow.proto.OptimizerOptions.GlobalJit * @return This builder for chaining. */ public Builder clearGlobalJitLevel() { - + bitField0_ = (bitField0_ & ~0x00000020); globalJitLevel_ = 0; onChanged(); return this; @@ -1259,8 +1260,8 @@ public Builder clearGlobalJitLevel() { /** *
          * CPU code will be autoclustered only if global_jit_level >= ON_1 and either:
    -     *  - this flag is true, or
    -     *  - TF_XLA_FLAGS contains --tf_xla_cpu_global_jit=true.
    +     * - this flag is true, or
    +     * - TF_XLA_FLAGS contains --tf_xla_cpu_global_jit=true.
          * 
    * * bool cpu_global_jit = 7; @@ -1273,8 +1274,8 @@ public boolean getCpuGlobalJit() { /** *
          * CPU code will be autoclustered only if global_jit_level >= ON_1 and either:
    -     *  - this flag is true, or
    -     *  - TF_XLA_FLAGS contains --tf_xla_cpu_global_jit=true.
    +     * - this flag is true, or
    +     * - TF_XLA_FLAGS contains --tf_xla_cpu_global_jit=true.
          * 
    * * bool cpu_global_jit = 7; @@ -1282,39 +1283,28 @@ public boolean getCpuGlobalJit() { * @return This builder for chaining. */ public Builder setCpuGlobalJit(boolean value) { - + cpuGlobalJit_ = value; + bitField0_ |= 0x00000040; onChanged(); return this; } /** *
          * CPU code will be autoclustered only if global_jit_level >= ON_1 and either:
    -     *  - this flag is true, or
    -     *  - TF_XLA_FLAGS contains --tf_xla_cpu_global_jit=true.
    +     * - this flag is true, or
    +     * - TF_XLA_FLAGS contains --tf_xla_cpu_global_jit=true.
          * 
    * * bool cpu_global_jit = 7; * @return This builder for chaining. */ public Builder clearCpuGlobalJit() { - + bitField0_ = (bitField0_ & ~0x00000040); cpuGlobalJit_ = false; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.OptimizerOptions) } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OptimizerOptionsOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OptimizerOptionsOrBuilder.java index e2f0ecbcf88..0f08f0071ec 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OptimizerOptionsOrBuilder.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OptimizerOptionsOrBuilder.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/protobuf/config.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -91,8 +93,8 @@ public interface OptimizerOptionsOrBuilder extends /** *
        * CPU code will be autoclustered only if global_jit_level >= ON_1 and either:
    -   *  - this flag is true, or
    -   *  - TF_XLA_FLAGS contains --tf_xla_cpu_global_jit=true.
    +   * - this flag is true, or
    +   * - TF_XLA_FLAGS contains --tf_xla_cpu_global_jit=true.
        * 
    * * bool cpu_global_jit = 7; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/PlatformInfo.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/PlatformInfo.java index d2875cf5041..1f78bab992e 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/PlatformInfo.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/PlatformInfo.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: xla/tsl/protobuf/test_log.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -7,12 +9,21 @@ * Protobuf type {@code tensorflow.PlatformInfo} */ public final class PlatformInfo extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.PlatformInfo) PlatformInfoOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + PlatformInfo.class.getName()); + } // Use PlatformInfo.newBuilder() to construct. - private PlatformInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private PlatformInfo(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private PlatformInfo() { @@ -24,25 +35,13 @@ private PlatformInfo() { version_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PlatformInfo(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_PlatformInfo_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_PlatformInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -50,7 +49,8 @@ protected java.lang.Object newInstance( } public static final int BITS_FIELD_NUMBER = 1; - private volatile java.lang.Object bits_; + @SuppressWarnings("serial") + private volatile java.lang.Object bits_ = ""; /** *
        * e.g. '64bit'
    @@ -96,7 +96,8 @@ public java.lang.String getBits() {
       }
     
       public static final int LINKAGE_FIELD_NUMBER = 2;
    -  private volatile java.lang.Object linkage_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object linkage_ = "";
       /**
        * 
        * e.g. 'ELF'
    @@ -142,7 +143,8 @@ public java.lang.String getLinkage() {
       }
     
       public static final int MACHINE_FIELD_NUMBER = 3;
    -  private volatile java.lang.Object machine_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object machine_ = "";
       /**
        * 
        * e.g. 'i386'
    @@ -188,7 +190,8 @@ public java.lang.String getMachine() {
       }
     
       public static final int RELEASE_FIELD_NUMBER = 4;
    -  private volatile java.lang.Object release_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object release_ = "";
       /**
        * 
        * e.g. '3.13.0-76-generic'
    @@ -234,7 +237,8 @@ public java.lang.String getRelease() {
       }
     
       public static final int SYSTEM_FIELD_NUMBER = 5;
    -  private volatile java.lang.Object system_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object system_ = "";
       /**
        * 
        * e.g. 'Linux'
    @@ -280,7 +284,8 @@ public java.lang.String getSystem() {
       }
     
       public static final int VERSION_FIELD_NUMBER = 6;
    -  private volatile java.lang.Object version_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object version_ = "";
       /**
        * 
        * e.g. '#120-Ubuntu SMP Mon Jan 18 15:59:10 UTC 2016'
    @@ -339,23 +344,23 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bits_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, bits_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(bits_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, bits_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(linkage_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, linkage_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(linkage_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 2, linkage_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machine_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, machine_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(machine_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 3, machine_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(release_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, release_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(release_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 4, release_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(system_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, system_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(system_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 5, system_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, version_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(version_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 6, version_);
         }
         getUnknownFields().writeTo(output);
       }
    @@ -366,23 +371,23 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bits_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, bits_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(bits_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, bits_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(linkage_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, linkage_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(linkage_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(2, linkage_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machine_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, machine_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(machine_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(3, machine_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(release_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, release_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(release_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(4, release_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(system_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, system_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(system_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(5, system_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, version_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(version_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(6, version_);
         }
         size += getUnknownFields().getSerializedSize();
         memoizedSize = size;
    @@ -473,39 +478,41 @@ public static org.tensorflow.proto.PlatformInfo parseFrom(
       }
       public static org.tensorflow.proto.PlatformInfo parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.PlatformInfo parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.PlatformInfo parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.PlatformInfo parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.PlatformInfo parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.PlatformInfo parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -525,7 +532,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -533,7 +540,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.PlatformInfo}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.PlatformInfo)
           org.tensorflow.proto.PlatformInfoOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -542,7 +549,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_PlatformInfo_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -555,25 +562,20 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           bits_ = "";
    -
           linkage_ = "";
    -
           machine_ = "";
    -
           release_ = "";
    -
           system_ = "";
    -
           version_ = "";
    -
           return this;
         }
     
    @@ -600,48 +602,33 @@ public org.tensorflow.proto.PlatformInfo build() {
         @java.lang.Override
         public org.tensorflow.proto.PlatformInfo buildPartial() {
           org.tensorflow.proto.PlatformInfo result = new org.tensorflow.proto.PlatformInfo(this);
    -      result.bits_ = bits_;
    -      result.linkage_ = linkage_;
    -      result.machine_ = machine_;
    -      result.release_ = release_;
    -      result.system_ = system_;
    -      result.version_ = version_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.PlatformInfo result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.bits_ = bits_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.linkage_ = linkage_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.machine_ = machine_;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.release_ = release_;
    +      }
    +      if (((from_bitField0_ & 0x00000010) != 0)) {
    +        result.system_ = system_;
    +      }
    +      if (((from_bitField0_ & 0x00000020) != 0)) {
    +        result.version_ = version_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.PlatformInfo) {
    @@ -656,26 +643,32 @@ public Builder mergeFrom(org.tensorflow.proto.PlatformInfo other) {
           if (other == org.tensorflow.proto.PlatformInfo.getDefaultInstance()) return this;
           if (!other.getBits().isEmpty()) {
             bits_ = other.bits_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (!other.getLinkage().isEmpty()) {
             linkage_ = other.linkage_;
    +        bitField0_ |= 0x00000002;
             onChanged();
           }
           if (!other.getMachine().isEmpty()) {
             machine_ = other.machine_;
    +        bitField0_ |= 0x00000004;
             onChanged();
           }
           if (!other.getRelease().isEmpty()) {
             release_ = other.release_;
    +        bitField0_ |= 0x00000008;
             onChanged();
           }
           if (!other.getSystem().isEmpty()) {
             system_ = other.system_;
    +        bitField0_ |= 0x00000010;
             onChanged();
           }
           if (!other.getVersion().isEmpty()) {
             version_ = other.version_;
    +        bitField0_ |= 0x00000020;
             onChanged();
           }
           this.mergeUnknownFields(other.getUnknownFields());
    @@ -706,32 +699,32 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   bits_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
                   linkage_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 case 26: {
                   machine_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 26
                 case 34: {
                   release_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 34
                 case 42: {
                   system_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000010;
                   break;
                 } // case 42
                 case 50: {
                   version_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000020;
                   break;
                 } // case 50
                 default: {
    @@ -749,6 +742,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private java.lang.Object bits_ = "";
         /**
    @@ -803,11 +797,9 @@ public java.lang.String getBits() {
          */
         public Builder setBits(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           bits_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -820,8 +812,8 @@ public Builder setBits(
          * @return This builder for chaining.
          */
         public Builder clearBits() {
    -      
           bits_ = getDefaultInstance().getBits();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -836,12 +828,10 @@ public Builder clearBits() {
          */
         public Builder setBitsBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           bits_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -899,11 +889,9 @@ public java.lang.String getLinkage() {
          */
         public Builder setLinkage(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           linkage_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -916,8 +904,8 @@ public Builder setLinkage(
          * @return This builder for chaining.
          */
         public Builder clearLinkage() {
    -      
           linkage_ = getDefaultInstance().getLinkage();
    +      bitField0_ = (bitField0_ & ~0x00000002);
           onChanged();
           return this;
         }
    @@ -932,12 +920,10 @@ public Builder clearLinkage() {
          */
         public Builder setLinkageBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           linkage_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -995,11 +981,9 @@ public java.lang.String getMachine() {
          */
         public Builder setMachine(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           machine_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -1012,8 +996,8 @@ public Builder setMachine(
          * @return This builder for chaining.
          */
         public Builder clearMachine() {
    -      
           machine_ = getDefaultInstance().getMachine();
    +      bitField0_ = (bitField0_ & ~0x00000004);
           onChanged();
           return this;
         }
    @@ -1028,12 +1012,10 @@ public Builder clearMachine() {
          */
         public Builder setMachineBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           machine_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -1091,11 +1073,9 @@ public java.lang.String getRelease() {
          */
         public Builder setRelease(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           release_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -1108,8 +1088,8 @@ public Builder setRelease(
          * @return This builder for chaining.
          */
         public Builder clearRelease() {
    -      
           release_ = getDefaultInstance().getRelease();
    +      bitField0_ = (bitField0_ & ~0x00000008);
           onChanged();
           return this;
         }
    @@ -1124,12 +1104,10 @@ public Builder clearRelease() {
          */
         public Builder setReleaseBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           release_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -1187,11 +1165,9 @@ public java.lang.String getSystem() {
          */
         public Builder setSystem(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           system_ = value;
    +      bitField0_ |= 0x00000010;
           onChanged();
           return this;
         }
    @@ -1204,8 +1180,8 @@ public Builder setSystem(
          * @return This builder for chaining.
          */
         public Builder clearSystem() {
    -      
           system_ = getDefaultInstance().getSystem();
    +      bitField0_ = (bitField0_ & ~0x00000010);
           onChanged();
           return this;
         }
    @@ -1220,12 +1196,10 @@ public Builder clearSystem() {
          */
         public Builder setSystemBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           system_ = value;
    +      bitField0_ |= 0x00000010;
           onChanged();
           return this;
         }
    @@ -1283,11 +1257,9 @@ public java.lang.String getVersion() {
          */
         public Builder setVersion(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           version_ = value;
    +      bitField0_ |= 0x00000020;
           onChanged();
           return this;
         }
    @@ -1300,8 +1272,8 @@ public Builder setVersion(
          * @return This builder for chaining.
          */
         public Builder clearVersion() {
    -      
           version_ = getDefaultInstance().getVersion();
    +      bitField0_ = (bitField0_ & ~0x00000020);
           onChanged();
           return this;
         }
    @@ -1316,27 +1288,13 @@ public Builder clearVersion() {
          */
         public Builder setVersionBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           version_ = value;
    +      bitField0_ |= 0x00000020;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.PlatformInfo)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/PlatformInfoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/PlatformInfoOrBuilder.java
    index caade7d2f32..28ee5913d54 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/PlatformInfoOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/PlatformInfoOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: xla/tsl/protobuf/test_log.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ProfilerOptions.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ProfilerOptions.java
    index 0f0507070a7..aaf846a8472 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ProfilerOptions.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ProfilerOptions.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tsl/profiler/protobuf/profiler_options.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class ProfilerOptions {
       private ProfilerOptions() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      ProfilerOptions.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -76,12 +87,12 @@ public interface ProfileOptionsOrBuilder extends
          * 
          * Levels of host tracing: (version >= 1)
          * - Level 0 is used to disable host traces.
    -     * - Level 1 enables tracing of only user instrumented (or default) TraceMe.
    +     * - Level 1 enables tracing of only user instrumented (or default) TraceMe,
    +     * this is the default.
          * - Level 2 enables tracing of all level 1 TraceMe(s) and instrumented high
    -     *           level program execution details (expensive TF ops, XLA ops, etc).
    -     *           This is the default.
    +     * level program execution details (expensive TF ops, XLA ops, etc).
          * - Level 3 enables tracing of all level 2 TraceMe(s) and more verbose
    -     *           (low-level) program execution details (cheap TF ops, etc).
    +     * (low-level) program execution details (cheap TF ops, etc).
          * 
    * * uint32 host_tracer_level = 2; @@ -95,7 +106,7 @@ public interface ProfileOptionsOrBuilder extends * - Level 0 is used to disable device traces. * - Level 1 is used to enable device traces. * - More levels might be defined for specific device for controlling the - * verbosity of the trace. + * verbosity of the trace. *
    * * uint32 device_tracer_level = 3; @@ -164,21 +175,145 @@ public interface ProfileOptionsOrBuilder extends */ com.google.protobuf.ByteString getRepositoryPathBytes(); + + /** + * .tensorflow.ProfileOptions.TraceOptions trace_options = 11; + * @return Whether the traceOptions field is set. + */ + boolean hasTraceOptions(); + /** + * .tensorflow.ProfileOptions.TraceOptions trace_options = 11; + * @return The traceOptions. + */ + org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions getTraceOptions(); + /** + * .tensorflow.ProfileOptions.TraceOptions trace_options = 11; + */ + org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptionsOrBuilder getTraceOptionsOrBuilder(); + + /** + *
    +     * Advanced configuration for the profiler contains a map of config name to
    +     * config value. It gives the flexibility to pass any configuration to the
    +     * profiler. eg:
    +     * advanced_configuration {
    +     * key: "tpu_trace_mode"
    +     * value: {
    +     * int64_value: 2
    +     * }
    +     * }
    +     * 
    + * + * map<string, .tensorflow.ProfileOptions.AdvancedConfigValue> advanced_configuration = 12; + */ + int getAdvancedConfigurationCount(); + /** + *
    +     * Advanced configuration for the profiler contains a map of config name to
    +     * config value. It gives the flexibility to pass any configuration to the
    +     * profiler. eg:
    +     * advanced_configuration {
    +     * key: "tpu_trace_mode"
    +     * value: {
    +     * int64_value: 2
    +     * }
    +     * }
    +     * 
    + * + * map<string, .tensorflow.ProfileOptions.AdvancedConfigValue> advanced_configuration = 12; + */ + boolean containsAdvancedConfiguration( + java.lang.String key); + /** + * Use {@link #getAdvancedConfigurationMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getAdvancedConfiguration(); + /** + *
    +     * Advanced configuration for the profiler contains a map of config name to
    +     * config value. It gives the flexibility to pass any configuration to the
    +     * profiler. eg:
    +     * advanced_configuration {
    +     * key: "tpu_trace_mode"
    +     * value: {
    +     * int64_value: 2
    +     * }
    +     * }
    +     * 
    + * + * map<string, .tensorflow.ProfileOptions.AdvancedConfigValue> advanced_configuration = 12; + */ + java.util.Map + getAdvancedConfigurationMap(); + /** + *
    +     * Advanced configuration for the profiler contains a map of config name to
    +     * config value. It gives the flexibility to pass any configuration to the
    +     * profiler. eg:
    +     * advanced_configuration {
    +     * key: "tpu_trace_mode"
    +     * value: {
    +     * int64_value: 2
    +     * }
    +     * }
    +     * 
    + * + * map<string, .tensorflow.ProfileOptions.AdvancedConfigValue> advanced_configuration = 12; + */ + /* nullable */ +org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue getAdvancedConfigurationOrDefault( + java.lang.String key, + /* nullable */ +org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue defaultValue); + /** + *
    +     * Advanced configuration for the profiler contains a map of config name to
    +     * config value. It gives the flexibility to pass any configuration to the
    +     * profiler. eg:
    +     * advanced_configuration {
    +     * key: "tpu_trace_mode"
    +     * value: {
    +     * int64_value: 2
    +     * }
    +     * }
    +     * 
    + * + * map<string, .tensorflow.ProfileOptions.AdvancedConfigValue> advanced_configuration = 12; + */ + org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue getAdvancedConfigurationOrThrow( + java.lang.String key); + + /** + * bool raise_error_on_start_failure = 13; + * @return The raiseErrorOnStartFailure. + */ + boolean getRaiseErrorOnStartFailure(); } /** *
    -   * Next ID: 11
    +   * Next ID: 14
        * 
    * * Protobuf type {@code tensorflow.ProfileOptions} */ public static final class ProfileOptions extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.ProfileOptions) ProfileOptionsOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + ProfileOptions.class.getName()); + } // Use ProfileOptions.newBuilder() to construct. - private ProfileOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ProfileOptions(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private ProfileOptions() { @@ -186,25 +321,25 @@ private ProfileOptions() { repositoryPath_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ProfileOptions(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.ProfilerOptions.internal_static_tensorflow_ProfileOptions_descriptor; } + @SuppressWarnings({"rawtypes"}) @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 12: + return internalGetAdvancedConfiguration(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.ProfilerOptions.internal_static_tensorflow_ProfileOptions_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -239,6 +374,15 @@ public enum DeviceType UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + DeviceType.class.getName()); + } /** * UNSPECIFIED = 0; */ @@ -261,93 +405,1409 @@ public enum DeviceType public static final int PLUGGABLE_DEVICE_VALUE = 4; - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DeviceType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DeviceType forNumber(int value) { + switch (value) { + case 0: return UNSPECIFIED; + case 1: return CPU; + case 2: return GPU; + case 3: return TPU; + case 4: return PLUGGABLE_DEVICE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + DeviceType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DeviceType findValueByNumber(int number) { + return DeviceType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return org.tensorflow.proto.ProfilerOptions.ProfileOptions.getDescriptor().getEnumTypes().get(0); + } + + private static final DeviceType[] VALUES = values(); + + public static DeviceType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DeviceType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:tensorflow.ProfileOptions.DeviceType) + } + + public interface TraceOptionsOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.ProfileOptions.TraceOptions) + com.google.protobuf.MessageOrBuilder { + + /** + *
    +       * Filter mask for TraceMe events. If the traceme_filter_mask is set, a
    +       * TraceMe event will be recorded if it passes the filter.
    +       * Only lowest 32 bits of the mask are used. The higher 32 bits are reserved
    +       * and won't be applied if set.
    +       * 
    + * + * uint64 host_traceme_filter_mask = 1; + * @return The hostTracemeFilterMask. + */ + long getHostTracemeFilterMask(); + } + /** + * Protobuf type {@code tensorflow.ProfileOptions.TraceOptions} + */ + public static final class TraceOptions extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:tensorflow.ProfileOptions.TraceOptions) + TraceOptionsOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + TraceOptions.class.getName()); + } + // Use TraceOptions.newBuilder() to construct. + private TraceOptions(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private TraceOptions() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.ProfilerOptions.internal_static_tensorflow_ProfileOptions_TraceOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.ProfilerOptions.internal_static_tensorflow_ProfileOptions_TraceOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions.class, org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions.Builder.class); + } + + public static final int HOST_TRACEME_FILTER_MASK_FIELD_NUMBER = 1; + private long hostTracemeFilterMask_ = 0L; + /** + *
    +       * Filter mask for TraceMe events. If the traceme_filter_mask is set, a
    +       * TraceMe event will be recorded if it passes the filter.
    +       * Only lowest 32 bits of the mask are used. The higher 32 bits are reserved
    +       * and won't be applied if set.
    +       * 
    + * + * uint64 host_traceme_filter_mask = 1; + * @return The hostTracemeFilterMask. + */ + @java.lang.Override + public long getHostTracemeFilterMask() { + return hostTracemeFilterMask_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (hostTracemeFilterMask_ != 0L) { + output.writeUInt64(1, hostTracemeFilterMask_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (hostTracemeFilterMask_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, hostTracemeFilterMask_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions)) { + return super.equals(obj); + } + org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions other = (org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions) obj; + + if (getHostTracemeFilterMask() + != other.getHostTracemeFilterMask()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HOST_TRACEME_FILTER_MASK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getHostTracemeFilterMask()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tensorflow.ProfileOptions.TraceOptions} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.ProfileOptions.TraceOptions) + org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.ProfilerOptions.internal_static_tensorflow_ProfileOptions_TraceOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.ProfilerOptions.internal_static_tensorflow_ProfileOptions_TraceOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions.class, org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions.Builder.class); + } + + // Construct using org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + hostTracemeFilterMask_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.ProfilerOptions.internal_static_tensorflow_ProfileOptions_TraceOptions_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions getDefaultInstanceForType() { + return org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions build() { + org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions buildPartial() { + org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions result = new org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.hostTracemeFilterMask_ = hostTracemeFilterMask_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions) { + return mergeFrom((org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions other) { + if (other == org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions.getDefaultInstance()) return this; + if (other.getHostTracemeFilterMask() != 0L) { + setHostTracemeFilterMask(other.getHostTracemeFilterMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + hostTracemeFilterMask_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long hostTracemeFilterMask_ ; + /** + *
    +         * Filter mask for TraceMe events. If the traceme_filter_mask is set, a
    +         * TraceMe event will be recorded if it passes the filter.
    +         * Only lowest 32 bits of the mask are used. The higher 32 bits are reserved
    +         * and won't be applied if set.
    +         * 
    + * + * uint64 host_traceme_filter_mask = 1; + * @return The hostTracemeFilterMask. + */ + @java.lang.Override + public long getHostTracemeFilterMask() { + return hostTracemeFilterMask_; + } + /** + *
    +         * Filter mask for TraceMe events. If the traceme_filter_mask is set, a
    +         * TraceMe event will be recorded if it passes the filter.
    +         * Only lowest 32 bits of the mask are used. The higher 32 bits are reserved
    +         * and won't be applied if set.
    +         * 
    + * + * uint64 host_traceme_filter_mask = 1; + * @param value The hostTracemeFilterMask to set. + * @return This builder for chaining. + */ + public Builder setHostTracemeFilterMask(long value) { + + hostTracemeFilterMask_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
    +         * Filter mask for TraceMe events. If the traceme_filter_mask is set, a
    +         * TraceMe event will be recorded if it passes the filter.
    +         * Only lowest 32 bits of the mask are used. The higher 32 bits are reserved
    +         * and won't be applied if set.
    +         * 
    + * + * uint64 host_traceme_filter_mask = 1; + * @return This builder for chaining. + */ + public Builder clearHostTracemeFilterMask() { + bitField0_ = (bitField0_ & ~0x00000001); + hostTracemeFilterMask_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:tensorflow.ProfileOptions.TraceOptions) + } + + // @@protoc_insertion_point(class_scope:tensorflow.ProfileOptions.TraceOptions) + private static final org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions(); + } + + public static org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TraceOptions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface AdvancedConfigValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:tensorflow.ProfileOptions.AdvancedConfigValue) + com.google.protobuf.MessageOrBuilder { + + /** + * string string_value = 1; + * @return Whether the stringValue field is set. + */ + boolean hasStringValue(); + /** + * string string_value = 1; + * @return The stringValue. + */ + java.lang.String getStringValue(); + /** + * string string_value = 1; + * @return The bytes for stringValue. + */ + com.google.protobuf.ByteString + getStringValueBytes(); + + /** + * bool bool_value = 2; + * @return Whether the boolValue field is set. + */ + boolean hasBoolValue(); + /** + * bool bool_value = 2; + * @return The boolValue. + */ + boolean getBoolValue(); + + /** + * int64 int64_value = 3; + * @return Whether the int64Value field is set. + */ + boolean hasInt64Value(); + /** + * int64 int64_value = 3; + * @return The int64Value. + */ + long getInt64Value(); + + org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue.ValueCase getValueCase(); + } + /** + *
    +     * AdvancedConfigValue represents the configuration value, it can be one of
    +     * the following types: string, bool, int64, depending upon the config type.
    +     * 
    + * + * Protobuf type {@code tensorflow.ProfileOptions.AdvancedConfigValue} + */ + public static final class AdvancedConfigValue extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:tensorflow.ProfileOptions.AdvancedConfigValue) + AdvancedConfigValueOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + AdvancedConfigValue.class.getName()); + } + // Use AdvancedConfigValue.newBuilder() to construct. + private AdvancedConfigValue(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private AdvancedConfigValue() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.ProfilerOptions.internal_static_tensorflow_ProfileOptions_AdvancedConfigValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.ProfilerOptions.internal_static_tensorflow_ProfileOptions_AdvancedConfigValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue.class, org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue.Builder.class); + } + + private int valueCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object value_; + public enum ValueCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + STRING_VALUE(1), + BOOL_VALUE(2), + INT64_VALUE(3), + VALUE_NOT_SET(0); + private final int value; + private ValueCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ValueCase valueOf(int value) { + return forNumber(value); + } + + public static ValueCase forNumber(int value) { + switch (value) { + case 1: return STRING_VALUE; + case 2: return BOOL_VALUE; + case 3: return INT64_VALUE; + case 0: return VALUE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ValueCase + getValueCase() { + return ValueCase.forNumber( + valueCase_); + } + + public static final int STRING_VALUE_FIELD_NUMBER = 1; + /** + * string string_value = 1; + * @return Whether the stringValue field is set. + */ + public boolean hasStringValue() { + return valueCase_ == 1; + } + /** + * string string_value = 1; + * @return The stringValue. + */ + public java.lang.String getStringValue() { + java.lang.Object ref = ""; + if (valueCase_ == 1) { + ref = value_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (valueCase_ == 1) { + value_ = s; + } + return s; + } + } + /** + * string string_value = 1; + * @return The bytes for stringValue. + */ + public com.google.protobuf.ByteString + getStringValueBytes() { + java.lang.Object ref = ""; + if (valueCase_ == 1) { + ref = value_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (valueCase_ == 1) { + value_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BOOL_VALUE_FIELD_NUMBER = 2; + /** + * bool bool_value = 2; + * @return Whether the boolValue field is set. + */ + @java.lang.Override + public boolean hasBoolValue() { + return valueCase_ == 2; + } + /** + * bool bool_value = 2; + * @return The boolValue. + */ + @java.lang.Override + public boolean getBoolValue() { + if (valueCase_ == 2) { + return (java.lang.Boolean) value_; + } + return false; + } + + public static final int INT64_VALUE_FIELD_NUMBER = 3; + /** + * int64 int64_value = 3; + * @return Whether the int64Value field is set. + */ + @java.lang.Override + public boolean hasInt64Value() { + return valueCase_ == 3; + } + /** + * int64 int64_value = 3; + * @return The int64Value. + */ + @java.lang.Override + public long getInt64Value() { + if (valueCase_ == 3) { + return (java.lang.Long) value_; + } + return 0L; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (valueCase_ == 1) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, value_); + } + if (valueCase_ == 2) { + output.writeBool( + 2, (boolean)((java.lang.Boolean) value_)); + } + if (valueCase_ == 3) { + output.writeInt64( + 3, (long)((java.lang.Long) value_)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (valueCase_ == 1) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, value_); + } + if (valueCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize( + 2, (boolean)((java.lang.Boolean) value_)); + } + if (valueCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size( + 3, (long)((java.lang.Long) value_)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue)) { + return super.equals(obj); + } + org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue other = (org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue) obj; + + if (!getValueCase().equals(other.getValueCase())) return false; + switch (valueCase_) { + case 1: + if (!getStringValue() + .equals(other.getStringValue())) return false; + break; + case 2: + if (getBoolValue() + != other.getBoolValue()) return false; + break; + case 3: + if (getInt64Value() + != other.getInt64Value()) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (valueCase_) { + case 1: + hash = (37 * hash) + STRING_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getStringValue().hashCode(); + break; + case 2: + hash = (37 * hash) + BOOL_VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getBoolValue()); + break; + case 3: + hash = (37 * hash) + INT64_VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getInt64Value()); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
    +       * AdvancedConfigValue represents the configuration value, it can be one of
    +       * the following types: string, bool, int64, depending upon the config type.
    +       * 
    + * + * Protobuf type {@code tensorflow.ProfileOptions.AdvancedConfigValue} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:tensorflow.ProfileOptions.AdvancedConfigValue) + org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.tensorflow.proto.ProfilerOptions.internal_static_tensorflow_ProfileOptions_AdvancedConfigValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.tensorflow.proto.ProfilerOptions.internal_static_tensorflow_ProfileOptions_AdvancedConfigValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue.class, org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue.Builder.class); + } + + // Construct using org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + valueCase_ = 0; + value_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.tensorflow.proto.ProfilerOptions.internal_static_tensorflow_ProfileOptions_AdvancedConfigValue_descriptor; + } + + @java.lang.Override + public org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue getDefaultInstanceForType() { + return org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue.getDefaultInstance(); + } + + @java.lang.Override + public org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue build() { + org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue buildPartial() { + org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue result = new org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue result) { + result.valueCase_ = valueCase_; + result.value_ = this.value_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue) { + return mergeFrom((org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue other) { + if (other == org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue.getDefaultInstance()) return this; + switch (other.getValueCase()) { + case STRING_VALUE: { + valueCase_ = 1; + value_ = other.value_; + onChanged(); + break; + } + case BOOL_VALUE: { + setBoolValue(other.getBoolValue()); + break; + } + case INT64_VALUE: { + setInt64Value(other.getInt64Value()); + break; + } + case VALUE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; } - return value; - } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static DeviceType valueOf(int value) { - return forNumber(value); - } + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + valueCase_ = 1; + value_ = s; + break; + } // case 10 + case 16: { + value_ = input.readBool(); + valueCase_ = 2; + break; + } // case 16 + case 24: { + value_ = input.readInt64(); + valueCase_ = 3; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int valueCase_ = 0; + private java.lang.Object value_; + public ValueCase + getValueCase() { + return ValueCase.forNumber( + valueCase_); + } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static DeviceType forNumber(int value) { - switch (value) { - case 0: return UNSPECIFIED; - case 1: return CPU; - case 2: return GPU; - case 3: return TPU; - case 4: return PLUGGABLE_DEVICE; - default: return null; + public Builder clearValue() { + valueCase_ = 0; + value_ = null; + onChanged(); + return this; } - } - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - DeviceType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public DeviceType findValueByNumber(int number) { - return DeviceType.forNumber(number); - } - }; + private int bitField0_; - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); + /** + * string string_value = 1; + * @return Whether the stringValue field is set. + */ + @java.lang.Override + public boolean hasStringValue() { + return valueCase_ == 1; } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); + /** + * string string_value = 1; + * @return The stringValue. + */ + @java.lang.Override + public java.lang.String getStringValue() { + java.lang.Object ref = ""; + if (valueCase_ == 1) { + ref = value_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (valueCase_ == 1) { + value_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string string_value = 1; + * @return The bytes for stringValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getStringValueBytes() { + java.lang.Object ref = ""; + if (valueCase_ == 1) { + ref = value_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (valueCase_ == 1) { + value_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string string_value = 1; + * @param value The stringValue to set. + * @return This builder for chaining. + */ + public Builder setStringValue( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + valueCase_ = 1; + value_ = value; + onChanged(); + return this; + } + /** + * string string_value = 1; + * @return This builder for chaining. + */ + public Builder clearStringValue() { + if (valueCase_ == 1) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + /** + * string string_value = 1; + * @param value The bytes for stringValue to set. + * @return This builder for chaining. + */ + public Builder setStringValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + valueCase_ = 1; + value_ = value; + onChanged(); + return this; + } + + /** + * bool bool_value = 2; + * @return Whether the boolValue field is set. + */ + public boolean hasBoolValue() { + return valueCase_ == 2; + } + /** + * bool bool_value = 2; + * @return The boolValue. + */ + public boolean getBoolValue() { + if (valueCase_ == 2) { + return (java.lang.Boolean) value_; + } + return false; + } + /** + * bool bool_value = 2; + * @param value The boolValue to set. + * @return This builder for chaining. + */ + public Builder setBoolValue(boolean value) { + + valueCase_ = 2; + value_ = value; + onChanged(); + return this; + } + /** + * bool bool_value = 2; + * @return This builder for chaining. + */ + public Builder clearBoolValue() { + if (valueCase_ == 2) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + /** + * int64 int64_value = 3; + * @return Whether the int64Value field is set. + */ + public boolean hasInt64Value() { + return valueCase_ == 3; + } + /** + * int64 int64_value = 3; + * @return The int64Value. + */ + public long getInt64Value() { + if (valueCase_ == 3) { + return (java.lang.Long) value_; + } + return 0L; + } + /** + * int64 int64_value = 3; + * @param value The int64Value to set. + * @return This builder for chaining. + */ + public Builder setInt64Value(long value) { + + valueCase_ = 3; + value_ = value; + onChanged(); + return this; + } + /** + * int64 int64_value = 3; + * @return This builder for chaining. + */ + public Builder clearInt64Value() { + if (valueCase_ == 3) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + // @@protoc_insertion_point(builder_scope:tensorflow.ProfileOptions.AdvancedConfigValue) } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return org.tensorflow.proto.ProfilerOptions.ProfileOptions.getDescriptor().getEnumTypes().get(0); + + // @@protoc_insertion_point(class_scope:tensorflow.ProfileOptions.AdvancedConfigValue) + private static final org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue(); } - private static final DeviceType[] VALUES = values(); + public static org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } - public static DeviceType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AdvancedConfigValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } - return VALUES[desc.getIndex()]; + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; } - private final int value; + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - private DeviceType(int value) { - this.value = value; + @java.lang.Override + public org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(enum_scope:tensorflow.ProfileOptions.DeviceType) } + private int bitField0_; public static final int VERSION_FIELD_NUMBER = 5; - private int version_; + private int version_ = 0; /** *
          * Some default value of option are not proto3 default value. Use this version
    @@ -364,7 +1824,7 @@ public int getVersion() {
         }
     
         public static final int DEVICE_TYPE_FIELD_NUMBER = 6;
    -    private int deviceType_;
    +    private int deviceType_ = 0;
         /**
          * 
          * Device type to profile/trace: (version >= 1)
    @@ -397,13 +1857,12 @@ public int getVersion() {
          * @return The deviceType.
          */
         @java.lang.Override public org.tensorflow.proto.ProfilerOptions.ProfileOptions.DeviceType getDeviceType() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.ProfilerOptions.ProfileOptions.DeviceType result = org.tensorflow.proto.ProfilerOptions.ProfileOptions.DeviceType.valueOf(deviceType_);
    +      org.tensorflow.proto.ProfilerOptions.ProfileOptions.DeviceType result = org.tensorflow.proto.ProfilerOptions.ProfileOptions.DeviceType.forNumber(deviceType_);
           return result == null ? org.tensorflow.proto.ProfilerOptions.ProfileOptions.DeviceType.UNRECOGNIZED : result;
         }
     
         public static final int INCLUDE_DATASET_OPS_FIELD_NUMBER = 1;
    -    private boolean includeDatasetOps_;
    +    private boolean includeDatasetOps_ = false;
         /**
          * 
          * We don't collect the dataset ops by default for better trace-viewer
    @@ -419,17 +1878,17 @@ public boolean getIncludeDatasetOps() {
         }
     
         public static final int HOST_TRACER_LEVEL_FIELD_NUMBER = 2;
    -    private int hostTracerLevel_;
    +    private int hostTracerLevel_ = 0;
         /**
          * 
          * Levels of host tracing: (version >= 1)
          * - Level 0 is used to disable host traces.
    -     * - Level 1 enables tracing of only user instrumented (or default) TraceMe.
    +     * - Level 1 enables tracing of only user instrumented (or default) TraceMe,
    +     * this is the default.
          * - Level 2 enables tracing of all level 1 TraceMe(s) and instrumented high
    -     *           level program execution details (expensive TF ops, XLA ops, etc).
    -     *           This is the default.
    +     * level program execution details (expensive TF ops, XLA ops, etc).
          * - Level 3 enables tracing of all level 2 TraceMe(s) and more verbose
    -     *           (low-level) program execution details (cheap TF ops, etc).
    +     * (low-level) program execution details (cheap TF ops, etc).
          * 
    * * uint32 host_tracer_level = 2; @@ -441,14 +1900,14 @@ public int getHostTracerLevel() { } public static final int DEVICE_TRACER_LEVEL_FIELD_NUMBER = 3; - private int deviceTracerLevel_; + private int deviceTracerLevel_ = 0; /** *
          * Levels of device tracing: (version >= 1)
          * - Level 0 is used to disable device traces.
          * - Level 1 is used to enable device traces.
          * - More levels might be defined for specific device for controlling the
    -     *   verbosity of the trace.
    +     * verbosity of the trace.
          * 
    * * uint32 device_tracer_level = 3; @@ -460,7 +1919,7 @@ public int getDeviceTracerLevel() { } public static final int PYTHON_TRACER_LEVEL_FIELD_NUMBER = 4; - private int pythonTracerLevel_; + private int pythonTracerLevel_ = 0; /** *
          * Whether enable python function calls tracing. Runtime overhead ensues if
    @@ -476,7 +1935,7 @@ public int getPythonTracerLevel() {
         }
     
         public static final int ENABLE_HLO_PROTO_FIELD_NUMBER = 7;
    -    private boolean enableHloProto_;
    +    private boolean enableHloProto_ = false;
         /**
          * 
          * Whether serialize hlo_proto when XLA is used. (version >= 1)
    @@ -491,7 +1950,7 @@ public boolean getEnableHloProto() {
         }
     
         public static final int START_TIMESTAMP_NS_FIELD_NUMBER = 8;
    -    private long startTimestampNs_;
    +    private long startTimestampNs_ = 0L;
         /**
          * 
          * The local profiler starts profiling at this Unix timestamp in nanoseconds.
    @@ -506,7 +1965,7 @@ public long getStartTimestampNs() {
         }
     
         public static final int DURATION_MS_FIELD_NUMBER = 9;
    -    private long durationMs_;
    +    private long durationMs_ = 0L;
         /**
          * 
          * The local profiler collects `duration_ms` milliseconds of data. If the
    @@ -522,7 +1981,8 @@ public long getDurationMs() {
         }
     
         public static final int REPOSITORY_PATH_FIELD_NUMBER = 10;
    -    private volatile java.lang.Object repositoryPath_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object repositoryPath_ = "";
         /**
          * 
          * Directory to save profile data to. No-op when empty.
    @@ -567,6 +2027,170 @@ public java.lang.String getRepositoryPath() {
           }
         }
     
    +    public static final int TRACE_OPTIONS_FIELD_NUMBER = 11;
    +    private org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions traceOptions_;
    +    /**
    +     * .tensorflow.ProfileOptions.TraceOptions trace_options = 11;
    +     * @return Whether the traceOptions field is set.
    +     */
    +    @java.lang.Override
    +    public boolean hasTraceOptions() {
    +      return ((bitField0_ & 0x00000001) != 0);
    +    }
    +    /**
    +     * .tensorflow.ProfileOptions.TraceOptions trace_options = 11;
    +     * @return The traceOptions.
    +     */
    +    @java.lang.Override
    +    public org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions getTraceOptions() {
    +      return traceOptions_ == null ? org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions.getDefaultInstance() : traceOptions_;
    +    }
    +    /**
    +     * .tensorflow.ProfileOptions.TraceOptions trace_options = 11;
    +     */
    +    @java.lang.Override
    +    public org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptionsOrBuilder getTraceOptionsOrBuilder() {
    +      return traceOptions_ == null ? org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions.getDefaultInstance() : traceOptions_;
    +    }
    +
    +    public static final int ADVANCED_CONFIGURATION_FIELD_NUMBER = 12;
    +    private static final class AdvancedConfigurationDefaultEntryHolder {
    +      static final com.google.protobuf.MapEntry<
    +          java.lang.String, org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue> defaultEntry =
    +              com.google.protobuf.MapEntry
    +              .newDefaultInstance(
    +                  org.tensorflow.proto.ProfilerOptions.internal_static_tensorflow_ProfileOptions_AdvancedConfigurationEntry_descriptor, 
    +                  com.google.protobuf.WireFormat.FieldType.STRING,
    +                  "",
    +                  com.google.protobuf.WireFormat.FieldType.MESSAGE,
    +                  org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue.getDefaultInstance());
    +    }
    +    @SuppressWarnings("serial")
    +    private com.google.protobuf.MapField<
    +        java.lang.String, org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue> advancedConfiguration_;
    +    private com.google.protobuf.MapField
    +    internalGetAdvancedConfiguration() {
    +      if (advancedConfiguration_ == null) {
    +        return com.google.protobuf.MapField.emptyMapField(
    +            AdvancedConfigurationDefaultEntryHolder.defaultEntry);
    +      }
    +      return advancedConfiguration_;
    +    }
    +    public int getAdvancedConfigurationCount() {
    +      return internalGetAdvancedConfiguration().getMap().size();
    +    }
    +    /**
    +     * 
    +     * Advanced configuration for the profiler contains a map of config name to
    +     * config value. It gives the flexibility to pass any configuration to the
    +     * profiler. eg:
    +     * advanced_configuration {
    +     * key: "tpu_trace_mode"
    +     * value: {
    +     * int64_value: 2
    +     * }
    +     * }
    +     * 
    + * + * map<string, .tensorflow.ProfileOptions.AdvancedConfigValue> advanced_configuration = 12; + */ + @java.lang.Override + public boolean containsAdvancedConfiguration( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetAdvancedConfiguration().getMap().containsKey(key); + } + /** + * Use {@link #getAdvancedConfigurationMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAdvancedConfiguration() { + return getAdvancedConfigurationMap(); + } + /** + *
    +     * Advanced configuration for the profiler contains a map of config name to
    +     * config value. It gives the flexibility to pass any configuration to the
    +     * profiler. eg:
    +     * advanced_configuration {
    +     * key: "tpu_trace_mode"
    +     * value: {
    +     * int64_value: 2
    +     * }
    +     * }
    +     * 
    + * + * map<string, .tensorflow.ProfileOptions.AdvancedConfigValue> advanced_configuration = 12; + */ + @java.lang.Override + public java.util.Map getAdvancedConfigurationMap() { + return internalGetAdvancedConfiguration().getMap(); + } + /** + *
    +     * Advanced configuration for the profiler contains a map of config name to
    +     * config value. It gives the flexibility to pass any configuration to the
    +     * profiler. eg:
    +     * advanced_configuration {
    +     * key: "tpu_trace_mode"
    +     * value: {
    +     * int64_value: 2
    +     * }
    +     * }
    +     * 
    + * + * map<string, .tensorflow.ProfileOptions.AdvancedConfigValue> advanced_configuration = 12; + */ + @java.lang.Override + public /* nullable */ +org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue getAdvancedConfigurationOrDefault( + java.lang.String key, + /* nullable */ +org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetAdvancedConfiguration().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
    +     * Advanced configuration for the profiler contains a map of config name to
    +     * config value. It gives the flexibility to pass any configuration to the
    +     * profiler. eg:
    +     * advanced_configuration {
    +     * key: "tpu_trace_mode"
    +     * value: {
    +     * int64_value: 2
    +     * }
    +     * }
    +     * 
    + * + * map<string, .tensorflow.ProfileOptions.AdvancedConfigValue> advanced_configuration = 12; + */ + @java.lang.Override + public org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue getAdvancedConfigurationOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetAdvancedConfiguration().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int RAISE_ERROR_ON_START_FAILURE_FIELD_NUMBER = 13; + private boolean raiseErrorOnStartFailure_ = false; + /** + * bool raise_error_on_start_failure = 13; + * @return The raiseErrorOnStartFailure. + */ + @java.lang.Override + public boolean getRaiseErrorOnStartFailure() { + return raiseErrorOnStartFailure_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -608,8 +2232,20 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (durationMs_ != 0L) { output.writeUInt64(9, durationMs_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(repositoryPath_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 10, repositoryPath_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(repositoryPath_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 10, repositoryPath_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(11, getTraceOptions()); + } + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetAdvancedConfiguration(), + AdvancedConfigurationDefaultEntryHolder.defaultEntry, + 12); + if (raiseErrorOnStartFailure_ != false) { + output.writeBool(13, raiseErrorOnStartFailure_); } getUnknownFields().writeTo(output); } @@ -656,8 +2292,26 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(9, durationMs_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(repositoryPath_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, repositoryPath_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(repositoryPath_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(10, repositoryPath_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, getTraceOptions()); + } + for (java.util.Map.Entry entry + : internalGetAdvancedConfiguration().getMap().entrySet()) { + com.google.protobuf.MapEntry + advancedConfiguration__ = AdvancedConfigurationDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, advancedConfiguration__); + } + if (raiseErrorOnStartFailure_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(13, raiseErrorOnStartFailure_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -693,6 +2347,15 @@ public boolean equals(final java.lang.Object obj) { != other.getDurationMs()) return false; if (!getRepositoryPath() .equals(other.getRepositoryPath())) return false; + if (hasTraceOptions() != other.hasTraceOptions()) return false; + if (hasTraceOptions()) { + if (!getTraceOptions() + .equals(other.getTraceOptions())) return false; + } + if (!internalGetAdvancedConfiguration().equals( + other.internalGetAdvancedConfiguration())) return false; + if (getRaiseErrorOnStartFailure() + != other.getRaiseErrorOnStartFailure()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -728,6 +2391,17 @@ public int hashCode() { getDurationMs()); hash = (37 * hash) + REPOSITORY_PATH_FIELD_NUMBER; hash = (53 * hash) + getRepositoryPath().hashCode(); + if (hasTraceOptions()) { + hash = (37 * hash) + TRACE_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getTraceOptions().hashCode(); + } + if (!internalGetAdvancedConfiguration().getMap().isEmpty()) { + hash = (37 * hash) + ADVANCED_CONFIGURATION_FIELD_NUMBER; + hash = (53 * hash) + internalGetAdvancedConfiguration().hashCode(); + } + hash = (37 * hash) + RAISE_ERROR_ON_START_FAILURE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getRaiseErrorOnStartFailure()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -767,39 +2441,41 @@ public static org.tensorflow.proto.ProfilerOptions.ProfileOptions parseFrom( } public static org.tensorflow.proto.ProfilerOptions.ProfileOptions parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.ProfilerOptions.ProfileOptions parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.ProfilerOptions.ProfileOptions parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.ProfilerOptions.ProfileOptions parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.ProfilerOptions.ProfileOptions parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.ProfilerOptions.ProfileOptions parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -819,19 +2495,19 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
    -     * Next ID: 11
    +     * Next ID: 14
          * 
    * * Protobuf type {@code tensorflow.ProfileOptions} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.ProfileOptions) org.tensorflow.proto.ProfilerOptions.ProfileOptionsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -839,8 +2515,30 @@ public static final class Builder extends return org.tensorflow.proto.ProfilerOptions.internal_static_tensorflow_ProfileOptions_descriptor; } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 12: + return internalGetAdvancedConfiguration(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 12: + return internalGetMutableAdvancedConfiguration(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.ProfilerOptions.internal_static_tensorflow_ProfileOptions_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -849,37 +2547,41 @@ public static final class Builder extends // Construct using org.tensorflow.proto.ProfilerOptions.ProfileOptions.newBuilder() private Builder() { - + maybeForceBuilderInitialization(); } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getTraceOptionsFieldBuilder(); + } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; version_ = 0; - deviceType_ = 0; - includeDatasetOps_ = false; - hostTracerLevel_ = 0; - deviceTracerLevel_ = 0; - pythonTracerLevel_ = 0; - enableHloProto_ = false; - startTimestampNs_ = 0L; - durationMs_ = 0L; - repositoryPath_ = ""; - + traceOptions_ = null; + if (traceOptionsBuilder_ != null) { + traceOptionsBuilder_.dispose(); + traceOptionsBuilder_ = null; + } + internalGetMutableAdvancedConfiguration().clear(); + raiseErrorOnStartFailure_ = false; return this; } @@ -906,52 +2608,59 @@ public org.tensorflow.proto.ProfilerOptions.ProfileOptions build() { @java.lang.Override public org.tensorflow.proto.ProfilerOptions.ProfileOptions buildPartial() { org.tensorflow.proto.ProfilerOptions.ProfileOptions result = new org.tensorflow.proto.ProfilerOptions.ProfileOptions(this); - result.version_ = version_; - result.deviceType_ = deviceType_; - result.includeDatasetOps_ = includeDatasetOps_; - result.hostTracerLevel_ = hostTracerLevel_; - result.deviceTracerLevel_ = deviceTracerLevel_; - result.pythonTracerLevel_ = pythonTracerLevel_; - result.enableHloProto_ = enableHloProto_; - result.startTimestampNs_ = startTimestampNs_; - result.durationMs_ = durationMs_; - result.repositoryPath_ = repositoryPath_; + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.ProfilerOptions.ProfileOptions result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.version_ = version_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.deviceType_ = deviceType_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.includeDatasetOps_ = includeDatasetOps_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.hostTracerLevel_ = hostTracerLevel_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.deviceTracerLevel_ = deviceTracerLevel_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.pythonTracerLevel_ = pythonTracerLevel_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.enableHloProto_ = enableHloProto_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.startTimestampNs_ = startTimestampNs_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.durationMs_ = durationMs_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.repositoryPath_ = repositoryPath_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000400) != 0)) { + result.traceOptions_ = traceOptionsBuilder_ == null + ? traceOptions_ + : traceOptionsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.advancedConfiguration_ = internalGetAdvancedConfiguration().build(AdvancedConfigurationDefaultEntryHolder.defaultEntry); + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.raiseErrorOnStartFailure_ = raiseErrorOnStartFailure_; + } + result.bitField0_ |= to_bitField0_; } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.ProfilerOptions.ProfileOptions) { @@ -993,8 +2702,18 @@ public Builder mergeFrom(org.tensorflow.proto.ProfilerOptions.ProfileOptions oth } if (!other.getRepositoryPath().isEmpty()) { repositoryPath_ = other.repositoryPath_; + bitField0_ |= 0x00000200; onChanged(); } + if (other.hasTraceOptions()) { + mergeTraceOptions(other.getTraceOptions()); + } + internalGetMutableAdvancedConfiguration().mergeFrom( + other.internalGetAdvancedConfiguration()); + bitField0_ |= 0x00000800; + if (other.getRaiseErrorOnStartFailure() != false) { + setRaiseErrorOnStartFailure(other.getRaiseErrorOnStartFailure()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1023,54 +2742,75 @@ public Builder mergeFrom( break; case 8: { includeDatasetOps_ = input.readBool(); - + bitField0_ |= 0x00000004; break; } // case 8 case 16: { hostTracerLevel_ = input.readUInt32(); - + bitField0_ |= 0x00000008; break; } // case 16 case 24: { deviceTracerLevel_ = input.readUInt32(); - + bitField0_ |= 0x00000010; break; } // case 24 case 32: { pythonTracerLevel_ = input.readUInt32(); - + bitField0_ |= 0x00000020; break; } // case 32 case 40: { version_ = input.readUInt32(); - + bitField0_ |= 0x00000001; break; } // case 40 case 48: { deviceType_ = input.readEnum(); - + bitField0_ |= 0x00000002; break; } // case 48 case 56: { enableHloProto_ = input.readBool(); - + bitField0_ |= 0x00000040; break; } // case 56 case 64: { startTimestampNs_ = input.readUInt64(); - + bitField0_ |= 0x00000080; break; } // case 64 case 72: { durationMs_ = input.readUInt64(); - + bitField0_ |= 0x00000100; break; } // case 72 case 82: { repositoryPath_ = input.readStringRequireUtf8(); - + bitField0_ |= 0x00000200; break; } // case 82 + case 90: { + input.readMessage( + getTraceOptionsFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 90 + case 98: { + com.google.protobuf.MapEntry + advancedConfiguration__ = input.readMessage( + AdvancedConfigurationDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableAdvancedConfiguration().ensureBuilderMap().put( + advancedConfiguration__.getKey(), advancedConfiguration__.getValue()); + bitField0_ |= 0x00000800; + break; + } // case 98 + case 104: { + raiseErrorOnStartFailure_ = input.readBool(); + bitField0_ |= 0x00001000; + break; + } // case 104 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -1086,6 +2826,7 @@ public Builder mergeFrom( } // finally return this; } + private int bitField0_; private int version_ ; /** @@ -1114,8 +2855,9 @@ public int getVersion() { * @return This builder for chaining. */ public Builder setVersion(int value) { - + version_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -1130,7 +2872,7 @@ public Builder setVersion(int value) { * @return This builder for chaining. */ public Builder clearVersion() { - + bitField0_ = (bitField0_ & ~0x00000001); version_ = 0; onChanged(); return this; @@ -1170,8 +2912,8 @@ public Builder clearVersion() { * @return This builder for chaining. */ public Builder setDeviceTypeValue(int value) { - deviceType_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -1191,8 +2933,7 @@ public Builder setDeviceTypeValue(int value) { */ @java.lang.Override public org.tensorflow.proto.ProfilerOptions.ProfileOptions.DeviceType getDeviceType() { - @SuppressWarnings("deprecation") - org.tensorflow.proto.ProfilerOptions.ProfileOptions.DeviceType result = org.tensorflow.proto.ProfilerOptions.ProfileOptions.DeviceType.valueOf(deviceType_); + org.tensorflow.proto.ProfilerOptions.ProfileOptions.DeviceType result = org.tensorflow.proto.ProfilerOptions.ProfileOptions.DeviceType.forNumber(deviceType_); return result == null ? org.tensorflow.proto.ProfilerOptions.ProfileOptions.DeviceType.UNRECOGNIZED : result; } /** @@ -1214,7 +2955,7 @@ public Builder setDeviceType(org.tensorflow.proto.ProfilerOptions.ProfileOptions if (value == null) { throw new NullPointerException(); } - + bitField0_ |= 0x00000002; deviceType_ = value.getNumber(); onChanged(); return this; @@ -1234,7 +2975,7 @@ public Builder setDeviceType(org.tensorflow.proto.ProfilerOptions.ProfileOptions * @return This builder for chaining. */ public Builder clearDeviceType() { - + bitField0_ = (bitField0_ & ~0x00000002); deviceType_ = 0; onChanged(); return this; @@ -1265,8 +3006,9 @@ public boolean getIncludeDatasetOps() { * @return This builder for chaining. */ public Builder setIncludeDatasetOps(boolean value) { - + includeDatasetOps_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -1280,7 +3022,7 @@ public Builder setIncludeDatasetOps(boolean value) { * @return This builder for chaining. */ public Builder clearIncludeDatasetOps() { - + bitField0_ = (bitField0_ & ~0x00000004); includeDatasetOps_ = false; onChanged(); return this; @@ -1291,12 +3033,12 @@ public Builder clearIncludeDatasetOps() { *
            * Levels of host tracing: (version >= 1)
            * - Level 0 is used to disable host traces.
    -       * - Level 1 enables tracing of only user instrumented (or default) TraceMe.
    +       * - Level 1 enables tracing of only user instrumented (or default) TraceMe,
    +       * this is the default.
            * - Level 2 enables tracing of all level 1 TraceMe(s) and instrumented high
    -       *           level program execution details (expensive TF ops, XLA ops, etc).
    -       *           This is the default.
    +       * level program execution details (expensive TF ops, XLA ops, etc).
            * - Level 3 enables tracing of all level 2 TraceMe(s) and more verbose
    -       *           (low-level) program execution details (cheap TF ops, etc).
    +       * (low-level) program execution details (cheap TF ops, etc).
            * 
    * * uint32 host_tracer_level = 2; @@ -1310,12 +3052,12 @@ public int getHostTracerLevel() { *
            * Levels of host tracing: (version >= 1)
            * - Level 0 is used to disable host traces.
    -       * - Level 1 enables tracing of only user instrumented (or default) TraceMe.
    +       * - Level 1 enables tracing of only user instrumented (or default) TraceMe,
    +       * this is the default.
            * - Level 2 enables tracing of all level 1 TraceMe(s) and instrumented high
    -       *           level program execution details (expensive TF ops, XLA ops, etc).
    -       *           This is the default.
    +       * level program execution details (expensive TF ops, XLA ops, etc).
            * - Level 3 enables tracing of all level 2 TraceMe(s) and more verbose
    -       *           (low-level) program execution details (cheap TF ops, etc).
    +       * (low-level) program execution details (cheap TF ops, etc).
            * 
    * * uint32 host_tracer_level = 2; @@ -1323,8 +3065,9 @@ public int getHostTracerLevel() { * @return This builder for chaining. */ public Builder setHostTracerLevel(int value) { - + hostTracerLevel_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1332,19 +3075,19 @@ public Builder setHostTracerLevel(int value) { *
            * Levels of host tracing: (version >= 1)
            * - Level 0 is used to disable host traces.
    -       * - Level 1 enables tracing of only user instrumented (or default) TraceMe.
    +       * - Level 1 enables tracing of only user instrumented (or default) TraceMe,
    +       * this is the default.
            * - Level 2 enables tracing of all level 1 TraceMe(s) and instrumented high
    -       *           level program execution details (expensive TF ops, XLA ops, etc).
    -       *           This is the default.
    +       * level program execution details (expensive TF ops, XLA ops, etc).
            * - Level 3 enables tracing of all level 2 TraceMe(s) and more verbose
    -       *           (low-level) program execution details (cheap TF ops, etc).
    +       * (low-level) program execution details (cheap TF ops, etc).
            * 
    * * uint32 host_tracer_level = 2; * @return This builder for chaining. */ public Builder clearHostTracerLevel() { - + bitField0_ = (bitField0_ & ~0x00000008); hostTracerLevel_ = 0; onChanged(); return this; @@ -1357,7 +3100,7 @@ public Builder clearHostTracerLevel() { * - Level 0 is used to disable device traces. * - Level 1 is used to enable device traces. * - More levels might be defined for specific device for controlling the - * verbosity of the trace. + * verbosity of the trace. *
    * * uint32 device_tracer_level = 3; @@ -1373,7 +3116,7 @@ public int getDeviceTracerLevel() { * - Level 0 is used to disable device traces. * - Level 1 is used to enable device traces. * - More levels might be defined for specific device for controlling the - * verbosity of the trace. + * verbosity of the trace. *
    * * uint32 device_tracer_level = 3; @@ -1381,8 +3124,9 @@ public int getDeviceTracerLevel() { * @return This builder for chaining. */ public Builder setDeviceTracerLevel(int value) { - + deviceTracerLevel_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -1392,14 +3136,14 @@ public Builder setDeviceTracerLevel(int value) { * - Level 0 is used to disable device traces. * - Level 1 is used to enable device traces. * - More levels might be defined for specific device for controlling the - * verbosity of the trace. + * verbosity of the trace. *
    * * uint32 device_tracer_level = 3; * @return This builder for chaining. */ public Builder clearDeviceTracerLevel() { - + bitField0_ = (bitField0_ & ~0x00000010); deviceTracerLevel_ = 0; onChanged(); return this; @@ -1430,8 +3174,9 @@ public int getPythonTracerLevel() { * @return This builder for chaining. */ public Builder setPythonTracerLevel(int value) { - + pythonTracerLevel_ = value; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -1445,7 +3190,7 @@ public Builder setPythonTracerLevel(int value) { * @return This builder for chaining. */ public Builder clearPythonTracerLevel() { - + bitField0_ = (bitField0_ & ~0x00000020); pythonTracerLevel_ = 0; onChanged(); return this; @@ -1474,8 +3219,9 @@ public boolean getEnableHloProto() { * @return This builder for chaining. */ public Builder setEnableHloProto(boolean value) { - + enableHloProto_ = value; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -1488,7 +3234,7 @@ public Builder setEnableHloProto(boolean value) { * @return This builder for chaining. */ public Builder clearEnableHloProto() { - + bitField0_ = (bitField0_ & ~0x00000040); enableHloProto_ = false; onChanged(); return this; @@ -1517,8 +3263,9 @@ public long getStartTimestampNs() { * @return This builder for chaining. */ public Builder setStartTimestampNs(long value) { - + startTimestampNs_ = value; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -1531,7 +3278,7 @@ public Builder setStartTimestampNs(long value) { * @return This builder for chaining. */ public Builder clearStartTimestampNs() { - + bitField0_ = (bitField0_ & ~0x00000080); startTimestampNs_ = 0L; onChanged(); return this; @@ -1562,8 +3309,9 @@ public long getDurationMs() { * @return This builder for chaining. */ public Builder setDurationMs(long value) { - + durationMs_ = value; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -1577,7 +3325,7 @@ public Builder setDurationMs(long value) { * @return This builder for chaining. */ public Builder clearDurationMs() { - + bitField0_ = (bitField0_ & ~0x00000100); durationMs_ = 0L; onChanged(); return this; @@ -1636,11 +3384,9 @@ public java.lang.String getRepositoryPath() { */ public Builder setRepositoryPath( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } repositoryPath_ = value; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -1653,8 +3399,8 @@ public Builder setRepositoryPath( * @return This builder for chaining. */ public Builder clearRepositoryPath() { - repositoryPath_ = getDefaultInstance().getRepositoryPath(); + bitField0_ = (bitField0_ & ~0x00000200); onChanged(); return this; } @@ -1669,27 +3415,417 @@ public Builder clearRepositoryPath() { */ public Builder setRepositoryPathBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); repositoryPath_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions traceOptions_; + private com.google.protobuf.SingleFieldBuilder< + org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions, org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions.Builder, org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptionsOrBuilder> traceOptionsBuilder_; + /** + * .tensorflow.ProfileOptions.TraceOptions trace_options = 11; + * @return Whether the traceOptions field is set. + */ + public boolean hasTraceOptions() { + return ((bitField0_ & 0x00000400) != 0); + } + /** + * .tensorflow.ProfileOptions.TraceOptions trace_options = 11; + * @return The traceOptions. + */ + public org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions getTraceOptions() { + if (traceOptionsBuilder_ == null) { + return traceOptions_ == null ? org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions.getDefaultInstance() : traceOptions_; + } else { + return traceOptionsBuilder_.getMessage(); + } + } + /** + * .tensorflow.ProfileOptions.TraceOptions trace_options = 11; + */ + public Builder setTraceOptions(org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions value) { + if (traceOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + traceOptions_ = value; + } else { + traceOptionsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * .tensorflow.ProfileOptions.TraceOptions trace_options = 11; + */ + public Builder setTraceOptions( + org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions.Builder builderForValue) { + if (traceOptionsBuilder_ == null) { + traceOptions_ = builderForValue.build(); + } else { + traceOptionsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * .tensorflow.ProfileOptions.TraceOptions trace_options = 11; + */ + public Builder mergeTraceOptions(org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions value) { + if (traceOptionsBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) && + traceOptions_ != null && + traceOptions_ != org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions.getDefaultInstance()) { + getTraceOptionsBuilder().mergeFrom(value); + } else { + traceOptions_ = value; + } + } else { + traceOptionsBuilder_.mergeFrom(value); + } + if (traceOptions_ != null) { + bitField0_ |= 0x00000400; + onChanged(); + } + return this; + } + /** + * .tensorflow.ProfileOptions.TraceOptions trace_options = 11; + */ + public Builder clearTraceOptions() { + bitField0_ = (bitField0_ & ~0x00000400); + traceOptions_ = null; + if (traceOptionsBuilder_ != null) { + traceOptionsBuilder_.dispose(); + traceOptionsBuilder_ = null; + } onChanged(); return this; } + /** + * .tensorflow.ProfileOptions.TraceOptions trace_options = 11; + */ + public org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions.Builder getTraceOptionsBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return getTraceOptionsFieldBuilder().getBuilder(); + } + /** + * .tensorflow.ProfileOptions.TraceOptions trace_options = 11; + */ + public org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptionsOrBuilder getTraceOptionsOrBuilder() { + if (traceOptionsBuilder_ != null) { + return traceOptionsBuilder_.getMessageOrBuilder(); + } else { + return traceOptions_ == null ? + org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions.getDefaultInstance() : traceOptions_; + } + } + /** + * .tensorflow.ProfileOptions.TraceOptions trace_options = 11; + */ + private com.google.protobuf.SingleFieldBuilder< + org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions, org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions.Builder, org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptionsOrBuilder> + getTraceOptionsFieldBuilder() { + if (traceOptionsBuilder_ == null) { + traceOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder< + org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions, org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions.Builder, org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptionsOrBuilder>( + getTraceOptions(), + getParentForChildren(), + isClean()); + traceOptions_ = null; + } + return traceOptionsBuilder_; + } + + private static final class AdvancedConfigurationConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue build(org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValueOrBuilder val) { + if (val instanceof org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue) { return (org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue) val; } + return ((org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return AdvancedConfigurationDefaultEntryHolder.defaultEntry; + } + }; + private static final AdvancedConfigurationConverter advancedConfigurationConverter = new AdvancedConfigurationConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValueOrBuilder, org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue, org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue.Builder> advancedConfiguration_; + private com.google.protobuf.MapFieldBuilder + internalGetAdvancedConfiguration() { + if (advancedConfiguration_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(advancedConfigurationConverter); + } + return advancedConfiguration_; + } + private com.google.protobuf.MapFieldBuilder + internalGetMutableAdvancedConfiguration() { + if (advancedConfiguration_ == null) { + advancedConfiguration_ = new com.google.protobuf.MapFieldBuilder<>(advancedConfigurationConverter); + } + bitField0_ |= 0x00000800; + onChanged(); + return advancedConfiguration_; + } + public int getAdvancedConfigurationCount() { + return internalGetAdvancedConfiguration().ensureBuilderMap().size(); + } + /** + *
    +       * Advanced configuration for the profiler contains a map of config name to
    +       * config value. It gives the flexibility to pass any configuration to the
    +       * profiler. eg:
    +       * advanced_configuration {
    +       * key: "tpu_trace_mode"
    +       * value: {
    +       * int64_value: 2
    +       * }
    +       * }
    +       * 
    + * + * map<string, .tensorflow.ProfileOptions.AdvancedConfigValue> advanced_configuration = 12; + */ + @java.lang.Override + public boolean containsAdvancedConfiguration( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetAdvancedConfiguration().ensureBuilderMap().containsKey(key); + } + /** + * Use {@link #getAdvancedConfigurationMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAdvancedConfiguration() { + return getAdvancedConfigurationMap(); + } + /** + *
    +       * Advanced configuration for the profiler contains a map of config name to
    +       * config value. It gives the flexibility to pass any configuration to the
    +       * profiler. eg:
    +       * advanced_configuration {
    +       * key: "tpu_trace_mode"
    +       * value: {
    +       * int64_value: 2
    +       * }
    +       * }
    +       * 
    + * + * map<string, .tensorflow.ProfileOptions.AdvancedConfigValue> advanced_configuration = 12; + */ + @java.lang.Override + public java.util.Map getAdvancedConfigurationMap() { + return internalGetAdvancedConfiguration().getImmutableMap(); + } + /** + *
    +       * Advanced configuration for the profiler contains a map of config name to
    +       * config value. It gives the flexibility to pass any configuration to the
    +       * profiler. eg:
    +       * advanced_configuration {
    +       * key: "tpu_trace_mode"
    +       * value: {
    +       * int64_value: 2
    +       * }
    +       * }
    +       * 
    + * + * map<string, .tensorflow.ProfileOptions.AdvancedConfigValue> advanced_configuration = 12; + */ + @java.lang.Override + public /* nullable */ +org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue getAdvancedConfigurationOrDefault( + java.lang.String key, + /* nullable */ +org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableAdvancedConfiguration().ensureBuilderMap(); + return map.containsKey(key) ? advancedConfigurationConverter.build(map.get(key)) : defaultValue; + } + /** + *
    +       * Advanced configuration for the profiler contains a map of config name to
    +       * config value. It gives the flexibility to pass any configuration to the
    +       * profiler. eg:
    +       * advanced_configuration {
    +       * key: "tpu_trace_mode"
    +       * value: {
    +       * int64_value: 2
    +       * }
    +       * }
    +       * 
    + * + * map<string, .tensorflow.ProfileOptions.AdvancedConfigValue> advanced_configuration = 12; + */ @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + public org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue getAdvancedConfigurationOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableAdvancedConfiguration().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return advancedConfigurationConverter.build(map.get(key)); + } + public Builder clearAdvancedConfiguration() { + bitField0_ = (bitField0_ & ~0x00000800); + internalGetMutableAdvancedConfiguration().clear(); + return this; + } + /** + *
    +       * Advanced configuration for the profiler contains a map of config name to
    +       * config value. It gives the flexibility to pass any configuration to the
    +       * profiler. eg:
    +       * advanced_configuration {
    +       * key: "tpu_trace_mode"
    +       * value: {
    +       * int64_value: 2
    +       * }
    +       * }
    +       * 
    + * + * map<string, .tensorflow.ProfileOptions.AdvancedConfigValue> advanced_configuration = 12; + */ + public Builder removeAdvancedConfiguration( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableAdvancedConfiguration().ensureBuilderMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableAdvancedConfiguration() { + bitField0_ |= 0x00000800; + return internalGetMutableAdvancedConfiguration().ensureMessageMap(); + } + /** + *
    +       * Advanced configuration for the profiler contains a map of config name to
    +       * config value. It gives the flexibility to pass any configuration to the
    +       * profiler. eg:
    +       * advanced_configuration {
    +       * key: "tpu_trace_mode"
    +       * value: {
    +       * int64_value: 2
    +       * }
    +       * }
    +       * 
    + * + * map<string, .tensorflow.ProfileOptions.AdvancedConfigValue> advanced_configuration = 12; + */ + public Builder putAdvancedConfiguration( + java.lang.String key, + org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableAdvancedConfiguration().ensureBuilderMap() + .put(key, value); + bitField0_ |= 0x00000800; + return this; + } + /** + *
    +       * Advanced configuration for the profiler contains a map of config name to
    +       * config value. It gives the flexibility to pass any configuration to the
    +       * profiler. eg:
    +       * advanced_configuration {
    +       * key: "tpu_trace_mode"
    +       * value: {
    +       * int64_value: 2
    +       * }
    +       * }
    +       * 
    + * + * map<string, .tensorflow.ProfileOptions.AdvancedConfigValue> advanced_configuration = 12; + */ + public Builder putAllAdvancedConfiguration( + java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableAdvancedConfiguration().ensureBuilderMap() + .putAll(values); + bitField0_ |= 0x00000800; + return this; + } + /** + *
    +       * Advanced configuration for the profiler contains a map of config name to
    +       * config value. It gives the flexibility to pass any configuration to the
    +       * profiler. eg:
    +       * advanced_configuration {
    +       * key: "tpu_trace_mode"
    +       * value: {
    +       * int64_value: 2
    +       * }
    +       * }
    +       * 
    + * + * map<string, .tensorflow.ProfileOptions.AdvancedConfigValue> advanced_configuration = 12; + */ + public org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue.Builder putAdvancedConfigurationBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableAdvancedConfiguration().ensureBuilderMap(); + org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValueOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue) { + entry = ((org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue) entry).toBuilder(); + builderMap.put(key, entry); + } + return (org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue.Builder) entry; } + private boolean raiseErrorOnStartFailure_ ; + /** + * bool raise_error_on_start_failure = 13; + * @return The raiseErrorOnStartFailure. + */ @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + public boolean getRaiseErrorOnStartFailure() { + return raiseErrorOnStartFailure_; } + /** + * bool raise_error_on_start_failure = 13; + * @param value The raiseErrorOnStartFailure to set. + * @return This builder for chaining. + */ + public Builder setRaiseErrorOnStartFailure(boolean value) { + raiseErrorOnStartFailure_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * bool raise_error_on_start_failure = 13; + * @return This builder for chaining. + */ + public Builder clearRaiseErrorOnStartFailure() { + bitField0_ = (bitField0_ & ~0x00001000); + raiseErrorOnStartFailure_ = false; + onChanged(); + return this; + } // @@protoc_insertion_point(builder_scope:tensorflow.ProfileOptions) } @@ -1856,43 +3992,42 @@ public interface RemoteProfilerSessionManagerOptionsOrBuilder extends * Protobuf type {@code tensorflow.RemoteProfilerSessionManagerOptions} */ public static final class RemoteProfilerSessionManagerOptions extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.RemoteProfilerSessionManagerOptions) RemoteProfilerSessionManagerOptionsOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + RemoteProfilerSessionManagerOptions.class.getName()); + } // Use RemoteProfilerSessionManagerOptions.newBuilder() to construct. - private RemoteProfilerSessionManagerOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private RemoteProfilerSessionManagerOptions(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private RemoteProfilerSessionManagerOptions() { - serviceAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RemoteProfilerSessionManagerOptions(); + serviceAddresses_ = + com.google.protobuf.LazyStringArrayList.emptyList(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.ProfilerOptions.internal_static_tensorflow_RemoteProfilerSessionManagerOptions_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.ProfilerOptions.internal_static_tensorflow_RemoteProfilerSessionManagerOptions_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.proto.ProfilerOptions.RemoteProfilerSessionManagerOptions.class, org.tensorflow.proto.ProfilerOptions.RemoteProfilerSessionManagerOptions.Builder.class); } + private int bitField0_; public static final int PROFILER_OPTIONS_FIELD_NUMBER = 1; private org.tensorflow.proto.ProfilerOptions.ProfileOptions profilerOptions_; /** @@ -1905,7 +4040,7 @@ protected java.lang.Object newInstance( */ @java.lang.Override public boolean hasProfilerOptions() { - return profilerOptions_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** *
    @@ -1928,11 +4063,13 @@ public org.tensorflow.proto.ProfilerOptions.ProfileOptions getProfilerOptions()
          */
         @java.lang.Override
         public org.tensorflow.proto.ProfilerOptions.ProfileOptionsOrBuilder getProfilerOptionsOrBuilder() {
    -      return getProfilerOptions();
    +      return profilerOptions_ == null ? org.tensorflow.proto.ProfilerOptions.ProfileOptions.getDefaultInstance() : profilerOptions_;
         }
     
         public static final int SERVICE_ADDRESSES_FIELD_NUMBER = 2;
    -    private com.google.protobuf.LazyStringList serviceAddresses_;
    +    @SuppressWarnings("serial")
    +    private com.google.protobuf.LazyStringArrayList serviceAddresses_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         /**
          * 
          * List of servers to profile. Supported formats: host:port.
    @@ -1983,7 +4120,7 @@ public java.lang.String getServiceAddresses(int index) {
         }
     
         public static final int SESSION_CREATION_TIMESTAMP_NS_FIELD_NUMBER = 3;
    -    private long sessionCreationTimestampNs_;
    +    private long sessionCreationTimestampNs_ = 0L;
         /**
          * 
          * Unix timestamp of when the session was started.
    @@ -1998,7 +4135,7 @@ public long getSessionCreationTimestampNs() {
         }
     
         public static final int MAX_SESSION_DURATION_MS_FIELD_NUMBER = 4;
    -    private long maxSessionDurationMs_;
    +    private long maxSessionDurationMs_ = 0L;
         /**
          * 
          * Maximum time (in milliseconds) a profiling session manager waits for all
    @@ -2016,7 +4153,7 @@ public long getMaxSessionDurationMs() {
         }
     
         public static final int DELAY_MS_FIELD_NUMBER = 5;
    -    private long delayMs_;
    +    private long delayMs_ = 0L;
         /**
          * 
          * Start of profiling is delayed by this much (in milliseconds).
    @@ -2044,11 +4181,11 @@ public final boolean isInitialized() {
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output)
                             throws java.io.IOException {
    -      if (profilerOptions_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             output.writeMessage(1, getProfilerOptions());
           }
           for (int i = 0; i < serviceAddresses_.size(); i++) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, serviceAddresses_.getRaw(i));
    +        com.google.protobuf.GeneratedMessage.writeString(output, 2, serviceAddresses_.getRaw(i));
           }
           if (sessionCreationTimestampNs_ != 0L) {
             output.writeUInt64(3, sessionCreationTimestampNs_);
    @@ -2068,7 +4205,7 @@ public int getSerializedSize() {
           if (size != -1) return size;
     
           size = 0;
    -      if (profilerOptions_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(1, getProfilerOptions());
           }
    @@ -2187,39 +4324,41 @@ public static org.tensorflow.proto.ProfilerOptions.RemoteProfilerSessionManagerO
         }
         public static org.tensorflow.proto.ProfilerOptions.RemoteProfilerSessionManagerOptions parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.ProfilerOptions.RemoteProfilerSessionManagerOptions parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.ProfilerOptions.RemoteProfilerSessionManagerOptions parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.ProfilerOptions.RemoteProfilerSessionManagerOptions parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.ProfilerOptions.RemoteProfilerSessionManagerOptions parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.ProfilerOptions.RemoteProfilerSessionManagerOptions parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -2239,7 +4378,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -2252,7 +4391,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.RemoteProfilerSessionManagerOptions}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.RemoteProfilerSessionManagerOptions)
             org.tensorflow.proto.ProfilerOptions.RemoteProfilerSessionManagerOptionsOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -2261,7 +4400,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.ProfilerOptions.internal_static_tensorflow_RemoteProfilerSessionManagerOptions_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -2270,31 +4409,34 @@ public static final class Builder extends
     
           // Construct using org.tensorflow.proto.ProfilerOptions.RemoteProfilerSessionManagerOptions.newBuilder()
           private Builder() {
    -
    +        maybeForceBuilderInitialization();
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
    -
    +        maybeForceBuilderInitialization();
    +      }
    +      private void maybeForceBuilderInitialization() {
    +        if (com.google.protobuf.GeneratedMessage
    +                .alwaysUseFieldBuilders) {
    +          getProfilerOptionsFieldBuilder();
    +        }
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    -        if (profilerOptionsBuilder_ == null) {
    -          profilerOptions_ = null;
    -        } else {
    -          profilerOptions_ = null;
    +        bitField0_ = 0;
    +        profilerOptions_ = null;
    +        if (profilerOptionsBuilder_ != null) {
    +          profilerOptionsBuilder_.dispose();
               profilerOptionsBuilder_ = null;
             }
    -        serviceAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        serviceAddresses_ =
    +            com.google.protobuf.LazyStringArrayList.emptyList();
             sessionCreationTimestampNs_ = 0L;
    -
             maxSessionDurationMs_ = 0L;
    -
             delayMs_ = 0L;
    -
             return this;
           }
     
    @@ -2321,56 +4463,36 @@ public org.tensorflow.proto.ProfilerOptions.RemoteProfilerSessionManagerOptions
           @java.lang.Override
           public org.tensorflow.proto.ProfilerOptions.RemoteProfilerSessionManagerOptions buildPartial() {
             org.tensorflow.proto.ProfilerOptions.RemoteProfilerSessionManagerOptions result = new org.tensorflow.proto.ProfilerOptions.RemoteProfilerSessionManagerOptions(this);
    -        int from_bitField0_ = bitField0_;
    -        if (profilerOptionsBuilder_ == null) {
    -          result.profilerOptions_ = profilerOptions_;
    -        } else {
    -          result.profilerOptions_ = profilerOptionsBuilder_.build();
    -        }
    -        if (((bitField0_ & 0x00000001) != 0)) {
    -          serviceAddresses_ = serviceAddresses_.getUnmodifiableView();
    -          bitField0_ = (bitField0_ & ~0x00000001);
    -        }
    -        result.serviceAddresses_ = serviceAddresses_;
    -        result.sessionCreationTimestampNs_ = sessionCreationTimestampNs_;
    -        result.maxSessionDurationMs_ = maxSessionDurationMs_;
    -        result.delayMs_ = delayMs_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.ProfilerOptions.RemoteProfilerSessionManagerOptions result) {
    +        int from_bitField0_ = bitField0_;
    +        int to_bitField0_ = 0;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.profilerOptions_ = profilerOptionsBuilder_ == null
    +              ? profilerOptions_
    +              : profilerOptionsBuilder_.build();
    +          to_bitField0_ |= 0x00000001;
    +        }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          serviceAddresses_.makeImmutable();
    +          result.serviceAddresses_ = serviceAddresses_;
    +        }
    +        if (((from_bitField0_ & 0x00000004) != 0)) {
    +          result.sessionCreationTimestampNs_ = sessionCreationTimestampNs_;
    +        }
    +        if (((from_bitField0_ & 0x00000008) != 0)) {
    +          result.maxSessionDurationMs_ = maxSessionDurationMs_;
    +        }
    +        if (((from_bitField0_ & 0x00000010) != 0)) {
    +          result.delayMs_ = delayMs_;
    +        }
    +        result.bitField0_ |= to_bitField0_;
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.ProfilerOptions.RemoteProfilerSessionManagerOptions) {
    @@ -2389,7 +4511,7 @@ public Builder mergeFrom(org.tensorflow.proto.ProfilerOptions.RemoteProfilerSess
             if (!other.serviceAddresses_.isEmpty()) {
               if (serviceAddresses_.isEmpty()) {
                 serviceAddresses_ = other.serviceAddresses_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ |= 0x00000002;
               } else {
                 ensureServiceAddressesIsMutable();
                 serviceAddresses_.addAll(other.serviceAddresses_);
    @@ -2435,7 +4557,7 @@ public Builder mergeFrom(
                     input.readMessage(
                         getProfilerOptionsFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 10
                   case 18: {
    @@ -2446,17 +4568,17 @@ public Builder mergeFrom(
                   } // case 18
                   case 24: {
                     sessionCreationTimestampNs_ = input.readUInt64();
    -
    +                bitField0_ |= 0x00000004;
                     break;
                   } // case 24
                   case 32: {
                     maxSessionDurationMs_ = input.readUInt64();
    -
    +                bitField0_ |= 0x00000008;
                     break;
                   } // case 32
                   case 40: {
                     delayMs_ = input.readUInt64();
    -
    +                bitField0_ |= 0x00000010;
                     break;
                   } // case 40
                   default: {
    @@ -2477,7 +4599,7 @@ public Builder mergeFrom(
           private int bitField0_;
     
           private org.tensorflow.proto.ProfilerOptions.ProfileOptions profilerOptions_;
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.ProfilerOptions.ProfileOptions, org.tensorflow.proto.ProfilerOptions.ProfileOptions.Builder, org.tensorflow.proto.ProfilerOptions.ProfileOptionsOrBuilder> profilerOptionsBuilder_;
           /**
            * 
    @@ -2488,7 +4610,7 @@ public Builder mergeFrom(
            * @return Whether the profilerOptions field is set.
            */
           public boolean hasProfilerOptions() {
    -        return profilerOptionsBuilder_ != null || profilerOptions_ != null;
    +        return ((bitField0_ & 0x00000001) != 0);
           }
           /**
            * 
    @@ -2518,11 +4640,11 @@ public Builder setProfilerOptions(org.tensorflow.proto.ProfilerOptions.ProfileOp
                 throw new NullPointerException();
               }
               profilerOptions_ = value;
    -          onChanged();
             } else {
               profilerOptionsBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000001;
    +        onChanged();
             return this;
           }
           /**
    @@ -2536,11 +4658,11 @@ public Builder setProfilerOptions(
               org.tensorflow.proto.ProfilerOptions.ProfileOptions.Builder builderForValue) {
             if (profilerOptionsBuilder_ == null) {
               profilerOptions_ = builderForValue.build();
    -          onChanged();
             } else {
               profilerOptionsBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000001;
    +        onChanged();
             return this;
           }
           /**
    @@ -2552,17 +4674,20 @@ public Builder setProfilerOptions(
            */
           public Builder mergeProfilerOptions(org.tensorflow.proto.ProfilerOptions.ProfileOptions value) {
             if (profilerOptionsBuilder_ == null) {
    -          if (profilerOptions_ != null) {
    -            profilerOptions_ =
    -              org.tensorflow.proto.ProfilerOptions.ProfileOptions.newBuilder(profilerOptions_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000001) != 0) &&
    +            profilerOptions_ != null &&
    +            profilerOptions_ != org.tensorflow.proto.ProfilerOptions.ProfileOptions.getDefaultInstance()) {
    +            getProfilerOptionsBuilder().mergeFrom(value);
               } else {
                 profilerOptions_ = value;
               }
    -          onChanged();
             } else {
               profilerOptionsBuilder_.mergeFrom(value);
             }
    -
    +        if (profilerOptions_ != null) {
    +          bitField0_ |= 0x00000001;
    +          onChanged();
    +        }
             return this;
           }
           /**
    @@ -2573,14 +4698,13 @@ public Builder mergeProfilerOptions(org.tensorflow.proto.ProfilerOptions.Profile
            * .tensorflow.ProfileOptions profiler_options = 1;
            */
           public Builder clearProfilerOptions() {
    -        if (profilerOptionsBuilder_ == null) {
    -          profilerOptions_ = null;
    -          onChanged();
    -        } else {
    -          profilerOptions_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000001);
    +        profilerOptions_ = null;
    +        if (profilerOptionsBuilder_ != null) {
    +          profilerOptionsBuilder_.dispose();
               profilerOptionsBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
    @@ -2591,7 +4715,7 @@ public Builder clearProfilerOptions() {
            * .tensorflow.ProfileOptions profiler_options = 1;
            */
           public org.tensorflow.proto.ProfilerOptions.ProfileOptions.Builder getProfilerOptionsBuilder() {
    -        
    +        bitField0_ |= 0x00000001;
             onChanged();
             return getProfilerOptionsFieldBuilder().getBuilder();
           }
    @@ -2617,11 +4741,11 @@ public org.tensorflow.proto.ProfilerOptions.ProfileOptionsOrBuilder getProfilerO
            *
            * .tensorflow.ProfileOptions profiler_options = 1;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.ProfilerOptions.ProfileOptions, org.tensorflow.proto.ProfilerOptions.ProfileOptions.Builder, org.tensorflow.proto.ProfilerOptions.ProfileOptionsOrBuilder> 
               getProfilerOptionsFieldBuilder() {
             if (profilerOptionsBuilder_ == null) {
    -          profilerOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          profilerOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.ProfilerOptions.ProfileOptions, org.tensorflow.proto.ProfilerOptions.ProfileOptions.Builder, org.tensorflow.proto.ProfilerOptions.ProfileOptionsOrBuilder>(
                       getProfilerOptions(),
                       getParentForChildren(),
    @@ -2631,12 +4755,13 @@ public org.tensorflow.proto.ProfilerOptions.ProfileOptionsOrBuilder getProfilerO
             return profilerOptionsBuilder_;
           }
     
    -      private com.google.protobuf.LazyStringList serviceAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +      private com.google.protobuf.LazyStringArrayList serviceAddresses_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
           private void ensureServiceAddressesIsMutable() {
    -        if (!((bitField0_ & 0x00000001) != 0)) {
    +        if (!serviceAddresses_.isModifiable()) {
               serviceAddresses_ = new com.google.protobuf.LazyStringArrayList(serviceAddresses_);
    -          bitField0_ |= 0x00000001;
    -         }
    +        }
    +        bitField0_ |= 0x00000002;
           }
           /**
            * 
    @@ -2648,7 +4773,8 @@ private void ensureServiceAddressesIsMutable() {
            */
           public com.google.protobuf.ProtocolStringList
               getServiceAddressesList() {
    -        return serviceAddresses_.getUnmodifiableView();
    +        serviceAddresses_.makeImmutable();
    +        return serviceAddresses_;
           }
           /**
            * 
    @@ -2698,11 +4824,10 @@ public java.lang.String getServiceAddresses(int index) {
            */
           public Builder setServiceAddresses(
               int index, java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureServiceAddressesIsMutable();
    +        if (value == null) { throw new NullPointerException(); }
    +        ensureServiceAddressesIsMutable();
             serviceAddresses_.set(index, value);
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -2717,11 +4842,10 @@ public Builder setServiceAddresses(
            */
           public Builder addServiceAddresses(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureServiceAddressesIsMutable();
    +        if (value == null) { throw new NullPointerException(); }
    +        ensureServiceAddressesIsMutable();
             serviceAddresses_.add(value);
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -2739,6 +4863,7 @@ public Builder addAllServiceAddresses(
             ensureServiceAddressesIsMutable();
             com.google.protobuf.AbstractMessageLite.Builder.addAll(
                 values, serviceAddresses_);
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -2751,8 +4876,9 @@ public Builder addAllServiceAddresses(
            * @return This builder for chaining.
            */
           public Builder clearServiceAddresses() {
    -        serviceAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        serviceAddresses_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
    +        bitField0_ = (bitField0_ & ~0x00000002);;
             onChanged();
             return this;
           }
    @@ -2767,12 +4893,11 @@ public Builder clearServiceAddresses() {
            */
           public Builder addServiceAddressesBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             ensureServiceAddressesIsMutable();
             serviceAddresses_.add(value);
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -2800,8 +4925,9 @@ public long getSessionCreationTimestampNs() {
            * @return This builder for chaining.
            */
           public Builder setSessionCreationTimestampNs(long value) {
    -        
    +
             sessionCreationTimestampNs_ = value;
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -2814,7 +4940,7 @@ public Builder setSessionCreationTimestampNs(long value) {
            * @return This builder for chaining.
            */
           public Builder clearSessionCreationTimestampNs() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000004);
             sessionCreationTimestampNs_ = 0L;
             onChanged();
             return this;
    @@ -2849,8 +4975,9 @@ public long getMaxSessionDurationMs() {
            * @return This builder for chaining.
            */
           public Builder setMaxSessionDurationMs(long value) {
    -        
    +
             maxSessionDurationMs_ = value;
    +        bitField0_ |= 0x00000008;
             onChanged();
             return this;
           }
    @@ -2866,7 +4993,7 @@ public Builder setMaxSessionDurationMs(long value) {
            * @return This builder for chaining.
            */
           public Builder clearMaxSessionDurationMs() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000008);
             maxSessionDurationMs_ = 0L;
             onChanged();
             return this;
    @@ -2895,8 +5022,9 @@ public long getDelayMs() {
            * @return This builder for chaining.
            */
           public Builder setDelayMs(long value) {
    -        
    +
             delayMs_ = value;
    +        bitField0_ |= 0x00000010;
             onChanged();
             return this;
           }
    @@ -2909,23 +5037,11 @@ public Builder setDelayMs(long value) {
            * @return This builder for chaining.
            */
           public Builder clearDelayMs() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000010);
             delayMs_ = 0L;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.RemoteProfilerSessionManagerOptions)
         }
    @@ -2981,12 +5097,27 @@ public org.tensorflow.proto.ProfilerOptions.RemoteProfilerSessionManagerOptions
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_ProfileOptions_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_ProfileOptions_fieldAccessorTable;
    +  private static final com.google.protobuf.Descriptors.Descriptor
    +    internal_static_tensorflow_ProfileOptions_TraceOptions_descriptor;
    +  private static final 
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
    +      internal_static_tensorflow_ProfileOptions_TraceOptions_fieldAccessorTable;
    +  private static final com.google.protobuf.Descriptors.Descriptor
    +    internal_static_tensorflow_ProfileOptions_AdvancedConfigValue_descriptor;
    +  private static final 
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
    +      internal_static_tensorflow_ProfileOptions_AdvancedConfigValue_fieldAccessorTable;
    +  private static final com.google.protobuf.Descriptors.Descriptor
    +    internal_static_tensorflow_ProfileOptions_AdvancedConfigurationEntry_descriptor;
    +  private static final 
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
    +      internal_static_tensorflow_ProfileOptions_AdvancedConfigurationEntry_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_RemoteProfilerSessionManagerOptions_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_RemoteProfilerSessionManagerOptions_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -2998,7 +5129,7 @@ public org.tensorflow.proto.ProfilerOptions.RemoteProfilerSessionManagerOptions
       static {
         java.lang.String[] descriptorData = {
           "\n,tsl/profiler/protobuf/profiler_options" +
    -      ".proto\022\ntensorflow\"\203\003\n\016ProfileOptions\022\017\n" +
    +      ".proto\022\ntensorflow\"\305\006\n\016ProfileOptions\022\017\n" +
           "\007version\030\005 \001(\r\022:\n\013device_type\030\006 \001(\0162%.te" +
           "nsorflow.ProfileOptions.DeviceType\022\033\n\023in" +
           "clude_dataset_ops\030\001 \001(\010\022\031\n\021host_tracer_l" +
    @@ -3006,15 +5137,26 @@ public org.tensorflow.proto.ProfilerOptions.RemoteProfilerSessionManagerOptions
           "\033\n\023python_tracer_level\030\004 \001(\r\022\030\n\020enable_h" +
           "lo_proto\030\007 \001(\010\022\032\n\022start_timestamp_ns\030\010 \001" +
           "(\004\022\023\n\013duration_ms\030\t \001(\004\022\027\n\017repository_pa" +
    -      "th\030\n \001(\t\"N\n\nDeviceType\022\017\n\013UNSPECIFIED\020\000\022" +
    -      "\007\n\003CPU\020\001\022\007\n\003GPU\020\002\022\007\n\003TPU\020\003\022\024\n\020PLUGGABLE_" +
    -      "DEVICE\020\004\"\320\001\n#RemoteProfilerSessionManage" +
    -      "rOptions\0224\n\020profiler_options\030\001 \001(\0132\032.ten" +
    -      "sorflow.ProfileOptions\022\031\n\021service_addres" +
    -      "ses\030\002 \003(\t\022%\n\035session_creation_timestamp_" +
    -      "ns\030\003 \001(\004\022\037\n\027max_session_duration_ms\030\004 \001(" +
    -      "\004\022\020\n\010delay_ms\030\005 \001(\004B\026\n\024org.tensorflow.pr" +
    -      "otob\006proto3"
    +      "th\030\n \001(\t\022>\n\rtrace_options\030\013 \001(\0132\'.tensor" +
    +      "flow.ProfileOptions.TraceOptions\022U\n\026adva" +
    +      "nced_configuration\030\014 \003(\01325.tensorflow.Pr" +
    +      "ofileOptions.AdvancedConfigurationEntry\022" +
    +      "$\n\034raise_error_on_start_failure\030\r \001(\010\0320\n" +
    +      "\014TraceOptions\022 \n\030host_traceme_filter_mas" +
    +      "k\030\001 \001(\004\032c\n\023AdvancedConfigValue\022\026\n\014string" +
    +      "_value\030\001 \001(\tH\000\022\024\n\nbool_value\030\002 \001(\010H\000\022\025\n\013" +
    +      "int64_value\030\003 \001(\003H\000B\007\n\005value\032l\n\032Advanced" +
    +      "ConfigurationEntry\022\013\n\003key\030\001 \001(\t\022=\n\005value" +
    +      "\030\002 \001(\0132..tensorflow.ProfileOptions.Advan" +
    +      "cedConfigValue:\0028\001\"N\n\nDeviceType\022\017\n\013UNSP" +
    +      "ECIFIED\020\000\022\007\n\003CPU\020\001\022\007\n\003GPU\020\002\022\007\n\003TPU\020\003\022\024\n\020" +
    +      "PLUGGABLE_DEVICE\020\004\"\320\001\n#RemoteProfilerSes" +
    +      "sionManagerOptions\0224\n\020profiler_options\030\001" +
    +      " \001(\0132\032.tensorflow.ProfileOptions\022\031\n\021serv" +
    +      "ice_addresses\030\002 \003(\t\022%\n\035session_creation_" +
    +      "timestamp_ns\030\003 \001(\004\022\037\n\027max_session_durati" +
    +      "on_ms\030\004 \001(\004\022\020\n\010delay_ms\030\005 \001(\004B\026\n\024org.ten" +
    +      "sorflow.protob\006proto3"
         };
         descriptor = com.google.protobuf.Descriptors.FileDescriptor
           .internalBuildGeneratedFileFrom(descriptorData,
    @@ -3023,15 +5165,34 @@ public org.tensorflow.proto.ProfilerOptions.RemoteProfilerSessionManagerOptions
         internal_static_tensorflow_ProfileOptions_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_ProfileOptions_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_ProfileOptions_descriptor,
    -        new java.lang.String[] { "Version", "DeviceType", "IncludeDatasetOps", "HostTracerLevel", "DeviceTracerLevel", "PythonTracerLevel", "EnableHloProto", "StartTimestampNs", "DurationMs", "RepositoryPath", });
    +        new java.lang.String[] { "Version", "DeviceType", "IncludeDatasetOps", "HostTracerLevel", "DeviceTracerLevel", "PythonTracerLevel", "EnableHloProto", "StartTimestampNs", "DurationMs", "RepositoryPath", "TraceOptions", "AdvancedConfiguration", "RaiseErrorOnStartFailure", });
    +    internal_static_tensorflow_ProfileOptions_TraceOptions_descriptor =
    +      internal_static_tensorflow_ProfileOptions_descriptor.getNestedTypes().get(0);
    +    internal_static_tensorflow_ProfileOptions_TraceOptions_fieldAccessorTable = new
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
    +        internal_static_tensorflow_ProfileOptions_TraceOptions_descriptor,
    +        new java.lang.String[] { "HostTracemeFilterMask", });
    +    internal_static_tensorflow_ProfileOptions_AdvancedConfigValue_descriptor =
    +      internal_static_tensorflow_ProfileOptions_descriptor.getNestedTypes().get(1);
    +    internal_static_tensorflow_ProfileOptions_AdvancedConfigValue_fieldAccessorTable = new
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
    +        internal_static_tensorflow_ProfileOptions_AdvancedConfigValue_descriptor,
    +        new java.lang.String[] { "StringValue", "BoolValue", "Int64Value", "Value", });
    +    internal_static_tensorflow_ProfileOptions_AdvancedConfigurationEntry_descriptor =
    +      internal_static_tensorflow_ProfileOptions_descriptor.getNestedTypes().get(2);
    +    internal_static_tensorflow_ProfileOptions_AdvancedConfigurationEntry_fieldAccessorTable = new
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
    +        internal_static_tensorflow_ProfileOptions_AdvancedConfigurationEntry_descriptor,
    +        new java.lang.String[] { "Key", "Value", });
         internal_static_tensorflow_RemoteProfilerSessionManagerOptions_descriptor =
           getDescriptor().getMessageTypes().get(1);
         internal_static_tensorflow_RemoteProfilerSessionManagerOptions_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_RemoteProfilerSessionManagerOptions_descriptor,
             new java.lang.String[] { "ProfilerOptions", "ServiceAddresses", "SessionCreationTimestampNs", "MaxSessionDurationMs", "DelayMs", });
    +    descriptor.resolveAllFeaturesImmutable();
       }
     
       // @@protoc_insertion_point(outer_class_scope)
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/QueueRunnerDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/QueueRunnerDef.java
    index 7bb1bfb66a9..550c1c55a0b 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/QueueRunnerDef.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/QueueRunnerDef.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/queue_runner.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,41 +13,39 @@
      * Protobuf type {@code tensorflow.QueueRunnerDef}
      */
     public final class QueueRunnerDef extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.QueueRunnerDef)
         QueueRunnerDefOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      QueueRunnerDef.class.getName());
    +  }
       // Use QueueRunnerDef.newBuilder() to construct.
    -  private QueueRunnerDef(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private QueueRunnerDef(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private QueueRunnerDef() {
         queueName_ = "";
    -    enqueueOpName_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +    enqueueOpName_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         closeOpName_ = "";
         cancelOpName_ = "";
    -    queueClosedExceptionTypes_ = java.util.Collections.emptyList();
    -  }
    -
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new QueueRunnerDef();
    +    queueClosedExceptionTypes_ = emptyIntList();
       }
     
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.QueueRunnerProtos.internal_static_tensorflow_QueueRunnerDef_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.QueueRunnerProtos.internal_static_tensorflow_QueueRunnerDef_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -53,7 +53,8 @@ protected java.lang.Object newInstance(
       }
     
       public static final int QUEUE_NAME_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object queueName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object queueName_ = "";
       /**
        * 
        * Queue name.
    @@ -99,7 +100,9 @@ public java.lang.String getQueueName() {
       }
     
       public static final int ENQUEUE_OP_NAME_FIELD_NUMBER = 2;
    -  private com.google.protobuf.LazyStringList enqueueOpName_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.LazyStringArrayList enqueueOpName_ =
    +      com.google.protobuf.LazyStringArrayList.emptyList();
       /**
        * 
        * A list of enqueue operations.
    @@ -150,7 +153,8 @@ public java.lang.String getEnqueueOpName(int index) {
       }
     
       public static final int CLOSE_OP_NAME_FIELD_NUMBER = 3;
    -  private volatile java.lang.Object closeOpName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object closeOpName_ = "";
       /**
        * 
        * The operation to run to close the queue.
    @@ -196,7 +200,8 @@ public java.lang.String getCloseOpName() {
       }
     
       public static final int CANCEL_OP_NAME_FIELD_NUMBER = 4;
    -  private volatile java.lang.Object cancelOpName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object cancelOpName_ = "";
       /**
        * 
        * The operation to run to cancel the queue.
    @@ -242,14 +247,14 @@ public java.lang.String getCancelOpName() {
       }
     
       public static final int QUEUE_CLOSED_EXCEPTION_TYPES_FIELD_NUMBER = 5;
    -  private java.util.List queueClosedExceptionTypes_;
    -  private static final com.google.protobuf.Internal.ListAdapter.Converter<
    -      java.lang.Integer, org.tensorflow.proto.error.Code> queueClosedExceptionTypes_converter_ =
    -          new com.google.protobuf.Internal.ListAdapter.Converter<
    -              java.lang.Integer, org.tensorflow.proto.error.Code>() {
    -            public org.tensorflow.proto.error.Code convert(java.lang.Integer from) {
    -              @SuppressWarnings("deprecation")
    -              org.tensorflow.proto.error.Code result = org.tensorflow.proto.error.Code.valueOf(from);
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.Internal.IntList queueClosedExceptionTypes_;
    +  private static final com.google.protobuf.Internal.IntListAdapter.IntConverter<
    +      org.tensorflow.proto.error.Code> queueClosedExceptionTypes_converter_ =
    +          new com.google.protobuf.Internal.IntListAdapter.IntConverter<
    +              org.tensorflow.proto.error.Code>() {
    +            public org.tensorflow.proto.error.Code convert(int from) {
    +              org.tensorflow.proto.error.Code result = org.tensorflow.proto.error.Code.forNumber(from);
                   return result == null ? org.tensorflow.proto.error.Code.UNRECOGNIZED : result;
                 }
               };
    @@ -264,8 +269,8 @@ public org.tensorflow.proto.error.Code convert(java.lang.Integer from) {
        */
       @java.lang.Override
       public java.util.List getQueueClosedExceptionTypesList() {
    -    return new com.google.protobuf.Internal.ListAdapter<
    -        java.lang.Integer, org.tensorflow.proto.error.Code>(queueClosedExceptionTypes_, queueClosedExceptionTypes_converter_);
    +    return new com.google.protobuf.Internal.IntListAdapter<
    +        org.tensorflow.proto.error.Code>(queueClosedExceptionTypes_, queueClosedExceptionTypes_converter_);
       }
       /**
        * 
    @@ -292,7 +297,7 @@ public int getQueueClosedExceptionTypesCount() {
        */
       @java.lang.Override
       public org.tensorflow.proto.error.Code getQueueClosedExceptionTypes(int index) {
    -    return queueClosedExceptionTypes_converter_.convert(queueClosedExceptionTypes_.get(index));
    +    return queueClosedExceptionTypes_converter_.convert(queueClosedExceptionTypes_.getInt(index));
       }
       /**
        * 
    @@ -320,7 +325,7 @@ public org.tensorflow.proto.error.Code getQueueClosedExceptionTypes(int index) {
        */
       @java.lang.Override
       public int getQueueClosedExceptionTypesValue(int index) {
    -    return queueClosedExceptionTypes_.get(index);
    +    return queueClosedExceptionTypes_.getInt(index);
       }
       private int queueClosedExceptionTypesMemoizedSerializedSize;
     
    @@ -339,24 +344,24 @@ public final boolean isInitialized() {
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
         getSerializedSize();
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queueName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, queueName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(queueName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, queueName_);
         }
         for (int i = 0; i < enqueueOpName_.size(); i++) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, enqueueOpName_.getRaw(i));
    +      com.google.protobuf.GeneratedMessage.writeString(output, 2, enqueueOpName_.getRaw(i));
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(closeOpName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, closeOpName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(closeOpName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 3, closeOpName_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cancelOpName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, cancelOpName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cancelOpName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 4, cancelOpName_);
         }
         if (getQueueClosedExceptionTypesList().size() > 0) {
           output.writeUInt32NoTag(42);
           output.writeUInt32NoTag(queueClosedExceptionTypesMemoizedSerializedSize);
         }
         for (int i = 0; i < queueClosedExceptionTypes_.size(); i++) {
    -      output.writeEnumNoTag(queueClosedExceptionTypes_.get(i));
    +      output.writeEnumNoTag(queueClosedExceptionTypes_.getInt(i));
         }
         getUnknownFields().writeTo(output);
       }
    @@ -367,8 +372,8 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queueName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, queueName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(queueName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, queueName_);
         }
         {
           int dataSize = 0;
    @@ -378,17 +383,17 @@ public int getSerializedSize() {
           size += dataSize;
           size += 1 * getEnqueueOpNameList().size();
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(closeOpName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, closeOpName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(closeOpName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(3, closeOpName_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cancelOpName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, cancelOpName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cancelOpName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(4, cancelOpName_);
         }
         {
           int dataSize = 0;
           for (int i = 0; i < queueClosedExceptionTypes_.size(); i++) {
             dataSize += com.google.protobuf.CodedOutputStream
    -          .computeEnumSizeNoTag(queueClosedExceptionTypes_.get(i));
    +          .computeEnumSizeNoTag(queueClosedExceptionTypes_.getInt(i));
           }
           size += dataSize;
           if (!getQueueClosedExceptionTypesList().isEmpty()) {  size += 1;
    @@ -484,39 +489,41 @@ public static org.tensorflow.proto.QueueRunnerDef parseFrom(
       }
       public static org.tensorflow.proto.QueueRunnerDef parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.QueueRunnerDef parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.QueueRunnerDef parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.QueueRunnerDef parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.QueueRunnerDef parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.QueueRunnerDef parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -536,7 +543,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -548,7 +555,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.QueueRunnerDef}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.QueueRunnerDef)
           org.tensorflow.proto.QueueRunnerDefOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -557,7 +564,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.QueueRunnerProtos.internal_static_tensorflow_QueueRunnerDef_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -570,23 +577,21 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           queueName_ = "";
    -
    -      enqueueOpName_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      enqueueOpName_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
           closeOpName_ = "";
    -
           cancelOpName_ = "";
    -
    -      queueClosedExceptionTypes_ = java.util.Collections.emptyList();
    -      bitField0_ = (bitField0_ & ~0x00000002);
    +      queueClosedExceptionTypes_ = emptyIntList();
    +      bitField0_ = (bitField0_ & ~0x00000010);
           return this;
         }
     
    @@ -613,56 +618,37 @@ public org.tensorflow.proto.QueueRunnerDef build() {
         @java.lang.Override
         public org.tensorflow.proto.QueueRunnerDef buildPartial() {
           org.tensorflow.proto.QueueRunnerDef result = new org.tensorflow.proto.QueueRunnerDef(this);
    -      int from_bitField0_ = bitField0_;
    -      result.queueName_ = queueName_;
    -      if (((bitField0_ & 0x00000001) != 0)) {
    -        enqueueOpName_ = enqueueOpName_.getUnmodifiableView();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    -      }
    -      result.enqueueOpName_ = enqueueOpName_;
    -      result.closeOpName_ = closeOpName_;
    -      result.cancelOpName_ = cancelOpName_;
    -      if (((bitField0_ & 0x00000002) != 0)) {
    -        queueClosedExceptionTypes_ = java.util.Collections.unmodifiableList(queueClosedExceptionTypes_);
    -        bitField0_ = (bitField0_ & ~0x00000002);
    -      }
    -      result.queueClosedExceptionTypes_ = queueClosedExceptionTypes_;
    +      buildPartialRepeatedFields(result);
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    +    private void buildPartialRepeatedFields(org.tensorflow.proto.QueueRunnerDef result) {
    +      if (((bitField0_ & 0x00000010) != 0)) {
    +        queueClosedExceptionTypes_.makeImmutable();
    +        bitField0_ = (bitField0_ & ~0x00000010);
    +      }
    +      result.queueClosedExceptionTypes_ = queueClosedExceptionTypes_;
         }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +
    +    private void buildPartial0(org.tensorflow.proto.QueueRunnerDef result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.queueName_ = queueName_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        enqueueOpName_.makeImmutable();
    +        result.enqueueOpName_ = enqueueOpName_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.closeOpName_ = closeOpName_;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.cancelOpName_ = cancelOpName_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.QueueRunnerDef) {
    @@ -677,12 +663,13 @@ public Builder mergeFrom(org.tensorflow.proto.QueueRunnerDef other) {
           if (other == org.tensorflow.proto.QueueRunnerDef.getDefaultInstance()) return this;
           if (!other.getQueueName().isEmpty()) {
             queueName_ = other.queueName_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (!other.enqueueOpName_.isEmpty()) {
             if (enqueueOpName_.isEmpty()) {
               enqueueOpName_ = other.enqueueOpName_;
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ |= 0x00000002;
             } else {
               ensureEnqueueOpNameIsMutable();
               enqueueOpName_.addAll(other.enqueueOpName_);
    @@ -691,16 +678,18 @@ public Builder mergeFrom(org.tensorflow.proto.QueueRunnerDef other) {
           }
           if (!other.getCloseOpName().isEmpty()) {
             closeOpName_ = other.closeOpName_;
    +        bitField0_ |= 0x00000004;
             onChanged();
           }
           if (!other.getCancelOpName().isEmpty()) {
             cancelOpName_ = other.cancelOpName_;
    +        bitField0_ |= 0x00000008;
             onChanged();
           }
           if (!other.queueClosedExceptionTypes_.isEmpty()) {
             if (queueClosedExceptionTypes_.isEmpty()) {
               queueClosedExceptionTypes_ = other.queueClosedExceptionTypes_;
    -          bitField0_ = (bitField0_ & ~0x00000002);
    +          bitField0_ = (bitField0_ & ~0x00000010);
             } else {
               ensureQueueClosedExceptionTypesIsMutable();
               queueClosedExceptionTypes_.addAll(other.queueClosedExceptionTypes_);
    @@ -735,7 +724,7 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   queueName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
    @@ -746,18 +735,18 @@ public Builder mergeFrom(
                 } // case 18
                 case 26: {
                   closeOpName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 26
                 case 34: {
                   cancelOpName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 34
                 case 40: {
                   int tmpRaw = input.readEnum();
                   ensureQueueClosedExceptionTypesIsMutable();
    -              queueClosedExceptionTypes_.add(tmpRaw);
    +              queueClosedExceptionTypes_.addInt(tmpRaw);
                   break;
                 } // case 40
                 case 42: {
    @@ -766,7 +755,7 @@ public Builder mergeFrom(
                   while(input.getBytesUntilLimit() > 0) {
                     int tmpRaw = input.readEnum();
                     ensureQueueClosedExceptionTypesIsMutable();
    -                queueClosedExceptionTypes_.add(tmpRaw);
    +                queueClosedExceptionTypes_.addInt(tmpRaw);
                   }
                   input.popLimit(oldLimit);
                   break;
    @@ -841,11 +830,9 @@ public java.lang.String getQueueName() {
          */
         public Builder setQueueName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           queueName_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -858,8 +845,8 @@ public Builder setQueueName(
          * @return This builder for chaining.
          */
         public Builder clearQueueName() {
    -      
           queueName_ = getDefaultInstance().getQueueName();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -874,22 +861,21 @@ public Builder clearQueueName() {
          */
         public Builder setQueueNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           queueName_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
     
    -    private com.google.protobuf.LazyStringList enqueueOpName_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +    private com.google.protobuf.LazyStringArrayList enqueueOpName_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         private void ensureEnqueueOpNameIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    +      if (!enqueueOpName_.isModifiable()) {
             enqueueOpName_ = new com.google.protobuf.LazyStringArrayList(enqueueOpName_);
    -        bitField0_ |= 0x00000001;
    -       }
    +      }
    +      bitField0_ |= 0x00000002;
         }
         /**
          * 
    @@ -901,7 +887,8 @@ private void ensureEnqueueOpNameIsMutable() {
          */
         public com.google.protobuf.ProtocolStringList
             getEnqueueOpNameList() {
    -      return enqueueOpName_.getUnmodifiableView();
    +      enqueueOpName_.makeImmutable();
    +      return enqueueOpName_;
         }
         /**
          * 
    @@ -951,11 +938,10 @@ public java.lang.String getEnqueueOpName(int index) {
          */
         public Builder setEnqueueOpName(
             int index, java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureEnqueueOpNameIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureEnqueueOpNameIsMutable();
           enqueueOpName_.set(index, value);
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -970,11 +956,10 @@ public Builder setEnqueueOpName(
          */
         public Builder addEnqueueOpName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureEnqueueOpNameIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureEnqueueOpNameIsMutable();
           enqueueOpName_.add(value);
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -992,6 +977,7 @@ public Builder addAllEnqueueOpName(
           ensureEnqueueOpNameIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, enqueueOpName_);
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -1004,8 +990,9 @@ public Builder addAllEnqueueOpName(
          * @return This builder for chaining.
          */
         public Builder clearEnqueueOpName() {
    -      enqueueOpName_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      enqueueOpName_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
    +      bitField0_ = (bitField0_ & ~0x00000002);;
           onChanged();
           return this;
         }
    @@ -1020,12 +1007,11 @@ public Builder clearEnqueueOpName() {
          */
         public Builder addEnqueueOpNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           ensureEnqueueOpNameIsMutable();
           enqueueOpName_.add(value);
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -1083,11 +1069,9 @@ public java.lang.String getCloseOpName() {
          */
         public Builder setCloseOpName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           closeOpName_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -1100,8 +1084,8 @@ public Builder setCloseOpName(
          * @return This builder for chaining.
          */
         public Builder clearCloseOpName() {
    -      
           closeOpName_ = getDefaultInstance().getCloseOpName();
    +      bitField0_ = (bitField0_ & ~0x00000004);
           onChanged();
           return this;
         }
    @@ -1116,12 +1100,10 @@ public Builder clearCloseOpName() {
          */
         public Builder setCloseOpNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           closeOpName_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -1179,11 +1161,9 @@ public java.lang.String getCancelOpName() {
          */
         public Builder setCancelOpName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           cancelOpName_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -1196,8 +1176,8 @@ public Builder setCancelOpName(
          * @return This builder for chaining.
          */
         public Builder clearCancelOpName() {
    -      
           cancelOpName_ = getDefaultInstance().getCancelOpName();
    +      bitField0_ = (bitField0_ & ~0x00000008);
           onChanged();
           return this;
         }
    @@ -1212,22 +1192,20 @@ public Builder clearCancelOpName() {
          */
         public Builder setCancelOpNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           cancelOpName_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
     
    -    private java.util.List queueClosedExceptionTypes_ =
    -      java.util.Collections.emptyList();
    +    private com.google.protobuf.Internal.IntList queueClosedExceptionTypes_ =
    +      emptyIntList();
         private void ensureQueueClosedExceptionTypesIsMutable() {
    -      if (!((bitField0_ & 0x00000002) != 0)) {
    -        queueClosedExceptionTypes_ = new java.util.ArrayList(queueClosedExceptionTypes_);
    -        bitField0_ |= 0x00000002;
    +      if (!((bitField0_ & 0x00000010) != 0)) {
    +        queueClosedExceptionTypes_ = makeMutableCopy(queueClosedExceptionTypes_);
    +        bitField0_ |= 0x00000010;
           }
         }
         /**
    @@ -1240,8 +1218,8 @@ private void ensureQueueClosedExceptionTypesIsMutable() {
          * @return A list containing the queueClosedExceptionTypes.
          */
         public java.util.List getQueueClosedExceptionTypesList() {
    -      return new com.google.protobuf.Internal.ListAdapter<
    -          java.lang.Integer, org.tensorflow.proto.error.Code>(queueClosedExceptionTypes_, queueClosedExceptionTypes_converter_);
    +      return new com.google.protobuf.Internal.IntListAdapter<
    +          org.tensorflow.proto.error.Code>(queueClosedExceptionTypes_, queueClosedExceptionTypes_converter_);
         }
         /**
          * 
    @@ -1266,7 +1244,7 @@ public int getQueueClosedExceptionTypesCount() {
          * @return The queueClosedExceptionTypes at the given index.
          */
         public org.tensorflow.proto.error.Code getQueueClosedExceptionTypes(int index) {
    -      return queueClosedExceptionTypes_converter_.convert(queueClosedExceptionTypes_.get(index));
    +      return queueClosedExceptionTypes_converter_.convert(queueClosedExceptionTypes_.getInt(index));
         }
         /**
          * 
    @@ -1285,7 +1263,7 @@ public Builder setQueueClosedExceptionTypes(
             throw new NullPointerException();
           }
           ensureQueueClosedExceptionTypesIsMutable();
    -      queueClosedExceptionTypes_.set(index, value.getNumber());
    +      queueClosedExceptionTypes_.setInt(index, value.getNumber());
           onChanged();
           return this;
         }
    @@ -1304,7 +1282,7 @@ public Builder addQueueClosedExceptionTypes(org.tensorflow.proto.error.Code valu
             throw new NullPointerException();
           }
           ensureQueueClosedExceptionTypesIsMutable();
    -      queueClosedExceptionTypes_.add(value.getNumber());
    +      queueClosedExceptionTypes_.addInt(value.getNumber());
           onChanged();
           return this;
         }
    @@ -1322,7 +1300,7 @@ public Builder addAllQueueClosedExceptionTypes(
             java.lang.Iterable values) {
           ensureQueueClosedExceptionTypesIsMutable();
           for (org.tensorflow.proto.error.Code value : values) {
    -        queueClosedExceptionTypes_.add(value.getNumber());
    +        queueClosedExceptionTypes_.addInt(value.getNumber());
           }
           onChanged();
           return this;
    @@ -1337,8 +1315,8 @@ public Builder addAllQueueClosedExceptionTypes(
          * @return This builder for chaining.
          */
         public Builder clearQueueClosedExceptionTypes() {
    -      queueClosedExceptionTypes_ = java.util.Collections.emptyList();
    -      bitField0_ = (bitField0_ & ~0x00000002);
    +      queueClosedExceptionTypes_ = emptyIntList();
    +      bitField0_ = (bitField0_ & ~0x00000010);
           onChanged();
           return this;
         }
    @@ -1366,7 +1344,7 @@ public Builder clearQueueClosedExceptionTypes() {
          * @return The enum numeric value on the wire of queueClosedExceptionTypes at the given index.
          */
         public int getQueueClosedExceptionTypesValue(int index) {
    -      return queueClosedExceptionTypes_.get(index);
    +      return queueClosedExceptionTypes_.getInt(index);
         }
         /**
          * 
    @@ -1382,7 +1360,7 @@ public int getQueueClosedExceptionTypesValue(int index) {
         public Builder setQueueClosedExceptionTypesValue(
             int index, int value) {
           ensureQueueClosedExceptionTypesIsMutable();
    -      queueClosedExceptionTypes_.set(index, value);
    +      queueClosedExceptionTypes_.setInt(index, value);
           onChanged();
           return this;
         }
    @@ -1398,7 +1376,7 @@ public Builder setQueueClosedExceptionTypesValue(
          */
         public Builder addQueueClosedExceptionTypesValue(int value) {
           ensureQueueClosedExceptionTypesIsMutable();
    -      queueClosedExceptionTypes_.add(value);
    +      queueClosedExceptionTypes_.addInt(value);
           onChanged();
           return this;
         }
    @@ -1416,23 +1394,11 @@ public Builder addAllQueueClosedExceptionTypesValue(
             java.lang.Iterable values) {
           ensureQueueClosedExceptionTypesIsMutable();
           for (int value : values) {
    -        queueClosedExceptionTypes_.add(value);
    +        queueClosedExceptionTypes_.addInt(value);
           }
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.QueueRunnerDef)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/QueueRunnerDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/QueueRunnerDefOrBuilder.java
    index 1afd741d0db..c4f232bf15d 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/QueueRunnerDefOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/QueueRunnerDefOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/queue_runner.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/QueueRunnerProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/QueueRunnerProtos.java
    index d1c6c42b5a5..23c75114991 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/QueueRunnerProtos.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/QueueRunnerProtos.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/queue_runner.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class QueueRunnerProtos {
       private QueueRunnerProtos() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      QueueRunnerProtos.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,7 +28,7 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_QueueRunnerDef_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_QueueRunnerDef_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -48,9 +59,10 @@ public static void registerAllExtensions(
         internal_static_tensorflow_QueueRunnerDef_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_QueueRunnerDef_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_QueueRunnerDef_descriptor,
             new java.lang.String[] { "QueueName", "EnqueueOpName", "CloseOpName", "CancelOpName", "QueueClosedExceptionTypes", });
    +    descriptor.resolveAllFeaturesImmutable();
         org.tensorflow.proto.error.dummy.ErrorCodes.getDescriptor();
       }
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ReaderBaseProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ReaderBaseProtos.java
    index 8031e3d4f4a..07c85d130a3 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ReaderBaseProtos.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ReaderBaseProtos.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/reader_base.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class ReaderBaseProtos {
       private ReaderBaseProtos() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      ReaderBaseProtos.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,7 +28,7 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_ReaderBaseState_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_ReaderBaseState_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -44,9 +55,10 @@ public static void registerAllExtensions(
         internal_static_tensorflow_ReaderBaseState_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_ReaderBaseState_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_ReaderBaseState_descriptor,
             new java.lang.String[] { "WorkStarted", "WorkFinished", "NumRecordsProduced", "CurrentWork", });
    +    descriptor.resolveAllFeaturesImmutable();
       }
     
       // @@protoc_insertion_point(outer_class_scope)
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ReaderBaseState.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ReaderBaseState.java
    index 8e51b2c76a2..4e619b9297c 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ReaderBaseState.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ReaderBaseState.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/reader_base.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -12,37 +14,34 @@
      * Protobuf type {@code tensorflow.ReaderBaseState}
      */
     public final class ReaderBaseState extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.ReaderBaseState)
         ReaderBaseStateOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      ReaderBaseState.class.getName());
    +  }
       // Use ReaderBaseState.newBuilder() to construct.
    -  private ReaderBaseState(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private ReaderBaseState(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private ReaderBaseState() {
         currentWork_ = com.google.protobuf.ByteString.EMPTY;
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new ReaderBaseState();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.ReaderBaseProtos.internal_static_tensorflow_ReaderBaseState_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.ReaderBaseProtos.internal_static_tensorflow_ReaderBaseState_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -50,7 +49,7 @@ protected java.lang.Object newInstance(
       }
     
       public static final int WORK_STARTED_FIELD_NUMBER = 1;
    -  private long workStarted_;
    +  private long workStarted_ = 0L;
       /**
        * int64 work_started = 1;
        * @return The workStarted.
    @@ -61,7 +60,7 @@ public long getWorkStarted() {
       }
     
       public static final int WORK_FINISHED_FIELD_NUMBER = 2;
    -  private long workFinished_;
    +  private long workFinished_ = 0L;
       /**
        * int64 work_finished = 2;
        * @return The workFinished.
    @@ -72,7 +71,7 @@ public long getWorkFinished() {
       }
     
       public static final int NUM_RECORDS_PRODUCED_FIELD_NUMBER = 3;
    -  private long numRecordsProduced_;
    +  private long numRecordsProduced_ = 0L;
       /**
        * int64 num_records_produced = 3;
        * @return The numRecordsProduced.
    @@ -83,7 +82,7 @@ public long getNumRecordsProduced() {
       }
     
       public static final int CURRENT_WORK_FIELD_NUMBER = 4;
    -  private com.google.protobuf.ByteString currentWork_;
    +  private com.google.protobuf.ByteString currentWork_ = com.google.protobuf.ByteString.EMPTY;
       /**
        * bytes current_work = 4;
        * @return The currentWork.
    @@ -228,39 +227,41 @@ public static org.tensorflow.proto.ReaderBaseState parseFrom(
       }
       public static org.tensorflow.proto.ReaderBaseState parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.ReaderBaseState parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.ReaderBaseState parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.ReaderBaseState parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.ReaderBaseState parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.ReaderBaseState parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -280,7 +281,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -293,7 +294,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.ReaderBaseState}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.ReaderBaseState)
           org.tensorflow.proto.ReaderBaseStateOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -302,7 +303,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.ReaderBaseProtos.internal_static_tensorflow_ReaderBaseState_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -315,21 +316,18 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           workStarted_ = 0L;
    -
           workFinished_ = 0L;
    -
           numRecordsProduced_ = 0L;
    -
           currentWork_ = com.google.protobuf.ByteString.EMPTY;
    -
           return this;
         }
     
    @@ -356,46 +354,27 @@ public org.tensorflow.proto.ReaderBaseState build() {
         @java.lang.Override
         public org.tensorflow.proto.ReaderBaseState buildPartial() {
           org.tensorflow.proto.ReaderBaseState result = new org.tensorflow.proto.ReaderBaseState(this);
    -      result.workStarted_ = workStarted_;
    -      result.workFinished_ = workFinished_;
    -      result.numRecordsProduced_ = numRecordsProduced_;
    -      result.currentWork_ = currentWork_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.ReaderBaseState result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.workStarted_ = workStarted_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.workFinished_ = workFinished_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.numRecordsProduced_ = numRecordsProduced_;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.currentWork_ = currentWork_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.ReaderBaseState) {
    @@ -448,22 +427,22 @@ public Builder mergeFrom(
                   break;
                 case 8: {
                   workStarted_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 8
                 case 16: {
                   workFinished_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 16
                 case 24: {
                   numRecordsProduced_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 24
                 case 34: {
                   currentWork_ = input.readBytes();
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 34
                 default: {
    @@ -481,6 +460,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private long workStarted_ ;
         /**
    @@ -497,8 +477,9 @@ public long getWorkStarted() {
          * @return This builder for chaining.
          */
         public Builder setWorkStarted(long value) {
    -      
    +
           workStarted_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -507,7 +488,7 @@ public Builder setWorkStarted(long value) {
          * @return This builder for chaining.
          */
         public Builder clearWorkStarted() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000001);
           workStarted_ = 0L;
           onChanged();
           return this;
    @@ -528,8 +509,9 @@ public long getWorkFinished() {
          * @return This builder for chaining.
          */
         public Builder setWorkFinished(long value) {
    -      
    +
           workFinished_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -538,7 +520,7 @@ public Builder setWorkFinished(long value) {
          * @return This builder for chaining.
          */
         public Builder clearWorkFinished() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000002);
           workFinished_ = 0L;
           onChanged();
           return this;
    @@ -559,8 +541,9 @@ public long getNumRecordsProduced() {
          * @return This builder for chaining.
          */
         public Builder setNumRecordsProduced(long value) {
    -      
    +
           numRecordsProduced_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -569,7 +552,7 @@ public Builder setNumRecordsProduced(long value) {
          * @return This builder for chaining.
          */
         public Builder clearNumRecordsProduced() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000004);
           numRecordsProduced_ = 0L;
           onChanged();
           return this;
    @@ -590,11 +573,9 @@ public com.google.protobuf.ByteString getCurrentWork() {
          * @return This builder for chaining.
          */
         public Builder setCurrentWork(com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           currentWork_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -603,23 +584,11 @@ public Builder setCurrentWork(com.google.protobuf.ByteString value) {
          * @return This builder for chaining.
          */
         public Builder clearCurrentWork() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000008);
           currentWork_ = getDefaultInstance().getCurrentWork();
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.ReaderBaseState)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ReaderBaseStateOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ReaderBaseStateOrBuilder.java
    index 7d5fb6a46a0..e6b3261fb44 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ReaderBaseStateOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ReaderBaseStateOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/reader_base.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RegisteredGradient.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RegisteredGradient.java
    index 7bac26b1cf9..9131e5c26b6 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RegisteredGradient.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RegisteredGradient.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/function.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -14,12 +16,21 @@
      * Protobuf type {@code tensorflow.RegisteredGradient}
      */
     public final class RegisteredGradient extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.RegisteredGradient)
         RegisteredGradientOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      RegisteredGradient.class.getName());
    +  }
       // Use RegisteredGradient.newBuilder() to construct.
    -  private RegisteredGradient(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private RegisteredGradient(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private RegisteredGradient() {
    @@ -27,25 +38,13 @@ private RegisteredGradient() {
         registeredOpType_ = "";
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new RegisteredGradient();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.FunctionProtos.internal_static_tensorflow_RegisteredGradient_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.FunctionProtos.internal_static_tensorflow_RegisteredGradient_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -53,7 +52,8 @@ protected java.lang.Object newInstance(
       }
     
       public static final int GRADIENT_FUNC_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object gradientFunc_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object gradientFunc_ = "";
       /**
        * 
        * The gradient function's name.
    @@ -99,7 +99,8 @@ public java.lang.String getGradientFunc() {
       }
     
       public static final int REGISTERED_OP_TYPE_FIELD_NUMBER = 2;
    -  private volatile java.lang.Object registeredOpType_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object registeredOpType_ = "";
       /**
        * 
        * The gradient function's registered op type.
    @@ -158,11 +159,11 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gradientFunc_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, gradientFunc_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(gradientFunc_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, gradientFunc_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(registeredOpType_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, registeredOpType_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(registeredOpType_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 2, registeredOpType_);
         }
         getUnknownFields().writeTo(output);
       }
    @@ -173,11 +174,11 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gradientFunc_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, gradientFunc_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(gradientFunc_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, gradientFunc_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(registeredOpType_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, registeredOpType_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(registeredOpType_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(2, registeredOpType_);
         }
         size += getUnknownFields().getSerializedSize();
         memoizedSize = size;
    @@ -252,39 +253,41 @@ public static org.tensorflow.proto.RegisteredGradient parseFrom(
       }
       public static org.tensorflow.proto.RegisteredGradient parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.RegisteredGradient parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.RegisteredGradient parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.RegisteredGradient parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.RegisteredGradient parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.RegisteredGradient parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -304,7 +307,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -319,7 +322,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.RegisteredGradient}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.RegisteredGradient)
           org.tensorflow.proto.RegisteredGradientOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -328,7 +331,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.FunctionProtos.internal_static_tensorflow_RegisteredGradient_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -341,17 +344,16 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           gradientFunc_ = "";
    -
           registeredOpType_ = "";
    -
           return this;
         }
     
    @@ -378,44 +380,21 @@ public org.tensorflow.proto.RegisteredGradient build() {
         @java.lang.Override
         public org.tensorflow.proto.RegisteredGradient buildPartial() {
           org.tensorflow.proto.RegisteredGradient result = new org.tensorflow.proto.RegisteredGradient(this);
    -      result.gradientFunc_ = gradientFunc_;
    -      result.registeredOpType_ = registeredOpType_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.RegisteredGradient result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.gradientFunc_ = gradientFunc_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.registeredOpType_ = registeredOpType_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.RegisteredGradient) {
    @@ -430,10 +409,12 @@ public Builder mergeFrom(org.tensorflow.proto.RegisteredGradient other) {
           if (other == org.tensorflow.proto.RegisteredGradient.getDefaultInstance()) return this;
           if (!other.getGradientFunc().isEmpty()) {
             gradientFunc_ = other.gradientFunc_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (!other.getRegisteredOpType().isEmpty()) {
             registeredOpType_ = other.registeredOpType_;
    +        bitField0_ |= 0x00000002;
             onChanged();
           }
           this.mergeUnknownFields(other.getUnknownFields());
    @@ -464,12 +445,12 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   gradientFunc_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
                   registeredOpType_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 default: {
    @@ -487,6 +468,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private java.lang.Object gradientFunc_ = "";
         /**
    @@ -541,11 +523,9 @@ public java.lang.String getGradientFunc() {
          */
         public Builder setGradientFunc(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           gradientFunc_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -558,8 +538,8 @@ public Builder setGradientFunc(
          * @return This builder for chaining.
          */
         public Builder clearGradientFunc() {
    -      
           gradientFunc_ = getDefaultInstance().getGradientFunc();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -574,12 +554,10 @@ public Builder clearGradientFunc() {
          */
         public Builder setGradientFuncBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           gradientFunc_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -637,11 +615,9 @@ public java.lang.String getRegisteredOpType() {
          */
         public Builder setRegisteredOpType(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           registeredOpType_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -654,8 +630,8 @@ public Builder setRegisteredOpType(
          * @return This builder for chaining.
          */
         public Builder clearRegisteredOpType() {
    -      
           registeredOpType_ = getDefaultInstance().getRegisteredOpType();
    +      bitField0_ = (bitField0_ & ~0x00000002);
           onChanged();
           return this;
         }
    @@ -670,27 +646,13 @@ public Builder clearRegisteredOpType() {
          */
         public Builder setRegisteredOpTypeBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           registeredOpType_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.RegisteredGradient)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RegisteredGradientOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RegisteredGradientOrBuilder.java
    index 92ab6fd58d6..4ea34c7f055 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RegisteredGradientOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RegisteredGradientOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/function.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RequestedExitCode.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RequestedExitCode.java
    index a1d9e4a9e40..f092bc9bf5a 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RequestedExitCode.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RequestedExitCode.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/util/event.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,36 +9,33 @@
      * Protobuf type {@code tensorflow.RequestedExitCode}
      */
     public final class RequestedExitCode extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.RequestedExitCode)
         RequestedExitCodeOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      RequestedExitCode.class.getName());
    +  }
       // Use RequestedExitCode.newBuilder() to construct.
    -  private RequestedExitCode(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private RequestedExitCode(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private RequestedExitCode() {
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new RequestedExitCode();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.EventProtos.internal_static_tensorflow_RequestedExitCode_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.EventProtos.internal_static_tensorflow_RequestedExitCode_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -44,7 +43,7 @@ protected java.lang.Object newInstance(
       }
     
       public static final int EXIT_CODE_FIELD_NUMBER = 1;
    -  private int exitCode_;
    +  private int exitCode_ = 0;
       /**
        * int32 exit_code = 1;
        * @return The exitCode.
    @@ -153,39 +152,41 @@ public static org.tensorflow.proto.RequestedExitCode parseFrom(
       }
       public static org.tensorflow.proto.RequestedExitCode parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.RequestedExitCode parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.RequestedExitCode parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.RequestedExitCode parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.RequestedExitCode parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.RequestedExitCode parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -205,7 +206,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -213,7 +214,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.RequestedExitCode}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.RequestedExitCode)
           org.tensorflow.proto.RequestedExitCodeOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -222,7 +223,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.EventProtos.internal_static_tensorflow_RequestedExitCode_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -235,15 +236,15 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           exitCode_ = 0;
    -
           return this;
         }
     
    @@ -270,43 +271,18 @@ public org.tensorflow.proto.RequestedExitCode build() {
         @java.lang.Override
         public org.tensorflow.proto.RequestedExitCode buildPartial() {
           org.tensorflow.proto.RequestedExitCode result = new org.tensorflow.proto.RequestedExitCode(this);
    -      result.exitCode_ = exitCode_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.RequestedExitCode result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.exitCode_ = exitCode_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.RequestedExitCode) {
    @@ -350,7 +326,7 @@ public Builder mergeFrom(
                   break;
                 case 8: {
                   exitCode_ = input.readInt32();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 8
                 default: {
    @@ -368,6 +344,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private int exitCode_ ;
         /**
    @@ -384,8 +361,9 @@ public int getExitCode() {
          * @return This builder for chaining.
          */
         public Builder setExitCode(int value) {
    -      
    +
           exitCode_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -394,23 +372,11 @@ public Builder setExitCode(int value) {
          * @return This builder for chaining.
          */
         public Builder clearExitCode() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000001);
           exitCode_ = 0;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.RequestedExitCode)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RequestedExitCodeOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RequestedExitCodeOrBuilder.java
    index ae696b16d27..787bd99ff65 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RequestedExitCodeOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RequestedExitCodeOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/util/event.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ResourceHandle.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ResourceHandle.java
    index cda40fc6fe0..e9469d731c9 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ResourceHandle.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ResourceHandle.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/resource_handle.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class ResourceHandle {
       private ResourceHandle() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      ResourceHandle.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,12 +28,12 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_ResourceHandleProto_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_ResourceHandleProto_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_ResourceHandleProto_DtypeAndShape_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_ResourceHandleProto_DtypeAndShape_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -58,15 +69,16 @@ public static void registerAllExtensions(
         internal_static_tensorflow_ResourceHandleProto_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_ResourceHandleProto_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_ResourceHandleProto_descriptor,
             new java.lang.String[] { "Device", "Container", "Name", "HashCode", "MaybeTypeName", "DtypesAndShapes", });
         internal_static_tensorflow_ResourceHandleProto_DtypeAndShape_descriptor =
           internal_static_tensorflow_ResourceHandleProto_descriptor.getNestedTypes().get(0);
         internal_static_tensorflow_ResourceHandleProto_DtypeAndShape_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_ResourceHandleProto_DtypeAndShape_descriptor,
             new java.lang.String[] { "Dtype", "Shape", });
    +    descriptor.resolveAllFeaturesImmutable();
         org.tensorflow.proto.TensorShapeProtos.getDescriptor();
         org.tensorflow.proto.TypesProtos.getDescriptor();
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ResourceHandleProto.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ResourceHandleProto.java
    index df26d1e77cd..db1b56da824 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ResourceHandleProto.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ResourceHandleProto.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/resource_handle.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -13,12 +15,21 @@
      * Protobuf type {@code tensorflow.ResourceHandleProto}
      */
     public final class ResourceHandleProto extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.ResourceHandleProto)
         ResourceHandleProtoOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      ResourceHandleProto.class.getName());
    +  }
       // Use ResourceHandleProto.newBuilder() to construct.
    -  private ResourceHandleProto(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private ResourceHandleProto(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private ResourceHandleProto() {
    @@ -29,25 +40,13 @@ private ResourceHandleProto() {
         dtypesAndShapes_ = java.util.Collections.emptyList();
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new ResourceHandleProto();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.ResourceHandle.internal_static_tensorflow_ResourceHandleProto_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.ResourceHandle.internal_static_tensorflow_ResourceHandleProto_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -112,45 +111,43 @@ public interface DtypeAndShapeOrBuilder extends
        * Protobuf type {@code tensorflow.ResourceHandleProto.DtypeAndShape}
        */
       public static final class DtypeAndShape extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.ResourceHandleProto.DtypeAndShape)
           DtypeAndShapeOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        DtypeAndShape.class.getName());
    +    }
         // Use DtypeAndShape.newBuilder() to construct.
    -    private DtypeAndShape(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private DtypeAndShape(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private DtypeAndShape() {
           dtype_ = 0;
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new DtypeAndShape();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.ResourceHandle.internal_static_tensorflow_ResourceHandleProto_DtypeAndShape_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.ResourceHandle.internal_static_tensorflow_ResourceHandleProto_DtypeAndShape_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
                   org.tensorflow.proto.ResourceHandleProto.DtypeAndShape.class, org.tensorflow.proto.ResourceHandleProto.DtypeAndShape.Builder.class);
         }
     
    +    private int bitField0_;
         public static final int DTYPE_FIELD_NUMBER = 1;
    -    private int dtype_;
    +    private int dtype_ = 0;
         /**
          * 
          * Data type of the tensor.
    @@ -171,8 +168,7 @@ protected java.lang.Object newInstance(
          * @return The dtype.
          */
         @java.lang.Override public org.tensorflow.proto.DataType getDtype() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(dtype_);
    +      org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(dtype_);
           return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
         }
     
    @@ -188,7 +184,7 @@ protected java.lang.Object newInstance(
          */
         @java.lang.Override
         public boolean hasShape() {
    -      return shape_ != null;
    +      return ((bitField0_ & 0x00000001) != 0);
         }
         /**
          * 
    @@ -211,7 +207,7 @@ public org.tensorflow.proto.TensorShapeProto getShape() {
          */
         @java.lang.Override
         public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
    -      return getShape();
    +      return shape_ == null ? org.tensorflow.proto.TensorShapeProto.getDefaultInstance() : shape_;
         }
     
         private byte memoizedIsInitialized = -1;
    @@ -231,7 +227,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           if (dtype_ != org.tensorflow.proto.DataType.DT_INVALID.getNumber()) {
             output.writeEnum(1, dtype_);
           }
    -      if (shape_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             output.writeMessage(2, getShape());
           }
           getUnknownFields().writeTo(output);
    @@ -247,7 +243,7 @@ public int getSerializedSize() {
             size += com.google.protobuf.CodedOutputStream
               .computeEnumSize(1, dtype_);
           }
    -      if (shape_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(2, getShape());
           }
    @@ -328,39 +324,41 @@ public static org.tensorflow.proto.ResourceHandleProto.DtypeAndShape parseFrom(
         }
         public static org.tensorflow.proto.ResourceHandleProto.DtypeAndShape parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.ResourceHandleProto.DtypeAndShape parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.ResourceHandleProto.DtypeAndShape parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.ResourceHandleProto.DtypeAndShape parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.ResourceHandleProto.DtypeAndShape parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.ResourceHandleProto.DtypeAndShape parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -380,7 +378,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -392,7 +390,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.ResourceHandleProto.DtypeAndShape}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.ResourceHandleProto.DtypeAndShape)
             org.tensorflow.proto.ResourceHandleProto.DtypeAndShapeOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -401,7 +399,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.ResourceHandle.internal_static_tensorflow_ResourceHandleProto_DtypeAndShape_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -410,23 +408,28 @@ public static final class Builder extends
     
           // Construct using org.tensorflow.proto.ResourceHandleProto.DtypeAndShape.newBuilder()
           private Builder() {
    -
    +        maybeForceBuilderInitialization();
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
    -
    +        maybeForceBuilderInitialization();
    +      }
    +      private void maybeForceBuilderInitialization() {
    +        if (com.google.protobuf.GeneratedMessage
    +                .alwaysUseFieldBuilders) {
    +          getShapeFieldBuilder();
    +        }
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             dtype_ = 0;
    -
    -        if (shapeBuilder_ == null) {
    -          shape_ = null;
    -        } else {
    -          shape_ = null;
    +        shape_ = null;
    +        if (shapeBuilder_ != null) {
    +          shapeBuilder_.dispose();
               shapeBuilder_ = null;
             }
             return this;
    @@ -455,48 +458,26 @@ public org.tensorflow.proto.ResourceHandleProto.DtypeAndShape build() {
           @java.lang.Override
           public org.tensorflow.proto.ResourceHandleProto.DtypeAndShape buildPartial() {
             org.tensorflow.proto.ResourceHandleProto.DtypeAndShape result = new org.tensorflow.proto.ResourceHandleProto.DtypeAndShape(this);
    -        result.dtype_ = dtype_;
    -        if (shapeBuilder_ == null) {
    -          result.shape_ = shape_;
    -        } else {
    -          result.shape_ = shapeBuilder_.build();
    -        }
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.ResourceHandleProto.DtypeAndShape result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.dtype_ = dtype_;
    +        }
    +        int to_bitField0_ = 0;
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.shape_ = shapeBuilder_ == null
    +              ? shape_
    +              : shapeBuilder_.build();
    +          to_bitField0_ |= 0x00000001;
    +        }
    +        result.bitField0_ |= to_bitField0_;
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.ResourceHandleProto.DtypeAndShape) {
    @@ -543,14 +524,14 @@ public Builder mergeFrom(
                     break;
                   case 8: {
                     dtype_ = input.readEnum();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 8
                   case 18: {
                     input.readMessage(
                         getShapeFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 18
                   default: {
    @@ -568,6 +549,7 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    +      private int bitField0_;
     
           private int dtype_ = 0;
           /**
    @@ -591,8 +573,8 @@ public Builder mergeFrom(
            * @return This builder for chaining.
            */
           public Builder setDtypeValue(int value) {
    -        
             dtype_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -606,8 +588,7 @@ public Builder setDtypeValue(int value) {
            */
           @java.lang.Override
           public org.tensorflow.proto.DataType getDtype() {
    -        @SuppressWarnings("deprecation")
    -        org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(dtype_);
    +        org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(dtype_);
             return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
           }
           /**
    @@ -623,7 +604,7 @@ public Builder setDtype(org.tensorflow.proto.DataType value) {
             if (value == null) {
               throw new NullPointerException();
             }
    -        
    +        bitField0_ |= 0x00000001;
             dtype_ = value.getNumber();
             onChanged();
             return this;
    @@ -637,14 +618,14 @@ public Builder setDtype(org.tensorflow.proto.DataType value) {
            * @return This builder for chaining.
            */
           public Builder clearDtype() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000001);
             dtype_ = 0;
             onChanged();
             return this;
           }
     
           private org.tensorflow.proto.TensorShapeProto shape_;
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> shapeBuilder_;
           /**
            * 
    @@ -655,7 +636,7 @@ public Builder clearDtype() {
            * @return Whether the shape field is set.
            */
           public boolean hasShape() {
    -        return shapeBuilder_ != null || shape_ != null;
    +        return ((bitField0_ & 0x00000002) != 0);
           }
           /**
            * 
    @@ -685,11 +666,11 @@ public Builder setShape(org.tensorflow.proto.TensorShapeProto value) {
                 throw new NullPointerException();
               }
               shape_ = value;
    -          onChanged();
             } else {
               shapeBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000002;
    +        onChanged();
             return this;
           }
           /**
    @@ -703,11 +684,11 @@ public Builder setShape(
               org.tensorflow.proto.TensorShapeProto.Builder builderForValue) {
             if (shapeBuilder_ == null) {
               shape_ = builderForValue.build();
    -          onChanged();
             } else {
               shapeBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000002;
    +        onChanged();
             return this;
           }
           /**
    @@ -719,17 +700,20 @@ public Builder setShape(
            */
           public Builder mergeShape(org.tensorflow.proto.TensorShapeProto value) {
             if (shapeBuilder_ == null) {
    -          if (shape_ != null) {
    -            shape_ =
    -              org.tensorflow.proto.TensorShapeProto.newBuilder(shape_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000002) != 0) &&
    +            shape_ != null &&
    +            shape_ != org.tensorflow.proto.TensorShapeProto.getDefaultInstance()) {
    +            getShapeBuilder().mergeFrom(value);
               } else {
                 shape_ = value;
               }
    -          onChanged();
             } else {
               shapeBuilder_.mergeFrom(value);
             }
    -
    +        if (shape_ != null) {
    +          bitField0_ |= 0x00000002;
    +          onChanged();
    +        }
             return this;
           }
           /**
    @@ -740,14 +724,13 @@ public Builder mergeShape(org.tensorflow.proto.TensorShapeProto value) {
            * .tensorflow.TensorShapeProto shape = 2;
            */
           public Builder clearShape() {
    -        if (shapeBuilder_ == null) {
    -          shape_ = null;
    -          onChanged();
    -        } else {
    -          shape_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000002);
    +        shape_ = null;
    +        if (shapeBuilder_ != null) {
    +          shapeBuilder_.dispose();
               shapeBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
    @@ -758,7 +741,7 @@ public Builder clearShape() {
            * .tensorflow.TensorShapeProto shape = 2;
            */
           public org.tensorflow.proto.TensorShapeProto.Builder getShapeBuilder() {
    -        
    +        bitField0_ |= 0x00000002;
             onChanged();
             return getShapeFieldBuilder().getBuilder();
           }
    @@ -784,11 +767,11 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
            *
            * .tensorflow.TensorShapeProto shape = 2;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> 
               getShapeFieldBuilder() {
             if (shapeBuilder_ == null) {
    -          shapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          shapeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder>(
                       getShape(),
                       getParentForChildren(),
    @@ -797,18 +780,6 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
             }
             return shapeBuilder_;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.ResourceHandleProto.DtypeAndShape)
         }
    @@ -862,7 +833,8 @@ public org.tensorflow.proto.ResourceHandleProto.DtypeAndShape getDefaultInstance
       }
     
       public static final int DEVICE_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object device_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object device_ = "";
       /**
        * 
        * Unique name for the device containing the resource.
    @@ -908,7 +880,8 @@ public java.lang.String getDevice() {
       }
     
       public static final int CONTAINER_FIELD_NUMBER = 2;
    -  private volatile java.lang.Object container_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object container_ = "";
       /**
        * 
        * Container in which this resource is placed.
    @@ -954,7 +927,8 @@ public java.lang.String getContainer() {
       }
     
       public static final int NAME_FIELD_NUMBER = 3;
    -  private volatile java.lang.Object name_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object name_ = "";
       /**
        * 
        * Unique name of this resource.
    @@ -1000,7 +974,7 @@ public java.lang.String getName() {
       }
     
       public static final int HASH_CODE_FIELD_NUMBER = 4;
    -  private long hashCode_;
    +  private long hashCode_ = 0L;
       /**
        * 
        * Hash code for the type of the resource. Is only valid in the same device
    @@ -1016,7 +990,8 @@ public long getHashCode() {
       }
     
       public static final int MAYBE_TYPE_NAME_FIELD_NUMBER = 5;
    -  private volatile java.lang.Object maybeTypeName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object maybeTypeName_ = "";
       /**
        * 
        * For debug-only, the name of the type pointed to by this handle, if
    @@ -1064,6 +1039,7 @@ public java.lang.String getMaybeTypeName() {
       }
     
       public static final int DTYPES_AND_SHAPES_FIELD_NUMBER = 6;
    +  @SuppressWarnings("serial")
       private java.util.List dtypesAndShapes_;
       /**
        * 
    @@ -1137,20 +1113,20 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(device_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, device_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(device_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, device_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(container_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, container_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(container_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 2, container_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 3, name_);
         }
         if (hashCode_ != 0L) {
           output.writeUInt64(4, hashCode_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(maybeTypeName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, maybeTypeName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(maybeTypeName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 5, maybeTypeName_);
         }
         for (int i = 0; i < dtypesAndShapes_.size(); i++) {
           output.writeMessage(6, dtypesAndShapes_.get(i));
    @@ -1164,21 +1140,21 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(device_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, device_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(device_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, device_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(container_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, container_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(container_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(2, container_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(3, name_);
         }
         if (hashCode_ != 0L) {
           size += com.google.protobuf.CodedOutputStream
             .computeUInt64Size(4, hashCode_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(maybeTypeName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, maybeTypeName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(maybeTypeName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(5, maybeTypeName_);
         }
         for (int i = 0; i < dtypesAndShapes_.size(); i++) {
           size += com.google.protobuf.CodedOutputStream
    @@ -1276,39 +1252,41 @@ public static org.tensorflow.proto.ResourceHandleProto parseFrom(
       }
       public static org.tensorflow.proto.ResourceHandleProto parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.ResourceHandleProto parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.ResourceHandleProto parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.ResourceHandleProto parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.ResourceHandleProto parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.ResourceHandleProto parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -1328,7 +1306,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -1342,7 +1320,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.ResourceHandleProto}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.ResourceHandleProto)
           org.tensorflow.proto.ResourceHandleProtoOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -1351,7 +1329,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.ResourceHandle.internal_static_tensorflow_ResourceHandleProto_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -1364,30 +1342,26 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           device_ = "";
    -
           container_ = "";
    -
           name_ = "";
    -
           hashCode_ = 0L;
    -
           maybeTypeName_ = "";
    -
           if (dtypesAndShapesBuilder_ == null) {
             dtypesAndShapes_ = java.util.Collections.emptyList();
           } else {
             dtypesAndShapes_ = null;
             dtypesAndShapesBuilder_.clear();
           }
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      bitField0_ = (bitField0_ & ~0x00000020);
           return this;
         }
     
    @@ -1414,57 +1388,43 @@ public org.tensorflow.proto.ResourceHandleProto build() {
         @java.lang.Override
         public org.tensorflow.proto.ResourceHandleProto buildPartial() {
           org.tensorflow.proto.ResourceHandleProto result = new org.tensorflow.proto.ResourceHandleProto(this);
    -      int from_bitField0_ = bitField0_;
    -      result.device_ = device_;
    -      result.container_ = container_;
    -      result.name_ = name_;
    -      result.hashCode_ = hashCode_;
    -      result.maybeTypeName_ = maybeTypeName_;
    +      buildPartialRepeatedFields(result);
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartialRepeatedFields(org.tensorflow.proto.ResourceHandleProto result) {
           if (dtypesAndShapesBuilder_ == null) {
    -        if (((bitField0_ & 0x00000001) != 0)) {
    +        if (((bitField0_ & 0x00000020) != 0)) {
               dtypesAndShapes_ = java.util.Collections.unmodifiableList(dtypesAndShapes_);
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ = (bitField0_ & ~0x00000020);
             }
             result.dtypesAndShapes_ = dtypesAndShapes_;
           } else {
             result.dtypesAndShapes_ = dtypesAndShapesBuilder_.build();
           }
    -      onBuilt();
    -      return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.ResourceHandleProto result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.device_ = device_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.container_ = container_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.name_ = name_;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.hashCode_ = hashCode_;
    +      }
    +      if (((from_bitField0_ & 0x00000010) != 0)) {
    +        result.maybeTypeName_ = maybeTypeName_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.ResourceHandleProto) {
    @@ -1479,14 +1439,17 @@ public Builder mergeFrom(org.tensorflow.proto.ResourceHandleProto other) {
           if (other == org.tensorflow.proto.ResourceHandleProto.getDefaultInstance()) return this;
           if (!other.getDevice().isEmpty()) {
             device_ = other.device_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (!other.getContainer().isEmpty()) {
             container_ = other.container_;
    +        bitField0_ |= 0x00000002;
             onChanged();
           }
           if (!other.getName().isEmpty()) {
             name_ = other.name_;
    +        bitField0_ |= 0x00000004;
             onChanged();
           }
           if (other.getHashCode() != 0L) {
    @@ -1494,13 +1457,14 @@ public Builder mergeFrom(org.tensorflow.proto.ResourceHandleProto other) {
           }
           if (!other.getMaybeTypeName().isEmpty()) {
             maybeTypeName_ = other.maybeTypeName_;
    +        bitField0_ |= 0x00000010;
             onChanged();
           }
           if (dtypesAndShapesBuilder_ == null) {
             if (!other.dtypesAndShapes_.isEmpty()) {
               if (dtypesAndShapes_.isEmpty()) {
                 dtypesAndShapes_ = other.dtypesAndShapes_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000020);
               } else {
                 ensureDtypesAndShapesIsMutable();
                 dtypesAndShapes_.addAll(other.dtypesAndShapes_);
    @@ -1513,9 +1477,9 @@ public Builder mergeFrom(org.tensorflow.proto.ResourceHandleProto other) {
                 dtypesAndShapesBuilder_.dispose();
                 dtypesAndShapesBuilder_ = null;
                 dtypesAndShapes_ = other.dtypesAndShapes_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000020);
                 dtypesAndShapesBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getDtypesAndShapesFieldBuilder() : null;
               } else {
                 dtypesAndShapesBuilder_.addAllMessages(other.dtypesAndShapes_);
    @@ -1550,27 +1514,27 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   device_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
                   container_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 case 26: {
                   name_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 26
                 case 32: {
                   hashCode_ = input.readUInt64();
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 32
                 case 42: {
                   maybeTypeName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000010;
                   break;
                 } // case 42
                 case 50: {
    @@ -1656,11 +1620,9 @@ public java.lang.String getDevice() {
          */
         public Builder setDevice(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           device_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -1673,8 +1635,8 @@ public Builder setDevice(
          * @return This builder for chaining.
          */
         public Builder clearDevice() {
    -      
           device_ = getDefaultInstance().getDevice();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -1689,12 +1651,10 @@ public Builder clearDevice() {
          */
         public Builder setDeviceBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           device_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -1752,11 +1712,9 @@ public java.lang.String getContainer() {
          */
         public Builder setContainer(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           container_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -1769,8 +1727,8 @@ public Builder setContainer(
          * @return This builder for chaining.
          */
         public Builder clearContainer() {
    -      
           container_ = getDefaultInstance().getContainer();
    +      bitField0_ = (bitField0_ & ~0x00000002);
           onChanged();
           return this;
         }
    @@ -1785,12 +1743,10 @@ public Builder clearContainer() {
          */
         public Builder setContainerBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           container_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -1848,11 +1804,9 @@ public java.lang.String getName() {
          */
         public Builder setName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           name_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -1865,8 +1819,8 @@ public Builder setName(
          * @return This builder for chaining.
          */
         public Builder clearName() {
    -      
           name_ = getDefaultInstance().getName();
    +      bitField0_ = (bitField0_ & ~0x00000004);
           onChanged();
           return this;
         }
    @@ -1881,12 +1835,10 @@ public Builder clearName() {
          */
         public Builder setNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           name_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -1916,8 +1868,9 @@ public long getHashCode() {
          * @return This builder for chaining.
          */
         public Builder setHashCode(long value) {
    -      
    +
           hashCode_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -1931,7 +1884,7 @@ public Builder setHashCode(long value) {
          * @return This builder for chaining.
          */
         public Builder clearHashCode() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000008);
           hashCode_ = 0L;
           onChanged();
           return this;
    @@ -1993,11 +1946,9 @@ public java.lang.String getMaybeTypeName() {
          */
         public Builder setMaybeTypeName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           maybeTypeName_ = value;
    +      bitField0_ |= 0x00000010;
           onChanged();
           return this;
         }
    @@ -2011,8 +1962,8 @@ public Builder setMaybeTypeName(
          * @return This builder for chaining.
          */
         public Builder clearMaybeTypeName() {
    -      
           maybeTypeName_ = getDefaultInstance().getMaybeTypeName();
    +      bitField0_ = (bitField0_ & ~0x00000010);
           onChanged();
           return this;
         }
    @@ -2028,12 +1979,10 @@ public Builder clearMaybeTypeName() {
          */
         public Builder setMaybeTypeNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           maybeTypeName_ = value;
    +      bitField0_ |= 0x00000010;
           onChanged();
           return this;
         }
    @@ -2041,13 +1990,13 @@ public Builder setMaybeTypeNameBytes(
         private java.util.List dtypesAndShapes_ =
           java.util.Collections.emptyList();
         private void ensureDtypesAndShapesIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    +      if (!((bitField0_ & 0x00000020) != 0)) {
             dtypesAndShapes_ = new java.util.ArrayList(dtypesAndShapes_);
    -        bitField0_ |= 0x00000001;
    +        bitField0_ |= 0x00000020;
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.ResourceHandleProto.DtypeAndShape, org.tensorflow.proto.ResourceHandleProto.DtypeAndShape.Builder, org.tensorflow.proto.ResourceHandleProto.DtypeAndShapeOrBuilder> dtypesAndShapesBuilder_;
     
         /**
    @@ -2237,7 +2186,7 @@ public Builder addAllDtypesAndShapes(
         public Builder clearDtypesAndShapes() {
           if (dtypesAndShapesBuilder_ == null) {
             dtypesAndShapes_ = java.util.Collections.emptyList();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        bitField0_ = (bitField0_ & ~0x00000020);
             onChanged();
           } else {
             dtypesAndShapesBuilder_.clear();
    @@ -2335,32 +2284,20 @@ public org.tensorflow.proto.ResourceHandleProto.DtypeAndShape.Builder addDtypesA
              getDtypesAndShapesBuilderList() {
           return getDtypesAndShapesFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.ResourceHandleProto.DtypeAndShape, org.tensorflow.proto.ResourceHandleProto.DtypeAndShape.Builder, org.tensorflow.proto.ResourceHandleProto.DtypeAndShapeOrBuilder> 
             getDtypesAndShapesFieldBuilder() {
           if (dtypesAndShapesBuilder_ == null) {
    -        dtypesAndShapesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        dtypesAndShapesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.ResourceHandleProto.DtypeAndShape, org.tensorflow.proto.ResourceHandleProto.DtypeAndShape.Builder, org.tensorflow.proto.ResourceHandleProto.DtypeAndShapeOrBuilder>(
                     dtypesAndShapes_,
    -                ((bitField0_ & 0x00000001) != 0),
    +                ((bitField0_ & 0x00000020) != 0),
                     getParentForChildren(),
                     isClean());
             dtypesAndShapes_ = null;
           }
           return dtypesAndShapesBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.ResourceHandleProto)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ResourceHandleProtoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ResourceHandleProtoOrBuilder.java
    index 0dca457a0fe..3add868cb14 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ResourceHandleProtoOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ResourceHandleProtoOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/resource_handle.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RewriterConfig.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RewriterConfig.java
    index c235fb30634..f5a2645ffb1 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RewriterConfig.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RewriterConfig.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/rewriter_config.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -12,12 +14,21 @@
      * Protobuf type {@code tensorflow.RewriterConfig}
      */
     public final class RewriterConfig extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.RewriterConfig)
         RewriterConfigOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      RewriterConfig.class.getName());
    +  }
       // Use RewriterConfig.newBuilder() to construct.
    -  private RewriterConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private RewriterConfig(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private RewriterConfig() {
    @@ -44,29 +55,18 @@ private RewriterConfig() {
         metaOptimizerIterations_ = 0;
         memoryOptimization_ = 0;
         memoryOptimizerTargetNodeNameScope_ = "";
    -    optimizers_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +    optimizers_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         customOptimizers_ = java.util.Collections.emptyList();
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new RewriterConfig();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.RewriterConfigProtos.internal_static_tensorflow_RewriterConfig_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.RewriterConfigProtos.internal_static_tensorflow_RewriterConfig_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -122,6 +122,15 @@ public enum Toggle
         UNRECOGNIZED(-1),
         ;
     
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        Toggle.class.getName());
    +    }
         /**
          * DEFAULT = 0;
          */
    @@ -275,6 +284,15 @@ public enum CpuLayout
         UNRECOGNIZED(-1),
         ;
     
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        CpuLayout.class.getName());
    +    }
         /**
          * NO_CONVERSION_ON_CPU = 0;
          */
    @@ -397,6 +415,15 @@ public enum NumIterationsType
         UNRECOGNIZED(-1),
         ;
     
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        NumIterationsType.class.getName());
    +    }
         /**
          * DEFAULT_NUM_ITERS = 0;
          */
    @@ -561,6 +588,15 @@ public enum MemOptType
         UNRECOGNIZED(-1),
         ;
     
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        MemOptType.class.getName());
    +    }
         /**
          * 
          * The default setting (SCHEDULING and SWAPPING HEURISTICS only)
    @@ -748,7 +784,6 @@ boolean containsParameterMap(
         /**
          * map<string, .tensorflow.AttrValue> parameter_map = 2;
          */
    -
         /* nullable */
     org.tensorflow.proto.AttrValue getParameterMapOrDefault(
             java.lang.String key,
    @@ -757,7 +792,6 @@ org.tensorflow.proto.AttrValue getParameterMapOrDefault(
         /**
          * map<string, .tensorflow.AttrValue> parameter_map = 2;
          */
    -
         org.tensorflow.proto.AttrValue getParameterMapOrThrow(
             java.lang.String key);
       }
    @@ -769,30 +803,27 @@ org.tensorflow.proto.AttrValue getParameterMapOrThrow(
        * Protobuf type {@code tensorflow.RewriterConfig.CustomGraphOptimizer}
        */
       public static final class CustomGraphOptimizer extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.RewriterConfig.CustomGraphOptimizer)
           CustomGraphOptimizerOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        CustomGraphOptimizer.class.getName());
    +    }
         // Use CustomGraphOptimizer.newBuilder() to construct.
    -    private CustomGraphOptimizer(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private CustomGraphOptimizer(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private CustomGraphOptimizer() {
           name_ = "";
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new CustomGraphOptimizer();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.RewriterConfigProtos.internal_static_tensorflow_RewriterConfig_CustomGraphOptimizer_descriptor;
    @@ -800,7 +831,7 @@ protected java.lang.Object newInstance(
     
         @SuppressWarnings({"rawtypes"})
         @java.lang.Override
    -    protected com.google.protobuf.MapField internalGetMapField(
    +    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
             int number) {
           switch (number) {
             case 2:
    @@ -811,7 +842,7 @@ protected com.google.protobuf.MapField internalGetMapField(
           }
         }
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.RewriterConfigProtos.internal_static_tensorflow_RewriterConfig_CustomGraphOptimizer_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -819,7 +850,8 @@ protected com.google.protobuf.MapField internalGetMapField(
         }
     
         public static final int NAME_FIELD_NUMBER = 1;
    -    private volatile java.lang.Object name_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object name_ = "";
         /**
          * string name = 1;
          * @return The name.
    @@ -868,6 +900,7 @@ private static final class ParameterMapDefaultEntryHolder {
                       com.google.protobuf.WireFormat.FieldType.MESSAGE,
                       org.tensorflow.proto.AttrValue.getDefaultInstance());
         }
    +    @SuppressWarnings("serial")
         private com.google.protobuf.MapField<
             java.lang.String, org.tensorflow.proto.AttrValue> parameterMap_;
         private com.google.protobuf.MapField
    @@ -878,14 +911,12 @@ private static final class ParameterMapDefaultEntryHolder {
           }
           return parameterMap_;
         }
    -
         public int getParameterMapCount() {
           return internalGetParameterMap().getMap().size();
         }
         /**
          * map<string, .tensorflow.AttrValue> parameter_map = 2;
          */
    -
         @java.lang.Override
         public boolean containsParameterMap(
             java.lang.String key) {
    @@ -904,7 +935,6 @@ public java.util.Map getParame
          * map<string, .tensorflow.AttrValue> parameter_map = 2;
          */
         @java.lang.Override
    -
         public java.util.Map getParameterMapMap() {
           return internalGetParameterMap().getMap();
         }
    @@ -912,10 +942,11 @@ public java.util.Map getParame
          * map<string, .tensorflow.AttrValue> parameter_map = 2;
          */
         @java.lang.Override
    -
    -    public org.tensorflow.proto.AttrValue getParameterMapOrDefault(
    +    public /* nullable */
    +org.tensorflow.proto.AttrValue getParameterMapOrDefault(
             java.lang.String key,
    -        org.tensorflow.proto.AttrValue defaultValue) {
    +        /* nullable */
    +org.tensorflow.proto.AttrValue defaultValue) {
           if (key == null) { throw new NullPointerException("map key"); }
           java.util.Map map =
               internalGetParameterMap().getMap();
    @@ -925,7 +956,6 @@ public org.tensorflow.proto.AttrValue getParameterMapOrDefault(
          * map<string, .tensorflow.AttrValue> parameter_map = 2;
          */
         @java.lang.Override
    -
         public org.tensorflow.proto.AttrValue getParameterMapOrThrow(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    @@ -951,10 +981,10 @@ public final boolean isInitialized() {
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output)
                             throws java.io.IOException {
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
           }
    -      com.google.protobuf.GeneratedMessageV3
    +      com.google.protobuf.GeneratedMessage
             .serializeStringMapTo(
               output,
               internalGetParameterMap(),
    @@ -969,8 +999,8 @@ public int getSerializedSize() {
           if (size != -1) return size;
     
           size = 0;
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
           }
           for (java.util.Map.Entry entry
                : internalGetParameterMap().getMap().entrySet()) {
    @@ -1057,39 +1087,41 @@ public static org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer parseFrom
         }
         public static org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -1109,7 +1141,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -1121,7 +1153,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.RewriterConfig.CustomGraphOptimizer}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.RewriterConfig.CustomGraphOptimizer)
             org.tensorflow.proto.RewriterConfig.CustomGraphOptimizerOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -1130,7 +1162,7 @@ public static final class Builder extends
           }
     
           @SuppressWarnings({"rawtypes"})
    -      protected com.google.protobuf.MapField internalGetMapField(
    +      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
               int number) {
             switch (number) {
               case 2:
    @@ -1141,7 +1173,7 @@ protected com.google.protobuf.MapField internalGetMapField(
             }
           }
           @SuppressWarnings({"rawtypes"})
    -      protected com.google.protobuf.MapField internalGetMutableMapField(
    +      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
               int number) {
             switch (number) {
               case 2:
    @@ -1152,7 +1184,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField(
             }
           }
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.RewriterConfigProtos.internal_static_tensorflow_RewriterConfig_CustomGraphOptimizer_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -1165,15 +1197,15 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             name_ = "";
    -
             internalGetMutableParameterMap().clear();
             return this;
           }
    @@ -1201,46 +1233,21 @@ public org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer build() {
           @java.lang.Override
           public org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer buildPartial() {
             org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer result = new org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer(this);
    -        int from_bitField0_ = bitField0_;
    -        result.name_ = name_;
    -        result.parameterMap_ = internalGetParameterMap();
    -        result.parameterMap_.makeImmutable();
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.name_ = name_;
    +        }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.parameterMap_ = internalGetParameterMap().build(ParameterMapDefaultEntryHolder.defaultEntry);
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer) {
    @@ -1255,10 +1262,12 @@ public Builder mergeFrom(org.tensorflow.proto.RewriterConfig.CustomGraphOptimize
             if (other == org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer.getDefaultInstance()) return this;
             if (!other.getName().isEmpty()) {
               name_ = other.name_;
    +          bitField0_ |= 0x00000001;
               onChanged();
             }
             internalGetMutableParameterMap().mergeFrom(
                 other.internalGetParameterMap());
    +        bitField0_ |= 0x00000002;
             this.mergeUnknownFields(other.getUnknownFields());
             onChanged();
             return this;
    @@ -1287,15 +1296,16 @@ public Builder mergeFrom(
                     break;
                   case 10: {
                     name_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 10
                   case 18: {
                     com.google.protobuf.MapEntry
                     parameterMap__ = input.readMessage(
                         ParameterMapDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
    -                internalGetMutableParameterMap().getMutableMap().put(
    +                internalGetMutableParameterMap().ensureBuilderMap().put(
                         parameterMap__.getKey(), parameterMap__.getValue());
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 18
                   default: {
    @@ -1356,11 +1366,9 @@ public java.lang.String getName() {
            */
           public Builder setName(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             name_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -1369,8 +1377,8 @@ public Builder setName(
            * @return This builder for chaining.
            */
           public Builder clearName() {
    -        
             name_ = getDefaultInstance().getName();
    +        bitField0_ = (bitField0_ & ~0x00000001);
             onChanged();
             return this;
           }
    @@ -1381,51 +1389,57 @@ public Builder clearName() {
            */
           public Builder setNameBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             name_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
     
    -      private com.google.protobuf.MapField<
    -          java.lang.String, org.tensorflow.proto.AttrValue> parameterMap_;
    -      private com.google.protobuf.MapField
    -      internalGetParameterMap() {
    +      private static final class ParameterMapConverter implements com.google.protobuf.MapFieldBuilder.Converter {
    +        @java.lang.Override
    +        public org.tensorflow.proto.AttrValue build(org.tensorflow.proto.AttrValueOrBuilder val) {
    +          if (val instanceof org.tensorflow.proto.AttrValue) { return (org.tensorflow.proto.AttrValue) val; }
    +          return ((org.tensorflow.proto.AttrValue.Builder) val).build();
    +        }
    +
    +        @java.lang.Override
    +        public com.google.protobuf.MapEntry defaultEntry() {
    +          return ParameterMapDefaultEntryHolder.defaultEntry;
    +        }
    +      };
    +      private static final ParameterMapConverter parameterMapConverter = new ParameterMapConverter();
    +
    +      private com.google.protobuf.MapFieldBuilder<
    +          java.lang.String, org.tensorflow.proto.AttrValueOrBuilder, org.tensorflow.proto.AttrValue, org.tensorflow.proto.AttrValue.Builder> parameterMap_;
    +      private com.google.protobuf.MapFieldBuilder
    +          internalGetParameterMap() {
             if (parameterMap_ == null) {
    -          return com.google.protobuf.MapField.emptyMapField(
    -              ParameterMapDefaultEntryHolder.defaultEntry);
    +          return new com.google.protobuf.MapFieldBuilder<>(parameterMapConverter);
             }
             return parameterMap_;
           }
    -      private com.google.protobuf.MapField
    -      internalGetMutableParameterMap() {
    -        onChanged();;
    +      private com.google.protobuf.MapFieldBuilder
    +          internalGetMutableParameterMap() {
             if (parameterMap_ == null) {
    -          parameterMap_ = com.google.protobuf.MapField.newMapField(
    -              ParameterMapDefaultEntryHolder.defaultEntry);
    -        }
    -        if (!parameterMap_.isMutable()) {
    -          parameterMap_ = parameterMap_.copy();
    +          parameterMap_ = new com.google.protobuf.MapFieldBuilder<>(parameterMapConverter);
             }
    +        bitField0_ |= 0x00000002;
    +        onChanged();
             return parameterMap_;
           }
    -
           public int getParameterMapCount() {
    -        return internalGetParameterMap().getMap().size();
    +        return internalGetParameterMap().ensureBuilderMap().size();
           }
           /**
            * map<string, .tensorflow.AttrValue> parameter_map = 2;
            */
    -
           @java.lang.Override
           public boolean containsParameterMap(
               java.lang.String key) {
             if (key == null) { throw new NullPointerException("map key"); }
    -        return internalGetParameterMap().getMap().containsKey(key);
    +        return internalGetParameterMap().ensureBuilderMap().containsKey(key);
           }
           /**
            * Use {@link #getParameterMapMap()} instead.
    @@ -1439,52 +1453,47 @@ public java.util.Map getParame
            * map<string, .tensorflow.AttrValue> parameter_map = 2;
            */
           @java.lang.Override
    -
           public java.util.Map getParameterMapMap() {
    -        return internalGetParameterMap().getMap();
    +        return internalGetParameterMap().getImmutableMap();
           }
           /**
            * map<string, .tensorflow.AttrValue> parameter_map = 2;
            */
           @java.lang.Override
    -
    -      public org.tensorflow.proto.AttrValue getParameterMapOrDefault(
    +      public /* nullable */
    +org.tensorflow.proto.AttrValue getParameterMapOrDefault(
               java.lang.String key,
    -          org.tensorflow.proto.AttrValue defaultValue) {
    +          /* nullable */
    +org.tensorflow.proto.AttrValue defaultValue) {
             if (key == null) { throw new NullPointerException("map key"); }
    -        java.util.Map map =
    -            internalGetParameterMap().getMap();
    -        return map.containsKey(key) ? map.get(key) : defaultValue;
    +        java.util.Map map = internalGetMutableParameterMap().ensureBuilderMap();
    +        return map.containsKey(key) ? parameterMapConverter.build(map.get(key)) : defaultValue;
           }
           /**
            * map<string, .tensorflow.AttrValue> parameter_map = 2;
            */
           @java.lang.Override
    -
           public org.tensorflow.proto.AttrValue getParameterMapOrThrow(
               java.lang.String key) {
             if (key == null) { throw new NullPointerException("map key"); }
    -        java.util.Map map =
    -            internalGetParameterMap().getMap();
    +        java.util.Map map = internalGetMutableParameterMap().ensureBuilderMap();
             if (!map.containsKey(key)) {
               throw new java.lang.IllegalArgumentException();
             }
    -        return map.get(key);
    +        return parameterMapConverter.build(map.get(key));
           }
    -
           public Builder clearParameterMap() {
    -        internalGetMutableParameterMap().getMutableMap()
    -            .clear();
    +        bitField0_ = (bitField0_ & ~0x00000002);
    +        internalGetMutableParameterMap().clear();
             return this;
           }
           /**
            * map<string, .tensorflow.AttrValue> parameter_map = 2;
            */
    -
           public Builder removeParameterMap(
               java.lang.String key) {
             if (key == null) { throw new NullPointerException("map key"); }
    -        internalGetMutableParameterMap().getMutableMap()
    +        internalGetMutableParameterMap().ensureBuilderMap()
                 .remove(key);
             return this;
           }
    @@ -1493,8 +1502,9 @@ public Builder removeParameterMap(
            */
           @java.lang.Deprecated
           public java.util.Map
    -      getMutableParameterMap() {
    -        return internalGetMutableParameterMap().getMutableMap();
    +          getMutableParameterMap() {
    +        bitField0_ |= 0x00000002;
    +        return internalGetMutableParameterMap().ensureMessageMap();
           }
           /**
            * map<string, .tensorflow.AttrValue> parameter_map = 2;
    @@ -1503,37 +1513,45 @@ public Builder putParameterMap(
               java.lang.String key,
               org.tensorflow.proto.AttrValue value) {
             if (key == null) { throw new NullPointerException("map key"); }
    -        if (value == null) {
    -  throw new NullPointerException("map value");
    -}
    -
    -        internalGetMutableParameterMap().getMutableMap()
    +        if (value == null) { throw new NullPointerException("map value"); }
    +        internalGetMutableParameterMap().ensureBuilderMap()
                 .put(key, value);
    +        bitField0_ |= 0x00000002;
             return this;
           }
           /**
            * map<string, .tensorflow.AttrValue> parameter_map = 2;
            */
    -
           public Builder putAllParameterMap(
               java.util.Map values) {
    -        internalGetMutableParameterMap().getMutableMap()
    +        for (java.util.Map.Entry e : values.entrySet()) {
    +          if (e.getKey() == null || e.getValue() == null) {
    +            throw new NullPointerException();
    +          }
    +        }
    +        internalGetMutableParameterMap().ensureBuilderMap()
                 .putAll(values);
    +        bitField0_ |= 0x00000002;
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    +      /**
    +       * map<string, .tensorflow.AttrValue> parameter_map = 2;
    +       */
    +      public org.tensorflow.proto.AttrValue.Builder putParameterMapBuilderIfAbsent(
    +          java.lang.String key) {
    +        java.util.Map builderMap = internalGetMutableParameterMap().ensureBuilderMap();
    +        org.tensorflow.proto.AttrValueOrBuilder entry = builderMap.get(key);
    +        if (entry == null) {
    +          entry = org.tensorflow.proto.AttrValue.newBuilder();
    +          builderMap.put(key, entry);
    +        }
    +        if (entry instanceof org.tensorflow.proto.AttrValue) {
    +          entry = ((org.tensorflow.proto.AttrValue) entry).toBuilder();
    +          builderMap.put(key, entry);
    +        }
    +        return (org.tensorflow.proto.AttrValue.Builder) entry;
           }
     
    -
           // @@protoc_insertion_point(builder_scope:tensorflow.RewriterConfig.CustomGraphOptimizer)
         }
     
    @@ -1585,8 +1603,9 @@ public org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer getDefaultInstan
     
       }
     
    +  private int bitField0_;
       public static final int CPU_LAYOUT_CONVERSION_FIELD_NUMBER = 50;
    -  private int cpuLayoutConversion_;
    +  private int cpuLayoutConversion_ = 0;
       /**
        * 
        * CPU Conversion settings between NHCW and NCHW.
    @@ -1607,13 +1626,12 @@ public org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer getDefaultInstan
        * @return The cpuLayoutConversion.
        */
       @java.lang.Override public org.tensorflow.proto.RewriterConfig.CpuLayout getCpuLayoutConversion() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.RewriterConfig.CpuLayout result = org.tensorflow.proto.RewriterConfig.CpuLayout.valueOf(cpuLayoutConversion_);
    +    org.tensorflow.proto.RewriterConfig.CpuLayout result = org.tensorflow.proto.RewriterConfig.CpuLayout.forNumber(cpuLayoutConversion_);
         return result == null ? org.tensorflow.proto.RewriterConfig.CpuLayout.UNRECOGNIZED : result;
       }
     
       public static final int LAYOUT_OPTIMIZER_FIELD_NUMBER = 1;
    -  private int layoutOptimizer_;
    +  private int layoutOptimizer_ = 0;
       /**
        * 
        * Optimize tensor layouts (default is ON)
    @@ -1636,13 +1654,12 @@ public org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer getDefaultInstan
        * @return The layoutOptimizer.
        */
       @java.lang.Override public org.tensorflow.proto.RewriterConfig.Toggle getLayoutOptimizer() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.valueOf(layoutOptimizer_);
    +    org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.forNumber(layoutOptimizer_);
         return result == null ? org.tensorflow.proto.RewriterConfig.Toggle.UNRECOGNIZED : result;
       }
     
       public static final int CONSTANT_FOLDING_FIELD_NUMBER = 3;
    -  private int constantFolding_;
    +  private int constantFolding_ = 0;
       /**
        * 
        * Fold constants (default is ON)
    @@ -1667,13 +1684,12 @@ public org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer getDefaultInstan
        * @return The constantFolding.
        */
       @java.lang.Override public org.tensorflow.proto.RewriterConfig.Toggle getConstantFolding() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.valueOf(constantFolding_);
    +    org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.forNumber(constantFolding_);
         return result == null ? org.tensorflow.proto.RewriterConfig.Toggle.UNRECOGNIZED : result;
       }
     
       public static final int SHAPE_OPTIMIZATION_FIELD_NUMBER = 13;
    -  private int shapeOptimization_;
    +  private int shapeOptimization_ = 0;
       /**
        * 
        * Shape optimizations (default is ON)
    @@ -1696,13 +1712,12 @@ public org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer getDefaultInstan
        * @return The shapeOptimization.
        */
       @java.lang.Override public org.tensorflow.proto.RewriterConfig.Toggle getShapeOptimization() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.valueOf(shapeOptimization_);
    +    org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.forNumber(shapeOptimization_);
         return result == null ? org.tensorflow.proto.RewriterConfig.Toggle.UNRECOGNIZED : result;
       }
     
       public static final int REMAPPING_FIELD_NUMBER = 14;
    -  private int remapping_;
    +  private int remapping_ = 0;
       /**
        * 
        * Remapping (default is ON)
    @@ -1725,13 +1740,12 @@ public org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer getDefaultInstan
        * @return The remapping.
        */
       @java.lang.Override public org.tensorflow.proto.RewriterConfig.Toggle getRemapping() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.valueOf(remapping_);
    +    org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.forNumber(remapping_);
         return result == null ? org.tensorflow.proto.RewriterConfig.Toggle.UNRECOGNIZED : result;
       }
     
       public static final int COMMON_SUBGRAPH_ELIMINATION_FIELD_NUMBER = 24;
    -  private int commonSubgraphElimination_;
    +  private int commonSubgraphElimination_ = 0;
       /**
        * 
        * Common subgraph elimination (default is ON)
    @@ -1754,13 +1768,12 @@ public org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer getDefaultInstan
        * @return The commonSubgraphElimination.
        */
       @java.lang.Override public org.tensorflow.proto.RewriterConfig.Toggle getCommonSubgraphElimination() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.valueOf(commonSubgraphElimination_);
    +    org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.forNumber(commonSubgraphElimination_);
         return result == null ? org.tensorflow.proto.RewriterConfig.Toggle.UNRECOGNIZED : result;
       }
     
       public static final int ARITHMETIC_OPTIMIZATION_FIELD_NUMBER = 7;
    -  private int arithmeticOptimization_;
    +  private int arithmeticOptimization_ = 0;
       /**
        * 
        * Arithmetic optimizations (default is ON)
    @@ -1783,13 +1796,12 @@ public org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer getDefaultInstan
        * @return The arithmeticOptimization.
        */
       @java.lang.Override public org.tensorflow.proto.RewriterConfig.Toggle getArithmeticOptimization() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.valueOf(arithmeticOptimization_);
    +    org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.forNumber(arithmeticOptimization_);
         return result == null ? org.tensorflow.proto.RewriterConfig.Toggle.UNRECOGNIZED : result;
       }
     
       public static final int DEPENDENCY_OPTIMIZATION_FIELD_NUMBER = 8;
    -  private int dependencyOptimization_;
    +  private int dependencyOptimization_ = 0;
       /**
        * 
        * Control dependency optimizations (default is ON).
    @@ -1812,13 +1824,12 @@ public org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer getDefaultInstan
        * @return The dependencyOptimization.
        */
       @java.lang.Override public org.tensorflow.proto.RewriterConfig.Toggle getDependencyOptimization() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.valueOf(dependencyOptimization_);
    +    org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.forNumber(dependencyOptimization_);
         return result == null ? org.tensorflow.proto.RewriterConfig.Toggle.UNRECOGNIZED : result;
       }
     
       public static final int LOOP_OPTIMIZATION_FIELD_NUMBER = 9;
    -  private int loopOptimization_;
    +  private int loopOptimization_ = 0;
       /**
        * 
        * Loop optimizations (default is ON).
    @@ -1839,13 +1850,12 @@ public org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer getDefaultInstan
        * @return The loopOptimization.
        */
       @java.lang.Override public org.tensorflow.proto.RewriterConfig.Toggle getLoopOptimization() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.valueOf(loopOptimization_);
    +    org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.forNumber(loopOptimization_);
         return result == null ? org.tensorflow.proto.RewriterConfig.Toggle.UNRECOGNIZED : result;
       }
     
       public static final int FUNCTION_OPTIMIZATION_FIELD_NUMBER = 10;
    -  private int functionOptimization_;
    +  private int functionOptimization_ = 0;
       /**
        * 
        * Function optimizations (default is ON).
    @@ -1866,13 +1876,12 @@ public org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer getDefaultInstan
        * @return The functionOptimization.
        */
       @java.lang.Override public org.tensorflow.proto.RewriterConfig.Toggle getFunctionOptimization() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.valueOf(functionOptimization_);
    +    org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.forNumber(functionOptimization_);
         return result == null ? org.tensorflow.proto.RewriterConfig.Toggle.UNRECOGNIZED : result;
       }
     
       public static final int DEBUG_STRIPPER_FIELD_NUMBER = 11;
    -  private int debugStripper_;
    +  private int debugStripper_ = 0;
       /**
        * 
        * Strips debug-related nodes from the graph (off by default).
    @@ -1893,13 +1902,12 @@ public org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer getDefaultInstan
        * @return The debugStripper.
        */
       @java.lang.Override public org.tensorflow.proto.RewriterConfig.Toggle getDebugStripper() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.valueOf(debugStripper_);
    +    org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.forNumber(debugStripper_);
         return result == null ? org.tensorflow.proto.RewriterConfig.Toggle.UNRECOGNIZED : result;
       }
     
       public static final int DISABLE_MODEL_PRUNING_FIELD_NUMBER = 2;
    -  private boolean disableModelPruning_;
    +  private boolean disableModelPruning_ = false;
       /**
        * 
        * If true, don't remove unnecessary ops from the graph
    @@ -1914,7 +1922,7 @@ public boolean getDisableModelPruning() {
       }
     
       public static final int SCOPED_ALLOCATOR_OPTIMIZATION_FIELD_NUMBER = 15;
    -  private int scopedAllocatorOptimization_;
    +  private int scopedAllocatorOptimization_ = 0;
       /**
        * 
        * Try to allocate some independent Op outputs contiguously in order to
    @@ -1937,13 +1945,12 @@ public boolean getDisableModelPruning() {
        * @return The scopedAllocatorOptimization.
        */
       @java.lang.Override public org.tensorflow.proto.RewriterConfig.Toggle getScopedAllocatorOptimization() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.valueOf(scopedAllocatorOptimization_);
    +    org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.forNumber(scopedAllocatorOptimization_);
         return result == null ? org.tensorflow.proto.RewriterConfig.Toggle.UNRECOGNIZED : result;
       }
     
       public static final int PIN_TO_HOST_OPTIMIZATION_FIELD_NUMBER = 18;
    -  private int pinToHostOptimization_;
    +  private int pinToHostOptimization_ = 0;
       /**
        * 
        * Force small ops onto the CPU (default is OFF).
    @@ -1964,13 +1971,12 @@ public boolean getDisableModelPruning() {
        * @return The pinToHostOptimization.
        */
       @java.lang.Override public org.tensorflow.proto.RewriterConfig.Toggle getPinToHostOptimization() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.valueOf(pinToHostOptimization_);
    +    org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.forNumber(pinToHostOptimization_);
         return result == null ? org.tensorflow.proto.RewriterConfig.Toggle.UNRECOGNIZED : result;
       }
     
       public static final int IMPLEMENTATION_SELECTOR_FIELD_NUMBER = 22;
    -  private int implementationSelector_;
    +  private int implementationSelector_ = 0;
       /**
        * 
        * Enable the swap of kernel implementations based on the device placement
    @@ -1993,13 +1999,12 @@ public boolean getDisableModelPruning() {
        * @return The implementationSelector.
        */
       @java.lang.Override public org.tensorflow.proto.RewriterConfig.Toggle getImplementationSelector() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.valueOf(implementationSelector_);
    +    org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.forNumber(implementationSelector_);
         return result == null ? org.tensorflow.proto.RewriterConfig.Toggle.UNRECOGNIZED : result;
       }
     
       public static final int AUTO_MIXED_PRECISION_FIELD_NUMBER = 23;
    -  private int autoMixedPrecision_;
    +  private int autoMixedPrecision_ = 0;
       /**
        * 
        * Optimize data types for CUDA/oneDNN (default is OFF).
    @@ -2026,13 +2031,12 @@ public boolean getDisableModelPruning() {
        * @return The autoMixedPrecision.
        */
       @java.lang.Override public org.tensorflow.proto.RewriterConfig.Toggle getAutoMixedPrecision() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.valueOf(autoMixedPrecision_);
    +    org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.forNumber(autoMixedPrecision_);
         return result == null ? org.tensorflow.proto.RewriterConfig.Toggle.UNRECOGNIZED : result;
       }
     
       public static final int AUTO_MIXED_PRECISION_MKL_FIELD_NUMBER = 25;
    -  private int autoMixedPrecisionMkl_;
    +  private int autoMixedPrecisionMkl_ = 0;
       /**
        * 
        * Optimize data types for oneDNN (default is OFF).
    @@ -2061,13 +2065,12 @@ public boolean getDisableModelPruning() {
        * @return The autoMixedPrecisionMkl.
        */
       @java.lang.Override public org.tensorflow.proto.RewriterConfig.Toggle getAutoMixedPrecisionMkl() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.valueOf(autoMixedPrecisionMkl_);
    +    org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.forNumber(autoMixedPrecisionMkl_);
         return result == null ? org.tensorflow.proto.RewriterConfig.Toggle.UNRECOGNIZED : result;
       }
     
       public static final int AUTO_MIXED_PRECISION_ONEDNN_BFLOAT16_FIELD_NUMBER = 31;
    -  private int autoMixedPrecisionOnednnBfloat16_;
    +  private int autoMixedPrecisionOnednnBfloat16_ = 0;
       /**
        * 
        * Optimize data types for oneDNN (default is OFF).
    @@ -2094,13 +2097,12 @@ public boolean getDisableModelPruning() {
        * @return The autoMixedPrecisionOnednnBfloat16.
        */
       @java.lang.Override public org.tensorflow.proto.RewriterConfig.Toggle getAutoMixedPrecisionOnednnBfloat16() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.valueOf(autoMixedPrecisionOnednnBfloat16_);
    +    org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.forNumber(autoMixedPrecisionOnednnBfloat16_);
         return result == null ? org.tensorflow.proto.RewriterConfig.Toggle.UNRECOGNIZED : result;
       }
     
       public static final int AUTO_MIXED_PRECISION_CPU_FIELD_NUMBER = 29;
    -  private int autoMixedPrecisionCpu_;
    +  private int autoMixedPrecisionCpu_ = 0;
       /**
        * 
        * Emulate a model using data type float16 on CPU (default is OFF).
    @@ -2129,13 +2131,12 @@ public boolean getDisableModelPruning() {
        * @return The autoMixedPrecisionCpu.
        */
       @java.lang.Override public org.tensorflow.proto.RewriterConfig.Toggle getAutoMixedPrecisionCpu() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.valueOf(autoMixedPrecisionCpu_);
    +    org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.forNumber(autoMixedPrecisionCpu_);
         return result == null ? org.tensorflow.proto.RewriterConfig.Toggle.UNRECOGNIZED : result;
       }
     
       public static final int DISABLE_META_OPTIMIZER_FIELD_NUMBER = 19;
    -  private boolean disableMetaOptimizer_;
    +  private boolean disableMetaOptimizer_ = false;
       /**
        * 
        * Disable the entire meta optimizer (off by default).
    @@ -2150,7 +2151,7 @@ public boolean getDisableMetaOptimizer() {
       }
     
       public static final int DISABLE_TFG_OPTIMIZER_FIELD_NUMBER = 32;
    -  private boolean disableTfgOptimizer_;
    +  private boolean disableTfgOptimizer_ = false;
       /**
        * 
        * Disable the TFG optimizer (off by default).
    @@ -2165,7 +2166,7 @@ public boolean getDisableTfgOptimizer() {
       }
     
       public static final int USE_PLUGIN_OPTIMIZERS_FIELD_NUMBER = 28;
    -  private int usePluginOptimizers_;
    +  private int usePluginOptimizers_ = 0;
       /**
        * 
        * Optimizers registered by plugin (default is ON)
    @@ -2186,13 +2187,12 @@ public boolean getDisableTfgOptimizer() {
        * @return The usePluginOptimizers.
        */
       @java.lang.Override public org.tensorflow.proto.RewriterConfig.Toggle getUsePluginOptimizers() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.valueOf(usePluginOptimizers_);
    +    org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.forNumber(usePluginOptimizers_);
         return result == null ? org.tensorflow.proto.RewriterConfig.Toggle.UNRECOGNIZED : result;
       }
     
       public static final int EXPERIMENTAL_CONDITIONAL_CODE_MOTION_FIELD_NUMBER = 30;
    -  private int experimentalConditionalCodeMotion_;
    +  private int experimentalConditionalCodeMotion_ = 0;
       /**
        * 
        * Conditional code motion (default is ON).
    @@ -2213,13 +2213,12 @@ public boolean getDisableTfgOptimizer() {
        * @return The experimentalConditionalCodeMotion.
        */
       @java.lang.Override public org.tensorflow.proto.RewriterConfig.Toggle getExperimentalConditionalCodeMotion() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.valueOf(experimentalConditionalCodeMotion_);
    +    org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.forNumber(experimentalConditionalCodeMotion_);
         return result == null ? org.tensorflow.proto.RewriterConfig.Toggle.UNRECOGNIZED : result;
       }
     
       public static final int META_OPTIMIZER_ITERATIONS_FIELD_NUMBER = 12;
    -  private int metaOptimizerIterations_;
    +  private int metaOptimizerIterations_ = 0;
       /**
        * 
        * Controls how many times we run the optimizers in meta optimizer (default
    @@ -2242,13 +2241,12 @@ public boolean getDisableTfgOptimizer() {
        * @return The metaOptimizerIterations.
        */
       @java.lang.Override public org.tensorflow.proto.RewriterConfig.NumIterationsType getMetaOptimizerIterations() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.RewriterConfig.NumIterationsType result = org.tensorflow.proto.RewriterConfig.NumIterationsType.valueOf(metaOptimizerIterations_);
    +    org.tensorflow.proto.RewriterConfig.NumIterationsType result = org.tensorflow.proto.RewriterConfig.NumIterationsType.forNumber(metaOptimizerIterations_);
         return result == null ? org.tensorflow.proto.RewriterConfig.NumIterationsType.UNRECOGNIZED : result;
       }
     
       public static final int MIN_GRAPH_NODES_FIELD_NUMBER = 17;
    -  private int minGraphNodes_;
    +  private int minGraphNodes_ = 0;
       /**
        * 
        * The minimum number of nodes in a graph to optimizer. For smaller graphs,
    @@ -2266,7 +2264,7 @@ public int getMinGraphNodes() {
       }
     
       public static final int EXPERIMENTAL_DISABLE_COMPRESSED_TENSOR_OPTIMIZATION_FIELD_NUMBER = 26;
    -  private boolean experimentalDisableCompressedTensorOptimization_;
    +  private boolean experimentalDisableCompressedTensorOptimization_ = false;
       /**
        * 
        * Disable optimizations that assume compressed tensors. Note that this flag
    @@ -2282,7 +2280,7 @@ public boolean getExperimentalDisableCompressedTensorOptimization() {
       }
     
       public static final int EXPERIMENTAL_DISABLE_FOLDING_QUANTIZATION_EMULATION_FIELD_NUMBER = 27;
    -  private boolean experimentalDisableFoldingQuantizationEmulation_;
    +  private boolean experimentalDisableFoldingQuantizationEmulation_ = false;
       /**
        * 
        * Disable folding quantization emulation ops such as FakeQuantWithMinMax* and
    @@ -2302,7 +2300,7 @@ public boolean getExperimentalDisableFoldingQuantizationEmulation() {
       }
     
       public static final int MEMORY_OPTIMIZATION_FIELD_NUMBER = 4;
    -  private int memoryOptimization_;
    +  private int memoryOptimization_ = 0;
       /**
        * 
        * Configures memory optimization passes through the meta-optimizer. Has no
    @@ -2327,13 +2325,13 @@ public boolean getExperimentalDisableFoldingQuantizationEmulation() {
        * @return The memoryOptimization.
        */
       @java.lang.Override public org.tensorflow.proto.RewriterConfig.MemOptType getMemoryOptimization() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.RewriterConfig.MemOptType result = org.tensorflow.proto.RewriterConfig.MemOptType.valueOf(memoryOptimization_);
    +    org.tensorflow.proto.RewriterConfig.MemOptType result = org.tensorflow.proto.RewriterConfig.MemOptType.forNumber(memoryOptimization_);
         return result == null ? org.tensorflow.proto.RewriterConfig.MemOptType.UNRECOGNIZED : result;
       }
     
       public static final int MEMORY_OPTIMIZER_TARGET_NODE_NAME_SCOPE_FIELD_NUMBER = 6;
    -  private volatile java.lang.Object memoryOptimizerTargetNodeNameScope_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object memoryOptimizerTargetNodeNameScope_ = "";
       /**
        * 
        * A node name scope for node names which are valid outputs of recomputations.
    @@ -2393,7 +2391,7 @@ public java.lang.String getMemoryOptimizerTargetNodeNameScope() {
       }
     
       public static final int META_OPTIMIZER_TIMEOUT_MS_FIELD_NUMBER = 20;
    -  private long metaOptimizerTimeoutMs_;
    +  private long metaOptimizerTimeoutMs_ = 0L;
       /**
        * 
        * Maximum number of milliseconds to spend optimizing a single graph before
    @@ -2422,7 +2420,7 @@ public long getMetaOptimizerTimeoutMs() {
        */
       @java.lang.Override
       public boolean hasAutoParallel() {
    -    return autoParallel_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * 
    @@ -2447,11 +2445,11 @@ public org.tensorflow.proto.AutoParallelOptions getAutoParallel() {
        */
       @java.lang.Override
       public org.tensorflow.proto.AutoParallelOptionsOrBuilder getAutoParallelOrBuilder() {
    -    return getAutoParallel();
    +    return autoParallel_ == null ? org.tensorflow.proto.AutoParallelOptions.getDefaultInstance() : autoParallel_;
       }
     
       public static final int FAIL_ON_OPTIMIZER_ERRORS_FIELD_NUMBER = 21;
    -  private boolean failOnOptimizerErrors_;
    +  private boolean failOnOptimizerErrors_ = false;
       /**
        * 
        * If true, any optimization pass failing will cause the MetaOptimizer to
    @@ -2475,7 +2473,7 @@ public boolean getFailOnOptimizerErrors() {
        */
       @java.lang.Override
       public boolean hasScopedAllocatorOpts() {
    -    return scopedAllocatorOpts_ != null;
    +    return ((bitField0_ & 0x00000002) != 0);
       }
       /**
        * .tensorflow.ScopedAllocatorOptions scoped_allocator_opts = 16;
    @@ -2490,21 +2488,25 @@ public org.tensorflow.proto.ScopedAllocatorOptions getScopedAllocatorOpts() {
        */
       @java.lang.Override
       public org.tensorflow.proto.ScopedAllocatorOptionsOrBuilder getScopedAllocatorOptsOrBuilder() {
    -    return getScopedAllocatorOpts();
    +    return scopedAllocatorOpts_ == null ? org.tensorflow.proto.ScopedAllocatorOptions.getDefaultInstance() : scopedAllocatorOpts_;
       }
     
       public static final int OPTIMIZERS_FIELD_NUMBER = 100;
    -  private com.google.protobuf.LazyStringList optimizers_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.LazyStringArrayList optimizers_ =
    +      com.google.protobuf.LazyStringArrayList.emptyList();
       /**
        * 
        * If non-empty, will use this as an alternative way to specify a list of
        * optimizations to turn on and the order of the optimizations (replacing the
        * meta-optimizer).
    +   *
        * Of the RewriterConfig options, only the AutoParallel configuration options
        * (the auto_parallel field) apply to manually requested optimization passes
        * ("autoparallel"). Memory optimization passes ("memory") invoked here are
        * not configurable (in contrast to memory optimization passes through the
        * meta-optimizer) and act only on manual op annotations.
    +   *
        * Custom optimizers (see custom_optimizers) that are not part of this
        * schedule will be run after - in the order that they were specified.
        * 
    @@ -2521,11 +2523,13 @@ public org.tensorflow.proto.ScopedAllocatorOptionsOrBuilder getScopedAllocatorOp * If non-empty, will use this as an alternative way to specify a list of * optimizations to turn on and the order of the optimizations (replacing the * meta-optimizer). + * * Of the RewriterConfig options, only the AutoParallel configuration options * (the auto_parallel field) apply to manually requested optimization passes * ("autoparallel"). Memory optimization passes ("memory") invoked here are * not configurable (in contrast to memory optimization passes through the * meta-optimizer) and act only on manual op annotations. + * * Custom optimizers (see custom_optimizers) that are not part of this * schedule will be run after - in the order that they were specified. *
    @@ -2541,11 +2545,13 @@ public int getOptimizersCount() { * If non-empty, will use this as an alternative way to specify a list of * optimizations to turn on and the order of the optimizations (replacing the * meta-optimizer). + * * Of the RewriterConfig options, only the AutoParallel configuration options * (the auto_parallel field) apply to manually requested optimization passes * ("autoparallel"). Memory optimization passes ("memory") invoked here are * not configurable (in contrast to memory optimization passes through the * meta-optimizer) and act only on manual op annotations. + * * Custom optimizers (see custom_optimizers) that are not part of this * schedule will be run after - in the order that they were specified. *
    @@ -2562,11 +2568,13 @@ public java.lang.String getOptimizers(int index) { * If non-empty, will use this as an alternative way to specify a list of * optimizations to turn on and the order of the optimizations (replacing the * meta-optimizer). + * * Of the RewriterConfig options, only the AutoParallel configuration options * (the auto_parallel field) apply to manually requested optimization passes * ("autoparallel"). Memory optimization passes ("memory") invoked here are * not configurable (in contrast to memory optimization passes through the * meta-optimizer) and act only on manual op annotations. + * * Custom optimizers (see custom_optimizers) that are not part of this * schedule will be run after - in the order that they were specified. *
    @@ -2581,6 +2589,7 @@ public java.lang.String getOptimizers(int index) { } public static final int CUSTOM_OPTIMIZERS_FIELD_NUMBER = 200; + @SuppressWarnings("serial") private java.util.List customOptimizers_; /** *
    @@ -2652,7 +2661,7 @@ public org.tensorflow.proto.RewriterConfig.CustomGraphOptimizerOrBuilder getCust
        */
       @java.lang.Override
       public boolean hasInterOptimizerVerifierConfig() {
    -    return interOptimizerVerifierConfig_ != null;
    +    return ((bitField0_ & 0x00000004) != 0);
       }
       /**
        * 
    @@ -2675,7 +2684,7 @@ public org.tensorflow.proto.VerifierConfig getInterOptimizerVerifierConfig() {
        */
       @java.lang.Override
       public org.tensorflow.proto.VerifierConfigOrBuilder getInterOptimizerVerifierConfigOrBuilder() {
    -    return getInterOptimizerVerifierConfig();
    +    return interOptimizerVerifierConfig_ == null ? org.tensorflow.proto.VerifierConfig.getDefaultInstance() : interOptimizerVerifierConfig_;
       }
     
       public static final int POST_OPTIMIZATION_VERIFIER_CONFIG_FIELD_NUMBER = 301;
    @@ -2691,7 +2700,7 @@ public org.tensorflow.proto.VerifierConfigOrBuilder getInterOptimizerVerifierCon
        */
       @java.lang.Override
       public boolean hasPostOptimizationVerifierConfig() {
    -    return postOptimizationVerifierConfig_ != null;
    +    return ((bitField0_ & 0x00000008) != 0);
       }
       /**
        * 
    @@ -2716,7 +2725,7 @@ public org.tensorflow.proto.VerifierConfig getPostOptimizationVerifierConfig() {
        */
       @java.lang.Override
       public org.tensorflow.proto.VerifierConfigOrBuilder getPostOptimizationVerifierConfigOrBuilder() {
    -    return getPostOptimizationVerifierConfig();
    +    return postOptimizationVerifierConfig_ == null ? org.tensorflow.proto.VerifierConfig.getDefaultInstance() : postOptimizationVerifierConfig_;
       }
     
       private byte memoizedIsInitialized = -1;
    @@ -2745,11 +2754,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         if (memoryOptimization_ != org.tensorflow.proto.RewriterConfig.MemOptType.DEFAULT_MEM_OPT.getNumber()) {
           output.writeEnum(4, memoryOptimization_);
         }
    -    if (autoParallel_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(5, getAutoParallel());
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memoryOptimizerTargetNodeNameScope_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, memoryOptimizerTargetNodeNameScope_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(memoryOptimizerTargetNodeNameScope_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 6, memoryOptimizerTargetNodeNameScope_);
         }
         if (arithmeticOptimization_ != org.tensorflow.proto.RewriterConfig.Toggle.DEFAULT.getNumber()) {
           output.writeEnum(7, arithmeticOptimization_);
    @@ -2778,7 +2787,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         if (scopedAllocatorOptimization_ != org.tensorflow.proto.RewriterConfig.Toggle.DEFAULT.getNumber()) {
           output.writeEnum(15, scopedAllocatorOptimization_);
         }
    -    if (scopedAllocatorOpts_ != null) {
    +    if (((bitField0_ & 0x00000002) != 0)) {
           output.writeMessage(16, getScopedAllocatorOpts());
         }
         if (minGraphNodes_ != 0) {
    @@ -2833,15 +2842,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           output.writeEnum(50, cpuLayoutConversion_);
         }
         for (int i = 0; i < optimizers_.size(); i++) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 100, optimizers_.getRaw(i));
    +      com.google.protobuf.GeneratedMessage.writeString(output, 100, optimizers_.getRaw(i));
         }
         for (int i = 0; i < customOptimizers_.size(); i++) {
           output.writeMessage(200, customOptimizers_.get(i));
         }
    -    if (interOptimizerVerifierConfig_ != null) {
    +    if (((bitField0_ & 0x00000004) != 0)) {
           output.writeMessage(300, getInterOptimizerVerifierConfig());
         }
    -    if (postOptimizationVerifierConfig_ != null) {
    +    if (((bitField0_ & 0x00000008) != 0)) {
           output.writeMessage(301, getPostOptimizationVerifierConfig());
         }
         getUnknownFields().writeTo(output);
    @@ -2869,12 +2878,12 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeEnumSize(4, memoryOptimization_);
         }
    -    if (autoParallel_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(5, getAutoParallel());
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memoryOptimizerTargetNodeNameScope_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, memoryOptimizerTargetNodeNameScope_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(memoryOptimizerTargetNodeNameScope_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(6, memoryOptimizerTargetNodeNameScope_);
         }
         if (arithmeticOptimization_ != org.tensorflow.proto.RewriterConfig.Toggle.DEFAULT.getNumber()) {
           size += com.google.protobuf.CodedOutputStream
    @@ -2912,7 +2921,7 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeEnumSize(15, scopedAllocatorOptimization_);
         }
    -    if (scopedAllocatorOpts_ != null) {
    +    if (((bitField0_ & 0x00000002) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(16, getScopedAllocatorOpts());
         }
    @@ -2996,11 +3005,11 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(200, customOptimizers_.get(i));
         }
    -    if (interOptimizerVerifierConfig_ != null) {
    +    if (((bitField0_ & 0x00000004) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(300, getInterOptimizerVerifierConfig());
         }
    -    if (postOptimizationVerifierConfig_ != null) {
    +    if (((bitField0_ & 0x00000008) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(301, getPostOptimizationVerifierConfig());
         }
    @@ -3226,39 +3235,41 @@ public static org.tensorflow.proto.RewriterConfig parseFrom(
       }
       public static org.tensorflow.proto.RewriterConfig parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.RewriterConfig parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.RewriterConfig parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.RewriterConfig parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.RewriterConfig parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.RewriterConfig parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -3278,7 +3289,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -3291,7 +3302,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.RewriterConfig}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.RewriterConfig)
           org.tensorflow.proto.RewriterConfigOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -3300,7 +3311,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.RewriterConfigProtos.internal_static_tensorflow_RewriterConfig_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -3309,110 +3320,87 @@ public static final class Builder extends
     
         // Construct using org.tensorflow.proto.RewriterConfig.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getAutoParallelFieldBuilder();
    +        getScopedAllocatorOptsFieldBuilder();
    +        getCustomOptimizersFieldBuilder();
    +        getInterOptimizerVerifierConfigFieldBuilder();
    +        getPostOptimizationVerifierConfigFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
    +      bitField1_ = 0;
           cpuLayoutConversion_ = 0;
    -
           layoutOptimizer_ = 0;
    -
           constantFolding_ = 0;
    -
           shapeOptimization_ = 0;
    -
           remapping_ = 0;
    -
           commonSubgraphElimination_ = 0;
    -
           arithmeticOptimization_ = 0;
    -
           dependencyOptimization_ = 0;
    -
           loopOptimization_ = 0;
    -
           functionOptimization_ = 0;
    -
           debugStripper_ = 0;
    -
           disableModelPruning_ = false;
    -
           scopedAllocatorOptimization_ = 0;
    -
           pinToHostOptimization_ = 0;
    -
           implementationSelector_ = 0;
    -
           autoMixedPrecision_ = 0;
    -
           autoMixedPrecisionMkl_ = 0;
    -
           autoMixedPrecisionOnednnBfloat16_ = 0;
    -
           autoMixedPrecisionCpu_ = 0;
    -
           disableMetaOptimizer_ = false;
    -
           disableTfgOptimizer_ = false;
    -
           usePluginOptimizers_ = 0;
    -
           experimentalConditionalCodeMotion_ = 0;
    -
           metaOptimizerIterations_ = 0;
    -
           minGraphNodes_ = 0;
    -
           experimentalDisableCompressedTensorOptimization_ = false;
    -
           experimentalDisableFoldingQuantizationEmulation_ = false;
    -
           memoryOptimization_ = 0;
    -
           memoryOptimizerTargetNodeNameScope_ = "";
    -
           metaOptimizerTimeoutMs_ = 0L;
    -
    -      if (autoParallelBuilder_ == null) {
    -        autoParallel_ = null;
    -      } else {
    -        autoParallel_ = null;
    +      autoParallel_ = null;
    +      if (autoParallelBuilder_ != null) {
    +        autoParallelBuilder_.dispose();
             autoParallelBuilder_ = null;
           }
           failOnOptimizerErrors_ = false;
    -
    -      if (scopedAllocatorOptsBuilder_ == null) {
    -        scopedAllocatorOpts_ = null;
    -      } else {
    -        scopedAllocatorOpts_ = null;
    +      scopedAllocatorOpts_ = null;
    +      if (scopedAllocatorOptsBuilder_ != null) {
    +        scopedAllocatorOptsBuilder_.dispose();
             scopedAllocatorOptsBuilder_ = null;
           }
    -      optimizers_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      optimizers_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
           if (customOptimizersBuilder_ == null) {
             customOptimizers_ = java.util.Collections.emptyList();
           } else {
             customOptimizers_ = null;
             customOptimizersBuilder_.clear();
           }
    -      bitField0_ = (bitField0_ & ~0x00000002);
    -      if (interOptimizerVerifierConfigBuilder_ == null) {
    -        interOptimizerVerifierConfig_ = null;
    -      } else {
    -        interOptimizerVerifierConfig_ = null;
    +      bitField1_ = (bitField1_ & ~0x00000004);
    +      interOptimizerVerifierConfig_ = null;
    +      if (interOptimizerVerifierConfigBuilder_ != null) {
    +        interOptimizerVerifierConfigBuilder_.dispose();
             interOptimizerVerifierConfigBuilder_ = null;
           }
    -      if (postOptimizationVerifierConfigBuilder_ == null) {
    -        postOptimizationVerifierConfig_ = null;
    -      } else {
    -        postOptimizationVerifierConfig_ = null;
    +      postOptimizationVerifierConfig_ = null;
    +      if (postOptimizationVerifierConfigBuilder_ != null) {
    +        postOptimizationVerifierConfigBuilder_.dispose();
             postOptimizationVerifierConfigBuilder_ = null;
           }
           return this;
    @@ -3441,108 +3429,158 @@ public org.tensorflow.proto.RewriterConfig build() {
         @java.lang.Override
         public org.tensorflow.proto.RewriterConfig buildPartial() {
           org.tensorflow.proto.RewriterConfig result = new org.tensorflow.proto.RewriterConfig(this);
    -      int from_bitField0_ = bitField0_;
    -      result.cpuLayoutConversion_ = cpuLayoutConversion_;
    -      result.layoutOptimizer_ = layoutOptimizer_;
    -      result.constantFolding_ = constantFolding_;
    -      result.shapeOptimization_ = shapeOptimization_;
    -      result.remapping_ = remapping_;
    -      result.commonSubgraphElimination_ = commonSubgraphElimination_;
    -      result.arithmeticOptimization_ = arithmeticOptimization_;
    -      result.dependencyOptimization_ = dependencyOptimization_;
    -      result.loopOptimization_ = loopOptimization_;
    -      result.functionOptimization_ = functionOptimization_;
    -      result.debugStripper_ = debugStripper_;
    -      result.disableModelPruning_ = disableModelPruning_;
    -      result.scopedAllocatorOptimization_ = scopedAllocatorOptimization_;
    -      result.pinToHostOptimization_ = pinToHostOptimization_;
    -      result.implementationSelector_ = implementationSelector_;
    -      result.autoMixedPrecision_ = autoMixedPrecision_;
    -      result.autoMixedPrecisionMkl_ = autoMixedPrecisionMkl_;
    -      result.autoMixedPrecisionOnednnBfloat16_ = autoMixedPrecisionOnednnBfloat16_;
    -      result.autoMixedPrecisionCpu_ = autoMixedPrecisionCpu_;
    -      result.disableMetaOptimizer_ = disableMetaOptimizer_;
    -      result.disableTfgOptimizer_ = disableTfgOptimizer_;
    -      result.usePluginOptimizers_ = usePluginOptimizers_;
    -      result.experimentalConditionalCodeMotion_ = experimentalConditionalCodeMotion_;
    -      result.metaOptimizerIterations_ = metaOptimizerIterations_;
    -      result.minGraphNodes_ = minGraphNodes_;
    -      result.experimentalDisableCompressedTensorOptimization_ = experimentalDisableCompressedTensorOptimization_;
    -      result.experimentalDisableFoldingQuantizationEmulation_ = experimentalDisableFoldingQuantizationEmulation_;
    -      result.memoryOptimization_ = memoryOptimization_;
    -      result.memoryOptimizerTargetNodeNameScope_ = memoryOptimizerTargetNodeNameScope_;
    -      result.metaOptimizerTimeoutMs_ = metaOptimizerTimeoutMs_;
    -      if (autoParallelBuilder_ == null) {
    -        result.autoParallel_ = autoParallel_;
    -      } else {
    -        result.autoParallel_ = autoParallelBuilder_.build();
    -      }
    -      result.failOnOptimizerErrors_ = failOnOptimizerErrors_;
    -      if (scopedAllocatorOptsBuilder_ == null) {
    -        result.scopedAllocatorOpts_ = scopedAllocatorOpts_;
    -      } else {
    -        result.scopedAllocatorOpts_ = scopedAllocatorOptsBuilder_.build();
    -      }
    -      if (((bitField0_ & 0x00000001) != 0)) {
    -        optimizers_ = optimizers_.getUnmodifiableView();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    -      }
    -      result.optimizers_ = optimizers_;
    +      buildPartialRepeatedFields(result);
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      if (bitField1_ != 0) { buildPartial1(result); }
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartialRepeatedFields(org.tensorflow.proto.RewriterConfig result) {
           if (customOptimizersBuilder_ == null) {
    -        if (((bitField0_ & 0x00000002) != 0)) {
    +        if (((bitField1_ & 0x00000004) != 0)) {
               customOptimizers_ = java.util.Collections.unmodifiableList(customOptimizers_);
    -          bitField0_ = (bitField0_ & ~0x00000002);
    +          bitField1_ = (bitField1_ & ~0x00000004);
             }
             result.customOptimizers_ = customOptimizers_;
           } else {
             result.customOptimizers_ = customOptimizersBuilder_.build();
           }
    -      if (interOptimizerVerifierConfigBuilder_ == null) {
    -        result.interOptimizerVerifierConfig_ = interOptimizerVerifierConfig_;
    -      } else {
    -        result.interOptimizerVerifierConfig_ = interOptimizerVerifierConfigBuilder_.build();
    +    }
    +
    +    private void buildPartial0(org.tensorflow.proto.RewriterConfig result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.cpuLayoutConversion_ = cpuLayoutConversion_;
           }
    -      if (postOptimizationVerifierConfigBuilder_ == null) {
    -        result.postOptimizationVerifierConfig_ = postOptimizationVerifierConfig_;
    -      } else {
    -        result.postOptimizationVerifierConfig_ = postOptimizationVerifierConfigBuilder_.build();
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.layoutOptimizer_ = layoutOptimizer_;
           }
    -      onBuilt();
    -      return result;
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.constantFolding_ = constantFolding_;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.shapeOptimization_ = shapeOptimization_;
    +      }
    +      if (((from_bitField0_ & 0x00000010) != 0)) {
    +        result.remapping_ = remapping_;
    +      }
    +      if (((from_bitField0_ & 0x00000020) != 0)) {
    +        result.commonSubgraphElimination_ = commonSubgraphElimination_;
    +      }
    +      if (((from_bitField0_ & 0x00000040) != 0)) {
    +        result.arithmeticOptimization_ = arithmeticOptimization_;
    +      }
    +      if (((from_bitField0_ & 0x00000080) != 0)) {
    +        result.dependencyOptimization_ = dependencyOptimization_;
    +      }
    +      if (((from_bitField0_ & 0x00000100) != 0)) {
    +        result.loopOptimization_ = loopOptimization_;
    +      }
    +      if (((from_bitField0_ & 0x00000200) != 0)) {
    +        result.functionOptimization_ = functionOptimization_;
    +      }
    +      if (((from_bitField0_ & 0x00000400) != 0)) {
    +        result.debugStripper_ = debugStripper_;
    +      }
    +      if (((from_bitField0_ & 0x00000800) != 0)) {
    +        result.disableModelPruning_ = disableModelPruning_;
    +      }
    +      if (((from_bitField0_ & 0x00001000) != 0)) {
    +        result.scopedAllocatorOptimization_ = scopedAllocatorOptimization_;
    +      }
    +      if (((from_bitField0_ & 0x00002000) != 0)) {
    +        result.pinToHostOptimization_ = pinToHostOptimization_;
    +      }
    +      if (((from_bitField0_ & 0x00004000) != 0)) {
    +        result.implementationSelector_ = implementationSelector_;
    +      }
    +      if (((from_bitField0_ & 0x00008000) != 0)) {
    +        result.autoMixedPrecision_ = autoMixedPrecision_;
    +      }
    +      if (((from_bitField0_ & 0x00010000) != 0)) {
    +        result.autoMixedPrecisionMkl_ = autoMixedPrecisionMkl_;
    +      }
    +      if (((from_bitField0_ & 0x00020000) != 0)) {
    +        result.autoMixedPrecisionOnednnBfloat16_ = autoMixedPrecisionOnednnBfloat16_;
    +      }
    +      if (((from_bitField0_ & 0x00040000) != 0)) {
    +        result.autoMixedPrecisionCpu_ = autoMixedPrecisionCpu_;
    +      }
    +      if (((from_bitField0_ & 0x00080000) != 0)) {
    +        result.disableMetaOptimizer_ = disableMetaOptimizer_;
    +      }
    +      if (((from_bitField0_ & 0x00100000) != 0)) {
    +        result.disableTfgOptimizer_ = disableTfgOptimizer_;
    +      }
    +      if (((from_bitField0_ & 0x00200000) != 0)) {
    +        result.usePluginOptimizers_ = usePluginOptimizers_;
    +      }
    +      if (((from_bitField0_ & 0x00400000) != 0)) {
    +        result.experimentalConditionalCodeMotion_ = experimentalConditionalCodeMotion_;
    +      }
    +      if (((from_bitField0_ & 0x00800000) != 0)) {
    +        result.metaOptimizerIterations_ = metaOptimizerIterations_;
    +      }
    +      if (((from_bitField0_ & 0x01000000) != 0)) {
    +        result.minGraphNodes_ = minGraphNodes_;
    +      }
    +      if (((from_bitField0_ & 0x02000000) != 0)) {
    +        result.experimentalDisableCompressedTensorOptimization_ = experimentalDisableCompressedTensorOptimization_;
    +      }
    +      if (((from_bitField0_ & 0x04000000) != 0)) {
    +        result.experimentalDisableFoldingQuantizationEmulation_ = experimentalDisableFoldingQuantizationEmulation_;
    +      }
    +      if (((from_bitField0_ & 0x08000000) != 0)) {
    +        result.memoryOptimization_ = memoryOptimization_;
    +      }
    +      if (((from_bitField0_ & 0x10000000) != 0)) {
    +        result.memoryOptimizerTargetNodeNameScope_ = memoryOptimizerTargetNodeNameScope_;
    +      }
    +      if (((from_bitField0_ & 0x20000000) != 0)) {
    +        result.metaOptimizerTimeoutMs_ = metaOptimizerTimeoutMs_;
    +      }
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x40000000) != 0)) {
    +        result.autoParallel_ = autoParallelBuilder_ == null
    +            ? autoParallel_
    +            : autoParallelBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
    +      }
    +      if (((from_bitField0_ & 0x80000000) != 0)) {
    +        result.failOnOptimizerErrors_ = failOnOptimizerErrors_;
    +      }
    +      result.bitField0_ |= to_bitField0_;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial1(org.tensorflow.proto.RewriterConfig result) {
    +      int from_bitField1_ = bitField1_;
    +      int to_bitField0_ = 0;
    +      if (((from_bitField1_ & 0x00000001) != 0)) {
    +        result.scopedAllocatorOpts_ = scopedAllocatorOptsBuilder_ == null
    +            ? scopedAllocatorOpts_
    +            : scopedAllocatorOptsBuilder_.build();
    +        to_bitField0_ |= 0x00000002;
    +      }
    +      if (((from_bitField1_ & 0x00000002) != 0)) {
    +        optimizers_.makeImmutable();
    +        result.optimizers_ = optimizers_;
    +      }
    +      if (((from_bitField1_ & 0x00000008) != 0)) {
    +        result.interOptimizerVerifierConfig_ = interOptimizerVerifierConfigBuilder_ == null
    +            ? interOptimizerVerifierConfig_
    +            : interOptimizerVerifierConfigBuilder_.build();
    +        to_bitField0_ |= 0x00000004;
    +      }
    +      if (((from_bitField1_ & 0x00000010) != 0)) {
    +        result.postOptimizationVerifierConfig_ = postOptimizationVerifierConfigBuilder_ == null
    +            ? postOptimizationVerifierConfig_
    +            : postOptimizationVerifierConfigBuilder_.build();
    +        to_bitField0_ |= 0x00000008;
    +      }
    +      result.bitField0_ |= to_bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.RewriterConfig) {
    @@ -3641,6 +3679,7 @@ public Builder mergeFrom(org.tensorflow.proto.RewriterConfig other) {
           }
           if (!other.getMemoryOptimizerTargetNodeNameScope().isEmpty()) {
             memoryOptimizerTargetNodeNameScope_ = other.memoryOptimizerTargetNodeNameScope_;
    +        bitField0_ |= 0x10000000;
             onChanged();
           }
           if (other.getMetaOptimizerTimeoutMs() != 0L) {
    @@ -3658,7 +3697,7 @@ public Builder mergeFrom(org.tensorflow.proto.RewriterConfig other) {
           if (!other.optimizers_.isEmpty()) {
             if (optimizers_.isEmpty()) {
               optimizers_ = other.optimizers_;
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField1_ |= 0x00000002;
             } else {
               ensureOptimizersIsMutable();
               optimizers_.addAll(other.optimizers_);
    @@ -3669,7 +3708,7 @@ public Builder mergeFrom(org.tensorflow.proto.RewriterConfig other) {
             if (!other.customOptimizers_.isEmpty()) {
               if (customOptimizers_.isEmpty()) {
                 customOptimizers_ = other.customOptimizers_;
    -            bitField0_ = (bitField0_ & ~0x00000002);
    +            bitField1_ = (bitField1_ & ~0x00000004);
               } else {
                 ensureCustomOptimizersIsMutable();
                 customOptimizers_.addAll(other.customOptimizers_);
    @@ -3682,9 +3721,9 @@ public Builder mergeFrom(org.tensorflow.proto.RewriterConfig other) {
                 customOptimizersBuilder_.dispose();
                 customOptimizersBuilder_ = null;
                 customOptimizers_ = other.customOptimizers_;
    -            bitField0_ = (bitField0_ & ~0x00000002);
    +            bitField1_ = (bitField1_ & ~0x00000004);
                 customOptimizersBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getCustomOptimizersFieldBuilder() : null;
               } else {
                 customOptimizersBuilder_.addAllMessages(other.customOptimizers_);
    @@ -3725,171 +3764,171 @@ public Builder mergeFrom(
                   break;
                 case 8: {
                   layoutOptimizer_ = input.readEnum();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 8
                 case 16: {
                   disableModelPruning_ = input.readBool();
    -
    +              bitField0_ |= 0x00000800;
                   break;
                 } // case 16
                 case 24: {
                   constantFolding_ = input.readEnum();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 24
                 case 32: {
                   memoryOptimization_ = input.readEnum();
    -
    +              bitField0_ |= 0x08000000;
                   break;
                 } // case 32
                 case 42: {
                   input.readMessage(
                       getAutoParallelFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x40000000;
                   break;
                 } // case 42
                 case 50: {
                   memoryOptimizerTargetNodeNameScope_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x10000000;
                   break;
                 } // case 50
                 case 56: {
                   arithmeticOptimization_ = input.readEnum();
    -
    +              bitField0_ |= 0x00000040;
                   break;
                 } // case 56
                 case 64: {
                   dependencyOptimization_ = input.readEnum();
    -
    +              bitField0_ |= 0x00000080;
                   break;
                 } // case 64
                 case 72: {
                   loopOptimization_ = input.readEnum();
    -
    +              bitField0_ |= 0x00000100;
                   break;
                 } // case 72
                 case 80: {
                   functionOptimization_ = input.readEnum();
    -
    +              bitField0_ |= 0x00000200;
                   break;
                 } // case 80
                 case 88: {
                   debugStripper_ = input.readEnum();
    -
    +              bitField0_ |= 0x00000400;
                   break;
                 } // case 88
                 case 96: {
                   metaOptimizerIterations_ = input.readEnum();
    -
    +              bitField0_ |= 0x00800000;
                   break;
                 } // case 96
                 case 104: {
                   shapeOptimization_ = input.readEnum();
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 104
                 case 112: {
                   remapping_ = input.readEnum();
    -
    +              bitField0_ |= 0x00000010;
                   break;
                 } // case 112
                 case 120: {
                   scopedAllocatorOptimization_ = input.readEnum();
    -
    +              bitField0_ |= 0x00001000;
                   break;
                 } // case 120
                 case 130: {
                   input.readMessage(
                       getScopedAllocatorOptsFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField1_ |= 0x00000001;
                   break;
                 } // case 130
                 case 136: {
                   minGraphNodes_ = input.readInt32();
    -
    +              bitField0_ |= 0x01000000;
                   break;
                 } // case 136
                 case 144: {
                   pinToHostOptimization_ = input.readEnum();
    -
    +              bitField0_ |= 0x00002000;
                   break;
                 } // case 144
                 case 152: {
                   disableMetaOptimizer_ = input.readBool();
    -
    +              bitField0_ |= 0x00080000;
                   break;
                 } // case 152
                 case 160: {
                   metaOptimizerTimeoutMs_ = input.readInt64();
    -
    +              bitField0_ |= 0x20000000;
                   break;
                 } // case 160
                 case 168: {
                   failOnOptimizerErrors_ = input.readBool();
    -
    +              bitField0_ |= 0x80000000;
                   break;
                 } // case 168
                 case 176: {
                   implementationSelector_ = input.readEnum();
    -
    +              bitField0_ |= 0x00004000;
                   break;
                 } // case 176
                 case 184: {
                   autoMixedPrecision_ = input.readEnum();
    -
    +              bitField0_ |= 0x00008000;
                   break;
                 } // case 184
                 case 192: {
                   commonSubgraphElimination_ = input.readEnum();
    -
    +              bitField0_ |= 0x00000020;
                   break;
                 } // case 192
                 case 200: {
                   autoMixedPrecisionMkl_ = input.readEnum();
    -
    +              bitField0_ |= 0x00010000;
                   break;
                 } // case 200
                 case 208: {
                   experimentalDisableCompressedTensorOptimization_ = input.readBool();
    -
    +              bitField0_ |= 0x02000000;
                   break;
                 } // case 208
                 case 216: {
                   experimentalDisableFoldingQuantizationEmulation_ = input.readBool();
    -
    +              bitField0_ |= 0x04000000;
                   break;
                 } // case 216
                 case 224: {
                   usePluginOptimizers_ = input.readEnum();
    -
    +              bitField0_ |= 0x00200000;
                   break;
                 } // case 224
                 case 232: {
                   autoMixedPrecisionCpu_ = input.readEnum();
    -
    +              bitField0_ |= 0x00040000;
                   break;
                 } // case 232
                 case 240: {
                   experimentalConditionalCodeMotion_ = input.readEnum();
    -
    +              bitField0_ |= 0x00400000;
                   break;
                 } // case 240
                 case 248: {
                   autoMixedPrecisionOnednnBfloat16_ = input.readEnum();
    -
    +              bitField0_ |= 0x00020000;
                   break;
                 } // case 248
                 case 256: {
                   disableTfgOptimizer_ = input.readBool();
    -
    +              bitField0_ |= 0x00100000;
                   break;
                 } // case 256
                 case 400: {
                   cpuLayoutConversion_ = input.readEnum();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 400
                 case 802: {
    @@ -3915,14 +3954,14 @@ public Builder mergeFrom(
                   input.readMessage(
                       getInterOptimizerVerifierConfigFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField1_ |= 0x00000008;
                   break;
                 } // case 2402
                 case 2410: {
                   input.readMessage(
                       getPostOptimizationVerifierConfigFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField1_ |= 0x00000010;
                   break;
                 } // case 2410
                 default: {
    @@ -3941,6 +3980,7 @@ public Builder mergeFrom(
           return this;
         }
         private int bitField0_;
    +    private int bitField1_;
     
         private int cpuLayoutConversion_ = 0;
         /**
    @@ -3964,8 +4004,8 @@ public Builder mergeFrom(
          * @return This builder for chaining.
          */
         public Builder setCpuLayoutConversionValue(int value) {
    -      
           cpuLayoutConversion_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -3979,8 +4019,7 @@ public Builder setCpuLayoutConversionValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.RewriterConfig.CpuLayout getCpuLayoutConversion() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.RewriterConfig.CpuLayout result = org.tensorflow.proto.RewriterConfig.CpuLayout.valueOf(cpuLayoutConversion_);
    +      org.tensorflow.proto.RewriterConfig.CpuLayout result = org.tensorflow.proto.RewriterConfig.CpuLayout.forNumber(cpuLayoutConversion_);
           return result == null ? org.tensorflow.proto.RewriterConfig.CpuLayout.UNRECOGNIZED : result;
         }
         /**
    @@ -3996,7 +4035,7 @@ public Builder setCpuLayoutConversion(org.tensorflow.proto.RewriterConfig.CpuLay
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00000001;
           cpuLayoutConversion_ = value.getNumber();
           onChanged();
           return this;
    @@ -4010,7 +4049,7 @@ public Builder setCpuLayoutConversion(org.tensorflow.proto.RewriterConfig.CpuLay
          * @return This builder for chaining.
          */
         public Builder clearCpuLayoutConversion() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000001);
           cpuLayoutConversion_ = 0;
           onChanged();
           return this;
    @@ -4040,8 +4079,8 @@ public Builder clearCpuLayoutConversion() {
          * @return This builder for chaining.
          */
         public Builder setLayoutOptimizerValue(int value) {
    -      
           layoutOptimizer_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -4056,8 +4095,7 @@ public Builder setLayoutOptimizerValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.RewriterConfig.Toggle getLayoutOptimizer() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.valueOf(layoutOptimizer_);
    +      org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.forNumber(layoutOptimizer_);
           return result == null ? org.tensorflow.proto.RewriterConfig.Toggle.UNRECOGNIZED : result;
         }
         /**
    @@ -4074,7 +4112,7 @@ public Builder setLayoutOptimizer(org.tensorflow.proto.RewriterConfig.Toggle val
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00000002;
           layoutOptimizer_ = value.getNumber();
           onChanged();
           return this;
    @@ -4089,7 +4127,7 @@ public Builder setLayoutOptimizer(org.tensorflow.proto.RewriterConfig.Toggle val
          * @return This builder for chaining.
          */
         public Builder clearLayoutOptimizer() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000002);
           layoutOptimizer_ = 0;
           onChanged();
           return this;
    @@ -4121,8 +4159,8 @@ public Builder clearLayoutOptimizer() {
          * @return This builder for chaining.
          */
         public Builder setConstantFoldingValue(int value) {
    -      
           constantFolding_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -4138,8 +4176,7 @@ public Builder setConstantFoldingValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.RewriterConfig.Toggle getConstantFolding() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.valueOf(constantFolding_);
    +      org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.forNumber(constantFolding_);
           return result == null ? org.tensorflow.proto.RewriterConfig.Toggle.UNRECOGNIZED : result;
         }
         /**
    @@ -4157,7 +4194,7 @@ public Builder setConstantFolding(org.tensorflow.proto.RewriterConfig.Toggle val
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00000004;
           constantFolding_ = value.getNumber();
           onChanged();
           return this;
    @@ -4173,7 +4210,7 @@ public Builder setConstantFolding(org.tensorflow.proto.RewriterConfig.Toggle val
          * @return This builder for chaining.
          */
         public Builder clearConstantFolding() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000004);
           constantFolding_ = 0;
           onChanged();
           return this;
    @@ -4203,8 +4240,8 @@ public Builder clearConstantFolding() {
          * @return This builder for chaining.
          */
         public Builder setShapeOptimizationValue(int value) {
    -      
           shapeOptimization_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -4219,8 +4256,7 @@ public Builder setShapeOptimizationValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.RewriterConfig.Toggle getShapeOptimization() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.valueOf(shapeOptimization_);
    +      org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.forNumber(shapeOptimization_);
           return result == null ? org.tensorflow.proto.RewriterConfig.Toggle.UNRECOGNIZED : result;
         }
         /**
    @@ -4237,7 +4273,7 @@ public Builder setShapeOptimization(org.tensorflow.proto.RewriterConfig.Toggle v
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00000008;
           shapeOptimization_ = value.getNumber();
           onChanged();
           return this;
    @@ -4252,7 +4288,7 @@ public Builder setShapeOptimization(org.tensorflow.proto.RewriterConfig.Toggle v
          * @return This builder for chaining.
          */
         public Builder clearShapeOptimization() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000008);
           shapeOptimization_ = 0;
           onChanged();
           return this;
    @@ -4282,8 +4318,8 @@ public Builder clearShapeOptimization() {
          * @return This builder for chaining.
          */
         public Builder setRemappingValue(int value) {
    -      
           remapping_ = value;
    +      bitField0_ |= 0x00000010;
           onChanged();
           return this;
         }
    @@ -4298,8 +4334,7 @@ public Builder setRemappingValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.RewriterConfig.Toggle getRemapping() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.valueOf(remapping_);
    +      org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.forNumber(remapping_);
           return result == null ? org.tensorflow.proto.RewriterConfig.Toggle.UNRECOGNIZED : result;
         }
         /**
    @@ -4316,7 +4351,7 @@ public Builder setRemapping(org.tensorflow.proto.RewriterConfig.Toggle value) {
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00000010;
           remapping_ = value.getNumber();
           onChanged();
           return this;
    @@ -4331,7 +4366,7 @@ public Builder setRemapping(org.tensorflow.proto.RewriterConfig.Toggle value) {
          * @return This builder for chaining.
          */
         public Builder clearRemapping() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000010);
           remapping_ = 0;
           onChanged();
           return this;
    @@ -4361,8 +4396,8 @@ public Builder clearRemapping() {
          * @return This builder for chaining.
          */
         public Builder setCommonSubgraphEliminationValue(int value) {
    -      
           commonSubgraphElimination_ = value;
    +      bitField0_ |= 0x00000020;
           onChanged();
           return this;
         }
    @@ -4377,8 +4412,7 @@ public Builder setCommonSubgraphEliminationValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.RewriterConfig.Toggle getCommonSubgraphElimination() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.valueOf(commonSubgraphElimination_);
    +      org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.forNumber(commonSubgraphElimination_);
           return result == null ? org.tensorflow.proto.RewriterConfig.Toggle.UNRECOGNIZED : result;
         }
         /**
    @@ -4395,7 +4429,7 @@ public Builder setCommonSubgraphElimination(org.tensorflow.proto.RewriterConfig.
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00000020;
           commonSubgraphElimination_ = value.getNumber();
           onChanged();
           return this;
    @@ -4410,7 +4444,7 @@ public Builder setCommonSubgraphElimination(org.tensorflow.proto.RewriterConfig.
          * @return This builder for chaining.
          */
         public Builder clearCommonSubgraphElimination() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000020);
           commonSubgraphElimination_ = 0;
           onChanged();
           return this;
    @@ -4440,8 +4474,8 @@ public Builder clearCommonSubgraphElimination() {
          * @return This builder for chaining.
          */
         public Builder setArithmeticOptimizationValue(int value) {
    -      
           arithmeticOptimization_ = value;
    +      bitField0_ |= 0x00000040;
           onChanged();
           return this;
         }
    @@ -4456,8 +4490,7 @@ public Builder setArithmeticOptimizationValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.RewriterConfig.Toggle getArithmeticOptimization() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.valueOf(arithmeticOptimization_);
    +      org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.forNumber(arithmeticOptimization_);
           return result == null ? org.tensorflow.proto.RewriterConfig.Toggle.UNRECOGNIZED : result;
         }
         /**
    @@ -4474,7 +4507,7 @@ public Builder setArithmeticOptimization(org.tensorflow.proto.RewriterConfig.Tog
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00000040;
           arithmeticOptimization_ = value.getNumber();
           onChanged();
           return this;
    @@ -4489,7 +4522,7 @@ public Builder setArithmeticOptimization(org.tensorflow.proto.RewriterConfig.Tog
          * @return This builder for chaining.
          */
         public Builder clearArithmeticOptimization() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000040);
           arithmeticOptimization_ = 0;
           onChanged();
           return this;
    @@ -4519,8 +4552,8 @@ public Builder clearArithmeticOptimization() {
          * @return This builder for chaining.
          */
         public Builder setDependencyOptimizationValue(int value) {
    -      
           dependencyOptimization_ = value;
    +      bitField0_ |= 0x00000080;
           onChanged();
           return this;
         }
    @@ -4535,8 +4568,7 @@ public Builder setDependencyOptimizationValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.RewriterConfig.Toggle getDependencyOptimization() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.valueOf(dependencyOptimization_);
    +      org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.forNumber(dependencyOptimization_);
           return result == null ? org.tensorflow.proto.RewriterConfig.Toggle.UNRECOGNIZED : result;
         }
         /**
    @@ -4553,7 +4585,7 @@ public Builder setDependencyOptimization(org.tensorflow.proto.RewriterConfig.Tog
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00000080;
           dependencyOptimization_ = value.getNumber();
           onChanged();
           return this;
    @@ -4568,7 +4600,7 @@ public Builder setDependencyOptimization(org.tensorflow.proto.RewriterConfig.Tog
          * @return This builder for chaining.
          */
         public Builder clearDependencyOptimization() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000080);
           dependencyOptimization_ = 0;
           onChanged();
           return this;
    @@ -4596,8 +4628,8 @@ public Builder clearDependencyOptimization() {
          * @return This builder for chaining.
          */
         public Builder setLoopOptimizationValue(int value) {
    -      
           loopOptimization_ = value;
    +      bitField0_ |= 0x00000100;
           onChanged();
           return this;
         }
    @@ -4611,8 +4643,7 @@ public Builder setLoopOptimizationValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.RewriterConfig.Toggle getLoopOptimization() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.valueOf(loopOptimization_);
    +      org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.forNumber(loopOptimization_);
           return result == null ? org.tensorflow.proto.RewriterConfig.Toggle.UNRECOGNIZED : result;
         }
         /**
    @@ -4628,7 +4659,7 @@ public Builder setLoopOptimization(org.tensorflow.proto.RewriterConfig.Toggle va
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00000100;
           loopOptimization_ = value.getNumber();
           onChanged();
           return this;
    @@ -4642,7 +4673,7 @@ public Builder setLoopOptimization(org.tensorflow.proto.RewriterConfig.Toggle va
          * @return This builder for chaining.
          */
         public Builder clearLoopOptimization() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000100);
           loopOptimization_ = 0;
           onChanged();
           return this;
    @@ -4670,8 +4701,8 @@ public Builder clearLoopOptimization() {
          * @return This builder for chaining.
          */
         public Builder setFunctionOptimizationValue(int value) {
    -      
           functionOptimization_ = value;
    +      bitField0_ |= 0x00000200;
           onChanged();
           return this;
         }
    @@ -4685,8 +4716,7 @@ public Builder setFunctionOptimizationValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.RewriterConfig.Toggle getFunctionOptimization() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.valueOf(functionOptimization_);
    +      org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.forNumber(functionOptimization_);
           return result == null ? org.tensorflow.proto.RewriterConfig.Toggle.UNRECOGNIZED : result;
         }
         /**
    @@ -4702,7 +4732,7 @@ public Builder setFunctionOptimization(org.tensorflow.proto.RewriterConfig.Toggl
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00000200;
           functionOptimization_ = value.getNumber();
           onChanged();
           return this;
    @@ -4716,7 +4746,7 @@ public Builder setFunctionOptimization(org.tensorflow.proto.RewriterConfig.Toggl
          * @return This builder for chaining.
          */
         public Builder clearFunctionOptimization() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000200);
           functionOptimization_ = 0;
           onChanged();
           return this;
    @@ -4744,8 +4774,8 @@ public Builder clearFunctionOptimization() {
          * @return This builder for chaining.
          */
         public Builder setDebugStripperValue(int value) {
    -      
           debugStripper_ = value;
    +      bitField0_ |= 0x00000400;
           onChanged();
           return this;
         }
    @@ -4759,8 +4789,7 @@ public Builder setDebugStripperValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.RewriterConfig.Toggle getDebugStripper() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.valueOf(debugStripper_);
    +      org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.forNumber(debugStripper_);
           return result == null ? org.tensorflow.proto.RewriterConfig.Toggle.UNRECOGNIZED : result;
         }
         /**
    @@ -4776,7 +4805,7 @@ public Builder setDebugStripper(org.tensorflow.proto.RewriterConfig.Toggle value
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00000400;
           debugStripper_ = value.getNumber();
           onChanged();
           return this;
    @@ -4790,7 +4819,7 @@ public Builder setDebugStripper(org.tensorflow.proto.RewriterConfig.Toggle value
          * @return This builder for chaining.
          */
         public Builder clearDebugStripper() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000400);
           debugStripper_ = 0;
           onChanged();
           return this;
    @@ -4819,8 +4848,9 @@ public boolean getDisableModelPruning() {
          * @return This builder for chaining.
          */
         public Builder setDisableModelPruning(boolean value) {
    -      
    +
           disableModelPruning_ = value;
    +      bitField0_ |= 0x00000800;
           onChanged();
           return this;
         }
    @@ -4833,7 +4863,7 @@ public Builder setDisableModelPruning(boolean value) {
          * @return This builder for chaining.
          */
         public Builder clearDisableModelPruning() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000800);
           disableModelPruning_ = false;
           onChanged();
           return this;
    @@ -4863,8 +4893,8 @@ public Builder clearDisableModelPruning() {
          * @return This builder for chaining.
          */
         public Builder setScopedAllocatorOptimizationValue(int value) {
    -      
           scopedAllocatorOptimization_ = value;
    +      bitField0_ |= 0x00001000;
           onChanged();
           return this;
         }
    @@ -4879,8 +4909,7 @@ public Builder setScopedAllocatorOptimizationValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.RewriterConfig.Toggle getScopedAllocatorOptimization() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.valueOf(scopedAllocatorOptimization_);
    +      org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.forNumber(scopedAllocatorOptimization_);
           return result == null ? org.tensorflow.proto.RewriterConfig.Toggle.UNRECOGNIZED : result;
         }
         /**
    @@ -4897,7 +4926,7 @@ public Builder setScopedAllocatorOptimization(org.tensorflow.proto.RewriterConfi
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00001000;
           scopedAllocatorOptimization_ = value.getNumber();
           onChanged();
           return this;
    @@ -4912,7 +4941,7 @@ public Builder setScopedAllocatorOptimization(org.tensorflow.proto.RewriterConfi
          * @return This builder for chaining.
          */
         public Builder clearScopedAllocatorOptimization() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00001000);
           scopedAllocatorOptimization_ = 0;
           onChanged();
           return this;
    @@ -4940,8 +4969,8 @@ public Builder clearScopedAllocatorOptimization() {
          * @return This builder for chaining.
          */
         public Builder setPinToHostOptimizationValue(int value) {
    -      
           pinToHostOptimization_ = value;
    +      bitField0_ |= 0x00002000;
           onChanged();
           return this;
         }
    @@ -4955,8 +4984,7 @@ public Builder setPinToHostOptimizationValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.RewriterConfig.Toggle getPinToHostOptimization() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.valueOf(pinToHostOptimization_);
    +      org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.forNumber(pinToHostOptimization_);
           return result == null ? org.tensorflow.proto.RewriterConfig.Toggle.UNRECOGNIZED : result;
         }
         /**
    @@ -4972,7 +5000,7 @@ public Builder setPinToHostOptimization(org.tensorflow.proto.RewriterConfig.Togg
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00002000;
           pinToHostOptimization_ = value.getNumber();
           onChanged();
           return this;
    @@ -4986,7 +5014,7 @@ public Builder setPinToHostOptimization(org.tensorflow.proto.RewriterConfig.Togg
          * @return This builder for chaining.
          */
         public Builder clearPinToHostOptimization() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00002000);
           pinToHostOptimization_ = 0;
           onChanged();
           return this;
    @@ -5016,8 +5044,8 @@ public Builder clearPinToHostOptimization() {
          * @return This builder for chaining.
          */
         public Builder setImplementationSelectorValue(int value) {
    -      
           implementationSelector_ = value;
    +      bitField0_ |= 0x00004000;
           onChanged();
           return this;
         }
    @@ -5032,8 +5060,7 @@ public Builder setImplementationSelectorValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.RewriterConfig.Toggle getImplementationSelector() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.valueOf(implementationSelector_);
    +      org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.forNumber(implementationSelector_);
           return result == null ? org.tensorflow.proto.RewriterConfig.Toggle.UNRECOGNIZED : result;
         }
         /**
    @@ -5050,7 +5077,7 @@ public Builder setImplementationSelector(org.tensorflow.proto.RewriterConfig.Tog
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00004000;
           implementationSelector_ = value.getNumber();
           onChanged();
           return this;
    @@ -5065,7 +5092,7 @@ public Builder setImplementationSelector(org.tensorflow.proto.RewriterConfig.Tog
          * @return This builder for chaining.
          */
         public Builder clearImplementationSelector() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00004000);
           implementationSelector_ = 0;
           onChanged();
           return this;
    @@ -5099,8 +5126,8 @@ public Builder clearImplementationSelector() {
          * @return This builder for chaining.
          */
         public Builder setAutoMixedPrecisionValue(int value) {
    -      
           autoMixedPrecision_ = value;
    +      bitField0_ |= 0x00008000;
           onChanged();
           return this;
         }
    @@ -5117,8 +5144,7 @@ public Builder setAutoMixedPrecisionValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.RewriterConfig.Toggle getAutoMixedPrecision() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.valueOf(autoMixedPrecision_);
    +      org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.forNumber(autoMixedPrecision_);
           return result == null ? org.tensorflow.proto.RewriterConfig.Toggle.UNRECOGNIZED : result;
         }
         /**
    @@ -5137,7 +5163,7 @@ public Builder setAutoMixedPrecision(org.tensorflow.proto.RewriterConfig.Toggle
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00008000;
           autoMixedPrecision_ = value.getNumber();
           onChanged();
           return this;
    @@ -5154,7 +5180,7 @@ public Builder setAutoMixedPrecision(org.tensorflow.proto.RewriterConfig.Toggle
          * @return This builder for chaining.
          */
         public Builder clearAutoMixedPrecision() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00008000);
           autoMixedPrecision_ = 0;
           onChanged();
           return this;
    @@ -5190,8 +5216,8 @@ public Builder clearAutoMixedPrecision() {
          * @return This builder for chaining.
          */
         public Builder setAutoMixedPrecisionMklValue(int value) {
    -      
           autoMixedPrecisionMkl_ = value;
    +      bitField0_ |= 0x00010000;
           onChanged();
           return this;
         }
    @@ -5209,8 +5235,7 @@ public Builder setAutoMixedPrecisionMklValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.RewriterConfig.Toggle getAutoMixedPrecisionMkl() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.valueOf(autoMixedPrecisionMkl_);
    +      org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.forNumber(autoMixedPrecisionMkl_);
           return result == null ? org.tensorflow.proto.RewriterConfig.Toggle.UNRECOGNIZED : result;
         }
         /**
    @@ -5230,7 +5255,7 @@ public Builder setAutoMixedPrecisionMkl(org.tensorflow.proto.RewriterConfig.Togg
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00010000;
           autoMixedPrecisionMkl_ = value.getNumber();
           onChanged();
           return this;
    @@ -5248,7 +5273,7 @@ public Builder setAutoMixedPrecisionMkl(org.tensorflow.proto.RewriterConfig.Togg
          * @return This builder for chaining.
          */
         public Builder clearAutoMixedPrecisionMkl() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00010000);
           autoMixedPrecisionMkl_ = 0;
           onChanged();
           return this;
    @@ -5282,8 +5307,8 @@ public Builder clearAutoMixedPrecisionMkl() {
          * @return This builder for chaining.
          */
         public Builder setAutoMixedPrecisionOnednnBfloat16Value(int value) {
    -      
           autoMixedPrecisionOnednnBfloat16_ = value;
    +      bitField0_ |= 0x00020000;
           onChanged();
           return this;
         }
    @@ -5300,8 +5325,7 @@ public Builder setAutoMixedPrecisionOnednnBfloat16Value(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.RewriterConfig.Toggle getAutoMixedPrecisionOnednnBfloat16() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.valueOf(autoMixedPrecisionOnednnBfloat16_);
    +      org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.forNumber(autoMixedPrecisionOnednnBfloat16_);
           return result == null ? org.tensorflow.proto.RewriterConfig.Toggle.UNRECOGNIZED : result;
         }
         /**
    @@ -5320,7 +5344,7 @@ public Builder setAutoMixedPrecisionOnednnBfloat16(org.tensorflow.proto.Rewriter
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00020000;
           autoMixedPrecisionOnednnBfloat16_ = value.getNumber();
           onChanged();
           return this;
    @@ -5337,7 +5361,7 @@ public Builder setAutoMixedPrecisionOnednnBfloat16(org.tensorflow.proto.Rewriter
          * @return This builder for chaining.
          */
         public Builder clearAutoMixedPrecisionOnednnBfloat16() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00020000);
           autoMixedPrecisionOnednnBfloat16_ = 0;
           onChanged();
           return this;
    @@ -5373,8 +5397,8 @@ public Builder clearAutoMixedPrecisionOnednnBfloat16() {
          * @return This builder for chaining.
          */
         public Builder setAutoMixedPrecisionCpuValue(int value) {
    -      
           autoMixedPrecisionCpu_ = value;
    +      bitField0_ |= 0x00040000;
           onChanged();
           return this;
         }
    @@ -5392,8 +5416,7 @@ public Builder setAutoMixedPrecisionCpuValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.RewriterConfig.Toggle getAutoMixedPrecisionCpu() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.valueOf(autoMixedPrecisionCpu_);
    +      org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.forNumber(autoMixedPrecisionCpu_);
           return result == null ? org.tensorflow.proto.RewriterConfig.Toggle.UNRECOGNIZED : result;
         }
         /**
    @@ -5413,7 +5436,7 @@ public Builder setAutoMixedPrecisionCpu(org.tensorflow.proto.RewriterConfig.Togg
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00040000;
           autoMixedPrecisionCpu_ = value.getNumber();
           onChanged();
           return this;
    @@ -5431,7 +5454,7 @@ public Builder setAutoMixedPrecisionCpu(org.tensorflow.proto.RewriterConfig.Togg
          * @return This builder for chaining.
          */
         public Builder clearAutoMixedPrecisionCpu() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00040000);
           autoMixedPrecisionCpu_ = 0;
           onChanged();
           return this;
    @@ -5460,8 +5483,9 @@ public boolean getDisableMetaOptimizer() {
          * @return This builder for chaining.
          */
         public Builder setDisableMetaOptimizer(boolean value) {
    -      
    +
           disableMetaOptimizer_ = value;
    +      bitField0_ |= 0x00080000;
           onChanged();
           return this;
         }
    @@ -5474,7 +5498,7 @@ public Builder setDisableMetaOptimizer(boolean value) {
          * @return This builder for chaining.
          */
         public Builder clearDisableMetaOptimizer() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00080000);
           disableMetaOptimizer_ = false;
           onChanged();
           return this;
    @@ -5503,8 +5527,9 @@ public boolean getDisableTfgOptimizer() {
          * @return This builder for chaining.
          */
         public Builder setDisableTfgOptimizer(boolean value) {
    -      
    +
           disableTfgOptimizer_ = value;
    +      bitField0_ |= 0x00100000;
           onChanged();
           return this;
         }
    @@ -5517,7 +5542,7 @@ public Builder setDisableTfgOptimizer(boolean value) {
          * @return This builder for chaining.
          */
         public Builder clearDisableTfgOptimizer() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00100000);
           disableTfgOptimizer_ = false;
           onChanged();
           return this;
    @@ -5545,8 +5570,8 @@ public Builder clearDisableTfgOptimizer() {
          * @return This builder for chaining.
          */
         public Builder setUsePluginOptimizersValue(int value) {
    -      
           usePluginOptimizers_ = value;
    +      bitField0_ |= 0x00200000;
           onChanged();
           return this;
         }
    @@ -5560,8 +5585,7 @@ public Builder setUsePluginOptimizersValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.RewriterConfig.Toggle getUsePluginOptimizers() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.valueOf(usePluginOptimizers_);
    +      org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.forNumber(usePluginOptimizers_);
           return result == null ? org.tensorflow.proto.RewriterConfig.Toggle.UNRECOGNIZED : result;
         }
         /**
    @@ -5577,7 +5601,7 @@ public Builder setUsePluginOptimizers(org.tensorflow.proto.RewriterConfig.Toggle
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00200000;
           usePluginOptimizers_ = value.getNumber();
           onChanged();
           return this;
    @@ -5591,7 +5615,7 @@ public Builder setUsePluginOptimizers(org.tensorflow.proto.RewriterConfig.Toggle
          * @return This builder for chaining.
          */
         public Builder clearUsePluginOptimizers() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00200000);
           usePluginOptimizers_ = 0;
           onChanged();
           return this;
    @@ -5619,8 +5643,8 @@ public Builder clearUsePluginOptimizers() {
          * @return This builder for chaining.
          */
         public Builder setExperimentalConditionalCodeMotionValue(int value) {
    -      
           experimentalConditionalCodeMotion_ = value;
    +      bitField0_ |= 0x00400000;
           onChanged();
           return this;
         }
    @@ -5634,8 +5658,7 @@ public Builder setExperimentalConditionalCodeMotionValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.RewriterConfig.Toggle getExperimentalConditionalCodeMotion() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.valueOf(experimentalConditionalCodeMotion_);
    +      org.tensorflow.proto.RewriterConfig.Toggle result = org.tensorflow.proto.RewriterConfig.Toggle.forNumber(experimentalConditionalCodeMotion_);
           return result == null ? org.tensorflow.proto.RewriterConfig.Toggle.UNRECOGNIZED : result;
         }
         /**
    @@ -5651,7 +5674,7 @@ public Builder setExperimentalConditionalCodeMotion(org.tensorflow.proto.Rewrite
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00400000;
           experimentalConditionalCodeMotion_ = value.getNumber();
           onChanged();
           return this;
    @@ -5665,7 +5688,7 @@ public Builder setExperimentalConditionalCodeMotion(org.tensorflow.proto.Rewrite
          * @return This builder for chaining.
          */
         public Builder clearExperimentalConditionalCodeMotion() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00400000);
           experimentalConditionalCodeMotion_ = 0;
           onChanged();
           return this;
    @@ -5695,8 +5718,8 @@ public Builder clearExperimentalConditionalCodeMotion() {
          * @return This builder for chaining.
          */
         public Builder setMetaOptimizerIterationsValue(int value) {
    -      
           metaOptimizerIterations_ = value;
    +      bitField0_ |= 0x00800000;
           onChanged();
           return this;
         }
    @@ -5711,8 +5734,7 @@ public Builder setMetaOptimizerIterationsValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.RewriterConfig.NumIterationsType getMetaOptimizerIterations() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.RewriterConfig.NumIterationsType result = org.tensorflow.proto.RewriterConfig.NumIterationsType.valueOf(metaOptimizerIterations_);
    +      org.tensorflow.proto.RewriterConfig.NumIterationsType result = org.tensorflow.proto.RewriterConfig.NumIterationsType.forNumber(metaOptimizerIterations_);
           return result == null ? org.tensorflow.proto.RewriterConfig.NumIterationsType.UNRECOGNIZED : result;
         }
         /**
    @@ -5729,7 +5751,7 @@ public Builder setMetaOptimizerIterations(org.tensorflow.proto.RewriterConfig.Nu
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00800000;
           metaOptimizerIterations_ = value.getNumber();
           onChanged();
           return this;
    @@ -5744,7 +5766,7 @@ public Builder setMetaOptimizerIterations(org.tensorflow.proto.RewriterConfig.Nu
          * @return This builder for chaining.
          */
         public Builder clearMetaOptimizerIterations() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00800000);
           metaOptimizerIterations_ = 0;
           onChanged();
           return this;
    @@ -5779,8 +5801,9 @@ public int getMinGraphNodes() {
          * @return This builder for chaining.
          */
         public Builder setMinGraphNodes(int value) {
    -      
    +
           minGraphNodes_ = value;
    +      bitField0_ |= 0x01000000;
           onChanged();
           return this;
         }
    @@ -5796,7 +5819,7 @@ public Builder setMinGraphNodes(int value) {
          * @return This builder for chaining.
          */
         public Builder clearMinGraphNodes() {
    -      
    +      bitField0_ = (bitField0_ & ~0x01000000);
           minGraphNodes_ = 0;
           onChanged();
           return this;
    @@ -5827,8 +5850,9 @@ public boolean getExperimentalDisableCompressedTensorOptimization() {
          * @return This builder for chaining.
          */
         public Builder setExperimentalDisableCompressedTensorOptimization(boolean value) {
    -      
    +
           experimentalDisableCompressedTensorOptimization_ = value;
    +      bitField0_ |= 0x02000000;
           onChanged();
           return this;
         }
    @@ -5842,7 +5866,7 @@ public Builder setExperimentalDisableCompressedTensorOptimization(boolean value)
          * @return This builder for chaining.
          */
         public Builder clearExperimentalDisableCompressedTensorOptimization() {
    -      
    +      bitField0_ = (bitField0_ & ~0x02000000);
           experimentalDisableCompressedTensorOptimization_ = false;
           onChanged();
           return this;
    @@ -5881,8 +5905,9 @@ public boolean getExperimentalDisableFoldingQuantizationEmulation() {
          * @return This builder for chaining.
          */
         public Builder setExperimentalDisableFoldingQuantizationEmulation(boolean value) {
    -      
    +
           experimentalDisableFoldingQuantizationEmulation_ = value;
    +      bitField0_ |= 0x04000000;
           onChanged();
           return this;
         }
    @@ -5900,7 +5925,7 @@ public Builder setExperimentalDisableFoldingQuantizationEmulation(boolean value)
          * @return This builder for chaining.
          */
         public Builder clearExperimentalDisableFoldingQuantizationEmulation() {
    -      
    +      bitField0_ = (bitField0_ & ~0x04000000);
           experimentalDisableFoldingQuantizationEmulation_ = false;
           onChanged();
           return this;
    @@ -5932,8 +5957,8 @@ public Builder clearExperimentalDisableFoldingQuantizationEmulation() {
          * @return This builder for chaining.
          */
         public Builder setMemoryOptimizationValue(int value) {
    -      
           memoryOptimization_ = value;
    +      bitField0_ |= 0x08000000;
           onChanged();
           return this;
         }
    @@ -5949,8 +5974,7 @@ public Builder setMemoryOptimizationValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.RewriterConfig.MemOptType getMemoryOptimization() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.RewriterConfig.MemOptType result = org.tensorflow.proto.RewriterConfig.MemOptType.valueOf(memoryOptimization_);
    +      org.tensorflow.proto.RewriterConfig.MemOptType result = org.tensorflow.proto.RewriterConfig.MemOptType.forNumber(memoryOptimization_);
           return result == null ? org.tensorflow.proto.RewriterConfig.MemOptType.UNRECOGNIZED : result;
         }
         /**
    @@ -5968,7 +5992,7 @@ public Builder setMemoryOptimization(org.tensorflow.proto.RewriterConfig.MemOptT
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x08000000;
           memoryOptimization_ = value.getNumber();
           onChanged();
           return this;
    @@ -5984,7 +6008,7 @@ public Builder setMemoryOptimization(org.tensorflow.proto.RewriterConfig.MemOptT
          * @return This builder for chaining.
          */
         public Builder clearMemoryOptimization() {
    -      
    +      bitField0_ = (bitField0_ & ~0x08000000);
           memoryOptimization_ = 0;
           onChanged();
           return this;
    @@ -6064,11 +6088,9 @@ public java.lang.String getMemoryOptimizerTargetNodeNameScope() {
          */
         public Builder setMemoryOptimizerTargetNodeNameScope(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           memoryOptimizerTargetNodeNameScope_ = value;
    +      bitField0_ |= 0x10000000;
           onChanged();
           return this;
         }
    @@ -6088,8 +6110,8 @@ public Builder setMemoryOptimizerTargetNodeNameScope(
          * @return This builder for chaining.
          */
         public Builder clearMemoryOptimizerTargetNodeNameScope() {
    -      
           memoryOptimizerTargetNodeNameScope_ = getDefaultInstance().getMemoryOptimizerTargetNodeNameScope();
    +      bitField0_ = (bitField0_ & ~0x10000000);
           onChanged();
           return this;
         }
    @@ -6111,12 +6133,10 @@ public Builder clearMemoryOptimizerTargetNodeNameScope() {
          */
         public Builder setMemoryOptimizerTargetNodeNameScopeBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           memoryOptimizerTargetNodeNameScope_ = value;
    +      bitField0_ |= 0x10000000;
           onChanged();
           return this;
         }
    @@ -6148,8 +6168,9 @@ public long getMetaOptimizerTimeoutMs() {
          * @return This builder for chaining.
          */
         public Builder setMetaOptimizerTimeoutMs(long value) {
    -      
    +
           metaOptimizerTimeoutMs_ = value;
    +      bitField0_ |= 0x20000000;
           onChanged();
           return this;
         }
    @@ -6164,14 +6185,14 @@ public Builder setMetaOptimizerTimeoutMs(long value) {
          * @return This builder for chaining.
          */
         public Builder clearMetaOptimizerTimeoutMs() {
    -      
    +      bitField0_ = (bitField0_ & ~0x20000000);
           metaOptimizerTimeoutMs_ = 0L;
           onChanged();
           return this;
         }
     
         private org.tensorflow.proto.AutoParallelOptions autoParallel_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.AutoParallelOptions, org.tensorflow.proto.AutoParallelOptions.Builder, org.tensorflow.proto.AutoParallelOptionsOrBuilder> autoParallelBuilder_;
         /**
          * 
    @@ -6183,7 +6204,7 @@ public Builder clearMetaOptimizerTimeoutMs() {
          * @return Whether the autoParallel field is set.
          */
         public boolean hasAutoParallel() {
    -      return autoParallelBuilder_ != null || autoParallel_ != null;
    +      return ((bitField0_ & 0x40000000) != 0);
         }
         /**
          * 
    @@ -6215,11 +6236,11 @@ public Builder setAutoParallel(org.tensorflow.proto.AutoParallelOptions value) {
               throw new NullPointerException();
             }
             autoParallel_ = value;
    -        onChanged();
           } else {
             autoParallelBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x40000000;
    +      onChanged();
           return this;
         }
         /**
    @@ -6234,11 +6255,11 @@ public Builder setAutoParallel(
             org.tensorflow.proto.AutoParallelOptions.Builder builderForValue) {
           if (autoParallelBuilder_ == null) {
             autoParallel_ = builderForValue.build();
    -        onChanged();
           } else {
             autoParallelBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x40000000;
    +      onChanged();
           return this;
         }
         /**
    @@ -6251,17 +6272,20 @@ public Builder setAutoParallel(
          */
         public Builder mergeAutoParallel(org.tensorflow.proto.AutoParallelOptions value) {
           if (autoParallelBuilder_ == null) {
    -        if (autoParallel_ != null) {
    -          autoParallel_ =
    -            org.tensorflow.proto.AutoParallelOptions.newBuilder(autoParallel_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x40000000) != 0) &&
    +          autoParallel_ != null &&
    +          autoParallel_ != org.tensorflow.proto.AutoParallelOptions.getDefaultInstance()) {
    +          getAutoParallelBuilder().mergeFrom(value);
             } else {
               autoParallel_ = value;
             }
    -        onChanged();
           } else {
             autoParallelBuilder_.mergeFrom(value);
           }
    -
    +      if (autoParallel_ != null) {
    +        bitField0_ |= 0x40000000;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -6273,14 +6297,13 @@ public Builder mergeAutoParallel(org.tensorflow.proto.AutoParallelOptions value)
          * .tensorflow.AutoParallelOptions auto_parallel = 5;
          */
         public Builder clearAutoParallel() {
    -      if (autoParallelBuilder_ == null) {
    -        autoParallel_ = null;
    -        onChanged();
    -      } else {
    -        autoParallel_ = null;
    +      bitField0_ = (bitField0_ & ~0x40000000);
    +      autoParallel_ = null;
    +      if (autoParallelBuilder_ != null) {
    +        autoParallelBuilder_.dispose();
             autoParallelBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -6292,7 +6315,7 @@ public Builder clearAutoParallel() {
          * .tensorflow.AutoParallelOptions auto_parallel = 5;
          */
         public org.tensorflow.proto.AutoParallelOptions.Builder getAutoParallelBuilder() {
    -      
    +      bitField0_ |= 0x40000000;
           onChanged();
           return getAutoParallelFieldBuilder().getBuilder();
         }
    @@ -6320,11 +6343,11 @@ public org.tensorflow.proto.AutoParallelOptionsOrBuilder getAutoParallelOrBuilde
          *
          * .tensorflow.AutoParallelOptions auto_parallel = 5;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.AutoParallelOptions, org.tensorflow.proto.AutoParallelOptions.Builder, org.tensorflow.proto.AutoParallelOptionsOrBuilder> 
             getAutoParallelFieldBuilder() {
           if (autoParallelBuilder_ == null) {
    -        autoParallelBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        autoParallelBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.AutoParallelOptions, org.tensorflow.proto.AutoParallelOptions.Builder, org.tensorflow.proto.AutoParallelOptionsOrBuilder>(
                     getAutoParallel(),
                     getParentForChildren(),
    @@ -6361,8 +6384,9 @@ public boolean getFailOnOptimizerErrors() {
          * @return This builder for chaining.
          */
         public Builder setFailOnOptimizerErrors(boolean value) {
    -      
    +
           failOnOptimizerErrors_ = value;
    +      bitField0_ |= 0x80000000;
           onChanged();
           return this;
         }
    @@ -6377,21 +6401,21 @@ public Builder setFailOnOptimizerErrors(boolean value) {
          * @return This builder for chaining.
          */
         public Builder clearFailOnOptimizerErrors() {
    -      
    +      bitField0_ = (bitField0_ & ~0x80000000);
           failOnOptimizerErrors_ = false;
           onChanged();
           return this;
         }
     
         private org.tensorflow.proto.ScopedAllocatorOptions scopedAllocatorOpts_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.ScopedAllocatorOptions, org.tensorflow.proto.ScopedAllocatorOptions.Builder, org.tensorflow.proto.ScopedAllocatorOptionsOrBuilder> scopedAllocatorOptsBuilder_;
         /**
          * .tensorflow.ScopedAllocatorOptions scoped_allocator_opts = 16;
          * @return Whether the scopedAllocatorOpts field is set.
          */
         public boolean hasScopedAllocatorOpts() {
    -      return scopedAllocatorOptsBuilder_ != null || scopedAllocatorOpts_ != null;
    +      return ((bitField1_ & 0x00000001) != 0);
         }
         /**
          * .tensorflow.ScopedAllocatorOptions scoped_allocator_opts = 16;
    @@ -6413,11 +6437,11 @@ public Builder setScopedAllocatorOpts(org.tensorflow.proto.ScopedAllocatorOption
               throw new NullPointerException();
             }
             scopedAllocatorOpts_ = value;
    -        onChanged();
           } else {
             scopedAllocatorOptsBuilder_.setMessage(value);
           }
    -
    +      bitField1_ |= 0x00000001;
    +      onChanged();
           return this;
         }
         /**
    @@ -6427,11 +6451,11 @@ public Builder setScopedAllocatorOpts(
             org.tensorflow.proto.ScopedAllocatorOptions.Builder builderForValue) {
           if (scopedAllocatorOptsBuilder_ == null) {
             scopedAllocatorOpts_ = builderForValue.build();
    -        onChanged();
           } else {
             scopedAllocatorOptsBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField1_ |= 0x00000001;
    +      onChanged();
           return this;
         }
         /**
    @@ -6439,38 +6463,40 @@ public Builder setScopedAllocatorOpts(
          */
         public Builder mergeScopedAllocatorOpts(org.tensorflow.proto.ScopedAllocatorOptions value) {
           if (scopedAllocatorOptsBuilder_ == null) {
    -        if (scopedAllocatorOpts_ != null) {
    -          scopedAllocatorOpts_ =
    -            org.tensorflow.proto.ScopedAllocatorOptions.newBuilder(scopedAllocatorOpts_).mergeFrom(value).buildPartial();
    +        if (((bitField1_ & 0x00000001) != 0) &&
    +          scopedAllocatorOpts_ != null &&
    +          scopedAllocatorOpts_ != org.tensorflow.proto.ScopedAllocatorOptions.getDefaultInstance()) {
    +          getScopedAllocatorOptsBuilder().mergeFrom(value);
             } else {
               scopedAllocatorOpts_ = value;
             }
    -        onChanged();
           } else {
             scopedAllocatorOptsBuilder_.mergeFrom(value);
           }
    -
    +      if (scopedAllocatorOpts_ != null) {
    +        bitField1_ |= 0x00000001;
    +        onChanged();
    +      }
           return this;
         }
         /**
          * .tensorflow.ScopedAllocatorOptions scoped_allocator_opts = 16;
          */
         public Builder clearScopedAllocatorOpts() {
    -      if (scopedAllocatorOptsBuilder_ == null) {
    -        scopedAllocatorOpts_ = null;
    -        onChanged();
    -      } else {
    -        scopedAllocatorOpts_ = null;
    +      bitField1_ = (bitField1_ & ~0x00000001);
    +      scopedAllocatorOpts_ = null;
    +      if (scopedAllocatorOptsBuilder_ != null) {
    +        scopedAllocatorOptsBuilder_.dispose();
             scopedAllocatorOptsBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
          * .tensorflow.ScopedAllocatorOptions scoped_allocator_opts = 16;
          */
         public org.tensorflow.proto.ScopedAllocatorOptions.Builder getScopedAllocatorOptsBuilder() {
    -      
    +      bitField1_ |= 0x00000001;
           onChanged();
           return getScopedAllocatorOptsFieldBuilder().getBuilder();
         }
    @@ -6488,11 +6514,11 @@ public org.tensorflow.proto.ScopedAllocatorOptionsOrBuilder getScopedAllocatorOp
         /**
          * .tensorflow.ScopedAllocatorOptions scoped_allocator_opts = 16;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.ScopedAllocatorOptions, org.tensorflow.proto.ScopedAllocatorOptions.Builder, org.tensorflow.proto.ScopedAllocatorOptionsOrBuilder> 
             getScopedAllocatorOptsFieldBuilder() {
           if (scopedAllocatorOptsBuilder_ == null) {
    -        scopedAllocatorOptsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        scopedAllocatorOptsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.ScopedAllocatorOptions, org.tensorflow.proto.ScopedAllocatorOptions.Builder, org.tensorflow.proto.ScopedAllocatorOptionsOrBuilder>(
                     getScopedAllocatorOpts(),
                     getParentForChildren(),
    @@ -6502,23 +6528,26 @@ public org.tensorflow.proto.ScopedAllocatorOptionsOrBuilder getScopedAllocatorOp
           return scopedAllocatorOptsBuilder_;
         }
     
    -    private com.google.protobuf.LazyStringList optimizers_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +    private com.google.protobuf.LazyStringArrayList optimizers_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         private void ensureOptimizersIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    +      if (!optimizers_.isModifiable()) {
             optimizers_ = new com.google.protobuf.LazyStringArrayList(optimizers_);
    -        bitField0_ |= 0x00000001;
    -       }
    +      }
    +      bitField1_ |= 0x00000002;
         }
         /**
          * 
          * If non-empty, will use this as an alternative way to specify a list of
          * optimizations to turn on and the order of the optimizations (replacing the
          * meta-optimizer).
    +     *
          * Of the RewriterConfig options, only the AutoParallel configuration options
          * (the auto_parallel field) apply to manually requested optimization passes
          * ("autoparallel"). Memory optimization passes ("memory") invoked here are
          * not configurable (in contrast to memory optimization passes through the
          * meta-optimizer) and act only on manual op annotations.
    +     *
          * Custom optimizers (see custom_optimizers) that are not part of this
          * schedule will be run after - in the order that they were specified.
          * 
    @@ -6528,18 +6557,21 @@ private void ensureOptimizersIsMutable() { */ public com.google.protobuf.ProtocolStringList getOptimizersList() { - return optimizers_.getUnmodifiableView(); + optimizers_.makeImmutable(); + return optimizers_; } /** *
          * If non-empty, will use this as an alternative way to specify a list of
          * optimizations to turn on and the order of the optimizations (replacing the
          * meta-optimizer).
    +     *
          * Of the RewriterConfig options, only the AutoParallel configuration options
          * (the auto_parallel field) apply to manually requested optimization passes
          * ("autoparallel"). Memory optimization passes ("memory") invoked here are
          * not configurable (in contrast to memory optimization passes through the
          * meta-optimizer) and act only on manual op annotations.
    +     *
          * Custom optimizers (see custom_optimizers) that are not part of this
          * schedule will be run after - in the order that they were specified.
          * 
    @@ -6555,11 +6587,13 @@ public int getOptimizersCount() { * If non-empty, will use this as an alternative way to specify a list of * optimizations to turn on and the order of the optimizations (replacing the * meta-optimizer). + * * Of the RewriterConfig options, only the AutoParallel configuration options * (the auto_parallel field) apply to manually requested optimization passes * ("autoparallel"). Memory optimization passes ("memory") invoked here are * not configurable (in contrast to memory optimization passes through the * meta-optimizer) and act only on manual op annotations. + * * Custom optimizers (see custom_optimizers) that are not part of this * schedule will be run after - in the order that they were specified. *
    @@ -6576,11 +6610,13 @@ public java.lang.String getOptimizers(int index) { * If non-empty, will use this as an alternative way to specify a list of * optimizations to turn on and the order of the optimizations (replacing the * meta-optimizer). + * * Of the RewriterConfig options, only the AutoParallel configuration options * (the auto_parallel field) apply to manually requested optimization passes * ("autoparallel"). Memory optimization passes ("memory") invoked here are * not configurable (in contrast to memory optimization passes through the * meta-optimizer) and act only on manual op annotations. + * * Custom optimizers (see custom_optimizers) that are not part of this * schedule will be run after - in the order that they were specified. *
    @@ -6598,11 +6634,13 @@ public java.lang.String getOptimizers(int index) { * If non-empty, will use this as an alternative way to specify a list of * optimizations to turn on and the order of the optimizations (replacing the * meta-optimizer). + * * Of the RewriterConfig options, only the AutoParallel configuration options * (the auto_parallel field) apply to manually requested optimization passes * ("autoparallel"). Memory optimization passes ("memory") invoked here are * not configurable (in contrast to memory optimization passes through the * meta-optimizer) and act only on manual op annotations. + * * Custom optimizers (see custom_optimizers) that are not part of this * schedule will be run after - in the order that they were specified. *
    @@ -6614,11 +6652,10 @@ public java.lang.String getOptimizers(int index) { */ public Builder setOptimizers( int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureOptimizersIsMutable(); + if (value == null) { throw new NullPointerException(); } + ensureOptimizersIsMutable(); optimizers_.set(index, value); + bitField1_ |= 0x00000002; onChanged(); return this; } @@ -6627,11 +6664,13 @@ public Builder setOptimizers( * If non-empty, will use this as an alternative way to specify a list of * optimizations to turn on and the order of the optimizations (replacing the * meta-optimizer). + * * Of the RewriterConfig options, only the AutoParallel configuration options * (the auto_parallel field) apply to manually requested optimization passes * ("autoparallel"). Memory optimization passes ("memory") invoked here are * not configurable (in contrast to memory optimization passes through the * meta-optimizer) and act only on manual op annotations. + * * Custom optimizers (see custom_optimizers) that are not part of this * schedule will be run after - in the order that they were specified. *
    @@ -6642,11 +6681,10 @@ public Builder setOptimizers( */ public Builder addOptimizers( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureOptimizersIsMutable(); + if (value == null) { throw new NullPointerException(); } + ensureOptimizersIsMutable(); optimizers_.add(value); + bitField1_ |= 0x00000002; onChanged(); return this; } @@ -6655,11 +6693,13 @@ public Builder addOptimizers( * If non-empty, will use this as an alternative way to specify a list of * optimizations to turn on and the order of the optimizations (replacing the * meta-optimizer). + * * Of the RewriterConfig options, only the AutoParallel configuration options * (the auto_parallel field) apply to manually requested optimization passes * ("autoparallel"). Memory optimization passes ("memory") invoked here are * not configurable (in contrast to memory optimization passes through the * meta-optimizer) and act only on manual op annotations. + * * Custom optimizers (see custom_optimizers) that are not part of this * schedule will be run after - in the order that they were specified. *
    @@ -6673,6 +6713,7 @@ public Builder addAllOptimizers( ensureOptimizersIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, optimizers_); + bitField1_ |= 0x00000002; onChanged(); return this; } @@ -6681,11 +6722,13 @@ public Builder addAllOptimizers( * If non-empty, will use this as an alternative way to specify a list of * optimizations to turn on and the order of the optimizations (replacing the * meta-optimizer). + * * Of the RewriterConfig options, only the AutoParallel configuration options * (the auto_parallel field) apply to manually requested optimization passes * ("autoparallel"). Memory optimization passes ("memory") invoked here are * not configurable (in contrast to memory optimization passes through the * meta-optimizer) and act only on manual op annotations. + * * Custom optimizers (see custom_optimizers) that are not part of this * schedule will be run after - in the order that they were specified. *
    @@ -6694,8 +6737,9 @@ public Builder addAllOptimizers( * @return This builder for chaining. */ public Builder clearOptimizers() { - optimizers_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); + optimizers_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField1_ = (bitField1_ & ~0x00000002);; onChanged(); return this; } @@ -6704,11 +6748,13 @@ public Builder clearOptimizers() { * If non-empty, will use this as an alternative way to specify a list of * optimizations to turn on and the order of the optimizations (replacing the * meta-optimizer). + * * Of the RewriterConfig options, only the AutoParallel configuration options * (the auto_parallel field) apply to manually requested optimization passes * ("autoparallel"). Memory optimization passes ("memory") invoked here are * not configurable (in contrast to memory optimization passes through the * meta-optimizer) and act only on manual op annotations. + * * Custom optimizers (see custom_optimizers) that are not part of this * schedule will be run after - in the order that they were specified. *
    @@ -6719,12 +6765,11 @@ public Builder clearOptimizers() { */ public Builder addOptimizersBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); ensureOptimizersIsMutable(); optimizers_.add(value); + bitField1_ |= 0x00000002; onChanged(); return this; } @@ -6732,13 +6777,13 @@ public Builder addOptimizersBytes( private java.util.List customOptimizers_ = java.util.Collections.emptyList(); private void ensureCustomOptimizersIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { + if (!((bitField1_ & 0x00000004) != 0)) { customOptimizers_ = new java.util.ArrayList(customOptimizers_); - bitField0_ |= 0x00000002; + bitField1_ |= 0x00000004; } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer, org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer.Builder, org.tensorflow.proto.RewriterConfig.CustomGraphOptimizerOrBuilder> customOptimizersBuilder_; /** @@ -6928,7 +6973,7 @@ public Builder addAllCustomOptimizers( public Builder clearCustomOptimizers() { if (customOptimizersBuilder_ == null) { customOptimizers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField1_ = (bitField1_ & ~0x00000004); onChanged(); } else { customOptimizersBuilder_.clear(); @@ -7026,14 +7071,14 @@ public org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer.Builder addCusto getCustomOptimizersBuilderList() { return getCustomOptimizersFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer, org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer.Builder, org.tensorflow.proto.RewriterConfig.CustomGraphOptimizerOrBuilder> getCustomOptimizersFieldBuilder() { if (customOptimizersBuilder_ == null) { - customOptimizersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + customOptimizersBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer, org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer.Builder, org.tensorflow.proto.RewriterConfig.CustomGraphOptimizerOrBuilder>( customOptimizers_, - ((bitField0_ & 0x00000002) != 0), + ((bitField1_ & 0x00000004) != 0), getParentForChildren(), isClean()); customOptimizers_ = null; @@ -7042,7 +7087,7 @@ public org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer.Builder addCusto } private org.tensorflow.proto.VerifierConfig interOptimizerVerifierConfig_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.VerifierConfig, org.tensorflow.proto.VerifierConfig.Builder, org.tensorflow.proto.VerifierConfigOrBuilder> interOptimizerVerifierConfigBuilder_; /** *
    @@ -7053,7 +7098,7 @@ public org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer.Builder addCusto
          * @return Whether the interOptimizerVerifierConfig field is set.
          */
         public boolean hasInterOptimizerVerifierConfig() {
    -      return interOptimizerVerifierConfigBuilder_ != null || interOptimizerVerifierConfig_ != null;
    +      return ((bitField1_ & 0x00000008) != 0);
         }
         /**
          * 
    @@ -7083,11 +7128,11 @@ public Builder setInterOptimizerVerifierConfig(org.tensorflow.proto.VerifierConf
               throw new NullPointerException();
             }
             interOptimizerVerifierConfig_ = value;
    -        onChanged();
           } else {
             interOptimizerVerifierConfigBuilder_.setMessage(value);
           }
    -
    +      bitField1_ |= 0x00000008;
    +      onChanged();
           return this;
         }
         /**
    @@ -7101,11 +7146,11 @@ public Builder setInterOptimizerVerifierConfig(
             org.tensorflow.proto.VerifierConfig.Builder builderForValue) {
           if (interOptimizerVerifierConfigBuilder_ == null) {
             interOptimizerVerifierConfig_ = builderForValue.build();
    -        onChanged();
           } else {
             interOptimizerVerifierConfigBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField1_ |= 0x00000008;
    +      onChanged();
           return this;
         }
         /**
    @@ -7117,17 +7162,20 @@ public Builder setInterOptimizerVerifierConfig(
          */
         public Builder mergeInterOptimizerVerifierConfig(org.tensorflow.proto.VerifierConfig value) {
           if (interOptimizerVerifierConfigBuilder_ == null) {
    -        if (interOptimizerVerifierConfig_ != null) {
    -          interOptimizerVerifierConfig_ =
    -            org.tensorflow.proto.VerifierConfig.newBuilder(interOptimizerVerifierConfig_).mergeFrom(value).buildPartial();
    +        if (((bitField1_ & 0x00000008) != 0) &&
    +          interOptimizerVerifierConfig_ != null &&
    +          interOptimizerVerifierConfig_ != org.tensorflow.proto.VerifierConfig.getDefaultInstance()) {
    +          getInterOptimizerVerifierConfigBuilder().mergeFrom(value);
             } else {
               interOptimizerVerifierConfig_ = value;
             }
    -        onChanged();
           } else {
             interOptimizerVerifierConfigBuilder_.mergeFrom(value);
           }
    -
    +      if (interOptimizerVerifierConfig_ != null) {
    +        bitField1_ |= 0x00000008;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -7138,14 +7186,13 @@ public Builder mergeInterOptimizerVerifierConfig(org.tensorflow.proto.VerifierCo
          * .tensorflow.VerifierConfig inter_optimizer_verifier_config = 300;
          */
         public Builder clearInterOptimizerVerifierConfig() {
    -      if (interOptimizerVerifierConfigBuilder_ == null) {
    -        interOptimizerVerifierConfig_ = null;
    -        onChanged();
    -      } else {
    -        interOptimizerVerifierConfig_ = null;
    +      bitField1_ = (bitField1_ & ~0x00000008);
    +      interOptimizerVerifierConfig_ = null;
    +      if (interOptimizerVerifierConfigBuilder_ != null) {
    +        interOptimizerVerifierConfigBuilder_.dispose();
             interOptimizerVerifierConfigBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -7156,7 +7203,7 @@ public Builder clearInterOptimizerVerifierConfig() {
          * .tensorflow.VerifierConfig inter_optimizer_verifier_config = 300;
          */
         public org.tensorflow.proto.VerifierConfig.Builder getInterOptimizerVerifierConfigBuilder() {
    -      
    +      bitField1_ |= 0x00000008;
           onChanged();
           return getInterOptimizerVerifierConfigFieldBuilder().getBuilder();
         }
    @@ -7182,11 +7229,11 @@ public org.tensorflow.proto.VerifierConfigOrBuilder getInterOptimizerVerifierCon
          *
          * .tensorflow.VerifierConfig inter_optimizer_verifier_config = 300;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.VerifierConfig, org.tensorflow.proto.VerifierConfig.Builder, org.tensorflow.proto.VerifierConfigOrBuilder> 
             getInterOptimizerVerifierConfigFieldBuilder() {
           if (interOptimizerVerifierConfigBuilder_ == null) {
    -        interOptimizerVerifierConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        interOptimizerVerifierConfigBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.VerifierConfig, org.tensorflow.proto.VerifierConfig.Builder, org.tensorflow.proto.VerifierConfigOrBuilder>(
                     getInterOptimizerVerifierConfig(),
                     getParentForChildren(),
    @@ -7197,7 +7244,7 @@ public org.tensorflow.proto.VerifierConfigOrBuilder getInterOptimizerVerifierCon
         }
     
         private org.tensorflow.proto.VerifierConfig postOptimizationVerifierConfig_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.VerifierConfig, org.tensorflow.proto.VerifierConfig.Builder, org.tensorflow.proto.VerifierConfigOrBuilder> postOptimizationVerifierConfigBuilder_;
         /**
          * 
    @@ -7209,7 +7256,7 @@ public org.tensorflow.proto.VerifierConfigOrBuilder getInterOptimizerVerifierCon
          * @return Whether the postOptimizationVerifierConfig field is set.
          */
         public boolean hasPostOptimizationVerifierConfig() {
    -      return postOptimizationVerifierConfigBuilder_ != null || postOptimizationVerifierConfig_ != null;
    +      return ((bitField1_ & 0x00000010) != 0);
         }
         /**
          * 
    @@ -7241,11 +7288,11 @@ public Builder setPostOptimizationVerifierConfig(org.tensorflow.proto.VerifierCo
               throw new NullPointerException();
             }
             postOptimizationVerifierConfig_ = value;
    -        onChanged();
           } else {
             postOptimizationVerifierConfigBuilder_.setMessage(value);
           }
    -
    +      bitField1_ |= 0x00000010;
    +      onChanged();
           return this;
         }
         /**
    @@ -7260,11 +7307,11 @@ public Builder setPostOptimizationVerifierConfig(
             org.tensorflow.proto.VerifierConfig.Builder builderForValue) {
           if (postOptimizationVerifierConfigBuilder_ == null) {
             postOptimizationVerifierConfig_ = builderForValue.build();
    -        onChanged();
           } else {
             postOptimizationVerifierConfigBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField1_ |= 0x00000010;
    +      onChanged();
           return this;
         }
         /**
    @@ -7277,17 +7324,20 @@ public Builder setPostOptimizationVerifierConfig(
          */
         public Builder mergePostOptimizationVerifierConfig(org.tensorflow.proto.VerifierConfig value) {
           if (postOptimizationVerifierConfigBuilder_ == null) {
    -        if (postOptimizationVerifierConfig_ != null) {
    -          postOptimizationVerifierConfig_ =
    -            org.tensorflow.proto.VerifierConfig.newBuilder(postOptimizationVerifierConfig_).mergeFrom(value).buildPartial();
    +        if (((bitField1_ & 0x00000010) != 0) &&
    +          postOptimizationVerifierConfig_ != null &&
    +          postOptimizationVerifierConfig_ != org.tensorflow.proto.VerifierConfig.getDefaultInstance()) {
    +          getPostOptimizationVerifierConfigBuilder().mergeFrom(value);
             } else {
               postOptimizationVerifierConfig_ = value;
             }
    -        onChanged();
           } else {
             postOptimizationVerifierConfigBuilder_.mergeFrom(value);
           }
    -
    +      if (postOptimizationVerifierConfig_ != null) {
    +        bitField1_ |= 0x00000010;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -7299,14 +7349,13 @@ public Builder mergePostOptimizationVerifierConfig(org.tensorflow.proto.Verifier
          * .tensorflow.VerifierConfig post_optimization_verifier_config = 301;
          */
         public Builder clearPostOptimizationVerifierConfig() {
    -      if (postOptimizationVerifierConfigBuilder_ == null) {
    -        postOptimizationVerifierConfig_ = null;
    -        onChanged();
    -      } else {
    -        postOptimizationVerifierConfig_ = null;
    +      bitField1_ = (bitField1_ & ~0x00000010);
    +      postOptimizationVerifierConfig_ = null;
    +      if (postOptimizationVerifierConfigBuilder_ != null) {
    +        postOptimizationVerifierConfigBuilder_.dispose();
             postOptimizationVerifierConfigBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -7318,7 +7367,7 @@ public Builder clearPostOptimizationVerifierConfig() {
          * .tensorflow.VerifierConfig post_optimization_verifier_config = 301;
          */
         public org.tensorflow.proto.VerifierConfig.Builder getPostOptimizationVerifierConfigBuilder() {
    -      
    +      bitField1_ |= 0x00000010;
           onChanged();
           return getPostOptimizationVerifierConfigFieldBuilder().getBuilder();
         }
    @@ -7346,11 +7395,11 @@ public org.tensorflow.proto.VerifierConfigOrBuilder getPostOptimizationVerifierC
          *
          * .tensorflow.VerifierConfig post_optimization_verifier_config = 301;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.VerifierConfig, org.tensorflow.proto.VerifierConfig.Builder, org.tensorflow.proto.VerifierConfigOrBuilder> 
             getPostOptimizationVerifierConfigFieldBuilder() {
           if (postOptimizationVerifierConfigBuilder_ == null) {
    -        postOptimizationVerifierConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        postOptimizationVerifierConfigBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.VerifierConfig, org.tensorflow.proto.VerifierConfig.Builder, org.tensorflow.proto.VerifierConfigOrBuilder>(
                     getPostOptimizationVerifierConfig(),
                     getParentForChildren(),
    @@ -7359,18 +7408,6 @@ public org.tensorflow.proto.VerifierConfigOrBuilder getPostOptimizationVerifierC
           }
           return postOptimizationVerifierConfigBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.RewriterConfig)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RewriterConfigOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RewriterConfigOrBuilder.java
    index 2676ca54911..b7e13584dda 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RewriterConfigOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RewriterConfigOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/rewriter_config.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -656,11 +658,13 @@ public interface RewriterConfigOrBuilder extends
        * If non-empty, will use this as an alternative way to specify a list of
        * optimizations to turn on and the order of the optimizations (replacing the
        * meta-optimizer).
    +   *
        * Of the RewriterConfig options, only the AutoParallel configuration options
        * (the auto_parallel field) apply to manually requested optimization passes
        * ("autoparallel"). Memory optimization passes ("memory") invoked here are
        * not configurable (in contrast to memory optimization passes through the
        * meta-optimizer) and act only on manual op annotations.
    +   *
        * Custom optimizers (see custom_optimizers) that are not part of this
        * schedule will be run after - in the order that they were specified.
        * 
    @@ -675,11 +679,13 @@ public interface RewriterConfigOrBuilder extends * If non-empty, will use this as an alternative way to specify a list of * optimizations to turn on and the order of the optimizations (replacing the * meta-optimizer). + * * Of the RewriterConfig options, only the AutoParallel configuration options * (the auto_parallel field) apply to manually requested optimization passes * ("autoparallel"). Memory optimization passes ("memory") invoked here are * not configurable (in contrast to memory optimization passes through the * meta-optimizer) and act only on manual op annotations. + * * Custom optimizers (see custom_optimizers) that are not part of this * schedule will be run after - in the order that they were specified. *
    @@ -693,11 +699,13 @@ public interface RewriterConfigOrBuilder extends * If non-empty, will use this as an alternative way to specify a list of * optimizations to turn on and the order of the optimizations (replacing the * meta-optimizer). + * * Of the RewriterConfig options, only the AutoParallel configuration options * (the auto_parallel field) apply to manually requested optimization passes * ("autoparallel"). Memory optimization passes ("memory") invoked here are * not configurable (in contrast to memory optimization passes through the * meta-optimizer) and act only on manual op annotations. + * * Custom optimizers (see custom_optimizers) that are not part of this * schedule will be run after - in the order that they were specified. *
    @@ -712,11 +720,13 @@ public interface RewriterConfigOrBuilder extends * If non-empty, will use this as an alternative way to specify a list of * optimizations to turn on and the order of the optimizations (replacing the * meta-optimizer). + * * Of the RewriterConfig options, only the AutoParallel configuration options * (the auto_parallel field) apply to manually requested optimization passes * ("autoparallel"). Memory optimization passes ("memory") invoked here are * not configurable (in contrast to memory optimization passes through the * meta-optimizer) and act only on manual op annotations. + * * Custom optimizers (see custom_optimizers) that are not part of this * schedule will be run after - in the order that they were specified. *
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RewriterConfigProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RewriterConfigProtos.java index 30840c488e0..d445dbfc551 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RewriterConfigProtos.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RewriterConfigProtos.java @@ -1,10 +1,21 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/protobuf/rewriter_config.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; public final class RewriterConfigProtos { private RewriterConfigProtos() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + RewriterConfigProtos.class.getName()); + } public static void registerAllExtensions( com.google.protobuf.ExtensionRegistryLite registry) { } @@ -17,27 +28,27 @@ public static void registerAllExtensions( static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_AutoParallelOptions_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_AutoParallelOptions_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_ScopedAllocatorOptions_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_ScopedAllocatorOptions_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_RewriterConfig_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_RewriterConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_RewriterConfig_CustomGraphOptimizer_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_RewriterConfig_CustomGraphOptimizer_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_RewriterConfig_CustomGraphOptimizer_ParameterMapEntry_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_RewriterConfig_CustomGraphOptimizer_ParameterMapEntry_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor @@ -140,33 +151,34 @@ public static void registerAllExtensions( internal_static_tensorflow_AutoParallelOptions_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_tensorflow_AutoParallelOptions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_AutoParallelOptions_descriptor, new java.lang.String[] { "Enable", "NumReplicas", }); internal_static_tensorflow_ScopedAllocatorOptions_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_tensorflow_ScopedAllocatorOptions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_ScopedAllocatorOptions_descriptor, new java.lang.String[] { "EnableOp", }); internal_static_tensorflow_RewriterConfig_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_tensorflow_RewriterConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_RewriterConfig_descriptor, new java.lang.String[] { "CpuLayoutConversion", "LayoutOptimizer", "ConstantFolding", "ShapeOptimization", "Remapping", "CommonSubgraphElimination", "ArithmeticOptimization", "DependencyOptimization", "LoopOptimization", "FunctionOptimization", "DebugStripper", "DisableModelPruning", "ScopedAllocatorOptimization", "PinToHostOptimization", "ImplementationSelector", "AutoMixedPrecision", "AutoMixedPrecisionMkl", "AutoMixedPrecisionOnednnBfloat16", "AutoMixedPrecisionCpu", "DisableMetaOptimizer", "DisableTfgOptimizer", "UsePluginOptimizers", "ExperimentalConditionalCodeMotion", "MetaOptimizerIterations", "MinGraphNodes", "ExperimentalDisableCompressedTensorOptimization", "ExperimentalDisableFoldingQuantizationEmulation", "MemoryOptimization", "MemoryOptimizerTargetNodeNameScope", "MetaOptimizerTimeoutMs", "AutoParallel", "FailOnOptimizerErrors", "ScopedAllocatorOpts", "Optimizers", "CustomOptimizers", "InterOptimizerVerifierConfig", "PostOptimizationVerifierConfig", }); internal_static_tensorflow_RewriterConfig_CustomGraphOptimizer_descriptor = internal_static_tensorflow_RewriterConfig_descriptor.getNestedTypes().get(0); internal_static_tensorflow_RewriterConfig_CustomGraphOptimizer_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_RewriterConfig_CustomGraphOptimizer_descriptor, new java.lang.String[] { "Name", "ParameterMap", }); internal_static_tensorflow_RewriterConfig_CustomGraphOptimizer_ParameterMapEntry_descriptor = internal_static_tensorflow_RewriterConfig_CustomGraphOptimizer_descriptor.getNestedTypes().get(0); internal_static_tensorflow_RewriterConfig_CustomGraphOptimizer_ParameterMapEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_RewriterConfig_CustomGraphOptimizer_ParameterMapEntry_descriptor, new java.lang.String[] { "Key", "Value", }); + descriptor.resolveAllFeaturesImmutable(); org.tensorflow.proto.AttrValueProtos.getDescriptor(); org.tensorflow.proto.VerifierConfigProtos.getDescriptor(); } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RpcOptions.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RpcOptions.java index dc7c3d8cf50..9dec7784f93 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RpcOptions.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RpcOptions.java @@ -1,10 +1,21 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tsl/protobuf/rpc_options.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: xla/tsl/protobuf/rpc_options.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; public final class RpcOptions { private RpcOptions() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + RpcOptions.class.getName()); + } public static void registerAllExtensions( com.google.protobuf.ExtensionRegistryLite registry) { } @@ -21,6 +32,7 @@ public interface RPCOptionsOrBuilder extends /** *
          * If true, always use RPC to contact the session target.
    +     *
          * If false (the default option), TensorFlow may use an optimized
          * transport for client-master communication that avoids the RPC
          * stack. This option is primarily for used testing the RPC stack.
    @@ -110,37 +122,34 @@ public interface RPCOptionsOrBuilder extends
        * Protobuf type {@code tensorflow.RPCOptions}
        */
       public static final class RPCOptions extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.RPCOptions)
           RPCOptionsOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        RPCOptions.class.getName());
    +    }
         // Use RPCOptions.newBuilder() to construct.
    -    private RPCOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private RPCOptions(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private RPCOptions() {
           compressionAlgorithm_ = "";
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new RPCOptions();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.RpcOptions.internal_static_tensorflow_RPCOptions_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.RpcOptions.internal_static_tensorflow_RPCOptions_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -148,10 +157,11 @@ protected java.lang.Object newInstance(
         }
     
         public static final int USE_RPC_FOR_INPROCESS_MASTER_FIELD_NUMBER = 1;
    -    private boolean useRpcForInprocessMaster_;
    +    private boolean useRpcForInprocessMaster_ = false;
         /**
          * 
          * If true, always use RPC to contact the session target.
    +     *
          * If false (the default option), TensorFlow may use an optimized
          * transport for client-master communication that avoids the RPC
          * stack. This option is primarily for used testing the RPC stack.
    @@ -166,7 +176,8 @@ public boolean getUseRpcForInprocessMaster() {
         }
     
         public static final int COMPRESSION_ALGORITHM_FIELD_NUMBER = 2;
    -    private volatile java.lang.Object compressionAlgorithm_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object compressionAlgorithm_ = "";
         /**
          * 
          * The compression algorithm to be used. One of "deflate", "gzip".
    @@ -212,7 +223,7 @@ public java.lang.String getCompressionAlgorithm() {
         }
     
         public static final int COMPRESSION_LEVEL_FIELD_NUMBER = 3;
    -    private int compressionLevel_;
    +    private int compressionLevel_ = 0;
         /**
          * 
          * If compression_algorithm is set, the compression level to be used.
    @@ -228,7 +239,7 @@ public int getCompressionLevel() {
         }
     
         public static final int CACHE_RPC_RESPONSE_FIELD_NUMBER = 4;
    -    private boolean cacheRpcResponse_;
    +    private boolean cacheRpcResponse_ = false;
         /**
          * 
          * Setting cache_rpc_response to true will enable sender side caching of
    @@ -248,7 +259,7 @@ public boolean getCacheRpcResponse() {
         }
     
         public static final int DISABLE_SESSION_CONNECTION_SHARING_FIELD_NUMBER = 5;
    -    private boolean disableSessionConnectionSharing_;
    +    private boolean disableSessionConnectionSharing_ = false;
         /**
          * 
          * Disables TCP connection sharing when opening a new RPC channel.
    @@ -263,7 +274,7 @@ public boolean getDisableSessionConnectionSharing() {
         }
     
         public static final int NUM_CHANNELS_PER_TARGET_FIELD_NUMBER = 6;
    -    private int numChannelsPerTarget_;
    +    private int numChannelsPerTarget_ = 0;
         /**
          * 
          * Setting num_channels_per_target > 0 allows uses of multiple channels to
    @@ -299,8 +310,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           if (useRpcForInprocessMaster_ != false) {
             output.writeBool(1, useRpcForInprocessMaster_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(compressionAlgorithm_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, compressionAlgorithm_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(compressionAlgorithm_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 2, compressionAlgorithm_);
           }
           if (compressionLevel_ != 0) {
             output.writeInt32(3, compressionLevel_);
    @@ -327,8 +338,8 @@ public int getSerializedSize() {
             size += com.google.protobuf.CodedOutputStream
               .computeBoolSize(1, useRpcForInprocessMaster_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(compressionAlgorithm_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, compressionAlgorithm_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(compressionAlgorithm_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, compressionAlgorithm_);
           }
           if (compressionLevel_ != 0) {
             size += com.google.protobuf.CodedOutputStream
    @@ -438,39 +449,41 @@ public static org.tensorflow.proto.RpcOptions.RPCOptions parseFrom(
         }
         public static org.tensorflow.proto.RpcOptions.RPCOptions parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.RpcOptions.RPCOptions parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.RpcOptions.RPCOptions parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.RpcOptions.RPCOptions parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.RpcOptions.RPCOptions parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.RpcOptions.RPCOptions parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -490,7 +503,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -502,7 +515,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.RPCOptions}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.RPCOptions)
             org.tensorflow.proto.RpcOptions.RPCOptionsOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -511,7 +524,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.RpcOptions.internal_static_tensorflow_RPCOptions_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -524,25 +537,20 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             useRpcForInprocessMaster_ = false;
    -
             compressionAlgorithm_ = "";
    -
             compressionLevel_ = 0;
    -
             cacheRpcResponse_ = false;
    -
             disableSessionConnectionSharing_ = false;
    -
             numChannelsPerTarget_ = 0;
    -
             return this;
           }
     
    @@ -569,48 +577,33 @@ public org.tensorflow.proto.RpcOptions.RPCOptions build() {
           @java.lang.Override
           public org.tensorflow.proto.RpcOptions.RPCOptions buildPartial() {
             org.tensorflow.proto.RpcOptions.RPCOptions result = new org.tensorflow.proto.RpcOptions.RPCOptions(this);
    -        result.useRpcForInprocessMaster_ = useRpcForInprocessMaster_;
    -        result.compressionAlgorithm_ = compressionAlgorithm_;
    -        result.compressionLevel_ = compressionLevel_;
    -        result.cacheRpcResponse_ = cacheRpcResponse_;
    -        result.disableSessionConnectionSharing_ = disableSessionConnectionSharing_;
    -        result.numChannelsPerTarget_ = numChannelsPerTarget_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.RpcOptions.RPCOptions result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.useRpcForInprocessMaster_ = useRpcForInprocessMaster_;
    +        }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.compressionAlgorithm_ = compressionAlgorithm_;
    +        }
    +        if (((from_bitField0_ & 0x00000004) != 0)) {
    +          result.compressionLevel_ = compressionLevel_;
    +        }
    +        if (((from_bitField0_ & 0x00000008) != 0)) {
    +          result.cacheRpcResponse_ = cacheRpcResponse_;
    +        }
    +        if (((from_bitField0_ & 0x00000010) != 0)) {
    +          result.disableSessionConnectionSharing_ = disableSessionConnectionSharing_;
    +        }
    +        if (((from_bitField0_ & 0x00000020) != 0)) {
    +          result.numChannelsPerTarget_ = numChannelsPerTarget_;
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.RpcOptions.RPCOptions) {
    @@ -628,6 +621,7 @@ public Builder mergeFrom(org.tensorflow.proto.RpcOptions.RPCOptions other) {
             }
             if (!other.getCompressionAlgorithm().isEmpty()) {
               compressionAlgorithm_ = other.compressionAlgorithm_;
    +          bitField0_ |= 0x00000002;
               onChanged();
             }
             if (other.getCompressionLevel() != 0) {
    @@ -670,32 +664,32 @@ public Builder mergeFrom(
                     break;
                   case 8: {
                     useRpcForInprocessMaster_ = input.readBool();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 8
                   case 18: {
                     compressionAlgorithm_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 18
                   case 24: {
                     compressionLevel_ = input.readInt32();
    -
    +                bitField0_ |= 0x00000004;
                     break;
                   } // case 24
                   case 32: {
                     cacheRpcResponse_ = input.readBool();
    -
    +                bitField0_ |= 0x00000008;
                     break;
                   } // case 32
                   case 40: {
                     disableSessionConnectionSharing_ = input.readBool();
    -
    +                bitField0_ |= 0x00000010;
                     break;
                   } // case 40
                   case 48: {
                     numChannelsPerTarget_ = input.readInt32();
    -
    +                bitField0_ |= 0x00000020;
                     break;
                   } // case 48
                   default: {
    @@ -713,11 +707,13 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    +      private int bitField0_;
     
           private boolean useRpcForInprocessMaster_ ;
           /**
            * 
            * If true, always use RPC to contact the session target.
    +       *
            * If false (the default option), TensorFlow may use an optimized
            * transport for client-master communication that avoids the RPC
            * stack. This option is primarily for used testing the RPC stack.
    @@ -733,6 +729,7 @@ public boolean getUseRpcForInprocessMaster() {
           /**
            * 
            * If true, always use RPC to contact the session target.
    +       *
            * If false (the default option), TensorFlow may use an optimized
            * transport for client-master communication that avoids the RPC
            * stack. This option is primarily for used testing the RPC stack.
    @@ -743,14 +740,16 @@ public boolean getUseRpcForInprocessMaster() {
            * @return This builder for chaining.
            */
           public Builder setUseRpcForInprocessMaster(boolean value) {
    -        
    +
             useRpcForInprocessMaster_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
           /**
            * 
            * If true, always use RPC to contact the session target.
    +       *
            * If false (the default option), TensorFlow may use an optimized
            * transport for client-master communication that avoids the RPC
            * stack. This option is primarily for used testing the RPC stack.
    @@ -760,7 +759,7 @@ public Builder setUseRpcForInprocessMaster(boolean value) {
            * @return This builder for chaining.
            */
           public Builder clearUseRpcForInprocessMaster() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000001);
             useRpcForInprocessMaster_ = false;
             onChanged();
             return this;
    @@ -819,11 +818,9 @@ public java.lang.String getCompressionAlgorithm() {
            */
           public Builder setCompressionAlgorithm(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             compressionAlgorithm_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -836,8 +833,8 @@ public Builder setCompressionAlgorithm(
            * @return This builder for chaining.
            */
           public Builder clearCompressionAlgorithm() {
    -        
             compressionAlgorithm_ = getDefaultInstance().getCompressionAlgorithm();
    +        bitField0_ = (bitField0_ & ~0x00000002);
             onChanged();
             return this;
           }
    @@ -852,12 +849,10 @@ public Builder clearCompressionAlgorithm() {
            */
           public Builder setCompressionAlgorithmBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             compressionAlgorithm_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -887,8 +882,9 @@ public int getCompressionLevel() {
            * @return This builder for chaining.
            */
           public Builder setCompressionLevel(int value) {
    -        
    +
             compressionLevel_ = value;
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -902,7 +898,7 @@ public Builder setCompressionLevel(int value) {
            * @return This builder for chaining.
            */
           public Builder clearCompressionLevel() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000004);
             compressionLevel_ = 0;
             onChanged();
             return this;
    @@ -941,8 +937,9 @@ public boolean getCacheRpcResponse() {
            * @return This builder for chaining.
            */
           public Builder setCacheRpcResponse(boolean value) {
    -        
    +
             cacheRpcResponse_ = value;
    +        bitField0_ |= 0x00000008;
             onChanged();
             return this;
           }
    @@ -960,7 +957,7 @@ public Builder setCacheRpcResponse(boolean value) {
            * @return This builder for chaining.
            */
           public Builder clearCacheRpcResponse() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000008);
             cacheRpcResponse_ = false;
             onChanged();
             return this;
    @@ -989,8 +986,9 @@ public boolean getDisableSessionConnectionSharing() {
            * @return This builder for chaining.
            */
           public Builder setDisableSessionConnectionSharing(boolean value) {
    -        
    +
             disableSessionConnectionSharing_ = value;
    +        bitField0_ |= 0x00000010;
             onChanged();
             return this;
           }
    @@ -1003,7 +1001,7 @@ public Builder setDisableSessionConnectionSharing(boolean value) {
            * @return This builder for chaining.
            */
           public Builder clearDisableSessionConnectionSharing() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000010);
             disableSessionConnectionSharing_ = false;
             onChanged();
             return this;
    @@ -1042,8 +1040,9 @@ public int getNumChannelsPerTarget() {
            * @return This builder for chaining.
            */
           public Builder setNumChannelsPerTarget(int value) {
    -        
    +
             numChannelsPerTarget_ = value;
    +        bitField0_ |= 0x00000020;
             onChanged();
             return this;
           }
    @@ -1061,23 +1060,11 @@ public Builder setNumChannelsPerTarget(int value) {
            * @return This builder for chaining.
            */
           public Builder clearNumChannelsPerTarget() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000020);
             numChannelsPerTarget_ = 0;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.RPCOptions)
         }
    @@ -1133,7 +1120,7 @@ public org.tensorflow.proto.RpcOptions.RPCOptions getDefaultInstanceForType() {
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_RPCOptions_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_RPCOptions_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -1144,15 +1131,15 @@ public org.tensorflow.proto.RpcOptions.RPCOptions getDefaultInstanceForType() {
           descriptor;
       static {
         java.lang.String[] descriptorData = {
    -      "\n\036tsl/protobuf/rpc_options.proto\022\ntensor" +
    -      "flow\"\325\001\n\nRPCOptions\022$\n\034use_rpc_for_inpro" +
    -      "cess_master\030\001 \001(\010\022\035\n\025compression_algorit" +
    -      "hm\030\002 \001(\t\022\031\n\021compression_level\030\003 \001(\005\022\032\n\022c" +
    -      "ache_rpc_response\030\004 \001(\010\022*\n\"disable_sessi" +
    -      "on_connection_sharing\030\005 \001(\010\022\037\n\027num_chann" +
    -      "els_per_target\030\006 \001(\005BV\n\024org.tensorflow.p" +
    -      "rotoZ>github.com/google/tsl/tsl/go/proto" +
    -      "buf/for_core_protos_go_protob\006proto3"
    +      "\n\"xla/tsl/protobuf/rpc_options.proto\022\nte" +
    +      "nsorflow\"\325\001\n\nRPCOptions\022$\n\034use_rpc_for_i" +
    +      "nprocess_master\030\001 \001(\010\022\035\n\025compression_alg" +
    +      "orithm\030\002 \001(\t\022\031\n\021compression_level\030\003 \001(\005\022" +
    +      "\032\n\022cache_rpc_response\030\004 \001(\010\022*\n\"disable_s" +
    +      "ession_connection_sharing\030\005 \001(\010\022\037\n\027num_c" +
    +      "hannels_per_target\030\006 \001(\005BV\n\024org.tensorfl" +
    +      "ow.protoZ>github.com/google/tsl/tsl/go/p" +
    +      "rotobuf/for_core_protos_go_protob\006proto3"
         };
         descriptor = com.google.protobuf.Descriptors.FileDescriptor
           .internalBuildGeneratedFileFrom(descriptorData,
    @@ -1161,9 +1148,10 @@ public org.tensorflow.proto.RpcOptions.RPCOptions getDefaultInstanceForType() {
         internal_static_tensorflow_RPCOptions_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_RPCOptions_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_RPCOptions_descriptor,
             new java.lang.String[] { "UseRpcForInprocessMaster", "CompressionAlgorithm", "CompressionLevel", "CacheRpcResponse", "DisableSessionConnectionSharing", "NumChannelsPerTarget", });
    +    descriptor.resolveAllFeaturesImmutable();
       }
     
       // @@protoc_insertion_point(outer_class_scope)
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunConfiguration.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunConfiguration.java
    index f8f244b522c..801a0e56dd3 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunConfiguration.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunConfiguration.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: xla/tsl/protobuf/test_log.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,30 +13,28 @@
      * Protobuf type {@code tensorflow.RunConfiguration}
      */
     public final class RunConfiguration extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.RunConfiguration)
         RunConfigurationOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      RunConfiguration.class.getName());
    +  }
       // Use RunConfiguration.newBuilder() to construct.
    -  private RunConfiguration(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private RunConfiguration(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private RunConfiguration() {
    -    argument_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +    argument_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new RunConfiguration();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_RunConfiguration_descriptor;
    @@ -42,7 +42,7 @@ protected java.lang.Object newInstance(
     
       @SuppressWarnings({"rawtypes"})
       @java.lang.Override
    -  protected com.google.protobuf.MapField internalGetMapField(
    +  protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
           int number) {
         switch (number) {
           case 2:
    @@ -53,7 +53,7 @@ protected com.google.protobuf.MapField internalGetMapField(
         }
       }
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_RunConfiguration_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -61,7 +61,9 @@ protected com.google.protobuf.MapField internalGetMapField(
       }
     
       public static final int ARGUMENT_FIELD_NUMBER = 1;
    -  private com.google.protobuf.LazyStringList argument_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.LazyStringArrayList argument_ =
    +      com.google.protobuf.LazyStringArrayList.emptyList();
       /**
        * repeated string argument = 1;
        * @return A list containing the argument.
    @@ -107,6 +109,7 @@ private static final class EnvVarsDefaultEntryHolder {
                     com.google.protobuf.WireFormat.FieldType.STRING,
                     "");
       }
    +  @SuppressWarnings("serial")
       private com.google.protobuf.MapField<
           java.lang.String, java.lang.String> envVars_;
       private com.google.protobuf.MapField
    @@ -117,7 +120,6 @@ private static final class EnvVarsDefaultEntryHolder {
         }
         return envVars_;
       }
    -
       public int getEnvVarsCount() {
         return internalGetEnvVars().getMap().size();
       }
    @@ -128,7 +130,6 @@ public int getEnvVarsCount() {
        *
        * map<string, string> env_vars = 2;
        */
    -
       @java.lang.Override
       public boolean containsEnvVars(
           java.lang.String key) {
    @@ -151,7 +152,6 @@ public java.util.Map getEnvVars() {
        * map<string, string> env_vars = 2;
        */
       @java.lang.Override
    -
       public java.util.Map getEnvVarsMap() {
         return internalGetEnvVars().getMap();
       }
    @@ -163,10 +163,11 @@ public java.util.Map getEnvVarsMap() {
        * map<string, string> env_vars = 2;
        */
       @java.lang.Override
    -
    -  public java.lang.String getEnvVarsOrDefault(
    +  public /* nullable */
    +java.lang.String getEnvVarsOrDefault(
           java.lang.String key,
    -      java.lang.String defaultValue) {
    +      /* nullable */
    +java.lang.String defaultValue) {
         if (key == null) { throw new NullPointerException("map key"); }
         java.util.Map map =
             internalGetEnvVars().getMap();
    @@ -180,7 +181,6 @@ public java.lang.String getEnvVarsOrDefault(
        * map<string, string> env_vars = 2;
        */
       @java.lang.Override
    -
       public java.lang.String getEnvVarsOrThrow(
           java.lang.String key) {
         if (key == null) { throw new NullPointerException("map key"); }
    @@ -207,9 +207,9 @@ public final boolean isInitialized() {
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
         for (int i = 0; i < argument_.size(); i++) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, argument_.getRaw(i));
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, argument_.getRaw(i));
         }
    -    com.google.protobuf.GeneratedMessageV3
    +    com.google.protobuf.GeneratedMessage
           .serializeStringMapTo(
             output,
             internalGetEnvVars(),
    @@ -319,39 +319,41 @@ public static org.tensorflow.proto.RunConfiguration parseFrom(
       }
       public static org.tensorflow.proto.RunConfiguration parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.RunConfiguration parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.RunConfiguration parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.RunConfiguration parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.RunConfiguration parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.RunConfiguration parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -371,7 +373,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -383,7 +385,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.RunConfiguration}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.RunConfiguration)
           org.tensorflow.proto.RunConfigurationOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -392,7 +394,7 @@ public static final class Builder extends
         }
     
         @SuppressWarnings({"rawtypes"})
    -    protected com.google.protobuf.MapField internalGetMapField(
    +    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
             int number) {
           switch (number) {
             case 2:
    @@ -403,7 +405,7 @@ protected com.google.protobuf.MapField internalGetMapField(
           }
         }
         @SuppressWarnings({"rawtypes"})
    -    protected com.google.protobuf.MapField internalGetMutableMapField(
    +    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
             int number) {
           switch (number) {
             case 2:
    @@ -414,7 +416,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField(
           }
         }
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_RunConfiguration_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -427,15 +429,16 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    -      argument_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      bitField0_ = 0;
    +      argument_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
           internalGetMutableEnvVars().clear();
           return this;
         }
    @@ -463,50 +466,23 @@ public org.tensorflow.proto.RunConfiguration build() {
         @java.lang.Override
         public org.tensorflow.proto.RunConfiguration buildPartial() {
           org.tensorflow.proto.RunConfiguration result = new org.tensorflow.proto.RunConfiguration(this);
    -      int from_bitField0_ = bitField0_;
    -      if (((bitField0_ & 0x00000001) != 0)) {
    -        argument_ = argument_.getUnmodifiableView();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    -      }
    -      result.argument_ = argument_;
    -      result.envVars_ = internalGetEnvVars();
    -      result.envVars_.makeImmutable();
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.RunConfiguration result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        argument_.makeImmutable();
    +        result.argument_ = argument_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.envVars_ = internalGetEnvVars();
    +        result.envVars_.makeImmutable();
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.RunConfiguration) {
    @@ -522,7 +498,7 @@ public Builder mergeFrom(org.tensorflow.proto.RunConfiguration other) {
           if (!other.argument_.isEmpty()) {
             if (argument_.isEmpty()) {
               argument_ = other.argument_;
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ |= 0x00000001;
             } else {
               ensureArgumentIsMutable();
               argument_.addAll(other.argument_);
    @@ -531,6 +507,7 @@ public Builder mergeFrom(org.tensorflow.proto.RunConfiguration other) {
           }
           internalGetMutableEnvVars().mergeFrom(
               other.internalGetEnvVars());
    +      bitField0_ |= 0x00000002;
           this.mergeUnknownFields(other.getUnknownFields());
           onChanged();
           return this;
    @@ -569,6 +546,7 @@ public Builder mergeFrom(
                       EnvVarsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
                   internalGetMutableEnvVars().getMutableMap().put(
                       envVars__.getKey(), envVars__.getValue());
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 default: {
    @@ -588,12 +566,13 @@ public Builder mergeFrom(
         }
         private int bitField0_;
     
    -    private com.google.protobuf.LazyStringList argument_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +    private com.google.protobuf.LazyStringArrayList argument_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         private void ensureArgumentIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    +      if (!argument_.isModifiable()) {
             argument_ = new com.google.protobuf.LazyStringArrayList(argument_);
    -        bitField0_ |= 0x00000001;
    -       }
    +      }
    +      bitField0_ |= 0x00000001;
         }
         /**
          * repeated string argument = 1;
    @@ -601,7 +580,8 @@ private void ensureArgumentIsMutable() {
          */
         public com.google.protobuf.ProtocolStringList
             getArgumentList() {
    -      return argument_.getUnmodifiableView();
    +      argument_.makeImmutable();
    +      return argument_;
         }
         /**
          * repeated string argument = 1;
    @@ -635,11 +615,10 @@ public java.lang.String getArgument(int index) {
          */
         public Builder setArgument(
             int index, java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureArgumentIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureArgumentIsMutable();
           argument_.set(index, value);
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -650,11 +629,10 @@ public Builder setArgument(
          */
         public Builder addArgument(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureArgumentIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureArgumentIsMutable();
           argument_.add(value);
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -668,6 +646,7 @@ public Builder addAllArgument(
           ensureArgumentIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, argument_);
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -676,8 +655,9 @@ public Builder addAllArgument(
          * @return This builder for chaining.
          */
         public Builder clearArgument() {
    -      argument_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      argument_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
    +      bitField0_ = (bitField0_ & ~0x00000001);;
           onChanged();
           return this;
         }
    @@ -688,12 +668,11 @@ public Builder clearArgument() {
          */
         public Builder addArgumentBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           ensureArgumentIsMutable();
           argument_.add(value);
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -701,7 +680,7 @@ public Builder addArgumentBytes(
         private com.google.protobuf.MapField<
             java.lang.String, java.lang.String> envVars_;
         private com.google.protobuf.MapField
    -    internalGetEnvVars() {
    +        internalGetEnvVars() {
           if (envVars_ == null) {
             return com.google.protobuf.MapField.emptyMapField(
                 EnvVarsDefaultEntryHolder.defaultEntry);
    @@ -709,8 +688,7 @@ public Builder addArgumentBytes(
           return envVars_;
         }
         private com.google.protobuf.MapField
    -    internalGetMutableEnvVars() {
    -      onChanged();;
    +        internalGetMutableEnvVars() {
           if (envVars_ == null) {
             envVars_ = com.google.protobuf.MapField.newMapField(
                 EnvVarsDefaultEntryHolder.defaultEntry);
    @@ -718,9 +696,10 @@ public Builder addArgumentBytes(
           if (!envVars_.isMutable()) {
             envVars_ = envVars_.copy();
           }
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return envVars_;
         }
    -
         public int getEnvVarsCount() {
           return internalGetEnvVars().getMap().size();
         }
    @@ -731,7 +710,6 @@ public int getEnvVarsCount() {
          *
          * map<string, string> env_vars = 2;
          */
    -
         @java.lang.Override
         public boolean containsEnvVars(
             java.lang.String key) {
    @@ -754,7 +732,6 @@ public java.util.Map getEnvVars() {
          * map<string, string> env_vars = 2;
          */
         @java.lang.Override
    -
         public java.util.Map getEnvVarsMap() {
           return internalGetEnvVars().getMap();
         }
    @@ -766,10 +743,11 @@ public java.util.Map getEnvVarsMap() {
          * map<string, string> env_vars = 2;
          */
         @java.lang.Override
    -
    -    public java.lang.String getEnvVarsOrDefault(
    +    public /* nullable */
    +java.lang.String getEnvVarsOrDefault(
             java.lang.String key,
    -        java.lang.String defaultValue) {
    +        /* nullable */
    +java.lang.String defaultValue) {
           if (key == null) { throw new NullPointerException("map key"); }
           java.util.Map map =
               internalGetEnvVars().getMap();
    @@ -783,7 +761,6 @@ public java.lang.String getEnvVarsOrDefault(
          * map<string, string> env_vars = 2;
          */
         @java.lang.Override
    -
         public java.lang.String getEnvVarsOrThrow(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    @@ -794,8 +771,8 @@ public java.lang.String getEnvVarsOrThrow(
           }
           return map.get(key);
         }
    -
         public Builder clearEnvVars() {
    +      bitField0_ = (bitField0_ & ~0x00000002);
           internalGetMutableEnvVars().getMutableMap()
               .clear();
           return this;
    @@ -807,7 +784,6 @@ public Builder clearEnvVars() {
          *
          * map<string, string> env_vars = 2;
          */
    -
         public Builder removeEnvVars(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    @@ -820,7 +796,8 @@ public Builder removeEnvVars(
          */
         @java.lang.Deprecated
         public java.util.Map
    -    getMutableEnvVars() {
    +        getMutableEnvVars() {
    +      bitField0_ |= 0x00000002;
           return internalGetMutableEnvVars().getMutableMap();
         }
         /**
    @@ -834,12 +811,10 @@ public Builder putEnvVars(
             java.lang.String key,
             java.lang.String value) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      if (value == null) {
    -  throw new NullPointerException("map value");
    -}
    -
    +      if (value == null) { throw new NullPointerException("map value"); }
           internalGetMutableEnvVars().getMutableMap()
               .put(key, value);
    +      bitField0_ |= 0x00000002;
           return this;
         }
         /**
    @@ -849,25 +824,13 @@ public Builder putEnvVars(
          *
          * map<string, string> env_vars = 2;
          */
    -
         public Builder putAllEnvVars(
             java.util.Map values) {
           internalGetMutableEnvVars().getMutableMap()
               .putAll(values);
    +      bitField0_ |= 0x00000002;
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.RunConfiguration)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunConfigurationOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunConfigurationOrBuilder.java
    index 4f2ef9a6b2c..1183f95dccd 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunConfigurationOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunConfigurationOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: xla/tsl/protobuf/test_log.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -71,7 +73,6 @@ boolean containsEnvVars(
        *
        * map<string, string> env_vars = 2;
        */
    -
       /* nullable */
     java.lang.String getEnvVarsOrDefault(
           java.lang.String key,
    @@ -84,7 +85,6 @@ java.lang.String getEnvVarsOrDefault(
        *
        * map<string, string> env_vars = 2;
        */
    -
       java.lang.String getEnvVarsOrThrow(
           java.lang.String key);
     }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunMetadata.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunMetadata.java
    index 84fb9890a80..6fca6234f49 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunMetadata.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunMetadata.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/config.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,12 +13,21 @@
      * Protobuf type {@code tensorflow.RunMetadata}
      */
     public final class RunMetadata extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.RunMetadata)
         RunMetadataOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      RunMetadata.class.getName());
    +  }
       // Use RunMetadata.newBuilder() to construct.
    -  private RunMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private RunMetadata(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private RunMetadata() {
    @@ -24,25 +35,13 @@ private RunMetadata() {
         functionGraphs_ = java.util.Collections.emptyList();
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new RunMetadata();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_RunMetadata_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_RunMetadata_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -131,44 +130,43 @@ org.tensorflow.proto.GraphDefOrBuilder getPartitionGraphsOrBuilder(
        * Protobuf type {@code tensorflow.RunMetadata.FunctionGraphs}
        */
       public static final class FunctionGraphs extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.RunMetadata.FunctionGraphs)
           FunctionGraphsOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        FunctionGraphs.class.getName());
    +    }
         // Use FunctionGraphs.newBuilder() to construct.
    -    private FunctionGraphs(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private FunctionGraphs(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private FunctionGraphs() {
           partitionGraphs_ = java.util.Collections.emptyList();
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new FunctionGraphs();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_RunMetadata_FunctionGraphs_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_RunMetadata_FunctionGraphs_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
                   org.tensorflow.proto.RunMetadata.FunctionGraphs.class, org.tensorflow.proto.RunMetadata.FunctionGraphs.Builder.class);
         }
     
    +    private int bitField0_;
         public static final int PARTITION_GRAPHS_FIELD_NUMBER = 1;
    +    @SuppressWarnings("serial")
         private java.util.List partitionGraphs_;
         /**
          * 
    @@ -236,7 +234,7 @@ public org.tensorflow.proto.GraphDefOrBuilder getPartitionGraphsOrBuilder(
          */
         @java.lang.Override
         public boolean hasPreOptimizationGraph() {
    -      return preOptimizationGraph_ != null;
    +      return ((bitField0_ & 0x00000001) != 0);
         }
         /**
          * .tensorflow.GraphDef pre_optimization_graph = 2;
    @@ -251,7 +249,7 @@ public org.tensorflow.proto.GraphDef getPreOptimizationGraph() {
          */
         @java.lang.Override
         public org.tensorflow.proto.GraphDefOrBuilder getPreOptimizationGraphOrBuilder() {
    -      return getPreOptimizationGraph();
    +      return preOptimizationGraph_ == null ? org.tensorflow.proto.GraphDef.getDefaultInstance() : preOptimizationGraph_;
         }
     
         public static final int POST_OPTIMIZATION_GRAPH_FIELD_NUMBER = 3;
    @@ -262,7 +260,7 @@ public org.tensorflow.proto.GraphDefOrBuilder getPreOptimizationGraphOrBuilder()
          */
         @java.lang.Override
         public boolean hasPostOptimizationGraph() {
    -      return postOptimizationGraph_ != null;
    +      return ((bitField0_ & 0x00000002) != 0);
         }
         /**
          * .tensorflow.GraphDef post_optimization_graph = 3;
    @@ -277,7 +275,7 @@ public org.tensorflow.proto.GraphDef getPostOptimizationGraph() {
          */
         @java.lang.Override
         public org.tensorflow.proto.GraphDefOrBuilder getPostOptimizationGraphOrBuilder() {
    -      return getPostOptimizationGraph();
    +      return postOptimizationGraph_ == null ? org.tensorflow.proto.GraphDef.getDefaultInstance() : postOptimizationGraph_;
         }
     
         private byte memoizedIsInitialized = -1;
    @@ -297,10 +295,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           for (int i = 0; i < partitionGraphs_.size(); i++) {
             output.writeMessage(1, partitionGraphs_.get(i));
           }
    -      if (preOptimizationGraph_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             output.writeMessage(2, getPreOptimizationGraph());
           }
    -      if (postOptimizationGraph_ != null) {
    +      if (((bitField0_ & 0x00000002) != 0)) {
             output.writeMessage(3, getPostOptimizationGraph());
           }
           getUnknownFields().writeTo(output);
    @@ -316,11 +314,11 @@ public int getSerializedSize() {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(1, partitionGraphs_.get(i));
           }
    -      if (preOptimizationGraph_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(2, getPreOptimizationGraph());
           }
    -      if (postOptimizationGraph_ != null) {
    +      if (((bitField0_ & 0x00000002) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(3, getPostOptimizationGraph());
           }
    @@ -413,39 +411,41 @@ public static org.tensorflow.proto.RunMetadata.FunctionGraphs parseFrom(
         }
         public static org.tensorflow.proto.RunMetadata.FunctionGraphs parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.RunMetadata.FunctionGraphs parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.RunMetadata.FunctionGraphs parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.RunMetadata.FunctionGraphs parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.RunMetadata.FunctionGraphs parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.RunMetadata.FunctionGraphs parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -465,7 +465,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -473,7 +473,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.RunMetadata.FunctionGraphs}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.RunMetadata.FunctionGraphs)
             org.tensorflow.proto.RunMetadata.FunctionGraphsOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -482,7 +482,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_RunMetadata_FunctionGraphs_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -491,17 +491,26 @@ public static final class Builder extends
     
           // Construct using org.tensorflow.proto.RunMetadata.FunctionGraphs.newBuilder()
           private Builder() {
    -
    +        maybeForceBuilderInitialization();
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
    -
    +        maybeForceBuilderInitialization();
    +      }
    +      private void maybeForceBuilderInitialization() {
    +        if (com.google.protobuf.GeneratedMessage
    +                .alwaysUseFieldBuilders) {
    +          getPartitionGraphsFieldBuilder();
    +          getPreOptimizationGraphFieldBuilder();
    +          getPostOptimizationGraphFieldBuilder();
    +        }
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             if (partitionGraphsBuilder_ == null) {
               partitionGraphs_ = java.util.Collections.emptyList();
             } else {
    @@ -509,16 +518,14 @@ public Builder clear() {
               partitionGraphsBuilder_.clear();
             }
             bitField0_ = (bitField0_ & ~0x00000001);
    -        if (preOptimizationGraphBuilder_ == null) {
    -          preOptimizationGraph_ = null;
    -        } else {
    -          preOptimizationGraph_ = null;
    +        preOptimizationGraph_ = null;
    +        if (preOptimizationGraphBuilder_ != null) {
    +          preOptimizationGraphBuilder_.dispose();
               preOptimizationGraphBuilder_ = null;
             }
    -        if (postOptimizationGraphBuilder_ == null) {
    -          postOptimizationGraph_ = null;
    -        } else {
    -          postOptimizationGraph_ = null;
    +        postOptimizationGraph_ = null;
    +        if (postOptimizationGraphBuilder_ != null) {
    +          postOptimizationGraphBuilder_.dispose();
               postOptimizationGraphBuilder_ = null;
             }
             return this;
    @@ -547,7 +554,13 @@ public org.tensorflow.proto.RunMetadata.FunctionGraphs build() {
           @java.lang.Override
           public org.tensorflow.proto.RunMetadata.FunctionGraphs buildPartial() {
             org.tensorflow.proto.RunMetadata.FunctionGraphs result = new org.tensorflow.proto.RunMetadata.FunctionGraphs(this);
    -        int from_bitField0_ = bitField0_;
    +        buildPartialRepeatedFields(result);
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        onBuilt();
    +        return result;
    +      }
    +
    +      private void buildPartialRepeatedFields(org.tensorflow.proto.RunMetadata.FunctionGraphs result) {
             if (partitionGraphsBuilder_ == null) {
               if (((bitField0_ & 0x00000001) != 0)) {
                 partitionGraphs_ = java.util.Collections.unmodifiableList(partitionGraphs_);
    @@ -557,52 +570,26 @@ public org.tensorflow.proto.RunMetadata.FunctionGraphs buildPartial() {
             } else {
               result.partitionGraphs_ = partitionGraphsBuilder_.build();
             }
    -        if (preOptimizationGraphBuilder_ == null) {
    -          result.preOptimizationGraph_ = preOptimizationGraph_;
    -        } else {
    -          result.preOptimizationGraph_ = preOptimizationGraphBuilder_.build();
    +      }
    +
    +      private void buildPartial0(org.tensorflow.proto.RunMetadata.FunctionGraphs result) {
    +        int from_bitField0_ = bitField0_;
    +        int to_bitField0_ = 0;
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.preOptimizationGraph_ = preOptimizationGraphBuilder_ == null
    +              ? preOptimizationGraph_
    +              : preOptimizationGraphBuilder_.build();
    +          to_bitField0_ |= 0x00000001;
             }
    -        if (postOptimizationGraphBuilder_ == null) {
    -          result.postOptimizationGraph_ = postOptimizationGraph_;
    -        } else {
    -          result.postOptimizationGraph_ = postOptimizationGraphBuilder_.build();
    +        if (((from_bitField0_ & 0x00000004) != 0)) {
    +          result.postOptimizationGraph_ = postOptimizationGraphBuilder_ == null
    +              ? postOptimizationGraph_
    +              : postOptimizationGraphBuilder_.build();
    +          to_bitField0_ |= 0x00000002;
             }
    -        onBuilt();
    -        return result;
    +        result.bitField0_ |= to_bitField0_;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    -      }
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.RunMetadata.FunctionGraphs) {
    @@ -634,7 +621,7 @@ public Builder mergeFrom(org.tensorflow.proto.RunMetadata.FunctionGraphs other)
                   partitionGraphs_ = other.partitionGraphs_;
                   bitField0_ = (bitField0_ & ~0x00000001);
                   partitionGraphsBuilder_ = 
    -                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                        getPartitionGraphsFieldBuilder() : null;
                 } else {
                   partitionGraphsBuilder_.addAllMessages(other.partitionGraphs_);
    @@ -690,14 +677,14 @@ public Builder mergeFrom(
                     input.readMessage(
                         getPreOptimizationGraphFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 18
                   case 26: {
                     input.readMessage(
                         getPostOptimizationGraphFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00000004;
                     break;
                   } // case 26
                   default: {
    @@ -726,7 +713,7 @@ private void ensurePartitionGraphsIsMutable() {
              }
           }
     
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.GraphDef, org.tensorflow.proto.GraphDef.Builder, org.tensorflow.proto.GraphDefOrBuilder> partitionGraphsBuilder_;
     
           /**
    @@ -1014,11 +1001,11 @@ public org.tensorflow.proto.GraphDef.Builder addPartitionGraphsBuilder(
                getPartitionGraphsBuilderList() {
             return getPartitionGraphsFieldBuilder().getBuilderList();
           }
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.GraphDef, org.tensorflow.proto.GraphDef.Builder, org.tensorflow.proto.GraphDefOrBuilder> 
               getPartitionGraphsFieldBuilder() {
             if (partitionGraphsBuilder_ == null) {
    -          partitionGraphsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +          partitionGraphsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                   org.tensorflow.proto.GraphDef, org.tensorflow.proto.GraphDef.Builder, org.tensorflow.proto.GraphDefOrBuilder>(
                       partitionGraphs_,
                       ((bitField0_ & 0x00000001) != 0),
    @@ -1030,14 +1017,14 @@ public org.tensorflow.proto.GraphDef.Builder addPartitionGraphsBuilder(
           }
     
           private org.tensorflow.proto.GraphDef preOptimizationGraph_;
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.GraphDef, org.tensorflow.proto.GraphDef.Builder, org.tensorflow.proto.GraphDefOrBuilder> preOptimizationGraphBuilder_;
           /**
            * .tensorflow.GraphDef pre_optimization_graph = 2;
            * @return Whether the preOptimizationGraph field is set.
            */
           public boolean hasPreOptimizationGraph() {
    -        return preOptimizationGraphBuilder_ != null || preOptimizationGraph_ != null;
    +        return ((bitField0_ & 0x00000002) != 0);
           }
           /**
            * .tensorflow.GraphDef pre_optimization_graph = 2;
    @@ -1059,11 +1046,11 @@ public Builder setPreOptimizationGraph(org.tensorflow.proto.GraphDef value) {
                 throw new NullPointerException();
               }
               preOptimizationGraph_ = value;
    -          onChanged();
             } else {
               preOptimizationGraphBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000002;
    +        onChanged();
             return this;
           }
           /**
    @@ -1073,11 +1060,11 @@ public Builder setPreOptimizationGraph(
               org.tensorflow.proto.GraphDef.Builder builderForValue) {
             if (preOptimizationGraphBuilder_ == null) {
               preOptimizationGraph_ = builderForValue.build();
    -          onChanged();
             } else {
               preOptimizationGraphBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000002;
    +        onChanged();
             return this;
           }
           /**
    @@ -1085,38 +1072,40 @@ public Builder setPreOptimizationGraph(
            */
           public Builder mergePreOptimizationGraph(org.tensorflow.proto.GraphDef value) {
             if (preOptimizationGraphBuilder_ == null) {
    -          if (preOptimizationGraph_ != null) {
    -            preOptimizationGraph_ =
    -              org.tensorflow.proto.GraphDef.newBuilder(preOptimizationGraph_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000002) != 0) &&
    +            preOptimizationGraph_ != null &&
    +            preOptimizationGraph_ != org.tensorflow.proto.GraphDef.getDefaultInstance()) {
    +            getPreOptimizationGraphBuilder().mergeFrom(value);
               } else {
                 preOptimizationGraph_ = value;
               }
    -          onChanged();
             } else {
               preOptimizationGraphBuilder_.mergeFrom(value);
             }
    -
    +        if (preOptimizationGraph_ != null) {
    +          bitField0_ |= 0x00000002;
    +          onChanged();
    +        }
             return this;
           }
           /**
            * .tensorflow.GraphDef pre_optimization_graph = 2;
            */
           public Builder clearPreOptimizationGraph() {
    -        if (preOptimizationGraphBuilder_ == null) {
    -          preOptimizationGraph_ = null;
    -          onChanged();
    -        } else {
    -          preOptimizationGraph_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000002);
    +        preOptimizationGraph_ = null;
    +        if (preOptimizationGraphBuilder_ != null) {
    +          preOptimizationGraphBuilder_.dispose();
               preOptimizationGraphBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
            * .tensorflow.GraphDef pre_optimization_graph = 2;
            */
           public org.tensorflow.proto.GraphDef.Builder getPreOptimizationGraphBuilder() {
    -        
    +        bitField0_ |= 0x00000002;
             onChanged();
             return getPreOptimizationGraphFieldBuilder().getBuilder();
           }
    @@ -1134,11 +1123,11 @@ public org.tensorflow.proto.GraphDefOrBuilder getPreOptimizationGraphOrBuilder()
           /**
            * .tensorflow.GraphDef pre_optimization_graph = 2;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.GraphDef, org.tensorflow.proto.GraphDef.Builder, org.tensorflow.proto.GraphDefOrBuilder> 
               getPreOptimizationGraphFieldBuilder() {
             if (preOptimizationGraphBuilder_ == null) {
    -          preOptimizationGraphBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          preOptimizationGraphBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.GraphDef, org.tensorflow.proto.GraphDef.Builder, org.tensorflow.proto.GraphDefOrBuilder>(
                       getPreOptimizationGraph(),
                       getParentForChildren(),
    @@ -1149,14 +1138,14 @@ public org.tensorflow.proto.GraphDefOrBuilder getPreOptimizationGraphOrBuilder()
           }
     
           private org.tensorflow.proto.GraphDef postOptimizationGraph_;
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.GraphDef, org.tensorflow.proto.GraphDef.Builder, org.tensorflow.proto.GraphDefOrBuilder> postOptimizationGraphBuilder_;
           /**
            * .tensorflow.GraphDef post_optimization_graph = 3;
            * @return Whether the postOptimizationGraph field is set.
            */
           public boolean hasPostOptimizationGraph() {
    -        return postOptimizationGraphBuilder_ != null || postOptimizationGraph_ != null;
    +        return ((bitField0_ & 0x00000004) != 0);
           }
           /**
            * .tensorflow.GraphDef post_optimization_graph = 3;
    @@ -1178,11 +1167,11 @@ public Builder setPostOptimizationGraph(org.tensorflow.proto.GraphDef value) {
                 throw new NullPointerException();
               }
               postOptimizationGraph_ = value;
    -          onChanged();
             } else {
               postOptimizationGraphBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000004;
    +        onChanged();
             return this;
           }
           /**
    @@ -1192,11 +1181,11 @@ public Builder setPostOptimizationGraph(
               org.tensorflow.proto.GraphDef.Builder builderForValue) {
             if (postOptimizationGraphBuilder_ == null) {
               postOptimizationGraph_ = builderForValue.build();
    -          onChanged();
             } else {
               postOptimizationGraphBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000004;
    +        onChanged();
             return this;
           }
           /**
    @@ -1204,38 +1193,40 @@ public Builder setPostOptimizationGraph(
            */
           public Builder mergePostOptimizationGraph(org.tensorflow.proto.GraphDef value) {
             if (postOptimizationGraphBuilder_ == null) {
    -          if (postOptimizationGraph_ != null) {
    -            postOptimizationGraph_ =
    -              org.tensorflow.proto.GraphDef.newBuilder(postOptimizationGraph_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000004) != 0) &&
    +            postOptimizationGraph_ != null &&
    +            postOptimizationGraph_ != org.tensorflow.proto.GraphDef.getDefaultInstance()) {
    +            getPostOptimizationGraphBuilder().mergeFrom(value);
               } else {
                 postOptimizationGraph_ = value;
               }
    -          onChanged();
             } else {
               postOptimizationGraphBuilder_.mergeFrom(value);
             }
    -
    +        if (postOptimizationGraph_ != null) {
    +          bitField0_ |= 0x00000004;
    +          onChanged();
    +        }
             return this;
           }
           /**
            * .tensorflow.GraphDef post_optimization_graph = 3;
            */
           public Builder clearPostOptimizationGraph() {
    -        if (postOptimizationGraphBuilder_ == null) {
    -          postOptimizationGraph_ = null;
    -          onChanged();
    -        } else {
    -          postOptimizationGraph_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000004);
    +        postOptimizationGraph_ = null;
    +        if (postOptimizationGraphBuilder_ != null) {
    +          postOptimizationGraphBuilder_.dispose();
               postOptimizationGraphBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
            * .tensorflow.GraphDef post_optimization_graph = 3;
            */
           public org.tensorflow.proto.GraphDef.Builder getPostOptimizationGraphBuilder() {
    -        
    +        bitField0_ |= 0x00000004;
             onChanged();
             return getPostOptimizationGraphFieldBuilder().getBuilder();
           }
    @@ -1253,11 +1244,11 @@ public org.tensorflow.proto.GraphDefOrBuilder getPostOptimizationGraphOrBuilder(
           /**
            * .tensorflow.GraphDef post_optimization_graph = 3;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.GraphDef, org.tensorflow.proto.GraphDef.Builder, org.tensorflow.proto.GraphDefOrBuilder> 
               getPostOptimizationGraphFieldBuilder() {
             if (postOptimizationGraphBuilder_ == null) {
    -          postOptimizationGraphBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          postOptimizationGraphBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.GraphDef, org.tensorflow.proto.GraphDef.Builder, org.tensorflow.proto.GraphDefOrBuilder>(
                       getPostOptimizationGraph(),
                       getParentForChildren(),
    @@ -1266,18 +1257,6 @@ public org.tensorflow.proto.GraphDefOrBuilder getPostOptimizationGraphOrBuilder(
             }
             return postOptimizationGraphBuilder_;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.RunMetadata.FunctionGraphs)
         }
    @@ -1330,6 +1309,7 @@ public org.tensorflow.proto.RunMetadata.FunctionGraphs getDefaultInstanceForType
     
       }
     
    +  private int bitField0_;
       public static final int STEP_STATS_FIELD_NUMBER = 1;
       private org.tensorflow.proto.StepStats stepStats_;
       /**
    @@ -1344,7 +1324,7 @@ public org.tensorflow.proto.RunMetadata.FunctionGraphs getDefaultInstanceForType
        */
       @java.lang.Override
       public boolean hasStepStats() {
    -    return stepStats_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * 
    @@ -1371,7 +1351,7 @@ public org.tensorflow.proto.StepStats getStepStats() {
        */
       @java.lang.Override
       public org.tensorflow.proto.StepStatsOrBuilder getStepStatsOrBuilder() {
    -    return getStepStats();
    +    return stepStats_ == null ? org.tensorflow.proto.StepStats.getDefaultInstance() : stepStats_;
       }
     
       public static final int COST_GRAPH_FIELD_NUMBER = 2;
    @@ -1386,7 +1366,7 @@ public org.tensorflow.proto.StepStatsOrBuilder getStepStatsOrBuilder() {
        */
       @java.lang.Override
       public boolean hasCostGraph() {
    -    return costGraph_ != null;
    +    return ((bitField0_ & 0x00000002) != 0);
       }
       /**
        * 
    @@ -1409,10 +1389,11 @@ public org.tensorflow.proto.CostGraphDef getCostGraph() {
        */
       @java.lang.Override
       public org.tensorflow.proto.CostGraphDefOrBuilder getCostGraphOrBuilder() {
    -    return getCostGraph();
    +    return costGraph_ == null ? org.tensorflow.proto.CostGraphDef.getDefaultInstance() : costGraph_;
       }
     
       public static final int PARTITION_GRAPHS_FIELD_NUMBER = 3;
    +  @SuppressWarnings("serial")
       private java.util.List partitionGraphs_;
       /**
        * 
    @@ -1473,6 +1454,7 @@ public org.tensorflow.proto.GraphDefOrBuilder getPartitionGraphsOrBuilder(
       }
     
       public static final int FUNCTION_GRAPHS_FIELD_NUMBER = 4;
    +  @SuppressWarnings("serial")
       private java.util.List functionGraphs_;
       /**
        * 
    @@ -1589,7 +1571,7 @@ public org.tensorflow.proto.RunMetadata.FunctionGraphsOrBuilder getFunctionGraph
        */
       @java.lang.Override
       public boolean hasSessionMetadata() {
    -    return sessionMetadata_ != null;
    +    return ((bitField0_ & 0x00000004) != 0);
       }
       /**
        * 
    @@ -1612,7 +1594,7 @@ public org.tensorflow.proto.SessionMetadata getSessionMetadata() {
        */
       @java.lang.Override
       public org.tensorflow.proto.SessionMetadataOrBuilder getSessionMetadataOrBuilder() {
    -    return getSessionMetadata();
    +    return sessionMetadata_ == null ? org.tensorflow.proto.SessionMetadata.getDefaultInstance() : sessionMetadata_;
       }
     
       private byte memoizedIsInitialized = -1;
    @@ -1629,10 +1611,10 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (stepStats_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(1, getStepStats());
         }
    -    if (costGraph_ != null) {
    +    if (((bitField0_ & 0x00000002) != 0)) {
           output.writeMessage(2, getCostGraph());
         }
         for (int i = 0; i < partitionGraphs_.size(); i++) {
    @@ -1641,7 +1623,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         for (int i = 0; i < functionGraphs_.size(); i++) {
           output.writeMessage(4, functionGraphs_.get(i));
         }
    -    if (sessionMetadata_ != null) {
    +    if (((bitField0_ & 0x00000004) != 0)) {
           output.writeMessage(5, getSessionMetadata());
         }
         getUnknownFields().writeTo(output);
    @@ -1653,11 +1635,11 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (stepStats_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(1, getStepStats());
         }
    -    if (costGraph_ != null) {
    +    if (((bitField0_ & 0x00000002) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(2, getCostGraph());
         }
    @@ -1669,7 +1651,7 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(4, functionGraphs_.get(i));
         }
    -    if (sessionMetadata_ != null) {
    +    if (((bitField0_ & 0x00000004) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(5, getSessionMetadata());
         }
    @@ -1777,39 +1759,41 @@ public static org.tensorflow.proto.RunMetadata parseFrom(
       }
       public static org.tensorflow.proto.RunMetadata parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.RunMetadata parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.RunMetadata parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.RunMetadata parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.RunMetadata parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.RunMetadata parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -1829,7 +1813,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -1841,7 +1825,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.RunMetadata}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.RunMetadata)
           org.tensorflow.proto.RunMetadataOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -1850,7 +1834,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_RunMetadata_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -1859,27 +1843,36 @@ public static final class Builder extends
     
         // Construct using org.tensorflow.proto.RunMetadata.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getStepStatsFieldBuilder();
    +        getCostGraphFieldBuilder();
    +        getPartitionGraphsFieldBuilder();
    +        getFunctionGraphsFieldBuilder();
    +        getSessionMetadataFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    -      if (stepStatsBuilder_ == null) {
    -        stepStats_ = null;
    -      } else {
    -        stepStats_ = null;
    +      bitField0_ = 0;
    +      stepStats_ = null;
    +      if (stepStatsBuilder_ != null) {
    +        stepStatsBuilder_.dispose();
             stepStatsBuilder_ = null;
           }
    -      if (costGraphBuilder_ == null) {
    -        costGraph_ = null;
    -      } else {
    -        costGraph_ = null;
    +      costGraph_ = null;
    +      if (costGraphBuilder_ != null) {
    +        costGraphBuilder_.dispose();
             costGraphBuilder_ = null;
           }
           if (partitionGraphsBuilder_ == null) {
    @@ -1888,18 +1881,17 @@ public Builder clear() {
             partitionGraphs_ = null;
             partitionGraphsBuilder_.clear();
           }
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      bitField0_ = (bitField0_ & ~0x00000004);
           if (functionGraphsBuilder_ == null) {
             functionGraphs_ = java.util.Collections.emptyList();
           } else {
             functionGraphs_ = null;
             functionGraphsBuilder_.clear();
           }
    -      bitField0_ = (bitField0_ & ~0x00000002);
    -      if (sessionMetadataBuilder_ == null) {
    -        sessionMetadata_ = null;
    -      } else {
    -        sessionMetadata_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000008);
    +      sessionMetadata_ = null;
    +      if (sessionMetadataBuilder_ != null) {
    +        sessionMetadataBuilder_.dispose();
             sessionMetadataBuilder_ = null;
           }
           return this;
    @@ -1928,76 +1920,57 @@ public org.tensorflow.proto.RunMetadata build() {
         @java.lang.Override
         public org.tensorflow.proto.RunMetadata buildPartial() {
           org.tensorflow.proto.RunMetadata result = new org.tensorflow.proto.RunMetadata(this);
    -      int from_bitField0_ = bitField0_;
    -      if (stepStatsBuilder_ == null) {
    -        result.stepStats_ = stepStats_;
    -      } else {
    -        result.stepStats_ = stepStatsBuilder_.build();
    -      }
    -      if (costGraphBuilder_ == null) {
    -        result.costGraph_ = costGraph_;
    -      } else {
    -        result.costGraph_ = costGraphBuilder_.build();
    -      }
    +      buildPartialRepeatedFields(result);
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartialRepeatedFields(org.tensorflow.proto.RunMetadata result) {
           if (partitionGraphsBuilder_ == null) {
    -        if (((bitField0_ & 0x00000001) != 0)) {
    +        if (((bitField0_ & 0x00000004) != 0)) {
               partitionGraphs_ = java.util.Collections.unmodifiableList(partitionGraphs_);
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ = (bitField0_ & ~0x00000004);
             }
             result.partitionGraphs_ = partitionGraphs_;
           } else {
             result.partitionGraphs_ = partitionGraphsBuilder_.build();
           }
           if (functionGraphsBuilder_ == null) {
    -        if (((bitField0_ & 0x00000002) != 0)) {
    +        if (((bitField0_ & 0x00000008) != 0)) {
               functionGraphs_ = java.util.Collections.unmodifiableList(functionGraphs_);
    -          bitField0_ = (bitField0_ & ~0x00000002);
    +          bitField0_ = (bitField0_ & ~0x00000008);
             }
             result.functionGraphs_ = functionGraphs_;
           } else {
             result.functionGraphs_ = functionGraphsBuilder_.build();
           }
    -      if (sessionMetadataBuilder_ == null) {
    -        result.sessionMetadata_ = sessionMetadata_;
    -      } else {
    -        result.sessionMetadata_ = sessionMetadataBuilder_.build();
    -      }
    -      onBuilt();
    -      return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.RunMetadata result) {
    +      int from_bitField0_ = bitField0_;
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.stepStats_ = stepStatsBuilder_ == null
    +            ? stepStats_
    +            : stepStatsBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.costGraph_ = costGraphBuilder_ == null
    +            ? costGraph_
    +            : costGraphBuilder_.build();
    +        to_bitField0_ |= 0x00000002;
    +      }
    +      if (((from_bitField0_ & 0x00000010) != 0)) {
    +        result.sessionMetadata_ = sessionMetadataBuilder_ == null
    +            ? sessionMetadata_
    +            : sessionMetadataBuilder_.build();
    +        to_bitField0_ |= 0x00000004;
    +      }
    +      result.bitField0_ |= to_bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.RunMetadata) {
    @@ -2020,7 +1993,7 @@ public Builder mergeFrom(org.tensorflow.proto.RunMetadata other) {
             if (!other.partitionGraphs_.isEmpty()) {
               if (partitionGraphs_.isEmpty()) {
                 partitionGraphs_ = other.partitionGraphs_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000004);
               } else {
                 ensurePartitionGraphsIsMutable();
                 partitionGraphs_.addAll(other.partitionGraphs_);
    @@ -2033,9 +2006,9 @@ public Builder mergeFrom(org.tensorflow.proto.RunMetadata other) {
                 partitionGraphsBuilder_.dispose();
                 partitionGraphsBuilder_ = null;
                 partitionGraphs_ = other.partitionGraphs_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000004);
                 partitionGraphsBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getPartitionGraphsFieldBuilder() : null;
               } else {
                 partitionGraphsBuilder_.addAllMessages(other.partitionGraphs_);
    @@ -2046,7 +2019,7 @@ public Builder mergeFrom(org.tensorflow.proto.RunMetadata other) {
             if (!other.functionGraphs_.isEmpty()) {
               if (functionGraphs_.isEmpty()) {
                 functionGraphs_ = other.functionGraphs_;
    -            bitField0_ = (bitField0_ & ~0x00000002);
    +            bitField0_ = (bitField0_ & ~0x00000008);
               } else {
                 ensureFunctionGraphsIsMutable();
                 functionGraphs_.addAll(other.functionGraphs_);
    @@ -2059,9 +2032,9 @@ public Builder mergeFrom(org.tensorflow.proto.RunMetadata other) {
                 functionGraphsBuilder_.dispose();
                 functionGraphsBuilder_ = null;
                 functionGraphs_ = other.functionGraphs_;
    -            bitField0_ = (bitField0_ & ~0x00000002);
    +            bitField0_ = (bitField0_ & ~0x00000008);
                 functionGraphsBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getFunctionGraphsFieldBuilder() : null;
               } else {
                 functionGraphsBuilder_.addAllMessages(other.functionGraphs_);
    @@ -2101,14 +2074,14 @@ public Builder mergeFrom(
                   input.readMessage(
                       getStepStatsFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
                   input.readMessage(
                       getCostGraphFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 case 26: {
    @@ -2141,7 +2114,7 @@ public Builder mergeFrom(
                   input.readMessage(
                       getSessionMetadataFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000010;
                   break;
                 } // case 42
                 default: {
    @@ -2162,7 +2135,7 @@ public Builder mergeFrom(
         private int bitField0_;
     
         private org.tensorflow.proto.StepStats stepStats_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.StepStats, org.tensorflow.proto.StepStats.Builder, org.tensorflow.proto.StepStatsOrBuilder> stepStatsBuilder_;
         /**
          * 
    @@ -2175,7 +2148,7 @@ public Builder mergeFrom(
          * @return Whether the stepStats field is set.
          */
         public boolean hasStepStats() {
    -      return stepStatsBuilder_ != null || stepStats_ != null;
    +      return ((bitField0_ & 0x00000001) != 0);
         }
         /**
          * 
    @@ -2209,11 +2182,11 @@ public Builder setStepStats(org.tensorflow.proto.StepStats value) {
               throw new NullPointerException();
             }
             stepStats_ = value;
    -        onChanged();
           } else {
             stepStatsBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000001;
    +      onChanged();
           return this;
         }
         /**
    @@ -2229,11 +2202,11 @@ public Builder setStepStats(
             org.tensorflow.proto.StepStats.Builder builderForValue) {
           if (stepStatsBuilder_ == null) {
             stepStats_ = builderForValue.build();
    -        onChanged();
           } else {
             stepStatsBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000001;
    +      onChanged();
           return this;
         }
         /**
    @@ -2247,17 +2220,20 @@ public Builder setStepStats(
          */
         public Builder mergeStepStats(org.tensorflow.proto.StepStats value) {
           if (stepStatsBuilder_ == null) {
    -        if (stepStats_ != null) {
    -          stepStats_ =
    -            org.tensorflow.proto.StepStats.newBuilder(stepStats_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000001) != 0) &&
    +          stepStats_ != null &&
    +          stepStats_ != org.tensorflow.proto.StepStats.getDefaultInstance()) {
    +          getStepStatsBuilder().mergeFrom(value);
             } else {
               stepStats_ = value;
             }
    -        onChanged();
           } else {
             stepStatsBuilder_.mergeFrom(value);
           }
    -
    +      if (stepStats_ != null) {
    +        bitField0_ |= 0x00000001;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -2270,14 +2246,13 @@ public Builder mergeStepStats(org.tensorflow.proto.StepStats value) {
          * .tensorflow.StepStats step_stats = 1;
          */
         public Builder clearStepStats() {
    -      if (stepStatsBuilder_ == null) {
    -        stepStats_ = null;
    -        onChanged();
    -      } else {
    -        stepStats_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000001);
    +      stepStats_ = null;
    +      if (stepStatsBuilder_ != null) {
    +        stepStatsBuilder_.dispose();
             stepStatsBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -2290,7 +2265,7 @@ public Builder clearStepStats() {
          * .tensorflow.StepStats step_stats = 1;
          */
         public org.tensorflow.proto.StepStats.Builder getStepStatsBuilder() {
    -      
    +      bitField0_ |= 0x00000001;
           onChanged();
           return getStepStatsFieldBuilder().getBuilder();
         }
    @@ -2320,11 +2295,11 @@ public org.tensorflow.proto.StepStatsOrBuilder getStepStatsOrBuilder() {
          *
          * .tensorflow.StepStats step_stats = 1;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.StepStats, org.tensorflow.proto.StepStats.Builder, org.tensorflow.proto.StepStatsOrBuilder> 
             getStepStatsFieldBuilder() {
           if (stepStatsBuilder_ == null) {
    -        stepStatsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        stepStatsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.StepStats, org.tensorflow.proto.StepStats.Builder, org.tensorflow.proto.StepStatsOrBuilder>(
                     getStepStats(),
                     getParentForChildren(),
    @@ -2335,7 +2310,7 @@ public org.tensorflow.proto.StepStatsOrBuilder getStepStatsOrBuilder() {
         }
     
         private org.tensorflow.proto.CostGraphDef costGraph_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.CostGraphDef, org.tensorflow.proto.CostGraphDef.Builder, org.tensorflow.proto.CostGraphDefOrBuilder> costGraphBuilder_;
         /**
          * 
    @@ -2346,7 +2321,7 @@ public org.tensorflow.proto.StepStatsOrBuilder getStepStatsOrBuilder() {
          * @return Whether the costGraph field is set.
          */
         public boolean hasCostGraph() {
    -      return costGraphBuilder_ != null || costGraph_ != null;
    +      return ((bitField0_ & 0x00000002) != 0);
         }
         /**
          * 
    @@ -2376,11 +2351,11 @@ public Builder setCostGraph(org.tensorflow.proto.CostGraphDef value) {
               throw new NullPointerException();
             }
             costGraph_ = value;
    -        onChanged();
           } else {
             costGraphBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return this;
         }
         /**
    @@ -2394,11 +2369,11 @@ public Builder setCostGraph(
             org.tensorflow.proto.CostGraphDef.Builder builderForValue) {
           if (costGraphBuilder_ == null) {
             costGraph_ = builderForValue.build();
    -        onChanged();
           } else {
             costGraphBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return this;
         }
         /**
    @@ -2410,17 +2385,20 @@ public Builder setCostGraph(
          */
         public Builder mergeCostGraph(org.tensorflow.proto.CostGraphDef value) {
           if (costGraphBuilder_ == null) {
    -        if (costGraph_ != null) {
    -          costGraph_ =
    -            org.tensorflow.proto.CostGraphDef.newBuilder(costGraph_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000002) != 0) &&
    +          costGraph_ != null &&
    +          costGraph_ != org.tensorflow.proto.CostGraphDef.getDefaultInstance()) {
    +          getCostGraphBuilder().mergeFrom(value);
             } else {
               costGraph_ = value;
             }
    -        onChanged();
           } else {
             costGraphBuilder_.mergeFrom(value);
           }
    -
    +      if (costGraph_ != null) {
    +        bitField0_ |= 0x00000002;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -2431,14 +2409,13 @@ public Builder mergeCostGraph(org.tensorflow.proto.CostGraphDef value) {
          * .tensorflow.CostGraphDef cost_graph = 2;
          */
         public Builder clearCostGraph() {
    -      if (costGraphBuilder_ == null) {
    -        costGraph_ = null;
    -        onChanged();
    -      } else {
    -        costGraph_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000002);
    +      costGraph_ = null;
    +      if (costGraphBuilder_ != null) {
    +        costGraphBuilder_.dispose();
             costGraphBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -2449,7 +2426,7 @@ public Builder clearCostGraph() {
          * .tensorflow.CostGraphDef cost_graph = 2;
          */
         public org.tensorflow.proto.CostGraphDef.Builder getCostGraphBuilder() {
    -      
    +      bitField0_ |= 0x00000002;
           onChanged();
           return getCostGraphFieldBuilder().getBuilder();
         }
    @@ -2475,11 +2452,11 @@ public org.tensorflow.proto.CostGraphDefOrBuilder getCostGraphOrBuilder() {
          *
          * .tensorflow.CostGraphDef cost_graph = 2;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.CostGraphDef, org.tensorflow.proto.CostGraphDef.Builder, org.tensorflow.proto.CostGraphDefOrBuilder> 
             getCostGraphFieldBuilder() {
           if (costGraphBuilder_ == null) {
    -        costGraphBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        costGraphBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.CostGraphDef, org.tensorflow.proto.CostGraphDef.Builder, org.tensorflow.proto.CostGraphDefOrBuilder>(
                     getCostGraph(),
                     getParentForChildren(),
    @@ -2492,13 +2469,13 @@ public org.tensorflow.proto.CostGraphDefOrBuilder getCostGraphOrBuilder() {
         private java.util.List partitionGraphs_ =
           java.util.Collections.emptyList();
         private void ensurePartitionGraphsIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    +      if (!((bitField0_ & 0x00000004) != 0)) {
             partitionGraphs_ = new java.util.ArrayList(partitionGraphs_);
    -        bitField0_ |= 0x00000001;
    +        bitField0_ |= 0x00000004;
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.GraphDef, org.tensorflow.proto.GraphDef.Builder, org.tensorflow.proto.GraphDefOrBuilder> partitionGraphsBuilder_;
     
         /**
    @@ -2688,7 +2665,7 @@ public Builder addAllPartitionGraphs(
         public Builder clearPartitionGraphs() {
           if (partitionGraphsBuilder_ == null) {
             partitionGraphs_ = java.util.Collections.emptyList();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        bitField0_ = (bitField0_ & ~0x00000004);
             onChanged();
           } else {
             partitionGraphsBuilder_.clear();
    @@ -2786,14 +2763,14 @@ public org.tensorflow.proto.GraphDef.Builder addPartitionGraphsBuilder(
              getPartitionGraphsBuilderList() {
           return getPartitionGraphsFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.GraphDef, org.tensorflow.proto.GraphDef.Builder, org.tensorflow.proto.GraphDefOrBuilder> 
             getPartitionGraphsFieldBuilder() {
           if (partitionGraphsBuilder_ == null) {
    -        partitionGraphsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        partitionGraphsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.GraphDef, org.tensorflow.proto.GraphDef.Builder, org.tensorflow.proto.GraphDefOrBuilder>(
                     partitionGraphs_,
    -                ((bitField0_ & 0x00000001) != 0),
    +                ((bitField0_ & 0x00000004) != 0),
                     getParentForChildren(),
                     isClean());
             partitionGraphs_ = null;
    @@ -2804,13 +2781,13 @@ public org.tensorflow.proto.GraphDef.Builder addPartitionGraphsBuilder(
         private java.util.List functionGraphs_ =
           java.util.Collections.emptyList();
         private void ensureFunctionGraphsIsMutable() {
    -      if (!((bitField0_ & 0x00000002) != 0)) {
    +      if (!((bitField0_ & 0x00000008) != 0)) {
             functionGraphs_ = new java.util.ArrayList(functionGraphs_);
    -        bitField0_ |= 0x00000002;
    +        bitField0_ |= 0x00000008;
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.RunMetadata.FunctionGraphs, org.tensorflow.proto.RunMetadata.FunctionGraphs.Builder, org.tensorflow.proto.RunMetadata.FunctionGraphsOrBuilder> functionGraphsBuilder_;
     
         /**
    @@ -3099,7 +3076,7 @@ public Builder addAllFunctionGraphs(
         public Builder clearFunctionGraphs() {
           if (functionGraphsBuilder_ == null) {
             functionGraphs_ = java.util.Collections.emptyList();
    -        bitField0_ = (bitField0_ & ~0x00000002);
    +        bitField0_ = (bitField0_ & ~0x00000008);
             onChanged();
           } else {
             functionGraphsBuilder_.clear();
    @@ -3260,14 +3237,14 @@ public org.tensorflow.proto.RunMetadata.FunctionGraphs.Builder addFunctionGraphs
              getFunctionGraphsBuilderList() {
           return getFunctionGraphsFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.RunMetadata.FunctionGraphs, org.tensorflow.proto.RunMetadata.FunctionGraphs.Builder, org.tensorflow.proto.RunMetadata.FunctionGraphsOrBuilder> 
             getFunctionGraphsFieldBuilder() {
           if (functionGraphsBuilder_ == null) {
    -        functionGraphsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        functionGraphsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.RunMetadata.FunctionGraphs, org.tensorflow.proto.RunMetadata.FunctionGraphs.Builder, org.tensorflow.proto.RunMetadata.FunctionGraphsOrBuilder>(
                     functionGraphs_,
    -                ((bitField0_ & 0x00000002) != 0),
    +                ((bitField0_ & 0x00000008) != 0),
                     getParentForChildren(),
                     isClean());
             functionGraphs_ = null;
    @@ -3276,7 +3253,7 @@ public org.tensorflow.proto.RunMetadata.FunctionGraphs.Builder addFunctionGraphs
         }
     
         private org.tensorflow.proto.SessionMetadata sessionMetadata_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.SessionMetadata, org.tensorflow.proto.SessionMetadata.Builder, org.tensorflow.proto.SessionMetadataOrBuilder> sessionMetadataBuilder_;
         /**
          * 
    @@ -3287,7 +3264,7 @@ public org.tensorflow.proto.RunMetadata.FunctionGraphs.Builder addFunctionGraphs
          * @return Whether the sessionMetadata field is set.
          */
         public boolean hasSessionMetadata() {
    -      return sessionMetadataBuilder_ != null || sessionMetadata_ != null;
    +      return ((bitField0_ & 0x00000010) != 0);
         }
         /**
          * 
    @@ -3317,11 +3294,11 @@ public Builder setSessionMetadata(org.tensorflow.proto.SessionMetadata value) {
               throw new NullPointerException();
             }
             sessionMetadata_ = value;
    -        onChanged();
           } else {
             sessionMetadataBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000010;
    +      onChanged();
           return this;
         }
         /**
    @@ -3335,11 +3312,11 @@ public Builder setSessionMetadata(
             org.tensorflow.proto.SessionMetadata.Builder builderForValue) {
           if (sessionMetadataBuilder_ == null) {
             sessionMetadata_ = builderForValue.build();
    -        onChanged();
           } else {
             sessionMetadataBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000010;
    +      onChanged();
           return this;
         }
         /**
    @@ -3351,17 +3328,20 @@ public Builder setSessionMetadata(
          */
         public Builder mergeSessionMetadata(org.tensorflow.proto.SessionMetadata value) {
           if (sessionMetadataBuilder_ == null) {
    -        if (sessionMetadata_ != null) {
    -          sessionMetadata_ =
    -            org.tensorflow.proto.SessionMetadata.newBuilder(sessionMetadata_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000010) != 0) &&
    +          sessionMetadata_ != null &&
    +          sessionMetadata_ != org.tensorflow.proto.SessionMetadata.getDefaultInstance()) {
    +          getSessionMetadataBuilder().mergeFrom(value);
             } else {
               sessionMetadata_ = value;
             }
    -        onChanged();
           } else {
             sessionMetadataBuilder_.mergeFrom(value);
           }
    -
    +      if (sessionMetadata_ != null) {
    +        bitField0_ |= 0x00000010;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -3372,14 +3352,13 @@ public Builder mergeSessionMetadata(org.tensorflow.proto.SessionMetadata value)
          * .tensorflow.SessionMetadata session_metadata = 5;
          */
         public Builder clearSessionMetadata() {
    -      if (sessionMetadataBuilder_ == null) {
    -        sessionMetadata_ = null;
    -        onChanged();
    -      } else {
    -        sessionMetadata_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000010);
    +      sessionMetadata_ = null;
    +      if (sessionMetadataBuilder_ != null) {
    +        sessionMetadataBuilder_.dispose();
             sessionMetadataBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -3390,7 +3369,7 @@ public Builder clearSessionMetadata() {
          * .tensorflow.SessionMetadata session_metadata = 5;
          */
         public org.tensorflow.proto.SessionMetadata.Builder getSessionMetadataBuilder() {
    -      
    +      bitField0_ |= 0x00000010;
           onChanged();
           return getSessionMetadataFieldBuilder().getBuilder();
         }
    @@ -3416,11 +3395,11 @@ public org.tensorflow.proto.SessionMetadataOrBuilder getSessionMetadataOrBuilder
          *
          * .tensorflow.SessionMetadata session_metadata = 5;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.SessionMetadata, org.tensorflow.proto.SessionMetadata.Builder, org.tensorflow.proto.SessionMetadataOrBuilder> 
             getSessionMetadataFieldBuilder() {
           if (sessionMetadataBuilder_ == null) {
    -        sessionMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        sessionMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.SessionMetadata, org.tensorflow.proto.SessionMetadata.Builder, org.tensorflow.proto.SessionMetadataOrBuilder>(
                     getSessionMetadata(),
                     getParentForChildren(),
    @@ -3429,18 +3408,6 @@ public org.tensorflow.proto.SessionMetadataOrBuilder getSessionMetadataOrBuilder
           }
           return sessionMetadataBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.RunMetadata)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunMetadataOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunMetadataOrBuilder.java
    index 58cc295b4c6..4c7e97243da 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunMetadataOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunMetadataOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/config.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunOptions.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunOptions.java
    index cf364bfe75f..f7bbbdee26c 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunOptions.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunOptions.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/config.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,37 +13,34 @@
      * Protobuf type {@code tensorflow.RunOptions}
      */
     public final class RunOptions extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.RunOptions)
         RunOptionsOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      RunOptions.class.getName());
    +  }
       // Use RunOptions.newBuilder() to construct.
    -  private RunOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private RunOptions(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private RunOptions() {
         traceLevel_ = 0;
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new RunOptions();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_RunOptions_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_RunOptions_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -77,6 +76,15 @@ public enum TraceLevel
         UNRECOGNIZED(-1),
         ;
     
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        TraceLevel.class.getName());
    +    }
         /**
          * NO_TRACE = 0;
          */
    @@ -234,36 +242,33 @@ public interface ExperimentalOrBuilder extends
        * Protobuf type {@code tensorflow.RunOptions.Experimental}
        */
       public static final class Experimental extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.RunOptions.Experimental)
           ExperimentalOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        Experimental.class.getName());
    +    }
         // Use Experimental.newBuilder() to construct.
    -    private Experimental(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private Experimental(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private Experimental() {
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new Experimental();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_RunOptions_Experimental_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_RunOptions_Experimental_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -293,36 +298,33 @@ public interface RunHandlerPoolOptionsOrBuilder extends
          * Protobuf type {@code tensorflow.RunOptions.Experimental.RunHandlerPoolOptions}
          */
         public static final class RunHandlerPoolOptions extends
    -        com.google.protobuf.GeneratedMessageV3 implements
    +        com.google.protobuf.GeneratedMessage implements
             // @@protoc_insertion_point(message_implements:tensorflow.RunOptions.Experimental.RunHandlerPoolOptions)
             RunHandlerPoolOptionsOrBuilder {
         private static final long serialVersionUID = 0L;
    +      static {
    +        com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +          com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +          /* major= */ 4,
    +          /* minor= */ 28,
    +          /* patch= */ 3,
    +          /* suffix= */ "",
    +          RunHandlerPoolOptions.class.getName());
    +      }
           // Use RunHandlerPoolOptions.newBuilder() to construct.
    -      private RunHandlerPoolOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +      private RunHandlerPoolOptions(com.google.protobuf.GeneratedMessage.Builder builder) {
             super(builder);
           }
           private RunHandlerPoolOptions() {
           }
     
    -      @java.lang.Override
    -      @SuppressWarnings({"unused"})
    -      protected java.lang.Object newInstance(
    -          UnusedPrivateParameter unused) {
    -        return new RunHandlerPoolOptions();
    -      }
    -
    -      @java.lang.Override
    -      public final com.google.protobuf.UnknownFieldSet
    -      getUnknownFields() {
    -        return this.unknownFields;
    -      }
           public static final com.google.protobuf.Descriptors.Descriptor
               getDescriptor() {
             return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_RunOptions_Experimental_RunHandlerPoolOptions_descriptor;
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_RunOptions_Experimental_RunHandlerPoolOptions_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -330,7 +332,7 @@ protected java.lang.Object newInstance(
           }
     
           public static final int PRIORITY_FIELD_NUMBER = 1;
    -      private long priority_;
    +      private long priority_ = 0L;
           /**
            * 
            * Priority of the request. The run handler thread pool will schedule ops
    @@ -445,39 +447,41 @@ public static org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptions
           }
           public static org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptions parseFrom(java.io.InputStream input)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input);
           }
           public static org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptions parseFrom(
               java.io.InputStream input,
               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input, extensionRegistry);
           }
    +
           public static org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptions parseDelimitedFrom(java.io.InputStream input)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseDelimitedWithIOException(PARSER, input);
           }
    +
           public static org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptions parseDelimitedFrom(
               java.io.InputStream input,
               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
           }
           public static org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptions parseFrom(
               com.google.protobuf.CodedInputStream input)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input);
           }
           public static org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptions parseFrom(
               com.google.protobuf.CodedInputStream input,
               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input, extensionRegistry);
           }
     
    @@ -497,7 +501,7 @@ public Builder toBuilder() {
     
           @java.lang.Override
           protected Builder newBuilderForType(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             Builder builder = new Builder(parent);
             return builder;
           }
    @@ -509,7 +513,7 @@ protected Builder newBuilderForType(
            * Protobuf type {@code tensorflow.RunOptions.Experimental.RunHandlerPoolOptions}
            */
           public static final class Builder extends
    -          com.google.protobuf.GeneratedMessageV3.Builder implements
    +          com.google.protobuf.GeneratedMessage.Builder implements
               // @@protoc_insertion_point(builder_implements:tensorflow.RunOptions.Experimental.RunHandlerPoolOptions)
               org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptionsOrBuilder {
             public static final com.google.protobuf.Descriptors.Descriptor
    @@ -518,7 +522,7 @@ public static final class Builder extends
             }
     
             @java.lang.Override
    -        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +        protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
                 internalGetFieldAccessorTable() {
               return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_RunOptions_Experimental_RunHandlerPoolOptions_fieldAccessorTable
                   .ensureFieldAccessorsInitialized(
    @@ -531,15 +535,15 @@ private Builder() {
             }
     
             private Builder(
    -            com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +            com.google.protobuf.GeneratedMessage.BuilderParent parent) {
               super(parent);
     
             }
             @java.lang.Override
             public Builder clear() {
               super.clear();
    +          bitField0_ = 0;
               priority_ = 0L;
    -
               return this;
             }
     
    @@ -566,43 +570,18 @@ public org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptions build(
             @java.lang.Override
             public org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptions buildPartial() {
               org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptions result = new org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptions(this);
    -          result.priority_ = priority_;
    +          if (bitField0_ != 0) { buildPartial0(result); }
               onBuilt();
               return result;
             }
     
    -        @java.lang.Override
    -        public Builder clone() {
    -          return super.clone();
    -        }
    -        @java.lang.Override
    -        public Builder setField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field,
    -            java.lang.Object value) {
    -          return super.setField(field, value);
    -        }
    -        @java.lang.Override
    -        public Builder clearField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field) {
    -          return super.clearField(field);
    -        }
    -        @java.lang.Override
    -        public Builder clearOneof(
    -            com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -          return super.clearOneof(oneof);
    -        }
    -        @java.lang.Override
    -        public Builder setRepeatedField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field,
    -            int index, java.lang.Object value) {
    -          return super.setRepeatedField(field, index, value);
    -        }
    -        @java.lang.Override
    -        public Builder addRepeatedField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field,
    -            java.lang.Object value) {
    -          return super.addRepeatedField(field, value);
    +        private void buildPartial0(org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptions result) {
    +          int from_bitField0_ = bitField0_;
    +          if (((from_bitField0_ & 0x00000001) != 0)) {
    +            result.priority_ = priority_;
    +          }
             }
    +
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.Message other) {
               if (other instanceof org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptions) {
    @@ -646,7 +625,7 @@ public Builder mergeFrom(
                       break;
                     case 8: {
                       priority_ = input.readInt64();
    -
    +                  bitField0_ |= 0x00000001;
                       break;
                     } // case 8
                     default: {
    @@ -664,6 +643,7 @@ public Builder mergeFrom(
               } // finally
               return this;
             }
    +        private int bitField0_;
     
             private long priority_ ;
             /**
    @@ -690,8 +670,9 @@ public long getPriority() {
              * @return This builder for chaining.
              */
             public Builder setPriority(long value) {
    -          
    +
               priority_ = value;
    +          bitField0_ |= 0x00000001;
               onChanged();
               return this;
             }
    @@ -705,23 +686,11 @@ public Builder setPriority(long value) {
              * @return This builder for chaining.
              */
             public Builder clearPriority() {
    -          
    +          bitField0_ = (bitField0_ & ~0x00000001);
               priority_ = 0L;
               onChanged();
               return this;
             }
    -        @java.lang.Override
    -        public final Builder setUnknownFields(
    -            final com.google.protobuf.UnknownFieldSet unknownFields) {
    -          return super.setUnknownFields(unknownFields);
    -        }
    -
    -        @java.lang.Override
    -        public final Builder mergeUnknownFields(
    -            final com.google.protobuf.UnknownFieldSet unknownFields) {
    -          return super.mergeUnknownFields(unknownFields);
    -        }
    -
     
             // @@protoc_insertion_point(builder_scope:tensorflow.RunOptions.Experimental.RunHandlerPoolOptions)
           }
    @@ -774,8 +743,9 @@ public org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptions getDef
     
         }
     
    +    private int bitField0_;
         public static final int COLLECTIVE_GRAPH_KEY_FIELD_NUMBER = 1;
    -    private long collectiveGraphKey_;
    +    private long collectiveGraphKey_ = 0L;
         /**
          * 
          * If non-zero, declares that this graph is going to use collective
    @@ -793,7 +763,7 @@ public long getCollectiveGraphKey() {
         }
     
         public static final int USE_RUN_HANDLER_POOL_FIELD_NUMBER = 2;
    -    private boolean useRunHandlerPool_;
    +    private boolean useRunHandlerPool_ = false;
         /**
          * 
          * If true, then operations (using the inter-op pool) across all
    @@ -818,7 +788,7 @@ public boolean getUseRunHandlerPool() {
          */
         @java.lang.Override
         public boolean hasRunHandlerPoolOptions() {
    -      return runHandlerPoolOptions_ != null;
    +      return ((bitField0_ & 0x00000001) != 0);
         }
         /**
          * .tensorflow.RunOptions.Experimental.RunHandlerPoolOptions run_handler_pool_options = 3;
    @@ -833,7 +803,7 @@ public org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptions getRun
          */
         @java.lang.Override
         public org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptionsOrBuilder getRunHandlerPoolOptionsOrBuilder() {
    -      return getRunHandlerPoolOptions();
    +      return runHandlerPoolOptions_ == null ? org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptions.getDefaultInstance() : runHandlerPoolOptions_;
         }
     
         private byte memoizedIsInitialized = -1;
    @@ -856,7 +826,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           if (useRunHandlerPool_ != false) {
             output.writeBool(2, useRunHandlerPool_);
           }
    -      if (runHandlerPoolOptions_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             output.writeMessage(3, getRunHandlerPoolOptions());
           }
           getUnknownFields().writeTo(output);
    @@ -876,7 +846,7 @@ public int getSerializedSize() {
             size += com.google.protobuf.CodedOutputStream
               .computeBoolSize(2, useRunHandlerPool_);
           }
    -      if (runHandlerPoolOptions_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(3, getRunHandlerPoolOptions());
           }
    @@ -964,39 +934,41 @@ public static org.tensorflow.proto.RunOptions.Experimental parseFrom(
         }
         public static org.tensorflow.proto.RunOptions.Experimental parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.RunOptions.Experimental parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.RunOptions.Experimental parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.RunOptions.Experimental parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.RunOptions.Experimental parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.RunOptions.Experimental parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -1016,7 +988,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -1030,7 +1002,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.RunOptions.Experimental}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.RunOptions.Experimental)
             org.tensorflow.proto.RunOptions.ExperimentalOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -1039,7 +1011,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_RunOptions_Experimental_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -1048,25 +1020,29 @@ public static final class Builder extends
     
           // Construct using org.tensorflow.proto.RunOptions.Experimental.newBuilder()
           private Builder() {
    -
    +        maybeForceBuilderInitialization();
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
    -
    +        maybeForceBuilderInitialization();
    +      }
    +      private void maybeForceBuilderInitialization() {
    +        if (com.google.protobuf.GeneratedMessage
    +                .alwaysUseFieldBuilders) {
    +          getRunHandlerPoolOptionsFieldBuilder();
    +        }
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             collectiveGraphKey_ = 0L;
    -
             useRunHandlerPool_ = false;
    -
    -        if (runHandlerPoolOptionsBuilder_ == null) {
    -          runHandlerPoolOptions_ = null;
    -        } else {
    -          runHandlerPoolOptions_ = null;
    +        runHandlerPoolOptions_ = null;
    +        if (runHandlerPoolOptionsBuilder_ != null) {
    +          runHandlerPoolOptionsBuilder_.dispose();
               runHandlerPoolOptionsBuilder_ = null;
             }
             return this;
    @@ -1095,49 +1071,29 @@ public org.tensorflow.proto.RunOptions.Experimental build() {
           @java.lang.Override
           public org.tensorflow.proto.RunOptions.Experimental buildPartial() {
             org.tensorflow.proto.RunOptions.Experimental result = new org.tensorflow.proto.RunOptions.Experimental(this);
    -        result.collectiveGraphKey_ = collectiveGraphKey_;
    -        result.useRunHandlerPool_ = useRunHandlerPool_;
    -        if (runHandlerPoolOptionsBuilder_ == null) {
    -          result.runHandlerPoolOptions_ = runHandlerPoolOptions_;
    -        } else {
    -          result.runHandlerPoolOptions_ = runHandlerPoolOptionsBuilder_.build();
    -        }
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.RunOptions.Experimental result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.collectiveGraphKey_ = collectiveGraphKey_;
    +        }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.useRunHandlerPool_ = useRunHandlerPool_;
    +        }
    +        int to_bitField0_ = 0;
    +        if (((from_bitField0_ & 0x00000004) != 0)) {
    +          result.runHandlerPoolOptions_ = runHandlerPoolOptionsBuilder_ == null
    +              ? runHandlerPoolOptions_
    +              : runHandlerPoolOptionsBuilder_.build();
    +          to_bitField0_ |= 0x00000001;
    +        }
    +        result.bitField0_ |= to_bitField0_;
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.RunOptions.Experimental) {
    @@ -1187,19 +1143,19 @@ public Builder mergeFrom(
                     break;
                   case 8: {
                     collectiveGraphKey_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 8
                   case 16: {
                     useRunHandlerPool_ = input.readBool();
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 16
                   case 26: {
                     input.readMessage(
                         getRunHandlerPoolOptionsFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00000004;
                     break;
                   } // case 26
                   default: {
    @@ -1217,6 +1173,7 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    +      private int bitField0_;
     
           private long collectiveGraphKey_ ;
           /**
    @@ -1247,8 +1204,9 @@ public long getCollectiveGraphKey() {
            * @return This builder for chaining.
            */
           public Builder setCollectiveGraphKey(long value) {
    -        
    +
             collectiveGraphKey_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -1264,7 +1222,7 @@ public Builder setCollectiveGraphKey(long value) {
            * @return This builder for chaining.
            */
           public Builder clearCollectiveGraphKey() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000001);
             collectiveGraphKey_ = 0L;
             onChanged();
             return this;
    @@ -1299,8 +1257,9 @@ public boolean getUseRunHandlerPool() {
            * @return This builder for chaining.
            */
           public Builder setUseRunHandlerPool(boolean value) {
    -        
    +
             useRunHandlerPool_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -1316,21 +1275,21 @@ public Builder setUseRunHandlerPool(boolean value) {
            * @return This builder for chaining.
            */
           public Builder clearUseRunHandlerPool() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000002);
             useRunHandlerPool_ = false;
             onChanged();
             return this;
           }
     
           private org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptions runHandlerPoolOptions_;
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptions, org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptions.Builder, org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptionsOrBuilder> runHandlerPoolOptionsBuilder_;
           /**
            * .tensorflow.RunOptions.Experimental.RunHandlerPoolOptions run_handler_pool_options = 3;
            * @return Whether the runHandlerPoolOptions field is set.
            */
           public boolean hasRunHandlerPoolOptions() {
    -        return runHandlerPoolOptionsBuilder_ != null || runHandlerPoolOptions_ != null;
    +        return ((bitField0_ & 0x00000004) != 0);
           }
           /**
            * .tensorflow.RunOptions.Experimental.RunHandlerPoolOptions run_handler_pool_options = 3;
    @@ -1352,11 +1311,11 @@ public Builder setRunHandlerPoolOptions(org.tensorflow.proto.RunOptions.Experime
                 throw new NullPointerException();
               }
               runHandlerPoolOptions_ = value;
    -          onChanged();
             } else {
               runHandlerPoolOptionsBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000004;
    +        onChanged();
             return this;
           }
           /**
    @@ -1366,11 +1325,11 @@ public Builder setRunHandlerPoolOptions(
               org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptions.Builder builderForValue) {
             if (runHandlerPoolOptionsBuilder_ == null) {
               runHandlerPoolOptions_ = builderForValue.build();
    -          onChanged();
             } else {
               runHandlerPoolOptionsBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000004;
    +        onChanged();
             return this;
           }
           /**
    @@ -1378,38 +1337,40 @@ public Builder setRunHandlerPoolOptions(
            */
           public Builder mergeRunHandlerPoolOptions(org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptions value) {
             if (runHandlerPoolOptionsBuilder_ == null) {
    -          if (runHandlerPoolOptions_ != null) {
    -            runHandlerPoolOptions_ =
    -              org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptions.newBuilder(runHandlerPoolOptions_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000004) != 0) &&
    +            runHandlerPoolOptions_ != null &&
    +            runHandlerPoolOptions_ != org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptions.getDefaultInstance()) {
    +            getRunHandlerPoolOptionsBuilder().mergeFrom(value);
               } else {
                 runHandlerPoolOptions_ = value;
               }
    -          onChanged();
             } else {
               runHandlerPoolOptionsBuilder_.mergeFrom(value);
             }
    -
    +        if (runHandlerPoolOptions_ != null) {
    +          bitField0_ |= 0x00000004;
    +          onChanged();
    +        }
             return this;
           }
           /**
            * .tensorflow.RunOptions.Experimental.RunHandlerPoolOptions run_handler_pool_options = 3;
            */
           public Builder clearRunHandlerPoolOptions() {
    -        if (runHandlerPoolOptionsBuilder_ == null) {
    -          runHandlerPoolOptions_ = null;
    -          onChanged();
    -        } else {
    -          runHandlerPoolOptions_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000004);
    +        runHandlerPoolOptions_ = null;
    +        if (runHandlerPoolOptionsBuilder_ != null) {
    +          runHandlerPoolOptionsBuilder_.dispose();
               runHandlerPoolOptionsBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
            * .tensorflow.RunOptions.Experimental.RunHandlerPoolOptions run_handler_pool_options = 3;
            */
           public org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptions.Builder getRunHandlerPoolOptionsBuilder() {
    -        
    +        bitField0_ |= 0x00000004;
             onChanged();
             return getRunHandlerPoolOptionsFieldBuilder().getBuilder();
           }
    @@ -1427,11 +1388,11 @@ public org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptionsOrBuild
           /**
            * .tensorflow.RunOptions.Experimental.RunHandlerPoolOptions run_handler_pool_options = 3;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptions, org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptions.Builder, org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptionsOrBuilder> 
               getRunHandlerPoolOptionsFieldBuilder() {
             if (runHandlerPoolOptionsBuilder_ == null) {
    -          runHandlerPoolOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          runHandlerPoolOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptions, org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptions.Builder, org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptionsOrBuilder>(
                       getRunHandlerPoolOptions(),
                       getParentForChildren(),
    @@ -1440,18 +1401,6 @@ public org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptionsOrBuild
             }
             return runHandlerPoolOptionsBuilder_;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.RunOptions.Experimental)
         }
    @@ -1504,8 +1453,9 @@ public org.tensorflow.proto.RunOptions.Experimental getDefaultInstanceForType()
     
       }
     
    +  private int bitField0_;
       public static final int TRACE_LEVEL_FIELD_NUMBER = 1;
    -  private int traceLevel_;
    +  private int traceLevel_ = 0;
       /**
        * .tensorflow.RunOptions.TraceLevel trace_level = 1;
        * @return The enum numeric value on the wire for traceLevel.
    @@ -1518,13 +1468,12 @@ public org.tensorflow.proto.RunOptions.Experimental getDefaultInstanceForType()
        * @return The traceLevel.
        */
       @java.lang.Override public org.tensorflow.proto.RunOptions.TraceLevel getTraceLevel() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.RunOptions.TraceLevel result = org.tensorflow.proto.RunOptions.TraceLevel.valueOf(traceLevel_);
    +    org.tensorflow.proto.RunOptions.TraceLevel result = org.tensorflow.proto.RunOptions.TraceLevel.forNumber(traceLevel_);
         return result == null ? org.tensorflow.proto.RunOptions.TraceLevel.UNRECOGNIZED : result;
       }
     
       public static final int TIMEOUT_IN_MS_FIELD_NUMBER = 2;
    -  private long timeoutInMs_;
    +  private long timeoutInMs_ = 0L;
       /**
        * 
        * Time to wait for operation to complete in milliseconds.
    @@ -1539,7 +1488,7 @@ public long getTimeoutInMs() {
       }
     
       public static final int INTER_OP_THREAD_POOL_FIELD_NUMBER = 3;
    -  private int interOpThreadPool_;
    +  private int interOpThreadPool_ = 0;
       /**
        * 
        * The thread pool to use, if session_inter_op_thread_pool is configured.
    @@ -1559,7 +1508,7 @@ public int getInterOpThreadPool() {
       }
     
       public static final int OUTPUT_PARTITION_GRAPHS_FIELD_NUMBER = 5;
    -  private boolean outputPartitionGraphs_;
    +  private boolean outputPartitionGraphs_ = false;
       /**
        * 
        * Whether the partition graph(s) executed by the executor(s) should be
    @@ -1586,7 +1535,7 @@ public boolean getOutputPartitionGraphs() {
        */
       @java.lang.Override
       public boolean hasDebugOptions() {
    -    return debugOptions_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * 
    @@ -1609,16 +1558,17 @@ public org.tensorflow.proto.DebugOptions getDebugOptions() {
        */
       @java.lang.Override
       public org.tensorflow.proto.DebugOptionsOrBuilder getDebugOptionsOrBuilder() {
    -    return getDebugOptions();
    +    return debugOptions_ == null ? org.tensorflow.proto.DebugOptions.getDefaultInstance() : debugOptions_;
       }
     
       public static final int REPORT_TENSOR_ALLOCATIONS_UPON_OOM_FIELD_NUMBER = 7;
    -  private boolean reportTensorAllocationsUponOom_;
    +  private boolean reportTensorAllocationsUponOom_ = false;
       /**
        * 
        * When enabled, causes tensor allocation information to be included in
        * the error message when the Run() call fails because the allocator ran
        * out of memory (OOM).
    +   *
        * Enabling this option can slow down the Run() call.
        * 
    * @@ -1638,7 +1588,7 @@ public boolean getReportTensorAllocationsUponOom() { */ @java.lang.Override public boolean hasExperimental() { - return experimental_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** * .tensorflow.RunOptions.Experimental experimental = 8; @@ -1653,7 +1603,7 @@ public org.tensorflow.proto.RunOptions.Experimental getExperimental() { */ @java.lang.Override public org.tensorflow.proto.RunOptions.ExperimentalOrBuilder getExperimentalOrBuilder() { - return getExperimental(); + return experimental_ == null ? org.tensorflow.proto.RunOptions.Experimental.getDefaultInstance() : experimental_; } private byte memoizedIsInitialized = -1; @@ -1682,13 +1632,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (outputPartitionGraphs_ != false) { output.writeBool(5, outputPartitionGraphs_); } - if (debugOptions_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(6, getDebugOptions()); } if (reportTensorAllocationsUponOom_ != false) { output.writeBool(7, reportTensorAllocationsUponOom_); } - if (experimental_ != null) { + if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(8, getExperimental()); } getUnknownFields().writeTo(output); @@ -1716,7 +1666,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBoolSize(5, outputPartitionGraphs_); } - if (debugOptions_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(6, getDebugOptions()); } @@ -1724,7 +1674,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBoolSize(7, reportTensorAllocationsUponOom_); } - if (experimental_ != null) { + if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(8, getExperimental()); } @@ -1833,39 +1783,41 @@ public static org.tensorflow.proto.RunOptions parseFrom( } public static org.tensorflow.proto.RunOptions parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.RunOptions parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.RunOptions parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.RunOptions parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.RunOptions parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.RunOptions parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -1885,7 +1837,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -1897,7 +1849,7 @@ protected Builder newBuilderForType( * Protobuf type {@code tensorflow.RunOptions} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.RunOptions) org.tensorflow.proto.RunOptionsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -1906,7 +1858,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_RunOptions_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -1915,37 +1867,38 @@ public static final class Builder extends // Construct using org.tensorflow.proto.RunOptions.newBuilder() private Builder() { - + maybeForceBuilderInitialization(); } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getDebugOptionsFieldBuilder(); + getExperimentalFieldBuilder(); + } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; traceLevel_ = 0; - timeoutInMs_ = 0L; - interOpThreadPool_ = 0; - outputPartitionGraphs_ = false; - - if (debugOptionsBuilder_ == null) { - debugOptions_ = null; - } else { - debugOptions_ = null; + debugOptions_ = null; + if (debugOptionsBuilder_ != null) { + debugOptionsBuilder_.dispose(); debugOptionsBuilder_ = null; } reportTensorAllocationsUponOom_ = false; - - if (experimentalBuilder_ == null) { - experimental_ = null; - } else { - experimental_ = null; + experimental_ = null; + if (experimentalBuilder_ != null) { + experimentalBuilder_.dispose(); experimentalBuilder_ = null; } return this; @@ -1974,57 +1927,44 @@ public org.tensorflow.proto.RunOptions build() { @java.lang.Override public org.tensorflow.proto.RunOptions buildPartial() { org.tensorflow.proto.RunOptions result = new org.tensorflow.proto.RunOptions(this); - result.traceLevel_ = traceLevel_; - result.timeoutInMs_ = timeoutInMs_; - result.interOpThreadPool_ = interOpThreadPool_; - result.outputPartitionGraphs_ = outputPartitionGraphs_; - if (debugOptionsBuilder_ == null) { - result.debugOptions_ = debugOptions_; - } else { - result.debugOptions_ = debugOptionsBuilder_.build(); - } - result.reportTensorAllocationsUponOom_ = reportTensorAllocationsUponOom_; - if (experimentalBuilder_ == null) { - result.experimental_ = experimental_; - } else { - result.experimental_ = experimentalBuilder_.build(); - } + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.RunOptions result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.traceLevel_ = traceLevel_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.timeoutInMs_ = timeoutInMs_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.interOpThreadPool_ = interOpThreadPool_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.outputPartitionGraphs_ = outputPartitionGraphs_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.debugOptions_ = debugOptionsBuilder_ == null + ? debugOptions_ + : debugOptionsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.reportTensorAllocationsUponOom_ = reportTensorAllocationsUponOom_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.experimental_ = experimentalBuilder_ == null + ? experimental_ + : experimentalBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.RunOptions) { @@ -2086,41 +2026,41 @@ public Builder mergeFrom( break; case 8: { traceLevel_ = input.readEnum(); - + bitField0_ |= 0x00000001; break; } // case 8 case 16: { timeoutInMs_ = input.readInt64(); - + bitField0_ |= 0x00000002; break; } // case 16 case 24: { interOpThreadPool_ = input.readInt32(); - + bitField0_ |= 0x00000004; break; } // case 24 case 40: { outputPartitionGraphs_ = input.readBool(); - + bitField0_ |= 0x00000008; break; } // case 40 case 50: { input.readMessage( getDebugOptionsFieldBuilder().getBuilder(), extensionRegistry); - + bitField0_ |= 0x00000010; break; } // case 50 case 56: { reportTensorAllocationsUponOom_ = input.readBool(); - + bitField0_ |= 0x00000020; break; } // case 56 case 66: { input.readMessage( getExperimentalFieldBuilder().getBuilder(), extensionRegistry); - + bitField0_ |= 0x00000040; break; } // case 66 default: { @@ -2138,6 +2078,7 @@ public Builder mergeFrom( } // finally return this; } + private int bitField0_; private int traceLevel_ = 0; /** @@ -2153,8 +2094,8 @@ public Builder mergeFrom( * @return This builder for chaining. */ public Builder setTraceLevelValue(int value) { - traceLevel_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -2164,8 +2105,7 @@ public Builder setTraceLevelValue(int value) { */ @java.lang.Override public org.tensorflow.proto.RunOptions.TraceLevel getTraceLevel() { - @SuppressWarnings("deprecation") - org.tensorflow.proto.RunOptions.TraceLevel result = org.tensorflow.proto.RunOptions.TraceLevel.valueOf(traceLevel_); + org.tensorflow.proto.RunOptions.TraceLevel result = org.tensorflow.proto.RunOptions.TraceLevel.forNumber(traceLevel_); return result == null ? org.tensorflow.proto.RunOptions.TraceLevel.UNRECOGNIZED : result; } /** @@ -2177,7 +2117,7 @@ public Builder setTraceLevel(org.tensorflow.proto.RunOptions.TraceLevel value) { if (value == null) { throw new NullPointerException(); } - + bitField0_ |= 0x00000001; traceLevel_ = value.getNumber(); onChanged(); return this; @@ -2187,7 +2127,7 @@ public Builder setTraceLevel(org.tensorflow.proto.RunOptions.TraceLevel value) { * @return This builder for chaining. */ public Builder clearTraceLevel() { - + bitField0_ = (bitField0_ & ~0x00000001); traceLevel_ = 0; onChanged(); return this; @@ -2216,8 +2156,9 @@ public long getTimeoutInMs() { * @return This builder for chaining. */ public Builder setTimeoutInMs(long value) { - + timeoutInMs_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -2230,7 +2171,7 @@ public Builder setTimeoutInMs(long value) { * @return This builder for chaining. */ public Builder clearTimeoutInMs() { - + bitField0_ = (bitField0_ & ~0x00000002); timeoutInMs_ = 0L; onChanged(); return this; @@ -2269,8 +2210,9 @@ public int getInterOpThreadPool() { * @return This builder for chaining. */ public Builder setInterOpThreadPool(int value) { - + interOpThreadPool_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -2288,7 +2230,7 @@ public Builder setInterOpThreadPool(int value) { * @return This builder for chaining. */ public Builder clearInterOpThreadPool() { - + bitField0_ = (bitField0_ & ~0x00000004); interOpThreadPool_ = 0; onChanged(); return this; @@ -2319,8 +2261,9 @@ public boolean getOutputPartitionGraphs() { * @return This builder for chaining. */ public Builder setOutputPartitionGraphs(boolean value) { - + outputPartitionGraphs_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -2334,14 +2277,14 @@ public Builder setOutputPartitionGraphs(boolean value) { * @return This builder for chaining. */ public Builder clearOutputPartitionGraphs() { - + bitField0_ = (bitField0_ & ~0x00000008); outputPartitionGraphs_ = false; onChanged(); return this; } private org.tensorflow.proto.DebugOptions debugOptions_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.DebugOptions, org.tensorflow.proto.DebugOptions.Builder, org.tensorflow.proto.DebugOptionsOrBuilder> debugOptionsBuilder_; /** *
    @@ -2352,7 +2295,7 @@ public Builder clearOutputPartitionGraphs() {
          * @return Whether the debugOptions field is set.
          */
         public boolean hasDebugOptions() {
    -      return debugOptionsBuilder_ != null || debugOptions_ != null;
    +      return ((bitField0_ & 0x00000010) != 0);
         }
         /**
          * 
    @@ -2382,11 +2325,11 @@ public Builder setDebugOptions(org.tensorflow.proto.DebugOptions value) {
               throw new NullPointerException();
             }
             debugOptions_ = value;
    -        onChanged();
           } else {
             debugOptionsBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000010;
    +      onChanged();
           return this;
         }
         /**
    @@ -2400,11 +2343,11 @@ public Builder setDebugOptions(
             org.tensorflow.proto.DebugOptions.Builder builderForValue) {
           if (debugOptionsBuilder_ == null) {
             debugOptions_ = builderForValue.build();
    -        onChanged();
           } else {
             debugOptionsBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000010;
    +      onChanged();
           return this;
         }
         /**
    @@ -2416,17 +2359,20 @@ public Builder setDebugOptions(
          */
         public Builder mergeDebugOptions(org.tensorflow.proto.DebugOptions value) {
           if (debugOptionsBuilder_ == null) {
    -        if (debugOptions_ != null) {
    -          debugOptions_ =
    -            org.tensorflow.proto.DebugOptions.newBuilder(debugOptions_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000010) != 0) &&
    +          debugOptions_ != null &&
    +          debugOptions_ != org.tensorflow.proto.DebugOptions.getDefaultInstance()) {
    +          getDebugOptionsBuilder().mergeFrom(value);
             } else {
               debugOptions_ = value;
             }
    -        onChanged();
           } else {
             debugOptionsBuilder_.mergeFrom(value);
           }
    -
    +      if (debugOptions_ != null) {
    +        bitField0_ |= 0x00000010;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -2437,14 +2383,13 @@ public Builder mergeDebugOptions(org.tensorflow.proto.DebugOptions value) {
          * .tensorflow.DebugOptions debug_options = 6;
          */
         public Builder clearDebugOptions() {
    -      if (debugOptionsBuilder_ == null) {
    -        debugOptions_ = null;
    -        onChanged();
    -      } else {
    -        debugOptions_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000010);
    +      debugOptions_ = null;
    +      if (debugOptionsBuilder_ != null) {
    +        debugOptionsBuilder_.dispose();
             debugOptionsBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -2455,7 +2400,7 @@ public Builder clearDebugOptions() {
          * .tensorflow.DebugOptions debug_options = 6;
          */
         public org.tensorflow.proto.DebugOptions.Builder getDebugOptionsBuilder() {
    -      
    +      bitField0_ |= 0x00000010;
           onChanged();
           return getDebugOptionsFieldBuilder().getBuilder();
         }
    @@ -2481,11 +2426,11 @@ public org.tensorflow.proto.DebugOptionsOrBuilder getDebugOptionsOrBuilder() {
          *
          * .tensorflow.DebugOptions debug_options = 6;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.DebugOptions, org.tensorflow.proto.DebugOptions.Builder, org.tensorflow.proto.DebugOptionsOrBuilder> 
             getDebugOptionsFieldBuilder() {
           if (debugOptionsBuilder_ == null) {
    -        debugOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        debugOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.DebugOptions, org.tensorflow.proto.DebugOptions.Builder, org.tensorflow.proto.DebugOptionsOrBuilder>(
                     getDebugOptions(),
                     getParentForChildren(),
    @@ -2501,6 +2446,7 @@ public org.tensorflow.proto.DebugOptionsOrBuilder getDebugOptionsOrBuilder() {
          * When enabled, causes tensor allocation information to be included in
          * the error message when the Run() call fails because the allocator ran
          * out of memory (OOM).
    +     *
          * Enabling this option can slow down the Run() call.
          * 
    * @@ -2516,6 +2462,7 @@ public boolean getReportTensorAllocationsUponOom() { * When enabled, causes tensor allocation information to be included in * the error message when the Run() call fails because the allocator ran * out of memory (OOM). + * * Enabling this option can slow down the Run() call. *
    * @@ -2524,8 +2471,9 @@ public boolean getReportTensorAllocationsUponOom() { * @return This builder for chaining. */ public Builder setReportTensorAllocationsUponOom(boolean value) { - + reportTensorAllocationsUponOom_ = value; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2534,6 +2482,7 @@ public Builder setReportTensorAllocationsUponOom(boolean value) { * When enabled, causes tensor allocation information to be included in * the error message when the Run() call fails because the allocator ran * out of memory (OOM). + * * Enabling this option can slow down the Run() call. *
    * @@ -2541,21 +2490,21 @@ public Builder setReportTensorAllocationsUponOom(boolean value) { * @return This builder for chaining. */ public Builder clearReportTensorAllocationsUponOom() { - + bitField0_ = (bitField0_ & ~0x00000020); reportTensorAllocationsUponOom_ = false; onChanged(); return this; } private org.tensorflow.proto.RunOptions.Experimental experimental_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.RunOptions.Experimental, org.tensorflow.proto.RunOptions.Experimental.Builder, org.tensorflow.proto.RunOptions.ExperimentalOrBuilder> experimentalBuilder_; /** * .tensorflow.RunOptions.Experimental experimental = 8; * @return Whether the experimental field is set. */ public boolean hasExperimental() { - return experimentalBuilder_ != null || experimental_ != null; + return ((bitField0_ & 0x00000040) != 0); } /** * .tensorflow.RunOptions.Experimental experimental = 8; @@ -2577,11 +2526,11 @@ public Builder setExperimental(org.tensorflow.proto.RunOptions.Experimental valu throw new NullPointerException(); } experimental_ = value; - onChanged(); } else { experimentalBuilder_.setMessage(value); } - + bitField0_ |= 0x00000040; + onChanged(); return this; } /** @@ -2591,11 +2540,11 @@ public Builder setExperimental( org.tensorflow.proto.RunOptions.Experimental.Builder builderForValue) { if (experimentalBuilder_ == null) { experimental_ = builderForValue.build(); - onChanged(); } else { experimentalBuilder_.setMessage(builderForValue.build()); } - + bitField0_ |= 0x00000040; + onChanged(); return this; } /** @@ -2603,38 +2552,40 @@ public Builder setExperimental( */ public Builder mergeExperimental(org.tensorflow.proto.RunOptions.Experimental value) { if (experimentalBuilder_ == null) { - if (experimental_ != null) { - experimental_ = - org.tensorflow.proto.RunOptions.Experimental.newBuilder(experimental_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000040) != 0) && + experimental_ != null && + experimental_ != org.tensorflow.proto.RunOptions.Experimental.getDefaultInstance()) { + getExperimentalBuilder().mergeFrom(value); } else { experimental_ = value; } - onChanged(); } else { experimentalBuilder_.mergeFrom(value); } - + if (experimental_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } return this; } /** * .tensorflow.RunOptions.Experimental experimental = 8; */ public Builder clearExperimental() { - if (experimentalBuilder_ == null) { - experimental_ = null; - onChanged(); - } else { - experimental_ = null; + bitField0_ = (bitField0_ & ~0x00000040); + experimental_ = null; + if (experimentalBuilder_ != null) { + experimentalBuilder_.dispose(); experimentalBuilder_ = null; } - + onChanged(); return this; } /** * .tensorflow.RunOptions.Experimental experimental = 8; */ public org.tensorflow.proto.RunOptions.Experimental.Builder getExperimentalBuilder() { - + bitField0_ |= 0x00000040; onChanged(); return getExperimentalFieldBuilder().getBuilder(); } @@ -2652,11 +2603,11 @@ public org.tensorflow.proto.RunOptions.ExperimentalOrBuilder getExperimentalOrBu /** * .tensorflow.RunOptions.Experimental experimental = 8; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.RunOptions.Experimental, org.tensorflow.proto.RunOptions.Experimental.Builder, org.tensorflow.proto.RunOptions.ExperimentalOrBuilder> getExperimentalFieldBuilder() { if (experimentalBuilder_ == null) { - experimentalBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + experimentalBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.RunOptions.Experimental, org.tensorflow.proto.RunOptions.Experimental.Builder, org.tensorflow.proto.RunOptions.ExperimentalOrBuilder>( getExperimental(), getParentForChildren(), @@ -2665,18 +2616,6 @@ public org.tensorflow.proto.RunOptions.ExperimentalOrBuilder getExperimentalOrBu } return experimentalBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.RunOptions) } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunOptionsOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunOptionsOrBuilder.java index f134e6197a6..7127867def4 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunOptionsOrBuilder.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunOptionsOrBuilder.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/protobuf/config.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -86,6 +88,7 @@ public interface RunOptionsOrBuilder extends * When enabled, causes tensor allocation information to be included in * the error message when the Run() call fails because the allocator ran * out of memory (OOM). + * * Enabling this option can slow down the Run() call. *
    * diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaveSliceInfoDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaveSliceInfoDef.java index 5290dd772a9..94488b4eaab 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaveSliceInfoDef.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaveSliceInfoDef.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/framework/variable.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -7,12 +9,21 @@ * Protobuf type {@code tensorflow.SaveSliceInfoDef} */ public final class SaveSliceInfoDef extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.SaveSliceInfoDef) SaveSliceInfoDefOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + SaveSliceInfoDef.class.getName()); + } // Use SaveSliceInfoDef.newBuilder() to construct. - private SaveSliceInfoDef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private SaveSliceInfoDef(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private SaveSliceInfoDef() { @@ -22,25 +33,13 @@ private SaveSliceInfoDef() { varShape_ = emptyLongList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SaveSliceInfoDef(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.VariableProtos.internal_static_tensorflow_SaveSliceInfoDef_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.VariableProtos.internal_static_tensorflow_SaveSliceInfoDef_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -48,7 +47,8 @@ protected java.lang.Object newInstance( } public static final int FULL_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object fullName_; + @SuppressWarnings("serial") + private volatile java.lang.Object fullName_ = ""; /** *
        * Name of the full variable of which this is a slice.
    @@ -94,7 +94,9 @@ public java.lang.String getFullName() {
       }
     
       public static final int FULL_SHAPE_FIELD_NUMBER = 2;
    -  private com.google.protobuf.Internal.LongList fullShape_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.Internal.LongList fullShape_ =
    +      emptyLongList();
       /**
        * 
        * Shape of the full variable.
    @@ -134,7 +136,9 @@ public long getFullShape(int index) {
       private int fullShapeMemoizedSerializedSize = -1;
     
       public static final int VAR_OFFSET_FIELD_NUMBER = 3;
    -  private com.google.protobuf.Internal.LongList varOffset_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.Internal.LongList varOffset_ =
    +      emptyLongList();
       /**
        * 
        * Offset of this variable into the full variable.
    @@ -174,7 +178,9 @@ public long getVarOffset(int index) {
       private int varOffsetMemoizedSerializedSize = -1;
     
       public static final int VAR_SHAPE_FIELD_NUMBER = 4;
    -  private com.google.protobuf.Internal.LongList varShape_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.Internal.LongList varShape_ =
    +      emptyLongList();
       /**
        * 
        * Shape of this variable.
    @@ -228,8 +234,8 @@ public final boolean isInitialized() {
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
         getSerializedSize();
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fullName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(fullName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, fullName_);
         }
         if (getFullShapeList().size() > 0) {
           output.writeUInt32NoTag(18);
    @@ -261,8 +267,8 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, fullName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(fullName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, fullName_);
         }
         {
           int dataSize = 0;
    @@ -393,39 +399,41 @@ public static org.tensorflow.proto.SaveSliceInfoDef parseFrom(
       }
       public static org.tensorflow.proto.SaveSliceInfoDef parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.SaveSliceInfoDef parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.SaveSliceInfoDef parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.SaveSliceInfoDef parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.SaveSliceInfoDef parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.SaveSliceInfoDef parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -445,7 +453,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -453,7 +461,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.SaveSliceInfoDef}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.SaveSliceInfoDef)
           org.tensorflow.proto.SaveSliceInfoDefOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -462,7 +470,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.VariableProtos.internal_static_tensorflow_SaveSliceInfoDef_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -475,21 +483,18 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           fullName_ = "";
    -
           fullShape_ = emptyLongList();
    -      bitField0_ = (bitField0_ & ~0x00000001);
           varOffset_ = emptyLongList();
    -      bitField0_ = (bitField0_ & ~0x00000002);
           varShape_ = emptyLongList();
    -      bitField0_ = (bitField0_ & ~0x00000004);
           return this;
         }
     
    @@ -516,59 +521,30 @@ public org.tensorflow.proto.SaveSliceInfoDef build() {
         @java.lang.Override
         public org.tensorflow.proto.SaveSliceInfoDef buildPartial() {
           org.tensorflow.proto.SaveSliceInfoDef result = new org.tensorflow.proto.SaveSliceInfoDef(this);
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartial0(org.tensorflow.proto.SaveSliceInfoDef result) {
           int from_bitField0_ = bitField0_;
    -      result.fullName_ = fullName_;
    -      if (((bitField0_ & 0x00000001) != 0)) {
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.fullName_ = fullName_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
             fullShape_.makeImmutable();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        result.fullShape_ = fullShape_;
           }
    -      result.fullShape_ = fullShape_;
    -      if (((bitField0_ & 0x00000002) != 0)) {
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
             varOffset_.makeImmutable();
    -        bitField0_ = (bitField0_ & ~0x00000002);
    +        result.varOffset_ = varOffset_;
           }
    -      result.varOffset_ = varOffset_;
    -      if (((bitField0_ & 0x00000004) != 0)) {
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
             varShape_.makeImmutable();
    -        bitField0_ = (bitField0_ & ~0x00000004);
    +        result.varShape_ = varShape_;
           }
    -      result.varShape_ = varShape_;
    -      onBuilt();
    -      return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    -    }
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.SaveSliceInfoDef) {
    @@ -583,12 +559,14 @@ public Builder mergeFrom(org.tensorflow.proto.SaveSliceInfoDef other) {
           if (other == org.tensorflow.proto.SaveSliceInfoDef.getDefaultInstance()) return this;
           if (!other.getFullName().isEmpty()) {
             fullName_ = other.fullName_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (!other.fullShape_.isEmpty()) {
             if (fullShape_.isEmpty()) {
               fullShape_ = other.fullShape_;
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          fullShape_.makeImmutable();
    +          bitField0_ |= 0x00000002;
             } else {
               ensureFullShapeIsMutable();
               fullShape_.addAll(other.fullShape_);
    @@ -598,7 +576,8 @@ public Builder mergeFrom(org.tensorflow.proto.SaveSliceInfoDef other) {
           if (!other.varOffset_.isEmpty()) {
             if (varOffset_.isEmpty()) {
               varOffset_ = other.varOffset_;
    -          bitField0_ = (bitField0_ & ~0x00000002);
    +          varOffset_.makeImmutable();
    +          bitField0_ |= 0x00000004;
             } else {
               ensureVarOffsetIsMutable();
               varOffset_.addAll(other.varOffset_);
    @@ -608,7 +587,8 @@ public Builder mergeFrom(org.tensorflow.proto.SaveSliceInfoDef other) {
           if (!other.varShape_.isEmpty()) {
             if (varShape_.isEmpty()) {
               varShape_ = other.varShape_;
    -          bitField0_ = (bitField0_ & ~0x00000004);
    +          varShape_.makeImmutable();
    +          bitField0_ |= 0x00000008;
             } else {
               ensureVarShapeIsMutable();
               varShape_.addAll(other.varShape_);
    @@ -643,7 +623,7 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   fullName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 16: {
    @@ -764,11 +744,9 @@ public java.lang.String getFullName() {
          */
         public Builder setFullName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           fullName_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -781,8 +759,8 @@ public Builder setFullName(
          * @return This builder for chaining.
          */
         public Builder clearFullName() {
    -      
           fullName_ = getDefaultInstance().getFullName();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -797,22 +775,20 @@ public Builder clearFullName() {
          */
         public Builder setFullNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           fullName_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
     
         private com.google.protobuf.Internal.LongList fullShape_ = emptyLongList();
         private void ensureFullShapeIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    -        fullShape_ = mutableCopy(fullShape_);
    -        bitField0_ |= 0x00000001;
    -       }
    +      if (!fullShape_.isModifiable()) {
    +        fullShape_ = makeMutableCopy(fullShape_);
    +      }
    +      bitField0_ |= 0x00000002;
         }
         /**
          * 
    @@ -824,8 +800,8 @@ private void ensureFullShapeIsMutable() {
          */
         public java.util.List
             getFullShapeList() {
    -      return ((bitField0_ & 0x00000001) != 0) ?
    -               java.util.Collections.unmodifiableList(fullShape_) : fullShape_;
    +      fullShape_.makeImmutable();
    +      return fullShape_;
         }
         /**
          * 
    @@ -862,8 +838,10 @@ public long getFullShape(int index) {
          */
         public Builder setFullShape(
             int index, long value) {
    +
           ensureFullShapeIsMutable();
           fullShape_.setLong(index, value);
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -877,8 +855,10 @@ public Builder setFullShape(
          * @return This builder for chaining.
          */
         public Builder addFullShape(long value) {
    +
           ensureFullShapeIsMutable();
           fullShape_.addLong(value);
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -896,6 +876,7 @@ public Builder addAllFullShape(
           ensureFullShapeIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, fullShape_);
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -909,17 +890,17 @@ public Builder addAllFullShape(
          */
         public Builder clearFullShape() {
           fullShape_ = emptyLongList();
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      bitField0_ = (bitField0_ & ~0x00000002);
           onChanged();
           return this;
         }
     
         private com.google.protobuf.Internal.LongList varOffset_ = emptyLongList();
         private void ensureVarOffsetIsMutable() {
    -      if (!((bitField0_ & 0x00000002) != 0)) {
    -        varOffset_ = mutableCopy(varOffset_);
    -        bitField0_ |= 0x00000002;
    -       }
    +      if (!varOffset_.isModifiable()) {
    +        varOffset_ = makeMutableCopy(varOffset_);
    +      }
    +      bitField0_ |= 0x00000004;
         }
         /**
          * 
    @@ -931,8 +912,8 @@ private void ensureVarOffsetIsMutable() {
          */
         public java.util.List
             getVarOffsetList() {
    -      return ((bitField0_ & 0x00000002) != 0) ?
    -               java.util.Collections.unmodifiableList(varOffset_) : varOffset_;
    +      varOffset_.makeImmutable();
    +      return varOffset_;
         }
         /**
          * 
    @@ -969,8 +950,10 @@ public long getVarOffset(int index) {
          */
         public Builder setVarOffset(
             int index, long value) {
    +
           ensureVarOffsetIsMutable();
           varOffset_.setLong(index, value);
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -984,8 +967,10 @@ public Builder setVarOffset(
          * @return This builder for chaining.
          */
         public Builder addVarOffset(long value) {
    +
           ensureVarOffsetIsMutable();
           varOffset_.addLong(value);
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -1003,6 +988,7 @@ public Builder addAllVarOffset(
           ensureVarOffsetIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, varOffset_);
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -1016,17 +1002,17 @@ public Builder addAllVarOffset(
          */
         public Builder clearVarOffset() {
           varOffset_ = emptyLongList();
    -      bitField0_ = (bitField0_ & ~0x00000002);
    +      bitField0_ = (bitField0_ & ~0x00000004);
           onChanged();
           return this;
         }
     
         private com.google.protobuf.Internal.LongList varShape_ = emptyLongList();
         private void ensureVarShapeIsMutable() {
    -      if (!((bitField0_ & 0x00000004) != 0)) {
    -        varShape_ = mutableCopy(varShape_);
    -        bitField0_ |= 0x00000004;
    -       }
    +      if (!varShape_.isModifiable()) {
    +        varShape_ = makeMutableCopy(varShape_);
    +      }
    +      bitField0_ |= 0x00000008;
         }
         /**
          * 
    @@ -1038,8 +1024,8 @@ private void ensureVarShapeIsMutable() {
          */
         public java.util.List
             getVarShapeList() {
    -      return ((bitField0_ & 0x00000004) != 0) ?
    -               java.util.Collections.unmodifiableList(varShape_) : varShape_;
    +      varShape_.makeImmutable();
    +      return varShape_;
         }
         /**
          * 
    @@ -1076,8 +1062,10 @@ public long getVarShape(int index) {
          */
         public Builder setVarShape(
             int index, long value) {
    +
           ensureVarShapeIsMutable();
           varShape_.setLong(index, value);
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -1091,8 +1079,10 @@ public Builder setVarShape(
          * @return This builder for chaining.
          */
         public Builder addVarShape(long value) {
    +
           ensureVarShapeIsMutable();
           varShape_.addLong(value);
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -1110,6 +1100,7 @@ public Builder addAllVarShape(
           ensureVarShapeIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, varShape_);
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -1123,22 +1114,10 @@ public Builder addAllVarShape(
          */
         public Builder clearVarShape() {
           varShape_ = emptyLongList();
    -      bitField0_ = (bitField0_ & ~0x00000004);
    +      bitField0_ = (bitField0_ & ~0x00000008);
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.SaveSliceInfoDef)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaveSliceInfoDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaveSliceInfoDefOrBuilder.java
    index 9ae06d9794f..b4cb42c9a44 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaveSliceInfoDefOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaveSliceInfoDefOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/variable.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedModel.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedModel.java
    index f10d6473dd8..ff3c386eb60 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedModel.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedModel.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/saved_model.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -12,37 +14,34 @@
      * Protobuf type {@code tensorflow.SavedModel}
      */
     public final class SavedModel extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.SavedModel)
         SavedModelOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      SavedModel.class.getName());
    +  }
       // Use SavedModel.newBuilder() to construct.
    -  private SavedModel(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private SavedModel(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private SavedModel() {
         metaGraphs_ = java.util.Collections.emptyList();
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new SavedModel();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.SavedModelProtos.internal_static_tensorflow_SavedModel_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.SavedModelProtos.internal_static_tensorflow_SavedModel_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -50,7 +49,7 @@ protected java.lang.Object newInstance(
       }
     
       public static final int SAVED_MODEL_SCHEMA_VERSION_FIELD_NUMBER = 1;
    -  private long savedModelSchemaVersion_;
    +  private long savedModelSchemaVersion_ = 0L;
       /**
        * 
        * The schema version of the SavedModel instance. Used for versioning when
    @@ -67,6 +66,7 @@ public long getSavedModelSchemaVersion() {
       }
     
       public static final int META_GRAPHS_FIELD_NUMBER = 2;
    +  @SuppressWarnings("serial")
       private java.util.List metaGraphs_;
       /**
        * 
    @@ -239,39 +239,41 @@ public static org.tensorflow.proto.SavedModel parseFrom(
       }
       public static org.tensorflow.proto.SavedModel parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.SavedModel parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.SavedModel parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.SavedModel parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.SavedModel parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.SavedModel parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -291,7 +293,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -304,7 +306,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.SavedModel}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.SavedModel)
           org.tensorflow.proto.SavedModelOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -313,7 +315,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.SavedModelProtos.internal_static_tensorflow_SavedModel_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -326,22 +328,22 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           savedModelSchemaVersion_ = 0L;
    -
           if (metaGraphsBuilder_ == null) {
             metaGraphs_ = java.util.Collections.emptyList();
           } else {
             metaGraphs_ = null;
             metaGraphsBuilder_.clear();
           }
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      bitField0_ = (bitField0_ & ~0x00000002);
           return this;
         }
     
    @@ -368,53 +370,31 @@ public org.tensorflow.proto.SavedModel build() {
         @java.lang.Override
         public org.tensorflow.proto.SavedModel buildPartial() {
           org.tensorflow.proto.SavedModel result = new org.tensorflow.proto.SavedModel(this);
    -      int from_bitField0_ = bitField0_;
    -      result.savedModelSchemaVersion_ = savedModelSchemaVersion_;
    +      buildPartialRepeatedFields(result);
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartialRepeatedFields(org.tensorflow.proto.SavedModel result) {
           if (metaGraphsBuilder_ == null) {
    -        if (((bitField0_ & 0x00000001) != 0)) {
    +        if (((bitField0_ & 0x00000002) != 0)) {
               metaGraphs_ = java.util.Collections.unmodifiableList(metaGraphs_);
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ = (bitField0_ & ~0x00000002);
             }
             result.metaGraphs_ = metaGraphs_;
           } else {
             result.metaGraphs_ = metaGraphsBuilder_.build();
           }
    -      onBuilt();
    -      return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.SavedModel result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.savedModelSchemaVersion_ = savedModelSchemaVersion_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.SavedModel) {
    @@ -434,7 +414,7 @@ public Builder mergeFrom(org.tensorflow.proto.SavedModel other) {
             if (!other.metaGraphs_.isEmpty()) {
               if (metaGraphs_.isEmpty()) {
                 metaGraphs_ = other.metaGraphs_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000002);
               } else {
                 ensureMetaGraphsIsMutable();
                 metaGraphs_.addAll(other.metaGraphs_);
    @@ -447,9 +427,9 @@ public Builder mergeFrom(org.tensorflow.proto.SavedModel other) {
                 metaGraphsBuilder_.dispose();
                 metaGraphsBuilder_ = null;
                 metaGraphs_ = other.metaGraphs_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000002);
                 metaGraphsBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getMetaGraphsFieldBuilder() : null;
               } else {
                 metaGraphsBuilder_.addAllMessages(other.metaGraphs_);
    @@ -484,7 +464,7 @@ public Builder mergeFrom(
                   break;
                 case 8: {
                   savedModelSchemaVersion_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 8
                 case 18: {
    @@ -544,8 +524,9 @@ public long getSavedModelSchemaVersion() {
          * @return This builder for chaining.
          */
         public Builder setSavedModelSchemaVersion(long value) {
    -      
    +
           savedModelSchemaVersion_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -560,7 +541,7 @@ public Builder setSavedModelSchemaVersion(long value) {
          * @return This builder for chaining.
          */
         public Builder clearSavedModelSchemaVersion() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000001);
           savedModelSchemaVersion_ = 0L;
           onChanged();
           return this;
    @@ -569,13 +550,13 @@ public Builder clearSavedModelSchemaVersion() {
         private java.util.List metaGraphs_ =
           java.util.Collections.emptyList();
         private void ensureMetaGraphsIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    +      if (!((bitField0_ & 0x00000002) != 0)) {
             metaGraphs_ = new java.util.ArrayList(metaGraphs_);
    -        bitField0_ |= 0x00000001;
    +        bitField0_ |= 0x00000002;
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.MetaGraphDef, org.tensorflow.proto.MetaGraphDef.Builder, org.tensorflow.proto.MetaGraphDefOrBuilder> metaGraphsBuilder_;
     
         /**
    @@ -765,7 +746,7 @@ public Builder addAllMetaGraphs(
         public Builder clearMetaGraphs() {
           if (metaGraphsBuilder_ == null) {
             metaGraphs_ = java.util.Collections.emptyList();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        bitField0_ = (bitField0_ & ~0x00000002);
             onChanged();
           } else {
             metaGraphsBuilder_.clear();
    @@ -863,32 +844,20 @@ public org.tensorflow.proto.MetaGraphDef.Builder addMetaGraphsBuilder(
              getMetaGraphsBuilderList() {
           return getMetaGraphsFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.MetaGraphDef, org.tensorflow.proto.MetaGraphDef.Builder, org.tensorflow.proto.MetaGraphDefOrBuilder> 
             getMetaGraphsFieldBuilder() {
           if (metaGraphsBuilder_ == null) {
    -        metaGraphsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        metaGraphsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.MetaGraphDef, org.tensorflow.proto.MetaGraphDef.Builder, org.tensorflow.proto.MetaGraphDefOrBuilder>(
                     metaGraphs_,
    -                ((bitField0_ & 0x00000001) != 0),
    +                ((bitField0_ & 0x00000002) != 0),
                     getParentForChildren(),
                     isClean());
             metaGraphs_ = null;
           }
           return metaGraphsBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.SavedModel)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedModelOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedModelOrBuilder.java
    index d2168822f0a..eb43e5ed042 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedModelOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedModelOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/saved_model.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedModelProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedModelProtos.java
    index 1ae80350568..8ccc28afce4 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedModelProtos.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedModelProtos.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/saved_model.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class SavedModelProtos {
       private SavedModelProtos() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      SavedModelProtos.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,7 +28,7 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_SavedModel_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_SavedModel_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -46,9 +57,10 @@ public static void registerAllExtensions(
         internal_static_tensorflow_SavedModel_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_SavedModel_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_SavedModel_descriptor,
             new java.lang.String[] { "SavedModelSchemaVersion", "MetaGraphs", });
    +    descriptor.resolveAllFeaturesImmutable();
         org.tensorflow.proto.MetaGraphProtos.getDescriptor();
       }
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedObjectGraphOuterClass.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedObjectGraphOuterClass.java
    index 987f5a198db..b0a72357785 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedObjectGraphOuterClass.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedObjectGraphOuterClass.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/saved_object_graph.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class SavedObjectGraphOuterClass {
       private SavedObjectGraphOuterClass() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      SavedObjectGraphOuterClass.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -21,6 +32,7 @@ public interface SavedObjectGraphOrBuilder extends
         /**
          * 
          * Flattened list of objects in the object graph.
    +     *
          * The position of the object in this list indicates its id.
          * Nodes[0] is considered the root node.
          * 
    @@ -32,6 +44,7 @@ public interface SavedObjectGraphOrBuilder extends /** *
          * Flattened list of objects in the object graph.
    +     *
          * The position of the object in this list indicates its id.
          * Nodes[0] is considered the root node.
          * 
    @@ -42,6 +55,7 @@ public interface SavedObjectGraphOrBuilder extends /** *
          * Flattened list of objects in the object graph.
    +     *
          * The position of the object in this list indicates its id.
          * Nodes[0] is considered the root node.
          * 
    @@ -52,6 +66,7 @@ public interface SavedObjectGraphOrBuilder extends /** *
          * Flattened list of objects in the object graph.
    +     *
          * The position of the object in this list indicates its id.
          * Nodes[0] is considered the root node.
          * 
    @@ -63,6 +78,7 @@ public interface SavedObjectGraphOrBuilder extends /** *
          * Flattened list of objects in the object graph.
    +     *
          * The position of the object in this list indicates its id.
          * Nodes[0] is considered the root node.
          * 
    @@ -115,7 +131,6 @@ boolean containsConcreteFunctions( * * map<string, .tensorflow.SavedConcreteFunction> concrete_functions = 2; */ - /* nullable */ org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction getConcreteFunctionsOrDefault( java.lang.String key, @@ -129,7 +144,6 @@ org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction getConcret * * map<string, .tensorflow.SavedConcreteFunction> concrete_functions = 2; */ - org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction getConcreteFunctionsOrThrow( java.lang.String key); } @@ -137,30 +151,27 @@ org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction getConcret * Protobuf type {@code tensorflow.SavedObjectGraph} */ public static final class SavedObjectGraph extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.SavedObjectGraph) SavedObjectGraphOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + SavedObjectGraph.class.getName()); + } // Use SavedObjectGraph.newBuilder() to construct. - private SavedObjectGraph(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private SavedObjectGraph(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private SavedObjectGraph() { nodes_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SavedObjectGraph(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.SavedObjectGraphOuterClass.internal_static_tensorflow_SavedObjectGraph_descriptor; @@ -168,7 +179,7 @@ protected java.lang.Object newInstance( @SuppressWarnings({"rawtypes"}) @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 2: @@ -179,7 +190,7 @@ protected com.google.protobuf.MapField internalGetMapField( } } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.SavedObjectGraphOuterClass.internal_static_tensorflow_SavedObjectGraph_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -187,10 +198,12 @@ protected com.google.protobuf.MapField internalGetMapField( } public static final int NODES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List nodes_; /** *
          * Flattened list of objects in the object graph.
    +     *
          * The position of the object in this list indicates its id.
          * Nodes[0] is considered the root node.
          * 
    @@ -204,6 +217,7 @@ public java.util.List * Flattened list of objects in the object graph. + * * The position of the object in this list indicates its id. * Nodes[0] is considered the root node. *
    @@ -218,6 +232,7 @@ public java.util.List * Flattened list of objects in the object graph. + * * The position of the object in this list indicates its id. * Nodes[0] is considered the root node. *
    @@ -231,6 +246,7 @@ public int getNodesCount() { /** *
          * Flattened list of objects in the object graph.
    +     *
          * The position of the object in this list indicates its id.
          * Nodes[0] is considered the root node.
          * 
    @@ -244,6 +260,7 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject getNodes(int /** *
          * Flattened list of objects in the object graph.
    +     *
          * The position of the object in this list indicates its id.
          * Nodes[0] is considered the root node.
          * 
    @@ -268,6 +285,7 @@ private static final class ConcreteFunctionsDefaultEntryHolder { com.google.protobuf.WireFormat.FieldType.MESSAGE, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction.getDefaultInstance()); } + @SuppressWarnings("serial") private com.google.protobuf.MapField< java.lang.String, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction> concreteFunctions_; private com.google.protobuf.MapField @@ -278,7 +296,6 @@ private static final class ConcreteFunctionsDefaultEntryHolder { } return concreteFunctions_; } - public int getConcreteFunctionsCount() { return internalGetConcreteFunctions().getMap().size(); } @@ -290,7 +307,6 @@ public int getConcreteFunctionsCount() { * * map<string, .tensorflow.SavedConcreteFunction> concrete_functions = 2; */ - @java.lang.Override public boolean containsConcreteFunctions( java.lang.String key) { @@ -314,7 +330,6 @@ public java.util.Mapmap<string, .tensorflow.SavedConcreteFunction> concrete_functions = 2; */ @java.lang.Override - public java.util.Map getConcreteFunctionsMap() { return internalGetConcreteFunctions().getMap(); } @@ -327,10 +342,11 @@ public java.util.Mapmap<string, .tensorflow.SavedConcreteFunction> concrete_functions = 2; */ @java.lang.Override - - public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction getConcreteFunctionsOrDefault( + public /* nullable */ +org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction getConcreteFunctionsOrDefault( java.lang.String key, - org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction defaultValue) { + /* nullable */ +org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetConcreteFunctions().getMap(); @@ -345,7 +361,6 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction get * map<string, .tensorflow.SavedConcreteFunction> concrete_functions = 2; */ @java.lang.Override - public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction getConcreteFunctionsOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } @@ -374,7 +389,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < nodes_.size(); i++) { output.writeMessage(1, nodes_.get(i)); } - com.google.protobuf.GeneratedMessageV3 + com.google.protobuf.GeneratedMessage .serializeStringMapTo( output, internalGetConcreteFunctions(), @@ -480,39 +495,41 @@ public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraph p } public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraph parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraph parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraph parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraph parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraph parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraph parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -532,7 +549,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -540,7 +557,7 @@ protected Builder newBuilderForType( * Protobuf type {@code tensorflow.SavedObjectGraph} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.SavedObjectGraph) org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraphOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -549,7 +566,7 @@ public static final class Builder extends } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 2: @@ -560,7 +577,7 @@ protected com.google.protobuf.MapField internalGetMapField( } } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( int number) { switch (number) { case 2: @@ -571,7 +588,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField( } } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.SavedObjectGraphOuterClass.internal_static_tensorflow_SavedObjectGraph_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -584,13 +601,14 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (nodesBuilder_ == null) { nodes_ = java.util.Collections.emptyList(); } else { @@ -625,7 +643,13 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraph build() @java.lang.Override public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraph buildPartial() { org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraph result = new org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraph(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraph result) { if (nodesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { nodes_ = java.util.Collections.unmodifiableList(nodes_); @@ -635,44 +659,15 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraph buildPar } else { result.nodes_ = nodesBuilder_.build(); } - result.concreteFunctions_ = internalGetConcreteFunctions(); - result.concreteFunctions_.makeImmutable(); - onBuilt(); - return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraph result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.concreteFunctions_ = internalGetConcreteFunctions().build(ConcreteFunctionsDefaultEntryHolder.defaultEntry); + } } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraph) { @@ -704,7 +699,7 @@ public Builder mergeFrom(org.tensorflow.proto.SavedObjectGraphOuterClass.SavedOb nodes_ = other.nodes_; bitField0_ = (bitField0_ & ~0x00000001); nodesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getNodesFieldBuilder() : null; } else { nodesBuilder_.addAllMessages(other.nodes_); @@ -713,6 +708,7 @@ public Builder mergeFrom(org.tensorflow.proto.SavedObjectGraphOuterClass.SavedOb } internalGetMutableConcreteFunctions().mergeFrom( other.internalGetConcreteFunctions()); + bitField0_ |= 0x00000002; this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -756,8 +752,9 @@ public Builder mergeFrom( com.google.protobuf.MapEntry concreteFunctions__ = input.readMessage( ConcreteFunctionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableConcreteFunctions().getMutableMap().put( + internalGetMutableConcreteFunctions().ensureBuilderMap().put( concreteFunctions__.getKey(), concreteFunctions__.getValue()); + bitField0_ |= 0x00000002; break; } // case 18 default: { @@ -786,12 +783,13 @@ private void ensureNodesIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectOrBuilder> nodesBuilder_; /** *
            * Flattened list of objects in the object graph.
    +       *
            * The position of the object in this list indicates its id.
            * Nodes[0] is considered the root node.
            * 
    @@ -808,6 +806,7 @@ public java.util.List * Flattened list of objects in the object graph. + * * The position of the object in this list indicates its id. * Nodes[0] is considered the root node. *
    @@ -824,6 +823,7 @@ public int getNodesCount() { /** *
            * Flattened list of objects in the object graph.
    +       *
            * The position of the object in this list indicates its id.
            * Nodes[0] is considered the root node.
            * 
    @@ -840,6 +840,7 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject getNodes(int /** *
            * Flattened list of objects in the object graph.
    +       *
            * The position of the object in this list indicates its id.
            * Nodes[0] is considered the root node.
            * 
    @@ -863,6 +864,7 @@ public Builder setNodes( /** *
            * Flattened list of objects in the object graph.
    +       *
            * The position of the object in this list indicates its id.
            * Nodes[0] is considered the root node.
            * 
    @@ -883,6 +885,7 @@ public Builder setNodes( /** *
            * Flattened list of objects in the object graph.
    +       *
            * The position of the object in this list indicates its id.
            * Nodes[0] is considered the root node.
            * 
    @@ -905,6 +908,7 @@ public Builder addNodes(org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObj /** *
            * Flattened list of objects in the object graph.
    +       *
            * The position of the object in this list indicates its id.
            * Nodes[0] is considered the root node.
            * 
    @@ -928,6 +932,7 @@ public Builder addNodes( /** *
            * Flattened list of objects in the object graph.
    +       *
            * The position of the object in this list indicates its id.
            * Nodes[0] is considered the root node.
            * 
    @@ -948,6 +953,7 @@ public Builder addNodes( /** *
            * Flattened list of objects in the object graph.
    +       *
            * The position of the object in this list indicates its id.
            * Nodes[0] is considered the root node.
            * 
    @@ -968,6 +974,7 @@ public Builder addNodes( /** *
            * Flattened list of objects in the object graph.
    +       *
            * The position of the object in this list indicates its id.
            * Nodes[0] is considered the root node.
            * 
    @@ -989,6 +996,7 @@ public Builder addAllNodes( /** *
            * Flattened list of objects in the object graph.
    +       *
            * The position of the object in this list indicates its id.
            * Nodes[0] is considered the root node.
            * 
    @@ -1008,6 +1016,7 @@ public Builder clearNodes() { /** *
            * Flattened list of objects in the object graph.
    +       *
            * The position of the object in this list indicates its id.
            * Nodes[0] is considered the root node.
            * 
    @@ -1027,6 +1036,7 @@ public Builder removeNodes(int index) { /** *
            * Flattened list of objects in the object graph.
    +       *
            * The position of the object in this list indicates its id.
            * Nodes[0] is considered the root node.
            * 
    @@ -1040,6 +1050,7 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject.Builder getNo /** *
            * Flattened list of objects in the object graph.
    +       *
            * The position of the object in this list indicates its id.
            * Nodes[0] is considered the root node.
            * 
    @@ -1056,6 +1067,7 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectOrBuilder getN /** *
            * Flattened list of objects in the object graph.
    +       *
            * The position of the object in this list indicates its id.
            * Nodes[0] is considered the root node.
            * 
    @@ -1073,6 +1085,7 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectOrBuilder getN /** *
            * Flattened list of objects in the object graph.
    +       *
            * The position of the object in this list indicates its id.
            * Nodes[0] is considered the root node.
            * 
    @@ -1086,6 +1099,7 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject.Builder addNo /** *
            * Flattened list of objects in the object graph.
    +       *
            * The position of the object in this list indicates its id.
            * Nodes[0] is considered the root node.
            * 
    @@ -1100,6 +1114,7 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject.Builder addNo /** *
            * Flattened list of objects in the object graph.
    +       *
            * The position of the object in this list indicates its id.
            * Nodes[0] is considered the root node.
            * 
    @@ -1110,11 +1125,11 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject.Builder addNo getNodesBuilderList() { return getNodesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectOrBuilder> getNodesFieldBuilder() { if (nodesBuilder_ == null) { - nodesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + nodesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectOrBuilder>( nodes_, ((bitField0_ & 0x00000001) != 0), @@ -1125,31 +1140,40 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject.Builder addNo return nodesBuilder_; } - private com.google.protobuf.MapField< - java.lang.String, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction> concreteFunctions_; - private com.google.protobuf.MapField - internalGetConcreteFunctions() { + private static final class ConcreteFunctionsConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction build(org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunctionOrBuilder val) { + if (val instanceof org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction) { return (org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction) val; } + return ((org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return ConcreteFunctionsDefaultEntryHolder.defaultEntry; + } + }; + private static final ConcreteFunctionsConverter concreteFunctionsConverter = new ConcreteFunctionsConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunctionOrBuilder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction.Builder> concreteFunctions_; + private com.google.protobuf.MapFieldBuilder + internalGetConcreteFunctions() { if (concreteFunctions_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ConcreteFunctionsDefaultEntryHolder.defaultEntry); + return new com.google.protobuf.MapFieldBuilder<>(concreteFunctionsConverter); } return concreteFunctions_; } - private com.google.protobuf.MapField - internalGetMutableConcreteFunctions() { - onChanged();; + private com.google.protobuf.MapFieldBuilder + internalGetMutableConcreteFunctions() { if (concreteFunctions_ == null) { - concreteFunctions_ = com.google.protobuf.MapField.newMapField( - ConcreteFunctionsDefaultEntryHolder.defaultEntry); - } - if (!concreteFunctions_.isMutable()) { - concreteFunctions_ = concreteFunctions_.copy(); + concreteFunctions_ = new com.google.protobuf.MapFieldBuilder<>(concreteFunctionsConverter); } + bitField0_ |= 0x00000002; + onChanged(); return concreteFunctions_; } - public int getConcreteFunctionsCount() { - return internalGetConcreteFunctions().getMap().size(); + return internalGetConcreteFunctions().ensureBuilderMap().size(); } /** *
    @@ -1159,12 +1183,11 @@ public int getConcreteFunctionsCount() {
            *
            * map<string, .tensorflow.SavedConcreteFunction> concrete_functions = 2;
            */
    -
           @java.lang.Override
           public boolean containsConcreteFunctions(
               java.lang.String key) {
             if (key == null) { throw new NullPointerException("map key"); }
    -        return internalGetConcreteFunctions().getMap().containsKey(key);
    +        return internalGetConcreteFunctions().ensureBuilderMap().containsKey(key);
           }
           /**
            * Use {@link #getConcreteFunctionsMap()} instead.
    @@ -1183,9 +1206,8 @@ public java.util.Mapmap<string, .tensorflow.SavedConcreteFunction> concrete_functions = 2;
            */
           @java.lang.Override
    -
           public java.util.Map getConcreteFunctionsMap() {
    -        return internalGetConcreteFunctions().getMap();
    +        return internalGetConcreteFunctions().getImmutableMap();
           }
           /**
            * 
    @@ -1196,14 +1218,14 @@ public java.util.Mapmap<string, .tensorflow.SavedConcreteFunction> concrete_functions = 2;
            */
           @java.lang.Override
    -
    -      public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction getConcreteFunctionsOrDefault(
    +      public /* nullable */
    +org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction getConcreteFunctionsOrDefault(
               java.lang.String key,
    -          org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction defaultValue) {
    +          /* nullable */
    +org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction defaultValue) {
             if (key == null) { throw new NullPointerException("map key"); }
    -        java.util.Map map =
    -            internalGetConcreteFunctions().getMap();
    -        return map.containsKey(key) ? map.get(key) : defaultValue;
    +        java.util.Map map = internalGetMutableConcreteFunctions().ensureBuilderMap();
    +        return map.containsKey(key) ? concreteFunctionsConverter.build(map.get(key)) : defaultValue;
           }
           /**
            * 
    @@ -1214,21 +1236,18 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction get
            * map<string, .tensorflow.SavedConcreteFunction> concrete_functions = 2;
            */
           @java.lang.Override
    -
           public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction getConcreteFunctionsOrThrow(
               java.lang.String key) {
             if (key == null) { throw new NullPointerException("map key"); }
    -        java.util.Map map =
    -            internalGetConcreteFunctions().getMap();
    +        java.util.Map map = internalGetMutableConcreteFunctions().ensureBuilderMap();
             if (!map.containsKey(key)) {
               throw new java.lang.IllegalArgumentException();
             }
    -        return map.get(key);
    +        return concreteFunctionsConverter.build(map.get(key));
           }
    -
           public Builder clearConcreteFunctions() {
    -        internalGetMutableConcreteFunctions().getMutableMap()
    -            .clear();
    +        bitField0_ = (bitField0_ & ~0x00000002);
    +        internalGetMutableConcreteFunctions().clear();
             return this;
           }
           /**
    @@ -1239,11 +1258,10 @@ public Builder clearConcreteFunctions() {
            *
            * map<string, .tensorflow.SavedConcreteFunction> concrete_functions = 2;
            */
    -
           public Builder removeConcreteFunctions(
               java.lang.String key) {
             if (key == null) { throw new NullPointerException("map key"); }
    -        internalGetMutableConcreteFunctions().getMutableMap()
    +        internalGetMutableConcreteFunctions().ensureBuilderMap()
                 .remove(key);
             return this;
           }
    @@ -1252,8 +1270,9 @@ public Builder removeConcreteFunctions(
            */
           @java.lang.Deprecated
           public java.util.Map
    -      getMutableConcreteFunctions() {
    -        return internalGetMutableConcreteFunctions().getMutableMap();
    +          getMutableConcreteFunctions() {
    +        bitField0_ |= 0x00000002;
    +        return internalGetMutableConcreteFunctions().ensureMessageMap();
           }
           /**
            * 
    @@ -1267,12 +1286,10 @@ public Builder putConcreteFunctions(
               java.lang.String key,
               org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction value) {
             if (key == null) { throw new NullPointerException("map key"); }
    -        if (value == null) {
    -  throw new NullPointerException("map value");
    -}
    -
    -        internalGetMutableConcreteFunctions().getMutableMap()
    +        if (value == null) { throw new NullPointerException("map value"); }
    +        internalGetMutableConcreteFunctions().ensureBuilderMap()
                 .put(key, value);
    +        bitField0_ |= 0x00000002;
             return this;
           }
           /**
    @@ -1283,26 +1300,41 @@ public Builder putConcreteFunctions(
            *
            * map<string, .tensorflow.SavedConcreteFunction> concrete_functions = 2;
            */
    -
           public Builder putAllConcreteFunctions(
               java.util.Map values) {
    -        internalGetMutableConcreteFunctions().getMutableMap()
    +        for (java.util.Map.Entry e : values.entrySet()) {
    +          if (e.getKey() == null || e.getValue() == null) {
    +            throw new NullPointerException();
    +          }
    +        }
    +        internalGetMutableConcreteFunctions().ensureBuilderMap()
                 .putAll(values);
    +        bitField0_ |= 0x00000002;
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    +      /**
    +       * 
    +       * Information about captures and output structures in concrete functions.
    +       * Referenced from SavedBareConcreteFunction and SavedFunction.
    +       * 
    + * + * map<string, .tensorflow.SavedConcreteFunction> concrete_functions = 2; + */ + public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction.Builder putConcreteFunctionsBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableConcreteFunctions().ensureBuilderMap(); + org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunctionOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction) { + entry = ((org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction) entry).toBuilder(); + builderMap.put(key, entry); + } + return (org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction.Builder) entry; } - // @@protoc_insertion_point(builder_scope:tensorflow.SavedObjectGraph) } @@ -1362,6 +1394,7 @@ public interface SavedObjectOrBuilder extends *
          * Objects which this object depends on: named edges in the dependency
          * graph.
    +     *
          * Note: All kinds of SavedObject may have children, except
          * "constant" and "captured_tensor".
          * 
    @@ -1374,6 +1407,7 @@ public interface SavedObjectOrBuilder extends *
          * Objects which this object depends on: named edges in the dependency
          * graph.
    +     *
          * Note: All kinds of SavedObject may have children, except
          * "constant" and "captured_tensor".
          * 
    @@ -1385,6 +1419,7 @@ public interface SavedObjectOrBuilder extends *
          * Objects which this object depends on: named edges in the dependency
          * graph.
    +     *
          * Note: All kinds of SavedObject may have children, except
          * "constant" and "captured_tensor".
          * 
    @@ -1396,6 +1431,7 @@ public interface SavedObjectOrBuilder extends *
          * Objects which this object depends on: named edges in the dependency
          * graph.
    +     *
          * Note: All kinds of SavedObject may have children, except
          * "constant" and "captured_tensor".
          * 
    @@ -1408,6 +1444,7 @@ public interface SavedObjectOrBuilder extends *
          * Objects which this object depends on: named edges in the dependency
          * graph.
    +     *
          * Note: All kinds of SavedObject may have children, except
          * "constant" and "captured_tensor".
          * 
    @@ -1476,6 +1513,7 @@ org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.Trackab * Slot variables owned by this object. This describes the three-way * (optimizer, variable, slot variable) relationship; none of the three * depend on the others directly. + * * Note: currently only valid if kind == "user_object". *
    * @@ -1488,6 +1526,7 @@ org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.Trackab * Slot variables owned by this object. This describes the three-way * (optimizer, variable, slot variable) relationship; none of the three * depend on the others directly. + * * Note: currently only valid if kind == "user_object". *
    * @@ -1499,6 +1538,7 @@ org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.Trackab * Slot variables owned by this object. This describes the three-way * (optimizer, variable, slot variable) relationship; none of the three * depend on the others directly. + * * Note: currently only valid if kind == "user_object". *
    * @@ -1510,6 +1550,7 @@ org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.Trackab * Slot variables owned by this object. This describes the three-way * (optimizer, variable, slot variable) relationship; none of the three * depend on the others directly. + * * Note: currently only valid if kind == "user_object". *
    * @@ -1522,6 +1563,7 @@ org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.Trackab * Slot variables owned by this object. This describes the three-way * (optimizer, variable, slot variable) relationship; none of the three * depend on the others directly. + * * Note: currently only valid if kind == "user_object". *
    * @@ -1701,7 +1743,6 @@ boolean containsSaveableObjects( * * map<string, .tensorflow.SaveableObject> saveable_objects = 11; */ - /* nullable */ org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject getSaveableObjectsOrDefault( java.lang.String key, @@ -1717,7 +1758,6 @@ org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject getSaveableObject * * map<string, .tensorflow.SaveableObject> saveable_objects = 11; */ - org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject getSaveableObjectsOrThrow( java.lang.String key); @@ -1798,18 +1838,27 @@ org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject getSaveableObject com.google.protobuf.ByteString getRegisteredSaverBytes(); - public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject.KindCase getKindCase(); + org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject.KindCase getKindCase(); } /** * Protobuf type {@code tensorflow.SavedObject} */ public static final class SavedObject extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.SavedObject) SavedObjectOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + SavedObject.class.getName()); + } // Use SavedObject.newBuilder() to construct. - private SavedObject(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private SavedObject(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private SavedObject() { @@ -1820,18 +1869,6 @@ private SavedObject() { registeredSaver_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SavedObject(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.SavedObjectGraphOuterClass.internal_static_tensorflow_SavedObject_descriptor; @@ -1839,7 +1876,7 @@ protected java.lang.Object newInstance( @SuppressWarnings({"rawtypes"}) @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 11: @@ -1850,14 +1887,16 @@ protected com.google.protobuf.MapField internalGetMapField( } } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.SavedObjectGraphOuterClass.internal_static_tensorflow_SavedObject_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject.class, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject.Builder.class); } + private int bitField0_; private int kindCase_ = 0; + @SuppressWarnings("serial") private java.lang.Object kind_; public enum KindCase implements com.google.protobuf.Internal.EnumLite, @@ -1911,11 +1950,13 @@ public int getNumber() { } public static final int CHILDREN_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List children_; /** *
          * Objects which this object depends on: named edges in the dependency
          * graph.
    +     *
          * Note: All kinds of SavedObject may have children, except
          * "constant" and "captured_tensor".
          * 
    @@ -1930,6 +1971,7 @@ public java.util.List * Objects which this object depends on: named edges in the dependency * graph. + * * Note: All kinds of SavedObject may have children, except * "constant" and "captured_tensor". *
    @@ -1945,6 +1987,7 @@ public java.util.List * Objects which this object depends on: named edges in the dependency * graph. + * * Note: All kinds of SavedObject may have children, except * "constant" and "captured_tensor". *
    @@ -1959,6 +2002,7 @@ public int getChildrenCount() { *
          * Objects which this object depends on: named edges in the dependency
          * graph.
    +     *
          * Note: All kinds of SavedObject may have children, except
          * "constant" and "captured_tensor".
          * 
    @@ -1973,6 +2017,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph. *
          * Objects which this object depends on: named edges in the dependency
          * graph.
    +     *
          * Note: All kinds of SavedObject may have children, except
          * "constant" and "captured_tensor".
          * 
    @@ -1986,6 +2031,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph. } public static final int DEPENDENCIES_FIELD_NUMBER = 15; + @SuppressWarnings("serial") private java.util.List dependencies_; /** *
    @@ -2056,12 +2102,14 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.
         }
     
         public static final int SLOT_VARIABLES_FIELD_NUMBER = 3;
    +    @SuppressWarnings("serial")
         private java.util.List slotVariables_;
         /**
          * 
          * Slot variables owned by this object. This describes the three-way
          * (optimizer, variable, slot variable) relationship; none of the three
          * depend on the others directly.
    +     *
          * Note: currently only valid if kind == "user_object".
          * 
    * @@ -2076,6 +2124,7 @@ public java.util.List * @@ -2091,6 +2140,7 @@ public java.util.List * @@ -2105,6 +2155,7 @@ public int getSlotVariablesCount() { * Slot variables owned by this object. This describes the three-way * (optimizer, variable, slot variable) relationship; none of the three * depend on the others directly. + * * Note: currently only valid if kind == "user_object". *
    * @@ -2119,6 +2170,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph. * Slot variables owned by this object. This describes the three-way * (optimizer, variable, slot variable) relationship; none of the three * depend on the others directly. + * * Note: currently only valid if kind == "user_object". *
    * @@ -2390,6 +2442,7 @@ private static final class SaveableObjectsDefaultEntryHolder { com.google.protobuf.WireFormat.FieldType.MESSAGE, org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject.getDefaultInstance()); } + @SuppressWarnings("serial") private com.google.protobuf.MapField< java.lang.String, org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject> saveableObjects_; private com.google.protobuf.MapField @@ -2400,7 +2453,6 @@ private static final class SaveableObjectsDefaultEntryHolder { } return saveableObjects_; } - public int getSaveableObjectsCount() { return internalGetSaveableObjects().getMap().size(); } @@ -2414,7 +2466,6 @@ public int getSaveableObjectsCount() { * * map<string, .tensorflow.SaveableObject> saveable_objects = 11; */ - @java.lang.Override public boolean containsSaveableObjects( java.lang.String key) { @@ -2440,7 +2491,6 @@ public java.util.Mapmap<string, .tensorflow.SaveableObject> saveable_objects = 11; */ @java.lang.Override - public java.util.Map getSaveableObjectsMap() { return internalGetSaveableObjects().getMap(); } @@ -2455,10 +2505,11 @@ public java.util.Mapmap<string, .tensorflow.SaveableObject> saveable_objects = 11; */ @java.lang.Override - - public org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject getSaveableObjectsOrDefault( + public /* nullable */ +org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject getSaveableObjectsOrDefault( java.lang.String key, - org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject defaultValue) { + /* nullable */ +org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetSaveableObjects().getMap(); @@ -2475,7 +2526,6 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject getSaveabl * map<string, .tensorflow.SaveableObject> saveable_objects = 11; */ @java.lang.Override - public org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject getSaveableObjectsOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } @@ -2488,7 +2538,8 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject getSaveabl } public static final int REGISTERED_NAME_FIELD_NUMBER = 13; - private volatile java.lang.Object registeredName_; + @SuppressWarnings("serial") + private volatile java.lang.Object registeredName_ = ""; /** *
          * The name of the registered class of the form "{package}.{class_name}".
    @@ -2549,7 +2600,7 @@ public java.lang.String getRegisteredName() {
          */
         @java.lang.Override
         public boolean hasSerializedUserProto() {
    -      return serializedUserProto_ != null;
    +      return ((bitField0_ & 0x00000001) != 0);
         }
         /**
          * 
    @@ -2576,11 +2627,12 @@ public com.google.protobuf.Any getSerializedUserProto() {
          */
         @java.lang.Override
         public com.google.protobuf.AnyOrBuilder getSerializedUserProtoOrBuilder() {
    -      return getSerializedUserProto();
    +      return serializedUserProto_ == null ? com.google.protobuf.Any.getDefaultInstance() : serializedUserProto_;
         }
     
         public static final int REGISTERED_SAVER_FIELD_NUMBER = 16;
    -    private volatile java.lang.Object registeredSaver_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object registeredSaver_ = "";
         /**
          * 
          * String name of the registered saver. At most one of `saveable_objects` or
    @@ -2668,7 +2720,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           if (kindCase_ == 10) {
             output.writeMessage(10, (org.tensorflow.proto.SavedObjectGraphOuterClass.SavedResource) kind_);
           }
    -      com.google.protobuf.GeneratedMessageV3
    +      com.google.protobuf.GeneratedMessage
             .serializeStringMapTo(
               output,
               internalGetSaveableObjects(),
    @@ -2677,17 +2729,17 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           if (kindCase_ == 12) {
             output.writeMessage(12, (org.tensorflow.proto.SavedObjectGraphOuterClass.CapturedTensor) kind_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(registeredName_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 13, registeredName_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(registeredName_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 13, registeredName_);
           }
    -      if (serializedUserProto_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             output.writeMessage(14, getSerializedUserProto());
           }
           for (int i = 0; i < dependencies_.size(); i++) {
             output.writeMessage(15, dependencies_.get(i));
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(registeredSaver_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 16, registeredSaver_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(registeredSaver_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 16, registeredSaver_);
           }
           getUnknownFields().writeTo(output);
         }
    @@ -2748,10 +2800,10 @@ public int getSerializedSize() {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(12, (org.tensorflow.proto.SavedObjectGraphOuterClass.CapturedTensor) kind_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(registeredName_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, registeredName_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(registeredName_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(13, registeredName_);
           }
    -      if (serializedUserProto_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(14, getSerializedUserProto());
           }
    @@ -2759,8 +2811,8 @@ public int getSerializedSize() {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(15, dependencies_.get(i));
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(registeredSaver_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, registeredSaver_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(registeredSaver_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(16, registeredSaver_);
           }
           size += getUnknownFields().getSerializedSize();
           memoizedSize = size;
    @@ -2941,39 +2993,41 @@ public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject parseF
         }
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -2993,7 +3047,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -3001,7 +3055,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.SavedObject}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.SavedObject)
             org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -3010,7 +3064,7 @@ public static final class Builder extends
           }
     
           @SuppressWarnings({"rawtypes"})
    -      protected com.google.protobuf.MapField internalGetMapField(
    +      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
               int number) {
             switch (number) {
               case 11:
    @@ -3021,7 +3075,7 @@ protected com.google.protobuf.MapField internalGetMapField(
             }
           }
           @SuppressWarnings({"rawtypes"})
    -      protected com.google.protobuf.MapField internalGetMutableMapField(
    +      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
               int number) {
             switch (number) {
               case 11:
    @@ -3032,7 +3086,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField(
             }
           }
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.SavedObjectGraphOuterClass.internal_static_tensorflow_SavedObject_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -3041,17 +3095,27 @@ protected com.google.protobuf.MapField internalGetMutableMapField(
     
           // Construct using org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject.newBuilder()
           private Builder() {
    -
    +        maybeForceBuilderInitialization();
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
    -
    +        maybeForceBuilderInitialization();
    +      }
    +      private void maybeForceBuilderInitialization() {
    +        if (com.google.protobuf.GeneratedMessage
    +                .alwaysUseFieldBuilders) {
    +          getChildrenFieldBuilder();
    +          getDependenciesFieldBuilder();
    +          getSlotVariablesFieldBuilder();
    +          getSerializedUserProtoFieldBuilder();
    +        }
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             if (childrenBuilder_ == null) {
               children_ = java.util.Collections.emptyList();
             } else {
    @@ -3099,15 +3163,12 @@ public Builder clear() {
             }
             internalGetMutableSaveableObjects().clear();
             registeredName_ = "";
    -
    -        if (serializedUserProtoBuilder_ == null) {
    -          serializedUserProto_ = null;
    -        } else {
    -          serializedUserProto_ = null;
    +        serializedUserProto_ = null;
    +        if (serializedUserProtoBuilder_ != null) {
    +          serializedUserProtoBuilder_.dispose();
               serializedUserProtoBuilder_ = null;
             }
             registeredSaver_ = "";
    -
             kindCase_ = 0;
             kind_ = null;
             return this;
    @@ -3136,7 +3197,14 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject build() {
           @java.lang.Override
           public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject buildPartial() {
             org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject result = new org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject(this);
    -        int from_bitField0_ = bitField0_;
    +        buildPartialRepeatedFields(result);
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        buildPartialOneofs(result);
    +        onBuilt();
    +        return result;
    +      }
    +
    +      private void buildPartialRepeatedFields(org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject result) {
             if (childrenBuilder_ == null) {
               if (((bitField0_ & 0x00000001) != 0)) {
                 children_ = java.util.Collections.unmodifiableList(children_);
    @@ -3164,108 +3232,66 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject buildPartial(
             } else {
               result.slotVariables_ = slotVariablesBuilder_.build();
             }
    -        if (kindCase_ == 4) {
    -          if (userObjectBuilder_ == null) {
    -            result.kind_ = kind_;
    -          } else {
    -            result.kind_ = userObjectBuilder_.build();
    -          }
    +      }
    +
    +      private void buildPartial0(org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000800) != 0)) {
    +          result.saveableObjects_ = internalGetSaveableObjects().build(SaveableObjectsDefaultEntryHolder.defaultEntry);
             }
    -        if (kindCase_ == 5) {
    -          if (assetBuilder_ == null) {
    -            result.kind_ = kind_;
    -          } else {
    -            result.kind_ = assetBuilder_.build();
    -          }
    +        if (((from_bitField0_ & 0x00001000) != 0)) {
    +          result.registeredName_ = registeredName_;
             }
    -        if (kindCase_ == 6) {
    -          if (functionBuilder_ == null) {
    -            result.kind_ = kind_;
    -          } else {
    -            result.kind_ = functionBuilder_.build();
    -          }
    +        int to_bitField0_ = 0;
    +        if (((from_bitField0_ & 0x00002000) != 0)) {
    +          result.serializedUserProto_ = serializedUserProtoBuilder_ == null
    +              ? serializedUserProto_
    +              : serializedUserProtoBuilder_.build();
    +          to_bitField0_ |= 0x00000001;
             }
    -        if (kindCase_ == 7) {
    -          if (variableBuilder_ == null) {
    -            result.kind_ = kind_;
    -          } else {
    -            result.kind_ = variableBuilder_.build();
    -          }
    +        if (((from_bitField0_ & 0x00004000) != 0)) {
    +          result.registeredSaver_ = registeredSaver_;
             }
    -        if (kindCase_ == 8) {
    -          if (bareConcreteFunctionBuilder_ == null) {
    -            result.kind_ = kind_;
    -          } else {
    -            result.kind_ = bareConcreteFunctionBuilder_.build();
    -          }
    +        result.bitField0_ |= to_bitField0_;
    +      }
    +
    +      private void buildPartialOneofs(org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject result) {
    +        result.kindCase_ = kindCase_;
    +        result.kind_ = this.kind_;
    +        if (kindCase_ == 4 &&
    +            userObjectBuilder_ != null) {
    +          result.kind_ = userObjectBuilder_.build();
             }
    -        if (kindCase_ == 9) {
    -          if (constantBuilder_ == null) {
    -            result.kind_ = kind_;
    -          } else {
    -            result.kind_ = constantBuilder_.build();
    -          }
    +        if (kindCase_ == 5 &&
    +            assetBuilder_ != null) {
    +          result.kind_ = assetBuilder_.build();
             }
    -        if (kindCase_ == 10) {
    -          if (resourceBuilder_ == null) {
    -            result.kind_ = kind_;
    -          } else {
    -            result.kind_ = resourceBuilder_.build();
    -          }
    +        if (kindCase_ == 6 &&
    +            functionBuilder_ != null) {
    +          result.kind_ = functionBuilder_.build();
             }
    -        if (kindCase_ == 12) {
    -          if (capturedTensorBuilder_ == null) {
    -            result.kind_ = kind_;
    -          } else {
    -            result.kind_ = capturedTensorBuilder_.build();
    -          }
    +        if (kindCase_ == 7 &&
    +            variableBuilder_ != null) {
    +          result.kind_ = variableBuilder_.build();
             }
    -        result.saveableObjects_ = internalGetSaveableObjects();
    -        result.saveableObjects_.makeImmutable();
    -        result.registeredName_ = registeredName_;
    -        if (serializedUserProtoBuilder_ == null) {
    -          result.serializedUserProto_ = serializedUserProto_;
    -        } else {
    -          result.serializedUserProto_ = serializedUserProtoBuilder_.build();
    +        if (kindCase_ == 8 &&
    +            bareConcreteFunctionBuilder_ != null) {
    +          result.kind_ = bareConcreteFunctionBuilder_.build();
    +        }
    +        if (kindCase_ == 9 &&
    +            constantBuilder_ != null) {
    +          result.kind_ = constantBuilder_.build();
    +        }
    +        if (kindCase_ == 10 &&
    +            resourceBuilder_ != null) {
    +          result.kind_ = resourceBuilder_.build();
    +        }
    +        if (kindCase_ == 12 &&
    +            capturedTensorBuilder_ != null) {
    +          result.kind_ = capturedTensorBuilder_.build();
             }
    -        result.registeredSaver_ = registeredSaver_;
    -        result.kindCase_ = kindCase_;
    -        onBuilt();
    -        return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    -      }
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject) {
    @@ -3297,7 +3323,7 @@ public Builder mergeFrom(org.tensorflow.proto.SavedObjectGraphOuterClass.SavedOb
                   children_ = other.children_;
                   bitField0_ = (bitField0_ & ~0x00000001);
                   childrenBuilder_ = 
    -                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                        getChildrenFieldBuilder() : null;
                 } else {
                   childrenBuilder_.addAllMessages(other.children_);
    @@ -3323,7 +3349,7 @@ public Builder mergeFrom(org.tensorflow.proto.SavedObjectGraphOuterClass.SavedOb
                   dependencies_ = other.dependencies_;
                   bitField0_ = (bitField0_ & ~0x00000002);
                   dependenciesBuilder_ = 
    -                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                        getDependenciesFieldBuilder() : null;
                 } else {
                   dependenciesBuilder_.addAllMessages(other.dependencies_);
    @@ -3349,7 +3375,7 @@ public Builder mergeFrom(org.tensorflow.proto.SavedObjectGraphOuterClass.SavedOb
                   slotVariables_ = other.slotVariables_;
                   bitField0_ = (bitField0_ & ~0x00000004);
                   slotVariablesBuilder_ = 
    -                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                        getSlotVariablesFieldBuilder() : null;
                 } else {
                   slotVariablesBuilder_.addAllMessages(other.slotVariables_);
    @@ -3358,8 +3384,10 @@ public Builder mergeFrom(org.tensorflow.proto.SavedObjectGraphOuterClass.SavedOb
             }
             internalGetMutableSaveableObjects().mergeFrom(
                 other.internalGetSaveableObjects());
    +        bitField0_ |= 0x00000800;
             if (!other.getRegisteredName().isEmpty()) {
               registeredName_ = other.registeredName_;
    +          bitField0_ |= 0x00001000;
               onChanged();
             }
             if (other.hasSerializedUserProto()) {
    @@ -3367,6 +3395,7 @@ public Builder mergeFrom(org.tensorflow.proto.SavedObjectGraphOuterClass.SavedOb
             }
             if (!other.getRegisteredSaver().isEmpty()) {
               registeredSaver_ = other.registeredSaver_;
    +          bitField0_ |= 0x00004000;
               onChanged();
             }
             switch (other.getKindCase()) {
    @@ -3511,8 +3540,9 @@ public Builder mergeFrom(
                     com.google.protobuf.MapEntry
                     saveableObjects__ = input.readMessage(
                         SaveableObjectsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
    -                internalGetMutableSaveableObjects().getMutableMap().put(
    +                internalGetMutableSaveableObjects().ensureBuilderMap().put(
                         saveableObjects__.getKey(), saveableObjects__.getValue());
    +                bitField0_ |= 0x00000800;
                     break;
                   } // case 90
                   case 98: {
    @@ -3524,14 +3554,14 @@ public Builder mergeFrom(
                   } // case 98
                   case 106: {
                     registeredName_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00001000;
                     break;
                   } // case 106
                   case 114: {
                     input.readMessage(
                         getSerializedUserProtoFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00002000;
                     break;
                   } // case 114
                   case 122: {
    @@ -3549,7 +3579,7 @@ public Builder mergeFrom(
                   } // case 122
                   case 130: {
                     registeredSaver_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00004000;
                     break;
                   } // case 130
                   default: {
    @@ -3593,13 +3623,14 @@ private void ensureChildrenIsMutable() {
              }
           }
     
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReferenceOrBuilder> childrenBuilder_;
     
           /**
            * 
            * Objects which this object depends on: named edges in the dependency
            * graph.
    +       *
            * Note: All kinds of SavedObject may have children, except
            * "constant" and "captured_tensor".
            * 
    @@ -3617,6 +3648,7 @@ public java.util.List * Objects which this object depends on: named edges in the dependency * graph. + * * Note: All kinds of SavedObject may have children, except * "constant" and "captured_tensor". *
    @@ -3634,6 +3666,7 @@ public int getChildrenCount() { *
            * Objects which this object depends on: named edges in the dependency
            * graph.
    +       *
            * Note: All kinds of SavedObject may have children, except
            * "constant" and "captured_tensor".
            * 
    @@ -3651,6 +3684,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph. *
            * Objects which this object depends on: named edges in the dependency
            * graph.
    +       *
            * Note: All kinds of SavedObject may have children, except
            * "constant" and "captured_tensor".
            * 
    @@ -3675,6 +3709,7 @@ public Builder setChildren( *
            * Objects which this object depends on: named edges in the dependency
            * graph.
    +       *
            * Note: All kinds of SavedObject may have children, except
            * "constant" and "captured_tensor".
            * 
    @@ -3696,6 +3731,7 @@ public Builder setChildren( *
            * Objects which this object depends on: named edges in the dependency
            * graph.
    +       *
            * Note: All kinds of SavedObject may have children, except
            * "constant" and "captured_tensor".
            * 
    @@ -3719,6 +3755,7 @@ public Builder addChildren(org.tensorflow.proto.TrackableObjectGraphOuterClass.T *
            * Objects which this object depends on: named edges in the dependency
            * graph.
    +       *
            * Note: All kinds of SavedObject may have children, except
            * "constant" and "captured_tensor".
            * 
    @@ -3743,6 +3780,7 @@ public Builder addChildren( *
            * Objects which this object depends on: named edges in the dependency
            * graph.
    +       *
            * Note: All kinds of SavedObject may have children, except
            * "constant" and "captured_tensor".
            * 
    @@ -3764,6 +3802,7 @@ public Builder addChildren( *
            * Objects which this object depends on: named edges in the dependency
            * graph.
    +       *
            * Note: All kinds of SavedObject may have children, except
            * "constant" and "captured_tensor".
            * 
    @@ -3785,6 +3824,7 @@ public Builder addChildren( *
            * Objects which this object depends on: named edges in the dependency
            * graph.
    +       *
            * Note: All kinds of SavedObject may have children, except
            * "constant" and "captured_tensor".
            * 
    @@ -3807,6 +3847,7 @@ public Builder addAllChildren( *
            * Objects which this object depends on: named edges in the dependency
            * graph.
    +       *
            * Note: All kinds of SavedObject may have children, except
            * "constant" and "captured_tensor".
            * 
    @@ -3827,6 +3868,7 @@ public Builder clearChildren() { *
            * Objects which this object depends on: named edges in the dependency
            * graph.
    +       *
            * Note: All kinds of SavedObject may have children, except
            * "constant" and "captured_tensor".
            * 
    @@ -3847,6 +3889,7 @@ public Builder removeChildren(int index) { *
            * Objects which this object depends on: named edges in the dependency
            * graph.
    +       *
            * Note: All kinds of SavedObject may have children, except
            * "constant" and "captured_tensor".
            * 
    @@ -3861,6 +3904,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph. *
            * Objects which this object depends on: named edges in the dependency
            * graph.
    +       *
            * Note: All kinds of SavedObject may have children, except
            * "constant" and "captured_tensor".
            * 
    @@ -3878,6 +3922,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph. *
            * Objects which this object depends on: named edges in the dependency
            * graph.
    +       *
            * Note: All kinds of SavedObject may have children, except
            * "constant" and "captured_tensor".
            * 
    @@ -3896,6 +3941,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph. *
            * Objects which this object depends on: named edges in the dependency
            * graph.
    +       *
            * Note: All kinds of SavedObject may have children, except
            * "constant" and "captured_tensor".
            * 
    @@ -3910,6 +3956,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph. *
            * Objects which this object depends on: named edges in the dependency
            * graph.
    +       *
            * Note: All kinds of SavedObject may have children, except
            * "constant" and "captured_tensor".
            * 
    @@ -3925,6 +3972,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph. *
            * Objects which this object depends on: named edges in the dependency
            * graph.
    +       *
            * Note: All kinds of SavedObject may have children, except
            * "constant" and "captured_tensor".
            * 
    @@ -3935,11 +3983,11 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph. getChildrenBuilderList() { return getChildrenFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReferenceOrBuilder> getChildrenFieldBuilder() { if (childrenBuilder_ == null) { - childrenBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + childrenBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReferenceOrBuilder>( children_, ((bitField0_ & 0x00000001) != 0), @@ -3959,7 +4007,7 @@ private void ensureDependenciesIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReferenceOrBuilder> dependenciesBuilder_; /** @@ -4283,11 +4331,11 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph. getDependenciesBuilderList() { return getDependenciesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReferenceOrBuilder> getDependenciesFieldBuilder() { if (dependenciesBuilder_ == null) { - dependenciesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + dependenciesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReferenceOrBuilder>( dependencies_, ((bitField0_ & 0x00000002) != 0), @@ -4307,7 +4355,7 @@ private void ensureSlotVariablesIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReferenceOrBuilder> slotVariablesBuilder_; /** @@ -4315,6 +4363,7 @@ private void ensureSlotVariablesIsMutable() { * Slot variables owned by this object. This describes the three-way * (optimizer, variable, slot variable) relationship; none of the three * depend on the others directly. + * * Note: currently only valid if kind == "user_object". *
    * @@ -4332,6 +4381,7 @@ public java.util.List * @@ -4349,6 +4399,7 @@ public int getSlotVariablesCount() { * Slot variables owned by this object. This describes the three-way * (optimizer, variable, slot variable) relationship; none of the three * depend on the others directly. + * * Note: currently only valid if kind == "user_object". *
    * @@ -4366,6 +4417,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph. * Slot variables owned by this object. This describes the three-way * (optimizer, variable, slot variable) relationship; none of the three * depend on the others directly. + * * Note: currently only valid if kind == "user_object". *
    * @@ -4390,6 +4442,7 @@ public Builder setSlotVariables( * Slot variables owned by this object. This describes the three-way * (optimizer, variable, slot variable) relationship; none of the three * depend on the others directly. + * * Note: currently only valid if kind == "user_object". *
    * @@ -4411,6 +4464,7 @@ public Builder setSlotVariables( * Slot variables owned by this object. This describes the three-way * (optimizer, variable, slot variable) relationship; none of the three * depend on the others directly. + * * Note: currently only valid if kind == "user_object". *
    * @@ -4434,6 +4488,7 @@ public Builder addSlotVariables(org.tensorflow.proto.TrackableObjectGraphOuterCl * Slot variables owned by this object. This describes the three-way * (optimizer, variable, slot variable) relationship; none of the three * depend on the others directly. + * * Note: currently only valid if kind == "user_object". *
    * @@ -4458,6 +4513,7 @@ public Builder addSlotVariables( * Slot variables owned by this object. This describes the three-way * (optimizer, variable, slot variable) relationship; none of the three * depend on the others directly. + * * Note: currently only valid if kind == "user_object". *
    * @@ -4479,6 +4535,7 @@ public Builder addSlotVariables( * Slot variables owned by this object. This describes the three-way * (optimizer, variable, slot variable) relationship; none of the three * depend on the others directly. + * * Note: currently only valid if kind == "user_object". *
    * @@ -4500,6 +4557,7 @@ public Builder addSlotVariables( * Slot variables owned by this object. This describes the three-way * (optimizer, variable, slot variable) relationship; none of the three * depend on the others directly. + * * Note: currently only valid if kind == "user_object". *
    * @@ -4522,6 +4580,7 @@ public Builder addAllSlotVariables( * Slot variables owned by this object. This describes the three-way * (optimizer, variable, slot variable) relationship; none of the three * depend on the others directly. + * * Note: currently only valid if kind == "user_object". *
    * @@ -4542,6 +4601,7 @@ public Builder clearSlotVariables() { * Slot variables owned by this object. This describes the three-way * (optimizer, variable, slot variable) relationship; none of the three * depend on the others directly. + * * Note: currently only valid if kind == "user_object". *
    * @@ -4562,6 +4622,7 @@ public Builder removeSlotVariables(int index) { * Slot variables owned by this object. This describes the three-way * (optimizer, variable, slot variable) relationship; none of the three * depend on the others directly. + * * Note: currently only valid if kind == "user_object". *
    * @@ -4576,6 +4637,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph. * Slot variables owned by this object. This describes the three-way * (optimizer, variable, slot variable) relationship; none of the three * depend on the others directly. + * * Note: currently only valid if kind == "user_object". *
    * @@ -4593,6 +4655,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph. * Slot variables owned by this object. This describes the three-way * (optimizer, variable, slot variable) relationship; none of the three * depend on the others directly. + * * Note: currently only valid if kind == "user_object". *
    * @@ -4611,6 +4674,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph. * Slot variables owned by this object. This describes the three-way * (optimizer, variable, slot variable) relationship; none of the three * depend on the others directly. + * * Note: currently only valid if kind == "user_object". *
    * @@ -4625,6 +4689,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph. * Slot variables owned by this object. This describes the three-way * (optimizer, variable, slot variable) relationship; none of the three * depend on the others directly. + * * Note: currently only valid if kind == "user_object". *
    * @@ -4640,6 +4705,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph. * Slot variables owned by this object. This describes the three-way * (optimizer, variable, slot variable) relationship; none of the three * depend on the others directly. + * * Note: currently only valid if kind == "user_object". *
    * @@ -4649,11 +4715,11 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph. getSlotVariablesBuilderList() { return getSlotVariablesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReferenceOrBuilder> getSlotVariablesFieldBuilder() { if (slotVariablesBuilder_ == null) { - slotVariablesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + slotVariablesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReferenceOrBuilder>( slotVariables_, ((bitField0_ & 0x00000004) != 0), @@ -4664,7 +4730,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph. return slotVariablesBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.SavedObjectGraphOuterClass.SavedUserObject, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedUserObject.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedUserObjectOrBuilder> userObjectBuilder_; /** * .tensorflow.SavedUserObject user_object = 4; @@ -4787,14 +4853,14 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedUserObjectOrBuilder /** * .tensorflow.SavedUserObject user_object = 4; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.SavedObjectGraphOuterClass.SavedUserObject, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedUserObject.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedUserObjectOrBuilder> getUserObjectFieldBuilder() { if (userObjectBuilder_ == null) { if (!(kindCase_ == 4)) { kind_ = org.tensorflow.proto.SavedObjectGraphOuterClass.SavedUserObject.getDefaultInstance(); } - userObjectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + userObjectBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.SavedObjectGraphOuterClass.SavedUserObject, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedUserObject.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedUserObjectOrBuilder>( (org.tensorflow.proto.SavedObjectGraphOuterClass.SavedUserObject) kind_, getParentForChildren(), @@ -4802,11 +4868,11 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedUserObjectOrBuilder kind_ = null; } kindCase_ = 4; - onChanged();; + onChanged(); return userObjectBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.SavedObjectGraphOuterClass.SavedAsset, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedAsset.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedAssetOrBuilder> assetBuilder_; /** * .tensorflow.SavedAsset asset = 5; @@ -4929,14 +4995,14 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedAssetOrBuilder getAs /** * .tensorflow.SavedAsset asset = 5; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.SavedObjectGraphOuterClass.SavedAsset, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedAsset.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedAssetOrBuilder> getAssetFieldBuilder() { if (assetBuilder_ == null) { if (!(kindCase_ == 5)) { kind_ = org.tensorflow.proto.SavedObjectGraphOuterClass.SavedAsset.getDefaultInstance(); } - assetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + assetBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.SavedObjectGraphOuterClass.SavedAsset, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedAsset.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedAssetOrBuilder>( (org.tensorflow.proto.SavedObjectGraphOuterClass.SavedAsset) kind_, getParentForChildren(), @@ -4944,11 +5010,11 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedAssetOrBuilder getAs kind_ = null; } kindCase_ = 5; - onChanged();; + onChanged(); return assetBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.SavedObjectGraphOuterClass.SavedFunction, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedFunction.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedFunctionOrBuilder> functionBuilder_; /** * .tensorflow.SavedFunction function = 6; @@ -5071,14 +5137,14 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedFunctionOrBuilder ge /** * .tensorflow.SavedFunction function = 6; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.SavedObjectGraphOuterClass.SavedFunction, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedFunction.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedFunctionOrBuilder> getFunctionFieldBuilder() { if (functionBuilder_ == null) { if (!(kindCase_ == 6)) { kind_ = org.tensorflow.proto.SavedObjectGraphOuterClass.SavedFunction.getDefaultInstance(); } - functionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + functionBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.SavedObjectGraphOuterClass.SavedFunction, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedFunction.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedFunctionOrBuilder>( (org.tensorflow.proto.SavedObjectGraphOuterClass.SavedFunction) kind_, getParentForChildren(), @@ -5086,11 +5152,11 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedFunctionOrBuilder ge kind_ = null; } kindCase_ = 6; - onChanged();; + onChanged(); return functionBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariableOrBuilder> variableBuilder_; /** * .tensorflow.SavedVariable variable = 7; @@ -5213,14 +5279,14 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariableOrBuilder ge /** * .tensorflow.SavedVariable variable = 7; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariableOrBuilder> getVariableFieldBuilder() { if (variableBuilder_ == null) { if (!(kindCase_ == 7)) { kind_ = org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable.getDefaultInstance(); } - variableBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + variableBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariableOrBuilder>( (org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable) kind_, getParentForChildren(), @@ -5228,11 +5294,11 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariableOrBuilder ge kind_ = null; } kindCase_ = 7; - onChanged();; + onChanged(); return variableBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.SavedObjectGraphOuterClass.SavedBareConcreteFunction, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedBareConcreteFunction.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedBareConcreteFunctionOrBuilder> bareConcreteFunctionBuilder_; /** * .tensorflow.SavedBareConcreteFunction bare_concrete_function = 8; @@ -5355,14 +5421,14 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedBareConcreteFunction /** * .tensorflow.SavedBareConcreteFunction bare_concrete_function = 8; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.SavedObjectGraphOuterClass.SavedBareConcreteFunction, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedBareConcreteFunction.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedBareConcreteFunctionOrBuilder> getBareConcreteFunctionFieldBuilder() { if (bareConcreteFunctionBuilder_ == null) { if (!(kindCase_ == 8)) { kind_ = org.tensorflow.proto.SavedObjectGraphOuterClass.SavedBareConcreteFunction.getDefaultInstance(); } - bareConcreteFunctionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + bareConcreteFunctionBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.SavedObjectGraphOuterClass.SavedBareConcreteFunction, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedBareConcreteFunction.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedBareConcreteFunctionOrBuilder>( (org.tensorflow.proto.SavedObjectGraphOuterClass.SavedBareConcreteFunction) kind_, getParentForChildren(), @@ -5370,11 +5436,11 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedBareConcreteFunction kind_ = null; } kindCase_ = 8; - onChanged();; + onChanged(); return bareConcreteFunctionBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConstant, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConstant.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConstantOrBuilder> constantBuilder_; /** * .tensorflow.SavedConstant constant = 9; @@ -5497,14 +5563,14 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConstantOrBuilder ge /** * .tensorflow.SavedConstant constant = 9; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConstant, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConstant.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConstantOrBuilder> getConstantFieldBuilder() { if (constantBuilder_ == null) { if (!(kindCase_ == 9)) { kind_ = org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConstant.getDefaultInstance(); } - constantBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + constantBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConstant, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConstant.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConstantOrBuilder>( (org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConstant) kind_, getParentForChildren(), @@ -5512,11 +5578,11 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConstantOrBuilder ge kind_ = null; } kindCase_ = 9; - onChanged();; + onChanged(); return constantBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.SavedObjectGraphOuterClass.SavedResource, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedResource.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedResourceOrBuilder> resourceBuilder_; /** * .tensorflow.SavedResource resource = 10; @@ -5639,14 +5705,14 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedResourceOrBuilder ge /** * .tensorflow.SavedResource resource = 10; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.SavedObjectGraphOuterClass.SavedResource, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedResource.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedResourceOrBuilder> getResourceFieldBuilder() { if (resourceBuilder_ == null) { if (!(kindCase_ == 10)) { kind_ = org.tensorflow.proto.SavedObjectGraphOuterClass.SavedResource.getDefaultInstance(); } - resourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + resourceBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.SavedObjectGraphOuterClass.SavedResource, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedResource.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedResourceOrBuilder>( (org.tensorflow.proto.SavedObjectGraphOuterClass.SavedResource) kind_, getParentForChildren(), @@ -5654,11 +5720,11 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedResourceOrBuilder ge kind_ = null; } kindCase_ = 10; - onChanged();; + onChanged(); return resourceBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.SavedObjectGraphOuterClass.CapturedTensor, org.tensorflow.proto.SavedObjectGraphOuterClass.CapturedTensor.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.CapturedTensorOrBuilder> capturedTensorBuilder_; /** * .tensorflow.CapturedTensor captured_tensor = 12; @@ -5781,14 +5847,14 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.CapturedTensorOrBuilder g /** * .tensorflow.CapturedTensor captured_tensor = 12; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.SavedObjectGraphOuterClass.CapturedTensor, org.tensorflow.proto.SavedObjectGraphOuterClass.CapturedTensor.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.CapturedTensorOrBuilder> getCapturedTensorFieldBuilder() { if (capturedTensorBuilder_ == null) { if (!(kindCase_ == 12)) { kind_ = org.tensorflow.proto.SavedObjectGraphOuterClass.CapturedTensor.getDefaultInstance(); } - capturedTensorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + capturedTensorBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.SavedObjectGraphOuterClass.CapturedTensor, org.tensorflow.proto.SavedObjectGraphOuterClass.CapturedTensor.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.CapturedTensorOrBuilder>( (org.tensorflow.proto.SavedObjectGraphOuterClass.CapturedTensor) kind_, getParentForChildren(), @@ -5796,35 +5862,44 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.CapturedTensorOrBuilder g kind_ = null; } kindCase_ = 12; - onChanged();; + onChanged(); return capturedTensorBuilder_; } - private com.google.protobuf.MapField< - java.lang.String, org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject> saveableObjects_; - private com.google.protobuf.MapField - internalGetSaveableObjects() { + private static final class SaveableObjectsConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject build(org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObjectOrBuilder val) { + if (val instanceof org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject) { return (org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject) val; } + return ((org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return SaveableObjectsDefaultEntryHolder.defaultEntry; + } + }; + private static final SaveableObjectsConverter saveableObjectsConverter = new SaveableObjectsConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObjectOrBuilder, org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject, org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject.Builder> saveableObjects_; + private com.google.protobuf.MapFieldBuilder + internalGetSaveableObjects() { if (saveableObjects_ == null) { - return com.google.protobuf.MapField.emptyMapField( - SaveableObjectsDefaultEntryHolder.defaultEntry); + return new com.google.protobuf.MapFieldBuilder<>(saveableObjectsConverter); } return saveableObjects_; } - private com.google.protobuf.MapField - internalGetMutableSaveableObjects() { - onChanged();; + private com.google.protobuf.MapFieldBuilder + internalGetMutableSaveableObjects() { if (saveableObjects_ == null) { - saveableObjects_ = com.google.protobuf.MapField.newMapField( - SaveableObjectsDefaultEntryHolder.defaultEntry); - } - if (!saveableObjects_.isMutable()) { - saveableObjects_ = saveableObjects_.copy(); + saveableObjects_ = new com.google.protobuf.MapFieldBuilder<>(saveableObjectsConverter); } + bitField0_ |= 0x00000800; + onChanged(); return saveableObjects_; } - public int getSaveableObjectsCount() { - return internalGetSaveableObjects().getMap().size(); + return internalGetSaveableObjects().ensureBuilderMap().size(); } /** *
    @@ -5836,12 +5911,11 @@ public int getSaveableObjectsCount() {
            *
            * map<string, .tensorflow.SaveableObject> saveable_objects = 11;
            */
    -
           @java.lang.Override
           public boolean containsSaveableObjects(
               java.lang.String key) {
             if (key == null) { throw new NullPointerException("map key"); }
    -        return internalGetSaveableObjects().getMap().containsKey(key);
    +        return internalGetSaveableObjects().ensureBuilderMap().containsKey(key);
           }
           /**
            * Use {@link #getSaveableObjectsMap()} instead.
    @@ -5862,9 +5936,8 @@ public java.util.Mapmap<string, .tensorflow.SaveableObject> saveable_objects = 11;
            */
           @java.lang.Override
    -
           public java.util.Map getSaveableObjectsMap() {
    -        return internalGetSaveableObjects().getMap();
    +        return internalGetSaveableObjects().getImmutableMap();
           }
           /**
            * 
    @@ -5877,14 +5950,14 @@ public java.util.Mapmap<string, .tensorflow.SaveableObject> saveable_objects = 11;
            */
           @java.lang.Override
    -
    -      public org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject getSaveableObjectsOrDefault(
    +      public /* nullable */
    +org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject getSaveableObjectsOrDefault(
               java.lang.String key,
    -          org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject defaultValue) {
    +          /* nullable */
    +org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject defaultValue) {
             if (key == null) { throw new NullPointerException("map key"); }
    -        java.util.Map map =
    -            internalGetSaveableObjects().getMap();
    -        return map.containsKey(key) ? map.get(key) : defaultValue;
    +        java.util.Map map = internalGetMutableSaveableObjects().ensureBuilderMap();
    +        return map.containsKey(key) ? saveableObjectsConverter.build(map.get(key)) : defaultValue;
           }
           /**
            * 
    @@ -5897,21 +5970,18 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject getSaveabl
            * map<string, .tensorflow.SaveableObject> saveable_objects = 11;
            */
           @java.lang.Override
    -
           public org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject getSaveableObjectsOrThrow(
               java.lang.String key) {
             if (key == null) { throw new NullPointerException("map key"); }
    -        java.util.Map map =
    -            internalGetSaveableObjects().getMap();
    +        java.util.Map map = internalGetMutableSaveableObjects().ensureBuilderMap();
             if (!map.containsKey(key)) {
               throw new java.lang.IllegalArgumentException();
             }
    -        return map.get(key);
    +        return saveableObjectsConverter.build(map.get(key));
           }
    -
           public Builder clearSaveableObjects() {
    -        internalGetMutableSaveableObjects().getMutableMap()
    -            .clear();
    +        bitField0_ = (bitField0_ & ~0x00000800);
    +        internalGetMutableSaveableObjects().clear();
             return this;
           }
           /**
    @@ -5924,11 +5994,10 @@ public Builder clearSaveableObjects() {
            *
            * map<string, .tensorflow.SaveableObject> saveable_objects = 11;
            */
    -
           public Builder removeSaveableObjects(
               java.lang.String key) {
             if (key == null) { throw new NullPointerException("map key"); }
    -        internalGetMutableSaveableObjects().getMutableMap()
    +        internalGetMutableSaveableObjects().ensureBuilderMap()
                 .remove(key);
             return this;
           }
    @@ -5937,8 +6006,9 @@ public Builder removeSaveableObjects(
            */
           @java.lang.Deprecated
           public java.util.Map
    -      getMutableSaveableObjects() {
    -        return internalGetMutableSaveableObjects().getMutableMap();
    +          getMutableSaveableObjects() {
    +        bitField0_ |= 0x00000800;
    +        return internalGetMutableSaveableObjects().ensureMessageMap();
           }
           /**
            * 
    @@ -5954,12 +6024,10 @@ public Builder putSaveableObjects(
               java.lang.String key,
               org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject value) {
             if (key == null) { throw new NullPointerException("map key"); }
    -        if (value == null) {
    -  throw new NullPointerException("map value");
    -}
    -
    -        internalGetMutableSaveableObjects().getMutableMap()
    +        if (value == null) { throw new NullPointerException("map value"); }
    +        internalGetMutableSaveableObjects().ensureBuilderMap()
                 .put(key, value);
    +        bitField0_ |= 0x00000800;
             return this;
           }
           /**
    @@ -5972,13 +6040,42 @@ public Builder putSaveableObjects(
            *
            * map<string, .tensorflow.SaveableObject> saveable_objects = 11;
            */
    -
           public Builder putAllSaveableObjects(
               java.util.Map values) {
    -        internalGetMutableSaveableObjects().getMutableMap()
    +        for (java.util.Map.Entry e : values.entrySet()) {
    +          if (e.getKey() == null || e.getValue() == null) {
    +            throw new NullPointerException();
    +          }
    +        }
    +        internalGetMutableSaveableObjects().ensureBuilderMap()
                 .putAll(values);
    +        bitField0_ |= 0x00000800;
             return this;
           }
    +      /**
    +       * 
    +       * Stores the functions used to save and restore this object. At most one of
    +       * `saveable_objects` or `registered_saver` is defined for each SavedObject.
    +       * See the comment below for the difference between SaveableObject and
    +       * registered savers.
    +       * 
    + * + * map<string, .tensorflow.SaveableObject> saveable_objects = 11; + */ + public org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject.Builder putSaveableObjectsBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableSaveableObjects().ensureBuilderMap(); + org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObjectOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject) { + entry = ((org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject) entry).toBuilder(); + builderMap.put(key, entry); + } + return (org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject.Builder) entry; + } private java.lang.Object registeredName_ = ""; /** @@ -6036,11 +6133,9 @@ public java.lang.String getRegisteredName() { */ public Builder setRegisteredName( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } registeredName_ = value; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -6054,8 +6149,8 @@ public Builder setRegisteredName( * @return This builder for chaining. */ public Builder clearRegisteredName() { - registeredName_ = getDefaultInstance().getRegisteredName(); + bitField0_ = (bitField0_ & ~0x00001000); onChanged(); return this; } @@ -6071,18 +6166,16 @@ public Builder clearRegisteredName() { */ public Builder setRegisteredNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); registeredName_ = value; + bitField0_ |= 0x00001000; onChanged(); return this; } private com.google.protobuf.Any serializedUserProto_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> serializedUserProtoBuilder_; /** *
    @@ -6095,7 +6188,7 @@ public Builder setRegisteredNameBytes(
            * @return Whether the serializedUserProto field is set.
            */
           public boolean hasSerializedUserProto() {
    -        return serializedUserProtoBuilder_ != null || serializedUserProto_ != null;
    +        return ((bitField0_ & 0x00002000) != 0);
           }
           /**
            * 
    @@ -6129,11 +6222,11 @@ public Builder setSerializedUserProto(com.google.protobuf.Any value) {
                 throw new NullPointerException();
               }
               serializedUserProto_ = value;
    -          onChanged();
             } else {
               serializedUserProtoBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00002000;
    +        onChanged();
             return this;
           }
           /**
    @@ -6149,11 +6242,11 @@ public Builder setSerializedUserProto(
               com.google.protobuf.Any.Builder builderForValue) {
             if (serializedUserProtoBuilder_ == null) {
               serializedUserProto_ = builderForValue.build();
    -          onChanged();
             } else {
               serializedUserProtoBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00002000;
    +        onChanged();
             return this;
           }
           /**
    @@ -6167,17 +6260,20 @@ public Builder setSerializedUserProto(
            */
           public Builder mergeSerializedUserProto(com.google.protobuf.Any value) {
             if (serializedUserProtoBuilder_ == null) {
    -          if (serializedUserProto_ != null) {
    -            serializedUserProto_ =
    -              com.google.protobuf.Any.newBuilder(serializedUserProto_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00002000) != 0) &&
    +            serializedUserProto_ != null &&
    +            serializedUserProto_ != com.google.protobuf.Any.getDefaultInstance()) {
    +            getSerializedUserProtoBuilder().mergeFrom(value);
               } else {
                 serializedUserProto_ = value;
               }
    -          onChanged();
             } else {
               serializedUserProtoBuilder_.mergeFrom(value);
             }
    -
    +        if (serializedUserProto_ != null) {
    +          bitField0_ |= 0x00002000;
    +          onChanged();
    +        }
             return this;
           }
           /**
    @@ -6190,14 +6286,13 @@ public Builder mergeSerializedUserProto(com.google.protobuf.Any value) {
            * .google.protobuf.Any serialized_user_proto = 14;
            */
           public Builder clearSerializedUserProto() {
    -        if (serializedUserProtoBuilder_ == null) {
    -          serializedUserProto_ = null;
    -          onChanged();
    -        } else {
    -          serializedUserProto_ = null;
    +        bitField0_ = (bitField0_ & ~0x00002000);
    +        serializedUserProto_ = null;
    +        if (serializedUserProtoBuilder_ != null) {
    +          serializedUserProtoBuilder_.dispose();
               serializedUserProtoBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
    @@ -6210,7 +6305,7 @@ public Builder clearSerializedUserProto() {
            * .google.protobuf.Any serialized_user_proto = 14;
            */
           public com.google.protobuf.Any.Builder getSerializedUserProtoBuilder() {
    -        
    +        bitField0_ |= 0x00002000;
             onChanged();
             return getSerializedUserProtoFieldBuilder().getBuilder();
           }
    @@ -6240,11 +6335,11 @@ public com.google.protobuf.AnyOrBuilder getSerializedUserProtoOrBuilder() {
            *
            * .google.protobuf.Any serialized_user_proto = 14;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> 
               getSerializedUserProtoFieldBuilder() {
             if (serializedUserProtoBuilder_ == null) {
    -          serializedUserProtoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          serializedUserProtoBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>(
                       getSerializedUserProto(),
                       getParentForChildren(),
    @@ -6310,11 +6405,9 @@ public java.lang.String getRegisteredSaver() {
            */
           public Builder setRegisteredSaver(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             registeredSaver_ = value;
    +        bitField0_ |= 0x00004000;
             onChanged();
             return this;
           }
    @@ -6328,8 +6421,8 @@ public Builder setRegisteredSaver(
            * @return This builder for chaining.
            */
           public Builder clearRegisteredSaver() {
    -        
             registeredSaver_ = getDefaultInstance().getRegisteredSaver();
    +        bitField0_ = (bitField0_ & ~0x00004000);
             onChanged();
             return this;
           }
    @@ -6345,27 +6438,13 @@ public Builder clearRegisteredSaver() {
            */
           public Builder setRegisteredSaverBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             registeredSaver_ = value;
    +        bitField0_ |= 0x00004000;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.SavedObject)
         }
    @@ -6472,6 +6551,7 @@ public interface SavedUserObjectOrBuilder extends
         /**
          * 
          * Metadata for deserializing this object.
    +     *
          * Deprecated! At the time of deprecation, Keras was the only user of this
          * field, and its saving and loading code will be updated shortly.
          * Please save your application-specific metadata to a separate file.
    @@ -6486,6 +6566,7 @@ public interface SavedUserObjectOrBuilder extends
         /**
          * 
          * Metadata for deserializing this object.
    +     *
          * Deprecated! At the time of deprecation, Keras was the only user of this
          * field, and its saving and loading code will be updated shortly.
          * Please save your application-specific metadata to a separate file.
    @@ -6504,6 +6585,7 @@ public interface SavedUserObjectOrBuilder extends
        * A SavedUserObject is an object (in the object-oriented language of the
        * TensorFlow program) of some user- or framework-defined class other than
        * those handled specifically by the other kinds of SavedObjects.
    +   *
        * This object cannot be evaluated as a tensor, and therefore cannot be bound
        * to an input of a function.
        * 
    @@ -6511,12 +6593,21 @@ public interface SavedUserObjectOrBuilder extends * Protobuf type {@code tensorflow.SavedUserObject} */ public static final class SavedUserObject extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.SavedUserObject) SavedUserObjectOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + SavedUserObject.class.getName()); + } // Use SavedUserObject.newBuilder() to construct. - private SavedUserObject(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private SavedUserObject(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private SavedUserObject() { @@ -6524,33 +6615,23 @@ private SavedUserObject() { metadata_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SavedUserObject(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.SavedObjectGraphOuterClass.internal_static_tensorflow_SavedUserObject_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.SavedObjectGraphOuterClass.internal_static_tensorflow_SavedUserObject_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.proto.SavedObjectGraphOuterClass.SavedUserObject.class, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedUserObject.Builder.class); } + private int bitField0_; public static final int IDENTIFIER_FIELD_NUMBER = 1; - private volatile java.lang.Object identifier_; + @SuppressWarnings("serial") + private volatile java.lang.Object identifier_ = ""; /** *
          * Corresponds to a registration of the type to use in the loading program.
    @@ -6607,7 +6688,7 @@ public java.lang.String getIdentifier() {
          */
         @java.lang.Override
         public boolean hasVersion() {
    -      return version_ != null;
    +      return ((bitField0_ & 0x00000001) != 0);
         }
         /**
          * 
    @@ -6630,14 +6711,16 @@ public org.tensorflow.proto.VersionDef getVersion() {
          */
         @java.lang.Override
         public org.tensorflow.proto.VersionDefOrBuilder getVersionOrBuilder() {
    -      return getVersion();
    +      return version_ == null ? org.tensorflow.proto.VersionDef.getDefaultInstance() : version_;
         }
     
         public static final int METADATA_FIELD_NUMBER = 3;
    -    private volatile java.lang.Object metadata_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object metadata_ = "";
         /**
          * 
          * Metadata for deserializing this object.
    +     *
          * Deprecated! At the time of deprecation, Keras was the only user of this
          * field, and its saving and loading code will be updated shortly.
          * Please save your application-specific metadata to a separate file.
    @@ -6664,6 +6747,7 @@ public org.tensorflow.proto.VersionDefOrBuilder getVersionOrBuilder() {
         /**
          * 
          * Metadata for deserializing this object.
    +     *
          * Deprecated! At the time of deprecation, Keras was the only user of this
          * field, and its saving and loading code will be updated shortly.
          * Please save your application-specific metadata to a separate file.
    @@ -6703,14 +6787,14 @@ public final boolean isInitialized() {
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output)
                             throws java.io.IOException {
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(identifier_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, identifier_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(identifier_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 1, identifier_);
           }
    -      if (version_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             output.writeMessage(2, getVersion());
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(metadata_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 3, metadata_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(metadata_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 3, metadata_);
           }
           getUnknownFields().writeTo(output);
         }
    @@ -6721,15 +6805,15 @@ public int getSerializedSize() {
           if (size != -1) return size;
     
           size = 0;
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(identifier_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, identifier_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(identifier_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, identifier_);
           }
    -      if (version_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(2, getVersion());
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(metadata_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, metadata_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(metadata_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(3, metadata_);
           }
           size += getUnknownFields().getSerializedSize();
           memoizedSize = size;
    @@ -6813,39 +6897,41 @@ public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedUserObject pa
         }
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedUserObject parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedUserObject parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedUserObject parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedUserObject parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedUserObject parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedUserObject parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -6865,7 +6951,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -6874,6 +6960,7 @@ protected Builder newBuilderForType(
          * A SavedUserObject is an object (in the object-oriented language of the
          * TensorFlow program) of some user- or framework-defined class other than
          * those handled specifically by the other kinds of SavedObjects.
    +     *
          * This object cannot be evaluated as a tensor, and therefore cannot be bound
          * to an input of a function.
          * 
    @@ -6881,7 +6968,7 @@ protected Builder newBuilderForType( * Protobuf type {@code tensorflow.SavedUserObject} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.SavedUserObject) org.tensorflow.proto.SavedObjectGraphOuterClass.SavedUserObjectOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -6890,7 +6977,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.SavedObjectGraphOuterClass.internal_static_tensorflow_SavedUserObject_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -6899,27 +6986,31 @@ public static final class Builder extends // Construct using org.tensorflow.proto.SavedObjectGraphOuterClass.SavedUserObject.newBuilder() private Builder() { - + maybeForceBuilderInitialization(); } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getVersionFieldBuilder(); + } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; identifier_ = ""; - - if (versionBuilder_ == null) { - version_ = null; - } else { - version_ = null; + version_ = null; + if (versionBuilder_ != null) { + versionBuilder_.dispose(); versionBuilder_ = null; } metadata_ = ""; - return this; } @@ -6946,49 +7037,29 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedUserObject build() { @java.lang.Override public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedUserObject buildPartial() { org.tensorflow.proto.SavedObjectGraphOuterClass.SavedUserObject result = new org.tensorflow.proto.SavedObjectGraphOuterClass.SavedUserObject(this); - result.identifier_ = identifier_; - if (versionBuilder_ == null) { - result.version_ = version_; - } else { - result.version_ = versionBuilder_.build(); - } - result.metadata_ = metadata_; + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.SavedObjectGraphOuterClass.SavedUserObject result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.identifier_ = identifier_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.version_ = versionBuilder_ == null + ? version_ + : versionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.metadata_ = metadata_; + } + result.bitField0_ |= to_bitField0_; } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.SavedObjectGraphOuterClass.SavedUserObject) { @@ -7003,6 +7074,7 @@ public Builder mergeFrom(org.tensorflow.proto.SavedObjectGraphOuterClass.SavedUs if (other == org.tensorflow.proto.SavedObjectGraphOuterClass.SavedUserObject.getDefaultInstance()) return this; if (!other.getIdentifier().isEmpty()) { identifier_ = other.identifier_; + bitField0_ |= 0x00000001; onChanged(); } if (other.hasVersion()) { @@ -7010,6 +7082,7 @@ public Builder mergeFrom(org.tensorflow.proto.SavedObjectGraphOuterClass.SavedUs } if (!other.getMetadata().isEmpty()) { metadata_ = other.metadata_; + bitField0_ |= 0x00000004; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); @@ -7040,19 +7113,19 @@ public Builder mergeFrom( break; case 10: { identifier_ = input.readStringRequireUtf8(); - + bitField0_ |= 0x00000001; break; } // case 10 case 18: { input.readMessage( getVersionFieldBuilder().getBuilder(), extensionRegistry); - + bitField0_ |= 0x00000002; break; } // case 18 case 26: { metadata_ = input.readStringRequireUtf8(); - + bitField0_ |= 0x00000004; break; } // case 26 default: { @@ -7070,6 +7143,7 @@ public Builder mergeFrom( } // finally return this; } + private int bitField0_; private java.lang.Object identifier_ = ""; /** @@ -7124,11 +7198,9 @@ public java.lang.String getIdentifier() { */ public Builder setIdentifier( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } identifier_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -7141,8 +7213,8 @@ public Builder setIdentifier( * @return This builder for chaining. */ public Builder clearIdentifier() { - identifier_ = getDefaultInstance().getIdentifier(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -7157,18 +7229,16 @@ public Builder clearIdentifier() { */ public Builder setIdentifierBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); identifier_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } private org.tensorflow.proto.VersionDef version_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.VersionDef, org.tensorflow.proto.VersionDef.Builder, org.tensorflow.proto.VersionDefOrBuilder> versionBuilder_; /** *
    @@ -7179,7 +7249,7 @@ public Builder setIdentifierBytes(
            * @return Whether the version field is set.
            */
           public boolean hasVersion() {
    -        return versionBuilder_ != null || version_ != null;
    +        return ((bitField0_ & 0x00000002) != 0);
           }
           /**
            * 
    @@ -7209,11 +7279,11 @@ public Builder setVersion(org.tensorflow.proto.VersionDef value) {
                 throw new NullPointerException();
               }
               version_ = value;
    -          onChanged();
             } else {
               versionBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000002;
    +        onChanged();
             return this;
           }
           /**
    @@ -7227,11 +7297,11 @@ public Builder setVersion(
               org.tensorflow.proto.VersionDef.Builder builderForValue) {
             if (versionBuilder_ == null) {
               version_ = builderForValue.build();
    -          onChanged();
             } else {
               versionBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000002;
    +        onChanged();
             return this;
           }
           /**
    @@ -7243,17 +7313,20 @@ public Builder setVersion(
            */
           public Builder mergeVersion(org.tensorflow.proto.VersionDef value) {
             if (versionBuilder_ == null) {
    -          if (version_ != null) {
    -            version_ =
    -              org.tensorflow.proto.VersionDef.newBuilder(version_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000002) != 0) &&
    +            version_ != null &&
    +            version_ != org.tensorflow.proto.VersionDef.getDefaultInstance()) {
    +            getVersionBuilder().mergeFrom(value);
               } else {
                 version_ = value;
               }
    -          onChanged();
             } else {
               versionBuilder_.mergeFrom(value);
             }
    -
    +        if (version_ != null) {
    +          bitField0_ |= 0x00000002;
    +          onChanged();
    +        }
             return this;
           }
           /**
    @@ -7264,14 +7337,13 @@ public Builder mergeVersion(org.tensorflow.proto.VersionDef value) {
            * .tensorflow.VersionDef version = 2;
            */
           public Builder clearVersion() {
    -        if (versionBuilder_ == null) {
    -          version_ = null;
    -          onChanged();
    -        } else {
    -          version_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000002);
    +        version_ = null;
    +        if (versionBuilder_ != null) {
    +          versionBuilder_.dispose();
               versionBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
    @@ -7282,7 +7354,7 @@ public Builder clearVersion() {
            * .tensorflow.VersionDef version = 2;
            */
           public org.tensorflow.proto.VersionDef.Builder getVersionBuilder() {
    -        
    +        bitField0_ |= 0x00000002;
             onChanged();
             return getVersionFieldBuilder().getBuilder();
           }
    @@ -7308,11 +7380,11 @@ public org.tensorflow.proto.VersionDefOrBuilder getVersionOrBuilder() {
            *
            * .tensorflow.VersionDef version = 2;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.VersionDef, org.tensorflow.proto.VersionDef.Builder, org.tensorflow.proto.VersionDefOrBuilder> 
               getVersionFieldBuilder() {
             if (versionBuilder_ == null) {
    -          versionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          versionBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.VersionDef, org.tensorflow.proto.VersionDef.Builder, org.tensorflow.proto.VersionDefOrBuilder>(
                       getVersion(),
                       getParentForChildren(),
    @@ -7326,6 +7398,7 @@ public org.tensorflow.proto.VersionDefOrBuilder getVersionOrBuilder() {
           /**
            * 
            * Metadata for deserializing this object.
    +       *
            * Deprecated! At the time of deprecation, Keras was the only user of this
            * field, and its saving and loading code will be updated shortly.
            * Please save your application-specific metadata to a separate file.
    @@ -7351,6 +7424,7 @@ public org.tensorflow.proto.VersionDefOrBuilder getVersionOrBuilder() {
           /**
            * 
            * Metadata for deserializing this object.
    +       *
            * Deprecated! At the time of deprecation, Keras was the only user of this
            * field, and its saving and loading code will be updated shortly.
            * Please save your application-specific metadata to a separate file.
    @@ -7377,6 +7451,7 @@ public org.tensorflow.proto.VersionDefOrBuilder getVersionOrBuilder() {
           /**
            * 
            * Metadata for deserializing this object.
    +       *
            * Deprecated! At the time of deprecation, Keras was the only user of this
            * field, and its saving and loading code will be updated shortly.
            * Please save your application-specific metadata to a separate file.
    @@ -7390,17 +7465,16 @@ public org.tensorflow.proto.VersionDefOrBuilder getVersionOrBuilder() {
            */
           @java.lang.Deprecated public Builder setMetadata(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             metadata_ = value;
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
           /**
            * 
            * Metadata for deserializing this object.
    +       *
            * Deprecated! At the time of deprecation, Keras was the only user of this
            * field, and its saving and loading code will be updated shortly.
            * Please save your application-specific metadata to a separate file.
    @@ -7412,14 +7486,15 @@ public org.tensorflow.proto.VersionDefOrBuilder getVersionOrBuilder() {
            * @return This builder for chaining.
            */
           @java.lang.Deprecated public Builder clearMetadata() {
    -        
             metadata_ = getDefaultInstance().getMetadata();
    +        bitField0_ = (bitField0_ & ~0x00000004);
             onChanged();
             return this;
           }
           /**
            * 
            * Metadata for deserializing this object.
    +       *
            * Deprecated! At the time of deprecation, Keras was the only user of this
            * field, and its saving and loading code will be updated shortly.
            * Please save your application-specific metadata to a separate file.
    @@ -7433,27 +7508,13 @@ public org.tensorflow.proto.VersionDefOrBuilder getVersionOrBuilder() {
            */
           @java.lang.Deprecated public Builder setMetadataBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             metadata_ = value;
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.SavedUserObject)
         }
    @@ -7513,6 +7574,7 @@ public interface SavedAssetOrBuilder extends
         /**
          * 
          * Index into `MetaGraphDef.asset_file_def[]` that describes the Asset.
    +     *
          * Only the field `AssetFileDef.filename` is used. Other fields, such as
          * `AssetFileDef.tensor_info`, MUST be ignored.
          * 
    @@ -7525,6 +7587,7 @@ public interface SavedAssetOrBuilder extends /** *
        * A SavedAsset points to an asset in the MetaGraph.
    +   *
        * When bound to a function this object evaluates to a tensor with the absolute
        * filename. Users should not depend on a particular part of the filename to
        * remain stable (e.g. basename could be changed).
    @@ -7533,36 +7596,33 @@ public interface SavedAssetOrBuilder extends
        * Protobuf type {@code tensorflow.SavedAsset}
        */
       public static final class SavedAsset extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.SavedAsset)
           SavedAssetOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        SavedAsset.class.getName());
    +    }
         // Use SavedAsset.newBuilder() to construct.
    -    private SavedAsset(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private SavedAsset(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private SavedAsset() {
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new SavedAsset();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.SavedObjectGraphOuterClass.internal_static_tensorflow_SavedAsset_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.SavedObjectGraphOuterClass.internal_static_tensorflow_SavedAsset_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -7570,10 +7630,11 @@ protected java.lang.Object newInstance(
         }
     
         public static final int ASSET_FILE_DEF_INDEX_FIELD_NUMBER = 1;
    -    private int assetFileDefIndex_;
    +    private int assetFileDefIndex_ = 0;
         /**
          * 
          * Index into `MetaGraphDef.asset_file_def[]` that describes the Asset.
    +     *
          * Only the field `AssetFileDef.filename` is used. Other fields, such as
          * `AssetFileDef.tensor_info`, MUST be ignored.
          * 
    @@ -7685,39 +7746,41 @@ public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedAsset parseFr } public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedAsset parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedAsset parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedAsset parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedAsset parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedAsset parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedAsset parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -7737,13 +7800,14 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
          * A SavedAsset points to an asset in the MetaGraph.
    +     *
          * When bound to a function this object evaluates to a tensor with the absolute
          * filename. Users should not depend on a particular part of the filename to
          * remain stable (e.g. basename could be changed).
    @@ -7752,7 +7816,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.SavedAsset}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.SavedAsset)
             org.tensorflow.proto.SavedObjectGraphOuterClass.SavedAssetOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -7761,7 +7825,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.SavedObjectGraphOuterClass.internal_static_tensorflow_SavedAsset_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -7774,15 +7838,15 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             assetFileDefIndex_ = 0;
    -
             return this;
           }
     
    @@ -7809,43 +7873,18 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedAsset build() {
           @java.lang.Override
           public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedAsset buildPartial() {
             org.tensorflow.proto.SavedObjectGraphOuterClass.SavedAsset result = new org.tensorflow.proto.SavedObjectGraphOuterClass.SavedAsset(this);
    -        result.assetFileDefIndex_ = assetFileDefIndex_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.SavedObjectGraphOuterClass.SavedAsset result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.assetFileDefIndex_ = assetFileDefIndex_;
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.SavedObjectGraphOuterClass.SavedAsset) {
    @@ -7889,7 +7928,7 @@ public Builder mergeFrom(
                     break;
                   case 8: {
                     assetFileDefIndex_ = input.readInt32();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 8
                   default: {
    @@ -7907,11 +7946,13 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    +      private int bitField0_;
     
           private int assetFileDefIndex_ ;
           /**
            * 
            * Index into `MetaGraphDef.asset_file_def[]` that describes the Asset.
    +       *
            * Only the field `AssetFileDef.filename` is used. Other fields, such as
            * `AssetFileDef.tensor_info`, MUST be ignored.
            * 
    @@ -7926,6 +7967,7 @@ public int getAssetFileDefIndex() { /** *
            * Index into `MetaGraphDef.asset_file_def[]` that describes the Asset.
    +       *
            * Only the field `AssetFileDef.filename` is used. Other fields, such as
            * `AssetFileDef.tensor_info`, MUST be ignored.
            * 
    @@ -7935,14 +7977,16 @@ public int getAssetFileDefIndex() { * @return This builder for chaining. */ public Builder setAssetFileDefIndex(int value) { - + assetFileDefIndex_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } /** *
            * Index into `MetaGraphDef.asset_file_def[]` that describes the Asset.
    +       *
            * Only the field `AssetFileDef.filename` is used. Other fields, such as
            * `AssetFileDef.tensor_info`, MUST be ignored.
            * 
    @@ -7951,23 +7995,11 @@ public Builder setAssetFileDefIndex(int value) { * @return This builder for chaining. */ public Builder clearAssetFileDefIndex() { - + bitField0_ = (bitField0_ & ~0x00000001); assetFileDefIndex_ = 0; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.SavedAsset) } @@ -8072,45 +8104,46 @@ public interface SavedFunctionOrBuilder extends * Protobuf type {@code tensorflow.SavedFunction} */ public static final class SavedFunction extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.SavedFunction) SavedFunctionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + SavedFunction.class.getName()); + } // Use SavedFunction.newBuilder() to construct. - private SavedFunction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private SavedFunction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private SavedFunction() { - concreteFunctions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SavedFunction(); + concreteFunctions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.SavedObjectGraphOuterClass.internal_static_tensorflow_SavedFunction_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.SavedObjectGraphOuterClass.internal_static_tensorflow_SavedFunction_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.proto.SavedObjectGraphOuterClass.SavedFunction.class, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedFunction.Builder.class); } + private int bitField0_; public static final int CONCRETE_FUNCTIONS_FIELD_NUMBER = 1; - private com.google.protobuf.LazyStringList concreteFunctions_; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList concreteFunctions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); /** * repeated string concrete_functions = 1; * @return A list containing the concreteFunctions. @@ -8152,7 +8185,7 @@ public java.lang.String getConcreteFunctions(int index) { */ @java.lang.Override public boolean hasFunctionSpec() { - return functionSpec_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * .tensorflow.FunctionSpec function_spec = 2; @@ -8167,7 +8200,7 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec getFunctionS */ @java.lang.Override public org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpecOrBuilder getFunctionSpecOrBuilder() { - return getFunctionSpec(); + return functionSpec_ == null ? org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec.getDefaultInstance() : functionSpec_; } private byte memoizedIsInitialized = -1; @@ -8185,9 +8218,9 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < concreteFunctions_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, concreteFunctions_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 1, concreteFunctions_.getRaw(i)); } - if (functionSpec_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getFunctionSpec()); } getUnknownFields().writeTo(output); @@ -8207,7 +8240,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getConcreteFunctionsList().size(); } - if (functionSpec_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getFunctionSpec()); } @@ -8291,39 +8324,41 @@ public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedFunction pars } public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedFunction parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedFunction parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedFunction parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedFunction parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedFunction parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedFunction parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -8343,7 +8378,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -8355,7 +8390,7 @@ protected Builder newBuilderForType( * Protobuf type {@code tensorflow.SavedFunction} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.SavedFunction) org.tensorflow.proto.SavedObjectGraphOuterClass.SavedFunctionOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -8364,7 +8399,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.SavedObjectGraphOuterClass.internal_static_tensorflow_SavedFunction_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -8373,23 +8408,29 @@ public static final class Builder extends // Construct using org.tensorflow.proto.SavedObjectGraphOuterClass.SavedFunction.newBuilder() private Builder() { - + maybeForceBuilderInitialization(); } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getFunctionSpecFieldBuilder(); + } } @java.lang.Override public Builder clear() { super.clear(); - concreteFunctions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - if (functionSpecBuilder_ == null) { - functionSpec_ = null; - } else { - functionSpec_ = null; + bitField0_ = 0; + concreteFunctions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + functionSpec_ = null; + if (functionSpecBuilder_ != null) { + functionSpecBuilder_.dispose(); functionSpecBuilder_ = null; } return this; @@ -8418,53 +8459,27 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedFunction build() { @java.lang.Override public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedFunction buildPartial() { org.tensorflow.proto.SavedObjectGraphOuterClass.SavedFunction result = new org.tensorflow.proto.SavedObjectGraphOuterClass.SavedFunction(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - concreteFunctions_ = concreteFunctions_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.concreteFunctions_ = concreteFunctions_; - if (functionSpecBuilder_ == null) { - result.functionSpec_ = functionSpec_; - } else { - result.functionSpec_ = functionSpecBuilder_.build(); - } + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.SavedObjectGraphOuterClass.SavedFunction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + concreteFunctions_.makeImmutable(); + result.concreteFunctions_ = concreteFunctions_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.functionSpec_ = functionSpecBuilder_ == null + ? functionSpec_ + : functionSpecBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.SavedObjectGraphOuterClass.SavedFunction) { @@ -8480,7 +8495,7 @@ public Builder mergeFrom(org.tensorflow.proto.SavedObjectGraphOuterClass.SavedFu if (!other.concreteFunctions_.isEmpty()) { if (concreteFunctions_.isEmpty()) { concreteFunctions_ = other.concreteFunctions_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ |= 0x00000001; } else { ensureConcreteFunctionsIsMutable(); concreteFunctions_.addAll(other.concreteFunctions_); @@ -8526,7 +8541,7 @@ public Builder mergeFrom( input.readMessage( getFunctionSpecFieldBuilder().getBuilder(), extensionRegistry); - + bitField0_ |= 0x00000002; break; } // case 18 default: { @@ -8546,12 +8561,13 @@ public Builder mergeFrom( } private int bitField0_; - private com.google.protobuf.LazyStringList concreteFunctions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private com.google.protobuf.LazyStringArrayList concreteFunctions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureConcreteFunctionsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!concreteFunctions_.isModifiable()) { concreteFunctions_ = new com.google.protobuf.LazyStringArrayList(concreteFunctions_); - bitField0_ |= 0x00000001; - } + } + bitField0_ |= 0x00000001; } /** * repeated string concrete_functions = 1; @@ -8559,7 +8575,8 @@ private void ensureConcreteFunctionsIsMutable() { */ public com.google.protobuf.ProtocolStringList getConcreteFunctionsList() { - return concreteFunctions_.getUnmodifiableView(); + concreteFunctions_.makeImmutable(); + return concreteFunctions_; } /** * repeated string concrete_functions = 1; @@ -8593,11 +8610,10 @@ public java.lang.String getConcreteFunctions(int index) { */ public Builder setConcreteFunctions( int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureConcreteFunctionsIsMutable(); + if (value == null) { throw new NullPointerException(); } + ensureConcreteFunctionsIsMutable(); concreteFunctions_.set(index, value); + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -8608,11 +8624,10 @@ public Builder setConcreteFunctions( */ public Builder addConcreteFunctions( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureConcreteFunctionsIsMutable(); + if (value == null) { throw new NullPointerException(); } + ensureConcreteFunctionsIsMutable(); concreteFunctions_.add(value); + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -8626,6 +8641,7 @@ public Builder addAllConcreteFunctions( ensureConcreteFunctionsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, concreteFunctions_); + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -8634,8 +8650,9 @@ public Builder addAllConcreteFunctions( * @return This builder for chaining. */ public Builder clearConcreteFunctions() { - concreteFunctions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); + concreteFunctions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001);; onChanged(); return this; } @@ -8646,25 +8663,24 @@ public Builder clearConcreteFunctions() { */ public Builder addConcreteFunctionsBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); ensureConcreteFunctionsIsMutable(); concreteFunctions_.add(value); + bitField0_ |= 0x00000001; onChanged(); return this; } private org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec functionSpec_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec, org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpecOrBuilder> functionSpecBuilder_; /** * .tensorflow.FunctionSpec function_spec = 2; * @return Whether the functionSpec field is set. */ public boolean hasFunctionSpec() { - return functionSpecBuilder_ != null || functionSpec_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** * .tensorflow.FunctionSpec function_spec = 2; @@ -8686,11 +8702,11 @@ public Builder setFunctionSpec(org.tensorflow.proto.SavedObjectGraphOuterClass.F throw new NullPointerException(); } functionSpec_ = value; - onChanged(); } else { functionSpecBuilder_.setMessage(value); } - + bitField0_ |= 0x00000002; + onChanged(); return this; } /** @@ -8700,11 +8716,11 @@ public Builder setFunctionSpec( org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec.Builder builderForValue) { if (functionSpecBuilder_ == null) { functionSpec_ = builderForValue.build(); - onChanged(); } else { functionSpecBuilder_.setMessage(builderForValue.build()); } - + bitField0_ |= 0x00000002; + onChanged(); return this; } /** @@ -8712,38 +8728,40 @@ public Builder setFunctionSpec( */ public Builder mergeFunctionSpec(org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec value) { if (functionSpecBuilder_ == null) { - if (functionSpec_ != null) { - functionSpec_ = - org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec.newBuilder(functionSpec_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000002) != 0) && + functionSpec_ != null && + functionSpec_ != org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec.getDefaultInstance()) { + getFunctionSpecBuilder().mergeFrom(value); } else { functionSpec_ = value; } - onChanged(); } else { functionSpecBuilder_.mergeFrom(value); } - + if (functionSpec_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } return this; } /** * .tensorflow.FunctionSpec function_spec = 2; */ public Builder clearFunctionSpec() { - if (functionSpecBuilder_ == null) { - functionSpec_ = null; - onChanged(); - } else { - functionSpec_ = null; + bitField0_ = (bitField0_ & ~0x00000002); + functionSpec_ = null; + if (functionSpecBuilder_ != null) { + functionSpecBuilder_.dispose(); functionSpecBuilder_ = null; } - + onChanged(); return this; } /** * .tensorflow.FunctionSpec function_spec = 2; */ public org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec.Builder getFunctionSpecBuilder() { - + bitField0_ |= 0x00000002; onChanged(); return getFunctionSpecFieldBuilder().getBuilder(); } @@ -8761,11 +8779,11 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpecOrBuilder get /** * .tensorflow.FunctionSpec function_spec = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec, org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpecOrBuilder> getFunctionSpecFieldBuilder() { if (functionSpecBuilder_ == null) { - functionSpecBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + functionSpecBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec, org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpecOrBuilder>( getFunctionSpec(), getParentForChildren(), @@ -8774,18 +8792,6 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpecOrBuilder get } return functionSpecBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.SavedFunction) } @@ -8886,12 +8892,21 @@ public interface CapturedTensorOrBuilder extends * Protobuf type {@code tensorflow.CapturedTensor} */ public static final class CapturedTensor extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.CapturedTensor) CapturedTensorOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + CapturedTensor.class.getName()); + } // Use CapturedTensor.newBuilder() to construct. - private CapturedTensor(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CapturedTensor(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private CapturedTensor() { @@ -8899,25 +8914,13 @@ private CapturedTensor() { concreteFunction_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CapturedTensor(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.SavedObjectGraphOuterClass.internal_static_tensorflow_CapturedTensor_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.SavedObjectGraphOuterClass.internal_static_tensorflow_CapturedTensor_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -8925,7 +8928,8 @@ protected java.lang.Object newInstance( } public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; /** *
          * Name of captured tensor
    @@ -8971,7 +8975,8 @@ public java.lang.String getName() {
         }
     
         public static final int CONCRETE_FUNCTION_FIELD_NUMBER = 2;
    -    private volatile java.lang.Object concreteFunction_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object concreteFunction_ = "";
         /**
          * 
          * Name of concrete function which contains the computed graph tensor.
    @@ -9030,11 +9035,11 @@ public final boolean isInitialized() {
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output)
                             throws java.io.IOException {
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(concreteFunction_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, concreteFunction_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(concreteFunction_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 2, concreteFunction_);
           }
           getUnknownFields().writeTo(output);
         }
    @@ -9045,11 +9050,11 @@ public int getSerializedSize() {
           if (size != -1) return size;
     
           size = 0;
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(concreteFunction_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, concreteFunction_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(concreteFunction_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, concreteFunction_);
           }
           size += getUnknownFields().getSerializedSize();
           memoizedSize = size;
    @@ -9124,39 +9129,41 @@ public static org.tensorflow.proto.SavedObjectGraphOuterClass.CapturedTensor par
         }
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.CapturedTensor parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.CapturedTensor parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.CapturedTensor parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.CapturedTensor parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.CapturedTensor parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.CapturedTensor parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -9176,7 +9183,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -9184,7 +9191,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.CapturedTensor}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.CapturedTensor)
             org.tensorflow.proto.SavedObjectGraphOuterClass.CapturedTensorOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -9193,7 +9200,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.SavedObjectGraphOuterClass.internal_static_tensorflow_CapturedTensor_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -9206,17 +9213,16 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             name_ = "";
    -
             concreteFunction_ = "";
    -
             return this;
           }
     
    @@ -9243,44 +9249,21 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.CapturedTensor build() {
           @java.lang.Override
           public org.tensorflow.proto.SavedObjectGraphOuterClass.CapturedTensor buildPartial() {
             org.tensorflow.proto.SavedObjectGraphOuterClass.CapturedTensor result = new org.tensorflow.proto.SavedObjectGraphOuterClass.CapturedTensor(this);
    -        result.name_ = name_;
    -        result.concreteFunction_ = concreteFunction_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.SavedObjectGraphOuterClass.CapturedTensor result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.name_ = name_;
    +        }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.concreteFunction_ = concreteFunction_;
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.SavedObjectGraphOuterClass.CapturedTensor) {
    @@ -9295,10 +9278,12 @@ public Builder mergeFrom(org.tensorflow.proto.SavedObjectGraphOuterClass.Capture
             if (other == org.tensorflow.proto.SavedObjectGraphOuterClass.CapturedTensor.getDefaultInstance()) return this;
             if (!other.getName().isEmpty()) {
               name_ = other.name_;
    +          bitField0_ |= 0x00000001;
               onChanged();
             }
             if (!other.getConcreteFunction().isEmpty()) {
               concreteFunction_ = other.concreteFunction_;
    +          bitField0_ |= 0x00000002;
               onChanged();
             }
             this.mergeUnknownFields(other.getUnknownFields());
    @@ -9329,12 +9314,12 @@ public Builder mergeFrom(
                     break;
                   case 10: {
                     name_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 10
                   case 18: {
                     concreteFunction_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 18
                   default: {
    @@ -9352,6 +9337,7 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    +      private int bitField0_;
     
           private java.lang.Object name_ = "";
           /**
    @@ -9406,11 +9392,9 @@ public java.lang.String getName() {
            */
           public Builder setName(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             name_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -9423,8 +9407,8 @@ public Builder setName(
            * @return This builder for chaining.
            */
           public Builder clearName() {
    -        
             name_ = getDefaultInstance().getName();
    +        bitField0_ = (bitField0_ & ~0x00000001);
             onChanged();
             return this;
           }
    @@ -9439,12 +9423,10 @@ public Builder clearName() {
            */
           public Builder setNameBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             name_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -9502,11 +9484,9 @@ public java.lang.String getConcreteFunction() {
            */
           public Builder setConcreteFunction(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             concreteFunction_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -9519,8 +9499,8 @@ public Builder setConcreteFunction(
            * @return This builder for chaining.
            */
           public Builder clearConcreteFunction() {
    -        
             concreteFunction_ = getDefaultInstance().getConcreteFunction();
    +        bitField0_ = (bitField0_ & ~0x00000002);
             onChanged();
             return this;
           }
    @@ -9535,27 +9515,13 @@ public Builder clearConcreteFunction() {
            */
           public Builder setConcreteFunctionBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             concreteFunction_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.CapturedTensor)
         }
    @@ -9701,45 +9667,45 @@ public interface SavedConcreteFunctionOrBuilder extends
        * Protobuf type {@code tensorflow.SavedConcreteFunction}
        */
       public static final class SavedConcreteFunction extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.SavedConcreteFunction)
           SavedConcreteFunctionOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        SavedConcreteFunction.class.getName());
    +    }
         // Use SavedConcreteFunction.newBuilder() to construct.
    -    private SavedConcreteFunction(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private SavedConcreteFunction(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private SavedConcreteFunction() {
           boundInputs_ = emptyIntList();
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new SavedConcreteFunction();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.SavedObjectGraphOuterClass.internal_static_tensorflow_SavedConcreteFunction_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.SavedObjectGraphOuterClass.internal_static_tensorflow_SavedConcreteFunction_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
                   org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction.class, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction.Builder.class);
         }
     
    +    private int bitField0_;
         public static final int BOUND_INPUTS_FIELD_NUMBER = 2;
    -    private com.google.protobuf.Internal.IntList boundInputs_;
    +    @SuppressWarnings("serial")
    +    private com.google.protobuf.Internal.IntList boundInputs_ =
    +        emptyIntList();
         /**
          * repeated int32 bound_inputs = 2;
          * @return A list containing the boundInputs.
    @@ -9779,7 +9745,7 @@ public int getBoundInputs(int index) {
          */
         @java.lang.Override
         public boolean hasCanonicalizedInputSignature() {
    -      return canonicalizedInputSignature_ != null;
    +      return ((bitField0_ & 0x00000001) != 0);
         }
         /**
          * 
    @@ -9804,7 +9770,7 @@ public org.tensorflow.proto.Struct.StructuredValue getCanonicalizedInputSignatur
          */
         @java.lang.Override
         public org.tensorflow.proto.Struct.StructuredValueOrBuilder getCanonicalizedInputSignatureOrBuilder() {
    -      return getCanonicalizedInputSignature();
    +      return canonicalizedInputSignature_ == null ? org.tensorflow.proto.Struct.StructuredValue.getDefaultInstance() : canonicalizedInputSignature_;
         }
     
         public static final int OUTPUT_SIGNATURE_FIELD_NUMBER = 4;
    @@ -9821,7 +9787,7 @@ public org.tensorflow.proto.Struct.StructuredValueOrBuilder getCanonicalizedInpu
          */
         @java.lang.Override
         public boolean hasOutputSignature() {
    -      return outputSignature_ != null;
    +      return ((bitField0_ & 0x00000002) != 0);
         }
         /**
          * 
    @@ -9848,7 +9814,7 @@ public org.tensorflow.proto.Struct.StructuredValue getOutputSignature() {
          */
         @java.lang.Override
         public org.tensorflow.proto.Struct.StructuredValueOrBuilder getOutputSignatureOrBuilder() {
    -      return getOutputSignature();
    +      return outputSignature_ == null ? org.tensorflow.proto.Struct.StructuredValue.getDefaultInstance() : outputSignature_;
         }
     
         private byte memoizedIsInitialized = -1;
    @@ -9873,10 +9839,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           for (int i = 0; i < boundInputs_.size(); i++) {
             output.writeInt32NoTag(boundInputs_.getInt(i));
           }
    -      if (canonicalizedInputSignature_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             output.writeMessage(3, getCanonicalizedInputSignature());
           }
    -      if (outputSignature_ != null) {
    +      if (((bitField0_ & 0x00000002) != 0)) {
             output.writeMessage(4, getOutputSignature());
           }
           getUnknownFields().writeTo(output);
    @@ -9902,11 +9868,11 @@ public int getSerializedSize() {
             }
             boundInputsMemoizedSerializedSize = dataSize;
           }
    -      if (canonicalizedInputSignature_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(3, getCanonicalizedInputSignature());
           }
    -      if (outputSignature_ != null) {
    +      if (((bitField0_ & 0x00000002) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(4, getOutputSignature());
           }
    @@ -9999,39 +9965,41 @@ public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunct
         }
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -10051,7 +10019,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -10064,7 +10032,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.SavedConcreteFunction}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.SavedConcreteFunction)
             org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunctionOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -10073,7 +10041,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.SavedObjectGraphOuterClass.internal_static_tensorflow_SavedConcreteFunction_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -10082,29 +10050,34 @@ public static final class Builder extends
     
           // Construct using org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction.newBuilder()
           private Builder() {
    -
    +        maybeForceBuilderInitialization();
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
    -
    +        maybeForceBuilderInitialization();
    +      }
    +      private void maybeForceBuilderInitialization() {
    +        if (com.google.protobuf.GeneratedMessage
    +                .alwaysUseFieldBuilders) {
    +          getCanonicalizedInputSignatureFieldBuilder();
    +          getOutputSignatureFieldBuilder();
    +        }
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             boundInputs_ = emptyIntList();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    -        if (canonicalizedInputSignatureBuilder_ == null) {
    -          canonicalizedInputSignature_ = null;
    -        } else {
    -          canonicalizedInputSignature_ = null;
    +        canonicalizedInputSignature_ = null;
    +        if (canonicalizedInputSignatureBuilder_ != null) {
    +          canonicalizedInputSignatureBuilder_.dispose();
               canonicalizedInputSignatureBuilder_ = null;
             }
    -        if (outputSignatureBuilder_ == null) {
    -          outputSignature_ = null;
    -        } else {
    -          outputSignature_ = null;
    +        outputSignature_ = null;
    +        if (outputSignatureBuilder_ != null) {
    +          outputSignatureBuilder_.dispose();
               outputSignatureBuilder_ = null;
             }
             return this;
    @@ -10133,58 +10106,33 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction bui
           @java.lang.Override
           public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction buildPartial() {
             org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction result = new org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction(this);
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        onBuilt();
    +        return result;
    +      }
    +
    +      private void buildPartial0(org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction result) {
             int from_bitField0_ = bitField0_;
    -        if (((bitField0_ & 0x00000001) != 0)) {
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
               boundInputs_.makeImmutable();
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          result.boundInputs_ = boundInputs_;
             }
    -        result.boundInputs_ = boundInputs_;
    -        if (canonicalizedInputSignatureBuilder_ == null) {
    -          result.canonicalizedInputSignature_ = canonicalizedInputSignature_;
    -        } else {
    -          result.canonicalizedInputSignature_ = canonicalizedInputSignatureBuilder_.build();
    +        int to_bitField0_ = 0;
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.canonicalizedInputSignature_ = canonicalizedInputSignatureBuilder_ == null
    +              ? canonicalizedInputSignature_
    +              : canonicalizedInputSignatureBuilder_.build();
    +          to_bitField0_ |= 0x00000001;
             }
    -        if (outputSignatureBuilder_ == null) {
    -          result.outputSignature_ = outputSignature_;
    -        } else {
    -          result.outputSignature_ = outputSignatureBuilder_.build();
    +        if (((from_bitField0_ & 0x00000004) != 0)) {
    +          result.outputSignature_ = outputSignatureBuilder_ == null
    +              ? outputSignature_
    +              : outputSignatureBuilder_.build();
    +          to_bitField0_ |= 0x00000002;
             }
    -        onBuilt();
    -        return result;
    +        result.bitField0_ |= to_bitField0_;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    -      }
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConcreteFunction) {
    @@ -10200,7 +10148,8 @@ public Builder mergeFrom(org.tensorflow.proto.SavedObjectGraphOuterClass.SavedCo
             if (!other.boundInputs_.isEmpty()) {
               if (boundInputs_.isEmpty()) {
                 boundInputs_ = other.boundInputs_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            boundInputs_.makeImmutable();
    +            bitField0_ |= 0x00000001;
               } else {
                 ensureBoundInputsIsMutable();
                 boundInputs_.addAll(other.boundInputs_);
    @@ -10259,14 +10208,14 @@ public Builder mergeFrom(
                     input.readMessage(
                         getCanonicalizedInputSignatureFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 26
                   case 34: {
                     input.readMessage(
                         getOutputSignatureFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00000004;
                     break;
                   } // case 34
                   default: {
    @@ -10288,10 +10237,10 @@ public Builder mergeFrom(
     
           private com.google.protobuf.Internal.IntList boundInputs_ = emptyIntList();
           private void ensureBoundInputsIsMutable() {
    -        if (!((bitField0_ & 0x00000001) != 0)) {
    -          boundInputs_ = mutableCopy(boundInputs_);
    -          bitField0_ |= 0x00000001;
    -         }
    +        if (!boundInputs_.isModifiable()) {
    +          boundInputs_ = makeMutableCopy(boundInputs_);
    +        }
    +        bitField0_ |= 0x00000001;
           }
           /**
            * repeated int32 bound_inputs = 2;
    @@ -10299,8 +10248,8 @@ private void ensureBoundInputsIsMutable() {
            */
           public java.util.List
               getBoundInputsList() {
    -        return ((bitField0_ & 0x00000001) != 0) ?
    -                 java.util.Collections.unmodifiableList(boundInputs_) : boundInputs_;
    +        boundInputs_.makeImmutable();
    +        return boundInputs_;
           }
           /**
            * repeated int32 bound_inputs = 2;
    @@ -10325,8 +10274,10 @@ public int getBoundInputs(int index) {
            */
           public Builder setBoundInputs(
               int index, int value) {
    +
             ensureBoundInputsIsMutable();
             boundInputs_.setInt(index, value);
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -10336,8 +10287,10 @@ public Builder setBoundInputs(
            * @return This builder for chaining.
            */
           public Builder addBoundInputs(int value) {
    +
             ensureBoundInputsIsMutable();
             boundInputs_.addInt(value);
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -10351,6 +10304,7 @@ public Builder addAllBoundInputs(
             ensureBoundInputsIsMutable();
             com.google.protobuf.AbstractMessageLite.Builder.addAll(
                 values, boundInputs_);
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -10366,7 +10320,7 @@ public Builder clearBoundInputs() {
           }
     
           private org.tensorflow.proto.Struct.StructuredValue canonicalizedInputSignature_;
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder> canonicalizedInputSignatureBuilder_;
           /**
            * 
    @@ -10378,7 +10332,7 @@ public Builder clearBoundInputs() {
            * @return Whether the canonicalizedInputSignature field is set.
            */
           public boolean hasCanonicalizedInputSignature() {
    -        return canonicalizedInputSignatureBuilder_ != null || canonicalizedInputSignature_ != null;
    +        return ((bitField0_ & 0x00000002) != 0);
           }
           /**
            * 
    @@ -10410,11 +10364,11 @@ public Builder setCanonicalizedInputSignature(org.tensorflow.proto.Struct.Struct
                 throw new NullPointerException();
               }
               canonicalizedInputSignature_ = value;
    -          onChanged();
             } else {
               canonicalizedInputSignatureBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000002;
    +        onChanged();
             return this;
           }
           /**
    @@ -10429,11 +10383,11 @@ public Builder setCanonicalizedInputSignature(
               org.tensorflow.proto.Struct.StructuredValue.Builder builderForValue) {
             if (canonicalizedInputSignatureBuilder_ == null) {
               canonicalizedInputSignature_ = builderForValue.build();
    -          onChanged();
             } else {
               canonicalizedInputSignatureBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000002;
    +        onChanged();
             return this;
           }
           /**
    @@ -10446,17 +10400,20 @@ public Builder setCanonicalizedInputSignature(
            */
           public Builder mergeCanonicalizedInputSignature(org.tensorflow.proto.Struct.StructuredValue value) {
             if (canonicalizedInputSignatureBuilder_ == null) {
    -          if (canonicalizedInputSignature_ != null) {
    -            canonicalizedInputSignature_ =
    -              org.tensorflow.proto.Struct.StructuredValue.newBuilder(canonicalizedInputSignature_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000002) != 0) &&
    +            canonicalizedInputSignature_ != null &&
    +            canonicalizedInputSignature_ != org.tensorflow.proto.Struct.StructuredValue.getDefaultInstance()) {
    +            getCanonicalizedInputSignatureBuilder().mergeFrom(value);
               } else {
                 canonicalizedInputSignature_ = value;
               }
    -          onChanged();
             } else {
               canonicalizedInputSignatureBuilder_.mergeFrom(value);
             }
    -
    +        if (canonicalizedInputSignature_ != null) {
    +          bitField0_ |= 0x00000002;
    +          onChanged();
    +        }
             return this;
           }
           /**
    @@ -10465,17 +10422,16 @@ public Builder mergeCanonicalizedInputSignature(org.tensorflow.proto.Struct.Stru
            * function.
            * 
    * - * .tensorflow.StructuredValue canonicalized_input_signature = 3; - */ - public Builder clearCanonicalizedInputSignature() { - if (canonicalizedInputSignatureBuilder_ == null) { - canonicalizedInputSignature_ = null; - onChanged(); - } else { - canonicalizedInputSignature_ = null; + * .tensorflow.StructuredValue canonicalized_input_signature = 3; + */ + public Builder clearCanonicalizedInputSignature() { + bitField0_ = (bitField0_ & ~0x00000002); + canonicalizedInputSignature_ = null; + if (canonicalizedInputSignatureBuilder_ != null) { + canonicalizedInputSignatureBuilder_.dispose(); canonicalizedInputSignatureBuilder_ = null; } - + onChanged(); return this; } /** @@ -10487,7 +10443,7 @@ public Builder clearCanonicalizedInputSignature() { * .tensorflow.StructuredValue canonicalized_input_signature = 3; */ public org.tensorflow.proto.Struct.StructuredValue.Builder getCanonicalizedInputSignatureBuilder() { - + bitField0_ |= 0x00000002; onChanged(); return getCanonicalizedInputSignatureFieldBuilder().getBuilder(); } @@ -10515,11 +10471,11 @@ public org.tensorflow.proto.Struct.StructuredValueOrBuilder getCanonicalizedInpu * * .tensorflow.StructuredValue canonicalized_input_signature = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder> getCanonicalizedInputSignatureFieldBuilder() { if (canonicalizedInputSignatureBuilder_ == null) { - canonicalizedInputSignatureBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + canonicalizedInputSignatureBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder>( getCanonicalizedInputSignature(), getParentForChildren(), @@ -10530,7 +10486,7 @@ public org.tensorflow.proto.Struct.StructuredValueOrBuilder getCanonicalizedInpu } private org.tensorflow.proto.Struct.StructuredValue outputSignature_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder> outputSignatureBuilder_; /** *
    @@ -10543,7 +10499,7 @@ public org.tensorflow.proto.Struct.StructuredValueOrBuilder getCanonicalizedInpu
            * @return Whether the outputSignature field is set.
            */
           public boolean hasOutputSignature() {
    -        return outputSignatureBuilder_ != null || outputSignature_ != null;
    +        return ((bitField0_ & 0x00000004) != 0);
           }
           /**
            * 
    @@ -10577,11 +10533,11 @@ public Builder setOutputSignature(org.tensorflow.proto.Struct.StructuredValue va
                 throw new NullPointerException();
               }
               outputSignature_ = value;
    -          onChanged();
             } else {
               outputSignatureBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000004;
    +        onChanged();
             return this;
           }
           /**
    @@ -10597,11 +10553,11 @@ public Builder setOutputSignature(
               org.tensorflow.proto.Struct.StructuredValue.Builder builderForValue) {
             if (outputSignatureBuilder_ == null) {
               outputSignature_ = builderForValue.build();
    -          onChanged();
             } else {
               outputSignatureBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000004;
    +        onChanged();
             return this;
           }
           /**
    @@ -10615,17 +10571,20 @@ public Builder setOutputSignature(
            */
           public Builder mergeOutputSignature(org.tensorflow.proto.Struct.StructuredValue value) {
             if (outputSignatureBuilder_ == null) {
    -          if (outputSignature_ != null) {
    -            outputSignature_ =
    -              org.tensorflow.proto.Struct.StructuredValue.newBuilder(outputSignature_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000004) != 0) &&
    +            outputSignature_ != null &&
    +            outputSignature_ != org.tensorflow.proto.Struct.StructuredValue.getDefaultInstance()) {
    +            getOutputSignatureBuilder().mergeFrom(value);
               } else {
                 outputSignature_ = value;
               }
    -          onChanged();
             } else {
               outputSignatureBuilder_.mergeFrom(value);
             }
    -
    +        if (outputSignature_ != null) {
    +          bitField0_ |= 0x00000004;
    +          onChanged();
    +        }
             return this;
           }
           /**
    @@ -10638,14 +10597,13 @@ public Builder mergeOutputSignature(org.tensorflow.proto.Struct.StructuredValue
            * .tensorflow.StructuredValue output_signature = 4;
            */
           public Builder clearOutputSignature() {
    -        if (outputSignatureBuilder_ == null) {
    -          outputSignature_ = null;
    -          onChanged();
    -        } else {
    -          outputSignature_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000004);
    +        outputSignature_ = null;
    +        if (outputSignatureBuilder_ != null) {
    +          outputSignatureBuilder_.dispose();
               outputSignatureBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
    @@ -10658,7 +10616,7 @@ public Builder clearOutputSignature() {
            * .tensorflow.StructuredValue output_signature = 4;
            */
           public org.tensorflow.proto.Struct.StructuredValue.Builder getOutputSignatureBuilder() {
    -        
    +        bitField0_ |= 0x00000004;
             onChanged();
             return getOutputSignatureFieldBuilder().getBuilder();
           }
    @@ -10688,11 +10646,11 @@ public org.tensorflow.proto.Struct.StructuredValueOrBuilder getOutputSignatureOr
            *
            * .tensorflow.StructuredValue output_signature = 4;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder> 
               getOutputSignatureFieldBuilder() {
             if (outputSignatureBuilder_ == null) {
    -          outputSignatureBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          outputSignatureBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder>(
                       getOutputSignature(),
                       getParentForChildren(),
    @@ -10701,18 +10659,6 @@ public org.tensorflow.proto.Struct.StructuredValueOrBuilder getOutputSignatureOr
             }
             return outputSignatureBuilder_;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.SavedConcreteFunction)
         }
    @@ -10886,46 +10832,46 @@ public interface SavedBareConcreteFunctionOrBuilder extends
        * Protobuf type {@code tensorflow.SavedBareConcreteFunction}
        */
       public static final class SavedBareConcreteFunction extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.SavedBareConcreteFunction)
           SavedBareConcreteFunctionOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        SavedBareConcreteFunction.class.getName());
    +    }
         // Use SavedBareConcreteFunction.newBuilder() to construct.
    -    private SavedBareConcreteFunction(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private SavedBareConcreteFunction(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private SavedBareConcreteFunction() {
           concreteFunctionName_ = "";
    -      argumentKeywords_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -    }
    -
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new SavedBareConcreteFunction();
    +      argumentKeywords_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
         }
     
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.SavedObjectGraphOuterClass.internal_static_tensorflow_SavedBareConcreteFunction_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.SavedObjectGraphOuterClass.internal_static_tensorflow_SavedBareConcreteFunction_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
                   org.tensorflow.proto.SavedObjectGraphOuterClass.SavedBareConcreteFunction.class, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedBareConcreteFunction.Builder.class);
         }
     
    +    private int bitField0_;
         public static final int CONCRETE_FUNCTION_NAME_FIELD_NUMBER = 1;
    -    private volatile java.lang.Object concreteFunctionName_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object concreteFunctionName_ = "";
         /**
          * 
          * Identifies a SavedConcreteFunction.
    @@ -10971,7 +10917,9 @@ public java.lang.String getConcreteFunctionName() {
         }
     
         public static final int ARGUMENT_KEYWORDS_FIELD_NUMBER = 2;
    -    private com.google.protobuf.LazyStringList argumentKeywords_;
    +    @SuppressWarnings("serial")
    +    private com.google.protobuf.LazyStringArrayList argumentKeywords_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         /**
          * 
          * A sequence of unique strings, one per Tensor argument.
    @@ -11022,7 +10970,7 @@ public java.lang.String getArgumentKeywords(int index) {
         }
     
         public static final int ALLOWED_POSITIONAL_ARGUMENTS_FIELD_NUMBER = 3;
    -    private long allowedPositionalArguments_;
    +    private long allowedPositionalArguments_ = 0L;
         /**
          * 
          * The prefix of `argument_keywords` which may be identified by position.
    @@ -11053,7 +11001,7 @@ public long getAllowedPositionalArguments() {
          */
         @java.lang.Override
         public boolean hasFunctionSpec() {
    -      return functionSpec_ != null;
    +      return ((bitField0_ & 0x00000001) != 0);
         }
         /**
          * 
    @@ -11086,7 +11034,7 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec getFunctionS
          */
         @java.lang.Override
         public org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpecOrBuilder getFunctionSpecOrBuilder() {
    -      return getFunctionSpec();
    +      return functionSpec_ == null ? org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec.getDefaultInstance() : functionSpec_;
         }
     
         private byte memoizedIsInitialized = -1;
    @@ -11103,16 +11051,16 @@ public final boolean isInitialized() {
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output)
                             throws java.io.IOException {
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(concreteFunctionName_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, concreteFunctionName_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(concreteFunctionName_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 1, concreteFunctionName_);
           }
           for (int i = 0; i < argumentKeywords_.size(); i++) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, argumentKeywords_.getRaw(i));
    +        com.google.protobuf.GeneratedMessage.writeString(output, 2, argumentKeywords_.getRaw(i));
           }
           if (allowedPositionalArguments_ != 0L) {
             output.writeInt64(3, allowedPositionalArguments_);
           }
    -      if (functionSpec_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             output.writeMessage(4, getFunctionSpec());
           }
           getUnknownFields().writeTo(output);
    @@ -11124,8 +11072,8 @@ public int getSerializedSize() {
           if (size != -1) return size;
     
           size = 0;
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(concreteFunctionName_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, concreteFunctionName_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(concreteFunctionName_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, concreteFunctionName_);
           }
           {
             int dataSize = 0;
    @@ -11139,7 +11087,7 @@ public int getSerializedSize() {
             size += com.google.protobuf.CodedOutputStream
               .computeInt64Size(3, allowedPositionalArguments_);
           }
    -      if (functionSpec_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(4, getFunctionSpec());
           }
    @@ -11232,39 +11180,41 @@ public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedBareConcreteF
         }
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedBareConcreteFunction parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedBareConcreteFunction parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedBareConcreteFunction parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedBareConcreteFunction parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedBareConcreteFunction parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedBareConcreteFunction parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -11284,7 +11234,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -11292,7 +11242,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.SavedBareConcreteFunction}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.SavedBareConcreteFunction)
             org.tensorflow.proto.SavedObjectGraphOuterClass.SavedBareConcreteFunctionOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -11301,7 +11251,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.SavedObjectGraphOuterClass.internal_static_tensorflow_SavedBareConcreteFunction_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -11310,27 +11260,31 @@ public static final class Builder extends
     
           // Construct using org.tensorflow.proto.SavedObjectGraphOuterClass.SavedBareConcreteFunction.newBuilder()
           private Builder() {
    -
    +        maybeForceBuilderInitialization();
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
    -
    +        maybeForceBuilderInitialization();
    +      }
    +      private void maybeForceBuilderInitialization() {
    +        if (com.google.protobuf.GeneratedMessage
    +                .alwaysUseFieldBuilders) {
    +          getFunctionSpecFieldBuilder();
    +        }
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             concreteFunctionName_ = "";
    -
    -        argumentKeywords_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        argumentKeywords_ =
    +            com.google.protobuf.LazyStringArrayList.emptyList();
             allowedPositionalArguments_ = 0L;
    -
    -        if (functionSpecBuilder_ == null) {
    -          functionSpec_ = null;
    -        } else {
    -          functionSpec_ = null;
    +        functionSpec_ = null;
    +        if (functionSpecBuilder_ != null) {
    +          functionSpecBuilder_.dispose();
               functionSpecBuilder_ = null;
             }
             return this;
    @@ -11359,55 +11313,33 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedBareConcreteFunction
           @java.lang.Override
           public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedBareConcreteFunction buildPartial() {
             org.tensorflow.proto.SavedObjectGraphOuterClass.SavedBareConcreteFunction result = new org.tensorflow.proto.SavedObjectGraphOuterClass.SavedBareConcreteFunction(this);
    -        int from_bitField0_ = bitField0_;
    -        result.concreteFunctionName_ = concreteFunctionName_;
    -        if (((bitField0_ & 0x00000001) != 0)) {
    -          argumentKeywords_ = argumentKeywords_.getUnmodifiableView();
    -          bitField0_ = (bitField0_ & ~0x00000001);
    -        }
    -        result.argumentKeywords_ = argumentKeywords_;
    -        result.allowedPositionalArguments_ = allowedPositionalArguments_;
    -        if (functionSpecBuilder_ == null) {
    -          result.functionSpec_ = functionSpec_;
    -        } else {
    -          result.functionSpec_ = functionSpecBuilder_.build();
    -        }
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.SavedObjectGraphOuterClass.SavedBareConcreteFunction result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.concreteFunctionName_ = concreteFunctionName_;
    +        }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          argumentKeywords_.makeImmutable();
    +          result.argumentKeywords_ = argumentKeywords_;
    +        }
    +        if (((from_bitField0_ & 0x00000004) != 0)) {
    +          result.allowedPositionalArguments_ = allowedPositionalArguments_;
    +        }
    +        int to_bitField0_ = 0;
    +        if (((from_bitField0_ & 0x00000008) != 0)) {
    +          result.functionSpec_ = functionSpecBuilder_ == null
    +              ? functionSpec_
    +              : functionSpecBuilder_.build();
    +          to_bitField0_ |= 0x00000001;
    +        }
    +        result.bitField0_ |= to_bitField0_;
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.SavedObjectGraphOuterClass.SavedBareConcreteFunction) {
    @@ -11422,12 +11354,13 @@ public Builder mergeFrom(org.tensorflow.proto.SavedObjectGraphOuterClass.SavedBa
             if (other == org.tensorflow.proto.SavedObjectGraphOuterClass.SavedBareConcreteFunction.getDefaultInstance()) return this;
             if (!other.getConcreteFunctionName().isEmpty()) {
               concreteFunctionName_ = other.concreteFunctionName_;
    +          bitField0_ |= 0x00000001;
               onChanged();
             }
             if (!other.argumentKeywords_.isEmpty()) {
               if (argumentKeywords_.isEmpty()) {
                 argumentKeywords_ = other.argumentKeywords_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ |= 0x00000002;
               } else {
                 ensureArgumentKeywordsIsMutable();
                 argumentKeywords_.addAll(other.argumentKeywords_);
    @@ -11468,7 +11401,7 @@ public Builder mergeFrom(
                     break;
                   case 10: {
                     concreteFunctionName_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 10
                   case 18: {
    @@ -11479,14 +11412,14 @@ public Builder mergeFrom(
                   } // case 18
                   case 24: {
                     allowedPositionalArguments_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000004;
                     break;
                   } // case 24
                   case 34: {
                     input.readMessage(
                         getFunctionSpecFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00000008;
                     break;
                   } // case 34
                   default: {
    @@ -11559,11 +11492,9 @@ public java.lang.String getConcreteFunctionName() {
            */
           public Builder setConcreteFunctionName(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             concreteFunctionName_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -11576,8 +11507,8 @@ public Builder setConcreteFunctionName(
            * @return This builder for chaining.
            */
           public Builder clearConcreteFunctionName() {
    -        
             concreteFunctionName_ = getDefaultInstance().getConcreteFunctionName();
    +        bitField0_ = (bitField0_ & ~0x00000001);
             onChanged();
             return this;
           }
    @@ -11592,22 +11523,21 @@ public Builder clearConcreteFunctionName() {
            */
           public Builder setConcreteFunctionNameBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             concreteFunctionName_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
     
    -      private com.google.protobuf.LazyStringList argumentKeywords_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +      private com.google.protobuf.LazyStringArrayList argumentKeywords_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
           private void ensureArgumentKeywordsIsMutable() {
    -        if (!((bitField0_ & 0x00000001) != 0)) {
    +        if (!argumentKeywords_.isModifiable()) {
               argumentKeywords_ = new com.google.protobuf.LazyStringArrayList(argumentKeywords_);
    -          bitField0_ |= 0x00000001;
    -         }
    +        }
    +        bitField0_ |= 0x00000002;
           }
           /**
            * 
    @@ -11619,7 +11549,8 @@ private void ensureArgumentKeywordsIsMutable() {
            */
           public com.google.protobuf.ProtocolStringList
               getArgumentKeywordsList() {
    -        return argumentKeywords_.getUnmodifiableView();
    +        argumentKeywords_.makeImmutable();
    +        return argumentKeywords_;
           }
           /**
            * 
    @@ -11669,11 +11600,10 @@ public java.lang.String getArgumentKeywords(int index) {
            */
           public Builder setArgumentKeywords(
               int index, java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureArgumentKeywordsIsMutable();
    +        if (value == null) { throw new NullPointerException(); }
    +        ensureArgumentKeywordsIsMutable();
             argumentKeywords_.set(index, value);
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -11688,11 +11618,10 @@ public Builder setArgumentKeywords(
            */
           public Builder addArgumentKeywords(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureArgumentKeywordsIsMutable();
    +        if (value == null) { throw new NullPointerException(); }
    +        ensureArgumentKeywordsIsMutable();
             argumentKeywords_.add(value);
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -11710,6 +11639,7 @@ public Builder addAllArgumentKeywords(
             ensureArgumentKeywordsIsMutable();
             com.google.protobuf.AbstractMessageLite.Builder.addAll(
                 values, argumentKeywords_);
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -11722,8 +11652,9 @@ public Builder addAllArgumentKeywords(
            * @return This builder for chaining.
            */
           public Builder clearArgumentKeywords() {
    -        argumentKeywords_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        argumentKeywords_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
    +        bitField0_ = (bitField0_ & ~0x00000002);;
             onChanged();
             return this;
           }
    @@ -11738,12 +11669,11 @@ public Builder clearArgumentKeywords() {
            */
           public Builder addArgumentKeywordsBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             ensureArgumentKeywordsIsMutable();
             argumentKeywords_.add(value);
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -11771,8 +11701,9 @@ public long getAllowedPositionalArguments() {
            * @return This builder for chaining.
            */
           public Builder setAllowedPositionalArguments(long value) {
    -        
    +
             allowedPositionalArguments_ = value;
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -11785,14 +11716,14 @@ public Builder setAllowedPositionalArguments(long value) {
            * @return This builder for chaining.
            */
           public Builder clearAllowedPositionalArguments() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000004);
             allowedPositionalArguments_ = 0L;
             onChanged();
             return this;
           }
     
           private org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec functionSpec_;
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec, org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpecOrBuilder> functionSpecBuilder_;
           /**
            * 
    @@ -11808,7 +11739,7 @@ public Builder clearAllowedPositionalArguments() {
            * @return Whether the functionSpec field is set.
            */
           public boolean hasFunctionSpec() {
    -        return functionSpecBuilder_ != null || functionSpec_ != null;
    +        return ((bitField0_ & 0x00000008) != 0);
           }
           /**
            * 
    @@ -11848,11 +11779,11 @@ public Builder setFunctionSpec(org.tensorflow.proto.SavedObjectGraphOuterClass.F
                 throw new NullPointerException();
               }
               functionSpec_ = value;
    -          onChanged();
             } else {
               functionSpecBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000008;
    +        onChanged();
             return this;
           }
           /**
    @@ -11871,11 +11802,11 @@ public Builder setFunctionSpec(
               org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec.Builder builderForValue) {
             if (functionSpecBuilder_ == null) {
               functionSpec_ = builderForValue.build();
    -          onChanged();
             } else {
               functionSpecBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000008;
    +        onChanged();
             return this;
           }
           /**
    @@ -11892,17 +11823,20 @@ public Builder setFunctionSpec(
            */
           public Builder mergeFunctionSpec(org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec value) {
             if (functionSpecBuilder_ == null) {
    -          if (functionSpec_ != null) {
    -            functionSpec_ =
    -              org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec.newBuilder(functionSpec_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000008) != 0) &&
    +            functionSpec_ != null &&
    +            functionSpec_ != org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec.getDefaultInstance()) {
    +            getFunctionSpecBuilder().mergeFrom(value);
               } else {
                 functionSpec_ = value;
               }
    -          onChanged();
             } else {
               functionSpecBuilder_.mergeFrom(value);
             }
    -
    +        if (functionSpec_ != null) {
    +          bitField0_ |= 0x00000008;
    +          onChanged();
    +        }
             return this;
           }
           /**
    @@ -11918,14 +11852,13 @@ public Builder mergeFunctionSpec(org.tensorflow.proto.SavedObjectGraphOuterClass
            * .tensorflow.FunctionSpec function_spec = 4;
            */
           public Builder clearFunctionSpec() {
    -        if (functionSpecBuilder_ == null) {
    -          functionSpec_ = null;
    -          onChanged();
    -        } else {
    -          functionSpec_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000008);
    +        functionSpec_ = null;
    +        if (functionSpecBuilder_ != null) {
    +          functionSpecBuilder_.dispose();
               functionSpecBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
    @@ -11941,7 +11874,7 @@ public Builder clearFunctionSpec() {
            * .tensorflow.FunctionSpec function_spec = 4;
            */
           public org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec.Builder getFunctionSpecBuilder() {
    -        
    +        bitField0_ |= 0x00000008;
             onChanged();
             return getFunctionSpecFieldBuilder().getBuilder();
           }
    @@ -11977,11 +11910,11 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpecOrBuilder get
            *
            * .tensorflow.FunctionSpec function_spec = 4;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec, org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpecOrBuilder> 
               getFunctionSpecFieldBuilder() {
             if (functionSpecBuilder_ == null) {
    -          functionSpecBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          functionSpecBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec, org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpecOrBuilder>(
                       getFunctionSpec(),
                       getParentForChildren(),
    @@ -11990,18 +11923,6 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpecOrBuilder get
             }
             return functionSpecBuilder_;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.SavedBareConcreteFunction)
         }
    @@ -12082,37 +12003,34 @@ public interface SavedConstantOrBuilder extends
        * Protobuf type {@code tensorflow.SavedConstant}
        */
       public static final class SavedConstant extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.SavedConstant)
           SavedConstantOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        SavedConstant.class.getName());
    +    }
         // Use SavedConstant.newBuilder() to construct.
    -    private SavedConstant(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private SavedConstant(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private SavedConstant() {
           operation_ = "";
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new SavedConstant();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.SavedObjectGraphOuterClass.internal_static_tensorflow_SavedConstant_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.SavedObjectGraphOuterClass.internal_static_tensorflow_SavedConstant_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -12120,7 +12038,8 @@ protected java.lang.Object newInstance(
         }
     
         public static final int OPERATION_FIELD_NUMBER = 1;
    -    private volatile java.lang.Object operation_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object operation_ = "";
         /**
          * 
          * An Operation name for a ConstantOp in this SavedObjectGraph's MetaGraph.
    @@ -12179,8 +12098,8 @@ public final boolean isInitialized() {
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output)
                             throws java.io.IOException {
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operation_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, operation_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(operation_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 1, operation_);
           }
           getUnknownFields().writeTo(output);
         }
    @@ -12191,8 +12110,8 @@ public int getSerializedSize() {
           if (size != -1) return size;
     
           size = 0;
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operation_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, operation_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(operation_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, operation_);
           }
           size += getUnknownFields().getSerializedSize();
           memoizedSize = size;
    @@ -12263,39 +12182,41 @@ public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConstant pars
         }
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConstant parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConstant parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConstant parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConstant parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConstant parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConstant parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -12315,7 +12236,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -12323,7 +12244,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.SavedConstant}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.SavedConstant)
             org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConstantOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -12332,7 +12253,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.SavedObjectGraphOuterClass.internal_static_tensorflow_SavedConstant_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -12345,15 +12266,15 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             operation_ = "";
    -
             return this;
           }
     
    @@ -12380,43 +12301,18 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConstant build() {
           @java.lang.Override
           public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConstant buildPartial() {
             org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConstant result = new org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConstant(this);
    -        result.operation_ = operation_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConstant result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.operation_ = operation_;
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConstant) {
    @@ -12431,6 +12327,7 @@ public Builder mergeFrom(org.tensorflow.proto.SavedObjectGraphOuterClass.SavedCo
             if (other == org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConstant.getDefaultInstance()) return this;
             if (!other.getOperation().isEmpty()) {
               operation_ = other.operation_;
    +          bitField0_ |= 0x00000001;
               onChanged();
             }
             this.mergeUnknownFields(other.getUnknownFields());
    @@ -12461,7 +12358,7 @@ public Builder mergeFrom(
                     break;
                   case 10: {
                     operation_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 10
                   default: {
    @@ -12479,6 +12376,7 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    +      private int bitField0_;
     
           private java.lang.Object operation_ = "";
           /**
    @@ -12533,11 +12431,9 @@ public java.lang.String getOperation() {
            */
           public Builder setOperation(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             operation_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -12550,8 +12446,8 @@ public Builder setOperation(
            * @return This builder for chaining.
            */
           public Builder clearOperation() {
    -        
             operation_ = getDefaultInstance().getOperation();
    +        bitField0_ = (bitField0_ & ~0x00000001);
             onChanged();
             return this;
           }
    @@ -12566,27 +12462,13 @@ public Builder clearOperation() {
            */
           public Builder setOperationBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             operation_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.SavedConstant)
         }
    @@ -12724,8 +12606,10 @@ public interface SavedVariableOrBuilder extends
         /**
          * 
          * List of component variables for a distributed variable.
    +     *
          * When this field is non-empty, the SavedVariable will be assumed
          * to be a distributed variable defined by the components listed here.
    +     *
          * This is only supported by experimental loaders at the moment.
          * 
    * @@ -12736,8 +12620,10 @@ public interface SavedVariableOrBuilder extends /** *
          * List of component variables for a distributed variable.
    +     *
          * When this field is non-empty, the SavedVariable will be assumed
          * to be a distributed variable defined by the components listed here.
    +     *
          * This is only supported by experimental loaders at the moment.
          * 
    * @@ -12747,8 +12633,10 @@ public interface SavedVariableOrBuilder extends /** *
          * List of component variables for a distributed variable.
    +     *
          * When this field is non-empty, the SavedVariable will be assumed
          * to be a distributed variable defined by the components listed here.
    +     *
          * This is only supported by experimental loaders at the moment.
          * 
    * @@ -12758,8 +12646,10 @@ public interface SavedVariableOrBuilder extends /** *
          * List of component variables for a distributed variable.
    +     *
          * When this field is non-empty, the SavedVariable will be assumed
          * to be a distributed variable defined by the components listed here.
    +     *
          * This is only supported by experimental loaders at the moment.
          * 
    * @@ -12770,8 +12660,10 @@ public interface SavedVariableOrBuilder extends /** *
          * List of component variables for a distributed variable.
    +     *
          * When this field is non-empty, the SavedVariable will be assumed
          * to be a distributed variable defined by the components listed here.
    +     *
          * This is only supported by experimental loaders at the moment.
          * 
    * @@ -12789,12 +12681,21 @@ org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariableOrBuilder getExperi * Protobuf type {@code tensorflow.SavedVariable} */ public static final class SavedVariable extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.SavedVariable) SavedVariableOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + SavedVariable.class.getName()); + } // Use SavedVariable.newBuilder() to construct. - private SavedVariable(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private SavedVariable(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private SavedVariable() { @@ -12806,33 +12707,22 @@ private SavedVariable() { experimentalDistributedVariableComponents_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SavedVariable(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.SavedObjectGraphOuterClass.internal_static_tensorflow_SavedVariable_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.SavedObjectGraphOuterClass.internal_static_tensorflow_SavedVariable_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable.class, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable.Builder.class); } + private int bitField0_; public static final int DTYPE_FIELD_NUMBER = 1; - private int dtype_; + private int dtype_ = 0; /** * .tensorflow.DataType dtype = 1; * @return The enum numeric value on the wire for dtype. @@ -12845,8 +12735,7 @@ protected java.lang.Object newInstance( * @return The dtype. */ @java.lang.Override public org.tensorflow.proto.DataType getDtype() { - @SuppressWarnings("deprecation") - org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(dtype_); + org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(dtype_); return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result; } @@ -12858,7 +12747,7 @@ protected java.lang.Object newInstance( */ @java.lang.Override public boolean hasShape() { - return shape_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * .tensorflow.TensorShapeProto shape = 2; @@ -12873,11 +12762,11 @@ public org.tensorflow.proto.TensorShapeProto getShape() { */ @java.lang.Override public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() { - return getShape(); + return shape_ == null ? org.tensorflow.proto.TensorShapeProto.getDefaultInstance() : shape_; } public static final int TRAINABLE_FIELD_NUMBER = 3; - private boolean trainable_; + private boolean trainable_ = false; /** * bool trainable = 3; * @return The trainable. @@ -12888,7 +12777,7 @@ public boolean getTrainable() { } public static final int SYNCHRONIZATION_FIELD_NUMBER = 4; - private int synchronization_; + private int synchronization_ = 0; /** * .tensorflow.VariableSynchronization synchronization = 4; * @return The enum numeric value on the wire for synchronization. @@ -12901,13 +12790,12 @@ public boolean getTrainable() { * @return The synchronization. */ @java.lang.Override public org.tensorflow.proto.VariableSynchronization getSynchronization() { - @SuppressWarnings("deprecation") - org.tensorflow.proto.VariableSynchronization result = org.tensorflow.proto.VariableSynchronization.valueOf(synchronization_); + org.tensorflow.proto.VariableSynchronization result = org.tensorflow.proto.VariableSynchronization.forNumber(synchronization_); return result == null ? org.tensorflow.proto.VariableSynchronization.UNRECOGNIZED : result; } public static final int AGGREGATION_FIELD_NUMBER = 5; - private int aggregation_; + private int aggregation_ = 0; /** * .tensorflow.VariableAggregation aggregation = 5; * @return The enum numeric value on the wire for aggregation. @@ -12920,13 +12808,13 @@ public boolean getTrainable() { * @return The aggregation. */ @java.lang.Override public org.tensorflow.proto.VariableAggregation getAggregation() { - @SuppressWarnings("deprecation") - org.tensorflow.proto.VariableAggregation result = org.tensorflow.proto.VariableAggregation.valueOf(aggregation_); + org.tensorflow.proto.VariableAggregation result = org.tensorflow.proto.VariableAggregation.forNumber(aggregation_); return result == null ? org.tensorflow.proto.VariableAggregation.UNRECOGNIZED : result; } public static final int NAME_FIELD_NUMBER = 6; - private volatile java.lang.Object name_; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; /** * string name = 6; * @return The name. @@ -12964,7 +12852,8 @@ public java.lang.String getName() { } public static final int DEVICE_FIELD_NUMBER = 7; - private volatile java.lang.Object device_; + @SuppressWarnings("serial") + private volatile java.lang.Object device_ = ""; /** * string device = 7; * @return The device. @@ -13002,12 +12891,15 @@ public java.lang.String getDevice() { } public static final int EXPERIMENTAL_DISTRIBUTED_VARIABLE_COMPONENTS_FIELD_NUMBER = 8; + @SuppressWarnings("serial") private java.util.List experimentalDistributedVariableComponents_; /** *
          * List of component variables for a distributed variable.
    +     *
          * When this field is non-empty, the SavedVariable will be assumed
          * to be a distributed variable defined by the components listed here.
    +     *
          * This is only supported by experimental loaders at the moment.
          * 
    * @@ -13020,8 +12912,10 @@ public java.util.List * List of component variables for a distributed variable. + * * When this field is non-empty, the SavedVariable will be assumed * to be a distributed variable defined by the components listed here. + * * This is only supported by experimental loaders at the moment. *
    * @@ -13035,8 +12929,10 @@ public java.util.List * List of component variables for a distributed variable. + * * When this field is non-empty, the SavedVariable will be assumed * to be a distributed variable defined by the components listed here. + * * This is only supported by experimental loaders at the moment. *
    * @@ -13049,8 +12945,10 @@ public int getExperimentalDistributedVariableComponentsCount() { /** *
          * List of component variables for a distributed variable.
    +     *
          * When this field is non-empty, the SavedVariable will be assumed
          * to be a distributed variable defined by the components listed here.
    +     *
          * This is only supported by experimental loaders at the moment.
          * 
    * @@ -13063,8 +12961,10 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable getExperime /** *
          * List of component variables for a distributed variable.
    +     *
          * When this field is non-empty, the SavedVariable will be assumed
          * to be a distributed variable defined by the components listed here.
    +     *
          * This is only supported by experimental loaders at the moment.
          * 
    * @@ -13093,7 +12993,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (dtype_ != org.tensorflow.proto.DataType.DT_INVALID.getNumber()) { output.writeEnum(1, dtype_); } - if (shape_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getShape()); } if (trainable_ != false) { @@ -13105,11 +13005,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (aggregation_ != org.tensorflow.proto.VariableAggregation.VARIABLE_AGGREGATION_NONE.getNumber()) { output.writeEnum(5, aggregation_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, name_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, name_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(device_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, device_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(device_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, device_); } for (int i = 0; i < experimentalDistributedVariableComponents_.size(); i++) { output.writeMessage(8, experimentalDistributedVariableComponents_.get(i)); @@ -13127,7 +13027,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, dtype_); } - if (shape_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getShape()); } @@ -13143,11 +13043,11 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeEnumSize(5, aggregation_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, name_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, name_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(device_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, device_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(device_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, device_); } for (int i = 0; i < experimentalDistributedVariableComponents_.size(); i++) { size += com.google.protobuf.CodedOutputStream @@ -13255,39 +13155,41 @@ public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable pars } public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -13307,7 +13209,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -13320,7 +13222,7 @@ protected Builder newBuilderForType( * Protobuf type {@code tensorflow.SavedVariable} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.SavedVariable) org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariableOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -13329,7 +13231,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.SavedObjectGraphOuterClass.internal_static_tensorflow_SavedVariable_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -13338,42 +13240,43 @@ public static final class Builder extends // Construct using org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable.newBuilder() private Builder() { - + maybeForceBuilderInitialization(); } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getShapeFieldBuilder(); + getExperimentalDistributedVariableComponentsFieldBuilder(); + } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; dtype_ = 0; - - if (shapeBuilder_ == null) { - shape_ = null; - } else { - shape_ = null; + shape_ = null; + if (shapeBuilder_ != null) { + shapeBuilder_.dispose(); shapeBuilder_ = null; } trainable_ = false; - synchronization_ = 0; - aggregation_ = 0; - name_ = ""; - device_ = ""; - if (experimentalDistributedVariableComponentsBuilder_ == null) { experimentalDistributedVariableComponents_ = java.util.Collections.emptyList(); } else { experimentalDistributedVariableComponents_ = null; experimentalDistributedVariableComponentsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000080); return this; } @@ -13400,63 +13303,54 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable build() { @java.lang.Override public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable buildPartial() { org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable result = new org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable(this); - int from_bitField0_ = bitField0_; - result.dtype_ = dtype_; - if (shapeBuilder_ == null) { - result.shape_ = shape_; - } else { - result.shape_ = shapeBuilder_.build(); - } - result.trainable_ = trainable_; - result.synchronization_ = synchronization_; - result.aggregation_ = aggregation_; - result.name_ = name_; - result.device_ = device_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable result) { if (experimentalDistributedVariableComponentsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000080) != 0)) { experimentalDistributedVariableComponents_ = java.util.Collections.unmodifiableList(experimentalDistributedVariableComponents_); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000080); } result.experimentalDistributedVariableComponents_ = experimentalDistributedVariableComponents_; } else { result.experimentalDistributedVariableComponents_ = experimentalDistributedVariableComponentsBuilder_.build(); } - onBuilt(); - return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.dtype_ = dtype_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.shape_ = shapeBuilder_ == null + ? shape_ + : shapeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.trainable_ = trainable_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.synchronization_ = synchronization_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.aggregation_ = aggregation_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.device_ = device_; + } + result.bitField0_ |= to_bitField0_; } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable) { @@ -13486,17 +13380,19 @@ public Builder mergeFrom(org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVa } if (!other.getName().isEmpty()) { name_ = other.name_; + bitField0_ |= 0x00000020; onChanged(); } if (!other.getDevice().isEmpty()) { device_ = other.device_; + bitField0_ |= 0x00000040; onChanged(); } if (experimentalDistributedVariableComponentsBuilder_ == null) { if (!other.experimentalDistributedVariableComponents_.isEmpty()) { if (experimentalDistributedVariableComponents_.isEmpty()) { experimentalDistributedVariableComponents_ = other.experimentalDistributedVariableComponents_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000080); } else { ensureExperimentalDistributedVariableComponentsIsMutable(); experimentalDistributedVariableComponents_.addAll(other.experimentalDistributedVariableComponents_); @@ -13509,9 +13405,9 @@ public Builder mergeFrom(org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVa experimentalDistributedVariableComponentsBuilder_.dispose(); experimentalDistributedVariableComponentsBuilder_ = null; experimentalDistributedVariableComponents_ = other.experimentalDistributedVariableComponents_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000080); experimentalDistributedVariableComponentsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getExperimentalDistributedVariableComponentsFieldBuilder() : null; } else { experimentalDistributedVariableComponentsBuilder_.addAllMessages(other.experimentalDistributedVariableComponents_); @@ -13546,39 +13442,39 @@ public Builder mergeFrom( break; case 8: { dtype_ = input.readEnum(); - + bitField0_ |= 0x00000001; break; } // case 8 case 18: { input.readMessage( getShapeFieldBuilder().getBuilder(), extensionRegistry); - + bitField0_ |= 0x00000002; break; } // case 18 case 24: { trainable_ = input.readBool(); - + bitField0_ |= 0x00000004; break; } // case 24 case 32: { synchronization_ = input.readEnum(); - + bitField0_ |= 0x00000008; break; } // case 32 case 40: { aggregation_ = input.readEnum(); - + bitField0_ |= 0x00000010; break; } // case 40 case 50: { name_ = input.readStringRequireUtf8(); - + bitField0_ |= 0x00000020; break; } // case 50 case 58: { device_ = input.readStringRequireUtf8(); - + bitField0_ |= 0x00000040; break; } // case 58 case 66: { @@ -13625,8 +13521,8 @@ public Builder mergeFrom( * @return This builder for chaining. */ public Builder setDtypeValue(int value) { - dtype_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -13636,8 +13532,7 @@ public Builder setDtypeValue(int value) { */ @java.lang.Override public org.tensorflow.proto.DataType getDtype() { - @SuppressWarnings("deprecation") - org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(dtype_); + org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(dtype_); return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result; } /** @@ -13649,7 +13544,7 @@ public Builder setDtype(org.tensorflow.proto.DataType value) { if (value == null) { throw new NullPointerException(); } - + bitField0_ |= 0x00000001; dtype_ = value.getNumber(); onChanged(); return this; @@ -13659,21 +13554,21 @@ public Builder setDtype(org.tensorflow.proto.DataType value) { * @return This builder for chaining. */ public Builder clearDtype() { - + bitField0_ = (bitField0_ & ~0x00000001); dtype_ = 0; onChanged(); return this; } private org.tensorflow.proto.TensorShapeProto shape_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> shapeBuilder_; /** * .tensorflow.TensorShapeProto shape = 2; * @return Whether the shape field is set. */ public boolean hasShape() { - return shapeBuilder_ != null || shape_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** * .tensorflow.TensorShapeProto shape = 2; @@ -13695,11 +13590,11 @@ public Builder setShape(org.tensorflow.proto.TensorShapeProto value) { throw new NullPointerException(); } shape_ = value; - onChanged(); } else { shapeBuilder_.setMessage(value); } - + bitField0_ |= 0x00000002; + onChanged(); return this; } /** @@ -13709,11 +13604,11 @@ public Builder setShape( org.tensorflow.proto.TensorShapeProto.Builder builderForValue) { if (shapeBuilder_ == null) { shape_ = builderForValue.build(); - onChanged(); } else { shapeBuilder_.setMessage(builderForValue.build()); } - + bitField0_ |= 0x00000002; + onChanged(); return this; } /** @@ -13721,38 +13616,40 @@ public Builder setShape( */ public Builder mergeShape(org.tensorflow.proto.TensorShapeProto value) { if (shapeBuilder_ == null) { - if (shape_ != null) { - shape_ = - org.tensorflow.proto.TensorShapeProto.newBuilder(shape_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000002) != 0) && + shape_ != null && + shape_ != org.tensorflow.proto.TensorShapeProto.getDefaultInstance()) { + getShapeBuilder().mergeFrom(value); } else { shape_ = value; } - onChanged(); } else { shapeBuilder_.mergeFrom(value); } - + if (shape_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } return this; } /** * .tensorflow.TensorShapeProto shape = 2; */ public Builder clearShape() { - if (shapeBuilder_ == null) { - shape_ = null; - onChanged(); - } else { - shape_ = null; + bitField0_ = (bitField0_ & ~0x00000002); + shape_ = null; + if (shapeBuilder_ != null) { + shapeBuilder_.dispose(); shapeBuilder_ = null; } - + onChanged(); return this; } /** * .tensorflow.TensorShapeProto shape = 2; */ public org.tensorflow.proto.TensorShapeProto.Builder getShapeBuilder() { - + bitField0_ |= 0x00000002; onChanged(); return getShapeFieldBuilder().getBuilder(); } @@ -13770,11 +13667,11 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() { /** * .tensorflow.TensorShapeProto shape = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> getShapeFieldBuilder() { if (shapeBuilder_ == null) { - shapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + shapeBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder>( getShape(), getParentForChildren(), @@ -13799,8 +13696,9 @@ public boolean getTrainable() { * @return This builder for chaining. */ public Builder setTrainable(boolean value) { - + trainable_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -13809,7 +13707,7 @@ public Builder setTrainable(boolean value) { * @return This builder for chaining. */ public Builder clearTrainable() { - + bitField0_ = (bitField0_ & ~0x00000004); trainable_ = false; onChanged(); return this; @@ -13829,8 +13727,8 @@ public Builder clearTrainable() { * @return This builder for chaining. */ public Builder setSynchronizationValue(int value) { - synchronization_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -13840,8 +13738,7 @@ public Builder setSynchronizationValue(int value) { */ @java.lang.Override public org.tensorflow.proto.VariableSynchronization getSynchronization() { - @SuppressWarnings("deprecation") - org.tensorflow.proto.VariableSynchronization result = org.tensorflow.proto.VariableSynchronization.valueOf(synchronization_); + org.tensorflow.proto.VariableSynchronization result = org.tensorflow.proto.VariableSynchronization.forNumber(synchronization_); return result == null ? org.tensorflow.proto.VariableSynchronization.UNRECOGNIZED : result; } /** @@ -13853,7 +13750,7 @@ public Builder setSynchronization(org.tensorflow.proto.VariableSynchronization v if (value == null) { throw new NullPointerException(); } - + bitField0_ |= 0x00000008; synchronization_ = value.getNumber(); onChanged(); return this; @@ -13863,7 +13760,7 @@ public Builder setSynchronization(org.tensorflow.proto.VariableSynchronization v * @return This builder for chaining. */ public Builder clearSynchronization() { - + bitField0_ = (bitField0_ & ~0x00000008); synchronization_ = 0; onChanged(); return this; @@ -13883,8 +13780,8 @@ public Builder clearSynchronization() { * @return This builder for chaining. */ public Builder setAggregationValue(int value) { - aggregation_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -13894,8 +13791,7 @@ public Builder setAggregationValue(int value) { */ @java.lang.Override public org.tensorflow.proto.VariableAggregation getAggregation() { - @SuppressWarnings("deprecation") - org.tensorflow.proto.VariableAggregation result = org.tensorflow.proto.VariableAggregation.valueOf(aggregation_); + org.tensorflow.proto.VariableAggregation result = org.tensorflow.proto.VariableAggregation.forNumber(aggregation_); return result == null ? org.tensorflow.proto.VariableAggregation.UNRECOGNIZED : result; } /** @@ -13907,7 +13803,7 @@ public Builder setAggregation(org.tensorflow.proto.VariableAggregation value) { if (value == null) { throw new NullPointerException(); } - + bitField0_ |= 0x00000010; aggregation_ = value.getNumber(); onChanged(); return this; @@ -13917,7 +13813,7 @@ public Builder setAggregation(org.tensorflow.proto.VariableAggregation value) { * @return This builder for chaining. */ public Builder clearAggregation() { - + bitField0_ = (bitField0_ & ~0x00000010); aggregation_ = 0; onChanged(); return this; @@ -13964,11 +13860,9 @@ public java.lang.String getName() { */ public Builder setName( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } name_ = value; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -13977,8 +13871,8 @@ public Builder setName( * @return This builder for chaining. */ public Builder clearName() { - name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } @@ -13989,12 +13883,10 @@ public Builder clearName() { */ public Builder setNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); name_ = value; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -14040,11 +13932,9 @@ public java.lang.String getDevice() { */ public Builder setDevice( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } device_ = value; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -14053,8 +13943,8 @@ public Builder setDevice( * @return This builder for chaining. */ public Builder clearDevice() { - device_ = getDefaultInstance().getDevice(); + bitField0_ = (bitField0_ & ~0x00000040); onChanged(); return this; } @@ -14065,12 +13955,10 @@ public Builder clearDevice() { */ public Builder setDeviceBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); device_ = value; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -14078,20 +13966,22 @@ public Builder setDeviceBytes( private java.util.List experimentalDistributedVariableComponents_ = java.util.Collections.emptyList(); private void ensureExperimentalDistributedVariableComponentsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!((bitField0_ & 0x00000080) != 0)) { experimentalDistributedVariableComponents_ = new java.util.ArrayList(experimentalDistributedVariableComponents_); - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000080; } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariableOrBuilder> experimentalDistributedVariableComponentsBuilder_; /** *
            * List of component variables for a distributed variable.
    +       *
            * When this field is non-empty, the SavedVariable will be assumed
            * to be a distributed variable defined by the components listed here.
    +       *
            * This is only supported by experimental loaders at the moment.
            * 
    * @@ -14107,8 +13997,10 @@ public java.util.List * List of component variables for a distributed variable. + * * When this field is non-empty, the SavedVariable will be assumed * to be a distributed variable defined by the components listed here. + * * This is only supported by experimental loaders at the moment. *
    * @@ -14124,8 +14016,10 @@ public int getExperimentalDistributedVariableComponentsCount() { /** *
            * List of component variables for a distributed variable.
    +       *
            * When this field is non-empty, the SavedVariable will be assumed
            * to be a distributed variable defined by the components listed here.
    +       *
            * This is only supported by experimental loaders at the moment.
            * 
    * @@ -14141,8 +14035,10 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable getExperime /** *
            * List of component variables for a distributed variable.
    +       *
            * When this field is non-empty, the SavedVariable will be assumed
            * to be a distributed variable defined by the components listed here.
    +       *
            * This is only supported by experimental loaders at the moment.
            * 
    * @@ -14165,8 +14061,10 @@ public Builder setExperimentalDistributedVariableComponents( /** *
            * List of component variables for a distributed variable.
    +       *
            * When this field is non-empty, the SavedVariable will be assumed
            * to be a distributed variable defined by the components listed here.
    +       *
            * This is only supported by experimental loaders at the moment.
            * 
    * @@ -14186,8 +14084,10 @@ public Builder setExperimentalDistributedVariableComponents( /** *
            * List of component variables for a distributed variable.
    +       *
            * When this field is non-empty, the SavedVariable will be assumed
            * to be a distributed variable defined by the components listed here.
    +       *
            * This is only supported by experimental loaders at the moment.
            * 
    * @@ -14209,8 +14109,10 @@ public Builder addExperimentalDistributedVariableComponents(org.tensorflow.proto /** *
            * List of component variables for a distributed variable.
    +       *
            * When this field is non-empty, the SavedVariable will be assumed
            * to be a distributed variable defined by the components listed here.
    +       *
            * This is only supported by experimental loaders at the moment.
            * 
    * @@ -14233,8 +14135,10 @@ public Builder addExperimentalDistributedVariableComponents( /** *
            * List of component variables for a distributed variable.
    +       *
            * When this field is non-empty, the SavedVariable will be assumed
            * to be a distributed variable defined by the components listed here.
    +       *
            * This is only supported by experimental loaders at the moment.
            * 
    * @@ -14254,8 +14158,10 @@ public Builder addExperimentalDistributedVariableComponents( /** *
            * List of component variables for a distributed variable.
    +       *
            * When this field is non-empty, the SavedVariable will be assumed
            * to be a distributed variable defined by the components listed here.
    +       *
            * This is only supported by experimental loaders at the moment.
            * 
    * @@ -14275,8 +14181,10 @@ public Builder addExperimentalDistributedVariableComponents( /** *
            * List of component variables for a distributed variable.
    +       *
            * When this field is non-empty, the SavedVariable will be assumed
            * to be a distributed variable defined by the components listed here.
    +       *
            * This is only supported by experimental loaders at the moment.
            * 
    * @@ -14297,8 +14205,10 @@ public Builder addAllExperimentalDistributedVariableComponents( /** *
            * List of component variables for a distributed variable.
    +       *
            * When this field is non-empty, the SavedVariable will be assumed
            * to be a distributed variable defined by the components listed here.
    +       *
            * This is only supported by experimental loaders at the moment.
            * 
    * @@ -14307,7 +14217,7 @@ public Builder addAllExperimentalDistributedVariableComponents( public Builder clearExperimentalDistributedVariableComponents() { if (experimentalDistributedVariableComponentsBuilder_ == null) { experimentalDistributedVariableComponents_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000080); onChanged(); } else { experimentalDistributedVariableComponentsBuilder_.clear(); @@ -14317,8 +14227,10 @@ public Builder clearExperimentalDistributedVariableComponents() { /** *
            * List of component variables for a distributed variable.
    +       *
            * When this field is non-empty, the SavedVariable will be assumed
            * to be a distributed variable defined by the components listed here.
    +       *
            * This is only supported by experimental loaders at the moment.
            * 
    * @@ -14337,8 +14249,10 @@ public Builder removeExperimentalDistributedVariableComponents(int index) { /** *
            * List of component variables for a distributed variable.
    +       *
            * When this field is non-empty, the SavedVariable will be assumed
            * to be a distributed variable defined by the components listed here.
    +       *
            * This is only supported by experimental loaders at the moment.
            * 
    * @@ -14351,8 +14265,10 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable.Builder get /** *
            * List of component variables for a distributed variable.
    +       *
            * When this field is non-empty, the SavedVariable will be assumed
            * to be a distributed variable defined by the components listed here.
    +       *
            * This is only supported by experimental loaders at the moment.
            * 
    * @@ -14368,8 +14284,10 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariableOrBuilder ge /** *
            * List of component variables for a distributed variable.
    +       *
            * When this field is non-empty, the SavedVariable will be assumed
            * to be a distributed variable defined by the components listed here.
    +       *
            * This is only supported by experimental loaders at the moment.
            * 
    * @@ -14386,8 +14304,10 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariableOrBuilder ge /** *
            * List of component variables for a distributed variable.
    +       *
            * When this field is non-empty, the SavedVariable will be assumed
            * to be a distributed variable defined by the components listed here.
    +       *
            * This is only supported by experimental loaders at the moment.
            * 
    * @@ -14400,8 +14320,10 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable.Builder add /** *
            * List of component variables for a distributed variable.
    +       *
            * When this field is non-empty, the SavedVariable will be assumed
            * to be a distributed variable defined by the components listed here.
    +       *
            * This is only supported by experimental loaders at the moment.
            * 
    * @@ -14415,8 +14337,10 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable.Builder add /** *
            * List of component variables for a distributed variable.
    +       *
            * When this field is non-empty, the SavedVariable will be assumed
            * to be a distributed variable defined by the components listed here.
    +       *
            * This is only supported by experimental loaders at the moment.
            * 
    * @@ -14426,32 +14350,20 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable.Builder add getExperimentalDistributedVariableComponentsBuilderList() { return getExperimentalDistributedVariableComponentsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariableOrBuilder> getExperimentalDistributedVariableComponentsFieldBuilder() { if (experimentalDistributedVariableComponentsBuilder_ == null) { - experimentalDistributedVariableComponentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + experimentalDistributedVariableComponentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariableOrBuilder>( experimentalDistributedVariableComponents_, - ((bitField0_ & 0x00000001) != 0), + ((bitField0_ & 0x00000080) != 0), getParentForChildren(), isClean()); experimentalDistributedVariableComponents_ = null; } return experimentalDistributedVariableComponentsBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.SavedVariable) } @@ -14592,37 +14504,34 @@ public interface FunctionSpecOrBuilder extends * Protobuf type {@code tensorflow.FunctionSpec} */ public static final class FunctionSpec extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.FunctionSpec) FunctionSpecOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + FunctionSpec.class.getName()); + } // Use FunctionSpec.newBuilder() to construct. - private FunctionSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private FunctionSpec(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private FunctionSpec() { jitCompile_ = 0; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new FunctionSpec(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.SavedObjectGraphOuterClass.internal_static_tensorflow_FunctionSpec_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.SavedObjectGraphOuterClass.internal_static_tensorflow_FunctionSpec_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -14632,10 +14541,12 @@ protected java.lang.Object newInstance( /** *
          * Whether the function should be compiled by XLA.
    +     *
          * The public interface to `tf.function` uses an optional boolean to
          * represent three distinct states for this field.  Unfortunately, proto3
          * removes the ability to explicitly check for the presence or absence of a
          * field, so we instead map to an enum.
    +     *
          * See `tf.function` for details.
          * 
    * @@ -14658,6 +14569,15 @@ public enum JitCompile UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + JitCompile.class.getName()); + } /** * DEFAULT = 0; */ @@ -14755,6 +14675,7 @@ private JitCompile(int value) { // @@protoc_insertion_point(enum_scope:tensorflow.FunctionSpec.JitCompile) } + private int bitField0_; public static final int FULLARGSPEC_FIELD_NUMBER = 1; private org.tensorflow.proto.Struct.StructuredValue fullargspec_; /** @@ -14767,7 +14688,7 @@ private JitCompile(int value) { */ @java.lang.Override public boolean hasFullargspec() { - return fullargspec_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** *
    @@ -14790,11 +14711,11 @@ public org.tensorflow.proto.Struct.StructuredValue getFullargspec() {
          */
         @java.lang.Override
         public org.tensorflow.proto.Struct.StructuredValueOrBuilder getFullargspecOrBuilder() {
    -      return getFullargspec();
    +      return fullargspec_ == null ? org.tensorflow.proto.Struct.StructuredValue.getDefaultInstance() : fullargspec_;
         }
     
         public static final int IS_METHOD_FIELD_NUMBER = 2;
    -    private boolean isMethod_;
    +    private boolean isMethod_ = false;
         /**
          * 
          * Whether this represents a class method.
    @@ -14820,7 +14741,7 @@ public boolean getIsMethod() {
          */
         @java.lang.Override
         public boolean hasInputSignature() {
    -      return inputSignature_ != null;
    +      return ((bitField0_ & 0x00000002) != 0);
         }
         /**
          * 
    @@ -14843,11 +14764,11 @@ public org.tensorflow.proto.Struct.StructuredValue getInputSignature() {
          */
         @java.lang.Override
         public org.tensorflow.proto.Struct.StructuredValueOrBuilder getInputSignatureOrBuilder() {
    -      return getInputSignature();
    +      return inputSignature_ == null ? org.tensorflow.proto.Struct.StructuredValue.getDefaultInstance() : inputSignature_;
         }
     
         public static final int JIT_COMPILE_FIELD_NUMBER = 6;
    -    private int jitCompile_;
    +    private int jitCompile_ = 0;
         /**
          * .tensorflow.FunctionSpec.JitCompile jit_compile = 6;
          * @return The enum numeric value on the wire for jitCompile.
    @@ -14860,8 +14781,7 @@ public org.tensorflow.proto.Struct.StructuredValueOrBuilder getInputSignatureOrB
          * @return The jitCompile.
          */
         @java.lang.Override public org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec.JitCompile getJitCompile() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec.JitCompile result = org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec.JitCompile.valueOf(jitCompile_);
    +      org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec.JitCompile result = org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec.JitCompile.forNumber(jitCompile_);
           return result == null ? org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec.JitCompile.UNRECOGNIZED : result;
         }
     
    @@ -14879,13 +14799,13 @@ public final boolean isInitialized() {
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output)
                             throws java.io.IOException {
    -      if (fullargspec_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             output.writeMessage(1, getFullargspec());
           }
           if (isMethod_ != false) {
             output.writeBool(2, isMethod_);
           }
    -      if (inputSignature_ != null) {
    +      if (((bitField0_ & 0x00000002) != 0)) {
             output.writeMessage(5, getInputSignature());
           }
           if (jitCompile_ != org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec.JitCompile.DEFAULT.getNumber()) {
    @@ -14900,7 +14820,7 @@ public int getSerializedSize() {
           if (size != -1) return size;
     
           size = 0;
    -      if (fullargspec_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(1, getFullargspec());
           }
    @@ -14908,7 +14828,7 @@ public int getSerializedSize() {
             size += com.google.protobuf.CodedOutputStream
               .computeBoolSize(2, isMethod_);
           }
    -      if (inputSignature_ != null) {
    +      if (((bitField0_ & 0x00000002) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(5, getInputSignature());
           }
    @@ -15007,39 +14927,41 @@ public static org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec parse
         }
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -15059,7 +14981,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -15072,7 +14994,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.FunctionSpec}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.FunctionSpec)
             org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpecOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -15081,7 +15003,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.SavedObjectGraphOuterClass.internal_static_tensorflow_FunctionSpec_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -15090,33 +15012,37 @@ public static final class Builder extends
     
           // Construct using org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec.newBuilder()
           private Builder() {
    -
    +        maybeForceBuilderInitialization();
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
    -
    +        maybeForceBuilderInitialization();
    +      }
    +      private void maybeForceBuilderInitialization() {
    +        if (com.google.protobuf.GeneratedMessage
    +                .alwaysUseFieldBuilders) {
    +          getFullargspecFieldBuilder();
    +          getInputSignatureFieldBuilder();
    +        }
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    -        if (fullargspecBuilder_ == null) {
    -          fullargspec_ = null;
    -        } else {
    -          fullargspec_ = null;
    +        bitField0_ = 0;
    +        fullargspec_ = null;
    +        if (fullargspecBuilder_ != null) {
    +          fullargspecBuilder_.dispose();
               fullargspecBuilder_ = null;
             }
             isMethod_ = false;
    -
    -        if (inputSignatureBuilder_ == null) {
    -          inputSignature_ = null;
    -        } else {
    -          inputSignature_ = null;
    +        inputSignature_ = null;
    +        if (inputSignatureBuilder_ != null) {
    +          inputSignatureBuilder_.dispose();
               inputSignatureBuilder_ = null;
             }
             jitCompile_ = 0;
    -
             return this;
           }
     
    @@ -15143,54 +15069,35 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec build() {
           @java.lang.Override
           public org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec buildPartial() {
             org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec result = new org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec(this);
    -        if (fullargspecBuilder_ == null) {
    -          result.fullargspec_ = fullargspec_;
    -        } else {
    -          result.fullargspec_ = fullargspecBuilder_.build();
    -        }
    -        result.isMethod_ = isMethod_;
    -        if (inputSignatureBuilder_ == null) {
    -          result.inputSignature_ = inputSignature_;
    -        } else {
    -          result.inputSignature_ = inputSignatureBuilder_.build();
    -        }
    -        result.jitCompile_ = jitCompile_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec result) {
    +        int from_bitField0_ = bitField0_;
    +        int to_bitField0_ = 0;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.fullargspec_ = fullargspecBuilder_ == null
    +              ? fullargspec_
    +              : fullargspecBuilder_.build();
    +          to_bitField0_ |= 0x00000001;
    +        }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.isMethod_ = isMethod_;
    +        }
    +        if (((from_bitField0_ & 0x00000004) != 0)) {
    +          result.inputSignature_ = inputSignatureBuilder_ == null
    +              ? inputSignature_
    +              : inputSignatureBuilder_.build();
    +          to_bitField0_ |= 0x00000002;
    +        }
    +        if (((from_bitField0_ & 0x00000008) != 0)) {
    +          result.jitCompile_ = jitCompile_;
    +        }
    +        result.bitField0_ |= to_bitField0_;
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec) {
    @@ -15245,24 +15152,24 @@ public Builder mergeFrom(
                     input.readMessage(
                         getFullargspecFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 10
                   case 16: {
                     isMethod_ = input.readBool();
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 16
                   case 42: {
                     input.readMessage(
                         getInputSignatureFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00000004;
                     break;
                   } // case 42
                   case 48: {
                     jitCompile_ = input.readEnum();
    -
    +                bitField0_ |= 0x00000008;
                     break;
                   } // case 48
                   default: {
    @@ -15280,9 +15187,10 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    +      private int bitField0_;
     
           private org.tensorflow.proto.Struct.StructuredValue fullargspec_;
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder> fullargspecBuilder_;
           /**
            * 
    @@ -15293,7 +15201,7 @@ public Builder mergeFrom(
            * @return Whether the fullargspec field is set.
            */
           public boolean hasFullargspec() {
    -        return fullargspecBuilder_ != null || fullargspec_ != null;
    +        return ((bitField0_ & 0x00000001) != 0);
           }
           /**
            * 
    @@ -15323,11 +15231,11 @@ public Builder setFullargspec(org.tensorflow.proto.Struct.StructuredValue value)
                 throw new NullPointerException();
               }
               fullargspec_ = value;
    -          onChanged();
             } else {
               fullargspecBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000001;
    +        onChanged();
             return this;
           }
           /**
    @@ -15341,11 +15249,11 @@ public Builder setFullargspec(
               org.tensorflow.proto.Struct.StructuredValue.Builder builderForValue) {
             if (fullargspecBuilder_ == null) {
               fullargspec_ = builderForValue.build();
    -          onChanged();
             } else {
               fullargspecBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000001;
    +        onChanged();
             return this;
           }
           /**
    @@ -15357,17 +15265,20 @@ public Builder setFullargspec(
            */
           public Builder mergeFullargspec(org.tensorflow.proto.Struct.StructuredValue value) {
             if (fullargspecBuilder_ == null) {
    -          if (fullargspec_ != null) {
    -            fullargspec_ =
    -              org.tensorflow.proto.Struct.StructuredValue.newBuilder(fullargspec_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000001) != 0) &&
    +            fullargspec_ != null &&
    +            fullargspec_ != org.tensorflow.proto.Struct.StructuredValue.getDefaultInstance()) {
    +            getFullargspecBuilder().mergeFrom(value);
               } else {
                 fullargspec_ = value;
               }
    -          onChanged();
             } else {
               fullargspecBuilder_.mergeFrom(value);
             }
    -
    +        if (fullargspec_ != null) {
    +          bitField0_ |= 0x00000001;
    +          onChanged();
    +        }
             return this;
           }
           /**
    @@ -15378,14 +15289,13 @@ public Builder mergeFullargspec(org.tensorflow.proto.Struct.StructuredValue valu
            * .tensorflow.StructuredValue fullargspec = 1;
            */
           public Builder clearFullargspec() {
    -        if (fullargspecBuilder_ == null) {
    -          fullargspec_ = null;
    -          onChanged();
    -        } else {
    -          fullargspec_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000001);
    +        fullargspec_ = null;
    +        if (fullargspecBuilder_ != null) {
    +          fullargspecBuilder_.dispose();
               fullargspecBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
    @@ -15396,7 +15306,7 @@ public Builder clearFullargspec() {
            * .tensorflow.StructuredValue fullargspec = 1;
            */
           public org.tensorflow.proto.Struct.StructuredValue.Builder getFullargspecBuilder() {
    -        
    +        bitField0_ |= 0x00000001;
             onChanged();
             return getFullargspecFieldBuilder().getBuilder();
           }
    @@ -15422,11 +15332,11 @@ public org.tensorflow.proto.Struct.StructuredValueOrBuilder getFullargspecOrBuil
            *
            * .tensorflow.StructuredValue fullargspec = 1;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder> 
               getFullargspecFieldBuilder() {
             if (fullargspecBuilder_ == null) {
    -          fullargspecBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          fullargspecBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder>(
                       getFullargspec(),
                       getParentForChildren(),
    @@ -15459,8 +15369,9 @@ public boolean getIsMethod() {
            * @return This builder for chaining.
            */
           public Builder setIsMethod(boolean value) {
    -        
    +
             isMethod_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -15473,14 +15384,14 @@ public Builder setIsMethod(boolean value) {
            * @return This builder for chaining.
            */
           public Builder clearIsMethod() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000002);
             isMethod_ = false;
             onChanged();
             return this;
           }
     
           private org.tensorflow.proto.Struct.StructuredValue inputSignature_;
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder> inputSignatureBuilder_;
           /**
            * 
    @@ -15491,7 +15402,7 @@ public Builder clearIsMethod() {
            * @return Whether the inputSignature field is set.
            */
           public boolean hasInputSignature() {
    -        return inputSignatureBuilder_ != null || inputSignature_ != null;
    +        return ((bitField0_ & 0x00000004) != 0);
           }
           /**
            * 
    @@ -15521,11 +15432,11 @@ public Builder setInputSignature(org.tensorflow.proto.Struct.StructuredValue val
                 throw new NullPointerException();
               }
               inputSignature_ = value;
    -          onChanged();
             } else {
               inputSignatureBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000004;
    +        onChanged();
             return this;
           }
           /**
    @@ -15539,11 +15450,11 @@ public Builder setInputSignature(
               org.tensorflow.proto.Struct.StructuredValue.Builder builderForValue) {
             if (inputSignatureBuilder_ == null) {
               inputSignature_ = builderForValue.build();
    -          onChanged();
             } else {
               inputSignatureBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000004;
    +        onChanged();
             return this;
           }
           /**
    @@ -15555,17 +15466,20 @@ public Builder setInputSignature(
            */
           public Builder mergeInputSignature(org.tensorflow.proto.Struct.StructuredValue value) {
             if (inputSignatureBuilder_ == null) {
    -          if (inputSignature_ != null) {
    -            inputSignature_ =
    -              org.tensorflow.proto.Struct.StructuredValue.newBuilder(inputSignature_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000004) != 0) &&
    +            inputSignature_ != null &&
    +            inputSignature_ != org.tensorflow.proto.Struct.StructuredValue.getDefaultInstance()) {
    +            getInputSignatureBuilder().mergeFrom(value);
               } else {
                 inputSignature_ = value;
               }
    -          onChanged();
             } else {
               inputSignatureBuilder_.mergeFrom(value);
             }
    -
    +        if (inputSignature_ != null) {
    +          bitField0_ |= 0x00000004;
    +          onChanged();
    +        }
             return this;
           }
           /**
    @@ -15576,14 +15490,13 @@ public Builder mergeInputSignature(org.tensorflow.proto.Struct.StructuredValue v
            * .tensorflow.StructuredValue input_signature = 5;
            */
           public Builder clearInputSignature() {
    -        if (inputSignatureBuilder_ == null) {
    -          inputSignature_ = null;
    -          onChanged();
    -        } else {
    -          inputSignature_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000004);
    +        inputSignature_ = null;
    +        if (inputSignatureBuilder_ != null) {
    +          inputSignatureBuilder_.dispose();
               inputSignatureBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
    @@ -15594,7 +15507,7 @@ public Builder clearInputSignature() {
            * .tensorflow.StructuredValue input_signature = 5;
            */
           public org.tensorflow.proto.Struct.StructuredValue.Builder getInputSignatureBuilder() {
    -        
    +        bitField0_ |= 0x00000004;
             onChanged();
             return getInputSignatureFieldBuilder().getBuilder();
           }
    @@ -15620,11 +15533,11 @@ public org.tensorflow.proto.Struct.StructuredValueOrBuilder getInputSignatureOrB
            *
            * .tensorflow.StructuredValue input_signature = 5;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder> 
               getInputSignatureFieldBuilder() {
             if (inputSignatureBuilder_ == null) {
    -          inputSignatureBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          inputSignatureBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder>(
                       getInputSignature(),
                       getParentForChildren(),
    @@ -15648,8 +15561,8 @@ public org.tensorflow.proto.Struct.StructuredValueOrBuilder getInputSignatureOrB
            * @return This builder for chaining.
            */
           public Builder setJitCompileValue(int value) {
    -        
             jitCompile_ = value;
    +        bitField0_ |= 0x00000008;
             onChanged();
             return this;
           }
    @@ -15659,8 +15572,7 @@ public Builder setJitCompileValue(int value) {
            */
           @java.lang.Override
           public org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec.JitCompile getJitCompile() {
    -        @SuppressWarnings("deprecation")
    -        org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec.JitCompile result = org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec.JitCompile.valueOf(jitCompile_);
    +        org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec.JitCompile result = org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec.JitCompile.forNumber(jitCompile_);
             return result == null ? org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec.JitCompile.UNRECOGNIZED : result;
           }
           /**
    @@ -15672,7 +15584,7 @@ public Builder setJitCompile(org.tensorflow.proto.SavedObjectGraphOuterClass.Fun
             if (value == null) {
               throw new NullPointerException();
             }
    -        
    +        bitField0_ |= 0x00000008;
             jitCompile_ = value.getNumber();
             onChanged();
             return this;
    @@ -15682,23 +15594,11 @@ public Builder setJitCompile(org.tensorflow.proto.SavedObjectGraphOuterClass.Fun
            * @return This builder for chaining.
            */
           public Builder clearJitCompile() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000008);
             jitCompile_ = 0;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.FunctionSpec)
         }
    @@ -15789,37 +15689,34 @@ public interface SavedResourceOrBuilder extends
        * Protobuf type {@code tensorflow.SavedResource}
        */
       public static final class SavedResource extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.SavedResource)
           SavedResourceOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        SavedResource.class.getName());
    +    }
         // Use SavedResource.newBuilder() to construct.
    -    private SavedResource(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private SavedResource(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private SavedResource() {
           device_ = "";
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new SavedResource();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.SavedObjectGraphOuterClass.internal_static_tensorflow_SavedResource_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.SavedObjectGraphOuterClass.internal_static_tensorflow_SavedResource_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -15827,7 +15724,8 @@ protected java.lang.Object newInstance(
         }
     
         public static final int DEVICE_FIELD_NUMBER = 1;
    -    private volatile java.lang.Object device_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object device_ = "";
         /**
          * 
          * A device specification indicating a required placement for the resource
    @@ -15890,8 +15788,8 @@ public final boolean isInitialized() {
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output)
                             throws java.io.IOException {
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(device_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, device_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(device_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 1, device_);
           }
           getUnknownFields().writeTo(output);
         }
    @@ -15902,8 +15800,8 @@ public int getSerializedSize() {
           if (size != -1) return size;
     
           size = 0;
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(device_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, device_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(device_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, device_);
           }
           size += getUnknownFields().getSerializedSize();
           memoizedSize = size;
    @@ -15974,39 +15872,41 @@ public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedResource pars
         }
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedResource parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedResource parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedResource parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedResource parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedResource parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SavedResource parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -16026,7 +15926,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -16040,7 +15940,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.SavedResource}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.SavedResource)
             org.tensorflow.proto.SavedObjectGraphOuterClass.SavedResourceOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -16049,7 +15949,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.SavedObjectGraphOuterClass.internal_static_tensorflow_SavedResource_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -16062,15 +15962,15 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             device_ = "";
    -
             return this;
           }
     
    @@ -16097,43 +15997,18 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedResource build() {
           @java.lang.Override
           public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedResource buildPartial() {
             org.tensorflow.proto.SavedObjectGraphOuterClass.SavedResource result = new org.tensorflow.proto.SavedObjectGraphOuterClass.SavedResource(this);
    -        result.device_ = device_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.SavedObjectGraphOuterClass.SavedResource result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.device_ = device_;
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.SavedObjectGraphOuterClass.SavedResource) {
    @@ -16148,6 +16023,7 @@ public Builder mergeFrom(org.tensorflow.proto.SavedObjectGraphOuterClass.SavedRe
             if (other == org.tensorflow.proto.SavedObjectGraphOuterClass.SavedResource.getDefaultInstance()) return this;
             if (!other.getDevice().isEmpty()) {
               device_ = other.device_;
    +          bitField0_ |= 0x00000001;
               onChanged();
             }
             this.mergeUnknownFields(other.getUnknownFields());
    @@ -16178,7 +16054,7 @@ public Builder mergeFrom(
                     break;
                   case 10: {
                     device_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 10
                   default: {
    @@ -16196,6 +16072,7 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    +      private int bitField0_;
     
           private java.lang.Object device_ = "";
           /**
    @@ -16256,11 +16133,9 @@ public java.lang.String getDevice() {
            */
           public Builder setDevice(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             device_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -16275,8 +16150,8 @@ public Builder setDevice(
            * @return This builder for chaining.
            */
           public Builder clearDevice() {
    -        
             device_ = getDefaultInstance().getDevice();
    +        bitField0_ = (bitField0_ & ~0x00000001);
             onChanged();
             return this;
           }
    @@ -16293,27 +16168,13 @@ public Builder clearDevice() {
            */
           public Builder setDeviceBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             device_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.SavedResource)
         }
    @@ -16391,36 +16252,33 @@ public interface SaveableObjectOrBuilder extends
        * Protobuf type {@code tensorflow.SaveableObject}
        */
       public static final class SaveableObject extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.SaveableObject)
           SaveableObjectOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        SaveableObject.class.getName());
    +    }
         // Use SaveableObject.newBuilder() to construct.
    -    private SaveableObject(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private SaveableObject(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private SaveableObject() {
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new SaveableObject();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.SavedObjectGraphOuterClass.internal_static_tensorflow_SaveableObject_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.SavedObjectGraphOuterClass.internal_static_tensorflow_SaveableObject_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -16428,7 +16286,7 @@ protected java.lang.Object newInstance(
         }
     
         public static final int SAVE_FUNCTION_FIELD_NUMBER = 2;
    -    private int saveFunction_;
    +    private int saveFunction_ = 0;
         /**
          * 
          * Node ids of concrete functions for saving and loading from a checkpoint.
    @@ -16444,7 +16302,7 @@ public int getSaveFunction() {
         }
     
         public static final int RESTORE_FUNCTION_FIELD_NUMBER = 3;
    -    private int restoreFunction_;
    +    private int restoreFunction_ = 0;
         /**
          * int32 restore_function = 3;
          * @return The restoreFunction.
    @@ -16564,39 +16422,41 @@ public static org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject par
         }
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -16616,7 +16476,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -16624,7 +16484,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.SaveableObject}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.SaveableObject)
             org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObjectOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -16633,7 +16493,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.SavedObjectGraphOuterClass.internal_static_tensorflow_SaveableObject_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -16646,17 +16506,16 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             saveFunction_ = 0;
    -
             restoreFunction_ = 0;
    -
             return this;
           }
     
    @@ -16683,44 +16542,21 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject build() {
           @java.lang.Override
           public org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject buildPartial() {
             org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject result = new org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject(this);
    -        result.saveFunction_ = saveFunction_;
    -        result.restoreFunction_ = restoreFunction_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.saveFunction_ = saveFunction_;
    +        }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.restoreFunction_ = restoreFunction_;
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject) {
    @@ -16767,12 +16603,12 @@ public Builder mergeFrom(
                     break;
                   case 16: {
                     saveFunction_ = input.readInt32();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 16
                   case 24: {
                     restoreFunction_ = input.readInt32();
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 24
                   default: {
    @@ -16790,6 +16626,7 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    +      private int bitField0_;
     
           private int saveFunction_ ;
           /**
    @@ -16816,8 +16653,9 @@ public int getSaveFunction() {
            * @return This builder for chaining.
            */
           public Builder setSaveFunction(int value) {
    -        
    +
             saveFunction_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -16831,7 +16669,7 @@ public Builder setSaveFunction(int value) {
            * @return This builder for chaining.
            */
           public Builder clearSaveFunction() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000001);
             saveFunction_ = 0;
             onChanged();
             return this;
    @@ -16852,8 +16690,9 @@ public int getRestoreFunction() {
            * @return This builder for chaining.
            */
           public Builder setRestoreFunction(int value) {
    -        
    +
             restoreFunction_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -16862,23 +16701,11 @@ public Builder setRestoreFunction(int value) {
            * @return This builder for chaining.
            */
           public Builder clearRestoreFunction() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000002);
             restoreFunction_ = 0;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.SaveableObject)
         }
    @@ -16934,77 +16761,77 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject getDefault
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_SavedObjectGraph_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_SavedObjectGraph_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_SavedObjectGraph_ConcreteFunctionsEntry_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_SavedObjectGraph_ConcreteFunctionsEntry_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_SavedObject_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_SavedObject_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_SavedObject_SaveableObjectsEntry_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_SavedObject_SaveableObjectsEntry_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_SavedUserObject_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_SavedUserObject_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_SavedAsset_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_SavedAsset_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_SavedFunction_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_SavedFunction_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_CapturedTensor_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_CapturedTensor_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_SavedConcreteFunction_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_SavedConcreteFunction_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_SavedBareConcreteFunction_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_SavedBareConcreteFunction_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_SavedConstant_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_SavedConstant_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_SavedVariable_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_SavedVariable_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_FunctionSpec_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_FunctionSpec_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_SavedResource_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_SavedResource_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_SaveableObject_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_SaveableObject_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -17107,93 +16934,94 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SaveableObject getDefault
         internal_static_tensorflow_SavedObjectGraph_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_SavedObjectGraph_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_SavedObjectGraph_descriptor,
             new java.lang.String[] { "Nodes", "ConcreteFunctions", });
         internal_static_tensorflow_SavedObjectGraph_ConcreteFunctionsEntry_descriptor =
           internal_static_tensorflow_SavedObjectGraph_descriptor.getNestedTypes().get(0);
         internal_static_tensorflow_SavedObjectGraph_ConcreteFunctionsEntry_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_SavedObjectGraph_ConcreteFunctionsEntry_descriptor,
             new java.lang.String[] { "Key", "Value", });
         internal_static_tensorflow_SavedObject_descriptor =
           getDescriptor().getMessageTypes().get(1);
         internal_static_tensorflow_SavedObject_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_SavedObject_descriptor,
             new java.lang.String[] { "Children", "Dependencies", "SlotVariables", "UserObject", "Asset", "Function", "Variable", "BareConcreteFunction", "Constant", "Resource", "CapturedTensor", "SaveableObjects", "RegisteredName", "SerializedUserProto", "RegisteredSaver", "Kind", });
         internal_static_tensorflow_SavedObject_SaveableObjectsEntry_descriptor =
           internal_static_tensorflow_SavedObject_descriptor.getNestedTypes().get(0);
         internal_static_tensorflow_SavedObject_SaveableObjectsEntry_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_SavedObject_SaveableObjectsEntry_descriptor,
             new java.lang.String[] { "Key", "Value", });
         internal_static_tensorflow_SavedUserObject_descriptor =
           getDescriptor().getMessageTypes().get(2);
         internal_static_tensorflow_SavedUserObject_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_SavedUserObject_descriptor,
             new java.lang.String[] { "Identifier", "Version", "Metadata", });
         internal_static_tensorflow_SavedAsset_descriptor =
           getDescriptor().getMessageTypes().get(3);
         internal_static_tensorflow_SavedAsset_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_SavedAsset_descriptor,
             new java.lang.String[] { "AssetFileDefIndex", });
         internal_static_tensorflow_SavedFunction_descriptor =
           getDescriptor().getMessageTypes().get(4);
         internal_static_tensorflow_SavedFunction_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_SavedFunction_descriptor,
             new java.lang.String[] { "ConcreteFunctions", "FunctionSpec", });
         internal_static_tensorflow_CapturedTensor_descriptor =
           getDescriptor().getMessageTypes().get(5);
         internal_static_tensorflow_CapturedTensor_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_CapturedTensor_descriptor,
             new java.lang.String[] { "Name", "ConcreteFunction", });
         internal_static_tensorflow_SavedConcreteFunction_descriptor =
           getDescriptor().getMessageTypes().get(6);
         internal_static_tensorflow_SavedConcreteFunction_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_SavedConcreteFunction_descriptor,
             new java.lang.String[] { "BoundInputs", "CanonicalizedInputSignature", "OutputSignature", });
         internal_static_tensorflow_SavedBareConcreteFunction_descriptor =
           getDescriptor().getMessageTypes().get(7);
         internal_static_tensorflow_SavedBareConcreteFunction_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_SavedBareConcreteFunction_descriptor,
             new java.lang.String[] { "ConcreteFunctionName", "ArgumentKeywords", "AllowedPositionalArguments", "FunctionSpec", });
         internal_static_tensorflow_SavedConstant_descriptor =
           getDescriptor().getMessageTypes().get(8);
         internal_static_tensorflow_SavedConstant_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_SavedConstant_descriptor,
             new java.lang.String[] { "Operation", });
         internal_static_tensorflow_SavedVariable_descriptor =
           getDescriptor().getMessageTypes().get(9);
         internal_static_tensorflow_SavedVariable_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_SavedVariable_descriptor,
             new java.lang.String[] { "Dtype", "Shape", "Trainable", "Synchronization", "Aggregation", "Name", "Device", "ExperimentalDistributedVariableComponents", });
         internal_static_tensorflow_FunctionSpec_descriptor =
           getDescriptor().getMessageTypes().get(10);
         internal_static_tensorflow_FunctionSpec_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_FunctionSpec_descriptor,
             new java.lang.String[] { "Fullargspec", "IsMethod", "InputSignature", "JitCompile", });
         internal_static_tensorflow_SavedResource_descriptor =
           getDescriptor().getMessageTypes().get(11);
         internal_static_tensorflow_SavedResource_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_SavedResource_descriptor,
             new java.lang.String[] { "Device", });
         internal_static_tensorflow_SaveableObject_descriptor =
           getDescriptor().getMessageTypes().get(12);
         internal_static_tensorflow_SaveableObject_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_SaveableObject_descriptor,
             new java.lang.String[] { "SaveFunction", "RestoreFunction", });
    +    descriptor.resolveAllFeaturesImmutable();
         com.google.protobuf.AnyProto.getDescriptor();
         org.tensorflow.proto.TensorShapeProtos.getDescriptor();
         org.tensorflow.proto.TypesProtos.getDescriptor();
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedSlice.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedSlice.java
    index 3f346f5187d..f25165bb36a 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedSlice.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedSlice.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/util/saved_tensor_slice.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -12,45 +14,44 @@
      * Protobuf type {@code tensorflow.SavedSlice}
      */
     public final class SavedSlice extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.SavedSlice)
         SavedSliceOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      SavedSlice.class.getName());
    +  }
       // Use SavedSlice.newBuilder() to construct.
    -  private SavedSlice(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private SavedSlice(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private SavedSlice() {
         name_ = "";
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new SavedSlice();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.SavedTensorSliceProtos.internal_static_tensorflow_SavedSlice_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.SavedTensorSliceProtos.internal_static_tensorflow_SavedSlice_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
                 org.tensorflow.proto.SavedSlice.class, org.tensorflow.proto.SavedSlice.Builder.class);
       }
     
    +  private int bitField0_;
       public static final int NAME_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object name_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object name_ = "";
       /**
        * 
        * Name of the tensor that this slice belongs to. This must be identical to
    @@ -110,7 +111,7 @@ public java.lang.String getName() {
        */
       @java.lang.Override
       public boolean hasSlice() {
    -    return slice_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * 
    @@ -135,7 +136,7 @@ public org.tensorflow.proto.TensorSliceProto getSlice() {
        */
       @java.lang.Override
       public org.tensorflow.proto.TensorSliceProtoOrBuilder getSliceOrBuilder() {
    -    return getSlice();
    +    return slice_ == null ? org.tensorflow.proto.TensorSliceProto.getDefaultInstance() : slice_;
       }
     
       public static final int DATA_FIELD_NUMBER = 3;
    @@ -151,7 +152,7 @@ public org.tensorflow.proto.TensorSliceProtoOrBuilder getSliceOrBuilder() {
        */
       @java.lang.Override
       public boolean hasData() {
    -    return data_ != null;
    +    return ((bitField0_ & 0x00000002) != 0);
       }
       /**
        * 
    @@ -176,7 +177,7 @@ public org.tensorflow.proto.TensorProto getData() {
        */
       @java.lang.Override
       public org.tensorflow.proto.TensorProtoOrBuilder getDataOrBuilder() {
    -    return getData();
    +    return data_ == null ? org.tensorflow.proto.TensorProto.getDefaultInstance() : data_;
       }
     
       private byte memoizedIsInitialized = -1;
    @@ -193,13 +194,13 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
         }
    -    if (slice_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(2, getSlice());
         }
    -    if (data_ != null) {
    +    if (((bitField0_ & 0x00000002) != 0)) {
           output.writeMessage(3, getData());
         }
         getUnknownFields().writeTo(output);
    @@ -211,14 +212,14 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
         }
    -    if (slice_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(2, getSlice());
         }
    -    if (data_ != null) {
    +    if (((bitField0_ & 0x00000002) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(3, getData());
         }
    @@ -309,39 +310,41 @@ public static org.tensorflow.proto.SavedSlice parseFrom(
       }
       public static org.tensorflow.proto.SavedSlice parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.SavedSlice parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.SavedSlice parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.SavedSlice parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.SavedSlice parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.SavedSlice parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -361,7 +364,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -374,7 +377,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.SavedSlice}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.SavedSlice)
           org.tensorflow.proto.SavedSliceOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -383,7 +386,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.SavedTensorSliceProtos.internal_static_tensorflow_SavedSlice_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -392,29 +395,34 @@ public static final class Builder extends
     
         // Construct using org.tensorflow.proto.SavedSlice.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getSliceFieldBuilder();
    +        getDataFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           name_ = "";
    -
    -      if (sliceBuilder_ == null) {
    -        slice_ = null;
    -      } else {
    -        slice_ = null;
    +      slice_ = null;
    +      if (sliceBuilder_ != null) {
    +        sliceBuilder_.dispose();
             sliceBuilder_ = null;
           }
    -      if (dataBuilder_ == null) {
    -        data_ = null;
    -      } else {
    -        data_ = null;
    +      data_ = null;
    +      if (dataBuilder_ != null) {
    +        dataBuilder_.dispose();
             dataBuilder_ = null;
           }
           return this;
    @@ -443,53 +451,32 @@ public org.tensorflow.proto.SavedSlice build() {
         @java.lang.Override
         public org.tensorflow.proto.SavedSlice buildPartial() {
           org.tensorflow.proto.SavedSlice result = new org.tensorflow.proto.SavedSlice(this);
    -      result.name_ = name_;
    -      if (sliceBuilder_ == null) {
    -        result.slice_ = slice_;
    -      } else {
    -        result.slice_ = sliceBuilder_.build();
    -      }
    -      if (dataBuilder_ == null) {
    -        result.data_ = data_;
    -      } else {
    -        result.data_ = dataBuilder_.build();
    -      }
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.SavedSlice result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.name_ = name_;
    +      }
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.slice_ = sliceBuilder_ == null
    +            ? slice_
    +            : sliceBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.data_ = dataBuilder_ == null
    +            ? data_
    +            : dataBuilder_.build();
    +        to_bitField0_ |= 0x00000002;
    +      }
    +      result.bitField0_ |= to_bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.SavedSlice) {
    @@ -504,6 +491,7 @@ public Builder mergeFrom(org.tensorflow.proto.SavedSlice other) {
           if (other == org.tensorflow.proto.SavedSlice.getDefaultInstance()) return this;
           if (!other.getName().isEmpty()) {
             name_ = other.name_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (other.hasSlice()) {
    @@ -540,21 +528,21 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   name_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
                   input.readMessage(
                       getSliceFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 case 26: {
                   input.readMessage(
                       getDataFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 26
                 default: {
    @@ -572,6 +560,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private java.lang.Object name_ = "";
         /**
    @@ -629,11 +618,9 @@ public java.lang.String getName() {
          */
         public Builder setName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           name_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -647,8 +634,8 @@ public Builder setName(
          * @return This builder for chaining.
          */
         public Builder clearName() {
    -      
           name_ = getDefaultInstance().getName();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -664,18 +651,16 @@ public Builder clearName() {
          */
         public Builder setNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           name_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
     
         private org.tensorflow.proto.TensorSliceProto slice_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorSliceProto, org.tensorflow.proto.TensorSliceProto.Builder, org.tensorflow.proto.TensorSliceProtoOrBuilder> sliceBuilder_;
         /**
          * 
    @@ -687,7 +672,7 @@ public Builder setNameBytes(
          * @return Whether the slice field is set.
          */
         public boolean hasSlice() {
    -      return sliceBuilder_ != null || slice_ != null;
    +      return ((bitField0_ & 0x00000002) != 0);
         }
         /**
          * 
    @@ -719,11 +704,11 @@ public Builder setSlice(org.tensorflow.proto.TensorSliceProto value) {
               throw new NullPointerException();
             }
             slice_ = value;
    -        onChanged();
           } else {
             sliceBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return this;
         }
         /**
    @@ -738,11 +723,11 @@ public Builder setSlice(
             org.tensorflow.proto.TensorSliceProto.Builder builderForValue) {
           if (sliceBuilder_ == null) {
             slice_ = builderForValue.build();
    -        onChanged();
           } else {
             sliceBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return this;
         }
         /**
    @@ -755,17 +740,20 @@ public Builder setSlice(
          */
         public Builder mergeSlice(org.tensorflow.proto.TensorSliceProto value) {
           if (sliceBuilder_ == null) {
    -        if (slice_ != null) {
    -          slice_ =
    -            org.tensorflow.proto.TensorSliceProto.newBuilder(slice_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000002) != 0) &&
    +          slice_ != null &&
    +          slice_ != org.tensorflow.proto.TensorSliceProto.getDefaultInstance()) {
    +          getSliceBuilder().mergeFrom(value);
             } else {
               slice_ = value;
             }
    -        onChanged();
           } else {
             sliceBuilder_.mergeFrom(value);
           }
    -
    +      if (slice_ != null) {
    +        bitField0_ |= 0x00000002;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -777,14 +765,13 @@ public Builder mergeSlice(org.tensorflow.proto.TensorSliceProto value) {
          * .tensorflow.TensorSliceProto slice = 2;
          */
         public Builder clearSlice() {
    -      if (sliceBuilder_ == null) {
    -        slice_ = null;
    -        onChanged();
    -      } else {
    -        slice_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000002);
    +      slice_ = null;
    +      if (sliceBuilder_ != null) {
    +        sliceBuilder_.dispose();
             sliceBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -796,7 +783,7 @@ public Builder clearSlice() {
          * .tensorflow.TensorSliceProto slice = 2;
          */
         public org.tensorflow.proto.TensorSliceProto.Builder getSliceBuilder() {
    -      
    +      bitField0_ |= 0x00000002;
           onChanged();
           return getSliceFieldBuilder().getBuilder();
         }
    @@ -824,11 +811,11 @@ public org.tensorflow.proto.TensorSliceProtoOrBuilder getSliceOrBuilder() {
          *
          * .tensorflow.TensorSliceProto slice = 2;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorSliceProto, org.tensorflow.proto.TensorSliceProto.Builder, org.tensorflow.proto.TensorSliceProtoOrBuilder> 
             getSliceFieldBuilder() {
           if (sliceBuilder_ == null) {
    -        sliceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        sliceBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.TensorSliceProto, org.tensorflow.proto.TensorSliceProto.Builder, org.tensorflow.proto.TensorSliceProtoOrBuilder>(
                     getSlice(),
                     getParentForChildren(),
    @@ -839,7 +826,7 @@ public org.tensorflow.proto.TensorSliceProtoOrBuilder getSliceOrBuilder() {
         }
     
         private org.tensorflow.proto.TensorProto data_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> dataBuilder_;
         /**
          * 
    @@ -851,7 +838,7 @@ public org.tensorflow.proto.TensorSliceProtoOrBuilder getSliceOrBuilder() {
          * @return Whether the data field is set.
          */
         public boolean hasData() {
    -      return dataBuilder_ != null || data_ != null;
    +      return ((bitField0_ & 0x00000004) != 0);
         }
         /**
          * 
    @@ -883,11 +870,11 @@ public Builder setData(org.tensorflow.proto.TensorProto value) {
               throw new NullPointerException();
             }
             data_ = value;
    -        onChanged();
           } else {
             dataBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000004;
    +      onChanged();
           return this;
         }
         /**
    @@ -902,11 +889,11 @@ public Builder setData(
             org.tensorflow.proto.TensorProto.Builder builderForValue) {
           if (dataBuilder_ == null) {
             data_ = builderForValue.build();
    -        onChanged();
           } else {
             dataBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000004;
    +      onChanged();
           return this;
         }
         /**
    @@ -919,17 +906,20 @@ public Builder setData(
          */
         public Builder mergeData(org.tensorflow.proto.TensorProto value) {
           if (dataBuilder_ == null) {
    -        if (data_ != null) {
    -          data_ =
    -            org.tensorflow.proto.TensorProto.newBuilder(data_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000004) != 0) &&
    +          data_ != null &&
    +          data_ != org.tensorflow.proto.TensorProto.getDefaultInstance()) {
    +          getDataBuilder().mergeFrom(value);
             } else {
               data_ = value;
             }
    -        onChanged();
           } else {
             dataBuilder_.mergeFrom(value);
           }
    -
    +      if (data_ != null) {
    +        bitField0_ |= 0x00000004;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -941,14 +931,13 @@ public Builder mergeData(org.tensorflow.proto.TensorProto value) {
          * .tensorflow.TensorProto data = 3;
          */
         public Builder clearData() {
    -      if (dataBuilder_ == null) {
    -        data_ = null;
    -        onChanged();
    -      } else {
    -        data_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000004);
    +      data_ = null;
    +      if (dataBuilder_ != null) {
    +        dataBuilder_.dispose();
             dataBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -960,7 +949,7 @@ public Builder clearData() {
          * .tensorflow.TensorProto data = 3;
          */
         public org.tensorflow.proto.TensorProto.Builder getDataBuilder() {
    -      
    +      bitField0_ |= 0x00000004;
           onChanged();
           return getDataFieldBuilder().getBuilder();
         }
    @@ -988,11 +977,11 @@ public org.tensorflow.proto.TensorProtoOrBuilder getDataOrBuilder() {
          *
          * .tensorflow.TensorProto data = 3;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> 
             getDataFieldBuilder() {
           if (dataBuilder_ == null) {
    -        dataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        dataBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder>(
                     getData(),
                     getParentForChildren(),
    @@ -1001,18 +990,6 @@ public org.tensorflow.proto.TensorProtoOrBuilder getDataOrBuilder() {
           }
           return dataBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.SavedSlice)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedSliceMeta.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedSliceMeta.java
    index 11f292d63b5..6718d0c6493 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedSliceMeta.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedSliceMeta.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/util/saved_tensor_slice.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -12,12 +14,21 @@
      * Protobuf type {@code tensorflow.SavedSliceMeta}
      */
     public final class SavedSliceMeta extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.SavedSliceMeta)
         SavedSliceMetaOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      SavedSliceMeta.class.getName());
    +  }
       // Use SavedSliceMeta.newBuilder() to construct.
    -  private SavedSliceMeta(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private SavedSliceMeta(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private SavedSliceMeta() {
    @@ -26,33 +37,23 @@ private SavedSliceMeta() {
         slice_ = java.util.Collections.emptyList();
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new SavedSliceMeta();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.SavedTensorSliceProtos.internal_static_tensorflow_SavedSliceMeta_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.SavedTensorSliceProtos.internal_static_tensorflow_SavedSliceMeta_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
                 org.tensorflow.proto.SavedSliceMeta.class, org.tensorflow.proto.SavedSliceMeta.Builder.class);
       }
     
    +  private int bitField0_;
       public static final int NAME_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object name_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object name_ = "";
       /**
        * 
        * Name of the tensor.
    @@ -109,7 +110,7 @@ public java.lang.String getName() {
        */
       @java.lang.Override
       public boolean hasShape() {
    -    return shape_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * 
    @@ -132,11 +133,11 @@ public org.tensorflow.proto.TensorShapeProto getShape() {
        */
       @java.lang.Override
       public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
    -    return getShape();
    +    return shape_ == null ? org.tensorflow.proto.TensorShapeProto.getDefaultInstance() : shape_;
       }
     
       public static final int TYPE_FIELD_NUMBER = 3;
    -  private int type_;
    +  private int type_ = 0;
       /**
        * 
        * Type of the tensor
    @@ -157,12 +158,12 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
        * @return The type.
        */
       @java.lang.Override public org.tensorflow.proto.DataType getType() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(type_);
    +    org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(type_);
         return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
       }
     
       public static final int SLICE_FIELD_NUMBER = 4;
    +  @SuppressWarnings("serial")
       private java.util.List slice_;
       /**
        * 
    @@ -236,10 +237,10 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
         }
    -    if (shape_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(2, getShape());
         }
         if (type_ != org.tensorflow.proto.DataType.DT_INVALID.getNumber()) {
    @@ -257,10 +258,10 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
         }
    -    if (shape_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(2, getShape());
         }
    @@ -359,39 +360,41 @@ public static org.tensorflow.proto.SavedSliceMeta parseFrom(
       }
       public static org.tensorflow.proto.SavedSliceMeta parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.SavedSliceMeta parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.SavedSliceMeta parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.SavedSliceMeta parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.SavedSliceMeta parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.SavedSliceMeta parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -411,7 +414,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -424,7 +427,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.SavedSliceMeta}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.SavedSliceMeta)
           org.tensorflow.proto.SavedSliceMetaOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -433,7 +436,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.SavedTensorSliceProtos.internal_static_tensorflow_SavedSliceMeta_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -442,34 +445,39 @@ public static final class Builder extends
     
         // Construct using org.tensorflow.proto.SavedSliceMeta.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getShapeFieldBuilder();
    +        getSliceFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           name_ = "";
    -
    -      if (shapeBuilder_ == null) {
    -        shape_ = null;
    -      } else {
    -        shape_ = null;
    +      shape_ = null;
    +      if (shapeBuilder_ != null) {
    +        shapeBuilder_.dispose();
             shapeBuilder_ = null;
           }
           type_ = 0;
    -
           if (sliceBuilder_ == null) {
             slice_ = java.util.Collections.emptyList();
           } else {
             slice_ = null;
             sliceBuilder_.clear();
           }
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      bitField0_ = (bitField0_ & ~0x00000008);
           return this;
         }
     
    @@ -496,59 +504,42 @@ public org.tensorflow.proto.SavedSliceMeta build() {
         @java.lang.Override
         public org.tensorflow.proto.SavedSliceMeta buildPartial() {
           org.tensorflow.proto.SavedSliceMeta result = new org.tensorflow.proto.SavedSliceMeta(this);
    -      int from_bitField0_ = bitField0_;
    -      result.name_ = name_;
    -      if (shapeBuilder_ == null) {
    -        result.shape_ = shape_;
    -      } else {
    -        result.shape_ = shapeBuilder_.build();
    -      }
    -      result.type_ = type_;
    +      buildPartialRepeatedFields(result);
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartialRepeatedFields(org.tensorflow.proto.SavedSliceMeta result) {
           if (sliceBuilder_ == null) {
    -        if (((bitField0_ & 0x00000001) != 0)) {
    +        if (((bitField0_ & 0x00000008) != 0)) {
               slice_ = java.util.Collections.unmodifiableList(slice_);
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ = (bitField0_ & ~0x00000008);
             }
             result.slice_ = slice_;
           } else {
             result.slice_ = sliceBuilder_.build();
           }
    -      onBuilt();
    -      return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.SavedSliceMeta result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.name_ = name_;
    +      }
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.shape_ = shapeBuilder_ == null
    +            ? shape_
    +            : shapeBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.type_ = type_;
    +      }
    +      result.bitField0_ |= to_bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.SavedSliceMeta) {
    @@ -563,6 +554,7 @@ public Builder mergeFrom(org.tensorflow.proto.SavedSliceMeta other) {
           if (other == org.tensorflow.proto.SavedSliceMeta.getDefaultInstance()) return this;
           if (!other.getName().isEmpty()) {
             name_ = other.name_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (other.hasShape()) {
    @@ -575,7 +567,7 @@ public Builder mergeFrom(org.tensorflow.proto.SavedSliceMeta other) {
             if (!other.slice_.isEmpty()) {
               if (slice_.isEmpty()) {
                 slice_ = other.slice_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000008);
               } else {
                 ensureSliceIsMutable();
                 slice_.addAll(other.slice_);
    @@ -588,9 +580,9 @@ public Builder mergeFrom(org.tensorflow.proto.SavedSliceMeta other) {
                 sliceBuilder_.dispose();
                 sliceBuilder_ = null;
                 slice_ = other.slice_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000008);
                 sliceBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getSliceFieldBuilder() : null;
               } else {
                 sliceBuilder_.addAllMessages(other.slice_);
    @@ -625,19 +617,19 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   name_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
                   input.readMessage(
                       getShapeFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 case 24: {
                   type_ = input.readEnum();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 24
                 case 34: {
    @@ -723,11 +715,9 @@ public java.lang.String getName() {
          */
         public Builder setName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           name_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -740,8 +730,8 @@ public Builder setName(
          * @return This builder for chaining.
          */
         public Builder clearName() {
    -      
           name_ = getDefaultInstance().getName();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -756,18 +746,16 @@ public Builder clearName() {
          */
         public Builder setNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           name_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
     
         private org.tensorflow.proto.TensorShapeProto shape_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> shapeBuilder_;
         /**
          * 
    @@ -778,7 +766,7 @@ public Builder setNameBytes(
          * @return Whether the shape field is set.
          */
         public boolean hasShape() {
    -      return shapeBuilder_ != null || shape_ != null;
    +      return ((bitField0_ & 0x00000002) != 0);
         }
         /**
          * 
    @@ -808,11 +796,11 @@ public Builder setShape(org.tensorflow.proto.TensorShapeProto value) {
               throw new NullPointerException();
             }
             shape_ = value;
    -        onChanged();
           } else {
             shapeBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return this;
         }
         /**
    @@ -826,11 +814,11 @@ public Builder setShape(
             org.tensorflow.proto.TensorShapeProto.Builder builderForValue) {
           if (shapeBuilder_ == null) {
             shape_ = builderForValue.build();
    -        onChanged();
           } else {
             shapeBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return this;
         }
         /**
    @@ -842,17 +830,20 @@ public Builder setShape(
          */
         public Builder mergeShape(org.tensorflow.proto.TensorShapeProto value) {
           if (shapeBuilder_ == null) {
    -        if (shape_ != null) {
    -          shape_ =
    -            org.tensorflow.proto.TensorShapeProto.newBuilder(shape_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000002) != 0) &&
    +          shape_ != null &&
    +          shape_ != org.tensorflow.proto.TensorShapeProto.getDefaultInstance()) {
    +          getShapeBuilder().mergeFrom(value);
             } else {
               shape_ = value;
             }
    -        onChanged();
           } else {
             shapeBuilder_.mergeFrom(value);
           }
    -
    +      if (shape_ != null) {
    +        bitField0_ |= 0x00000002;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -863,14 +854,13 @@ public Builder mergeShape(org.tensorflow.proto.TensorShapeProto value) {
          * .tensorflow.TensorShapeProto shape = 2;
          */
         public Builder clearShape() {
    -      if (shapeBuilder_ == null) {
    -        shape_ = null;
    -        onChanged();
    -      } else {
    -        shape_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000002);
    +      shape_ = null;
    +      if (shapeBuilder_ != null) {
    +        shapeBuilder_.dispose();
             shapeBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -881,7 +871,7 @@ public Builder clearShape() {
          * .tensorflow.TensorShapeProto shape = 2;
          */
         public org.tensorflow.proto.TensorShapeProto.Builder getShapeBuilder() {
    -      
    +      bitField0_ |= 0x00000002;
           onChanged();
           return getShapeFieldBuilder().getBuilder();
         }
    @@ -907,11 +897,11 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
          *
          * .tensorflow.TensorShapeProto shape = 2;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> 
             getShapeFieldBuilder() {
           if (shapeBuilder_ == null) {
    -        shapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        shapeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder>(
                     getShape(),
                     getParentForChildren(),
    @@ -943,8 +933,8 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
          * @return This builder for chaining.
          */
         public Builder setTypeValue(int value) {
    -      
           type_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -958,8 +948,7 @@ public Builder setTypeValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.DataType getType() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(type_);
    +      org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(type_);
           return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
         }
         /**
    @@ -975,7 +964,7 @@ public Builder setType(org.tensorflow.proto.DataType value) {
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00000004;
           type_ = value.getNumber();
           onChanged();
           return this;
    @@ -989,7 +978,7 @@ public Builder setType(org.tensorflow.proto.DataType value) {
          * @return This builder for chaining.
          */
         public Builder clearType() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000004);
           type_ = 0;
           onChanged();
           return this;
    @@ -998,13 +987,13 @@ public Builder clearType() {
         private java.util.List slice_ =
           java.util.Collections.emptyList();
         private void ensureSliceIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    +      if (!((bitField0_ & 0x00000008) != 0)) {
             slice_ = new java.util.ArrayList(slice_);
    -        bitField0_ |= 0x00000001;
    +        bitField0_ |= 0x00000008;
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.TensorSliceProto, org.tensorflow.proto.TensorSliceProto.Builder, org.tensorflow.proto.TensorSliceProtoOrBuilder> sliceBuilder_;
     
         /**
    @@ -1194,7 +1183,7 @@ public Builder addAllSlice(
         public Builder clearSlice() {
           if (sliceBuilder_ == null) {
             slice_ = java.util.Collections.emptyList();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        bitField0_ = (bitField0_ & ~0x00000008);
             onChanged();
           } else {
             sliceBuilder_.clear();
    @@ -1292,32 +1281,20 @@ public org.tensorflow.proto.TensorSliceProto.Builder addSliceBuilder(
              getSliceBuilderList() {
           return getSliceFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.TensorSliceProto, org.tensorflow.proto.TensorSliceProto.Builder, org.tensorflow.proto.TensorSliceProtoOrBuilder> 
             getSliceFieldBuilder() {
           if (sliceBuilder_ == null) {
    -        sliceBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        sliceBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.TensorSliceProto, org.tensorflow.proto.TensorSliceProto.Builder, org.tensorflow.proto.TensorSliceProtoOrBuilder>(
                     slice_,
    -                ((bitField0_ & 0x00000001) != 0),
    +                ((bitField0_ & 0x00000008) != 0),
                     getParentForChildren(),
                     isClean());
             slice_ = null;
           }
           return sliceBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.SavedSliceMeta)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedSliceMetaOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedSliceMetaOrBuilder.java
    index a42c77a3a54..b16e0be04c9 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedSliceMetaOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedSliceMetaOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/util/saved_tensor_slice.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedSliceOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedSliceOrBuilder.java
    index 414f5bef75b..0b485f9caca 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedSliceOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedSliceOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/util/saved_tensor_slice.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSliceMeta.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSliceMeta.java
    index 14751b8b480..ebe9c66228b 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSliceMeta.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSliceMeta.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/util/saved_tensor_slice.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -12,44 +14,43 @@
      * Protobuf type {@code tensorflow.SavedTensorSliceMeta}
      */
     public final class SavedTensorSliceMeta extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.SavedTensorSliceMeta)
         SavedTensorSliceMetaOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      SavedTensorSliceMeta.class.getName());
    +  }
       // Use SavedTensorSliceMeta.newBuilder() to construct.
    -  private SavedTensorSliceMeta(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private SavedTensorSliceMeta(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private SavedTensorSliceMeta() {
         tensor_ = java.util.Collections.emptyList();
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new SavedTensorSliceMeta();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.SavedTensorSliceProtos.internal_static_tensorflow_SavedTensorSliceMeta_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.SavedTensorSliceProtos.internal_static_tensorflow_SavedTensorSliceMeta_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
                 org.tensorflow.proto.SavedTensorSliceMeta.class, org.tensorflow.proto.SavedTensorSliceMeta.Builder.class);
       }
     
    +  private int bitField0_;
       public static final int TENSOR_FIELD_NUMBER = 1;
    +  @SuppressWarnings("serial")
       private java.util.List tensor_;
       /**
        * 
    @@ -122,7 +123,7 @@ public org.tensorflow.proto.SavedSliceMetaOrBuilder getTensorOrBuilder(
        */
       @java.lang.Override
       public boolean hasVersions() {
    -    return versions_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * 
    @@ -147,7 +148,7 @@ public org.tensorflow.proto.VersionDef getVersions() {
        */
       @java.lang.Override
       public org.tensorflow.proto.VersionDefOrBuilder getVersionsOrBuilder() {
    -    return getVersions();
    +    return versions_ == null ? org.tensorflow.proto.VersionDef.getDefaultInstance() : versions_;
       }
     
       private byte memoizedIsInitialized = -1;
    @@ -167,7 +168,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         for (int i = 0; i < tensor_.size(); i++) {
           output.writeMessage(1, tensor_.get(i));
         }
    -    if (versions_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(2, getVersions());
         }
         getUnknownFields().writeTo(output);
    @@ -183,7 +184,7 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(1, tensor_.get(i));
         }
    -    if (versions_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(2, getVersions());
         }
    @@ -267,39 +268,41 @@ public static org.tensorflow.proto.SavedTensorSliceMeta parseFrom(
       }
       public static org.tensorflow.proto.SavedTensorSliceMeta parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.SavedTensorSliceMeta parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.SavedTensorSliceMeta parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.SavedTensorSliceMeta parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.SavedTensorSliceMeta parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.SavedTensorSliceMeta parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -319,7 +322,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -332,7 +335,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.SavedTensorSliceMeta}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.SavedTensorSliceMeta)
           org.tensorflow.proto.SavedTensorSliceMetaOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -341,7 +344,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.SavedTensorSliceProtos.internal_static_tensorflow_SavedTensorSliceMeta_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -350,17 +353,25 @@ public static final class Builder extends
     
         // Construct using org.tensorflow.proto.SavedTensorSliceMeta.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getTensorFieldBuilder();
    +        getVersionsFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           if (tensorBuilder_ == null) {
             tensor_ = java.util.Collections.emptyList();
           } else {
    @@ -368,10 +379,9 @@ public Builder clear() {
             tensorBuilder_.clear();
           }
           bitField0_ = (bitField0_ & ~0x00000001);
    -      if (versionsBuilder_ == null) {
    -        versions_ = null;
    -      } else {
    -        versions_ = null;
    +      versions_ = null;
    +      if (versionsBuilder_ != null) {
    +        versionsBuilder_.dispose();
             versionsBuilder_ = null;
           }
           return this;
    @@ -400,7 +410,13 @@ public org.tensorflow.proto.SavedTensorSliceMeta build() {
         @java.lang.Override
         public org.tensorflow.proto.SavedTensorSliceMeta buildPartial() {
           org.tensorflow.proto.SavedTensorSliceMeta result = new org.tensorflow.proto.SavedTensorSliceMeta(this);
    -      int from_bitField0_ = bitField0_;
    +      buildPartialRepeatedFields(result);
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartialRepeatedFields(org.tensorflow.proto.SavedTensorSliceMeta result) {
           if (tensorBuilder_ == null) {
             if (((bitField0_ & 0x00000001) != 0)) {
               tensor_ = java.util.Collections.unmodifiableList(tensor_);
    @@ -410,47 +426,20 @@ public org.tensorflow.proto.SavedTensorSliceMeta buildPartial() {
           } else {
             result.tensor_ = tensorBuilder_.build();
           }
    -      if (versionsBuilder_ == null) {
    -        result.versions_ = versions_;
    -      } else {
    -        result.versions_ = versionsBuilder_.build();
    -      }
    -      onBuilt();
    -      return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.SavedTensorSliceMeta result) {
    +      int from_bitField0_ = bitField0_;
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.versions_ = versionsBuilder_ == null
    +            ? versions_
    +            : versionsBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
    +      }
    +      result.bitField0_ |= to_bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.SavedTensorSliceMeta) {
    @@ -482,7 +471,7 @@ public Builder mergeFrom(org.tensorflow.proto.SavedTensorSliceMeta other) {
                 tensor_ = other.tensor_;
                 bitField0_ = (bitField0_ & ~0x00000001);
                 tensorBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getTensorFieldBuilder() : null;
               } else {
                 tensorBuilder_.addAllMessages(other.tensor_);
    @@ -535,7 +524,7 @@ public Builder mergeFrom(
                   input.readMessage(
                       getVersionsFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 default: {
    @@ -564,7 +553,7 @@ private void ensureTensorIsMutable() {
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.SavedSliceMeta, org.tensorflow.proto.SavedSliceMeta.Builder, org.tensorflow.proto.SavedSliceMetaOrBuilder> tensorBuilder_;
     
         /**
    @@ -852,11 +841,11 @@ public org.tensorflow.proto.SavedSliceMeta.Builder addTensorBuilder(
              getTensorBuilderList() {
           return getTensorFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.SavedSliceMeta, org.tensorflow.proto.SavedSliceMeta.Builder, org.tensorflow.proto.SavedSliceMetaOrBuilder> 
             getTensorFieldBuilder() {
           if (tensorBuilder_ == null) {
    -        tensorBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        tensorBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.SavedSliceMeta, org.tensorflow.proto.SavedSliceMeta.Builder, org.tensorflow.proto.SavedSliceMetaOrBuilder>(
                     tensor_,
                     ((bitField0_ & 0x00000001) != 0),
    @@ -868,7 +857,7 @@ public org.tensorflow.proto.SavedSliceMeta.Builder addTensorBuilder(
         }
     
         private org.tensorflow.proto.VersionDef versions_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.VersionDef, org.tensorflow.proto.VersionDef.Builder, org.tensorflow.proto.VersionDefOrBuilder> versionsBuilder_;
         /**
          * 
    @@ -880,7 +869,7 @@ public org.tensorflow.proto.SavedSliceMeta.Builder addTensorBuilder(
          * @return Whether the versions field is set.
          */
         public boolean hasVersions() {
    -      return versionsBuilder_ != null || versions_ != null;
    +      return ((bitField0_ & 0x00000002) != 0);
         }
         /**
          * 
    @@ -912,11 +901,11 @@ public Builder setVersions(org.tensorflow.proto.VersionDef value) {
               throw new NullPointerException();
             }
             versions_ = value;
    -        onChanged();
           } else {
             versionsBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return this;
         }
         /**
    @@ -931,11 +920,11 @@ public Builder setVersions(
             org.tensorflow.proto.VersionDef.Builder builderForValue) {
           if (versionsBuilder_ == null) {
             versions_ = builderForValue.build();
    -        onChanged();
           } else {
             versionsBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return this;
         }
         /**
    @@ -948,17 +937,20 @@ public Builder setVersions(
          */
         public Builder mergeVersions(org.tensorflow.proto.VersionDef value) {
           if (versionsBuilder_ == null) {
    -        if (versions_ != null) {
    -          versions_ =
    -            org.tensorflow.proto.VersionDef.newBuilder(versions_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000002) != 0) &&
    +          versions_ != null &&
    +          versions_ != org.tensorflow.proto.VersionDef.getDefaultInstance()) {
    +          getVersionsBuilder().mergeFrom(value);
             } else {
               versions_ = value;
             }
    -        onChanged();
           } else {
             versionsBuilder_.mergeFrom(value);
           }
    -
    +      if (versions_ != null) {
    +        bitField0_ |= 0x00000002;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -970,14 +962,13 @@ public Builder mergeVersions(org.tensorflow.proto.VersionDef value) {
          * .tensorflow.VersionDef versions = 2;
          */
         public Builder clearVersions() {
    -      if (versionsBuilder_ == null) {
    -        versions_ = null;
    -        onChanged();
    -      } else {
    -        versions_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000002);
    +      versions_ = null;
    +      if (versionsBuilder_ != null) {
    +        versionsBuilder_.dispose();
             versionsBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -989,7 +980,7 @@ public Builder clearVersions() {
          * .tensorflow.VersionDef versions = 2;
          */
         public org.tensorflow.proto.VersionDef.Builder getVersionsBuilder() {
    -      
    +      bitField0_ |= 0x00000002;
           onChanged();
           return getVersionsFieldBuilder().getBuilder();
         }
    @@ -1017,11 +1008,11 @@ public org.tensorflow.proto.VersionDefOrBuilder getVersionsOrBuilder() {
          *
          * .tensorflow.VersionDef versions = 2;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.VersionDef, org.tensorflow.proto.VersionDef.Builder, org.tensorflow.proto.VersionDefOrBuilder> 
             getVersionsFieldBuilder() {
           if (versionsBuilder_ == null) {
    -        versionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        versionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.VersionDef, org.tensorflow.proto.VersionDef.Builder, org.tensorflow.proto.VersionDefOrBuilder>(
                     getVersions(),
                     getParentForChildren(),
    @@ -1030,18 +1021,6 @@ public org.tensorflow.proto.VersionDefOrBuilder getVersionsOrBuilder() {
           }
           return versionsBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.SavedTensorSliceMeta)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSliceMetaOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSliceMetaOrBuilder.java
    index e00e2fd2ae9..bb69dc63e26 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSliceMetaOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSliceMetaOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/util/saved_tensor_slice.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSliceProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSliceProtos.java
    index dc265ab518b..57c5be9c252 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSliceProtos.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSliceProtos.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/util/saved_tensor_slice.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class SavedTensorSliceProtos {
       private SavedTensorSliceProtos() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      SavedTensorSliceProtos.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,22 +28,22 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_SavedSliceMeta_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_SavedSliceMeta_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_SavedTensorSliceMeta_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_SavedTensorSliceMeta_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_SavedSlice_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_SavedSlice_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_SavedTensorSlices_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_SavedTensorSlices_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -77,27 +88,28 @@ public static void registerAllExtensions(
         internal_static_tensorflow_SavedSliceMeta_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_SavedSliceMeta_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_SavedSliceMeta_descriptor,
             new java.lang.String[] { "Name", "Shape", "Type", "Slice", });
         internal_static_tensorflow_SavedTensorSliceMeta_descriptor =
           getDescriptor().getMessageTypes().get(1);
         internal_static_tensorflow_SavedTensorSliceMeta_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_SavedTensorSliceMeta_descriptor,
             new java.lang.String[] { "Tensor", "Versions", });
         internal_static_tensorflow_SavedSlice_descriptor =
           getDescriptor().getMessageTypes().get(2);
         internal_static_tensorflow_SavedSlice_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_SavedSlice_descriptor,
             new java.lang.String[] { "Name", "Slice", "Data", });
         internal_static_tensorflow_SavedTensorSlices_descriptor =
           getDescriptor().getMessageTypes().get(3);
         internal_static_tensorflow_SavedTensorSlices_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_SavedTensorSlices_descriptor,
             new java.lang.String[] { "Meta", "Data", });
    +    descriptor.resolveAllFeaturesImmutable();
         org.tensorflow.proto.TensorShapeProtos.getDescriptor();
         org.tensorflow.proto.TensorSliceProtos.getDescriptor();
         org.tensorflow.proto.TensorProtos.getDescriptor();
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSlices.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSlices.java
    index 32d7d41a63c..73a6edbc8d1 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSlices.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSlices.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/util/saved_tensor_slice.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -12,42 +14,40 @@
      * Protobuf type {@code tensorflow.SavedTensorSlices}
      */
     public final class SavedTensorSlices extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.SavedTensorSlices)
         SavedTensorSlicesOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      SavedTensorSlices.class.getName());
    +  }
       // Use SavedTensorSlices.newBuilder() to construct.
    -  private SavedTensorSlices(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private SavedTensorSlices(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private SavedTensorSlices() {
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new SavedTensorSlices();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.SavedTensorSliceProtos.internal_static_tensorflow_SavedTensorSlices_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.SavedTensorSliceProtos.internal_static_tensorflow_SavedTensorSlices_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
                 org.tensorflow.proto.SavedTensorSlices.class, org.tensorflow.proto.SavedTensorSlices.Builder.class);
       }
     
    +  private int bitField0_;
       public static final int META_FIELD_NUMBER = 1;
       private org.tensorflow.proto.SavedTensorSliceMeta meta_;
       /**
    @@ -61,7 +61,7 @@ protected java.lang.Object newInstance(
        */
       @java.lang.Override
       public boolean hasMeta() {
    -    return meta_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * 
    @@ -86,7 +86,7 @@ public org.tensorflow.proto.SavedTensorSliceMeta getMeta() {
        */
       @java.lang.Override
       public org.tensorflow.proto.SavedTensorSliceMetaOrBuilder getMetaOrBuilder() {
    -    return getMeta();
    +    return meta_ == null ? org.tensorflow.proto.SavedTensorSliceMeta.getDefaultInstance() : meta_;
       }
     
       public static final int DATA_FIELD_NUMBER = 2;
    @@ -101,7 +101,7 @@ public org.tensorflow.proto.SavedTensorSliceMetaOrBuilder getMetaOrBuilder() {
        */
       @java.lang.Override
       public boolean hasData() {
    -    return data_ != null;
    +    return ((bitField0_ & 0x00000002) != 0);
       }
       /**
        * 
    @@ -124,7 +124,7 @@ public org.tensorflow.proto.SavedSlice getData() {
        */
       @java.lang.Override
       public org.tensorflow.proto.SavedSliceOrBuilder getDataOrBuilder() {
    -    return getData();
    +    return data_ == null ? org.tensorflow.proto.SavedSlice.getDefaultInstance() : data_;
       }
     
       private byte memoizedIsInitialized = -1;
    @@ -141,10 +141,10 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (meta_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(1, getMeta());
         }
    -    if (data_ != null) {
    +    if (((bitField0_ & 0x00000002) != 0)) {
           output.writeMessage(2, getData());
         }
         getUnknownFields().writeTo(output);
    @@ -156,11 +156,11 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (meta_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(1, getMeta());
         }
    -    if (data_ != null) {
    +    if (((bitField0_ & 0x00000002) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(2, getData());
         }
    @@ -247,39 +247,41 @@ public static org.tensorflow.proto.SavedTensorSlices parseFrom(
       }
       public static org.tensorflow.proto.SavedTensorSlices parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.SavedTensorSlices parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.SavedTensorSlices parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.SavedTensorSlices parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.SavedTensorSlices parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.SavedTensorSlices parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -299,7 +301,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -312,7 +314,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.SavedTensorSlices}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.SavedTensorSlices)
           org.tensorflow.proto.SavedTensorSlicesOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -321,7 +323,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.SavedTensorSliceProtos.internal_static_tensorflow_SavedTensorSlices_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -330,27 +332,33 @@ public static final class Builder extends
     
         // Construct using org.tensorflow.proto.SavedTensorSlices.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getMetaFieldBuilder();
    +        getDataFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    -      if (metaBuilder_ == null) {
    -        meta_ = null;
    -      } else {
    -        meta_ = null;
    +      bitField0_ = 0;
    +      meta_ = null;
    +      if (metaBuilder_ != null) {
    +        metaBuilder_.dispose();
             metaBuilder_ = null;
           }
    -      if (dataBuilder_ == null) {
    -        data_ = null;
    -      } else {
    -        data_ = null;
    +      data_ = null;
    +      if (dataBuilder_ != null) {
    +        dataBuilder_.dispose();
             dataBuilder_ = null;
           }
           return this;
    @@ -379,52 +387,29 @@ public org.tensorflow.proto.SavedTensorSlices build() {
         @java.lang.Override
         public org.tensorflow.proto.SavedTensorSlices buildPartial() {
           org.tensorflow.proto.SavedTensorSlices result = new org.tensorflow.proto.SavedTensorSlices(this);
    -      if (metaBuilder_ == null) {
    -        result.meta_ = meta_;
    -      } else {
    -        result.meta_ = metaBuilder_.build();
    -      }
    -      if (dataBuilder_ == null) {
    -        result.data_ = data_;
    -      } else {
    -        result.data_ = dataBuilder_.build();
    -      }
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.SavedTensorSlices result) {
    +      int from_bitField0_ = bitField0_;
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.meta_ = metaBuilder_ == null
    +            ? meta_
    +            : metaBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.data_ = dataBuilder_ == null
    +            ? data_
    +            : dataBuilder_.build();
    +        to_bitField0_ |= 0x00000002;
    +      }
    +      result.bitField0_ |= to_bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.SavedTensorSlices) {
    @@ -473,14 +458,14 @@ public Builder mergeFrom(
                   input.readMessage(
                       getMetaFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
                   input.readMessage(
                       getDataFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 default: {
    @@ -498,9 +483,10 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private org.tensorflow.proto.SavedTensorSliceMeta meta_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.SavedTensorSliceMeta, org.tensorflow.proto.SavedTensorSliceMeta.Builder, org.tensorflow.proto.SavedTensorSliceMetaOrBuilder> metaBuilder_;
         /**
          * 
    @@ -512,7 +498,7 @@ public Builder mergeFrom(
          * @return Whether the meta field is set.
          */
         public boolean hasMeta() {
    -      return metaBuilder_ != null || meta_ != null;
    +      return ((bitField0_ & 0x00000001) != 0);
         }
         /**
          * 
    @@ -544,11 +530,11 @@ public Builder setMeta(org.tensorflow.proto.SavedTensorSliceMeta value) {
               throw new NullPointerException();
             }
             meta_ = value;
    -        onChanged();
           } else {
             metaBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000001;
    +      onChanged();
           return this;
         }
         /**
    @@ -563,11 +549,11 @@ public Builder setMeta(
             org.tensorflow.proto.SavedTensorSliceMeta.Builder builderForValue) {
           if (metaBuilder_ == null) {
             meta_ = builderForValue.build();
    -        onChanged();
           } else {
             metaBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000001;
    +      onChanged();
           return this;
         }
         /**
    @@ -580,17 +566,20 @@ public Builder setMeta(
          */
         public Builder mergeMeta(org.tensorflow.proto.SavedTensorSliceMeta value) {
           if (metaBuilder_ == null) {
    -        if (meta_ != null) {
    -          meta_ =
    -            org.tensorflow.proto.SavedTensorSliceMeta.newBuilder(meta_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000001) != 0) &&
    +          meta_ != null &&
    +          meta_ != org.tensorflow.proto.SavedTensorSliceMeta.getDefaultInstance()) {
    +          getMetaBuilder().mergeFrom(value);
             } else {
               meta_ = value;
             }
    -        onChanged();
           } else {
             metaBuilder_.mergeFrom(value);
           }
    -
    +      if (meta_ != null) {
    +        bitField0_ |= 0x00000001;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -602,14 +591,13 @@ public Builder mergeMeta(org.tensorflow.proto.SavedTensorSliceMeta value) {
          * .tensorflow.SavedTensorSliceMeta meta = 1;
          */
         public Builder clearMeta() {
    -      if (metaBuilder_ == null) {
    -        meta_ = null;
    -        onChanged();
    -      } else {
    -        meta_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000001);
    +      meta_ = null;
    +      if (metaBuilder_ != null) {
    +        metaBuilder_.dispose();
             metaBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -621,7 +609,7 @@ public Builder clearMeta() {
          * .tensorflow.SavedTensorSliceMeta meta = 1;
          */
         public org.tensorflow.proto.SavedTensorSliceMeta.Builder getMetaBuilder() {
    -      
    +      bitField0_ |= 0x00000001;
           onChanged();
           return getMetaFieldBuilder().getBuilder();
         }
    @@ -649,11 +637,11 @@ public org.tensorflow.proto.SavedTensorSliceMetaOrBuilder getMetaOrBuilder() {
          *
          * .tensorflow.SavedTensorSliceMeta meta = 1;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.SavedTensorSliceMeta, org.tensorflow.proto.SavedTensorSliceMeta.Builder, org.tensorflow.proto.SavedTensorSliceMetaOrBuilder> 
             getMetaFieldBuilder() {
           if (metaBuilder_ == null) {
    -        metaBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        metaBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.SavedTensorSliceMeta, org.tensorflow.proto.SavedTensorSliceMeta.Builder, org.tensorflow.proto.SavedTensorSliceMetaOrBuilder>(
                     getMeta(),
                     getParentForChildren(),
    @@ -664,7 +652,7 @@ public org.tensorflow.proto.SavedTensorSliceMetaOrBuilder getMetaOrBuilder() {
         }
     
         private org.tensorflow.proto.SavedSlice data_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.SavedSlice, org.tensorflow.proto.SavedSlice.Builder, org.tensorflow.proto.SavedSliceOrBuilder> dataBuilder_;
         /**
          * 
    @@ -675,7 +663,7 @@ public org.tensorflow.proto.SavedTensorSliceMetaOrBuilder getMetaOrBuilder() {
          * @return Whether the data field is set.
          */
         public boolean hasData() {
    -      return dataBuilder_ != null || data_ != null;
    +      return ((bitField0_ & 0x00000002) != 0);
         }
         /**
          * 
    @@ -705,11 +693,11 @@ public Builder setData(org.tensorflow.proto.SavedSlice value) {
               throw new NullPointerException();
             }
             data_ = value;
    -        onChanged();
           } else {
             dataBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return this;
         }
         /**
    @@ -723,11 +711,11 @@ public Builder setData(
             org.tensorflow.proto.SavedSlice.Builder builderForValue) {
           if (dataBuilder_ == null) {
             data_ = builderForValue.build();
    -        onChanged();
           } else {
             dataBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return this;
         }
         /**
    @@ -739,17 +727,20 @@ public Builder setData(
          */
         public Builder mergeData(org.tensorflow.proto.SavedSlice value) {
           if (dataBuilder_ == null) {
    -        if (data_ != null) {
    -          data_ =
    -            org.tensorflow.proto.SavedSlice.newBuilder(data_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000002) != 0) &&
    +          data_ != null &&
    +          data_ != org.tensorflow.proto.SavedSlice.getDefaultInstance()) {
    +          getDataBuilder().mergeFrom(value);
             } else {
               data_ = value;
             }
    -        onChanged();
           } else {
             dataBuilder_.mergeFrom(value);
           }
    -
    +      if (data_ != null) {
    +        bitField0_ |= 0x00000002;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -760,14 +751,13 @@ public Builder mergeData(org.tensorflow.proto.SavedSlice value) {
          * .tensorflow.SavedSlice data = 2;
          */
         public Builder clearData() {
    -      if (dataBuilder_ == null) {
    -        data_ = null;
    -        onChanged();
    -      } else {
    -        data_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000002);
    +      data_ = null;
    +      if (dataBuilder_ != null) {
    +        dataBuilder_.dispose();
             dataBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -778,7 +768,7 @@ public Builder clearData() {
          * .tensorflow.SavedSlice data = 2;
          */
         public org.tensorflow.proto.SavedSlice.Builder getDataBuilder() {
    -      
    +      bitField0_ |= 0x00000002;
           onChanged();
           return getDataFieldBuilder().getBuilder();
         }
    @@ -804,11 +794,11 @@ public org.tensorflow.proto.SavedSliceOrBuilder getDataOrBuilder() {
          *
          * .tensorflow.SavedSlice data = 2;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.SavedSlice, org.tensorflow.proto.SavedSlice.Builder, org.tensorflow.proto.SavedSliceOrBuilder> 
             getDataFieldBuilder() {
           if (dataBuilder_ == null) {
    -        dataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        dataBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.SavedSlice, org.tensorflow.proto.SavedSlice.Builder, org.tensorflow.proto.SavedSliceOrBuilder>(
                     getData(),
                     getParentForChildren(),
    @@ -817,18 +807,6 @@ public org.tensorflow.proto.SavedSliceOrBuilder getDataOrBuilder() {
           }
           return dataBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.SavedTensorSlices)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSlicesOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSlicesOrBuilder.java
    index 00604c4b783..b22a704bc31 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSlicesOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSlicesOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/util/saved_tensor_slice.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaverDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaverDef.java
    index 2975b8177e4..c7940c18c50 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaverDef.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaverDef.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/saver.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,12 +13,21 @@
      * Protobuf type {@code tensorflow.SaverDef}
      */
     public final class SaverDef extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.SaverDef)
         SaverDefOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      SaverDef.class.getName());
    +  }
       // Use SaverDef.newBuilder() to construct.
    -  private SaverDef(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private SaverDef(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private SaverDef() {
    @@ -26,25 +37,13 @@ private SaverDef() {
         version_ = 0;
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new SaverDef();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.SaverProtos.internal_static_tensorflow_SaverDef_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.SaverProtos.internal_static_tensorflow_SaverDef_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -90,6 +89,15 @@ public enum CheckpointFormatVersion
         UNRECOGNIZED(-1),
         ;
     
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        CheckpointFormatVersion.class.getName());
    +    }
         /**
          * 
          * Internal legacy format.
    @@ -200,7 +208,8 @@ private CheckpointFormatVersion(int value) {
       }
     
       public static final int FILENAME_TENSOR_NAME_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object filenameTensorName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object filenameTensorName_ = "";
       /**
        * 
        * The name of the tensor in which to specify the filename when saving or
    @@ -248,7 +257,8 @@ public java.lang.String getFilenameTensorName() {
       }
     
       public static final int SAVE_TENSOR_NAME_FIELD_NUMBER = 2;
    -  private volatile java.lang.Object saveTensorName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object saveTensorName_ = "";
       /**
        * 
        * The operation to run when saving a model checkpoint.
    @@ -294,7 +304,8 @@ public java.lang.String getSaveTensorName() {
       }
     
       public static final int RESTORE_OP_NAME_FIELD_NUMBER = 3;
    -  private volatile java.lang.Object restoreOpName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object restoreOpName_ = "";
       /**
        * 
        * The operation to run when restoring a model checkpoint.
    @@ -340,7 +351,7 @@ public java.lang.String getRestoreOpName() {
       }
     
       public static final int MAX_TO_KEEP_FIELD_NUMBER = 4;
    -  private int maxToKeep_;
    +  private int maxToKeep_ = 0;
       /**
        * 
        * Maximum number of checkpoints to keep.  If 0, no checkpoints are deleted.
    @@ -355,7 +366,7 @@ public int getMaxToKeep() {
       }
     
       public static final int SHARDED_FIELD_NUMBER = 5;
    -  private boolean sharded_;
    +  private boolean sharded_ = false;
       /**
        * 
        * Shard the save files, one per device that has Variable nodes.
    @@ -370,7 +381,7 @@ public boolean getSharded() {
       }
     
       public static final int KEEP_CHECKPOINT_EVERY_N_HOURS_FIELD_NUMBER = 6;
    -  private float keepCheckpointEveryNHours_;
    +  private float keepCheckpointEveryNHours_ = 0F;
       /**
        * 
        * How often to keep an additional checkpoint. If not specified, only the last
    @@ -388,7 +399,7 @@ public float getKeepCheckpointEveryNHours() {
       }
     
       public static final int VERSION_FIELD_NUMBER = 7;
    -  private int version_;
    +  private int version_ = 0;
       /**
        * .tensorflow.SaverDef.CheckpointFormatVersion version = 7;
        * @return The enum numeric value on the wire for version.
    @@ -401,8 +412,7 @@ public float getKeepCheckpointEveryNHours() {
        * @return The version.
        */
       @java.lang.Override public org.tensorflow.proto.SaverDef.CheckpointFormatVersion getVersion() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.SaverDef.CheckpointFormatVersion result = org.tensorflow.proto.SaverDef.CheckpointFormatVersion.valueOf(version_);
    +    org.tensorflow.proto.SaverDef.CheckpointFormatVersion result = org.tensorflow.proto.SaverDef.CheckpointFormatVersion.forNumber(version_);
         return result == null ? org.tensorflow.proto.SaverDef.CheckpointFormatVersion.UNRECOGNIZED : result;
       }
     
    @@ -420,14 +430,14 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filenameTensorName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, filenameTensorName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filenameTensorName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, filenameTensorName_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(saveTensorName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, saveTensorName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(saveTensorName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 2, saveTensorName_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(restoreOpName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, restoreOpName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(restoreOpName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 3, restoreOpName_);
         }
         if (maxToKeep_ != 0) {
           output.writeInt32(4, maxToKeep_);
    @@ -450,14 +460,14 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filenameTensorName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, filenameTensorName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filenameTensorName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, filenameTensorName_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(saveTensorName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, saveTensorName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(saveTensorName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(2, saveTensorName_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(restoreOpName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, restoreOpName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(restoreOpName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(3, restoreOpName_);
         }
         if (maxToKeep_ != 0) {
           size += com.google.protobuf.CodedOutputStream
    @@ -570,39 +580,41 @@ public static org.tensorflow.proto.SaverDef parseFrom(
       }
       public static org.tensorflow.proto.SaverDef parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.SaverDef parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.SaverDef parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.SaverDef parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.SaverDef parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.SaverDef parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -622,7 +634,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -634,7 +646,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.SaverDef}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.SaverDef)
           org.tensorflow.proto.SaverDefOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -643,7 +655,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.SaverProtos.internal_static_tensorflow_SaverDef_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -656,27 +668,21 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           filenameTensorName_ = "";
    -
           saveTensorName_ = "";
    -
           restoreOpName_ = "";
    -
           maxToKeep_ = 0;
    -
           sharded_ = false;
    -
           keepCheckpointEveryNHours_ = 0F;
    -
           version_ = 0;
    -
           return this;
         }
     
    @@ -703,49 +709,36 @@ public org.tensorflow.proto.SaverDef build() {
         @java.lang.Override
         public org.tensorflow.proto.SaverDef buildPartial() {
           org.tensorflow.proto.SaverDef result = new org.tensorflow.proto.SaverDef(this);
    -      result.filenameTensorName_ = filenameTensorName_;
    -      result.saveTensorName_ = saveTensorName_;
    -      result.restoreOpName_ = restoreOpName_;
    -      result.maxToKeep_ = maxToKeep_;
    -      result.sharded_ = sharded_;
    -      result.keepCheckpointEveryNHours_ = keepCheckpointEveryNHours_;
    -      result.version_ = version_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.SaverDef result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.filenameTensorName_ = filenameTensorName_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.saveTensorName_ = saveTensorName_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.restoreOpName_ = restoreOpName_;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.maxToKeep_ = maxToKeep_;
    +      }
    +      if (((from_bitField0_ & 0x00000010) != 0)) {
    +        result.sharded_ = sharded_;
    +      }
    +      if (((from_bitField0_ & 0x00000020) != 0)) {
    +        result.keepCheckpointEveryNHours_ = keepCheckpointEveryNHours_;
    +      }
    +      if (((from_bitField0_ & 0x00000040) != 0)) {
    +        result.version_ = version_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.SaverDef) {
    @@ -760,14 +753,17 @@ public Builder mergeFrom(org.tensorflow.proto.SaverDef other) {
           if (other == org.tensorflow.proto.SaverDef.getDefaultInstance()) return this;
           if (!other.getFilenameTensorName().isEmpty()) {
             filenameTensorName_ = other.filenameTensorName_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (!other.getSaveTensorName().isEmpty()) {
             saveTensorName_ = other.saveTensorName_;
    +        bitField0_ |= 0x00000002;
             onChanged();
           }
           if (!other.getRestoreOpName().isEmpty()) {
             restoreOpName_ = other.restoreOpName_;
    +        bitField0_ |= 0x00000004;
             onChanged();
           }
           if (other.getMaxToKeep() != 0) {
    @@ -810,37 +806,37 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   filenameTensorName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
                   saveTensorName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 case 26: {
                   restoreOpName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 26
                 case 32: {
                   maxToKeep_ = input.readInt32();
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 32
                 case 40: {
                   sharded_ = input.readBool();
    -
    +              bitField0_ |= 0x00000010;
                   break;
                 } // case 40
                 case 53: {
                   keepCheckpointEveryNHours_ = input.readFloat();
    -
    +              bitField0_ |= 0x00000020;
                   break;
                 } // case 53
                 case 56: {
                   version_ = input.readEnum();
    -
    +              bitField0_ |= 0x00000040;
                   break;
                 } // case 56
                 default: {
    @@ -858,6 +854,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private java.lang.Object filenameTensorName_ = "";
         /**
    @@ -915,11 +912,9 @@ public java.lang.String getFilenameTensorName() {
          */
         public Builder setFilenameTensorName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           filenameTensorName_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -933,8 +928,8 @@ public Builder setFilenameTensorName(
          * @return This builder for chaining.
          */
         public Builder clearFilenameTensorName() {
    -      
           filenameTensorName_ = getDefaultInstance().getFilenameTensorName();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -950,12 +945,10 @@ public Builder clearFilenameTensorName() {
          */
         public Builder setFilenameTensorNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           filenameTensorName_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -1013,11 +1006,9 @@ public java.lang.String getSaveTensorName() {
          */
         public Builder setSaveTensorName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           saveTensorName_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -1030,8 +1021,8 @@ public Builder setSaveTensorName(
          * @return This builder for chaining.
          */
         public Builder clearSaveTensorName() {
    -      
           saveTensorName_ = getDefaultInstance().getSaveTensorName();
    +      bitField0_ = (bitField0_ & ~0x00000002);
           onChanged();
           return this;
         }
    @@ -1046,12 +1037,10 @@ public Builder clearSaveTensorName() {
          */
         public Builder setSaveTensorNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           saveTensorName_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -1109,11 +1098,9 @@ public java.lang.String getRestoreOpName() {
          */
         public Builder setRestoreOpName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           restoreOpName_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -1126,8 +1113,8 @@ public Builder setRestoreOpName(
          * @return This builder for chaining.
          */
         public Builder clearRestoreOpName() {
    -      
           restoreOpName_ = getDefaultInstance().getRestoreOpName();
    +      bitField0_ = (bitField0_ & ~0x00000004);
           onChanged();
           return this;
         }
    @@ -1142,12 +1129,10 @@ public Builder clearRestoreOpName() {
          */
         public Builder setRestoreOpNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           restoreOpName_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -1175,8 +1160,9 @@ public int getMaxToKeep() {
          * @return This builder for chaining.
          */
         public Builder setMaxToKeep(int value) {
    -      
    +
           maxToKeep_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -1189,7 +1175,7 @@ public Builder setMaxToKeep(int value) {
          * @return This builder for chaining.
          */
         public Builder clearMaxToKeep() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000008);
           maxToKeep_ = 0;
           onChanged();
           return this;
    @@ -1218,8 +1204,9 @@ public boolean getSharded() {
          * @return This builder for chaining.
          */
         public Builder setSharded(boolean value) {
    -      
    +
           sharded_ = value;
    +      bitField0_ |= 0x00000010;
           onChanged();
           return this;
         }
    @@ -1232,7 +1219,7 @@ public Builder setSharded(boolean value) {
          * @return This builder for chaining.
          */
         public Builder clearSharded() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000010);
           sharded_ = false;
           onChanged();
           return this;
    @@ -1267,8 +1254,9 @@ public float getKeepCheckpointEveryNHours() {
          * @return This builder for chaining.
          */
         public Builder setKeepCheckpointEveryNHours(float value) {
    -      
    +
           keepCheckpointEveryNHours_ = value;
    +      bitField0_ |= 0x00000020;
           onChanged();
           return this;
         }
    @@ -1284,7 +1272,7 @@ public Builder setKeepCheckpointEveryNHours(float value) {
          * @return This builder for chaining.
          */
         public Builder clearKeepCheckpointEveryNHours() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000020);
           keepCheckpointEveryNHours_ = 0F;
           onChanged();
           return this;
    @@ -1304,8 +1292,8 @@ public Builder clearKeepCheckpointEveryNHours() {
          * @return This builder for chaining.
          */
         public Builder setVersionValue(int value) {
    -      
           version_ = value;
    +      bitField0_ |= 0x00000040;
           onChanged();
           return this;
         }
    @@ -1315,8 +1303,7 @@ public Builder setVersionValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.SaverDef.CheckpointFormatVersion getVersion() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.SaverDef.CheckpointFormatVersion result = org.tensorflow.proto.SaverDef.CheckpointFormatVersion.valueOf(version_);
    +      org.tensorflow.proto.SaverDef.CheckpointFormatVersion result = org.tensorflow.proto.SaverDef.CheckpointFormatVersion.forNumber(version_);
           return result == null ? org.tensorflow.proto.SaverDef.CheckpointFormatVersion.UNRECOGNIZED : result;
         }
         /**
    @@ -1328,7 +1315,7 @@ public Builder setVersion(org.tensorflow.proto.SaverDef.CheckpointFormatVersion
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00000040;
           version_ = value.getNumber();
           onChanged();
           return this;
    @@ -1338,23 +1325,11 @@ public Builder setVersion(org.tensorflow.proto.SaverDef.CheckpointFormatVersion
          * @return This builder for chaining.
          */
         public Builder clearVersion() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000040);
           version_ = 0;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.SaverDef)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaverDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaverDefOrBuilder.java
    index a98a0e5dac2..22751b6cd6c 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaverDefOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaverDefOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/saver.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaverProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaverProtos.java
    index 979745be38d..09a24e9951c 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaverProtos.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaverProtos.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/saver.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class SaverProtos {
       private SaverProtos() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      SaverProtos.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,7 +28,7 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_SaverDef_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_SaverDef_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -48,9 +59,10 @@ public static void registerAllExtensions(
         internal_static_tensorflow_SaverDef_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_SaverDef_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_SaverDef_descriptor,
             new java.lang.String[] { "FilenameTensorName", "SaveTensorName", "RestoreOpName", "MaxToKeep", "Sharded", "KeepCheckpointEveryNHours", "Version", });
    +    descriptor.resolveAllFeaturesImmutable();
       }
     
       // @@protoc_insertion_point(outer_class_scope)
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ScopedAllocatorOptions.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ScopedAllocatorOptions.java
    index d687c4fc756..688a251a612 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ScopedAllocatorOptions.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ScopedAllocatorOptions.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/rewriter_config.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,37 +9,35 @@
      * Protobuf type {@code tensorflow.ScopedAllocatorOptions}
      */
     public final class ScopedAllocatorOptions extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.ScopedAllocatorOptions)
         ScopedAllocatorOptionsOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      ScopedAllocatorOptions.class.getName());
    +  }
       // Use ScopedAllocatorOptions.newBuilder() to construct.
    -  private ScopedAllocatorOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private ScopedAllocatorOptions(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private ScopedAllocatorOptions() {
    -    enableOp_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -  }
    -
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new ScopedAllocatorOptions();
    +    enableOp_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
       }
     
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.RewriterConfigProtos.internal_static_tensorflow_ScopedAllocatorOptions_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.RewriterConfigProtos.internal_static_tensorflow_ScopedAllocatorOptions_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -45,7 +45,9 @@ protected java.lang.Object newInstance(
       }
     
       public static final int ENABLE_OP_FIELD_NUMBER = 1;
    -  private com.google.protobuf.LazyStringList enableOp_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.LazyStringArrayList enableOp_ =
    +      com.google.protobuf.LazyStringArrayList.emptyList();
       /**
        * 
        * If present, only perform optimization for these ops.
    @@ -110,7 +112,7 @@ public final boolean isInitialized() {
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
         for (int i = 0; i < enableOp_.size(); i++) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, enableOp_.getRaw(i));
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, enableOp_.getRaw(i));
         }
         getUnknownFields().writeTo(output);
       }
    @@ -200,39 +202,41 @@ public static org.tensorflow.proto.ScopedAllocatorOptions parseFrom(
       }
       public static org.tensorflow.proto.ScopedAllocatorOptions parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.ScopedAllocatorOptions parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.ScopedAllocatorOptions parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.ScopedAllocatorOptions parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.ScopedAllocatorOptions parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.ScopedAllocatorOptions parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -252,7 +256,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -260,7 +264,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.ScopedAllocatorOptions}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.ScopedAllocatorOptions)
           org.tensorflow.proto.ScopedAllocatorOptionsOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -269,7 +273,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.RewriterConfigProtos.internal_static_tensorflow_ScopedAllocatorOptions_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -282,15 +286,16 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    -      enableOp_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      bitField0_ = 0;
    +      enableOp_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
           return this;
         }
     
    @@ -317,48 +322,19 @@ public org.tensorflow.proto.ScopedAllocatorOptions build() {
         @java.lang.Override
         public org.tensorflow.proto.ScopedAllocatorOptions buildPartial() {
           org.tensorflow.proto.ScopedAllocatorOptions result = new org.tensorflow.proto.ScopedAllocatorOptions(this);
    -      int from_bitField0_ = bitField0_;
    -      if (((bitField0_ & 0x00000001) != 0)) {
    -        enableOp_ = enableOp_.getUnmodifiableView();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    -      }
    -      result.enableOp_ = enableOp_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.ScopedAllocatorOptions result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        enableOp_.makeImmutable();
    +        result.enableOp_ = enableOp_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.ScopedAllocatorOptions) {
    @@ -374,7 +350,7 @@ public Builder mergeFrom(org.tensorflow.proto.ScopedAllocatorOptions other) {
           if (!other.enableOp_.isEmpty()) {
             if (enableOp_.isEmpty()) {
               enableOp_ = other.enableOp_;
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ |= 0x00000001;
             } else {
               ensureEnableOpIsMutable();
               enableOp_.addAll(other.enableOp_);
    @@ -430,12 +406,13 @@ public Builder mergeFrom(
         }
         private int bitField0_;
     
    -    private com.google.protobuf.LazyStringList enableOp_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +    private com.google.protobuf.LazyStringArrayList enableOp_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         private void ensureEnableOpIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    +      if (!enableOp_.isModifiable()) {
             enableOp_ = new com.google.protobuf.LazyStringArrayList(enableOp_);
    -        bitField0_ |= 0x00000001;
    -       }
    +      }
    +      bitField0_ |= 0x00000001;
         }
         /**
          * 
    @@ -447,7 +424,8 @@ private void ensureEnableOpIsMutable() {
          */
         public com.google.protobuf.ProtocolStringList
             getEnableOpList() {
    -      return enableOp_.getUnmodifiableView();
    +      enableOp_.makeImmutable();
    +      return enableOp_;
         }
         /**
          * 
    @@ -497,11 +475,10 @@ public java.lang.String getEnableOp(int index) {
          */
         public Builder setEnableOp(
             int index, java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureEnableOpIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureEnableOpIsMutable();
           enableOp_.set(index, value);
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -516,11 +493,10 @@ public Builder setEnableOp(
          */
         public Builder addEnableOp(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureEnableOpIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureEnableOpIsMutable();
           enableOp_.add(value);
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -538,6 +514,7 @@ public Builder addAllEnableOp(
           ensureEnableOpIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, enableOp_);
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -550,8 +527,9 @@ public Builder addAllEnableOp(
          * @return This builder for chaining.
          */
         public Builder clearEnableOp() {
    -      enableOp_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      enableOp_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
    +      bitField0_ = (bitField0_ & ~0x00000001);;
           onChanged();
           return this;
         }
    @@ -566,27 +544,14 @@ public Builder clearEnableOp() {
          */
         public Builder addEnableOpBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           ensureEnableOpIsMutable();
           enableOp_.add(value);
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.ScopedAllocatorOptions)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ScopedAllocatorOptionsOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ScopedAllocatorOptionsOrBuilder.java
    index 65336fad91c..34a7e2c7eaf 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ScopedAllocatorOptionsOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ScopedAllocatorOptionsOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/rewriter_config.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SequenceExample.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SequenceExample.java
    index f8742eb250f..37deaaff1a8 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SequenceExample.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SequenceExample.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/example/example.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,42 +9,40 @@
      * Protobuf type {@code tensorflow.SequenceExample}
      */
     public final class SequenceExample extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.SequenceExample)
         SequenceExampleOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      SequenceExample.class.getName());
    +  }
       // Use SequenceExample.newBuilder() to construct.
    -  private SequenceExample(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private SequenceExample(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private SequenceExample() {
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new SequenceExample();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.ExampleProtos.internal_static_tensorflow_SequenceExample_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.ExampleProtos.internal_static_tensorflow_SequenceExample_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
                 org.tensorflow.proto.SequenceExample.class, org.tensorflow.proto.SequenceExample.Builder.class);
       }
     
    +  private int bitField0_;
       public static final int CONTEXT_FIELD_NUMBER = 1;
       private org.tensorflow.proto.Features context_;
       /**
    @@ -51,7 +51,7 @@ protected java.lang.Object newInstance(
        */
       @java.lang.Override
       public boolean hasContext() {
    -    return context_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * .tensorflow.Features context = 1;
    @@ -66,7 +66,7 @@ public org.tensorflow.proto.Features getContext() {
        */
       @java.lang.Override
       public org.tensorflow.proto.FeaturesOrBuilder getContextOrBuilder() {
    -    return getContext();
    +    return context_ == null ? org.tensorflow.proto.Features.getDefaultInstance() : context_;
       }
     
       public static final int FEATURE_LISTS_FIELD_NUMBER = 2;
    @@ -77,7 +77,7 @@ public org.tensorflow.proto.FeaturesOrBuilder getContextOrBuilder() {
        */
       @java.lang.Override
       public boolean hasFeatureLists() {
    -    return featureLists_ != null;
    +    return ((bitField0_ & 0x00000002) != 0);
       }
       /**
        * .tensorflow.FeatureLists feature_lists = 2;
    @@ -92,7 +92,7 @@ public org.tensorflow.proto.FeatureLists getFeatureLists() {
        */
       @java.lang.Override
       public org.tensorflow.proto.FeatureListsOrBuilder getFeatureListsOrBuilder() {
    -    return getFeatureLists();
    +    return featureLists_ == null ? org.tensorflow.proto.FeatureLists.getDefaultInstance() : featureLists_;
       }
     
       private byte memoizedIsInitialized = -1;
    @@ -109,10 +109,10 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (context_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(1, getContext());
         }
    -    if (featureLists_ != null) {
    +    if (((bitField0_ & 0x00000002) != 0)) {
           output.writeMessage(2, getFeatureLists());
         }
         getUnknownFields().writeTo(output);
    @@ -124,11 +124,11 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (context_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(1, getContext());
         }
    -    if (featureLists_ != null) {
    +    if (((bitField0_ & 0x00000002) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(2, getFeatureLists());
         }
    @@ -215,39 +215,41 @@ public static org.tensorflow.proto.SequenceExample parseFrom(
       }
       public static org.tensorflow.proto.SequenceExample parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.SequenceExample parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.SequenceExample parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.SequenceExample parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.SequenceExample parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.SequenceExample parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -267,7 +269,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -275,7 +277,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.SequenceExample}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.SequenceExample)
           org.tensorflow.proto.SequenceExampleOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -284,7 +286,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.ExampleProtos.internal_static_tensorflow_SequenceExample_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -293,27 +295,33 @@ public static final class Builder extends
     
         // Construct using org.tensorflow.proto.SequenceExample.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getContextFieldBuilder();
    +        getFeatureListsFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    -      if (contextBuilder_ == null) {
    -        context_ = null;
    -      } else {
    -        context_ = null;
    +      bitField0_ = 0;
    +      context_ = null;
    +      if (contextBuilder_ != null) {
    +        contextBuilder_.dispose();
             contextBuilder_ = null;
           }
    -      if (featureListsBuilder_ == null) {
    -        featureLists_ = null;
    -      } else {
    -        featureLists_ = null;
    +      featureLists_ = null;
    +      if (featureListsBuilder_ != null) {
    +        featureListsBuilder_.dispose();
             featureListsBuilder_ = null;
           }
           return this;
    @@ -342,52 +350,29 @@ public org.tensorflow.proto.SequenceExample build() {
         @java.lang.Override
         public org.tensorflow.proto.SequenceExample buildPartial() {
           org.tensorflow.proto.SequenceExample result = new org.tensorflow.proto.SequenceExample(this);
    -      if (contextBuilder_ == null) {
    -        result.context_ = context_;
    -      } else {
    -        result.context_ = contextBuilder_.build();
    -      }
    -      if (featureListsBuilder_ == null) {
    -        result.featureLists_ = featureLists_;
    -      } else {
    -        result.featureLists_ = featureListsBuilder_.build();
    -      }
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.SequenceExample result) {
    +      int from_bitField0_ = bitField0_;
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.context_ = contextBuilder_ == null
    +            ? context_
    +            : contextBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.featureLists_ = featureListsBuilder_ == null
    +            ? featureLists_
    +            : featureListsBuilder_.build();
    +        to_bitField0_ |= 0x00000002;
    +      }
    +      result.bitField0_ |= to_bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.SequenceExample) {
    @@ -436,14 +421,14 @@ public Builder mergeFrom(
                   input.readMessage(
                       getContextFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
                   input.readMessage(
                       getFeatureListsFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 default: {
    @@ -461,16 +446,17 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private org.tensorflow.proto.Features context_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.Features, org.tensorflow.proto.Features.Builder, org.tensorflow.proto.FeaturesOrBuilder> contextBuilder_;
         /**
          * .tensorflow.Features context = 1;
          * @return Whether the context field is set.
          */
         public boolean hasContext() {
    -      return contextBuilder_ != null || context_ != null;
    +      return ((bitField0_ & 0x00000001) != 0);
         }
         /**
          * .tensorflow.Features context = 1;
    @@ -492,11 +478,11 @@ public Builder setContext(org.tensorflow.proto.Features value) {
               throw new NullPointerException();
             }
             context_ = value;
    -        onChanged();
           } else {
             contextBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000001;
    +      onChanged();
           return this;
         }
         /**
    @@ -506,11 +492,11 @@ public Builder setContext(
             org.tensorflow.proto.Features.Builder builderForValue) {
           if (contextBuilder_ == null) {
             context_ = builderForValue.build();
    -        onChanged();
           } else {
             contextBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000001;
    +      onChanged();
           return this;
         }
         /**
    @@ -518,38 +504,40 @@ public Builder setContext(
          */
         public Builder mergeContext(org.tensorflow.proto.Features value) {
           if (contextBuilder_ == null) {
    -        if (context_ != null) {
    -          context_ =
    -            org.tensorflow.proto.Features.newBuilder(context_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000001) != 0) &&
    +          context_ != null &&
    +          context_ != org.tensorflow.proto.Features.getDefaultInstance()) {
    +          getContextBuilder().mergeFrom(value);
             } else {
               context_ = value;
             }
    -        onChanged();
           } else {
             contextBuilder_.mergeFrom(value);
           }
    -
    +      if (context_ != null) {
    +        bitField0_ |= 0x00000001;
    +        onChanged();
    +      }
           return this;
         }
         /**
          * .tensorflow.Features context = 1;
          */
         public Builder clearContext() {
    -      if (contextBuilder_ == null) {
    -        context_ = null;
    -        onChanged();
    -      } else {
    -        context_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000001);
    +      context_ = null;
    +      if (contextBuilder_ != null) {
    +        contextBuilder_.dispose();
             contextBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
          * .tensorflow.Features context = 1;
          */
         public org.tensorflow.proto.Features.Builder getContextBuilder() {
    -      
    +      bitField0_ |= 0x00000001;
           onChanged();
           return getContextFieldBuilder().getBuilder();
         }
    @@ -567,11 +555,11 @@ public org.tensorflow.proto.FeaturesOrBuilder getContextOrBuilder() {
         /**
          * .tensorflow.Features context = 1;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.Features, org.tensorflow.proto.Features.Builder, org.tensorflow.proto.FeaturesOrBuilder> 
             getContextFieldBuilder() {
           if (contextBuilder_ == null) {
    -        contextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        contextBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.Features, org.tensorflow.proto.Features.Builder, org.tensorflow.proto.FeaturesOrBuilder>(
                     getContext(),
                     getParentForChildren(),
    @@ -582,14 +570,14 @@ public org.tensorflow.proto.FeaturesOrBuilder getContextOrBuilder() {
         }
     
         private org.tensorflow.proto.FeatureLists featureLists_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.FeatureLists, org.tensorflow.proto.FeatureLists.Builder, org.tensorflow.proto.FeatureListsOrBuilder> featureListsBuilder_;
         /**
          * .tensorflow.FeatureLists feature_lists = 2;
          * @return Whether the featureLists field is set.
          */
         public boolean hasFeatureLists() {
    -      return featureListsBuilder_ != null || featureLists_ != null;
    +      return ((bitField0_ & 0x00000002) != 0);
         }
         /**
          * .tensorflow.FeatureLists feature_lists = 2;
    @@ -611,11 +599,11 @@ public Builder setFeatureLists(org.tensorflow.proto.FeatureLists value) {
               throw new NullPointerException();
             }
             featureLists_ = value;
    -        onChanged();
           } else {
             featureListsBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return this;
         }
         /**
    @@ -625,11 +613,11 @@ public Builder setFeatureLists(
             org.tensorflow.proto.FeatureLists.Builder builderForValue) {
           if (featureListsBuilder_ == null) {
             featureLists_ = builderForValue.build();
    -        onChanged();
           } else {
             featureListsBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return this;
         }
         /**
    @@ -637,38 +625,40 @@ public Builder setFeatureLists(
          */
         public Builder mergeFeatureLists(org.tensorflow.proto.FeatureLists value) {
           if (featureListsBuilder_ == null) {
    -        if (featureLists_ != null) {
    -          featureLists_ =
    -            org.tensorflow.proto.FeatureLists.newBuilder(featureLists_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000002) != 0) &&
    +          featureLists_ != null &&
    +          featureLists_ != org.tensorflow.proto.FeatureLists.getDefaultInstance()) {
    +          getFeatureListsBuilder().mergeFrom(value);
             } else {
               featureLists_ = value;
             }
    -        onChanged();
           } else {
             featureListsBuilder_.mergeFrom(value);
           }
    -
    +      if (featureLists_ != null) {
    +        bitField0_ |= 0x00000002;
    +        onChanged();
    +      }
           return this;
         }
         /**
          * .tensorflow.FeatureLists feature_lists = 2;
          */
         public Builder clearFeatureLists() {
    -      if (featureListsBuilder_ == null) {
    -        featureLists_ = null;
    -        onChanged();
    -      } else {
    -        featureLists_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000002);
    +      featureLists_ = null;
    +      if (featureListsBuilder_ != null) {
    +        featureListsBuilder_.dispose();
             featureListsBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
          * .tensorflow.FeatureLists feature_lists = 2;
          */
         public org.tensorflow.proto.FeatureLists.Builder getFeatureListsBuilder() {
    -      
    +      bitField0_ |= 0x00000002;
           onChanged();
           return getFeatureListsFieldBuilder().getBuilder();
         }
    @@ -686,11 +676,11 @@ public org.tensorflow.proto.FeatureListsOrBuilder getFeatureListsOrBuilder() {
         /**
          * .tensorflow.FeatureLists feature_lists = 2;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.FeatureLists, org.tensorflow.proto.FeatureLists.Builder, org.tensorflow.proto.FeatureListsOrBuilder> 
             getFeatureListsFieldBuilder() {
           if (featureListsBuilder_ == null) {
    -        featureListsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        featureListsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.FeatureLists, org.tensorflow.proto.FeatureLists.Builder, org.tensorflow.proto.FeatureListsOrBuilder>(
                     getFeatureLists(),
                     getParentForChildren(),
    @@ -699,18 +689,6 @@ public org.tensorflow.proto.FeatureListsOrBuilder getFeatureListsOrBuilder() {
           }
           return featureListsBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.SequenceExample)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SequenceExampleOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SequenceExampleOrBuilder.java
    index 760a6434916..e38f99c7f8f 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SequenceExampleOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SequenceExampleOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/example/example.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SerializedDType.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SerializedDType.java
    index 5bf4bc289a7..a1c9bf8580b 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SerializedDType.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SerializedDType.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/types.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,37 +13,34 @@
      * Protobuf type {@code tensorflow.SerializedDType}
      */
     public final class SerializedDType extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.SerializedDType)
         SerializedDTypeOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      SerializedDType.class.getName());
    +  }
       // Use SerializedDType.newBuilder() to construct.
    -  private SerializedDType(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private SerializedDType(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private SerializedDType() {
         datatype_ = 0;
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new SerializedDType();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.TypesProtos.internal_static_tensorflow_SerializedDType_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.TypesProtos.internal_static_tensorflow_SerializedDType_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -49,7 +48,7 @@ protected java.lang.Object newInstance(
       }
     
       public static final int DATATYPE_FIELD_NUMBER = 1;
    -  private int datatype_;
    +  private int datatype_ = 0;
       /**
        * .tensorflow.DataType datatype = 1;
        * @return The enum numeric value on the wire for datatype.
    @@ -62,8 +61,7 @@ protected java.lang.Object newInstance(
        * @return The datatype.
        */
       @java.lang.Override public org.tensorflow.proto.DataType getDatatype() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(datatype_);
    +    org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(datatype_);
         return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
       }
     
    @@ -165,39 +163,41 @@ public static org.tensorflow.proto.SerializedDType parseFrom(
       }
       public static org.tensorflow.proto.SerializedDType parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.SerializedDType parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.SerializedDType parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.SerializedDType parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.SerializedDType parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.SerializedDType parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -217,7 +217,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -229,7 +229,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.SerializedDType}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.SerializedDType)
           org.tensorflow.proto.SerializedDTypeOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -238,7 +238,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.TypesProtos.internal_static_tensorflow_SerializedDType_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -251,15 +251,15 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           datatype_ = 0;
    -
           return this;
         }
     
    @@ -286,43 +286,18 @@ public org.tensorflow.proto.SerializedDType build() {
         @java.lang.Override
         public org.tensorflow.proto.SerializedDType buildPartial() {
           org.tensorflow.proto.SerializedDType result = new org.tensorflow.proto.SerializedDType(this);
    -      result.datatype_ = datatype_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.SerializedDType result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.datatype_ = datatype_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.SerializedDType) {
    @@ -366,7 +341,7 @@ public Builder mergeFrom(
                   break;
                 case 8: {
                   datatype_ = input.readEnum();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 8
                 default: {
    @@ -384,6 +359,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private int datatype_ = 0;
         /**
    @@ -399,8 +375,8 @@ public Builder mergeFrom(
          * @return This builder for chaining.
          */
         public Builder setDatatypeValue(int value) {
    -      
           datatype_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -410,8 +386,7 @@ public Builder setDatatypeValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.DataType getDatatype() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(datatype_);
    +      org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(datatype_);
           return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
         }
         /**
    @@ -423,7 +398,7 @@ public Builder setDatatype(org.tensorflow.proto.DataType value) {
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00000001;
           datatype_ = value.getNumber();
           onChanged();
           return this;
    @@ -433,23 +408,11 @@ public Builder setDatatype(org.tensorflow.proto.DataType value) {
          * @return This builder for chaining.
          */
         public Builder clearDatatype() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000001);
           datatype_ = 0;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.SerializedDType)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SerializedDTypeOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SerializedDTypeOrBuilder.java
    index 529e5936962..ffadd4ef5f2 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SerializedDTypeOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SerializedDTypeOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/types.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ServerDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ServerDef.java
    index 7f16f8ba6e1..961f896b0c1 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ServerDef.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ServerDef.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/tensorflow_server.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,12 +13,21 @@
      * Protobuf type {@code tensorflow.ServerDef}
      */
     public final class ServerDef extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.ServerDef)
         ServerDefOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      ServerDef.class.getName());
    +  }
       // Use ServerDef.newBuilder() to construct.
    -  private ServerDef(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private ServerDef(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private ServerDef() {
    @@ -24,31 +35,20 @@ private ServerDef() {
         protocol_ = "";
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new ServerDef();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.ServerProtos.internal_static_tensorflow_ServerDef_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.ServerProtos.internal_static_tensorflow_ServerDef_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
                 org.tensorflow.proto.ServerDef.class, org.tensorflow.proto.ServerDef.Builder.class);
       }
     
    +  private int bitField0_;
       public static final int CLUSTER_FIELD_NUMBER = 1;
       private org.tensorflow.proto.ClusterDef cluster_;
       /**
    @@ -61,7 +61,7 @@ protected java.lang.Object newInstance(
        */
       @java.lang.Override
       public boolean hasCluster() {
    -    return cluster_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * 
    @@ -84,14 +84,16 @@ public org.tensorflow.proto.ClusterDef getCluster() {
        */
       @java.lang.Override
       public org.tensorflow.proto.ClusterDefOrBuilder getClusterOrBuilder() {
    -    return getCluster();
    +    return cluster_ == null ? org.tensorflow.proto.ClusterDef.getDefaultInstance() : cluster_;
       }
     
       public static final int JOB_NAME_FIELD_NUMBER = 2;
    -  private volatile java.lang.Object jobName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object jobName_ = "";
       /**
        * 
        * The name of the job of which this server is a member.
    +   *
        * NOTE(mrry): The `cluster` field must contain a `JobDef` with a `name` field
        * that matches this name.
        * 
    @@ -115,6 +117,7 @@ public java.lang.String getJobName() { /** *
        * The name of the job of which this server is a member.
    +   *
        * NOTE(mrry): The `cluster` field must contain a `JobDef` with a `name` field
        * that matches this name.
        * 
    @@ -138,7 +141,7 @@ public java.lang.String getJobName() { } public static final int REPLICA_FIELD_NUMBER = 8; - private int replica_; + private int replica_ = 0; /** *
        * Replica this server manages.
    @@ -153,10 +156,11 @@ public int getReplica() {
       }
     
       public static final int TASK_INDEX_FIELD_NUMBER = 3;
    -  private int taskIndex_;
    +  private int taskIndex_ = 0;
       /**
        * 
        * The task index of this server in its job.
    +   *
        * NOTE: The `cluster` field must contain a `JobDef` with a matching `name`
        * and a mapping in its `tasks` field for this index.
        * 
    @@ -181,7 +185,7 @@ public int getTaskIndex() { */ @java.lang.Override public boolean hasDefaultSessionConfig() { - return defaultSessionConfig_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** *
    @@ -204,14 +208,16 @@ public org.tensorflow.proto.ConfigProto getDefaultSessionConfig() {
        */
       @java.lang.Override
       public org.tensorflow.proto.ConfigProtoOrBuilder getDefaultSessionConfigOrBuilder() {
    -    return getDefaultSessionConfig();
    +    return defaultSessionConfig_ == null ? org.tensorflow.proto.ConfigProto.getDefaultInstance() : defaultSessionConfig_;
       }
     
       public static final int PROTOCOL_FIELD_NUMBER = 5;
    -  private volatile java.lang.Object protocol_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object protocol_ = "";
       /**
        * 
        * The protocol to be used by this server.
    +   *
        * Acceptable values include: "grpc", "grpc+verbs".
        * 
    * @@ -234,6 +240,7 @@ public java.lang.String getProtocol() { /** *
        * The protocol to be used by this server.
    +   *
        * Acceptable values include: "grpc", "grpc+verbs".
        * 
    * @@ -256,7 +263,7 @@ public java.lang.String getProtocol() { } public static final int PORT_FIELD_NUMBER = 6; - private int port_; + private int port_ = 0; /** *
        * The server port. If not set, then we identify the port from the job_name.
    @@ -283,7 +290,7 @@ public int getPort() {
        */
       @java.lang.Override
       public boolean hasClusterDeviceFilters() {
    -    return clusterDeviceFilters_ != null;
    +    return ((bitField0_ & 0x00000004) != 0);
       }
       /**
        * 
    @@ -308,7 +315,7 @@ public org.tensorflow.proto.ClusterDeviceFilters getClusterDeviceFilters() {
        */
       @java.lang.Override
       public org.tensorflow.proto.ClusterDeviceFiltersOrBuilder getClusterDeviceFiltersOrBuilder() {
    -    return getClusterDeviceFilters();
    +    return clusterDeviceFilters_ == null ? org.tensorflow.proto.ClusterDeviceFilters.getDefaultInstance() : clusterDeviceFilters_;
       }
     
       private byte memoizedIsInitialized = -1;
    @@ -325,25 +332,25 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (cluster_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(1, getCluster());
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, jobName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(jobName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 2, jobName_);
         }
         if (taskIndex_ != 0) {
           output.writeInt32(3, taskIndex_);
         }
    -    if (defaultSessionConfig_ != null) {
    +    if (((bitField0_ & 0x00000002) != 0)) {
           output.writeMessage(4, getDefaultSessionConfig());
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(protocol_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, protocol_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(protocol_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 5, protocol_);
         }
         if (port_ != 0) {
           output.writeInt32(6, port_);
         }
    -    if (clusterDeviceFilters_ != null) {
    +    if (((bitField0_ & 0x00000004) != 0)) {
           output.writeMessage(7, getClusterDeviceFilters());
         }
         if (replica_ != 0) {
    @@ -358,29 +365,29 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (cluster_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(1, getCluster());
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, jobName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(jobName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(2, jobName_);
         }
         if (taskIndex_ != 0) {
           size += com.google.protobuf.CodedOutputStream
             .computeInt32Size(3, taskIndex_);
         }
    -    if (defaultSessionConfig_ != null) {
    +    if (((bitField0_ & 0x00000002) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(4, getDefaultSessionConfig());
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(protocol_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, protocol_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(protocol_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(5, protocol_);
         }
         if (port_ != 0) {
           size += com.google.protobuf.CodedOutputStream
             .computeInt32Size(6, port_);
         }
    -    if (clusterDeviceFilters_ != null) {
    +    if (((bitField0_ & 0x00000004) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(7, getClusterDeviceFilters());
         }
    @@ -500,39 +507,41 @@ public static org.tensorflow.proto.ServerDef parseFrom(
       }
       public static org.tensorflow.proto.ServerDef parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.ServerDef parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.ServerDef parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.ServerDef parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.ServerDef parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.ServerDef parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -552,7 +561,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -564,7 +573,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.ServerDef}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.ServerDef)
           org.tensorflow.proto.ServerDefOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -573,7 +582,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.ServerProtos.internal_static_tensorflow_ServerDef_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -582,43 +591,44 @@ public static final class Builder extends
     
         // Construct using org.tensorflow.proto.ServerDef.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getClusterFieldBuilder();
    +        getDefaultSessionConfigFieldBuilder();
    +        getClusterDeviceFiltersFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    -      if (clusterBuilder_ == null) {
    -        cluster_ = null;
    -      } else {
    -        cluster_ = null;
    +      bitField0_ = 0;
    +      cluster_ = null;
    +      if (clusterBuilder_ != null) {
    +        clusterBuilder_.dispose();
             clusterBuilder_ = null;
           }
           jobName_ = "";
    -
           replica_ = 0;
    -
           taskIndex_ = 0;
    -
    -      if (defaultSessionConfigBuilder_ == null) {
    -        defaultSessionConfig_ = null;
    -      } else {
    -        defaultSessionConfig_ = null;
    +      defaultSessionConfig_ = null;
    +      if (defaultSessionConfigBuilder_ != null) {
    +        defaultSessionConfigBuilder_.dispose();
             defaultSessionConfigBuilder_ = null;
           }
           protocol_ = "";
    -
           port_ = 0;
    -
    -      if (clusterDeviceFiltersBuilder_ == null) {
    -        clusterDeviceFilters_ = null;
    -      } else {
    -        clusterDeviceFilters_ = null;
    +      clusterDeviceFilters_ = null;
    +      if (clusterDeviceFiltersBuilder_ != null) {
    +        clusterDeviceFiltersBuilder_.dispose();
             clusterDeviceFiltersBuilder_ = null;
           }
           return this;
    @@ -647,62 +657,50 @@ public org.tensorflow.proto.ServerDef build() {
         @java.lang.Override
         public org.tensorflow.proto.ServerDef buildPartial() {
           org.tensorflow.proto.ServerDef result = new org.tensorflow.proto.ServerDef(this);
    -      if (clusterBuilder_ == null) {
    -        result.cluster_ = cluster_;
    -      } else {
    -        result.cluster_ = clusterBuilder_.build();
    -      }
    -      result.jobName_ = jobName_;
    -      result.replica_ = replica_;
    -      result.taskIndex_ = taskIndex_;
    -      if (defaultSessionConfigBuilder_ == null) {
    -        result.defaultSessionConfig_ = defaultSessionConfig_;
    -      } else {
    -        result.defaultSessionConfig_ = defaultSessionConfigBuilder_.build();
    -      }
    -      result.protocol_ = protocol_;
    -      result.port_ = port_;
    -      if (clusterDeviceFiltersBuilder_ == null) {
    -        result.clusterDeviceFilters_ = clusterDeviceFilters_;
    -      } else {
    -        result.clusterDeviceFilters_ = clusterDeviceFiltersBuilder_.build();
    -      }
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.ServerDef result) {
    +      int from_bitField0_ = bitField0_;
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.cluster_ = clusterBuilder_ == null
    +            ? cluster_
    +            : clusterBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.jobName_ = jobName_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.replica_ = replica_;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.taskIndex_ = taskIndex_;
    +      }
    +      if (((from_bitField0_ & 0x00000010) != 0)) {
    +        result.defaultSessionConfig_ = defaultSessionConfigBuilder_ == null
    +            ? defaultSessionConfig_
    +            : defaultSessionConfigBuilder_.build();
    +        to_bitField0_ |= 0x00000002;
    +      }
    +      if (((from_bitField0_ & 0x00000020) != 0)) {
    +        result.protocol_ = protocol_;
    +      }
    +      if (((from_bitField0_ & 0x00000040) != 0)) {
    +        result.port_ = port_;
    +      }
    +      if (((from_bitField0_ & 0x00000080) != 0)) {
    +        result.clusterDeviceFilters_ = clusterDeviceFiltersBuilder_ == null
    +            ? clusterDeviceFilters_
    +            : clusterDeviceFiltersBuilder_.build();
    +        to_bitField0_ |= 0x00000004;
    +      }
    +      result.bitField0_ |= to_bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.ServerDef) {
    @@ -720,6 +718,7 @@ public Builder mergeFrom(org.tensorflow.proto.ServerDef other) {
           }
           if (!other.getJobName().isEmpty()) {
             jobName_ = other.jobName_;
    +        bitField0_ |= 0x00000002;
             onChanged();
           }
           if (other.getReplica() != 0) {
    @@ -733,6 +732,7 @@ public Builder mergeFrom(org.tensorflow.proto.ServerDef other) {
           }
           if (!other.getProtocol().isEmpty()) {
             protocol_ = other.protocol_;
    +        bitField0_ |= 0x00000020;
             onChanged();
           }
           if (other.getPort() != 0) {
    @@ -771,46 +771,46 @@ public Builder mergeFrom(
                   input.readMessage(
                       getClusterFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
                   jobName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 case 24: {
                   taskIndex_ = input.readInt32();
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 24
                 case 34: {
                   input.readMessage(
                       getDefaultSessionConfigFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000010;
                   break;
                 } // case 34
                 case 42: {
                   protocol_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000020;
                   break;
                 } // case 42
                 case 48: {
                   port_ = input.readInt32();
    -
    +              bitField0_ |= 0x00000040;
                   break;
                 } // case 48
                 case 58: {
                   input.readMessage(
                       getClusterDeviceFiltersFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000080;
                   break;
                 } // case 58
                 case 64: {
                   replica_ = input.readInt32();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 64
                 default: {
    @@ -828,9 +828,10 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private org.tensorflow.proto.ClusterDef cluster_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.ClusterDef, org.tensorflow.proto.ClusterDef.Builder, org.tensorflow.proto.ClusterDefOrBuilder> clusterBuilder_;
         /**
          * 
    @@ -841,7 +842,7 @@ public Builder mergeFrom(
          * @return Whether the cluster field is set.
          */
         public boolean hasCluster() {
    -      return clusterBuilder_ != null || cluster_ != null;
    +      return ((bitField0_ & 0x00000001) != 0);
         }
         /**
          * 
    @@ -871,11 +872,11 @@ public Builder setCluster(org.tensorflow.proto.ClusterDef value) {
               throw new NullPointerException();
             }
             cluster_ = value;
    -        onChanged();
           } else {
             clusterBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000001;
    +      onChanged();
           return this;
         }
         /**
    @@ -889,11 +890,11 @@ public Builder setCluster(
             org.tensorflow.proto.ClusterDef.Builder builderForValue) {
           if (clusterBuilder_ == null) {
             cluster_ = builderForValue.build();
    -        onChanged();
           } else {
             clusterBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000001;
    +      onChanged();
           return this;
         }
         /**
    @@ -905,17 +906,20 @@ public Builder setCluster(
          */
         public Builder mergeCluster(org.tensorflow.proto.ClusterDef value) {
           if (clusterBuilder_ == null) {
    -        if (cluster_ != null) {
    -          cluster_ =
    -            org.tensorflow.proto.ClusterDef.newBuilder(cluster_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000001) != 0) &&
    +          cluster_ != null &&
    +          cluster_ != org.tensorflow.proto.ClusterDef.getDefaultInstance()) {
    +          getClusterBuilder().mergeFrom(value);
             } else {
               cluster_ = value;
             }
    -        onChanged();
           } else {
             clusterBuilder_.mergeFrom(value);
           }
    -
    +      if (cluster_ != null) {
    +        bitField0_ |= 0x00000001;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -926,14 +930,13 @@ public Builder mergeCluster(org.tensorflow.proto.ClusterDef value) {
          * .tensorflow.ClusterDef cluster = 1;
          */
         public Builder clearCluster() {
    -      if (clusterBuilder_ == null) {
    -        cluster_ = null;
    -        onChanged();
    -      } else {
    -        cluster_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000001);
    +      cluster_ = null;
    +      if (clusterBuilder_ != null) {
    +        clusterBuilder_.dispose();
             clusterBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -944,7 +947,7 @@ public Builder clearCluster() {
          * .tensorflow.ClusterDef cluster = 1;
          */
         public org.tensorflow.proto.ClusterDef.Builder getClusterBuilder() {
    -      
    +      bitField0_ |= 0x00000001;
           onChanged();
           return getClusterFieldBuilder().getBuilder();
         }
    @@ -970,11 +973,11 @@ public org.tensorflow.proto.ClusterDefOrBuilder getClusterOrBuilder() {
          *
          * .tensorflow.ClusterDef cluster = 1;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.ClusterDef, org.tensorflow.proto.ClusterDef.Builder, org.tensorflow.proto.ClusterDefOrBuilder> 
             getClusterFieldBuilder() {
           if (clusterBuilder_ == null) {
    -        clusterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        clusterBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.ClusterDef, org.tensorflow.proto.ClusterDef.Builder, org.tensorflow.proto.ClusterDefOrBuilder>(
                     getCluster(),
                     getParentForChildren(),
    @@ -988,6 +991,7 @@ public org.tensorflow.proto.ClusterDefOrBuilder getClusterOrBuilder() {
         /**
          * 
          * The name of the job of which this server is a member.
    +     *
          * NOTE(mrry): The `cluster` field must contain a `JobDef` with a `name` field
          * that matches this name.
          * 
    @@ -1010,6 +1014,7 @@ public java.lang.String getJobName() { /** *
          * The name of the job of which this server is a member.
    +     *
          * NOTE(mrry): The `cluster` field must contain a `JobDef` with a `name` field
          * that matches this name.
          * 
    @@ -1033,6 +1038,7 @@ public java.lang.String getJobName() { /** *
          * The name of the job of which this server is a member.
    +     *
          * NOTE(mrry): The `cluster` field must contain a `JobDef` with a `name` field
          * that matches this name.
          * 
    @@ -1043,17 +1049,16 @@ public java.lang.String getJobName() { */ public Builder setJobName( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } jobName_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } /** *
          * The name of the job of which this server is a member.
    +     *
          * NOTE(mrry): The `cluster` field must contain a `JobDef` with a `name` field
          * that matches this name.
          * 
    @@ -1062,14 +1067,15 @@ public Builder setJobName( * @return This builder for chaining. */ public Builder clearJobName() { - jobName_ = getDefaultInstance().getJobName(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** *
          * The name of the job of which this server is a member.
    +     *
          * NOTE(mrry): The `cluster` field must contain a `JobDef` with a `name` field
          * that matches this name.
          * 
    @@ -1080,12 +1086,10 @@ public Builder clearJobName() { */ public Builder setJobNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); jobName_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -1113,8 +1117,9 @@ public int getReplica() { * @return This builder for chaining. */ public Builder setReplica(int value) { - + replica_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -1127,7 +1132,7 @@ public Builder setReplica(int value) { * @return This builder for chaining. */ public Builder clearReplica() { - + bitField0_ = (bitField0_ & ~0x00000004); replica_ = 0; onChanged(); return this; @@ -1137,6 +1142,7 @@ public Builder clearReplica() { /** *
          * The task index of this server in its job.
    +     *
          * NOTE: The `cluster` field must contain a `JobDef` with a matching `name`
          * and a mapping in its `tasks` field for this index.
          * 
    @@ -1151,6 +1157,7 @@ public int getTaskIndex() { /** *
          * The task index of this server in its job.
    +     *
          * NOTE: The `cluster` field must contain a `JobDef` with a matching `name`
          * and a mapping in its `tasks` field for this index.
          * 
    @@ -1160,14 +1167,16 @@ public int getTaskIndex() { * @return This builder for chaining. */ public Builder setTaskIndex(int value) { - + taskIndex_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } /** *
          * The task index of this server in its job.
    +     *
          * NOTE: The `cluster` field must contain a `JobDef` with a matching `name`
          * and a mapping in its `tasks` field for this index.
          * 
    @@ -1176,14 +1185,14 @@ public Builder setTaskIndex(int value) { * @return This builder for chaining. */ public Builder clearTaskIndex() { - + bitField0_ = (bitField0_ & ~0x00000008); taskIndex_ = 0; onChanged(); return this; } private org.tensorflow.proto.ConfigProto defaultSessionConfig_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.ConfigProto, org.tensorflow.proto.ConfigProto.Builder, org.tensorflow.proto.ConfigProtoOrBuilder> defaultSessionConfigBuilder_; /** *
    @@ -1194,7 +1203,7 @@ public Builder clearTaskIndex() {
          * @return Whether the defaultSessionConfig field is set.
          */
         public boolean hasDefaultSessionConfig() {
    -      return defaultSessionConfigBuilder_ != null || defaultSessionConfig_ != null;
    +      return ((bitField0_ & 0x00000010) != 0);
         }
         /**
          * 
    @@ -1224,11 +1233,11 @@ public Builder setDefaultSessionConfig(org.tensorflow.proto.ConfigProto value) {
               throw new NullPointerException();
             }
             defaultSessionConfig_ = value;
    -        onChanged();
           } else {
             defaultSessionConfigBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000010;
    +      onChanged();
           return this;
         }
         /**
    @@ -1242,11 +1251,11 @@ public Builder setDefaultSessionConfig(
             org.tensorflow.proto.ConfigProto.Builder builderForValue) {
           if (defaultSessionConfigBuilder_ == null) {
             defaultSessionConfig_ = builderForValue.build();
    -        onChanged();
           } else {
             defaultSessionConfigBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000010;
    +      onChanged();
           return this;
         }
         /**
    @@ -1258,17 +1267,20 @@ public Builder setDefaultSessionConfig(
          */
         public Builder mergeDefaultSessionConfig(org.tensorflow.proto.ConfigProto value) {
           if (defaultSessionConfigBuilder_ == null) {
    -        if (defaultSessionConfig_ != null) {
    -          defaultSessionConfig_ =
    -            org.tensorflow.proto.ConfigProto.newBuilder(defaultSessionConfig_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000010) != 0) &&
    +          defaultSessionConfig_ != null &&
    +          defaultSessionConfig_ != org.tensorflow.proto.ConfigProto.getDefaultInstance()) {
    +          getDefaultSessionConfigBuilder().mergeFrom(value);
             } else {
               defaultSessionConfig_ = value;
             }
    -        onChanged();
           } else {
             defaultSessionConfigBuilder_.mergeFrom(value);
           }
    -
    +      if (defaultSessionConfig_ != null) {
    +        bitField0_ |= 0x00000010;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -1279,14 +1291,13 @@ public Builder mergeDefaultSessionConfig(org.tensorflow.proto.ConfigProto value)
          * .tensorflow.ConfigProto default_session_config = 4;
          */
         public Builder clearDefaultSessionConfig() {
    -      if (defaultSessionConfigBuilder_ == null) {
    -        defaultSessionConfig_ = null;
    -        onChanged();
    -      } else {
    -        defaultSessionConfig_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000010);
    +      defaultSessionConfig_ = null;
    +      if (defaultSessionConfigBuilder_ != null) {
    +        defaultSessionConfigBuilder_.dispose();
             defaultSessionConfigBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -1297,7 +1308,7 @@ public Builder clearDefaultSessionConfig() {
          * .tensorflow.ConfigProto default_session_config = 4;
          */
         public org.tensorflow.proto.ConfigProto.Builder getDefaultSessionConfigBuilder() {
    -      
    +      bitField0_ |= 0x00000010;
           onChanged();
           return getDefaultSessionConfigFieldBuilder().getBuilder();
         }
    @@ -1323,11 +1334,11 @@ public org.tensorflow.proto.ConfigProtoOrBuilder getDefaultSessionConfigOrBuilde
          *
          * .tensorflow.ConfigProto default_session_config = 4;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.ConfigProto, org.tensorflow.proto.ConfigProto.Builder, org.tensorflow.proto.ConfigProtoOrBuilder> 
             getDefaultSessionConfigFieldBuilder() {
           if (defaultSessionConfigBuilder_ == null) {
    -        defaultSessionConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        defaultSessionConfigBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.ConfigProto, org.tensorflow.proto.ConfigProto.Builder, org.tensorflow.proto.ConfigProtoOrBuilder>(
                     getDefaultSessionConfig(),
                     getParentForChildren(),
    @@ -1341,6 +1352,7 @@ public org.tensorflow.proto.ConfigProtoOrBuilder getDefaultSessionConfigOrBuilde
         /**
          * 
          * The protocol to be used by this server.
    +     *
          * Acceptable values include: "grpc", "grpc+verbs".
          * 
    * @@ -1362,6 +1374,7 @@ public java.lang.String getProtocol() { /** *
          * The protocol to be used by this server.
    +     *
          * Acceptable values include: "grpc", "grpc+verbs".
          * 
    * @@ -1384,6 +1397,7 @@ public java.lang.String getProtocol() { /** *
          * The protocol to be used by this server.
    +     *
          * Acceptable values include: "grpc", "grpc+verbs".
          * 
    * @@ -1393,17 +1407,16 @@ public java.lang.String getProtocol() { */ public Builder setProtocol( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } protocol_ = value; + bitField0_ |= 0x00000020; onChanged(); return this; } /** *
          * The protocol to be used by this server.
    +     *
          * Acceptable values include: "grpc", "grpc+verbs".
          * 
    * @@ -1411,14 +1424,15 @@ public Builder setProtocol( * @return This builder for chaining. */ public Builder clearProtocol() { - protocol_ = getDefaultInstance().getProtocol(); + bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } /** *
          * The protocol to be used by this server.
    +     *
          * Acceptable values include: "grpc", "grpc+verbs".
          * 
    * @@ -1428,12 +1442,10 @@ public Builder clearProtocol() { */ public Builder setProtocolBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); protocol_ = value; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -1461,8 +1473,9 @@ public int getPort() { * @return This builder for chaining. */ public Builder setPort(int value) { - + port_ = value; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -1475,14 +1488,14 @@ public Builder setPort(int value) { * @return This builder for chaining. */ public Builder clearPort() { - + bitField0_ = (bitField0_ & ~0x00000040); port_ = 0; onChanged(); return this; } private org.tensorflow.proto.ClusterDeviceFilters clusterDeviceFilters_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.ClusterDeviceFilters, org.tensorflow.proto.ClusterDeviceFilters.Builder, org.tensorflow.proto.ClusterDeviceFiltersOrBuilder> clusterDeviceFiltersBuilder_; /** *
    @@ -1494,7 +1507,7 @@ public Builder clearPort() {
          * @return Whether the clusterDeviceFilters field is set.
          */
         public boolean hasClusterDeviceFilters() {
    -      return clusterDeviceFiltersBuilder_ != null || clusterDeviceFilters_ != null;
    +      return ((bitField0_ & 0x00000080) != 0);
         }
         /**
          * 
    @@ -1526,11 +1539,11 @@ public Builder setClusterDeviceFilters(org.tensorflow.proto.ClusterDeviceFilters
               throw new NullPointerException();
             }
             clusterDeviceFilters_ = value;
    -        onChanged();
           } else {
             clusterDeviceFiltersBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000080;
    +      onChanged();
           return this;
         }
         /**
    @@ -1545,11 +1558,11 @@ public Builder setClusterDeviceFilters(
             org.tensorflow.proto.ClusterDeviceFilters.Builder builderForValue) {
           if (clusterDeviceFiltersBuilder_ == null) {
             clusterDeviceFilters_ = builderForValue.build();
    -        onChanged();
           } else {
             clusterDeviceFiltersBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000080;
    +      onChanged();
           return this;
         }
         /**
    @@ -1562,17 +1575,20 @@ public Builder setClusterDeviceFilters(
          */
         public Builder mergeClusterDeviceFilters(org.tensorflow.proto.ClusterDeviceFilters value) {
           if (clusterDeviceFiltersBuilder_ == null) {
    -        if (clusterDeviceFilters_ != null) {
    -          clusterDeviceFilters_ =
    -            org.tensorflow.proto.ClusterDeviceFilters.newBuilder(clusterDeviceFilters_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000080) != 0) &&
    +          clusterDeviceFilters_ != null &&
    +          clusterDeviceFilters_ != org.tensorflow.proto.ClusterDeviceFilters.getDefaultInstance()) {
    +          getClusterDeviceFiltersBuilder().mergeFrom(value);
             } else {
               clusterDeviceFilters_ = value;
             }
    -        onChanged();
           } else {
             clusterDeviceFiltersBuilder_.mergeFrom(value);
           }
    -
    +      if (clusterDeviceFilters_ != null) {
    +        bitField0_ |= 0x00000080;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -1584,14 +1600,13 @@ public Builder mergeClusterDeviceFilters(org.tensorflow.proto.ClusterDeviceFilte
          * .tensorflow.ClusterDeviceFilters cluster_device_filters = 7;
          */
         public Builder clearClusterDeviceFilters() {
    -      if (clusterDeviceFiltersBuilder_ == null) {
    -        clusterDeviceFilters_ = null;
    -        onChanged();
    -      } else {
    -        clusterDeviceFilters_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000080);
    +      clusterDeviceFilters_ = null;
    +      if (clusterDeviceFiltersBuilder_ != null) {
    +        clusterDeviceFiltersBuilder_.dispose();
             clusterDeviceFiltersBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -1603,7 +1618,7 @@ public Builder clearClusterDeviceFilters() {
          * .tensorflow.ClusterDeviceFilters cluster_device_filters = 7;
          */
         public org.tensorflow.proto.ClusterDeviceFilters.Builder getClusterDeviceFiltersBuilder() {
    -      
    +      bitField0_ |= 0x00000080;
           onChanged();
           return getClusterDeviceFiltersFieldBuilder().getBuilder();
         }
    @@ -1631,11 +1646,11 @@ public org.tensorflow.proto.ClusterDeviceFiltersOrBuilder getClusterDeviceFilter
          *
          * .tensorflow.ClusterDeviceFilters cluster_device_filters = 7;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.ClusterDeviceFilters, org.tensorflow.proto.ClusterDeviceFilters.Builder, org.tensorflow.proto.ClusterDeviceFiltersOrBuilder> 
             getClusterDeviceFiltersFieldBuilder() {
           if (clusterDeviceFiltersBuilder_ == null) {
    -        clusterDeviceFiltersBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        clusterDeviceFiltersBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.ClusterDeviceFilters, org.tensorflow.proto.ClusterDeviceFilters.Builder, org.tensorflow.proto.ClusterDeviceFiltersOrBuilder>(
                     getClusterDeviceFilters(),
                     getParentForChildren(),
    @@ -1644,18 +1659,6 @@ public org.tensorflow.proto.ClusterDeviceFiltersOrBuilder getClusterDeviceFilter
           }
           return clusterDeviceFiltersBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.ServerDef)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ServerDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ServerDefOrBuilder.java
    index bab65d9cac9..b6f191e3c59 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ServerDefOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ServerDefOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/tensorflow_server.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -37,6 +39,7 @@ public interface ServerDefOrBuilder extends
       /**
        * 
        * The name of the job of which this server is a member.
    +   *
        * NOTE(mrry): The `cluster` field must contain a `JobDef` with a `name` field
        * that matches this name.
        * 
    @@ -48,6 +51,7 @@ public interface ServerDefOrBuilder extends /** *
        * The name of the job of which this server is a member.
    +   *
        * NOTE(mrry): The `cluster` field must contain a `JobDef` with a `name` field
        * that matches this name.
        * 
    @@ -71,6 +75,7 @@ public interface ServerDefOrBuilder extends /** *
        * The task index of this server in its job.
    +   *
        * NOTE: The `cluster` field must contain a `JobDef` with a matching `name`
        * and a mapping in its `tasks` field for this index.
        * 
    @@ -110,6 +115,7 @@ public interface ServerDefOrBuilder extends /** *
        * The protocol to be used by this server.
    +   *
        * Acceptable values include: "grpc", "grpc+verbs".
        * 
    * @@ -120,6 +126,7 @@ public interface ServerDefOrBuilder extends /** *
        * The protocol to be used by this server.
    +   *
        * Acceptable values include: "grpc", "grpc+verbs".
        * 
    * diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ServerProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ServerProtos.java index d727958a5b7..56fff5364e9 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ServerProtos.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ServerProtos.java @@ -1,10 +1,21 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/protobuf/tensorflow_server.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; public final class ServerProtos { private ServerProtos() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + ServerProtos.class.getName()); + } public static void registerAllExtensions( com.google.protobuf.ExtensionRegistryLite registry) { } @@ -17,7 +28,7 @@ public static void registerAllExtensions( static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_ServerDef_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_ServerDef_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor @@ -54,9 +65,10 @@ public static void registerAllExtensions( internal_static_tensorflow_ServerDef_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_tensorflow_ServerDef_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_ServerDef_descriptor, new java.lang.String[] { "Cluster", "JobName", "Replica", "TaskIndex", "DefaultSessionConfig", "Protocol", "Port", "ClusterDeviceFilters", }); + descriptor.resolveAllFeaturesImmutable(); org.tensorflow.proto.ClusterProtos.getDescriptor(); org.tensorflow.proto.ConfigProtos.getDescriptor(); org.tensorflow.proto.DeviceFiltersProtos.getDescriptor(); diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SessionLog.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SessionLog.java index 7bcacf95a4c..1bcf1d93e9a 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SessionLog.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SessionLog.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/util/event.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -11,12 +13,21 @@ * Protobuf type {@code tensorflow.SessionLog} */ public final class SessionLog extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.SessionLog) SessionLogOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + SessionLog.class.getName()); + } // Use SessionLog.newBuilder() to construct. - private SessionLog(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private SessionLog(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private SessionLog() { @@ -25,25 +36,13 @@ private SessionLog() { msg_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SessionLog(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.EventProtos.internal_static_tensorflow_SessionLog_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.EventProtos.internal_static_tensorflow_SessionLog_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -74,6 +73,15 @@ public enum SessionStatus UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + SessionStatus.class.getName()); + } /** * STATUS_UNSPECIFIED = 0; */ @@ -177,7 +185,7 @@ private SessionStatus(int value) { } public static final int STATUS_FIELD_NUMBER = 1; - private int status_; + private int status_ = 0; /** * .tensorflow.SessionLog.SessionStatus status = 1; * @return The enum numeric value on the wire for status. @@ -190,13 +198,13 @@ private SessionStatus(int value) { * @return The status. */ @java.lang.Override public org.tensorflow.proto.SessionLog.SessionStatus getStatus() { - @SuppressWarnings("deprecation") - org.tensorflow.proto.SessionLog.SessionStatus result = org.tensorflow.proto.SessionLog.SessionStatus.valueOf(status_); + org.tensorflow.proto.SessionLog.SessionStatus result = org.tensorflow.proto.SessionLog.SessionStatus.forNumber(status_); return result == null ? org.tensorflow.proto.SessionLog.SessionStatus.UNRECOGNIZED : result; } public static final int CHECKPOINT_PATH_FIELD_NUMBER = 2; - private volatile java.lang.Object checkpointPath_; + @SuppressWarnings("serial") + private volatile java.lang.Object checkpointPath_ = ""; /** *
        * This checkpoint_path contains both the path and filename.
    @@ -242,7 +250,8 @@ public java.lang.String getCheckpointPath() {
       }
     
       public static final int MSG_FIELD_NUMBER = 3;
    -  private volatile java.lang.Object msg_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object msg_ = "";
       /**
        * string msg = 3;
        * @return The msg.
    @@ -296,11 +305,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         if (status_ != org.tensorflow.proto.SessionLog.SessionStatus.STATUS_UNSPECIFIED.getNumber()) {
           output.writeEnum(1, status_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(checkpointPath_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, checkpointPath_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(checkpointPath_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 2, checkpointPath_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msg_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, msg_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(msg_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 3, msg_);
         }
         getUnknownFields().writeTo(output);
       }
    @@ -315,11 +324,11 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeEnumSize(1, status_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(checkpointPath_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, checkpointPath_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(checkpointPath_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(2, checkpointPath_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msg_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, msg_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(msg_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(3, msg_);
         }
         size += getUnknownFields().getSerializedSize();
         memoizedSize = size;
    @@ -397,39 +406,41 @@ public static org.tensorflow.proto.SessionLog parseFrom(
       }
       public static org.tensorflow.proto.SessionLog parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.SessionLog parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.SessionLog parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.SessionLog parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.SessionLog parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.SessionLog parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -449,7 +460,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -461,7 +472,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.SessionLog}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.SessionLog)
           org.tensorflow.proto.SessionLogOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -470,7 +481,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.EventProtos.internal_static_tensorflow_SessionLog_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -483,19 +494,17 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           status_ = 0;
    -
           checkpointPath_ = "";
    -
           msg_ = "";
    -
           return this;
         }
     
    @@ -522,45 +531,24 @@ public org.tensorflow.proto.SessionLog build() {
         @java.lang.Override
         public org.tensorflow.proto.SessionLog buildPartial() {
           org.tensorflow.proto.SessionLog result = new org.tensorflow.proto.SessionLog(this);
    -      result.status_ = status_;
    -      result.checkpointPath_ = checkpointPath_;
    -      result.msg_ = msg_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.SessionLog result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.status_ = status_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.checkpointPath_ = checkpointPath_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.msg_ = msg_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.SessionLog) {
    @@ -578,10 +566,12 @@ public Builder mergeFrom(org.tensorflow.proto.SessionLog other) {
           }
           if (!other.getCheckpointPath().isEmpty()) {
             checkpointPath_ = other.checkpointPath_;
    +        bitField0_ |= 0x00000002;
             onChanged();
           }
           if (!other.getMsg().isEmpty()) {
             msg_ = other.msg_;
    +        bitField0_ |= 0x00000004;
             onChanged();
           }
           this.mergeUnknownFields(other.getUnknownFields());
    @@ -612,17 +602,17 @@ public Builder mergeFrom(
                   break;
                 case 8: {
                   status_ = input.readEnum();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 8
                 case 18: {
                   checkpointPath_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 case 26: {
                   msg_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 26
                 default: {
    @@ -640,6 +630,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private int status_ = 0;
         /**
    @@ -655,8 +646,8 @@ public Builder mergeFrom(
          * @return This builder for chaining.
          */
         public Builder setStatusValue(int value) {
    -      
           status_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -666,8 +657,7 @@ public Builder setStatusValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.SessionLog.SessionStatus getStatus() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.SessionLog.SessionStatus result = org.tensorflow.proto.SessionLog.SessionStatus.valueOf(status_);
    +      org.tensorflow.proto.SessionLog.SessionStatus result = org.tensorflow.proto.SessionLog.SessionStatus.forNumber(status_);
           return result == null ? org.tensorflow.proto.SessionLog.SessionStatus.UNRECOGNIZED : result;
         }
         /**
    @@ -679,7 +669,7 @@ public Builder setStatus(org.tensorflow.proto.SessionLog.SessionStatus value) {
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00000001;
           status_ = value.getNumber();
           onChanged();
           return this;
    @@ -689,7 +679,7 @@ public Builder setStatus(org.tensorflow.proto.SessionLog.SessionStatus value) {
          * @return This builder for chaining.
          */
         public Builder clearStatus() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000001);
           status_ = 0;
           onChanged();
           return this;
    @@ -748,11 +738,9 @@ public java.lang.String getCheckpointPath() {
          */
         public Builder setCheckpointPath(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           checkpointPath_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -765,8 +753,8 @@ public Builder setCheckpointPath(
          * @return This builder for chaining.
          */
         public Builder clearCheckpointPath() {
    -      
           checkpointPath_ = getDefaultInstance().getCheckpointPath();
    +      bitField0_ = (bitField0_ & ~0x00000002);
           onChanged();
           return this;
         }
    @@ -781,12 +769,10 @@ public Builder clearCheckpointPath() {
          */
         public Builder setCheckpointPathBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           checkpointPath_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -832,11 +818,9 @@ public java.lang.String getMsg() {
          */
         public Builder setMsg(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           msg_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -845,8 +829,8 @@ public Builder setMsg(
          * @return This builder for chaining.
          */
         public Builder clearMsg() {
    -      
           msg_ = getDefaultInstance().getMsg();
    +      bitField0_ = (bitField0_ & ~0x00000004);
           onChanged();
           return this;
         }
    @@ -857,27 +841,13 @@ public Builder clearMsg() {
          */
         public Builder setMsgBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           msg_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.SessionLog)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SessionLogOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SessionLogOrBuilder.java
    index 553c2b098f0..1c97f0c82e8 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SessionLogOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SessionLogOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/util/event.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SessionMetadata.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SessionMetadata.java
    index a8f83cfd9d6..3031e8e58cb 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SessionMetadata.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SessionMetadata.java
    @@ -1,51 +1,53 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/config.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     /**
      * 
      * Metadata about the session.
    + *
      * This can be used by the runtime and the Ops for debugging, monitoring, etc.
    + *
      * The (name, version) tuple is expected to be a unique identifier for
      * sessions within the same process.
    + *
      * NOTE: This is currently used and propagated only by the direct session.
      * 
    * * Protobuf type {@code tensorflow.SessionMetadata} */ public final class SessionMetadata extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.SessionMetadata) SessionMetadataOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + SessionMetadata.class.getName()); + } // Use SessionMetadata.newBuilder() to construct. - private SessionMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private SessionMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private SessionMetadata() { name_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SessionMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_SessionMetadata_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_SessionMetadata_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -53,7 +55,8 @@ protected java.lang.Object newInstance( } public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; /** * string name = 1; * @return The name. @@ -91,7 +94,7 @@ public java.lang.String getName() { } public static final int VERSION_FIELD_NUMBER = 2; - private long version_; + private long version_ = 0L; /** *
        * The version is optional. If set, needs to be >= 0.
    @@ -119,8 +122,8 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
         }
         if (version_ != 0L) {
           output.writeInt64(2, version_);
    @@ -134,8 +137,8 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
         }
         if (version_ != 0L) {
           size += com.google.protobuf.CodedOutputStream
    @@ -215,39 +218,41 @@ public static org.tensorflow.proto.SessionMetadata parseFrom(
       }
       public static org.tensorflow.proto.SessionMetadata parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.SessionMetadata parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.SessionMetadata parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.SessionMetadata parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.SessionMetadata parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.SessionMetadata parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -267,23 +272,26 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
       /**
        * 
        * Metadata about the session.
    +   *
        * This can be used by the runtime and the Ops for debugging, monitoring, etc.
    +   *
        * The (name, version) tuple is expected to be a unique identifier for
        * sessions within the same process.
    +   *
        * NOTE: This is currently used and propagated only by the direct session.
        * 
    * * Protobuf type {@code tensorflow.SessionMetadata} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.SessionMetadata) org.tensorflow.proto.SessionMetadataOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -292,7 +300,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_SessionMetadata_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -305,17 +313,16 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; name_ = ""; - version_ = 0L; - return this; } @@ -342,44 +349,21 @@ public org.tensorflow.proto.SessionMetadata build() { @java.lang.Override public org.tensorflow.proto.SessionMetadata buildPartial() { org.tensorflow.proto.SessionMetadata result = new org.tensorflow.proto.SessionMetadata(this); - result.name_ = name_; - result.version_ = version_; + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.SessionMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.version_ = version_; + } } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.SessionMetadata) { @@ -394,6 +378,7 @@ public Builder mergeFrom(org.tensorflow.proto.SessionMetadata other) { if (other == org.tensorflow.proto.SessionMetadata.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; + bitField0_ |= 0x00000001; onChanged(); } if (other.getVersion() != 0L) { @@ -427,12 +412,12 @@ public Builder mergeFrom( break; case 10: { name_ = input.readStringRequireUtf8(); - + bitField0_ |= 0x00000001; break; } // case 10 case 16: { version_ = input.readInt64(); - + bitField0_ |= 0x00000002; break; } // case 16 default: { @@ -450,6 +435,7 @@ public Builder mergeFrom( } // finally return this; } + private int bitField0_; private java.lang.Object name_ = ""; /** @@ -492,11 +478,9 @@ public java.lang.String getName() { */ public Builder setName( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } name_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -505,8 +489,8 @@ public Builder setName( * @return This builder for chaining. */ public Builder clearName() { - name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -517,12 +501,10 @@ public Builder clearName() { */ public Builder setNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); name_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -550,8 +532,9 @@ public long getVersion() { * @return This builder for chaining. */ public Builder setVersion(long value) { - + version_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -564,23 +547,11 @@ public Builder setVersion(long value) { * @return This builder for chaining. */ public Builder clearVersion() { - + bitField0_ = (bitField0_ & ~0x00000002); version_ = 0L; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.SessionMetadata) } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SessionMetadataOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SessionMetadataOrBuilder.java index 4a43a99f1dd..2401495d7e2 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SessionMetadataOrBuilder.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SessionMetadataOrBuilder.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/protobuf/config.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SignatureDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SignatureDef.java index b701daabd03..6e0faf13917 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SignatureDef.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SignatureDef.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/protobuf/meta_graph.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -12,30 +14,27 @@ * Protobuf type {@code tensorflow.SignatureDef} */ public final class SignatureDef extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.SignatureDef) SignatureDefOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + SignatureDef.class.getName()); + } // Use SignatureDef.newBuilder() to construct. - private SignatureDef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private SignatureDef(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private SignatureDef() { methodName_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SignatureDef(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.MetaGraphProtos.internal_static_tensorflow_SignatureDef_descriptor; @@ -43,7 +42,7 @@ protected java.lang.Object newInstance( @SuppressWarnings({"rawtypes"}) @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 1: @@ -58,7 +57,7 @@ protected com.google.protobuf.MapField internalGetMapField( } } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.MetaGraphProtos.internal_static_tensorflow_SignatureDef_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -77,6 +76,7 @@ private static final class InputsDefaultEntryHolder { com.google.protobuf.WireFormat.FieldType.MESSAGE, org.tensorflow.proto.TensorInfo.getDefaultInstance()); } + @SuppressWarnings("serial") private com.google.protobuf.MapField< java.lang.String, org.tensorflow.proto.TensorInfo> inputs_; private com.google.protobuf.MapField @@ -87,7 +87,6 @@ private static final class InputsDefaultEntryHolder { } return inputs_; } - public int getInputsCount() { return internalGetInputs().getMap().size(); } @@ -98,7 +97,6 @@ public int getInputsCount() { * * map<string, .tensorflow.TensorInfo> inputs = 1; */ - @java.lang.Override public boolean containsInputs( java.lang.String key) { @@ -121,7 +119,6 @@ public java.util.Map getInput * map<string, .tensorflow.TensorInfo> inputs = 1; */ @java.lang.Override - public java.util.Map getInputsMap() { return internalGetInputs().getMap(); } @@ -133,10 +130,11 @@ public java.util.Map getInput * map<string, .tensorflow.TensorInfo> inputs = 1; */ @java.lang.Override - - public org.tensorflow.proto.TensorInfo getInputsOrDefault( + public /* nullable */ +org.tensorflow.proto.TensorInfo getInputsOrDefault( java.lang.String key, - org.tensorflow.proto.TensorInfo defaultValue) { + /* nullable */ +org.tensorflow.proto.TensorInfo defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetInputs().getMap(); @@ -150,7 +148,6 @@ public org.tensorflow.proto.TensorInfo getInputsOrDefault( * map<string, .tensorflow.TensorInfo> inputs = 1; */ @java.lang.Override - public org.tensorflow.proto.TensorInfo getInputsOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } @@ -174,6 +171,7 @@ private static final class OutputsDefaultEntryHolder { com.google.protobuf.WireFormat.FieldType.MESSAGE, org.tensorflow.proto.TensorInfo.getDefaultInstance()); } + @SuppressWarnings("serial") private com.google.protobuf.MapField< java.lang.String, org.tensorflow.proto.TensorInfo> outputs_; private com.google.protobuf.MapField @@ -184,7 +182,6 @@ private static final class OutputsDefaultEntryHolder { } return outputs_; } - public int getOutputsCount() { return internalGetOutputs().getMap().size(); } @@ -195,7 +192,6 @@ public int getOutputsCount() { * * map<string, .tensorflow.TensorInfo> outputs = 2; */ - @java.lang.Override public boolean containsOutputs( java.lang.String key) { @@ -218,7 +214,6 @@ public java.util.Map getOutpu * map<string, .tensorflow.TensorInfo> outputs = 2; */ @java.lang.Override - public java.util.Map getOutputsMap() { return internalGetOutputs().getMap(); } @@ -230,10 +225,11 @@ public java.util.Map getOutpu * map<string, .tensorflow.TensorInfo> outputs = 2; */ @java.lang.Override - - public org.tensorflow.proto.TensorInfo getOutputsOrDefault( + public /* nullable */ +org.tensorflow.proto.TensorInfo getOutputsOrDefault( java.lang.String key, - org.tensorflow.proto.TensorInfo defaultValue) { + /* nullable */ +org.tensorflow.proto.TensorInfo defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetOutputs().getMap(); @@ -247,7 +243,6 @@ public org.tensorflow.proto.TensorInfo getOutputsOrDefault( * map<string, .tensorflow.TensorInfo> outputs = 2; */ @java.lang.Override - public org.tensorflow.proto.TensorInfo getOutputsOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } @@ -260,11 +255,13 @@ public org.tensorflow.proto.TensorInfo getOutputsOrThrow( } public static final int METHOD_NAME_FIELD_NUMBER = 3; - private volatile java.lang.Object methodName_; + @SuppressWarnings("serial") + private volatile java.lang.Object methodName_ = ""; /** *
        * Deprecated: TensorFlow 2 always sets this to a fixed value;
        * open-source TF Serving stopped checking by default since release 2.4.
    +   *
        * In TensorFlow 1, the method_name enabled users to mark a SignatureDef as
        * supporting a particular method. Multiple SignatureDefs in a single
        * MetaGraphDef could have the same method_name (e.g., to support multi-headed
    @@ -291,6 +288,7 @@ public java.lang.String getMethodName() {
        * 
        * Deprecated: TensorFlow 2 always sets this to a fixed value;
        * open-source TF Serving stopped checking by default since release 2.4.
    +   *
        * In TensorFlow 1, the method_name enabled users to mark a SignatureDef as
        * supporting a particular method. Multiple SignatureDefs in a single
        * MetaGraphDef could have the same method_name (e.g., to support multi-headed
    @@ -327,6 +325,7 @@ private static final class DefaultsDefaultEntryHolder {
                     com.google.protobuf.WireFormat.FieldType.MESSAGE,
                     org.tensorflow.proto.TensorProto.getDefaultInstance());
       }
    +  @SuppressWarnings("serial")
       private com.google.protobuf.MapField<
           java.lang.String, org.tensorflow.proto.TensorProto> defaults_;
       private com.google.protobuf.MapField
    @@ -337,7 +336,6 @@ private static final class DefaultsDefaultEntryHolder {
         }
         return defaults_;
       }
    -
       public int getDefaultsCount() {
         return internalGetDefaults().getMap().size();
       }
    @@ -348,7 +346,6 @@ public int getDefaultsCount() {
        *
        * map<string, .tensorflow.TensorProto> defaults = 4;
        */
    -
       @java.lang.Override
       public boolean containsDefaults(
           java.lang.String key) {
    @@ -371,7 +368,6 @@ public java.util.Map getDefa
        * map<string, .tensorflow.TensorProto> defaults = 4;
        */
       @java.lang.Override
    -
       public java.util.Map getDefaultsMap() {
         return internalGetDefaults().getMap();
       }
    @@ -383,10 +379,11 @@ public java.util.Map getDefa
        * map<string, .tensorflow.TensorProto> defaults = 4;
        */
       @java.lang.Override
    -
    -  public org.tensorflow.proto.TensorProto getDefaultsOrDefault(
    +  public /* nullable */
    +org.tensorflow.proto.TensorProto getDefaultsOrDefault(
           java.lang.String key,
    -      org.tensorflow.proto.TensorProto defaultValue) {
    +      /* nullable */
    +org.tensorflow.proto.TensorProto defaultValue) {
         if (key == null) { throw new NullPointerException("map key"); }
         java.util.Map map =
             internalGetDefaults().getMap();
    @@ -400,7 +397,6 @@ public org.tensorflow.proto.TensorProto getDefaultsOrDefault(
        * map<string, .tensorflow.TensorProto> defaults = 4;
        */
       @java.lang.Override
    -
       public org.tensorflow.proto.TensorProto getDefaultsOrThrow(
           java.lang.String key) {
         if (key == null) { throw new NullPointerException("map key"); }
    @@ -426,22 +422,22 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    com.google.protobuf.GeneratedMessageV3
    +    com.google.protobuf.GeneratedMessage
           .serializeStringMapTo(
             output,
             internalGetInputs(),
             InputsDefaultEntryHolder.defaultEntry,
             1);
    -    com.google.protobuf.GeneratedMessageV3
    +    com.google.protobuf.GeneratedMessage
           .serializeStringMapTo(
             output,
             internalGetOutputs(),
             OutputsDefaultEntryHolder.defaultEntry,
             2);
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(methodName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, methodName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(methodName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 3, methodName_);
         }
    -    com.google.protobuf.GeneratedMessageV3
    +    com.google.protobuf.GeneratedMessage
           .serializeStringMapTo(
             output,
             internalGetDefaults(),
    @@ -476,8 +472,8 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(2, outputs__);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(methodName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, methodName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(methodName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(3, methodName_);
         }
         for (java.util.Map.Entry entry
              : internalGetDefaults().getMap().entrySet()) {
    @@ -576,39 +572,41 @@ public static org.tensorflow.proto.SignatureDef parseFrom(
       }
       public static org.tensorflow.proto.SignatureDef parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.SignatureDef parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.SignatureDef parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.SignatureDef parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.SignatureDef parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.SignatureDef parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -628,7 +626,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -641,7 +639,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.SignatureDef}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.SignatureDef)
           org.tensorflow.proto.SignatureDefOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -650,7 +648,7 @@ public static final class Builder extends
         }
     
         @SuppressWarnings({"rawtypes"})
    -    protected com.google.protobuf.MapField internalGetMapField(
    +    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
             int number) {
           switch (number) {
             case 1:
    @@ -665,7 +663,7 @@ protected com.google.protobuf.MapField internalGetMapField(
           }
         }
         @SuppressWarnings({"rawtypes"})
    -    protected com.google.protobuf.MapField internalGetMutableMapField(
    +    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
             int number) {
           switch (number) {
             case 1:
    @@ -680,7 +678,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField(
           }
         }
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.MetaGraphProtos.internal_static_tensorflow_SignatureDef_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -693,17 +691,17 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           internalGetMutableInputs().clear();
           internalGetMutableOutputs().clear();
           methodName_ = "";
    -
           internalGetMutableDefaults().clear();
           return this;
         }
    @@ -731,50 +729,27 @@ public org.tensorflow.proto.SignatureDef build() {
         @java.lang.Override
         public org.tensorflow.proto.SignatureDef buildPartial() {
           org.tensorflow.proto.SignatureDef result = new org.tensorflow.proto.SignatureDef(this);
    -      int from_bitField0_ = bitField0_;
    -      result.inputs_ = internalGetInputs();
    -      result.inputs_.makeImmutable();
    -      result.outputs_ = internalGetOutputs();
    -      result.outputs_.makeImmutable();
    -      result.methodName_ = methodName_;
    -      result.defaults_ = internalGetDefaults();
    -      result.defaults_.makeImmutable();
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.SignatureDef result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.inputs_ = internalGetInputs().build(InputsDefaultEntryHolder.defaultEntry);
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.outputs_ = internalGetOutputs().build(OutputsDefaultEntryHolder.defaultEntry);
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.methodName_ = methodName_;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.defaults_ = internalGetDefaults().build(DefaultsDefaultEntryHolder.defaultEntry);
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.SignatureDef) {
    @@ -789,14 +764,18 @@ public Builder mergeFrom(org.tensorflow.proto.SignatureDef other) {
           if (other == org.tensorflow.proto.SignatureDef.getDefaultInstance()) return this;
           internalGetMutableInputs().mergeFrom(
               other.internalGetInputs());
    +      bitField0_ |= 0x00000001;
           internalGetMutableOutputs().mergeFrom(
               other.internalGetOutputs());
    +      bitField0_ |= 0x00000002;
           if (!other.getMethodName().isEmpty()) {
             methodName_ = other.methodName_;
    +        bitField0_ |= 0x00000004;
             onChanged();
           }
           internalGetMutableDefaults().mergeFrom(
               other.internalGetDefaults());
    +      bitField0_ |= 0x00000008;
           this.mergeUnknownFields(other.getUnknownFields());
           onChanged();
           return this;
    @@ -827,29 +806,32 @@ public Builder mergeFrom(
                   com.google.protobuf.MapEntry
                   inputs__ = input.readMessage(
                       InputsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
    -              internalGetMutableInputs().getMutableMap().put(
    +              internalGetMutableInputs().ensureBuilderMap().put(
                       inputs__.getKey(), inputs__.getValue());
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
                   com.google.protobuf.MapEntry
                   outputs__ = input.readMessage(
                       OutputsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
    -              internalGetMutableOutputs().getMutableMap().put(
    +              internalGetMutableOutputs().ensureBuilderMap().put(
                       outputs__.getKey(), outputs__.getValue());
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 case 26: {
                   methodName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 26
                 case 34: {
                   com.google.protobuf.MapEntry
                   defaults__ = input.readMessage(
                       DefaultsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
    -              internalGetMutableDefaults().getMutableMap().put(
    +              internalGetMutableDefaults().ensureBuilderMap().put(
                       defaults__.getKey(), defaults__.getValue());
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 34
                 default: {
    @@ -869,31 +851,40 @@ public Builder mergeFrom(
         }
         private int bitField0_;
     
    -    private com.google.protobuf.MapField<
    -        java.lang.String, org.tensorflow.proto.TensorInfo> inputs_;
    -    private com.google.protobuf.MapField
    -    internalGetInputs() {
    +    private static final class InputsConverter implements com.google.protobuf.MapFieldBuilder.Converter {
    +      @java.lang.Override
    +      public org.tensorflow.proto.TensorInfo build(org.tensorflow.proto.TensorInfoOrBuilder val) {
    +        if (val instanceof org.tensorflow.proto.TensorInfo) { return (org.tensorflow.proto.TensorInfo) val; }
    +        return ((org.tensorflow.proto.TensorInfo.Builder) val).build();
    +      }
    +
    +      @java.lang.Override
    +      public com.google.protobuf.MapEntry defaultEntry() {
    +        return InputsDefaultEntryHolder.defaultEntry;
    +      }
    +    };
    +    private static final InputsConverter inputsConverter = new InputsConverter();
    +
    +    private com.google.protobuf.MapFieldBuilder<
    +        java.lang.String, org.tensorflow.proto.TensorInfoOrBuilder, org.tensorflow.proto.TensorInfo, org.tensorflow.proto.TensorInfo.Builder> inputs_;
    +    private com.google.protobuf.MapFieldBuilder
    +        internalGetInputs() {
           if (inputs_ == null) {
    -        return com.google.protobuf.MapField.emptyMapField(
    -            InputsDefaultEntryHolder.defaultEntry);
    +        return new com.google.protobuf.MapFieldBuilder<>(inputsConverter);
           }
           return inputs_;
         }
    -    private com.google.protobuf.MapField
    -    internalGetMutableInputs() {
    -      onChanged();;
    +    private com.google.protobuf.MapFieldBuilder
    +        internalGetMutableInputs() {
           if (inputs_ == null) {
    -        inputs_ = com.google.protobuf.MapField.newMapField(
    -            InputsDefaultEntryHolder.defaultEntry);
    -      }
    -      if (!inputs_.isMutable()) {
    -        inputs_ = inputs_.copy();
    +        inputs_ = new com.google.protobuf.MapFieldBuilder<>(inputsConverter);
           }
    +      bitField0_ |= 0x00000001;
    +      onChanged();
           return inputs_;
         }
    -
         public int getInputsCount() {
    -      return internalGetInputs().getMap().size();
    +      return internalGetInputs().ensureBuilderMap().size();
         }
         /**
          * 
    @@ -902,12 +893,11 @@ public int getInputsCount() {
          *
          * map<string, .tensorflow.TensorInfo> inputs = 1;
          */
    -
         @java.lang.Override
         public boolean containsInputs(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      return internalGetInputs().getMap().containsKey(key);
    +      return internalGetInputs().ensureBuilderMap().containsKey(key);
         }
         /**
          * Use {@link #getInputsMap()} instead.
    @@ -925,9 +915,8 @@ public java.util.Map getInput
          * map<string, .tensorflow.TensorInfo> inputs = 1;
          */
         @java.lang.Override
    -
         public java.util.Map getInputsMap() {
    -      return internalGetInputs().getMap();
    +      return internalGetInputs().getImmutableMap();
         }
         /**
          * 
    @@ -937,14 +926,14 @@ public java.util.Map getInput
          * map<string, .tensorflow.TensorInfo> inputs = 1;
          */
         @java.lang.Override
    -
    -    public org.tensorflow.proto.TensorInfo getInputsOrDefault(
    +    public /* nullable */
    +org.tensorflow.proto.TensorInfo getInputsOrDefault(
             java.lang.String key,
    -        org.tensorflow.proto.TensorInfo defaultValue) {
    +        /* nullable */
    +org.tensorflow.proto.TensorInfo defaultValue) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      java.util.Map map =
    -          internalGetInputs().getMap();
    -      return map.containsKey(key) ? map.get(key) : defaultValue;
    +      java.util.Map map = internalGetMutableInputs().ensureBuilderMap();
    +      return map.containsKey(key) ? inputsConverter.build(map.get(key)) : defaultValue;
         }
         /**
          * 
    @@ -954,21 +943,18 @@ public org.tensorflow.proto.TensorInfo getInputsOrDefault(
          * map<string, .tensorflow.TensorInfo> inputs = 1;
          */
         @java.lang.Override
    -
         public org.tensorflow.proto.TensorInfo getInputsOrThrow(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      java.util.Map map =
    -          internalGetInputs().getMap();
    +      java.util.Map map = internalGetMutableInputs().ensureBuilderMap();
           if (!map.containsKey(key)) {
             throw new java.lang.IllegalArgumentException();
           }
    -      return map.get(key);
    +      return inputsConverter.build(map.get(key));
         }
    -
         public Builder clearInputs() {
    -      internalGetMutableInputs().getMutableMap()
    -          .clear();
    +      bitField0_ = (bitField0_ & ~0x00000001);
    +      internalGetMutableInputs().clear();
           return this;
         }
         /**
    @@ -978,11 +964,10 @@ public Builder clearInputs() {
          *
          * map<string, .tensorflow.TensorInfo> inputs = 1;
          */
    -
         public Builder removeInputs(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      internalGetMutableInputs().getMutableMap()
    +      internalGetMutableInputs().ensureBuilderMap()
               .remove(key);
           return this;
         }
    @@ -991,8 +976,9 @@ public Builder removeInputs(
          */
         @java.lang.Deprecated
         public java.util.Map
    -    getMutableInputs() {
    -      return internalGetMutableInputs().getMutableMap();
    +        getMutableInputs() {
    +      bitField0_ |= 0x00000001;
    +      return internalGetMutableInputs().ensureMessageMap();
         }
         /**
          * 
    @@ -1005,12 +991,10 @@ public Builder putInputs(
             java.lang.String key,
             org.tensorflow.proto.TensorInfo value) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      if (value == null) {
    -  throw new NullPointerException("map value");
    -}
    -
    -      internalGetMutableInputs().getMutableMap()
    +      if (value == null) { throw new NullPointerException("map value"); }
    +      internalGetMutableInputs().ensureBuilderMap()
               .put(key, value);
    +      bitField0_ |= 0x00000001;
           return this;
         }
         /**
    @@ -1020,39 +1004,74 @@ public Builder putInputs(
          *
          * map<string, .tensorflow.TensorInfo> inputs = 1;
          */
    -
         public Builder putAllInputs(
             java.util.Map values) {
    -      internalGetMutableInputs().getMutableMap()
    +      for (java.util.Map.Entry e : values.entrySet()) {
    +        if (e.getKey() == null || e.getValue() == null) {
    +          throw new NullPointerException();
    +        }
    +      }
    +      internalGetMutableInputs().ensureBuilderMap()
               .putAll(values);
    +      bitField0_ |= 0x00000001;
           return this;
         }
    +    /**
    +     * 
    +     * Named input parameters.
    +     * 
    + * + * map<string, .tensorflow.TensorInfo> inputs = 1; + */ + public org.tensorflow.proto.TensorInfo.Builder putInputsBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableInputs().ensureBuilderMap(); + org.tensorflow.proto.TensorInfoOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = org.tensorflow.proto.TensorInfo.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof org.tensorflow.proto.TensorInfo) { + entry = ((org.tensorflow.proto.TensorInfo) entry).toBuilder(); + builderMap.put(key, entry); + } + return (org.tensorflow.proto.TensorInfo.Builder) entry; + } + + private static final class OutputsConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public org.tensorflow.proto.TensorInfo build(org.tensorflow.proto.TensorInfoOrBuilder val) { + if (val instanceof org.tensorflow.proto.TensorInfo) { return (org.tensorflow.proto.TensorInfo) val; } + return ((org.tensorflow.proto.TensorInfo.Builder) val).build(); + } - private com.google.protobuf.MapField< - java.lang.String, org.tensorflow.proto.TensorInfo> outputs_; - private com.google.protobuf.MapField - internalGetOutputs() { + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return OutputsDefaultEntryHolder.defaultEntry; + } + }; + private static final OutputsConverter outputsConverter = new OutputsConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, org.tensorflow.proto.TensorInfoOrBuilder, org.tensorflow.proto.TensorInfo, org.tensorflow.proto.TensorInfo.Builder> outputs_; + private com.google.protobuf.MapFieldBuilder + internalGetOutputs() { if (outputs_ == null) { - return com.google.protobuf.MapField.emptyMapField( - OutputsDefaultEntryHolder.defaultEntry); + return new com.google.protobuf.MapFieldBuilder<>(outputsConverter); } return outputs_; } - private com.google.protobuf.MapField - internalGetMutableOutputs() { - onChanged();; + private com.google.protobuf.MapFieldBuilder + internalGetMutableOutputs() { if (outputs_ == null) { - outputs_ = com.google.protobuf.MapField.newMapField( - OutputsDefaultEntryHolder.defaultEntry); - } - if (!outputs_.isMutable()) { - outputs_ = outputs_.copy(); + outputs_ = new com.google.protobuf.MapFieldBuilder<>(outputsConverter); } + bitField0_ |= 0x00000002; + onChanged(); return outputs_; } - public int getOutputsCount() { - return internalGetOutputs().getMap().size(); + return internalGetOutputs().ensureBuilderMap().size(); } /** *
    @@ -1061,12 +1080,11 @@ public int getOutputsCount() {
          *
          * map<string, .tensorflow.TensorInfo> outputs = 2;
          */
    -
         @java.lang.Override
         public boolean containsOutputs(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      return internalGetOutputs().getMap().containsKey(key);
    +      return internalGetOutputs().ensureBuilderMap().containsKey(key);
         }
         /**
          * Use {@link #getOutputsMap()} instead.
    @@ -1084,9 +1102,8 @@ public java.util.Map getOutpu
          * map<string, .tensorflow.TensorInfo> outputs = 2;
          */
         @java.lang.Override
    -
         public java.util.Map getOutputsMap() {
    -      return internalGetOutputs().getMap();
    +      return internalGetOutputs().getImmutableMap();
         }
         /**
          * 
    @@ -1096,14 +1113,14 @@ public java.util.Map getOutpu
          * map<string, .tensorflow.TensorInfo> outputs = 2;
          */
         @java.lang.Override
    -
    -    public org.tensorflow.proto.TensorInfo getOutputsOrDefault(
    +    public /* nullable */
    +org.tensorflow.proto.TensorInfo getOutputsOrDefault(
             java.lang.String key,
    -        org.tensorflow.proto.TensorInfo defaultValue) {
    +        /* nullable */
    +org.tensorflow.proto.TensorInfo defaultValue) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      java.util.Map map =
    -          internalGetOutputs().getMap();
    -      return map.containsKey(key) ? map.get(key) : defaultValue;
    +      java.util.Map map = internalGetMutableOutputs().ensureBuilderMap();
    +      return map.containsKey(key) ? outputsConverter.build(map.get(key)) : defaultValue;
         }
         /**
          * 
    @@ -1113,21 +1130,18 @@ public org.tensorflow.proto.TensorInfo getOutputsOrDefault(
          * map<string, .tensorflow.TensorInfo> outputs = 2;
          */
         @java.lang.Override
    -
         public org.tensorflow.proto.TensorInfo getOutputsOrThrow(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      java.util.Map map =
    -          internalGetOutputs().getMap();
    +      java.util.Map map = internalGetMutableOutputs().ensureBuilderMap();
           if (!map.containsKey(key)) {
             throw new java.lang.IllegalArgumentException();
           }
    -      return map.get(key);
    +      return outputsConverter.build(map.get(key));
         }
    -
         public Builder clearOutputs() {
    -      internalGetMutableOutputs().getMutableMap()
    -          .clear();
    +      bitField0_ = (bitField0_ & ~0x00000002);
    +      internalGetMutableOutputs().clear();
           return this;
         }
         /**
    @@ -1137,11 +1151,10 @@ public Builder clearOutputs() {
          *
          * map<string, .tensorflow.TensorInfo> outputs = 2;
          */
    -
         public Builder removeOutputs(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      internalGetMutableOutputs().getMutableMap()
    +      internalGetMutableOutputs().ensureBuilderMap()
               .remove(key);
           return this;
         }
    @@ -1150,8 +1163,9 @@ public Builder removeOutputs(
          */
         @java.lang.Deprecated
         public java.util.Map
    -    getMutableOutputs() {
    -      return internalGetMutableOutputs().getMutableMap();
    +        getMutableOutputs() {
    +      bitField0_ |= 0x00000002;
    +      return internalGetMutableOutputs().ensureMessageMap();
         }
         /**
          * 
    @@ -1164,12 +1178,10 @@ public Builder putOutputs(
             java.lang.String key,
             org.tensorflow.proto.TensorInfo value) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      if (value == null) {
    -  throw new NullPointerException("map value");
    -}
    -
    -      internalGetMutableOutputs().getMutableMap()
    +      if (value == null) { throw new NullPointerException("map value"); }
    +      internalGetMutableOutputs().ensureBuilderMap()
               .put(key, value);
    +      bitField0_ |= 0x00000002;
           return this;
         }
         /**
    @@ -1179,19 +1191,46 @@ public Builder putOutputs(
          *
          * map<string, .tensorflow.TensorInfo> outputs = 2;
          */
    -
         public Builder putAllOutputs(
             java.util.Map values) {
    -      internalGetMutableOutputs().getMutableMap()
    +      for (java.util.Map.Entry e : values.entrySet()) {
    +        if (e.getKey() == null || e.getValue() == null) {
    +          throw new NullPointerException();
    +        }
    +      }
    +      internalGetMutableOutputs().ensureBuilderMap()
               .putAll(values);
    +      bitField0_ |= 0x00000002;
           return this;
         }
    +    /**
    +     * 
    +     * Named output parameters.
    +     * 
    + * + * map<string, .tensorflow.TensorInfo> outputs = 2; + */ + public org.tensorflow.proto.TensorInfo.Builder putOutputsBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableOutputs().ensureBuilderMap(); + org.tensorflow.proto.TensorInfoOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = org.tensorflow.proto.TensorInfo.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof org.tensorflow.proto.TensorInfo) { + entry = ((org.tensorflow.proto.TensorInfo) entry).toBuilder(); + builderMap.put(key, entry); + } + return (org.tensorflow.proto.TensorInfo.Builder) entry; + } private java.lang.Object methodName_ = ""; /** *
          * Deprecated: TensorFlow 2 always sets this to a fixed value;
          * open-source TF Serving stopped checking by default since release 2.4.
    +     *
          * In TensorFlow 1, the method_name enabled users to mark a SignatureDef as
          * supporting a particular method. Multiple SignatureDefs in a single
          * MetaGraphDef could have the same method_name (e.g., to support multi-headed
    @@ -1217,6 +1256,7 @@ public java.lang.String getMethodName() {
          * 
          * Deprecated: TensorFlow 2 always sets this to a fixed value;
          * open-source TF Serving stopped checking by default since release 2.4.
    +     *
          * In TensorFlow 1, the method_name enabled users to mark a SignatureDef as
          * supporting a particular method. Multiple SignatureDefs in a single
          * MetaGraphDef could have the same method_name (e.g., to support multi-headed
    @@ -1243,6 +1283,7 @@ public java.lang.String getMethodName() {
          * 
          * Deprecated: TensorFlow 2 always sets this to a fixed value;
          * open-source TF Serving stopped checking by default since release 2.4.
    +     *
          * In TensorFlow 1, the method_name enabled users to mark a SignatureDef as
          * supporting a particular method. Multiple SignatureDefs in a single
          * MetaGraphDef could have the same method_name (e.g., to support multi-headed
    @@ -1255,11 +1296,9 @@ public java.lang.String getMethodName() {
          */
         public Builder setMethodName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           methodName_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -1267,6 +1306,7 @@ public Builder setMethodName(
          * 
          * Deprecated: TensorFlow 2 always sets this to a fixed value;
          * open-source TF Serving stopped checking by default since release 2.4.
    +     *
          * In TensorFlow 1, the method_name enabled users to mark a SignatureDef as
          * supporting a particular method. Multiple SignatureDefs in a single
          * MetaGraphDef could have the same method_name (e.g., to support multi-headed
    @@ -1277,8 +1317,8 @@ public Builder setMethodName(
          * @return This builder for chaining.
          */
         public Builder clearMethodName() {
    -      
           methodName_ = getDefaultInstance().getMethodName();
    +      bitField0_ = (bitField0_ & ~0x00000004);
           onChanged();
           return this;
         }
    @@ -1286,6 +1326,7 @@ public Builder clearMethodName() {
          * 
          * Deprecated: TensorFlow 2 always sets this to a fixed value;
          * open-source TF Serving stopped checking by default since release 2.4.
    +     *
          * In TensorFlow 1, the method_name enabled users to mark a SignatureDef as
          * supporting a particular method. Multiple SignatureDefs in a single
          * MetaGraphDef could have the same method_name (e.g., to support multi-headed
    @@ -1298,41 +1339,48 @@ public Builder clearMethodName() {
          */
         public Builder setMethodNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           methodName_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
     
    -    private com.google.protobuf.MapField<
    -        java.lang.String, org.tensorflow.proto.TensorProto> defaults_;
    -    private com.google.protobuf.MapField
    -    internalGetDefaults() {
    +    private static final class DefaultsConverter implements com.google.protobuf.MapFieldBuilder.Converter {
    +      @java.lang.Override
    +      public org.tensorflow.proto.TensorProto build(org.tensorflow.proto.TensorProtoOrBuilder val) {
    +        if (val instanceof org.tensorflow.proto.TensorProto) { return (org.tensorflow.proto.TensorProto) val; }
    +        return ((org.tensorflow.proto.TensorProto.Builder) val).build();
    +      }
    +
    +      @java.lang.Override
    +      public com.google.protobuf.MapEntry defaultEntry() {
    +        return DefaultsDefaultEntryHolder.defaultEntry;
    +      }
    +    };
    +    private static final DefaultsConverter defaultsConverter = new DefaultsConverter();
    +
    +    private com.google.protobuf.MapFieldBuilder<
    +        java.lang.String, org.tensorflow.proto.TensorProtoOrBuilder, org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder> defaults_;
    +    private com.google.protobuf.MapFieldBuilder
    +        internalGetDefaults() {
           if (defaults_ == null) {
    -        return com.google.protobuf.MapField.emptyMapField(
    -            DefaultsDefaultEntryHolder.defaultEntry);
    +        return new com.google.protobuf.MapFieldBuilder<>(defaultsConverter);
           }
           return defaults_;
         }
    -    private com.google.protobuf.MapField
    -    internalGetMutableDefaults() {
    -      onChanged();;
    +    private com.google.protobuf.MapFieldBuilder
    +        internalGetMutableDefaults() {
           if (defaults_ == null) {
    -        defaults_ = com.google.protobuf.MapField.newMapField(
    -            DefaultsDefaultEntryHolder.defaultEntry);
    -      }
    -      if (!defaults_.isMutable()) {
    -        defaults_ = defaults_.copy();
    +        defaults_ = new com.google.protobuf.MapFieldBuilder<>(defaultsConverter);
           }
    +      bitField0_ |= 0x00000008;
    +      onChanged();
           return defaults_;
         }
    -
         public int getDefaultsCount() {
    -      return internalGetDefaults().getMap().size();
    +      return internalGetDefaults().ensureBuilderMap().size();
         }
         /**
          * 
    @@ -1341,12 +1389,11 @@ public int getDefaultsCount() {
          *
          * map<string, .tensorflow.TensorProto> defaults = 4;
          */
    -
         @java.lang.Override
         public boolean containsDefaults(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      return internalGetDefaults().getMap().containsKey(key);
    +      return internalGetDefaults().ensureBuilderMap().containsKey(key);
         }
         /**
          * Use {@link #getDefaultsMap()} instead.
    @@ -1364,9 +1411,8 @@ public java.util.Map getDefa
          * map<string, .tensorflow.TensorProto> defaults = 4;
          */
         @java.lang.Override
    -
         public java.util.Map getDefaultsMap() {
    -      return internalGetDefaults().getMap();
    +      return internalGetDefaults().getImmutableMap();
         }
         /**
          * 
    @@ -1376,14 +1422,14 @@ public java.util.Map getDefa
          * map<string, .tensorflow.TensorProto> defaults = 4;
          */
         @java.lang.Override
    -
    -    public org.tensorflow.proto.TensorProto getDefaultsOrDefault(
    +    public /* nullable */
    +org.tensorflow.proto.TensorProto getDefaultsOrDefault(
             java.lang.String key,
    -        org.tensorflow.proto.TensorProto defaultValue) {
    +        /* nullable */
    +org.tensorflow.proto.TensorProto defaultValue) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      java.util.Map map =
    -          internalGetDefaults().getMap();
    -      return map.containsKey(key) ? map.get(key) : defaultValue;
    +      java.util.Map map = internalGetMutableDefaults().ensureBuilderMap();
    +      return map.containsKey(key) ? defaultsConverter.build(map.get(key)) : defaultValue;
         }
         /**
          * 
    @@ -1393,21 +1439,18 @@ public org.tensorflow.proto.TensorProto getDefaultsOrDefault(
          * map<string, .tensorflow.TensorProto> defaults = 4;
          */
         @java.lang.Override
    -
         public org.tensorflow.proto.TensorProto getDefaultsOrThrow(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      java.util.Map map =
    -          internalGetDefaults().getMap();
    +      java.util.Map map = internalGetMutableDefaults().ensureBuilderMap();
           if (!map.containsKey(key)) {
             throw new java.lang.IllegalArgumentException();
           }
    -      return map.get(key);
    +      return defaultsConverter.build(map.get(key));
         }
    -
         public Builder clearDefaults() {
    -      internalGetMutableDefaults().getMutableMap()
    -          .clear();
    +      bitField0_ = (bitField0_ & ~0x00000008);
    +      internalGetMutableDefaults().clear();
           return this;
         }
         /**
    @@ -1417,11 +1460,10 @@ public Builder clearDefaults() {
          *
          * map<string, .tensorflow.TensorProto> defaults = 4;
          */
    -
         public Builder removeDefaults(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      internalGetMutableDefaults().getMutableMap()
    +      internalGetMutableDefaults().ensureBuilderMap()
               .remove(key);
           return this;
         }
    @@ -1430,8 +1472,9 @@ public Builder removeDefaults(
          */
         @java.lang.Deprecated
         public java.util.Map
    -    getMutableDefaults() {
    -      return internalGetMutableDefaults().getMutableMap();
    +        getMutableDefaults() {
    +      bitField0_ |= 0x00000008;
    +      return internalGetMutableDefaults().ensureMessageMap();
         }
         /**
          * 
    @@ -1444,12 +1487,10 @@ public Builder putDefaults(
             java.lang.String key,
             org.tensorflow.proto.TensorProto value) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      if (value == null) {
    -  throw new NullPointerException("map value");
    -}
    -
    -      internalGetMutableDefaults().getMutableMap()
    +      if (value == null) { throw new NullPointerException("map value"); }
    +      internalGetMutableDefaults().ensureBuilderMap()
               .put(key, value);
    +      bitField0_ |= 0x00000008;
           return this;
         }
         /**
    @@ -1459,26 +1500,40 @@ public Builder putDefaults(
          *
          * map<string, .tensorflow.TensorProto> defaults = 4;
          */
    -
         public Builder putAllDefaults(
             java.util.Map values) {
    -      internalGetMutableDefaults().getMutableMap()
    +      for (java.util.Map.Entry e : values.entrySet()) {
    +        if (e.getKey() == null || e.getValue() == null) {
    +          throw new NullPointerException();
    +        }
    +      }
    +      internalGetMutableDefaults().ensureBuilderMap()
               .putAll(values);
    +      bitField0_ |= 0x00000008;
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    +    /**
    +     * 
    +     * Named input to corresponding default values if any.
    +     * 
    + * + * map<string, .tensorflow.TensorProto> defaults = 4; + */ + public org.tensorflow.proto.TensorProto.Builder putDefaultsBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableDefaults().ensureBuilderMap(); + org.tensorflow.proto.TensorProtoOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = org.tensorflow.proto.TensorProto.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof org.tensorflow.proto.TensorProto) { + entry = ((org.tensorflow.proto.TensorProto) entry).toBuilder(); + builderMap.put(key, entry); + } + return (org.tensorflow.proto.TensorProto.Builder) entry; } - // @@protoc_insertion_point(builder_scope:tensorflow.SignatureDef) } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SignatureDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SignatureDefOrBuilder.java index 28bd86c8f8a..0e581154587 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SignatureDefOrBuilder.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SignatureDefOrBuilder.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/protobuf/meta_graph.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -46,7 +48,6 @@ boolean containsInputs( * * map<string, .tensorflow.TensorInfo> inputs = 1; */ - /* nullable */ org.tensorflow.proto.TensorInfo getInputsOrDefault( java.lang.String key, @@ -59,7 +60,6 @@ org.tensorflow.proto.TensorInfo getInputsOrDefault( * * map<string, .tensorflow.TensorInfo> inputs = 1; */ - org.tensorflow.proto.TensorInfo getInputsOrThrow( java.lang.String key); @@ -102,7 +102,6 @@ boolean containsOutputs( * * map<string, .tensorflow.TensorInfo> outputs = 2; */ - /* nullable */ org.tensorflow.proto.TensorInfo getOutputsOrDefault( java.lang.String key, @@ -115,7 +114,6 @@ org.tensorflow.proto.TensorInfo getOutputsOrDefault( * * map<string, .tensorflow.TensorInfo> outputs = 2; */ - org.tensorflow.proto.TensorInfo getOutputsOrThrow( java.lang.String key); @@ -123,6 +121,7 @@ org.tensorflow.proto.TensorInfo getOutputsOrThrow( *
        * Deprecated: TensorFlow 2 always sets this to a fixed value;
        * open-source TF Serving stopped checking by default since release 2.4.
    +   *
        * In TensorFlow 1, the method_name enabled users to mark a SignatureDef as
        * supporting a particular method. Multiple SignatureDefs in a single
        * MetaGraphDef could have the same method_name (e.g., to support multi-headed
    @@ -137,6 +136,7 @@ org.tensorflow.proto.TensorInfo getOutputsOrThrow(
        * 
        * Deprecated: TensorFlow 2 always sets this to a fixed value;
        * open-source TF Serving stopped checking by default since release 2.4.
    +   *
        * In TensorFlow 1, the method_name enabled users to mark a SignatureDef as
        * supporting a particular method. Multiple SignatureDefs in a single
        * MetaGraphDef could have the same method_name (e.g., to support multi-headed
    @@ -188,7 +188,6 @@ boolean containsDefaults(
        *
        * map<string, .tensorflow.TensorProto> defaults = 4;
        */
    -
       /* nullable */
     org.tensorflow.proto.TensorProto getDefaultsOrDefault(
           java.lang.String key,
    @@ -201,7 +200,6 @@ org.tensorflow.proto.TensorProto getDefaultsOrDefault(
        *
        * map<string, .tensorflow.TensorProto> defaults = 4;
        */
    -
       org.tensorflow.proto.TensorProto getDefaultsOrThrow(
           java.lang.String key);
     }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SourceFile.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SourceFile.java
    index baebe320789..ea02bfde086 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SourceFile.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SourceFile.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/debug_event.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -12,39 +14,37 @@
      * Protobuf type {@code tensorflow.SourceFile}
      */
     public final class SourceFile extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.SourceFile)
         SourceFileOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      SourceFile.class.getName());
    +  }
       // Use SourceFile.newBuilder() to construct.
    -  private SourceFile(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private SourceFile(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private SourceFile() {
         filePath_ = "";
         hostName_ = "";
    -    lines_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +    lines_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new SourceFile();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.DebugEventProtos.internal_static_tensorflow_SourceFile_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.DebugEventProtos.internal_static_tensorflow_SourceFile_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -52,7 +52,8 @@ protected java.lang.Object newInstance(
       }
     
       public static final int FILE_PATH_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object filePath_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object filePath_ = "";
       /**
        * 
        * Path to the file.
    @@ -98,7 +99,8 @@ public java.lang.String getFilePath() {
       }
     
       public static final int HOST_NAME_FIELD_NUMBER = 2;
    -  private volatile java.lang.Object hostName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object hostName_ = "";
       /**
        * 
        * Name of the host on which the file is located.
    @@ -144,7 +146,9 @@ public java.lang.String getHostName() {
       }
     
       public static final int LINES_FIELD_NUMBER = 3;
    -  private com.google.protobuf.LazyStringList lines_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.LazyStringArrayList lines_ =
    +      com.google.protobuf.LazyStringArrayList.emptyList();
       /**
        * 
        * Line-by-line content of the file.
    @@ -208,14 +212,14 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filePath_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, filePath_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filePath_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, filePath_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hostName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, hostName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(hostName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 2, hostName_);
         }
         for (int i = 0; i < lines_.size(); i++) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, lines_.getRaw(i));
    +      com.google.protobuf.GeneratedMessage.writeString(output, 3, lines_.getRaw(i));
         }
         getUnknownFields().writeTo(output);
       }
    @@ -226,11 +230,11 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filePath_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, filePath_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filePath_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, filePath_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hostName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, hostName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(hostName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(2, hostName_);
         }
         {
           int dataSize = 0;
    @@ -319,39 +323,41 @@ public static org.tensorflow.proto.SourceFile parseFrom(
       }
       public static org.tensorflow.proto.SourceFile parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.SourceFile parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.SourceFile parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.SourceFile parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.SourceFile parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.SourceFile parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -371,7 +377,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -384,7 +390,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.SourceFile}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.SourceFile)
           org.tensorflow.proto.SourceFileOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -393,7 +399,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.DebugEventProtos.internal_static_tensorflow_SourceFile_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -406,19 +412,18 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           filePath_ = "";
    -
           hostName_ = "";
    -
    -      lines_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      lines_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
           return this;
         }
     
    @@ -445,50 +450,25 @@ public org.tensorflow.proto.SourceFile build() {
         @java.lang.Override
         public org.tensorflow.proto.SourceFile buildPartial() {
           org.tensorflow.proto.SourceFile result = new org.tensorflow.proto.SourceFile(this);
    -      int from_bitField0_ = bitField0_;
    -      result.filePath_ = filePath_;
    -      result.hostName_ = hostName_;
    -      if (((bitField0_ & 0x00000001) != 0)) {
    -        lines_ = lines_.getUnmodifiableView();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    -      }
    -      result.lines_ = lines_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.SourceFile result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.filePath_ = filePath_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.hostName_ = hostName_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        lines_.makeImmutable();
    +        result.lines_ = lines_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.SourceFile) {
    @@ -503,16 +483,18 @@ public Builder mergeFrom(org.tensorflow.proto.SourceFile other) {
           if (other == org.tensorflow.proto.SourceFile.getDefaultInstance()) return this;
           if (!other.getFilePath().isEmpty()) {
             filePath_ = other.filePath_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (!other.getHostName().isEmpty()) {
             hostName_ = other.hostName_;
    +        bitField0_ |= 0x00000002;
             onChanged();
           }
           if (!other.lines_.isEmpty()) {
             if (lines_.isEmpty()) {
               lines_ = other.lines_;
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ |= 0x00000004;
             } else {
               ensureLinesIsMutable();
               lines_.addAll(other.lines_);
    @@ -547,12 +529,12 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   filePath_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
                   hostName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 case 26: {
    @@ -631,11 +613,9 @@ public java.lang.String getFilePath() {
          */
         public Builder setFilePath(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           filePath_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -648,8 +628,8 @@ public Builder setFilePath(
          * @return This builder for chaining.
          */
         public Builder clearFilePath() {
    -      
           filePath_ = getDefaultInstance().getFilePath();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -664,12 +644,10 @@ public Builder clearFilePath() {
          */
         public Builder setFilePathBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           filePath_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -727,11 +705,9 @@ public java.lang.String getHostName() {
          */
         public Builder setHostName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           hostName_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -744,8 +720,8 @@ public Builder setHostName(
          * @return This builder for chaining.
          */
         public Builder clearHostName() {
    -      
           hostName_ = getDefaultInstance().getHostName();
    +      bitField0_ = (bitField0_ & ~0x00000002);
           onChanged();
           return this;
         }
    @@ -760,22 +736,21 @@ public Builder clearHostName() {
          */
         public Builder setHostNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           hostName_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
     
    -    private com.google.protobuf.LazyStringList lines_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +    private com.google.protobuf.LazyStringArrayList lines_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         private void ensureLinesIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    +      if (!lines_.isModifiable()) {
             lines_ = new com.google.protobuf.LazyStringArrayList(lines_);
    -        bitField0_ |= 0x00000001;
    -       }
    +      }
    +      bitField0_ |= 0x00000004;
         }
         /**
          * 
    @@ -787,7 +762,8 @@ private void ensureLinesIsMutable() {
          */
         public com.google.protobuf.ProtocolStringList
             getLinesList() {
    -      return lines_.getUnmodifiableView();
    +      lines_.makeImmutable();
    +      return lines_;
         }
         /**
          * 
    @@ -837,11 +813,10 @@ public java.lang.String getLines(int index) {
          */
         public Builder setLines(
             int index, java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureLinesIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureLinesIsMutable();
           lines_.set(index, value);
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -856,11 +831,10 @@ public Builder setLines(
          */
         public Builder addLines(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureLinesIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureLinesIsMutable();
           lines_.add(value);
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -878,6 +852,7 @@ public Builder addAllLines(
           ensureLinesIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, lines_);
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -890,8 +865,9 @@ public Builder addAllLines(
          * @return This builder for chaining.
          */
         public Builder clearLines() {
    -      lines_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      lines_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
    +      bitField0_ = (bitField0_ & ~0x00000004);;
           onChanged();
           return this;
         }
    @@ -906,27 +882,14 @@ public Builder clearLines() {
          */
         public Builder addLinesBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           ensureLinesIsMutable();
           lines_.add(value);
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.SourceFile)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SourceFileOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SourceFileOrBuilder.java
    index 41a25144a9b..b4ba2c5003a 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SourceFileOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SourceFileOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/debug_event.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SourceMetadata.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SourceMetadata.java
    index 555bf4fcf82..4ba484f32c5 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SourceMetadata.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SourceMetadata.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/util/event.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,37 +13,34 @@
      * Protobuf type {@code tensorflow.SourceMetadata}
      */
     public final class SourceMetadata extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.SourceMetadata)
         SourceMetadataOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      SourceMetadata.class.getName());
    +  }
       // Use SourceMetadata.newBuilder() to construct.
    -  private SourceMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private SourceMetadata(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private SourceMetadata() {
         writer_ = "";
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new SourceMetadata();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.EventProtos.internal_static_tensorflow_SourceMetadata_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.EventProtos.internal_static_tensorflow_SourceMetadata_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -49,7 +48,8 @@ protected java.lang.Object newInstance(
       }
     
       public static final int WRITER_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object writer_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object writer_ = "";
       /**
        * 
        * Low level name of the summary writer, such as
    @@ -110,8 +110,8 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(writer_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, writer_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(writer_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, writer_);
         }
         getUnknownFields().writeTo(output);
       }
    @@ -122,8 +122,8 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(writer_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, writer_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(writer_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, writer_);
         }
         size += getUnknownFields().getSerializedSize();
         memoizedSize = size;
    @@ -194,39 +194,41 @@ public static org.tensorflow.proto.SourceMetadata parseFrom(
       }
       public static org.tensorflow.proto.SourceMetadata parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.SourceMetadata parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.SourceMetadata parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.SourceMetadata parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.SourceMetadata parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.SourceMetadata parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -246,7 +248,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -258,7 +260,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.SourceMetadata}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.SourceMetadata)
           org.tensorflow.proto.SourceMetadataOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -267,7 +269,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.EventProtos.internal_static_tensorflow_SourceMetadata_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -280,15 +282,15 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           writer_ = "";
    -
           return this;
         }
     
    @@ -315,43 +317,18 @@ public org.tensorflow.proto.SourceMetadata build() {
         @java.lang.Override
         public org.tensorflow.proto.SourceMetadata buildPartial() {
           org.tensorflow.proto.SourceMetadata result = new org.tensorflow.proto.SourceMetadata(this);
    -      result.writer_ = writer_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.SourceMetadata result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.writer_ = writer_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.SourceMetadata) {
    @@ -366,6 +343,7 @@ public Builder mergeFrom(org.tensorflow.proto.SourceMetadata other) {
           if (other == org.tensorflow.proto.SourceMetadata.getDefaultInstance()) return this;
           if (!other.getWriter().isEmpty()) {
             writer_ = other.writer_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           this.mergeUnknownFields(other.getUnknownFields());
    @@ -396,7 +374,7 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   writer_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 default: {
    @@ -414,6 +392,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private java.lang.Object writer_ = "";
         /**
    @@ -471,11 +450,9 @@ public java.lang.String getWriter() {
          */
         public Builder setWriter(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           writer_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -489,8 +466,8 @@ public Builder setWriter(
          * @return This builder for chaining.
          */
         public Builder clearWriter() {
    -      
           writer_ = getDefaultInstance().getWriter();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -506,27 +483,13 @@ public Builder clearWriter() {
          */
         public Builder setWriterBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           writer_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.SourceMetadata)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SourceMetadataOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SourceMetadataOrBuilder.java
    index 6c0645c2a87..7517f9cb4b6 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SourceMetadataOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SourceMetadataOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/util/event.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StackFrameWithId.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StackFrameWithId.java
    index 80740149b50..cb50e0e9abd 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StackFrameWithId.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StackFrameWithId.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/debug_event.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,45 +13,44 @@
      * Protobuf type {@code tensorflow.StackFrameWithId}
      */
     public final class StackFrameWithId extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.StackFrameWithId)
         StackFrameWithIdOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      StackFrameWithId.class.getName());
    +  }
       // Use StackFrameWithId.newBuilder() to construct.
    -  private StackFrameWithId(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private StackFrameWithId(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private StackFrameWithId() {
         id_ = "";
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new StackFrameWithId();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.DebugEventProtos.internal_static_tensorflow_StackFrameWithId_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.DebugEventProtos.internal_static_tensorflow_StackFrameWithId_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
                 org.tensorflow.proto.StackFrameWithId.class, org.tensorflow.proto.StackFrameWithId.Builder.class);
       }
     
    +  private int bitField0_;
       public static final int ID_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object id_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object id_ = "";
       /**
        * 
        * A unique ID for the stack frame: A UUID-like string.
    @@ -108,7 +109,7 @@ public java.lang.String getId() {
        */
       @java.lang.Override
       public boolean hasFileLineCol() {
    -    return fileLineCol_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * 
    @@ -135,7 +136,7 @@ public org.tensorflow.proto.GraphDebugInfo.FileLineCol getFileLineCol() {
        */
       @java.lang.Override
       public org.tensorflow.proto.GraphDebugInfo.FileLineColOrBuilder getFileLineColOrBuilder() {
    -    return getFileLineCol();
    +    return fileLineCol_ == null ? org.tensorflow.proto.GraphDebugInfo.FileLineCol.getDefaultInstance() : fileLineCol_;
       }
     
       private byte memoizedIsInitialized = -1;
    @@ -152,10 +153,10 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, id_);
         }
    -    if (fileLineCol_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(2, getFileLineCol());
         }
         getUnknownFields().writeTo(output);
    @@ -167,10 +168,10 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_);
         }
    -    if (fileLineCol_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(2, getFileLineCol());
         }
    @@ -252,39 +253,41 @@ public static org.tensorflow.proto.StackFrameWithId parseFrom(
       }
       public static org.tensorflow.proto.StackFrameWithId parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.StackFrameWithId parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.StackFrameWithId parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.StackFrameWithId parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.StackFrameWithId parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.StackFrameWithId parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -304,7 +307,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -316,7 +319,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.StackFrameWithId}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.StackFrameWithId)
           org.tensorflow.proto.StackFrameWithIdOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -325,7 +328,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.DebugEventProtos.internal_static_tensorflow_StackFrameWithId_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -334,23 +337,28 @@ public static final class Builder extends
     
         // Construct using org.tensorflow.proto.StackFrameWithId.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getFileLineColFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           id_ = "";
    -
    -      if (fileLineColBuilder_ == null) {
    -        fileLineCol_ = null;
    -      } else {
    -        fileLineCol_ = null;
    +      fileLineCol_ = null;
    +      if (fileLineColBuilder_ != null) {
    +        fileLineColBuilder_.dispose();
             fileLineColBuilder_ = null;
           }
           return this;
    @@ -379,48 +387,26 @@ public org.tensorflow.proto.StackFrameWithId build() {
         @java.lang.Override
         public org.tensorflow.proto.StackFrameWithId buildPartial() {
           org.tensorflow.proto.StackFrameWithId result = new org.tensorflow.proto.StackFrameWithId(this);
    -      result.id_ = id_;
    -      if (fileLineColBuilder_ == null) {
    -        result.fileLineCol_ = fileLineCol_;
    -      } else {
    -        result.fileLineCol_ = fileLineColBuilder_.build();
    -      }
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.StackFrameWithId result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.id_ = id_;
    +      }
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.fileLineCol_ = fileLineColBuilder_ == null
    +            ? fileLineCol_
    +            : fileLineColBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
    +      }
    +      result.bitField0_ |= to_bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.StackFrameWithId) {
    @@ -435,6 +421,7 @@ public Builder mergeFrom(org.tensorflow.proto.StackFrameWithId other) {
           if (other == org.tensorflow.proto.StackFrameWithId.getDefaultInstance()) return this;
           if (!other.getId().isEmpty()) {
             id_ = other.id_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (other.hasFileLineCol()) {
    @@ -468,14 +455,14 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   id_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
                   input.readMessage(
                       getFileLineColFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 default: {
    @@ -493,6 +480,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private java.lang.Object id_ = "";
         /**
    @@ -547,11 +535,9 @@ public java.lang.String getId() {
          */
         public Builder setId(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           id_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -564,8 +550,8 @@ public Builder setId(
          * @return This builder for chaining.
          */
         public Builder clearId() {
    -      
           id_ = getDefaultInstance().getId();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -580,18 +566,16 @@ public Builder clearId() {
          */
         public Builder setIdBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           id_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
     
         private org.tensorflow.proto.GraphDebugInfo.FileLineCol fileLineCol_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.GraphDebugInfo.FileLineCol, org.tensorflow.proto.GraphDebugInfo.FileLineCol.Builder, org.tensorflow.proto.GraphDebugInfo.FileLineColOrBuilder> fileLineColBuilder_;
         /**
          * 
    @@ -604,7 +588,7 @@ public Builder setIdBytes(
          * @return Whether the fileLineCol field is set.
          */
         public boolean hasFileLineCol() {
    -      return fileLineColBuilder_ != null || fileLineCol_ != null;
    +      return ((bitField0_ & 0x00000002) != 0);
         }
         /**
          * 
    @@ -638,11 +622,11 @@ public Builder setFileLineCol(org.tensorflow.proto.GraphDebugInfo.FileLineCol va
               throw new NullPointerException();
             }
             fileLineCol_ = value;
    -        onChanged();
           } else {
             fileLineColBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return this;
         }
         /**
    @@ -658,11 +642,11 @@ public Builder setFileLineCol(
             org.tensorflow.proto.GraphDebugInfo.FileLineCol.Builder builderForValue) {
           if (fileLineColBuilder_ == null) {
             fileLineCol_ = builderForValue.build();
    -        onChanged();
           } else {
             fileLineColBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return this;
         }
         /**
    @@ -676,17 +660,20 @@ public Builder setFileLineCol(
          */
         public Builder mergeFileLineCol(org.tensorflow.proto.GraphDebugInfo.FileLineCol value) {
           if (fileLineColBuilder_ == null) {
    -        if (fileLineCol_ != null) {
    -          fileLineCol_ =
    -            org.tensorflow.proto.GraphDebugInfo.FileLineCol.newBuilder(fileLineCol_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000002) != 0) &&
    +          fileLineCol_ != null &&
    +          fileLineCol_ != org.tensorflow.proto.GraphDebugInfo.FileLineCol.getDefaultInstance()) {
    +          getFileLineColBuilder().mergeFrom(value);
             } else {
               fileLineCol_ = value;
             }
    -        onChanged();
           } else {
             fileLineColBuilder_.mergeFrom(value);
           }
    -
    +      if (fileLineCol_ != null) {
    +        bitField0_ |= 0x00000002;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -699,14 +686,13 @@ public Builder mergeFileLineCol(org.tensorflow.proto.GraphDebugInfo.FileLineCol
          * .tensorflow.GraphDebugInfo.FileLineCol file_line_col = 2;
          */
         public Builder clearFileLineCol() {
    -      if (fileLineColBuilder_ == null) {
    -        fileLineCol_ = null;
    -        onChanged();
    -      } else {
    -        fileLineCol_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000002);
    +      fileLineCol_ = null;
    +      if (fileLineColBuilder_ != null) {
    +        fileLineColBuilder_.dispose();
             fileLineColBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -719,7 +705,7 @@ public Builder clearFileLineCol() {
          * .tensorflow.GraphDebugInfo.FileLineCol file_line_col = 2;
          */
         public org.tensorflow.proto.GraphDebugInfo.FileLineCol.Builder getFileLineColBuilder() {
    -      
    +      bitField0_ |= 0x00000002;
           onChanged();
           return getFileLineColFieldBuilder().getBuilder();
         }
    @@ -749,11 +735,11 @@ public org.tensorflow.proto.GraphDebugInfo.FileLineColOrBuilder getFileLineColOr
          *
          * .tensorflow.GraphDebugInfo.FileLineCol file_line_col = 2;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.GraphDebugInfo.FileLineCol, org.tensorflow.proto.GraphDebugInfo.FileLineCol.Builder, org.tensorflow.proto.GraphDebugInfo.FileLineColOrBuilder> 
             getFileLineColFieldBuilder() {
           if (fileLineColBuilder_ == null) {
    -        fileLineColBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        fileLineColBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.GraphDebugInfo.FileLineCol, org.tensorflow.proto.GraphDebugInfo.FileLineCol.Builder, org.tensorflow.proto.GraphDebugInfo.FileLineColOrBuilder>(
                     getFileLineCol(),
                     getParentForChildren(),
    @@ -762,18 +748,6 @@ public org.tensorflow.proto.GraphDebugInfo.FileLineColOrBuilder getFileLineColOr
           }
           return fileLineColBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.StackFrameWithId)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StackFrameWithIdOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StackFrameWithIdOrBuilder.java
    index c11b2b585c1..a75ee48a314 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StackFrameWithIdOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StackFrameWithIdOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/debug_event.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Status.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Status.java
    index d4a312a0762..39e89e7969d 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Status.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Status.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    -// source: tsl/protobuf/status.proto
    +// NO CHECKED-IN PROTOBUF GENCODE
    +// source: xla/tsl/protobuf/status.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class Status {
       private Status() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      Status.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,8 +28,13 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_StatusProto_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_StatusProto_fieldAccessorTable;
    +  static final com.google.protobuf.Descriptors.Descriptor
    +    internal_static_tensorflow_StatusProto_PayloadEntry_descriptor;
    +  static final 
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
    +      internal_static_tensorflow_StatusProto_PayloadEntry_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
           getDescriptor() {
    @@ -28,13 +44,15 @@ public static void registerAllExtensions(
           descriptor;
       static {
         java.lang.String[] descriptorData = {
    -      "\n\031tsl/protobuf/status.proto\022\ntensorflow\032" +
    -      "\036tsl/protobuf/error_codes.proto\"D\n\013Statu" +
    -      "sProto\022$\n\004code\030\001 \001(\0162\026.tensorflow.error." +
    -      "Code\022\017\n\007message\030\002 \001(\tB[\n\024org.tensorflow." +
    -      "protoP\001Z>github.com/google/tsl/tsl/go/pr" +
    -      "otobuf/for_core_protos_go_proto\370\001\001b\006prot" +
    -      "o3"
    +      "\n\035xla/tsl/protobuf/status.proto\022\ntensorf" +
    +      "low\032\"xla/tsl/protobuf/error_codes.proto\"" +
    +      "\253\001\n\013StatusProto\022$\n\004code\030\001 \001(\0162\026.tensorfl" +
    +      "ow.error.Code\022\017\n\007message\030\002 \001(\t\0225\n\007payloa" +
    +      "d\030\003 \003(\0132$.tensorflow.StatusProto.Payload" +
    +      "Entry\032.\n\014PayloadEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005va" +
    +      "lue\030\002 \001(\014:\0028\001B[\n\024org.tensorflow.protoP\001Z" +
    +      ">github.com/google/tsl/tsl/go/protobuf/f" +
    +      "or_core_protos_go_proto\370\001\001b\006proto3"
         };
         descriptor = com.google.protobuf.Descriptors.FileDescriptor
           .internalBuildGeneratedFileFrom(descriptorData,
    @@ -44,9 +62,16 @@ public static void registerAllExtensions(
         internal_static_tensorflow_StatusProto_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_StatusProto_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_StatusProto_descriptor,
    -        new java.lang.String[] { "Code", "Message", });
    +        new java.lang.String[] { "Code", "Message", "Payload", });
    +    internal_static_tensorflow_StatusProto_PayloadEntry_descriptor =
    +      internal_static_tensorflow_StatusProto_descriptor.getNestedTypes().get(0);
    +    internal_static_tensorflow_StatusProto_PayloadEntry_fieldAccessorTable = new
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
    +        internal_static_tensorflow_StatusProto_PayloadEntry_descriptor,
    +        new java.lang.String[] { "Key", "Value", });
    +    descriptor.resolveAllFeaturesImmutable();
         org.tensorflow.proto.error.ErrorCodesProtos.getDescriptor();
       }
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StatusProto.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StatusProto.java
    index 178834d006f..43cb0aec28b 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StatusProto.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StatusProto.java
    @@ -1,23 +1,34 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    -// source: tsl/protobuf/status.proto
    +// NO CHECKED-IN PROTOBUF GENCODE
    +// source: xla/tsl/protobuf/status.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     /**
      * 
      * Wire-format for Status.
    - * Next tag: 3
    + * Next tag: 4
      * 
    * * Protobuf type {@code tensorflow.StatusProto} */ public final class StatusProto extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.StatusProto) StatusProtoOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + StatusProto.class.getName()); + } // Use StatusProto.newBuilder() to construct. - private StatusProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private StatusProto(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private StatusProto() { @@ -25,25 +36,25 @@ private StatusProto() { message_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new StatusProto(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.Status.internal_static_tensorflow_StatusProto_descriptor; } + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetPayload(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.Status.internal_static_tensorflow_StatusProto_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -51,10 +62,11 @@ protected java.lang.Object newInstance( } public static final int CODE_FIELD_NUMBER = 1; - private int code_; + private int code_ = 0; /** *
    -   * Status code as defined in tensorflow/tsl/protobuf/error_codes.proto.
    +   * Status code as defined in
    +   * tensorflow/compiler/xla/tsl/protobuf/error_codes.proto.
        * 
    * * .tensorflow.error.Code code = 1; @@ -65,20 +77,21 @@ protected java.lang.Object newInstance( } /** *
    -   * Status code as defined in tensorflow/tsl/protobuf/error_codes.proto.
    +   * Status code as defined in
    +   * tensorflow/compiler/xla/tsl/protobuf/error_codes.proto.
        * 
    * * .tensorflow.error.Code code = 1; * @return The code. */ @java.lang.Override public org.tensorflow.proto.error.Code getCode() { - @SuppressWarnings("deprecation") - org.tensorflow.proto.error.Code result = org.tensorflow.proto.error.Code.valueOf(code_); + org.tensorflow.proto.error.Code result = org.tensorflow.proto.error.Code.forNumber(code_); return result == null ? org.tensorflow.proto.error.Code.UNRECOGNIZED : result; } public static final int MESSAGE_FIELD_NUMBER = 2; - private volatile java.lang.Object message_; + @SuppressWarnings("serial") + private volatile java.lang.Object message_ = ""; /** *
        * Detail error message.
    @@ -123,6 +136,101 @@ public java.lang.String getMessage() {
         }
       }
     
    +  public static final int PAYLOAD_FIELD_NUMBER = 3;
    +  private static final class PayloadDefaultEntryHolder {
    +    static final com.google.protobuf.MapEntry<
    +        java.lang.String, com.google.protobuf.ByteString> defaultEntry =
    +            com.google.protobuf.MapEntry
    +            .newDefaultInstance(
    +                org.tensorflow.proto.Status.internal_static_tensorflow_StatusProto_PayloadEntry_descriptor, 
    +                com.google.protobuf.WireFormat.FieldType.STRING,
    +                "",
    +                com.google.protobuf.WireFormat.FieldType.BYTES,
    +                com.google.protobuf.ByteString.EMPTY);
    +  }
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.MapField<
    +      java.lang.String, com.google.protobuf.ByteString> payload_;
    +  private com.google.protobuf.MapField
    +  internalGetPayload() {
    +    if (payload_ == null) {
    +      return com.google.protobuf.MapField.emptyMapField(
    +          PayloadDefaultEntryHolder.defaultEntry);
    +    }
    +    return payload_;
    +  }
    +  public int getPayloadCount() {
    +    return internalGetPayload().getMap().size();
    +  }
    +  /**
    +   * 
    +   * Unique type URL -> value, like absl::Status payloads.
    +   * 
    + * + * map<string, bytes> payload = 3; + */ + @java.lang.Override + public boolean containsPayload( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetPayload().getMap().containsKey(key); + } + /** + * Use {@link #getPayloadMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getPayload() { + return getPayloadMap(); + } + /** + *
    +   * Unique type URL -> value, like absl::Status payloads.
    +   * 
    + * + * map<string, bytes> payload = 3; + */ + @java.lang.Override + public java.util.Map getPayloadMap() { + return internalGetPayload().getMap(); + } + /** + *
    +   * Unique type URL -> value, like absl::Status payloads.
    +   * 
    + * + * map<string, bytes> payload = 3; + */ + @java.lang.Override + public /* nullable */ +com.google.protobuf.ByteString getPayloadOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.ByteString defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetPayload().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
    +   * Unique type URL -> value, like absl::Status payloads.
    +   * 
    + * + * map<string, bytes> payload = 3; + */ + @java.lang.Override + public com.google.protobuf.ByteString getPayloadOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetPayload().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -140,9 +248,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (code_ != org.tensorflow.proto.error.Code.OK.getNumber()) { output.writeEnum(1, code_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, message_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(message_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, message_); } + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetPayload(), + PayloadDefaultEntryHolder.defaultEntry, + 3); getUnknownFields().writeTo(output); } @@ -156,8 +270,18 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, code_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, message_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(message_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, message_); + } + for (java.util.Map.Entry entry + : internalGetPayload().getMap().entrySet()) { + com.google.protobuf.MapEntry + payload__ = PayloadDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, payload__); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -177,6 +301,8 @@ public boolean equals(final java.lang.Object obj) { if (code_ != other.code_) return false; if (!getMessage() .equals(other.getMessage())) return false; + if (!internalGetPayload().equals( + other.internalGetPayload())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -192,6 +318,10 @@ public int hashCode() { hash = (53 * hash) + code_; hash = (37 * hash) + MESSAGE_FIELD_NUMBER; hash = (53 * hash) + getMessage().hashCode(); + if (!internalGetPayload().getMap().isEmpty()) { + hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + internalGetPayload().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -231,39 +361,41 @@ public static org.tensorflow.proto.StatusProto parseFrom( } public static org.tensorflow.proto.StatusProto parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.StatusProto parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.StatusProto parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.StatusProto parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.StatusProto parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.StatusProto parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -283,20 +415,20 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
        * Wire-format for Status.
    -   * Next tag: 3
    +   * Next tag: 4
        * 
    * * Protobuf type {@code tensorflow.StatusProto} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.StatusProto) org.tensorflow.proto.StatusProtoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -304,8 +436,30 @@ public static final class Builder extends return org.tensorflow.proto.Status.internal_static_tensorflow_StatusProto_descriptor; } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetPayload(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetMutablePayload(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.Status.internal_static_tensorflow_StatusProto_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -318,17 +472,17 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; code_ = 0; - message_ = ""; - + internalGetMutablePayload().clear(); return this; } @@ -355,44 +509,25 @@ public org.tensorflow.proto.StatusProto build() { @java.lang.Override public org.tensorflow.proto.StatusProto buildPartial() { org.tensorflow.proto.StatusProto result = new org.tensorflow.proto.StatusProto(this); - result.code_ = code_; - result.message_ = message_; + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.StatusProto result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.code_ = code_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.message_ = message_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.payload_ = internalGetPayload(); + result.payload_.makeImmutable(); + } } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.StatusProto) { @@ -410,8 +545,12 @@ public Builder mergeFrom(org.tensorflow.proto.StatusProto other) { } if (!other.getMessage().isEmpty()) { message_ = other.message_; + bitField0_ |= 0x00000002; onChanged(); } + internalGetMutablePayload().mergeFrom( + other.internalGetPayload()); + bitField0_ |= 0x00000004; this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -440,14 +579,23 @@ public Builder mergeFrom( break; case 8: { code_ = input.readEnum(); - + bitField0_ |= 0x00000001; break; } // case 8 case 18: { message_ = input.readStringRequireUtf8(); - + bitField0_ |= 0x00000002; break; } // case 18 + case 26: { + com.google.protobuf.MapEntry + payload__ = input.readMessage( + PayloadDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutablePayload().getMutableMap().put( + payload__.getKey(), payload__.getValue()); + bitField0_ |= 0x00000004; + break; + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -463,11 +611,13 @@ public Builder mergeFrom( } // finally return this; } + private int bitField0_; private int code_ = 0; /** *
    -     * Status code as defined in tensorflow/tsl/protobuf/error_codes.proto.
    +     * Status code as defined in
    +     * tensorflow/compiler/xla/tsl/protobuf/error_codes.proto.
          * 
    * * .tensorflow.error.Code code = 1; @@ -478,7 +628,8 @@ public Builder mergeFrom( } /** *
    -     * Status code as defined in tensorflow/tsl/protobuf/error_codes.proto.
    +     * Status code as defined in
    +     * tensorflow/compiler/xla/tsl/protobuf/error_codes.proto.
          * 
    * * .tensorflow.error.Code code = 1; @@ -486,14 +637,15 @@ public Builder mergeFrom( * @return This builder for chaining. */ public Builder setCodeValue(int value) { - code_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } /** *
    -     * Status code as defined in tensorflow/tsl/protobuf/error_codes.proto.
    +     * Status code as defined in
    +     * tensorflow/compiler/xla/tsl/protobuf/error_codes.proto.
          * 
    * * .tensorflow.error.Code code = 1; @@ -501,13 +653,13 @@ public Builder setCodeValue(int value) { */ @java.lang.Override public org.tensorflow.proto.error.Code getCode() { - @SuppressWarnings("deprecation") - org.tensorflow.proto.error.Code result = org.tensorflow.proto.error.Code.valueOf(code_); + org.tensorflow.proto.error.Code result = org.tensorflow.proto.error.Code.forNumber(code_); return result == null ? org.tensorflow.proto.error.Code.UNRECOGNIZED : result; } /** *
    -     * Status code as defined in tensorflow/tsl/protobuf/error_codes.proto.
    +     * Status code as defined in
    +     * tensorflow/compiler/xla/tsl/protobuf/error_codes.proto.
          * 
    * * .tensorflow.error.Code code = 1; @@ -518,21 +670,22 @@ public Builder setCode(org.tensorflow.proto.error.Code value) { if (value == null) { throw new NullPointerException(); } - + bitField0_ |= 0x00000001; code_ = value.getNumber(); onChanged(); return this; } /** *
    -     * Status code as defined in tensorflow/tsl/protobuf/error_codes.proto.
    +     * Status code as defined in
    +     * tensorflow/compiler/xla/tsl/protobuf/error_codes.proto.
          * 
    * * .tensorflow.error.Code code = 1; * @return This builder for chaining. */ public Builder clearCode() { - + bitField0_ = (bitField0_ & ~0x00000001); code_ = 0; onChanged(); return this; @@ -591,11 +744,9 @@ public java.lang.String getMessage() { */ public Builder setMessage( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } message_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -608,8 +759,8 @@ public Builder setMessage( * @return This builder for chaining. */ public Builder clearMessage() { - message_ = getDefaultInstance().getMessage(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -624,27 +775,168 @@ public Builder clearMessage() { */ public Builder setMessageBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); message_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } + + private com.google.protobuf.MapField< + java.lang.String, com.google.protobuf.ByteString> payload_; + private com.google.protobuf.MapField + internalGetPayload() { + if (payload_ == null) { + return com.google.protobuf.MapField.emptyMapField( + PayloadDefaultEntryHolder.defaultEntry); + } + return payload_; + } + private com.google.protobuf.MapField + internalGetMutablePayload() { + if (payload_ == null) { + payload_ = com.google.protobuf.MapField.newMapField( + PayloadDefaultEntryHolder.defaultEntry); + } + if (!payload_.isMutable()) { + payload_ = payload_.copy(); + } + bitField0_ |= 0x00000004; + onChanged(); + return payload_; + } + public int getPayloadCount() { + return internalGetPayload().getMap().size(); + } + /** + *
    +     * Unique type URL -> value, like absl::Status payloads.
    +     * 
    + * + * map<string, bytes> payload = 3; + */ @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + public boolean containsPayload( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetPayload().getMap().containsKey(key); } - + /** + * Use {@link #getPayloadMap()} instead. + */ @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + @java.lang.Deprecated + public java.util.Map getPayload() { + return getPayloadMap(); + } + /** + *
    +     * Unique type URL -> value, like absl::Status payloads.
    +     * 
    + * + * map<string, bytes> payload = 3; + */ + @java.lang.Override + public java.util.Map getPayloadMap() { + return internalGetPayload().getMap(); + } + /** + *
    +     * Unique type URL -> value, like absl::Status payloads.
    +     * 
    + * + * map<string, bytes> payload = 3; + */ + @java.lang.Override + public /* nullable */ +com.google.protobuf.ByteString getPayloadOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.ByteString defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetPayload().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
    +     * Unique type URL -> value, like absl::Status payloads.
    +     * 
    + * + * map<string, bytes> payload = 3; + */ + @java.lang.Override + public com.google.protobuf.ByteString getPayloadOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetPayload().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearPayload() { + bitField0_ = (bitField0_ & ~0x00000004); + internalGetMutablePayload().getMutableMap() + .clear(); + return this; + } + /** + *
    +     * Unique type URL -> value, like absl::Status payloads.
    +     * 
    + * + * map<string, bytes> payload = 3; + */ + public Builder removePayload( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutablePayload().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutablePayload() { + bitField0_ |= 0x00000004; + return internalGetMutablePayload().getMutableMap(); + } + /** + *
    +     * Unique type URL -> value, like absl::Status payloads.
    +     * 
    + * + * map<string, bytes> payload = 3; + */ + public Builder putPayload( + java.lang.String key, + com.google.protobuf.ByteString value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutablePayload().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000004; + return this; + } + /** + *
    +     * Unique type URL -> value, like absl::Status payloads.
    +     * 
    + * + * map<string, bytes> payload = 3; + */ + public Builder putAllPayload( + java.util.Map values) { + internalGetMutablePayload().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000004; + return this; } - // @@protoc_insertion_point(builder_scope:tensorflow.StatusProto) } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StatusProtoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StatusProtoOrBuilder.java index a8df57e37b3..ca1ada631f8 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StatusProtoOrBuilder.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StatusProtoOrBuilder.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tsl/protobuf/status.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: xla/tsl/protobuf/status.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -9,7 +11,8 @@ public interface StatusProtoOrBuilder extends /** *
    -   * Status code as defined in tensorflow/tsl/protobuf/error_codes.proto.
    +   * Status code as defined in
    +   * tensorflow/compiler/xla/tsl/protobuf/error_codes.proto.
        * 
    * * .tensorflow.error.Code code = 1; @@ -18,7 +21,8 @@ public interface StatusProtoOrBuilder extends int getCodeValue(); /** *
    -   * Status code as defined in tensorflow/tsl/protobuf/error_codes.proto.
    +   * Status code as defined in
    +   * tensorflow/compiler/xla/tsl/protobuf/error_codes.proto.
        * 
    * * .tensorflow.error.Code code = 1; @@ -45,4 +49,58 @@ public interface StatusProtoOrBuilder extends */ com.google.protobuf.ByteString getMessageBytes(); + + /** + *
    +   * Unique type URL -> value, like absl::Status payloads.
    +   * 
    + * + * map<string, bytes> payload = 3; + */ + int getPayloadCount(); + /** + *
    +   * Unique type URL -> value, like absl::Status payloads.
    +   * 
    + * + * map<string, bytes> payload = 3; + */ + boolean containsPayload( + java.lang.String key); + /** + * Use {@link #getPayloadMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getPayload(); + /** + *
    +   * Unique type URL -> value, like absl::Status payloads.
    +   * 
    + * + * map<string, bytes> payload = 3; + */ + java.util.Map + getPayloadMap(); + /** + *
    +   * Unique type URL -> value, like absl::Status payloads.
    +   * 
    + * + * map<string, bytes> payload = 3; + */ + /* nullable */ +com.google.protobuf.ByteString getPayloadOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.ByteString defaultValue); + /** + *
    +   * Unique type URL -> value, like absl::Status payloads.
    +   * 
    + * + * map<string, bytes> payload = 3; + */ + com.google.protobuf.ByteString getPayloadOrThrow( + java.lang.String key); } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StepStats.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StepStats.java index 94214d3d0bb..2625199ba7b 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StepStats.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StepStats.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/framework/step_stats.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -7,37 +9,34 @@ * Protobuf type {@code tensorflow.StepStats} */ public final class StepStats extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.StepStats) StepStatsOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + StepStats.class.getName()); + } // Use StepStats.newBuilder() to construct. - private StepStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private StepStats(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private StepStats() { devStats_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new StepStats(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.StepStatsProtos.internal_static_tensorflow_StepStats_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.StepStatsProtos.internal_static_tensorflow_StepStats_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -45,6 +44,7 @@ protected java.lang.Object newInstance( } public static final int DEV_STATS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List devStats_; /** * repeated .tensorflow.DeviceStepStats dev_stats = 1; @@ -185,39 +185,41 @@ public static org.tensorflow.proto.StepStats parseFrom( } public static org.tensorflow.proto.StepStats parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.StepStats parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.StepStats parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.StepStats parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.StepStats parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.StepStats parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -237,7 +239,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -245,7 +247,7 @@ protected Builder newBuilderForType( * Protobuf type {@code tensorflow.StepStats} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.StepStats) org.tensorflow.proto.StepStatsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -254,7 +256,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.StepStatsProtos.internal_static_tensorflow_StepStats_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -267,13 +269,14 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (devStatsBuilder_ == null) { devStats_ = java.util.Collections.emptyList(); } else { @@ -307,7 +310,13 @@ public org.tensorflow.proto.StepStats build() { @java.lang.Override public org.tensorflow.proto.StepStats buildPartial() { org.tensorflow.proto.StepStats result = new org.tensorflow.proto.StepStats(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(org.tensorflow.proto.StepStats result) { if (devStatsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { devStats_ = java.util.Collections.unmodifiableList(devStats_); @@ -317,42 +326,12 @@ public org.tensorflow.proto.StepStats buildPartial() { } else { result.devStats_ = devStatsBuilder_.build(); } - onBuilt(); - return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.StepStats result) { + int from_bitField0_ = bitField0_; } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.StepStats) { @@ -384,7 +363,7 @@ public Builder mergeFrom(org.tensorflow.proto.StepStats other) { devStats_ = other.devStats_; bitField0_ = (bitField0_ & ~0x00000001); devStatsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getDevStatsFieldBuilder() : null; } else { devStatsBuilder_.addAllMessages(other.devStats_); @@ -456,7 +435,7 @@ private void ensureDevStatsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.DeviceStepStats, org.tensorflow.proto.DeviceStepStats.Builder, org.tensorflow.proto.DeviceStepStatsOrBuilder> devStatsBuilder_; /** @@ -672,11 +651,11 @@ public org.tensorflow.proto.DeviceStepStats.Builder addDevStatsBuilder( getDevStatsBuilderList() { return getDevStatsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.DeviceStepStats, org.tensorflow.proto.DeviceStepStats.Builder, org.tensorflow.proto.DeviceStepStatsOrBuilder> getDevStatsFieldBuilder() { if (devStatsBuilder_ == null) { - devStatsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + devStatsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.DeviceStepStats, org.tensorflow.proto.DeviceStepStats.Builder, org.tensorflow.proto.DeviceStepStatsOrBuilder>( devStats_, ((bitField0_ & 0x00000001) != 0), @@ -686,18 +665,6 @@ public org.tensorflow.proto.DeviceStepStats.Builder addDevStatsBuilder( } return devStatsBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.StepStats) } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StepStatsOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StepStatsOrBuilder.java index 4d523784da8..3accebd26e9 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StepStatsOrBuilder.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StepStatsOrBuilder.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/framework/step_stats.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StepStatsProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StepStatsProtos.java index d829afd3d35..859a9f24f42 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StepStatsProtos.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StepStatsProtos.java @@ -1,10 +1,21 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/framework/step_stats.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; public final class StepStatsProtos { private StepStatsProtos() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + StepStatsProtos.class.getName()); + } public static void registerAllExtensions( com.google.protobuf.ExtensionRegistryLite registry) { } @@ -17,42 +28,42 @@ public static void registerAllExtensions( static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_AllocationRecord_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_AllocationRecord_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_AllocatorMemoryUsed_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_AllocatorMemoryUsed_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_NodeOutput_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_NodeOutput_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_MemoryStats_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_MemoryStats_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_NodeExecStats_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_NodeExecStats_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_DeviceStepStats_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_DeviceStepStats_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_DeviceStepStats_ThreadNamesEntry_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_DeviceStepStats_ThreadNamesEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_StepStats_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_StepStats_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor @@ -116,51 +127,52 @@ public static void registerAllExtensions( internal_static_tensorflow_AllocationRecord_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_tensorflow_AllocationRecord_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_AllocationRecord_descriptor, new java.lang.String[] { "AllocMicros", "AllocBytes", }); internal_static_tensorflow_AllocatorMemoryUsed_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_tensorflow_AllocatorMemoryUsed_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_AllocatorMemoryUsed_descriptor, new java.lang.String[] { "AllocatorName", "TotalBytes", "PeakBytes", "LiveBytes", "AllocationRecords", "AllocatorBytesInUse", }); internal_static_tensorflow_NodeOutput_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_tensorflow_NodeOutput_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_NodeOutput_descriptor, new java.lang.String[] { "Slot", "TensorDescription", }); internal_static_tensorflow_MemoryStats_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_tensorflow_MemoryStats_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_MemoryStats_descriptor, new java.lang.String[] { "TempMemorySize", "PersistentMemorySize", "PersistentTensorAllocIds", "DeviceTempMemorySize", "DevicePersistentMemorySize", "DevicePersistentTensorAllocIds", }); internal_static_tensorflow_NodeExecStats_descriptor = getDescriptor().getMessageTypes().get(4); internal_static_tensorflow_NodeExecStats_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_NodeExecStats_descriptor, new java.lang.String[] { "NodeName", "AllStartMicros", "OpStartRelMicros", "OpEndRelMicros", "AllEndRelMicros", "Memory", "Output", "TimelineLabel", "ScheduledMicros", "ThreadId", "ReferencedTensor", "MemoryStats", "AllStartNanos", "OpStartRelNanos", "OpEndRelNanos", "AllEndRelNanos", "ScheduledNanos", }); internal_static_tensorflow_DeviceStepStats_descriptor = getDescriptor().getMessageTypes().get(5); internal_static_tensorflow_DeviceStepStats_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_DeviceStepStats_descriptor, new java.lang.String[] { "Device", "NodeStats", "ThreadNames", }); internal_static_tensorflow_DeviceStepStats_ThreadNamesEntry_descriptor = internal_static_tensorflow_DeviceStepStats_descriptor.getNestedTypes().get(0); internal_static_tensorflow_DeviceStepStats_ThreadNamesEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_DeviceStepStats_ThreadNamesEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_tensorflow_StepStats_descriptor = getDescriptor().getMessageTypes().get(6); internal_static_tensorflow_StepStats_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_StepStats_descriptor, new java.lang.String[] { "DevStats", }); + descriptor.resolveAllFeaturesImmutable(); org.tensorflow.proto.AllocationDescriptionProtos.getDescriptor(); org.tensorflow.proto.TensorDescriptionProtos.getDescriptor(); } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Struct.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Struct.java index 7e2a874260e..4c87522127d 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Struct.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Struct.java @@ -1,10 +1,21 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/protobuf/struct.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; public final class Struct { private Struct() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + Struct.class.getName()); + } public static void registerAllExtensions( com.google.protobuf.ExtensionRegistryLite registry) { } @@ -446,17 +457,19 @@ public interface StructuredValueOrBuilder extends */ org.tensorflow.proto.TensorProtoOrBuilder getNumpyValueOrBuilder(); - public org.tensorflow.proto.Struct.StructuredValue.KindCase getKindCase(); + org.tensorflow.proto.Struct.StructuredValue.KindCase getKindCase(); } /** *
        * `StructuredValue` represents a dynamically typed value representing various
        * data structures that are inspired by Python data structures typically used in
        * TensorFlow functions as inputs and outputs.
    +   *
        * For example when saving a Layer there may be a `training` argument. If the
        * user passes a boolean True/False, that switches between two concrete
        * TensorFlow functions. In order to switch between them in the same way after
        * loading the SavedModel, we need to represent "True" and "False".
    +   *
        * A more advanced example might be a function which takes a list of
        * dictionaries mapping from strings to Tensors. In order to map from
        * user-specified arguments `[{"a": tf.constant(1.)}, {"q": tf.constant(3.)}]`
    @@ -464,9 +477,11 @@ public interface StructuredValueOrBuilder extends
        * nested structure and the strings, recording that we have a trace for anything
        * matching `[{"a": tf.TensorSpec(None, tf.float32)}, {"q": tf.TensorSpec([],
        * tf.float64)}]` as an example.
    +   *
        * Likewise functions may return nested structures of Tensors, for example
        * returning a dictionary mapping from strings to Tensors. In order for the
        * loaded function to return the same structure we need to serialize it.
    +   *
        * This is an ergonomic aid for working with loaded SavedModels, not a promise
        * to serialize all possible function signatures. For example we do not expect
        * to pickle generic Python objects, and ideally we'd stay language-agnostic.
    @@ -475,36 +490,33 @@ public interface StructuredValueOrBuilder extends
        * Protobuf type {@code tensorflow.StructuredValue}
        */
       public static final class StructuredValue extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.StructuredValue)
           StructuredValueOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        StructuredValue.class.getName());
    +    }
         // Use StructuredValue.newBuilder() to construct.
    -    private StructuredValue(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private StructuredValue(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private StructuredValue() {
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new StructuredValue();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.Struct.internal_static_tensorflow_StructuredValue_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.Struct.internal_static_tensorflow_StructuredValue_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -512,6 +524,7 @@ protected java.lang.Object newInstance(
         }
     
         private int kindCase_ = 0;
    +    @SuppressWarnings("serial")
         private java.lang.Object kind_;
         public enum KindCase
             implements com.google.protobuf.Internal.EnumLite,
    @@ -870,8 +883,7 @@ public int getTensorDtypeValueValue() {
          */
         public org.tensorflow.proto.DataType getTensorDtypeValue() {
           if (kindCase_ == 32) {
    -        @SuppressWarnings("deprecation")
    -        org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(
    +        org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(
                 (java.lang.Integer) kind_);
             return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
           }
    @@ -1291,7 +1303,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
                 12, (long)((java.lang.Long) kind_));
           }
           if (kindCase_ == 13) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 13, kind_);
    +        com.google.protobuf.GeneratedMessage.writeString(output, 13, kind_);
           }
           if (kindCase_ == 14) {
             output.writeBool(
    @@ -1354,7 +1366,7 @@ public int getSerializedSize() {
                   12, (long)((java.lang.Long) kind_));
           }
           if (kindCase_ == 13) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, kind_);
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(13, kind_);
           }
           if (kindCase_ == 14) {
             size += com.google.protobuf.CodedOutputStream
    @@ -1611,39 +1623,41 @@ public static org.tensorflow.proto.Struct.StructuredValue parseFrom(
         }
         public static org.tensorflow.proto.Struct.StructuredValue parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.Struct.StructuredValue parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.Struct.StructuredValue parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.Struct.StructuredValue parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.Struct.StructuredValue parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.Struct.StructuredValue parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -1663,7 +1677,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -1672,10 +1686,12 @@ protected Builder newBuilderForType(
          * `StructuredValue` represents a dynamically typed value representing various
          * data structures that are inspired by Python data structures typically used in
          * TensorFlow functions as inputs and outputs.
    +     *
          * For example when saving a Layer there may be a `training` argument. If the
          * user passes a boolean True/False, that switches between two concrete
          * TensorFlow functions. In order to switch between them in the same way after
          * loading the SavedModel, we need to represent "True" and "False".
    +     *
          * A more advanced example might be a function which takes a list of
          * dictionaries mapping from strings to Tensors. In order to map from
          * user-specified arguments `[{"a": tf.constant(1.)}, {"q": tf.constant(3.)}]`
    @@ -1683,9 +1699,11 @@ protected Builder newBuilderForType(
          * nested structure and the strings, recording that we have a trace for anything
          * matching `[{"a": tf.TensorSpec(None, tf.float32)}, {"q": tf.TensorSpec([],
          * tf.float64)}]` as an example.
    +     *
          * Likewise functions may return nested structures of Tensors, for example
          * returning a dictionary mapping from strings to Tensors. In order for the
          * loaded function to return the same structure we need to serialize it.
    +     *
          * This is an ergonomic aid for working with loaded SavedModels, not a promise
          * to serialize all possible function signatures. For example we do not expect
          * to pickle generic Python objects, and ideally we'd stay language-agnostic.
    @@ -1694,7 +1712,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.StructuredValue}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.StructuredValue)
             org.tensorflow.proto.Struct.StructuredValueOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -1703,7 +1721,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.Struct.internal_static_tensorflow_StructuredValue_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -1716,13 +1734,14 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             if (noneValueBuilder_ != null) {
               noneValueBuilder_.clear();
             }
    @@ -1784,135 +1803,65 @@ public org.tensorflow.proto.Struct.StructuredValue build() {
           @java.lang.Override
           public org.tensorflow.proto.Struct.StructuredValue buildPartial() {
             org.tensorflow.proto.Struct.StructuredValue result = new org.tensorflow.proto.Struct.StructuredValue(this);
    -        if (kindCase_ == 1) {
    -          if (noneValueBuilder_ == null) {
    -            result.kind_ = kind_;
    -          } else {
    -            result.kind_ = noneValueBuilder_.build();
    -          }
    -        }
    -        if (kindCase_ == 11) {
    -          result.kind_ = kind_;
    -        }
    -        if (kindCase_ == 12) {
    -          result.kind_ = kind_;
    -        }
    -        if (kindCase_ == 13) {
    -          result.kind_ = kind_;
    -        }
    -        if (kindCase_ == 14) {
    -          result.kind_ = kind_;
    -        }
    -        if (kindCase_ == 31) {
    -          if (tensorShapeValueBuilder_ == null) {
    -            result.kind_ = kind_;
    -          } else {
    -            result.kind_ = tensorShapeValueBuilder_.build();
    -          }
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        buildPartialOneofs(result);
    +        onBuilt();
    +        return result;
    +      }
    +
    +      private void buildPartial0(org.tensorflow.proto.Struct.StructuredValue result) {
    +        int from_bitField0_ = bitField0_;
    +      }
    +
    +      private void buildPartialOneofs(org.tensorflow.proto.Struct.StructuredValue result) {
    +        result.kindCase_ = kindCase_;
    +        result.kind_ = this.kind_;
    +        if (kindCase_ == 1 &&
    +            noneValueBuilder_ != null) {
    +          result.kind_ = noneValueBuilder_.build();
             }
    -        if (kindCase_ == 32) {
    -          result.kind_ = kind_;
    +        if (kindCase_ == 31 &&
    +            tensorShapeValueBuilder_ != null) {
    +          result.kind_ = tensorShapeValueBuilder_.build();
             }
    -        if (kindCase_ == 33) {
    -          if (tensorSpecValueBuilder_ == null) {
    -            result.kind_ = kind_;
    -          } else {
    -            result.kind_ = tensorSpecValueBuilder_.build();
    -          }
    +        if (kindCase_ == 33 &&
    +            tensorSpecValueBuilder_ != null) {
    +          result.kind_ = tensorSpecValueBuilder_.build();
             }
    -        if (kindCase_ == 34) {
    -          if (typeSpecValueBuilder_ == null) {
    -            result.kind_ = kind_;
    -          } else {
    -            result.kind_ = typeSpecValueBuilder_.build();
    -          }
    +        if (kindCase_ == 34 &&
    +            typeSpecValueBuilder_ != null) {
    +          result.kind_ = typeSpecValueBuilder_.build();
             }
    -        if (kindCase_ == 35) {
    -          if (boundedTensorSpecValueBuilder_ == null) {
    -            result.kind_ = kind_;
    -          } else {
    -            result.kind_ = boundedTensorSpecValueBuilder_.build();
    -          }
    +        if (kindCase_ == 35 &&
    +            boundedTensorSpecValueBuilder_ != null) {
    +          result.kind_ = boundedTensorSpecValueBuilder_.build();
             }
    -        if (kindCase_ == 51) {
    -          if (listValueBuilder_ == null) {
    -            result.kind_ = kind_;
    -          } else {
    -            result.kind_ = listValueBuilder_.build();
    -          }
    +        if (kindCase_ == 51 &&
    +            listValueBuilder_ != null) {
    +          result.kind_ = listValueBuilder_.build();
             }
    -        if (kindCase_ == 52) {
    -          if (tupleValueBuilder_ == null) {
    -            result.kind_ = kind_;
    -          } else {
    -            result.kind_ = tupleValueBuilder_.build();
    -          }
    +        if (kindCase_ == 52 &&
    +            tupleValueBuilder_ != null) {
    +          result.kind_ = tupleValueBuilder_.build();
             }
    -        if (kindCase_ == 53) {
    -          if (dictValueBuilder_ == null) {
    -            result.kind_ = kind_;
    -          } else {
    -            result.kind_ = dictValueBuilder_.build();
    -          }
    +        if (kindCase_ == 53 &&
    +            dictValueBuilder_ != null) {
    +          result.kind_ = dictValueBuilder_.build();
             }
    -        if (kindCase_ == 54) {
    -          if (namedTupleValueBuilder_ == null) {
    -            result.kind_ = kind_;
    -          } else {
    -            result.kind_ = namedTupleValueBuilder_.build();
    -          }
    +        if (kindCase_ == 54 &&
    +            namedTupleValueBuilder_ != null) {
    +          result.kind_ = namedTupleValueBuilder_.build();
             }
    -        if (kindCase_ == 55) {
    -          if (tensorValueBuilder_ == null) {
    -            result.kind_ = kind_;
    -          } else {
    -            result.kind_ = tensorValueBuilder_.build();
    -          }
    +        if (kindCase_ == 55 &&
    +            tensorValueBuilder_ != null) {
    +          result.kind_ = tensorValueBuilder_.build();
             }
    -        if (kindCase_ == 56) {
    -          if (numpyValueBuilder_ == null) {
    -            result.kind_ = kind_;
    -          } else {
    -            result.kind_ = numpyValueBuilder_.build();
    -          }
    +        if (kindCase_ == 56 &&
    +            numpyValueBuilder_ != null) {
    +          result.kind_ = numpyValueBuilder_.build();
             }
    -        result.kindCase_ = kindCase_;
    -        onBuilt();
    -        return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    -      }
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.Struct.StructuredValue) {
    @@ -2156,8 +2105,9 @@ public Builder clearKind() {
             return this;
           }
     
    +      private int bitField0_;
     
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Struct.NoneValue, org.tensorflow.proto.Struct.NoneValue.Builder, org.tensorflow.proto.Struct.NoneValueOrBuilder> noneValueBuilder_;
           /**
            * 
    @@ -2316,14 +2266,14 @@ public org.tensorflow.proto.Struct.NoneValueOrBuilder getNoneValueOrBuilder() {
            *
            * .tensorflow.NoneValue none_value = 1;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Struct.NoneValue, org.tensorflow.proto.Struct.NoneValue.Builder, org.tensorflow.proto.Struct.NoneValueOrBuilder> 
               getNoneValueFieldBuilder() {
             if (noneValueBuilder_ == null) {
               if (!(kindCase_ == 1)) {
                 kind_ = org.tensorflow.proto.Struct.NoneValue.getDefaultInstance();
               }
    -          noneValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          noneValueBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.Struct.NoneValue, org.tensorflow.proto.Struct.NoneValue.Builder, org.tensorflow.proto.Struct.NoneValueOrBuilder>(
                       (org.tensorflow.proto.Struct.NoneValue) kind_,
                       getParentForChildren(),
    @@ -2331,7 +2281,7 @@ public org.tensorflow.proto.Struct.NoneValueOrBuilder getNoneValueOrBuilder() {
               kind_ = null;
             }
             kindCase_ = 1;
    -        onChanged();;
    +        onChanged();
             return noneValueBuilder_;
           }
     
    @@ -2370,6 +2320,7 @@ public double getFloat64Value() {
            * @return This builder for chaining.
            */
           public Builder setFloat64Value(double value) {
    +
             kindCase_ = 11;
             kind_ = value;
             onChanged();
    @@ -2430,6 +2381,7 @@ public long getInt64Value() {
            * @return This builder for chaining.
            */
           public Builder setInt64Value(long value) {
    +
             kindCase_ = 12;
             kind_ = value;
             onChanged();
    @@ -2549,10 +2501,8 @@ public java.lang.String getStringValue() {
            */
           public Builder setStringValue(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  kindCase_ = 13;
    +        if (value == null) { throw new NullPointerException(); }
    +        kindCase_ = 13;
             kind_ = value;
             onChanged();
             return this;
    @@ -2594,10 +2544,8 @@ public Builder clearStringValue() {
            */
           public Builder setStringValueBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             kindCase_ = 13;
             kind_ = value;
             onChanged();
    @@ -2639,6 +2587,7 @@ public boolean getBoolValue() {
            * @return This builder for chaining.
            */
           public Builder setBoolValue(boolean value) {
    +
             kindCase_ = 14;
             kind_ = value;
             onChanged();
    @@ -2661,7 +2610,7 @@ public Builder clearBoolValue() {
             return this;
           }
     
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> tensorShapeValueBuilder_;
           /**
            * 
    @@ -2820,14 +2769,14 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getTensorShapeValueOrBuild
            *
            * .tensorflow.TensorShapeProto tensor_shape_value = 31;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> 
               getTensorShapeValueFieldBuilder() {
             if (tensorShapeValueBuilder_ == null) {
               if (!(kindCase_ == 31)) {
                 kind_ = org.tensorflow.proto.TensorShapeProto.getDefaultInstance();
               }
    -          tensorShapeValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          tensorShapeValueBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder>(
                       (org.tensorflow.proto.TensorShapeProto) kind_,
                       getParentForChildren(),
    @@ -2835,7 +2784,7 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getTensorShapeValueOrBuild
               kind_ = null;
             }
             kindCase_ = 31;
    -        onChanged();;
    +        onChanged();
             return tensorShapeValueBuilder_;
           }
     
    @@ -2892,8 +2841,7 @@ public Builder setTensorDtypeValueValue(int value) {
           @java.lang.Override
           public org.tensorflow.proto.DataType getTensorDtypeValue() {
             if (kindCase_ == 32) {
    -          @SuppressWarnings("deprecation")
    -          org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(
    +          org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(
                   (java.lang.Integer) kind_);
               return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
             }
    @@ -2934,7 +2882,7 @@ public Builder clearTensorDtypeValue() {
             return this;
           }
     
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Struct.TensorSpecProto, org.tensorflow.proto.Struct.TensorSpecProto.Builder, org.tensorflow.proto.Struct.TensorSpecProtoOrBuilder> tensorSpecValueBuilder_;
           /**
            * 
    @@ -3093,14 +3041,14 @@ public org.tensorflow.proto.Struct.TensorSpecProtoOrBuilder getTensorSpecValueOr
            *
            * .tensorflow.TensorSpecProto tensor_spec_value = 33;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Struct.TensorSpecProto, org.tensorflow.proto.Struct.TensorSpecProto.Builder, org.tensorflow.proto.Struct.TensorSpecProtoOrBuilder> 
               getTensorSpecValueFieldBuilder() {
             if (tensorSpecValueBuilder_ == null) {
               if (!(kindCase_ == 33)) {
                 kind_ = org.tensorflow.proto.Struct.TensorSpecProto.getDefaultInstance();
               }
    -          tensorSpecValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          tensorSpecValueBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.Struct.TensorSpecProto, org.tensorflow.proto.Struct.TensorSpecProto.Builder, org.tensorflow.proto.Struct.TensorSpecProtoOrBuilder>(
                       (org.tensorflow.proto.Struct.TensorSpecProto) kind_,
                       getParentForChildren(),
    @@ -3108,11 +3056,11 @@ public org.tensorflow.proto.Struct.TensorSpecProtoOrBuilder getTensorSpecValueOr
               kind_ = null;
             }
             kindCase_ = 33;
    -        onChanged();;
    +        onChanged();
             return tensorSpecValueBuilder_;
           }
     
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Struct.TypeSpecProto, org.tensorflow.proto.Struct.TypeSpecProto.Builder, org.tensorflow.proto.Struct.TypeSpecProtoOrBuilder> typeSpecValueBuilder_;
           /**
            * 
    @@ -3271,14 +3219,14 @@ public org.tensorflow.proto.Struct.TypeSpecProtoOrBuilder getTypeSpecValueOrBuil
            *
            * .tensorflow.TypeSpecProto type_spec_value = 34;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Struct.TypeSpecProto, org.tensorflow.proto.Struct.TypeSpecProto.Builder, org.tensorflow.proto.Struct.TypeSpecProtoOrBuilder> 
               getTypeSpecValueFieldBuilder() {
             if (typeSpecValueBuilder_ == null) {
               if (!(kindCase_ == 34)) {
                 kind_ = org.tensorflow.proto.Struct.TypeSpecProto.getDefaultInstance();
               }
    -          typeSpecValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          typeSpecValueBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.Struct.TypeSpecProto, org.tensorflow.proto.Struct.TypeSpecProto.Builder, org.tensorflow.proto.Struct.TypeSpecProtoOrBuilder>(
                       (org.tensorflow.proto.Struct.TypeSpecProto) kind_,
                       getParentForChildren(),
    @@ -3286,11 +3234,11 @@ public org.tensorflow.proto.Struct.TypeSpecProtoOrBuilder getTypeSpecValueOrBuil
               kind_ = null;
             }
             kindCase_ = 34;
    -        onChanged();;
    +        onChanged();
             return typeSpecValueBuilder_;
           }
     
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Struct.BoundedTensorSpecProto, org.tensorflow.proto.Struct.BoundedTensorSpecProto.Builder, org.tensorflow.proto.Struct.BoundedTensorSpecProtoOrBuilder> boundedTensorSpecValueBuilder_;
           /**
            * 
    @@ -3449,14 +3397,14 @@ public org.tensorflow.proto.Struct.BoundedTensorSpecProtoOrBuilder getBoundedTen
            *
            * .tensorflow.BoundedTensorSpecProto bounded_tensor_spec_value = 35;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Struct.BoundedTensorSpecProto, org.tensorflow.proto.Struct.BoundedTensorSpecProto.Builder, org.tensorflow.proto.Struct.BoundedTensorSpecProtoOrBuilder> 
               getBoundedTensorSpecValueFieldBuilder() {
             if (boundedTensorSpecValueBuilder_ == null) {
               if (!(kindCase_ == 35)) {
                 kind_ = org.tensorflow.proto.Struct.BoundedTensorSpecProto.getDefaultInstance();
               }
    -          boundedTensorSpecValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          boundedTensorSpecValueBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.Struct.BoundedTensorSpecProto, org.tensorflow.proto.Struct.BoundedTensorSpecProto.Builder, org.tensorflow.proto.Struct.BoundedTensorSpecProtoOrBuilder>(
                       (org.tensorflow.proto.Struct.BoundedTensorSpecProto) kind_,
                       getParentForChildren(),
    @@ -3464,11 +3412,11 @@ public org.tensorflow.proto.Struct.BoundedTensorSpecProtoOrBuilder getBoundedTen
               kind_ = null;
             }
             kindCase_ = 35;
    -        onChanged();;
    +        onChanged();
             return boundedTensorSpecValueBuilder_;
           }
     
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Struct.ListValue, org.tensorflow.proto.Struct.ListValue.Builder, org.tensorflow.proto.Struct.ListValueOrBuilder> listValueBuilder_;
           /**
            * 
    @@ -3627,14 +3575,14 @@ public org.tensorflow.proto.Struct.ListValueOrBuilder getListValueOrBuilder() {
            *
            * .tensorflow.ListValue list_value = 51;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Struct.ListValue, org.tensorflow.proto.Struct.ListValue.Builder, org.tensorflow.proto.Struct.ListValueOrBuilder> 
               getListValueFieldBuilder() {
             if (listValueBuilder_ == null) {
               if (!(kindCase_ == 51)) {
                 kind_ = org.tensorflow.proto.Struct.ListValue.getDefaultInstance();
               }
    -          listValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          listValueBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.Struct.ListValue, org.tensorflow.proto.Struct.ListValue.Builder, org.tensorflow.proto.Struct.ListValueOrBuilder>(
                       (org.tensorflow.proto.Struct.ListValue) kind_,
                       getParentForChildren(),
    @@ -3642,11 +3590,11 @@ public org.tensorflow.proto.Struct.ListValueOrBuilder getListValueOrBuilder() {
               kind_ = null;
             }
             kindCase_ = 51;
    -        onChanged();;
    +        onChanged();
             return listValueBuilder_;
           }
     
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Struct.TupleValue, org.tensorflow.proto.Struct.TupleValue.Builder, org.tensorflow.proto.Struct.TupleValueOrBuilder> tupleValueBuilder_;
           /**
            * 
    @@ -3805,14 +3753,14 @@ public org.tensorflow.proto.Struct.TupleValueOrBuilder getTupleValueOrBuilder()
            *
            * .tensorflow.TupleValue tuple_value = 52;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Struct.TupleValue, org.tensorflow.proto.Struct.TupleValue.Builder, org.tensorflow.proto.Struct.TupleValueOrBuilder> 
               getTupleValueFieldBuilder() {
             if (tupleValueBuilder_ == null) {
               if (!(kindCase_ == 52)) {
                 kind_ = org.tensorflow.proto.Struct.TupleValue.getDefaultInstance();
               }
    -          tupleValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          tupleValueBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.Struct.TupleValue, org.tensorflow.proto.Struct.TupleValue.Builder, org.tensorflow.proto.Struct.TupleValueOrBuilder>(
                       (org.tensorflow.proto.Struct.TupleValue) kind_,
                       getParentForChildren(),
    @@ -3820,11 +3768,11 @@ public org.tensorflow.proto.Struct.TupleValueOrBuilder getTupleValueOrBuilder()
               kind_ = null;
             }
             kindCase_ = 52;
    -        onChanged();;
    +        onChanged();
             return tupleValueBuilder_;
           }
     
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Struct.DictValue, org.tensorflow.proto.Struct.DictValue.Builder, org.tensorflow.proto.Struct.DictValueOrBuilder> dictValueBuilder_;
           /**
            * 
    @@ -3983,14 +3931,14 @@ public org.tensorflow.proto.Struct.DictValueOrBuilder getDictValueOrBuilder() {
            *
            * .tensorflow.DictValue dict_value = 53;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Struct.DictValue, org.tensorflow.proto.Struct.DictValue.Builder, org.tensorflow.proto.Struct.DictValueOrBuilder> 
               getDictValueFieldBuilder() {
             if (dictValueBuilder_ == null) {
               if (!(kindCase_ == 53)) {
                 kind_ = org.tensorflow.proto.Struct.DictValue.getDefaultInstance();
               }
    -          dictValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          dictValueBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.Struct.DictValue, org.tensorflow.proto.Struct.DictValue.Builder, org.tensorflow.proto.Struct.DictValueOrBuilder>(
                       (org.tensorflow.proto.Struct.DictValue) kind_,
                       getParentForChildren(),
    @@ -3998,11 +3946,11 @@ public org.tensorflow.proto.Struct.DictValueOrBuilder getDictValueOrBuilder() {
               kind_ = null;
             }
             kindCase_ = 53;
    -        onChanged();;
    +        onChanged();
             return dictValueBuilder_;
           }
     
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Struct.NamedTupleValue, org.tensorflow.proto.Struct.NamedTupleValue.Builder, org.tensorflow.proto.Struct.NamedTupleValueOrBuilder> namedTupleValueBuilder_;
           /**
            * 
    @@ -4161,14 +4109,14 @@ public org.tensorflow.proto.Struct.NamedTupleValueOrBuilder getNamedTupleValueOr
            *
            * .tensorflow.NamedTupleValue named_tuple_value = 54;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Struct.NamedTupleValue, org.tensorflow.proto.Struct.NamedTupleValue.Builder, org.tensorflow.proto.Struct.NamedTupleValueOrBuilder> 
               getNamedTupleValueFieldBuilder() {
             if (namedTupleValueBuilder_ == null) {
               if (!(kindCase_ == 54)) {
                 kind_ = org.tensorflow.proto.Struct.NamedTupleValue.getDefaultInstance();
               }
    -          namedTupleValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          namedTupleValueBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.Struct.NamedTupleValue, org.tensorflow.proto.Struct.NamedTupleValue.Builder, org.tensorflow.proto.Struct.NamedTupleValueOrBuilder>(
                       (org.tensorflow.proto.Struct.NamedTupleValue) kind_,
                       getParentForChildren(),
    @@ -4176,11 +4124,11 @@ public org.tensorflow.proto.Struct.NamedTupleValueOrBuilder getNamedTupleValueOr
               kind_ = null;
             }
             kindCase_ = 54;
    -        onChanged();;
    +        onChanged();
             return namedTupleValueBuilder_;
           }
     
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> tensorValueBuilder_;
           /**
            * 
    @@ -4339,14 +4287,14 @@ public org.tensorflow.proto.TensorProtoOrBuilder getTensorValueOrBuilder() {
            *
            * .tensorflow.TensorProto tensor_value = 55;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> 
               getTensorValueFieldBuilder() {
             if (tensorValueBuilder_ == null) {
               if (!(kindCase_ == 55)) {
                 kind_ = org.tensorflow.proto.TensorProto.getDefaultInstance();
               }
    -          tensorValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          tensorValueBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder>(
                       (org.tensorflow.proto.TensorProto) kind_,
                       getParentForChildren(),
    @@ -4354,11 +4302,11 @@ public org.tensorflow.proto.TensorProtoOrBuilder getTensorValueOrBuilder() {
               kind_ = null;
             }
             kindCase_ = 55;
    -        onChanged();;
    +        onChanged();
             return tensorValueBuilder_;
           }
     
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> numpyValueBuilder_;
           /**
            * 
    @@ -4517,14 +4465,14 @@ public org.tensorflow.proto.TensorProtoOrBuilder getNumpyValueOrBuilder() {
            *
            * .tensorflow.TensorProto numpy_value = 56;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> 
               getNumpyValueFieldBuilder() {
             if (numpyValueBuilder_ == null) {
               if (!(kindCase_ == 56)) {
                 kind_ = org.tensorflow.proto.TensorProto.getDefaultInstance();
               }
    -          numpyValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          numpyValueBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder>(
                       (org.tensorflow.proto.TensorProto) kind_,
                       getParentForChildren(),
    @@ -4532,21 +4480,9 @@ public org.tensorflow.proto.TensorProtoOrBuilder getNumpyValueOrBuilder() {
               kind_ = null;
             }
             kindCase_ = 56;
    -        onChanged();;
    +        onChanged();
             return numpyValueBuilder_;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.StructuredValue)
         }
    @@ -4611,36 +4547,33 @@ public interface NoneValueOrBuilder extends
        * Protobuf type {@code tensorflow.NoneValue}
        */
       public static final class NoneValue extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.NoneValue)
           NoneValueOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        NoneValue.class.getName());
    +    }
         // Use NoneValue.newBuilder() to construct.
    -    private NoneValue(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private NoneValue(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private NoneValue() {
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new NoneValue();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.Struct.internal_static_tensorflow_NoneValue_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.Struct.internal_static_tensorflow_NoneValue_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -4735,39 +4668,41 @@ public static org.tensorflow.proto.Struct.NoneValue parseFrom(
         }
         public static org.tensorflow.proto.Struct.NoneValue parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.Struct.NoneValue parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.Struct.NoneValue parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.Struct.NoneValue parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.Struct.NoneValue parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.Struct.NoneValue parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -4787,7 +4722,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -4799,7 +4734,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.NoneValue}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.NoneValue)
             org.tensorflow.proto.Struct.NoneValueOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -4808,7 +4743,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.Struct.internal_static_tensorflow_NoneValue_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -4821,7 +4756,7 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
    @@ -4858,38 +4793,6 @@ public org.tensorflow.proto.Struct.NoneValue buildPartial() {
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    -      }
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.Struct.NoneValue) {
    @@ -4943,18 +4846,6 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.NoneValue)
         }
    @@ -5043,37 +4934,34 @@ org.tensorflow.proto.Struct.StructuredValueOrBuilder getValuesOrBuilder(
        * Protobuf type {@code tensorflow.ListValue}
        */
       public static final class ListValue extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.ListValue)
           ListValueOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        ListValue.class.getName());
    +    }
         // Use ListValue.newBuilder() to construct.
    -    private ListValue(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private ListValue(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private ListValue() {
           values_ = java.util.Collections.emptyList();
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new ListValue();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.Struct.internal_static_tensorflow_ListValue_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.Struct.internal_static_tensorflow_ListValue_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -5081,6 +4969,7 @@ protected java.lang.Object newInstance(
         }
     
         public static final int VALUES_FIELD_NUMBER = 1;
    +    @SuppressWarnings("serial")
         private java.util.List values_;
         /**
          * repeated .tensorflow.StructuredValue values = 1;
    @@ -5221,39 +5110,41 @@ public static org.tensorflow.proto.Struct.ListValue parseFrom(
         }
         public static org.tensorflow.proto.Struct.ListValue parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.Struct.ListValue parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.Struct.ListValue parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.Struct.ListValue parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.Struct.ListValue parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.Struct.ListValue parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -5273,7 +5164,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -5285,7 +5176,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.ListValue}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.ListValue)
             org.tensorflow.proto.Struct.ListValueOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -5294,7 +5185,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.Struct.internal_static_tensorflow_ListValue_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -5307,13 +5198,14 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             if (valuesBuilder_ == null) {
               values_ = java.util.Collections.emptyList();
             } else {
    @@ -5347,7 +5239,13 @@ public org.tensorflow.proto.Struct.ListValue build() {
           @java.lang.Override
           public org.tensorflow.proto.Struct.ListValue buildPartial() {
             org.tensorflow.proto.Struct.ListValue result = new org.tensorflow.proto.Struct.ListValue(this);
    -        int from_bitField0_ = bitField0_;
    +        buildPartialRepeatedFields(result);
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        onBuilt();
    +        return result;
    +      }
    +
    +      private void buildPartialRepeatedFields(org.tensorflow.proto.Struct.ListValue result) {
             if (valuesBuilder_ == null) {
               if (((bitField0_ & 0x00000001) != 0)) {
                 values_ = java.util.Collections.unmodifiableList(values_);
    @@ -5357,42 +5255,12 @@ public org.tensorflow.proto.Struct.ListValue buildPartial() {
             } else {
               result.values_ = valuesBuilder_.build();
             }
    -        onBuilt();
    -        return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.Struct.ListValue result) {
    +        int from_bitField0_ = bitField0_;
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.Struct.ListValue) {
    @@ -5424,7 +5292,7 @@ public Builder mergeFrom(org.tensorflow.proto.Struct.ListValue other) {
                   values_ = other.values_;
                   bitField0_ = (bitField0_ & ~0x00000001);
                   valuesBuilder_ = 
    -                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                        getValuesFieldBuilder() : null;
                 } else {
                   valuesBuilder_.addAllMessages(other.values_);
    @@ -5496,7 +5364,7 @@ private void ensureValuesIsMutable() {
              }
           }
     
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder> valuesBuilder_;
     
           /**
    @@ -5712,11 +5580,11 @@ public org.tensorflow.proto.Struct.StructuredValue.Builder addValuesBuilder(
                getValuesBuilderList() {
             return getValuesFieldBuilder().getBuilderList();
           }
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder> 
               getValuesFieldBuilder() {
             if (valuesBuilder_ == null) {
    -          valuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +          valuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                   org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder>(
                       values_,
                       ((bitField0_ & 0x00000001) != 0),
    @@ -5726,18 +5594,6 @@ public org.tensorflow.proto.Struct.StructuredValue.Builder addValuesBuilder(
             }
             return valuesBuilder_;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.ListValue)
         }
    @@ -5826,37 +5682,34 @@ org.tensorflow.proto.Struct.StructuredValueOrBuilder getValuesOrBuilder(
        * Protobuf type {@code tensorflow.TupleValue}
        */
       public static final class TupleValue extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.TupleValue)
           TupleValueOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        TupleValue.class.getName());
    +    }
         // Use TupleValue.newBuilder() to construct.
    -    private TupleValue(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private TupleValue(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private TupleValue() {
           values_ = java.util.Collections.emptyList();
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new TupleValue();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.Struct.internal_static_tensorflow_TupleValue_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.Struct.internal_static_tensorflow_TupleValue_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -5864,6 +5717,7 @@ protected java.lang.Object newInstance(
         }
     
         public static final int VALUES_FIELD_NUMBER = 1;
    +    @SuppressWarnings("serial")
         private java.util.List values_;
         /**
          * repeated .tensorflow.StructuredValue values = 1;
    @@ -6004,39 +5858,41 @@ public static org.tensorflow.proto.Struct.TupleValue parseFrom(
         }
         public static org.tensorflow.proto.Struct.TupleValue parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.Struct.TupleValue parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.Struct.TupleValue parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.Struct.TupleValue parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.Struct.TupleValue parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.Struct.TupleValue parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -6056,7 +5912,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -6068,7 +5924,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.TupleValue}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.TupleValue)
             org.tensorflow.proto.Struct.TupleValueOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -6077,7 +5933,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.Struct.internal_static_tensorflow_TupleValue_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -6090,13 +5946,14 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             if (valuesBuilder_ == null) {
               values_ = java.util.Collections.emptyList();
             } else {
    @@ -6130,7 +5987,13 @@ public org.tensorflow.proto.Struct.TupleValue build() {
           @java.lang.Override
           public org.tensorflow.proto.Struct.TupleValue buildPartial() {
             org.tensorflow.proto.Struct.TupleValue result = new org.tensorflow.proto.Struct.TupleValue(this);
    -        int from_bitField0_ = bitField0_;
    +        buildPartialRepeatedFields(result);
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        onBuilt();
    +        return result;
    +      }
    +
    +      private void buildPartialRepeatedFields(org.tensorflow.proto.Struct.TupleValue result) {
             if (valuesBuilder_ == null) {
               if (((bitField0_ & 0x00000001) != 0)) {
                 values_ = java.util.Collections.unmodifiableList(values_);
    @@ -6140,42 +6003,12 @@ public org.tensorflow.proto.Struct.TupleValue buildPartial() {
             } else {
               result.values_ = valuesBuilder_.build();
             }
    -        onBuilt();
    -        return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.Struct.TupleValue result) {
    +        int from_bitField0_ = bitField0_;
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.Struct.TupleValue) {
    @@ -6207,7 +6040,7 @@ public Builder mergeFrom(org.tensorflow.proto.Struct.TupleValue other) {
                   values_ = other.values_;
                   bitField0_ = (bitField0_ & ~0x00000001);
                   valuesBuilder_ = 
    -                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                        getValuesFieldBuilder() : null;
                 } else {
                   valuesBuilder_.addAllMessages(other.values_);
    @@ -6279,7 +6112,7 @@ private void ensureValuesIsMutable() {
              }
           }
     
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder> valuesBuilder_;
     
           /**
    @@ -6495,11 +6328,11 @@ public org.tensorflow.proto.Struct.StructuredValue.Builder addValuesBuilder(
                getValuesBuilderList() {
             return getValuesFieldBuilder().getBuilderList();
           }
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder> 
               getValuesFieldBuilder() {
             if (valuesBuilder_ == null) {
    -          valuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +          valuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                   org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder>(
                       values_,
                       ((bitField0_ & 0x00000001) != 0),
    @@ -6509,18 +6342,6 @@ public org.tensorflow.proto.Struct.StructuredValue.Builder addValuesBuilder(
             }
             return valuesBuilder_;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.TupleValue)
         }
    @@ -6600,7 +6421,6 @@ boolean containsFields(
         /**
          * map<string, .tensorflow.StructuredValue> fields = 1;
          */
    -
         /* nullable */
     org.tensorflow.proto.Struct.StructuredValue getFieldsOrDefault(
             java.lang.String key,
    @@ -6609,7 +6429,6 @@ org.tensorflow.proto.Struct.StructuredValue getFieldsOrDefault(
         /**
          * map<string, .tensorflow.StructuredValue> fields = 1;
          */
    -
         org.tensorflow.proto.Struct.StructuredValue getFieldsOrThrow(
             java.lang.String key);
       }
    @@ -6622,29 +6441,26 @@ org.tensorflow.proto.Struct.StructuredValue getFieldsOrThrow(
        * Protobuf type {@code tensorflow.DictValue}
        */
       public static final class DictValue extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.DictValue)
           DictValueOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        DictValue.class.getName());
    +    }
         // Use DictValue.newBuilder() to construct.
    -    private DictValue(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private DictValue(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private DictValue() {
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new DictValue();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.Struct.internal_static_tensorflow_DictValue_descriptor;
    @@ -6652,7 +6468,7 @@ protected java.lang.Object newInstance(
     
         @SuppressWarnings({"rawtypes"})
         @java.lang.Override
    -    protected com.google.protobuf.MapField internalGetMapField(
    +    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
             int number) {
           switch (number) {
             case 1:
    @@ -6663,7 +6479,7 @@ protected com.google.protobuf.MapField internalGetMapField(
           }
         }
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.Struct.internal_static_tensorflow_DictValue_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -6682,6 +6498,7 @@ private static final class FieldsDefaultEntryHolder {
                       com.google.protobuf.WireFormat.FieldType.MESSAGE,
                       org.tensorflow.proto.Struct.StructuredValue.getDefaultInstance());
         }
    +    @SuppressWarnings("serial")
         private com.google.protobuf.MapField<
             java.lang.String, org.tensorflow.proto.Struct.StructuredValue> fields_;
         private com.google.protobuf.MapField
    @@ -6692,14 +6509,12 @@ private static final class FieldsDefaultEntryHolder {
           }
           return fields_;
         }
    -
         public int getFieldsCount() {
           return internalGetFields().getMap().size();
         }
         /**
          * map<string, .tensorflow.StructuredValue> fields = 1;
          */
    -
         @java.lang.Override
         public boolean containsFields(
             java.lang.String key) {
    @@ -6718,7 +6533,6 @@ public java.util.Mapmap<string, .tensorflow.StructuredValue> fields = 1;
          */
         @java.lang.Override
    -
         public java.util.Map getFieldsMap() {
           return internalGetFields().getMap();
         }
    @@ -6726,10 +6540,11 @@ public java.util.Mapmap<string, .tensorflow.StructuredValue> fields = 1;
          */
         @java.lang.Override
    -
    -    public org.tensorflow.proto.Struct.StructuredValue getFieldsOrDefault(
    +    public /* nullable */
    +org.tensorflow.proto.Struct.StructuredValue getFieldsOrDefault(
             java.lang.String key,
    -        org.tensorflow.proto.Struct.StructuredValue defaultValue) {
    +        /* nullable */
    +org.tensorflow.proto.Struct.StructuredValue defaultValue) {
           if (key == null) { throw new NullPointerException("map key"); }
           java.util.Map map =
               internalGetFields().getMap();
    @@ -6739,7 +6554,6 @@ public org.tensorflow.proto.Struct.StructuredValue getFieldsOrDefault(
          * map<string, .tensorflow.StructuredValue> fields = 1;
          */
         @java.lang.Override
    -
         public org.tensorflow.proto.Struct.StructuredValue getFieldsOrThrow(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    @@ -6765,7 +6579,7 @@ public final boolean isInitialized() {
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output)
                             throws java.io.IOException {
    -      com.google.protobuf.GeneratedMessageV3
    +      com.google.protobuf.GeneratedMessage
             .serializeStringMapTo(
               output,
               internalGetFields(),
    @@ -6861,39 +6675,41 @@ public static org.tensorflow.proto.Struct.DictValue parseFrom(
         }
         public static org.tensorflow.proto.Struct.DictValue parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.Struct.DictValue parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.Struct.DictValue parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.Struct.DictValue parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.Struct.DictValue parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.Struct.DictValue parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -6913,7 +6729,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -6926,7 +6742,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.DictValue}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.DictValue)
             org.tensorflow.proto.Struct.DictValueOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -6935,7 +6751,7 @@ public static final class Builder extends
           }
     
           @SuppressWarnings({"rawtypes"})
    -      protected com.google.protobuf.MapField internalGetMapField(
    +      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
               int number) {
             switch (number) {
               case 1:
    @@ -6946,7 +6762,7 @@ protected com.google.protobuf.MapField internalGetMapField(
             }
           }
           @SuppressWarnings({"rawtypes"})
    -      protected com.google.protobuf.MapField internalGetMutableMapField(
    +      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
               int number) {
             switch (number) {
               case 1:
    @@ -6957,7 +6773,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField(
             }
           }
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.Struct.internal_static_tensorflow_DictValue_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -6970,13 +6786,14 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             internalGetMutableFields().clear();
             return this;
           }
    @@ -7004,45 +6821,18 @@ public org.tensorflow.proto.Struct.DictValue build() {
           @java.lang.Override
           public org.tensorflow.proto.Struct.DictValue buildPartial() {
             org.tensorflow.proto.Struct.DictValue result = new org.tensorflow.proto.Struct.DictValue(this);
    -        int from_bitField0_ = bitField0_;
    -        result.fields_ = internalGetFields();
    -        result.fields_.makeImmutable();
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.Struct.DictValue result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.fields_ = internalGetFields().build(FieldsDefaultEntryHolder.defaultEntry);
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.Struct.DictValue) {
    @@ -7057,6 +6847,7 @@ public Builder mergeFrom(org.tensorflow.proto.Struct.DictValue other) {
             if (other == org.tensorflow.proto.Struct.DictValue.getDefaultInstance()) return this;
             internalGetMutableFields().mergeFrom(
                 other.internalGetFields());
    +        bitField0_ |= 0x00000001;
             this.mergeUnknownFields(other.getUnknownFields());
             onChanged();
             return this;
    @@ -7087,8 +6878,9 @@ public Builder mergeFrom(
                     com.google.protobuf.MapEntry
                     fields__ = input.readMessage(
                         FieldsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
    -                internalGetMutableFields().getMutableMap().put(
    +                internalGetMutableFields().ensureBuilderMap().put(
                         fields__.getKey(), fields__.getValue());
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 10
                   default: {
    @@ -7108,41 +6900,49 @@ public Builder mergeFrom(
           }
           private int bitField0_;
     
    -      private com.google.protobuf.MapField<
    -          java.lang.String, org.tensorflow.proto.Struct.StructuredValue> fields_;
    -      private com.google.protobuf.MapField
    -      internalGetFields() {
    +      private static final class FieldsConverter implements com.google.protobuf.MapFieldBuilder.Converter {
    +        @java.lang.Override
    +        public org.tensorflow.proto.Struct.StructuredValue build(org.tensorflow.proto.Struct.StructuredValueOrBuilder val) {
    +          if (val instanceof org.tensorflow.proto.Struct.StructuredValue) { return (org.tensorflow.proto.Struct.StructuredValue) val; }
    +          return ((org.tensorflow.proto.Struct.StructuredValue.Builder) val).build();
    +        }
    +
    +        @java.lang.Override
    +        public com.google.protobuf.MapEntry defaultEntry() {
    +          return FieldsDefaultEntryHolder.defaultEntry;
    +        }
    +      };
    +      private static final FieldsConverter fieldsConverter = new FieldsConverter();
    +
    +      private com.google.protobuf.MapFieldBuilder<
    +          java.lang.String, org.tensorflow.proto.Struct.StructuredValueOrBuilder, org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder> fields_;
    +      private com.google.protobuf.MapFieldBuilder
    +          internalGetFields() {
             if (fields_ == null) {
    -          return com.google.protobuf.MapField.emptyMapField(
    -              FieldsDefaultEntryHolder.defaultEntry);
    +          return new com.google.protobuf.MapFieldBuilder<>(fieldsConverter);
             }
             return fields_;
           }
    -      private com.google.protobuf.MapField
    -      internalGetMutableFields() {
    -        onChanged();;
    +      private com.google.protobuf.MapFieldBuilder
    +          internalGetMutableFields() {
             if (fields_ == null) {
    -          fields_ = com.google.protobuf.MapField.newMapField(
    -              FieldsDefaultEntryHolder.defaultEntry);
    -        }
    -        if (!fields_.isMutable()) {
    -          fields_ = fields_.copy();
    +          fields_ = new com.google.protobuf.MapFieldBuilder<>(fieldsConverter);
             }
    +        bitField0_ |= 0x00000001;
    +        onChanged();
             return fields_;
           }
    -
           public int getFieldsCount() {
    -        return internalGetFields().getMap().size();
    +        return internalGetFields().ensureBuilderMap().size();
           }
           /**
            * map<string, .tensorflow.StructuredValue> fields = 1;
            */
    -
           @java.lang.Override
           public boolean containsFields(
               java.lang.String key) {
             if (key == null) { throw new NullPointerException("map key"); }
    -        return internalGetFields().getMap().containsKey(key);
    +        return internalGetFields().ensureBuilderMap().containsKey(key);
           }
           /**
            * Use {@link #getFieldsMap()} instead.
    @@ -7156,52 +6956,47 @@ public java.util.Mapmap<string, .tensorflow.StructuredValue> fields = 1;
            */
           @java.lang.Override
    -
           public java.util.Map getFieldsMap() {
    -        return internalGetFields().getMap();
    +        return internalGetFields().getImmutableMap();
           }
           /**
            * map<string, .tensorflow.StructuredValue> fields = 1;
            */
           @java.lang.Override
    -
    -      public org.tensorflow.proto.Struct.StructuredValue getFieldsOrDefault(
    +      public /* nullable */
    +org.tensorflow.proto.Struct.StructuredValue getFieldsOrDefault(
               java.lang.String key,
    -          org.tensorflow.proto.Struct.StructuredValue defaultValue) {
    +          /* nullable */
    +org.tensorflow.proto.Struct.StructuredValue defaultValue) {
             if (key == null) { throw new NullPointerException("map key"); }
    -        java.util.Map map =
    -            internalGetFields().getMap();
    -        return map.containsKey(key) ? map.get(key) : defaultValue;
    +        java.util.Map map = internalGetMutableFields().ensureBuilderMap();
    +        return map.containsKey(key) ? fieldsConverter.build(map.get(key)) : defaultValue;
           }
           /**
            * map<string, .tensorflow.StructuredValue> fields = 1;
            */
           @java.lang.Override
    -
           public org.tensorflow.proto.Struct.StructuredValue getFieldsOrThrow(
               java.lang.String key) {
             if (key == null) { throw new NullPointerException("map key"); }
    -        java.util.Map map =
    -            internalGetFields().getMap();
    +        java.util.Map map = internalGetMutableFields().ensureBuilderMap();
             if (!map.containsKey(key)) {
               throw new java.lang.IllegalArgumentException();
             }
    -        return map.get(key);
    +        return fieldsConverter.build(map.get(key));
           }
    -
           public Builder clearFields() {
    -        internalGetMutableFields().getMutableMap()
    -            .clear();
    +        bitField0_ = (bitField0_ & ~0x00000001);
    +        internalGetMutableFields().clear();
             return this;
           }
           /**
            * map<string, .tensorflow.StructuredValue> fields = 1;
            */
    -
           public Builder removeFields(
               java.lang.String key) {
             if (key == null) { throw new NullPointerException("map key"); }
    -        internalGetMutableFields().getMutableMap()
    +        internalGetMutableFields().ensureBuilderMap()
                 .remove(key);
             return this;
           }
    @@ -7210,8 +7005,9 @@ public Builder removeFields(
            */
           @java.lang.Deprecated
           public java.util.Map
    -      getMutableFields() {
    -        return internalGetMutableFields().getMutableMap();
    +          getMutableFields() {
    +        bitField0_ |= 0x00000001;
    +        return internalGetMutableFields().ensureMessageMap();
           }
           /**
            * map<string, .tensorflow.StructuredValue> fields = 1;
    @@ -7220,37 +7016,45 @@ public Builder putFields(
               java.lang.String key,
               org.tensorflow.proto.Struct.StructuredValue value) {
             if (key == null) { throw new NullPointerException("map key"); }
    -        if (value == null) {
    -  throw new NullPointerException("map value");
    -}
    -
    -        internalGetMutableFields().getMutableMap()
    +        if (value == null) { throw new NullPointerException("map value"); }
    +        internalGetMutableFields().ensureBuilderMap()
                 .put(key, value);
    +        bitField0_ |= 0x00000001;
             return this;
           }
           /**
            * map<string, .tensorflow.StructuredValue> fields = 1;
            */
    -
           public Builder putAllFields(
               java.util.Map values) {
    -        internalGetMutableFields().getMutableMap()
    +        for (java.util.Map.Entry e : values.entrySet()) {
    +          if (e.getKey() == null || e.getValue() == null) {
    +            throw new NullPointerException();
    +          }
    +        }
    +        internalGetMutableFields().ensureBuilderMap()
                 .putAll(values);
    +        bitField0_ |= 0x00000001;
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    +      /**
    +       * map<string, .tensorflow.StructuredValue> fields = 1;
    +       */
    +      public org.tensorflow.proto.Struct.StructuredValue.Builder putFieldsBuilderIfAbsent(
    +          java.lang.String key) {
    +        java.util.Map builderMap = internalGetMutableFields().ensureBuilderMap();
    +        org.tensorflow.proto.Struct.StructuredValueOrBuilder entry = builderMap.get(key);
    +        if (entry == null) {
    +          entry = org.tensorflow.proto.Struct.StructuredValue.newBuilder();
    +          builderMap.put(key, entry);
    +        }
    +        if (entry instanceof org.tensorflow.proto.Struct.StructuredValue) {
    +          entry = ((org.tensorflow.proto.Struct.StructuredValue) entry).toBuilder();
    +          builderMap.put(key, entry);
    +        }
    +        return (org.tensorflow.proto.Struct.StructuredValue.Builder) entry;
           }
     
    -
           // @@protoc_insertion_point(builder_scope:tensorflow.DictValue)
         }
     
    @@ -7341,45 +7145,44 @@ public interface PairValueOrBuilder extends
        * Protobuf type {@code tensorflow.PairValue}
        */
       public static final class PairValue extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.PairValue)
           PairValueOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        PairValue.class.getName());
    +    }
         // Use PairValue.newBuilder() to construct.
    -    private PairValue(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private PairValue(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private PairValue() {
           key_ = "";
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new PairValue();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.Struct.internal_static_tensorflow_PairValue_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.Struct.internal_static_tensorflow_PairValue_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
                   org.tensorflow.proto.Struct.PairValue.class, org.tensorflow.proto.Struct.PairValue.Builder.class);
         }
     
    +    private int bitField0_;
         public static final int KEY_FIELD_NUMBER = 1;
    -    private volatile java.lang.Object key_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object key_ = "";
         /**
          * string key = 1;
          * @return The key.
    @@ -7424,7 +7227,7 @@ public java.lang.String getKey() {
          */
         @java.lang.Override
         public boolean hasValue() {
    -      return value_ != null;
    +      return ((bitField0_ & 0x00000001) != 0);
         }
         /**
          * .tensorflow.StructuredValue value = 2;
    @@ -7439,7 +7242,7 @@ public org.tensorflow.proto.Struct.StructuredValue getValue() {
          */
         @java.lang.Override
         public org.tensorflow.proto.Struct.StructuredValueOrBuilder getValueOrBuilder() {
    -      return getValue();
    +      return value_ == null ? org.tensorflow.proto.Struct.StructuredValue.getDefaultInstance() : value_;
         }
     
         private byte memoizedIsInitialized = -1;
    @@ -7456,10 +7259,10 @@ public final boolean isInitialized() {
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output)
                             throws java.io.IOException {
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(key_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 1, key_);
           }
    -      if (value_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             output.writeMessage(2, getValue());
           }
           getUnknownFields().writeTo(output);
    @@ -7471,10 +7274,10 @@ public int getSerializedSize() {
           if (size != -1) return size;
     
           size = 0;
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(key_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, key_);
           }
    -      if (value_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(2, getValue());
           }
    @@ -7556,39 +7359,41 @@ public static org.tensorflow.proto.Struct.PairValue parseFrom(
         }
         public static org.tensorflow.proto.Struct.PairValue parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.Struct.PairValue parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.Struct.PairValue parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.Struct.PairValue parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.Struct.PairValue parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.Struct.PairValue parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -7608,7 +7413,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -7620,7 +7425,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.PairValue}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.PairValue)
             org.tensorflow.proto.Struct.PairValueOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -7629,7 +7434,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.Struct.internal_static_tensorflow_PairValue_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -7638,23 +7443,28 @@ public static final class Builder extends
     
           // Construct using org.tensorflow.proto.Struct.PairValue.newBuilder()
           private Builder() {
    -
    +        maybeForceBuilderInitialization();
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
    -
    +        maybeForceBuilderInitialization();
    +      }
    +      private void maybeForceBuilderInitialization() {
    +        if (com.google.protobuf.GeneratedMessage
    +                .alwaysUseFieldBuilders) {
    +          getValueFieldBuilder();
    +        }
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             key_ = "";
    -
    -        if (valueBuilder_ == null) {
    -          value_ = null;
    -        } else {
    -          value_ = null;
    +        value_ = null;
    +        if (valueBuilder_ != null) {
    +          valueBuilder_.dispose();
               valueBuilder_ = null;
             }
             return this;
    @@ -7683,48 +7493,26 @@ public org.tensorflow.proto.Struct.PairValue build() {
           @java.lang.Override
           public org.tensorflow.proto.Struct.PairValue buildPartial() {
             org.tensorflow.proto.Struct.PairValue result = new org.tensorflow.proto.Struct.PairValue(this);
    -        result.key_ = key_;
    -        if (valueBuilder_ == null) {
    -          result.value_ = value_;
    -        } else {
    -          result.value_ = valueBuilder_.build();
    -        }
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.Struct.PairValue result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.key_ = key_;
    +        }
    +        int to_bitField0_ = 0;
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.value_ = valueBuilder_ == null
    +              ? value_
    +              : valueBuilder_.build();
    +          to_bitField0_ |= 0x00000001;
    +        }
    +        result.bitField0_ |= to_bitField0_;
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.Struct.PairValue) {
    @@ -7739,6 +7527,7 @@ public Builder mergeFrom(org.tensorflow.proto.Struct.PairValue other) {
             if (other == org.tensorflow.proto.Struct.PairValue.getDefaultInstance()) return this;
             if (!other.getKey().isEmpty()) {
               key_ = other.key_;
    +          bitField0_ |= 0x00000001;
               onChanged();
             }
             if (other.hasValue()) {
    @@ -7772,14 +7561,14 @@ public Builder mergeFrom(
                     break;
                   case 10: {
                     key_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 10
                   case 18: {
                     input.readMessage(
                         getValueFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 18
                   default: {
    @@ -7797,6 +7586,7 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    +      private int bitField0_;
     
           private java.lang.Object key_ = "";
           /**
    @@ -7839,11 +7629,9 @@ public java.lang.String getKey() {
            */
           public Builder setKey(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             key_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -7852,8 +7640,8 @@ public Builder setKey(
            * @return This builder for chaining.
            */
           public Builder clearKey() {
    -        
             key_ = getDefaultInstance().getKey();
    +        bitField0_ = (bitField0_ & ~0x00000001);
             onChanged();
             return this;
           }
    @@ -7864,25 +7652,23 @@ public Builder clearKey() {
            */
           public Builder setKeyBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             key_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
     
           private org.tensorflow.proto.Struct.StructuredValue value_;
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder> valueBuilder_;
           /**
            * .tensorflow.StructuredValue value = 2;
            * @return Whether the value field is set.
            */
           public boolean hasValue() {
    -        return valueBuilder_ != null || value_ != null;
    +        return ((bitField0_ & 0x00000002) != 0);
           }
           /**
            * .tensorflow.StructuredValue value = 2;
    @@ -7904,11 +7690,11 @@ public Builder setValue(org.tensorflow.proto.Struct.StructuredValue value) {
                 throw new NullPointerException();
               }
               value_ = value;
    -          onChanged();
             } else {
               valueBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000002;
    +        onChanged();
             return this;
           }
           /**
    @@ -7918,11 +7704,11 @@ public Builder setValue(
               org.tensorflow.proto.Struct.StructuredValue.Builder builderForValue) {
             if (valueBuilder_ == null) {
               value_ = builderForValue.build();
    -          onChanged();
             } else {
               valueBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000002;
    +        onChanged();
             return this;
           }
           /**
    @@ -7930,38 +7716,40 @@ public Builder setValue(
            */
           public Builder mergeValue(org.tensorflow.proto.Struct.StructuredValue value) {
             if (valueBuilder_ == null) {
    -          if (value_ != null) {
    -            value_ =
    -              org.tensorflow.proto.Struct.StructuredValue.newBuilder(value_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000002) != 0) &&
    +            value_ != null &&
    +            value_ != org.tensorflow.proto.Struct.StructuredValue.getDefaultInstance()) {
    +            getValueBuilder().mergeFrom(value);
               } else {
                 value_ = value;
               }
    -          onChanged();
             } else {
               valueBuilder_.mergeFrom(value);
             }
    -
    +        if (value_ != null) {
    +          bitField0_ |= 0x00000002;
    +          onChanged();
    +        }
             return this;
           }
           /**
            * .tensorflow.StructuredValue value = 2;
            */
           public Builder clearValue() {
    -        if (valueBuilder_ == null) {
    -          value_ = null;
    -          onChanged();
    -        } else {
    -          value_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000002);
    +        value_ = null;
    +        if (valueBuilder_ != null) {
    +          valueBuilder_.dispose();
               valueBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
            * .tensorflow.StructuredValue value = 2;
            */
           public org.tensorflow.proto.Struct.StructuredValue.Builder getValueBuilder() {
    -        
    +        bitField0_ |= 0x00000002;
             onChanged();
             return getValueFieldBuilder().getBuilder();
           }
    @@ -7979,11 +7767,11 @@ public org.tensorflow.proto.Struct.StructuredValueOrBuilder getValueOrBuilder()
           /**
            * .tensorflow.StructuredValue value = 2;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder> 
               getValueFieldBuilder() {
             if (valueBuilder_ == null) {
    -          valueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          valueBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder>(
                       getValue(),
                       getParentForChildren(),
    @@ -7992,18 +7780,6 @@ public org.tensorflow.proto.Struct.StructuredValueOrBuilder getValueOrBuilder()
             }
             return valueBuilder_;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.PairValue)
         }
    @@ -8104,12 +7880,21 @@ org.tensorflow.proto.Struct.PairValueOrBuilder getValuesOrBuilder(
        * Protobuf type {@code tensorflow.NamedTupleValue}
        */
       public static final class NamedTupleValue extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.NamedTupleValue)
           NamedTupleValueOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        NamedTupleValue.class.getName());
    +    }
         // Use NamedTupleValue.newBuilder() to construct.
    -    private NamedTupleValue(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private NamedTupleValue(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private NamedTupleValue() {
    @@ -8117,25 +7902,13 @@ private NamedTupleValue() {
           values_ = java.util.Collections.emptyList();
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new NamedTupleValue();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.Struct.internal_static_tensorflow_NamedTupleValue_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.Struct.internal_static_tensorflow_NamedTupleValue_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -8143,7 +7916,8 @@ protected java.lang.Object newInstance(
         }
     
         public static final int NAME_FIELD_NUMBER = 1;
    -    private volatile java.lang.Object name_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object name_ = "";
         /**
          * string name = 1;
          * @return The name.
    @@ -8181,6 +7955,7 @@ public java.lang.String getName() {
         }
     
         public static final int VALUES_FIELD_NUMBER = 2;
    +    @SuppressWarnings("serial")
         private java.util.List values_;
         /**
          * repeated .tensorflow.PairValue values = 2;
    @@ -8234,8 +8009,8 @@ public final boolean isInitialized() {
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output)
                             throws java.io.IOException {
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
           }
           for (int i = 0; i < values_.size(); i++) {
             output.writeMessage(2, values_.get(i));
    @@ -8249,8 +8024,8 @@ public int getSerializedSize() {
           if (size != -1) return size;
     
           size = 0;
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
           }
           for (int i = 0; i < values_.size(); i++) {
             size += com.google.protobuf.CodedOutputStream
    @@ -8331,39 +8106,41 @@ public static org.tensorflow.proto.Struct.NamedTupleValue parseFrom(
         }
         public static org.tensorflow.proto.Struct.NamedTupleValue parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.Struct.NamedTupleValue parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.Struct.NamedTupleValue parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.Struct.NamedTupleValue parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.Struct.NamedTupleValue parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.Struct.NamedTupleValue parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -8383,7 +8160,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -8395,7 +8172,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.NamedTupleValue}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.NamedTupleValue)
             org.tensorflow.proto.Struct.NamedTupleValueOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -8404,7 +8181,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.Struct.internal_static_tensorflow_NamedTupleValue_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -8417,22 +8194,22 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             name_ = "";
    -
             if (valuesBuilder_ == null) {
               values_ = java.util.Collections.emptyList();
             } else {
               values_ = null;
               valuesBuilder_.clear();
             }
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        bitField0_ = (bitField0_ & ~0x00000002);
             return this;
           }
     
    @@ -8459,53 +8236,31 @@ public org.tensorflow.proto.Struct.NamedTupleValue build() {
           @java.lang.Override
           public org.tensorflow.proto.Struct.NamedTupleValue buildPartial() {
             org.tensorflow.proto.Struct.NamedTupleValue result = new org.tensorflow.proto.Struct.NamedTupleValue(this);
    -        int from_bitField0_ = bitField0_;
    -        result.name_ = name_;
    +        buildPartialRepeatedFields(result);
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        onBuilt();
    +        return result;
    +      }
    +
    +      private void buildPartialRepeatedFields(org.tensorflow.proto.Struct.NamedTupleValue result) {
             if (valuesBuilder_ == null) {
    -          if (((bitField0_ & 0x00000001) != 0)) {
    +          if (((bitField0_ & 0x00000002) != 0)) {
                 values_ = java.util.Collections.unmodifiableList(values_);
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000002);
               }
               result.values_ = values_;
             } else {
               result.values_ = valuesBuilder_.build();
             }
    -        onBuilt();
    -        return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.Struct.NamedTupleValue result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.name_ = name_;
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.Struct.NamedTupleValue) {
    @@ -8520,13 +8275,14 @@ public Builder mergeFrom(org.tensorflow.proto.Struct.NamedTupleValue other) {
             if (other == org.tensorflow.proto.Struct.NamedTupleValue.getDefaultInstance()) return this;
             if (!other.getName().isEmpty()) {
               name_ = other.name_;
    +          bitField0_ |= 0x00000001;
               onChanged();
             }
             if (valuesBuilder_ == null) {
               if (!other.values_.isEmpty()) {
                 if (values_.isEmpty()) {
                   values_ = other.values_;
    -              bitField0_ = (bitField0_ & ~0x00000001);
    +              bitField0_ = (bitField0_ & ~0x00000002);
                 } else {
                   ensureValuesIsMutable();
                   values_.addAll(other.values_);
    @@ -8539,9 +8295,9 @@ public Builder mergeFrom(org.tensorflow.proto.Struct.NamedTupleValue other) {
                   valuesBuilder_.dispose();
                   valuesBuilder_ = null;
                   values_ = other.values_;
    -              bitField0_ = (bitField0_ & ~0x00000001);
    +              bitField0_ = (bitField0_ & ~0x00000002);
                   valuesBuilder_ = 
    -                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                        getValuesFieldBuilder() : null;
                 } else {
                   valuesBuilder_.addAllMessages(other.values_);
    @@ -8576,7 +8332,7 @@ public Builder mergeFrom(
                     break;
                   case 10: {
                     name_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 10
                   case 18: {
    @@ -8650,11 +8406,9 @@ public java.lang.String getName() {
            */
           public Builder setName(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             name_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -8663,8 +8417,8 @@ public Builder setName(
            * @return This builder for chaining.
            */
           public Builder clearName() {
    -        
             name_ = getDefaultInstance().getName();
    +        bitField0_ = (bitField0_ & ~0x00000001);
             onChanged();
             return this;
           }
    @@ -8675,12 +8429,10 @@ public Builder clearName() {
            */
           public Builder setNameBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             name_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -8688,13 +8440,13 @@ public Builder setNameBytes(
           private java.util.List values_ =
             java.util.Collections.emptyList();
           private void ensureValuesIsMutable() {
    -        if (!((bitField0_ & 0x00000001) != 0)) {
    +        if (!((bitField0_ & 0x00000002) != 0)) {
               values_ = new java.util.ArrayList(values_);
    -          bitField0_ |= 0x00000001;
    +          bitField0_ |= 0x00000002;
              }
           }
     
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.Struct.PairValue, org.tensorflow.proto.Struct.PairValue.Builder, org.tensorflow.proto.Struct.PairValueOrBuilder> valuesBuilder_;
     
           /**
    @@ -8840,7 +8592,7 @@ public Builder addAllValues(
           public Builder clearValues() {
             if (valuesBuilder_ == null) {
               values_ = java.util.Collections.emptyList();
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ = (bitField0_ & ~0x00000002);
               onChanged();
             } else {
               valuesBuilder_.clear();
    @@ -8910,32 +8662,20 @@ public org.tensorflow.proto.Struct.PairValue.Builder addValuesBuilder(
                getValuesBuilderList() {
             return getValuesFieldBuilder().getBuilderList();
           }
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.Struct.PairValue, org.tensorflow.proto.Struct.PairValue.Builder, org.tensorflow.proto.Struct.PairValueOrBuilder> 
               getValuesFieldBuilder() {
             if (valuesBuilder_ == null) {
    -          valuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +          valuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                   org.tensorflow.proto.Struct.PairValue, org.tensorflow.proto.Struct.PairValue.Builder, org.tensorflow.proto.Struct.PairValueOrBuilder>(
                       values_,
    -                  ((bitField0_ & 0x00000001) != 0),
    +                  ((bitField0_ & 0x00000002) != 0),
                       getParentForChildren(),
                       isClean());
               values_ = null;
             }
             return valuesBuilder_;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.NamedTupleValue)
         }
    @@ -9038,12 +8778,21 @@ public interface TensorSpecProtoOrBuilder extends
        * Protobuf type {@code tensorflow.TensorSpecProto}
        */
       public static final class TensorSpecProto extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.TensorSpecProto)
           TensorSpecProtoOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        TensorSpecProto.class.getName());
    +    }
         // Use TensorSpecProto.newBuilder() to construct.
    -    private TensorSpecProto(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private TensorSpecProto(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private TensorSpecProto() {
    @@ -9051,33 +8800,23 @@ private TensorSpecProto() {
           dtype_ = 0;
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new TensorSpecProto();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.Struct.internal_static_tensorflow_TensorSpecProto_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.Struct.internal_static_tensorflow_TensorSpecProto_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
                   org.tensorflow.proto.Struct.TensorSpecProto.class, org.tensorflow.proto.Struct.TensorSpecProto.Builder.class);
         }
     
    +    private int bitField0_;
         public static final int NAME_FIELD_NUMBER = 1;
    -    private volatile java.lang.Object name_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object name_ = "";
         /**
          * string name = 1;
          * @return The name.
    @@ -9122,7 +8861,7 @@ public java.lang.String getName() {
          */
         @java.lang.Override
         public boolean hasShape() {
    -      return shape_ != null;
    +      return ((bitField0_ & 0x00000001) != 0);
         }
         /**
          * .tensorflow.TensorShapeProto shape = 2;
    @@ -9137,11 +8876,11 @@ public org.tensorflow.proto.TensorShapeProto getShape() {
          */
         @java.lang.Override
         public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
    -      return getShape();
    +      return shape_ == null ? org.tensorflow.proto.TensorShapeProto.getDefaultInstance() : shape_;
         }
     
         public static final int DTYPE_FIELD_NUMBER = 3;
    -    private int dtype_;
    +    private int dtype_ = 0;
         /**
          * .tensorflow.DataType dtype = 3;
          * @return The enum numeric value on the wire for dtype.
    @@ -9154,8 +8893,7 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
          * @return The dtype.
          */
         @java.lang.Override public org.tensorflow.proto.DataType getDtype() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(dtype_);
    +      org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(dtype_);
           return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
         }
     
    @@ -9173,10 +8911,10 @@ public final boolean isInitialized() {
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output)
                             throws java.io.IOException {
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
           }
    -      if (shape_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             output.writeMessage(2, getShape());
           }
           if (dtype_ != org.tensorflow.proto.DataType.DT_INVALID.getNumber()) {
    @@ -9191,10 +8929,10 @@ public int getSerializedSize() {
           if (size != -1) return size;
     
           size = 0;
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
           }
    -      if (shape_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(2, getShape());
           }
    @@ -9283,39 +9021,41 @@ public static org.tensorflow.proto.Struct.TensorSpecProto parseFrom(
         }
         public static org.tensorflow.proto.Struct.TensorSpecProto parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.Struct.TensorSpecProto parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.Struct.TensorSpecProto parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.Struct.TensorSpecProto parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.Struct.TensorSpecProto parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.Struct.TensorSpecProto parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -9335,7 +9075,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -9347,7 +9087,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.TensorSpecProto}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.TensorSpecProto)
             org.tensorflow.proto.Struct.TensorSpecProtoOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -9356,7 +9096,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.Struct.internal_static_tensorflow_TensorSpecProto_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -9365,27 +9105,31 @@ public static final class Builder extends
     
           // Construct using org.tensorflow.proto.Struct.TensorSpecProto.newBuilder()
           private Builder() {
    -
    +        maybeForceBuilderInitialization();
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
    -
    +        maybeForceBuilderInitialization();
    +      }
    +      private void maybeForceBuilderInitialization() {
    +        if (com.google.protobuf.GeneratedMessage
    +                .alwaysUseFieldBuilders) {
    +          getShapeFieldBuilder();
    +        }
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             name_ = "";
    -
    -        if (shapeBuilder_ == null) {
    -          shape_ = null;
    -        } else {
    -          shape_ = null;
    +        shape_ = null;
    +        if (shapeBuilder_ != null) {
    +          shapeBuilder_.dispose();
               shapeBuilder_ = null;
             }
             dtype_ = 0;
    -
             return this;
           }
     
    @@ -9412,49 +9156,29 @@ public org.tensorflow.proto.Struct.TensorSpecProto build() {
           @java.lang.Override
           public org.tensorflow.proto.Struct.TensorSpecProto buildPartial() {
             org.tensorflow.proto.Struct.TensorSpecProto result = new org.tensorflow.proto.Struct.TensorSpecProto(this);
    -        result.name_ = name_;
    -        if (shapeBuilder_ == null) {
    -          result.shape_ = shape_;
    -        } else {
    -          result.shape_ = shapeBuilder_.build();
    -        }
    -        result.dtype_ = dtype_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.Struct.TensorSpecProto result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.name_ = name_;
    +        }
    +        int to_bitField0_ = 0;
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.shape_ = shapeBuilder_ == null
    +              ? shape_
    +              : shapeBuilder_.build();
    +          to_bitField0_ |= 0x00000001;
    +        }
    +        if (((from_bitField0_ & 0x00000004) != 0)) {
    +          result.dtype_ = dtype_;
    +        }
    +        result.bitField0_ |= to_bitField0_;
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.Struct.TensorSpecProto) {
    @@ -9469,6 +9193,7 @@ public Builder mergeFrom(org.tensorflow.proto.Struct.TensorSpecProto other) {
             if (other == org.tensorflow.proto.Struct.TensorSpecProto.getDefaultInstance()) return this;
             if (!other.getName().isEmpty()) {
               name_ = other.name_;
    +          bitField0_ |= 0x00000001;
               onChanged();
             }
             if (other.hasShape()) {
    @@ -9505,19 +9230,19 @@ public Builder mergeFrom(
                     break;
                   case 10: {
                     name_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 10
                   case 18: {
                     input.readMessage(
                         getShapeFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 18
                   case 24: {
                     dtype_ = input.readEnum();
    -
    +                bitField0_ |= 0x00000004;
                     break;
                   } // case 24
                   default: {
    @@ -9535,6 +9260,7 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    +      private int bitField0_;
     
           private java.lang.Object name_ = "";
           /**
    @@ -9577,11 +9303,9 @@ public java.lang.String getName() {
            */
           public Builder setName(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             name_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -9590,8 +9314,8 @@ public Builder setName(
            * @return This builder for chaining.
            */
           public Builder clearName() {
    -        
             name_ = getDefaultInstance().getName();
    +        bitField0_ = (bitField0_ & ~0x00000001);
             onChanged();
             return this;
           }
    @@ -9602,25 +9326,23 @@ public Builder clearName() {
            */
           public Builder setNameBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             name_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
     
           private org.tensorflow.proto.TensorShapeProto shape_;
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> shapeBuilder_;
           /**
            * .tensorflow.TensorShapeProto shape = 2;
            * @return Whether the shape field is set.
            */
           public boolean hasShape() {
    -        return shapeBuilder_ != null || shape_ != null;
    +        return ((bitField0_ & 0x00000002) != 0);
           }
           /**
            * .tensorflow.TensorShapeProto shape = 2;
    @@ -9642,11 +9364,11 @@ public Builder setShape(org.tensorflow.proto.TensorShapeProto value) {
                 throw new NullPointerException();
               }
               shape_ = value;
    -          onChanged();
             } else {
               shapeBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000002;
    +        onChanged();
             return this;
           }
           /**
    @@ -9656,11 +9378,11 @@ public Builder setShape(
               org.tensorflow.proto.TensorShapeProto.Builder builderForValue) {
             if (shapeBuilder_ == null) {
               shape_ = builderForValue.build();
    -          onChanged();
             } else {
               shapeBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000002;
    +        onChanged();
             return this;
           }
           /**
    @@ -9668,38 +9390,40 @@ public Builder setShape(
            */
           public Builder mergeShape(org.tensorflow.proto.TensorShapeProto value) {
             if (shapeBuilder_ == null) {
    -          if (shape_ != null) {
    -            shape_ =
    -              org.tensorflow.proto.TensorShapeProto.newBuilder(shape_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000002) != 0) &&
    +            shape_ != null &&
    +            shape_ != org.tensorflow.proto.TensorShapeProto.getDefaultInstance()) {
    +            getShapeBuilder().mergeFrom(value);
               } else {
                 shape_ = value;
               }
    -          onChanged();
             } else {
               shapeBuilder_.mergeFrom(value);
             }
    -
    +        if (shape_ != null) {
    +          bitField0_ |= 0x00000002;
    +          onChanged();
    +        }
             return this;
           }
           /**
            * .tensorflow.TensorShapeProto shape = 2;
            */
           public Builder clearShape() {
    -        if (shapeBuilder_ == null) {
    -          shape_ = null;
    -          onChanged();
    -        } else {
    -          shape_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000002);
    +        shape_ = null;
    +        if (shapeBuilder_ != null) {
    +          shapeBuilder_.dispose();
               shapeBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
            * .tensorflow.TensorShapeProto shape = 2;
            */
           public org.tensorflow.proto.TensorShapeProto.Builder getShapeBuilder() {
    -        
    +        bitField0_ |= 0x00000002;
             onChanged();
             return getShapeFieldBuilder().getBuilder();
           }
    @@ -9717,11 +9441,11 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
           /**
            * .tensorflow.TensorShapeProto shape = 2;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> 
               getShapeFieldBuilder() {
             if (shapeBuilder_ == null) {
    -          shapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          shapeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder>(
                       getShape(),
                       getParentForChildren(),
    @@ -9745,8 +9469,8 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
            * @return This builder for chaining.
            */
           public Builder setDtypeValue(int value) {
    -        
             dtype_ = value;
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -9756,8 +9480,7 @@ public Builder setDtypeValue(int value) {
            */
           @java.lang.Override
           public org.tensorflow.proto.DataType getDtype() {
    -        @SuppressWarnings("deprecation")
    -        org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(dtype_);
    +        org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(dtype_);
             return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
           }
           /**
    @@ -9769,7 +9492,7 @@ public Builder setDtype(org.tensorflow.proto.DataType value) {
             if (value == null) {
               throw new NullPointerException();
             }
    -        
    +        bitField0_ |= 0x00000004;
             dtype_ = value.getNumber();
             onChanged();
             return this;
    @@ -9779,23 +9502,11 @@ public Builder setDtype(org.tensorflow.proto.DataType value) {
            * @return This builder for chaining.
            */
           public Builder clearDtype() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000004);
             dtype_ = 0;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.TensorSpecProto)
         }
    @@ -9928,12 +9639,21 @@ public interface BoundedTensorSpecProtoOrBuilder extends
        * Protobuf type {@code tensorflow.BoundedTensorSpecProto}
        */
       public static final class BoundedTensorSpecProto extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.BoundedTensorSpecProto)
           BoundedTensorSpecProtoOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        BoundedTensorSpecProto.class.getName());
    +    }
         // Use BoundedTensorSpecProto.newBuilder() to construct.
    -    private BoundedTensorSpecProto(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private BoundedTensorSpecProto(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private BoundedTensorSpecProto() {
    @@ -9941,33 +9661,23 @@ private BoundedTensorSpecProto() {
           dtype_ = 0;
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new BoundedTensorSpecProto();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.Struct.internal_static_tensorflow_BoundedTensorSpecProto_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.Struct.internal_static_tensorflow_BoundedTensorSpecProto_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
                   org.tensorflow.proto.Struct.BoundedTensorSpecProto.class, org.tensorflow.proto.Struct.BoundedTensorSpecProto.Builder.class);
         }
     
    +    private int bitField0_;
         public static final int NAME_FIELD_NUMBER = 1;
    -    private volatile java.lang.Object name_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object name_ = "";
         /**
          * string name = 1;
          * @return The name.
    @@ -10012,7 +9722,7 @@ public java.lang.String getName() {
          */
         @java.lang.Override
         public boolean hasShape() {
    -      return shape_ != null;
    +      return ((bitField0_ & 0x00000001) != 0);
         }
         /**
          * .tensorflow.TensorShapeProto shape = 2;
    @@ -10027,11 +9737,11 @@ public org.tensorflow.proto.TensorShapeProto getShape() {
          */
         @java.lang.Override
         public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
    -      return getShape();
    +      return shape_ == null ? org.tensorflow.proto.TensorShapeProto.getDefaultInstance() : shape_;
         }
     
         public static final int DTYPE_FIELD_NUMBER = 3;
    -    private int dtype_;
    +    private int dtype_ = 0;
         /**
          * .tensorflow.DataType dtype = 3;
          * @return The enum numeric value on the wire for dtype.
    @@ -10044,8 +9754,7 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
          * @return The dtype.
          */
         @java.lang.Override public org.tensorflow.proto.DataType getDtype() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(dtype_);
    +      org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(dtype_);
           return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
         }
     
    @@ -10057,7 +9766,7 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
          */
         @java.lang.Override
         public boolean hasMinimum() {
    -      return minimum_ != null;
    +      return ((bitField0_ & 0x00000002) != 0);
         }
         /**
          * .tensorflow.TensorProto minimum = 4;
    @@ -10072,7 +9781,7 @@ public org.tensorflow.proto.TensorProto getMinimum() {
          */
         @java.lang.Override
         public org.tensorflow.proto.TensorProtoOrBuilder getMinimumOrBuilder() {
    -      return getMinimum();
    +      return minimum_ == null ? org.tensorflow.proto.TensorProto.getDefaultInstance() : minimum_;
         }
     
         public static final int MAXIMUM_FIELD_NUMBER = 5;
    @@ -10083,7 +9792,7 @@ public org.tensorflow.proto.TensorProtoOrBuilder getMinimumOrBuilder() {
          */
         @java.lang.Override
         public boolean hasMaximum() {
    -      return maximum_ != null;
    +      return ((bitField0_ & 0x00000004) != 0);
         }
         /**
          * .tensorflow.TensorProto maximum = 5;
    @@ -10098,7 +9807,7 @@ public org.tensorflow.proto.TensorProto getMaximum() {
          */
         @java.lang.Override
         public org.tensorflow.proto.TensorProtoOrBuilder getMaximumOrBuilder() {
    -      return getMaximum();
    +      return maximum_ == null ? org.tensorflow.proto.TensorProto.getDefaultInstance() : maximum_;
         }
     
         private byte memoizedIsInitialized = -1;
    @@ -10115,19 +9824,19 @@ public final boolean isInitialized() {
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output)
                             throws java.io.IOException {
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
           }
    -      if (shape_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             output.writeMessage(2, getShape());
           }
           if (dtype_ != org.tensorflow.proto.DataType.DT_INVALID.getNumber()) {
             output.writeEnum(3, dtype_);
           }
    -      if (minimum_ != null) {
    +      if (((bitField0_ & 0x00000002) != 0)) {
             output.writeMessage(4, getMinimum());
           }
    -      if (maximum_ != null) {
    +      if (((bitField0_ & 0x00000004) != 0)) {
             output.writeMessage(5, getMaximum());
           }
           getUnknownFields().writeTo(output);
    @@ -10139,10 +9848,10 @@ public int getSerializedSize() {
           if (size != -1) return size;
     
           size = 0;
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
           }
    -      if (shape_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(2, getShape());
           }
    @@ -10150,11 +9859,11 @@ public int getSerializedSize() {
             size += com.google.protobuf.CodedOutputStream
               .computeEnumSize(3, dtype_);
           }
    -      if (minimum_ != null) {
    +      if (((bitField0_ & 0x00000002) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(4, getMinimum());
           }
    -      if (maximum_ != null) {
    +      if (((bitField0_ & 0x00000004) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(5, getMaximum());
           }
    @@ -10257,39 +9966,41 @@ public static org.tensorflow.proto.Struct.BoundedTensorSpecProto parseFrom(
         }
         public static org.tensorflow.proto.Struct.BoundedTensorSpecProto parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.Struct.BoundedTensorSpecProto parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.Struct.BoundedTensorSpecProto parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.Struct.BoundedTensorSpecProto parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.Struct.BoundedTensorSpecProto parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.Struct.BoundedTensorSpecProto parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -10309,7 +10020,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -10321,7 +10032,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.BoundedTensorSpecProto}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.BoundedTensorSpecProto)
             org.tensorflow.proto.Struct.BoundedTensorSpecProtoOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -10330,7 +10041,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.Struct.internal_static_tensorflow_BoundedTensorSpecProto_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -10339,37 +10050,41 @@ public static final class Builder extends
     
           // Construct using org.tensorflow.proto.Struct.BoundedTensorSpecProto.newBuilder()
           private Builder() {
    -
    +        maybeForceBuilderInitialization();
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
    -
    +        maybeForceBuilderInitialization();
    +      }
    +      private void maybeForceBuilderInitialization() {
    +        if (com.google.protobuf.GeneratedMessage
    +                .alwaysUseFieldBuilders) {
    +          getShapeFieldBuilder();
    +          getMinimumFieldBuilder();
    +          getMaximumFieldBuilder();
    +        }
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             name_ = "";
    -
    -        if (shapeBuilder_ == null) {
    -          shape_ = null;
    -        } else {
    -          shape_ = null;
    +        shape_ = null;
    +        if (shapeBuilder_ != null) {
    +          shapeBuilder_.dispose();
               shapeBuilder_ = null;
             }
             dtype_ = 0;
    -
    -        if (minimumBuilder_ == null) {
    -          minimum_ = null;
    -        } else {
    -          minimum_ = null;
    +        minimum_ = null;
    +        if (minimumBuilder_ != null) {
    +          minimumBuilder_.dispose();
               minimumBuilder_ = null;
             }
    -        if (maximumBuilder_ == null) {
    -          maximum_ = null;
    -        } else {
    -          maximum_ = null;
    +        maximum_ = null;
    +        if (maximumBuilder_ != null) {
    +          maximumBuilder_.dispose();
               maximumBuilder_ = null;
             }
             return this;
    @@ -10398,59 +10113,41 @@ public org.tensorflow.proto.Struct.BoundedTensorSpecProto build() {
           @java.lang.Override
           public org.tensorflow.proto.Struct.BoundedTensorSpecProto buildPartial() {
             org.tensorflow.proto.Struct.BoundedTensorSpecProto result = new org.tensorflow.proto.Struct.BoundedTensorSpecProto(this);
    -        result.name_ = name_;
    -        if (shapeBuilder_ == null) {
    -          result.shape_ = shape_;
    -        } else {
    -          result.shape_ = shapeBuilder_.build();
    -        }
    -        result.dtype_ = dtype_;
    -        if (minimumBuilder_ == null) {
    -          result.minimum_ = minimum_;
    -        } else {
    -          result.minimum_ = minimumBuilder_.build();
    -        }
    -        if (maximumBuilder_ == null) {
    -          result.maximum_ = maximum_;
    -        } else {
    -          result.maximum_ = maximumBuilder_.build();
    -        }
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.Struct.BoundedTensorSpecProto result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.name_ = name_;
    +        }
    +        int to_bitField0_ = 0;
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.shape_ = shapeBuilder_ == null
    +              ? shape_
    +              : shapeBuilder_.build();
    +          to_bitField0_ |= 0x00000001;
    +        }
    +        if (((from_bitField0_ & 0x00000004) != 0)) {
    +          result.dtype_ = dtype_;
    +        }
    +        if (((from_bitField0_ & 0x00000008) != 0)) {
    +          result.minimum_ = minimumBuilder_ == null
    +              ? minimum_
    +              : minimumBuilder_.build();
    +          to_bitField0_ |= 0x00000002;
    +        }
    +        if (((from_bitField0_ & 0x00000010) != 0)) {
    +          result.maximum_ = maximumBuilder_ == null
    +              ? maximum_
    +              : maximumBuilder_.build();
    +          to_bitField0_ |= 0x00000004;
    +        }
    +        result.bitField0_ |= to_bitField0_;
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.Struct.BoundedTensorSpecProto) {
    @@ -10465,6 +10162,7 @@ public Builder mergeFrom(org.tensorflow.proto.Struct.BoundedTensorSpecProto othe
             if (other == org.tensorflow.proto.Struct.BoundedTensorSpecProto.getDefaultInstance()) return this;
             if (!other.getName().isEmpty()) {
               name_ = other.name_;
    +          bitField0_ |= 0x00000001;
               onChanged();
             }
             if (other.hasShape()) {
    @@ -10507,33 +10205,33 @@ public Builder mergeFrom(
                     break;
                   case 10: {
                     name_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 10
                   case 18: {
                     input.readMessage(
                         getShapeFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 18
                   case 24: {
                     dtype_ = input.readEnum();
    -
    +                bitField0_ |= 0x00000004;
                     break;
                   } // case 24
                   case 34: {
                     input.readMessage(
                         getMinimumFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00000008;
                     break;
                   } // case 34
                   case 42: {
                     input.readMessage(
                         getMaximumFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00000010;
                     break;
                   } // case 42
                   default: {
    @@ -10551,6 +10249,7 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    +      private int bitField0_;
     
           private java.lang.Object name_ = "";
           /**
    @@ -10593,11 +10292,9 @@ public java.lang.String getName() {
            */
           public Builder setName(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             name_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -10606,8 +10303,8 @@ public Builder setName(
            * @return This builder for chaining.
            */
           public Builder clearName() {
    -        
             name_ = getDefaultInstance().getName();
    +        bitField0_ = (bitField0_ & ~0x00000001);
             onChanged();
             return this;
           }
    @@ -10618,25 +10315,23 @@ public Builder clearName() {
            */
           public Builder setNameBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             name_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
     
           private org.tensorflow.proto.TensorShapeProto shape_;
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> shapeBuilder_;
           /**
            * .tensorflow.TensorShapeProto shape = 2;
            * @return Whether the shape field is set.
            */
           public boolean hasShape() {
    -        return shapeBuilder_ != null || shape_ != null;
    +        return ((bitField0_ & 0x00000002) != 0);
           }
           /**
            * .tensorflow.TensorShapeProto shape = 2;
    @@ -10658,11 +10353,11 @@ public Builder setShape(org.tensorflow.proto.TensorShapeProto value) {
                 throw new NullPointerException();
               }
               shape_ = value;
    -          onChanged();
             } else {
               shapeBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000002;
    +        onChanged();
             return this;
           }
           /**
    @@ -10672,11 +10367,11 @@ public Builder setShape(
               org.tensorflow.proto.TensorShapeProto.Builder builderForValue) {
             if (shapeBuilder_ == null) {
               shape_ = builderForValue.build();
    -          onChanged();
             } else {
               shapeBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000002;
    +        onChanged();
             return this;
           }
           /**
    @@ -10684,38 +10379,40 @@ public Builder setShape(
            */
           public Builder mergeShape(org.tensorflow.proto.TensorShapeProto value) {
             if (shapeBuilder_ == null) {
    -          if (shape_ != null) {
    -            shape_ =
    -              org.tensorflow.proto.TensorShapeProto.newBuilder(shape_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000002) != 0) &&
    +            shape_ != null &&
    +            shape_ != org.tensorflow.proto.TensorShapeProto.getDefaultInstance()) {
    +            getShapeBuilder().mergeFrom(value);
               } else {
                 shape_ = value;
               }
    -          onChanged();
             } else {
               shapeBuilder_.mergeFrom(value);
             }
    -
    +        if (shape_ != null) {
    +          bitField0_ |= 0x00000002;
    +          onChanged();
    +        }
             return this;
           }
           /**
            * .tensorflow.TensorShapeProto shape = 2;
            */
           public Builder clearShape() {
    -        if (shapeBuilder_ == null) {
    -          shape_ = null;
    -          onChanged();
    -        } else {
    -          shape_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000002);
    +        shape_ = null;
    +        if (shapeBuilder_ != null) {
    +          shapeBuilder_.dispose();
               shapeBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
            * .tensorflow.TensorShapeProto shape = 2;
            */
           public org.tensorflow.proto.TensorShapeProto.Builder getShapeBuilder() {
    -        
    +        bitField0_ |= 0x00000002;
             onChanged();
             return getShapeFieldBuilder().getBuilder();
           }
    @@ -10733,11 +10430,11 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
           /**
            * .tensorflow.TensorShapeProto shape = 2;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> 
               getShapeFieldBuilder() {
             if (shapeBuilder_ == null) {
    -          shapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          shapeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder>(
                       getShape(),
                       getParentForChildren(),
    @@ -10761,8 +10458,8 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
            * @return This builder for chaining.
            */
           public Builder setDtypeValue(int value) {
    -        
             dtype_ = value;
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -10772,8 +10469,7 @@ public Builder setDtypeValue(int value) {
            */
           @java.lang.Override
           public org.tensorflow.proto.DataType getDtype() {
    -        @SuppressWarnings("deprecation")
    -        org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(dtype_);
    +        org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(dtype_);
             return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
           }
           /**
    @@ -10785,7 +10481,7 @@ public Builder setDtype(org.tensorflow.proto.DataType value) {
             if (value == null) {
               throw new NullPointerException();
             }
    -        
    +        bitField0_ |= 0x00000004;
             dtype_ = value.getNumber();
             onChanged();
             return this;
    @@ -10795,21 +10491,21 @@ public Builder setDtype(org.tensorflow.proto.DataType value) {
            * @return This builder for chaining.
            */
           public Builder clearDtype() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000004);
             dtype_ = 0;
             onChanged();
             return this;
           }
     
           private org.tensorflow.proto.TensorProto minimum_;
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> minimumBuilder_;
           /**
            * .tensorflow.TensorProto minimum = 4;
            * @return Whether the minimum field is set.
            */
           public boolean hasMinimum() {
    -        return minimumBuilder_ != null || minimum_ != null;
    +        return ((bitField0_ & 0x00000008) != 0);
           }
           /**
            * .tensorflow.TensorProto minimum = 4;
    @@ -10831,11 +10527,11 @@ public Builder setMinimum(org.tensorflow.proto.TensorProto value) {
                 throw new NullPointerException();
               }
               minimum_ = value;
    -          onChanged();
             } else {
               minimumBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000008;
    +        onChanged();
             return this;
           }
           /**
    @@ -10845,11 +10541,11 @@ public Builder setMinimum(
               org.tensorflow.proto.TensorProto.Builder builderForValue) {
             if (minimumBuilder_ == null) {
               minimum_ = builderForValue.build();
    -          onChanged();
             } else {
               minimumBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000008;
    +        onChanged();
             return this;
           }
           /**
    @@ -10857,38 +10553,40 @@ public Builder setMinimum(
            */
           public Builder mergeMinimum(org.tensorflow.proto.TensorProto value) {
             if (minimumBuilder_ == null) {
    -          if (minimum_ != null) {
    -            minimum_ =
    -              org.tensorflow.proto.TensorProto.newBuilder(minimum_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000008) != 0) &&
    +            minimum_ != null &&
    +            minimum_ != org.tensorflow.proto.TensorProto.getDefaultInstance()) {
    +            getMinimumBuilder().mergeFrom(value);
               } else {
                 minimum_ = value;
               }
    -          onChanged();
             } else {
               minimumBuilder_.mergeFrom(value);
             }
    -
    +        if (minimum_ != null) {
    +          bitField0_ |= 0x00000008;
    +          onChanged();
    +        }
             return this;
           }
           /**
            * .tensorflow.TensorProto minimum = 4;
            */
           public Builder clearMinimum() {
    -        if (minimumBuilder_ == null) {
    -          minimum_ = null;
    -          onChanged();
    -        } else {
    -          minimum_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000008);
    +        minimum_ = null;
    +        if (minimumBuilder_ != null) {
    +          minimumBuilder_.dispose();
               minimumBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
            * .tensorflow.TensorProto minimum = 4;
            */
           public org.tensorflow.proto.TensorProto.Builder getMinimumBuilder() {
    -        
    +        bitField0_ |= 0x00000008;
             onChanged();
             return getMinimumFieldBuilder().getBuilder();
           }
    @@ -10906,11 +10604,11 @@ public org.tensorflow.proto.TensorProtoOrBuilder getMinimumOrBuilder() {
           /**
            * .tensorflow.TensorProto minimum = 4;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> 
               getMinimumFieldBuilder() {
             if (minimumBuilder_ == null) {
    -          minimumBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          minimumBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder>(
                       getMinimum(),
                       getParentForChildren(),
    @@ -10921,14 +10619,14 @@ public org.tensorflow.proto.TensorProtoOrBuilder getMinimumOrBuilder() {
           }
     
           private org.tensorflow.proto.TensorProto maximum_;
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> maximumBuilder_;
           /**
            * .tensorflow.TensorProto maximum = 5;
            * @return Whether the maximum field is set.
            */
           public boolean hasMaximum() {
    -        return maximumBuilder_ != null || maximum_ != null;
    +        return ((bitField0_ & 0x00000010) != 0);
           }
           /**
            * .tensorflow.TensorProto maximum = 5;
    @@ -10950,11 +10648,11 @@ public Builder setMaximum(org.tensorflow.proto.TensorProto value) {
                 throw new NullPointerException();
               }
               maximum_ = value;
    -          onChanged();
             } else {
               maximumBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000010;
    +        onChanged();
             return this;
           }
           /**
    @@ -10964,11 +10662,11 @@ public Builder setMaximum(
               org.tensorflow.proto.TensorProto.Builder builderForValue) {
             if (maximumBuilder_ == null) {
               maximum_ = builderForValue.build();
    -          onChanged();
             } else {
               maximumBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000010;
    +        onChanged();
             return this;
           }
           /**
    @@ -10976,38 +10674,40 @@ public Builder setMaximum(
            */
           public Builder mergeMaximum(org.tensorflow.proto.TensorProto value) {
             if (maximumBuilder_ == null) {
    -          if (maximum_ != null) {
    -            maximum_ =
    -              org.tensorflow.proto.TensorProto.newBuilder(maximum_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000010) != 0) &&
    +            maximum_ != null &&
    +            maximum_ != org.tensorflow.proto.TensorProto.getDefaultInstance()) {
    +            getMaximumBuilder().mergeFrom(value);
               } else {
                 maximum_ = value;
               }
    -          onChanged();
             } else {
               maximumBuilder_.mergeFrom(value);
             }
    -
    +        if (maximum_ != null) {
    +          bitField0_ |= 0x00000010;
    +          onChanged();
    +        }
             return this;
           }
           /**
            * .tensorflow.TensorProto maximum = 5;
            */
           public Builder clearMaximum() {
    -        if (maximumBuilder_ == null) {
    -          maximum_ = null;
    -          onChanged();
    -        } else {
    -          maximum_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000010);
    +        maximum_ = null;
    +        if (maximumBuilder_ != null) {
    +          maximumBuilder_.dispose();
               maximumBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
            * .tensorflow.TensorProto maximum = 5;
            */
           public org.tensorflow.proto.TensorProto.Builder getMaximumBuilder() {
    -        
    +        bitField0_ |= 0x00000010;
             onChanged();
             return getMaximumFieldBuilder().getBuilder();
           }
    @@ -11025,11 +10725,11 @@ public org.tensorflow.proto.TensorProtoOrBuilder getMaximumOrBuilder() {
           /**
            * .tensorflow.TensorProto maximum = 5;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> 
               getMaximumFieldBuilder() {
             if (maximumBuilder_ == null) {
    -          maximumBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          maximumBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder>(
                       getMaximum(),
                       getParentForChildren(),
    @@ -11038,18 +10738,6 @@ public org.tensorflow.proto.TensorProtoOrBuilder getMaximumOrBuilder() {
             }
             return maximumBuilder_;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.BoundedTensorSpecProto)
         }
    @@ -11147,13 +10835,13 @@ public interface TypeSpecProtoOrBuilder extends
         /**
          * 
          * The name of the TypeSpec class.
    -     *  * If type_spec_class == REGISTERED_TYPE_SPEC, the TypeSpec class is
    -     *    the one registered under this name. For types registered outside
    -     *    core TensorFlow by an add-on library, that library must be loaded
    -     *    before this value can be deserialized by nested_structure_coder.
    -     *  * If type_spec_class specifies a particular TypeSpec class, this field is
    -     *    redundant with the type_spec_class enum, and is only used for error
    -     *    reporting in older binaries that do not know the tupe_spec_class enum.
    +     * * If type_spec_class == REGISTERED_TYPE_SPEC, the TypeSpec class is
    +     * the one registered under this name. For types registered outside
    +     * core TensorFlow by an add-on library, that library must be loaded
    +     * before this value can be deserialized by nested_structure_coder.
    +     * * If type_spec_class specifies a particular TypeSpec class, this field is
    +     * redundant with the type_spec_class enum, and is only used for error
    +     * reporting in older binaries that do not know the tupe_spec_class enum.
          * 
    * * string type_spec_class_name = 3; @@ -11163,13 +10851,13 @@ public interface TypeSpecProtoOrBuilder extends /** *
          * The name of the TypeSpec class.
    -     *  * If type_spec_class == REGISTERED_TYPE_SPEC, the TypeSpec class is
    -     *    the one registered under this name. For types registered outside
    -     *    core TensorFlow by an add-on library, that library must be loaded
    -     *    before this value can be deserialized by nested_structure_coder.
    -     *  * If type_spec_class specifies a particular TypeSpec class, this field is
    -     *    redundant with the type_spec_class enum, and is only used for error
    -     *    reporting in older binaries that do not know the tupe_spec_class enum.
    +     * * If type_spec_class == REGISTERED_TYPE_SPEC, the TypeSpec class is
    +     * the one registered under this name. For types registered outside
    +     * core TensorFlow by an add-on library, that library must be loaded
    +     * before this value can be deserialized by nested_structure_coder.
    +     * * If type_spec_class specifies a particular TypeSpec class, this field is
    +     * redundant with the type_spec_class enum, and is only used for error
    +     * reporting in older binaries that do not know the tupe_spec_class enum.
          * 
    * * string type_spec_class_name = 3; @@ -11196,12 +10884,21 @@ public interface TypeSpecProtoOrBuilder extends * Protobuf type {@code tensorflow.TypeSpecProto} */ public static final class TypeSpecProto extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.TypeSpecProto) TypeSpecProtoOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + TypeSpecProto.class.getName()); + } // Use TypeSpecProto.newBuilder() to construct. - private TypeSpecProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private TypeSpecProto(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private TypeSpecProto() { @@ -11209,25 +10906,13 @@ private TypeSpecProto() { typeSpecClassName_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TypeSpecProto(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.Struct.internal_static_tensorflow_TypeSpecProto_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.Struct.internal_static_tensorflow_TypeSpecProto_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -11342,6 +11027,15 @@ public enum TypeSpecClass UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + TypeSpecClass.class.getName()); + } /** * UNKNOWN = 0; */ @@ -11537,8 +11231,9 @@ private TypeSpecClass(int value) { // @@protoc_insertion_point(enum_scope:tensorflow.TypeSpecProto.TypeSpecClass) } + private int bitField0_; public static final int TYPE_SPEC_CLASS_FIELD_NUMBER = 1; - private int typeSpecClass_; + private int typeSpecClass_ = 0; /** * .tensorflow.TypeSpecProto.TypeSpecClass type_spec_class = 1; * @return The enum numeric value on the wire for typeSpecClass. @@ -11551,8 +11246,7 @@ private TypeSpecClass(int value) { * @return The typeSpecClass. */ @java.lang.Override public org.tensorflow.proto.Struct.TypeSpecProto.TypeSpecClass getTypeSpecClass() { - @SuppressWarnings("deprecation") - org.tensorflow.proto.Struct.TypeSpecProto.TypeSpecClass result = org.tensorflow.proto.Struct.TypeSpecProto.TypeSpecClass.valueOf(typeSpecClass_); + org.tensorflow.proto.Struct.TypeSpecProto.TypeSpecClass result = org.tensorflow.proto.Struct.TypeSpecProto.TypeSpecClass.forNumber(typeSpecClass_); return result == null ? org.tensorflow.proto.Struct.TypeSpecProto.TypeSpecClass.UNRECOGNIZED : result; } @@ -11568,7 +11262,7 @@ private TypeSpecClass(int value) { */ @java.lang.Override public boolean hasTypeState() { - return typeState_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** *
    @@ -11591,21 +11285,22 @@ public org.tensorflow.proto.Struct.StructuredValue getTypeState() {
          */
         @java.lang.Override
         public org.tensorflow.proto.Struct.StructuredValueOrBuilder getTypeStateOrBuilder() {
    -      return getTypeState();
    +      return typeState_ == null ? org.tensorflow.proto.Struct.StructuredValue.getDefaultInstance() : typeState_;
         }
     
         public static final int TYPE_SPEC_CLASS_NAME_FIELD_NUMBER = 3;
    -    private volatile java.lang.Object typeSpecClassName_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object typeSpecClassName_ = "";
         /**
          * 
          * The name of the TypeSpec class.
    -     *  * If type_spec_class == REGISTERED_TYPE_SPEC, the TypeSpec class is
    -     *    the one registered under this name. For types registered outside
    -     *    core TensorFlow by an add-on library, that library must be loaded
    -     *    before this value can be deserialized by nested_structure_coder.
    -     *  * If type_spec_class specifies a particular TypeSpec class, this field is
    -     *    redundant with the type_spec_class enum, and is only used for error
    -     *    reporting in older binaries that do not know the tupe_spec_class enum.
    +     * * If type_spec_class == REGISTERED_TYPE_SPEC, the TypeSpec class is
    +     * the one registered under this name. For types registered outside
    +     * core TensorFlow by an add-on library, that library must be loaded
    +     * before this value can be deserialized by nested_structure_coder.
    +     * * If type_spec_class specifies a particular TypeSpec class, this field is
    +     * redundant with the type_spec_class enum, and is only used for error
    +     * reporting in older binaries that do not know the tupe_spec_class enum.
          * 
    * * string type_spec_class_name = 3; @@ -11627,13 +11322,13 @@ public java.lang.String getTypeSpecClassName() { /** *
          * The name of the TypeSpec class.
    -     *  * If type_spec_class == REGISTERED_TYPE_SPEC, the TypeSpec class is
    -     *    the one registered under this name. For types registered outside
    -     *    core TensorFlow by an add-on library, that library must be loaded
    -     *    before this value can be deserialized by nested_structure_coder.
    -     *  * If type_spec_class specifies a particular TypeSpec class, this field is
    -     *    redundant with the type_spec_class enum, and is only used for error
    -     *    reporting in older binaries that do not know the tupe_spec_class enum.
    +     * * If type_spec_class == REGISTERED_TYPE_SPEC, the TypeSpec class is
    +     * the one registered under this name. For types registered outside
    +     * core TensorFlow by an add-on library, that library must be loaded
    +     * before this value can be deserialized by nested_structure_coder.
    +     * * If type_spec_class specifies a particular TypeSpec class, this field is
    +     * redundant with the type_spec_class enum, and is only used for error
    +     * reporting in older binaries that do not know the tupe_spec_class enum.
          * 
    * * string type_spec_class_name = 3; @@ -11655,7 +11350,7 @@ public java.lang.String getTypeSpecClassName() { } public static final int NUM_FLAT_COMPONENTS_FIELD_NUMBER = 4; - private int numFlatComponents_; + private int numFlatComponents_ = 0; /** *
          * The number of flat tensor components required by this TypeSpec.
    @@ -11686,11 +11381,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           if (typeSpecClass_ != org.tensorflow.proto.Struct.TypeSpecProto.TypeSpecClass.UNKNOWN.getNumber()) {
             output.writeEnum(1, typeSpecClass_);
           }
    -      if (typeState_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             output.writeMessage(2, getTypeState());
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(typeSpecClassName_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 3, typeSpecClassName_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(typeSpecClassName_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 3, typeSpecClassName_);
           }
           if (numFlatComponents_ != 0) {
             output.writeInt32(4, numFlatComponents_);
    @@ -11708,12 +11403,12 @@ public int getSerializedSize() {
             size += com.google.protobuf.CodedOutputStream
               .computeEnumSize(1, typeSpecClass_);
           }
    -      if (typeState_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(2, getTypeState());
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(typeSpecClassName_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, typeSpecClassName_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(typeSpecClassName_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(3, typeSpecClassName_);
           }
           if (numFlatComponents_ != 0) {
             size += com.google.protobuf.CodedOutputStream
    @@ -11804,39 +11499,41 @@ public static org.tensorflow.proto.Struct.TypeSpecProto parseFrom(
         }
         public static org.tensorflow.proto.Struct.TypeSpecProto parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.Struct.TypeSpecProto parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.Struct.TypeSpecProto parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.Struct.TypeSpecProto parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.Struct.TypeSpecProto parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.Struct.TypeSpecProto parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -11856,7 +11553,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -11868,7 +11565,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.TypeSpecProto}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.TypeSpecProto)
             org.tensorflow.proto.Struct.TypeSpecProtoOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -11877,7 +11574,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.Struct.internal_static_tensorflow_TypeSpecProto_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -11886,29 +11583,32 @@ public static final class Builder extends
     
           // Construct using org.tensorflow.proto.Struct.TypeSpecProto.newBuilder()
           private Builder() {
    -
    +        maybeForceBuilderInitialization();
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
    -
    +        maybeForceBuilderInitialization();
    +      }
    +      private void maybeForceBuilderInitialization() {
    +        if (com.google.protobuf.GeneratedMessage
    +                .alwaysUseFieldBuilders) {
    +          getTypeStateFieldBuilder();
    +        }
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             typeSpecClass_ = 0;
    -
    -        if (typeStateBuilder_ == null) {
    -          typeState_ = null;
    -        } else {
    -          typeState_ = null;
    +        typeState_ = null;
    +        if (typeStateBuilder_ != null) {
    +          typeStateBuilder_.dispose();
               typeStateBuilder_ = null;
             }
             typeSpecClassName_ = "";
    -
             numFlatComponents_ = 0;
    -
             return this;
           }
     
    @@ -11935,50 +11635,32 @@ public org.tensorflow.proto.Struct.TypeSpecProto build() {
           @java.lang.Override
           public org.tensorflow.proto.Struct.TypeSpecProto buildPartial() {
             org.tensorflow.proto.Struct.TypeSpecProto result = new org.tensorflow.proto.Struct.TypeSpecProto(this);
    -        result.typeSpecClass_ = typeSpecClass_;
    -        if (typeStateBuilder_ == null) {
    -          result.typeState_ = typeState_;
    -        } else {
    -          result.typeState_ = typeStateBuilder_.build();
    -        }
    -        result.typeSpecClassName_ = typeSpecClassName_;
    -        result.numFlatComponents_ = numFlatComponents_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.Struct.TypeSpecProto result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.typeSpecClass_ = typeSpecClass_;
    +        }
    +        int to_bitField0_ = 0;
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.typeState_ = typeStateBuilder_ == null
    +              ? typeState_
    +              : typeStateBuilder_.build();
    +          to_bitField0_ |= 0x00000001;
    +        }
    +        if (((from_bitField0_ & 0x00000004) != 0)) {
    +          result.typeSpecClassName_ = typeSpecClassName_;
    +        }
    +        if (((from_bitField0_ & 0x00000008) != 0)) {
    +          result.numFlatComponents_ = numFlatComponents_;
    +        }
    +        result.bitField0_ |= to_bitField0_;
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.Struct.TypeSpecProto) {
    @@ -11999,6 +11681,7 @@ public Builder mergeFrom(org.tensorflow.proto.Struct.TypeSpecProto other) {
             }
             if (!other.getTypeSpecClassName().isEmpty()) {
               typeSpecClassName_ = other.typeSpecClassName_;
    +          bitField0_ |= 0x00000004;
               onChanged();
             }
             if (other.getNumFlatComponents() != 0) {
    @@ -12032,24 +11715,24 @@ public Builder mergeFrom(
                     break;
                   case 8: {
                     typeSpecClass_ = input.readEnum();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 8
                   case 18: {
                     input.readMessage(
                         getTypeStateFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 18
                   case 26: {
                     typeSpecClassName_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000004;
                     break;
                   } // case 26
                   case 32: {
                     numFlatComponents_ = input.readInt32();
    -
    +                bitField0_ |= 0x00000008;
                     break;
                   } // case 32
                   default: {
    @@ -12067,6 +11750,7 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    +      private int bitField0_;
     
           private int typeSpecClass_ = 0;
           /**
    @@ -12082,8 +11766,8 @@ public Builder mergeFrom(
            * @return This builder for chaining.
            */
           public Builder setTypeSpecClassValue(int value) {
    -        
             typeSpecClass_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -12093,8 +11777,7 @@ public Builder setTypeSpecClassValue(int value) {
            */
           @java.lang.Override
           public org.tensorflow.proto.Struct.TypeSpecProto.TypeSpecClass getTypeSpecClass() {
    -        @SuppressWarnings("deprecation")
    -        org.tensorflow.proto.Struct.TypeSpecProto.TypeSpecClass result = org.tensorflow.proto.Struct.TypeSpecProto.TypeSpecClass.valueOf(typeSpecClass_);
    +        org.tensorflow.proto.Struct.TypeSpecProto.TypeSpecClass result = org.tensorflow.proto.Struct.TypeSpecProto.TypeSpecClass.forNumber(typeSpecClass_);
             return result == null ? org.tensorflow.proto.Struct.TypeSpecProto.TypeSpecClass.UNRECOGNIZED : result;
           }
           /**
    @@ -12106,7 +11789,7 @@ public Builder setTypeSpecClass(org.tensorflow.proto.Struct.TypeSpecProto.TypeSp
             if (value == null) {
               throw new NullPointerException();
             }
    -        
    +        bitField0_ |= 0x00000001;
             typeSpecClass_ = value.getNumber();
             onChanged();
             return this;
    @@ -12116,14 +11799,14 @@ public Builder setTypeSpecClass(org.tensorflow.proto.Struct.TypeSpecProto.TypeSp
            * @return This builder for chaining.
            */
           public Builder clearTypeSpecClass() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000001);
             typeSpecClass_ = 0;
             onChanged();
             return this;
           }
     
           private org.tensorflow.proto.Struct.StructuredValue typeState_;
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder> typeStateBuilder_;
           /**
            * 
    @@ -12134,7 +11817,7 @@ public Builder clearTypeSpecClass() {
            * @return Whether the typeState field is set.
            */
           public boolean hasTypeState() {
    -        return typeStateBuilder_ != null || typeState_ != null;
    +        return ((bitField0_ & 0x00000002) != 0);
           }
           /**
            * 
    @@ -12164,11 +11847,11 @@ public Builder setTypeState(org.tensorflow.proto.Struct.StructuredValue value) {
                 throw new NullPointerException();
               }
               typeState_ = value;
    -          onChanged();
             } else {
               typeStateBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000002;
    +        onChanged();
             return this;
           }
           /**
    @@ -12182,11 +11865,11 @@ public Builder setTypeState(
               org.tensorflow.proto.Struct.StructuredValue.Builder builderForValue) {
             if (typeStateBuilder_ == null) {
               typeState_ = builderForValue.build();
    -          onChanged();
             } else {
               typeStateBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000002;
    +        onChanged();
             return this;
           }
           /**
    @@ -12198,17 +11881,20 @@ public Builder setTypeState(
            */
           public Builder mergeTypeState(org.tensorflow.proto.Struct.StructuredValue value) {
             if (typeStateBuilder_ == null) {
    -          if (typeState_ != null) {
    -            typeState_ =
    -              org.tensorflow.proto.Struct.StructuredValue.newBuilder(typeState_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000002) != 0) &&
    +            typeState_ != null &&
    +            typeState_ != org.tensorflow.proto.Struct.StructuredValue.getDefaultInstance()) {
    +            getTypeStateBuilder().mergeFrom(value);
               } else {
                 typeState_ = value;
               }
    -          onChanged();
             } else {
               typeStateBuilder_.mergeFrom(value);
             }
    -
    +        if (typeState_ != null) {
    +          bitField0_ |= 0x00000002;
    +          onChanged();
    +        }
             return this;
           }
           /**
    @@ -12219,14 +11905,13 @@ public Builder mergeTypeState(org.tensorflow.proto.Struct.StructuredValue value)
            * .tensorflow.StructuredValue type_state = 2;
            */
           public Builder clearTypeState() {
    -        if (typeStateBuilder_ == null) {
    -          typeState_ = null;
    -          onChanged();
    -        } else {
    -          typeState_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000002);
    +        typeState_ = null;
    +        if (typeStateBuilder_ != null) {
    +          typeStateBuilder_.dispose();
               typeStateBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
    @@ -12237,7 +11922,7 @@ public Builder clearTypeState() {
            * .tensorflow.StructuredValue type_state = 2;
            */
           public org.tensorflow.proto.Struct.StructuredValue.Builder getTypeStateBuilder() {
    -        
    +        bitField0_ |= 0x00000002;
             onChanged();
             return getTypeStateFieldBuilder().getBuilder();
           }
    @@ -12263,11 +11948,11 @@ public org.tensorflow.proto.Struct.StructuredValueOrBuilder getTypeStateOrBuilde
            *
            * .tensorflow.StructuredValue type_state = 2;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder> 
               getTypeStateFieldBuilder() {
             if (typeStateBuilder_ == null) {
    -          typeStateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          typeStateBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder>(
                       getTypeState(),
                       getParentForChildren(),
    @@ -12281,13 +11966,13 @@ public org.tensorflow.proto.Struct.StructuredValueOrBuilder getTypeStateOrBuilde
           /**
            * 
            * The name of the TypeSpec class.
    -       *  * If type_spec_class == REGISTERED_TYPE_SPEC, the TypeSpec class is
    -       *    the one registered under this name. For types registered outside
    -       *    core TensorFlow by an add-on library, that library must be loaded
    -       *    before this value can be deserialized by nested_structure_coder.
    -       *  * If type_spec_class specifies a particular TypeSpec class, this field is
    -       *    redundant with the type_spec_class enum, and is only used for error
    -       *    reporting in older binaries that do not know the tupe_spec_class enum.
    +       * * If type_spec_class == REGISTERED_TYPE_SPEC, the TypeSpec class is
    +       * the one registered under this name. For types registered outside
    +       * core TensorFlow by an add-on library, that library must be loaded
    +       * before this value can be deserialized by nested_structure_coder.
    +       * * If type_spec_class specifies a particular TypeSpec class, this field is
    +       * redundant with the type_spec_class enum, and is only used for error
    +       * reporting in older binaries that do not know the tupe_spec_class enum.
            * 
    * * string type_spec_class_name = 3; @@ -12308,13 +11993,13 @@ public java.lang.String getTypeSpecClassName() { /** *
            * The name of the TypeSpec class.
    -       *  * If type_spec_class == REGISTERED_TYPE_SPEC, the TypeSpec class is
    -       *    the one registered under this name. For types registered outside
    -       *    core TensorFlow by an add-on library, that library must be loaded
    -       *    before this value can be deserialized by nested_structure_coder.
    -       *  * If type_spec_class specifies a particular TypeSpec class, this field is
    -       *    redundant with the type_spec_class enum, and is only used for error
    -       *    reporting in older binaries that do not know the tupe_spec_class enum.
    +       * * If type_spec_class == REGISTERED_TYPE_SPEC, the TypeSpec class is
    +       * the one registered under this name. For types registered outside
    +       * core TensorFlow by an add-on library, that library must be loaded
    +       * before this value can be deserialized by nested_structure_coder.
    +       * * If type_spec_class specifies a particular TypeSpec class, this field is
    +       * redundant with the type_spec_class enum, and is only used for error
    +       * reporting in older binaries that do not know the tupe_spec_class enum.
            * 
    * * string type_spec_class_name = 3; @@ -12336,13 +12021,13 @@ public java.lang.String getTypeSpecClassName() { /** *
            * The name of the TypeSpec class.
    -       *  * If type_spec_class == REGISTERED_TYPE_SPEC, the TypeSpec class is
    -       *    the one registered under this name. For types registered outside
    -       *    core TensorFlow by an add-on library, that library must be loaded
    -       *    before this value can be deserialized by nested_structure_coder.
    -       *  * If type_spec_class specifies a particular TypeSpec class, this field is
    -       *    redundant with the type_spec_class enum, and is only used for error
    -       *    reporting in older binaries that do not know the tupe_spec_class enum.
    +       * * If type_spec_class == REGISTERED_TYPE_SPEC, the TypeSpec class is
    +       * the one registered under this name. For types registered outside
    +       * core TensorFlow by an add-on library, that library must be loaded
    +       * before this value can be deserialized by nested_structure_coder.
    +       * * If type_spec_class specifies a particular TypeSpec class, this field is
    +       * redundant with the type_spec_class enum, and is only used for error
    +       * reporting in older binaries that do not know the tupe_spec_class enum.
            * 
    * * string type_spec_class_name = 3; @@ -12351,45 +12036,43 @@ public java.lang.String getTypeSpecClassName() { */ public Builder setTypeSpecClassName( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } typeSpecClassName_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } /** *
            * The name of the TypeSpec class.
    -       *  * If type_spec_class == REGISTERED_TYPE_SPEC, the TypeSpec class is
    -       *    the one registered under this name. For types registered outside
    -       *    core TensorFlow by an add-on library, that library must be loaded
    -       *    before this value can be deserialized by nested_structure_coder.
    -       *  * If type_spec_class specifies a particular TypeSpec class, this field is
    -       *    redundant with the type_spec_class enum, and is only used for error
    -       *    reporting in older binaries that do not know the tupe_spec_class enum.
    +       * * If type_spec_class == REGISTERED_TYPE_SPEC, the TypeSpec class is
    +       * the one registered under this name. For types registered outside
    +       * core TensorFlow by an add-on library, that library must be loaded
    +       * before this value can be deserialized by nested_structure_coder.
    +       * * If type_spec_class specifies a particular TypeSpec class, this field is
    +       * redundant with the type_spec_class enum, and is only used for error
    +       * reporting in older binaries that do not know the tupe_spec_class enum.
            * 
    * * string type_spec_class_name = 3; * @return This builder for chaining. */ public Builder clearTypeSpecClassName() { - typeSpecClassName_ = getDefaultInstance().getTypeSpecClassName(); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } /** *
            * The name of the TypeSpec class.
    -       *  * If type_spec_class == REGISTERED_TYPE_SPEC, the TypeSpec class is
    -       *    the one registered under this name. For types registered outside
    -       *    core TensorFlow by an add-on library, that library must be loaded
    -       *    before this value can be deserialized by nested_structure_coder.
    -       *  * If type_spec_class specifies a particular TypeSpec class, this field is
    -       *    redundant with the type_spec_class enum, and is only used for error
    -       *    reporting in older binaries that do not know the tupe_spec_class enum.
    +       * * If type_spec_class == REGISTERED_TYPE_SPEC, the TypeSpec class is
    +       * the one registered under this name. For types registered outside
    +       * core TensorFlow by an add-on library, that library must be loaded
    +       * before this value can be deserialized by nested_structure_coder.
    +       * * If type_spec_class specifies a particular TypeSpec class, this field is
    +       * redundant with the type_spec_class enum, and is only used for error
    +       * reporting in older binaries that do not know the tupe_spec_class enum.
            * 
    * * string type_spec_class_name = 3; @@ -12398,12 +12081,10 @@ public Builder clearTypeSpecClassName() { */ public Builder setTypeSpecClassNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); typeSpecClassName_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -12431,8 +12112,9 @@ public int getNumFlatComponents() { * @return This builder for chaining. */ public Builder setNumFlatComponents(int value) { - + numFlatComponents_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -12445,23 +12127,11 @@ public Builder setNumFlatComponents(int value) { * @return This builder for chaining. */ public Builder clearNumFlatComponents() { - + bitField0_ = (bitField0_ & ~0x00000008); numFlatComponents_ = 0; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.TypeSpecProto) } @@ -12517,57 +12187,57 @@ public org.tensorflow.proto.Struct.TypeSpecProto getDefaultInstanceForType() { private static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_StructuredValue_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_StructuredValue_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_NoneValue_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_NoneValue_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_ListValue_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_ListValue_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_TupleValue_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_TupleValue_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_DictValue_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_DictValue_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_DictValue_FieldsEntry_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_DictValue_FieldsEntry_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_PairValue_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_PairValue_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_NamedTupleValue_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_NamedTupleValue_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_TensorSpecProto_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_TensorSpecProto_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_BoundedTensorSpecProto_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_BoundedTensorSpecProto_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_TypeSpecProto_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_TypeSpecProto_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor @@ -12647,69 +12317,70 @@ public org.tensorflow.proto.Struct.TypeSpecProto getDefaultInstanceForType() { internal_static_tensorflow_StructuredValue_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_tensorflow_StructuredValue_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_StructuredValue_descriptor, new java.lang.String[] { "NoneValue", "Float64Value", "Int64Value", "StringValue", "BoolValue", "TensorShapeValue", "TensorDtypeValue", "TensorSpecValue", "TypeSpecValue", "BoundedTensorSpecValue", "ListValue", "TupleValue", "DictValue", "NamedTupleValue", "TensorValue", "NumpyValue", "Kind", }); internal_static_tensorflow_NoneValue_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_tensorflow_NoneValue_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_NoneValue_descriptor, new java.lang.String[] { }); internal_static_tensorflow_ListValue_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_tensorflow_ListValue_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_ListValue_descriptor, new java.lang.String[] { "Values", }); internal_static_tensorflow_TupleValue_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_tensorflow_TupleValue_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_TupleValue_descriptor, new java.lang.String[] { "Values", }); internal_static_tensorflow_DictValue_descriptor = getDescriptor().getMessageTypes().get(4); internal_static_tensorflow_DictValue_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_DictValue_descriptor, new java.lang.String[] { "Fields", }); internal_static_tensorflow_DictValue_FieldsEntry_descriptor = internal_static_tensorflow_DictValue_descriptor.getNestedTypes().get(0); internal_static_tensorflow_DictValue_FieldsEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_DictValue_FieldsEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_tensorflow_PairValue_descriptor = getDescriptor().getMessageTypes().get(5); internal_static_tensorflow_PairValue_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_PairValue_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_tensorflow_NamedTupleValue_descriptor = getDescriptor().getMessageTypes().get(6); internal_static_tensorflow_NamedTupleValue_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_NamedTupleValue_descriptor, new java.lang.String[] { "Name", "Values", }); internal_static_tensorflow_TensorSpecProto_descriptor = getDescriptor().getMessageTypes().get(7); internal_static_tensorflow_TensorSpecProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_TensorSpecProto_descriptor, new java.lang.String[] { "Name", "Shape", "Dtype", }); internal_static_tensorflow_BoundedTensorSpecProto_descriptor = getDescriptor().getMessageTypes().get(8); internal_static_tensorflow_BoundedTensorSpecProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_BoundedTensorSpecProto_descriptor, new java.lang.String[] { "Name", "Shape", "Dtype", "Minimum", "Maximum", }); internal_static_tensorflow_TypeSpecProto_descriptor = getDescriptor().getMessageTypes().get(9); internal_static_tensorflow_TypeSpecProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_TypeSpecProto_descriptor, new java.lang.String[] { "TypeSpecClass", "TypeState", "TypeSpecClassName", "NumFlatComponents", }); + descriptor.resolveAllFeaturesImmutable(); org.tensorflow.proto.TensorProtos.getDescriptor(); org.tensorflow.proto.TensorShapeProtos.getDescriptor(); org.tensorflow.proto.TypesProtos.getDescriptor(); diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Summary.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Summary.java index b0d93b6bf38..ee1bb65c4cd 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Summary.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Summary.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/framework/summary.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -7,6 +9,7 @@ *
      * A Summary is a set of named values to be displayed by the
      * visualizer.
    + *
      * Summaries are produced regularly during training, as controlled by
      * the "summary_interval_secs" attribute of the training operation.
      * Summaries are also produced at the end of an evaluation.
    @@ -15,37 +18,34 @@
      * Protobuf type {@code tensorflow.Summary}
      */
     public final class Summary extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.Summary)
         SummaryOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      Summary.class.getName());
    +  }
       // Use Summary.newBuilder() to construct.
    -  private Summary(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private Summary(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private Summary() {
         value_ = java.util.Collections.emptyList();
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new Summary();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.SummaryProtos.internal_static_tensorflow_Summary_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.SummaryProtos.internal_static_tensorflow_Summary_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -75,12 +75,12 @@ public interface ImageOrBuilder extends
         /**
          * 
          * Valid colorspace values are
    -     *   1 - grayscale
    -     *   2 - grayscale + alpha
    -     *   3 - RGB
    -     *   4 - RGBA
    -     *   5 - DIGITAL_YUV
    -     *   6 - BGRA
    +     * 1 - grayscale
    +     * 2 - grayscale + alpha
    +     * 3 - RGB
    +     * 4 - RGBA
    +     * 5 - DIGITAL_YUV
    +     * 6 - BGRA
          * 
    * * int32 colorspace = 3; @@ -103,37 +103,34 @@ public interface ImageOrBuilder extends * Protobuf type {@code tensorflow.Summary.Image} */ public static final class Image extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.Summary.Image) ImageOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + Image.class.getName()); + } // Use Image.newBuilder() to construct. - private Image(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Image(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Image() { encodedImageString_ = com.google.protobuf.ByteString.EMPTY; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Image(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.SummaryProtos.internal_static_tensorflow_Summary_Image_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.SummaryProtos.internal_static_tensorflow_Summary_Image_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -141,7 +138,7 @@ protected java.lang.Object newInstance( } public static final int HEIGHT_FIELD_NUMBER = 1; - private int height_; + private int height_ = 0; /** *
          * Dimensions of the image.
    @@ -156,7 +153,7 @@ public int getHeight() {
         }
     
         public static final int WIDTH_FIELD_NUMBER = 2;
    -    private int width_;
    +    private int width_ = 0;
         /**
          * int32 width = 2;
          * @return The width.
    @@ -167,16 +164,16 @@ public int getWidth() {
         }
     
         public static final int COLORSPACE_FIELD_NUMBER = 3;
    -    private int colorspace_;
    +    private int colorspace_ = 0;
         /**
          * 
          * Valid colorspace values are
    -     *   1 - grayscale
    -     *   2 - grayscale + alpha
    -     *   3 - RGB
    -     *   4 - RGBA
    -     *   5 - DIGITAL_YUV
    -     *   6 - BGRA
    +     * 1 - grayscale
    +     * 2 - grayscale + alpha
    +     * 3 - RGB
    +     * 4 - RGBA
    +     * 5 - DIGITAL_YUV
    +     * 6 - BGRA
          * 
    * * int32 colorspace = 3; @@ -188,7 +185,7 @@ public int getColorspace() { } public static final int ENCODED_IMAGE_STRING_FIELD_NUMBER = 4; - private com.google.protobuf.ByteString encodedImageString_; + private com.google.protobuf.ByteString encodedImageString_ = com.google.protobuf.ByteString.EMPTY; /** *
          * Image data in encoded format.  All image formats supported by
    @@ -335,39 +332,41 @@ public static org.tensorflow.proto.Summary.Image parseFrom(
         }
         public static org.tensorflow.proto.Summary.Image parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.Summary.Image parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.Summary.Image parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.Summary.Image parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.Summary.Image parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.Summary.Image parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -387,7 +386,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -395,7 +394,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.Summary.Image}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.Summary.Image)
             org.tensorflow.proto.Summary.ImageOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -404,7 +403,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.SummaryProtos.internal_static_tensorflow_Summary_Image_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -417,21 +416,18 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             height_ = 0;
    -
             width_ = 0;
    -
             colorspace_ = 0;
    -
             encodedImageString_ = com.google.protobuf.ByteString.EMPTY;
    -
             return this;
           }
     
    @@ -458,46 +454,27 @@ public org.tensorflow.proto.Summary.Image build() {
           @java.lang.Override
           public org.tensorflow.proto.Summary.Image buildPartial() {
             org.tensorflow.proto.Summary.Image result = new org.tensorflow.proto.Summary.Image(this);
    -        result.height_ = height_;
    -        result.width_ = width_;
    -        result.colorspace_ = colorspace_;
    -        result.encodedImageString_ = encodedImageString_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.Summary.Image result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.height_ = height_;
    +        }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.width_ = width_;
    +        }
    +        if (((from_bitField0_ & 0x00000004) != 0)) {
    +          result.colorspace_ = colorspace_;
    +        }
    +        if (((from_bitField0_ & 0x00000008) != 0)) {
    +          result.encodedImageString_ = encodedImageString_;
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.Summary.Image) {
    @@ -550,22 +527,22 @@ public Builder mergeFrom(
                     break;
                   case 8: {
                     height_ = input.readInt32();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 8
                   case 16: {
                     width_ = input.readInt32();
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 16
                   case 24: {
                     colorspace_ = input.readInt32();
    -
    +                bitField0_ |= 0x00000004;
                     break;
                   } // case 24
                   case 34: {
                     encodedImageString_ = input.readBytes();
    -
    +                bitField0_ |= 0x00000008;
                     break;
                   } // case 34
                   default: {
    @@ -583,6 +560,7 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    +      private int bitField0_;
     
           private int height_ ;
           /**
    @@ -607,8 +585,9 @@ public int getHeight() {
            * @return This builder for chaining.
            */
           public Builder setHeight(int value) {
    -        
    +
             height_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -621,7 +600,7 @@ public Builder setHeight(int value) {
            * @return This builder for chaining.
            */
           public Builder clearHeight() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000001);
             height_ = 0;
             onChanged();
             return this;
    @@ -642,8 +621,9 @@ public int getWidth() {
            * @return This builder for chaining.
            */
           public Builder setWidth(int value) {
    -        
    +
             width_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -652,7 +632,7 @@ public Builder setWidth(int value) {
            * @return This builder for chaining.
            */
           public Builder clearWidth() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000002);
             width_ = 0;
             onChanged();
             return this;
    @@ -662,12 +642,12 @@ public Builder clearWidth() {
           /**
            * 
            * Valid colorspace values are
    -       *   1 - grayscale
    -       *   2 - grayscale + alpha
    -       *   3 - RGB
    -       *   4 - RGBA
    -       *   5 - DIGITAL_YUV
    -       *   6 - BGRA
    +       * 1 - grayscale
    +       * 2 - grayscale + alpha
    +       * 3 - RGB
    +       * 4 - RGBA
    +       * 5 - DIGITAL_YUV
    +       * 6 - BGRA
            * 
    * * int32 colorspace = 3; @@ -680,12 +660,12 @@ public int getColorspace() { /** *
            * Valid colorspace values are
    -       *   1 - grayscale
    -       *   2 - grayscale + alpha
    -       *   3 - RGB
    -       *   4 - RGBA
    -       *   5 - DIGITAL_YUV
    -       *   6 - BGRA
    +       * 1 - grayscale
    +       * 2 - grayscale + alpha
    +       * 3 - RGB
    +       * 4 - RGBA
    +       * 5 - DIGITAL_YUV
    +       * 6 - BGRA
            * 
    * * int32 colorspace = 3; @@ -693,27 +673,28 @@ public int getColorspace() { * @return This builder for chaining. */ public Builder setColorspace(int value) { - + colorspace_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } /** *
            * Valid colorspace values are
    -       *   1 - grayscale
    -       *   2 - grayscale + alpha
    -       *   3 - RGB
    -       *   4 - RGBA
    -       *   5 - DIGITAL_YUV
    -       *   6 - BGRA
    +       * 1 - grayscale
    +       * 2 - grayscale + alpha
    +       * 3 - RGB
    +       * 4 - RGBA
    +       * 5 - DIGITAL_YUV
    +       * 6 - BGRA
            * 
    * * int32 colorspace = 3; * @return This builder for chaining. */ public Builder clearColorspace() { - + bitField0_ = (bitField0_ & ~0x00000004); colorspace_ = 0; onChanged(); return this; @@ -744,11 +725,9 @@ public com.google.protobuf.ByteString getEncodedImageString() { * @return This builder for chaining. */ public Builder setEncodedImageString(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } encodedImageString_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -762,23 +741,11 @@ public Builder setEncodedImageString(com.google.protobuf.ByteString value) { * @return This builder for chaining. */ public Builder clearEncodedImageString() { - + bitField0_ = (bitField0_ & ~0x00000008); encodedImageString_ = getDefaultInstance().getEncodedImageString(); onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.Summary.Image) } @@ -892,12 +859,21 @@ public interface AudioOrBuilder extends * Protobuf type {@code tensorflow.Summary.Audio} */ public static final class Audio extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.Summary.Audio) AudioOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + Audio.class.getName()); + } // Use Audio.newBuilder() to construct. - private Audio(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Audio(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Audio() { @@ -905,25 +881,13 @@ private Audio() { contentType_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Audio(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.SummaryProtos.internal_static_tensorflow_Summary_Audio_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.SummaryProtos.internal_static_tensorflow_Summary_Audio_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -931,7 +895,7 @@ protected java.lang.Object newInstance( } public static final int SAMPLE_RATE_FIELD_NUMBER = 1; - private float sampleRate_; + private float sampleRate_ = 0F; /** *
          * Sample rate of the audio in Hz.
    @@ -946,7 +910,7 @@ public float getSampleRate() {
         }
     
         public static final int NUM_CHANNELS_FIELD_NUMBER = 2;
    -    private long numChannels_;
    +    private long numChannels_ = 0L;
         /**
          * 
          * Number of channels of audio.
    @@ -961,7 +925,7 @@ public long getNumChannels() {
         }
     
         public static final int LENGTH_FRAMES_FIELD_NUMBER = 3;
    -    private long lengthFrames_;
    +    private long lengthFrames_ = 0L;
         /**
          * 
          * Length of the audio in frames (samples per channel).
    @@ -976,7 +940,7 @@ public long getLengthFrames() {
         }
     
         public static final int ENCODED_AUDIO_STRING_FIELD_NUMBER = 4;
    -    private com.google.protobuf.ByteString encodedAudioString_;
    +    private com.google.protobuf.ByteString encodedAudioString_ = com.google.protobuf.ByteString.EMPTY;
         /**
          * 
          * Encoded audio data and its associated RFC 2045 content type (e.g.
    @@ -992,7 +956,8 @@ public com.google.protobuf.ByteString getEncodedAudioString() {
         }
     
         public static final int CONTENT_TYPE_FIELD_NUMBER = 5;
    -    private volatile java.lang.Object contentType_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object contentType_ = "";
         /**
          * string content_type = 5;
          * @return The contentType.
    @@ -1055,8 +1020,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           if (!encodedAudioString_.isEmpty()) {
             output.writeBytes(4, encodedAudioString_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contentType_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 5, contentType_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(contentType_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 5, contentType_);
           }
           getUnknownFields().writeTo(output);
         }
    @@ -1083,8 +1048,8 @@ public int getSerializedSize() {
             size += com.google.protobuf.CodedOutputStream
               .computeBytesSize(4, encodedAudioString_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contentType_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, contentType_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(contentType_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(5, contentType_);
           }
           size += getUnknownFields().getSerializedSize();
           memoizedSize = size;
    @@ -1175,39 +1140,41 @@ public static org.tensorflow.proto.Summary.Audio parseFrom(
         }
         public static org.tensorflow.proto.Summary.Audio parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.Summary.Audio parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.Summary.Audio parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.Summary.Audio parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.Summary.Audio parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.Summary.Audio parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -1227,7 +1194,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -1235,7 +1202,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.Summary.Audio}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.Summary.Audio)
             org.tensorflow.proto.Summary.AudioOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -1244,7 +1211,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.SummaryProtos.internal_static_tensorflow_Summary_Audio_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -1257,23 +1224,19 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             sampleRate_ = 0F;
    -
             numChannels_ = 0L;
    -
             lengthFrames_ = 0L;
    -
             encodedAudioString_ = com.google.protobuf.ByteString.EMPTY;
    -
             contentType_ = "";
    -
             return this;
           }
     
    @@ -1300,47 +1263,30 @@ public org.tensorflow.proto.Summary.Audio build() {
           @java.lang.Override
           public org.tensorflow.proto.Summary.Audio buildPartial() {
             org.tensorflow.proto.Summary.Audio result = new org.tensorflow.proto.Summary.Audio(this);
    -        result.sampleRate_ = sampleRate_;
    -        result.numChannels_ = numChannels_;
    -        result.lengthFrames_ = lengthFrames_;
    -        result.encodedAudioString_ = encodedAudioString_;
    -        result.contentType_ = contentType_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.Summary.Audio result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.sampleRate_ = sampleRate_;
    +        }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.numChannels_ = numChannels_;
    +        }
    +        if (((from_bitField0_ & 0x00000004) != 0)) {
    +          result.lengthFrames_ = lengthFrames_;
    +        }
    +        if (((from_bitField0_ & 0x00000008) != 0)) {
    +          result.encodedAudioString_ = encodedAudioString_;
    +        }
    +        if (((from_bitField0_ & 0x00000010) != 0)) {
    +          result.contentType_ = contentType_;
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.Summary.Audio) {
    @@ -1367,6 +1313,7 @@ public Builder mergeFrom(org.tensorflow.proto.Summary.Audio other) {
             }
             if (!other.getContentType().isEmpty()) {
               contentType_ = other.contentType_;
    +          bitField0_ |= 0x00000010;
               onChanged();
             }
             this.mergeUnknownFields(other.getUnknownFields());
    @@ -1397,27 +1344,27 @@ public Builder mergeFrom(
                     break;
                   case 13: {
                     sampleRate_ = input.readFloat();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 13
                   case 16: {
                     numChannels_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 16
                   case 24: {
                     lengthFrames_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000004;
                     break;
                   } // case 24
                   case 34: {
                     encodedAudioString_ = input.readBytes();
    -
    +                bitField0_ |= 0x00000008;
                     break;
                   } // case 34
                   case 42: {
                     contentType_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000010;
                     break;
                   } // case 42
                   default: {
    @@ -1435,6 +1382,7 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    +      private int bitField0_;
     
           private float sampleRate_ ;
           /**
    @@ -1459,8 +1407,9 @@ public float getSampleRate() {
            * @return This builder for chaining.
            */
           public Builder setSampleRate(float value) {
    -        
    +
             sampleRate_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -1473,7 +1422,7 @@ public Builder setSampleRate(float value) {
            * @return This builder for chaining.
            */
           public Builder clearSampleRate() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000001);
             sampleRate_ = 0F;
             onChanged();
             return this;
    @@ -1502,8 +1451,9 @@ public long getNumChannels() {
            * @return This builder for chaining.
            */
           public Builder setNumChannels(long value) {
    -        
    +
             numChannels_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -1516,7 +1466,7 @@ public Builder setNumChannels(long value) {
            * @return This builder for chaining.
            */
           public Builder clearNumChannels() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000002);
             numChannels_ = 0L;
             onChanged();
             return this;
    @@ -1545,8 +1495,9 @@ public long getLengthFrames() {
            * @return This builder for chaining.
            */
           public Builder setLengthFrames(long value) {
    -        
    +
             lengthFrames_ = value;
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -1559,7 +1510,7 @@ public Builder setLengthFrames(long value) {
            * @return This builder for chaining.
            */
           public Builder clearLengthFrames() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000004);
             lengthFrames_ = 0L;
             onChanged();
             return this;
    @@ -1590,11 +1541,9 @@ public com.google.protobuf.ByteString getEncodedAudioString() {
            * @return This builder for chaining.
            */
           public Builder setEncodedAudioString(com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             encodedAudioString_ = value;
    +        bitField0_ |= 0x00000008;
             onChanged();
             return this;
           }
    @@ -1608,7 +1557,7 @@ public Builder setEncodedAudioString(com.google.protobuf.ByteString value) {
            * @return This builder for chaining.
            */
           public Builder clearEncodedAudioString() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000008);
             encodedAudioString_ = getDefaultInstance().getEncodedAudioString();
             onChanged();
             return this;
    @@ -1655,11 +1604,9 @@ public java.lang.String getContentType() {
            */
           public Builder setContentType(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             contentType_ = value;
    +        bitField0_ |= 0x00000010;
             onChanged();
             return this;
           }
    @@ -1668,8 +1615,8 @@ public Builder setContentType(
            * @return This builder for chaining.
            */
           public Builder clearContentType() {
    -        
             contentType_ = getDefaultInstance().getContentType();
    +        bitField0_ = (bitField0_ & ~0x00000010);
             onChanged();
             return this;
           }
    @@ -1680,27 +1627,13 @@ public Builder clearContentType() {
            */
           public Builder setContentTypeBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             contentType_ = value;
    +        bitField0_ |= 0x00000010;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.Summary.Audio)
         }
    @@ -1922,18 +1855,27 @@ public interface ValueOrBuilder extends
          */
         org.tensorflow.proto.TensorProtoOrBuilder getTensorOrBuilder();
     
    -    public org.tensorflow.proto.Summary.Value.ValueCase getValueCase();
    +    org.tensorflow.proto.Summary.Value.ValueCase getValueCase();
       }
       /**
        * Protobuf type {@code tensorflow.Summary.Value}
        */
       public static final class Value extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.Summary.Value)
           ValueOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        Value.class.getName());
    +    }
         // Use Value.newBuilder() to construct.
    -    private Value(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private Value(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private Value() {
    @@ -1941,32 +1883,22 @@ private Value() {
           tag_ = "";
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new Value();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.SummaryProtos.internal_static_tensorflow_Summary_Value_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.SummaryProtos.internal_static_tensorflow_Summary_Value_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
                   org.tensorflow.proto.Summary.Value.class, org.tensorflow.proto.Summary.Value.Builder.class);
         }
     
    +    private int bitField0_;
         private int valueCase_ = 0;
    +    @SuppressWarnings("serial")
         private java.lang.Object value_;
         public enum ValueCase
             implements com.google.protobuf.Internal.EnumLite,
    @@ -2016,7 +1948,8 @@ public int getNumber() {
         }
     
         public static final int NODE_NAME_FIELD_NUMBER = 7;
    -    private volatile java.lang.Object nodeName_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object nodeName_ = "";
         /**
          * 
          * This field is deprecated and will not be set.
    @@ -2062,7 +1995,8 @@ public java.lang.String getNodeName() {
         }
     
         public static final int TAG_FIELD_NUMBER = 1;
    -    private volatile java.lang.Object tag_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object tag_ = "";
         /**
          * 
          * Tag name for the data. Used by TensorBoard plugins to organize data. Tags
    @@ -2127,7 +2061,7 @@ public java.lang.String getTag() {
          */
         @java.lang.Override
         public boolean hasMetadata() {
    -      return metadata_ != null;
    +      return ((bitField0_ & 0x00000001) != 0);
         }
         /**
          * 
    @@ -2158,7 +2092,7 @@ public org.tensorflow.proto.SummaryMetadata getMetadata() {
          */
         @java.lang.Override
         public org.tensorflow.proto.SummaryMetadataOrBuilder getMetadataOrBuilder() {
    -      return getMetadata();
    +      return metadata_ == null ? org.tensorflow.proto.SummaryMetadata.getDefaultInstance() : metadata_;
         }
     
         public static final int SIMPLE_VALUE_FIELD_NUMBER = 2;
    @@ -2341,8 +2275,8 @@ public final boolean isInitialized() {
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output)
                             throws java.io.IOException {
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tag_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tag_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tag_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 1, tag_);
           }
           if (valueCase_ == 2) {
             output.writeFloat(
    @@ -2361,13 +2295,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           if (valueCase_ == 6) {
             output.writeMessage(6, (org.tensorflow.proto.Summary.Audio) value_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodeName_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 7, nodeName_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nodeName_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 7, nodeName_);
           }
           if (valueCase_ == 8) {
             output.writeMessage(8, (org.tensorflow.proto.TensorProto) value_);
           }
    -      if (metadata_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             output.writeMessage(9, getMetadata());
           }
           getUnknownFields().writeTo(output);
    @@ -2379,8 +2313,8 @@ public int getSerializedSize() {
           if (size != -1) return size;
     
           size = 0;
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tag_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tag_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tag_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, tag_);
           }
           if (valueCase_ == 2) {
             size += com.google.protobuf.CodedOutputStream
    @@ -2404,14 +2338,14 @@ public int getSerializedSize() {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(6, (org.tensorflow.proto.Summary.Audio) value_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodeName_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, nodeName_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nodeName_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(7, nodeName_);
           }
           if (valueCase_ == 8) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(8, (org.tensorflow.proto.TensorProto) value_);
           }
    -      if (metadata_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(9, getMetadata());
           }
    @@ -2556,39 +2490,41 @@ public static org.tensorflow.proto.Summary.Value parseFrom(
         }
         public static org.tensorflow.proto.Summary.Value parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.Summary.Value parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.Summary.Value parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.Summary.Value parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.Summary.Value parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.Summary.Value parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -2608,7 +2544,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -2616,7 +2552,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.Summary.Value}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.Summary.Value)
             org.tensorflow.proto.Summary.ValueOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -2625,7 +2561,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.SummaryProtos.internal_static_tensorflow_Summary_Value_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -2634,25 +2570,29 @@ public static final class Builder extends
     
           // Construct using org.tensorflow.proto.Summary.Value.newBuilder()
           private Builder() {
    -
    +        maybeForceBuilderInitialization();
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
    -
    +        maybeForceBuilderInitialization();
    +      }
    +      private void maybeForceBuilderInitialization() {
    +        if (com.google.protobuf.GeneratedMessage
    +                .alwaysUseFieldBuilders) {
    +          getMetadataFieldBuilder();
    +        }
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             nodeName_ = "";
    -
             tag_ = "";
    -
    -        if (metadataBuilder_ == null) {
    -          metadata_ = null;
    -        } else {
    -          metadata_ = null;
    +        metadata_ = null;
    +        if (metadataBuilder_ != null) {
    +          metadataBuilder_.dispose();
               metadataBuilder_ = null;
             }
             if (imageBuilder_ != null) {
    @@ -2695,84 +2635,51 @@ public org.tensorflow.proto.Summary.Value build() {
           @java.lang.Override
           public org.tensorflow.proto.Summary.Value buildPartial() {
             org.tensorflow.proto.Summary.Value result = new org.tensorflow.proto.Summary.Value(this);
    -        result.nodeName_ = nodeName_;
    -        result.tag_ = tag_;
    -        if (metadataBuilder_ == null) {
    -          result.metadata_ = metadata_;
    -        } else {
    -          result.metadata_ = metadataBuilder_.build();
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        buildPartialOneofs(result);
    +        onBuilt();
    +        return result;
    +      }
    +
    +      private void buildPartial0(org.tensorflow.proto.Summary.Value result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.nodeName_ = nodeName_;
             }
    -        if (valueCase_ == 2) {
    -          result.value_ = value_;
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.tag_ = tag_;
             }
    -        if (valueCase_ == 3) {
    -          result.value_ = value_;
    +        int to_bitField0_ = 0;
    +        if (((from_bitField0_ & 0x00000004) != 0)) {
    +          result.metadata_ = metadataBuilder_ == null
    +              ? metadata_
    +              : metadataBuilder_.build();
    +          to_bitField0_ |= 0x00000001;
             }
    -        if (valueCase_ == 4) {
    -          if (imageBuilder_ == null) {
    -            result.value_ = value_;
    -          } else {
    -            result.value_ = imageBuilder_.build();
    -          }
    +        result.bitField0_ |= to_bitField0_;
    +      }
    +
    +      private void buildPartialOneofs(org.tensorflow.proto.Summary.Value result) {
    +        result.valueCase_ = valueCase_;
    +        result.value_ = this.value_;
    +        if (valueCase_ == 4 &&
    +            imageBuilder_ != null) {
    +          result.value_ = imageBuilder_.build();
             }
    -        if (valueCase_ == 5) {
    -          if (histoBuilder_ == null) {
    -            result.value_ = value_;
    -          } else {
    -            result.value_ = histoBuilder_.build();
    -          }
    +        if (valueCase_ == 5 &&
    +            histoBuilder_ != null) {
    +          result.value_ = histoBuilder_.build();
             }
    -        if (valueCase_ == 6) {
    -          if (audioBuilder_ == null) {
    -            result.value_ = value_;
    -          } else {
    -            result.value_ = audioBuilder_.build();
    -          }
    +        if (valueCase_ == 6 &&
    +            audioBuilder_ != null) {
    +          result.value_ = audioBuilder_.build();
             }
    -        if (valueCase_ == 8) {
    -          if (tensorBuilder_ == null) {
    -            result.value_ = value_;
    -          } else {
    -            result.value_ = tensorBuilder_.build();
    -          }
    +        if (valueCase_ == 8 &&
    +            tensorBuilder_ != null) {
    +          result.value_ = tensorBuilder_.build();
             }
    -        result.valueCase_ = valueCase_;
    -        onBuilt();
    -        return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    -      }
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.Summary.Value) {
    @@ -2787,10 +2694,12 @@ public Builder mergeFrom(org.tensorflow.proto.Summary.Value other) {
             if (other == org.tensorflow.proto.Summary.Value.getDefaultInstance()) return this;
             if (!other.getNodeName().isEmpty()) {
               nodeName_ = other.nodeName_;
    +          bitField0_ |= 0x00000001;
               onChanged();
             }
             if (!other.getTag().isEmpty()) {
               tag_ = other.tag_;
    +          bitField0_ |= 0x00000002;
               onChanged();
             }
             if (other.hasMetadata()) {
    @@ -2853,7 +2762,7 @@ public Builder mergeFrom(
                     break;
                   case 10: {
                     tag_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 10
                   case 21: {
    @@ -2889,7 +2798,7 @@ public Builder mergeFrom(
                   } // case 50
                   case 58: {
                     nodeName_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 58
                   case 66: {
    @@ -2903,7 +2812,7 @@ public Builder mergeFrom(
                     input.readMessage(
                         getMetadataFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00000004;
                     break;
                   } // case 74
                   default: {
    @@ -2936,6 +2845,7 @@ public Builder clearValue() {
             return this;
           }
     
    +      private int bitField0_;
     
           private java.lang.Object nodeName_ = "";
           /**
    @@ -2990,11 +2900,9 @@ public java.lang.String getNodeName() {
            */
           public Builder setNodeName(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             nodeName_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -3007,8 +2915,8 @@ public Builder setNodeName(
            * @return This builder for chaining.
            */
           public Builder clearNodeName() {
    -        
             nodeName_ = getDefaultInstance().getNodeName();
    +        bitField0_ = (bitField0_ & ~0x00000001);
             onChanged();
             return this;
           }
    @@ -3023,12 +2931,10 @@ public Builder clearNodeName() {
            */
           public Builder setNodeNameBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             nodeName_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -3092,11 +2998,9 @@ public java.lang.String getTag() {
            */
           public Builder setTag(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             tag_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -3111,8 +3015,8 @@ public Builder setTag(
            * @return This builder for chaining.
            */
           public Builder clearTag() {
    -        
             tag_ = getDefaultInstance().getTag();
    +        bitField0_ = (bitField0_ & ~0x00000002);
             onChanged();
             return this;
           }
    @@ -3129,18 +3033,16 @@ public Builder clearTag() {
            */
           public Builder setTagBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             tag_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
     
           private org.tensorflow.proto.SummaryMetadata metadata_;
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.SummaryMetadata, org.tensorflow.proto.SummaryMetadata.Builder, org.tensorflow.proto.SummaryMetadataOrBuilder> metadataBuilder_;
           /**
            * 
    @@ -3155,7 +3057,7 @@ public Builder setTagBytes(
            * @return Whether the metadata field is set.
            */
           public boolean hasMetadata() {
    -        return metadataBuilder_ != null || metadata_ != null;
    +        return ((bitField0_ & 0x00000004) != 0);
           }
           /**
            * 
    @@ -3193,11 +3095,11 @@ public Builder setMetadata(org.tensorflow.proto.SummaryMetadata value) {
                 throw new NullPointerException();
               }
               metadata_ = value;
    -          onChanged();
             } else {
               metadataBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000004;
    +        onChanged();
             return this;
           }
           /**
    @@ -3215,11 +3117,11 @@ public Builder setMetadata(
               org.tensorflow.proto.SummaryMetadata.Builder builderForValue) {
             if (metadataBuilder_ == null) {
               metadata_ = builderForValue.build();
    -          onChanged();
             } else {
               metadataBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000004;
    +        onChanged();
             return this;
           }
           /**
    @@ -3235,17 +3137,20 @@ public Builder setMetadata(
            */
           public Builder mergeMetadata(org.tensorflow.proto.SummaryMetadata value) {
             if (metadataBuilder_ == null) {
    -          if (metadata_ != null) {
    -            metadata_ =
    -              org.tensorflow.proto.SummaryMetadata.newBuilder(metadata_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000004) != 0) &&
    +            metadata_ != null &&
    +            metadata_ != org.tensorflow.proto.SummaryMetadata.getDefaultInstance()) {
    +            getMetadataBuilder().mergeFrom(value);
               } else {
                 metadata_ = value;
               }
    -          onChanged();
             } else {
               metadataBuilder_.mergeFrom(value);
             }
    -
    +        if (metadata_ != null) {
    +          bitField0_ |= 0x00000004;
    +          onChanged();
    +        }
             return this;
           }
           /**
    @@ -3260,14 +3165,13 @@ public Builder mergeMetadata(org.tensorflow.proto.SummaryMetadata value) {
            * .tensorflow.SummaryMetadata metadata = 9;
            */
           public Builder clearMetadata() {
    -        if (metadataBuilder_ == null) {
    -          metadata_ = null;
    -          onChanged();
    -        } else {
    -          metadata_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000004);
    +        metadata_ = null;
    +        if (metadataBuilder_ != null) {
    +          metadataBuilder_.dispose();
               metadataBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
    @@ -3282,7 +3186,7 @@ public Builder clearMetadata() {
            * .tensorflow.SummaryMetadata metadata = 9;
            */
           public org.tensorflow.proto.SummaryMetadata.Builder getMetadataBuilder() {
    -        
    +        bitField0_ |= 0x00000004;
             onChanged();
             return getMetadataFieldBuilder().getBuilder();
           }
    @@ -3316,11 +3220,11 @@ public org.tensorflow.proto.SummaryMetadataOrBuilder getMetadataOrBuilder() {
            *
            * .tensorflow.SummaryMetadata metadata = 9;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.SummaryMetadata, org.tensorflow.proto.SummaryMetadata.Builder, org.tensorflow.proto.SummaryMetadataOrBuilder> 
               getMetadataFieldBuilder() {
             if (metadataBuilder_ == null) {
    -          metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          metadataBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.SummaryMetadata, org.tensorflow.proto.SummaryMetadata.Builder, org.tensorflow.proto.SummaryMetadataOrBuilder>(
                       getMetadata(),
                       getParentForChildren(),
    @@ -3353,6 +3257,7 @@ public float getSimpleValue() {
            * @return This builder for chaining.
            */
           public Builder setSimpleValue(float value) {
    +
             valueCase_ = 2;
             value_ = value;
             onChanged();
    @@ -3394,10 +3299,8 @@ public com.google.protobuf.ByteString getObsoleteOldStyleHistogram() {
            * @return This builder for chaining.
            */
           public Builder setObsoleteOldStyleHistogram(com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  valueCase_ = 3;
    +        if (value == null) { throw new NullPointerException(); }
    +        valueCase_ = 3;
             value_ = value;
             onChanged();
             return this;
    @@ -3415,7 +3318,7 @@ public Builder clearObsoleteOldStyleHistogram() {
             return this;
           }
     
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Summary.Image, org.tensorflow.proto.Summary.Image.Builder, org.tensorflow.proto.Summary.ImageOrBuilder> imageBuilder_;
           /**
            * .tensorflow.Summary.Image image = 4;
    @@ -3538,14 +3441,14 @@ public org.tensorflow.proto.Summary.ImageOrBuilder getImageOrBuilder() {
           /**
            * .tensorflow.Summary.Image image = 4;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Summary.Image, org.tensorflow.proto.Summary.Image.Builder, org.tensorflow.proto.Summary.ImageOrBuilder> 
               getImageFieldBuilder() {
             if (imageBuilder_ == null) {
               if (!(valueCase_ == 4)) {
                 value_ = org.tensorflow.proto.Summary.Image.getDefaultInstance();
               }
    -          imageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          imageBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.Summary.Image, org.tensorflow.proto.Summary.Image.Builder, org.tensorflow.proto.Summary.ImageOrBuilder>(
                       (org.tensorflow.proto.Summary.Image) value_,
                       getParentForChildren(),
    @@ -3553,11 +3456,11 @@ public org.tensorflow.proto.Summary.ImageOrBuilder getImageOrBuilder() {
               value_ = null;
             }
             valueCase_ = 4;
    -        onChanged();;
    +        onChanged();
             return imageBuilder_;
           }
     
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.HistogramProto, org.tensorflow.proto.HistogramProto.Builder, org.tensorflow.proto.HistogramProtoOrBuilder> histoBuilder_;
           /**
            * .tensorflow.HistogramProto histo = 5;
    @@ -3680,14 +3583,14 @@ public org.tensorflow.proto.HistogramProtoOrBuilder getHistoOrBuilder() {
           /**
            * .tensorflow.HistogramProto histo = 5;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.HistogramProto, org.tensorflow.proto.HistogramProto.Builder, org.tensorflow.proto.HistogramProtoOrBuilder> 
               getHistoFieldBuilder() {
             if (histoBuilder_ == null) {
               if (!(valueCase_ == 5)) {
                 value_ = org.tensorflow.proto.HistogramProto.getDefaultInstance();
               }
    -          histoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          histoBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.HistogramProto, org.tensorflow.proto.HistogramProto.Builder, org.tensorflow.proto.HistogramProtoOrBuilder>(
                       (org.tensorflow.proto.HistogramProto) value_,
                       getParentForChildren(),
    @@ -3695,11 +3598,11 @@ public org.tensorflow.proto.HistogramProtoOrBuilder getHistoOrBuilder() {
               value_ = null;
             }
             valueCase_ = 5;
    -        onChanged();;
    +        onChanged();
             return histoBuilder_;
           }
     
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Summary.Audio, org.tensorflow.proto.Summary.Audio.Builder, org.tensorflow.proto.Summary.AudioOrBuilder> audioBuilder_;
           /**
            * .tensorflow.Summary.Audio audio = 6;
    @@ -3822,14 +3725,14 @@ public org.tensorflow.proto.Summary.AudioOrBuilder getAudioOrBuilder() {
           /**
            * .tensorflow.Summary.Audio audio = 6;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Summary.Audio, org.tensorflow.proto.Summary.Audio.Builder, org.tensorflow.proto.Summary.AudioOrBuilder> 
               getAudioFieldBuilder() {
             if (audioBuilder_ == null) {
               if (!(valueCase_ == 6)) {
                 value_ = org.tensorflow.proto.Summary.Audio.getDefaultInstance();
               }
    -          audioBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          audioBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.Summary.Audio, org.tensorflow.proto.Summary.Audio.Builder, org.tensorflow.proto.Summary.AudioOrBuilder>(
                       (org.tensorflow.proto.Summary.Audio) value_,
                       getParentForChildren(),
    @@ -3837,11 +3740,11 @@ public org.tensorflow.proto.Summary.AudioOrBuilder getAudioOrBuilder() {
               value_ = null;
             }
             valueCase_ = 6;
    -        onChanged();;
    +        onChanged();
             return audioBuilder_;
           }
     
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> tensorBuilder_;
           /**
            * .tensorflow.TensorProto tensor = 8;
    @@ -3964,14 +3867,14 @@ public org.tensorflow.proto.TensorProtoOrBuilder getTensorOrBuilder() {
           /**
            * .tensorflow.TensorProto tensor = 8;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> 
               getTensorFieldBuilder() {
             if (tensorBuilder_ == null) {
               if (!(valueCase_ == 8)) {
                 value_ = org.tensorflow.proto.TensorProto.getDefaultInstance();
               }
    -          tensorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          tensorBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder>(
                       (org.tensorflow.proto.TensorProto) value_,
                       getParentForChildren(),
    @@ -3979,21 +3882,9 @@ public org.tensorflow.proto.TensorProtoOrBuilder getTensorOrBuilder() {
               value_ = null;
             }
             valueCase_ = 8;
    -        onChanged();;
    +        onChanged();
             return tensorBuilder_;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.Summary.Value)
         }
    @@ -4047,6 +3938,7 @@ public org.tensorflow.proto.Summary.Value getDefaultInstanceForType() {
       }
     
       public static final int VALUE_FIELD_NUMBER = 1;
    +  @SuppressWarnings("serial")
       private java.util.List value_;
       /**
        * 
    @@ -4207,39 +4099,41 @@ public static org.tensorflow.proto.Summary parseFrom(
       }
       public static org.tensorflow.proto.Summary parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.Summary parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.Summary parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.Summary parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.Summary parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.Summary parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -4259,7 +4153,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -4267,6 +4161,7 @@ protected Builder newBuilderForType(
        * 
        * A Summary is a set of named values to be displayed by the
        * visualizer.
    +   *
        * Summaries are produced regularly during training, as controlled by
        * the "summary_interval_secs" attribute of the training operation.
        * Summaries are also produced at the end of an evaluation.
    @@ -4275,7 +4170,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.Summary}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.Summary)
           org.tensorflow.proto.SummaryOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -4284,7 +4179,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.SummaryProtos.internal_static_tensorflow_Summary_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -4297,13 +4192,14 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           if (valueBuilder_ == null) {
             value_ = java.util.Collections.emptyList();
           } else {
    @@ -4337,7 +4233,13 @@ public org.tensorflow.proto.Summary build() {
         @java.lang.Override
         public org.tensorflow.proto.Summary buildPartial() {
           org.tensorflow.proto.Summary result = new org.tensorflow.proto.Summary(this);
    -      int from_bitField0_ = bitField0_;
    +      buildPartialRepeatedFields(result);
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartialRepeatedFields(org.tensorflow.proto.Summary result) {
           if (valueBuilder_ == null) {
             if (((bitField0_ & 0x00000001) != 0)) {
               value_ = java.util.Collections.unmodifiableList(value_);
    @@ -4347,42 +4249,12 @@ public org.tensorflow.proto.Summary buildPartial() {
           } else {
             result.value_ = valueBuilder_.build();
           }
    -      onBuilt();
    -      return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.Summary result) {
    +      int from_bitField0_ = bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.Summary) {
    @@ -4414,7 +4286,7 @@ public Builder mergeFrom(org.tensorflow.proto.Summary other) {
                 value_ = other.value_;
                 bitField0_ = (bitField0_ & ~0x00000001);
                 valueBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getValueFieldBuilder() : null;
               } else {
                 valueBuilder_.addAllMessages(other.value_);
    @@ -4486,7 +4358,7 @@ private void ensureValueIsMutable() {
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.Summary.Value, org.tensorflow.proto.Summary.Value.Builder, org.tensorflow.proto.Summary.ValueOrBuilder> valueBuilder_;
     
         /**
    @@ -4774,11 +4646,11 @@ public org.tensorflow.proto.Summary.Value.Builder addValueBuilder(
              getValueBuilderList() {
           return getValueFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.Summary.Value, org.tensorflow.proto.Summary.Value.Builder, org.tensorflow.proto.Summary.ValueOrBuilder> 
             getValueFieldBuilder() {
           if (valueBuilder_ == null) {
    -        valueBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        valueBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.Summary.Value, org.tensorflow.proto.Summary.Value.Builder, org.tensorflow.proto.Summary.ValueOrBuilder>(
                     value_,
                     ((bitField0_ & 0x00000001) != 0),
    @@ -4788,18 +4660,6 @@ public org.tensorflow.proto.Summary.Value.Builder addValueBuilder(
           }
           return valueBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.Summary)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryDescription.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryDescription.java
    index 1bb3209c70f..40843246261 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryDescription.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryDescription.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/summary.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,37 +13,34 @@
      * Protobuf type {@code tensorflow.SummaryDescription}
      */
     public final class SummaryDescription extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.SummaryDescription)
         SummaryDescriptionOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      SummaryDescription.class.getName());
    +  }
       // Use SummaryDescription.newBuilder() to construct.
    -  private SummaryDescription(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private SummaryDescription(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private SummaryDescription() {
         typeHint_ = "";
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new SummaryDescription();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.SummaryProtos.internal_static_tensorflow_SummaryDescription_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.SummaryProtos.internal_static_tensorflow_SummaryDescription_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -49,7 +48,8 @@ protected java.lang.Object newInstance(
       }
     
       public static final int TYPE_HINT_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object typeHint_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object typeHint_ = "";
       /**
        * 
        * Hint on how plugins should process the data in this series.
    @@ -110,8 +110,8 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(typeHint_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, typeHint_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(typeHint_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, typeHint_);
         }
         getUnknownFields().writeTo(output);
       }
    @@ -122,8 +122,8 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(typeHint_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, typeHint_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(typeHint_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, typeHint_);
         }
         size += getUnknownFields().getSerializedSize();
         memoizedSize = size;
    @@ -194,39 +194,41 @@ public static org.tensorflow.proto.SummaryDescription parseFrom(
       }
       public static org.tensorflow.proto.SummaryDescription parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.SummaryDescription parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.SummaryDescription parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.SummaryDescription parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.SummaryDescription parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.SummaryDescription parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -246,7 +248,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -258,7 +260,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.SummaryDescription}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.SummaryDescription)
           org.tensorflow.proto.SummaryDescriptionOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -267,7 +269,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.SummaryProtos.internal_static_tensorflow_SummaryDescription_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -280,15 +282,15 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           typeHint_ = "";
    -
           return this;
         }
     
    @@ -315,43 +317,18 @@ public org.tensorflow.proto.SummaryDescription build() {
         @java.lang.Override
         public org.tensorflow.proto.SummaryDescription buildPartial() {
           org.tensorflow.proto.SummaryDescription result = new org.tensorflow.proto.SummaryDescription(this);
    -      result.typeHint_ = typeHint_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.SummaryDescription result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.typeHint_ = typeHint_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.SummaryDescription) {
    @@ -366,6 +343,7 @@ public Builder mergeFrom(org.tensorflow.proto.SummaryDescription other) {
           if (other == org.tensorflow.proto.SummaryDescription.getDefaultInstance()) return this;
           if (!other.getTypeHint().isEmpty()) {
             typeHint_ = other.typeHint_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           this.mergeUnknownFields(other.getUnknownFields());
    @@ -396,7 +374,7 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   typeHint_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 default: {
    @@ -414,6 +392,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private java.lang.Object typeHint_ = "";
         /**
    @@ -471,11 +450,9 @@ public java.lang.String getTypeHint() {
          */
         public Builder setTypeHint(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           typeHint_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -489,8 +466,8 @@ public Builder setTypeHint(
          * @return This builder for chaining.
          */
         public Builder clearTypeHint() {
    -      
           typeHint_ = getDefaultInstance().getTypeHint();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -506,27 +483,13 @@ public Builder clearTypeHint() {
          */
         public Builder setTypeHintBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           typeHint_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.SummaryDescription)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryDescriptionOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryDescriptionOrBuilder.java
    index 59788a7aa57..d1b59f7cd9c 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryDescriptionOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryDescriptionOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/summary.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryMetadata.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryMetadata.java
    index d14b7533c9b..5991e77f41c 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryMetadata.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryMetadata.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/summary.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -12,12 +14,21 @@
      * Protobuf type {@code tensorflow.SummaryMetadata}
      */
     public final class SummaryMetadata extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.SummaryMetadata)
         SummaryMetadataOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      SummaryMetadata.class.getName());
    +  }
       // Use SummaryMetadata.newBuilder() to construct.
    -  private SummaryMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private SummaryMetadata(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private SummaryMetadata() {
    @@ -26,25 +37,13 @@ private SummaryMetadata() {
         dataClass_ = 0;
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new SummaryMetadata();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.SummaryProtos.internal_static_tensorflow_SummaryMetadata_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.SummaryProtos.internal_static_tensorflow_SummaryMetadata_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -90,12 +89,21 @@ public interface PluginDataOrBuilder extends
        * Protobuf type {@code tensorflow.SummaryMetadata.PluginData}
        */
       public static final class PluginData extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.SummaryMetadata.PluginData)
           PluginDataOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        PluginData.class.getName());
    +    }
         // Use PluginData.newBuilder() to construct.
    -    private PluginData(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private PluginData(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private PluginData() {
    @@ -103,25 +111,13 @@ private PluginData() {
           content_ = com.google.protobuf.ByteString.EMPTY;
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new PluginData();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.SummaryProtos.internal_static_tensorflow_SummaryMetadata_PluginData_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.SummaryProtos.internal_static_tensorflow_SummaryMetadata_PluginData_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -129,7 +125,8 @@ protected java.lang.Object newInstance(
         }
     
         public static final int PLUGIN_NAME_FIELD_NUMBER = 1;
    -    private volatile java.lang.Object pluginName_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object pluginName_ = "";
         /**
          * 
          * The name of the plugin this data pertains to.
    @@ -175,7 +172,7 @@ public java.lang.String getPluginName() {
         }
     
         public static final int CONTENT_FIELD_NUMBER = 2;
    -    private com.google.protobuf.ByteString content_;
    +    private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY;
         /**
          * 
          * The content to store for the plugin. The best practice is for this to be
    @@ -204,8 +201,8 @@ public final boolean isInitialized() {
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output)
                             throws java.io.IOException {
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pluginName_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, pluginName_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pluginName_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 1, pluginName_);
           }
           if (!content_.isEmpty()) {
             output.writeBytes(2, content_);
    @@ -219,8 +216,8 @@ public int getSerializedSize() {
           if (size != -1) return size;
     
           size = 0;
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pluginName_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, pluginName_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pluginName_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, pluginName_);
           }
           if (!content_.isEmpty()) {
             size += com.google.protobuf.CodedOutputStream
    @@ -299,39 +296,41 @@ public static org.tensorflow.proto.SummaryMetadata.PluginData parseFrom(
         }
         public static org.tensorflow.proto.SummaryMetadata.PluginData parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.SummaryMetadata.PluginData parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.SummaryMetadata.PluginData parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.SummaryMetadata.PluginData parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.SummaryMetadata.PluginData parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.SummaryMetadata.PluginData parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -351,7 +350,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -359,7 +358,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.SummaryMetadata.PluginData}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.SummaryMetadata.PluginData)
             org.tensorflow.proto.SummaryMetadata.PluginDataOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -368,7 +367,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.SummaryProtos.internal_static_tensorflow_SummaryMetadata_PluginData_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -381,17 +380,16 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             pluginName_ = "";
    -
             content_ = com.google.protobuf.ByteString.EMPTY;
    -
             return this;
           }
     
    @@ -418,44 +416,21 @@ public org.tensorflow.proto.SummaryMetadata.PluginData build() {
           @java.lang.Override
           public org.tensorflow.proto.SummaryMetadata.PluginData buildPartial() {
             org.tensorflow.proto.SummaryMetadata.PluginData result = new org.tensorflow.proto.SummaryMetadata.PluginData(this);
    -        result.pluginName_ = pluginName_;
    -        result.content_ = content_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.SummaryMetadata.PluginData result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.pluginName_ = pluginName_;
    +        }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.content_ = content_;
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.SummaryMetadata.PluginData) {
    @@ -470,6 +445,7 @@ public Builder mergeFrom(org.tensorflow.proto.SummaryMetadata.PluginData other)
             if (other == org.tensorflow.proto.SummaryMetadata.PluginData.getDefaultInstance()) return this;
             if (!other.getPluginName().isEmpty()) {
               pluginName_ = other.pluginName_;
    +          bitField0_ |= 0x00000001;
               onChanged();
             }
             if (other.getContent() != com.google.protobuf.ByteString.EMPTY) {
    @@ -503,12 +479,12 @@ public Builder mergeFrom(
                     break;
                   case 10: {
                     pluginName_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 10
                   case 18: {
                     content_ = input.readBytes();
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 18
                   default: {
    @@ -526,6 +502,7 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    +      private int bitField0_;
     
           private java.lang.Object pluginName_ = "";
           /**
    @@ -580,11 +557,9 @@ public java.lang.String getPluginName() {
            */
           public Builder setPluginName(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             pluginName_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -597,8 +572,8 @@ public Builder setPluginName(
            * @return This builder for chaining.
            */
           public Builder clearPluginName() {
    -        
             pluginName_ = getDefaultInstance().getPluginName();
    +        bitField0_ = (bitField0_ & ~0x00000001);
             onChanged();
             return this;
           }
    @@ -613,12 +588,10 @@ public Builder clearPluginName() {
            */
           public Builder setPluginNameBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             pluginName_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -648,11 +621,9 @@ public com.google.protobuf.ByteString getContent() {
            * @return This builder for chaining.
            */
           public Builder setContent(com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             content_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -666,23 +637,11 @@ public Builder setContent(com.google.protobuf.ByteString value) {
            * @return This builder for chaining.
            */
           public Builder clearContent() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000002);
             content_ = getDefaultInstance().getContent();
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.SummaryMetadata.PluginData)
         }
    @@ -735,6 +694,7 @@ public org.tensorflow.proto.SummaryMetadata.PluginData getDefaultInstanceForType
     
       }
     
    +  private int bitField0_;
       public static final int PLUGIN_DATA_FIELD_NUMBER = 1;
       private org.tensorflow.proto.SummaryMetadata.PluginData pluginData_;
       /**
    @@ -747,7 +707,7 @@ public org.tensorflow.proto.SummaryMetadata.PluginData getDefaultInstanceForType
        */
       @java.lang.Override
       public boolean hasPluginData() {
    -    return pluginData_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * 
    @@ -770,11 +730,12 @@ public org.tensorflow.proto.SummaryMetadata.PluginData getPluginData() {
        */
       @java.lang.Override
       public org.tensorflow.proto.SummaryMetadata.PluginDataOrBuilder getPluginDataOrBuilder() {
    -    return getPluginData();
    +    return pluginData_ == null ? org.tensorflow.proto.SummaryMetadata.PluginData.getDefaultInstance() : pluginData_;
       }
     
       public static final int DISPLAY_NAME_FIELD_NUMBER = 2;
    -  private volatile java.lang.Object displayName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object displayName_ = "";
       /**
        * 
        * Display name for viewing in TensorBoard.
    @@ -820,7 +781,8 @@ public java.lang.String getDisplayName() {
       }
     
       public static final int SUMMARY_DESCRIPTION_FIELD_NUMBER = 3;
    -  private volatile java.lang.Object summaryDescription_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object summaryDescription_ = "";
       /**
        * 
        * Longform readable description of the summary sequence. Markdown supported.
    @@ -866,7 +828,7 @@ public java.lang.String getSummaryDescription() {
       }
     
       public static final int DATA_CLASS_FIELD_NUMBER = 4;
    -  private int dataClass_;
    +  private int dataClass_ = 0;
       /**
        * 
        * Class of data stored in this time series. Required for compatibility with
    @@ -893,8 +855,7 @@ public java.lang.String getSummaryDescription() {
        * @return The dataClass.
        */
       @java.lang.Override public org.tensorflow.proto.DataClass getDataClass() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.DataClass result = org.tensorflow.proto.DataClass.valueOf(dataClass_);
    +    org.tensorflow.proto.DataClass result = org.tensorflow.proto.DataClass.forNumber(dataClass_);
         return result == null ? org.tensorflow.proto.DataClass.UNRECOGNIZED : result;
       }
     
    @@ -912,14 +873,14 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (pluginData_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(1, getPluginData());
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 2, displayName_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(summaryDescription_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, summaryDescription_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(summaryDescription_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 3, summaryDescription_);
         }
         if (dataClass_ != org.tensorflow.proto.DataClass.DATA_CLASS_UNKNOWN.getNumber()) {
           output.writeEnum(4, dataClass_);
    @@ -933,15 +894,15 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (pluginData_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(1, getPluginData());
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(2, displayName_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(summaryDescription_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, summaryDescription_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(summaryDescription_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(3, summaryDescription_);
         }
         if (dataClass_ != org.tensorflow.proto.DataClass.DATA_CLASS_UNKNOWN.getNumber()) {
           size += com.google.protobuf.CodedOutputStream
    @@ -1032,39 +993,41 @@ public static org.tensorflow.proto.SummaryMetadata parseFrom(
       }
       public static org.tensorflow.proto.SummaryMetadata parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.SummaryMetadata parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.SummaryMetadata parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.SummaryMetadata parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.SummaryMetadata parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.SummaryMetadata parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -1084,7 +1047,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -1097,7 +1060,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.SummaryMetadata}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.SummaryMetadata)
           org.tensorflow.proto.SummaryMetadataOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -1106,7 +1069,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.SummaryProtos.internal_static_tensorflow_SummaryMetadata_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -1115,29 +1078,32 @@ public static final class Builder extends
     
         // Construct using org.tensorflow.proto.SummaryMetadata.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getPluginDataFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    -      if (pluginDataBuilder_ == null) {
    -        pluginData_ = null;
    -      } else {
    -        pluginData_ = null;
    +      bitField0_ = 0;
    +      pluginData_ = null;
    +      if (pluginDataBuilder_ != null) {
    +        pluginDataBuilder_.dispose();
             pluginDataBuilder_ = null;
           }
           displayName_ = "";
    -
           summaryDescription_ = "";
    -
           dataClass_ = 0;
    -
           return this;
         }
     
    @@ -1164,50 +1130,32 @@ public org.tensorflow.proto.SummaryMetadata build() {
         @java.lang.Override
         public org.tensorflow.proto.SummaryMetadata buildPartial() {
           org.tensorflow.proto.SummaryMetadata result = new org.tensorflow.proto.SummaryMetadata(this);
    -      if (pluginDataBuilder_ == null) {
    -        result.pluginData_ = pluginData_;
    -      } else {
    -        result.pluginData_ = pluginDataBuilder_.build();
    -      }
    -      result.displayName_ = displayName_;
    -      result.summaryDescription_ = summaryDescription_;
    -      result.dataClass_ = dataClass_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.SummaryMetadata result) {
    +      int from_bitField0_ = bitField0_;
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.pluginData_ = pluginDataBuilder_ == null
    +            ? pluginData_
    +            : pluginDataBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.displayName_ = displayName_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.summaryDescription_ = summaryDescription_;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.dataClass_ = dataClass_;
    +      }
    +      result.bitField0_ |= to_bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.SummaryMetadata) {
    @@ -1225,10 +1173,12 @@ public Builder mergeFrom(org.tensorflow.proto.SummaryMetadata other) {
           }
           if (!other.getDisplayName().isEmpty()) {
             displayName_ = other.displayName_;
    +        bitField0_ |= 0x00000002;
             onChanged();
           }
           if (!other.getSummaryDescription().isEmpty()) {
             summaryDescription_ = other.summaryDescription_;
    +        bitField0_ |= 0x00000004;
             onChanged();
           }
           if (other.dataClass_ != 0) {
    @@ -1264,22 +1214,22 @@ public Builder mergeFrom(
                   input.readMessage(
                       getPluginDataFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
                   displayName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 case 26: {
                   summaryDescription_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 26
                 case 32: {
                   dataClass_ = input.readEnum();
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 32
                 default: {
    @@ -1297,9 +1247,10 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private org.tensorflow.proto.SummaryMetadata.PluginData pluginData_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.SummaryMetadata.PluginData, org.tensorflow.proto.SummaryMetadata.PluginData.Builder, org.tensorflow.proto.SummaryMetadata.PluginDataOrBuilder> pluginDataBuilder_;
         /**
          * 
    @@ -1310,7 +1261,7 @@ public Builder mergeFrom(
          * @return Whether the pluginData field is set.
          */
         public boolean hasPluginData() {
    -      return pluginDataBuilder_ != null || pluginData_ != null;
    +      return ((bitField0_ & 0x00000001) != 0);
         }
         /**
          * 
    @@ -1340,11 +1291,11 @@ public Builder setPluginData(org.tensorflow.proto.SummaryMetadata.PluginData val
               throw new NullPointerException();
             }
             pluginData_ = value;
    -        onChanged();
           } else {
             pluginDataBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000001;
    +      onChanged();
           return this;
         }
         /**
    @@ -1358,11 +1309,11 @@ public Builder setPluginData(
             org.tensorflow.proto.SummaryMetadata.PluginData.Builder builderForValue) {
           if (pluginDataBuilder_ == null) {
             pluginData_ = builderForValue.build();
    -        onChanged();
           } else {
             pluginDataBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000001;
    +      onChanged();
           return this;
         }
         /**
    @@ -1374,17 +1325,20 @@ public Builder setPluginData(
          */
         public Builder mergePluginData(org.tensorflow.proto.SummaryMetadata.PluginData value) {
           if (pluginDataBuilder_ == null) {
    -        if (pluginData_ != null) {
    -          pluginData_ =
    -            org.tensorflow.proto.SummaryMetadata.PluginData.newBuilder(pluginData_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000001) != 0) &&
    +          pluginData_ != null &&
    +          pluginData_ != org.tensorflow.proto.SummaryMetadata.PluginData.getDefaultInstance()) {
    +          getPluginDataBuilder().mergeFrom(value);
             } else {
               pluginData_ = value;
             }
    -        onChanged();
           } else {
             pluginDataBuilder_.mergeFrom(value);
           }
    -
    +      if (pluginData_ != null) {
    +        bitField0_ |= 0x00000001;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -1395,14 +1349,13 @@ public Builder mergePluginData(org.tensorflow.proto.SummaryMetadata.PluginData v
          * .tensorflow.SummaryMetadata.PluginData plugin_data = 1;
          */
         public Builder clearPluginData() {
    -      if (pluginDataBuilder_ == null) {
    -        pluginData_ = null;
    -        onChanged();
    -      } else {
    -        pluginData_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000001);
    +      pluginData_ = null;
    +      if (pluginDataBuilder_ != null) {
    +        pluginDataBuilder_.dispose();
             pluginDataBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -1413,7 +1366,7 @@ public Builder clearPluginData() {
          * .tensorflow.SummaryMetadata.PluginData plugin_data = 1;
          */
         public org.tensorflow.proto.SummaryMetadata.PluginData.Builder getPluginDataBuilder() {
    -      
    +      bitField0_ |= 0x00000001;
           onChanged();
           return getPluginDataFieldBuilder().getBuilder();
         }
    @@ -1439,11 +1392,11 @@ public org.tensorflow.proto.SummaryMetadata.PluginDataOrBuilder getPluginDataOrB
          *
          * .tensorflow.SummaryMetadata.PluginData plugin_data = 1;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.SummaryMetadata.PluginData, org.tensorflow.proto.SummaryMetadata.PluginData.Builder, org.tensorflow.proto.SummaryMetadata.PluginDataOrBuilder> 
             getPluginDataFieldBuilder() {
           if (pluginDataBuilder_ == null) {
    -        pluginDataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        pluginDataBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.SummaryMetadata.PluginData, org.tensorflow.proto.SummaryMetadata.PluginData.Builder, org.tensorflow.proto.SummaryMetadata.PluginDataOrBuilder>(
                     getPluginData(),
                     getParentForChildren(),
    @@ -1506,11 +1459,9 @@ public java.lang.String getDisplayName() {
          */
         public Builder setDisplayName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           displayName_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -1523,8 +1474,8 @@ public Builder setDisplayName(
          * @return This builder for chaining.
          */
         public Builder clearDisplayName() {
    -      
           displayName_ = getDefaultInstance().getDisplayName();
    +      bitField0_ = (bitField0_ & ~0x00000002);
           onChanged();
           return this;
         }
    @@ -1539,12 +1490,10 @@ public Builder clearDisplayName() {
          */
         public Builder setDisplayNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           displayName_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -1602,11 +1551,9 @@ public java.lang.String getSummaryDescription() {
          */
         public Builder setSummaryDescription(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           summaryDescription_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -1619,8 +1566,8 @@ public Builder setSummaryDescription(
          * @return This builder for chaining.
          */
         public Builder clearSummaryDescription() {
    -      
           summaryDescription_ = getDefaultInstance().getSummaryDescription();
    +      bitField0_ = (bitField0_ & ~0x00000004);
           onChanged();
           return this;
         }
    @@ -1635,12 +1582,10 @@ public Builder clearSummaryDescription() {
          */
         public Builder setSummaryDescriptionBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           summaryDescription_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -1673,8 +1618,8 @@ public Builder setSummaryDescriptionBytes(
          * @return This builder for chaining.
          */
         public Builder setDataClassValue(int value) {
    -      
           dataClass_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -1691,8 +1636,7 @@ public Builder setDataClassValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.DataClass getDataClass() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.DataClass result = org.tensorflow.proto.DataClass.valueOf(dataClass_);
    +      org.tensorflow.proto.DataClass result = org.tensorflow.proto.DataClass.forNumber(dataClass_);
           return result == null ? org.tensorflow.proto.DataClass.UNRECOGNIZED : result;
         }
         /**
    @@ -1711,7 +1655,7 @@ public Builder setDataClass(org.tensorflow.proto.DataClass value) {
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00000008;
           dataClass_ = value.getNumber();
           onChanged();
           return this;
    @@ -1728,23 +1672,11 @@ public Builder setDataClass(org.tensorflow.proto.DataClass value) {
          * @return This builder for chaining.
          */
         public Builder clearDataClass() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000008);
           dataClass_ = 0;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.SummaryMetadata)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryMetadataOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryMetadataOrBuilder.java
    index 32ad558348a..a7c7adb8253 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryMetadataOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryMetadataOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/summary.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryOrBuilder.java
    index 86541730107..1477e151a96 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/summary.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryProtos.java
    index bd717105f28..17ee633adc7 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryProtos.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryProtos.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/summary.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class SummaryProtos {
       private SummaryProtos() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      SummaryProtos.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,37 +28,37 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_SummaryDescription_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_SummaryDescription_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_SummaryMetadata_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_SummaryMetadata_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_SummaryMetadata_PluginData_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_SummaryMetadata_PluginData_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_Summary_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_Summary_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_Summary_Image_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_Summary_Image_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_Summary_Audio_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_Summary_Audio_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_Summary_Value_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_Summary_Value_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -59,37 +70,37 @@ public static void registerAllExtensions(
       static {
         java.lang.String[] descriptorData = {
           "\n\'tensorflow/core/framework/summary.prot" +
    -      "o\022\ntensorflow\032\034tsl/protobuf/histogram.pr" +
    -      "oto\032&tensorflow/core/framework/tensor.pr" +
    -      "oto\"\'\n\022SummaryDescription\022\021\n\ttype_hint\030\001" +
    -      " \001(\t\"\340\001\n\017SummaryMetadata\022;\n\013plugin_data\030" +
    -      "\001 \001(\0132&.tensorflow.SummaryMetadata.Plugi" +
    -      "nData\022\024\n\014display_name\030\002 \001(\t\022\033\n\023summary_d" +
    -      "escription\030\003 \001(\t\022)\n\ndata_class\030\004 \001(\0162\025.t" +
    -      "ensorflow.DataClass\0322\n\nPluginData\022\023\n\013plu" +
    -      "gin_name\030\001 \001(\t\022\017\n\007content\030\002 \001(\014\"\336\004\n\007Summ" +
    -      "ary\022(\n\005value\030\001 \003(\0132\031.tensorflow.Summary." +
    -      "Value\032X\n\005Image\022\016\n\006height\030\001 \001(\005\022\r\n\005width\030" +
    -      "\002 \001(\005\022\022\n\ncolorspace\030\003 \001(\005\022\034\n\024encoded_ima" +
    -      "ge_string\030\004 \001(\014\032}\n\005Audio\022\023\n\013sample_rate\030" +
    -      "\001 \001(\002\022\024\n\014num_channels\030\002 \001(\003\022\025\n\rlength_fr" +
    -      "ames\030\003 \001(\003\022\034\n\024encoded_audio_string\030\004 \001(\014" +
    -      "\022\024\n\014content_type\030\005 \001(\t\032\317\002\n\005Value\022\021\n\tnode" +
    -      "_name\030\007 \001(\t\022\013\n\003tag\030\001 \001(\t\022-\n\010metadata\030\t \001" +
    -      "(\0132\033.tensorflow.SummaryMetadata\022\026\n\014simpl" +
    -      "e_value\030\002 \001(\002H\000\022&\n\034obsolete_old_style_hi" +
    -      "stogram\030\003 \001(\014H\000\022*\n\005image\030\004 \001(\0132\031.tensorf" +
    -      "low.Summary.ImageH\000\022+\n\005histo\030\005 \001(\0132\032.ten" +
    -      "sorflow.HistogramProtoH\000\022*\n\005audio\030\006 \001(\0132" +
    -      "\031.tensorflow.Summary.AudioH\000\022)\n\006tensor\030\010" +
    -      " \001(\0132\027.tensorflow.TensorProtoH\000B\007\n\005value" +
    -      "*o\n\tDataClass\022\026\n\022DATA_CLASS_UNKNOWN\020\000\022\025\n" +
    -      "\021DATA_CLASS_SCALAR\020\001\022\025\n\021DATA_CLASS_TENSO" +
    -      "R\020\002\022\034\n\030DATA_CLASS_BLOB_SEQUENCE\020\003Bz\n\024org" +
    -      ".tensorflow.protoB\rSummaryProtosP\001ZNgith" +
    -      "ub.com/tensorflow/tensorflow/tensorflow/" +
    -      "go/core/framework/summary_go_proto\370\001\001P\000b" +
    -      "\006proto3"
    +      "o\022\ntensorflow\032 xla/tsl/protobuf/histogra" +
    +      "m.proto\032&tensorflow/core/framework/tenso" +
    +      "r.proto\"\'\n\022SummaryDescription\022\021\n\ttype_hi" +
    +      "nt\030\001 \001(\t\"\340\001\n\017SummaryMetadata\022;\n\013plugin_d" +
    +      "ata\030\001 \001(\0132&.tensorflow.SummaryMetadata.P" +
    +      "luginData\022\024\n\014display_name\030\002 \001(\t\022\033\n\023summa" +
    +      "ry_description\030\003 \001(\t\022)\n\ndata_class\030\004 \001(\016" +
    +      "2\025.tensorflow.DataClass\0322\n\nPluginData\022\023\n" +
    +      "\013plugin_name\030\001 \001(\t\022\017\n\007content\030\002 \001(\014\"\336\004\n\007" +
    +      "Summary\022(\n\005value\030\001 \003(\0132\031.tensorflow.Summ" +
    +      "ary.Value\032X\n\005Image\022\016\n\006height\030\001 \001(\005\022\r\n\005wi" +
    +      "dth\030\002 \001(\005\022\022\n\ncolorspace\030\003 \001(\005\022\034\n\024encoded" +
    +      "_image_string\030\004 \001(\014\032}\n\005Audio\022\023\n\013sample_r" +
    +      "ate\030\001 \001(\002\022\024\n\014num_channels\030\002 \001(\003\022\025\n\rlengt" +
    +      "h_frames\030\003 \001(\003\022\034\n\024encoded_audio_string\030\004" +
    +      " \001(\014\022\024\n\014content_type\030\005 \001(\t\032\317\002\n\005Value\022\021\n\t" +
    +      "node_name\030\007 \001(\t\022\013\n\003tag\030\001 \001(\t\022-\n\010metadata" +
    +      "\030\t \001(\0132\033.tensorflow.SummaryMetadata\022\026\n\014s" +
    +      "imple_value\030\002 \001(\002H\000\022&\n\034obsolete_old_styl" +
    +      "e_histogram\030\003 \001(\014H\000\022*\n\005image\030\004 \001(\0132\031.ten" +
    +      "sorflow.Summary.ImageH\000\022+\n\005histo\030\005 \001(\0132\032" +
    +      ".tensorflow.HistogramProtoH\000\022*\n\005audio\030\006 " +
    +      "\001(\0132\031.tensorflow.Summary.AudioH\000\022)\n\006tens" +
    +      "or\030\010 \001(\0132\027.tensorflow.TensorProtoH\000B\007\n\005v" +
    +      "alue*o\n\tDataClass\022\026\n\022DATA_CLASS_UNKNOWN\020" +
    +      "\000\022\025\n\021DATA_CLASS_SCALAR\020\001\022\025\n\021DATA_CLASS_T" +
    +      "ENSOR\020\002\022\034\n\030DATA_CLASS_BLOB_SEQUENCE\020\003Bz\n" +
    +      "\024org.tensorflow.protoB\rSummaryProtosP\001ZN" +
    +      "github.com/tensorflow/tensorflow/tensorf" +
    +      "low/go/core/framework/summary_go_proto\370\001" +
    +      "\001P\000b\006proto3"
         };
         descriptor = com.google.protobuf.Descriptors.FileDescriptor
           .internalBuildGeneratedFileFrom(descriptorData,
    @@ -100,45 +111,46 @@ public static void registerAllExtensions(
         internal_static_tensorflow_SummaryDescription_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_SummaryDescription_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_SummaryDescription_descriptor,
             new java.lang.String[] { "TypeHint", });
         internal_static_tensorflow_SummaryMetadata_descriptor =
           getDescriptor().getMessageTypes().get(1);
         internal_static_tensorflow_SummaryMetadata_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_SummaryMetadata_descriptor,
             new java.lang.String[] { "PluginData", "DisplayName", "SummaryDescription", "DataClass", });
         internal_static_tensorflow_SummaryMetadata_PluginData_descriptor =
           internal_static_tensorflow_SummaryMetadata_descriptor.getNestedTypes().get(0);
         internal_static_tensorflow_SummaryMetadata_PluginData_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_SummaryMetadata_PluginData_descriptor,
             new java.lang.String[] { "PluginName", "Content", });
         internal_static_tensorflow_Summary_descriptor =
           getDescriptor().getMessageTypes().get(2);
         internal_static_tensorflow_Summary_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_Summary_descriptor,
             new java.lang.String[] { "Value", });
         internal_static_tensorflow_Summary_Image_descriptor =
           internal_static_tensorflow_Summary_descriptor.getNestedTypes().get(0);
         internal_static_tensorflow_Summary_Image_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_Summary_Image_descriptor,
             new java.lang.String[] { "Height", "Width", "Colorspace", "EncodedImageString", });
         internal_static_tensorflow_Summary_Audio_descriptor =
           internal_static_tensorflow_Summary_descriptor.getNestedTypes().get(1);
         internal_static_tensorflow_Summary_Audio_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_Summary_Audio_descriptor,
             new java.lang.String[] { "SampleRate", "NumChannels", "LengthFrames", "EncodedAudioString", "ContentType", });
         internal_static_tensorflow_Summary_Value_descriptor =
           internal_static_tensorflow_Summary_descriptor.getNestedTypes().get(2);
         internal_static_tensorflow_Summary_Value_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_Summary_Value_descriptor,
             new java.lang.String[] { "NodeName", "Tag", "Metadata", "SimpleValue", "ObsoleteOldStyleHistogram", "Image", "Histo", "Audio", "Tensor", "Value", });
    +    descriptor.resolveAllFeaturesImmutable();
         org.tensorflow.proto.Histogram.getDescriptor();
         org.tensorflow.proto.TensorProtos.getDescriptor();
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TaggedRunMetadata.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TaggedRunMetadata.java
    index 8a93093963e..8fabbf0cbcf 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TaggedRunMetadata.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TaggedRunMetadata.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/util/event.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,12 +13,21 @@
      * Protobuf type {@code tensorflow.TaggedRunMetadata}
      */
     public final class TaggedRunMetadata extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.TaggedRunMetadata)
         TaggedRunMetadataOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      TaggedRunMetadata.class.getName());
    +  }
       // Use TaggedRunMetadata.newBuilder() to construct.
    -  private TaggedRunMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private TaggedRunMetadata(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private TaggedRunMetadata() {
    @@ -24,25 +35,13 @@ private TaggedRunMetadata() {
         runMetadata_ = com.google.protobuf.ByteString.EMPTY;
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new TaggedRunMetadata();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.EventProtos.internal_static_tensorflow_TaggedRunMetadata_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.EventProtos.internal_static_tensorflow_TaggedRunMetadata_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -50,7 +49,8 @@ protected java.lang.Object newInstance(
       }
     
       public static final int TAG_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object tag_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object tag_ = "";
       /**
        * 
        * Tag name associated with this metadata.
    @@ -96,7 +96,7 @@ public java.lang.String getTag() {
       }
     
       public static final int RUN_METADATA_FIELD_NUMBER = 2;
    -  private com.google.protobuf.ByteString runMetadata_;
    +  private com.google.protobuf.ByteString runMetadata_ = com.google.protobuf.ByteString.EMPTY;
       /**
        * 
        * Byte-encoded version of the `RunMetadata` proto in order to allow lazy
    @@ -125,8 +125,8 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tag_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tag_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tag_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, tag_);
         }
         if (!runMetadata_.isEmpty()) {
           output.writeBytes(2, runMetadata_);
    @@ -140,8 +140,8 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tag_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tag_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tag_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, tag_);
         }
         if (!runMetadata_.isEmpty()) {
           size += com.google.protobuf.CodedOutputStream
    @@ -220,39 +220,41 @@ public static org.tensorflow.proto.TaggedRunMetadata parseFrom(
       }
       public static org.tensorflow.proto.TaggedRunMetadata parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.TaggedRunMetadata parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.TaggedRunMetadata parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.TaggedRunMetadata parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.TaggedRunMetadata parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.TaggedRunMetadata parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -272,7 +274,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -284,7 +286,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.TaggedRunMetadata}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.TaggedRunMetadata)
           org.tensorflow.proto.TaggedRunMetadataOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -293,7 +295,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.EventProtos.internal_static_tensorflow_TaggedRunMetadata_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -306,17 +308,16 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           tag_ = "";
    -
           runMetadata_ = com.google.protobuf.ByteString.EMPTY;
    -
           return this;
         }
     
    @@ -343,44 +344,21 @@ public org.tensorflow.proto.TaggedRunMetadata build() {
         @java.lang.Override
         public org.tensorflow.proto.TaggedRunMetadata buildPartial() {
           org.tensorflow.proto.TaggedRunMetadata result = new org.tensorflow.proto.TaggedRunMetadata(this);
    -      result.tag_ = tag_;
    -      result.runMetadata_ = runMetadata_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.TaggedRunMetadata result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.tag_ = tag_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.runMetadata_ = runMetadata_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.TaggedRunMetadata) {
    @@ -395,6 +373,7 @@ public Builder mergeFrom(org.tensorflow.proto.TaggedRunMetadata other) {
           if (other == org.tensorflow.proto.TaggedRunMetadata.getDefaultInstance()) return this;
           if (!other.getTag().isEmpty()) {
             tag_ = other.tag_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (other.getRunMetadata() != com.google.protobuf.ByteString.EMPTY) {
    @@ -428,12 +407,12 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   tag_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
                   runMetadata_ = input.readBytes();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 default: {
    @@ -451,6 +430,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private java.lang.Object tag_ = "";
         /**
    @@ -505,11 +485,9 @@ public java.lang.String getTag() {
          */
         public Builder setTag(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           tag_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -522,8 +500,8 @@ public Builder setTag(
          * @return This builder for chaining.
          */
         public Builder clearTag() {
    -      
           tag_ = getDefaultInstance().getTag();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -538,12 +516,10 @@ public Builder clearTag() {
          */
         public Builder setTagBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           tag_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -573,11 +549,9 @@ public com.google.protobuf.ByteString getRunMetadata() {
          * @return This builder for chaining.
          */
         public Builder setRunMetadata(com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           runMetadata_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -591,23 +565,11 @@ public Builder setRunMetadata(com.google.protobuf.ByteString value) {
          * @return This builder for chaining.
          */
         public Builder clearRunMetadata() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000002);
           runMetadata_ = getDefaultInstance().getRunMetadata();
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.TaggedRunMetadata)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TaggedRunMetadataOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TaggedRunMetadataOrBuilder.java
    index 00393483d2f..a1b394e2b14 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TaggedRunMetadataOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TaggedRunMetadataOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/util/event.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TaskDeviceFilters.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TaskDeviceFilters.java
    index f4669a0a0c0..cb5547127cc 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TaskDeviceFilters.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TaskDeviceFilters.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/device_filters.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,37 +13,35 @@
      * Protobuf type {@code tensorflow.TaskDeviceFilters}
      */
     public final class TaskDeviceFilters extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.TaskDeviceFilters)
         TaskDeviceFiltersOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      TaskDeviceFilters.class.getName());
    +  }
       // Use TaskDeviceFilters.newBuilder() to construct.
    -  private TaskDeviceFilters(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private TaskDeviceFilters(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private TaskDeviceFilters() {
    -    deviceFilters_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -  }
    -
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new TaskDeviceFilters();
    +    deviceFilters_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
       }
     
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.DeviceFiltersProtos.internal_static_tensorflow_TaskDeviceFilters_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.DeviceFiltersProtos.internal_static_tensorflow_TaskDeviceFilters_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -49,7 +49,9 @@ protected java.lang.Object newInstance(
       }
     
       public static final int DEVICE_FILTERS_FIELD_NUMBER = 1;
    -  private com.google.protobuf.LazyStringList deviceFilters_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.LazyStringArrayList deviceFilters_ =
    +      com.google.protobuf.LazyStringArrayList.emptyList();
       /**
        * repeated string device_filters = 1;
        * @return A list containing the deviceFilters.
    @@ -98,7 +100,7 @@ public final boolean isInitialized() {
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
         for (int i = 0; i < deviceFilters_.size(); i++) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, deviceFilters_.getRaw(i));
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, deviceFilters_.getRaw(i));
         }
         getUnknownFields().writeTo(output);
       }
    @@ -188,39 +190,41 @@ public static org.tensorflow.proto.TaskDeviceFilters parseFrom(
       }
       public static org.tensorflow.proto.TaskDeviceFilters parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.TaskDeviceFilters parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.TaskDeviceFilters parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.TaskDeviceFilters parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.TaskDeviceFilters parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.TaskDeviceFilters parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -240,7 +244,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -252,7 +256,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.TaskDeviceFilters}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.TaskDeviceFilters)
           org.tensorflow.proto.TaskDeviceFiltersOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -261,7 +265,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.DeviceFiltersProtos.internal_static_tensorflow_TaskDeviceFilters_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -274,15 +278,16 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    -      deviceFilters_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      bitField0_ = 0;
    +      deviceFilters_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
           return this;
         }
     
    @@ -309,48 +314,19 @@ public org.tensorflow.proto.TaskDeviceFilters build() {
         @java.lang.Override
         public org.tensorflow.proto.TaskDeviceFilters buildPartial() {
           org.tensorflow.proto.TaskDeviceFilters result = new org.tensorflow.proto.TaskDeviceFilters(this);
    -      int from_bitField0_ = bitField0_;
    -      if (((bitField0_ & 0x00000001) != 0)) {
    -        deviceFilters_ = deviceFilters_.getUnmodifiableView();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    -      }
    -      result.deviceFilters_ = deviceFilters_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.TaskDeviceFilters result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        deviceFilters_.makeImmutable();
    +        result.deviceFilters_ = deviceFilters_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.TaskDeviceFilters) {
    @@ -366,7 +342,7 @@ public Builder mergeFrom(org.tensorflow.proto.TaskDeviceFilters other) {
           if (!other.deviceFilters_.isEmpty()) {
             if (deviceFilters_.isEmpty()) {
               deviceFilters_ = other.deviceFilters_;
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ |= 0x00000001;
             } else {
               ensureDeviceFiltersIsMutable();
               deviceFilters_.addAll(other.deviceFilters_);
    @@ -422,12 +398,13 @@ public Builder mergeFrom(
         }
         private int bitField0_;
     
    -    private com.google.protobuf.LazyStringList deviceFilters_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +    private com.google.protobuf.LazyStringArrayList deviceFilters_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         private void ensureDeviceFiltersIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    +      if (!deviceFilters_.isModifiable()) {
             deviceFilters_ = new com.google.protobuf.LazyStringArrayList(deviceFilters_);
    -        bitField0_ |= 0x00000001;
    -       }
    +      }
    +      bitField0_ |= 0x00000001;
         }
         /**
          * repeated string device_filters = 1;
    @@ -435,7 +412,8 @@ private void ensureDeviceFiltersIsMutable() {
          */
         public com.google.protobuf.ProtocolStringList
             getDeviceFiltersList() {
    -      return deviceFilters_.getUnmodifiableView();
    +      deviceFilters_.makeImmutable();
    +      return deviceFilters_;
         }
         /**
          * repeated string device_filters = 1;
    @@ -469,11 +447,10 @@ public java.lang.String getDeviceFilters(int index) {
          */
         public Builder setDeviceFilters(
             int index, java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureDeviceFiltersIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureDeviceFiltersIsMutable();
           deviceFilters_.set(index, value);
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -484,11 +461,10 @@ public Builder setDeviceFilters(
          */
         public Builder addDeviceFilters(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureDeviceFiltersIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureDeviceFiltersIsMutable();
           deviceFilters_.add(value);
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -502,6 +478,7 @@ public Builder addAllDeviceFilters(
           ensureDeviceFiltersIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, deviceFilters_);
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -510,8 +487,9 @@ public Builder addAllDeviceFilters(
          * @return This builder for chaining.
          */
         public Builder clearDeviceFilters() {
    -      deviceFilters_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      deviceFilters_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
    +      bitField0_ = (bitField0_ & ~0x00000001);;
           onChanged();
           return this;
         }
    @@ -522,27 +500,14 @@ public Builder clearDeviceFilters() {
          */
         public Builder addDeviceFiltersBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           ensureDeviceFiltersIsMutable();
           deviceFilters_.add(value);
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.TaskDeviceFilters)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TaskDeviceFiltersOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TaskDeviceFiltersOrBuilder.java
    index 2c1c746f142..abc76e76f7a 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TaskDeviceFiltersOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TaskDeviceFiltersOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/device_filters.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorBundleProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorBundleProtos.java
    index 8330500c8f0..ccdfaa8353b 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorBundleProtos.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorBundleProtos.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/tensor_bundle.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class TensorBundleProtos {
       private TensorBundleProtos() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      TensorBundleProtos.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,12 +28,12 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_BundleHeaderProto_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_BundleHeaderProto_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_BundleEntryProto_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_BundleEntryProto_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -65,15 +76,16 @@ public static void registerAllExtensions(
         internal_static_tensorflow_BundleHeaderProto_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_BundleHeaderProto_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_BundleHeaderProto_descriptor,
             new java.lang.String[] { "NumShards", "Endianness", "Version", });
         internal_static_tensorflow_BundleEntryProto_descriptor =
           getDescriptor().getMessageTypes().get(1);
         internal_static_tensorflow_BundleEntryProto_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_BundleEntryProto_descriptor,
             new java.lang.String[] { "Dtype", "Shape", "ShardId", "Offset", "Size", "Crc32C", "Slices", });
    +    descriptor.resolveAllFeaturesImmutable();
         org.tensorflow.proto.TensorShapeProtos.getDescriptor();
         org.tensorflow.proto.TensorSliceProtos.getDescriptor();
         org.tensorflow.proto.TypesProtos.getDescriptor();
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorConnection.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorConnection.java
    index a2a09620a94..56f3100ea90 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorConnection.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorConnection.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/config.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,12 +13,21 @@
      * Protobuf type {@code tensorflow.TensorConnection}
      */
     public final class TensorConnection extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.TensorConnection)
         TensorConnectionOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      TensorConnection.class.getName());
    +  }
       // Use TensorConnection.newBuilder() to construct.
    -  private TensorConnection(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private TensorConnection(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private TensorConnection() {
    @@ -24,25 +35,13 @@ private TensorConnection() {
         toTensor_ = "";
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new TensorConnection();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_TensorConnection_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_TensorConnection_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -50,7 +49,8 @@ protected java.lang.Object newInstance(
       }
     
       public static final int FROM_TENSOR_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object fromTensor_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object fromTensor_ = "";
       /**
        * 
        * A tensor name. The value of this tensor will be substituted for
    @@ -98,7 +98,8 @@ public java.lang.String getFromTensor() {
       }
     
       public static final int TO_TENSOR_FIELD_NUMBER = 2;
    -  private volatile java.lang.Object toTensor_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object toTensor_ = "";
       /**
        * 
        * A tensor name. The value of this tensor will be bound to the
    @@ -159,11 +160,11 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fromTensor_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fromTensor_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(fromTensor_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, fromTensor_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(toTensor_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, toTensor_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(toTensor_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 2, toTensor_);
         }
         getUnknownFields().writeTo(output);
       }
    @@ -174,11 +175,11 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fromTensor_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, fromTensor_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(fromTensor_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, fromTensor_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(toTensor_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, toTensor_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(toTensor_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(2, toTensor_);
         }
         size += getUnknownFields().getSerializedSize();
         memoizedSize = size;
    @@ -253,39 +254,41 @@ public static org.tensorflow.proto.TensorConnection parseFrom(
       }
       public static org.tensorflow.proto.TensorConnection parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.TensorConnection parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.TensorConnection parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.TensorConnection parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.TensorConnection parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.TensorConnection parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -305,7 +308,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -317,7 +320,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.TensorConnection}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.TensorConnection)
           org.tensorflow.proto.TensorConnectionOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -326,7 +329,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_TensorConnection_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -339,17 +342,16 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           fromTensor_ = "";
    -
           toTensor_ = "";
    -
           return this;
         }
     
    @@ -376,44 +378,21 @@ public org.tensorflow.proto.TensorConnection build() {
         @java.lang.Override
         public org.tensorflow.proto.TensorConnection buildPartial() {
           org.tensorflow.proto.TensorConnection result = new org.tensorflow.proto.TensorConnection(this);
    -      result.fromTensor_ = fromTensor_;
    -      result.toTensor_ = toTensor_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.TensorConnection result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.fromTensor_ = fromTensor_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.toTensor_ = toTensor_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.TensorConnection) {
    @@ -428,10 +407,12 @@ public Builder mergeFrom(org.tensorflow.proto.TensorConnection other) {
           if (other == org.tensorflow.proto.TensorConnection.getDefaultInstance()) return this;
           if (!other.getFromTensor().isEmpty()) {
             fromTensor_ = other.fromTensor_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (!other.getToTensor().isEmpty()) {
             toTensor_ = other.toTensor_;
    +        bitField0_ |= 0x00000002;
             onChanged();
           }
           this.mergeUnknownFields(other.getUnknownFields());
    @@ -462,12 +443,12 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   fromTensor_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
                   toTensor_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 default: {
    @@ -485,6 +466,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private java.lang.Object fromTensor_ = "";
         /**
    @@ -542,11 +524,9 @@ public java.lang.String getFromTensor() {
          */
         public Builder setFromTensor(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           fromTensor_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -560,8 +540,8 @@ public Builder setFromTensor(
          * @return This builder for chaining.
          */
         public Builder clearFromTensor() {
    -      
           fromTensor_ = getDefaultInstance().getFromTensor();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -577,12 +557,10 @@ public Builder clearFromTensor() {
          */
         public Builder setFromTensorBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           fromTensor_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -643,11 +621,9 @@ public java.lang.String getToTensor() {
          */
         public Builder setToTensor(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           toTensor_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -661,8 +637,8 @@ public Builder setToTensor(
          * @return This builder for chaining.
          */
         public Builder clearToTensor() {
    -      
           toTensor_ = getDefaultInstance().getToTensor();
    +      bitField0_ = (bitField0_ & ~0x00000002);
           onChanged();
           return this;
         }
    @@ -678,27 +654,13 @@ public Builder clearToTensor() {
          */
         public Builder setToTensorBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           toTensor_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.TensorConnection)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorConnectionOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorConnectionOrBuilder.java
    index 843a560f3e1..a13b5780996 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorConnectionOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorConnectionOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/config.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorDebugMode.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorDebugMode.java
    index 15fa58ef89b..982460ab7de 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorDebugMode.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorDebugMode.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/debug_event.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -95,11 +97,11 @@ public enum TensorDebugMode
        * 
        * Reduce the elements of a tensor to a rank-1 tensor of shape [3], in which
        * - the 1st element is -inf if any element of the tensor is -inf,
    -   *   or zero otherwise.
    +   * or zero otherwise.
        * - the 2nd element is +inf if any element of the tensor is +inf,
    -   *   or zero otherwise.
    +   * or zero otherwise.
        * - the 3rd element is nan if any element of the tensor is nan, or zero
    -   *   otherwise.
    +   * otherwise.
        * 
    * * REDUCE_INF_NAN_THREE_SLOTS = 8; @@ -108,6 +110,15 @@ public enum TensorDebugMode UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + TensorDebugMode.class.getName()); + } /** * UNSPECIFIED = 0; */ @@ -189,11 +200,11 @@ public enum TensorDebugMode *
        * Reduce the elements of a tensor to a rank-1 tensor of shape [3], in which
        * - the 1st element is -inf if any element of the tensor is -inf,
    -   *   or zero otherwise.
    +   * or zero otherwise.
        * - the 2nd element is +inf if any element of the tensor is +inf,
    -   *   or zero otherwise.
    +   * or zero otherwise.
        * - the 3rd element is nan if any element of the tensor is nan, or zero
    -   *   otherwise.
    +   * otherwise.
        * 
    * * REDUCE_INF_NAN_THREE_SLOTS = 8; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorDescription.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorDescription.java index da0e946af16..b91793b6788 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorDescription.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorDescription.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/framework/tensor_description.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -7,45 +9,43 @@ * Protobuf type {@code tensorflow.TensorDescription} */ public final class TensorDescription extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.TensorDescription) TensorDescriptionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + TensorDescription.class.getName()); + } // Use TensorDescription.newBuilder() to construct. - private TensorDescription(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private TensorDescription(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private TensorDescription() { dtype_ = 0; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TensorDescription(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.TensorDescriptionProtos.internal_static_tensorflow_TensorDescription_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.TensorDescriptionProtos.internal_static_tensorflow_TensorDescription_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.proto.TensorDescription.class, org.tensorflow.proto.TensorDescription.Builder.class); } + private int bitField0_; public static final int DTYPE_FIELD_NUMBER = 1; - private int dtype_; + private int dtype_ = 0; /** *
        * Data type of tensor elements
    @@ -66,8 +66,7 @@ protected java.lang.Object newInstance(
        * @return The dtype.
        */
       @java.lang.Override public org.tensorflow.proto.DataType getDtype() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(dtype_);
    +    org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(dtype_);
         return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
       }
     
    @@ -83,7 +82,7 @@ protected java.lang.Object newInstance(
        */
       @java.lang.Override
       public boolean hasShape() {
    -    return shape_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * 
    @@ -106,7 +105,7 @@ public org.tensorflow.proto.TensorShapeProto getShape() {
        */
       @java.lang.Override
       public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
    -    return getShape();
    +    return shape_ == null ? org.tensorflow.proto.TensorShapeProto.getDefaultInstance() : shape_;
       }
     
       public static final int ALLOCATION_DESCRIPTION_FIELD_NUMBER = 4;
    @@ -121,7 +120,7 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
        */
       @java.lang.Override
       public boolean hasAllocationDescription() {
    -    return allocationDescription_ != null;
    +    return ((bitField0_ & 0x00000002) != 0);
       }
       /**
        * 
    @@ -144,7 +143,7 @@ public org.tensorflow.proto.AllocationDescription getAllocationDescription() {
        */
       @java.lang.Override
       public org.tensorflow.proto.AllocationDescriptionOrBuilder getAllocationDescriptionOrBuilder() {
    -    return getAllocationDescription();
    +    return allocationDescription_ == null ? org.tensorflow.proto.AllocationDescription.getDefaultInstance() : allocationDescription_;
       }
     
       private byte memoizedIsInitialized = -1;
    @@ -164,10 +163,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         if (dtype_ != org.tensorflow.proto.DataType.DT_INVALID.getNumber()) {
           output.writeEnum(1, dtype_);
         }
    -    if (shape_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(2, getShape());
         }
    -    if (allocationDescription_ != null) {
    +    if (((bitField0_ & 0x00000002) != 0)) {
           output.writeMessage(4, getAllocationDescription());
         }
         getUnknownFields().writeTo(output);
    @@ -183,11 +182,11 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeEnumSize(1, dtype_);
         }
    -    if (shape_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(2, getShape());
         }
    -    if (allocationDescription_ != null) {
    +    if (((bitField0_ & 0x00000002) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(4, getAllocationDescription());
         }
    @@ -277,39 +276,41 @@ public static org.tensorflow.proto.TensorDescription parseFrom(
       }
       public static org.tensorflow.proto.TensorDescription parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.TensorDescription parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.TensorDescription parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.TensorDescription parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.TensorDescription parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.TensorDescription parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -329,7 +330,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -337,7 +338,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.TensorDescription}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.TensorDescription)
           org.tensorflow.proto.TensorDescriptionOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -346,7 +347,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.TensorDescriptionProtos.internal_static_tensorflow_TensorDescription_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -355,29 +356,34 @@ public static final class Builder extends
     
         // Construct using org.tensorflow.proto.TensorDescription.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getShapeFieldBuilder();
    +        getAllocationDescriptionFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           dtype_ = 0;
    -
    -      if (shapeBuilder_ == null) {
    -        shape_ = null;
    -      } else {
    -        shape_ = null;
    +      shape_ = null;
    +      if (shapeBuilder_ != null) {
    +        shapeBuilder_.dispose();
             shapeBuilder_ = null;
           }
    -      if (allocationDescriptionBuilder_ == null) {
    -        allocationDescription_ = null;
    -      } else {
    -        allocationDescription_ = null;
    +      allocationDescription_ = null;
    +      if (allocationDescriptionBuilder_ != null) {
    +        allocationDescriptionBuilder_.dispose();
             allocationDescriptionBuilder_ = null;
           }
           return this;
    @@ -406,53 +412,32 @@ public org.tensorflow.proto.TensorDescription build() {
         @java.lang.Override
         public org.tensorflow.proto.TensorDescription buildPartial() {
           org.tensorflow.proto.TensorDescription result = new org.tensorflow.proto.TensorDescription(this);
    -      result.dtype_ = dtype_;
    -      if (shapeBuilder_ == null) {
    -        result.shape_ = shape_;
    -      } else {
    -        result.shape_ = shapeBuilder_.build();
    -      }
    -      if (allocationDescriptionBuilder_ == null) {
    -        result.allocationDescription_ = allocationDescription_;
    -      } else {
    -        result.allocationDescription_ = allocationDescriptionBuilder_.build();
    -      }
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.TensorDescription result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.dtype_ = dtype_;
    +      }
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.shape_ = shapeBuilder_ == null
    +            ? shape_
    +            : shapeBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.allocationDescription_ = allocationDescriptionBuilder_ == null
    +            ? allocationDescription_
    +            : allocationDescriptionBuilder_.build();
    +        to_bitField0_ |= 0x00000002;
    +      }
    +      result.bitField0_ |= to_bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.TensorDescription) {
    @@ -502,21 +487,21 @@ public Builder mergeFrom(
                   break;
                 case 8: {
                   dtype_ = input.readEnum();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 8
                 case 18: {
                   input.readMessage(
                       getShapeFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 case 34: {
                   input.readMessage(
                       getAllocationDescriptionFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 34
                 default: {
    @@ -534,6 +519,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private int dtype_ = 0;
         /**
    @@ -557,8 +543,8 @@ public Builder mergeFrom(
          * @return This builder for chaining.
          */
         public Builder setDtypeValue(int value) {
    -      
           dtype_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -572,8 +558,7 @@ public Builder setDtypeValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.DataType getDtype() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(dtype_);
    +      org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(dtype_);
           return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
         }
         /**
    @@ -589,7 +574,7 @@ public Builder setDtype(org.tensorflow.proto.DataType value) {
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00000001;
           dtype_ = value.getNumber();
           onChanged();
           return this;
    @@ -603,14 +588,14 @@ public Builder setDtype(org.tensorflow.proto.DataType value) {
          * @return This builder for chaining.
          */
         public Builder clearDtype() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000001);
           dtype_ = 0;
           onChanged();
           return this;
         }
     
         private org.tensorflow.proto.TensorShapeProto shape_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> shapeBuilder_;
         /**
          * 
    @@ -621,7 +606,7 @@ public Builder clearDtype() {
          * @return Whether the shape field is set.
          */
         public boolean hasShape() {
    -      return shapeBuilder_ != null || shape_ != null;
    +      return ((bitField0_ & 0x00000002) != 0);
         }
         /**
          * 
    @@ -651,11 +636,11 @@ public Builder setShape(org.tensorflow.proto.TensorShapeProto value) {
               throw new NullPointerException();
             }
             shape_ = value;
    -        onChanged();
           } else {
             shapeBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return this;
         }
         /**
    @@ -669,11 +654,11 @@ public Builder setShape(
             org.tensorflow.proto.TensorShapeProto.Builder builderForValue) {
           if (shapeBuilder_ == null) {
             shape_ = builderForValue.build();
    -        onChanged();
           } else {
             shapeBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return this;
         }
         /**
    @@ -685,17 +670,20 @@ public Builder setShape(
          */
         public Builder mergeShape(org.tensorflow.proto.TensorShapeProto value) {
           if (shapeBuilder_ == null) {
    -        if (shape_ != null) {
    -          shape_ =
    -            org.tensorflow.proto.TensorShapeProto.newBuilder(shape_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000002) != 0) &&
    +          shape_ != null &&
    +          shape_ != org.tensorflow.proto.TensorShapeProto.getDefaultInstance()) {
    +          getShapeBuilder().mergeFrom(value);
             } else {
               shape_ = value;
             }
    -        onChanged();
           } else {
             shapeBuilder_.mergeFrom(value);
           }
    -
    +      if (shape_ != null) {
    +        bitField0_ |= 0x00000002;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -706,14 +694,13 @@ public Builder mergeShape(org.tensorflow.proto.TensorShapeProto value) {
          * .tensorflow.TensorShapeProto shape = 2;
          */
         public Builder clearShape() {
    -      if (shapeBuilder_ == null) {
    -        shape_ = null;
    -        onChanged();
    -      } else {
    -        shape_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000002);
    +      shape_ = null;
    +      if (shapeBuilder_ != null) {
    +        shapeBuilder_.dispose();
             shapeBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -724,7 +711,7 @@ public Builder clearShape() {
          * .tensorflow.TensorShapeProto shape = 2;
          */
         public org.tensorflow.proto.TensorShapeProto.Builder getShapeBuilder() {
    -      
    +      bitField0_ |= 0x00000002;
           onChanged();
           return getShapeFieldBuilder().getBuilder();
         }
    @@ -750,11 +737,11 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
          *
          * .tensorflow.TensorShapeProto shape = 2;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> 
             getShapeFieldBuilder() {
           if (shapeBuilder_ == null) {
    -        shapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        shapeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder>(
                     getShape(),
                     getParentForChildren(),
    @@ -765,7 +752,7 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
         }
     
         private org.tensorflow.proto.AllocationDescription allocationDescription_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.AllocationDescription, org.tensorflow.proto.AllocationDescription.Builder, org.tensorflow.proto.AllocationDescriptionOrBuilder> allocationDescriptionBuilder_;
         /**
          * 
    @@ -776,7 +763,7 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
          * @return Whether the allocationDescription field is set.
          */
         public boolean hasAllocationDescription() {
    -      return allocationDescriptionBuilder_ != null || allocationDescription_ != null;
    +      return ((bitField0_ & 0x00000004) != 0);
         }
         /**
          * 
    @@ -806,11 +793,11 @@ public Builder setAllocationDescription(org.tensorflow.proto.AllocationDescripti
               throw new NullPointerException();
             }
             allocationDescription_ = value;
    -        onChanged();
           } else {
             allocationDescriptionBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000004;
    +      onChanged();
           return this;
         }
         /**
    @@ -824,11 +811,11 @@ public Builder setAllocationDescription(
             org.tensorflow.proto.AllocationDescription.Builder builderForValue) {
           if (allocationDescriptionBuilder_ == null) {
             allocationDescription_ = builderForValue.build();
    -        onChanged();
           } else {
             allocationDescriptionBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000004;
    +      onChanged();
           return this;
         }
         /**
    @@ -840,17 +827,20 @@ public Builder setAllocationDescription(
          */
         public Builder mergeAllocationDescription(org.tensorflow.proto.AllocationDescription value) {
           if (allocationDescriptionBuilder_ == null) {
    -        if (allocationDescription_ != null) {
    -          allocationDescription_ =
    -            org.tensorflow.proto.AllocationDescription.newBuilder(allocationDescription_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000004) != 0) &&
    +          allocationDescription_ != null &&
    +          allocationDescription_ != org.tensorflow.proto.AllocationDescription.getDefaultInstance()) {
    +          getAllocationDescriptionBuilder().mergeFrom(value);
             } else {
               allocationDescription_ = value;
             }
    -        onChanged();
           } else {
             allocationDescriptionBuilder_.mergeFrom(value);
           }
    -
    +      if (allocationDescription_ != null) {
    +        bitField0_ |= 0x00000004;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -861,14 +851,13 @@ public Builder mergeAllocationDescription(org.tensorflow.proto.AllocationDescrip
          * .tensorflow.AllocationDescription allocation_description = 4;
          */
         public Builder clearAllocationDescription() {
    -      if (allocationDescriptionBuilder_ == null) {
    -        allocationDescription_ = null;
    -        onChanged();
    -      } else {
    -        allocationDescription_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000004);
    +      allocationDescription_ = null;
    +      if (allocationDescriptionBuilder_ != null) {
    +        allocationDescriptionBuilder_.dispose();
             allocationDescriptionBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -879,7 +868,7 @@ public Builder clearAllocationDescription() {
          * .tensorflow.AllocationDescription allocation_description = 4;
          */
         public org.tensorflow.proto.AllocationDescription.Builder getAllocationDescriptionBuilder() {
    -      
    +      bitField0_ |= 0x00000004;
           onChanged();
           return getAllocationDescriptionFieldBuilder().getBuilder();
         }
    @@ -905,11 +894,11 @@ public org.tensorflow.proto.AllocationDescriptionOrBuilder getAllocationDescript
          *
          * .tensorflow.AllocationDescription allocation_description = 4;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.AllocationDescription, org.tensorflow.proto.AllocationDescription.Builder, org.tensorflow.proto.AllocationDescriptionOrBuilder> 
             getAllocationDescriptionFieldBuilder() {
           if (allocationDescriptionBuilder_ == null) {
    -        allocationDescriptionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        allocationDescriptionBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.AllocationDescription, org.tensorflow.proto.AllocationDescription.Builder, org.tensorflow.proto.AllocationDescriptionOrBuilder>(
                     getAllocationDescription(),
                     getParentForChildren(),
    @@ -918,18 +907,6 @@ public org.tensorflow.proto.AllocationDescriptionOrBuilder getAllocationDescript
           }
           return allocationDescriptionBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.TensorDescription)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorDescriptionOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorDescriptionOrBuilder.java
    index 4becd9e8d58..42e8478aab8 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorDescriptionOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorDescriptionOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/tensor_description.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorDescriptionProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorDescriptionProtos.java
    index c3d5f3020f0..52dfca9d9b3 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorDescriptionProtos.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorDescriptionProtos.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/tensor_description.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class TensorDescriptionProtos {
       private TensorDescriptionProtos() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      TensorDescriptionProtos.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,7 +28,7 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_TensorDescription_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_TensorDescription_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -53,9 +64,10 @@ public static void registerAllExtensions(
         internal_static_tensorflow_TensorDescription_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_TensorDescription_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_TensorDescription_descriptor,
             new java.lang.String[] { "Dtype", "Shape", "AllocationDescription", });
    +    descriptor.resolveAllFeaturesImmutable();
         org.tensorflow.proto.AllocationDescriptionProtos.getDescriptor();
         org.tensorflow.proto.TensorShapeProtos.getDescriptor();
         org.tensorflow.proto.TypesProtos.getDescriptor();
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorInfo.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorInfo.java
    index dafe4a8a92f..1c2f1251ff7 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorInfo.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorInfo.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/meta_graph.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,37 +13,34 @@
      * Protobuf type {@code tensorflow.TensorInfo}
      */
     public final class TensorInfo extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.TensorInfo)
         TensorInfoOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      TensorInfo.class.getName());
    +  }
       // Use TensorInfo.newBuilder() to construct.
    -  private TensorInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private TensorInfo(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private TensorInfo() {
         dtype_ = 0;
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new TensorInfo();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.MetaGraphProtos.internal_static_tensorflow_TensorInfo_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.MetaGraphProtos.internal_static_tensorflow_TensorInfo_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -125,12 +124,21 @@ public interface CooSparseOrBuilder extends
        * Protobuf type {@code tensorflow.TensorInfo.CooSparse}
        */
       public static final class CooSparse extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.TensorInfo.CooSparse)
           CooSparseOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        CooSparse.class.getName());
    +    }
         // Use CooSparse.newBuilder() to construct.
    -    private CooSparse(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private CooSparse(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private CooSparse() {
    @@ -139,25 +147,13 @@ private CooSparse() {
           denseShapeTensorName_ = "";
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new CooSparse();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.MetaGraphProtos.internal_static_tensorflow_TensorInfo_CooSparse_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.MetaGraphProtos.internal_static_tensorflow_TensorInfo_CooSparse_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -165,7 +161,8 @@ protected java.lang.Object newInstance(
         }
     
         public static final int VALUES_TENSOR_NAME_FIELD_NUMBER = 1;
    -    private volatile java.lang.Object valuesTensorName_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object valuesTensorName_ = "";
         /**
          * 
          * The shape of the values Tensor is [?].  Its dtype must be the dtype of
    @@ -213,7 +210,8 @@ public java.lang.String getValuesTensorName() {
         }
     
         public static final int INDICES_TENSOR_NAME_FIELD_NUMBER = 2;
    -    private volatile java.lang.Object indicesTensorName_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object indicesTensorName_ = "";
         /**
          * 
          * The indices Tensor must have dtype int64 and shape [?, ?].
    @@ -259,7 +257,8 @@ public java.lang.String getIndicesTensorName() {
         }
     
         public static final int DENSE_SHAPE_TENSOR_NAME_FIELD_NUMBER = 3;
    -    private volatile java.lang.Object denseShapeTensorName_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object denseShapeTensorName_ = "";
         /**
          * 
          * The dynamic logical shape represented by the SparseTensor is recorded in
    @@ -320,14 +319,14 @@ public final boolean isInitialized() {
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output)
                             throws java.io.IOException {
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(valuesTensorName_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, valuesTensorName_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(valuesTensorName_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 1, valuesTensorName_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(indicesTensorName_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, indicesTensorName_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(indicesTensorName_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 2, indicesTensorName_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(denseShapeTensorName_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 3, denseShapeTensorName_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(denseShapeTensorName_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 3, denseShapeTensorName_);
           }
           getUnknownFields().writeTo(output);
         }
    @@ -338,14 +337,14 @@ public int getSerializedSize() {
           if (size != -1) return size;
     
           size = 0;
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(valuesTensorName_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, valuesTensorName_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(valuesTensorName_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, valuesTensorName_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(indicesTensorName_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, indicesTensorName_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(indicesTensorName_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, indicesTensorName_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(denseShapeTensorName_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, denseShapeTensorName_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(denseShapeTensorName_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(3, denseShapeTensorName_);
           }
           size += getUnknownFields().getSerializedSize();
           memoizedSize = size;
    @@ -424,39 +423,41 @@ public static org.tensorflow.proto.TensorInfo.CooSparse parseFrom(
         }
         public static org.tensorflow.proto.TensorInfo.CooSparse parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.TensorInfo.CooSparse parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.TensorInfo.CooSparse parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.TensorInfo.CooSparse parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.TensorInfo.CooSparse parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.TensorInfo.CooSparse parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -476,7 +477,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -489,7 +490,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.TensorInfo.CooSparse}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.TensorInfo.CooSparse)
             org.tensorflow.proto.TensorInfo.CooSparseOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -498,7 +499,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.MetaGraphProtos.internal_static_tensorflow_TensorInfo_CooSparse_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -511,19 +512,17 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             valuesTensorName_ = "";
    -
             indicesTensorName_ = "";
    -
             denseShapeTensorName_ = "";
    -
             return this;
           }
     
    @@ -550,45 +549,24 @@ public org.tensorflow.proto.TensorInfo.CooSparse build() {
           @java.lang.Override
           public org.tensorflow.proto.TensorInfo.CooSparse buildPartial() {
             org.tensorflow.proto.TensorInfo.CooSparse result = new org.tensorflow.proto.TensorInfo.CooSparse(this);
    -        result.valuesTensorName_ = valuesTensorName_;
    -        result.indicesTensorName_ = indicesTensorName_;
    -        result.denseShapeTensorName_ = denseShapeTensorName_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.TensorInfo.CooSparse result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.valuesTensorName_ = valuesTensorName_;
    +        }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.indicesTensorName_ = indicesTensorName_;
    +        }
    +        if (((from_bitField0_ & 0x00000004) != 0)) {
    +          result.denseShapeTensorName_ = denseShapeTensorName_;
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.TensorInfo.CooSparse) {
    @@ -603,14 +581,17 @@ public Builder mergeFrom(org.tensorflow.proto.TensorInfo.CooSparse other) {
             if (other == org.tensorflow.proto.TensorInfo.CooSparse.getDefaultInstance()) return this;
             if (!other.getValuesTensorName().isEmpty()) {
               valuesTensorName_ = other.valuesTensorName_;
    +          bitField0_ |= 0x00000001;
               onChanged();
             }
             if (!other.getIndicesTensorName().isEmpty()) {
               indicesTensorName_ = other.indicesTensorName_;
    +          bitField0_ |= 0x00000002;
               onChanged();
             }
             if (!other.getDenseShapeTensorName().isEmpty()) {
               denseShapeTensorName_ = other.denseShapeTensorName_;
    +          bitField0_ |= 0x00000004;
               onChanged();
             }
             this.mergeUnknownFields(other.getUnknownFields());
    @@ -641,17 +622,17 @@ public Builder mergeFrom(
                     break;
                   case 10: {
                     valuesTensorName_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 10
                   case 18: {
                     indicesTensorName_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 18
                   case 26: {
                     denseShapeTensorName_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000004;
                     break;
                   } // case 26
                   default: {
    @@ -669,6 +650,7 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    +      private int bitField0_;
     
           private java.lang.Object valuesTensorName_ = "";
           /**
    @@ -726,11 +708,9 @@ public java.lang.String getValuesTensorName() {
            */
           public Builder setValuesTensorName(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             valuesTensorName_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -744,8 +724,8 @@ public Builder setValuesTensorName(
            * @return This builder for chaining.
            */
           public Builder clearValuesTensorName() {
    -        
             valuesTensorName_ = getDefaultInstance().getValuesTensorName();
    +        bitField0_ = (bitField0_ & ~0x00000001);
             onChanged();
             return this;
           }
    @@ -761,12 +741,10 @@ public Builder clearValuesTensorName() {
            */
           public Builder setValuesTensorNameBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             valuesTensorName_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -824,11 +802,9 @@ public java.lang.String getIndicesTensorName() {
            */
           public Builder setIndicesTensorName(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             indicesTensorName_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -841,8 +817,8 @@ public Builder setIndicesTensorName(
            * @return This builder for chaining.
            */
           public Builder clearIndicesTensorName() {
    -        
             indicesTensorName_ = getDefaultInstance().getIndicesTensorName();
    +        bitField0_ = (bitField0_ & ~0x00000002);
             onChanged();
             return this;
           }
    @@ -857,12 +833,10 @@ public Builder clearIndicesTensorName() {
            */
           public Builder setIndicesTensorNameBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             indicesTensorName_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -923,11 +897,9 @@ public java.lang.String getDenseShapeTensorName() {
            */
           public Builder setDenseShapeTensorName(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             denseShapeTensorName_ = value;
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -941,8 +913,8 @@ public Builder setDenseShapeTensorName(
            * @return This builder for chaining.
            */
           public Builder clearDenseShapeTensorName() {
    -        
             denseShapeTensorName_ = getDefaultInstance().getDenseShapeTensorName();
    +        bitField0_ = (bitField0_ & ~0x00000004);
             onChanged();
             return this;
           }
    @@ -958,27 +930,13 @@ public Builder clearDenseShapeTensorName() {
            */
           public Builder setDenseShapeTensorNameBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             denseShapeTensorName_ = value;
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.TensorInfo.CooSparse)
         }
    @@ -1114,43 +1072,41 @@ org.tensorflow.proto.TensorInfoOrBuilder getComponentsOrBuilder(
        * Protobuf type {@code tensorflow.TensorInfo.CompositeTensor}
        */
       public static final class CompositeTensor extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.TensorInfo.CompositeTensor)
           CompositeTensorOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        CompositeTensor.class.getName());
    +    }
         // Use CompositeTensor.newBuilder() to construct.
    -    private CompositeTensor(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private CompositeTensor(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private CompositeTensor() {
           components_ = java.util.Collections.emptyList();
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new CompositeTensor();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.MetaGraphProtos.internal_static_tensorflow_TensorInfo_CompositeTensor_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.MetaGraphProtos.internal_static_tensorflow_TensorInfo_CompositeTensor_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
                   org.tensorflow.proto.TensorInfo.CompositeTensor.class, org.tensorflow.proto.TensorInfo.CompositeTensor.Builder.class);
         }
     
    +    private int bitField0_;
         public static final int TYPE_SPEC_FIELD_NUMBER = 1;
         private org.tensorflow.proto.Struct.TypeSpecProto typeSpec_;
         /**
    @@ -1163,7 +1119,7 @@ protected java.lang.Object newInstance(
          */
         @java.lang.Override
         public boolean hasTypeSpec() {
    -      return typeSpec_ != null;
    +      return ((bitField0_ & 0x00000001) != 0);
         }
         /**
          * 
    @@ -1186,10 +1142,11 @@ public org.tensorflow.proto.Struct.TypeSpecProto getTypeSpec() {
          */
         @java.lang.Override
         public org.tensorflow.proto.Struct.TypeSpecProtoOrBuilder getTypeSpecOrBuilder() {
    -      return getTypeSpec();
    +      return typeSpec_ == null ? org.tensorflow.proto.Struct.TypeSpecProto.getDefaultInstance() : typeSpec_;
         }
     
         public static final int COMPONENTS_FIELD_NUMBER = 2;
    +    @SuppressWarnings("serial")
         private java.util.List components_;
         /**
          * 
    @@ -1263,7 +1220,7 @@ public final boolean isInitialized() {
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output)
                             throws java.io.IOException {
    -      if (typeSpec_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             output.writeMessage(1, getTypeSpec());
           }
           for (int i = 0; i < components_.size(); i++) {
    @@ -1278,7 +1235,7 @@ public int getSerializedSize() {
           if (size != -1) return size;
     
           size = 0;
    -      if (typeSpec_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(1, getTypeSpec());
           }
    @@ -1366,39 +1323,41 @@ public static org.tensorflow.proto.TensorInfo.CompositeTensor parseFrom(
         }
         public static org.tensorflow.proto.TensorInfo.CompositeTensor parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.TensorInfo.CompositeTensor parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.TensorInfo.CompositeTensor parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.TensorInfo.CompositeTensor parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.TensorInfo.CompositeTensor parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.TensorInfo.CompositeTensor parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -1418,7 +1377,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -1430,7 +1389,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.TensorInfo.CompositeTensor}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.TensorInfo.CompositeTensor)
             org.tensorflow.proto.TensorInfo.CompositeTensorOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -1439,7 +1398,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.MetaGraphProtos.internal_static_tensorflow_TensorInfo_CompositeTensor_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -1448,21 +1407,28 @@ public static final class Builder extends
     
           // Construct using org.tensorflow.proto.TensorInfo.CompositeTensor.newBuilder()
           private Builder() {
    -
    +        maybeForceBuilderInitialization();
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
    -
    +        maybeForceBuilderInitialization();
    +      }
    +      private void maybeForceBuilderInitialization() {
    +        if (com.google.protobuf.GeneratedMessage
    +                .alwaysUseFieldBuilders) {
    +          getTypeSpecFieldBuilder();
    +          getComponentsFieldBuilder();
    +        }
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    -        if (typeSpecBuilder_ == null) {
    -          typeSpec_ = null;
    -        } else {
    -          typeSpec_ = null;
    +        bitField0_ = 0;
    +        typeSpec_ = null;
    +        if (typeSpecBuilder_ != null) {
    +          typeSpecBuilder_.dispose();
               typeSpecBuilder_ = null;
             }
             if (componentsBuilder_ == null) {
    @@ -1471,7 +1437,7 @@ public Builder clear() {
               components_ = null;
               componentsBuilder_.clear();
             }
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        bitField0_ = (bitField0_ & ~0x00000002);
             return this;
           }
     
    @@ -1498,57 +1464,36 @@ public org.tensorflow.proto.TensorInfo.CompositeTensor build() {
           @java.lang.Override
           public org.tensorflow.proto.TensorInfo.CompositeTensor buildPartial() {
             org.tensorflow.proto.TensorInfo.CompositeTensor result = new org.tensorflow.proto.TensorInfo.CompositeTensor(this);
    -        int from_bitField0_ = bitField0_;
    -        if (typeSpecBuilder_ == null) {
    -          result.typeSpec_ = typeSpec_;
    -        } else {
    -          result.typeSpec_ = typeSpecBuilder_.build();
    -        }
    +        buildPartialRepeatedFields(result);
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        onBuilt();
    +        return result;
    +      }
    +
    +      private void buildPartialRepeatedFields(org.tensorflow.proto.TensorInfo.CompositeTensor result) {
             if (componentsBuilder_ == null) {
    -          if (((bitField0_ & 0x00000001) != 0)) {
    +          if (((bitField0_ & 0x00000002) != 0)) {
                 components_ = java.util.Collections.unmodifiableList(components_);
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000002);
               }
               result.components_ = components_;
             } else {
               result.components_ = componentsBuilder_.build();
             }
    -        onBuilt();
    -        return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.TensorInfo.CompositeTensor result) {
    +        int from_bitField0_ = bitField0_;
    +        int to_bitField0_ = 0;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.typeSpec_ = typeSpecBuilder_ == null
    +              ? typeSpec_
    +              : typeSpecBuilder_.build();
    +          to_bitField0_ |= 0x00000001;
    +        }
    +        result.bitField0_ |= to_bitField0_;
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.TensorInfo.CompositeTensor) {
    @@ -1568,7 +1513,7 @@ public Builder mergeFrom(org.tensorflow.proto.TensorInfo.CompositeTensor other)
               if (!other.components_.isEmpty()) {
                 if (components_.isEmpty()) {
                   components_ = other.components_;
    -              bitField0_ = (bitField0_ & ~0x00000001);
    +              bitField0_ = (bitField0_ & ~0x00000002);
                 } else {
                   ensureComponentsIsMutable();
                   components_.addAll(other.components_);
    @@ -1581,9 +1526,9 @@ public Builder mergeFrom(org.tensorflow.proto.TensorInfo.CompositeTensor other)
                   componentsBuilder_.dispose();
                   componentsBuilder_ = null;
                   components_ = other.components_;
    -              bitField0_ = (bitField0_ & ~0x00000001);
    +              bitField0_ = (bitField0_ & ~0x00000002);
                   componentsBuilder_ = 
    -                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                        getComponentsFieldBuilder() : null;
                 } else {
                   componentsBuilder_.addAllMessages(other.components_);
    @@ -1620,7 +1565,7 @@ public Builder mergeFrom(
                     input.readMessage(
                         getTypeSpecFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 10
                   case 18: {
    @@ -1654,7 +1599,7 @@ public Builder mergeFrom(
           private int bitField0_;
     
           private org.tensorflow.proto.Struct.TypeSpecProto typeSpec_;
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Struct.TypeSpecProto, org.tensorflow.proto.Struct.TypeSpecProto.Builder, org.tensorflow.proto.Struct.TypeSpecProtoOrBuilder> typeSpecBuilder_;
           /**
            * 
    @@ -1665,7 +1610,7 @@ public Builder mergeFrom(
            * @return Whether the typeSpec field is set.
            */
           public boolean hasTypeSpec() {
    -        return typeSpecBuilder_ != null || typeSpec_ != null;
    +        return ((bitField0_ & 0x00000001) != 0);
           }
           /**
            * 
    @@ -1695,11 +1640,11 @@ public Builder setTypeSpec(org.tensorflow.proto.Struct.TypeSpecProto value) {
                 throw new NullPointerException();
               }
               typeSpec_ = value;
    -          onChanged();
             } else {
               typeSpecBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000001;
    +        onChanged();
             return this;
           }
           /**
    @@ -1713,11 +1658,11 @@ public Builder setTypeSpec(
               org.tensorflow.proto.Struct.TypeSpecProto.Builder builderForValue) {
             if (typeSpecBuilder_ == null) {
               typeSpec_ = builderForValue.build();
    -          onChanged();
             } else {
               typeSpecBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000001;
    +        onChanged();
             return this;
           }
           /**
    @@ -1729,17 +1674,20 @@ public Builder setTypeSpec(
            */
           public Builder mergeTypeSpec(org.tensorflow.proto.Struct.TypeSpecProto value) {
             if (typeSpecBuilder_ == null) {
    -          if (typeSpec_ != null) {
    -            typeSpec_ =
    -              org.tensorflow.proto.Struct.TypeSpecProto.newBuilder(typeSpec_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000001) != 0) &&
    +            typeSpec_ != null &&
    +            typeSpec_ != org.tensorflow.proto.Struct.TypeSpecProto.getDefaultInstance()) {
    +            getTypeSpecBuilder().mergeFrom(value);
               } else {
                 typeSpec_ = value;
               }
    -          onChanged();
             } else {
               typeSpecBuilder_.mergeFrom(value);
             }
    -
    +        if (typeSpec_ != null) {
    +          bitField0_ |= 0x00000001;
    +          onChanged();
    +        }
             return this;
           }
           /**
    @@ -1750,14 +1698,13 @@ public Builder mergeTypeSpec(org.tensorflow.proto.Struct.TypeSpecProto value) {
            * .tensorflow.TypeSpecProto type_spec = 1;
            */
           public Builder clearTypeSpec() {
    -        if (typeSpecBuilder_ == null) {
    -          typeSpec_ = null;
    -          onChanged();
    -        } else {
    -          typeSpec_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000001);
    +        typeSpec_ = null;
    +        if (typeSpecBuilder_ != null) {
    +          typeSpecBuilder_.dispose();
               typeSpecBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
    @@ -1768,7 +1715,7 @@ public Builder clearTypeSpec() {
            * .tensorflow.TypeSpecProto type_spec = 1;
            */
           public org.tensorflow.proto.Struct.TypeSpecProto.Builder getTypeSpecBuilder() {
    -        
    +        bitField0_ |= 0x00000001;
             onChanged();
             return getTypeSpecFieldBuilder().getBuilder();
           }
    @@ -1794,11 +1741,11 @@ public org.tensorflow.proto.Struct.TypeSpecProtoOrBuilder getTypeSpecOrBuilder()
            *
            * .tensorflow.TypeSpecProto type_spec = 1;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Struct.TypeSpecProto, org.tensorflow.proto.Struct.TypeSpecProto.Builder, org.tensorflow.proto.Struct.TypeSpecProtoOrBuilder> 
               getTypeSpecFieldBuilder() {
             if (typeSpecBuilder_ == null) {
    -          typeSpecBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          typeSpecBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.Struct.TypeSpecProto, org.tensorflow.proto.Struct.TypeSpecProto.Builder, org.tensorflow.proto.Struct.TypeSpecProtoOrBuilder>(
                       getTypeSpec(),
                       getParentForChildren(),
    @@ -1811,13 +1758,13 @@ public org.tensorflow.proto.Struct.TypeSpecProtoOrBuilder getTypeSpecOrBuilder()
           private java.util.List components_ =
             java.util.Collections.emptyList();
           private void ensureComponentsIsMutable() {
    -        if (!((bitField0_ & 0x00000001) != 0)) {
    +        if (!((bitField0_ & 0x00000002) != 0)) {
               components_ = new java.util.ArrayList(components_);
    -          bitField0_ |= 0x00000001;
    +          bitField0_ |= 0x00000002;
              }
           }
     
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.TensorInfo, org.tensorflow.proto.TensorInfo.Builder, org.tensorflow.proto.TensorInfoOrBuilder> componentsBuilder_;
     
           /**
    @@ -2007,7 +1954,7 @@ public Builder addAllComponents(
           public Builder clearComponents() {
             if (componentsBuilder_ == null) {
               components_ = java.util.Collections.emptyList();
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ = (bitField0_ & ~0x00000002);
               onChanged();
             } else {
               componentsBuilder_.clear();
    @@ -2105,32 +2052,20 @@ public org.tensorflow.proto.TensorInfo.Builder addComponentsBuilder(
                getComponentsBuilderList() {
             return getComponentsFieldBuilder().getBuilderList();
           }
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.TensorInfo, org.tensorflow.proto.TensorInfo.Builder, org.tensorflow.proto.TensorInfoOrBuilder> 
               getComponentsFieldBuilder() {
             if (componentsBuilder_ == null) {
    -          componentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +          componentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                   org.tensorflow.proto.TensorInfo, org.tensorflow.proto.TensorInfo.Builder, org.tensorflow.proto.TensorInfoOrBuilder>(
                       components_,
    -                  ((bitField0_ & 0x00000001) != 0),
    +                  ((bitField0_ & 0x00000002) != 0),
                       getParentForChildren(),
                       isClean());
               components_ = null;
             }
             return componentsBuilder_;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.TensorInfo.CompositeTensor)
         }
    @@ -2183,7 +2118,9 @@ public org.tensorflow.proto.TensorInfo.CompositeTensor getDefaultInstanceForType
     
       }
     
    +  private int bitField0_;
       private int encodingCase_ = 0;
    +  @SuppressWarnings("serial")
       private java.lang.Object encoding_;
       public enum EncodingCase
           implements com.google.protobuf.Internal.EnumLite,
    @@ -2386,7 +2323,7 @@ public org.tensorflow.proto.TensorInfo.CompositeTensorOrBuilder getCompositeTens
       }
     
       public static final int DTYPE_FIELD_NUMBER = 2;
    -  private int dtype_;
    +  private int dtype_ = 0;
       /**
        * .tensorflow.DataType dtype = 2;
        * @return The enum numeric value on the wire for dtype.
    @@ -2399,8 +2336,7 @@ public org.tensorflow.proto.TensorInfo.CompositeTensorOrBuilder getCompositeTens
        * @return The dtype.
        */
       @java.lang.Override public org.tensorflow.proto.DataType getDtype() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(dtype_);
    +    org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(dtype_);
         return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
       }
     
    @@ -2418,7 +2354,7 @@ public org.tensorflow.proto.TensorInfo.CompositeTensorOrBuilder getCompositeTens
        */
       @java.lang.Override
       public boolean hasTensorShape() {
    -    return tensorShape_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * 
    @@ -2445,7 +2381,7 @@ public org.tensorflow.proto.TensorShapeProto getTensorShape() {
        */
       @java.lang.Override
       public org.tensorflow.proto.TensorShapeProtoOrBuilder getTensorShapeOrBuilder() {
    -    return getTensorShape();
    +    return tensorShape_ == null ? org.tensorflow.proto.TensorShapeProto.getDefaultInstance() : tensorShape_;
       }
     
       private byte memoizedIsInitialized = -1;
    @@ -2463,12 +2399,12 @@ public final boolean isInitialized() {
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
         if (encodingCase_ == 1) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, encoding_);
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, encoding_);
         }
         if (dtype_ != org.tensorflow.proto.DataType.DT_INVALID.getNumber()) {
           output.writeEnum(2, dtype_);
         }
    -    if (tensorShape_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(3, getTensorShape());
         }
         if (encodingCase_ == 4) {
    @@ -2487,13 +2423,13 @@ public int getSerializedSize() {
     
         size = 0;
         if (encodingCase_ == 1) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, encoding_);
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, encoding_);
         }
         if (dtype_ != org.tensorflow.proto.DataType.DT_INVALID.getNumber()) {
           size += com.google.protobuf.CodedOutputStream
             .computeEnumSize(2, dtype_);
         }
    -    if (tensorShape_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(3, getTensorShape());
         }
    @@ -2615,39 +2551,41 @@ public static org.tensorflow.proto.TensorInfo parseFrom(
       }
       public static org.tensorflow.proto.TensorInfo parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.TensorInfo parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.TensorInfo parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.TensorInfo parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.TensorInfo parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.TensorInfo parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -2667,7 +2605,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -2679,7 +2617,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.TensorInfo}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.TensorInfo)
           org.tensorflow.proto.TensorInfoOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -2688,7 +2626,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.MetaGraphProtos.internal_static_tensorflow_TensorInfo_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -2697,17 +2635,24 @@ public static final class Builder extends
     
         // Construct using org.tensorflow.proto.TensorInfo.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getTensorShapeFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           if (cooSparseBuilder_ != null) {
             cooSparseBuilder_.clear();
           }
    @@ -2715,11 +2660,9 @@ public Builder clear() {
             compositeTensorBuilder_.clear();
           }
           dtype_ = 0;
    -
    -      if (tensorShapeBuilder_ == null) {
    -        tensorShape_ = null;
    -      } else {
    -        tensorShape_ = null;
    +      tensorShape_ = null;
    +      if (tensorShapeBuilder_ != null) {
    +        tensorShapeBuilder_.dispose();
             tensorShapeBuilder_ = null;
           }
           encodingCase_ = 0;
    @@ -2750,66 +2693,40 @@ public org.tensorflow.proto.TensorInfo build() {
         @java.lang.Override
         public org.tensorflow.proto.TensorInfo buildPartial() {
           org.tensorflow.proto.TensorInfo result = new org.tensorflow.proto.TensorInfo(this);
    -      if (encodingCase_ == 1) {
    -        result.encoding_ = encoding_;
    -      }
    -      if (encodingCase_ == 4) {
    -        if (cooSparseBuilder_ == null) {
    -          result.encoding_ = encoding_;
    -        } else {
    -          result.encoding_ = cooSparseBuilder_.build();
    -        }
    -      }
    -      if (encodingCase_ == 5) {
    -        if (compositeTensorBuilder_ == null) {
    -          result.encoding_ = encoding_;
    -        } else {
    -          result.encoding_ = compositeTensorBuilder_.build();
    -        }
    -      }
    -      result.dtype_ = dtype_;
    -      if (tensorShapeBuilder_ == null) {
    -        result.tensorShape_ = tensorShape_;
    -      } else {
    -        result.tensorShape_ = tensorShapeBuilder_.build();
    -      }
    -      result.encodingCase_ = encodingCase_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      buildPartialOneofs(result);
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    +    private void buildPartial0(org.tensorflow.proto.TensorInfo result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.dtype_ = dtype_;
    +      }
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000010) != 0)) {
    +        result.tensorShape_ = tensorShapeBuilder_ == null
    +            ? tensorShape_
    +            : tensorShapeBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
    +      }
    +      result.bitField0_ |= to_bitField0_;
         }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +
    +    private void buildPartialOneofs(org.tensorflow.proto.TensorInfo result) {
    +      result.encodingCase_ = encodingCase_;
    +      result.encoding_ = this.encoding_;
    +      if (encodingCase_ == 4 &&
    +          cooSparseBuilder_ != null) {
    +        result.encoding_ = cooSparseBuilder_.build();
    +      }
    +      if (encodingCase_ == 5 &&
    +          compositeTensorBuilder_ != null) {
    +        result.encoding_ = compositeTensorBuilder_.build();
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.TensorInfo) {
    @@ -2881,14 +2798,14 @@ public Builder mergeFrom(
                 } // case 10
                 case 16: {
                   dtype_ = input.readEnum();
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 16
                 case 26: {
                   input.readMessage(
                       getTensorShapeFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000010;
                   break;
                 } // case 26
                 case 34: {
    @@ -2935,6 +2852,7 @@ public Builder clearEncoding() {
           return this;
         }
     
    +    private int bitField0_;
     
         /**
          * 
    @@ -3012,10 +2930,8 @@ public java.lang.String getName() {
          */
         public Builder setName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  encodingCase_ = 1;
    +      if (value == null) { throw new NullPointerException(); }
    +      encodingCase_ = 1;
           encoding_ = value;
           onChanged();
           return this;
    @@ -3047,17 +2963,15 @@ public Builder clearName() {
          */
         public Builder setNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           encodingCase_ = 1;
           encoding_ = value;
           onChanged();
           return this;
         }
     
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorInfo.CooSparse, org.tensorflow.proto.TensorInfo.CooSparse.Builder, org.tensorflow.proto.TensorInfo.CooSparseOrBuilder> cooSparseBuilder_;
         /**
          * 
    @@ -3243,14 +3157,14 @@ public org.tensorflow.proto.TensorInfo.CooSparseOrBuilder getCooSparseOrBuilder(
          *
          * .tensorflow.TensorInfo.CooSparse coo_sparse = 4;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorInfo.CooSparse, org.tensorflow.proto.TensorInfo.CooSparse.Builder, org.tensorflow.proto.TensorInfo.CooSparseOrBuilder> 
             getCooSparseFieldBuilder() {
           if (cooSparseBuilder_ == null) {
             if (!(encodingCase_ == 4)) {
               encoding_ = org.tensorflow.proto.TensorInfo.CooSparse.getDefaultInstance();
             }
    -        cooSparseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        cooSparseBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.TensorInfo.CooSparse, org.tensorflow.proto.TensorInfo.CooSparse.Builder, org.tensorflow.proto.TensorInfo.CooSparseOrBuilder>(
                     (org.tensorflow.proto.TensorInfo.CooSparse) encoding_,
                     getParentForChildren(),
    @@ -3258,11 +3172,11 @@ public org.tensorflow.proto.TensorInfo.CooSparseOrBuilder getCooSparseOrBuilder(
             encoding_ = null;
           }
           encodingCase_ = 4;
    -      onChanged();;
    +      onChanged();
           return cooSparseBuilder_;
         }
     
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorInfo.CompositeTensor, org.tensorflow.proto.TensorInfo.CompositeTensor.Builder, org.tensorflow.proto.TensorInfo.CompositeTensorOrBuilder> compositeTensorBuilder_;
         /**
          * 
    @@ -3421,14 +3335,14 @@ public org.tensorflow.proto.TensorInfo.CompositeTensorOrBuilder getCompositeTens
          *
          * .tensorflow.TensorInfo.CompositeTensor composite_tensor = 5;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorInfo.CompositeTensor, org.tensorflow.proto.TensorInfo.CompositeTensor.Builder, org.tensorflow.proto.TensorInfo.CompositeTensorOrBuilder> 
             getCompositeTensorFieldBuilder() {
           if (compositeTensorBuilder_ == null) {
             if (!(encodingCase_ == 5)) {
               encoding_ = org.tensorflow.proto.TensorInfo.CompositeTensor.getDefaultInstance();
             }
    -        compositeTensorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        compositeTensorBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.TensorInfo.CompositeTensor, org.tensorflow.proto.TensorInfo.CompositeTensor.Builder, org.tensorflow.proto.TensorInfo.CompositeTensorOrBuilder>(
                     (org.tensorflow.proto.TensorInfo.CompositeTensor) encoding_,
                     getParentForChildren(),
    @@ -3436,7 +3350,7 @@ public org.tensorflow.proto.TensorInfo.CompositeTensorOrBuilder getCompositeTens
             encoding_ = null;
           }
           encodingCase_ = 5;
    -      onChanged();;
    +      onChanged();
           return compositeTensorBuilder_;
         }
     
    @@ -3454,8 +3368,8 @@ public org.tensorflow.proto.TensorInfo.CompositeTensorOrBuilder getCompositeTens
          * @return This builder for chaining.
          */
         public Builder setDtypeValue(int value) {
    -      
           dtype_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -3465,8 +3379,7 @@ public Builder setDtypeValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.DataType getDtype() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(dtype_);
    +      org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(dtype_);
           return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
         }
         /**
    @@ -3478,7 +3391,7 @@ public Builder setDtype(org.tensorflow.proto.DataType value) {
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00000008;
           dtype_ = value.getNumber();
           onChanged();
           return this;
    @@ -3488,14 +3401,14 @@ public Builder setDtype(org.tensorflow.proto.DataType value) {
          * @return This builder for chaining.
          */
         public Builder clearDtype() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000008);
           dtype_ = 0;
           onChanged();
           return this;
         }
     
         private org.tensorflow.proto.TensorShapeProto tensorShape_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> tensorShapeBuilder_;
         /**
          * 
    @@ -3508,7 +3421,7 @@ public Builder clearDtype() {
          * @return Whether the tensorShape field is set.
          */
         public boolean hasTensorShape() {
    -      return tensorShapeBuilder_ != null || tensorShape_ != null;
    +      return ((bitField0_ & 0x00000010) != 0);
         }
         /**
          * 
    @@ -3542,11 +3455,11 @@ public Builder setTensorShape(org.tensorflow.proto.TensorShapeProto value) {
               throw new NullPointerException();
             }
             tensorShape_ = value;
    -        onChanged();
           } else {
             tensorShapeBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000010;
    +      onChanged();
           return this;
         }
         /**
    @@ -3562,11 +3475,11 @@ public Builder setTensorShape(
             org.tensorflow.proto.TensorShapeProto.Builder builderForValue) {
           if (tensorShapeBuilder_ == null) {
             tensorShape_ = builderForValue.build();
    -        onChanged();
           } else {
             tensorShapeBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000010;
    +      onChanged();
           return this;
         }
         /**
    @@ -3580,17 +3493,20 @@ public Builder setTensorShape(
          */
         public Builder mergeTensorShape(org.tensorflow.proto.TensorShapeProto value) {
           if (tensorShapeBuilder_ == null) {
    -        if (tensorShape_ != null) {
    -          tensorShape_ =
    -            org.tensorflow.proto.TensorShapeProto.newBuilder(tensorShape_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000010) != 0) &&
    +          tensorShape_ != null &&
    +          tensorShape_ != org.tensorflow.proto.TensorShapeProto.getDefaultInstance()) {
    +          getTensorShapeBuilder().mergeFrom(value);
             } else {
               tensorShape_ = value;
             }
    -        onChanged();
           } else {
             tensorShapeBuilder_.mergeFrom(value);
           }
    -
    +      if (tensorShape_ != null) {
    +        bitField0_ |= 0x00000010;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -3603,14 +3519,13 @@ public Builder mergeTensorShape(org.tensorflow.proto.TensorShapeProto value) {
          * .tensorflow.TensorShapeProto tensor_shape = 3;
          */
         public Builder clearTensorShape() {
    -      if (tensorShapeBuilder_ == null) {
    -        tensorShape_ = null;
    -        onChanged();
    -      } else {
    -        tensorShape_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000010);
    +      tensorShape_ = null;
    +      if (tensorShapeBuilder_ != null) {
    +        tensorShapeBuilder_.dispose();
             tensorShapeBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -3623,7 +3538,7 @@ public Builder clearTensorShape() {
          * .tensorflow.TensorShapeProto tensor_shape = 3;
          */
         public org.tensorflow.proto.TensorShapeProto.Builder getTensorShapeBuilder() {
    -      
    +      bitField0_ |= 0x00000010;
           onChanged();
           return getTensorShapeFieldBuilder().getBuilder();
         }
    @@ -3653,11 +3568,11 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getTensorShapeOrBuilder()
          *
          * .tensorflow.TensorShapeProto tensor_shape = 3;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> 
             getTensorShapeFieldBuilder() {
           if (tensorShapeBuilder_ == null) {
    -        tensorShapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        tensorShapeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder>(
                     getTensorShape(),
                     getParentForChildren(),
    @@ -3666,18 +3581,6 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getTensorShapeOrBuilder()
           }
           return tensorShapeBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.TensorInfo)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorInfoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorInfoOrBuilder.java
    index 704d81f874e..e6f8bc5266b 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorInfoOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorInfoOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/meta_graph.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -143,5 +145,5 @@ public interface TensorInfoOrBuilder extends
        */
       org.tensorflow.proto.TensorShapeProtoOrBuilder getTensorShapeOrBuilder();
     
    -  public org.tensorflow.proto.TensorInfo.EncodingCase getEncodingCase();
    +  org.tensorflow.proto.TensorInfo.EncodingCase getEncodingCase();
     }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorProto.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorProto.java
    index ef4157a3352..16963543fb5 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorProto.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorProto.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/tensor.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,12 +13,21 @@
      * Protobuf type {@code tensorflow.TensorProto}
      */
     public final class TensorProto extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.TensorProto)
         TensorProtoOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      TensorProto.class.getName());
    +  }
       // Use TensorProto.newBuilder() to construct.
    -  private TensorProto(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private TensorProto(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private TensorProto() {
    @@ -26,7 +37,7 @@ private TensorProto() {
         floatVal_ = emptyFloatList();
         doubleVal_ = emptyDoubleList();
         intVal_ = emptyIntList();
    -    stringVal_ = java.util.Collections.emptyList();
    +    stringVal_ = emptyList(com.google.protobuf.ByteString.class);
         scomplexVal_ = emptyFloatList();
         int64Val_ = emptyLongList();
         boolVal_ = emptyBooleanList();
    @@ -38,33 +49,22 @@ private TensorProto() {
         float8Val_ = com.google.protobuf.ByteString.EMPTY;
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new TensorProto();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.TensorProtos.internal_static_tensorflow_TensorProto_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.TensorProtos.internal_static_tensorflow_TensorProto_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
                 org.tensorflow.proto.TensorProto.class, org.tensorflow.proto.TensorProto.Builder.class);
       }
     
    +  private int bitField0_;
       public static final int DTYPE_FIELD_NUMBER = 1;
    -  private int dtype_;
    +  private int dtype_ = 0;
       /**
        * 
        * Data type of the tensor.
    @@ -85,8 +85,7 @@ protected java.lang.Object newInstance(
        * @return The dtype.
        */
       @java.lang.Override public org.tensorflow.proto.DataType getDtype() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(dtype_);
    +    org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(dtype_);
         return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
       }
     
    @@ -102,7 +101,7 @@ protected java.lang.Object newInstance(
        */
       @java.lang.Override
       public boolean hasTensorShape() {
    -    return tensorShape_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * 
    @@ -125,14 +124,15 @@ public org.tensorflow.proto.TensorShapeProto getTensorShape() {
        */
       @java.lang.Override
       public org.tensorflow.proto.TensorShapeProtoOrBuilder getTensorShapeOrBuilder() {
    -    return getTensorShape();
    +    return tensorShape_ == null ? org.tensorflow.proto.TensorShapeProto.getDefaultInstance() : tensorShape_;
       }
     
       public static final int VERSION_NUMBER_FIELD_NUMBER = 3;
    -  private int versionNumber_;
    +  private int versionNumber_ = 0;
       /**
        * 
        * Version number.
    +   *
        * In version 0, if the "repeated xxx" representations contain only one
        * element, that element is repeated to fill the shape.  This makes it easy
        * to represent a constant Tensor with a single value.
    @@ -147,7 +147,7 @@ public int getVersionNumber() {
       }
     
       public static final int TENSOR_CONTENT_FIELD_NUMBER = 4;
    -  private com.google.protobuf.ByteString tensorContent_;
    +  private com.google.protobuf.ByteString tensorContent_ = com.google.protobuf.ByteString.EMPTY;
       /**
        * 
        * Serialized raw tensor content from either Tensor::AsProtoTensorContent or
    @@ -166,7 +166,9 @@ public com.google.protobuf.ByteString getTensorContent() {
       }
     
       public static final int HALF_VAL_FIELD_NUMBER = 13;
    -  private com.google.protobuf.Internal.IntList halfVal_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.Internal.IntList halfVal_ =
    +      emptyIntList();
       /**
        * 
        * DT_HALF, DT_BFLOAT16. Note that since protobuf has no int16 type, we'll
    @@ -209,7 +211,9 @@ public int getHalfVal(int index) {
       private int halfValMemoizedSerializedSize = -1;
     
       public static final int FLOAT_VAL_FIELD_NUMBER = 5;
    -  private com.google.protobuf.Internal.FloatList floatVal_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.Internal.FloatList floatVal_ =
    +      emptyFloatList();
       /**
        * 
        * DT_FLOAT.
    @@ -249,7 +253,9 @@ public float getFloatVal(int index) {
       private int floatValMemoizedSerializedSize = -1;
     
       public static final int DOUBLE_VAL_FIELD_NUMBER = 6;
    -  private com.google.protobuf.Internal.DoubleList doubleVal_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.Internal.DoubleList doubleVal_ =
    +      emptyDoubleList();
       /**
        * 
        * DT_DOUBLE.
    @@ -289,7 +295,9 @@ public double getDoubleVal(int index) {
       private int doubleValMemoizedSerializedSize = -1;
     
       public static final int INT_VAL_FIELD_NUMBER = 7;
    -  private com.google.protobuf.Internal.IntList intVal_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.Internal.IntList intVal_ =
    +      emptyIntList();
       /**
        * 
        * DT_INT32, DT_INT16, DT_UINT16, DT_INT8, DT_UINT8.
    @@ -329,7 +337,9 @@ public int getIntVal(int index) {
       private int intValMemoizedSerializedSize = -1;
     
       public static final int STRING_VAL_FIELD_NUMBER = 8;
    -  private java.util.List stringVal_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.Internal.ProtobufList stringVal_ =
    +      emptyList(com.google.protobuf.ByteString.class);
       /**
        * 
        * DT_STRING
    @@ -368,7 +378,9 @@ public com.google.protobuf.ByteString getStringVal(int index) {
       }
     
       public static final int SCOMPLEX_VAL_FIELD_NUMBER = 9;
    -  private com.google.protobuf.Internal.FloatList scomplexVal_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.Internal.FloatList scomplexVal_ =
    +      emptyFloatList();
       /**
        * 
        * DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real
    @@ -411,7 +423,9 @@ public float getScomplexVal(int index) {
       private int scomplexValMemoizedSerializedSize = -1;
     
       public static final int INT64_VAL_FIELD_NUMBER = 10;
    -  private com.google.protobuf.Internal.LongList int64Val_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.Internal.LongList int64Val_ =
    +      emptyLongList();
       /**
        * 
        * DT_INT64
    @@ -451,7 +465,9 @@ public long getInt64Val(int index) {
       private int int64ValMemoizedSerializedSize = -1;
     
       public static final int BOOL_VAL_FIELD_NUMBER = 11;
    -  private com.google.protobuf.Internal.BooleanList boolVal_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.Internal.BooleanList boolVal_ =
    +      emptyBooleanList();
       /**
        * 
        * DT_BOOL
    @@ -491,7 +507,9 @@ public boolean getBoolVal(int index) {
       private int boolValMemoizedSerializedSize = -1;
     
       public static final int DCOMPLEX_VAL_FIELD_NUMBER = 12;
    -  private com.google.protobuf.Internal.DoubleList dcomplexVal_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.Internal.DoubleList dcomplexVal_ =
    +      emptyDoubleList();
       /**
        * 
        * DT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real
    @@ -534,6 +552,7 @@ public double getDcomplexVal(int index) {
       private int dcomplexValMemoizedSerializedSize = -1;
     
       public static final int RESOURCE_HANDLE_VAL_FIELD_NUMBER = 14;
    +  @SuppressWarnings("serial")
       private java.util.List resourceHandleVal_;
       /**
        * 
    @@ -594,6 +613,7 @@ public org.tensorflow.proto.ResourceHandleProtoOrBuilder getResourceHandleValOrB
       }
     
       public static final int VARIANT_VAL_FIELD_NUMBER = 15;
    +  @SuppressWarnings("serial")
       private java.util.List variantVal_;
       /**
        * 
    @@ -654,7 +674,9 @@ public org.tensorflow.proto.VariantTensorDataProtoOrBuilder getVariantValOrBuild
       }
     
       public static final int UINT32_VAL_FIELD_NUMBER = 16;
    -  private com.google.protobuf.Internal.IntList uint32Val_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.Internal.IntList uint32Val_ =
    +      emptyIntList();
       /**
        * 
        * DT_UINT32
    @@ -694,7 +716,9 @@ public int getUint32Val(int index) {
       private int uint32ValMemoizedSerializedSize = -1;
     
       public static final int UINT64_VAL_FIELD_NUMBER = 17;
    -  private com.google.protobuf.Internal.LongList uint64Val_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.Internal.LongList uint64Val_ =
    +      emptyLongList();
       /**
        * 
        * DT_UINT64
    @@ -734,7 +758,7 @@ public long getUint64Val(int index) {
       private int uint64ValMemoizedSerializedSize = -1;
     
       public static final int FLOAT8_VAL_FIELD_NUMBER = 18;
    -  private com.google.protobuf.ByteString float8Val_;
    +  private com.google.protobuf.ByteString float8Val_ = com.google.protobuf.ByteString.EMPTY;
       /**
        * 
        * DT_FLOAT8_*, use variable-sized set of bytes
    @@ -767,7 +791,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         if (dtype_ != org.tensorflow.proto.DataType.DT_INVALID.getNumber()) {
           output.writeEnum(1, dtype_);
         }
    -    if (tensorShape_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(2, getTensorShape());
         }
         if (versionNumber_ != 0) {
    @@ -871,7 +895,7 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeEnumSize(1, dtype_);
         }
    -    if (tensorShape_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(2, getTensorShape());
         }
    @@ -1196,39 +1220,41 @@ public static org.tensorflow.proto.TensorProto parseFrom(
       }
       public static org.tensorflow.proto.TensorProto parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.TensorProto parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.TensorProto parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.TensorProto parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.TensorProto parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.TensorProto parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -1248,7 +1274,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -1260,7 +1286,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.TensorProto}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.TensorProto)
           org.tensorflow.proto.TensorProtoOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -1269,7 +1295,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.TensorProtos.internal_static_tensorflow_TensorProto_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -1278,67 +1304,60 @@ public static final class Builder extends
     
         // Construct using org.tensorflow.proto.TensorProto.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getTensorShapeFieldBuilder();
    +        getResourceHandleValFieldBuilder();
    +        getVariantValFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           dtype_ = 0;
    -
    -      if (tensorShapeBuilder_ == null) {
    -        tensorShape_ = null;
    -      } else {
    -        tensorShape_ = null;
    +      tensorShape_ = null;
    +      if (tensorShapeBuilder_ != null) {
    +        tensorShapeBuilder_.dispose();
             tensorShapeBuilder_ = null;
           }
           versionNumber_ = 0;
    -
           tensorContent_ = com.google.protobuf.ByteString.EMPTY;
    -
           halfVal_ = emptyIntList();
    -      bitField0_ = (bitField0_ & ~0x00000001);
           floatVal_ = emptyFloatList();
    -      bitField0_ = (bitField0_ & ~0x00000002);
           doubleVal_ = emptyDoubleList();
    -      bitField0_ = (bitField0_ & ~0x00000004);
           intVal_ = emptyIntList();
    -      bitField0_ = (bitField0_ & ~0x00000008);
    -      stringVal_ = java.util.Collections.emptyList();
    -      bitField0_ = (bitField0_ & ~0x00000010);
    +      stringVal_ = emptyList(com.google.protobuf.ByteString.class);
           scomplexVal_ = emptyFloatList();
    -      bitField0_ = (bitField0_ & ~0x00000020);
           int64Val_ = emptyLongList();
    -      bitField0_ = (bitField0_ & ~0x00000040);
           boolVal_ = emptyBooleanList();
    -      bitField0_ = (bitField0_ & ~0x00000080);
           dcomplexVal_ = emptyDoubleList();
    -      bitField0_ = (bitField0_ & ~0x00000100);
           if (resourceHandleValBuilder_ == null) {
             resourceHandleVal_ = java.util.Collections.emptyList();
           } else {
             resourceHandleVal_ = null;
             resourceHandleValBuilder_.clear();
           }
    -      bitField0_ = (bitField0_ & ~0x00000200);
    +      bitField0_ = (bitField0_ & ~0x00002000);
           if (variantValBuilder_ == null) {
             variantVal_ = java.util.Collections.emptyList();
           } else {
             variantVal_ = null;
             variantValBuilder_.clear();
           }
    -      bitField0_ = (bitField0_ & ~0x00000400);
    +      bitField0_ = (bitField0_ & ~0x00004000);
           uint32Val_ = emptyIntList();
    -      bitField0_ = (bitField0_ & ~0x00000800);
           uint64Val_ = emptyLongList();
    -      bitField0_ = (bitField0_ & ~0x00001000);
           float8Val_ = com.google.protobuf.ByteString.EMPTY;
    -
           return this;
         }
     
    @@ -1365,125 +1384,101 @@ public org.tensorflow.proto.TensorProto build() {
         @java.lang.Override
         public org.tensorflow.proto.TensorProto buildPartial() {
           org.tensorflow.proto.TensorProto result = new org.tensorflow.proto.TensorProto(this);
    -      int from_bitField0_ = bitField0_;
    -      result.dtype_ = dtype_;
    -      if (tensorShapeBuilder_ == null) {
    -        result.tensorShape_ = tensorShape_;
    +      buildPartialRepeatedFields(result);
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartialRepeatedFields(org.tensorflow.proto.TensorProto result) {
    +      if (resourceHandleValBuilder_ == null) {
    +        if (((bitField0_ & 0x00002000) != 0)) {
    +          resourceHandleVal_ = java.util.Collections.unmodifiableList(resourceHandleVal_);
    +          bitField0_ = (bitField0_ & ~0x00002000);
    +        }
    +        result.resourceHandleVal_ = resourceHandleVal_;
           } else {
    -        result.tensorShape_ = tensorShapeBuilder_.build();
    +        result.resourceHandleVal_ = resourceHandleValBuilder_.build();
    +      }
    +      if (variantValBuilder_ == null) {
    +        if (((bitField0_ & 0x00004000) != 0)) {
    +          variantVal_ = java.util.Collections.unmodifiableList(variantVal_);
    +          bitField0_ = (bitField0_ & ~0x00004000);
    +        }
    +        result.variantVal_ = variantVal_;
    +      } else {
    +        result.variantVal_ = variantValBuilder_.build();
           }
    -      result.versionNumber_ = versionNumber_;
    -      result.tensorContent_ = tensorContent_;
    -      if (((bitField0_ & 0x00000001) != 0)) {
    +    }
    +
    +    private void buildPartial0(org.tensorflow.proto.TensorProto result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.dtype_ = dtype_;
    +      }
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.tensorShape_ = tensorShapeBuilder_ == null
    +            ? tensorShape_
    +            : tensorShapeBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.versionNumber_ = versionNumber_;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.tensorContent_ = tensorContent_;
    +      }
    +      if (((from_bitField0_ & 0x00000010) != 0)) {
             halfVal_.makeImmutable();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        result.halfVal_ = halfVal_;
           }
    -      result.halfVal_ = halfVal_;
    -      if (((bitField0_ & 0x00000002) != 0)) {
    +      if (((from_bitField0_ & 0x00000020) != 0)) {
             floatVal_.makeImmutable();
    -        bitField0_ = (bitField0_ & ~0x00000002);
    +        result.floatVal_ = floatVal_;
           }
    -      result.floatVal_ = floatVal_;
    -      if (((bitField0_ & 0x00000004) != 0)) {
    +      if (((from_bitField0_ & 0x00000040) != 0)) {
             doubleVal_.makeImmutable();
    -        bitField0_ = (bitField0_ & ~0x00000004);
    +        result.doubleVal_ = doubleVal_;
           }
    -      result.doubleVal_ = doubleVal_;
    -      if (((bitField0_ & 0x00000008) != 0)) {
    +      if (((from_bitField0_ & 0x00000080) != 0)) {
             intVal_.makeImmutable();
    -        bitField0_ = (bitField0_ & ~0x00000008);
    +        result.intVal_ = intVal_;
           }
    -      result.intVal_ = intVal_;
    -      if (((bitField0_ & 0x00000010) != 0)) {
    -        stringVal_ = java.util.Collections.unmodifiableList(stringVal_);
    -        bitField0_ = (bitField0_ & ~0x00000010);
    +      if (((from_bitField0_ & 0x00000100) != 0)) {
    +        stringVal_.makeImmutable();
    +        result.stringVal_ = stringVal_;
           }
    -      result.stringVal_ = stringVal_;
    -      if (((bitField0_ & 0x00000020) != 0)) {
    +      if (((from_bitField0_ & 0x00000200) != 0)) {
             scomplexVal_.makeImmutable();
    -        bitField0_ = (bitField0_ & ~0x00000020);
    +        result.scomplexVal_ = scomplexVal_;
           }
    -      result.scomplexVal_ = scomplexVal_;
    -      if (((bitField0_ & 0x00000040) != 0)) {
    +      if (((from_bitField0_ & 0x00000400) != 0)) {
             int64Val_.makeImmutable();
    -        bitField0_ = (bitField0_ & ~0x00000040);
    +        result.int64Val_ = int64Val_;
           }
    -      result.int64Val_ = int64Val_;
    -      if (((bitField0_ & 0x00000080) != 0)) {
    +      if (((from_bitField0_ & 0x00000800) != 0)) {
             boolVal_.makeImmutable();
    -        bitField0_ = (bitField0_ & ~0x00000080);
    +        result.boolVal_ = boolVal_;
           }
    -      result.boolVal_ = boolVal_;
    -      if (((bitField0_ & 0x00000100) != 0)) {
    +      if (((from_bitField0_ & 0x00001000) != 0)) {
             dcomplexVal_.makeImmutable();
    -        bitField0_ = (bitField0_ & ~0x00000100);
    -      }
    -      result.dcomplexVal_ = dcomplexVal_;
    -      if (resourceHandleValBuilder_ == null) {
    -        if (((bitField0_ & 0x00000200) != 0)) {
    -          resourceHandleVal_ = java.util.Collections.unmodifiableList(resourceHandleVal_);
    -          bitField0_ = (bitField0_ & ~0x00000200);
    -        }
    -        result.resourceHandleVal_ = resourceHandleVal_;
    -      } else {
    -        result.resourceHandleVal_ = resourceHandleValBuilder_.build();
    +        result.dcomplexVal_ = dcomplexVal_;
           }
    -      if (variantValBuilder_ == null) {
    -        if (((bitField0_ & 0x00000400) != 0)) {
    -          variantVal_ = java.util.Collections.unmodifiableList(variantVal_);
    -          bitField0_ = (bitField0_ & ~0x00000400);
    -        }
    -        result.variantVal_ = variantVal_;
    -      } else {
    -        result.variantVal_ = variantValBuilder_.build();
    -      }
    -      if (((bitField0_ & 0x00000800) != 0)) {
    +      if (((from_bitField0_ & 0x00008000) != 0)) {
             uint32Val_.makeImmutable();
    -        bitField0_ = (bitField0_ & ~0x00000800);
    +        result.uint32Val_ = uint32Val_;
           }
    -      result.uint32Val_ = uint32Val_;
    -      if (((bitField0_ & 0x00001000) != 0)) {
    +      if (((from_bitField0_ & 0x00010000) != 0)) {
             uint64Val_.makeImmutable();
    -        bitField0_ = (bitField0_ & ~0x00001000);
    +        result.uint64Val_ = uint64Val_;
           }
    -      result.uint64Val_ = uint64Val_;
    -      result.float8Val_ = float8Val_;
    -      onBuilt();
    -      return result;
    +      if (((from_bitField0_ & 0x00020000) != 0)) {
    +        result.float8Val_ = float8Val_;
    +      }
    +      result.bitField0_ |= to_bitField0_;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    -    }
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.TensorProto) {
    @@ -1511,7 +1506,8 @@ public Builder mergeFrom(org.tensorflow.proto.TensorProto other) {
           if (!other.halfVal_.isEmpty()) {
             if (halfVal_.isEmpty()) {
               halfVal_ = other.halfVal_;
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          halfVal_.makeImmutable();
    +          bitField0_ |= 0x00000010;
             } else {
               ensureHalfValIsMutable();
               halfVal_.addAll(other.halfVal_);
    @@ -1521,7 +1517,8 @@ public Builder mergeFrom(org.tensorflow.proto.TensorProto other) {
           if (!other.floatVal_.isEmpty()) {
             if (floatVal_.isEmpty()) {
               floatVal_ = other.floatVal_;
    -          bitField0_ = (bitField0_ & ~0x00000002);
    +          floatVal_.makeImmutable();
    +          bitField0_ |= 0x00000020;
             } else {
               ensureFloatValIsMutable();
               floatVal_.addAll(other.floatVal_);
    @@ -1531,7 +1528,8 @@ public Builder mergeFrom(org.tensorflow.proto.TensorProto other) {
           if (!other.doubleVal_.isEmpty()) {
             if (doubleVal_.isEmpty()) {
               doubleVal_ = other.doubleVal_;
    -          bitField0_ = (bitField0_ & ~0x00000004);
    +          doubleVal_.makeImmutable();
    +          bitField0_ |= 0x00000040;
             } else {
               ensureDoubleValIsMutable();
               doubleVal_.addAll(other.doubleVal_);
    @@ -1541,7 +1539,8 @@ public Builder mergeFrom(org.tensorflow.proto.TensorProto other) {
           if (!other.intVal_.isEmpty()) {
             if (intVal_.isEmpty()) {
               intVal_ = other.intVal_;
    -          bitField0_ = (bitField0_ & ~0x00000008);
    +          intVal_.makeImmutable();
    +          bitField0_ |= 0x00000080;
             } else {
               ensureIntValIsMutable();
               intVal_.addAll(other.intVal_);
    @@ -1551,7 +1550,8 @@ public Builder mergeFrom(org.tensorflow.proto.TensorProto other) {
           if (!other.stringVal_.isEmpty()) {
             if (stringVal_.isEmpty()) {
               stringVal_ = other.stringVal_;
    -          bitField0_ = (bitField0_ & ~0x00000010);
    +          stringVal_.makeImmutable();
    +          bitField0_ |= 0x00000100;
             } else {
               ensureStringValIsMutable();
               stringVal_.addAll(other.stringVal_);
    @@ -1561,7 +1561,8 @@ public Builder mergeFrom(org.tensorflow.proto.TensorProto other) {
           if (!other.scomplexVal_.isEmpty()) {
             if (scomplexVal_.isEmpty()) {
               scomplexVal_ = other.scomplexVal_;
    -          bitField0_ = (bitField0_ & ~0x00000020);
    +          scomplexVal_.makeImmutable();
    +          bitField0_ |= 0x00000200;
             } else {
               ensureScomplexValIsMutable();
               scomplexVal_.addAll(other.scomplexVal_);
    @@ -1571,7 +1572,8 @@ public Builder mergeFrom(org.tensorflow.proto.TensorProto other) {
           if (!other.int64Val_.isEmpty()) {
             if (int64Val_.isEmpty()) {
               int64Val_ = other.int64Val_;
    -          bitField0_ = (bitField0_ & ~0x00000040);
    +          int64Val_.makeImmutable();
    +          bitField0_ |= 0x00000400;
             } else {
               ensureInt64ValIsMutable();
               int64Val_.addAll(other.int64Val_);
    @@ -1581,7 +1583,8 @@ public Builder mergeFrom(org.tensorflow.proto.TensorProto other) {
           if (!other.boolVal_.isEmpty()) {
             if (boolVal_.isEmpty()) {
               boolVal_ = other.boolVal_;
    -          bitField0_ = (bitField0_ & ~0x00000080);
    +          boolVal_.makeImmutable();
    +          bitField0_ |= 0x00000800;
             } else {
               ensureBoolValIsMutable();
               boolVal_.addAll(other.boolVal_);
    @@ -1591,7 +1594,8 @@ public Builder mergeFrom(org.tensorflow.proto.TensorProto other) {
           if (!other.dcomplexVal_.isEmpty()) {
             if (dcomplexVal_.isEmpty()) {
               dcomplexVal_ = other.dcomplexVal_;
    -          bitField0_ = (bitField0_ & ~0x00000100);
    +          dcomplexVal_.makeImmutable();
    +          bitField0_ |= 0x00001000;
             } else {
               ensureDcomplexValIsMutable();
               dcomplexVal_.addAll(other.dcomplexVal_);
    @@ -1602,7 +1606,7 @@ public Builder mergeFrom(org.tensorflow.proto.TensorProto other) {
             if (!other.resourceHandleVal_.isEmpty()) {
               if (resourceHandleVal_.isEmpty()) {
                 resourceHandleVal_ = other.resourceHandleVal_;
    -            bitField0_ = (bitField0_ & ~0x00000200);
    +            bitField0_ = (bitField0_ & ~0x00002000);
               } else {
                 ensureResourceHandleValIsMutable();
                 resourceHandleVal_.addAll(other.resourceHandleVal_);
    @@ -1615,9 +1619,9 @@ public Builder mergeFrom(org.tensorflow.proto.TensorProto other) {
                 resourceHandleValBuilder_.dispose();
                 resourceHandleValBuilder_ = null;
                 resourceHandleVal_ = other.resourceHandleVal_;
    -            bitField0_ = (bitField0_ & ~0x00000200);
    +            bitField0_ = (bitField0_ & ~0x00002000);
                 resourceHandleValBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getResourceHandleValFieldBuilder() : null;
               } else {
                 resourceHandleValBuilder_.addAllMessages(other.resourceHandleVal_);
    @@ -1628,7 +1632,7 @@ public Builder mergeFrom(org.tensorflow.proto.TensorProto other) {
             if (!other.variantVal_.isEmpty()) {
               if (variantVal_.isEmpty()) {
                 variantVal_ = other.variantVal_;
    -            bitField0_ = (bitField0_ & ~0x00000400);
    +            bitField0_ = (bitField0_ & ~0x00004000);
               } else {
                 ensureVariantValIsMutable();
                 variantVal_.addAll(other.variantVal_);
    @@ -1641,9 +1645,9 @@ public Builder mergeFrom(org.tensorflow.proto.TensorProto other) {
                 variantValBuilder_.dispose();
                 variantValBuilder_ = null;
                 variantVal_ = other.variantVal_;
    -            bitField0_ = (bitField0_ & ~0x00000400);
    +            bitField0_ = (bitField0_ & ~0x00004000);
                 variantValBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getVariantValFieldBuilder() : null;
               } else {
                 variantValBuilder_.addAllMessages(other.variantVal_);
    @@ -1653,7 +1657,8 @@ public Builder mergeFrom(org.tensorflow.proto.TensorProto other) {
           if (!other.uint32Val_.isEmpty()) {
             if (uint32Val_.isEmpty()) {
               uint32Val_ = other.uint32Val_;
    -          bitField0_ = (bitField0_ & ~0x00000800);
    +          uint32Val_.makeImmutable();
    +          bitField0_ |= 0x00008000;
             } else {
               ensureUint32ValIsMutable();
               uint32Val_.addAll(other.uint32Val_);
    @@ -1663,7 +1668,8 @@ public Builder mergeFrom(org.tensorflow.proto.TensorProto other) {
           if (!other.uint64Val_.isEmpty()) {
             if (uint64Val_.isEmpty()) {
               uint64Val_ = other.uint64Val_;
    -          bitField0_ = (bitField0_ & ~0x00001000);
    +          uint64Val_.makeImmutable();
    +          bitField0_ |= 0x00010000;
             } else {
               ensureUint64ValIsMutable();
               uint64Val_.addAll(other.uint64Val_);
    @@ -1701,24 +1707,24 @@ public Builder mergeFrom(
                   break;
                 case 8: {
                   dtype_ = input.readEnum();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 8
                 case 18: {
                   input.readMessage(
                       getTensorShapeFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 case 24: {
                   versionNumber_ = input.readInt32();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 24
                 case 34: {
                   tensorContent_ = input.readBytes();
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 34
                 case 45: {
    @@ -1730,7 +1736,8 @@ public Builder mergeFrom(
                 case 42: {
                   int length = input.readRawVarint32();
                   int limit = input.pushLimit(length);
    -              ensureFloatValIsMutable();
    +              int alloc = length > 4096 ? 4096 : length;
    +              ensureFloatValIsMutable(alloc / 4);
                   while (input.getBytesUntilLimit() > 0) {
                     floatVal_.addFloat(input.readFloat());
                   }
    @@ -1746,7 +1753,8 @@ public Builder mergeFrom(
                 case 50: {
                   int length = input.readRawVarint32();
                   int limit = input.pushLimit(length);
    -              ensureDoubleValIsMutable();
    +              int alloc = length > 4096 ? 4096 : length;
    +              ensureDoubleValIsMutable(alloc / 8);
                   while (input.getBytesUntilLimit() > 0) {
                     doubleVal_.addDouble(input.readDouble());
                   }
    @@ -1784,7 +1792,8 @@ public Builder mergeFrom(
                 case 74: {
                   int length = input.readRawVarint32();
                   int limit = input.pushLimit(length);
    -              ensureScomplexValIsMutable();
    +              int alloc = length > 4096 ? 4096 : length;
    +              ensureScomplexValIsMutable(alloc / 4);
                   while (input.getBytesUntilLimit() > 0) {
                     scomplexVal_.addFloat(input.readFloat());
                   }
    @@ -1816,7 +1825,8 @@ public Builder mergeFrom(
                 case 90: {
                   int length = input.readRawVarint32();
                   int limit = input.pushLimit(length);
    -              ensureBoolValIsMutable();
    +              int alloc = length > 4096 ? 4096 : length;
    +              ensureBoolValIsMutable(alloc / 1);
                   while (input.getBytesUntilLimit() > 0) {
                     boolVal_.addBoolean(input.readBool());
                   }
    @@ -1832,7 +1842,8 @@ public Builder mergeFrom(
                 case 98: {
                   int length = input.readRawVarint32();
                   int limit = input.pushLimit(length);
    -              ensureDcomplexValIsMutable();
    +              int alloc = length > 4096 ? 4096 : length;
    +              ensureDcomplexValIsMutable(alloc / 8);
                   while (input.getBytesUntilLimit() > 0) {
                     dcomplexVal_.addDouble(input.readDouble());
                   }
    @@ -1915,7 +1926,7 @@ public Builder mergeFrom(
                 } // case 138
                 case 146: {
                   float8Val_ = input.readBytes();
    -
    +              bitField0_ |= 0x00020000;
                   break;
                 } // case 146
                 default: {
    @@ -1957,8 +1968,8 @@ public Builder mergeFrom(
          * @return This builder for chaining.
          */
         public Builder setDtypeValue(int value) {
    -      
           dtype_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -1972,8 +1983,7 @@ public Builder setDtypeValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.DataType getDtype() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(dtype_);
    +      org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(dtype_);
           return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
         }
         /**
    @@ -1989,7 +1999,7 @@ public Builder setDtype(org.tensorflow.proto.DataType value) {
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00000001;
           dtype_ = value.getNumber();
           onChanged();
           return this;
    @@ -2003,14 +2013,14 @@ public Builder setDtype(org.tensorflow.proto.DataType value) {
          * @return This builder for chaining.
          */
         public Builder clearDtype() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000001);
           dtype_ = 0;
           onChanged();
           return this;
         }
     
         private org.tensorflow.proto.TensorShapeProto tensorShape_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> tensorShapeBuilder_;
         /**
          * 
    @@ -2021,7 +2031,7 @@ public Builder clearDtype() {
          * @return Whether the tensorShape field is set.
          */
         public boolean hasTensorShape() {
    -      return tensorShapeBuilder_ != null || tensorShape_ != null;
    +      return ((bitField0_ & 0x00000002) != 0);
         }
         /**
          * 
    @@ -2051,11 +2061,11 @@ public Builder setTensorShape(org.tensorflow.proto.TensorShapeProto value) {
               throw new NullPointerException();
             }
             tensorShape_ = value;
    -        onChanged();
           } else {
             tensorShapeBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return this;
         }
         /**
    @@ -2069,11 +2079,11 @@ public Builder setTensorShape(
             org.tensorflow.proto.TensorShapeProto.Builder builderForValue) {
           if (tensorShapeBuilder_ == null) {
             tensorShape_ = builderForValue.build();
    -        onChanged();
           } else {
             tensorShapeBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return this;
         }
         /**
    @@ -2085,17 +2095,20 @@ public Builder setTensorShape(
          */
         public Builder mergeTensorShape(org.tensorflow.proto.TensorShapeProto value) {
           if (tensorShapeBuilder_ == null) {
    -        if (tensorShape_ != null) {
    -          tensorShape_ =
    -            org.tensorflow.proto.TensorShapeProto.newBuilder(tensorShape_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000002) != 0) &&
    +          tensorShape_ != null &&
    +          tensorShape_ != org.tensorflow.proto.TensorShapeProto.getDefaultInstance()) {
    +          getTensorShapeBuilder().mergeFrom(value);
             } else {
               tensorShape_ = value;
             }
    -        onChanged();
           } else {
             tensorShapeBuilder_.mergeFrom(value);
           }
    -
    +      if (tensorShape_ != null) {
    +        bitField0_ |= 0x00000002;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -2106,14 +2119,13 @@ public Builder mergeTensorShape(org.tensorflow.proto.TensorShapeProto value) {
          * .tensorflow.TensorShapeProto tensor_shape = 2;
          */
         public Builder clearTensorShape() {
    -      if (tensorShapeBuilder_ == null) {
    -        tensorShape_ = null;
    -        onChanged();
    -      } else {
    -        tensorShape_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000002);
    +      tensorShape_ = null;
    +      if (tensorShapeBuilder_ != null) {
    +        tensorShapeBuilder_.dispose();
             tensorShapeBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -2124,7 +2136,7 @@ public Builder clearTensorShape() {
          * .tensorflow.TensorShapeProto tensor_shape = 2;
          */
         public org.tensorflow.proto.TensorShapeProto.Builder getTensorShapeBuilder() {
    -      
    +      bitField0_ |= 0x00000002;
           onChanged();
           return getTensorShapeFieldBuilder().getBuilder();
         }
    @@ -2150,11 +2162,11 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getTensorShapeOrBuilder()
          *
          * .tensorflow.TensorShapeProto tensor_shape = 2;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> 
             getTensorShapeFieldBuilder() {
           if (tensorShapeBuilder_ == null) {
    -        tensorShapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        tensorShapeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder>(
                     getTensorShape(),
                     getParentForChildren(),
    @@ -2168,6 +2180,7 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getTensorShapeOrBuilder()
         /**
          * 
          * Version number.
    +     *
          * In version 0, if the "repeated xxx" representations contain only one
          * element, that element is repeated to fill the shape.  This makes it easy
          * to represent a constant Tensor with a single value.
    @@ -2183,6 +2196,7 @@ public int getVersionNumber() {
         /**
          * 
          * Version number.
    +     *
          * In version 0, if the "repeated xxx" representations contain only one
          * element, that element is repeated to fill the shape.  This makes it easy
          * to represent a constant Tensor with a single value.
    @@ -2193,14 +2207,16 @@ public int getVersionNumber() {
          * @return This builder for chaining.
          */
         public Builder setVersionNumber(int value) {
    -      
    +
           versionNumber_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
         /**
          * 
          * Version number.
    +     *
          * In version 0, if the "repeated xxx" representations contain only one
          * element, that element is repeated to fill the shape.  This makes it easy
          * to represent a constant Tensor with a single value.
    @@ -2210,7 +2226,7 @@ public Builder setVersionNumber(int value) {
          * @return This builder for chaining.
          */
         public Builder clearVersionNumber() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000004);
           versionNumber_ = 0;
           onChanged();
           return this;
    @@ -2247,11 +2263,9 @@ public com.google.protobuf.ByteString getTensorContent() {
          * @return This builder for chaining.
          */
         public Builder setTensorContent(com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           tensorContent_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -2268,7 +2282,7 @@ public Builder setTensorContent(com.google.protobuf.ByteString value) {
          * @return This builder for chaining.
          */
         public Builder clearTensorContent() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000008);
           tensorContent_ = getDefaultInstance().getTensorContent();
           onChanged();
           return this;
    @@ -2276,10 +2290,10 @@ public Builder clearTensorContent() {
     
         private com.google.protobuf.Internal.IntList halfVal_ = emptyIntList();
         private void ensureHalfValIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    -        halfVal_ = mutableCopy(halfVal_);
    -        bitField0_ |= 0x00000001;
    -       }
    +      if (!halfVal_.isModifiable()) {
    +        halfVal_ = makeMutableCopy(halfVal_);
    +      }
    +      bitField0_ |= 0x00000010;
         }
         /**
          * 
    @@ -2292,8 +2306,8 @@ private void ensureHalfValIsMutable() {
          */
         public java.util.List
             getHalfValList() {
    -      return ((bitField0_ & 0x00000001) != 0) ?
    -               java.util.Collections.unmodifiableList(halfVal_) : halfVal_;
    +      halfVal_.makeImmutable();
    +      return halfVal_;
         }
         /**
          * 
    @@ -2333,8 +2347,10 @@ public int getHalfVal(int index) {
          */
         public Builder setHalfVal(
             int index, int value) {
    +
           ensureHalfValIsMutable();
           halfVal_.setInt(index, value);
    +      bitField0_ |= 0x00000010;
           onChanged();
           return this;
         }
    @@ -2349,8 +2365,10 @@ public Builder setHalfVal(
          * @return This builder for chaining.
          */
         public Builder addHalfVal(int value) {
    +
           ensureHalfValIsMutable();
           halfVal_.addInt(value);
    +      bitField0_ |= 0x00000010;
           onChanged();
           return this;
         }
    @@ -2369,6 +2387,7 @@ public Builder addAllHalfVal(
           ensureHalfValIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, halfVal_);
    +      bitField0_ |= 0x00000010;
           onChanged();
           return this;
         }
    @@ -2383,17 +2402,23 @@ public Builder addAllHalfVal(
          */
         public Builder clearHalfVal() {
           halfVal_ = emptyIntList();
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      bitField0_ = (bitField0_ & ~0x00000010);
           onChanged();
           return this;
         }
     
         private com.google.protobuf.Internal.FloatList floatVal_ = emptyFloatList();
         private void ensureFloatValIsMutable() {
    -      if (!((bitField0_ & 0x00000002) != 0)) {
    -        floatVal_ = mutableCopy(floatVal_);
    -        bitField0_ |= 0x00000002;
    -       }
    +      if (!floatVal_.isModifiable()) {
    +        floatVal_ = makeMutableCopy(floatVal_);
    +      }
    +      bitField0_ |= 0x00000020;
    +    }
    +    private void ensureFloatValIsMutable(int capacity) {
    +      if (!floatVal_.isModifiable()) {
    +        floatVal_ = makeMutableCopy(floatVal_, capacity);
    +      }
    +      bitField0_ |= 0x00000020;
         }
         /**
          * 
    @@ -2405,8 +2430,8 @@ private void ensureFloatValIsMutable() {
          */
         public java.util.List
             getFloatValList() {
    -      return ((bitField0_ & 0x00000002) != 0) ?
    -               java.util.Collections.unmodifiableList(floatVal_) : floatVal_;
    +      floatVal_.makeImmutable();
    +      return floatVal_;
         }
         /**
          * 
    @@ -2443,8 +2468,10 @@ public float getFloatVal(int index) {
          */
         public Builder setFloatVal(
             int index, float value) {
    +
           ensureFloatValIsMutable();
           floatVal_.setFloat(index, value);
    +      bitField0_ |= 0x00000020;
           onChanged();
           return this;
         }
    @@ -2458,8 +2485,10 @@ public Builder setFloatVal(
          * @return This builder for chaining.
          */
         public Builder addFloatVal(float value) {
    +
           ensureFloatValIsMutable();
           floatVal_.addFloat(value);
    +      bitField0_ |= 0x00000020;
           onChanged();
           return this;
         }
    @@ -2477,6 +2506,7 @@ public Builder addAllFloatVal(
           ensureFloatValIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, floatVal_);
    +      bitField0_ |= 0x00000020;
           onChanged();
           return this;
         }
    @@ -2490,17 +2520,23 @@ public Builder addAllFloatVal(
          */
         public Builder clearFloatVal() {
           floatVal_ = emptyFloatList();
    -      bitField0_ = (bitField0_ & ~0x00000002);
    +      bitField0_ = (bitField0_ & ~0x00000020);
           onChanged();
           return this;
         }
     
         private com.google.protobuf.Internal.DoubleList doubleVal_ = emptyDoubleList();
         private void ensureDoubleValIsMutable() {
    -      if (!((bitField0_ & 0x00000004) != 0)) {
    -        doubleVal_ = mutableCopy(doubleVal_);
    -        bitField0_ |= 0x00000004;
    -       }
    +      if (!doubleVal_.isModifiable()) {
    +        doubleVal_ = makeMutableCopy(doubleVal_);
    +      }
    +      bitField0_ |= 0x00000040;
    +    }
    +    private void ensureDoubleValIsMutable(int capacity) {
    +      if (!doubleVal_.isModifiable()) {
    +        doubleVal_ = makeMutableCopy(doubleVal_, capacity);
    +      }
    +      bitField0_ |= 0x00000040;
         }
         /**
          * 
    @@ -2512,8 +2548,8 @@ private void ensureDoubleValIsMutable() {
          */
         public java.util.List
             getDoubleValList() {
    -      return ((bitField0_ & 0x00000004) != 0) ?
    -               java.util.Collections.unmodifiableList(doubleVal_) : doubleVal_;
    +      doubleVal_.makeImmutable();
    +      return doubleVal_;
         }
         /**
          * 
    @@ -2550,8 +2586,10 @@ public double getDoubleVal(int index) {
          */
         public Builder setDoubleVal(
             int index, double value) {
    +
           ensureDoubleValIsMutable();
           doubleVal_.setDouble(index, value);
    +      bitField0_ |= 0x00000040;
           onChanged();
           return this;
         }
    @@ -2565,8 +2603,10 @@ public Builder setDoubleVal(
          * @return This builder for chaining.
          */
         public Builder addDoubleVal(double value) {
    +
           ensureDoubleValIsMutable();
           doubleVal_.addDouble(value);
    +      bitField0_ |= 0x00000040;
           onChanged();
           return this;
         }
    @@ -2584,6 +2624,7 @@ public Builder addAllDoubleVal(
           ensureDoubleValIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, doubleVal_);
    +      bitField0_ |= 0x00000040;
           onChanged();
           return this;
         }
    @@ -2597,17 +2638,17 @@ public Builder addAllDoubleVal(
          */
         public Builder clearDoubleVal() {
           doubleVal_ = emptyDoubleList();
    -      bitField0_ = (bitField0_ & ~0x00000004);
    +      bitField0_ = (bitField0_ & ~0x00000040);
           onChanged();
           return this;
         }
     
         private com.google.protobuf.Internal.IntList intVal_ = emptyIntList();
         private void ensureIntValIsMutable() {
    -      if (!((bitField0_ & 0x00000008) != 0)) {
    -        intVal_ = mutableCopy(intVal_);
    -        bitField0_ |= 0x00000008;
    -       }
    +      if (!intVal_.isModifiable()) {
    +        intVal_ = makeMutableCopy(intVal_);
    +      }
    +      bitField0_ |= 0x00000080;
         }
         /**
          * 
    @@ -2619,8 +2660,8 @@ private void ensureIntValIsMutable() {
          */
         public java.util.List
             getIntValList() {
    -      return ((bitField0_ & 0x00000008) != 0) ?
    -               java.util.Collections.unmodifiableList(intVal_) : intVal_;
    +      intVal_.makeImmutable();
    +      return intVal_;
         }
         /**
          * 
    @@ -2657,8 +2698,10 @@ public int getIntVal(int index) {
          */
         public Builder setIntVal(
             int index, int value) {
    +
           ensureIntValIsMutable();
           intVal_.setInt(index, value);
    +      bitField0_ |= 0x00000080;
           onChanged();
           return this;
         }
    @@ -2672,8 +2715,10 @@ public Builder setIntVal(
          * @return This builder for chaining.
          */
         public Builder addIntVal(int value) {
    +
           ensureIntValIsMutable();
           intVal_.addInt(value);
    +      bitField0_ |= 0x00000080;
           onChanged();
           return this;
         }
    @@ -2691,6 +2736,7 @@ public Builder addAllIntVal(
           ensureIntValIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, intVal_);
    +      bitField0_ |= 0x00000080;
           onChanged();
           return this;
         }
    @@ -2704,17 +2750,17 @@ public Builder addAllIntVal(
          */
         public Builder clearIntVal() {
           intVal_ = emptyIntList();
    -      bitField0_ = (bitField0_ & ~0x00000008);
    +      bitField0_ = (bitField0_ & ~0x00000080);
           onChanged();
           return this;
         }
     
    -    private java.util.List stringVal_ = java.util.Collections.emptyList();
    +    private com.google.protobuf.Internal.ProtobufList stringVal_ = emptyList(com.google.protobuf.ByteString.class);
         private void ensureStringValIsMutable() {
    -      if (!((bitField0_ & 0x00000010) != 0)) {
    -        stringVal_ = new java.util.ArrayList(stringVal_);
    -        bitField0_ |= 0x00000010;
    -       }
    +      if (!stringVal_.isModifiable()) {
    +        stringVal_ = makeMutableCopy(stringVal_);
    +      }
    +      bitField0_ |= 0x00000100;
         }
         /**
          * 
    @@ -2726,8 +2772,8 @@ private void ensureStringValIsMutable() {
          */
         public java.util.List
             getStringValList() {
    -      return ((bitField0_ & 0x00000010) != 0) ?
    -               java.util.Collections.unmodifiableList(stringVal_) : stringVal_;
    +      stringVal_.makeImmutable();
    +      return stringVal_;
         }
         /**
          * 
    @@ -2764,11 +2810,10 @@ public com.google.protobuf.ByteString getStringVal(int index) {
          */
         public Builder setStringVal(
             int index, com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureStringValIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureStringValIsMutable();
           stringVal_.set(index, value);
    +      bitField0_ |= 0x00000100;
           onChanged();
           return this;
         }
    @@ -2782,11 +2827,10 @@ public Builder setStringVal(
          * @return This builder for chaining.
          */
         public Builder addStringVal(com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureStringValIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureStringValIsMutable();
           stringVal_.add(value);
    +      bitField0_ |= 0x00000100;
           onChanged();
           return this;
         }
    @@ -2804,6 +2848,7 @@ public Builder addAllStringVal(
           ensureStringValIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, stringVal_);
    +      bitField0_ |= 0x00000100;
           onChanged();
           return this;
         }
    @@ -2816,18 +2861,24 @@ public Builder addAllStringVal(
          * @return This builder for chaining.
          */
         public Builder clearStringVal() {
    -      stringVal_ = java.util.Collections.emptyList();
    -      bitField0_ = (bitField0_ & ~0x00000010);
    +      stringVal_ = emptyList(com.google.protobuf.ByteString.class);
    +      bitField0_ = (bitField0_ & ~0x00000100);
           onChanged();
           return this;
         }
     
         private com.google.protobuf.Internal.FloatList scomplexVal_ = emptyFloatList();
         private void ensureScomplexValIsMutable() {
    -      if (!((bitField0_ & 0x00000020) != 0)) {
    -        scomplexVal_ = mutableCopy(scomplexVal_);
    -        bitField0_ |= 0x00000020;
    -       }
    +      if (!scomplexVal_.isModifiable()) {
    +        scomplexVal_ = makeMutableCopy(scomplexVal_);
    +      }
    +      bitField0_ |= 0x00000200;
    +    }
    +    private void ensureScomplexValIsMutable(int capacity) {
    +      if (!scomplexVal_.isModifiable()) {
    +        scomplexVal_ = makeMutableCopy(scomplexVal_, capacity);
    +      }
    +      bitField0_ |= 0x00000200;
         }
         /**
          * 
    @@ -2840,8 +2891,8 @@ private void ensureScomplexValIsMutable() {
          */
         public java.util.List
             getScomplexValList() {
    -      return ((bitField0_ & 0x00000020) != 0) ?
    -               java.util.Collections.unmodifiableList(scomplexVal_) : scomplexVal_;
    +      scomplexVal_.makeImmutable();
    +      return scomplexVal_;
         }
         /**
          * 
    @@ -2881,8 +2932,10 @@ public float getScomplexVal(int index) {
          */
         public Builder setScomplexVal(
             int index, float value) {
    +
           ensureScomplexValIsMutable();
           scomplexVal_.setFloat(index, value);
    +      bitField0_ |= 0x00000200;
           onChanged();
           return this;
         }
    @@ -2897,8 +2950,10 @@ public Builder setScomplexVal(
          * @return This builder for chaining.
          */
         public Builder addScomplexVal(float value) {
    +
           ensureScomplexValIsMutable();
           scomplexVal_.addFloat(value);
    +      bitField0_ |= 0x00000200;
           onChanged();
           return this;
         }
    @@ -2917,6 +2972,7 @@ public Builder addAllScomplexVal(
           ensureScomplexValIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, scomplexVal_);
    +      bitField0_ |= 0x00000200;
           onChanged();
           return this;
         }
    @@ -2931,17 +2987,17 @@ public Builder addAllScomplexVal(
          */
         public Builder clearScomplexVal() {
           scomplexVal_ = emptyFloatList();
    -      bitField0_ = (bitField0_ & ~0x00000020);
    +      bitField0_ = (bitField0_ & ~0x00000200);
           onChanged();
           return this;
         }
     
         private com.google.protobuf.Internal.LongList int64Val_ = emptyLongList();
         private void ensureInt64ValIsMutable() {
    -      if (!((bitField0_ & 0x00000040) != 0)) {
    -        int64Val_ = mutableCopy(int64Val_);
    -        bitField0_ |= 0x00000040;
    -       }
    +      if (!int64Val_.isModifiable()) {
    +        int64Val_ = makeMutableCopy(int64Val_);
    +      }
    +      bitField0_ |= 0x00000400;
         }
         /**
          * 
    @@ -2953,8 +3009,8 @@ private void ensureInt64ValIsMutable() {
          */
         public java.util.List
             getInt64ValList() {
    -      return ((bitField0_ & 0x00000040) != 0) ?
    -               java.util.Collections.unmodifiableList(int64Val_) : int64Val_;
    +      int64Val_.makeImmutable();
    +      return int64Val_;
         }
         /**
          * 
    @@ -2991,8 +3047,10 @@ public long getInt64Val(int index) {
          */
         public Builder setInt64Val(
             int index, long value) {
    +
           ensureInt64ValIsMutable();
           int64Val_.setLong(index, value);
    +      bitField0_ |= 0x00000400;
           onChanged();
           return this;
         }
    @@ -3006,8 +3064,10 @@ public Builder setInt64Val(
          * @return This builder for chaining.
          */
         public Builder addInt64Val(long value) {
    +
           ensureInt64ValIsMutable();
           int64Val_.addLong(value);
    +      bitField0_ |= 0x00000400;
           onChanged();
           return this;
         }
    @@ -3025,6 +3085,7 @@ public Builder addAllInt64Val(
           ensureInt64ValIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, int64Val_);
    +      bitField0_ |= 0x00000400;
           onChanged();
           return this;
         }
    @@ -3038,17 +3099,23 @@ public Builder addAllInt64Val(
          */
         public Builder clearInt64Val() {
           int64Val_ = emptyLongList();
    -      bitField0_ = (bitField0_ & ~0x00000040);
    +      bitField0_ = (bitField0_ & ~0x00000400);
           onChanged();
           return this;
         }
     
         private com.google.protobuf.Internal.BooleanList boolVal_ = emptyBooleanList();
         private void ensureBoolValIsMutable() {
    -      if (!((bitField0_ & 0x00000080) != 0)) {
    -        boolVal_ = mutableCopy(boolVal_);
    -        bitField0_ |= 0x00000080;
    -       }
    +      if (!boolVal_.isModifiable()) {
    +        boolVal_ = makeMutableCopy(boolVal_);
    +      }
    +      bitField0_ |= 0x00000800;
    +    }
    +    private void ensureBoolValIsMutable(int capacity) {
    +      if (!boolVal_.isModifiable()) {
    +        boolVal_ = makeMutableCopy(boolVal_, capacity);
    +      }
    +      bitField0_ |= 0x00000800;
         }
         /**
          * 
    @@ -3060,8 +3127,8 @@ private void ensureBoolValIsMutable() {
          */
         public java.util.List
             getBoolValList() {
    -      return ((bitField0_ & 0x00000080) != 0) ?
    -               java.util.Collections.unmodifiableList(boolVal_) : boolVal_;
    +      boolVal_.makeImmutable();
    +      return boolVal_;
         }
         /**
          * 
    @@ -3098,8 +3165,10 @@ public boolean getBoolVal(int index) {
          */
         public Builder setBoolVal(
             int index, boolean value) {
    +
           ensureBoolValIsMutable();
           boolVal_.setBoolean(index, value);
    +      bitField0_ |= 0x00000800;
           onChanged();
           return this;
         }
    @@ -3113,8 +3182,10 @@ public Builder setBoolVal(
          * @return This builder for chaining.
          */
         public Builder addBoolVal(boolean value) {
    +
           ensureBoolValIsMutable();
           boolVal_.addBoolean(value);
    +      bitField0_ |= 0x00000800;
           onChanged();
           return this;
         }
    @@ -3132,6 +3203,7 @@ public Builder addAllBoolVal(
           ensureBoolValIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, boolVal_);
    +      bitField0_ |= 0x00000800;
           onChanged();
           return this;
         }
    @@ -3145,17 +3217,23 @@ public Builder addAllBoolVal(
          */
         public Builder clearBoolVal() {
           boolVal_ = emptyBooleanList();
    -      bitField0_ = (bitField0_ & ~0x00000080);
    +      bitField0_ = (bitField0_ & ~0x00000800);
           onChanged();
           return this;
         }
     
         private com.google.protobuf.Internal.DoubleList dcomplexVal_ = emptyDoubleList();
         private void ensureDcomplexValIsMutable() {
    -      if (!((bitField0_ & 0x00000100) != 0)) {
    -        dcomplexVal_ = mutableCopy(dcomplexVal_);
    -        bitField0_ |= 0x00000100;
    -       }
    +      if (!dcomplexVal_.isModifiable()) {
    +        dcomplexVal_ = makeMutableCopy(dcomplexVal_);
    +      }
    +      bitField0_ |= 0x00001000;
    +    }
    +    private void ensureDcomplexValIsMutable(int capacity) {
    +      if (!dcomplexVal_.isModifiable()) {
    +        dcomplexVal_ = makeMutableCopy(dcomplexVal_, capacity);
    +      }
    +      bitField0_ |= 0x00001000;
         }
         /**
          * 
    @@ -3168,8 +3246,8 @@ private void ensureDcomplexValIsMutable() {
          */
         public java.util.List
             getDcomplexValList() {
    -      return ((bitField0_ & 0x00000100) != 0) ?
    -               java.util.Collections.unmodifiableList(dcomplexVal_) : dcomplexVal_;
    +      dcomplexVal_.makeImmutable();
    +      return dcomplexVal_;
         }
         /**
          * 
    @@ -3209,8 +3287,10 @@ public double getDcomplexVal(int index) {
          */
         public Builder setDcomplexVal(
             int index, double value) {
    +
           ensureDcomplexValIsMutable();
           dcomplexVal_.setDouble(index, value);
    +      bitField0_ |= 0x00001000;
           onChanged();
           return this;
         }
    @@ -3225,8 +3305,10 @@ public Builder setDcomplexVal(
          * @return This builder for chaining.
          */
         public Builder addDcomplexVal(double value) {
    +
           ensureDcomplexValIsMutable();
           dcomplexVal_.addDouble(value);
    +      bitField0_ |= 0x00001000;
           onChanged();
           return this;
         }
    @@ -3245,6 +3327,7 @@ public Builder addAllDcomplexVal(
           ensureDcomplexValIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, dcomplexVal_);
    +      bitField0_ |= 0x00001000;
           onChanged();
           return this;
         }
    @@ -3259,7 +3342,7 @@ public Builder addAllDcomplexVal(
          */
         public Builder clearDcomplexVal() {
           dcomplexVal_ = emptyDoubleList();
    -      bitField0_ = (bitField0_ & ~0x00000100);
    +      bitField0_ = (bitField0_ & ~0x00001000);
           onChanged();
           return this;
         }
    @@ -3267,13 +3350,13 @@ public Builder clearDcomplexVal() {
         private java.util.List resourceHandleVal_ =
           java.util.Collections.emptyList();
         private void ensureResourceHandleValIsMutable() {
    -      if (!((bitField0_ & 0x00000200) != 0)) {
    +      if (!((bitField0_ & 0x00002000) != 0)) {
             resourceHandleVal_ = new java.util.ArrayList(resourceHandleVal_);
    -        bitField0_ |= 0x00000200;
    +        bitField0_ |= 0x00002000;
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.ResourceHandleProto, org.tensorflow.proto.ResourceHandleProto.Builder, org.tensorflow.proto.ResourceHandleProtoOrBuilder> resourceHandleValBuilder_;
     
         /**
    @@ -3463,7 +3546,7 @@ public Builder addAllResourceHandleVal(
         public Builder clearResourceHandleVal() {
           if (resourceHandleValBuilder_ == null) {
             resourceHandleVal_ = java.util.Collections.emptyList();
    -        bitField0_ = (bitField0_ & ~0x00000200);
    +        bitField0_ = (bitField0_ & ~0x00002000);
             onChanged();
           } else {
             resourceHandleValBuilder_.clear();
    @@ -3561,14 +3644,14 @@ public org.tensorflow.proto.ResourceHandleProto.Builder addResourceHandleValBuil
              getResourceHandleValBuilderList() {
           return getResourceHandleValFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.ResourceHandleProto, org.tensorflow.proto.ResourceHandleProto.Builder, org.tensorflow.proto.ResourceHandleProtoOrBuilder> 
             getResourceHandleValFieldBuilder() {
           if (resourceHandleValBuilder_ == null) {
    -        resourceHandleValBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        resourceHandleValBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.ResourceHandleProto, org.tensorflow.proto.ResourceHandleProto.Builder, org.tensorflow.proto.ResourceHandleProtoOrBuilder>(
                     resourceHandleVal_,
    -                ((bitField0_ & 0x00000200) != 0),
    +                ((bitField0_ & 0x00002000) != 0),
                     getParentForChildren(),
                     isClean());
             resourceHandleVal_ = null;
    @@ -3579,13 +3662,13 @@ public org.tensorflow.proto.ResourceHandleProto.Builder addResourceHandleValBuil
         private java.util.List variantVal_ =
           java.util.Collections.emptyList();
         private void ensureVariantValIsMutable() {
    -      if (!((bitField0_ & 0x00000400) != 0)) {
    +      if (!((bitField0_ & 0x00004000) != 0)) {
             variantVal_ = new java.util.ArrayList(variantVal_);
    -        bitField0_ |= 0x00000400;
    +        bitField0_ |= 0x00004000;
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.VariantTensorDataProto, org.tensorflow.proto.VariantTensorDataProto.Builder, org.tensorflow.proto.VariantTensorDataProtoOrBuilder> variantValBuilder_;
     
         /**
    @@ -3775,7 +3858,7 @@ public Builder addAllVariantVal(
         public Builder clearVariantVal() {
           if (variantValBuilder_ == null) {
             variantVal_ = java.util.Collections.emptyList();
    -        bitField0_ = (bitField0_ & ~0x00000400);
    +        bitField0_ = (bitField0_ & ~0x00004000);
             onChanged();
           } else {
             variantValBuilder_.clear();
    @@ -3873,14 +3956,14 @@ public org.tensorflow.proto.VariantTensorDataProto.Builder addVariantValBuilder(
              getVariantValBuilderList() {
           return getVariantValFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.VariantTensorDataProto, org.tensorflow.proto.VariantTensorDataProto.Builder, org.tensorflow.proto.VariantTensorDataProtoOrBuilder> 
             getVariantValFieldBuilder() {
           if (variantValBuilder_ == null) {
    -        variantValBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        variantValBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.VariantTensorDataProto, org.tensorflow.proto.VariantTensorDataProto.Builder, org.tensorflow.proto.VariantTensorDataProtoOrBuilder>(
                     variantVal_,
    -                ((bitField0_ & 0x00000400) != 0),
    +                ((bitField0_ & 0x00004000) != 0),
                     getParentForChildren(),
                     isClean());
             variantVal_ = null;
    @@ -3890,10 +3973,10 @@ public org.tensorflow.proto.VariantTensorDataProto.Builder addVariantValBuilder(
     
         private com.google.protobuf.Internal.IntList uint32Val_ = emptyIntList();
         private void ensureUint32ValIsMutable() {
    -      if (!((bitField0_ & 0x00000800) != 0)) {
    -        uint32Val_ = mutableCopy(uint32Val_);
    -        bitField0_ |= 0x00000800;
    -       }
    +      if (!uint32Val_.isModifiable()) {
    +        uint32Val_ = makeMutableCopy(uint32Val_);
    +      }
    +      bitField0_ |= 0x00008000;
         }
         /**
          * 
    @@ -3905,8 +3988,8 @@ private void ensureUint32ValIsMutable() {
          */
         public java.util.List
             getUint32ValList() {
    -      return ((bitField0_ & 0x00000800) != 0) ?
    -               java.util.Collections.unmodifiableList(uint32Val_) : uint32Val_;
    +      uint32Val_.makeImmutable();
    +      return uint32Val_;
         }
         /**
          * 
    @@ -3943,8 +4026,10 @@ public int getUint32Val(int index) {
          */
         public Builder setUint32Val(
             int index, int value) {
    +
           ensureUint32ValIsMutable();
           uint32Val_.setInt(index, value);
    +      bitField0_ |= 0x00008000;
           onChanged();
           return this;
         }
    @@ -3958,8 +4043,10 @@ public Builder setUint32Val(
          * @return This builder for chaining.
          */
         public Builder addUint32Val(int value) {
    +
           ensureUint32ValIsMutable();
           uint32Val_.addInt(value);
    +      bitField0_ |= 0x00008000;
           onChanged();
           return this;
         }
    @@ -3977,6 +4064,7 @@ public Builder addAllUint32Val(
           ensureUint32ValIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, uint32Val_);
    +      bitField0_ |= 0x00008000;
           onChanged();
           return this;
         }
    @@ -3990,17 +4078,17 @@ public Builder addAllUint32Val(
          */
         public Builder clearUint32Val() {
           uint32Val_ = emptyIntList();
    -      bitField0_ = (bitField0_ & ~0x00000800);
    +      bitField0_ = (bitField0_ & ~0x00008000);
           onChanged();
           return this;
         }
     
         private com.google.protobuf.Internal.LongList uint64Val_ = emptyLongList();
         private void ensureUint64ValIsMutable() {
    -      if (!((bitField0_ & 0x00001000) != 0)) {
    -        uint64Val_ = mutableCopy(uint64Val_);
    -        bitField0_ |= 0x00001000;
    -       }
    +      if (!uint64Val_.isModifiable()) {
    +        uint64Val_ = makeMutableCopy(uint64Val_);
    +      }
    +      bitField0_ |= 0x00010000;
         }
         /**
          * 
    @@ -4012,8 +4100,8 @@ private void ensureUint64ValIsMutable() {
          */
         public java.util.List
             getUint64ValList() {
    -      return ((bitField0_ & 0x00001000) != 0) ?
    -               java.util.Collections.unmodifiableList(uint64Val_) : uint64Val_;
    +      uint64Val_.makeImmutable();
    +      return uint64Val_;
         }
         /**
          * 
    @@ -4050,8 +4138,10 @@ public long getUint64Val(int index) {
          */
         public Builder setUint64Val(
             int index, long value) {
    +
           ensureUint64ValIsMutable();
           uint64Val_.setLong(index, value);
    +      bitField0_ |= 0x00010000;
           onChanged();
           return this;
         }
    @@ -4065,8 +4155,10 @@ public Builder setUint64Val(
          * @return This builder for chaining.
          */
         public Builder addUint64Val(long value) {
    +
           ensureUint64ValIsMutable();
           uint64Val_.addLong(value);
    +      bitField0_ |= 0x00010000;
           onChanged();
           return this;
         }
    @@ -4084,6 +4176,7 @@ public Builder addAllUint64Val(
           ensureUint64ValIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, uint64Val_);
    +      bitField0_ |= 0x00010000;
           onChanged();
           return this;
         }
    @@ -4097,7 +4190,7 @@ public Builder addAllUint64Val(
          */
         public Builder clearUint64Val() {
           uint64Val_ = emptyLongList();
    -      bitField0_ = (bitField0_ & ~0x00001000);
    +      bitField0_ = (bitField0_ & ~0x00010000);
           onChanged();
           return this;
         }
    @@ -4127,11 +4220,9 @@ public com.google.protobuf.ByteString getFloat8Val() {
          * @return This builder for chaining.
          */
         public Builder setFloat8Val(com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           float8Val_ = value;
    +      bitField0_ |= 0x00020000;
           onChanged();
           return this;
         }
    @@ -4145,23 +4236,11 @@ public Builder setFloat8Val(com.google.protobuf.ByteString value) {
          * @return This builder for chaining.
          */
         public Builder clearFloat8Val() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00020000);
           float8Val_ = getDefaultInstance().getFloat8Val();
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.TensorProto)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorProtoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorProtoOrBuilder.java
    index 9eafe8177e2..193c60a945a 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorProtoOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorProtoOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/tensor.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -56,6 +58,7 @@ public interface TensorProtoOrBuilder extends
       /**
        * 
        * Version number.
    +   *
        * In version 0, if the "repeated xxx" representations contain only one
        * element, that element is repeated to fill the shape.  This makes it easy
        * to represent a constant Tensor with a single value.
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorProtos.java
    index 4644f5795ca..5641fea4fdc 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorProtos.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorProtos.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/tensor.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class TensorProtos {
       private TensorProtos() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      TensorProtos.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,12 +28,12 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_TensorProto_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_TensorProto_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_VariantTensorDataProto_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_VariantTensorDataProto_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -69,15 +80,16 @@ public static void registerAllExtensions(
         internal_static_tensorflow_TensorProto_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_TensorProto_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_TensorProto_descriptor,
             new java.lang.String[] { "Dtype", "TensorShape", "VersionNumber", "TensorContent", "HalfVal", "FloatVal", "DoubleVal", "IntVal", "StringVal", "ScomplexVal", "Int64Val", "BoolVal", "DcomplexVal", "ResourceHandleVal", "VariantVal", "Uint32Val", "Uint64Val", "Float8Val", });
         internal_static_tensorflow_VariantTensorDataProto_descriptor =
           getDescriptor().getMessageTypes().get(1);
         internal_static_tensorflow_VariantTensorDataProto_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_VariantTensorDataProto_descriptor,
             new java.lang.String[] { "TypeName", "Metadata", "Tensors", });
    +    descriptor.resolveAllFeaturesImmutable();
         org.tensorflow.proto.ResourceHandle.getDescriptor();
         org.tensorflow.proto.TensorShapeProtos.getDescriptor();
         org.tensorflow.proto.TypesProtos.getDescriptor();
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorShapeProto.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorShapeProto.java
    index 97452f6c4a5..3e0f3a3387c 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorShapeProto.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorShapeProto.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/tensor_shape.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,37 +13,34 @@
      * Protobuf type {@code tensorflow.TensorShapeProto}
      */
     public final class TensorShapeProto extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.TensorShapeProto)
         TensorShapeProtoOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      TensorShapeProto.class.getName());
    +  }
       // Use TensorShapeProto.newBuilder() to construct.
    -  private TensorShapeProto(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private TensorShapeProto(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private TensorShapeProto() {
         dim_ = java.util.Collections.emptyList();
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new TensorShapeProto();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.TensorShapeProtos.internal_static_tensorflow_TensorShapeProto_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.TensorShapeProtos.internal_static_tensorflow_TensorShapeProto_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -94,37 +93,34 @@ public interface DimOrBuilder extends
        * Protobuf type {@code tensorflow.TensorShapeProto.Dim}
        */
       public static final class Dim extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.TensorShapeProto.Dim)
           DimOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        Dim.class.getName());
    +    }
         // Use Dim.newBuilder() to construct.
    -    private Dim(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private Dim(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private Dim() {
           name_ = "";
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new Dim();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.TensorShapeProtos.internal_static_tensorflow_TensorShapeProto_Dim_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.TensorShapeProtos.internal_static_tensorflow_TensorShapeProto_Dim_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -132,7 +128,7 @@ protected java.lang.Object newInstance(
         }
     
         public static final int SIZE_FIELD_NUMBER = 1;
    -    private long size_;
    +    private long size_ = 0L;
         /**
          * 
          * Size of the tensor in that dimension.
    @@ -151,7 +147,8 @@ public long getSize() {
         }
     
         public static final int NAME_FIELD_NUMBER = 2;
    -    private volatile java.lang.Object name_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object name_ = "";
         /**
          * 
          * Optional name of the tensor dimension.
    @@ -213,8 +210,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           if (size_ != 0L) {
             output.writeInt64(1, size_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 2, name_);
           }
           getUnknownFields().writeTo(output);
         }
    @@ -229,8 +226,8 @@ public int getSerializedSize() {
             size += com.google.protobuf.CodedOutputStream
               .computeInt64Size(1, size_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, name_);
           }
           size += getUnknownFields().getSerializedSize();
           memoizedSize = size;
    @@ -306,39 +303,41 @@ public static org.tensorflow.proto.TensorShapeProto.Dim parseFrom(
         }
         public static org.tensorflow.proto.TensorShapeProto.Dim parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.TensorShapeProto.Dim parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.TensorShapeProto.Dim parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.TensorShapeProto.Dim parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.TensorShapeProto.Dim parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.TensorShapeProto.Dim parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -358,7 +357,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -370,7 +369,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.TensorShapeProto.Dim}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.TensorShapeProto.Dim)
             org.tensorflow.proto.TensorShapeProto.DimOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -379,7 +378,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.TensorShapeProtos.internal_static_tensorflow_TensorShapeProto_Dim_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -392,17 +391,16 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             size_ = 0L;
    -
             name_ = "";
    -
             return this;
           }
     
    @@ -429,44 +427,21 @@ public org.tensorflow.proto.TensorShapeProto.Dim build() {
           @java.lang.Override
           public org.tensorflow.proto.TensorShapeProto.Dim buildPartial() {
             org.tensorflow.proto.TensorShapeProto.Dim result = new org.tensorflow.proto.TensorShapeProto.Dim(this);
    -        result.size_ = size_;
    -        result.name_ = name_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.TensorShapeProto.Dim result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.size_ = size_;
    +        }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.name_ = name_;
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.TensorShapeProto.Dim) {
    @@ -484,6 +459,7 @@ public Builder mergeFrom(org.tensorflow.proto.TensorShapeProto.Dim other) {
             }
             if (!other.getName().isEmpty()) {
               name_ = other.name_;
    +          bitField0_ |= 0x00000002;
               onChanged();
             }
             this.mergeUnknownFields(other.getUnknownFields());
    @@ -514,12 +490,12 @@ public Builder mergeFrom(
                     break;
                   case 8: {
                     size_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 8
                   case 18: {
                     name_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 18
                   default: {
    @@ -537,6 +513,7 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    +      private int bitField0_;
     
           private long size_ ;
           /**
    @@ -569,8 +546,9 @@ public long getSize() {
            * @return This builder for chaining.
            */
           public Builder setSize(long value) {
    -        
    +
             size_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -587,7 +565,7 @@ public Builder setSize(long value) {
            * @return This builder for chaining.
            */
           public Builder clearSize() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000001);
             size_ = 0L;
             onChanged();
             return this;
    @@ -646,11 +624,9 @@ public java.lang.String getName() {
            */
           public Builder setName(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             name_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -663,8 +639,8 @@ public Builder setName(
            * @return This builder for chaining.
            */
           public Builder clearName() {
    -        
             name_ = getDefaultInstance().getName();
    +        bitField0_ = (bitField0_ & ~0x00000002);
             onChanged();
             return this;
           }
    @@ -679,27 +655,13 @@ public Builder clearName() {
            */
           public Builder setNameBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             name_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.TensorShapeProto.Dim)
         }
    @@ -753,6 +715,7 @@ public org.tensorflow.proto.TensorShapeProto.Dim getDefaultInstanceForType() {
       }
     
       public static final int DIM_FIELD_NUMBER = 2;
    +  @SuppressWarnings("serial")
       private java.util.List dim_;
       /**
        * 
    @@ -760,11 +723,14 @@ public org.tensorflow.proto.TensorShapeProto.Dim getDefaultInstanceForType() {
        * for a 30 x 40 2D tensor.  If an entry has size -1, this
        * corresponds to a dimension of unknown size. The names are
        * optional.
    +   *
        * The order of entries in "dim" matters: It indicates the layout of the
        * values in the tensor in-memory representation.
    +   *
        * The first entry in "dim" is the outermost dimension used to layout the
        * values, the last entry is the innermost dimension.  This matches the
        * in-memory layout of RowMajor Eigen tensors.
    +   *
        * If "dim.size()" > 0, "unknown_rank" must be false.
        * 
    * @@ -780,11 +746,14 @@ public java.util.List getDimList() { * for a 30 x 40 2D tensor. If an entry has size -1, this * corresponds to a dimension of unknown size. The names are * optional. + * * The order of entries in "dim" matters: It indicates the layout of the * values in the tensor in-memory representation. + * * The first entry in "dim" is the outermost dimension used to layout the * values, the last entry is the innermost dimension. This matches the * in-memory layout of RowMajor Eigen tensors. + * * If "dim.size()" > 0, "unknown_rank" must be false. *
    * @@ -801,11 +770,14 @@ public java.util.List getDimList() { * for a 30 x 40 2D tensor. If an entry has size -1, this * corresponds to a dimension of unknown size. The names are * optional. + * * The order of entries in "dim" matters: It indicates the layout of the * values in the tensor in-memory representation. + * * The first entry in "dim" is the outermost dimension used to layout the * values, the last entry is the innermost dimension. This matches the * in-memory layout of RowMajor Eigen tensors. + * * If "dim.size()" > 0, "unknown_rank" must be false. *
    * @@ -821,11 +793,14 @@ public int getDimCount() { * for a 30 x 40 2D tensor. If an entry has size -1, this * corresponds to a dimension of unknown size. The names are * optional. + * * The order of entries in "dim" matters: It indicates the layout of the * values in the tensor in-memory representation. + * * The first entry in "dim" is the outermost dimension used to layout the * values, the last entry is the innermost dimension. This matches the * in-memory layout of RowMajor Eigen tensors. + * * If "dim.size()" > 0, "unknown_rank" must be false. *
    * @@ -841,11 +816,14 @@ public org.tensorflow.proto.TensorShapeProto.Dim getDim(int index) { * for a 30 x 40 2D tensor. If an entry has size -1, this * corresponds to a dimension of unknown size. The names are * optional. + * * The order of entries in "dim" matters: It indicates the layout of the * values in the tensor in-memory representation. + * * The first entry in "dim" is the outermost dimension used to layout the * values, the last entry is the innermost dimension. This matches the * in-memory layout of RowMajor Eigen tensors. + * * If "dim.size()" > 0, "unknown_rank" must be false. *
    * @@ -858,10 +836,11 @@ public org.tensorflow.proto.TensorShapeProto.DimOrBuilder getDimOrBuilder( } public static final int UNKNOWN_RANK_FIELD_NUMBER = 3; - private boolean unknownRank_; + private boolean unknownRank_ = false; /** *
        * If true, the number of dimensions in the shape is unknown.
    +   *
        * If true, "dim.size()" must be 0.
        * 
    * @@ -986,39 +965,41 @@ public static org.tensorflow.proto.TensorShapeProto parseFrom( } public static org.tensorflow.proto.TensorShapeProto parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.TensorShapeProto parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.TensorShapeProto parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.TensorShapeProto parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.TensorShapeProto parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.TensorShapeProto parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -1038,7 +1019,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -1050,7 +1031,7 @@ protected Builder newBuilderForType( * Protobuf type {@code tensorflow.TensorShapeProto} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.TensorShapeProto) org.tensorflow.proto.TensorShapeProtoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -1059,7 +1040,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.TensorShapeProtos.internal_static_tensorflow_TensorShapeProto_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -1072,13 +1053,14 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (dimBuilder_ == null) { dim_ = java.util.Collections.emptyList(); } else { @@ -1087,7 +1069,6 @@ public Builder clear() { } bitField0_ = (bitField0_ & ~0x00000001); unknownRank_ = false; - return this; } @@ -1114,7 +1095,13 @@ public org.tensorflow.proto.TensorShapeProto build() { @java.lang.Override public org.tensorflow.proto.TensorShapeProto buildPartial() { org.tensorflow.proto.TensorShapeProto result = new org.tensorflow.proto.TensorShapeProto(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(org.tensorflow.proto.TensorShapeProto result) { if (dimBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { dim_ = java.util.Collections.unmodifiableList(dim_); @@ -1124,43 +1111,15 @@ public org.tensorflow.proto.TensorShapeProto buildPartial() { } else { result.dim_ = dimBuilder_.build(); } - result.unknownRank_ = unknownRank_; - onBuilt(); - return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.TensorShapeProto result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.unknownRank_ = unknownRank_; + } } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.TensorShapeProto) { @@ -1192,7 +1151,7 @@ public Builder mergeFrom(org.tensorflow.proto.TensorShapeProto other) { dim_ = other.dim_; bitField0_ = (bitField0_ & ~0x00000001); dimBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getDimFieldBuilder() : null; } else { dimBuilder_.addAllMessages(other.dim_); @@ -1243,7 +1202,7 @@ public Builder mergeFrom( } // case 18 case 24: { unknownRank_ = input.readBool(); - + bitField0_ |= 0x00000002; break; } // case 24 default: { @@ -1272,7 +1231,7 @@ private void ensureDimIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.TensorShapeProto.Dim, org.tensorflow.proto.TensorShapeProto.Dim.Builder, org.tensorflow.proto.TensorShapeProto.DimOrBuilder> dimBuilder_; /** @@ -1281,11 +1240,14 @@ private void ensureDimIsMutable() { * for a 30 x 40 2D tensor. If an entry has size -1, this * corresponds to a dimension of unknown size. The names are * optional. + * * The order of entries in "dim" matters: It indicates the layout of the * values in the tensor in-memory representation. + * * The first entry in "dim" is the outermost dimension used to layout the * values, the last entry is the innermost dimension. This matches the * in-memory layout of RowMajor Eigen tensors. + * * If "dim.size()" > 0, "unknown_rank" must be false. *
    * @@ -1304,11 +1266,14 @@ public java.util.List getDimList() { * for a 30 x 40 2D tensor. If an entry has size -1, this * corresponds to a dimension of unknown size. The names are * optional. + * * The order of entries in "dim" matters: It indicates the layout of the * values in the tensor in-memory representation. + * * The first entry in "dim" is the outermost dimension used to layout the * values, the last entry is the innermost dimension. This matches the * in-memory layout of RowMajor Eigen tensors. + * * If "dim.size()" > 0, "unknown_rank" must be false. *
    * @@ -1327,11 +1292,14 @@ public int getDimCount() { * for a 30 x 40 2D tensor. If an entry has size -1, this * corresponds to a dimension of unknown size. The names are * optional. + * * The order of entries in "dim" matters: It indicates the layout of the * values in the tensor in-memory representation. + * * The first entry in "dim" is the outermost dimension used to layout the * values, the last entry is the innermost dimension. This matches the * in-memory layout of RowMajor Eigen tensors. + * * If "dim.size()" > 0, "unknown_rank" must be false. *
    * @@ -1350,11 +1318,14 @@ public org.tensorflow.proto.TensorShapeProto.Dim getDim(int index) { * for a 30 x 40 2D tensor. If an entry has size -1, this * corresponds to a dimension of unknown size. The names are * optional. + * * The order of entries in "dim" matters: It indicates the layout of the * values in the tensor in-memory representation. + * * The first entry in "dim" is the outermost dimension used to layout the * values, the last entry is the innermost dimension. This matches the * in-memory layout of RowMajor Eigen tensors. + * * If "dim.size()" > 0, "unknown_rank" must be false. *
    * @@ -1380,11 +1351,14 @@ public Builder setDim( * for a 30 x 40 2D tensor. If an entry has size -1, this * corresponds to a dimension of unknown size. The names are * optional. + * * The order of entries in "dim" matters: It indicates the layout of the * values in the tensor in-memory representation. + * * The first entry in "dim" is the outermost dimension used to layout the * values, the last entry is the innermost dimension. This matches the * in-memory layout of RowMajor Eigen tensors. + * * If "dim.size()" > 0, "unknown_rank" must be false. *
    * @@ -1407,11 +1381,14 @@ public Builder setDim( * for a 30 x 40 2D tensor. If an entry has size -1, this * corresponds to a dimension of unknown size. The names are * optional. + * * The order of entries in "dim" matters: It indicates the layout of the * values in the tensor in-memory representation. + * * The first entry in "dim" is the outermost dimension used to layout the * values, the last entry is the innermost dimension. This matches the * in-memory layout of RowMajor Eigen tensors. + * * If "dim.size()" > 0, "unknown_rank" must be false. *
    * @@ -1436,11 +1413,14 @@ public Builder addDim(org.tensorflow.proto.TensorShapeProto.Dim value) { * for a 30 x 40 2D tensor. If an entry has size -1, this * corresponds to a dimension of unknown size. The names are * optional. + * * The order of entries in "dim" matters: It indicates the layout of the * values in the tensor in-memory representation. + * * The first entry in "dim" is the outermost dimension used to layout the * values, the last entry is the innermost dimension. This matches the * in-memory layout of RowMajor Eigen tensors. + * * If "dim.size()" > 0, "unknown_rank" must be false. *
    * @@ -1466,11 +1446,14 @@ public Builder addDim( * for a 30 x 40 2D tensor. If an entry has size -1, this * corresponds to a dimension of unknown size. The names are * optional. + * * The order of entries in "dim" matters: It indicates the layout of the * values in the tensor in-memory representation. + * * The first entry in "dim" is the outermost dimension used to layout the * values, the last entry is the innermost dimension. This matches the * in-memory layout of RowMajor Eigen tensors. + * * If "dim.size()" > 0, "unknown_rank" must be false. *
    * @@ -1493,11 +1476,14 @@ public Builder addDim( * for a 30 x 40 2D tensor. If an entry has size -1, this * corresponds to a dimension of unknown size. The names are * optional. + * * The order of entries in "dim" matters: It indicates the layout of the * values in the tensor in-memory representation. + * * The first entry in "dim" is the outermost dimension used to layout the * values, the last entry is the innermost dimension. This matches the * in-memory layout of RowMajor Eigen tensors. + * * If "dim.size()" > 0, "unknown_rank" must be false. *
    * @@ -1520,11 +1506,14 @@ public Builder addDim( * for a 30 x 40 2D tensor. If an entry has size -1, this * corresponds to a dimension of unknown size. The names are * optional. + * * The order of entries in "dim" matters: It indicates the layout of the * values in the tensor in-memory representation. + * * The first entry in "dim" is the outermost dimension used to layout the * values, the last entry is the innermost dimension. This matches the * in-memory layout of RowMajor Eigen tensors. + * * If "dim.size()" > 0, "unknown_rank" must be false. *
    * @@ -1548,11 +1537,14 @@ public Builder addAllDim( * for a 30 x 40 2D tensor. If an entry has size -1, this * corresponds to a dimension of unknown size. The names are * optional. + * * The order of entries in "dim" matters: It indicates the layout of the * values in the tensor in-memory representation. + * * The first entry in "dim" is the outermost dimension used to layout the * values, the last entry is the innermost dimension. This matches the * in-memory layout of RowMajor Eigen tensors. + * * If "dim.size()" > 0, "unknown_rank" must be false. *
    * @@ -1574,11 +1566,14 @@ public Builder clearDim() { * for a 30 x 40 2D tensor. If an entry has size -1, this * corresponds to a dimension of unknown size. The names are * optional. + * * The order of entries in "dim" matters: It indicates the layout of the * values in the tensor in-memory representation. + * * The first entry in "dim" is the outermost dimension used to layout the * values, the last entry is the innermost dimension. This matches the * in-memory layout of RowMajor Eigen tensors. + * * If "dim.size()" > 0, "unknown_rank" must be false. *
    * @@ -1600,11 +1595,14 @@ public Builder removeDim(int index) { * for a 30 x 40 2D tensor. If an entry has size -1, this * corresponds to a dimension of unknown size. The names are * optional. + * * The order of entries in "dim" matters: It indicates the layout of the * values in the tensor in-memory representation. + * * The first entry in "dim" is the outermost dimension used to layout the * values, the last entry is the innermost dimension. This matches the * in-memory layout of RowMajor Eigen tensors. + * * If "dim.size()" > 0, "unknown_rank" must be false. *
    * @@ -1620,11 +1618,14 @@ public org.tensorflow.proto.TensorShapeProto.Dim.Builder getDimBuilder( * for a 30 x 40 2D tensor. If an entry has size -1, this * corresponds to a dimension of unknown size. The names are * optional. + * * The order of entries in "dim" matters: It indicates the layout of the * values in the tensor in-memory representation. + * * The first entry in "dim" is the outermost dimension used to layout the * values, the last entry is the innermost dimension. This matches the * in-memory layout of RowMajor Eigen tensors. + * * If "dim.size()" > 0, "unknown_rank" must be false. *
    * @@ -1643,11 +1644,14 @@ public org.tensorflow.proto.TensorShapeProto.DimOrBuilder getDimOrBuilder( * for a 30 x 40 2D tensor. If an entry has size -1, this * corresponds to a dimension of unknown size. The names are * optional. + * * The order of entries in "dim" matters: It indicates the layout of the * values in the tensor in-memory representation. + * * The first entry in "dim" is the outermost dimension used to layout the * values, the last entry is the innermost dimension. This matches the * in-memory layout of RowMajor Eigen tensors. + * * If "dim.size()" > 0, "unknown_rank" must be false. *
    * @@ -1667,11 +1671,14 @@ public org.tensorflow.proto.TensorShapeProto.DimOrBuilder getDimOrBuilder( * for a 30 x 40 2D tensor. If an entry has size -1, this * corresponds to a dimension of unknown size. The names are * optional. + * * The order of entries in "dim" matters: It indicates the layout of the * values in the tensor in-memory representation. + * * The first entry in "dim" is the outermost dimension used to layout the * values, the last entry is the innermost dimension. This matches the * in-memory layout of RowMajor Eigen tensors. + * * If "dim.size()" > 0, "unknown_rank" must be false. *
    * @@ -1687,11 +1694,14 @@ public org.tensorflow.proto.TensorShapeProto.Dim.Builder addDimBuilder() { * for a 30 x 40 2D tensor. If an entry has size -1, this * corresponds to a dimension of unknown size. The names are * optional. + * * The order of entries in "dim" matters: It indicates the layout of the * values in the tensor in-memory representation. + * * The first entry in "dim" is the outermost dimension used to layout the * values, the last entry is the innermost dimension. This matches the * in-memory layout of RowMajor Eigen tensors. + * * If "dim.size()" > 0, "unknown_rank" must be false. *
    * @@ -1708,11 +1718,14 @@ public org.tensorflow.proto.TensorShapeProto.Dim.Builder addDimBuilder( * for a 30 x 40 2D tensor. If an entry has size -1, this * corresponds to a dimension of unknown size. The names are * optional. + * * The order of entries in "dim" matters: It indicates the layout of the * values in the tensor in-memory representation. + * * The first entry in "dim" is the outermost dimension used to layout the * values, the last entry is the innermost dimension. This matches the * in-memory layout of RowMajor Eigen tensors. + * * If "dim.size()" > 0, "unknown_rank" must be false. *
    * @@ -1722,11 +1735,11 @@ public org.tensorflow.proto.TensorShapeProto.Dim.Builder addDimBuilder( getDimBuilderList() { return getDimFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.TensorShapeProto.Dim, org.tensorflow.proto.TensorShapeProto.Dim.Builder, org.tensorflow.proto.TensorShapeProto.DimOrBuilder> getDimFieldBuilder() { if (dimBuilder_ == null) { - dimBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + dimBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.TensorShapeProto.Dim, org.tensorflow.proto.TensorShapeProto.Dim.Builder, org.tensorflow.proto.TensorShapeProto.DimOrBuilder>( dim_, ((bitField0_ & 0x00000001) != 0), @@ -1741,6 +1754,7 @@ public org.tensorflow.proto.TensorShapeProto.Dim.Builder addDimBuilder( /** *
          * If true, the number of dimensions in the shape is unknown.
    +     *
          * If true, "dim.size()" must be 0.
          * 
    * @@ -1754,6 +1768,7 @@ public boolean getUnknownRank() { /** *
          * If true, the number of dimensions in the shape is unknown.
    +     *
          * If true, "dim.size()" must be 0.
          * 
    * @@ -1762,14 +1777,16 @@ public boolean getUnknownRank() { * @return This builder for chaining. */ public Builder setUnknownRank(boolean value) { - + unknownRank_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } /** *
          * If true, the number of dimensions in the shape is unknown.
    +     *
          * If true, "dim.size()" must be 0.
          * 
    * @@ -1777,23 +1794,11 @@ public Builder setUnknownRank(boolean value) { * @return This builder for chaining. */ public Builder clearUnknownRank() { - + bitField0_ = (bitField0_ & ~0x00000002); unknownRank_ = false; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.TensorShapeProto) } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorShapeProtoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorShapeProtoOrBuilder.java index 9c5ef351c57..abdb7c2a2dc 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorShapeProtoOrBuilder.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorShapeProtoOrBuilder.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/framework/tensor_shape.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -13,11 +15,14 @@ public interface TensorShapeProtoOrBuilder extends * for a 30 x 40 2D tensor. If an entry has size -1, this * corresponds to a dimension of unknown size. The names are * optional. + * * The order of entries in "dim" matters: It indicates the layout of the * values in the tensor in-memory representation. + * * The first entry in "dim" is the outermost dimension used to layout the * values, the last entry is the innermost dimension. This matches the * in-memory layout of RowMajor Eigen tensors. + * * If "dim.size()" > 0, "unknown_rank" must be false. *
    * @@ -31,11 +36,14 @@ public interface TensorShapeProtoOrBuilder extends * for a 30 x 40 2D tensor. If an entry has size -1, this * corresponds to a dimension of unknown size. The names are * optional. + * * The order of entries in "dim" matters: It indicates the layout of the * values in the tensor in-memory representation. + * * The first entry in "dim" is the outermost dimension used to layout the * values, the last entry is the innermost dimension. This matches the * in-memory layout of RowMajor Eigen tensors. + * * If "dim.size()" > 0, "unknown_rank" must be false. *
    * @@ -48,11 +56,14 @@ public interface TensorShapeProtoOrBuilder extends * for a 30 x 40 2D tensor. If an entry has size -1, this * corresponds to a dimension of unknown size. The names are * optional. + * * The order of entries in "dim" matters: It indicates the layout of the * values in the tensor in-memory representation. + * * The first entry in "dim" is the outermost dimension used to layout the * values, the last entry is the innermost dimension. This matches the * in-memory layout of RowMajor Eigen tensors. + * * If "dim.size()" > 0, "unknown_rank" must be false. *
    * @@ -65,11 +76,14 @@ public interface TensorShapeProtoOrBuilder extends * for a 30 x 40 2D tensor. If an entry has size -1, this * corresponds to a dimension of unknown size. The names are * optional. + * * The order of entries in "dim" matters: It indicates the layout of the * values in the tensor in-memory representation. + * * The first entry in "dim" is the outermost dimension used to layout the * values, the last entry is the innermost dimension. This matches the * in-memory layout of RowMajor Eigen tensors. + * * If "dim.size()" > 0, "unknown_rank" must be false. *
    * @@ -83,11 +97,14 @@ public interface TensorShapeProtoOrBuilder extends * for a 30 x 40 2D tensor. If an entry has size -1, this * corresponds to a dimension of unknown size. The names are * optional. + * * The order of entries in "dim" matters: It indicates the layout of the * values in the tensor in-memory representation. + * * The first entry in "dim" is the outermost dimension used to layout the * values, the last entry is the innermost dimension. This matches the * in-memory layout of RowMajor Eigen tensors. + * * If "dim.size()" > 0, "unknown_rank" must be false. *
    * @@ -99,6 +116,7 @@ org.tensorflow.proto.TensorShapeProto.DimOrBuilder getDimOrBuilder( /** *
        * If true, the number of dimensions in the shape is unknown.
    +   *
        * If true, "dim.size()" must be 0.
        * 
    * diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorShapeProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorShapeProtos.java index 045a0a6da4c..0d6cdfd8d58 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorShapeProtos.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorShapeProtos.java @@ -1,10 +1,21 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/framework/tensor_shape.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; public final class TensorShapeProtos { private TensorShapeProtos() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + TensorShapeProtos.class.getName()); + } public static void registerAllExtensions( com.google.protobuf.ExtensionRegistryLite registry) { } @@ -17,12 +28,12 @@ public static void registerAllExtensions( static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_TensorShapeProto_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_TensorShapeProto_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_TensorShapeProto_Dim_descriptor; static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_TensorShapeProto_Dim_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor @@ -50,15 +61,16 @@ public static void registerAllExtensions( internal_static_tensorflow_TensorShapeProto_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_tensorflow_TensorShapeProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_TensorShapeProto_descriptor, new java.lang.String[] { "Dim", "UnknownRank", }); internal_static_tensorflow_TensorShapeProto_Dim_descriptor = internal_static_tensorflow_TensorShapeProto_descriptor.getNestedTypes().get(0); internal_static_tensorflow_TensorShapeProto_Dim_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_TensorShapeProto_Dim_descriptor, new java.lang.String[] { "Size", "Name", }); + descriptor.resolveAllFeaturesImmutable(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorSliceProto.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorSliceProto.java index 0d6cb86e44e..dde6d3207de 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorSliceProto.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorSliceProto.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/framework/tensor_slice.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -11,37 +13,34 @@ * Protobuf type {@code tensorflow.TensorSliceProto} */ public final class TensorSliceProto extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.TensorSliceProto) TensorSliceProtoOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + TensorSliceProto.class.getName()); + } // Use TensorSliceProto.newBuilder() to construct. - private TensorSliceProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private TensorSliceProto(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private TensorSliceProto() { extent_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TensorSliceProto(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.TensorSliceProtos.internal_static_tensorflow_TensorSliceProto_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.TensorSliceProtos.internal_static_tensorflow_TensorSliceProto_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -73,7 +72,7 @@ public interface ExtentOrBuilder extends */ long getLength(); - public org.tensorflow.proto.TensorSliceProto.Extent.HasLengthCase getHasLengthCase(); + org.tensorflow.proto.TensorSliceProto.Extent.HasLengthCase getHasLengthCase(); } /** *
    @@ -83,36 +82,33 @@ public interface ExtentOrBuilder extends
        * Protobuf type {@code tensorflow.TensorSliceProto.Extent}
        */
       public static final class Extent extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.TensorSliceProto.Extent)
           ExtentOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        Extent.class.getName());
    +    }
         // Use Extent.newBuilder() to construct.
    -    private Extent(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private Extent(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private Extent() {
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new Extent();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.TensorSliceProtos.internal_static_tensorflow_TensorSliceProto_Extent_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.TensorSliceProtos.internal_static_tensorflow_TensorSliceProto_Extent_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -120,6 +116,7 @@ protected java.lang.Object newInstance(
         }
     
         private int hasLengthCase_ = 0;
    +    @SuppressWarnings("serial")
         private java.lang.Object hasLength_;
         public enum HasLengthCase
             implements com.google.protobuf.Internal.EnumLite,
    @@ -159,7 +156,7 @@ public int getNumber() {
         }
     
         public static final int START_FIELD_NUMBER = 1;
    -    private long start_;
    +    private long start_ = 0L;
         /**
          * 
          * Start index of the slice, starting at 0.
    @@ -321,39 +318,41 @@ public static org.tensorflow.proto.TensorSliceProto.Extent parseFrom(
         }
         public static org.tensorflow.proto.TensorSliceProto.Extent parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.TensorSliceProto.Extent parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.TensorSliceProto.Extent parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.TensorSliceProto.Extent parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.TensorSliceProto.Extent parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.TensorSliceProto.Extent parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -373,7 +372,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -385,7 +384,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.TensorSliceProto.Extent}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.TensorSliceProto.Extent)
             org.tensorflow.proto.TensorSliceProto.ExtentOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -394,7 +393,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.TensorSliceProtos.internal_static_tensorflow_TensorSliceProto_Extent_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -407,15 +406,15 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             start_ = 0L;
    -
             hasLengthCase_ = 0;
             hasLength_ = null;
             return this;
    @@ -444,47 +443,24 @@ public org.tensorflow.proto.TensorSliceProto.Extent build() {
           @java.lang.Override
           public org.tensorflow.proto.TensorSliceProto.Extent buildPartial() {
             org.tensorflow.proto.TensorSliceProto.Extent result = new org.tensorflow.proto.TensorSliceProto.Extent(this);
    -        result.start_ = start_;
    -        if (hasLengthCase_ == 2) {
    -          result.hasLength_ = hasLength_;
    -        }
    -        result.hasLengthCase_ = hasLengthCase_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        buildPartialOneofs(result);
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    +      private void buildPartial0(org.tensorflow.proto.TensorSliceProto.Extent result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.start_ = start_;
    +        }
           }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +
    +      private void buildPartialOneofs(org.tensorflow.proto.TensorSliceProto.Extent result) {
    +        result.hasLengthCase_ = hasLengthCase_;
    +        result.hasLength_ = this.hasLength_;
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.TensorSliceProto.Extent) {
    @@ -537,7 +513,7 @@ public Builder mergeFrom(
                     break;
                   case 8: {
                     start_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 8
                   case 16: {
    @@ -575,6 +551,7 @@ public Builder clearHasLength() {
             return this;
           }
     
    +      private int bitField0_;
     
           private long start_ ;
           /**
    @@ -599,8 +576,9 @@ public long getStart() {
            * @return This builder for chaining.
            */
           public Builder setStart(long value) {
    -        
    +
             start_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -613,7 +591,7 @@ public Builder setStart(long value) {
            * @return This builder for chaining.
            */
           public Builder clearStart() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000001);
             start_ = 0L;
             onChanged();
             return this;
    @@ -642,6 +620,7 @@ public long getLength() {
            * @return This builder for chaining.
            */
           public Builder setLength(long value) {
    +
             hasLengthCase_ = 2;
             hasLength_ = value;
             onChanged();
    @@ -659,18 +638,6 @@ public Builder clearLength() {
             }
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.TensorSliceProto.Extent)
         }
    @@ -724,10 +691,12 @@ public org.tensorflow.proto.TensorSliceProto.Extent getDefaultInstanceForType()
       }
     
       public static final int EXTENT_FIELD_NUMBER = 1;
    +  @SuppressWarnings("serial")
       private java.util.List extent_;
       /**
        * 
        * Extent of the slice in all tensor dimensions.
    +   *
        * Must have one entry for each of the dimension of the tensor that this
        * slice belongs to.  The order of sizes is the same as the order of
        * dimensions in the TensorShape.
    @@ -742,6 +711,7 @@ public java.util.List getExtentLis
       /**
        * 
        * Extent of the slice in all tensor dimensions.
    +   *
        * Must have one entry for each of the dimension of the tensor that this
        * slice belongs to.  The order of sizes is the same as the order of
        * dimensions in the TensorShape.
    @@ -757,6 +727,7 @@ public java.util.List getExtentLis
       /**
        * 
        * Extent of the slice in all tensor dimensions.
    +   *
        * Must have one entry for each of the dimension of the tensor that this
        * slice belongs to.  The order of sizes is the same as the order of
        * dimensions in the TensorShape.
    @@ -771,6 +742,7 @@ public int getExtentCount() {
       /**
        * 
        * Extent of the slice in all tensor dimensions.
    +   *
        * Must have one entry for each of the dimension of the tensor that this
        * slice belongs to.  The order of sizes is the same as the order of
        * dimensions in the TensorShape.
    @@ -785,6 +757,7 @@ public org.tensorflow.proto.TensorSliceProto.Extent getExtent(int index) {
       /**
        * 
        * Extent of the slice in all tensor dimensions.
    +   *
        * Must have one entry for each of the dimension of the tensor that this
        * slice belongs to.  The order of sizes is the same as the order of
        * dimensions in the TensorShape.
    @@ -899,39 +872,41 @@ public static org.tensorflow.proto.TensorSliceProto parseFrom(
       }
       public static org.tensorflow.proto.TensorSliceProto parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.TensorSliceProto parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.TensorSliceProto parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.TensorSliceProto parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.TensorSliceProto parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.TensorSliceProto parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -951,7 +926,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -963,7 +938,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.TensorSliceProto}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.TensorSliceProto)
           org.tensorflow.proto.TensorSliceProtoOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -972,7 +947,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.TensorSliceProtos.internal_static_tensorflow_TensorSliceProto_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -985,13 +960,14 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           if (extentBuilder_ == null) {
             extent_ = java.util.Collections.emptyList();
           } else {
    @@ -1025,7 +1001,13 @@ public org.tensorflow.proto.TensorSliceProto build() {
         @java.lang.Override
         public org.tensorflow.proto.TensorSliceProto buildPartial() {
           org.tensorflow.proto.TensorSliceProto result = new org.tensorflow.proto.TensorSliceProto(this);
    -      int from_bitField0_ = bitField0_;
    +      buildPartialRepeatedFields(result);
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartialRepeatedFields(org.tensorflow.proto.TensorSliceProto result) {
           if (extentBuilder_ == null) {
             if (((bitField0_ & 0x00000001) != 0)) {
               extent_ = java.util.Collections.unmodifiableList(extent_);
    @@ -1035,42 +1017,12 @@ public org.tensorflow.proto.TensorSliceProto buildPartial() {
           } else {
             result.extent_ = extentBuilder_.build();
           }
    -      onBuilt();
    -      return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.TensorSliceProto result) {
    +      int from_bitField0_ = bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.TensorSliceProto) {
    @@ -1102,7 +1054,7 @@ public Builder mergeFrom(org.tensorflow.proto.TensorSliceProto other) {
                 extent_ = other.extent_;
                 bitField0_ = (bitField0_ & ~0x00000001);
                 extentBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getExtentFieldBuilder() : null;
               } else {
                 extentBuilder_.addAllMessages(other.extent_);
    @@ -1174,12 +1126,13 @@ private void ensureExtentIsMutable() {
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.TensorSliceProto.Extent, org.tensorflow.proto.TensorSliceProto.Extent.Builder, org.tensorflow.proto.TensorSliceProto.ExtentOrBuilder> extentBuilder_;
     
         /**
          * 
          * Extent of the slice in all tensor dimensions.
    +     *
          * Must have one entry for each of the dimension of the tensor that this
          * slice belongs to.  The order of sizes is the same as the order of
          * dimensions in the TensorShape.
    @@ -1197,6 +1150,7 @@ public java.util.List getExtentLis
         /**
          * 
          * Extent of the slice in all tensor dimensions.
    +     *
          * Must have one entry for each of the dimension of the tensor that this
          * slice belongs to.  The order of sizes is the same as the order of
          * dimensions in the TensorShape.
    @@ -1214,6 +1168,7 @@ public int getExtentCount() {
         /**
          * 
          * Extent of the slice in all tensor dimensions.
    +     *
          * Must have one entry for each of the dimension of the tensor that this
          * slice belongs to.  The order of sizes is the same as the order of
          * dimensions in the TensorShape.
    @@ -1231,6 +1186,7 @@ public org.tensorflow.proto.TensorSliceProto.Extent getExtent(int index) {
         /**
          * 
          * Extent of the slice in all tensor dimensions.
    +     *
          * Must have one entry for each of the dimension of the tensor that this
          * slice belongs to.  The order of sizes is the same as the order of
          * dimensions in the TensorShape.
    @@ -1255,6 +1211,7 @@ public Builder setExtent(
         /**
          * 
          * Extent of the slice in all tensor dimensions.
    +     *
          * Must have one entry for each of the dimension of the tensor that this
          * slice belongs to.  The order of sizes is the same as the order of
          * dimensions in the TensorShape.
    @@ -1276,6 +1233,7 @@ public Builder setExtent(
         /**
          * 
          * Extent of the slice in all tensor dimensions.
    +     *
          * Must have one entry for each of the dimension of the tensor that this
          * slice belongs to.  The order of sizes is the same as the order of
          * dimensions in the TensorShape.
    @@ -1299,6 +1257,7 @@ public Builder addExtent(org.tensorflow.proto.TensorSliceProto.Extent value) {
         /**
          * 
          * Extent of the slice in all tensor dimensions.
    +     *
          * Must have one entry for each of the dimension of the tensor that this
          * slice belongs to.  The order of sizes is the same as the order of
          * dimensions in the TensorShape.
    @@ -1323,6 +1282,7 @@ public Builder addExtent(
         /**
          * 
          * Extent of the slice in all tensor dimensions.
    +     *
          * Must have one entry for each of the dimension of the tensor that this
          * slice belongs to.  The order of sizes is the same as the order of
          * dimensions in the TensorShape.
    @@ -1344,6 +1304,7 @@ public Builder addExtent(
         /**
          * 
          * Extent of the slice in all tensor dimensions.
    +     *
          * Must have one entry for each of the dimension of the tensor that this
          * slice belongs to.  The order of sizes is the same as the order of
          * dimensions in the TensorShape.
    @@ -1365,6 +1326,7 @@ public Builder addExtent(
         /**
          * 
          * Extent of the slice in all tensor dimensions.
    +     *
          * Must have one entry for each of the dimension of the tensor that this
          * slice belongs to.  The order of sizes is the same as the order of
          * dimensions in the TensorShape.
    @@ -1387,6 +1349,7 @@ public Builder addAllExtent(
         /**
          * 
          * Extent of the slice in all tensor dimensions.
    +     *
          * Must have one entry for each of the dimension of the tensor that this
          * slice belongs to.  The order of sizes is the same as the order of
          * dimensions in the TensorShape.
    @@ -1407,6 +1370,7 @@ public Builder clearExtent() {
         /**
          * 
          * Extent of the slice in all tensor dimensions.
    +     *
          * Must have one entry for each of the dimension of the tensor that this
          * slice belongs to.  The order of sizes is the same as the order of
          * dimensions in the TensorShape.
    @@ -1427,6 +1391,7 @@ public Builder removeExtent(int index) {
         /**
          * 
          * Extent of the slice in all tensor dimensions.
    +     *
          * Must have one entry for each of the dimension of the tensor that this
          * slice belongs to.  The order of sizes is the same as the order of
          * dimensions in the TensorShape.
    @@ -1441,6 +1406,7 @@ public org.tensorflow.proto.TensorSliceProto.Extent.Builder getExtentBuilder(
         /**
          * 
          * Extent of the slice in all tensor dimensions.
    +     *
          * Must have one entry for each of the dimension of the tensor that this
          * slice belongs to.  The order of sizes is the same as the order of
          * dimensions in the TensorShape.
    @@ -1458,6 +1424,7 @@ public org.tensorflow.proto.TensorSliceProto.ExtentOrBuilder getExtentOrBuilder(
         /**
          * 
          * Extent of the slice in all tensor dimensions.
    +     *
          * Must have one entry for each of the dimension of the tensor that this
          * slice belongs to.  The order of sizes is the same as the order of
          * dimensions in the TensorShape.
    @@ -1476,6 +1443,7 @@ public org.tensorflow.proto.TensorSliceProto.ExtentOrBuilder getExtentOrBuilder(
         /**
          * 
          * Extent of the slice in all tensor dimensions.
    +     *
          * Must have one entry for each of the dimension of the tensor that this
          * slice belongs to.  The order of sizes is the same as the order of
          * dimensions in the TensorShape.
    @@ -1490,6 +1458,7 @@ public org.tensorflow.proto.TensorSliceProto.Extent.Builder addExtentBuilder() {
         /**
          * 
          * Extent of the slice in all tensor dimensions.
    +     *
          * Must have one entry for each of the dimension of the tensor that this
          * slice belongs to.  The order of sizes is the same as the order of
          * dimensions in the TensorShape.
    @@ -1505,6 +1474,7 @@ public org.tensorflow.proto.TensorSliceProto.Extent.Builder addExtentBuilder(
         /**
          * 
          * Extent of the slice in all tensor dimensions.
    +     *
          * Must have one entry for each of the dimension of the tensor that this
          * slice belongs to.  The order of sizes is the same as the order of
          * dimensions in the TensorShape.
    @@ -1516,11 +1486,11 @@ public org.tensorflow.proto.TensorSliceProto.Extent.Builder addExtentBuilder(
              getExtentBuilderList() {
           return getExtentFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.TensorSliceProto.Extent, org.tensorflow.proto.TensorSliceProto.Extent.Builder, org.tensorflow.proto.TensorSliceProto.ExtentOrBuilder> 
             getExtentFieldBuilder() {
           if (extentBuilder_ == null) {
    -        extentBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        extentBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.TensorSliceProto.Extent, org.tensorflow.proto.TensorSliceProto.Extent.Builder, org.tensorflow.proto.TensorSliceProto.ExtentOrBuilder>(
                     extent_,
                     ((bitField0_ & 0x00000001) != 0),
    @@ -1530,18 +1500,6 @@ public org.tensorflow.proto.TensorSliceProto.Extent.Builder addExtentBuilder(
           }
           return extentBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.TensorSliceProto)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorSliceProtoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorSliceProtoOrBuilder.java
    index d57f4ac0244..c288cadbbf0 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorSliceProtoOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorSliceProtoOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/tensor_slice.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -10,6 +12,7 @@ public interface TensorSliceProtoOrBuilder extends
       /**
        * 
        * Extent of the slice in all tensor dimensions.
    +   *
        * Must have one entry for each of the dimension of the tensor that this
        * slice belongs to.  The order of sizes is the same as the order of
        * dimensions in the TensorShape.
    @@ -22,6 +25,7 @@ public interface TensorSliceProtoOrBuilder extends
       /**
        * 
        * Extent of the slice in all tensor dimensions.
    +   *
        * Must have one entry for each of the dimension of the tensor that this
        * slice belongs to.  The order of sizes is the same as the order of
        * dimensions in the TensorShape.
    @@ -33,6 +37,7 @@ public interface TensorSliceProtoOrBuilder extends
       /**
        * 
        * Extent of the slice in all tensor dimensions.
    +   *
        * Must have one entry for each of the dimension of the tensor that this
        * slice belongs to.  The order of sizes is the same as the order of
        * dimensions in the TensorShape.
    @@ -44,6 +49,7 @@ public interface TensorSliceProtoOrBuilder extends
       /**
        * 
        * Extent of the slice in all tensor dimensions.
    +   *
        * Must have one entry for each of the dimension of the tensor that this
        * slice belongs to.  The order of sizes is the same as the order of
        * dimensions in the TensorShape.
    @@ -56,6 +62,7 @@ public interface TensorSliceProtoOrBuilder extends
       /**
        * 
        * Extent of the slice in all tensor dimensions.
    +   *
        * Must have one entry for each of the dimension of the tensor that this
        * slice belongs to.  The order of sizes is the same as the order of
        * dimensions in the TensorShape.
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorSliceProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorSliceProtos.java
    index f12f6a141cc..fbbde962a98 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorSliceProtos.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorSliceProtos.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/tensor_slice.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class TensorSliceProtos {
       private TensorSliceProtos() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      TensorSliceProtos.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,12 +28,12 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_TensorSliceProto_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_TensorSliceProto_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_TensorSliceProto_Extent_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_TensorSliceProto_Extent_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -50,15 +61,16 @@ public static void registerAllExtensions(
         internal_static_tensorflow_TensorSliceProto_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_TensorSliceProto_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_TensorSliceProto_descriptor,
             new java.lang.String[] { "Extent", });
         internal_static_tensorflow_TensorSliceProto_Extent_descriptor =
           internal_static_tensorflow_TensorSliceProto_descriptor.getNestedTypes().get(0);
         internal_static_tensorflow_TensorSliceProto_Extent_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_TensorSliceProto_Extent_descriptor,
             new java.lang.String[] { "Start", "Length", "HasLength", });
    +    descriptor.resolveAllFeaturesImmutable();
       }
     
       // @@protoc_insertion_point(outer_class_scope)
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TestLogProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TestLogProtos.java
    index f56cbf6b82b..4e6ef7c4896 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TestLogProtos.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TestLogProtos.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: xla/tsl/protobuf/test_log.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class TestLogProtos {
       private TestLogProtos() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      TestLogProtos.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,87 +28,87 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_EntryValue_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_EntryValue_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_MetricEntry_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_MetricEntry_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_BenchmarkEntry_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_BenchmarkEntry_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_BenchmarkEntry_ExtrasEntry_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_BenchmarkEntry_ExtrasEntry_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_BenchmarkEntries_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_BenchmarkEntries_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_BuildConfiguration_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_BuildConfiguration_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_CommitId_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_CommitId_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_CPUInfo_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_CPUInfo_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_CPUInfo_CacheSizeEntry_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_CPUInfo_CacheSizeEntry_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_MemoryInfo_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_MemoryInfo_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_GPUInfo_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_GPUInfo_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_PlatformInfo_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_PlatformInfo_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_AvailableDeviceInfo_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_AvailableDeviceInfo_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_MachineConfiguration_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_MachineConfiguration_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_RunConfiguration_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_RunConfiguration_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_RunConfiguration_EnvVarsEntry_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_RunConfiguration_EnvVarsEntry_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_TestResults_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_TestResults_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -180,105 +191,106 @@ public static void registerAllExtensions(
         internal_static_tensorflow_EntryValue_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_EntryValue_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_EntryValue_descriptor,
             new java.lang.String[] { "DoubleValue", "StringValue", "Kind", });
         internal_static_tensorflow_MetricEntry_descriptor =
           getDescriptor().getMessageTypes().get(1);
         internal_static_tensorflow_MetricEntry_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_MetricEntry_descriptor,
             new java.lang.String[] { "Name", "Value", "MinValue", "MaxValue", });
         internal_static_tensorflow_BenchmarkEntry_descriptor =
           getDescriptor().getMessageTypes().get(2);
         internal_static_tensorflow_BenchmarkEntry_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_BenchmarkEntry_descriptor,
             new java.lang.String[] { "Name", "Iters", "CpuTime", "WallTime", "Throughput", "Extras", "Metrics", });
         internal_static_tensorflow_BenchmarkEntry_ExtrasEntry_descriptor =
           internal_static_tensorflow_BenchmarkEntry_descriptor.getNestedTypes().get(0);
         internal_static_tensorflow_BenchmarkEntry_ExtrasEntry_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_BenchmarkEntry_ExtrasEntry_descriptor,
             new java.lang.String[] { "Key", "Value", });
         internal_static_tensorflow_BenchmarkEntries_descriptor =
           getDescriptor().getMessageTypes().get(3);
         internal_static_tensorflow_BenchmarkEntries_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_BenchmarkEntries_descriptor,
             new java.lang.String[] { "Entry", });
         internal_static_tensorflow_BuildConfiguration_descriptor =
           getDescriptor().getMessageTypes().get(4);
         internal_static_tensorflow_BuildConfiguration_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_BuildConfiguration_descriptor,
             new java.lang.String[] { "Mode", "CcFlags", "Opts", });
         internal_static_tensorflow_CommitId_descriptor =
           getDescriptor().getMessageTypes().get(5);
         internal_static_tensorflow_CommitId_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_CommitId_descriptor,
             new java.lang.String[] { "Changelist", "Hash", "Snapshot", "PendingChangelist", "Kind", });
         internal_static_tensorflow_CPUInfo_descriptor =
           getDescriptor().getMessageTypes().get(6);
         internal_static_tensorflow_CPUInfo_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_CPUInfo_descriptor,
             new java.lang.String[] { "NumCores", "NumCoresAllowed", "MhzPerCpu", "CpuInfo", "CpuGovernor", "CacheSize", });
         internal_static_tensorflow_CPUInfo_CacheSizeEntry_descriptor =
           internal_static_tensorflow_CPUInfo_descriptor.getNestedTypes().get(0);
         internal_static_tensorflow_CPUInfo_CacheSizeEntry_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_CPUInfo_CacheSizeEntry_descriptor,
             new java.lang.String[] { "Key", "Value", });
         internal_static_tensorflow_MemoryInfo_descriptor =
           getDescriptor().getMessageTypes().get(7);
         internal_static_tensorflow_MemoryInfo_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_MemoryInfo_descriptor,
             new java.lang.String[] { "Total", "Available", });
         internal_static_tensorflow_GPUInfo_descriptor =
           getDescriptor().getMessageTypes().get(8);
         internal_static_tensorflow_GPUInfo_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_GPUInfo_descriptor,
             new java.lang.String[] { "Model", "Uuid", "BusId", });
         internal_static_tensorflow_PlatformInfo_descriptor =
           getDescriptor().getMessageTypes().get(9);
         internal_static_tensorflow_PlatformInfo_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_PlatformInfo_descriptor,
             new java.lang.String[] { "Bits", "Linkage", "Machine", "Release", "System", "Version", });
         internal_static_tensorflow_AvailableDeviceInfo_descriptor =
           getDescriptor().getMessageTypes().get(10);
         internal_static_tensorflow_AvailableDeviceInfo_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_AvailableDeviceInfo_descriptor,
             new java.lang.String[] { "Name", "Type", "MemoryLimit", "PhysicalDescription", });
         internal_static_tensorflow_MachineConfiguration_descriptor =
           getDescriptor().getMessageTypes().get(11);
         internal_static_tensorflow_MachineConfiguration_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_MachineConfiguration_descriptor,
             new java.lang.String[] { "Hostname", "SerialIdentifier", "PlatformInfo", "CpuInfo", "DeviceInfo", "AvailableDeviceInfo", "MemoryInfo", });
         internal_static_tensorflow_RunConfiguration_descriptor =
           getDescriptor().getMessageTypes().get(12);
         internal_static_tensorflow_RunConfiguration_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_RunConfiguration_descriptor,
             new java.lang.String[] { "Argument", "EnvVars", });
         internal_static_tensorflow_RunConfiguration_EnvVarsEntry_descriptor =
           internal_static_tensorflow_RunConfiguration_descriptor.getNestedTypes().get(0);
         internal_static_tensorflow_RunConfiguration_EnvVarsEntry_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_RunConfiguration_EnvVarsEntry_descriptor,
             new java.lang.String[] { "Key", "Value", });
         internal_static_tensorflow_TestResults_descriptor =
           getDescriptor().getMessageTypes().get(13);
         internal_static_tensorflow_TestResults_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_TestResults_descriptor,
             new java.lang.String[] { "Target", "Entries", "BuildConfiguration", "CommitId", "StartTime", "RunTime", "MachineConfiguration", "RunConfiguration", "Name", "BenchmarkType", "RunMode", "TfVersion", });
    +    descriptor.resolveAllFeaturesImmutable();
         com.google.protobuf.AnyProto.getDescriptor();
         com.google.protobuf.WrappersProto.getDescriptor();
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TestResults.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TestResults.java
    index 4bc27cbdde7..673f570f56a 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TestResults.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TestResults.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: xla/tsl/protobuf/test_log.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,6 +9,7 @@
      * 
      * The output of one benchmark / test run.  Each run contains a list of
      * tests or benchmarks, stored as BenchmarkEntry messages.
    + *
      * This message should be emitted by the reporter (which runs the
      * test / BM in a subprocess and then reads the emitted BenchmarkEntry messages;
      * usually from a serialized json file, finally collecting them along
    @@ -16,12 +19,21 @@
      * Protobuf type {@code tensorflow.TestResults}
      */
     public final class TestResults extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.TestResults)
         TestResultsOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      TestResults.class.getName());
    +  }
       // Use TestResults.newBuilder() to construct.
    -  private TestResults(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private TestResults(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private TestResults() {
    @@ -32,25 +44,13 @@ private TestResults() {
         tfVersion_ = "";
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new TestResults();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_TestResults_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_TestResults_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -97,6 +97,15 @@ public enum BenchmarkType
         UNRECOGNIZED(-1),
         ;
     
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        BenchmarkType.class.getName());
    +    }
         /**
          * 
          * Fallback for protos written before Type was introduced.
    @@ -213,12 +222,14 @@ private BenchmarkType(int value) {
         // @@protoc_insertion_point(enum_scope:tensorflow.TestResults.BenchmarkType)
       }
     
    +  private int bitField0_;
       public static final int TARGET_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object target_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object target_ = "";
       /**
        * 
        * The target of the run, e.g.:
    -   *  //tensorflow/core:kernels_adjust_contrast_op_benchmark_test
    +   * //tensorflow/core:kernels_adjust_contrast_op_benchmark_test
        * 
    * * string target = 1; @@ -240,7 +251,7 @@ public java.lang.String getTarget() { /** *
        * The target of the run, e.g.:
    -   *  //tensorflow/core:kernels_adjust_contrast_op_benchmark_test
    +   * //tensorflow/core:kernels_adjust_contrast_op_benchmark_test
        * 
    * * string target = 1; @@ -273,7 +284,7 @@ public java.lang.String getTarget() { */ @java.lang.Override public boolean hasEntries() { - return entries_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** *
    @@ -296,7 +307,7 @@ public org.tensorflow.proto.BenchmarkEntries getEntries() {
        */
       @java.lang.Override
       public org.tensorflow.proto.BenchmarkEntriesOrBuilder getEntriesOrBuilder() {
    -    return getEntries();
    +    return entries_ == null ? org.tensorflow.proto.BenchmarkEntries.getDefaultInstance() : entries_;
       }
     
       public static final int BUILD_CONFIGURATION_FIELD_NUMBER = 3;
    @@ -311,7 +322,7 @@ public org.tensorflow.proto.BenchmarkEntriesOrBuilder getEntriesOrBuilder() {
        */
       @java.lang.Override
       public boolean hasBuildConfiguration() {
    -    return buildConfiguration_ != null;
    +    return ((bitField0_ & 0x00000002) != 0);
       }
       /**
        * 
    @@ -334,7 +345,7 @@ public org.tensorflow.proto.BuildConfiguration getBuildConfiguration() {
        */
       @java.lang.Override
       public org.tensorflow.proto.BuildConfigurationOrBuilder getBuildConfigurationOrBuilder() {
    -    return getBuildConfiguration();
    +    return buildConfiguration_ == null ? org.tensorflow.proto.BuildConfiguration.getDefaultInstance() : buildConfiguration_;
       }
     
       public static final int COMMIT_ID_FIELD_NUMBER = 4;
    @@ -349,7 +360,7 @@ public org.tensorflow.proto.BuildConfigurationOrBuilder getBuildConfigurationOrB
        */
       @java.lang.Override
       public boolean hasCommitId() {
    -    return commitId_ != null;
    +    return ((bitField0_ & 0x00000004) != 0);
       }
       /**
        * 
    @@ -372,11 +383,11 @@ public org.tensorflow.proto.CommitId getCommitId() {
        */
       @java.lang.Override
       public org.tensorflow.proto.CommitIdOrBuilder getCommitIdOrBuilder() {
    -    return getCommitId();
    +    return commitId_ == null ? org.tensorflow.proto.CommitId.getDefaultInstance() : commitId_;
       }
     
       public static final int START_TIME_FIELD_NUMBER = 5;
    -  private long startTime_;
    +  private long startTime_ = 0L;
       /**
        * 
        * The time the run started (in seconds of UTC time since Unix epoch)
    @@ -391,7 +402,7 @@ public long getStartTime() {
       }
     
       public static final int RUN_TIME_FIELD_NUMBER = 6;
    -  private double runTime_;
    +  private double runTime_ = 0D;
       /**
        * 
        * The amount of time the total run took (wall time in seconds)
    @@ -417,7 +428,7 @@ public double getRunTime() {
        */
       @java.lang.Override
       public boolean hasMachineConfiguration() {
    -    return machineConfiguration_ != null;
    +    return ((bitField0_ & 0x00000008) != 0);
       }
       /**
        * 
    @@ -440,7 +451,7 @@ public org.tensorflow.proto.MachineConfiguration getMachineConfiguration() {
        */
       @java.lang.Override
       public org.tensorflow.proto.MachineConfigurationOrBuilder getMachineConfigurationOrBuilder() {
    -    return getMachineConfiguration();
    +    return machineConfiguration_ == null ? org.tensorflow.proto.MachineConfiguration.getDefaultInstance() : machineConfiguration_;
       }
     
       public static final int RUN_CONFIGURATION_FIELD_NUMBER = 8;
    @@ -455,7 +466,7 @@ public org.tensorflow.proto.MachineConfigurationOrBuilder getMachineConfiguratio
        */
       @java.lang.Override
       public boolean hasRunConfiguration() {
    -    return runConfiguration_ != null;
    +    return ((bitField0_ & 0x00000010) != 0);
       }
       /**
        * 
    @@ -478,11 +489,12 @@ public org.tensorflow.proto.RunConfiguration getRunConfiguration() {
        */
       @java.lang.Override
       public org.tensorflow.proto.RunConfigurationOrBuilder getRunConfigurationOrBuilder() {
    -    return getRunConfiguration();
    +    return runConfiguration_ == null ? org.tensorflow.proto.RunConfiguration.getDefaultInstance() : runConfiguration_;
       }
     
       public static final int NAME_FIELD_NUMBER = 9;
    -  private volatile java.lang.Object name_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object name_ = "";
       /**
        * 
        * Benchmark target identifier.
    @@ -528,7 +540,7 @@ public java.lang.String getName() {
       }
     
       public static final int BENCHMARK_TYPE_FIELD_NUMBER = 10;
    -  private int benchmarkType_;
    +  private int benchmarkType_ = 0;
       /**
        * .tensorflow.TestResults.BenchmarkType benchmark_type = 10;
        * @return The enum numeric value on the wire for benchmarkType.
    @@ -541,13 +553,13 @@ public java.lang.String getName() {
        * @return The benchmarkType.
        */
       @java.lang.Override public org.tensorflow.proto.TestResults.BenchmarkType getBenchmarkType() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.TestResults.BenchmarkType result = org.tensorflow.proto.TestResults.BenchmarkType.valueOf(benchmarkType_);
    +    org.tensorflow.proto.TestResults.BenchmarkType result = org.tensorflow.proto.TestResults.BenchmarkType.forNumber(benchmarkType_);
         return result == null ? org.tensorflow.proto.TestResults.BenchmarkType.UNRECOGNIZED : result;
       }
     
       public static final int RUN_MODE_FIELD_NUMBER = 11;
    -  private volatile java.lang.Object runMode_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object runMode_ = "";
       /**
        * 
        * Used for differentiating between continuous and debug builds.
    @@ -601,7 +613,8 @@ public java.lang.String getRunMode() {
       }
     
       public static final int TF_VERSION_FIELD_NUMBER = 12;
    -  private volatile java.lang.Object tfVersion_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object tfVersion_ = "";
       /**
        * 
        * TensorFlow version this benchmark runs against.
    @@ -662,16 +675,16 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, target_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(target_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, target_);
         }
    -    if (entries_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(2, getEntries());
         }
    -    if (buildConfiguration_ != null) {
    +    if (((bitField0_ & 0x00000002) != 0)) {
           output.writeMessage(3, getBuildConfiguration());
         }
    -    if (commitId_ != null) {
    +    if (((bitField0_ & 0x00000004) != 0)) {
           output.writeMessage(4, getCommitId());
         }
         if (startTime_ != 0L) {
    @@ -680,23 +693,23 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         if (java.lang.Double.doubleToRawLongBits(runTime_) != 0) {
           output.writeDouble(6, runTime_);
         }
    -    if (machineConfiguration_ != null) {
    +    if (((bitField0_ & 0x00000008) != 0)) {
           output.writeMessage(7, getMachineConfiguration());
         }
    -    if (runConfiguration_ != null) {
    +    if (((bitField0_ & 0x00000010) != 0)) {
           output.writeMessage(8, getRunConfiguration());
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 9, name_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 9, name_);
         }
         if (benchmarkType_ != org.tensorflow.proto.TestResults.BenchmarkType.UNKNOWN.getNumber()) {
           output.writeEnum(10, benchmarkType_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(runMode_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 11, runMode_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(runMode_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 11, runMode_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tfVersion_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 12, tfVersion_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tfVersion_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 12, tfVersion_);
         }
         getUnknownFields().writeTo(output);
       }
    @@ -707,18 +720,18 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, target_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(target_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, target_);
         }
    -    if (entries_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(2, getEntries());
         }
    -    if (buildConfiguration_ != null) {
    +    if (((bitField0_ & 0x00000002) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(3, getBuildConfiguration());
         }
    -    if (commitId_ != null) {
    +    if (((bitField0_ & 0x00000004) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(4, getCommitId());
         }
    @@ -730,26 +743,26 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeDoubleSize(6, runTime_);
         }
    -    if (machineConfiguration_ != null) {
    +    if (((bitField0_ & 0x00000008) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(7, getMachineConfiguration());
         }
    -    if (runConfiguration_ != null) {
    +    if (((bitField0_ & 0x00000010) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(8, getRunConfiguration());
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, name_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(9, name_);
         }
         if (benchmarkType_ != org.tensorflow.proto.TestResults.BenchmarkType.UNKNOWN.getNumber()) {
           size += com.google.protobuf.CodedOutputStream
             .computeEnumSize(10, benchmarkType_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(runMode_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, runMode_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(runMode_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(11, runMode_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tfVersion_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, tfVersion_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tfVersion_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(12, tfVersion_);
         }
         size += getUnknownFields().getSerializedSize();
         memoizedSize = size;
    @@ -891,39 +904,41 @@ public static org.tensorflow.proto.TestResults parseFrom(
       }
       public static org.tensorflow.proto.TestResults parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.TestResults parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.TestResults parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.TestResults parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.TestResults parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.TestResults parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -943,7 +958,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -951,6 +966,7 @@ protected Builder newBuilderForType(
        * 
        * The output of one benchmark / test run.  Each run contains a list of
        * tests or benchmarks, stored as BenchmarkEntry messages.
    +   *
        * This message should be emitted by the reporter (which runs the
        * test / BM in a subprocess and then reads the emitted BenchmarkEntry messages;
        * usually from a serialized json file, finally collecting them along
    @@ -960,7 +976,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.TestResults}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.TestResults)
           org.tensorflow.proto.TestResultsOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -969,7 +985,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.TestLogProtos.internal_static_tensorflow_TestResults_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -978,61 +994,60 @@ public static final class Builder extends
     
         // Construct using org.tensorflow.proto.TestResults.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getEntriesFieldBuilder();
    +        getBuildConfigurationFieldBuilder();
    +        getCommitIdFieldBuilder();
    +        getMachineConfigurationFieldBuilder();
    +        getRunConfigurationFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           target_ = "";
    -
    -      if (entriesBuilder_ == null) {
    -        entries_ = null;
    -      } else {
    -        entries_ = null;
    +      entries_ = null;
    +      if (entriesBuilder_ != null) {
    +        entriesBuilder_.dispose();
             entriesBuilder_ = null;
           }
    -      if (buildConfigurationBuilder_ == null) {
    -        buildConfiguration_ = null;
    -      } else {
    -        buildConfiguration_ = null;
    +      buildConfiguration_ = null;
    +      if (buildConfigurationBuilder_ != null) {
    +        buildConfigurationBuilder_.dispose();
             buildConfigurationBuilder_ = null;
           }
    -      if (commitIdBuilder_ == null) {
    -        commitId_ = null;
    -      } else {
    -        commitId_ = null;
    +      commitId_ = null;
    +      if (commitIdBuilder_ != null) {
    +        commitIdBuilder_.dispose();
             commitIdBuilder_ = null;
           }
           startTime_ = 0L;
    -
           runTime_ = 0D;
    -
    -      if (machineConfigurationBuilder_ == null) {
    -        machineConfiguration_ = null;
    -      } else {
    -        machineConfiguration_ = null;
    +      machineConfiguration_ = null;
    +      if (machineConfigurationBuilder_ != null) {
    +        machineConfigurationBuilder_.dispose();
             machineConfigurationBuilder_ = null;
           }
    -      if (runConfigurationBuilder_ == null) {
    -        runConfiguration_ = null;
    -      } else {
    -        runConfiguration_ = null;
    +      runConfiguration_ = null;
    +      if (runConfigurationBuilder_ != null) {
    +        runConfigurationBuilder_.dispose();
             runConfigurationBuilder_ = null;
           }
           name_ = "";
    -
           benchmarkType_ = 0;
    -
           runMode_ = "";
    -
           tfVersion_ = "";
    -
           return this;
         }
     
    @@ -1059,74 +1074,68 @@ public org.tensorflow.proto.TestResults build() {
         @java.lang.Override
         public org.tensorflow.proto.TestResults buildPartial() {
           org.tensorflow.proto.TestResults result = new org.tensorflow.proto.TestResults(this);
    -      result.target_ = target_;
    -      if (entriesBuilder_ == null) {
    -        result.entries_ = entries_;
    -      } else {
    -        result.entries_ = entriesBuilder_.build();
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartial0(org.tensorflow.proto.TestResults result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.target_ = target_;
           }
    -      if (buildConfigurationBuilder_ == null) {
    -        result.buildConfiguration_ = buildConfiguration_;
    -      } else {
    -        result.buildConfiguration_ = buildConfigurationBuilder_.build();
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.entries_ = entriesBuilder_ == null
    +            ? entries_
    +            : entriesBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
           }
    -      if (commitIdBuilder_ == null) {
    -        result.commitId_ = commitId_;
    -      } else {
    -        result.commitId_ = commitIdBuilder_.build();
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.buildConfiguration_ = buildConfigurationBuilder_ == null
    +            ? buildConfiguration_
    +            : buildConfigurationBuilder_.build();
    +        to_bitField0_ |= 0x00000002;
           }
    -      result.startTime_ = startTime_;
    -      result.runTime_ = runTime_;
    -      if (machineConfigurationBuilder_ == null) {
    -        result.machineConfiguration_ = machineConfiguration_;
    -      } else {
    -        result.machineConfiguration_ = machineConfigurationBuilder_.build();
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.commitId_ = commitIdBuilder_ == null
    +            ? commitId_
    +            : commitIdBuilder_.build();
    +        to_bitField0_ |= 0x00000004;
           }
    -      if (runConfigurationBuilder_ == null) {
    -        result.runConfiguration_ = runConfiguration_;
    -      } else {
    -        result.runConfiguration_ = runConfigurationBuilder_.build();
    +      if (((from_bitField0_ & 0x00000010) != 0)) {
    +        result.startTime_ = startTime_;
           }
    -      result.name_ = name_;
    -      result.benchmarkType_ = benchmarkType_;
    -      result.runMode_ = runMode_;
    -      result.tfVersion_ = tfVersion_;
    -      onBuilt();
    -      return result;
    +      if (((from_bitField0_ & 0x00000020) != 0)) {
    +        result.runTime_ = runTime_;
    +      }
    +      if (((from_bitField0_ & 0x00000040) != 0)) {
    +        result.machineConfiguration_ = machineConfigurationBuilder_ == null
    +            ? machineConfiguration_
    +            : machineConfigurationBuilder_.build();
    +        to_bitField0_ |= 0x00000008;
    +      }
    +      if (((from_bitField0_ & 0x00000080) != 0)) {
    +        result.runConfiguration_ = runConfigurationBuilder_ == null
    +            ? runConfiguration_
    +            : runConfigurationBuilder_.build();
    +        to_bitField0_ |= 0x00000010;
    +      }
    +      if (((from_bitField0_ & 0x00000100) != 0)) {
    +        result.name_ = name_;
    +      }
    +      if (((from_bitField0_ & 0x00000200) != 0)) {
    +        result.benchmarkType_ = benchmarkType_;
    +      }
    +      if (((from_bitField0_ & 0x00000400) != 0)) {
    +        result.runMode_ = runMode_;
    +      }
    +      if (((from_bitField0_ & 0x00000800) != 0)) {
    +        result.tfVersion_ = tfVersion_;
    +      }
    +      result.bitField0_ |= to_bitField0_;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    -    }
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.TestResults) {
    @@ -1141,6 +1150,7 @@ public Builder mergeFrom(org.tensorflow.proto.TestResults other) {
           if (other == org.tensorflow.proto.TestResults.getDefaultInstance()) return this;
           if (!other.getTarget().isEmpty()) {
             target_ = other.target_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (other.hasEntries()) {
    @@ -1166,6 +1176,7 @@ public Builder mergeFrom(org.tensorflow.proto.TestResults other) {
           }
           if (!other.getName().isEmpty()) {
             name_ = other.name_;
    +        bitField0_ |= 0x00000100;
             onChanged();
           }
           if (other.benchmarkType_ != 0) {
    @@ -1173,10 +1184,12 @@ public Builder mergeFrom(org.tensorflow.proto.TestResults other) {
           }
           if (!other.getRunMode().isEmpty()) {
             runMode_ = other.runMode_;
    +        bitField0_ |= 0x00000400;
             onChanged();
           }
           if (!other.getTfVersion().isEmpty()) {
             tfVersion_ = other.tfVersion_;
    +        bitField0_ |= 0x00000800;
             onChanged();
           }
           this.mergeUnknownFields(other.getUnknownFields());
    @@ -1207,72 +1220,72 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   target_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
                   input.readMessage(
                       getEntriesFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 case 26: {
                   input.readMessage(
                       getBuildConfigurationFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 26
                 case 34: {
                   input.readMessage(
                       getCommitIdFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 34
                 case 40: {
                   startTime_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000010;
                   break;
                 } // case 40
                 case 49: {
                   runTime_ = input.readDouble();
    -
    +              bitField0_ |= 0x00000020;
                   break;
                 } // case 49
                 case 58: {
                   input.readMessage(
                       getMachineConfigurationFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000040;
                   break;
                 } // case 58
                 case 66: {
                   input.readMessage(
                       getRunConfigurationFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000080;
                   break;
                 } // case 66
                 case 74: {
                   name_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000100;
                   break;
                 } // case 74
                 case 80: {
                   benchmarkType_ = input.readEnum();
    -
    +              bitField0_ |= 0x00000200;
                   break;
                 } // case 80
                 case 90: {
                   runMode_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000400;
                   break;
                 } // case 90
                 case 98: {
                   tfVersion_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000800;
                   break;
                 } // case 98
                 default: {
    @@ -1290,12 +1303,13 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private java.lang.Object target_ = "";
         /**
          * 
          * The target of the run, e.g.:
    -     *  //tensorflow/core:kernels_adjust_contrast_op_benchmark_test
    +     * //tensorflow/core:kernels_adjust_contrast_op_benchmark_test
          * 
    * * string target = 1; @@ -1316,7 +1330,7 @@ public java.lang.String getTarget() { /** *
          * The target of the run, e.g.:
    -     *  //tensorflow/core:kernels_adjust_contrast_op_benchmark_test
    +     * //tensorflow/core:kernels_adjust_contrast_op_benchmark_test
          * 
    * * string target = 1; @@ -1338,7 +1352,7 @@ public java.lang.String getTarget() { /** *
          * The target of the run, e.g.:
    -     *  //tensorflow/core:kernels_adjust_contrast_op_benchmark_test
    +     * //tensorflow/core:kernels_adjust_contrast_op_benchmark_test
          * 
    * * string target = 1; @@ -1347,33 +1361,31 @@ public java.lang.String getTarget() { */ public Builder setTarget( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } target_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } /** *
          * The target of the run, e.g.:
    -     *  //tensorflow/core:kernels_adjust_contrast_op_benchmark_test
    +     * //tensorflow/core:kernels_adjust_contrast_op_benchmark_test
          * 
    * * string target = 1; * @return This builder for chaining. */ public Builder clearTarget() { - target_ = getDefaultInstance().getTarget(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
          * The target of the run, e.g.:
    -     *  //tensorflow/core:kernels_adjust_contrast_op_benchmark_test
    +     * //tensorflow/core:kernels_adjust_contrast_op_benchmark_test
          * 
    * * string target = 1; @@ -1382,18 +1394,16 @@ public Builder clearTarget() { */ public Builder setTargetBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); target_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } private org.tensorflow.proto.BenchmarkEntries entries_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.BenchmarkEntries, org.tensorflow.proto.BenchmarkEntries.Builder, org.tensorflow.proto.BenchmarkEntriesOrBuilder> entriesBuilder_; /** *
    @@ -1404,7 +1414,7 @@ public Builder setTargetBytes(
          * @return Whether the entries field is set.
          */
         public boolean hasEntries() {
    -      return entriesBuilder_ != null || entries_ != null;
    +      return ((bitField0_ & 0x00000002) != 0);
         }
         /**
          * 
    @@ -1434,11 +1444,11 @@ public Builder setEntries(org.tensorflow.proto.BenchmarkEntries value) {
               throw new NullPointerException();
             }
             entries_ = value;
    -        onChanged();
           } else {
             entriesBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return this;
         }
         /**
    @@ -1452,11 +1462,11 @@ public Builder setEntries(
             org.tensorflow.proto.BenchmarkEntries.Builder builderForValue) {
           if (entriesBuilder_ == null) {
             entries_ = builderForValue.build();
    -        onChanged();
           } else {
             entriesBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return this;
         }
         /**
    @@ -1468,17 +1478,20 @@ public Builder setEntries(
          */
         public Builder mergeEntries(org.tensorflow.proto.BenchmarkEntries value) {
           if (entriesBuilder_ == null) {
    -        if (entries_ != null) {
    -          entries_ =
    -            org.tensorflow.proto.BenchmarkEntries.newBuilder(entries_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000002) != 0) &&
    +          entries_ != null &&
    +          entries_ != org.tensorflow.proto.BenchmarkEntries.getDefaultInstance()) {
    +          getEntriesBuilder().mergeFrom(value);
             } else {
               entries_ = value;
             }
    -        onChanged();
           } else {
             entriesBuilder_.mergeFrom(value);
           }
    -
    +      if (entries_ != null) {
    +        bitField0_ |= 0x00000002;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -1489,14 +1502,13 @@ public Builder mergeEntries(org.tensorflow.proto.BenchmarkEntries value) {
          * .tensorflow.BenchmarkEntries entries = 2;
          */
         public Builder clearEntries() {
    -      if (entriesBuilder_ == null) {
    -        entries_ = null;
    -        onChanged();
    -      } else {
    -        entries_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000002);
    +      entries_ = null;
    +      if (entriesBuilder_ != null) {
    +        entriesBuilder_.dispose();
             entriesBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -1507,7 +1519,7 @@ public Builder clearEntries() {
          * .tensorflow.BenchmarkEntries entries = 2;
          */
         public org.tensorflow.proto.BenchmarkEntries.Builder getEntriesBuilder() {
    -      
    +      bitField0_ |= 0x00000002;
           onChanged();
           return getEntriesFieldBuilder().getBuilder();
         }
    @@ -1533,11 +1545,11 @@ public org.tensorflow.proto.BenchmarkEntriesOrBuilder getEntriesOrBuilder() {
          *
          * .tensorflow.BenchmarkEntries entries = 2;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.BenchmarkEntries, org.tensorflow.proto.BenchmarkEntries.Builder, org.tensorflow.proto.BenchmarkEntriesOrBuilder> 
             getEntriesFieldBuilder() {
           if (entriesBuilder_ == null) {
    -        entriesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        entriesBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.BenchmarkEntries, org.tensorflow.proto.BenchmarkEntries.Builder, org.tensorflow.proto.BenchmarkEntriesOrBuilder>(
                     getEntries(),
                     getParentForChildren(),
    @@ -1548,7 +1560,7 @@ public org.tensorflow.proto.BenchmarkEntriesOrBuilder getEntriesOrBuilder() {
         }
     
         private org.tensorflow.proto.BuildConfiguration buildConfiguration_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.BuildConfiguration, org.tensorflow.proto.BuildConfiguration.Builder, org.tensorflow.proto.BuildConfigurationOrBuilder> buildConfigurationBuilder_;
         /**
          * 
    @@ -1559,7 +1571,7 @@ public org.tensorflow.proto.BenchmarkEntriesOrBuilder getEntriesOrBuilder() {
          * @return Whether the buildConfiguration field is set.
          */
         public boolean hasBuildConfiguration() {
    -      return buildConfigurationBuilder_ != null || buildConfiguration_ != null;
    +      return ((bitField0_ & 0x00000004) != 0);
         }
         /**
          * 
    @@ -1589,11 +1601,11 @@ public Builder setBuildConfiguration(org.tensorflow.proto.BuildConfiguration val
               throw new NullPointerException();
             }
             buildConfiguration_ = value;
    -        onChanged();
           } else {
             buildConfigurationBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000004;
    +      onChanged();
           return this;
         }
         /**
    @@ -1607,11 +1619,11 @@ public Builder setBuildConfiguration(
             org.tensorflow.proto.BuildConfiguration.Builder builderForValue) {
           if (buildConfigurationBuilder_ == null) {
             buildConfiguration_ = builderForValue.build();
    -        onChanged();
           } else {
             buildConfigurationBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000004;
    +      onChanged();
           return this;
         }
         /**
    @@ -1623,17 +1635,20 @@ public Builder setBuildConfiguration(
          */
         public Builder mergeBuildConfiguration(org.tensorflow.proto.BuildConfiguration value) {
           if (buildConfigurationBuilder_ == null) {
    -        if (buildConfiguration_ != null) {
    -          buildConfiguration_ =
    -            org.tensorflow.proto.BuildConfiguration.newBuilder(buildConfiguration_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000004) != 0) &&
    +          buildConfiguration_ != null &&
    +          buildConfiguration_ != org.tensorflow.proto.BuildConfiguration.getDefaultInstance()) {
    +          getBuildConfigurationBuilder().mergeFrom(value);
             } else {
               buildConfiguration_ = value;
             }
    -        onChanged();
           } else {
             buildConfigurationBuilder_.mergeFrom(value);
           }
    -
    +      if (buildConfiguration_ != null) {
    +        bitField0_ |= 0x00000004;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -1644,14 +1659,13 @@ public Builder mergeBuildConfiguration(org.tensorflow.proto.BuildConfiguration v
          * .tensorflow.BuildConfiguration build_configuration = 3;
          */
         public Builder clearBuildConfiguration() {
    -      if (buildConfigurationBuilder_ == null) {
    -        buildConfiguration_ = null;
    -        onChanged();
    -      } else {
    -        buildConfiguration_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000004);
    +      buildConfiguration_ = null;
    +      if (buildConfigurationBuilder_ != null) {
    +        buildConfigurationBuilder_.dispose();
             buildConfigurationBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -1662,7 +1676,7 @@ public Builder clearBuildConfiguration() {
          * .tensorflow.BuildConfiguration build_configuration = 3;
          */
         public org.tensorflow.proto.BuildConfiguration.Builder getBuildConfigurationBuilder() {
    -      
    +      bitField0_ |= 0x00000004;
           onChanged();
           return getBuildConfigurationFieldBuilder().getBuilder();
         }
    @@ -1688,11 +1702,11 @@ public org.tensorflow.proto.BuildConfigurationOrBuilder getBuildConfigurationOrB
          *
          * .tensorflow.BuildConfiguration build_configuration = 3;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.BuildConfiguration, org.tensorflow.proto.BuildConfiguration.Builder, org.tensorflow.proto.BuildConfigurationOrBuilder> 
             getBuildConfigurationFieldBuilder() {
           if (buildConfigurationBuilder_ == null) {
    -        buildConfigurationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        buildConfigurationBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.BuildConfiguration, org.tensorflow.proto.BuildConfiguration.Builder, org.tensorflow.proto.BuildConfigurationOrBuilder>(
                     getBuildConfiguration(),
                     getParentForChildren(),
    @@ -1703,7 +1717,7 @@ public org.tensorflow.proto.BuildConfigurationOrBuilder getBuildConfigurationOrB
         }
     
         private org.tensorflow.proto.CommitId commitId_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.CommitId, org.tensorflow.proto.CommitId.Builder, org.tensorflow.proto.CommitIdOrBuilder> commitIdBuilder_;
         /**
          * 
    @@ -1714,7 +1728,7 @@ public org.tensorflow.proto.BuildConfigurationOrBuilder getBuildConfigurationOrB
          * @return Whether the commitId field is set.
          */
         public boolean hasCommitId() {
    -      return commitIdBuilder_ != null || commitId_ != null;
    +      return ((bitField0_ & 0x00000008) != 0);
         }
         /**
          * 
    @@ -1744,11 +1758,11 @@ public Builder setCommitId(org.tensorflow.proto.CommitId value) {
               throw new NullPointerException();
             }
             commitId_ = value;
    -        onChanged();
           } else {
             commitIdBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000008;
    +      onChanged();
           return this;
         }
         /**
    @@ -1762,11 +1776,11 @@ public Builder setCommitId(
             org.tensorflow.proto.CommitId.Builder builderForValue) {
           if (commitIdBuilder_ == null) {
             commitId_ = builderForValue.build();
    -        onChanged();
           } else {
             commitIdBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000008;
    +      onChanged();
           return this;
         }
         /**
    @@ -1778,17 +1792,20 @@ public Builder setCommitId(
          */
         public Builder mergeCommitId(org.tensorflow.proto.CommitId value) {
           if (commitIdBuilder_ == null) {
    -        if (commitId_ != null) {
    -          commitId_ =
    -            org.tensorflow.proto.CommitId.newBuilder(commitId_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000008) != 0) &&
    +          commitId_ != null &&
    +          commitId_ != org.tensorflow.proto.CommitId.getDefaultInstance()) {
    +          getCommitIdBuilder().mergeFrom(value);
             } else {
               commitId_ = value;
             }
    -        onChanged();
           } else {
             commitIdBuilder_.mergeFrom(value);
           }
    -
    +      if (commitId_ != null) {
    +        bitField0_ |= 0x00000008;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -1799,14 +1816,13 @@ public Builder mergeCommitId(org.tensorflow.proto.CommitId value) {
          * .tensorflow.CommitId commit_id = 4;
          */
         public Builder clearCommitId() {
    -      if (commitIdBuilder_ == null) {
    -        commitId_ = null;
    -        onChanged();
    -      } else {
    -        commitId_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000008);
    +      commitId_ = null;
    +      if (commitIdBuilder_ != null) {
    +        commitIdBuilder_.dispose();
             commitIdBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -1817,7 +1833,7 @@ public Builder clearCommitId() {
          * .tensorflow.CommitId commit_id = 4;
          */
         public org.tensorflow.proto.CommitId.Builder getCommitIdBuilder() {
    -      
    +      bitField0_ |= 0x00000008;
           onChanged();
           return getCommitIdFieldBuilder().getBuilder();
         }
    @@ -1843,11 +1859,11 @@ public org.tensorflow.proto.CommitIdOrBuilder getCommitIdOrBuilder() {
          *
          * .tensorflow.CommitId commit_id = 4;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.CommitId, org.tensorflow.proto.CommitId.Builder, org.tensorflow.proto.CommitIdOrBuilder> 
             getCommitIdFieldBuilder() {
           if (commitIdBuilder_ == null) {
    -        commitIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        commitIdBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.CommitId, org.tensorflow.proto.CommitId.Builder, org.tensorflow.proto.CommitIdOrBuilder>(
                     getCommitId(),
                     getParentForChildren(),
    @@ -1880,8 +1896,9 @@ public long getStartTime() {
          * @return This builder for chaining.
          */
         public Builder setStartTime(long value) {
    -      
    +
           startTime_ = value;
    +      bitField0_ |= 0x00000010;
           onChanged();
           return this;
         }
    @@ -1894,7 +1911,7 @@ public Builder setStartTime(long value) {
          * @return This builder for chaining.
          */
         public Builder clearStartTime() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000010);
           startTime_ = 0L;
           onChanged();
           return this;
    @@ -1923,8 +1940,9 @@ public double getRunTime() {
          * @return This builder for chaining.
          */
         public Builder setRunTime(double value) {
    -      
    +
           runTime_ = value;
    +      bitField0_ |= 0x00000020;
           onChanged();
           return this;
         }
    @@ -1937,14 +1955,14 @@ public Builder setRunTime(double value) {
          * @return This builder for chaining.
          */
         public Builder clearRunTime() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000020);
           runTime_ = 0D;
           onChanged();
           return this;
         }
     
         private org.tensorflow.proto.MachineConfiguration machineConfiguration_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.MachineConfiguration, org.tensorflow.proto.MachineConfiguration.Builder, org.tensorflow.proto.MachineConfigurationOrBuilder> machineConfigurationBuilder_;
         /**
          * 
    @@ -1955,7 +1973,7 @@ public Builder clearRunTime() {
          * @return Whether the machineConfiguration field is set.
          */
         public boolean hasMachineConfiguration() {
    -      return machineConfigurationBuilder_ != null || machineConfiguration_ != null;
    +      return ((bitField0_ & 0x00000040) != 0);
         }
         /**
          * 
    @@ -1985,11 +2003,11 @@ public Builder setMachineConfiguration(org.tensorflow.proto.MachineConfiguration
               throw new NullPointerException();
             }
             machineConfiguration_ = value;
    -        onChanged();
           } else {
             machineConfigurationBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000040;
    +      onChanged();
           return this;
         }
         /**
    @@ -2003,11 +2021,11 @@ public Builder setMachineConfiguration(
             org.tensorflow.proto.MachineConfiguration.Builder builderForValue) {
           if (machineConfigurationBuilder_ == null) {
             machineConfiguration_ = builderForValue.build();
    -        onChanged();
           } else {
             machineConfigurationBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000040;
    +      onChanged();
           return this;
         }
         /**
    @@ -2019,17 +2037,20 @@ public Builder setMachineConfiguration(
          */
         public Builder mergeMachineConfiguration(org.tensorflow.proto.MachineConfiguration value) {
           if (machineConfigurationBuilder_ == null) {
    -        if (machineConfiguration_ != null) {
    -          machineConfiguration_ =
    -            org.tensorflow.proto.MachineConfiguration.newBuilder(machineConfiguration_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000040) != 0) &&
    +          machineConfiguration_ != null &&
    +          machineConfiguration_ != org.tensorflow.proto.MachineConfiguration.getDefaultInstance()) {
    +          getMachineConfigurationBuilder().mergeFrom(value);
             } else {
               machineConfiguration_ = value;
             }
    -        onChanged();
           } else {
             machineConfigurationBuilder_.mergeFrom(value);
           }
    -
    +      if (machineConfiguration_ != null) {
    +        bitField0_ |= 0x00000040;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -2040,14 +2061,13 @@ public Builder mergeMachineConfiguration(org.tensorflow.proto.MachineConfigurati
          * .tensorflow.MachineConfiguration machine_configuration = 7;
          */
         public Builder clearMachineConfiguration() {
    -      if (machineConfigurationBuilder_ == null) {
    -        machineConfiguration_ = null;
    -        onChanged();
    -      } else {
    -        machineConfiguration_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000040);
    +      machineConfiguration_ = null;
    +      if (machineConfigurationBuilder_ != null) {
    +        machineConfigurationBuilder_.dispose();
             machineConfigurationBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -2058,7 +2078,7 @@ public Builder clearMachineConfiguration() {
          * .tensorflow.MachineConfiguration machine_configuration = 7;
          */
         public org.tensorflow.proto.MachineConfiguration.Builder getMachineConfigurationBuilder() {
    -      
    +      bitField0_ |= 0x00000040;
           onChanged();
           return getMachineConfigurationFieldBuilder().getBuilder();
         }
    @@ -2084,11 +2104,11 @@ public org.tensorflow.proto.MachineConfigurationOrBuilder getMachineConfiguratio
          *
          * .tensorflow.MachineConfiguration machine_configuration = 7;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.MachineConfiguration, org.tensorflow.proto.MachineConfiguration.Builder, org.tensorflow.proto.MachineConfigurationOrBuilder> 
             getMachineConfigurationFieldBuilder() {
           if (machineConfigurationBuilder_ == null) {
    -        machineConfigurationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        machineConfigurationBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.MachineConfiguration, org.tensorflow.proto.MachineConfiguration.Builder, org.tensorflow.proto.MachineConfigurationOrBuilder>(
                     getMachineConfiguration(),
                     getParentForChildren(),
    @@ -2099,7 +2119,7 @@ public org.tensorflow.proto.MachineConfigurationOrBuilder getMachineConfiguratio
         }
     
         private org.tensorflow.proto.RunConfiguration runConfiguration_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.RunConfiguration, org.tensorflow.proto.RunConfiguration.Builder, org.tensorflow.proto.RunConfigurationOrBuilder> runConfigurationBuilder_;
         /**
          * 
    @@ -2110,7 +2130,7 @@ public org.tensorflow.proto.MachineConfigurationOrBuilder getMachineConfiguratio
          * @return Whether the runConfiguration field is set.
          */
         public boolean hasRunConfiguration() {
    -      return runConfigurationBuilder_ != null || runConfiguration_ != null;
    +      return ((bitField0_ & 0x00000080) != 0);
         }
         /**
          * 
    @@ -2140,11 +2160,11 @@ public Builder setRunConfiguration(org.tensorflow.proto.RunConfiguration value)
               throw new NullPointerException();
             }
             runConfiguration_ = value;
    -        onChanged();
           } else {
             runConfigurationBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000080;
    +      onChanged();
           return this;
         }
         /**
    @@ -2158,11 +2178,11 @@ public Builder setRunConfiguration(
             org.tensorflow.proto.RunConfiguration.Builder builderForValue) {
           if (runConfigurationBuilder_ == null) {
             runConfiguration_ = builderForValue.build();
    -        onChanged();
           } else {
             runConfigurationBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000080;
    +      onChanged();
           return this;
         }
         /**
    @@ -2174,17 +2194,20 @@ public Builder setRunConfiguration(
          */
         public Builder mergeRunConfiguration(org.tensorflow.proto.RunConfiguration value) {
           if (runConfigurationBuilder_ == null) {
    -        if (runConfiguration_ != null) {
    -          runConfiguration_ =
    -            org.tensorflow.proto.RunConfiguration.newBuilder(runConfiguration_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000080) != 0) &&
    +          runConfiguration_ != null &&
    +          runConfiguration_ != org.tensorflow.proto.RunConfiguration.getDefaultInstance()) {
    +          getRunConfigurationBuilder().mergeFrom(value);
             } else {
               runConfiguration_ = value;
             }
    -        onChanged();
           } else {
             runConfigurationBuilder_.mergeFrom(value);
           }
    -
    +      if (runConfiguration_ != null) {
    +        bitField0_ |= 0x00000080;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -2195,14 +2218,13 @@ public Builder mergeRunConfiguration(org.tensorflow.proto.RunConfiguration value
          * .tensorflow.RunConfiguration run_configuration = 8;
          */
         public Builder clearRunConfiguration() {
    -      if (runConfigurationBuilder_ == null) {
    -        runConfiguration_ = null;
    -        onChanged();
    -      } else {
    -        runConfiguration_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000080);
    +      runConfiguration_ = null;
    +      if (runConfigurationBuilder_ != null) {
    +        runConfigurationBuilder_.dispose();
             runConfigurationBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -2213,7 +2235,7 @@ public Builder clearRunConfiguration() {
          * .tensorflow.RunConfiguration run_configuration = 8;
          */
         public org.tensorflow.proto.RunConfiguration.Builder getRunConfigurationBuilder() {
    -      
    +      bitField0_ |= 0x00000080;
           onChanged();
           return getRunConfigurationFieldBuilder().getBuilder();
         }
    @@ -2239,11 +2261,11 @@ public org.tensorflow.proto.RunConfigurationOrBuilder getRunConfigurationOrBuild
          *
          * .tensorflow.RunConfiguration run_configuration = 8;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.RunConfiguration, org.tensorflow.proto.RunConfiguration.Builder, org.tensorflow.proto.RunConfigurationOrBuilder> 
             getRunConfigurationFieldBuilder() {
           if (runConfigurationBuilder_ == null) {
    -        runConfigurationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        runConfigurationBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.RunConfiguration, org.tensorflow.proto.RunConfiguration.Builder, org.tensorflow.proto.RunConfigurationOrBuilder>(
                     getRunConfiguration(),
                     getParentForChildren(),
    @@ -2306,11 +2328,9 @@ public java.lang.String getName() {
          */
         public Builder setName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           name_ = value;
    +      bitField0_ |= 0x00000100;
           onChanged();
           return this;
         }
    @@ -2323,8 +2343,8 @@ public Builder setName(
          * @return This builder for chaining.
          */
         public Builder clearName() {
    -      
           name_ = getDefaultInstance().getName();
    +      bitField0_ = (bitField0_ & ~0x00000100);
           onChanged();
           return this;
         }
    @@ -2339,12 +2359,10 @@ public Builder clearName() {
          */
         public Builder setNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           name_ = value;
    +      bitField0_ |= 0x00000100;
           onChanged();
           return this;
         }
    @@ -2363,8 +2381,8 @@ public Builder setNameBytes(
          * @return This builder for chaining.
          */
         public Builder setBenchmarkTypeValue(int value) {
    -      
           benchmarkType_ = value;
    +      bitField0_ |= 0x00000200;
           onChanged();
           return this;
         }
    @@ -2374,8 +2392,7 @@ public Builder setBenchmarkTypeValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.TestResults.BenchmarkType getBenchmarkType() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.TestResults.BenchmarkType result = org.tensorflow.proto.TestResults.BenchmarkType.valueOf(benchmarkType_);
    +      org.tensorflow.proto.TestResults.BenchmarkType result = org.tensorflow.proto.TestResults.BenchmarkType.forNumber(benchmarkType_);
           return result == null ? org.tensorflow.proto.TestResults.BenchmarkType.UNRECOGNIZED : result;
         }
         /**
    @@ -2387,7 +2404,7 @@ public Builder setBenchmarkType(org.tensorflow.proto.TestResults.BenchmarkType v
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00000200;
           benchmarkType_ = value.getNumber();
           onChanged();
           return this;
    @@ -2397,7 +2414,7 @@ public Builder setBenchmarkType(org.tensorflow.proto.TestResults.BenchmarkType v
          * @return This builder for chaining.
          */
         public Builder clearBenchmarkType() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000200);
           benchmarkType_ = 0;
           onChanged();
           return this;
    @@ -2468,11 +2485,9 @@ public java.lang.String getRunMode() {
          */
         public Builder setRunMode(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           runMode_ = value;
    +      bitField0_ |= 0x00000400;
           onChanged();
           return this;
         }
    @@ -2489,8 +2504,8 @@ public Builder setRunMode(
          * @return This builder for chaining.
          */
         public Builder clearRunMode() {
    -      
           runMode_ = getDefaultInstance().getRunMode();
    +      bitField0_ = (bitField0_ & ~0x00000400);
           onChanged();
           return this;
         }
    @@ -2509,12 +2524,10 @@ public Builder clearRunMode() {
          */
         public Builder setRunModeBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           runMode_ = value;
    +      bitField0_ |= 0x00000400;
           onChanged();
           return this;
         }
    @@ -2575,11 +2588,9 @@ public java.lang.String getTfVersion() {
          */
         public Builder setTfVersion(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           tfVersion_ = value;
    +      bitField0_ |= 0x00000800;
           onChanged();
           return this;
         }
    @@ -2593,8 +2604,8 @@ public Builder setTfVersion(
          * @return This builder for chaining.
          */
         public Builder clearTfVersion() {
    -      
           tfVersion_ = getDefaultInstance().getTfVersion();
    +      bitField0_ = (bitField0_ & ~0x00000800);
           onChanged();
           return this;
         }
    @@ -2610,27 +2621,13 @@ public Builder clearTfVersion() {
          */
         public Builder setTfVersionBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           tfVersion_ = value;
    +      bitField0_ |= 0x00000800;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.TestResults)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TestResultsOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TestResultsOrBuilder.java
    index 1d6f1545988..ec051f94716 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TestResultsOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TestResultsOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: xla/tsl/protobuf/test_log.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -10,7 +12,7 @@ public interface TestResultsOrBuilder extends
       /**
        * 
        * The target of the run, e.g.:
    -   *  //tensorflow/core:kernels_adjust_contrast_op_benchmark_test
    +   * //tensorflow/core:kernels_adjust_contrast_op_benchmark_test
        * 
    * * string target = 1; @@ -20,7 +22,7 @@ public interface TestResultsOrBuilder extends /** *
        * The target of the run, e.g.:
    -   *  //tensorflow/core:kernels_adjust_contrast_op_benchmark_test
    +   * //tensorflow/core:kernels_adjust_contrast_op_benchmark_test
        * 
    * * string target = 1; diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ThreadPoolOptionProto.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ThreadPoolOptionProto.java index c9f888e9706..b5618ce9bed 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ThreadPoolOptionProto.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ThreadPoolOptionProto.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/protobuf/config.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -7,37 +9,34 @@ * Protobuf type {@code tensorflow.ThreadPoolOptionProto} */ public final class ThreadPoolOptionProto extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.ThreadPoolOptionProto) ThreadPoolOptionProtoOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + ThreadPoolOptionProto.class.getName()); + } // Use ThreadPoolOptionProto.newBuilder() to construct. - private ThreadPoolOptionProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ThreadPoolOptionProto(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private ThreadPoolOptionProto() { globalName_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ThreadPoolOptionProto(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_ThreadPoolOptionProto_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_ThreadPoolOptionProto_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -45,10 +44,11 @@ protected java.lang.Object newInstance( } public static final int NUM_THREADS_FIELD_NUMBER = 1; - private int numThreads_; + private int numThreads_ = 0; /** *
        * The number of threads in the pool.
    +   *
        * 0 means the system picks a value based on where this option proto is used
        * (see the declaration of the specific field for more info).
        * 
    @@ -62,21 +62,24 @@ public int getNumThreads() { } public static final int GLOBAL_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object globalName_; + @SuppressWarnings("serial") + private volatile java.lang.Object globalName_ = ""; /** *
        * The global name of the threadpool.
    +   *
        * If empty, then the threadpool is made and used according to the scope it's
        * in - e.g., for a session threadpool, it is used by that session only.
    +   *
        * If non-empty, then:
        * - a global threadpool associated with this name is looked
    -   *   up or created. This allows, for example, sharing one threadpool across
    -   *   many sessions (e.g., like the default behavior, if
    -   *   inter_op_parallelism_threads is not configured), but still partitioning
    -   *   into a large and small pool.
    +   * up or created. This allows, for example, sharing one threadpool across
    +   * many sessions (e.g., like the default behavior, if
    +   * inter_op_parallelism_threads is not configured), but still partitioning
    +   * into a large and small pool.
        * - if the threadpool for this global_name already exists, then it is an
    -   *   error if the existing pool was created using a different num_threads
    -   *   value as is specified on this call.
    +   * error if the existing pool was created using a different num_threads
    +   * value as is specified on this call.
        * - threadpools created this way are never garbage collected.
        * 
    * @@ -99,17 +102,19 @@ public java.lang.String getGlobalName() { /** *
        * The global name of the threadpool.
    +   *
        * If empty, then the threadpool is made and used according to the scope it's
        * in - e.g., for a session threadpool, it is used by that session only.
    +   *
        * If non-empty, then:
        * - a global threadpool associated with this name is looked
    -   *   up or created. This allows, for example, sharing one threadpool across
    -   *   many sessions (e.g., like the default behavior, if
    -   *   inter_op_parallelism_threads is not configured), but still partitioning
    -   *   into a large and small pool.
    +   * up or created. This allows, for example, sharing one threadpool across
    +   * many sessions (e.g., like the default behavior, if
    +   * inter_op_parallelism_threads is not configured), but still partitioning
    +   * into a large and small pool.
        * - if the threadpool for this global_name already exists, then it is an
    -   *   error if the existing pool was created using a different num_threads
    -   *   value as is specified on this call.
    +   * error if the existing pool was created using a different num_threads
    +   * value as is specified on this call.
        * - threadpools created this way are never garbage collected.
        * 
    * @@ -148,8 +153,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (numThreads_ != 0) { output.writeInt32(1, numThreads_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(globalName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, globalName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(globalName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, globalName_); } getUnknownFields().writeTo(output); } @@ -164,8 +169,8 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeInt32Size(1, numThreads_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(globalName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, globalName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(globalName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, globalName_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -240,39 +245,41 @@ public static org.tensorflow.proto.ThreadPoolOptionProto parseFrom( } public static org.tensorflow.proto.ThreadPoolOptionProto parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.ThreadPoolOptionProto parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.ThreadPoolOptionProto parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.ThreadPoolOptionProto parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.ThreadPoolOptionProto parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.ThreadPoolOptionProto parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -292,7 +299,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -300,7 +307,7 @@ protected Builder newBuilderForType( * Protobuf type {@code tensorflow.ThreadPoolOptionProto} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.ThreadPoolOptionProto) org.tensorflow.proto.ThreadPoolOptionProtoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -309,7 +316,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.ConfigProtos.internal_static_tensorflow_ThreadPoolOptionProto_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -322,17 +329,16 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; numThreads_ = 0; - globalName_ = ""; - return this; } @@ -359,44 +365,21 @@ public org.tensorflow.proto.ThreadPoolOptionProto build() { @java.lang.Override public org.tensorflow.proto.ThreadPoolOptionProto buildPartial() { org.tensorflow.proto.ThreadPoolOptionProto result = new org.tensorflow.proto.ThreadPoolOptionProto(this); - result.numThreads_ = numThreads_; - result.globalName_ = globalName_; + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.ThreadPoolOptionProto result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.numThreads_ = numThreads_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.globalName_ = globalName_; + } } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.ThreadPoolOptionProto) { @@ -414,6 +397,7 @@ public Builder mergeFrom(org.tensorflow.proto.ThreadPoolOptionProto other) { } if (!other.getGlobalName().isEmpty()) { globalName_ = other.globalName_; + bitField0_ |= 0x00000002; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); @@ -444,12 +428,12 @@ public Builder mergeFrom( break; case 8: { numThreads_ = input.readInt32(); - + bitField0_ |= 0x00000001; break; } // case 8 case 18: { globalName_ = input.readStringRequireUtf8(); - + bitField0_ |= 0x00000002; break; } // case 18 default: { @@ -467,11 +451,13 @@ public Builder mergeFrom( } // finally return this; } + private int bitField0_; private int numThreads_ ; /** *
          * The number of threads in the pool.
    +     *
          * 0 means the system picks a value based on where this option proto is used
          * (see the declaration of the specific field for more info).
          * 
    @@ -486,6 +472,7 @@ public int getNumThreads() { /** *
          * The number of threads in the pool.
    +     *
          * 0 means the system picks a value based on where this option proto is used
          * (see the declaration of the specific field for more info).
          * 
    @@ -495,14 +482,16 @@ public int getNumThreads() { * @return This builder for chaining. */ public Builder setNumThreads(int value) { - + numThreads_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } /** *
          * The number of threads in the pool.
    +     *
          * 0 means the system picks a value based on where this option proto is used
          * (see the declaration of the specific field for more info).
          * 
    @@ -511,7 +500,7 @@ public Builder setNumThreads(int value) { * @return This builder for chaining. */ public Builder clearNumThreads() { - + bitField0_ = (bitField0_ & ~0x00000001); numThreads_ = 0; onChanged(); return this; @@ -521,17 +510,19 @@ public Builder clearNumThreads() { /** *
          * The global name of the threadpool.
    +     *
          * If empty, then the threadpool is made and used according to the scope it's
          * in - e.g., for a session threadpool, it is used by that session only.
    +     *
          * If non-empty, then:
          * - a global threadpool associated with this name is looked
    -     *   up or created. This allows, for example, sharing one threadpool across
    -     *   many sessions (e.g., like the default behavior, if
    -     *   inter_op_parallelism_threads is not configured), but still partitioning
    -     *   into a large and small pool.
    +     * up or created. This allows, for example, sharing one threadpool across
    +     * many sessions (e.g., like the default behavior, if
    +     * inter_op_parallelism_threads is not configured), but still partitioning
    +     * into a large and small pool.
          * - if the threadpool for this global_name already exists, then it is an
    -     *   error if the existing pool was created using a different num_threads
    -     *   value as is specified on this call.
    +     * error if the existing pool was created using a different num_threads
    +     * value as is specified on this call.
          * - threadpools created this way are never garbage collected.
          * 
    * @@ -553,17 +544,19 @@ public java.lang.String getGlobalName() { /** *
          * The global name of the threadpool.
    +     *
          * If empty, then the threadpool is made and used according to the scope it's
          * in - e.g., for a session threadpool, it is used by that session only.
    +     *
          * If non-empty, then:
          * - a global threadpool associated with this name is looked
    -     *   up or created. This allows, for example, sharing one threadpool across
    -     *   many sessions (e.g., like the default behavior, if
    -     *   inter_op_parallelism_threads is not configured), but still partitioning
    -     *   into a large and small pool.
    +     * up or created. This allows, for example, sharing one threadpool across
    +     * many sessions (e.g., like the default behavior, if
    +     * inter_op_parallelism_threads is not configured), but still partitioning
    +     * into a large and small pool.
          * - if the threadpool for this global_name already exists, then it is an
    -     *   error if the existing pool was created using a different num_threads
    -     *   value as is specified on this call.
    +     * error if the existing pool was created using a different num_threads
    +     * value as is specified on this call.
          * - threadpools created this way are never garbage collected.
          * 
    * @@ -586,17 +579,19 @@ public java.lang.String getGlobalName() { /** *
          * The global name of the threadpool.
    +     *
          * If empty, then the threadpool is made and used according to the scope it's
          * in - e.g., for a session threadpool, it is used by that session only.
    +     *
          * If non-empty, then:
          * - a global threadpool associated with this name is looked
    -     *   up or created. This allows, for example, sharing one threadpool across
    -     *   many sessions (e.g., like the default behavior, if
    -     *   inter_op_parallelism_threads is not configured), but still partitioning
    -     *   into a large and small pool.
    +     * up or created. This allows, for example, sharing one threadpool across
    +     * many sessions (e.g., like the default behavior, if
    +     * inter_op_parallelism_threads is not configured), but still partitioning
    +     * into a large and small pool.
          * - if the threadpool for this global_name already exists, then it is an
    -     *   error if the existing pool was created using a different num_threads
    -     *   value as is specified on this call.
    +     * error if the existing pool was created using a different num_threads
    +     * value as is specified on this call.
          * - threadpools created this way are never garbage collected.
          * 
    * @@ -606,28 +601,28 @@ public java.lang.String getGlobalName() { */ public Builder setGlobalName( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } globalName_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } /** *
          * The global name of the threadpool.
    +     *
          * If empty, then the threadpool is made and used according to the scope it's
          * in - e.g., for a session threadpool, it is used by that session only.
    +     *
          * If non-empty, then:
          * - a global threadpool associated with this name is looked
    -     *   up or created. This allows, for example, sharing one threadpool across
    -     *   many sessions (e.g., like the default behavior, if
    -     *   inter_op_parallelism_threads is not configured), but still partitioning
    -     *   into a large and small pool.
    +     * up or created. This allows, for example, sharing one threadpool across
    +     * many sessions (e.g., like the default behavior, if
    +     * inter_op_parallelism_threads is not configured), but still partitioning
    +     * into a large and small pool.
          * - if the threadpool for this global_name already exists, then it is an
    -     *   error if the existing pool was created using a different num_threads
    -     *   value as is specified on this call.
    +     * error if the existing pool was created using a different num_threads
    +     * value as is specified on this call.
          * - threadpools created this way are never garbage collected.
          * 
    * @@ -635,25 +630,27 @@ public Builder setGlobalName( * @return This builder for chaining. */ public Builder clearGlobalName() { - globalName_ = getDefaultInstance().getGlobalName(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** *
          * The global name of the threadpool.
    +     *
          * If empty, then the threadpool is made and used according to the scope it's
          * in - e.g., for a session threadpool, it is used by that session only.
    +     *
          * If non-empty, then:
          * - a global threadpool associated with this name is looked
    -     *   up or created. This allows, for example, sharing one threadpool across
    -     *   many sessions (e.g., like the default behavior, if
    -     *   inter_op_parallelism_threads is not configured), but still partitioning
    -     *   into a large and small pool.
    +     * up or created. This allows, for example, sharing one threadpool across
    +     * many sessions (e.g., like the default behavior, if
    +     * inter_op_parallelism_threads is not configured), but still partitioning
    +     * into a large and small pool.
          * - if the threadpool for this global_name already exists, then it is an
    -     *   error if the existing pool was created using a different num_threads
    -     *   value as is specified on this call.
    +     * error if the existing pool was created using a different num_threads
    +     * value as is specified on this call.
          * - threadpools created this way are never garbage collected.
          * 
    * @@ -663,27 +660,13 @@ public Builder clearGlobalName() { */ public Builder setGlobalNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); globalName_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.ThreadPoolOptionProto) } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ThreadPoolOptionProtoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ThreadPoolOptionProtoOrBuilder.java index 7d1e168a64f..293e6914f9f 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ThreadPoolOptionProtoOrBuilder.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ThreadPoolOptionProtoOrBuilder.java @@ -1,5 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/protobuf/config.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; @@ -10,6 +12,7 @@ public interface ThreadPoolOptionProtoOrBuilder extends /** *
        * The number of threads in the pool.
    +   *
        * 0 means the system picks a value based on where this option proto is used
        * (see the declaration of the specific field for more info).
        * 
    @@ -22,17 +25,19 @@ public interface ThreadPoolOptionProtoOrBuilder extends /** *
        * The global name of the threadpool.
    +   *
        * If empty, then the threadpool is made and used according to the scope it's
        * in - e.g., for a session threadpool, it is used by that session only.
    +   *
        * If non-empty, then:
        * - a global threadpool associated with this name is looked
    -   *   up or created. This allows, for example, sharing one threadpool across
    -   *   many sessions (e.g., like the default behavior, if
    -   *   inter_op_parallelism_threads is not configured), but still partitioning
    -   *   into a large and small pool.
    +   * up or created. This allows, for example, sharing one threadpool across
    +   * many sessions (e.g., like the default behavior, if
    +   * inter_op_parallelism_threads is not configured), but still partitioning
    +   * into a large and small pool.
        * - if the threadpool for this global_name already exists, then it is an
    -   *   error if the existing pool was created using a different num_threads
    -   *   value as is specified on this call.
    +   * error if the existing pool was created using a different num_threads
    +   * value as is specified on this call.
        * - threadpools created this way are never garbage collected.
        * 
    * @@ -43,17 +48,19 @@ public interface ThreadPoolOptionProtoOrBuilder extends /** *
        * The global name of the threadpool.
    +   *
        * If empty, then the threadpool is made and used according to the scope it's
        * in - e.g., for a session threadpool, it is used by that session only.
    +   *
        * If non-empty, then:
        * - a global threadpool associated with this name is looked
    -   *   up or created. This allows, for example, sharing one threadpool across
    -   *   many sessions (e.g., like the default behavior, if
    -   *   inter_op_parallelism_threads is not configured), but still partitioning
    -   *   into a large and small pool.
    +   * up or created. This allows, for example, sharing one threadpool across
    +   * many sessions (e.g., like the default behavior, if
    +   * inter_op_parallelism_threads is not configured), but still partitioning
    +   * into a large and small pool.
        * - if the threadpool for this global_name already exists, then it is an
    -   *   error if the existing pool was created using a different num_threads
    -   *   value as is specified on this call.
    +   * error if the existing pool was created using a different num_threads
    +   * value as is specified on this call.
        * - threadpools created this way are never garbage collected.
        * 
    * diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TrackableObjectGraphOuterClass.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TrackableObjectGraphOuterClass.java index ecc07ac2de0..4ab6b3965d8 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TrackableObjectGraphOuterClass.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TrackableObjectGraphOuterClass.java @@ -1,10 +1,21 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/protobuf/trackable_object_graph.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto; public final class TrackableObjectGraphOuterClass { private TrackableObjectGraphOuterClass() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + TrackableObjectGraphOuterClass.class.getName()); + } public static void registerAllExtensions( com.google.protobuf.ExtensionRegistryLite registry) { } @@ -46,37 +57,34 @@ org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.Trackab * Protobuf type {@code tensorflow.TrackableObjectGraph} */ public static final class TrackableObjectGraph extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.TrackableObjectGraph) TrackableObjectGraphOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + TrackableObjectGraph.class.getName()); + } // Use TrackableObjectGraph.newBuilder() to construct. - private TrackableObjectGraph(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private TrackableObjectGraph(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private TrackableObjectGraph() { nodes_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TrackableObjectGraph(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.TrackableObjectGraphOuterClass.internal_static_tensorflow_TrackableObjectGraph_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.TrackableObjectGraphOuterClass.internal_static_tensorflow_TrackableObjectGraph_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -289,12 +297,21 @@ org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.Trackab * Protobuf type {@code tensorflow.TrackableObjectGraph.TrackableObject} */ public static final class TrackableObject extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.TrackableObjectGraph.TrackableObject) TrackableObjectOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + TrackableObject.class.getName()); + } // Use TrackableObject.newBuilder() to construct. - private TrackableObject(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private TrackableObject(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private TrackableObject() { @@ -303,25 +320,13 @@ private TrackableObject() { slotVariables_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TrackableObject(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.TrackableObjectGraphOuterClass.internal_static_tensorflow_TrackableObjectGraph_TrackableObject_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.TrackableObjectGraphOuterClass.internal_static_tensorflow_TrackableObjectGraph_TrackableObject_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -367,37 +372,34 @@ public interface ObjectReferenceOrBuilder extends * Protobuf type {@code tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference} */ public static final class ObjectReference extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference) ObjectReferenceOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + ObjectReference.class.getName()); + } // Use ObjectReference.newBuilder() to construct. - private ObjectReference(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ObjectReference(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private ObjectReference() { localName_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ObjectReference(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.TrackableObjectGraphOuterClass.internal_static_tensorflow_TrackableObjectGraph_TrackableObject_ObjectReference_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.TrackableObjectGraphOuterClass.internal_static_tensorflow_TrackableObjectGraph_TrackableObject_ObjectReference_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -405,7 +407,7 @@ protected java.lang.Object newInstance( } public static final int NODE_ID_FIELD_NUMBER = 1; - private int nodeId_; + private int nodeId_ = 0; /** *
              * An index into `TrackableObjectGraph.nodes`, indicating the object
    @@ -421,7 +423,8 @@ public int getNodeId() {
             }
     
             public static final int LOCAL_NAME_FIELD_NUMBER = 2;
    -        private volatile java.lang.Object localName_;
    +        @SuppressWarnings("serial")
    +        private volatile java.lang.Object localName_ = "";
             /**
              * 
              * A user-provided name for the edge.
    @@ -483,8 +486,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
               if (nodeId_ != 0) {
                 output.writeInt32(1, nodeId_);
               }
    -          if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(localName_)) {
    -            com.google.protobuf.GeneratedMessageV3.writeString(output, 2, localName_);
    +          if (!com.google.protobuf.GeneratedMessage.isStringEmpty(localName_)) {
    +            com.google.protobuf.GeneratedMessage.writeString(output, 2, localName_);
               }
               getUnknownFields().writeTo(output);
             }
    @@ -499,8 +502,8 @@ public int getSerializedSize() {
                 size += com.google.protobuf.CodedOutputStream
                   .computeInt32Size(1, nodeId_);
               }
    -          if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(localName_)) {
    -            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, localName_);
    +          if (!com.google.protobuf.GeneratedMessage.isStringEmpty(localName_)) {
    +            size += com.google.protobuf.GeneratedMessage.computeStringSize(2, localName_);
               }
               size += getUnknownFields().getSerializedSize();
               memoizedSize = size;
    @@ -575,39 +578,41 @@ public static org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjec
             }
             public static org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference parseFrom(java.io.InputStream input)
                 throws java.io.IOException {
    -          return com.google.protobuf.GeneratedMessageV3
    +          return com.google.protobuf.GeneratedMessage
                   .parseWithIOException(PARSER, input);
             }
             public static org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference parseFrom(
                 java.io.InputStream input,
                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                 throws java.io.IOException {
    -          return com.google.protobuf.GeneratedMessageV3
    +          return com.google.protobuf.GeneratedMessage
                   .parseWithIOException(PARSER, input, extensionRegistry);
             }
    +
             public static org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference parseDelimitedFrom(java.io.InputStream input)
                 throws java.io.IOException {
    -          return com.google.protobuf.GeneratedMessageV3
    +          return com.google.protobuf.GeneratedMessage
                   .parseDelimitedWithIOException(PARSER, input);
             }
    +
             public static org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference parseDelimitedFrom(
                 java.io.InputStream input,
                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                 throws java.io.IOException {
    -          return com.google.protobuf.GeneratedMessageV3
    +          return com.google.protobuf.GeneratedMessage
                   .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
             }
             public static org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference parseFrom(
                 com.google.protobuf.CodedInputStream input)
                 throws java.io.IOException {
    -          return com.google.protobuf.GeneratedMessageV3
    +          return com.google.protobuf.GeneratedMessage
                   .parseWithIOException(PARSER, input);
             }
             public static org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference parseFrom(
                 com.google.protobuf.CodedInputStream input,
                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                 throws java.io.IOException {
    -          return com.google.protobuf.GeneratedMessageV3
    +          return com.google.protobuf.GeneratedMessage
                   .parseWithIOException(PARSER, input, extensionRegistry);
             }
     
    @@ -627,7 +632,7 @@ public Builder toBuilder() {
     
             @java.lang.Override
             protected Builder newBuilderForType(
    -            com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +            com.google.protobuf.GeneratedMessage.BuilderParent parent) {
               Builder builder = new Builder(parent);
               return builder;
             }
    @@ -635,7 +640,7 @@ protected Builder newBuilderForType(
              * Protobuf type {@code tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference}
              */
             public static final class Builder extends
    -            com.google.protobuf.GeneratedMessageV3.Builder implements
    +            com.google.protobuf.GeneratedMessage.Builder implements
                 // @@protoc_insertion_point(builder_implements:tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference)
                 org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReferenceOrBuilder {
               public static final com.google.protobuf.Descriptors.Descriptor
    @@ -644,7 +649,7 @@ public static final class Builder extends
               }
     
               @java.lang.Override
    -          protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +          protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
                   internalGetFieldAccessorTable() {
                 return org.tensorflow.proto.TrackableObjectGraphOuterClass.internal_static_tensorflow_TrackableObjectGraph_TrackableObject_ObjectReference_fieldAccessorTable
                     .ensureFieldAccessorsInitialized(
    @@ -657,17 +662,16 @@ private Builder() {
               }
     
               private Builder(
    -              com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +              com.google.protobuf.GeneratedMessage.BuilderParent parent) {
                 super(parent);
     
               }
               @java.lang.Override
               public Builder clear() {
                 super.clear();
    +            bitField0_ = 0;
                 nodeId_ = 0;
    -
                 localName_ = "";
    -
                 return this;
               }
     
    @@ -694,44 +698,21 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.
               @java.lang.Override
               public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference buildPartial() {
                 org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference result = new org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference(this);
    -            result.nodeId_ = nodeId_;
    -            result.localName_ = localName_;
    +            if (bitField0_ != 0) { buildPartial0(result); }
                 onBuilt();
                 return result;
               }
     
    -          @java.lang.Override
    -          public Builder clone() {
    -            return super.clone();
    -          }
    -          @java.lang.Override
    -          public Builder setField(
    -              com.google.protobuf.Descriptors.FieldDescriptor field,
    -              java.lang.Object value) {
    -            return super.setField(field, value);
    -          }
    -          @java.lang.Override
    -          public Builder clearField(
    -              com.google.protobuf.Descriptors.FieldDescriptor field) {
    -            return super.clearField(field);
    -          }
    -          @java.lang.Override
    -          public Builder clearOneof(
    -              com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -            return super.clearOneof(oneof);
    -          }
    -          @java.lang.Override
    -          public Builder setRepeatedField(
    -              com.google.protobuf.Descriptors.FieldDescriptor field,
    -              int index, java.lang.Object value) {
    -            return super.setRepeatedField(field, index, value);
    -          }
    -          @java.lang.Override
    -          public Builder addRepeatedField(
    -              com.google.protobuf.Descriptors.FieldDescriptor field,
    -              java.lang.Object value) {
    -            return super.addRepeatedField(field, value);
    +          private void buildPartial0(org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference result) {
    +            int from_bitField0_ = bitField0_;
    +            if (((from_bitField0_ & 0x00000001) != 0)) {
    +              result.nodeId_ = nodeId_;
    +            }
    +            if (((from_bitField0_ & 0x00000002) != 0)) {
    +              result.localName_ = localName_;
    +            }
               }
    +
               @java.lang.Override
               public Builder mergeFrom(com.google.protobuf.Message other) {
                 if (other instanceof org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference) {
    @@ -749,6 +730,7 @@ public Builder mergeFrom(org.tensorflow.proto.TrackableObjectGraphOuterClass.Tra
                 }
                 if (!other.getLocalName().isEmpty()) {
                   localName_ = other.localName_;
    +              bitField0_ |= 0x00000002;
                   onChanged();
                 }
                 this.mergeUnknownFields(other.getUnknownFields());
    @@ -779,12 +761,12 @@ public Builder mergeFrom(
                         break;
                       case 8: {
                         nodeId_ = input.readInt32();
    -
    +                    bitField0_ |= 0x00000001;
                         break;
                       } // case 8
                       case 18: {
                         localName_ = input.readStringRequireUtf8();
    -
    +                    bitField0_ |= 0x00000002;
                         break;
                       } // case 18
                       default: {
    @@ -802,6 +784,7 @@ public Builder mergeFrom(
                 } // finally
                 return this;
               }
    +          private int bitField0_;
     
               private int nodeId_ ;
               /**
    @@ -828,8 +811,9 @@ public int getNodeId() {
                * @return This builder for chaining.
                */
               public Builder setNodeId(int value) {
    -            
    +
                 nodeId_ = value;
    +            bitField0_ |= 0x00000001;
                 onChanged();
                 return this;
               }
    @@ -843,7 +827,7 @@ public Builder setNodeId(int value) {
                * @return This builder for chaining.
                */
               public Builder clearNodeId() {
    -            
    +            bitField0_ = (bitField0_ & ~0x00000001);
                 nodeId_ = 0;
                 onChanged();
                 return this;
    @@ -902,11 +886,9 @@ public java.lang.String getLocalName() {
                */
               public Builder setLocalName(
                   java.lang.String value) {
    -            if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +            if (value == null) { throw new NullPointerException(); }
                 localName_ = value;
    +            bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
               }
    @@ -919,8 +901,8 @@ public Builder setLocalName(
                * @return This builder for chaining.
                */
               public Builder clearLocalName() {
    -            
                 localName_ = getDefaultInstance().getLocalName();
    +            bitField0_ = (bitField0_ & ~0x00000002);
                 onChanged();
                 return this;
               }
    @@ -935,27 +917,13 @@ public Builder clearLocalName() {
                */
               public Builder setLocalNameBytes(
                   com.google.protobuf.ByteString value) {
    -            if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -            
    +            if (value == null) { throw new NullPointerException(); }
    +            checkByteStringIsUtf8(value);
                 localName_ = value;
    +            bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
               }
    -          @java.lang.Override
    -          public final Builder setUnknownFields(
    -              final com.google.protobuf.UnknownFieldSet unknownFields) {
    -            return super.setUnknownFields(unknownFields);
    -          }
    -
    -          @java.lang.Override
    -          public final Builder mergeUnknownFields(
    -              final com.google.protobuf.UnknownFieldSet unknownFields) {
    -            return super.mergeUnknownFields(unknownFields);
    -          }
    -
     
               // @@protoc_insertion_point(builder_scope:tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference)
             }
    @@ -1086,12 +1054,21 @@ public interface SerializedTensorOrBuilder extends
            * Protobuf type {@code tensorflow.TrackableObjectGraph.TrackableObject.SerializedTensor}
            */
           public static final class SerializedTensor extends
    -          com.google.protobuf.GeneratedMessageV3 implements
    +          com.google.protobuf.GeneratedMessage implements
               // @@protoc_insertion_point(message_implements:tensorflow.TrackableObjectGraph.TrackableObject.SerializedTensor)
               SerializedTensorOrBuilder {
           private static final long serialVersionUID = 0L;
    +        static {
    +          com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +            com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +            /* major= */ 4,
    +            /* minor= */ 28,
    +            /* patch= */ 3,
    +            /* suffix= */ "",
    +            SerializedTensor.class.getName());
    +        }
             // Use SerializedTensor.newBuilder() to construct.
    -        private SerializedTensor(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +        private SerializedTensor(com.google.protobuf.GeneratedMessage.Builder builder) {
               super(builder);
             }
             private SerializedTensor() {
    @@ -1100,25 +1077,13 @@ private SerializedTensor() {
               checkpointKey_ = "";
             }
     
    -        @java.lang.Override
    -        @SuppressWarnings({"unused"})
    -        protected java.lang.Object newInstance(
    -            UnusedPrivateParameter unused) {
    -          return new SerializedTensor();
    -        }
    -
    -        @java.lang.Override
    -        public final com.google.protobuf.UnknownFieldSet
    -        getUnknownFields() {
    -          return this.unknownFields;
    -        }
             public static final com.google.protobuf.Descriptors.Descriptor
                 getDescriptor() {
               return org.tensorflow.proto.TrackableObjectGraphOuterClass.internal_static_tensorflow_TrackableObjectGraph_TrackableObject_SerializedTensor_descriptor;
             }
     
             @java.lang.Override
    -        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +        protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
                 internalGetFieldAccessorTable() {
               return org.tensorflow.proto.TrackableObjectGraphOuterClass.internal_static_tensorflow_TrackableObjectGraph_TrackableObject_SerializedTensor_fieldAccessorTable
                   .ensureFieldAccessorsInitialized(
    @@ -1126,7 +1091,8 @@ protected java.lang.Object newInstance(
             }
     
             public static final int NAME_FIELD_NUMBER = 1;
    -        private volatile java.lang.Object name_;
    +        @SuppressWarnings("serial")
    +        private volatile java.lang.Object name_ = "";
             /**
              * 
              * A name for the Tensor. Simple variables have only one
    @@ -1176,7 +1142,8 @@ public java.lang.String getName() {
             }
     
             public static final int FULL_NAME_FIELD_NUMBER = 2;
    -        private volatile java.lang.Object fullName_;
    +        @SuppressWarnings("serial")
    +        private volatile java.lang.Object fullName_ = "";
             /**
              * 
              * The full name of the variable/tensor, if applicable. Used to allow
    @@ -1228,7 +1195,8 @@ public java.lang.String getFullName() {
             }
     
             public static final int CHECKPOINT_KEY_FIELD_NUMBER = 3;
    -        private volatile java.lang.Object checkpointKey_;
    +        @SuppressWarnings("serial")
    +        private volatile java.lang.Object checkpointKey_ = "";
             /**
              * 
              * The generated name of the Tensor in the checkpoint.
    @@ -1287,14 +1255,14 @@ public final boolean isInitialized() {
             @java.lang.Override
             public void writeTo(com.google.protobuf.CodedOutputStream output)
                                 throws java.io.IOException {
    -          if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -            com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    +          if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +            com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
               }
    -          if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullName_)) {
    -            com.google.protobuf.GeneratedMessageV3.writeString(output, 2, fullName_);
    +          if (!com.google.protobuf.GeneratedMessage.isStringEmpty(fullName_)) {
    +            com.google.protobuf.GeneratedMessage.writeString(output, 2, fullName_);
               }
    -          if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(checkpointKey_)) {
    -            com.google.protobuf.GeneratedMessageV3.writeString(output, 3, checkpointKey_);
    +          if (!com.google.protobuf.GeneratedMessage.isStringEmpty(checkpointKey_)) {
    +            com.google.protobuf.GeneratedMessage.writeString(output, 3, checkpointKey_);
               }
               getUnknownFields().writeTo(output);
             }
    @@ -1305,14 +1273,14 @@ public int getSerializedSize() {
               if (size != -1) return size;
     
               size = 0;
    -          if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    +          if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +            size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
               }
    -          if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullName_)) {
    -            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, fullName_);
    +          if (!com.google.protobuf.GeneratedMessage.isStringEmpty(fullName_)) {
    +            size += com.google.protobuf.GeneratedMessage.computeStringSize(2, fullName_);
               }
    -          if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(checkpointKey_)) {
    -            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, checkpointKey_);
    +          if (!com.google.protobuf.GeneratedMessage.isStringEmpty(checkpointKey_)) {
    +            size += com.google.protobuf.GeneratedMessage.computeStringSize(3, checkpointKey_);
               }
               size += getUnknownFields().getSerializedSize();
               memoizedSize = size;
    @@ -1391,39 +1359,41 @@ public static org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjec
             }
             public static org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SerializedTensor parseFrom(java.io.InputStream input)
                 throws java.io.IOException {
    -          return com.google.protobuf.GeneratedMessageV3
    +          return com.google.protobuf.GeneratedMessage
                   .parseWithIOException(PARSER, input);
             }
             public static org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SerializedTensor parseFrom(
                 java.io.InputStream input,
                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                 throws java.io.IOException {
    -          return com.google.protobuf.GeneratedMessageV3
    +          return com.google.protobuf.GeneratedMessage
                   .parseWithIOException(PARSER, input, extensionRegistry);
             }
    +
             public static org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SerializedTensor parseDelimitedFrom(java.io.InputStream input)
                 throws java.io.IOException {
    -          return com.google.protobuf.GeneratedMessageV3
    +          return com.google.protobuf.GeneratedMessage
                   .parseDelimitedWithIOException(PARSER, input);
             }
    +
             public static org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SerializedTensor parseDelimitedFrom(
                 java.io.InputStream input,
                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                 throws java.io.IOException {
    -          return com.google.protobuf.GeneratedMessageV3
    +          return com.google.protobuf.GeneratedMessage
                   .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
             }
             public static org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SerializedTensor parseFrom(
                 com.google.protobuf.CodedInputStream input)
                 throws java.io.IOException {
    -          return com.google.protobuf.GeneratedMessageV3
    +          return com.google.protobuf.GeneratedMessage
                   .parseWithIOException(PARSER, input);
             }
             public static org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SerializedTensor parseFrom(
                 com.google.protobuf.CodedInputStream input,
                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                 throws java.io.IOException {
    -          return com.google.protobuf.GeneratedMessageV3
    +          return com.google.protobuf.GeneratedMessage
                   .parseWithIOException(PARSER, input, extensionRegistry);
             }
     
    @@ -1443,7 +1413,7 @@ public Builder toBuilder() {
     
             @java.lang.Override
             protected Builder newBuilderForType(
    -            com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +            com.google.protobuf.GeneratedMessage.BuilderParent parent) {
               Builder builder = new Builder(parent);
               return builder;
             }
    @@ -1451,7 +1421,7 @@ protected Builder newBuilderForType(
              * Protobuf type {@code tensorflow.TrackableObjectGraph.TrackableObject.SerializedTensor}
              */
             public static final class Builder extends
    -            com.google.protobuf.GeneratedMessageV3.Builder implements
    +            com.google.protobuf.GeneratedMessage.Builder implements
                 // @@protoc_insertion_point(builder_implements:tensorflow.TrackableObjectGraph.TrackableObject.SerializedTensor)
                 org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SerializedTensorOrBuilder {
               public static final com.google.protobuf.Descriptors.Descriptor
    @@ -1460,7 +1430,7 @@ public static final class Builder extends
               }
     
               @java.lang.Override
    -          protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +          protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
                   internalGetFieldAccessorTable() {
                 return org.tensorflow.proto.TrackableObjectGraphOuterClass.internal_static_tensorflow_TrackableObjectGraph_TrackableObject_SerializedTensor_fieldAccessorTable
                     .ensureFieldAccessorsInitialized(
    @@ -1473,19 +1443,17 @@ private Builder() {
               }
     
               private Builder(
    -              com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +              com.google.protobuf.GeneratedMessage.BuilderParent parent) {
                 super(parent);
     
               }
               @java.lang.Override
               public Builder clear() {
                 super.clear();
    +            bitField0_ = 0;
                 name_ = "";
    -
                 fullName_ = "";
    -
                 checkpointKey_ = "";
    -
                 return this;
               }
     
    @@ -1512,45 +1480,24 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.
               @java.lang.Override
               public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SerializedTensor buildPartial() {
                 org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SerializedTensor result = new org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SerializedTensor(this);
    -            result.name_ = name_;
    -            result.fullName_ = fullName_;
    -            result.checkpointKey_ = checkpointKey_;
    +            if (bitField0_ != 0) { buildPartial0(result); }
                 onBuilt();
                 return result;
               }
     
    -          @java.lang.Override
    -          public Builder clone() {
    -            return super.clone();
    -          }
    -          @java.lang.Override
    -          public Builder setField(
    -              com.google.protobuf.Descriptors.FieldDescriptor field,
    -              java.lang.Object value) {
    -            return super.setField(field, value);
    -          }
    -          @java.lang.Override
    -          public Builder clearField(
    -              com.google.protobuf.Descriptors.FieldDescriptor field) {
    -            return super.clearField(field);
    -          }
    -          @java.lang.Override
    -          public Builder clearOneof(
    -              com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -            return super.clearOneof(oneof);
    -          }
    -          @java.lang.Override
    -          public Builder setRepeatedField(
    -              com.google.protobuf.Descriptors.FieldDescriptor field,
    -              int index, java.lang.Object value) {
    -            return super.setRepeatedField(field, index, value);
    -          }
    -          @java.lang.Override
    -          public Builder addRepeatedField(
    -              com.google.protobuf.Descriptors.FieldDescriptor field,
    -              java.lang.Object value) {
    -            return super.addRepeatedField(field, value);
    +          private void buildPartial0(org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SerializedTensor result) {
    +            int from_bitField0_ = bitField0_;
    +            if (((from_bitField0_ & 0x00000001) != 0)) {
    +              result.name_ = name_;
    +            }
    +            if (((from_bitField0_ & 0x00000002) != 0)) {
    +              result.fullName_ = fullName_;
    +            }
    +            if (((from_bitField0_ & 0x00000004) != 0)) {
    +              result.checkpointKey_ = checkpointKey_;
    +            }
               }
    +
               @java.lang.Override
               public Builder mergeFrom(com.google.protobuf.Message other) {
                 if (other instanceof org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SerializedTensor) {
    @@ -1565,14 +1512,17 @@ public Builder mergeFrom(org.tensorflow.proto.TrackableObjectGraphOuterClass.Tra
                 if (other == org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SerializedTensor.getDefaultInstance()) return this;
                 if (!other.getName().isEmpty()) {
                   name_ = other.name_;
    +              bitField0_ |= 0x00000001;
                   onChanged();
                 }
                 if (!other.getFullName().isEmpty()) {
                   fullName_ = other.fullName_;
    +              bitField0_ |= 0x00000002;
                   onChanged();
                 }
                 if (!other.getCheckpointKey().isEmpty()) {
                   checkpointKey_ = other.checkpointKey_;
    +              bitField0_ |= 0x00000004;
                   onChanged();
                 }
                 this.mergeUnknownFields(other.getUnknownFields());
    @@ -1603,17 +1553,17 @@ public Builder mergeFrom(
                         break;
                       case 10: {
                         name_ = input.readStringRequireUtf8();
    -
    +                    bitField0_ |= 0x00000001;
                         break;
                       } // case 10
                       case 18: {
                         fullName_ = input.readStringRequireUtf8();
    -
    +                    bitField0_ |= 0x00000002;
                         break;
                       } // case 18
                       case 26: {
                         checkpointKey_ = input.readStringRequireUtf8();
    -
    +                    bitField0_ |= 0x00000004;
                         break;
                       } // case 26
                       default: {
    @@ -1631,6 +1581,7 @@ public Builder mergeFrom(
                 } // finally
                 return this;
               }
    +          private int bitField0_;
     
               private java.lang.Object name_ = "";
               /**
    @@ -1691,11 +1642,9 @@ public java.lang.String getName() {
                */
               public Builder setName(
                   java.lang.String value) {
    -            if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +            if (value == null) { throw new NullPointerException(); }
                 name_ = value;
    +            bitField0_ |= 0x00000001;
                 onChanged();
                 return this;
               }
    @@ -1710,8 +1659,8 @@ public Builder setName(
                * @return This builder for chaining.
                */
               public Builder clearName() {
    -            
                 name_ = getDefaultInstance().getName();
    +            bitField0_ = (bitField0_ & ~0x00000001);
                 onChanged();
                 return this;
               }
    @@ -1728,12 +1677,10 @@ public Builder clearName() {
                */
               public Builder setNameBytes(
                   com.google.protobuf.ByteString value) {
    -            if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -            
    +            if (value == null) { throw new NullPointerException(); }
    +            checkByteStringIsUtf8(value);
                 name_ = value;
    +            bitField0_ |= 0x00000001;
                 onChanged();
                 return this;
               }
    @@ -1800,11 +1747,9 @@ public java.lang.String getFullName() {
                */
               public Builder setFullName(
                   java.lang.String value) {
    -            if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +            if (value == null) { throw new NullPointerException(); }
                 fullName_ = value;
    +            bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
               }
    @@ -1820,8 +1765,8 @@ public Builder setFullName(
                * @return This builder for chaining.
                */
               public Builder clearFullName() {
    -            
                 fullName_ = getDefaultInstance().getFullName();
    +            bitField0_ = (bitField0_ & ~0x00000002);
                 onChanged();
                 return this;
               }
    @@ -1839,12 +1784,10 @@ public Builder clearFullName() {
                */
               public Builder setFullNameBytes(
                   com.google.protobuf.ByteString value) {
    -            if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -            
    +            if (value == null) { throw new NullPointerException(); }
    +            checkByteStringIsUtf8(value);
                 fullName_ = value;
    +            bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
               }
    @@ -1902,11 +1845,9 @@ public java.lang.String getCheckpointKey() {
                */
               public Builder setCheckpointKey(
                   java.lang.String value) {
    -            if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +            if (value == null) { throw new NullPointerException(); }
                 checkpointKey_ = value;
    +            bitField0_ |= 0x00000004;
                 onChanged();
                 return this;
               }
    @@ -1919,8 +1860,8 @@ public Builder setCheckpointKey(
                * @return This builder for chaining.
                */
               public Builder clearCheckpointKey() {
    -            
                 checkpointKey_ = getDefaultInstance().getCheckpointKey();
    +            bitField0_ = (bitField0_ & ~0x00000004);
                 onChanged();
                 return this;
               }
    @@ -1935,27 +1876,13 @@ public Builder clearCheckpointKey() {
                */
               public Builder setCheckpointKeyBytes(
                   com.google.protobuf.ByteString value) {
    -            if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -            
    +            if (value == null) { throw new NullPointerException(); }
    +            checkByteStringIsUtf8(value);
                 checkpointKey_ = value;
    +            bitField0_ |= 0x00000004;
                 onChanged();
                 return this;
               }
    -          @java.lang.Override
    -          public final Builder setUnknownFields(
    -              final com.google.protobuf.UnknownFieldSet unknownFields) {
    -            return super.setUnknownFields(unknownFields);
    -          }
    -
    -          @java.lang.Override
    -          public final Builder mergeUnknownFields(
    -              final com.google.protobuf.UnknownFieldSet unknownFields) {
    -            return super.mergeUnknownFields(unknownFields);
    -          }
    -
     
               // @@protoc_insertion_point(builder_scope:tensorflow.TrackableObjectGraph.TrackableObject.SerializedTensor)
             }
    @@ -2058,37 +1985,34 @@ public interface SlotVariableReferenceOrBuilder extends
            * Protobuf type {@code tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference}
            */
           public static final class SlotVariableReference extends
    -          com.google.protobuf.GeneratedMessageV3 implements
    +          com.google.protobuf.GeneratedMessage implements
               // @@protoc_insertion_point(message_implements:tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference)
               SlotVariableReferenceOrBuilder {
           private static final long serialVersionUID = 0L;
    +        static {
    +          com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +            com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +            /* major= */ 4,
    +            /* minor= */ 28,
    +            /* patch= */ 3,
    +            /* suffix= */ "",
    +            SlotVariableReference.class.getName());
    +        }
             // Use SlotVariableReference.newBuilder() to construct.
    -        private SlotVariableReference(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +        private SlotVariableReference(com.google.protobuf.GeneratedMessage.Builder builder) {
               super(builder);
             }
             private SlotVariableReference() {
               slotName_ = "";
             }
     
    -        @java.lang.Override
    -        @SuppressWarnings({"unused"})
    -        protected java.lang.Object newInstance(
    -            UnusedPrivateParameter unused) {
    -          return new SlotVariableReference();
    -        }
    -
    -        @java.lang.Override
    -        public final com.google.protobuf.UnknownFieldSet
    -        getUnknownFields() {
    -          return this.unknownFields;
    -        }
             public static final com.google.protobuf.Descriptors.Descriptor
                 getDescriptor() {
               return org.tensorflow.proto.TrackableObjectGraphOuterClass.internal_static_tensorflow_TrackableObjectGraph_TrackableObject_SlotVariableReference_descriptor;
             }
     
             @java.lang.Override
    -        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +        protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
                 internalGetFieldAccessorTable() {
               return org.tensorflow.proto.TrackableObjectGraphOuterClass.internal_static_tensorflow_TrackableObjectGraph_TrackableObject_SlotVariableReference_fieldAccessorTable
                   .ensureFieldAccessorsInitialized(
    @@ -2096,7 +2020,7 @@ protected java.lang.Object newInstance(
             }
     
             public static final int ORIGINAL_VARIABLE_NODE_ID_FIELD_NUMBER = 1;
    -        private int originalVariableNodeId_;
    +        private int originalVariableNodeId_ = 0;
             /**
              * 
              * An index into `TrackableObjectGraph.nodes`, indicating the
    @@ -2112,7 +2036,8 @@ public int getOriginalVariableNodeId() {
             }
     
             public static final int SLOT_NAME_FIELD_NUMBER = 2;
    -        private volatile java.lang.Object slotName_;
    +        @SuppressWarnings("serial")
    +        private volatile java.lang.Object slotName_ = "";
             /**
              * 
              * The name of the slot (e.g. "m"/"v").
    @@ -2158,7 +2083,7 @@ public java.lang.String getSlotName() {
             }
     
             public static final int SLOT_VARIABLE_NODE_ID_FIELD_NUMBER = 3;
    -        private int slotVariableNodeId_;
    +        private int slotVariableNodeId_ = 0;
             /**
              * 
              * An index into `TrackableObjectGraph.nodes`, indicating the
    @@ -2190,8 +2115,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
               if (originalVariableNodeId_ != 0) {
                 output.writeInt32(1, originalVariableNodeId_);
               }
    -          if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(slotName_)) {
    -            com.google.protobuf.GeneratedMessageV3.writeString(output, 2, slotName_);
    +          if (!com.google.protobuf.GeneratedMessage.isStringEmpty(slotName_)) {
    +            com.google.protobuf.GeneratedMessage.writeString(output, 2, slotName_);
               }
               if (slotVariableNodeId_ != 0) {
                 output.writeInt32(3, slotVariableNodeId_);
    @@ -2209,8 +2134,8 @@ public int getSerializedSize() {
                 size += com.google.protobuf.CodedOutputStream
                   .computeInt32Size(1, originalVariableNodeId_);
               }
    -          if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(slotName_)) {
    -            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, slotName_);
    +          if (!com.google.protobuf.GeneratedMessage.isStringEmpty(slotName_)) {
    +            size += com.google.protobuf.GeneratedMessage.computeStringSize(2, slotName_);
               }
               if (slotVariableNodeId_ != 0) {
                 size += com.google.protobuf.CodedOutputStream
    @@ -2293,39 +2218,41 @@ public static org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjec
             }
             public static org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference parseFrom(java.io.InputStream input)
                 throws java.io.IOException {
    -          return com.google.protobuf.GeneratedMessageV3
    +          return com.google.protobuf.GeneratedMessage
                   .parseWithIOException(PARSER, input);
             }
             public static org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference parseFrom(
                 java.io.InputStream input,
                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                 throws java.io.IOException {
    -          return com.google.protobuf.GeneratedMessageV3
    +          return com.google.protobuf.GeneratedMessage
                   .parseWithIOException(PARSER, input, extensionRegistry);
             }
    +
             public static org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference parseDelimitedFrom(java.io.InputStream input)
                 throws java.io.IOException {
    -          return com.google.protobuf.GeneratedMessageV3
    +          return com.google.protobuf.GeneratedMessage
                   .parseDelimitedWithIOException(PARSER, input);
             }
    +
             public static org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference parseDelimitedFrom(
                 java.io.InputStream input,
                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                 throws java.io.IOException {
    -          return com.google.protobuf.GeneratedMessageV3
    +          return com.google.protobuf.GeneratedMessage
                   .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
             }
             public static org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference parseFrom(
                 com.google.protobuf.CodedInputStream input)
                 throws java.io.IOException {
    -          return com.google.protobuf.GeneratedMessageV3
    +          return com.google.protobuf.GeneratedMessage
                   .parseWithIOException(PARSER, input);
             }
             public static org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference parseFrom(
                 com.google.protobuf.CodedInputStream input,
                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                 throws java.io.IOException {
    -          return com.google.protobuf.GeneratedMessageV3
    +          return com.google.protobuf.GeneratedMessage
                   .parseWithIOException(PARSER, input, extensionRegistry);
             }
     
    @@ -2345,7 +2272,7 @@ public Builder toBuilder() {
     
             @java.lang.Override
             protected Builder newBuilderForType(
    -            com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +            com.google.protobuf.GeneratedMessage.BuilderParent parent) {
               Builder builder = new Builder(parent);
               return builder;
             }
    @@ -2353,7 +2280,7 @@ protected Builder newBuilderForType(
              * Protobuf type {@code tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference}
              */
             public static final class Builder extends
    -            com.google.protobuf.GeneratedMessageV3.Builder implements
    +            com.google.protobuf.GeneratedMessage.Builder implements
                 // @@protoc_insertion_point(builder_implements:tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference)
                 org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReferenceOrBuilder {
               public static final com.google.protobuf.Descriptors.Descriptor
    @@ -2362,7 +2289,7 @@ public static final class Builder extends
               }
     
               @java.lang.Override
    -          protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +          protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
                   internalGetFieldAccessorTable() {
                 return org.tensorflow.proto.TrackableObjectGraphOuterClass.internal_static_tensorflow_TrackableObjectGraph_TrackableObject_SlotVariableReference_fieldAccessorTable
                     .ensureFieldAccessorsInitialized(
    @@ -2375,19 +2302,17 @@ private Builder() {
               }
     
               private Builder(
    -              com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +              com.google.protobuf.GeneratedMessage.BuilderParent parent) {
                 super(parent);
     
               }
               @java.lang.Override
               public Builder clear() {
                 super.clear();
    +            bitField0_ = 0;
                 originalVariableNodeId_ = 0;
    -
                 slotName_ = "";
    -
                 slotVariableNodeId_ = 0;
    -
                 return this;
               }
     
    @@ -2414,45 +2339,24 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.
               @java.lang.Override
               public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference buildPartial() {
                 org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference result = new org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference(this);
    -            result.originalVariableNodeId_ = originalVariableNodeId_;
    -            result.slotName_ = slotName_;
    -            result.slotVariableNodeId_ = slotVariableNodeId_;
    +            if (bitField0_ != 0) { buildPartial0(result); }
                 onBuilt();
                 return result;
               }
     
    -          @java.lang.Override
    -          public Builder clone() {
    -            return super.clone();
    -          }
    -          @java.lang.Override
    -          public Builder setField(
    -              com.google.protobuf.Descriptors.FieldDescriptor field,
    -              java.lang.Object value) {
    -            return super.setField(field, value);
    -          }
    -          @java.lang.Override
    -          public Builder clearField(
    -              com.google.protobuf.Descriptors.FieldDescriptor field) {
    -            return super.clearField(field);
    -          }
    -          @java.lang.Override
    -          public Builder clearOneof(
    -              com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -            return super.clearOneof(oneof);
    -          }
    -          @java.lang.Override
    -          public Builder setRepeatedField(
    -              com.google.protobuf.Descriptors.FieldDescriptor field,
    -              int index, java.lang.Object value) {
    -            return super.setRepeatedField(field, index, value);
    -          }
    -          @java.lang.Override
    -          public Builder addRepeatedField(
    -              com.google.protobuf.Descriptors.FieldDescriptor field,
    -              java.lang.Object value) {
    -            return super.addRepeatedField(field, value);
    +          private void buildPartial0(org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference result) {
    +            int from_bitField0_ = bitField0_;
    +            if (((from_bitField0_ & 0x00000001) != 0)) {
    +              result.originalVariableNodeId_ = originalVariableNodeId_;
    +            }
    +            if (((from_bitField0_ & 0x00000002) != 0)) {
    +              result.slotName_ = slotName_;
    +            }
    +            if (((from_bitField0_ & 0x00000004) != 0)) {
    +              result.slotVariableNodeId_ = slotVariableNodeId_;
    +            }
               }
    +
               @java.lang.Override
               public Builder mergeFrom(com.google.protobuf.Message other) {
                 if (other instanceof org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference) {
    @@ -2470,6 +2374,7 @@ public Builder mergeFrom(org.tensorflow.proto.TrackableObjectGraphOuterClass.Tra
                 }
                 if (!other.getSlotName().isEmpty()) {
                   slotName_ = other.slotName_;
    +              bitField0_ |= 0x00000002;
                   onChanged();
                 }
                 if (other.getSlotVariableNodeId() != 0) {
    @@ -2503,17 +2408,17 @@ public Builder mergeFrom(
                         break;
                       case 8: {
                         originalVariableNodeId_ = input.readInt32();
    -
    +                    bitField0_ |= 0x00000001;
                         break;
                       } // case 8
                       case 18: {
                         slotName_ = input.readStringRequireUtf8();
    -
    +                    bitField0_ |= 0x00000002;
                         break;
                       } // case 18
                       case 24: {
                         slotVariableNodeId_ = input.readInt32();
    -
    +                    bitField0_ |= 0x00000004;
                         break;
                       } // case 24
                       default: {
    @@ -2531,6 +2436,7 @@ public Builder mergeFrom(
                 } // finally
                 return this;
               }
    +          private int bitField0_;
     
               private int originalVariableNodeId_ ;
               /**
    @@ -2557,8 +2463,9 @@ public int getOriginalVariableNodeId() {
                * @return This builder for chaining.
                */
               public Builder setOriginalVariableNodeId(int value) {
    -            
    +
                 originalVariableNodeId_ = value;
    +            bitField0_ |= 0x00000001;
                 onChanged();
                 return this;
               }
    @@ -2572,7 +2479,7 @@ public Builder setOriginalVariableNodeId(int value) {
                * @return This builder for chaining.
                */
               public Builder clearOriginalVariableNodeId() {
    -            
    +            bitField0_ = (bitField0_ & ~0x00000001);
                 originalVariableNodeId_ = 0;
                 onChanged();
                 return this;
    @@ -2631,11 +2538,9 @@ public java.lang.String getSlotName() {
                */
               public Builder setSlotName(
                   java.lang.String value) {
    -            if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +            if (value == null) { throw new NullPointerException(); }
                 slotName_ = value;
    +            bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
               }
    @@ -2648,8 +2553,8 @@ public Builder setSlotName(
                * @return This builder for chaining.
                */
               public Builder clearSlotName() {
    -            
                 slotName_ = getDefaultInstance().getSlotName();
    +            bitField0_ = (bitField0_ & ~0x00000002);
                 onChanged();
                 return this;
               }
    @@ -2664,12 +2569,10 @@ public Builder clearSlotName() {
                */
               public Builder setSlotNameBytes(
                   com.google.protobuf.ByteString value) {
    -            if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -            
    +            if (value == null) { throw new NullPointerException(); }
    +            checkByteStringIsUtf8(value);
                 slotName_ = value;
    +            bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
               }
    @@ -2699,8 +2602,9 @@ public int getSlotVariableNodeId() {
                * @return This builder for chaining.
                */
               public Builder setSlotVariableNodeId(int value) {
    -            
    +
                 slotVariableNodeId_ = value;
    +            bitField0_ |= 0x00000004;
                 onChanged();
                 return this;
               }
    @@ -2714,23 +2618,11 @@ public Builder setSlotVariableNodeId(int value) {
                * @return This builder for chaining.
                */
               public Builder clearSlotVariableNodeId() {
    -            
    +            bitField0_ = (bitField0_ & ~0x00000004);
                 slotVariableNodeId_ = 0;
                 onChanged();
                 return this;
               }
    -          @java.lang.Override
    -          public final Builder setUnknownFields(
    -              final com.google.protobuf.UnknownFieldSet unknownFields) {
    -            return super.setUnknownFields(unknownFields);
    -          }
    -
    -          @java.lang.Override
    -          public final Builder mergeUnknownFields(
    -              final com.google.protobuf.UnknownFieldSet unknownFields) {
    -            return super.mergeUnknownFields(unknownFields);
    -          }
    -
     
               // @@protoc_insertion_point(builder_scope:tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference)
             }
    @@ -2783,7 +2675,9 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.
     
           }
     
    +      private int bitField0_;
           public static final int CHILDREN_FIELD_NUMBER = 1;
    +      @SuppressWarnings("serial")
           private java.util.List children_;
           /**
            * 
    @@ -2844,6 +2738,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.
           }
     
           public static final int ATTRIBUTES_FIELD_NUMBER = 2;
    +      @SuppressWarnings("serial")
           private java.util.List attributes_;
           /**
            * 
    @@ -2904,6 +2799,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.
           }
     
           public static final int SLOT_VARIABLES_FIELD_NUMBER = 3;
    +      @SuppressWarnings("serial")
           private java.util.List slotVariables_;
           /**
            * 
    @@ -2976,7 +2872,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.
            */
           @java.lang.Override
           public boolean hasRegisteredSaver() {
    -        return registeredSaver_ != null;
    +        return ((bitField0_ & 0x00000001) != 0);
           }
           /**
            * 
    @@ -3001,7 +2897,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaver getRe
            */
           @java.lang.Override
           public org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaverOrBuilder getRegisteredSaverOrBuilder() {
    -        return getRegisteredSaver();
    +        return registeredSaver_ == null ? org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaver.getDefaultInstance() : registeredSaver_;
           }
     
           public static final int HAS_CHECKPOINT_VALUES_FIELD_NUMBER = 5;
    @@ -3019,7 +2915,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaverOrBuil
            */
           @java.lang.Override
           public boolean hasHasCheckpointValues() {
    -        return hasCheckpointValues_ != null;
    +        return ((bitField0_ & 0x00000002) != 0);
           }
           /**
            * 
    @@ -3048,7 +2944,7 @@ public com.google.protobuf.BoolValue getHasCheckpointValues() {
            */
           @java.lang.Override
           public com.google.protobuf.BoolValueOrBuilder getHasCheckpointValuesOrBuilder() {
    -        return getHasCheckpointValues();
    +        return hasCheckpointValues_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : hasCheckpointValues_;
           }
     
           private byte memoizedIsInitialized = -1;
    @@ -3074,10 +2970,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
             for (int i = 0; i < slotVariables_.size(); i++) {
               output.writeMessage(3, slotVariables_.get(i));
             }
    -        if (registeredSaver_ != null) {
    +        if (((bitField0_ & 0x00000001) != 0)) {
               output.writeMessage(4, getRegisteredSaver());
             }
    -        if (hasCheckpointValues_ != null) {
    +        if (((bitField0_ & 0x00000002) != 0)) {
               output.writeMessage(5, getHasCheckpointValues());
             }
             getUnknownFields().writeTo(output);
    @@ -3101,11 +2997,11 @@ public int getSerializedSize() {
               size += com.google.protobuf.CodedOutputStream
                 .computeMessageSize(3, slotVariables_.get(i));
             }
    -        if (registeredSaver_ != null) {
    +        if (((bitField0_ & 0x00000001) != 0)) {
               size += com.google.protobuf.CodedOutputStream
                 .computeMessageSize(4, getRegisteredSaver());
             }
    -        if (hasCheckpointValues_ != null) {
    +        if (((bitField0_ & 0x00000002) != 0)) {
               size += com.google.protobuf.CodedOutputStream
                 .computeMessageSize(5, getHasCheckpointValues());
             }
    @@ -3210,39 +3106,41 @@ public static org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjec
           }
           public static org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject parseFrom(java.io.InputStream input)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input);
           }
           public static org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject parseFrom(
               java.io.InputStream input,
               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input, extensionRegistry);
           }
    +
           public static org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject parseDelimitedFrom(java.io.InputStream input)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseDelimitedWithIOException(PARSER, input);
           }
    +
           public static org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject parseDelimitedFrom(
               java.io.InputStream input,
               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
           }
           public static org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject parseFrom(
               com.google.protobuf.CodedInputStream input)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input);
           }
           public static org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject parseFrom(
               com.google.protobuf.CodedInputStream input,
               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input, extensionRegistry);
           }
     
    @@ -3262,7 +3160,7 @@ public Builder toBuilder() {
     
           @java.lang.Override
           protected Builder newBuilderForType(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             Builder builder = new Builder(parent);
             return builder;
           }
    @@ -3270,7 +3168,7 @@ protected Builder newBuilderForType(
            * Protobuf type {@code tensorflow.TrackableObjectGraph.TrackableObject}
            */
           public static final class Builder extends
    -          com.google.protobuf.GeneratedMessageV3.Builder implements
    +          com.google.protobuf.GeneratedMessage.Builder implements
               // @@protoc_insertion_point(builder_implements:tensorflow.TrackableObjectGraph.TrackableObject)
               org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObjectOrBuilder {
             public static final com.google.protobuf.Descriptors.Descriptor
    @@ -3279,7 +3177,7 @@ public static final class Builder extends
             }
     
             @java.lang.Override
    -        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +        protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
                 internalGetFieldAccessorTable() {
               return org.tensorflow.proto.TrackableObjectGraphOuterClass.internal_static_tensorflow_TrackableObjectGraph_TrackableObject_fieldAccessorTable
                   .ensureFieldAccessorsInitialized(
    @@ -3288,17 +3186,28 @@ public static final class Builder extends
     
             // Construct using org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.newBuilder()
             private Builder() {
    -
    +          maybeForceBuilderInitialization();
             }
     
             private Builder(
    -            com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +            com.google.protobuf.GeneratedMessage.BuilderParent parent) {
               super(parent);
    -
    +          maybeForceBuilderInitialization();
    +        }
    +        private void maybeForceBuilderInitialization() {
    +          if (com.google.protobuf.GeneratedMessage
    +                  .alwaysUseFieldBuilders) {
    +            getChildrenFieldBuilder();
    +            getAttributesFieldBuilder();
    +            getSlotVariablesFieldBuilder();
    +            getRegisteredSaverFieldBuilder();
    +            getHasCheckpointValuesFieldBuilder();
    +          }
             }
             @java.lang.Override
             public Builder clear() {
               super.clear();
    +          bitField0_ = 0;
               if (childrenBuilder_ == null) {
                 children_ = java.util.Collections.emptyList();
               } else {
    @@ -3320,16 +3229,14 @@ public Builder clear() {
                 slotVariablesBuilder_.clear();
               }
               bitField0_ = (bitField0_ & ~0x00000004);
    -          if (registeredSaverBuilder_ == null) {
    -            registeredSaver_ = null;
    -          } else {
    -            registeredSaver_ = null;
    +          registeredSaver_ = null;
    +          if (registeredSaverBuilder_ != null) {
    +            registeredSaverBuilder_.dispose();
                 registeredSaverBuilder_ = null;
               }
    -          if (hasCheckpointValuesBuilder_ == null) {
    -            hasCheckpointValues_ = null;
    -          } else {
    -            hasCheckpointValues_ = null;
    +          hasCheckpointValues_ = null;
    +          if (hasCheckpointValuesBuilder_ != null) {
    +            hasCheckpointValuesBuilder_.dispose();
                 hasCheckpointValuesBuilder_ = null;
               }
               return this;
    @@ -3358,7 +3265,13 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.
             @java.lang.Override
             public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject buildPartial() {
               org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject result = new org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject(this);
    -          int from_bitField0_ = bitField0_;
    +          buildPartialRepeatedFields(result);
    +          if (bitField0_ != 0) { buildPartial0(result); }
    +          onBuilt();
    +          return result;
    +        }
    +
    +        private void buildPartialRepeatedFields(org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject result) {
               if (childrenBuilder_ == null) {
                 if (((bitField0_ & 0x00000001) != 0)) {
                   children_ = java.util.Collections.unmodifiableList(children_);
    @@ -3386,52 +3299,26 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.
               } else {
                 result.slotVariables_ = slotVariablesBuilder_.build();
               }
    -          if (registeredSaverBuilder_ == null) {
    -            result.registeredSaver_ = registeredSaver_;
    -          } else {
    -            result.registeredSaver_ = registeredSaverBuilder_.build();
    +        }
    +
    +        private void buildPartial0(org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject result) {
    +          int from_bitField0_ = bitField0_;
    +          int to_bitField0_ = 0;
    +          if (((from_bitField0_ & 0x00000008) != 0)) {
    +            result.registeredSaver_ = registeredSaverBuilder_ == null
    +                ? registeredSaver_
    +                : registeredSaverBuilder_.build();
    +            to_bitField0_ |= 0x00000001;
               }
    -          if (hasCheckpointValuesBuilder_ == null) {
    -            result.hasCheckpointValues_ = hasCheckpointValues_;
    -          } else {
    -            result.hasCheckpointValues_ = hasCheckpointValuesBuilder_.build();
    +          if (((from_bitField0_ & 0x00000010) != 0)) {
    +            result.hasCheckpointValues_ = hasCheckpointValuesBuilder_ == null
    +                ? hasCheckpointValues_
    +                : hasCheckpointValuesBuilder_.build();
    +            to_bitField0_ |= 0x00000002;
               }
    -          onBuilt();
    -          return result;
    +          result.bitField0_ |= to_bitField0_;
             }
     
    -        @java.lang.Override
    -        public Builder clone() {
    -          return super.clone();
    -        }
    -        @java.lang.Override
    -        public Builder setField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field,
    -            java.lang.Object value) {
    -          return super.setField(field, value);
    -        }
    -        @java.lang.Override
    -        public Builder clearField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field) {
    -          return super.clearField(field);
    -        }
    -        @java.lang.Override
    -        public Builder clearOneof(
    -            com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -          return super.clearOneof(oneof);
    -        }
    -        @java.lang.Override
    -        public Builder setRepeatedField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field,
    -            int index, java.lang.Object value) {
    -          return super.setRepeatedField(field, index, value);
    -        }
    -        @java.lang.Override
    -        public Builder addRepeatedField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field,
    -            java.lang.Object value) {
    -          return super.addRepeatedField(field, value);
    -        }
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.Message other) {
               if (other instanceof org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject) {
    @@ -3463,7 +3350,7 @@ public Builder mergeFrom(org.tensorflow.proto.TrackableObjectGraphOuterClass.Tra
                     children_ = other.children_;
                     bitField0_ = (bitField0_ & ~0x00000001);
                     childrenBuilder_ = 
    -                  com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +                  com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                          getChildrenFieldBuilder() : null;
                   } else {
                     childrenBuilder_.addAllMessages(other.children_);
    @@ -3489,7 +3376,7 @@ public Builder mergeFrom(org.tensorflow.proto.TrackableObjectGraphOuterClass.Tra
                     attributes_ = other.attributes_;
                     bitField0_ = (bitField0_ & ~0x00000002);
                     attributesBuilder_ = 
    -                  com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +                  com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                          getAttributesFieldBuilder() : null;
                   } else {
                     attributesBuilder_.addAllMessages(other.attributes_);
    @@ -3515,7 +3402,7 @@ public Builder mergeFrom(org.tensorflow.proto.TrackableObjectGraphOuterClass.Tra
                     slotVariables_ = other.slotVariables_;
                     bitField0_ = (bitField0_ & ~0x00000004);
                     slotVariablesBuilder_ = 
    -                  com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +                  com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                          getSlotVariablesFieldBuilder() : null;
                   } else {
                     slotVariablesBuilder_.addAllMessages(other.slotVariables_);
    @@ -3597,14 +3484,14 @@ public Builder mergeFrom(
                       input.readMessage(
                           getRegisteredSaverFieldBuilder().getBuilder(),
                           extensionRegistry);
    -
    +                  bitField0_ |= 0x00000008;
                       break;
                     } // case 34
                     case 42: {
                       input.readMessage(
                           getHasCheckpointValuesFieldBuilder().getBuilder(),
                           extensionRegistry);
    -
    +                  bitField0_ |= 0x00000010;
                       break;
                     } // case 42
                     default: {
    @@ -3633,7 +3520,7 @@ private void ensureChildrenIsMutable() {
                }
             }
     
    -        private com.google.protobuf.RepeatedFieldBuilderV3<
    +        private com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReferenceOrBuilder> childrenBuilder_;
     
             /**
    @@ -3921,11 +3808,11 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.
                  getChildrenBuilderList() {
               return getChildrenFieldBuilder().getBuilderList();
             }
    -        private com.google.protobuf.RepeatedFieldBuilderV3<
    +        private com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReferenceOrBuilder> 
                 getChildrenFieldBuilder() {
               if (childrenBuilder_ == null) {
    -            childrenBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +            childrenBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                     org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReferenceOrBuilder>(
                         children_,
                         ((bitField0_ & 0x00000001) != 0),
    @@ -3945,7 +3832,7 @@ private void ensureAttributesIsMutable() {
                }
             }
     
    -        private com.google.protobuf.RepeatedFieldBuilderV3<
    +        private com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SerializedTensor, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SerializedTensor.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SerializedTensorOrBuilder> attributesBuilder_;
     
             /**
    @@ -4233,11 +4120,11 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.
                  getAttributesBuilderList() {
               return getAttributesFieldBuilder().getBuilderList();
             }
    -        private com.google.protobuf.RepeatedFieldBuilderV3<
    +        private com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SerializedTensor, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SerializedTensor.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SerializedTensorOrBuilder> 
                 getAttributesFieldBuilder() {
               if (attributesBuilder_ == null) {
    -            attributesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +            attributesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                     org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SerializedTensor, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SerializedTensor.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SerializedTensorOrBuilder>(
                         attributes_,
                         ((bitField0_ & 0x00000002) != 0),
    @@ -4257,7 +4144,7 @@ private void ensureSlotVariablesIsMutable() {
                }
             }
     
    -        private com.google.protobuf.RepeatedFieldBuilderV3<
    +        private com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReferenceOrBuilder> slotVariablesBuilder_;
     
             /**
    @@ -4545,11 +4432,11 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.
                  getSlotVariablesBuilderList() {
               return getSlotVariablesFieldBuilder().getBuilderList();
             }
    -        private com.google.protobuf.RepeatedFieldBuilderV3<
    +        private com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReferenceOrBuilder> 
                 getSlotVariablesFieldBuilder() {
               if (slotVariablesBuilder_ == null) {
    -            slotVariablesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +            slotVariablesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                     org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReferenceOrBuilder>(
                         slotVariables_,
                         ((bitField0_ & 0x00000004) != 0),
    @@ -4561,7 +4448,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.
             }
     
             private org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaver registeredSaver_;
    -        private com.google.protobuf.SingleFieldBuilderV3<
    +        private com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaver, org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaver.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaverOrBuilder> registeredSaverBuilder_;
             /**
              * 
    @@ -4573,7 +4460,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.
              * @return Whether the registeredSaver field is set.
              */
             public boolean hasRegisteredSaver() {
    -          return registeredSaverBuilder_ != null || registeredSaver_ != null;
    +          return ((bitField0_ & 0x00000008) != 0);
             }
             /**
              * 
    @@ -4605,11 +4492,11 @@ public Builder setRegisteredSaver(org.tensorflow.proto.TrackableObjectGraphOuter
                   throw new NullPointerException();
                 }
                 registeredSaver_ = value;
    -            onChanged();
               } else {
                 registeredSaverBuilder_.setMessage(value);
               }
    -
    +          bitField0_ |= 0x00000008;
    +          onChanged();
               return this;
             }
             /**
    @@ -4624,11 +4511,11 @@ public Builder setRegisteredSaver(
                 org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaver.Builder builderForValue) {
               if (registeredSaverBuilder_ == null) {
                 registeredSaver_ = builderForValue.build();
    -            onChanged();
               } else {
                 registeredSaverBuilder_.setMessage(builderForValue.build());
               }
    -
    +          bitField0_ |= 0x00000008;
    +          onChanged();
               return this;
             }
             /**
    @@ -4641,17 +4528,20 @@ public Builder setRegisteredSaver(
              */
             public Builder mergeRegisteredSaver(org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaver value) {
               if (registeredSaverBuilder_ == null) {
    -            if (registeredSaver_ != null) {
    -              registeredSaver_ =
    -                org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaver.newBuilder(registeredSaver_).mergeFrom(value).buildPartial();
    +            if (((bitField0_ & 0x00000008) != 0) &&
    +              registeredSaver_ != null &&
    +              registeredSaver_ != org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaver.getDefaultInstance()) {
    +              getRegisteredSaverBuilder().mergeFrom(value);
                 } else {
                   registeredSaver_ = value;
                 }
    -            onChanged();
               } else {
                 registeredSaverBuilder_.mergeFrom(value);
               }
    -
    +          if (registeredSaver_ != null) {
    +            bitField0_ |= 0x00000008;
    +            onChanged();
    +          }
               return this;
             }
             /**
    @@ -4663,14 +4553,13 @@ public Builder mergeRegisteredSaver(org.tensorflow.proto.TrackableObjectGraphOut
              * .tensorflow.RegisteredSaver registered_saver = 4;
              */
             public Builder clearRegisteredSaver() {
    -          if (registeredSaverBuilder_ == null) {
    -            registeredSaver_ = null;
    -            onChanged();
    -          } else {
    -            registeredSaver_ = null;
    +          bitField0_ = (bitField0_ & ~0x00000008);
    +          registeredSaver_ = null;
    +          if (registeredSaverBuilder_ != null) {
    +            registeredSaverBuilder_.dispose();
                 registeredSaverBuilder_ = null;
               }
    -
    +          onChanged();
               return this;
             }
             /**
    @@ -4682,7 +4571,7 @@ public Builder clearRegisteredSaver() {
              * .tensorflow.RegisteredSaver registered_saver = 4;
              */
             public org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaver.Builder getRegisteredSaverBuilder() {
    -          
    +          bitField0_ |= 0x00000008;
               onChanged();
               return getRegisteredSaverFieldBuilder().getBuilder();
             }
    @@ -4710,11 +4599,11 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaverOrBuil
              *
              * .tensorflow.RegisteredSaver registered_saver = 4;
              */
    -        private com.google.protobuf.SingleFieldBuilderV3<
    +        private com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaver, org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaver.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaverOrBuilder> 
                 getRegisteredSaverFieldBuilder() {
               if (registeredSaverBuilder_ == null) {
    -            registeredSaverBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +            registeredSaverBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                     org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaver, org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaver.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaverOrBuilder>(
                         getRegisteredSaver(),
                         getParentForChildren(),
    @@ -4725,7 +4614,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaverOrBuil
             }
     
             private com.google.protobuf.BoolValue hasCheckpointValues_;
    -        private com.google.protobuf.SingleFieldBuilderV3<
    +        private com.google.protobuf.SingleFieldBuilder<
                 com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> hasCheckpointValuesBuilder_;
             /**
              * 
    @@ -4739,7 +4628,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaverOrBuil
              * @return Whether the hasCheckpointValues field is set.
              */
             public boolean hasHasCheckpointValues() {
    -          return hasCheckpointValuesBuilder_ != null || hasCheckpointValues_ != null;
    +          return ((bitField0_ & 0x00000010) != 0);
             }
             /**
              * 
    @@ -4775,11 +4664,11 @@ public Builder setHasCheckpointValues(com.google.protobuf.BoolValue value) {
                   throw new NullPointerException();
                 }
                 hasCheckpointValues_ = value;
    -            onChanged();
               } else {
                 hasCheckpointValuesBuilder_.setMessage(value);
               }
    -
    +          bitField0_ |= 0x00000010;
    +          onChanged();
               return this;
             }
             /**
    @@ -4796,11 +4685,11 @@ public Builder setHasCheckpointValues(
                 com.google.protobuf.BoolValue.Builder builderForValue) {
               if (hasCheckpointValuesBuilder_ == null) {
                 hasCheckpointValues_ = builderForValue.build();
    -            onChanged();
               } else {
                 hasCheckpointValuesBuilder_.setMessage(builderForValue.build());
               }
    -
    +          bitField0_ |= 0x00000010;
    +          onChanged();
               return this;
             }
             /**
    @@ -4815,17 +4704,20 @@ public Builder setHasCheckpointValues(
              */
             public Builder mergeHasCheckpointValues(com.google.protobuf.BoolValue value) {
               if (hasCheckpointValuesBuilder_ == null) {
    -            if (hasCheckpointValues_ != null) {
    -              hasCheckpointValues_ =
    -                com.google.protobuf.BoolValue.newBuilder(hasCheckpointValues_).mergeFrom(value).buildPartial();
    +            if (((bitField0_ & 0x00000010) != 0) &&
    +              hasCheckpointValues_ != null &&
    +              hasCheckpointValues_ != com.google.protobuf.BoolValue.getDefaultInstance()) {
    +              getHasCheckpointValuesBuilder().mergeFrom(value);
                 } else {
                   hasCheckpointValues_ = value;
                 }
    -            onChanged();
               } else {
                 hasCheckpointValuesBuilder_.mergeFrom(value);
               }
    -
    +          if (hasCheckpointValues_ != null) {
    +            bitField0_ |= 0x00000010;
    +            onChanged();
    +          }
               return this;
             }
             /**
    @@ -4839,14 +4731,13 @@ public Builder mergeHasCheckpointValues(com.google.protobuf.BoolValue value) {
              * .google.protobuf.BoolValue has_checkpoint_values = 5;
              */
             public Builder clearHasCheckpointValues() {
    -          if (hasCheckpointValuesBuilder_ == null) {
    -            hasCheckpointValues_ = null;
    -            onChanged();
    -          } else {
    -            hasCheckpointValues_ = null;
    +          bitField0_ = (bitField0_ & ~0x00000010);
    +          hasCheckpointValues_ = null;
    +          if (hasCheckpointValuesBuilder_ != null) {
    +            hasCheckpointValuesBuilder_.dispose();
                 hasCheckpointValuesBuilder_ = null;
               }
    -
    +          onChanged();
               return this;
             }
             /**
    @@ -4860,7 +4751,7 @@ public Builder clearHasCheckpointValues() {
              * .google.protobuf.BoolValue has_checkpoint_values = 5;
              */
             public com.google.protobuf.BoolValue.Builder getHasCheckpointValuesBuilder() {
    -          
    +          bitField0_ |= 0x00000010;
               onChanged();
               return getHasCheckpointValuesFieldBuilder().getBuilder();
             }
    @@ -4892,11 +4783,11 @@ public com.google.protobuf.BoolValueOrBuilder getHasCheckpointValuesOrBuilder()
              *
              * .google.protobuf.BoolValue has_checkpoint_values = 5;
              */
    -        private com.google.protobuf.SingleFieldBuilderV3<
    +        private com.google.protobuf.SingleFieldBuilder<
                 com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> 
                 getHasCheckpointValuesFieldBuilder() {
               if (hasCheckpointValuesBuilder_ == null) {
    -            hasCheckpointValuesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +            hasCheckpointValuesBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                     com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>(
                         getHasCheckpointValues(),
                         getParentForChildren(),
    @@ -4905,18 +4796,6 @@ public com.google.protobuf.BoolValueOrBuilder getHasCheckpointValuesOrBuilder()
               }
               return hasCheckpointValuesBuilder_;
             }
    -        @java.lang.Override
    -        public final Builder setUnknownFields(
    -            final com.google.protobuf.UnknownFieldSet unknownFields) {
    -          return super.setUnknownFields(unknownFields);
    -        }
    -
    -        @java.lang.Override
    -        public final Builder mergeUnknownFields(
    -            final com.google.protobuf.UnknownFieldSet unknownFields) {
    -          return super.mergeUnknownFields(unknownFields);
    -        }
    -
     
             // @@protoc_insertion_point(builder_scope:tensorflow.TrackableObjectGraph.TrackableObject)
           }
    @@ -4970,6 +4849,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.
         }
     
         public static final int NODES_FIELD_NUMBER = 1;
    +    @SuppressWarnings("serial")
         private java.util.List nodes_;
         /**
          * repeated .tensorflow.TrackableObjectGraph.TrackableObject nodes = 1;
    @@ -5110,39 +4990,41 @@ public static org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjec
         }
         public static org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -5162,7 +5044,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -5170,7 +5052,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.TrackableObjectGraph}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.TrackableObjectGraph)
             org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraphOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -5179,7 +5061,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.TrackableObjectGraphOuterClass.internal_static_tensorflow_TrackableObjectGraph_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -5192,13 +5074,14 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             if (nodesBuilder_ == null) {
               nodes_ = java.util.Collections.emptyList();
             } else {
    @@ -5232,7 +5115,13 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph
           @java.lang.Override
           public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph buildPartial() {
             org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph result = new org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph(this);
    -        int from_bitField0_ = bitField0_;
    +        buildPartialRepeatedFields(result);
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        onBuilt();
    +        return result;
    +      }
    +
    +      private void buildPartialRepeatedFields(org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph result) {
             if (nodesBuilder_ == null) {
               if (((bitField0_ & 0x00000001) != 0)) {
                 nodes_ = java.util.Collections.unmodifiableList(nodes_);
    @@ -5242,42 +5131,12 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph
             } else {
               result.nodes_ = nodesBuilder_.build();
             }
    -        onBuilt();
    -        return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph result) {
    +        int from_bitField0_ = bitField0_;
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph) {
    @@ -5309,7 +5168,7 @@ public Builder mergeFrom(org.tensorflow.proto.TrackableObjectGraphOuterClass.Tra
                   nodes_ = other.nodes_;
                   bitField0_ = (bitField0_ & ~0x00000001);
                   nodesBuilder_ = 
    -                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                        getNodesFieldBuilder() : null;
                 } else {
                   nodesBuilder_.addAllMessages(other.nodes_);
    @@ -5381,7 +5240,7 @@ private void ensureNodesIsMutable() {
              }
           }
     
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObjectOrBuilder> nodesBuilder_;
     
           /**
    @@ -5597,11 +5456,11 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.
                getNodesBuilderList() {
             return getNodesFieldBuilder().getBuilderList();
           }
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObjectOrBuilder> 
               getNodesFieldBuilder() {
             if (nodesBuilder_ == null) {
    -          nodesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +          nodesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                   org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObjectOrBuilder>(
                       nodes_,
                       ((bitField0_ & 0x00000001) != 0),
    @@ -5611,18 +5470,6 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.
             }
             return nodesBuilder_;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.TrackableObjectGraph)
         }
    @@ -5723,12 +5570,21 @@ public interface RegisteredSaverOrBuilder extends
        * Protobuf type {@code tensorflow.RegisteredSaver}
        */
       public static final class RegisteredSaver extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.RegisteredSaver)
           RegisteredSaverOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        RegisteredSaver.class.getName());
    +    }
         // Use RegisteredSaver.newBuilder() to construct.
    -    private RegisteredSaver(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private RegisteredSaver(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private RegisteredSaver() {
    @@ -5736,25 +5592,13 @@ private RegisteredSaver() {
           objectName_ = "";
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new RegisteredSaver();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.TrackableObjectGraphOuterClass.internal_static_tensorflow_RegisteredSaver_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.TrackableObjectGraphOuterClass.internal_static_tensorflow_RegisteredSaver_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -5762,7 +5606,8 @@ protected java.lang.Object newInstance(
         }
     
         public static final int NAME_FIELD_NUMBER = 1;
    -    private volatile java.lang.Object name_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object name_ = "";
         /**
          * 
          * The name of the registered saver/restore function.
    @@ -5808,7 +5653,8 @@ public java.lang.String getName() {
         }
     
         public static final int OBJECT_NAME_FIELD_NUMBER = 2;
    -    private volatile java.lang.Object objectName_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object objectName_ = "";
         /**
          * 
          * Unique auto-generated name of the object.
    @@ -5867,11 +5713,11 @@ public final boolean isInitialized() {
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output)
                             throws java.io.IOException {
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(objectName_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, objectName_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(objectName_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 2, objectName_);
           }
           getUnknownFields().writeTo(output);
         }
    @@ -5882,11 +5728,11 @@ public int getSerializedSize() {
           if (size != -1) return size;
     
           size = 0;
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(objectName_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, objectName_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(objectName_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, objectName_);
           }
           size += getUnknownFields().getSerializedSize();
           memoizedSize = size;
    @@ -5961,39 +5807,41 @@ public static org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSave
         }
         public static org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaver parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaver parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaver parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaver parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaver parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaver parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -6013,7 +5861,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -6021,7 +5869,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.RegisteredSaver}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.RegisteredSaver)
             org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaverOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -6030,7 +5878,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.TrackableObjectGraphOuterClass.internal_static_tensorflow_RegisteredSaver_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -6043,17 +5891,16 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             name_ = "";
    -
             objectName_ = "";
    -
             return this;
           }
     
    @@ -6080,44 +5927,21 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaver build
           @java.lang.Override
           public org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaver buildPartial() {
             org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaver result = new org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaver(this);
    -        result.name_ = name_;
    -        result.objectName_ = objectName_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaver result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.name_ = name_;
    +        }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.objectName_ = objectName_;
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaver) {
    @@ -6132,10 +5956,12 @@ public Builder mergeFrom(org.tensorflow.proto.TrackableObjectGraphOuterClass.Reg
             if (other == org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaver.getDefaultInstance()) return this;
             if (!other.getName().isEmpty()) {
               name_ = other.name_;
    +          bitField0_ |= 0x00000001;
               onChanged();
             }
             if (!other.getObjectName().isEmpty()) {
               objectName_ = other.objectName_;
    +          bitField0_ |= 0x00000002;
               onChanged();
             }
             this.mergeUnknownFields(other.getUnknownFields());
    @@ -6166,12 +5992,12 @@ public Builder mergeFrom(
                     break;
                   case 10: {
                     name_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 10
                   case 18: {
                     objectName_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 18
                   default: {
    @@ -6189,6 +6015,7 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    +      private int bitField0_;
     
           private java.lang.Object name_ = "";
           /**
    @@ -6243,11 +6070,9 @@ public java.lang.String getName() {
            */
           public Builder setName(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             name_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -6260,8 +6085,8 @@ public Builder setName(
            * @return This builder for chaining.
            */
           public Builder clearName() {
    -        
             name_ = getDefaultInstance().getName();
    +        bitField0_ = (bitField0_ & ~0x00000001);
             onChanged();
             return this;
           }
    @@ -6276,12 +6101,10 @@ public Builder clearName() {
            */
           public Builder setNameBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             name_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -6339,11 +6162,9 @@ public java.lang.String getObjectName() {
            */
           public Builder setObjectName(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             objectName_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -6356,8 +6177,8 @@ public Builder setObjectName(
            * @return This builder for chaining.
            */
           public Builder clearObjectName() {
    -        
             objectName_ = getDefaultInstance().getObjectName();
    +        bitField0_ = (bitField0_ & ~0x00000002);
             onChanged();
             return this;
           }
    @@ -6372,27 +6193,13 @@ public Builder clearObjectName() {
            */
           public Builder setObjectNameBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             objectName_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.RegisteredSaver)
         }
    @@ -6448,32 +6255,32 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaver getDe
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_TrackableObjectGraph_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_TrackableObjectGraph_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_TrackableObjectGraph_TrackableObject_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_TrackableObjectGraph_TrackableObject_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_TrackableObjectGraph_TrackableObject_ObjectReference_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_TrackableObjectGraph_TrackableObject_ObjectReference_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_TrackableObjectGraph_TrackableObject_SerializedTensor_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_TrackableObjectGraph_TrackableObject_SerializedTensor_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_TrackableObjectGraph_TrackableObject_SlotVariableReference_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_TrackableObjectGraph_TrackableObject_SlotVariableReference_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_RegisteredSaver_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_RegisteredSaver_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -6519,39 +6326,40 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaver getDe
         internal_static_tensorflow_TrackableObjectGraph_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_TrackableObjectGraph_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_TrackableObjectGraph_descriptor,
             new java.lang.String[] { "Nodes", });
         internal_static_tensorflow_TrackableObjectGraph_TrackableObject_descriptor =
           internal_static_tensorflow_TrackableObjectGraph_descriptor.getNestedTypes().get(0);
         internal_static_tensorflow_TrackableObjectGraph_TrackableObject_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_TrackableObjectGraph_TrackableObject_descriptor,
             new java.lang.String[] { "Children", "Attributes", "SlotVariables", "RegisteredSaver", "HasCheckpointValues", });
         internal_static_tensorflow_TrackableObjectGraph_TrackableObject_ObjectReference_descriptor =
           internal_static_tensorflow_TrackableObjectGraph_TrackableObject_descriptor.getNestedTypes().get(0);
         internal_static_tensorflow_TrackableObjectGraph_TrackableObject_ObjectReference_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_TrackableObjectGraph_TrackableObject_ObjectReference_descriptor,
             new java.lang.String[] { "NodeId", "LocalName", });
         internal_static_tensorflow_TrackableObjectGraph_TrackableObject_SerializedTensor_descriptor =
           internal_static_tensorflow_TrackableObjectGraph_TrackableObject_descriptor.getNestedTypes().get(1);
         internal_static_tensorflow_TrackableObjectGraph_TrackableObject_SerializedTensor_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_TrackableObjectGraph_TrackableObject_SerializedTensor_descriptor,
             new java.lang.String[] { "Name", "FullName", "CheckpointKey", });
         internal_static_tensorflow_TrackableObjectGraph_TrackableObject_SlotVariableReference_descriptor =
           internal_static_tensorflow_TrackableObjectGraph_TrackableObject_descriptor.getNestedTypes().get(2);
         internal_static_tensorflow_TrackableObjectGraph_TrackableObject_SlotVariableReference_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_TrackableObjectGraph_TrackableObject_SlotVariableReference_descriptor,
             new java.lang.String[] { "OriginalVariableNodeId", "SlotName", "SlotVariableNodeId", });
         internal_static_tensorflow_RegisteredSaver_descriptor =
           getDescriptor().getMessageTypes().get(1);
         internal_static_tensorflow_RegisteredSaver_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_RegisteredSaver_descriptor,
             new java.lang.String[] { "Name", "ObjectName", });
    +    descriptor.resolveAllFeaturesImmutable();
         com.google.protobuf.WrappersProto.getDescriptor();
       }
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TransportOptions.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TransportOptions.java
    index b5a1e8fde55..6f2d3dbb71d 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TransportOptions.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TransportOptions.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/transport_options.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class TransportOptions {
       private TransportOptions() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      TransportOptions.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -43,37 +54,34 @@ public interface RecvBufRespExtraOrBuilder extends
        * Protobuf type {@code tensorflow.RecvBufRespExtra}
        */
       public static final class RecvBufRespExtra extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.RecvBufRespExtra)
           RecvBufRespExtraOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        RecvBufRespExtra.class.getName());
    +    }
         // Use RecvBufRespExtra.newBuilder() to construct.
    -    private RecvBufRespExtra(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private RecvBufRespExtra(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private RecvBufRespExtra() {
    -      tensorContent_ = java.util.Collections.emptyList();
    -    }
    -
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new RecvBufRespExtra();
    +      tensorContent_ = emptyList(com.google.protobuf.ByteString.class);
         }
     
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.TransportOptions.internal_static_tensorflow_RecvBufRespExtra_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.TransportOptions.internal_static_tensorflow_RecvBufRespExtra_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -81,7 +89,9 @@ protected java.lang.Object newInstance(
         }
     
         public static final int TENSOR_CONTENT_FIELD_NUMBER = 1;
    -    private java.util.List tensorContent_;
    +    @SuppressWarnings("serial")
    +    private com.google.protobuf.Internal.ProtobufList tensorContent_ =
    +        emptyList(com.google.protobuf.ByteString.class);
         /**
          * repeated bytes tensor_content = 1;
          * @return A list containing the tensorContent.
    @@ -213,39 +223,41 @@ public static org.tensorflow.proto.TransportOptions.RecvBufRespExtra parseFrom(
         }
         public static org.tensorflow.proto.TransportOptions.RecvBufRespExtra parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.TransportOptions.RecvBufRespExtra parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.TransportOptions.RecvBufRespExtra parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.TransportOptions.RecvBufRespExtra parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.TransportOptions.RecvBufRespExtra parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.TransportOptions.RecvBufRespExtra parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -265,7 +277,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -277,7 +289,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.RecvBufRespExtra}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.RecvBufRespExtra)
             org.tensorflow.proto.TransportOptions.RecvBufRespExtraOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -286,7 +298,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.TransportOptions.internal_static_tensorflow_RecvBufRespExtra_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -299,15 +311,15 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    -        tensorContent_ = java.util.Collections.emptyList();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        bitField0_ = 0;
    +        tensorContent_ = emptyList(com.google.protobuf.ByteString.class);
             return this;
           }
     
    @@ -334,48 +346,19 @@ public org.tensorflow.proto.TransportOptions.RecvBufRespExtra build() {
           @java.lang.Override
           public org.tensorflow.proto.TransportOptions.RecvBufRespExtra buildPartial() {
             org.tensorflow.proto.TransportOptions.RecvBufRespExtra result = new org.tensorflow.proto.TransportOptions.RecvBufRespExtra(this);
    -        int from_bitField0_ = bitField0_;
    -        if (((bitField0_ & 0x00000001) != 0)) {
    -          tensorContent_ = java.util.Collections.unmodifiableList(tensorContent_);
    -          bitField0_ = (bitField0_ & ~0x00000001);
    -        }
    -        result.tensorContent_ = tensorContent_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.TransportOptions.RecvBufRespExtra result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          tensorContent_.makeImmutable();
    +          result.tensorContent_ = tensorContent_;
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.TransportOptions.RecvBufRespExtra) {
    @@ -391,7 +374,8 @@ public Builder mergeFrom(org.tensorflow.proto.TransportOptions.RecvBufRespExtra
             if (!other.tensorContent_.isEmpty()) {
               if (tensorContent_.isEmpty()) {
                 tensorContent_ = other.tensorContent_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            tensorContent_.makeImmutable();
    +            bitField0_ |= 0x00000001;
               } else {
                 ensureTensorContentIsMutable();
                 tensorContent_.addAll(other.tensorContent_);
    @@ -447,12 +431,12 @@ public Builder mergeFrom(
           }
           private int bitField0_;
     
    -      private java.util.List tensorContent_ = java.util.Collections.emptyList();
    +      private com.google.protobuf.Internal.ProtobufList tensorContent_ = emptyList(com.google.protobuf.ByteString.class);
           private void ensureTensorContentIsMutable() {
    -        if (!((bitField0_ & 0x00000001) != 0)) {
    -          tensorContent_ = new java.util.ArrayList(tensorContent_);
    -          bitField0_ |= 0x00000001;
    -         }
    +        if (!tensorContent_.isModifiable()) {
    +          tensorContent_ = makeMutableCopy(tensorContent_);
    +        }
    +        bitField0_ |= 0x00000001;
           }
           /**
            * repeated bytes tensor_content = 1;
    @@ -460,8 +444,8 @@ private void ensureTensorContentIsMutable() {
            */
           public java.util.List
               getTensorContentList() {
    -        return ((bitField0_ & 0x00000001) != 0) ?
    -                 java.util.Collections.unmodifiableList(tensorContent_) : tensorContent_;
    +        tensorContent_.makeImmutable();
    +        return tensorContent_;
           }
           /**
            * repeated bytes tensor_content = 1;
    @@ -486,11 +470,10 @@ public com.google.protobuf.ByteString getTensorContent(int index) {
            */
           public Builder setTensorContent(
               int index, com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureTensorContentIsMutable();
    +        if (value == null) { throw new NullPointerException(); }
    +        ensureTensorContentIsMutable();
             tensorContent_.set(index, value);
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -500,11 +483,10 @@ public Builder setTensorContent(
            * @return This builder for chaining.
            */
           public Builder addTensorContent(com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureTensorContentIsMutable();
    +        if (value == null) { throw new NullPointerException(); }
    +        ensureTensorContentIsMutable();
             tensorContent_.add(value);
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -518,6 +500,7 @@ public Builder addAllTensorContent(
             ensureTensorContentIsMutable();
             com.google.protobuf.AbstractMessageLite.Builder.addAll(
                 values, tensorContent_);
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -526,23 +509,11 @@ public Builder addAllTensorContent(
            * @return This builder for chaining.
            */
           public Builder clearTensorContent() {
    -        tensorContent_ = java.util.Collections.emptyList();
    +        tensorContent_ = emptyList(com.google.protobuf.ByteString.class);
             bitField0_ = (bitField0_ & ~0x00000001);
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.RecvBufRespExtra)
         }
    @@ -598,7 +569,7 @@ public org.tensorflow.proto.TransportOptions.RecvBufRespExtra getDefaultInstance
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_RecvBufRespExtra_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_RecvBufRespExtra_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -623,9 +594,10 @@ public org.tensorflow.proto.TransportOptions.RecvBufRespExtra getDefaultInstance
         internal_static_tensorflow_RecvBufRespExtra_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_RecvBufRespExtra_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_RecvBufRespExtra_descriptor,
             new java.lang.String[] { "TensorContent", });
    +    descriptor.resolveAllFeaturesImmutable();
       }
     
       // @@protoc_insertion_point(outer_class_scope)
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TypesProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TypesProtos.java
    index f148eb06cc2..262c275afad 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TypesProtos.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TypesProtos.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/types.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class TypesProtos {
       private TypesProtos() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      TypesProtos.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,7 +28,7 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_SerializedDType_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_SerializedDType_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -30,7 +41,7 @@ public static void registerAllExtensions(
         java.lang.String[] descriptorData = {
           "\n%tensorflow/core/framework/types.proto\022" +
           "\ntensorflow\"9\n\017SerializedDType\022&\n\010dataty" +
    -      "pe\030\001 \001(\0162\024.tensorflow.DataType*\306\007\n\010DataT" +
    +      "pe\030\001 \001(\0162\024.tensorflow.DataType*\251\t\n\010DataT" +
           "ype\022\016\n\nDT_INVALID\020\000\022\014\n\010DT_FLOAT\020\001\022\r\n\tDT_" +
           "DOUBLE\020\002\022\014\n\010DT_INT32\020\003\022\014\n\010DT_UINT8\020\004\022\014\n\010" +
           "DT_INT16\020\005\022\013\n\007DT_INT8\020\006\022\r\n\tDT_STRING\020\007\022\020" +
    @@ -41,24 +52,29 @@ public static void registerAllExtensions(
           "PLEX128\020\022\022\013\n\007DT_HALF\020\023\022\017\n\013DT_RESOURCE\020\024\022" +
           "\016\n\nDT_VARIANT\020\025\022\r\n\tDT_UINT32\020\026\022\r\n\tDT_UIN" +
           "T64\020\027\022\022\n\016DT_FLOAT8_E5M2\020\030\022\024\n\020DT_FLOAT8_E" +
    -      "4M3FN\020\031\022\013\n\007DT_INT4\020\035\022\014\n\010DT_UINT4\020\036\022\020\n\014DT" +
    -      "_FLOAT_REF\020e\022\021\n\rDT_DOUBLE_REF\020f\022\020\n\014DT_IN" +
    -      "T32_REF\020g\022\020\n\014DT_UINT8_REF\020h\022\020\n\014DT_INT16_" +
    -      "REF\020i\022\017\n\013DT_INT8_REF\020j\022\021\n\rDT_STRING_REF\020" +
    -      "k\022\024\n\020DT_COMPLEX64_REF\020l\022\020\n\014DT_INT64_REF\020" +
    -      "m\022\017\n\013DT_BOOL_REF\020n\022\020\n\014DT_QINT8_REF\020o\022\021\n\r" +
    -      "DT_QUINT8_REF\020p\022\021\n\rDT_QINT32_REF\020q\022\023\n\017DT" +
    -      "_BFLOAT16_REF\020r\022\021\n\rDT_QINT16_REF\020s\022\022\n\016DT" +
    -      "_QUINT16_REF\020t\022\021\n\rDT_UINT16_REF\020u\022\025\n\021DT_" +
    -      "COMPLEX128_REF\020v\022\017\n\013DT_HALF_REF\020w\022\023\n\017DT_" +
    -      "RESOURCE_REF\020x\022\022\n\016DT_VARIANT_REF\020y\022\021\n\rDT" +
    -      "_UINT32_REF\020z\022\021\n\rDT_UINT64_REF\020{\022\026\n\022DT_F" +
    -      "LOAT8_E5M2_REF\020|\022\030\n\024DT_FLOAT8_E4M3FN_REF" +
    -      "\020}\022\020\n\013DT_INT4_REF\020\201\001\022\021\n\014DT_UINT4_REF\020\202\001B" +
    -      "v\n\024org.tensorflow.protoB\013TypesProtosP\001ZL" +
    -      "github.com/tensorflow/tensorflow/tensorf" +
    -      "low/go/core/framework/types_go_proto\370\001\001b" +
    -      "\006proto3"
    +      "4M3FN\020\031\022\026\n\022DT_FLOAT8_E4M3FNUZ\020\032\022\031\n\025DT_FL" +
    +      "OAT8_E4M3B11FNUZ\020\033\022\026\n\022DT_FLOAT8_E5M2FNUZ" +
    +      "\020\034\022\013\n\007DT_INT4\020\035\022\014\n\010DT_UINT4\020\036\022\013\n\007DT_INT2" +
    +      "\020\037\022\014\n\010DT_UINT2\020 \022\020\n\014DT_FLOAT_REF\020e\022\021\n\rDT" +
    +      "_DOUBLE_REF\020f\022\020\n\014DT_INT32_REF\020g\022\020\n\014DT_UI" +
    +      "NT8_REF\020h\022\020\n\014DT_INT16_REF\020i\022\017\n\013DT_INT8_R" +
    +      "EF\020j\022\021\n\rDT_STRING_REF\020k\022\024\n\020DT_COMPLEX64_" +
    +      "REF\020l\022\020\n\014DT_INT64_REF\020m\022\017\n\013DT_BOOL_REF\020n" +
    +      "\022\020\n\014DT_QINT8_REF\020o\022\021\n\rDT_QUINT8_REF\020p\022\021\n" +
    +      "\rDT_QINT32_REF\020q\022\023\n\017DT_BFLOAT16_REF\020r\022\021\n" +
    +      "\rDT_QINT16_REF\020s\022\022\n\016DT_QUINT16_REF\020t\022\021\n\r" +
    +      "DT_UINT16_REF\020u\022\025\n\021DT_COMPLEX128_REF\020v\022\017" +
    +      "\n\013DT_HALF_REF\020w\022\023\n\017DT_RESOURCE_REF\020x\022\022\n\016" +
    +      "DT_VARIANT_REF\020y\022\021\n\rDT_UINT32_REF\020z\022\021\n\rD" +
    +      "T_UINT64_REF\020{\022\026\n\022DT_FLOAT8_E5M2_REF\020|\022\030" +
    +      "\n\024DT_FLOAT8_E4M3FN_REF\020}\022\032\n\026DT_FLOAT8_E4" +
    +      "M3FNUZ_REF\020~\022\035\n\031DT_FLOAT8_E4M3B11FNUZ_RE" +
    +      "F\020\177\022\033\n\026DT_FLOAT8_E5M2FNUZ_REF\020\200\001\022\020\n\013DT_I" +
    +      "NT4_REF\020\201\001\022\021\n\014DT_UINT4_REF\020\202\001\022\020\n\013DT_INT2" +
    +      "_REF\020\203\001\022\021\n\014DT_UINT2_REF\020\204\001Bv\n\024org.tensor" +
    +      "flow.protoB\013TypesProtosP\001ZLgithub.com/te" +
    +      "nsorflow/tensorflow/tensorflow/go/core/f" +
    +      "ramework/types_go_proto\370\001\001b\006proto3"
         };
         descriptor = com.google.protobuf.Descriptors.FileDescriptor
           .internalBuildGeneratedFileFrom(descriptorData,
    @@ -67,9 +83,10 @@ public static void registerAllExtensions(
         internal_static_tensorflow_SerializedDType_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_SerializedDType_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_SerializedDType_descriptor,
             new java.lang.String[] { "Datatype", });
    +    descriptor.resolveAllFeaturesImmutable();
       }
     
       // @@protoc_insertion_point(outer_class_scope)
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/UniformQuantOpsAttr.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/UniformQuantOpsAttr.java
    index fae59d0abb4..91595e4d9c8 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/UniformQuantOpsAttr.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/UniformQuantOpsAttr.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/util/quantization/uniform_quant_ops_attr.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class UniformQuantOpsAttr {
       private UniformQuantOpsAttr() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      UniformQuantOpsAttr.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -183,12 +194,21 @@ public interface UniformQuantizedConvolutionDimensionNumbersAttrOrBuilder extend
        * Protobuf type {@code tensorflow.UniformQuantizedConvolutionDimensionNumbersAttr}
        */
       public static final class UniformQuantizedConvolutionDimensionNumbersAttr extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.UniformQuantizedConvolutionDimensionNumbersAttr)
           UniformQuantizedConvolutionDimensionNumbersAttrOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        UniformQuantizedConvolutionDimensionNumbersAttr.class.getName());
    +    }
         // Use UniformQuantizedConvolutionDimensionNumbersAttr.newBuilder() to construct.
    -    private UniformQuantizedConvolutionDimensionNumbersAttr(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private UniformQuantizedConvolutionDimensionNumbersAttr(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private UniformQuantizedConvolutionDimensionNumbersAttr() {
    @@ -197,25 +217,13 @@ private UniformQuantizedConvolutionDimensionNumbersAttr() {
           outputSpatialDimensions_ = emptyLongList();
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new UniformQuantizedConvolutionDimensionNumbersAttr();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.UniformQuantOpsAttr.internal_static_tensorflow_UniformQuantizedConvolutionDimensionNumbersAttr_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.UniformQuantOpsAttr.internal_static_tensorflow_UniformQuantizedConvolutionDimensionNumbersAttr_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -223,7 +231,7 @@ protected java.lang.Object newInstance(
         }
     
         public static final int INPUT_BATCH_DIMENSION_FIELD_NUMBER = 1;
    -    private long inputBatchDimension_;
    +    private long inputBatchDimension_ = 0L;
         /**
          * 
          * The dimension that represents batch in the input.
    @@ -238,7 +246,7 @@ public long getInputBatchDimension() {
         }
     
         public static final int INPUT_FEATURE_DIMENSION_FIELD_NUMBER = 2;
    -    private long inputFeatureDimension_;
    +    private long inputFeatureDimension_ = 0L;
         /**
          * 
          * The dimension that represents features in the input.
    @@ -253,7 +261,9 @@ public long getInputFeatureDimension() {
         }
     
         public static final int INPUT_SPATIAL_DIMENSIONS_FIELD_NUMBER = 3;
    -    private com.google.protobuf.Internal.LongList inputSpatialDimensions_;
    +    @SuppressWarnings("serial")
    +    private com.google.protobuf.Internal.LongList inputSpatialDimensions_ =
    +        emptyLongList();
         /**
          * 
          * The dimensions that represents spatial dimensions in the input. Length must
    @@ -296,7 +306,7 @@ public long getInputSpatialDimensions(int index) {
         private int inputSpatialDimensionsMemoizedSerializedSize = -1;
     
         public static final int KERNEL_INPUT_FEATURE_DIMENSION_FIELD_NUMBER = 4;
    -    private long kernelInputFeatureDimension_;
    +    private long kernelInputFeatureDimension_ = 0L;
         /**
          * 
          * The dimension that represents input features in the kernel (rhs).
    @@ -311,7 +321,7 @@ public long getKernelInputFeatureDimension() {
         }
     
         public static final int KERNEL_OUTPUT_FEATURE_DIMENSION_FIELD_NUMBER = 5;
    -    private long kernelOutputFeatureDimension_;
    +    private long kernelOutputFeatureDimension_ = 0L;
         /**
          * 
          * The dimension that represents output features in the kernel (rhs).
    @@ -326,7 +336,9 @@ public long getKernelOutputFeatureDimension() {
         }
     
         public static final int KERNEL_SPATIAL_DIMENSIONS_FIELD_NUMBER = 6;
    -    private com.google.protobuf.Internal.LongList kernelSpatialDimensions_;
    +    @SuppressWarnings("serial")
    +    private com.google.protobuf.Internal.LongList kernelSpatialDimensions_ =
    +        emptyLongList();
         /**
          * 
          * The dimensions that represents spatial dimensions in the kernel (rhs).
    @@ -369,7 +381,7 @@ public long getKernelSpatialDimensions(int index) {
         private int kernelSpatialDimensionsMemoizedSerializedSize = -1;
     
         public static final int OUTPUT_BATCH_DIMENSION_FIELD_NUMBER = 7;
    -    private long outputBatchDimension_;
    +    private long outputBatchDimension_ = 0L;
         /**
          * 
          * The dimension that represents batch in the output.
    @@ -384,7 +396,7 @@ public long getOutputBatchDimension() {
         }
     
         public static final int OUTPUT_FEATURE_DIMENSION_FIELD_NUMBER = 8;
    -    private long outputFeatureDimension_;
    +    private long outputFeatureDimension_ = 0L;
         /**
          * 
          * The dimension that represents features in the output.
    @@ -399,7 +411,9 @@ public long getOutputFeatureDimension() {
         }
     
         public static final int OUTPUT_SPATIAL_DIMENSIONS_FIELD_NUMBER = 9;
    -    private com.google.protobuf.Internal.LongList outputSpatialDimensions_;
    +    @SuppressWarnings("serial")
    +    private com.google.protobuf.Internal.LongList outputSpatialDimensions_ =
    +        emptyLongList();
         /**
          * 
          * The dimensions that represents spatial dimensions in the output. Length
    @@ -683,39 +697,41 @@ public static org.tensorflow.proto.UniformQuantOpsAttr.UniformQuantizedConvoluti
         }
         public static org.tensorflow.proto.UniformQuantOpsAttr.UniformQuantizedConvolutionDimensionNumbersAttr parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.UniformQuantOpsAttr.UniformQuantizedConvolutionDimensionNumbersAttr parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.UniformQuantOpsAttr.UniformQuantizedConvolutionDimensionNumbersAttr parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.UniformQuantOpsAttr.UniformQuantizedConvolutionDimensionNumbersAttr parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.UniformQuantOpsAttr.UniformQuantizedConvolutionDimensionNumbersAttr parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.UniformQuantOpsAttr.UniformQuantizedConvolutionDimensionNumbersAttr parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -735,7 +751,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -748,7 +764,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.UniformQuantizedConvolutionDimensionNumbersAttr}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.UniformQuantizedConvolutionDimensionNumbersAttr)
             org.tensorflow.proto.UniformQuantOpsAttr.UniformQuantizedConvolutionDimensionNumbersAttrOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -757,7 +773,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.UniformQuantOpsAttr.internal_static_tensorflow_UniformQuantizedConvolutionDimensionNumbersAttr_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -770,31 +786,23 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             inputBatchDimension_ = 0L;
    -
             inputFeatureDimension_ = 0L;
    -
             inputSpatialDimensions_ = emptyLongList();
    -        bitField0_ = (bitField0_ & ~0x00000001);
             kernelInputFeatureDimension_ = 0L;
    -
             kernelOutputFeatureDimension_ = 0L;
    -
             kernelSpatialDimensions_ = emptyLongList();
    -        bitField0_ = (bitField0_ & ~0x00000002);
             outputBatchDimension_ = 0L;
    -
             outputFeatureDimension_ = 0L;
    -
             outputSpatialDimensions_ = emptyLongList();
    -        bitField0_ = (bitField0_ & ~0x00000004);
             return this;
           }
     
    @@ -821,64 +829,45 @@ public org.tensorflow.proto.UniformQuantOpsAttr.UniformQuantizedConvolutionDimen
           @java.lang.Override
           public org.tensorflow.proto.UniformQuantOpsAttr.UniformQuantizedConvolutionDimensionNumbersAttr buildPartial() {
             org.tensorflow.proto.UniformQuantOpsAttr.UniformQuantizedConvolutionDimensionNumbersAttr result = new org.tensorflow.proto.UniformQuantOpsAttr.UniformQuantizedConvolutionDimensionNumbersAttr(this);
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        onBuilt();
    +        return result;
    +      }
    +
    +      private void buildPartial0(org.tensorflow.proto.UniformQuantOpsAttr.UniformQuantizedConvolutionDimensionNumbersAttr result) {
             int from_bitField0_ = bitField0_;
    -        result.inputBatchDimension_ = inputBatchDimension_;
    -        result.inputFeatureDimension_ = inputFeatureDimension_;
    -        if (((bitField0_ & 0x00000001) != 0)) {
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.inputBatchDimension_ = inputBatchDimension_;
    +        }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.inputFeatureDimension_ = inputFeatureDimension_;
    +        }
    +        if (((from_bitField0_ & 0x00000004) != 0)) {
               inputSpatialDimensions_.makeImmutable();
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          result.inputSpatialDimensions_ = inputSpatialDimensions_;
    +        }
    +        if (((from_bitField0_ & 0x00000008) != 0)) {
    +          result.kernelInputFeatureDimension_ = kernelInputFeatureDimension_;
    +        }
    +        if (((from_bitField0_ & 0x00000010) != 0)) {
    +          result.kernelOutputFeatureDimension_ = kernelOutputFeatureDimension_;
             }
    -        result.inputSpatialDimensions_ = inputSpatialDimensions_;
    -        result.kernelInputFeatureDimension_ = kernelInputFeatureDimension_;
    -        result.kernelOutputFeatureDimension_ = kernelOutputFeatureDimension_;
    -        if (((bitField0_ & 0x00000002) != 0)) {
    +        if (((from_bitField0_ & 0x00000020) != 0)) {
               kernelSpatialDimensions_.makeImmutable();
    -          bitField0_ = (bitField0_ & ~0x00000002);
    +          result.kernelSpatialDimensions_ = kernelSpatialDimensions_;
    +        }
    +        if (((from_bitField0_ & 0x00000040) != 0)) {
    +          result.outputBatchDimension_ = outputBatchDimension_;
    +        }
    +        if (((from_bitField0_ & 0x00000080) != 0)) {
    +          result.outputFeatureDimension_ = outputFeatureDimension_;
             }
    -        result.kernelSpatialDimensions_ = kernelSpatialDimensions_;
    -        result.outputBatchDimension_ = outputBatchDimension_;
    -        result.outputFeatureDimension_ = outputFeatureDimension_;
    -        if (((bitField0_ & 0x00000004) != 0)) {
    +        if (((from_bitField0_ & 0x00000100) != 0)) {
               outputSpatialDimensions_.makeImmutable();
    -          bitField0_ = (bitField0_ & ~0x00000004);
    +          result.outputSpatialDimensions_ = outputSpatialDimensions_;
             }
    -        result.outputSpatialDimensions_ = outputSpatialDimensions_;
    -        onBuilt();
    -        return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    -      }
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.UniformQuantOpsAttr.UniformQuantizedConvolutionDimensionNumbersAttr) {
    @@ -900,7 +889,8 @@ public Builder mergeFrom(org.tensorflow.proto.UniformQuantOpsAttr.UniformQuantiz
             if (!other.inputSpatialDimensions_.isEmpty()) {
               if (inputSpatialDimensions_.isEmpty()) {
                 inputSpatialDimensions_ = other.inputSpatialDimensions_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            inputSpatialDimensions_.makeImmutable();
    +            bitField0_ |= 0x00000004;
               } else {
                 ensureInputSpatialDimensionsIsMutable();
                 inputSpatialDimensions_.addAll(other.inputSpatialDimensions_);
    @@ -916,7 +906,8 @@ public Builder mergeFrom(org.tensorflow.proto.UniformQuantOpsAttr.UniformQuantiz
             if (!other.kernelSpatialDimensions_.isEmpty()) {
               if (kernelSpatialDimensions_.isEmpty()) {
                 kernelSpatialDimensions_ = other.kernelSpatialDimensions_;
    -            bitField0_ = (bitField0_ & ~0x00000002);
    +            kernelSpatialDimensions_.makeImmutable();
    +            bitField0_ |= 0x00000020;
               } else {
                 ensureKernelSpatialDimensionsIsMutable();
                 kernelSpatialDimensions_.addAll(other.kernelSpatialDimensions_);
    @@ -932,7 +923,8 @@ public Builder mergeFrom(org.tensorflow.proto.UniformQuantOpsAttr.UniformQuantiz
             if (!other.outputSpatialDimensions_.isEmpty()) {
               if (outputSpatialDimensions_.isEmpty()) {
                 outputSpatialDimensions_ = other.outputSpatialDimensions_;
    -            bitField0_ = (bitField0_ & ~0x00000004);
    +            outputSpatialDimensions_.makeImmutable();
    +            bitField0_ |= 0x00000100;
               } else {
                 ensureOutputSpatialDimensionsIsMutable();
                 outputSpatialDimensions_.addAll(other.outputSpatialDimensions_);
    @@ -967,12 +959,12 @@ public Builder mergeFrom(
                     break;
                   case 8: {
                     inputBatchDimension_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 8
                   case 16: {
                     inputFeatureDimension_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 16
                   case 24: {
    @@ -993,12 +985,12 @@ public Builder mergeFrom(
                   } // case 26
                   case 32: {
                     kernelInputFeatureDimension_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000008;
                     break;
                   } // case 32
                   case 40: {
                     kernelOutputFeatureDimension_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000010;
                     break;
                   } // case 40
                   case 48: {
    @@ -1019,12 +1011,12 @@ public Builder mergeFrom(
                   } // case 50
                   case 56: {
                     outputBatchDimension_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000040;
                     break;
                   } // case 56
                   case 64: {
                     outputFeatureDimension_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000080;
                     break;
                   } // case 64
                   case 72: {
    @@ -1083,8 +1075,9 @@ public long getInputBatchDimension() {
            * @return This builder for chaining.
            */
           public Builder setInputBatchDimension(long value) {
    -        
    +
             inputBatchDimension_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -1097,7 +1090,7 @@ public Builder setInputBatchDimension(long value) {
            * @return This builder for chaining.
            */
           public Builder clearInputBatchDimension() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000001);
             inputBatchDimension_ = 0L;
             onChanged();
             return this;
    @@ -1126,8 +1119,9 @@ public long getInputFeatureDimension() {
            * @return This builder for chaining.
            */
           public Builder setInputFeatureDimension(long value) {
    -        
    +
             inputFeatureDimension_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -1140,7 +1134,7 @@ public Builder setInputFeatureDimension(long value) {
            * @return This builder for chaining.
            */
           public Builder clearInputFeatureDimension() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000002);
             inputFeatureDimension_ = 0L;
             onChanged();
             return this;
    @@ -1148,10 +1142,10 @@ public Builder clearInputFeatureDimension() {
     
           private com.google.protobuf.Internal.LongList inputSpatialDimensions_ = emptyLongList();
           private void ensureInputSpatialDimensionsIsMutable() {
    -        if (!((bitField0_ & 0x00000001) != 0)) {
    -          inputSpatialDimensions_ = mutableCopy(inputSpatialDimensions_);
    -          bitField0_ |= 0x00000001;
    -         }
    +        if (!inputSpatialDimensions_.isModifiable()) {
    +          inputSpatialDimensions_ = makeMutableCopy(inputSpatialDimensions_);
    +        }
    +        bitField0_ |= 0x00000004;
           }
           /**
            * 
    @@ -1164,8 +1158,8 @@ private void ensureInputSpatialDimensionsIsMutable() {
            */
           public java.util.List
               getInputSpatialDimensionsList() {
    -        return ((bitField0_ & 0x00000001) != 0) ?
    -                 java.util.Collections.unmodifiableList(inputSpatialDimensions_) : inputSpatialDimensions_;
    +        inputSpatialDimensions_.makeImmutable();
    +        return inputSpatialDimensions_;
           }
           /**
            * 
    @@ -1205,8 +1199,10 @@ public long getInputSpatialDimensions(int index) {
            */
           public Builder setInputSpatialDimensions(
               int index, long value) {
    +
             ensureInputSpatialDimensionsIsMutable();
             inputSpatialDimensions_.setLong(index, value);
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -1221,8 +1217,10 @@ public Builder setInputSpatialDimensions(
            * @return This builder for chaining.
            */
           public Builder addInputSpatialDimensions(long value) {
    +
             ensureInputSpatialDimensionsIsMutable();
             inputSpatialDimensions_.addLong(value);
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -1241,6 +1239,7 @@ public Builder addAllInputSpatialDimensions(
             ensureInputSpatialDimensionsIsMutable();
             com.google.protobuf.AbstractMessageLite.Builder.addAll(
                 values, inputSpatialDimensions_);
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -1255,7 +1254,7 @@ public Builder addAllInputSpatialDimensions(
            */
           public Builder clearInputSpatialDimensions() {
             inputSpatialDimensions_ = emptyLongList();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        bitField0_ = (bitField0_ & ~0x00000004);
             onChanged();
             return this;
           }
    @@ -1283,8 +1282,9 @@ public long getKernelInputFeatureDimension() {
            * @return This builder for chaining.
            */
           public Builder setKernelInputFeatureDimension(long value) {
    -        
    +
             kernelInputFeatureDimension_ = value;
    +        bitField0_ |= 0x00000008;
             onChanged();
             return this;
           }
    @@ -1297,7 +1297,7 @@ public Builder setKernelInputFeatureDimension(long value) {
            * @return This builder for chaining.
            */
           public Builder clearKernelInputFeatureDimension() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000008);
             kernelInputFeatureDimension_ = 0L;
             onChanged();
             return this;
    @@ -1326,8 +1326,9 @@ public long getKernelOutputFeatureDimension() {
            * @return This builder for chaining.
            */
           public Builder setKernelOutputFeatureDimension(long value) {
    -        
    +
             kernelOutputFeatureDimension_ = value;
    +        bitField0_ |= 0x00000010;
             onChanged();
             return this;
           }
    @@ -1340,7 +1341,7 @@ public Builder setKernelOutputFeatureDimension(long value) {
            * @return This builder for chaining.
            */
           public Builder clearKernelOutputFeatureDimension() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000010);
             kernelOutputFeatureDimension_ = 0L;
             onChanged();
             return this;
    @@ -1348,10 +1349,10 @@ public Builder clearKernelOutputFeatureDimension() {
     
           private com.google.protobuf.Internal.LongList kernelSpatialDimensions_ = emptyLongList();
           private void ensureKernelSpatialDimensionsIsMutable() {
    -        if (!((bitField0_ & 0x00000002) != 0)) {
    -          kernelSpatialDimensions_ = mutableCopy(kernelSpatialDimensions_);
    -          bitField0_ |= 0x00000002;
    -         }
    +        if (!kernelSpatialDimensions_.isModifiable()) {
    +          kernelSpatialDimensions_ = makeMutableCopy(kernelSpatialDimensions_);
    +        }
    +        bitField0_ |= 0x00000020;
           }
           /**
            * 
    @@ -1364,8 +1365,8 @@ private void ensureKernelSpatialDimensionsIsMutable() {
            */
           public java.util.List
               getKernelSpatialDimensionsList() {
    -        return ((bitField0_ & 0x00000002) != 0) ?
    -                 java.util.Collections.unmodifiableList(kernelSpatialDimensions_) : kernelSpatialDimensions_;
    +        kernelSpatialDimensions_.makeImmutable();
    +        return kernelSpatialDimensions_;
           }
           /**
            * 
    @@ -1405,8 +1406,10 @@ public long getKernelSpatialDimensions(int index) {
            */
           public Builder setKernelSpatialDimensions(
               int index, long value) {
    +
             ensureKernelSpatialDimensionsIsMutable();
             kernelSpatialDimensions_.setLong(index, value);
    +        bitField0_ |= 0x00000020;
             onChanged();
             return this;
           }
    @@ -1421,8 +1424,10 @@ public Builder setKernelSpatialDimensions(
            * @return This builder for chaining.
            */
           public Builder addKernelSpatialDimensions(long value) {
    +
             ensureKernelSpatialDimensionsIsMutable();
             kernelSpatialDimensions_.addLong(value);
    +        bitField0_ |= 0x00000020;
             onChanged();
             return this;
           }
    @@ -1441,6 +1446,7 @@ public Builder addAllKernelSpatialDimensions(
             ensureKernelSpatialDimensionsIsMutable();
             com.google.protobuf.AbstractMessageLite.Builder.addAll(
                 values, kernelSpatialDimensions_);
    +        bitField0_ |= 0x00000020;
             onChanged();
             return this;
           }
    @@ -1455,7 +1461,7 @@ public Builder addAllKernelSpatialDimensions(
            */
           public Builder clearKernelSpatialDimensions() {
             kernelSpatialDimensions_ = emptyLongList();
    -        bitField0_ = (bitField0_ & ~0x00000002);
    +        bitField0_ = (bitField0_ & ~0x00000020);
             onChanged();
             return this;
           }
    @@ -1483,8 +1489,9 @@ public long getOutputBatchDimension() {
            * @return This builder for chaining.
            */
           public Builder setOutputBatchDimension(long value) {
    -        
    +
             outputBatchDimension_ = value;
    +        bitField0_ |= 0x00000040;
             onChanged();
             return this;
           }
    @@ -1497,7 +1504,7 @@ public Builder setOutputBatchDimension(long value) {
            * @return This builder for chaining.
            */
           public Builder clearOutputBatchDimension() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000040);
             outputBatchDimension_ = 0L;
             onChanged();
             return this;
    @@ -1526,8 +1533,9 @@ public long getOutputFeatureDimension() {
            * @return This builder for chaining.
            */
           public Builder setOutputFeatureDimension(long value) {
    -        
    +
             outputFeatureDimension_ = value;
    +        bitField0_ |= 0x00000080;
             onChanged();
             return this;
           }
    @@ -1540,7 +1548,7 @@ public Builder setOutputFeatureDimension(long value) {
            * @return This builder for chaining.
            */
           public Builder clearOutputFeatureDimension() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000080);
             outputFeatureDimension_ = 0L;
             onChanged();
             return this;
    @@ -1548,10 +1556,10 @@ public Builder clearOutputFeatureDimension() {
     
           private com.google.protobuf.Internal.LongList outputSpatialDimensions_ = emptyLongList();
           private void ensureOutputSpatialDimensionsIsMutable() {
    -        if (!((bitField0_ & 0x00000004) != 0)) {
    -          outputSpatialDimensions_ = mutableCopy(outputSpatialDimensions_);
    -          bitField0_ |= 0x00000004;
    -         }
    +        if (!outputSpatialDimensions_.isModifiable()) {
    +          outputSpatialDimensions_ = makeMutableCopy(outputSpatialDimensions_);
    +        }
    +        bitField0_ |= 0x00000100;
           }
           /**
            * 
    @@ -1564,8 +1572,8 @@ private void ensureOutputSpatialDimensionsIsMutable() {
            */
           public java.util.List
               getOutputSpatialDimensionsList() {
    -        return ((bitField0_ & 0x00000004) != 0) ?
    -                 java.util.Collections.unmodifiableList(outputSpatialDimensions_) : outputSpatialDimensions_;
    +        outputSpatialDimensions_.makeImmutable();
    +        return outputSpatialDimensions_;
           }
           /**
            * 
    @@ -1605,8 +1613,10 @@ public long getOutputSpatialDimensions(int index) {
            */
           public Builder setOutputSpatialDimensions(
               int index, long value) {
    +
             ensureOutputSpatialDimensionsIsMutable();
             outputSpatialDimensions_.setLong(index, value);
    +        bitField0_ |= 0x00000100;
             onChanged();
             return this;
           }
    @@ -1621,8 +1631,10 @@ public Builder setOutputSpatialDimensions(
            * @return This builder for chaining.
            */
           public Builder addOutputSpatialDimensions(long value) {
    +
             ensureOutputSpatialDimensionsIsMutable();
             outputSpatialDimensions_.addLong(value);
    +        bitField0_ |= 0x00000100;
             onChanged();
             return this;
           }
    @@ -1641,6 +1653,7 @@ public Builder addAllOutputSpatialDimensions(
             ensureOutputSpatialDimensionsIsMutable();
             com.google.protobuf.AbstractMessageLite.Builder.addAll(
                 values, outputSpatialDimensions_);
    +        bitField0_ |= 0x00000100;
             onChanged();
             return this;
           }
    @@ -1655,22 +1668,10 @@ public Builder addAllOutputSpatialDimensions(
            */
           public Builder clearOutputSpatialDimensions() {
             outputSpatialDimensions_ = emptyLongList();
    -        bitField0_ = (bitField0_ & ~0x00000004);
    +        bitField0_ = (bitField0_ & ~0x00000100);
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.UniformQuantizedConvolutionDimensionNumbersAttr)
         }
    @@ -1726,7 +1727,7 @@ public org.tensorflow.proto.UniformQuantOpsAttr.UniformQuantizedConvolutionDimen
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_UniformQuantizedConvolutionDimensionNumbersAttr_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_UniformQuantizedConvolutionDimensionNumbersAttr_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -1760,9 +1761,10 @@ public org.tensorflow.proto.UniformQuantOpsAttr.UniformQuantizedConvolutionDimen
         internal_static_tensorflow_UniformQuantizedConvolutionDimensionNumbersAttr_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_UniformQuantizedConvolutionDimensionNumbersAttr_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_UniformQuantizedConvolutionDimensionNumbersAttr_descriptor,
             new java.lang.String[] { "InputBatchDimension", "InputFeatureDimension", "InputSpatialDimensions", "KernelInputFeatureDimension", "KernelOutputFeatureDimension", "KernelSpatialDimensions", "OutputBatchDimension", "OutputFeatureDimension", "OutputSpatialDimensions", });
    +    descriptor.resolveAllFeaturesImmutable();
       }
     
       // @@protoc_insertion_point(outer_class_scope)
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ValuesDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ValuesDef.java
    index 6379c55680b..6245af89c8c 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ValuesDef.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ValuesDef.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/control_flow.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,30 +13,28 @@
      * Protobuf type {@code tensorflow.ValuesDef}
      */
     public final class ValuesDef extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.ValuesDef)
         ValuesDefOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      ValuesDef.class.getName());
    +  }
       // Use ValuesDef.newBuilder() to construct.
    -  private ValuesDef(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private ValuesDef(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private ValuesDef() {
    -    values_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +    values_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new ValuesDef();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.ControlFlowProtos.internal_static_tensorflow_ValuesDef_descriptor;
    @@ -42,7 +42,7 @@ protected java.lang.Object newInstance(
     
       @SuppressWarnings({"rawtypes"})
       @java.lang.Override
    -  protected com.google.protobuf.MapField internalGetMapField(
    +  protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
           int number) {
         switch (number) {
           case 2:
    @@ -53,7 +53,7 @@ protected com.google.protobuf.MapField internalGetMapField(
         }
       }
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.ControlFlowProtos.internal_static_tensorflow_ValuesDef_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -61,7 +61,9 @@ protected com.google.protobuf.MapField internalGetMapField(
       }
     
       public static final int VALUES_FIELD_NUMBER = 1;
    -  private com.google.protobuf.LazyStringList values_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.LazyStringArrayList values_ =
    +      com.google.protobuf.LazyStringArrayList.emptyList();
       /**
        * 
        * Value names that have been seen in this context.
    @@ -123,6 +125,7 @@ private static final class ExternalValuesDefaultEntryHolder {
                     com.google.protobuf.WireFormat.FieldType.STRING,
                     "");
       }
    +  @SuppressWarnings("serial")
       private com.google.protobuf.MapField<
           java.lang.String, java.lang.String> externalValues_;
       private com.google.protobuf.MapField
    @@ -133,7 +136,6 @@ private static final class ExternalValuesDefaultEntryHolder {
         }
         return externalValues_;
       }
    -
       public int getExternalValuesCount() {
         return internalGetExternalValues().getMap().size();
       }
    @@ -144,7 +146,6 @@ public int getExternalValuesCount() {
        *
        * map<string, string> external_values = 2;
        */
    -
       @java.lang.Override
       public boolean containsExternalValues(
           java.lang.String key) {
    @@ -167,7 +168,6 @@ public java.util.Map getExternalValues() {
        * map<string, string> external_values = 2;
        */
       @java.lang.Override
    -
       public java.util.Map getExternalValuesMap() {
         return internalGetExternalValues().getMap();
       }
    @@ -179,10 +179,11 @@ public java.util.Map getExternalValuesMap()
        * map<string, string> external_values = 2;
        */
       @java.lang.Override
    -
    -  public java.lang.String getExternalValuesOrDefault(
    +  public /* nullable */
    +java.lang.String getExternalValuesOrDefault(
           java.lang.String key,
    -      java.lang.String defaultValue) {
    +      /* nullable */
    +java.lang.String defaultValue) {
         if (key == null) { throw new NullPointerException("map key"); }
         java.util.Map map =
             internalGetExternalValues().getMap();
    @@ -196,7 +197,6 @@ public java.lang.String getExternalValuesOrDefault(
        * map<string, string> external_values = 2;
        */
       @java.lang.Override
    -
       public java.lang.String getExternalValuesOrThrow(
           java.lang.String key) {
         if (key == null) { throw new NullPointerException("map key"); }
    @@ -223,9 +223,9 @@ public final boolean isInitialized() {
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
         for (int i = 0; i < values_.size(); i++) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, values_.getRaw(i));
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, values_.getRaw(i));
         }
    -    com.google.protobuf.GeneratedMessageV3
    +    com.google.protobuf.GeneratedMessage
           .serializeStringMapTo(
             output,
             internalGetExternalValues(),
    @@ -335,39 +335,41 @@ public static org.tensorflow.proto.ValuesDef parseFrom(
       }
       public static org.tensorflow.proto.ValuesDef parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.ValuesDef parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.ValuesDef parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.ValuesDef parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.ValuesDef parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.ValuesDef parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -387,7 +389,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -399,7 +401,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.ValuesDef}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.ValuesDef)
           org.tensorflow.proto.ValuesDefOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -408,7 +410,7 @@ public static final class Builder extends
         }
     
         @SuppressWarnings({"rawtypes"})
    -    protected com.google.protobuf.MapField internalGetMapField(
    +    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
             int number) {
           switch (number) {
             case 2:
    @@ -419,7 +421,7 @@ protected com.google.protobuf.MapField internalGetMapField(
           }
         }
         @SuppressWarnings({"rawtypes"})
    -    protected com.google.protobuf.MapField internalGetMutableMapField(
    +    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
             int number) {
           switch (number) {
             case 2:
    @@ -430,7 +432,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField(
           }
         }
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.ControlFlowProtos.internal_static_tensorflow_ValuesDef_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -443,15 +445,16 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    -      values_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      bitField0_ = 0;
    +      values_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
           internalGetMutableExternalValues().clear();
           return this;
         }
    @@ -479,50 +482,23 @@ public org.tensorflow.proto.ValuesDef build() {
         @java.lang.Override
         public org.tensorflow.proto.ValuesDef buildPartial() {
           org.tensorflow.proto.ValuesDef result = new org.tensorflow.proto.ValuesDef(this);
    -      int from_bitField0_ = bitField0_;
    -      if (((bitField0_ & 0x00000001) != 0)) {
    -        values_ = values_.getUnmodifiableView();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    -      }
    -      result.values_ = values_;
    -      result.externalValues_ = internalGetExternalValues();
    -      result.externalValues_.makeImmutable();
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.ValuesDef result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        values_.makeImmutable();
    +        result.values_ = values_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.externalValues_ = internalGetExternalValues();
    +        result.externalValues_.makeImmutable();
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.ValuesDef) {
    @@ -538,7 +514,7 @@ public Builder mergeFrom(org.tensorflow.proto.ValuesDef other) {
           if (!other.values_.isEmpty()) {
             if (values_.isEmpty()) {
               values_ = other.values_;
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ |= 0x00000001;
             } else {
               ensureValuesIsMutable();
               values_.addAll(other.values_);
    @@ -547,6 +523,7 @@ public Builder mergeFrom(org.tensorflow.proto.ValuesDef other) {
           }
           internalGetMutableExternalValues().mergeFrom(
               other.internalGetExternalValues());
    +      bitField0_ |= 0x00000002;
           this.mergeUnknownFields(other.getUnknownFields());
           onChanged();
           return this;
    @@ -585,6 +562,7 @@ public Builder mergeFrom(
                       ExternalValuesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
                   internalGetMutableExternalValues().getMutableMap().put(
                       externalValues__.getKey(), externalValues__.getValue());
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 default: {
    @@ -604,12 +582,13 @@ public Builder mergeFrom(
         }
         private int bitField0_;
     
    -    private com.google.protobuf.LazyStringList values_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +    private com.google.protobuf.LazyStringArrayList values_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         private void ensureValuesIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    +      if (!values_.isModifiable()) {
             values_ = new com.google.protobuf.LazyStringArrayList(values_);
    -        bitField0_ |= 0x00000001;
    -       }
    +      }
    +      bitField0_ |= 0x00000001;
         }
         /**
          * 
    @@ -621,7 +600,8 @@ private void ensureValuesIsMutable() {
          */
         public com.google.protobuf.ProtocolStringList
             getValuesList() {
    -      return values_.getUnmodifiableView();
    +      values_.makeImmutable();
    +      return values_;
         }
         /**
          * 
    @@ -671,11 +651,10 @@ public java.lang.String getValues(int index) {
          */
         public Builder setValues(
             int index, java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureValuesIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureValuesIsMutable();
           values_.set(index, value);
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -690,11 +669,10 @@ public Builder setValues(
          */
         public Builder addValues(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureValuesIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureValuesIsMutable();
           values_.add(value);
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -712,6 +690,7 @@ public Builder addAllValues(
           ensureValuesIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, values_);
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -724,8 +703,9 @@ public Builder addAllValues(
          * @return This builder for chaining.
          */
         public Builder clearValues() {
    -      values_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      values_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
    +      bitField0_ = (bitField0_ & ~0x00000001);;
           onChanged();
           return this;
         }
    @@ -740,12 +720,11 @@ public Builder clearValues() {
          */
         public Builder addValuesBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           ensureValuesIsMutable();
           values_.add(value);
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -753,7 +732,7 @@ public Builder addValuesBytes(
         private com.google.protobuf.MapField<
             java.lang.String, java.lang.String> externalValues_;
         private com.google.protobuf.MapField
    -    internalGetExternalValues() {
    +        internalGetExternalValues() {
           if (externalValues_ == null) {
             return com.google.protobuf.MapField.emptyMapField(
                 ExternalValuesDefaultEntryHolder.defaultEntry);
    @@ -761,8 +740,7 @@ public Builder addValuesBytes(
           return externalValues_;
         }
         private com.google.protobuf.MapField
    -    internalGetMutableExternalValues() {
    -      onChanged();;
    +        internalGetMutableExternalValues() {
           if (externalValues_ == null) {
             externalValues_ = com.google.protobuf.MapField.newMapField(
                 ExternalValuesDefaultEntryHolder.defaultEntry);
    @@ -770,9 +748,10 @@ public Builder addValuesBytes(
           if (!externalValues_.isMutable()) {
             externalValues_ = externalValues_.copy();
           }
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return externalValues_;
         }
    -
         public int getExternalValuesCount() {
           return internalGetExternalValues().getMap().size();
         }
    @@ -783,7 +762,6 @@ public int getExternalValuesCount() {
          *
          * map<string, string> external_values = 2;
          */
    -
         @java.lang.Override
         public boolean containsExternalValues(
             java.lang.String key) {
    @@ -806,7 +784,6 @@ public java.util.Map getExternalValues() {
          * map<string, string> external_values = 2;
          */
         @java.lang.Override
    -
         public java.util.Map getExternalValuesMap() {
           return internalGetExternalValues().getMap();
         }
    @@ -818,10 +795,11 @@ public java.util.Map getExternalValuesMap()
          * map<string, string> external_values = 2;
          */
         @java.lang.Override
    -
    -    public java.lang.String getExternalValuesOrDefault(
    +    public /* nullable */
    +java.lang.String getExternalValuesOrDefault(
             java.lang.String key,
    -        java.lang.String defaultValue) {
    +        /* nullable */
    +java.lang.String defaultValue) {
           if (key == null) { throw new NullPointerException("map key"); }
           java.util.Map map =
               internalGetExternalValues().getMap();
    @@ -835,7 +813,6 @@ public java.lang.String getExternalValuesOrDefault(
          * map<string, string> external_values = 2;
          */
         @java.lang.Override
    -
         public java.lang.String getExternalValuesOrThrow(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    @@ -846,8 +823,8 @@ public java.lang.String getExternalValuesOrThrow(
           }
           return map.get(key);
         }
    -
         public Builder clearExternalValues() {
    +      bitField0_ = (bitField0_ & ~0x00000002);
           internalGetMutableExternalValues().getMutableMap()
               .clear();
           return this;
    @@ -859,7 +836,6 @@ public Builder clearExternalValues() {
          *
          * map<string, string> external_values = 2;
          */
    -
         public Builder removeExternalValues(
             java.lang.String key) {
           if (key == null) { throw new NullPointerException("map key"); }
    @@ -872,7 +848,8 @@ public Builder removeExternalValues(
          */
         @java.lang.Deprecated
         public java.util.Map
    -    getMutableExternalValues() {
    +        getMutableExternalValues() {
    +      bitField0_ |= 0x00000002;
           return internalGetMutableExternalValues().getMutableMap();
         }
         /**
    @@ -886,12 +863,10 @@ public Builder putExternalValues(
             java.lang.String key,
             java.lang.String value) {
           if (key == null) { throw new NullPointerException("map key"); }
    -      if (value == null) {
    -  throw new NullPointerException("map value");
    -}
    -
    +      if (value == null) { throw new NullPointerException("map value"); }
           internalGetMutableExternalValues().getMutableMap()
               .put(key, value);
    +      bitField0_ |= 0x00000002;
           return this;
         }
         /**
    @@ -901,25 +876,13 @@ public Builder putExternalValues(
          *
          * map<string, string> external_values = 2;
          */
    -
         public Builder putAllExternalValues(
             java.util.Map values) {
           internalGetMutableExternalValues().getMutableMap()
               .putAll(values);
    +      bitField0_ |= 0x00000002;
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.ValuesDef)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ValuesDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ValuesDefOrBuilder.java
    index a97c7230af6..a664cecce7c 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ValuesDefOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ValuesDefOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/control_flow.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -87,7 +89,6 @@ boolean containsExternalValues(
        *
        * map<string, string> external_values = 2;
        */
    -
       /* nullable */
     java.lang.String getExternalValuesOrDefault(
           java.lang.String key,
    @@ -100,7 +101,6 @@ java.lang.String getExternalValuesOrDefault(
        *
        * map<string, string> external_values = 2;
        */
    -
       java.lang.String getExternalValuesOrThrow(
           java.lang.String key);
     }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VarLenFeatureProto.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VarLenFeatureProto.java
    index 2e08cee2dbf..15f8a3ade51 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VarLenFeatureProto.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VarLenFeatureProto.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/example/example_parser_configuration.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,12 +9,21 @@
      * Protobuf type {@code tensorflow.VarLenFeatureProto}
      */
     public final class VarLenFeatureProto extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.VarLenFeatureProto)
         VarLenFeatureProtoOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      VarLenFeatureProto.class.getName());
    +  }
       // Use VarLenFeatureProto.newBuilder() to construct.
    -  private VarLenFeatureProto(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private VarLenFeatureProto(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private VarLenFeatureProto() {
    @@ -22,25 +33,13 @@ private VarLenFeatureProto() {
         shapesOutputTensorName_ = "";
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new VarLenFeatureProto();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.ExampleParserConfigurationProtos.internal_static_tensorflow_VarLenFeatureProto_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.ExampleParserConfigurationProtos.internal_static_tensorflow_VarLenFeatureProto_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -48,7 +47,7 @@ protected java.lang.Object newInstance(
       }
     
       public static final int DTYPE_FIELD_NUMBER = 1;
    -  private int dtype_;
    +  private int dtype_ = 0;
       /**
        * .tensorflow.DataType dtype = 1;
        * @return The enum numeric value on the wire for dtype.
    @@ -61,13 +60,13 @@ protected java.lang.Object newInstance(
        * @return The dtype.
        */
       @java.lang.Override public org.tensorflow.proto.DataType getDtype() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(dtype_);
    +    org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(dtype_);
         return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
       }
     
       public static final int VALUES_OUTPUT_TENSOR_NAME_FIELD_NUMBER = 2;
    -  private volatile java.lang.Object valuesOutputTensorName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object valuesOutputTensorName_ = "";
       /**
        * string values_output_tensor_name = 2;
        * @return The valuesOutputTensorName.
    @@ -105,7 +104,8 @@ public java.lang.String getValuesOutputTensorName() {
       }
     
       public static final int INDICES_OUTPUT_TENSOR_NAME_FIELD_NUMBER = 3;
    -  private volatile java.lang.Object indicesOutputTensorName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object indicesOutputTensorName_ = "";
       /**
        * string indices_output_tensor_name = 3;
        * @return The indicesOutputTensorName.
    @@ -143,7 +143,8 @@ public java.lang.String getIndicesOutputTensorName() {
       }
     
       public static final int SHAPES_OUTPUT_TENSOR_NAME_FIELD_NUMBER = 4;
    -  private volatile java.lang.Object shapesOutputTensorName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object shapesOutputTensorName_ = "";
       /**
        * string shapes_output_tensor_name = 4;
        * @return The shapesOutputTensorName.
    @@ -197,14 +198,14 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         if (dtype_ != org.tensorflow.proto.DataType.DT_INVALID.getNumber()) {
           output.writeEnum(1, dtype_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(valuesOutputTensorName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, valuesOutputTensorName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(valuesOutputTensorName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 2, valuesOutputTensorName_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(indicesOutputTensorName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, indicesOutputTensorName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(indicesOutputTensorName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 3, indicesOutputTensorName_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shapesOutputTensorName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, shapesOutputTensorName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(shapesOutputTensorName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 4, shapesOutputTensorName_);
         }
         getUnknownFields().writeTo(output);
       }
    @@ -219,14 +220,14 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeEnumSize(1, dtype_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(valuesOutputTensorName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, valuesOutputTensorName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(valuesOutputTensorName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(2, valuesOutputTensorName_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(indicesOutputTensorName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, indicesOutputTensorName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(indicesOutputTensorName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(3, indicesOutputTensorName_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shapesOutputTensorName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, shapesOutputTensorName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(shapesOutputTensorName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(4, shapesOutputTensorName_);
         }
         size += getUnknownFields().getSerializedSize();
         memoizedSize = size;
    @@ -308,39 +309,41 @@ public static org.tensorflow.proto.VarLenFeatureProto parseFrom(
       }
       public static org.tensorflow.proto.VarLenFeatureProto parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.VarLenFeatureProto parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.VarLenFeatureProto parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.VarLenFeatureProto parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.VarLenFeatureProto parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.VarLenFeatureProto parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -360,7 +363,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -368,7 +371,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.VarLenFeatureProto}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.VarLenFeatureProto)
           org.tensorflow.proto.VarLenFeatureProtoOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -377,7 +380,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.ExampleParserConfigurationProtos.internal_static_tensorflow_VarLenFeatureProto_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -390,21 +393,18 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           dtype_ = 0;
    -
           valuesOutputTensorName_ = "";
    -
           indicesOutputTensorName_ = "";
    -
           shapesOutputTensorName_ = "";
    -
           return this;
         }
     
    @@ -431,46 +431,27 @@ public org.tensorflow.proto.VarLenFeatureProto build() {
         @java.lang.Override
         public org.tensorflow.proto.VarLenFeatureProto buildPartial() {
           org.tensorflow.proto.VarLenFeatureProto result = new org.tensorflow.proto.VarLenFeatureProto(this);
    -      result.dtype_ = dtype_;
    -      result.valuesOutputTensorName_ = valuesOutputTensorName_;
    -      result.indicesOutputTensorName_ = indicesOutputTensorName_;
    -      result.shapesOutputTensorName_ = shapesOutputTensorName_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.VarLenFeatureProto result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.dtype_ = dtype_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.valuesOutputTensorName_ = valuesOutputTensorName_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.indicesOutputTensorName_ = indicesOutputTensorName_;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.shapesOutputTensorName_ = shapesOutputTensorName_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.VarLenFeatureProto) {
    @@ -488,14 +469,17 @@ public Builder mergeFrom(org.tensorflow.proto.VarLenFeatureProto other) {
           }
           if (!other.getValuesOutputTensorName().isEmpty()) {
             valuesOutputTensorName_ = other.valuesOutputTensorName_;
    +        bitField0_ |= 0x00000002;
             onChanged();
           }
           if (!other.getIndicesOutputTensorName().isEmpty()) {
             indicesOutputTensorName_ = other.indicesOutputTensorName_;
    +        bitField0_ |= 0x00000004;
             onChanged();
           }
           if (!other.getShapesOutputTensorName().isEmpty()) {
             shapesOutputTensorName_ = other.shapesOutputTensorName_;
    +        bitField0_ |= 0x00000008;
             onChanged();
           }
           this.mergeUnknownFields(other.getUnknownFields());
    @@ -526,22 +510,22 @@ public Builder mergeFrom(
                   break;
                 case 8: {
                   dtype_ = input.readEnum();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 8
                 case 18: {
                   valuesOutputTensorName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 case 26: {
                   indicesOutputTensorName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 26
                 case 34: {
                   shapesOutputTensorName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 34
                 default: {
    @@ -559,6 +543,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private int dtype_ = 0;
         /**
    @@ -574,8 +559,8 @@ public Builder mergeFrom(
          * @return This builder for chaining.
          */
         public Builder setDtypeValue(int value) {
    -      
           dtype_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -585,8 +570,7 @@ public Builder setDtypeValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.DataType getDtype() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(dtype_);
    +      org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(dtype_);
           return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
         }
         /**
    @@ -598,7 +582,7 @@ public Builder setDtype(org.tensorflow.proto.DataType value) {
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00000001;
           dtype_ = value.getNumber();
           onChanged();
           return this;
    @@ -608,7 +592,7 @@ public Builder setDtype(org.tensorflow.proto.DataType value) {
          * @return This builder for chaining.
          */
         public Builder clearDtype() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000001);
           dtype_ = 0;
           onChanged();
           return this;
    @@ -655,11 +639,9 @@ public java.lang.String getValuesOutputTensorName() {
          */
         public Builder setValuesOutputTensorName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           valuesOutputTensorName_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -668,8 +650,8 @@ public Builder setValuesOutputTensorName(
          * @return This builder for chaining.
          */
         public Builder clearValuesOutputTensorName() {
    -      
           valuesOutputTensorName_ = getDefaultInstance().getValuesOutputTensorName();
    +      bitField0_ = (bitField0_ & ~0x00000002);
           onChanged();
           return this;
         }
    @@ -680,12 +662,10 @@ public Builder clearValuesOutputTensorName() {
          */
         public Builder setValuesOutputTensorNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           valuesOutputTensorName_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -731,11 +711,9 @@ public java.lang.String getIndicesOutputTensorName() {
          */
         public Builder setIndicesOutputTensorName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           indicesOutputTensorName_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -744,8 +722,8 @@ public Builder setIndicesOutputTensorName(
          * @return This builder for chaining.
          */
         public Builder clearIndicesOutputTensorName() {
    -      
           indicesOutputTensorName_ = getDefaultInstance().getIndicesOutputTensorName();
    +      bitField0_ = (bitField0_ & ~0x00000004);
           onChanged();
           return this;
         }
    @@ -756,12 +734,10 @@ public Builder clearIndicesOutputTensorName() {
          */
         public Builder setIndicesOutputTensorNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           indicesOutputTensorName_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -807,11 +783,9 @@ public java.lang.String getShapesOutputTensorName() {
          */
         public Builder setShapesOutputTensorName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           shapesOutputTensorName_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -820,8 +794,8 @@ public Builder setShapesOutputTensorName(
          * @return This builder for chaining.
          */
         public Builder clearShapesOutputTensorName() {
    -      
           shapesOutputTensorName_ = getDefaultInstance().getShapesOutputTensorName();
    +      bitField0_ = (bitField0_ & ~0x00000008);
           onChanged();
           return this;
         }
    @@ -832,27 +806,13 @@ public Builder clearShapesOutputTensorName() {
          */
         public Builder setShapesOutputTensorNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           shapesOutputTensorName_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.VarLenFeatureProto)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VarLenFeatureProtoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VarLenFeatureProtoOrBuilder.java
    index fb30c882fb0..dfd0c8e932d 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VarLenFeatureProtoOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VarLenFeatureProtoOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/example/example_parser_configuration.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableAggregation.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableAggregation.java
    index 9372c9c5548..1b2f657469d 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableAggregation.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableAggregation.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/variable.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -51,6 +53,15 @@ public enum VariableAggregation
       UNRECOGNIZED(-1),
       ;
     
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      VariableAggregation.class.getName());
    +  }
       /**
        * 
        * `NONE`: This is the default, giving an error if you use a
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableDef.java
    index e0ce4931dd0..05fa166a1a0 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableDef.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableDef.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/variable.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,12 +13,21 @@
      * Protobuf type {@code tensorflow.VariableDef}
      */
     public final class VariableDef extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.VariableDef)
         VariableDefOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      VariableDef.class.getName());
    +  }
       // Use VariableDef.newBuilder() to construct.
    -  private VariableDef(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private VariableDef(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private VariableDef() {
    @@ -28,33 +39,23 @@ private VariableDef() {
         aggregation_ = 0;
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new VariableDef();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.VariableProtos.internal_static_tensorflow_VariableDef_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.VariableProtos.internal_static_tensorflow_VariableDef_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
                 org.tensorflow.proto.VariableDef.class, org.tensorflow.proto.VariableDef.Builder.class);
       }
     
    +  private int bitField0_;
       public static final int VARIABLE_NAME_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object variableName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object variableName_ = "";
       /**
        * 
        * Name of the variable tensor.
    @@ -100,7 +101,8 @@ public java.lang.String getVariableName() {
       }
     
       public static final int INITIAL_VALUE_NAME_FIELD_NUMBER = 6;
    -  private volatile java.lang.Object initialValueName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object initialValueName_ = "";
       /**
        * 
        * Name of the tensor holding the variable's initial value.
    @@ -146,7 +148,8 @@ public java.lang.String getInitialValueName() {
       }
     
       public static final int INITIALIZER_NAME_FIELD_NUMBER = 2;
    -  private volatile java.lang.Object initializerName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object initializerName_ = "";
       /**
        * 
        * Name of the initializer op.
    @@ -192,7 +195,8 @@ public java.lang.String getInitializerName() {
       }
     
       public static final int SNAPSHOT_NAME_FIELD_NUMBER = 3;
    -  private volatile java.lang.Object snapshotName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object snapshotName_ = "";
       /**
        * 
        * Name of the snapshot tensor.
    @@ -249,7 +253,7 @@ public java.lang.String getSnapshotName() {
        */
       @java.lang.Override
       public boolean hasSaveSliceInfoDef() {
    -    return saveSliceInfoDef_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * 
    @@ -272,11 +276,11 @@ public org.tensorflow.proto.SaveSliceInfoDef getSaveSliceInfoDef() {
        */
       @java.lang.Override
       public org.tensorflow.proto.SaveSliceInfoDefOrBuilder getSaveSliceInfoDefOrBuilder() {
    -    return getSaveSliceInfoDef();
    +    return saveSliceInfoDef_ == null ? org.tensorflow.proto.SaveSliceInfoDef.getDefaultInstance() : saveSliceInfoDef_;
       }
     
       public static final int IS_RESOURCE_FIELD_NUMBER = 5;
    -  private boolean isResource_;
    +  private boolean isResource_ = false;
       /**
        * 
        * Whether to represent this as a ResourceVariable.
    @@ -291,7 +295,7 @@ public boolean getIsResource() {
       }
     
       public static final int TRAINABLE_FIELD_NUMBER = 7;
    -  private boolean trainable_;
    +  private boolean trainable_ = false;
       /**
        * 
        * Whether this variable should be trained.
    @@ -306,7 +310,7 @@ public boolean getTrainable() {
       }
     
       public static final int SYNCHRONIZATION_FIELD_NUMBER = 8;
    -  private int synchronization_;
    +  private int synchronization_ = 0;
       /**
        * 
        * Indicates when a distributed variable will be synced.
    @@ -327,13 +331,12 @@ public boolean getTrainable() {
        * @return The synchronization.
        */
       @java.lang.Override public org.tensorflow.proto.VariableSynchronization getSynchronization() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.VariableSynchronization result = org.tensorflow.proto.VariableSynchronization.valueOf(synchronization_);
    +    org.tensorflow.proto.VariableSynchronization result = org.tensorflow.proto.VariableSynchronization.forNumber(synchronization_);
         return result == null ? org.tensorflow.proto.VariableSynchronization.UNRECOGNIZED : result;
       }
     
       public static final int AGGREGATION_FIELD_NUMBER = 9;
    -  private int aggregation_;
    +  private int aggregation_ = 0;
       /**
        * 
        * Indicates how a distributed variable will be aggregated.
    @@ -354,8 +357,7 @@ public boolean getTrainable() {
        * @return The aggregation.
        */
       @java.lang.Override public org.tensorflow.proto.VariableAggregation getAggregation() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.VariableAggregation result = org.tensorflow.proto.VariableAggregation.valueOf(aggregation_);
    +    org.tensorflow.proto.VariableAggregation result = org.tensorflow.proto.VariableAggregation.forNumber(aggregation_);
         return result == null ? org.tensorflow.proto.VariableAggregation.UNRECOGNIZED : result;
       }
     
    @@ -373,23 +375,23 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(variableName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, variableName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(variableName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, variableName_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(initializerName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, initializerName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(initializerName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 2, initializerName_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(snapshotName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, snapshotName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(snapshotName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 3, snapshotName_);
         }
    -    if (saveSliceInfoDef_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(4, getSaveSliceInfoDef());
         }
         if (isResource_ != false) {
           output.writeBool(5, isResource_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(initialValueName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, initialValueName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(initialValueName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 6, initialValueName_);
         }
         if (trainable_ != false) {
           output.writeBool(7, trainable_);
    @@ -409,16 +411,16 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(variableName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, variableName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(variableName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, variableName_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(initializerName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, initializerName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(initializerName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(2, initializerName_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(snapshotName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, snapshotName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(snapshotName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(3, snapshotName_);
         }
    -    if (saveSliceInfoDef_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(4, getSaveSliceInfoDef());
         }
    @@ -426,8 +428,8 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeBoolSize(5, isResource_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(initialValueName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, initialValueName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(initialValueName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(6, initialValueName_);
         }
         if (trainable_ != false) {
           size += com.google.protobuf.CodedOutputStream
    @@ -547,39 +549,41 @@ public static org.tensorflow.proto.VariableDef parseFrom(
       }
       public static org.tensorflow.proto.VariableDef parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.VariableDef parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.VariableDef parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.VariableDef parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.VariableDef parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.VariableDef parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -599,7 +603,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -611,7 +615,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.VariableDef}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.VariableDef)
           org.tensorflow.proto.VariableDefOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -620,7 +624,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.VariableProtos.internal_static_tensorflow_VariableDef_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -629,39 +633,37 @@ public static final class Builder extends
     
         // Construct using org.tensorflow.proto.VariableDef.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getSaveSliceInfoDefFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           variableName_ = "";
    -
           initialValueName_ = "";
    -
           initializerName_ = "";
    -
           snapshotName_ = "";
    -
    -      if (saveSliceInfoDefBuilder_ == null) {
    -        saveSliceInfoDef_ = null;
    -      } else {
    -        saveSliceInfoDef_ = null;
    +      saveSliceInfoDef_ = null;
    +      if (saveSliceInfoDefBuilder_ != null) {
    +        saveSliceInfoDefBuilder_.dispose();
             saveSliceInfoDefBuilder_ = null;
           }
           isResource_ = false;
    -
           trainable_ = false;
    -
           synchronization_ = 0;
    -
           aggregation_ = 0;
    -
           return this;
         }
     
    @@ -688,55 +690,47 @@ public org.tensorflow.proto.VariableDef build() {
         @java.lang.Override
         public org.tensorflow.proto.VariableDef buildPartial() {
           org.tensorflow.proto.VariableDef result = new org.tensorflow.proto.VariableDef(this);
    -      result.variableName_ = variableName_;
    -      result.initialValueName_ = initialValueName_;
    -      result.initializerName_ = initializerName_;
    -      result.snapshotName_ = snapshotName_;
    -      if (saveSliceInfoDefBuilder_ == null) {
    -        result.saveSliceInfoDef_ = saveSliceInfoDef_;
    -      } else {
    -        result.saveSliceInfoDef_ = saveSliceInfoDefBuilder_.build();
    -      }
    -      result.isResource_ = isResource_;
    -      result.trainable_ = trainable_;
    -      result.synchronization_ = synchronization_;
    -      result.aggregation_ = aggregation_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.VariableDef result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.variableName_ = variableName_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.initialValueName_ = initialValueName_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.initializerName_ = initializerName_;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.snapshotName_ = snapshotName_;
    +      }
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000010) != 0)) {
    +        result.saveSliceInfoDef_ = saveSliceInfoDefBuilder_ == null
    +            ? saveSliceInfoDef_
    +            : saveSliceInfoDefBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
    +      }
    +      if (((from_bitField0_ & 0x00000020) != 0)) {
    +        result.isResource_ = isResource_;
    +      }
    +      if (((from_bitField0_ & 0x00000040) != 0)) {
    +        result.trainable_ = trainable_;
    +      }
    +      if (((from_bitField0_ & 0x00000080) != 0)) {
    +        result.synchronization_ = synchronization_;
    +      }
    +      if (((from_bitField0_ & 0x00000100) != 0)) {
    +        result.aggregation_ = aggregation_;
    +      }
    +      result.bitField0_ |= to_bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.VariableDef) {
    @@ -751,18 +745,22 @@ public Builder mergeFrom(org.tensorflow.proto.VariableDef other) {
           if (other == org.tensorflow.proto.VariableDef.getDefaultInstance()) return this;
           if (!other.getVariableName().isEmpty()) {
             variableName_ = other.variableName_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (!other.getInitialValueName().isEmpty()) {
             initialValueName_ = other.initialValueName_;
    +        bitField0_ |= 0x00000002;
             onChanged();
           }
           if (!other.getInitializerName().isEmpty()) {
             initializerName_ = other.initializerName_;
    +        bitField0_ |= 0x00000004;
             onChanged();
           }
           if (!other.getSnapshotName().isEmpty()) {
             snapshotName_ = other.snapshotName_;
    +        bitField0_ |= 0x00000008;
             onChanged();
           }
           if (other.hasSaveSliceInfoDef()) {
    @@ -808,49 +806,49 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   variableName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
                   initializerName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 18
                 case 26: {
                   snapshotName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 26
                 case 34: {
                   input.readMessage(
                       getSaveSliceInfoDefFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000010;
                   break;
                 } // case 34
                 case 40: {
                   isResource_ = input.readBool();
    -
    +              bitField0_ |= 0x00000020;
                   break;
                 } // case 40
                 case 50: {
                   initialValueName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 50
                 case 56: {
                   trainable_ = input.readBool();
    -
    +              bitField0_ |= 0x00000040;
                   break;
                 } // case 56
                 case 64: {
                   synchronization_ = input.readEnum();
    -
    +              bitField0_ |= 0x00000080;
                   break;
                 } // case 64
                 case 72: {
                   aggregation_ = input.readEnum();
    -
    +              bitField0_ |= 0x00000100;
                   break;
                 } // case 72
                 default: {
    @@ -868,6 +866,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private java.lang.Object variableName_ = "";
         /**
    @@ -922,11 +921,9 @@ public java.lang.String getVariableName() {
          */
         public Builder setVariableName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           variableName_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -939,8 +936,8 @@ public Builder setVariableName(
          * @return This builder for chaining.
          */
         public Builder clearVariableName() {
    -      
           variableName_ = getDefaultInstance().getVariableName();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -955,12 +952,10 @@ public Builder clearVariableName() {
          */
         public Builder setVariableNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           variableName_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -1018,11 +1013,9 @@ public java.lang.String getInitialValueName() {
          */
         public Builder setInitialValueName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           initialValueName_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -1035,8 +1028,8 @@ public Builder setInitialValueName(
          * @return This builder for chaining.
          */
         public Builder clearInitialValueName() {
    -      
           initialValueName_ = getDefaultInstance().getInitialValueName();
    +      bitField0_ = (bitField0_ & ~0x00000002);
           onChanged();
           return this;
         }
    @@ -1051,12 +1044,10 @@ public Builder clearInitialValueName() {
          */
         public Builder setInitialValueNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           initialValueName_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -1114,11 +1105,9 @@ public java.lang.String getInitializerName() {
          */
         public Builder setInitializerName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           initializerName_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -1131,8 +1120,8 @@ public Builder setInitializerName(
          * @return This builder for chaining.
          */
         public Builder clearInitializerName() {
    -      
           initializerName_ = getDefaultInstance().getInitializerName();
    +      bitField0_ = (bitField0_ & ~0x00000004);
           onChanged();
           return this;
         }
    @@ -1147,12 +1136,10 @@ public Builder clearInitializerName() {
          */
         public Builder setInitializerNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           initializerName_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -1210,11 +1197,9 @@ public java.lang.String getSnapshotName() {
          */
         public Builder setSnapshotName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           snapshotName_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -1227,8 +1212,8 @@ public Builder setSnapshotName(
          * @return This builder for chaining.
          */
         public Builder clearSnapshotName() {
    -      
           snapshotName_ = getDefaultInstance().getSnapshotName();
    +      bitField0_ = (bitField0_ & ~0x00000008);
           onChanged();
           return this;
         }
    @@ -1243,18 +1228,16 @@ public Builder clearSnapshotName() {
          */
         public Builder setSnapshotNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           snapshotName_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
     
         private org.tensorflow.proto.SaveSliceInfoDef saveSliceInfoDef_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.SaveSliceInfoDef, org.tensorflow.proto.SaveSliceInfoDef.Builder, org.tensorflow.proto.SaveSliceInfoDefOrBuilder> saveSliceInfoDefBuilder_;
         /**
          * 
    @@ -1265,7 +1248,7 @@ public Builder setSnapshotNameBytes(
          * @return Whether the saveSliceInfoDef field is set.
          */
         public boolean hasSaveSliceInfoDef() {
    -      return saveSliceInfoDefBuilder_ != null || saveSliceInfoDef_ != null;
    +      return ((bitField0_ & 0x00000010) != 0);
         }
         /**
          * 
    @@ -1295,11 +1278,11 @@ public Builder setSaveSliceInfoDef(org.tensorflow.proto.SaveSliceInfoDef value)
               throw new NullPointerException();
             }
             saveSliceInfoDef_ = value;
    -        onChanged();
           } else {
             saveSliceInfoDefBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000010;
    +      onChanged();
           return this;
         }
         /**
    @@ -1313,11 +1296,11 @@ public Builder setSaveSliceInfoDef(
             org.tensorflow.proto.SaveSliceInfoDef.Builder builderForValue) {
           if (saveSliceInfoDefBuilder_ == null) {
             saveSliceInfoDef_ = builderForValue.build();
    -        onChanged();
           } else {
             saveSliceInfoDefBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000010;
    +      onChanged();
           return this;
         }
         /**
    @@ -1329,17 +1312,20 @@ public Builder setSaveSliceInfoDef(
          */
         public Builder mergeSaveSliceInfoDef(org.tensorflow.proto.SaveSliceInfoDef value) {
           if (saveSliceInfoDefBuilder_ == null) {
    -        if (saveSliceInfoDef_ != null) {
    -          saveSliceInfoDef_ =
    -            org.tensorflow.proto.SaveSliceInfoDef.newBuilder(saveSliceInfoDef_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000010) != 0) &&
    +          saveSliceInfoDef_ != null &&
    +          saveSliceInfoDef_ != org.tensorflow.proto.SaveSliceInfoDef.getDefaultInstance()) {
    +          getSaveSliceInfoDefBuilder().mergeFrom(value);
             } else {
               saveSliceInfoDef_ = value;
             }
    -        onChanged();
           } else {
             saveSliceInfoDefBuilder_.mergeFrom(value);
           }
    -
    +      if (saveSliceInfoDef_ != null) {
    +        bitField0_ |= 0x00000010;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -1350,14 +1336,13 @@ public Builder mergeSaveSliceInfoDef(org.tensorflow.proto.SaveSliceInfoDef value
          * .tensorflow.SaveSliceInfoDef save_slice_info_def = 4;
          */
         public Builder clearSaveSliceInfoDef() {
    -      if (saveSliceInfoDefBuilder_ == null) {
    -        saveSliceInfoDef_ = null;
    -        onChanged();
    -      } else {
    -        saveSliceInfoDef_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000010);
    +      saveSliceInfoDef_ = null;
    +      if (saveSliceInfoDefBuilder_ != null) {
    +        saveSliceInfoDefBuilder_.dispose();
             saveSliceInfoDefBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -1368,7 +1353,7 @@ public Builder clearSaveSliceInfoDef() {
          * .tensorflow.SaveSliceInfoDef save_slice_info_def = 4;
          */
         public org.tensorflow.proto.SaveSliceInfoDef.Builder getSaveSliceInfoDefBuilder() {
    -      
    +      bitField0_ |= 0x00000010;
           onChanged();
           return getSaveSliceInfoDefFieldBuilder().getBuilder();
         }
    @@ -1394,11 +1379,11 @@ public org.tensorflow.proto.SaveSliceInfoDefOrBuilder getSaveSliceInfoDefOrBuild
          *
          * .tensorflow.SaveSliceInfoDef save_slice_info_def = 4;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.SaveSliceInfoDef, org.tensorflow.proto.SaveSliceInfoDef.Builder, org.tensorflow.proto.SaveSliceInfoDefOrBuilder> 
             getSaveSliceInfoDefFieldBuilder() {
           if (saveSliceInfoDefBuilder_ == null) {
    -        saveSliceInfoDefBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        saveSliceInfoDefBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.SaveSliceInfoDef, org.tensorflow.proto.SaveSliceInfoDef.Builder, org.tensorflow.proto.SaveSliceInfoDefOrBuilder>(
                     getSaveSliceInfoDef(),
                     getParentForChildren(),
    @@ -1431,8 +1416,9 @@ public boolean getIsResource() {
          * @return This builder for chaining.
          */
         public Builder setIsResource(boolean value) {
    -      
    +
           isResource_ = value;
    +      bitField0_ |= 0x00000020;
           onChanged();
           return this;
         }
    @@ -1445,7 +1431,7 @@ public Builder setIsResource(boolean value) {
          * @return This builder for chaining.
          */
         public Builder clearIsResource() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000020);
           isResource_ = false;
           onChanged();
           return this;
    @@ -1474,8 +1460,9 @@ public boolean getTrainable() {
          * @return This builder for chaining.
          */
         public Builder setTrainable(boolean value) {
    -      
    +
           trainable_ = value;
    +      bitField0_ |= 0x00000040;
           onChanged();
           return this;
         }
    @@ -1488,7 +1475,7 @@ public Builder setTrainable(boolean value) {
          * @return This builder for chaining.
          */
         public Builder clearTrainable() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000040);
           trainable_ = false;
           onChanged();
           return this;
    @@ -1516,8 +1503,8 @@ public Builder clearTrainable() {
          * @return This builder for chaining.
          */
         public Builder setSynchronizationValue(int value) {
    -      
           synchronization_ = value;
    +      bitField0_ |= 0x00000080;
           onChanged();
           return this;
         }
    @@ -1531,8 +1518,7 @@ public Builder setSynchronizationValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.VariableSynchronization getSynchronization() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.VariableSynchronization result = org.tensorflow.proto.VariableSynchronization.valueOf(synchronization_);
    +      org.tensorflow.proto.VariableSynchronization result = org.tensorflow.proto.VariableSynchronization.forNumber(synchronization_);
           return result == null ? org.tensorflow.proto.VariableSynchronization.UNRECOGNIZED : result;
         }
         /**
    @@ -1548,7 +1534,7 @@ public Builder setSynchronization(org.tensorflow.proto.VariableSynchronization v
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00000080;
           synchronization_ = value.getNumber();
           onChanged();
           return this;
    @@ -1562,7 +1548,7 @@ public Builder setSynchronization(org.tensorflow.proto.VariableSynchronization v
          * @return This builder for chaining.
          */
         public Builder clearSynchronization() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000080);
           synchronization_ = 0;
           onChanged();
           return this;
    @@ -1590,8 +1576,8 @@ public Builder clearSynchronization() {
          * @return This builder for chaining.
          */
         public Builder setAggregationValue(int value) {
    -      
           aggregation_ = value;
    +      bitField0_ |= 0x00000100;
           onChanged();
           return this;
         }
    @@ -1605,8 +1591,7 @@ public Builder setAggregationValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.VariableAggregation getAggregation() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.VariableAggregation result = org.tensorflow.proto.VariableAggregation.valueOf(aggregation_);
    +      org.tensorflow.proto.VariableAggregation result = org.tensorflow.proto.VariableAggregation.forNumber(aggregation_);
           return result == null ? org.tensorflow.proto.VariableAggregation.UNRECOGNIZED : result;
         }
         /**
    @@ -1622,7 +1607,7 @@ public Builder setAggregation(org.tensorflow.proto.VariableAggregation value) {
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00000100;
           aggregation_ = value.getNumber();
           onChanged();
           return this;
    @@ -1636,23 +1621,11 @@ public Builder setAggregation(org.tensorflow.proto.VariableAggregation value) {
          * @return This builder for chaining.
          */
         public Builder clearAggregation() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000100);
           aggregation_ = 0;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.VariableDef)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableDefOrBuilder.java
    index 4cc21270001..c21be5ee951 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableDefOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableDefOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/variable.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableProtos.java
    index 1d42548c5ba..0fcca6df742 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableProtos.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableProtos.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/variable.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class VariableProtos {
       private VariableProtos() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      VariableProtos.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,12 +28,12 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_VariableDef_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_VariableDef_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_SaveSliceInfoDef_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_SaveSliceInfoDef_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -65,15 +76,16 @@ public static void registerAllExtensions(
         internal_static_tensorflow_VariableDef_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_VariableDef_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_VariableDef_descriptor,
             new java.lang.String[] { "VariableName", "InitialValueName", "InitializerName", "SnapshotName", "SaveSliceInfoDef", "IsResource", "Trainable", "Synchronization", "Aggregation", });
         internal_static_tensorflow_SaveSliceInfoDef_descriptor =
           getDescriptor().getMessageTypes().get(1);
         internal_static_tensorflow_SaveSliceInfoDef_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_SaveSliceInfoDef_descriptor,
             new java.lang.String[] { "FullName", "FullShape", "VarOffset", "VarShape", });
    +    descriptor.resolveAllFeaturesImmutable();
       }
     
       // @@protoc_insertion_point(outer_class_scope)
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableSynchronization.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableSynchronization.java
    index 7753319d336..3a618d402ac 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableSynchronization.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableSynchronization.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/variable.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -53,6 +55,15 @@ public enum VariableSynchronization
       UNRECOGNIZED(-1),
       ;
     
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      VariableSynchronization.class.getName());
    +  }
       /**
        * 
        * `AUTO`: Indicates that the synchronization will be determined by the
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariantTensorDataProto.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariantTensorDataProto.java
    index a5a08f0f3fb..50181e54d12 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariantTensorDataProto.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariantTensorDataProto.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/tensor.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,12 +13,21 @@
      * Protobuf type {@code tensorflow.VariantTensorDataProto}
      */
     public final class VariantTensorDataProto extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.VariantTensorDataProto)
         VariantTensorDataProtoOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      VariantTensorDataProto.class.getName());
    +  }
       // Use VariantTensorDataProto.newBuilder() to construct.
    -  private VariantTensorDataProto(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private VariantTensorDataProto(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private VariantTensorDataProto() {
    @@ -25,25 +36,13 @@ private VariantTensorDataProto() {
         tensors_ = java.util.Collections.emptyList();
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new VariantTensorDataProto();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.TensorProtos.internal_static_tensorflow_VariantTensorDataProto_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.TensorProtos.internal_static_tensorflow_VariantTensorDataProto_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -51,7 +50,8 @@ protected java.lang.Object newInstance(
       }
     
       public static final int TYPE_NAME_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object typeName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object typeName_ = "";
       /**
        * 
        * Name of the type of objects being serialized.
    @@ -97,7 +97,7 @@ public java.lang.String getTypeName() {
       }
     
       public static final int METADATA_FIELD_NUMBER = 2;
    -  private com.google.protobuf.ByteString metadata_;
    +  private com.google.protobuf.ByteString metadata_ = com.google.protobuf.ByteString.EMPTY;
       /**
        * 
        * Portions of the object that are not Tensors.
    @@ -112,6 +112,7 @@ public com.google.protobuf.ByteString getMetadata() {
       }
     
       public static final int TENSORS_FIELD_NUMBER = 3;
    +  @SuppressWarnings("serial")
       private java.util.List tensors_;
       /**
        * 
    @@ -185,8 +186,8 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(typeName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, typeName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(typeName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, typeName_);
         }
         if (!metadata_.isEmpty()) {
           output.writeBytes(2, metadata_);
    @@ -203,8 +204,8 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(typeName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, typeName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(typeName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, typeName_);
         }
         if (!metadata_.isEmpty()) {
           size += com.google.protobuf.CodedOutputStream
    @@ -293,39 +294,41 @@ public static org.tensorflow.proto.VariantTensorDataProto parseFrom(
       }
       public static org.tensorflow.proto.VariantTensorDataProto parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.VariantTensorDataProto parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.VariantTensorDataProto parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.VariantTensorDataProto parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.VariantTensorDataProto parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.VariantTensorDataProto parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -345,7 +348,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -357,7 +360,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.VariantTensorDataProto}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.VariantTensorDataProto)
           org.tensorflow.proto.VariantTensorDataProtoOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -366,7 +369,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.TensorProtos.internal_static_tensorflow_VariantTensorDataProto_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -379,24 +382,23 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           typeName_ = "";
    -
           metadata_ = com.google.protobuf.ByteString.EMPTY;
    -
           if (tensorsBuilder_ == null) {
             tensors_ = java.util.Collections.emptyList();
           } else {
             tensors_ = null;
             tensorsBuilder_.clear();
           }
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      bitField0_ = (bitField0_ & ~0x00000004);
           return this;
         }
     
    @@ -423,54 +425,34 @@ public org.tensorflow.proto.VariantTensorDataProto build() {
         @java.lang.Override
         public org.tensorflow.proto.VariantTensorDataProto buildPartial() {
           org.tensorflow.proto.VariantTensorDataProto result = new org.tensorflow.proto.VariantTensorDataProto(this);
    -      int from_bitField0_ = bitField0_;
    -      result.typeName_ = typeName_;
    -      result.metadata_ = metadata_;
    +      buildPartialRepeatedFields(result);
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartialRepeatedFields(org.tensorflow.proto.VariantTensorDataProto result) {
           if (tensorsBuilder_ == null) {
    -        if (((bitField0_ & 0x00000001) != 0)) {
    +        if (((bitField0_ & 0x00000004) != 0)) {
               tensors_ = java.util.Collections.unmodifiableList(tensors_);
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ = (bitField0_ & ~0x00000004);
             }
             result.tensors_ = tensors_;
           } else {
             result.tensors_ = tensorsBuilder_.build();
           }
    -      onBuilt();
    -      return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.VariantTensorDataProto result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.typeName_ = typeName_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.metadata_ = metadata_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.VariantTensorDataProto) {
    @@ -485,6 +467,7 @@ public Builder mergeFrom(org.tensorflow.proto.VariantTensorDataProto other) {
           if (other == org.tensorflow.proto.VariantTensorDataProto.getDefaultInstance()) return this;
           if (!other.getTypeName().isEmpty()) {
             typeName_ = other.typeName_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (other.getMetadata() != com.google.protobuf.ByteString.EMPTY) {
    @@ -494,7 +477,7 @@ public Builder mergeFrom(org.tensorflow.proto.VariantTensorDataProto other) {
             if (!other.tensors_.isEmpty()) {
               if (tensors_.isEmpty()) {
                 tensors_ = other.tensors_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000004);
               } else {
                 ensureTensorsIsMutable();
                 tensors_.addAll(other.tensors_);
    @@ -507,9 +490,9 @@ public Builder mergeFrom(org.tensorflow.proto.VariantTensorDataProto other) {
                 tensorsBuilder_.dispose();
                 tensorsBuilder_ = null;
                 tensors_ = other.tensors_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000004);
                 tensorsBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getTensorsFieldBuilder() : null;
               } else {
                 tensorsBuilder_.addAllMessages(other.tensors_);
    @@ -544,12 +527,12 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   typeName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 18: {
                   metadata_ = input.readBytes();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 case 26: {
    @@ -635,11 +618,9 @@ public java.lang.String getTypeName() {
          */
         public Builder setTypeName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           typeName_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -652,8 +633,8 @@ public Builder setTypeName(
          * @return This builder for chaining.
          */
         public Builder clearTypeName() {
    -      
           typeName_ = getDefaultInstance().getTypeName();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -668,12 +649,10 @@ public Builder clearTypeName() {
          */
         public Builder setTypeNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           typeName_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -701,11 +680,9 @@ public com.google.protobuf.ByteString getMetadata() {
          * @return This builder for chaining.
          */
         public Builder setMetadata(com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           metadata_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -718,7 +695,7 @@ public Builder setMetadata(com.google.protobuf.ByteString value) {
          * @return This builder for chaining.
          */
         public Builder clearMetadata() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000002);
           metadata_ = getDefaultInstance().getMetadata();
           onChanged();
           return this;
    @@ -727,13 +704,13 @@ public Builder clearMetadata() {
         private java.util.List tensors_ =
           java.util.Collections.emptyList();
         private void ensureTensorsIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    +      if (!((bitField0_ & 0x00000004) != 0)) {
             tensors_ = new java.util.ArrayList(tensors_);
    -        bitField0_ |= 0x00000001;
    +        bitField0_ |= 0x00000004;
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> tensorsBuilder_;
     
         /**
    @@ -923,7 +900,7 @@ public Builder addAllTensors(
         public Builder clearTensors() {
           if (tensorsBuilder_ == null) {
             tensors_ = java.util.Collections.emptyList();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        bitField0_ = (bitField0_ & ~0x00000004);
             onChanged();
           } else {
             tensorsBuilder_.clear();
    @@ -1021,32 +998,20 @@ public org.tensorflow.proto.TensorProto.Builder addTensorsBuilder(
              getTensorsBuilderList() {
           return getTensorsFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> 
             getTensorsFieldBuilder() {
           if (tensorsBuilder_ == null) {
    -        tensorsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        tensorsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder>(
                     tensors_,
    -                ((bitField0_ & 0x00000001) != 0),
    +                ((bitField0_ & 0x00000004) != 0),
                     getParentForChildren(),
                     isClean());
             tensors_ = null;
           }
           return tensorsBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.VariantTensorDataProto)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariantTensorDataProtoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariantTensorDataProtoOrBuilder.java
    index 03f644b8cd4..35d2a7a341b 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariantTensorDataProtoOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariantTensorDataProtoOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/tensor.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VerifierConfig.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VerifierConfig.java
    index 2085986669c..c505dd32bab 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VerifierConfig.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VerifierConfig.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/verifier_config.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,37 +13,34 @@
      * Protobuf type {@code tensorflow.VerifierConfig}
      */
     public final class VerifierConfig extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.VerifierConfig)
         VerifierConfigOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      VerifierConfig.class.getName());
    +  }
       // Use VerifierConfig.newBuilder() to construct.
    -  private VerifierConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private VerifierConfig(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private VerifierConfig() {
         structureVerifier_ = 0;
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new VerifierConfig();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.VerifierConfigProtos.internal_static_tensorflow_VerifierConfig_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.VerifierConfigProtos.internal_static_tensorflow_VerifierConfig_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -68,6 +67,15 @@ public enum Toggle
         UNRECOGNIZED(-1),
         ;
     
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        Toggle.class.getName());
    +    }
         /**
          * DEFAULT = 0;
          */
    @@ -166,7 +174,7 @@ private Toggle(int value) {
       }
     
       public static final int VERIFICATION_TIMEOUT_IN_MS_FIELD_NUMBER = 1;
    -  private long verificationTimeoutInMs_;
    +  private long verificationTimeoutInMs_ = 0L;
       /**
        * 
        * Deadline for completion of all verification i.e. all the Toggle ON
    @@ -182,7 +190,7 @@ public long getVerificationTimeoutInMs() {
       }
     
       public static final int STRUCTURE_VERIFIER_FIELD_NUMBER = 2;
    -  private int structureVerifier_;
    +  private int structureVerifier_ = 0;
       /**
        * 
        * Perform structural validation on a tensorflow graph. Default is OFF.
    @@ -203,8 +211,7 @@ public long getVerificationTimeoutInMs() {
        * @return The structureVerifier.
        */
       @java.lang.Override public org.tensorflow.proto.VerifierConfig.Toggle getStructureVerifier() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.VerifierConfig.Toggle result = org.tensorflow.proto.VerifierConfig.Toggle.valueOf(structureVerifier_);
    +    org.tensorflow.proto.VerifierConfig.Toggle result = org.tensorflow.proto.VerifierConfig.Toggle.forNumber(structureVerifier_);
         return result == null ? org.tensorflow.proto.VerifierConfig.Toggle.UNRECOGNIZED : result;
       }
     
    @@ -318,39 +325,41 @@ public static org.tensorflow.proto.VerifierConfig parseFrom(
       }
       public static org.tensorflow.proto.VerifierConfig parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.VerifierConfig parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.VerifierConfig parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.VerifierConfig parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.VerifierConfig parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.VerifierConfig parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -370,7 +379,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -382,7 +391,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.VerifierConfig}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.VerifierConfig)
           org.tensorflow.proto.VerifierConfigOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -391,7 +400,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.VerifierConfigProtos.internal_static_tensorflow_VerifierConfig_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -404,17 +413,16 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           verificationTimeoutInMs_ = 0L;
    -
           structureVerifier_ = 0;
    -
           return this;
         }
     
    @@ -441,44 +449,21 @@ public org.tensorflow.proto.VerifierConfig build() {
         @java.lang.Override
         public org.tensorflow.proto.VerifierConfig buildPartial() {
           org.tensorflow.proto.VerifierConfig result = new org.tensorflow.proto.VerifierConfig(this);
    -      result.verificationTimeoutInMs_ = verificationTimeoutInMs_;
    -      result.structureVerifier_ = structureVerifier_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.VerifierConfig result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.verificationTimeoutInMs_ = verificationTimeoutInMs_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.structureVerifier_ = structureVerifier_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.VerifierConfig) {
    @@ -525,12 +510,12 @@ public Builder mergeFrom(
                   break;
                 case 8: {
                   verificationTimeoutInMs_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 8
                 case 16: {
                   structureVerifier_ = input.readEnum();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 16
                 default: {
    @@ -548,6 +533,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private long verificationTimeoutInMs_ ;
         /**
    @@ -574,8 +560,9 @@ public long getVerificationTimeoutInMs() {
          * @return This builder for chaining.
          */
         public Builder setVerificationTimeoutInMs(long value) {
    -      
    +
           verificationTimeoutInMs_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -589,7 +576,7 @@ public Builder setVerificationTimeoutInMs(long value) {
          * @return This builder for chaining.
          */
         public Builder clearVerificationTimeoutInMs() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000001);
           verificationTimeoutInMs_ = 0L;
           onChanged();
           return this;
    @@ -617,8 +604,8 @@ public Builder clearVerificationTimeoutInMs() {
          * @return This builder for chaining.
          */
         public Builder setStructureVerifierValue(int value) {
    -      
           structureVerifier_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -632,8 +619,7 @@ public Builder setStructureVerifierValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.VerifierConfig.Toggle getStructureVerifier() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.VerifierConfig.Toggle result = org.tensorflow.proto.VerifierConfig.Toggle.valueOf(structureVerifier_);
    +      org.tensorflow.proto.VerifierConfig.Toggle result = org.tensorflow.proto.VerifierConfig.Toggle.forNumber(structureVerifier_);
           return result == null ? org.tensorflow.proto.VerifierConfig.Toggle.UNRECOGNIZED : result;
         }
         /**
    @@ -649,7 +635,7 @@ public Builder setStructureVerifier(org.tensorflow.proto.VerifierConfig.Toggle v
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00000002;
           structureVerifier_ = value.getNumber();
           onChanged();
           return this;
    @@ -663,23 +649,11 @@ public Builder setStructureVerifier(org.tensorflow.proto.VerifierConfig.Toggle v
          * @return This builder for chaining.
          */
         public Builder clearStructureVerifier() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000002);
           structureVerifier_ = 0;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.VerifierConfig)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VerifierConfigOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VerifierConfigOrBuilder.java
    index 3be007c2633..73d458cfcba 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VerifierConfigOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VerifierConfigOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/verifier_config.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VerifierConfigProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VerifierConfigProtos.java
    index 76533aa3039..90bb0857380 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VerifierConfigProtos.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VerifierConfigProtos.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/verifier_config.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class VerifierConfigProtos {
       private VerifierConfigProtos() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      VerifierConfigProtos.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,7 +28,7 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_VerifierConfig_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_VerifierConfig_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -46,9 +57,10 @@ public static void registerAllExtensions(
         internal_static_tensorflow_VerifierConfig_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_VerifierConfig_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_VerifierConfig_descriptor,
             new java.lang.String[] { "VerificationTimeoutInMs", "StructureVerifier", });
    +    descriptor.resolveAllFeaturesImmutable();
       }
     
       // @@protoc_insertion_point(outer_class_scope)
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VersionDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VersionDef.java
    index 8f322c921be..b9d81a5d931 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VersionDef.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VersionDef.java
    @@ -1,55 +1,57 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/versions.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     /**
      * 
      * Version information for a piece of serialized data
    + *
      * There are different types of versions for each type of data
      * (GraphDef, etc.), but they all have the same common shape
      * described here.
    + *
      * Each consumer has "consumer" and "min_producer" versions (specified
      * elsewhere).  A consumer is allowed to consume this data if
    - *   producer >= min_producer
    - *   consumer >= min_consumer
    - *   consumer not in bad_consumers
    + *
    + * producer >= min_producer
    + * consumer >= min_consumer
    + * consumer not in bad_consumers
      * 
    * * Protobuf type {@code tensorflow.VersionDef} */ public final class VersionDef extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.VersionDef) VersionDefOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + VersionDef.class.getName()); + } // Use VersionDef.newBuilder() to construct. - private VersionDef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private VersionDef(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private VersionDef() { badConsumers_ = emptyIntList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new VersionDef(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.VersionsProtos.internal_static_tensorflow_VersionDef_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.VersionsProtos.internal_static_tensorflow_VersionDef_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -57,7 +59,7 @@ protected java.lang.Object newInstance( } public static final int PRODUCER_FIELD_NUMBER = 1; - private int producer_; + private int producer_ = 0; /** *
        * The version of the code that produced this data.
    @@ -72,7 +74,7 @@ public int getProducer() {
       }
     
       public static final int MIN_CONSUMER_FIELD_NUMBER = 2;
    -  private int minConsumer_;
    +  private int minConsumer_ = 0;
       /**
        * 
        * Any consumer below this version is not allowed to consume this data.
    @@ -87,7 +89,9 @@ public int getMinConsumer() {
       }
     
       public static final int BAD_CONSUMERS_FIELD_NUMBER = 3;
    -  private com.google.protobuf.Internal.IntList badConsumers_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.Internal.IntList badConsumers_ =
    +      emptyIntList();
       /**
        * 
        * Specific consumer versions which are disallowed (e.g. due to bugs).
    @@ -264,39 +268,41 @@ public static org.tensorflow.proto.VersionDef parseFrom(
       }
       public static org.tensorflow.proto.VersionDef parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.VersionDef parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.VersionDef parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.VersionDef parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.VersionDef parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.VersionDef parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -316,27 +322,30 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
       /**
        * 
        * Version information for a piece of serialized data
    +   *
        * There are different types of versions for each type of data
        * (GraphDef, etc.), but they all have the same common shape
        * described here.
    +   *
        * Each consumer has "consumer" and "min_producer" versions (specified
        * elsewhere).  A consumer is allowed to consume this data if
    -   *   producer >= min_producer
    -   *   consumer >= min_consumer
    -   *   consumer not in bad_consumers
    +   *
    +   * producer >= min_producer
    +   * consumer >= min_consumer
    +   * consumer not in bad_consumers
        * 
    * * Protobuf type {@code tensorflow.VersionDef} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.VersionDef) org.tensorflow.proto.VersionDefOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -345,7 +354,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.VersionsProtos.internal_static_tensorflow_VersionDef_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -358,19 +367,17 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; producer_ = 0; - minConsumer_ = 0; - badConsumers_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -397,50 +404,25 @@ public org.tensorflow.proto.VersionDef build() { @java.lang.Override public org.tensorflow.proto.VersionDef buildPartial() { org.tensorflow.proto.VersionDef result = new org.tensorflow.proto.VersionDef(this); - int from_bitField0_ = bitField0_; - result.producer_ = producer_; - result.minConsumer_ = minConsumer_; - if (((bitField0_ & 0x00000001) != 0)) { - badConsumers_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.badConsumers_ = badConsumers_; + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.VersionDef result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.producer_ = producer_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.minConsumer_ = minConsumer_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + badConsumers_.makeImmutable(); + result.badConsumers_ = badConsumers_; + } } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.VersionDef) { @@ -462,7 +444,8 @@ public Builder mergeFrom(org.tensorflow.proto.VersionDef other) { if (!other.badConsumers_.isEmpty()) { if (badConsumers_.isEmpty()) { badConsumers_ = other.badConsumers_; - bitField0_ = (bitField0_ & ~0x00000001); + badConsumers_.makeImmutable(); + bitField0_ |= 0x00000004; } else { ensureBadConsumersIsMutable(); badConsumers_.addAll(other.badConsumers_); @@ -497,12 +480,12 @@ public Builder mergeFrom( break; case 8: { producer_ = input.readInt32(); - + bitField0_ |= 0x00000001; break; } // case 8 case 16: { minConsumer_ = input.readInt32(); - + bitField0_ |= 0x00000002; break; } // case 16 case 24: { @@ -561,8 +544,9 @@ public int getProducer() { * @return This builder for chaining. */ public Builder setProducer(int value) { - + producer_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -575,7 +559,7 @@ public Builder setProducer(int value) { * @return This builder for chaining. */ public Builder clearProducer() { - + bitField0_ = (bitField0_ & ~0x00000001); producer_ = 0; onChanged(); return this; @@ -604,8 +588,9 @@ public int getMinConsumer() { * @return This builder for chaining. */ public Builder setMinConsumer(int value) { - + minConsumer_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -618,7 +603,7 @@ public Builder setMinConsumer(int value) { * @return This builder for chaining. */ public Builder clearMinConsumer() { - + bitField0_ = (bitField0_ & ~0x00000002); minConsumer_ = 0; onChanged(); return this; @@ -626,10 +611,10 @@ public Builder clearMinConsumer() { private com.google.protobuf.Internal.IntList badConsumers_ = emptyIntList(); private void ensureBadConsumersIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - badConsumers_ = mutableCopy(badConsumers_); - bitField0_ |= 0x00000001; - } + if (!badConsumers_.isModifiable()) { + badConsumers_ = makeMutableCopy(badConsumers_); + } + bitField0_ |= 0x00000004; } /** *
    @@ -641,8 +626,8 @@ private void ensureBadConsumersIsMutable() {
          */
         public java.util.List
             getBadConsumersList() {
    -      return ((bitField0_ & 0x00000001) != 0) ?
    -               java.util.Collections.unmodifiableList(badConsumers_) : badConsumers_;
    +      badConsumers_.makeImmutable();
    +      return badConsumers_;
         }
         /**
          * 
    @@ -679,8 +664,10 @@ public int getBadConsumers(int index) {
          */
         public Builder setBadConsumers(
             int index, int value) {
    +
           ensureBadConsumersIsMutable();
           badConsumers_.setInt(index, value);
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -694,8 +681,10 @@ public Builder setBadConsumers(
          * @return This builder for chaining.
          */
         public Builder addBadConsumers(int value) {
    +
           ensureBadConsumersIsMutable();
           badConsumers_.addInt(value);
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -713,6 +702,7 @@ public Builder addAllBadConsumers(
           ensureBadConsumersIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, badConsumers_);
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -726,22 +716,10 @@ public Builder addAllBadConsumers(
          */
         public Builder clearBadConsumers() {
           badConsumers_ = emptyIntList();
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      bitField0_ = (bitField0_ & ~0x00000004);
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.VersionDef)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VersionDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VersionDefOrBuilder.java
    index 3846b05369f..46a49c23fd2 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VersionDefOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VersionDefOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/versions.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VersionsProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VersionsProtos.java
    index 207d9d763df..4ab034a3ac6 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VersionsProtos.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VersionsProtos.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/versions.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
     public final class VersionsProtos {
       private VersionsProtos() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      VersionsProtos.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,7 +28,7 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_VersionDef_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_VersionDef_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -43,9 +54,10 @@ public static void registerAllExtensions(
         internal_static_tensorflow_VersionDef_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_VersionDef_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_VersionDef_descriptor,
             new java.lang.String[] { "Producer", "MinConsumer", "BadConsumers", });
    +    descriptor.resolveAllFeaturesImmutable();
       }
     
       // @@protoc_insertion_point(outer_class_scope)
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WatchdogConfig.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WatchdogConfig.java
    index 0f5d6029ae7..af3277bb62a 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WatchdogConfig.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WatchdogConfig.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/util/event.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,36 +9,33 @@
      * Protobuf type {@code tensorflow.WatchdogConfig}
      */
     public final class WatchdogConfig extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.WatchdogConfig)
         WatchdogConfigOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      WatchdogConfig.class.getName());
    +  }
       // Use WatchdogConfig.newBuilder() to construct.
    -  private WatchdogConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private WatchdogConfig(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private WatchdogConfig() {
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new WatchdogConfig();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.EventProtos.internal_static_tensorflow_WatchdogConfig_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.EventProtos.internal_static_tensorflow_WatchdogConfig_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -44,7 +43,7 @@ protected java.lang.Object newInstance(
       }
     
       public static final int TIMEOUT_MS_FIELD_NUMBER = 1;
    -  private long timeoutMs_;
    +  private long timeoutMs_ = 0L;
       /**
        * int64 timeout_ms = 1;
        * @return The timeoutMs.
    @@ -154,39 +153,41 @@ public static org.tensorflow.proto.WatchdogConfig parseFrom(
       }
       public static org.tensorflow.proto.WatchdogConfig parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.WatchdogConfig parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.WatchdogConfig parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.WatchdogConfig parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.WatchdogConfig parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.WatchdogConfig parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -206,7 +207,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -214,7 +215,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.WatchdogConfig}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.WatchdogConfig)
           org.tensorflow.proto.WatchdogConfigOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -223,7 +224,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.EventProtos.internal_static_tensorflow_WatchdogConfig_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -236,15 +237,15 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           timeoutMs_ = 0L;
    -
           return this;
         }
     
    @@ -271,43 +272,18 @@ public org.tensorflow.proto.WatchdogConfig build() {
         @java.lang.Override
         public org.tensorflow.proto.WatchdogConfig buildPartial() {
           org.tensorflow.proto.WatchdogConfig result = new org.tensorflow.proto.WatchdogConfig(this);
    -      result.timeoutMs_ = timeoutMs_;
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.WatchdogConfig result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.timeoutMs_ = timeoutMs_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.WatchdogConfig) {
    @@ -351,7 +327,7 @@ public Builder mergeFrom(
                   break;
                 case 8: {
                   timeoutMs_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 8
                 default: {
    @@ -369,6 +345,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private long timeoutMs_ ;
         /**
    @@ -385,8 +362,9 @@ public long getTimeoutMs() {
          * @return This builder for chaining.
          */
         public Builder setTimeoutMs(long value) {
    -      
    +
           timeoutMs_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -395,23 +373,11 @@ public Builder setTimeoutMs(long value) {
          * @return This builder for chaining.
          */
         public Builder clearTimeoutMs() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000001);
           timeoutMs_ = 0L;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.WatchdogConfig)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WatchdogConfigOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WatchdogConfigOrBuilder.java
    index 45584da9568..8f35890f360 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WatchdogConfigOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WatchdogConfigOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/util/event.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WhileContextDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WhileContextDef.java
    index 276c04b10c9..dde2953f58a 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WhileContextDef.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WhileContextDef.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/control_flow.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -11,12 +13,21 @@
      * Protobuf type {@code tensorflow.WhileContextDef}
      */
     public final class WhileContextDef extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.WhileContextDef)
         WhileContextDefOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      WhileContextDef.class.getName());
    +  }
       // Use WhileContextDef.newBuilder() to construct.
    -  private WhileContextDef(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private WhileContextDef(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private WhileContextDef() {
    @@ -24,39 +35,31 @@ private WhileContextDef() {
         pivotName_ = "";
         pivotForPredName_ = "";
         pivotForBodyName_ = "";
    -    loopExitNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -    loopEnterNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +    loopExitNames_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
    +    loopEnterNames_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         maximumIterationsName_ = "";
         nestedContexts_ = java.util.Collections.emptyList();
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new WhileContextDef();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.ControlFlowProtos.internal_static_tensorflow_WhileContextDef_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.ControlFlowProtos.internal_static_tensorflow_WhileContextDef_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
                 org.tensorflow.proto.WhileContextDef.class, org.tensorflow.proto.WhileContextDef.Builder.class);
       }
     
    +  private int bitField0_;
       public static final int CONTEXT_NAME_FIELD_NUMBER = 1;
    -  private volatile java.lang.Object contextName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object contextName_ = "";
       /**
        * 
        * Name of the context.
    @@ -102,7 +105,7 @@ public java.lang.String getContextName() {
       }
     
       public static final int PARALLEL_ITERATIONS_FIELD_NUMBER = 2;
    -  private int parallelIterations_;
    +  private int parallelIterations_ = 0;
       /**
        * 
        * The number of iterations allowed to run in parallel.
    @@ -117,7 +120,7 @@ public int getParallelIterations() {
       }
     
       public static final int BACK_PROP_FIELD_NUMBER = 3;
    -  private boolean backProp_;
    +  private boolean backProp_ = false;
       /**
        * 
        * Whether backprop is enabled for this while loop.
    @@ -132,7 +135,7 @@ public boolean getBackProp() {
       }
     
       public static final int SWAP_MEMORY_FIELD_NUMBER = 4;
    -  private boolean swapMemory_;
    +  private boolean swapMemory_ = false;
       /**
        * 
        * Whether GPU-CPU memory swap is enabled for this loop.
    @@ -147,7 +150,8 @@ public boolean getSwapMemory() {
       }
     
       public static final int PIVOT_NAME_FIELD_NUMBER = 5;
    -  private volatile java.lang.Object pivotName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object pivotName_ = "";
       /**
        * 
        * Name of the pivot tensor.
    @@ -193,7 +197,8 @@ public java.lang.String getPivotName() {
       }
     
       public static final int PIVOT_FOR_PRED_NAME_FIELD_NUMBER = 6;
    -  private volatile java.lang.Object pivotForPredName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object pivotForPredName_ = "";
       /**
        * 
        * Name of the pivot_for_pred tensor.
    @@ -239,7 +244,8 @@ public java.lang.String getPivotForPredName() {
       }
     
       public static final int PIVOT_FOR_BODY_NAME_FIELD_NUMBER = 7;
    -  private volatile java.lang.Object pivotForBodyName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object pivotForBodyName_ = "";
       /**
        * 
        * Name of the pivot_for_body tensor.
    @@ -285,7 +291,9 @@ public java.lang.String getPivotForBodyName() {
       }
     
       public static final int LOOP_EXIT_NAMES_FIELD_NUMBER = 8;
    -  private com.google.protobuf.LazyStringList loopExitNames_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.LazyStringArrayList loopExitNames_ =
    +      com.google.protobuf.LazyStringArrayList.emptyList();
       /**
        * 
        * List of names for exit tensors.
    @@ -336,7 +344,9 @@ public java.lang.String getLoopExitNames(int index) {
       }
     
       public static final int LOOP_ENTER_NAMES_FIELD_NUMBER = 10;
    -  private com.google.protobuf.LazyStringList loopEnterNames_;
    +  @SuppressWarnings("serial")
    +  private com.google.protobuf.LazyStringArrayList loopEnterNames_ =
    +      com.google.protobuf.LazyStringArrayList.emptyList();
       /**
        * 
        * List of names for enter tensors.
    @@ -398,7 +408,7 @@ public java.lang.String getLoopEnterNames(int index) {
        */
       @java.lang.Override
       public boolean hasValuesDef() {
    -    return valuesDef_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * 
    @@ -421,11 +431,12 @@ public org.tensorflow.proto.ValuesDef getValuesDef() {
        */
       @java.lang.Override
       public org.tensorflow.proto.ValuesDefOrBuilder getValuesDefOrBuilder() {
    -    return getValuesDef();
    +    return valuesDef_ == null ? org.tensorflow.proto.ValuesDef.getDefaultInstance() : valuesDef_;
       }
     
       public static final int MAXIMUM_ITERATIONS_NAME_FIELD_NUMBER = 11;
    -  private volatile java.lang.Object maximumIterationsName_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object maximumIterationsName_ = "";
       /**
        * 
        * Optional name of the maximum_iterations tensor.
    @@ -471,6 +482,7 @@ public java.lang.String getMaximumIterationsName() {
       }
     
       public static final int NESTED_CONTEXTS_FIELD_NUMBER = 12;
    +  @SuppressWarnings("serial")
       private java.util.List nestedContexts_;
       /**
        * 
    @@ -544,8 +556,8 @@ public final boolean isInitialized() {
       @java.lang.Override
       public void writeTo(com.google.protobuf.CodedOutputStream output)
                           throws java.io.IOException {
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contextName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, contextName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(contextName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 1, contextName_);
         }
         if (parallelIterations_ != 0) {
           output.writeInt32(2, parallelIterations_);
    @@ -556,26 +568,26 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         if (swapMemory_ != false) {
           output.writeBool(4, swapMemory_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pivotName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, pivotName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pivotName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 5, pivotName_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pivotForPredName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, pivotForPredName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pivotForPredName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 6, pivotForPredName_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pivotForBodyName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 7, pivotForBodyName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pivotForBodyName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 7, pivotForBodyName_);
         }
         for (int i = 0; i < loopExitNames_.size(); i++) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 8, loopExitNames_.getRaw(i));
    +      com.google.protobuf.GeneratedMessage.writeString(output, 8, loopExitNames_.getRaw(i));
         }
    -    if (valuesDef_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(9, getValuesDef());
         }
         for (int i = 0; i < loopEnterNames_.size(); i++) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 10, loopEnterNames_.getRaw(i));
    +      com.google.protobuf.GeneratedMessage.writeString(output, 10, loopEnterNames_.getRaw(i));
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(maximumIterationsName_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 11, maximumIterationsName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(maximumIterationsName_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 11, maximumIterationsName_);
         }
         for (int i = 0; i < nestedContexts_.size(); i++) {
           output.writeMessage(12, nestedContexts_.get(i));
    @@ -589,8 +601,8 @@ public int getSerializedSize() {
         if (size != -1) return size;
     
         size = 0;
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contextName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, contextName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(contextName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, contextName_);
         }
         if (parallelIterations_ != 0) {
           size += com.google.protobuf.CodedOutputStream
    @@ -604,14 +616,14 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeBoolSize(4, swapMemory_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pivotName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, pivotName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pivotName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(5, pivotName_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pivotForPredName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, pivotForPredName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pivotForPredName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(6, pivotForPredName_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pivotForBodyName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, pivotForBodyName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pivotForBodyName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(7, pivotForBodyName_);
         }
         {
           int dataSize = 0;
    @@ -621,7 +633,7 @@ public int getSerializedSize() {
           size += dataSize;
           size += 1 * getLoopExitNamesList().size();
         }
    -    if (valuesDef_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(9, getValuesDef());
         }
    @@ -633,8 +645,8 @@ public int getSerializedSize() {
           size += dataSize;
           size += 1 * getLoopEnterNamesList().size();
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(maximumIterationsName_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, maximumIterationsName_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(maximumIterationsName_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(11, maximumIterationsName_);
         }
         for (int i = 0; i < nestedContexts_.size(); i++) {
           size += com.google.protobuf.CodedOutputStream
    @@ -766,39 +778,41 @@ public static org.tensorflow.proto.WhileContextDef parseFrom(
       }
       public static org.tensorflow.proto.WhileContextDef parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.WhileContextDef parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.WhileContextDef parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.WhileContextDef parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.WhileContextDef parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.WhileContextDef parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -818,7 +832,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -830,7 +844,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.WhileContextDef}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.WhileContextDef)
           org.tensorflow.proto.WhileContextDefOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -839,7 +853,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.ControlFlowProtos.internal_static_tensorflow_WhileContextDef_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -848,50 +862,49 @@ public static final class Builder extends
     
         // Construct using org.tensorflow.proto.WhileContextDef.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getValuesDefFieldBuilder();
    +        getNestedContextsFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           contextName_ = "";
    -
           parallelIterations_ = 0;
    -
           backProp_ = false;
    -
           swapMemory_ = false;
    -
           pivotName_ = "";
    -
           pivotForPredName_ = "";
    -
           pivotForBodyName_ = "";
    -
    -      loopExitNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000001);
    -      loopEnterNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000002);
    -      if (valuesDefBuilder_ == null) {
    -        valuesDef_ = null;
    -      } else {
    -        valuesDef_ = null;
    +      loopExitNames_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
    +      loopEnterNames_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
    +      valuesDef_ = null;
    +      if (valuesDefBuilder_ != null) {
    +        valuesDefBuilder_.dispose();
             valuesDefBuilder_ = null;
           }
           maximumIterationsName_ = "";
    -
           if (nestedContextsBuilder_ == null) {
             nestedContexts_ = java.util.Collections.emptyList();
           } else {
             nestedContexts_ = null;
             nestedContextsBuilder_.clear();
           }
    -      bitField0_ = (bitField0_ & ~0x00000004);
    +      bitField0_ = (bitField0_ & ~0x00000800);
           return this;
         }
     
    @@ -918,75 +931,68 @@ public org.tensorflow.proto.WhileContextDef build() {
         @java.lang.Override
         public org.tensorflow.proto.WhileContextDef buildPartial() {
           org.tensorflow.proto.WhileContextDef result = new org.tensorflow.proto.WhileContextDef(this);
    -      int from_bitField0_ = bitField0_;
    -      result.contextName_ = contextName_;
    -      result.parallelIterations_ = parallelIterations_;
    -      result.backProp_ = backProp_;
    -      result.swapMemory_ = swapMemory_;
    -      result.pivotName_ = pivotName_;
    -      result.pivotForPredName_ = pivotForPredName_;
    -      result.pivotForBodyName_ = pivotForBodyName_;
    -      if (((bitField0_ & 0x00000001) != 0)) {
    -        loopExitNames_ = loopExitNames_.getUnmodifiableView();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    -      }
    -      result.loopExitNames_ = loopExitNames_;
    -      if (((bitField0_ & 0x00000002) != 0)) {
    -        loopEnterNames_ = loopEnterNames_.getUnmodifiableView();
    -        bitField0_ = (bitField0_ & ~0x00000002);
    -      }
    -      result.loopEnterNames_ = loopEnterNames_;
    -      if (valuesDefBuilder_ == null) {
    -        result.valuesDef_ = valuesDef_;
    -      } else {
    -        result.valuesDef_ = valuesDefBuilder_.build();
    -      }
    -      result.maximumIterationsName_ = maximumIterationsName_;
    +      buildPartialRepeatedFields(result);
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartialRepeatedFields(org.tensorflow.proto.WhileContextDef result) {
           if (nestedContextsBuilder_ == null) {
    -        if (((bitField0_ & 0x00000004) != 0)) {
    +        if (((bitField0_ & 0x00000800) != 0)) {
               nestedContexts_ = java.util.Collections.unmodifiableList(nestedContexts_);
    -          bitField0_ = (bitField0_ & ~0x00000004);
    +          bitField0_ = (bitField0_ & ~0x00000800);
             }
             result.nestedContexts_ = nestedContexts_;
           } else {
             result.nestedContexts_ = nestedContextsBuilder_.build();
           }
    -      onBuilt();
    -      return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.WhileContextDef result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.contextName_ = contextName_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.parallelIterations_ = parallelIterations_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.backProp_ = backProp_;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.swapMemory_ = swapMemory_;
    +      }
    +      if (((from_bitField0_ & 0x00000010) != 0)) {
    +        result.pivotName_ = pivotName_;
    +      }
    +      if (((from_bitField0_ & 0x00000020) != 0)) {
    +        result.pivotForPredName_ = pivotForPredName_;
    +      }
    +      if (((from_bitField0_ & 0x00000040) != 0)) {
    +        result.pivotForBodyName_ = pivotForBodyName_;
    +      }
    +      if (((from_bitField0_ & 0x00000080) != 0)) {
    +        loopExitNames_.makeImmutable();
    +        result.loopExitNames_ = loopExitNames_;
    +      }
    +      if (((from_bitField0_ & 0x00000100) != 0)) {
    +        loopEnterNames_.makeImmutable();
    +        result.loopEnterNames_ = loopEnterNames_;
    +      }
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000200) != 0)) {
    +        result.valuesDef_ = valuesDefBuilder_ == null
    +            ? valuesDef_
    +            : valuesDefBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
    +      }
    +      if (((from_bitField0_ & 0x00000400) != 0)) {
    +        result.maximumIterationsName_ = maximumIterationsName_;
    +      }
    +      result.bitField0_ |= to_bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.WhileContextDef) {
    @@ -1001,6 +1007,7 @@ public Builder mergeFrom(org.tensorflow.proto.WhileContextDef other) {
           if (other == org.tensorflow.proto.WhileContextDef.getDefaultInstance()) return this;
           if (!other.getContextName().isEmpty()) {
             contextName_ = other.contextName_;
    +        bitField0_ |= 0x00000001;
             onChanged();
           }
           if (other.getParallelIterations() != 0) {
    @@ -1014,20 +1021,23 @@ public Builder mergeFrom(org.tensorflow.proto.WhileContextDef other) {
           }
           if (!other.getPivotName().isEmpty()) {
             pivotName_ = other.pivotName_;
    +        bitField0_ |= 0x00000010;
             onChanged();
           }
           if (!other.getPivotForPredName().isEmpty()) {
             pivotForPredName_ = other.pivotForPredName_;
    +        bitField0_ |= 0x00000020;
             onChanged();
           }
           if (!other.getPivotForBodyName().isEmpty()) {
             pivotForBodyName_ = other.pivotForBodyName_;
    +        bitField0_ |= 0x00000040;
             onChanged();
           }
           if (!other.loopExitNames_.isEmpty()) {
             if (loopExitNames_.isEmpty()) {
               loopExitNames_ = other.loopExitNames_;
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ |= 0x00000080;
             } else {
               ensureLoopExitNamesIsMutable();
               loopExitNames_.addAll(other.loopExitNames_);
    @@ -1037,7 +1047,7 @@ public Builder mergeFrom(org.tensorflow.proto.WhileContextDef other) {
           if (!other.loopEnterNames_.isEmpty()) {
             if (loopEnterNames_.isEmpty()) {
               loopEnterNames_ = other.loopEnterNames_;
    -          bitField0_ = (bitField0_ & ~0x00000002);
    +          bitField0_ |= 0x00000100;
             } else {
               ensureLoopEnterNamesIsMutable();
               loopEnterNames_.addAll(other.loopEnterNames_);
    @@ -1049,13 +1059,14 @@ public Builder mergeFrom(org.tensorflow.proto.WhileContextDef other) {
           }
           if (!other.getMaximumIterationsName().isEmpty()) {
             maximumIterationsName_ = other.maximumIterationsName_;
    +        bitField0_ |= 0x00000400;
             onChanged();
           }
           if (nestedContextsBuilder_ == null) {
             if (!other.nestedContexts_.isEmpty()) {
               if (nestedContexts_.isEmpty()) {
                 nestedContexts_ = other.nestedContexts_;
    -            bitField0_ = (bitField0_ & ~0x00000004);
    +            bitField0_ = (bitField0_ & ~0x00000800);
               } else {
                 ensureNestedContextsIsMutable();
                 nestedContexts_.addAll(other.nestedContexts_);
    @@ -1068,9 +1079,9 @@ public Builder mergeFrom(org.tensorflow.proto.WhileContextDef other) {
                 nestedContextsBuilder_.dispose();
                 nestedContextsBuilder_ = null;
                 nestedContexts_ = other.nestedContexts_;
    -            bitField0_ = (bitField0_ & ~0x00000004);
    +            bitField0_ = (bitField0_ & ~0x00000800);
                 nestedContextsBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getNestedContextsFieldBuilder() : null;
               } else {
                 nestedContextsBuilder_.addAllMessages(other.nestedContexts_);
    @@ -1105,37 +1116,37 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   contextName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 10
                 case 16: {
                   parallelIterations_ = input.readInt32();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 16
                 case 24: {
                   backProp_ = input.readBool();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 24
                 case 32: {
                   swapMemory_ = input.readBool();
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 32
                 case 42: {
                   pivotName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000010;
                   break;
                 } // case 42
                 case 50: {
                   pivotForPredName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000020;
                   break;
                 } // case 50
                 case 58: {
                   pivotForBodyName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000040;
                   break;
                 } // case 58
                 case 66: {
    @@ -1148,7 +1159,7 @@ public Builder mergeFrom(
                   input.readMessage(
                       getValuesDefFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000200;
                   break;
                 } // case 74
                 case 82: {
    @@ -1159,7 +1170,7 @@ public Builder mergeFrom(
                 } // case 82
                 case 90: {
                   maximumIterationsName_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000400;
                   break;
                 } // case 90
                 case 98: {
    @@ -1245,11 +1256,9 @@ public java.lang.String getContextName() {
          */
         public Builder setContextName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           contextName_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -1262,8 +1271,8 @@ public Builder setContextName(
          * @return This builder for chaining.
          */
         public Builder clearContextName() {
    -      
           contextName_ = getDefaultInstance().getContextName();
    +      bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
           return this;
         }
    @@ -1278,12 +1287,10 @@ public Builder clearContextName() {
          */
         public Builder setContextNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           contextName_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -1311,8 +1318,9 @@ public int getParallelIterations() {
          * @return This builder for chaining.
          */
         public Builder setParallelIterations(int value) {
    -      
    +
           parallelIterations_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -1325,7 +1333,7 @@ public Builder setParallelIterations(int value) {
          * @return This builder for chaining.
          */
         public Builder clearParallelIterations() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000002);
           parallelIterations_ = 0;
           onChanged();
           return this;
    @@ -1354,8 +1362,9 @@ public boolean getBackProp() {
          * @return This builder for chaining.
          */
         public Builder setBackProp(boolean value) {
    -      
    +
           backProp_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -1368,7 +1377,7 @@ public Builder setBackProp(boolean value) {
          * @return This builder for chaining.
          */
         public Builder clearBackProp() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000004);
           backProp_ = false;
           onChanged();
           return this;
    @@ -1397,8 +1406,9 @@ public boolean getSwapMemory() {
          * @return This builder for chaining.
          */
         public Builder setSwapMemory(boolean value) {
    -      
    +
           swapMemory_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -1411,7 +1421,7 @@ public Builder setSwapMemory(boolean value) {
          * @return This builder for chaining.
          */
         public Builder clearSwapMemory() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000008);
           swapMemory_ = false;
           onChanged();
           return this;
    @@ -1470,11 +1480,9 @@ public java.lang.String getPivotName() {
          */
         public Builder setPivotName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           pivotName_ = value;
    +      bitField0_ |= 0x00000010;
           onChanged();
           return this;
         }
    @@ -1487,8 +1495,8 @@ public Builder setPivotName(
          * @return This builder for chaining.
          */
         public Builder clearPivotName() {
    -      
           pivotName_ = getDefaultInstance().getPivotName();
    +      bitField0_ = (bitField0_ & ~0x00000010);
           onChanged();
           return this;
         }
    @@ -1503,12 +1511,10 @@ public Builder clearPivotName() {
          */
         public Builder setPivotNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           pivotName_ = value;
    +      bitField0_ |= 0x00000010;
           onChanged();
           return this;
         }
    @@ -1566,11 +1572,9 @@ public java.lang.String getPivotForPredName() {
          */
         public Builder setPivotForPredName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           pivotForPredName_ = value;
    +      bitField0_ |= 0x00000020;
           onChanged();
           return this;
         }
    @@ -1583,8 +1587,8 @@ public Builder setPivotForPredName(
          * @return This builder for chaining.
          */
         public Builder clearPivotForPredName() {
    -      
           pivotForPredName_ = getDefaultInstance().getPivotForPredName();
    +      bitField0_ = (bitField0_ & ~0x00000020);
           onChanged();
           return this;
         }
    @@ -1599,12 +1603,10 @@ public Builder clearPivotForPredName() {
          */
         public Builder setPivotForPredNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           pivotForPredName_ = value;
    +      bitField0_ |= 0x00000020;
           onChanged();
           return this;
         }
    @@ -1662,11 +1664,9 @@ public java.lang.String getPivotForBodyName() {
          */
         public Builder setPivotForBodyName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           pivotForBodyName_ = value;
    +      bitField0_ |= 0x00000040;
           onChanged();
           return this;
         }
    @@ -1679,8 +1679,8 @@ public Builder setPivotForBodyName(
          * @return This builder for chaining.
          */
         public Builder clearPivotForBodyName() {
    -      
           pivotForBodyName_ = getDefaultInstance().getPivotForBodyName();
    +      bitField0_ = (bitField0_ & ~0x00000040);
           onChanged();
           return this;
         }
    @@ -1695,22 +1695,21 @@ public Builder clearPivotForBodyName() {
          */
         public Builder setPivotForBodyNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           pivotForBodyName_ = value;
    +      bitField0_ |= 0x00000040;
           onChanged();
           return this;
         }
     
    -    private com.google.protobuf.LazyStringList loopExitNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +    private com.google.protobuf.LazyStringArrayList loopExitNames_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         private void ensureLoopExitNamesIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    +      if (!loopExitNames_.isModifiable()) {
             loopExitNames_ = new com.google.protobuf.LazyStringArrayList(loopExitNames_);
    -        bitField0_ |= 0x00000001;
    -       }
    +      }
    +      bitField0_ |= 0x00000080;
         }
         /**
          * 
    @@ -1722,7 +1721,8 @@ private void ensureLoopExitNamesIsMutable() {
          */
         public com.google.protobuf.ProtocolStringList
             getLoopExitNamesList() {
    -      return loopExitNames_.getUnmodifiableView();
    +      loopExitNames_.makeImmutable();
    +      return loopExitNames_;
         }
         /**
          * 
    @@ -1772,11 +1772,10 @@ public java.lang.String getLoopExitNames(int index) {
          */
         public Builder setLoopExitNames(
             int index, java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureLoopExitNamesIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureLoopExitNamesIsMutable();
           loopExitNames_.set(index, value);
    +      bitField0_ |= 0x00000080;
           onChanged();
           return this;
         }
    @@ -1791,11 +1790,10 @@ public Builder setLoopExitNames(
          */
         public Builder addLoopExitNames(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureLoopExitNamesIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureLoopExitNamesIsMutable();
           loopExitNames_.add(value);
    +      bitField0_ |= 0x00000080;
           onChanged();
           return this;
         }
    @@ -1813,6 +1811,7 @@ public Builder addAllLoopExitNames(
           ensureLoopExitNamesIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, loopExitNames_);
    +      bitField0_ |= 0x00000080;
           onChanged();
           return this;
         }
    @@ -1825,8 +1824,9 @@ public Builder addAllLoopExitNames(
          * @return This builder for chaining.
          */
         public Builder clearLoopExitNames() {
    -      loopExitNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      loopExitNames_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
    +      bitField0_ = (bitField0_ & ~0x00000080);;
           onChanged();
           return this;
         }
    @@ -1841,22 +1841,22 @@ public Builder clearLoopExitNames() {
          */
         public Builder addLoopExitNamesBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           ensureLoopExitNamesIsMutable();
           loopExitNames_.add(value);
    +      bitField0_ |= 0x00000080;
           onChanged();
           return this;
         }
     
    -    private com.google.protobuf.LazyStringList loopEnterNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +    private com.google.protobuf.LazyStringArrayList loopEnterNames_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         private void ensureLoopEnterNamesIsMutable() {
    -      if (!((bitField0_ & 0x00000002) != 0)) {
    +      if (!loopEnterNames_.isModifiable()) {
             loopEnterNames_ = new com.google.protobuf.LazyStringArrayList(loopEnterNames_);
    -        bitField0_ |= 0x00000002;
    -       }
    +      }
    +      bitField0_ |= 0x00000100;
         }
         /**
          * 
    @@ -1868,7 +1868,8 @@ private void ensureLoopEnterNamesIsMutable() {
          */
         public com.google.protobuf.ProtocolStringList
             getLoopEnterNamesList() {
    -      return loopEnterNames_.getUnmodifiableView();
    +      loopEnterNames_.makeImmutable();
    +      return loopEnterNames_;
         }
         /**
          * 
    @@ -1918,11 +1919,10 @@ public java.lang.String getLoopEnterNames(int index) {
          */
         public Builder setLoopEnterNames(
             int index, java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureLoopEnterNamesIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureLoopEnterNamesIsMutable();
           loopEnterNames_.set(index, value);
    +      bitField0_ |= 0x00000100;
           onChanged();
           return this;
         }
    @@ -1937,11 +1937,10 @@ public Builder setLoopEnterNames(
          */
         public Builder addLoopEnterNames(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureLoopEnterNamesIsMutable();
    +      if (value == null) { throw new NullPointerException(); }
    +      ensureLoopEnterNamesIsMutable();
           loopEnterNames_.add(value);
    +      bitField0_ |= 0x00000100;
           onChanged();
           return this;
         }
    @@ -1959,6 +1958,7 @@ public Builder addAllLoopEnterNames(
           ensureLoopEnterNamesIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
               values, loopEnterNames_);
    +      bitField0_ |= 0x00000100;
           onChanged();
           return this;
         }
    @@ -1971,8 +1971,9 @@ public Builder addAllLoopEnterNames(
          * @return This builder for chaining.
          */
         public Builder clearLoopEnterNames() {
    -      loopEnterNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -      bitField0_ = (bitField0_ & ~0x00000002);
    +      loopEnterNames_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
    +      bitField0_ = (bitField0_ & ~0x00000100);;
           onChanged();
           return this;
         }
    @@ -1987,18 +1988,17 @@ public Builder clearLoopEnterNames() {
          */
         public Builder addLoopEnterNamesBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           ensureLoopEnterNamesIsMutable();
           loopEnterNames_.add(value);
    +      bitField0_ |= 0x00000100;
           onChanged();
           return this;
         }
     
         private org.tensorflow.proto.ValuesDef valuesDef_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.ValuesDef, org.tensorflow.proto.ValuesDef.Builder, org.tensorflow.proto.ValuesDefOrBuilder> valuesDefBuilder_;
         /**
          * 
    @@ -2009,7 +2009,7 @@ public Builder addLoopEnterNamesBytes(
          * @return Whether the valuesDef field is set.
          */
         public boolean hasValuesDef() {
    -      return valuesDefBuilder_ != null || valuesDef_ != null;
    +      return ((bitField0_ & 0x00000200) != 0);
         }
         /**
          * 
    @@ -2039,11 +2039,11 @@ public Builder setValuesDef(org.tensorflow.proto.ValuesDef value) {
               throw new NullPointerException();
             }
             valuesDef_ = value;
    -        onChanged();
           } else {
             valuesDefBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000200;
    +      onChanged();
           return this;
         }
         /**
    @@ -2057,11 +2057,11 @@ public Builder setValuesDef(
             org.tensorflow.proto.ValuesDef.Builder builderForValue) {
           if (valuesDefBuilder_ == null) {
             valuesDef_ = builderForValue.build();
    -        onChanged();
           } else {
             valuesDefBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000200;
    +      onChanged();
           return this;
         }
         /**
    @@ -2073,17 +2073,20 @@ public Builder setValuesDef(
          */
         public Builder mergeValuesDef(org.tensorflow.proto.ValuesDef value) {
           if (valuesDefBuilder_ == null) {
    -        if (valuesDef_ != null) {
    -          valuesDef_ =
    -            org.tensorflow.proto.ValuesDef.newBuilder(valuesDef_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000200) != 0) &&
    +          valuesDef_ != null &&
    +          valuesDef_ != org.tensorflow.proto.ValuesDef.getDefaultInstance()) {
    +          getValuesDefBuilder().mergeFrom(value);
             } else {
               valuesDef_ = value;
             }
    -        onChanged();
           } else {
             valuesDefBuilder_.mergeFrom(value);
           }
    -
    +      if (valuesDef_ != null) {
    +        bitField0_ |= 0x00000200;
    +        onChanged();
    +      }
           return this;
         }
         /**
    @@ -2094,14 +2097,13 @@ public Builder mergeValuesDef(org.tensorflow.proto.ValuesDef value) {
          * .tensorflow.ValuesDef values_def = 9;
          */
         public Builder clearValuesDef() {
    -      if (valuesDefBuilder_ == null) {
    -        valuesDef_ = null;
    -        onChanged();
    -      } else {
    -        valuesDef_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000200);
    +      valuesDef_ = null;
    +      if (valuesDefBuilder_ != null) {
    +        valuesDefBuilder_.dispose();
             valuesDefBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
    @@ -2112,7 +2114,7 @@ public Builder clearValuesDef() {
          * .tensorflow.ValuesDef values_def = 9;
          */
         public org.tensorflow.proto.ValuesDef.Builder getValuesDefBuilder() {
    -      
    +      bitField0_ |= 0x00000200;
           onChanged();
           return getValuesDefFieldBuilder().getBuilder();
         }
    @@ -2138,11 +2140,11 @@ public org.tensorflow.proto.ValuesDefOrBuilder getValuesDefOrBuilder() {
          *
          * .tensorflow.ValuesDef values_def = 9;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.ValuesDef, org.tensorflow.proto.ValuesDef.Builder, org.tensorflow.proto.ValuesDefOrBuilder> 
             getValuesDefFieldBuilder() {
           if (valuesDefBuilder_ == null) {
    -        valuesDefBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        valuesDefBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.ValuesDef, org.tensorflow.proto.ValuesDef.Builder, org.tensorflow.proto.ValuesDefOrBuilder>(
                     getValuesDef(),
                     getParentForChildren(),
    @@ -2205,11 +2207,9 @@ public java.lang.String getMaximumIterationsName() {
          */
         public Builder setMaximumIterationsName(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           maximumIterationsName_ = value;
    +      bitField0_ |= 0x00000400;
           onChanged();
           return this;
         }
    @@ -2222,8 +2222,8 @@ public Builder setMaximumIterationsName(
          * @return This builder for chaining.
          */
         public Builder clearMaximumIterationsName() {
    -      
           maximumIterationsName_ = getDefaultInstance().getMaximumIterationsName();
    +      bitField0_ = (bitField0_ & ~0x00000400);
           onChanged();
           return this;
         }
    @@ -2238,12 +2238,10 @@ public Builder clearMaximumIterationsName() {
          */
         public Builder setMaximumIterationsNameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           maximumIterationsName_ = value;
    +      bitField0_ |= 0x00000400;
           onChanged();
           return this;
         }
    @@ -2251,13 +2249,13 @@ public Builder setMaximumIterationsNameBytes(
         private java.util.List nestedContexts_ =
           java.util.Collections.emptyList();
         private void ensureNestedContextsIsMutable() {
    -      if (!((bitField0_ & 0x00000004) != 0)) {
    +      if (!((bitField0_ & 0x00000800) != 0)) {
             nestedContexts_ = new java.util.ArrayList(nestedContexts_);
    -        bitField0_ |= 0x00000004;
    +        bitField0_ |= 0x00000800;
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.ControlFlowContextDef, org.tensorflow.proto.ControlFlowContextDef.Builder, org.tensorflow.proto.ControlFlowContextDefOrBuilder> nestedContextsBuilder_;
     
         /**
    @@ -2447,7 +2445,7 @@ public Builder addAllNestedContexts(
         public Builder clearNestedContexts() {
           if (nestedContextsBuilder_ == null) {
             nestedContexts_ = java.util.Collections.emptyList();
    -        bitField0_ = (bitField0_ & ~0x00000004);
    +        bitField0_ = (bitField0_ & ~0x00000800);
             onChanged();
           } else {
             nestedContextsBuilder_.clear();
    @@ -2545,32 +2543,20 @@ public org.tensorflow.proto.ControlFlowContextDef.Builder addNestedContextsBuild
              getNestedContextsBuilderList() {
           return getNestedContextsFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.ControlFlowContextDef, org.tensorflow.proto.ControlFlowContextDef.Builder, org.tensorflow.proto.ControlFlowContextDefOrBuilder> 
             getNestedContextsFieldBuilder() {
           if (nestedContextsBuilder_ == null) {
    -        nestedContextsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        nestedContextsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.ControlFlowContextDef, org.tensorflow.proto.ControlFlowContextDef.Builder, org.tensorflow.proto.ControlFlowContextDefOrBuilder>(
                     nestedContexts_,
    -                ((bitField0_ & 0x00000004) != 0),
    +                ((bitField0_ & 0x00000800) != 0),
                     getParentForChildren(),
                     isClean());
             nestedContexts_ = null;
           }
           return nestedContextsBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.WhileContextDef)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WhileContextDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WhileContextDefOrBuilder.java
    index ce17e49a335..1a2e27ced0e 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WhileContextDefOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WhileContextDefOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/control_flow.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHealth.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHealth.java
    index a432eaae62c..842c0e8ac3a 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHealth.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHealth.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/util/event.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -39,6 +41,15 @@ public enum WorkerHealth
       UNRECOGNIZED(-1),
       ;
     
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      WorkerHealth.class.getName());
    +  }
       /**
        * 
        * By default a worker is healthy.
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHeartbeatRequest.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHeartbeatRequest.java
    index da0da533f3e..6459105c36b 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHeartbeatRequest.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHeartbeatRequest.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/util/event.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,45 +9,43 @@
      * Protobuf type {@code tensorflow.WorkerHeartbeatRequest}
      */
     public final class WorkerHeartbeatRequest extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.WorkerHeartbeatRequest)
         WorkerHeartbeatRequestOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      WorkerHeartbeatRequest.class.getName());
    +  }
       // Use WorkerHeartbeatRequest.newBuilder() to construct.
    -  private WorkerHeartbeatRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private WorkerHeartbeatRequest(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private WorkerHeartbeatRequest() {
         shutdownMode_ = 0;
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new WorkerHeartbeatRequest();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.EventProtos.internal_static_tensorflow_WorkerHeartbeatRequest_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.EventProtos.internal_static_tensorflow_WorkerHeartbeatRequest_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
                 org.tensorflow.proto.WorkerHeartbeatRequest.class, org.tensorflow.proto.WorkerHeartbeatRequest.Builder.class);
       }
     
    +  private int bitField0_;
       public static final int SHUTDOWN_MODE_FIELD_NUMBER = 1;
    -  private int shutdownMode_;
    +  private int shutdownMode_ = 0;
       /**
        * .tensorflow.WorkerShutdownMode shutdown_mode = 1;
        * @return The enum numeric value on the wire for shutdownMode.
    @@ -58,8 +58,7 @@ protected java.lang.Object newInstance(
        * @return The shutdownMode.
        */
       @java.lang.Override public org.tensorflow.proto.WorkerShutdownMode getShutdownMode() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.WorkerShutdownMode result = org.tensorflow.proto.WorkerShutdownMode.valueOf(shutdownMode_);
    +    org.tensorflow.proto.WorkerShutdownMode result = org.tensorflow.proto.WorkerShutdownMode.forNumber(shutdownMode_);
         return result == null ? org.tensorflow.proto.WorkerShutdownMode.UNRECOGNIZED : result;
       }
     
    @@ -71,7 +70,7 @@ protected java.lang.Object newInstance(
        */
       @java.lang.Override
       public boolean hasWatchdogConfig() {
    -    return watchdogConfig_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * .tensorflow.WatchdogConfig watchdog_config = 2;
    @@ -86,7 +85,7 @@ public org.tensorflow.proto.WatchdogConfig getWatchdogConfig() {
        */
       @java.lang.Override
       public org.tensorflow.proto.WatchdogConfigOrBuilder getWatchdogConfigOrBuilder() {
    -    return getWatchdogConfig();
    +    return watchdogConfig_ == null ? org.tensorflow.proto.WatchdogConfig.getDefaultInstance() : watchdogConfig_;
       }
     
       public static final int EXIT_CODE_FIELD_NUMBER = 3;
    @@ -97,7 +96,7 @@ public org.tensorflow.proto.WatchdogConfigOrBuilder getWatchdogConfigOrBuilder()
        */
       @java.lang.Override
       public boolean hasExitCode() {
    -    return exitCode_ != null;
    +    return ((bitField0_ & 0x00000002) != 0);
       }
       /**
        * .tensorflow.RequestedExitCode exit_code = 3;
    @@ -112,7 +111,7 @@ public org.tensorflow.proto.RequestedExitCode getExitCode() {
        */
       @java.lang.Override
       public org.tensorflow.proto.RequestedExitCodeOrBuilder getExitCodeOrBuilder() {
    -    return getExitCode();
    +    return exitCode_ == null ? org.tensorflow.proto.RequestedExitCode.getDefaultInstance() : exitCode_;
       }
     
       private byte memoizedIsInitialized = -1;
    @@ -132,10 +131,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         if (shutdownMode_ != org.tensorflow.proto.WorkerShutdownMode.DEFAULT.getNumber()) {
           output.writeEnum(1, shutdownMode_);
         }
    -    if (watchdogConfig_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(2, getWatchdogConfig());
         }
    -    if (exitCode_ != null) {
    +    if (((bitField0_ & 0x00000002) != 0)) {
           output.writeMessage(3, getExitCode());
         }
         getUnknownFields().writeTo(output);
    @@ -151,11 +150,11 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeEnumSize(1, shutdownMode_);
         }
    -    if (watchdogConfig_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(2, getWatchdogConfig());
         }
    -    if (exitCode_ != null) {
    +    if (((bitField0_ & 0x00000002) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(3, getExitCode());
         }
    @@ -245,39 +244,41 @@ public static org.tensorflow.proto.WorkerHeartbeatRequest parseFrom(
       }
       public static org.tensorflow.proto.WorkerHeartbeatRequest parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.WorkerHeartbeatRequest parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.WorkerHeartbeatRequest parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.WorkerHeartbeatRequest parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.WorkerHeartbeatRequest parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.WorkerHeartbeatRequest parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -297,7 +298,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -305,7 +306,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.WorkerHeartbeatRequest}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.WorkerHeartbeatRequest)
           org.tensorflow.proto.WorkerHeartbeatRequestOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -314,7 +315,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.EventProtos.internal_static_tensorflow_WorkerHeartbeatRequest_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -323,29 +324,34 @@ public static final class Builder extends
     
         // Construct using org.tensorflow.proto.WorkerHeartbeatRequest.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getWatchdogConfigFieldBuilder();
    +        getExitCodeFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           shutdownMode_ = 0;
    -
    -      if (watchdogConfigBuilder_ == null) {
    -        watchdogConfig_ = null;
    -      } else {
    -        watchdogConfig_ = null;
    +      watchdogConfig_ = null;
    +      if (watchdogConfigBuilder_ != null) {
    +        watchdogConfigBuilder_.dispose();
             watchdogConfigBuilder_ = null;
           }
    -      if (exitCodeBuilder_ == null) {
    -        exitCode_ = null;
    -      } else {
    -        exitCode_ = null;
    +      exitCode_ = null;
    +      if (exitCodeBuilder_ != null) {
    +        exitCodeBuilder_.dispose();
             exitCodeBuilder_ = null;
           }
           return this;
    @@ -374,53 +380,32 @@ public org.tensorflow.proto.WorkerHeartbeatRequest build() {
         @java.lang.Override
         public org.tensorflow.proto.WorkerHeartbeatRequest buildPartial() {
           org.tensorflow.proto.WorkerHeartbeatRequest result = new org.tensorflow.proto.WorkerHeartbeatRequest(this);
    -      result.shutdownMode_ = shutdownMode_;
    -      if (watchdogConfigBuilder_ == null) {
    -        result.watchdogConfig_ = watchdogConfig_;
    -      } else {
    -        result.watchdogConfig_ = watchdogConfigBuilder_.build();
    -      }
    -      if (exitCodeBuilder_ == null) {
    -        result.exitCode_ = exitCode_;
    -      } else {
    -        result.exitCode_ = exitCodeBuilder_.build();
    -      }
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.WorkerHeartbeatRequest result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.shutdownMode_ = shutdownMode_;
    +      }
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.watchdogConfig_ = watchdogConfigBuilder_ == null
    +            ? watchdogConfig_
    +            : watchdogConfigBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.exitCode_ = exitCodeBuilder_ == null
    +            ? exitCode_
    +            : exitCodeBuilder_.build();
    +        to_bitField0_ |= 0x00000002;
    +      }
    +      result.bitField0_ |= to_bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.WorkerHeartbeatRequest) {
    @@ -470,21 +455,21 @@ public Builder mergeFrom(
                   break;
                 case 8: {
                   shutdownMode_ = input.readEnum();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 8
                 case 18: {
                   input.readMessage(
                       getWatchdogConfigFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 case 26: {
                   input.readMessage(
                       getExitCodeFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 26
                 default: {
    @@ -502,6 +487,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private int shutdownMode_ = 0;
         /**
    @@ -517,8 +503,8 @@ public Builder mergeFrom(
          * @return This builder for chaining.
          */
         public Builder setShutdownModeValue(int value) {
    -      
           shutdownMode_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -528,8 +514,7 @@ public Builder setShutdownModeValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.WorkerShutdownMode getShutdownMode() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.WorkerShutdownMode result = org.tensorflow.proto.WorkerShutdownMode.valueOf(shutdownMode_);
    +      org.tensorflow.proto.WorkerShutdownMode result = org.tensorflow.proto.WorkerShutdownMode.forNumber(shutdownMode_);
           return result == null ? org.tensorflow.proto.WorkerShutdownMode.UNRECOGNIZED : result;
         }
         /**
    @@ -541,7 +526,7 @@ public Builder setShutdownMode(org.tensorflow.proto.WorkerShutdownMode value) {
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00000001;
           shutdownMode_ = value.getNumber();
           onChanged();
           return this;
    @@ -551,21 +536,21 @@ public Builder setShutdownMode(org.tensorflow.proto.WorkerShutdownMode value) {
          * @return This builder for chaining.
          */
         public Builder clearShutdownMode() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000001);
           shutdownMode_ = 0;
           onChanged();
           return this;
         }
     
         private org.tensorflow.proto.WatchdogConfig watchdogConfig_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.WatchdogConfig, org.tensorflow.proto.WatchdogConfig.Builder, org.tensorflow.proto.WatchdogConfigOrBuilder> watchdogConfigBuilder_;
         /**
          * .tensorflow.WatchdogConfig watchdog_config = 2;
          * @return Whether the watchdogConfig field is set.
          */
         public boolean hasWatchdogConfig() {
    -      return watchdogConfigBuilder_ != null || watchdogConfig_ != null;
    +      return ((bitField0_ & 0x00000002) != 0);
         }
         /**
          * .tensorflow.WatchdogConfig watchdog_config = 2;
    @@ -587,11 +572,11 @@ public Builder setWatchdogConfig(org.tensorflow.proto.WatchdogConfig value) {
               throw new NullPointerException();
             }
             watchdogConfig_ = value;
    -        onChanged();
           } else {
             watchdogConfigBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return this;
         }
         /**
    @@ -601,11 +586,11 @@ public Builder setWatchdogConfig(
             org.tensorflow.proto.WatchdogConfig.Builder builderForValue) {
           if (watchdogConfigBuilder_ == null) {
             watchdogConfig_ = builderForValue.build();
    -        onChanged();
           } else {
             watchdogConfigBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return this;
         }
         /**
    @@ -613,38 +598,40 @@ public Builder setWatchdogConfig(
          */
         public Builder mergeWatchdogConfig(org.tensorflow.proto.WatchdogConfig value) {
           if (watchdogConfigBuilder_ == null) {
    -        if (watchdogConfig_ != null) {
    -          watchdogConfig_ =
    -            org.tensorflow.proto.WatchdogConfig.newBuilder(watchdogConfig_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000002) != 0) &&
    +          watchdogConfig_ != null &&
    +          watchdogConfig_ != org.tensorflow.proto.WatchdogConfig.getDefaultInstance()) {
    +          getWatchdogConfigBuilder().mergeFrom(value);
             } else {
               watchdogConfig_ = value;
             }
    -        onChanged();
           } else {
             watchdogConfigBuilder_.mergeFrom(value);
           }
    -
    +      if (watchdogConfig_ != null) {
    +        bitField0_ |= 0x00000002;
    +        onChanged();
    +      }
           return this;
         }
         /**
          * .tensorflow.WatchdogConfig watchdog_config = 2;
          */
         public Builder clearWatchdogConfig() {
    -      if (watchdogConfigBuilder_ == null) {
    -        watchdogConfig_ = null;
    -        onChanged();
    -      } else {
    -        watchdogConfig_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000002);
    +      watchdogConfig_ = null;
    +      if (watchdogConfigBuilder_ != null) {
    +        watchdogConfigBuilder_.dispose();
             watchdogConfigBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
          * .tensorflow.WatchdogConfig watchdog_config = 2;
          */
         public org.tensorflow.proto.WatchdogConfig.Builder getWatchdogConfigBuilder() {
    -      
    +      bitField0_ |= 0x00000002;
           onChanged();
           return getWatchdogConfigFieldBuilder().getBuilder();
         }
    @@ -662,11 +649,11 @@ public org.tensorflow.proto.WatchdogConfigOrBuilder getWatchdogConfigOrBuilder()
         /**
          * .tensorflow.WatchdogConfig watchdog_config = 2;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.WatchdogConfig, org.tensorflow.proto.WatchdogConfig.Builder, org.tensorflow.proto.WatchdogConfigOrBuilder> 
             getWatchdogConfigFieldBuilder() {
           if (watchdogConfigBuilder_ == null) {
    -        watchdogConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        watchdogConfigBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.WatchdogConfig, org.tensorflow.proto.WatchdogConfig.Builder, org.tensorflow.proto.WatchdogConfigOrBuilder>(
                     getWatchdogConfig(),
                     getParentForChildren(),
    @@ -677,14 +664,14 @@ public org.tensorflow.proto.WatchdogConfigOrBuilder getWatchdogConfigOrBuilder()
         }
     
         private org.tensorflow.proto.RequestedExitCode exitCode_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.RequestedExitCode, org.tensorflow.proto.RequestedExitCode.Builder, org.tensorflow.proto.RequestedExitCodeOrBuilder> exitCodeBuilder_;
         /**
          * .tensorflow.RequestedExitCode exit_code = 3;
          * @return Whether the exitCode field is set.
          */
         public boolean hasExitCode() {
    -      return exitCodeBuilder_ != null || exitCode_ != null;
    +      return ((bitField0_ & 0x00000004) != 0);
         }
         /**
          * .tensorflow.RequestedExitCode exit_code = 3;
    @@ -706,11 +693,11 @@ public Builder setExitCode(org.tensorflow.proto.RequestedExitCode value) {
               throw new NullPointerException();
             }
             exitCode_ = value;
    -        onChanged();
           } else {
             exitCodeBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000004;
    +      onChanged();
           return this;
         }
         /**
    @@ -720,11 +707,11 @@ public Builder setExitCode(
             org.tensorflow.proto.RequestedExitCode.Builder builderForValue) {
           if (exitCodeBuilder_ == null) {
             exitCode_ = builderForValue.build();
    -        onChanged();
           } else {
             exitCodeBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000004;
    +      onChanged();
           return this;
         }
         /**
    @@ -732,38 +719,40 @@ public Builder setExitCode(
          */
         public Builder mergeExitCode(org.tensorflow.proto.RequestedExitCode value) {
           if (exitCodeBuilder_ == null) {
    -        if (exitCode_ != null) {
    -          exitCode_ =
    -            org.tensorflow.proto.RequestedExitCode.newBuilder(exitCode_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000004) != 0) &&
    +          exitCode_ != null &&
    +          exitCode_ != org.tensorflow.proto.RequestedExitCode.getDefaultInstance()) {
    +          getExitCodeBuilder().mergeFrom(value);
             } else {
               exitCode_ = value;
             }
    -        onChanged();
           } else {
             exitCodeBuilder_.mergeFrom(value);
           }
    -
    +      if (exitCode_ != null) {
    +        bitField0_ |= 0x00000004;
    +        onChanged();
    +      }
           return this;
         }
         /**
          * .tensorflow.RequestedExitCode exit_code = 3;
          */
         public Builder clearExitCode() {
    -      if (exitCodeBuilder_ == null) {
    -        exitCode_ = null;
    -        onChanged();
    -      } else {
    -        exitCode_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000004);
    +      exitCode_ = null;
    +      if (exitCodeBuilder_ != null) {
    +        exitCodeBuilder_.dispose();
             exitCodeBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
          * .tensorflow.RequestedExitCode exit_code = 3;
          */
         public org.tensorflow.proto.RequestedExitCode.Builder getExitCodeBuilder() {
    -      
    +      bitField0_ |= 0x00000004;
           onChanged();
           return getExitCodeFieldBuilder().getBuilder();
         }
    @@ -781,11 +770,11 @@ public org.tensorflow.proto.RequestedExitCodeOrBuilder getExitCodeOrBuilder() {
         /**
          * .tensorflow.RequestedExitCode exit_code = 3;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.RequestedExitCode, org.tensorflow.proto.RequestedExitCode.Builder, org.tensorflow.proto.RequestedExitCodeOrBuilder> 
             getExitCodeFieldBuilder() {
           if (exitCodeBuilder_ == null) {
    -        exitCodeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        exitCodeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.RequestedExitCode, org.tensorflow.proto.RequestedExitCode.Builder, org.tensorflow.proto.RequestedExitCodeOrBuilder>(
                     getExitCode(),
                     getParentForChildren(),
    @@ -794,18 +783,6 @@ public org.tensorflow.proto.RequestedExitCodeOrBuilder getExitCodeOrBuilder() {
           }
           return exitCodeBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.WorkerHeartbeatRequest)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHeartbeatRequestOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHeartbeatRequestOrBuilder.java
    index 56cf3961a16..c6acadaba4d 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHeartbeatRequestOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHeartbeatRequestOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/util/event.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHeartbeatResponse.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHeartbeatResponse.java
    index 092c38b05ec..fcaeeb0419c 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHeartbeatResponse.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHeartbeatResponse.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/util/event.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -7,12 +9,21 @@
      * Protobuf type {@code tensorflow.WorkerHeartbeatResponse}
      */
     public final class WorkerHeartbeatResponse extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.WorkerHeartbeatResponse)
         WorkerHeartbeatResponseOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      WorkerHeartbeatResponse.class.getName());
    +  }
       // Use WorkerHeartbeatResponse.newBuilder() to construct.
    -  private WorkerHeartbeatResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private WorkerHeartbeatResponse(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private WorkerHeartbeatResponse() {
    @@ -21,25 +32,13 @@ private WorkerHeartbeatResponse() {
         hostname_ = "";
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new WorkerHeartbeatResponse();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.EventProtos.internal_static_tensorflow_WorkerHeartbeatResponse_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.EventProtos.internal_static_tensorflow_WorkerHeartbeatResponse_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
    @@ -47,7 +46,7 @@ protected java.lang.Object newInstance(
       }
     
       public static final int HEALTH_STATUS_FIELD_NUMBER = 1;
    -  private int healthStatus_;
    +  private int healthStatus_ = 0;
       /**
        * .tensorflow.WorkerHealth health_status = 1;
        * @return The enum numeric value on the wire for healthStatus.
    @@ -60,12 +59,12 @@ protected java.lang.Object newInstance(
        * @return The healthStatus.
        */
       @java.lang.Override public org.tensorflow.proto.WorkerHealth getHealthStatus() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.WorkerHealth result = org.tensorflow.proto.WorkerHealth.valueOf(healthStatus_);
    +    org.tensorflow.proto.WorkerHealth result = org.tensorflow.proto.WorkerHealth.forNumber(healthStatus_);
         return result == null ? org.tensorflow.proto.WorkerHealth.UNRECOGNIZED : result;
       }
     
       public static final int WORKER_LOG_FIELD_NUMBER = 2;
    +  @SuppressWarnings("serial")
       private java.util.List workerLog_;
       /**
        * repeated .tensorflow.Event worker_log = 2;
    @@ -106,7 +105,8 @@ public org.tensorflow.proto.EventOrBuilder getWorkerLogOrBuilder(
       }
     
       public static final int HOSTNAME_FIELD_NUMBER = 3;
    -  private volatile java.lang.Object hostname_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object hostname_ = "";
       /**
        * string hostname = 3;
        * @return The hostname.
    @@ -163,8 +163,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         for (int i = 0; i < workerLog_.size(); i++) {
           output.writeMessage(2, workerLog_.get(i));
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hostname_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, hostname_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(hostname_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 3, hostname_);
         }
         getUnknownFields().writeTo(output);
       }
    @@ -183,8 +183,8 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(2, workerLog_.get(i));
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hostname_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, hostname_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(hostname_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(3, hostname_);
         }
         size += getUnknownFields().getSerializedSize();
         memoizedSize = size;
    @@ -264,39 +264,41 @@ public static org.tensorflow.proto.WorkerHeartbeatResponse parseFrom(
       }
       public static org.tensorflow.proto.WorkerHeartbeatResponse parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.WorkerHeartbeatResponse parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.WorkerHeartbeatResponse parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.WorkerHeartbeatResponse parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.WorkerHeartbeatResponse parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.WorkerHeartbeatResponse parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -316,7 +318,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -324,7 +326,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.WorkerHeartbeatResponse}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.WorkerHeartbeatResponse)
           org.tensorflow.proto.WorkerHeartbeatResponseOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -333,7 +335,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.EventProtos.internal_static_tensorflow_WorkerHeartbeatResponse_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -346,24 +348,23 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           healthStatus_ = 0;
    -
           if (workerLogBuilder_ == null) {
             workerLog_ = java.util.Collections.emptyList();
           } else {
             workerLog_ = null;
             workerLogBuilder_.clear();
           }
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      bitField0_ = (bitField0_ & ~0x00000002);
           hostname_ = "";
    -
           return this;
         }
     
    @@ -390,54 +391,34 @@ public org.tensorflow.proto.WorkerHeartbeatResponse build() {
         @java.lang.Override
         public org.tensorflow.proto.WorkerHeartbeatResponse buildPartial() {
           org.tensorflow.proto.WorkerHeartbeatResponse result = new org.tensorflow.proto.WorkerHeartbeatResponse(this);
    -      int from_bitField0_ = bitField0_;
    -      result.healthStatus_ = healthStatus_;
    +      buildPartialRepeatedFields(result);
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartialRepeatedFields(org.tensorflow.proto.WorkerHeartbeatResponse result) {
           if (workerLogBuilder_ == null) {
    -        if (((bitField0_ & 0x00000001) != 0)) {
    +        if (((bitField0_ & 0x00000002) != 0)) {
               workerLog_ = java.util.Collections.unmodifiableList(workerLog_);
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ = (bitField0_ & ~0x00000002);
             }
             result.workerLog_ = workerLog_;
           } else {
             result.workerLog_ = workerLogBuilder_.build();
           }
    -      result.hostname_ = hostname_;
    -      onBuilt();
    -      return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.WorkerHeartbeatResponse result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.healthStatus_ = healthStatus_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.hostname_ = hostname_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.WorkerHeartbeatResponse) {
    @@ -457,7 +438,7 @@ public Builder mergeFrom(org.tensorflow.proto.WorkerHeartbeatResponse other) {
             if (!other.workerLog_.isEmpty()) {
               if (workerLog_.isEmpty()) {
                 workerLog_ = other.workerLog_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000002);
               } else {
                 ensureWorkerLogIsMutable();
                 workerLog_.addAll(other.workerLog_);
    @@ -470,9 +451,9 @@ public Builder mergeFrom(org.tensorflow.proto.WorkerHeartbeatResponse other) {
                 workerLogBuilder_.dispose();
                 workerLogBuilder_ = null;
                 workerLog_ = other.workerLog_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000002);
                 workerLogBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getWorkerLogFieldBuilder() : null;
               } else {
                 workerLogBuilder_.addAllMessages(other.workerLog_);
    @@ -481,6 +462,7 @@ public Builder mergeFrom(org.tensorflow.proto.WorkerHeartbeatResponse other) {
           }
           if (!other.getHostname().isEmpty()) {
             hostname_ = other.hostname_;
    +        bitField0_ |= 0x00000004;
             onChanged();
           }
           this.mergeUnknownFields(other.getUnknownFields());
    @@ -511,7 +493,7 @@ public Builder mergeFrom(
                   break;
                 case 8: {
                   healthStatus_ = input.readEnum();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 8
                 case 18: {
    @@ -529,7 +511,7 @@ public Builder mergeFrom(
                 } // case 18
                 case 26: {
                   hostname_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 26
                 default: {
    @@ -563,8 +545,8 @@ public Builder mergeFrom(
          * @return This builder for chaining.
          */
         public Builder setHealthStatusValue(int value) {
    -      
           healthStatus_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -574,8 +556,7 @@ public Builder setHealthStatusValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.WorkerHealth getHealthStatus() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.WorkerHealth result = org.tensorflow.proto.WorkerHealth.valueOf(healthStatus_);
    +      org.tensorflow.proto.WorkerHealth result = org.tensorflow.proto.WorkerHealth.forNumber(healthStatus_);
           return result == null ? org.tensorflow.proto.WorkerHealth.UNRECOGNIZED : result;
         }
         /**
    @@ -587,7 +568,7 @@ public Builder setHealthStatus(org.tensorflow.proto.WorkerHealth value) {
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00000001;
           healthStatus_ = value.getNumber();
           onChanged();
           return this;
    @@ -597,7 +578,7 @@ public Builder setHealthStatus(org.tensorflow.proto.WorkerHealth value) {
          * @return This builder for chaining.
          */
         public Builder clearHealthStatus() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000001);
           healthStatus_ = 0;
           onChanged();
           return this;
    @@ -606,13 +587,13 @@ public Builder clearHealthStatus() {
         private java.util.List workerLog_ =
           java.util.Collections.emptyList();
         private void ensureWorkerLogIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    +      if (!((bitField0_ & 0x00000002) != 0)) {
             workerLog_ = new java.util.ArrayList(workerLog_);
    -        bitField0_ |= 0x00000001;
    +        bitField0_ |= 0x00000002;
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.Event, org.tensorflow.proto.Event.Builder, org.tensorflow.proto.EventOrBuilder> workerLogBuilder_;
     
         /**
    @@ -758,7 +739,7 @@ public Builder addAllWorkerLog(
         public Builder clearWorkerLog() {
           if (workerLogBuilder_ == null) {
             workerLog_ = java.util.Collections.emptyList();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        bitField0_ = (bitField0_ & ~0x00000002);
             onChanged();
           } else {
             workerLogBuilder_.clear();
    @@ -828,14 +809,14 @@ public org.tensorflow.proto.Event.Builder addWorkerLogBuilder(
              getWorkerLogBuilderList() {
           return getWorkerLogFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.Event, org.tensorflow.proto.Event.Builder, org.tensorflow.proto.EventOrBuilder> 
             getWorkerLogFieldBuilder() {
           if (workerLogBuilder_ == null) {
    -        workerLogBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        workerLogBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.Event, org.tensorflow.proto.Event.Builder, org.tensorflow.proto.EventOrBuilder>(
                     workerLog_,
    -                ((bitField0_ & 0x00000001) != 0),
    +                ((bitField0_ & 0x00000002) != 0),
                     getParentForChildren(),
                     isClean());
             workerLog_ = null;
    @@ -884,11 +865,9 @@ public java.lang.String getHostname() {
          */
         public Builder setHostname(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           hostname_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -897,8 +876,8 @@ public Builder setHostname(
          * @return This builder for chaining.
          */
         public Builder clearHostname() {
    -      
           hostname_ = getDefaultInstance().getHostname();
    +      bitField0_ = (bitField0_ & ~0x00000004);
           onChanged();
           return this;
         }
    @@ -909,27 +888,13 @@ public Builder clearHostname() {
          */
         public Builder setHostnameBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           hostname_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.WorkerHeartbeatResponse)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHeartbeatResponseOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHeartbeatResponseOrBuilder.java
    index ad150376fbb..e3265649d84 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHeartbeatResponseOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHeartbeatResponseOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/util/event.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerShutdownMode.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerShutdownMode.java
    index c8400689a33..13ac914fc60 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerShutdownMode.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerShutdownMode.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/util/event.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto;
     
    @@ -32,6 +34,15 @@ public enum WorkerShutdownMode
       UNRECOGNIZED(-1),
       ;
     
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      WorkerShutdownMode.class.getName());
    +  }
       /**
        * DEFAULT = 0;
        */
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/core/CppShapeInference.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/core/CppShapeInference.java
    index 0deb67ebf1e..4e2e3d02615 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/core/CppShapeInference.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/core/CppShapeInference.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/cpp_shape_inference.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto.core;
     
     public final class CppShapeInference {
       private CppShapeInference() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      CppShapeInference.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -52,36 +63,33 @@ public interface CppShapeInferenceResultOrBuilder extends
        * Protobuf type {@code tensorflow.core.CppShapeInferenceResult}
        */
       public static final class CppShapeInferenceResult extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.core.CppShapeInferenceResult)
           CppShapeInferenceResultOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        CppShapeInferenceResult.class.getName());
    +    }
         // Use CppShapeInferenceResult.newBuilder() to construct.
    -    private CppShapeInferenceResult(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private CppShapeInferenceResult(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private CppShapeInferenceResult() {
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new CppShapeInferenceResult();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.core.CppShapeInference.internal_static_tensorflow_core_CppShapeInferenceResult_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.core.CppShapeInference.internal_static_tensorflow_core_CppShapeInferenceResult_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -137,43 +145,41 @@ public interface HandleShapeAndTypeOrBuilder extends
          * Protobuf type {@code tensorflow.core.CppShapeInferenceResult.HandleShapeAndType}
          */
         public static final class HandleShapeAndType extends
    -        com.google.protobuf.GeneratedMessageV3 implements
    +        com.google.protobuf.GeneratedMessage implements
             // @@protoc_insertion_point(message_implements:tensorflow.core.CppShapeInferenceResult.HandleShapeAndType)
             HandleShapeAndTypeOrBuilder {
         private static final long serialVersionUID = 0L;
    +      static {
    +        com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +          com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +          /* major= */ 4,
    +          /* minor= */ 28,
    +          /* patch= */ 3,
    +          /* suffix= */ "",
    +          HandleShapeAndType.class.getName());
    +      }
           // Use HandleShapeAndType.newBuilder() to construct.
    -      private HandleShapeAndType(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +      private HandleShapeAndType(com.google.protobuf.GeneratedMessage.Builder builder) {
             super(builder);
           }
           private HandleShapeAndType() {
             dtype_ = 0;
           }
     
    -      @java.lang.Override
    -      @SuppressWarnings({"unused"})
    -      protected java.lang.Object newInstance(
    -          UnusedPrivateParameter unused) {
    -        return new HandleShapeAndType();
    -      }
    -
    -      @java.lang.Override
    -      public final com.google.protobuf.UnknownFieldSet
    -      getUnknownFields() {
    -        return this.unknownFields;
    -      }
           public static final com.google.protobuf.Descriptors.Descriptor
               getDescriptor() {
             return org.tensorflow.proto.core.CppShapeInference.internal_static_tensorflow_core_CppShapeInferenceResult_HandleShapeAndType_descriptor;
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.core.CppShapeInference.internal_static_tensorflow_core_CppShapeInferenceResult_HandleShapeAndType_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
                     org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleShapeAndType.class, org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleShapeAndType.Builder.class);
           }
     
    +      private int bitField0_;
           public static final int SHAPE_FIELD_NUMBER = 1;
           private org.tensorflow.proto.TensorShapeProto shape_;
           /**
    @@ -182,7 +188,7 @@ protected java.lang.Object newInstance(
            */
           @java.lang.Override
           public boolean hasShape() {
    -        return shape_ != null;
    +        return ((bitField0_ & 0x00000001) != 0);
           }
           /**
            * .tensorflow.TensorShapeProto shape = 1;
    @@ -197,11 +203,11 @@ public org.tensorflow.proto.TensorShapeProto getShape() {
            */
           @java.lang.Override
           public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
    -        return getShape();
    +        return shape_ == null ? org.tensorflow.proto.TensorShapeProto.getDefaultInstance() : shape_;
           }
     
           public static final int DTYPE_FIELD_NUMBER = 2;
    -      private int dtype_;
    +      private int dtype_ = 0;
           /**
            * .tensorflow.DataType dtype = 2;
            * @return The enum numeric value on the wire for dtype.
    @@ -214,8 +220,7 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
            * @return The dtype.
            */
           @java.lang.Override public org.tensorflow.proto.DataType getDtype() {
    -        @SuppressWarnings("deprecation")
    -        org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(dtype_);
    +        org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(dtype_);
             return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
           }
     
    @@ -227,7 +232,7 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
            */
           @java.lang.Override
           public boolean hasType() {
    -        return type_ != null;
    +        return ((bitField0_ & 0x00000002) != 0);
           }
           /**
            * .tensorflow.FullTypeDef type = 4;
    @@ -242,7 +247,7 @@ public org.tensorflow.proto.FullTypeDef getType() {
            */
           @java.lang.Override
           public org.tensorflow.proto.FullTypeDefOrBuilder getTypeOrBuilder() {
    -        return getType();
    +        return type_ == null ? org.tensorflow.proto.FullTypeDef.getDefaultInstance() : type_;
           }
     
           private byte memoizedIsInitialized = -1;
    @@ -259,13 +264,13 @@ public final boolean isInitialized() {
           @java.lang.Override
           public void writeTo(com.google.protobuf.CodedOutputStream output)
                               throws java.io.IOException {
    -        if (shape_ != null) {
    +        if (((bitField0_ & 0x00000001) != 0)) {
               output.writeMessage(1, getShape());
             }
             if (dtype_ != org.tensorflow.proto.DataType.DT_INVALID.getNumber()) {
               output.writeEnum(2, dtype_);
             }
    -        if (type_ != null) {
    +        if (((bitField0_ & 0x00000002) != 0)) {
               output.writeMessage(4, getType());
             }
             getUnknownFields().writeTo(output);
    @@ -277,7 +282,7 @@ public int getSerializedSize() {
             if (size != -1) return size;
     
             size = 0;
    -        if (shape_ != null) {
    +        if (((bitField0_ & 0x00000001) != 0)) {
               size += com.google.protobuf.CodedOutputStream
                 .computeMessageSize(1, getShape());
             }
    @@ -285,7 +290,7 @@ public int getSerializedSize() {
               size += com.google.protobuf.CodedOutputStream
                 .computeEnumSize(2, dtype_);
             }
    -        if (type_ != null) {
    +        if (((bitField0_ & 0x00000002) != 0)) {
               size += com.google.protobuf.CodedOutputStream
                 .computeMessageSize(4, getType());
             }
    @@ -375,39 +380,41 @@ public static org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResul
           }
           public static org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleShapeAndType parseFrom(java.io.InputStream input)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input);
           }
           public static org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleShapeAndType parseFrom(
               java.io.InputStream input,
               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input, extensionRegistry);
           }
    +
           public static org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleShapeAndType parseDelimitedFrom(java.io.InputStream input)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseDelimitedWithIOException(PARSER, input);
           }
    +
           public static org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleShapeAndType parseDelimitedFrom(
               java.io.InputStream input,
               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
           }
           public static org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleShapeAndType parseFrom(
               com.google.protobuf.CodedInputStream input)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input);
           }
           public static org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleShapeAndType parseFrom(
               com.google.protobuf.CodedInputStream input,
               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input, extensionRegistry);
           }
     
    @@ -427,7 +434,7 @@ public Builder toBuilder() {
     
           @java.lang.Override
           protected Builder newBuilderForType(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             Builder builder = new Builder(parent);
             return builder;
           }
    @@ -435,7 +442,7 @@ protected Builder newBuilderForType(
            * Protobuf type {@code tensorflow.core.CppShapeInferenceResult.HandleShapeAndType}
            */
           public static final class Builder extends
    -          com.google.protobuf.GeneratedMessageV3.Builder implements
    +          com.google.protobuf.GeneratedMessage.Builder implements
               // @@protoc_insertion_point(builder_implements:tensorflow.core.CppShapeInferenceResult.HandleShapeAndType)
               org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleShapeAndTypeOrBuilder {
             public static final com.google.protobuf.Descriptors.Descriptor
    @@ -444,7 +451,7 @@ public static final class Builder extends
             }
     
             @java.lang.Override
    -        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +        protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
                 internalGetFieldAccessorTable() {
               return org.tensorflow.proto.core.CppShapeInference.internal_static_tensorflow_core_CppShapeInferenceResult_HandleShapeAndType_fieldAccessorTable
                   .ensureFieldAccessorsInitialized(
    @@ -453,29 +460,34 @@ public static final class Builder extends
     
             // Construct using org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleShapeAndType.newBuilder()
             private Builder() {
    -
    +          maybeForceBuilderInitialization();
             }
     
             private Builder(
    -            com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +            com.google.protobuf.GeneratedMessage.BuilderParent parent) {
               super(parent);
    -
    +          maybeForceBuilderInitialization();
    +        }
    +        private void maybeForceBuilderInitialization() {
    +          if (com.google.protobuf.GeneratedMessage
    +                  .alwaysUseFieldBuilders) {
    +            getShapeFieldBuilder();
    +            getTypeFieldBuilder();
    +          }
             }
             @java.lang.Override
             public Builder clear() {
               super.clear();
    -          if (shapeBuilder_ == null) {
    -            shape_ = null;
    -          } else {
    -            shape_ = null;
    +          bitField0_ = 0;
    +          shape_ = null;
    +          if (shapeBuilder_ != null) {
    +            shapeBuilder_.dispose();
                 shapeBuilder_ = null;
               }
               dtype_ = 0;
    -
    -          if (typeBuilder_ == null) {
    -            type_ = null;
    -          } else {
    -            type_ = null;
    +          type_ = null;
    +          if (typeBuilder_ != null) {
    +            typeBuilder_.dispose();
                 typeBuilder_ = null;
               }
               return this;
    @@ -504,53 +516,32 @@ public org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.Handl
             @java.lang.Override
             public org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleShapeAndType buildPartial() {
               org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleShapeAndType result = new org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleShapeAndType(this);
    -          if (shapeBuilder_ == null) {
    -            result.shape_ = shape_;
    -          } else {
    -            result.shape_ = shapeBuilder_.build();
    -          }
    -          result.dtype_ = dtype_;
    -          if (typeBuilder_ == null) {
    -            result.type_ = type_;
    -          } else {
    -            result.type_ = typeBuilder_.build();
    -          }
    +          if (bitField0_ != 0) { buildPartial0(result); }
               onBuilt();
               return result;
             }
     
    -        @java.lang.Override
    -        public Builder clone() {
    -          return super.clone();
    -        }
    -        @java.lang.Override
    -        public Builder setField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field,
    -            java.lang.Object value) {
    -          return super.setField(field, value);
    -        }
    -        @java.lang.Override
    -        public Builder clearField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field) {
    -          return super.clearField(field);
    -        }
    -        @java.lang.Override
    -        public Builder clearOneof(
    -            com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -          return super.clearOneof(oneof);
    -        }
    -        @java.lang.Override
    -        public Builder setRepeatedField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field,
    -            int index, java.lang.Object value) {
    -          return super.setRepeatedField(field, index, value);
    -        }
    -        @java.lang.Override
    -        public Builder addRepeatedField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field,
    -            java.lang.Object value) {
    -          return super.addRepeatedField(field, value);
    +        private void buildPartial0(org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleShapeAndType result) {
    +          int from_bitField0_ = bitField0_;
    +          int to_bitField0_ = 0;
    +          if (((from_bitField0_ & 0x00000001) != 0)) {
    +            result.shape_ = shapeBuilder_ == null
    +                ? shape_
    +                : shapeBuilder_.build();
    +            to_bitField0_ |= 0x00000001;
    +          }
    +          if (((from_bitField0_ & 0x00000002) != 0)) {
    +            result.dtype_ = dtype_;
    +          }
    +          if (((from_bitField0_ & 0x00000004) != 0)) {
    +            result.type_ = typeBuilder_ == null
    +                ? type_
    +                : typeBuilder_.build();
    +            to_bitField0_ |= 0x00000002;
    +          }
    +          result.bitField0_ |= to_bitField0_;
             }
    +
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.Message other) {
               if (other instanceof org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleShapeAndType) {
    @@ -602,19 +593,19 @@ public Builder mergeFrom(
                       input.readMessage(
                           getShapeFieldBuilder().getBuilder(),
                           extensionRegistry);
    -
    +                  bitField0_ |= 0x00000001;
                       break;
                     } // case 10
                     case 16: {
                       dtype_ = input.readEnum();
    -
    +                  bitField0_ |= 0x00000002;
                       break;
                     } // case 16
                     case 34: {
                       input.readMessage(
                           getTypeFieldBuilder().getBuilder(),
                           extensionRegistry);
    -
    +                  bitField0_ |= 0x00000004;
                       break;
                     } // case 34
                     default: {
    @@ -632,16 +623,17 @@ public Builder mergeFrom(
               } // finally
               return this;
             }
    +        private int bitField0_;
     
             private org.tensorflow.proto.TensorShapeProto shape_;
    -        private com.google.protobuf.SingleFieldBuilderV3<
    +        private com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> shapeBuilder_;
             /**
              * .tensorflow.TensorShapeProto shape = 1;
              * @return Whether the shape field is set.
              */
             public boolean hasShape() {
    -          return shapeBuilder_ != null || shape_ != null;
    +          return ((bitField0_ & 0x00000001) != 0);
             }
             /**
              * .tensorflow.TensorShapeProto shape = 1;
    @@ -663,11 +655,11 @@ public Builder setShape(org.tensorflow.proto.TensorShapeProto value) {
                   throw new NullPointerException();
                 }
                 shape_ = value;
    -            onChanged();
               } else {
                 shapeBuilder_.setMessage(value);
               }
    -
    +          bitField0_ |= 0x00000001;
    +          onChanged();
               return this;
             }
             /**
    @@ -677,11 +669,11 @@ public Builder setShape(
                 org.tensorflow.proto.TensorShapeProto.Builder builderForValue) {
               if (shapeBuilder_ == null) {
                 shape_ = builderForValue.build();
    -            onChanged();
               } else {
                 shapeBuilder_.setMessage(builderForValue.build());
               }
    -
    +          bitField0_ |= 0x00000001;
    +          onChanged();
               return this;
             }
             /**
    @@ -689,38 +681,40 @@ public Builder setShape(
              */
             public Builder mergeShape(org.tensorflow.proto.TensorShapeProto value) {
               if (shapeBuilder_ == null) {
    -            if (shape_ != null) {
    -              shape_ =
    -                org.tensorflow.proto.TensorShapeProto.newBuilder(shape_).mergeFrom(value).buildPartial();
    +            if (((bitField0_ & 0x00000001) != 0) &&
    +              shape_ != null &&
    +              shape_ != org.tensorflow.proto.TensorShapeProto.getDefaultInstance()) {
    +              getShapeBuilder().mergeFrom(value);
                 } else {
                   shape_ = value;
                 }
    -            onChanged();
               } else {
                 shapeBuilder_.mergeFrom(value);
               }
    -
    +          if (shape_ != null) {
    +            bitField0_ |= 0x00000001;
    +            onChanged();
    +          }
               return this;
             }
             /**
              * .tensorflow.TensorShapeProto shape = 1;
              */
             public Builder clearShape() {
    -          if (shapeBuilder_ == null) {
    -            shape_ = null;
    -            onChanged();
    -          } else {
    -            shape_ = null;
    +          bitField0_ = (bitField0_ & ~0x00000001);
    +          shape_ = null;
    +          if (shapeBuilder_ != null) {
    +            shapeBuilder_.dispose();
                 shapeBuilder_ = null;
               }
    -
    +          onChanged();
               return this;
             }
             /**
              * .tensorflow.TensorShapeProto shape = 1;
              */
             public org.tensorflow.proto.TensorShapeProto.Builder getShapeBuilder() {
    -          
    +          bitField0_ |= 0x00000001;
               onChanged();
               return getShapeFieldBuilder().getBuilder();
             }
    @@ -738,11 +732,11 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
             /**
              * .tensorflow.TensorShapeProto shape = 1;
              */
    -        private com.google.protobuf.SingleFieldBuilderV3<
    +        private com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> 
                 getShapeFieldBuilder() {
               if (shapeBuilder_ == null) {
    -            shapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +            shapeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                     org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder>(
                         getShape(),
                         getParentForChildren(),
    @@ -766,8 +760,8 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
              * @return This builder for chaining.
              */
             public Builder setDtypeValue(int value) {
    -          
               dtype_ = value;
    +          bitField0_ |= 0x00000002;
               onChanged();
               return this;
             }
    @@ -777,8 +771,7 @@ public Builder setDtypeValue(int value) {
              */
             @java.lang.Override
             public org.tensorflow.proto.DataType getDtype() {
    -          @SuppressWarnings("deprecation")
    -          org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(dtype_);
    +          org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(dtype_);
               return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
             }
             /**
    @@ -790,7 +783,7 @@ public Builder setDtype(org.tensorflow.proto.DataType value) {
               if (value == null) {
                 throw new NullPointerException();
               }
    -          
    +          bitField0_ |= 0x00000002;
               dtype_ = value.getNumber();
               onChanged();
               return this;
    @@ -800,21 +793,21 @@ public Builder setDtype(org.tensorflow.proto.DataType value) {
              * @return This builder for chaining.
              */
             public Builder clearDtype() {
    -          
    +          bitField0_ = (bitField0_ & ~0x00000002);
               dtype_ = 0;
               onChanged();
               return this;
             }
     
             private org.tensorflow.proto.FullTypeDef type_;
    -        private com.google.protobuf.SingleFieldBuilderV3<
    +        private com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.FullTypeDef, org.tensorflow.proto.FullTypeDef.Builder, org.tensorflow.proto.FullTypeDefOrBuilder> typeBuilder_;
             /**
              * .tensorflow.FullTypeDef type = 4;
              * @return Whether the type field is set.
              */
             public boolean hasType() {
    -          return typeBuilder_ != null || type_ != null;
    +          return ((bitField0_ & 0x00000004) != 0);
             }
             /**
              * .tensorflow.FullTypeDef type = 4;
    @@ -836,11 +829,11 @@ public Builder setType(org.tensorflow.proto.FullTypeDef value) {
                   throw new NullPointerException();
                 }
                 type_ = value;
    -            onChanged();
               } else {
                 typeBuilder_.setMessage(value);
               }
    -
    +          bitField0_ |= 0x00000004;
    +          onChanged();
               return this;
             }
             /**
    @@ -850,11 +843,11 @@ public Builder setType(
                 org.tensorflow.proto.FullTypeDef.Builder builderForValue) {
               if (typeBuilder_ == null) {
                 type_ = builderForValue.build();
    -            onChanged();
               } else {
                 typeBuilder_.setMessage(builderForValue.build());
               }
    -
    +          bitField0_ |= 0x00000004;
    +          onChanged();
               return this;
             }
             /**
    @@ -862,38 +855,40 @@ public Builder setType(
              */
             public Builder mergeType(org.tensorflow.proto.FullTypeDef value) {
               if (typeBuilder_ == null) {
    -            if (type_ != null) {
    -              type_ =
    -                org.tensorflow.proto.FullTypeDef.newBuilder(type_).mergeFrom(value).buildPartial();
    +            if (((bitField0_ & 0x00000004) != 0) &&
    +              type_ != null &&
    +              type_ != org.tensorflow.proto.FullTypeDef.getDefaultInstance()) {
    +              getTypeBuilder().mergeFrom(value);
                 } else {
                   type_ = value;
                 }
    -            onChanged();
               } else {
                 typeBuilder_.mergeFrom(value);
               }
    -
    +          if (type_ != null) {
    +            bitField0_ |= 0x00000004;
    +            onChanged();
    +          }
               return this;
             }
             /**
              * .tensorflow.FullTypeDef type = 4;
              */
             public Builder clearType() {
    -          if (typeBuilder_ == null) {
    -            type_ = null;
    -            onChanged();
    -          } else {
    -            type_ = null;
    +          bitField0_ = (bitField0_ & ~0x00000004);
    +          type_ = null;
    +          if (typeBuilder_ != null) {
    +            typeBuilder_.dispose();
                 typeBuilder_ = null;
               }
    -
    +          onChanged();
               return this;
             }
             /**
              * .tensorflow.FullTypeDef type = 4;
              */
             public org.tensorflow.proto.FullTypeDef.Builder getTypeBuilder() {
    -          
    +          bitField0_ |= 0x00000004;
               onChanged();
               return getTypeFieldBuilder().getBuilder();
             }
    @@ -911,11 +906,11 @@ public org.tensorflow.proto.FullTypeDefOrBuilder getTypeOrBuilder() {
             /**
              * .tensorflow.FullTypeDef type = 4;
              */
    -        private com.google.protobuf.SingleFieldBuilderV3<
    +        private com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.FullTypeDef, org.tensorflow.proto.FullTypeDef.Builder, org.tensorflow.proto.FullTypeDefOrBuilder> 
                 getTypeFieldBuilder() {
               if (typeBuilder_ == null) {
    -            typeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +            typeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                     org.tensorflow.proto.FullTypeDef, org.tensorflow.proto.FullTypeDef.Builder, org.tensorflow.proto.FullTypeDefOrBuilder>(
                         getType(),
                         getParentForChildren(),
    @@ -924,18 +919,6 @@ public org.tensorflow.proto.FullTypeDefOrBuilder getTypeOrBuilder() {
               }
               return typeBuilder_;
             }
    -        @java.lang.Override
    -        public final Builder setUnknownFields(
    -            final com.google.protobuf.UnknownFieldSet unknownFields) {
    -          return super.setUnknownFields(unknownFields);
    -        }
    -
    -        @java.lang.Override
    -        public final Builder mergeUnknownFields(
    -            final com.google.protobuf.UnknownFieldSet unknownFields) {
    -          return super.mergeUnknownFields(unknownFields);
    -        }
    -
     
             // @@protoc_insertion_point(builder_scope:tensorflow.core.CppShapeInferenceResult.HandleShapeAndType)
           }
    @@ -1046,37 +1029,34 @@ org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleShapeA
          * Protobuf type {@code tensorflow.core.CppShapeInferenceResult.HandleData}
          */
         public static final class HandleData extends
    -        com.google.protobuf.GeneratedMessageV3 implements
    +        com.google.protobuf.GeneratedMessage implements
             // @@protoc_insertion_point(message_implements:tensorflow.core.CppShapeInferenceResult.HandleData)
             HandleDataOrBuilder {
         private static final long serialVersionUID = 0L;
    +      static {
    +        com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +          com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +          /* major= */ 4,
    +          /* minor= */ 28,
    +          /* patch= */ 3,
    +          /* suffix= */ "",
    +          HandleData.class.getName());
    +      }
           // Use HandleData.newBuilder() to construct.
    -      private HandleData(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +      private HandleData(com.google.protobuf.GeneratedMessage.Builder builder) {
             super(builder);
           }
           private HandleData() {
             shapeAndType_ = java.util.Collections.emptyList();
           }
     
    -      @java.lang.Override
    -      @SuppressWarnings({"unused"})
    -      protected java.lang.Object newInstance(
    -          UnusedPrivateParameter unused) {
    -        return new HandleData();
    -      }
    -
    -      @java.lang.Override
    -      public final com.google.protobuf.UnknownFieldSet
    -      getUnknownFields() {
    -        return this.unknownFields;
    -      }
           public static final com.google.protobuf.Descriptors.Descriptor
               getDescriptor() {
             return org.tensorflow.proto.core.CppShapeInference.internal_static_tensorflow_core_CppShapeInferenceResult_HandleData_descriptor;
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.core.CppShapeInference.internal_static_tensorflow_core_CppShapeInferenceResult_HandleData_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -1084,7 +1064,7 @@ protected java.lang.Object newInstance(
           }
     
           public static final int IS_SET_FIELD_NUMBER = 1;
    -      private boolean isSet_;
    +      private boolean isSet_ = false;
           /**
            * bool is_set = 1;
            * @return The isSet.
    @@ -1095,6 +1075,7 @@ public boolean getIsSet() {
           }
     
           public static final int SHAPE_AND_TYPE_FIELD_NUMBER = 2;
    +      @SuppressWarnings("serial")
           private java.util.List shapeAndType_;
           /**
            * 
    @@ -1267,39 +1248,41 @@ public static org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResul
           }
           public static org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleData parseFrom(java.io.InputStream input)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input);
           }
           public static org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleData parseFrom(
               java.io.InputStream input,
               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input, extensionRegistry);
           }
    +
           public static org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleData parseDelimitedFrom(java.io.InputStream input)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseDelimitedWithIOException(PARSER, input);
           }
    +
           public static org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleData parseDelimitedFrom(
               java.io.InputStream input,
               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
           }
           public static org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleData parseFrom(
               com.google.protobuf.CodedInputStream input)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input);
           }
           public static org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleData parseFrom(
               com.google.protobuf.CodedInputStream input,
               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input, extensionRegistry);
           }
     
    @@ -1319,7 +1302,7 @@ public Builder toBuilder() {
     
           @java.lang.Override
           protected Builder newBuilderForType(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             Builder builder = new Builder(parent);
             return builder;
           }
    @@ -1327,7 +1310,7 @@ protected Builder newBuilderForType(
            * Protobuf type {@code tensorflow.core.CppShapeInferenceResult.HandleData}
            */
           public static final class Builder extends
    -          com.google.protobuf.GeneratedMessageV3.Builder implements
    +          com.google.protobuf.GeneratedMessage.Builder implements
               // @@protoc_insertion_point(builder_implements:tensorflow.core.CppShapeInferenceResult.HandleData)
               org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleDataOrBuilder {
             public static final com.google.protobuf.Descriptors.Descriptor
    @@ -1336,7 +1319,7 @@ public static final class Builder extends
             }
     
             @java.lang.Override
    -        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +        protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
                 internalGetFieldAccessorTable() {
               return org.tensorflow.proto.core.CppShapeInference.internal_static_tensorflow_core_CppShapeInferenceResult_HandleData_fieldAccessorTable
                   .ensureFieldAccessorsInitialized(
    @@ -1349,22 +1332,22 @@ private Builder() {
             }
     
             private Builder(
    -            com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +            com.google.protobuf.GeneratedMessage.BuilderParent parent) {
               super(parent);
     
             }
             @java.lang.Override
             public Builder clear() {
               super.clear();
    +          bitField0_ = 0;
               isSet_ = false;
    -
               if (shapeAndTypeBuilder_ == null) {
                 shapeAndType_ = java.util.Collections.emptyList();
               } else {
                 shapeAndType_ = null;
                 shapeAndTypeBuilder_.clear();
               }
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ = (bitField0_ & ~0x00000002);
               return this;
             }
     
    @@ -1391,53 +1374,31 @@ public org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.Handl
             @java.lang.Override
             public org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleData buildPartial() {
               org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleData result = new org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleData(this);
    -          int from_bitField0_ = bitField0_;
    -          result.isSet_ = isSet_;
    +          buildPartialRepeatedFields(result);
    +          if (bitField0_ != 0) { buildPartial0(result); }
    +          onBuilt();
    +          return result;
    +        }
    +
    +        private void buildPartialRepeatedFields(org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleData result) {
               if (shapeAndTypeBuilder_ == null) {
    -            if (((bitField0_ & 0x00000001) != 0)) {
    +            if (((bitField0_ & 0x00000002) != 0)) {
                   shapeAndType_ = java.util.Collections.unmodifiableList(shapeAndType_);
    -              bitField0_ = (bitField0_ & ~0x00000001);
    +              bitField0_ = (bitField0_ & ~0x00000002);
                 }
                 result.shapeAndType_ = shapeAndType_;
               } else {
                 result.shapeAndType_ = shapeAndTypeBuilder_.build();
               }
    -          onBuilt();
    -          return result;
             }
     
    -        @java.lang.Override
    -        public Builder clone() {
    -          return super.clone();
    -        }
    -        @java.lang.Override
    -        public Builder setField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field,
    -            java.lang.Object value) {
    -          return super.setField(field, value);
    -        }
    -        @java.lang.Override
    -        public Builder clearField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field) {
    -          return super.clearField(field);
    -        }
    -        @java.lang.Override
    -        public Builder clearOneof(
    -            com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -          return super.clearOneof(oneof);
    -        }
    -        @java.lang.Override
    -        public Builder setRepeatedField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field,
    -            int index, java.lang.Object value) {
    -          return super.setRepeatedField(field, index, value);
    -        }
    -        @java.lang.Override
    -        public Builder addRepeatedField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field,
    -            java.lang.Object value) {
    -          return super.addRepeatedField(field, value);
    +        private void buildPartial0(org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleData result) {
    +          int from_bitField0_ = bitField0_;
    +          if (((from_bitField0_ & 0x00000001) != 0)) {
    +            result.isSet_ = isSet_;
    +          }
             }
    +
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.Message other) {
               if (other instanceof org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleData) {
    @@ -1457,7 +1418,7 @@ public Builder mergeFrom(org.tensorflow.proto.core.CppShapeInference.CppShapeInf
                 if (!other.shapeAndType_.isEmpty()) {
                   if (shapeAndType_.isEmpty()) {
                     shapeAndType_ = other.shapeAndType_;
    -                bitField0_ = (bitField0_ & ~0x00000001);
    +                bitField0_ = (bitField0_ & ~0x00000002);
                   } else {
                     ensureShapeAndTypeIsMutable();
                     shapeAndType_.addAll(other.shapeAndType_);
    @@ -1470,9 +1431,9 @@ public Builder mergeFrom(org.tensorflow.proto.core.CppShapeInference.CppShapeInf
                     shapeAndTypeBuilder_.dispose();
                     shapeAndTypeBuilder_ = null;
                     shapeAndType_ = other.shapeAndType_;
    -                bitField0_ = (bitField0_ & ~0x00000001);
    +                bitField0_ = (bitField0_ & ~0x00000002);
                     shapeAndTypeBuilder_ = 
    -                  com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +                  com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                          getShapeAndTypeFieldBuilder() : null;
                   } else {
                     shapeAndTypeBuilder_.addAllMessages(other.shapeAndType_);
    @@ -1507,7 +1468,7 @@ public Builder mergeFrom(
                       break;
                     case 8: {
                       isSet_ = input.readBool();
    -
    +                  bitField0_ |= 0x00000001;
                       break;
                     } // case 8
                     case 18: {
    @@ -1555,8 +1516,9 @@ public boolean getIsSet() {
              * @return This builder for chaining.
              */
             public Builder setIsSet(boolean value) {
    -          
    +
               isSet_ = value;
    +          bitField0_ |= 0x00000001;
               onChanged();
               return this;
             }
    @@ -1565,7 +1527,7 @@ public Builder setIsSet(boolean value) {
              * @return This builder for chaining.
              */
             public Builder clearIsSet() {
    -          
    +          bitField0_ = (bitField0_ & ~0x00000001);
               isSet_ = false;
               onChanged();
               return this;
    @@ -1574,13 +1536,13 @@ public Builder clearIsSet() {
             private java.util.List shapeAndType_ =
               java.util.Collections.emptyList();
             private void ensureShapeAndTypeIsMutable() {
    -          if (!((bitField0_ & 0x00000001) != 0)) {
    +          if (!((bitField0_ & 0x00000002) != 0)) {
                 shapeAndType_ = new java.util.ArrayList(shapeAndType_);
    -            bitField0_ |= 0x00000001;
    +            bitField0_ |= 0x00000002;
                }
             }
     
    -        private com.google.protobuf.RepeatedFieldBuilderV3<
    +        private com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleShapeAndType, org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleShapeAndType.Builder, org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleShapeAndTypeOrBuilder> shapeAndTypeBuilder_;
     
             /**
    @@ -1770,7 +1732,7 @@ public Builder addAllShapeAndType(
             public Builder clearShapeAndType() {
               if (shapeAndTypeBuilder_ == null) {
                 shapeAndType_ = java.util.Collections.emptyList();
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000002);
                 onChanged();
               } else {
                 shapeAndTypeBuilder_.clear();
    @@ -1868,32 +1830,20 @@ public org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.Handl
                  getShapeAndTypeBuilderList() {
               return getShapeAndTypeFieldBuilder().getBuilderList();
             }
    -        private com.google.protobuf.RepeatedFieldBuilderV3<
    +        private com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleShapeAndType, org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleShapeAndType.Builder, org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleShapeAndTypeOrBuilder> 
                 getShapeAndTypeFieldBuilder() {
               if (shapeAndTypeBuilder_ == null) {
    -            shapeAndTypeBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +            shapeAndTypeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                     org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleShapeAndType, org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleShapeAndType.Builder, org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleShapeAndTypeOrBuilder>(
                         shapeAndType_,
    -                    ((bitField0_ & 0x00000001) != 0),
    +                    ((bitField0_ & 0x00000002) != 0),
                         getParentForChildren(),
                         isClean());
                 shapeAndType_ = null;
               }
               return shapeAndTypeBuilder_;
             }
    -        @java.lang.Override
    -        public final Builder setUnknownFields(
    -            final com.google.protobuf.UnknownFieldSet unknownFields) {
    -          return super.setUnknownFields(unknownFields);
    -        }
    -
    -        @java.lang.Override
    -        public final Builder mergeUnknownFields(
    -            final com.google.protobuf.UnknownFieldSet unknownFields) {
    -          return super.mergeUnknownFields(unknownFields);
    -        }
    -
     
             // @@protoc_insertion_point(builder_scope:tensorflow.core.CppShapeInferenceResult.HandleData)
           }
    @@ -1946,6 +1896,7 @@ public org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.Handl
     
         }
     
    +    private int bitField0_;
         public static final int SHAPE_FIELD_NUMBER = 1;
         private org.tensorflow.proto.TensorShapeProto shape_;
         /**
    @@ -1954,7 +1905,7 @@ public org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.Handl
          */
         @java.lang.Override
         public boolean hasShape() {
    -      return shape_ != null;
    +      return ((bitField0_ & 0x00000001) != 0);
         }
         /**
          * .tensorflow.TensorShapeProto shape = 1;
    @@ -1969,7 +1920,7 @@ public org.tensorflow.proto.TensorShapeProto getShape() {
          */
         @java.lang.Override
         public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
    -      return getShape();
    +      return shape_ == null ? org.tensorflow.proto.TensorShapeProto.getDefaultInstance() : shape_;
         }
     
         public static final int HANDLE_DATA_FIELD_NUMBER = 4;
    @@ -1980,7 +1931,7 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
          */
         @java.lang.Override
         public boolean hasHandleData() {
    -      return handleData_ != null;
    +      return ((bitField0_ & 0x00000002) != 0);
         }
         /**
          * .tensorflow.core.CppShapeInferenceResult.HandleData handle_data = 4;
    @@ -1995,7 +1946,7 @@ public org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.Handl
          */
         @java.lang.Override
         public org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleDataOrBuilder getHandleDataOrBuilder() {
    -      return getHandleData();
    +      return handleData_ == null ? org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleData.getDefaultInstance() : handleData_;
         }
     
         private byte memoizedIsInitialized = -1;
    @@ -2012,10 +1963,10 @@ public final boolean isInitialized() {
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output)
                             throws java.io.IOException {
    -      if (shape_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             output.writeMessage(1, getShape());
           }
    -      if (handleData_ != null) {
    +      if (((bitField0_ & 0x00000002) != 0)) {
             output.writeMessage(4, getHandleData());
           }
           getUnknownFields().writeTo(output);
    @@ -2027,11 +1978,11 @@ public int getSerializedSize() {
           if (size != -1) return size;
     
           size = 0;
    -      if (shape_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(1, getShape());
           }
    -      if (handleData_ != null) {
    +      if (((bitField0_ & 0x00000002) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(4, getHandleData());
           }
    @@ -2118,39 +2069,41 @@ public static org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResul
         }
         public static org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -2170,7 +2123,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -2178,7 +2131,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.core.CppShapeInferenceResult}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.core.CppShapeInferenceResult)
             org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResultOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -2187,7 +2140,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.core.CppShapeInference.internal_static_tensorflow_core_CppShapeInferenceResult_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -2196,27 +2149,33 @@ public static final class Builder extends
     
           // Construct using org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.newBuilder()
           private Builder() {
    -
    +        maybeForceBuilderInitialization();
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
    -
    +        maybeForceBuilderInitialization();
    +      }
    +      private void maybeForceBuilderInitialization() {
    +        if (com.google.protobuf.GeneratedMessage
    +                .alwaysUseFieldBuilders) {
    +          getShapeFieldBuilder();
    +          getHandleDataFieldBuilder();
    +        }
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    -        if (shapeBuilder_ == null) {
    -          shape_ = null;
    -        } else {
    -          shape_ = null;
    +        bitField0_ = 0;
    +        shape_ = null;
    +        if (shapeBuilder_ != null) {
    +          shapeBuilder_.dispose();
               shapeBuilder_ = null;
             }
    -        if (handleDataBuilder_ == null) {
    -          handleData_ = null;
    -        } else {
    -          handleData_ = null;
    +        handleData_ = null;
    +        if (handleDataBuilder_ != null) {
    +          handleDataBuilder_.dispose();
               handleDataBuilder_ = null;
             }
             return this;
    @@ -2245,52 +2204,29 @@ public org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult build
           @java.lang.Override
           public org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult buildPartial() {
             org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult result = new org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult(this);
    -        if (shapeBuilder_ == null) {
    -          result.shape_ = shape_;
    -        } else {
    -          result.shape_ = shapeBuilder_.build();
    -        }
    -        if (handleDataBuilder_ == null) {
    -          result.handleData_ = handleData_;
    -        } else {
    -          result.handleData_ = handleDataBuilder_.build();
    -        }
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult result) {
    +        int from_bitField0_ = bitField0_;
    +        int to_bitField0_ = 0;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.shape_ = shapeBuilder_ == null
    +              ? shape_
    +              : shapeBuilder_.build();
    +          to_bitField0_ |= 0x00000001;
    +        }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.handleData_ = handleDataBuilder_ == null
    +              ? handleData_
    +              : handleDataBuilder_.build();
    +          to_bitField0_ |= 0x00000002;
    +        }
    +        result.bitField0_ |= to_bitField0_;
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult) {
    @@ -2339,14 +2275,14 @@ public Builder mergeFrom(
                     input.readMessage(
                         getShapeFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 10
                   case 34: {
                     input.readMessage(
                         getHandleDataFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 34
                   default: {
    @@ -2364,16 +2300,17 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    +      private int bitField0_;
     
           private org.tensorflow.proto.TensorShapeProto shape_;
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> shapeBuilder_;
           /**
            * .tensorflow.TensorShapeProto shape = 1;
            * @return Whether the shape field is set.
            */
           public boolean hasShape() {
    -        return shapeBuilder_ != null || shape_ != null;
    +        return ((bitField0_ & 0x00000001) != 0);
           }
           /**
            * .tensorflow.TensorShapeProto shape = 1;
    @@ -2395,11 +2332,11 @@ public Builder setShape(org.tensorflow.proto.TensorShapeProto value) {
                 throw new NullPointerException();
               }
               shape_ = value;
    -          onChanged();
             } else {
               shapeBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000001;
    +        onChanged();
             return this;
           }
           /**
    @@ -2409,11 +2346,11 @@ public Builder setShape(
               org.tensorflow.proto.TensorShapeProto.Builder builderForValue) {
             if (shapeBuilder_ == null) {
               shape_ = builderForValue.build();
    -          onChanged();
             } else {
               shapeBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000001;
    +        onChanged();
             return this;
           }
           /**
    @@ -2421,38 +2358,40 @@ public Builder setShape(
            */
           public Builder mergeShape(org.tensorflow.proto.TensorShapeProto value) {
             if (shapeBuilder_ == null) {
    -          if (shape_ != null) {
    -            shape_ =
    -              org.tensorflow.proto.TensorShapeProto.newBuilder(shape_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000001) != 0) &&
    +            shape_ != null &&
    +            shape_ != org.tensorflow.proto.TensorShapeProto.getDefaultInstance()) {
    +            getShapeBuilder().mergeFrom(value);
               } else {
                 shape_ = value;
               }
    -          onChanged();
             } else {
               shapeBuilder_.mergeFrom(value);
             }
    -
    +        if (shape_ != null) {
    +          bitField0_ |= 0x00000001;
    +          onChanged();
    +        }
             return this;
           }
           /**
            * .tensorflow.TensorShapeProto shape = 1;
            */
           public Builder clearShape() {
    -        if (shapeBuilder_ == null) {
    -          shape_ = null;
    -          onChanged();
    -        } else {
    -          shape_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000001);
    +        shape_ = null;
    +        if (shapeBuilder_ != null) {
    +          shapeBuilder_.dispose();
               shapeBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
            * .tensorflow.TensorShapeProto shape = 1;
            */
           public org.tensorflow.proto.TensorShapeProto.Builder getShapeBuilder() {
    -        
    +        bitField0_ |= 0x00000001;
             onChanged();
             return getShapeFieldBuilder().getBuilder();
           }
    @@ -2470,11 +2409,11 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
           /**
            * .tensorflow.TensorShapeProto shape = 1;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> 
               getShapeFieldBuilder() {
             if (shapeBuilder_ == null) {
    -          shapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          shapeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder>(
                       getShape(),
                       getParentForChildren(),
    @@ -2485,14 +2424,14 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
           }
     
           private org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleData handleData_;
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleData, org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleData.Builder, org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleDataOrBuilder> handleDataBuilder_;
           /**
            * .tensorflow.core.CppShapeInferenceResult.HandleData handle_data = 4;
            * @return Whether the handleData field is set.
            */
           public boolean hasHandleData() {
    -        return handleDataBuilder_ != null || handleData_ != null;
    +        return ((bitField0_ & 0x00000002) != 0);
           }
           /**
            * .tensorflow.core.CppShapeInferenceResult.HandleData handle_data = 4;
    @@ -2514,11 +2453,11 @@ public Builder setHandleData(org.tensorflow.proto.core.CppShapeInference.CppShap
                 throw new NullPointerException();
               }
               handleData_ = value;
    -          onChanged();
             } else {
               handleDataBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000002;
    +        onChanged();
             return this;
           }
           /**
    @@ -2528,11 +2467,11 @@ public Builder setHandleData(
               org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleData.Builder builderForValue) {
             if (handleDataBuilder_ == null) {
               handleData_ = builderForValue.build();
    -          onChanged();
             } else {
               handleDataBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000002;
    +        onChanged();
             return this;
           }
           /**
    @@ -2540,38 +2479,40 @@ public Builder setHandleData(
            */
           public Builder mergeHandleData(org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleData value) {
             if (handleDataBuilder_ == null) {
    -          if (handleData_ != null) {
    -            handleData_ =
    -              org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleData.newBuilder(handleData_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000002) != 0) &&
    +            handleData_ != null &&
    +            handleData_ != org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleData.getDefaultInstance()) {
    +            getHandleDataBuilder().mergeFrom(value);
               } else {
                 handleData_ = value;
               }
    -          onChanged();
             } else {
               handleDataBuilder_.mergeFrom(value);
             }
    -
    +        if (handleData_ != null) {
    +          bitField0_ |= 0x00000002;
    +          onChanged();
    +        }
             return this;
           }
           /**
            * .tensorflow.core.CppShapeInferenceResult.HandleData handle_data = 4;
            */
           public Builder clearHandleData() {
    -        if (handleDataBuilder_ == null) {
    -          handleData_ = null;
    -          onChanged();
    -        } else {
    -          handleData_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000002);
    +        handleData_ = null;
    +        if (handleDataBuilder_ != null) {
    +          handleDataBuilder_.dispose();
               handleDataBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
            * .tensorflow.core.CppShapeInferenceResult.HandleData handle_data = 4;
            */
           public org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleData.Builder getHandleDataBuilder() {
    -        
    +        bitField0_ |= 0x00000002;
             onChanged();
             return getHandleDataFieldBuilder().getBuilder();
           }
    @@ -2589,11 +2530,11 @@ public org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.Handl
           /**
            * .tensorflow.core.CppShapeInferenceResult.HandleData handle_data = 4;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleData, org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleData.Builder, org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleDataOrBuilder> 
               getHandleDataFieldBuilder() {
             if (handleDataBuilder_ == null) {
    -          handleDataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          handleDataBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleData, org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleData.Builder, org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleDataOrBuilder>(
                       getHandleData(),
                       getParentForChildren(),
    @@ -2602,18 +2543,6 @@ public org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.Handl
             }
             return handleDataBuilder_;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.core.CppShapeInferenceResult)
         }
    @@ -2708,12 +2637,21 @@ public interface CppShapeInferenceInputsNeededOrBuilder extends
        * Protobuf type {@code tensorflow.core.CppShapeInferenceInputsNeeded}
        */
       public static final class CppShapeInferenceInputsNeeded extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.core.CppShapeInferenceInputsNeeded)
           CppShapeInferenceInputsNeededOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        CppShapeInferenceInputsNeeded.class.getName());
    +    }
         // Use CppShapeInferenceInputsNeeded.newBuilder() to construct.
    -    private CppShapeInferenceInputsNeeded(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private CppShapeInferenceInputsNeeded(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private CppShapeInferenceInputsNeeded() {
    @@ -2721,25 +2659,13 @@ private CppShapeInferenceInputsNeeded() {
           inputTensorsAsShapesNeeded_ = emptyIntList();
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new CppShapeInferenceInputsNeeded();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.core.CppShapeInference.internal_static_tensorflow_core_CppShapeInferenceInputsNeeded_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.core.CppShapeInference.internal_static_tensorflow_core_CppShapeInferenceInputsNeeded_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -2747,7 +2673,9 @@ protected java.lang.Object newInstance(
         }
     
         public static final int INPUT_TENSORS_NEEDED_FIELD_NUMBER = 1;
    -    private com.google.protobuf.Internal.IntList inputTensorsNeeded_;
    +    @SuppressWarnings("serial")
    +    private com.google.protobuf.Internal.IntList inputTensorsNeeded_ =
    +        emptyIntList();
         /**
          * repeated int32 input_tensors_needed = 1;
          * @return A list containing the inputTensorsNeeded.
    @@ -2775,7 +2703,9 @@ public int getInputTensorsNeeded(int index) {
         private int inputTensorsNeededMemoizedSerializedSize = -1;
     
         public static final int INPUT_TENSORS_AS_SHAPES_NEEDED_FIELD_NUMBER = 2;
    -    private com.google.protobuf.Internal.IntList inputTensorsAsShapesNeeded_;
    +    @SuppressWarnings("serial")
    +    private com.google.protobuf.Internal.IntList inputTensorsAsShapesNeeded_ =
    +        emptyIntList();
         /**
          * repeated int32 input_tensors_as_shapes_needed = 2;
          * @return A list containing the inputTensorsAsShapesNeeded.
    @@ -2945,39 +2875,41 @@ public static org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceInput
         }
         public static org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceInputsNeeded parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceInputsNeeded parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceInputsNeeded parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceInputsNeeded parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceInputsNeeded parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceInputsNeeded parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -2997,7 +2929,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -3005,7 +2937,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.core.CppShapeInferenceInputsNeeded}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.core.CppShapeInferenceInputsNeeded)
             org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceInputsNeededOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -3014,7 +2946,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.core.CppShapeInference.internal_static_tensorflow_core_CppShapeInferenceInputsNeeded_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -3027,17 +2959,16 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             inputTensorsNeeded_ = emptyIntList();
    -        bitField0_ = (bitField0_ & ~0x00000001);
             inputTensorsAsShapesNeeded_ = emptyIntList();
    -        bitField0_ = (bitField0_ & ~0x00000002);
             return this;
           }
     
    @@ -3064,53 +2995,23 @@ public org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceInputsNeeded
           @java.lang.Override
           public org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceInputsNeeded buildPartial() {
             org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceInputsNeeded result = new org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceInputsNeeded(this);
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        onBuilt();
    +        return result;
    +      }
    +
    +      private void buildPartial0(org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceInputsNeeded result) {
             int from_bitField0_ = bitField0_;
    -        if (((bitField0_ & 0x00000001) != 0)) {
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
               inputTensorsNeeded_.makeImmutable();
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          result.inputTensorsNeeded_ = inputTensorsNeeded_;
             }
    -        result.inputTensorsNeeded_ = inputTensorsNeeded_;
    -        if (((bitField0_ & 0x00000002) != 0)) {
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
               inputTensorsAsShapesNeeded_.makeImmutable();
    -          bitField0_ = (bitField0_ & ~0x00000002);
    +          result.inputTensorsAsShapesNeeded_ = inputTensorsAsShapesNeeded_;
             }
    -        result.inputTensorsAsShapesNeeded_ = inputTensorsAsShapesNeeded_;
    -        onBuilt();
    -        return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    -      }
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceInputsNeeded) {
    @@ -3126,7 +3027,8 @@ public Builder mergeFrom(org.tensorflow.proto.core.CppShapeInference.CppShapeInf
             if (!other.inputTensorsNeeded_.isEmpty()) {
               if (inputTensorsNeeded_.isEmpty()) {
                 inputTensorsNeeded_ = other.inputTensorsNeeded_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            inputTensorsNeeded_.makeImmutable();
    +            bitField0_ |= 0x00000001;
               } else {
                 ensureInputTensorsNeededIsMutable();
                 inputTensorsNeeded_.addAll(other.inputTensorsNeeded_);
    @@ -3136,7 +3038,8 @@ public Builder mergeFrom(org.tensorflow.proto.core.CppShapeInference.CppShapeInf
             if (!other.inputTensorsAsShapesNeeded_.isEmpty()) {
               if (inputTensorsAsShapesNeeded_.isEmpty()) {
                 inputTensorsAsShapesNeeded_ = other.inputTensorsAsShapesNeeded_;
    -            bitField0_ = (bitField0_ & ~0x00000002);
    +            inputTensorsAsShapesNeeded_.makeImmutable();
    +            bitField0_ |= 0x00000002;
               } else {
                 ensureInputTensorsAsShapesNeededIsMutable();
                 inputTensorsAsShapesNeeded_.addAll(other.inputTensorsAsShapesNeeded_);
    @@ -3220,10 +3123,10 @@ public Builder mergeFrom(
     
           private com.google.protobuf.Internal.IntList inputTensorsNeeded_ = emptyIntList();
           private void ensureInputTensorsNeededIsMutable() {
    -        if (!((bitField0_ & 0x00000001) != 0)) {
    -          inputTensorsNeeded_ = mutableCopy(inputTensorsNeeded_);
    -          bitField0_ |= 0x00000001;
    -         }
    +        if (!inputTensorsNeeded_.isModifiable()) {
    +          inputTensorsNeeded_ = makeMutableCopy(inputTensorsNeeded_);
    +        }
    +        bitField0_ |= 0x00000001;
           }
           /**
            * repeated int32 input_tensors_needed = 1;
    @@ -3231,8 +3134,8 @@ private void ensureInputTensorsNeededIsMutable() {
            */
           public java.util.List
               getInputTensorsNeededList() {
    -        return ((bitField0_ & 0x00000001) != 0) ?
    -                 java.util.Collections.unmodifiableList(inputTensorsNeeded_) : inputTensorsNeeded_;
    +        inputTensorsNeeded_.makeImmutable();
    +        return inputTensorsNeeded_;
           }
           /**
            * repeated int32 input_tensors_needed = 1;
    @@ -3257,8 +3160,10 @@ public int getInputTensorsNeeded(int index) {
            */
           public Builder setInputTensorsNeeded(
               int index, int value) {
    +
             ensureInputTensorsNeededIsMutable();
             inputTensorsNeeded_.setInt(index, value);
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -3268,8 +3173,10 @@ public Builder setInputTensorsNeeded(
            * @return This builder for chaining.
            */
           public Builder addInputTensorsNeeded(int value) {
    +
             ensureInputTensorsNeededIsMutable();
             inputTensorsNeeded_.addInt(value);
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -3283,6 +3190,7 @@ public Builder addAllInputTensorsNeeded(
             ensureInputTensorsNeededIsMutable();
             com.google.protobuf.AbstractMessageLite.Builder.addAll(
                 values, inputTensorsNeeded_);
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -3299,10 +3207,10 @@ public Builder clearInputTensorsNeeded() {
     
           private com.google.protobuf.Internal.IntList inputTensorsAsShapesNeeded_ = emptyIntList();
           private void ensureInputTensorsAsShapesNeededIsMutable() {
    -        if (!((bitField0_ & 0x00000002) != 0)) {
    -          inputTensorsAsShapesNeeded_ = mutableCopy(inputTensorsAsShapesNeeded_);
    -          bitField0_ |= 0x00000002;
    -         }
    +        if (!inputTensorsAsShapesNeeded_.isModifiable()) {
    +          inputTensorsAsShapesNeeded_ = makeMutableCopy(inputTensorsAsShapesNeeded_);
    +        }
    +        bitField0_ |= 0x00000002;
           }
           /**
            * repeated int32 input_tensors_as_shapes_needed = 2;
    @@ -3310,8 +3218,8 @@ private void ensureInputTensorsAsShapesNeededIsMutable() {
            */
           public java.util.List
               getInputTensorsAsShapesNeededList() {
    -        return ((bitField0_ & 0x00000002) != 0) ?
    -                 java.util.Collections.unmodifiableList(inputTensorsAsShapesNeeded_) : inputTensorsAsShapesNeeded_;
    +        inputTensorsAsShapesNeeded_.makeImmutable();
    +        return inputTensorsAsShapesNeeded_;
           }
           /**
            * repeated int32 input_tensors_as_shapes_needed = 2;
    @@ -3336,8 +3244,10 @@ public int getInputTensorsAsShapesNeeded(int index) {
            */
           public Builder setInputTensorsAsShapesNeeded(
               int index, int value) {
    +
             ensureInputTensorsAsShapesNeededIsMutable();
             inputTensorsAsShapesNeeded_.setInt(index, value);
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -3347,8 +3257,10 @@ public Builder setInputTensorsAsShapesNeeded(
            * @return This builder for chaining.
            */
           public Builder addInputTensorsAsShapesNeeded(int value) {
    +
             ensureInputTensorsAsShapesNeededIsMutable();
             inputTensorsAsShapesNeeded_.addInt(value);
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -3362,6 +3274,7 @@ public Builder addAllInputTensorsAsShapesNeeded(
             ensureInputTensorsAsShapesNeededIsMutable();
             com.google.protobuf.AbstractMessageLite.Builder.addAll(
                 values, inputTensorsAsShapesNeeded_);
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -3375,18 +3288,6 @@ public Builder clearInputTensorsAsShapesNeeded() {
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.core.CppShapeInferenceInputsNeeded)
         }
    @@ -3442,22 +3343,22 @@ public org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceInputsNeeded
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_core_CppShapeInferenceResult_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_core_CppShapeInferenceResult_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_core_CppShapeInferenceResult_HandleShapeAndType_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_core_CppShapeInferenceResult_HandleShapeAndType_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_core_CppShapeInferenceResult_HandleData_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_core_CppShapeInferenceResult_HandleData_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_core_CppShapeInferenceInputsNeeded_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_core_CppShapeInferenceInputsNeeded_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -3501,27 +3402,28 @@ public org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceInputsNeeded
         internal_static_tensorflow_core_CppShapeInferenceResult_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_core_CppShapeInferenceResult_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_core_CppShapeInferenceResult_descriptor,
             new java.lang.String[] { "Shape", "HandleData", });
         internal_static_tensorflow_core_CppShapeInferenceResult_HandleShapeAndType_descriptor =
           internal_static_tensorflow_core_CppShapeInferenceResult_descriptor.getNestedTypes().get(0);
         internal_static_tensorflow_core_CppShapeInferenceResult_HandleShapeAndType_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_core_CppShapeInferenceResult_HandleShapeAndType_descriptor,
             new java.lang.String[] { "Shape", "Dtype", "Type", });
         internal_static_tensorflow_core_CppShapeInferenceResult_HandleData_descriptor =
           internal_static_tensorflow_core_CppShapeInferenceResult_descriptor.getNestedTypes().get(1);
         internal_static_tensorflow_core_CppShapeInferenceResult_HandleData_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_core_CppShapeInferenceResult_HandleData_descriptor,
             new java.lang.String[] { "IsSet", "ShapeAndType", });
         internal_static_tensorflow_core_CppShapeInferenceInputsNeeded_descriptor =
           getDescriptor().getMessageTypes().get(1);
         internal_static_tensorflow_core_CppShapeInferenceInputsNeeded_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_core_CppShapeInferenceInputsNeeded_descriptor,
             new java.lang.String[] { "InputTensorsNeeded", "InputTensorsAsShapesNeeded", });
    +    descriptor.resolveAllFeaturesImmutable();
         org.tensorflow.proto.FullTypeProtos.getDescriptor();
         org.tensorflow.proto.TensorShapeProtos.getDescriptor();
         org.tensorflow.proto.TypesProtos.getDescriptor();
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/core/platform/CorePlatformPayloads.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/core/platform/CorePlatformPayloads.java
    index 683e59cf554..9495889ac7d 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/core/platform/CorePlatformPayloads.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/core/platform/CorePlatformPayloads.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/core_platform_payloads.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto.core.platform;
     
     public final class CorePlatformPayloads {
       private CorePlatformPayloads() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      CorePlatformPayloads.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -39,37 +50,34 @@ public interface ErrorSourceProtoOrBuilder extends
        * Protobuf type {@code tensorflow.core.platform.ErrorSourceProto}
        */
       public static final class ErrorSourceProto extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.core.platform.ErrorSourceProto)
           ErrorSourceProtoOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        ErrorSourceProto.class.getName());
    +    }
         // Use ErrorSourceProto.newBuilder() to construct.
    -    private ErrorSourceProto(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private ErrorSourceProto(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private ErrorSourceProto() {
           errorSource_ = 0;
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new ErrorSourceProto();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.core.platform.CorePlatformPayloads.internal_static_tensorflow_core_platform_ErrorSourceProto_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.core.platform.CorePlatformPayloads.internal_static_tensorflow_core_platform_ErrorSourceProto_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -124,6 +132,15 @@ public enum ErrorSource
           UNRECOGNIZED(-1),
           ;
     
    +      static {
    +        com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +          com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +          /* major= */ 4,
    +          /* minor= */ 28,
    +          /* patch= */ 3,
    +          /* suffix= */ "",
    +          ErrorSource.class.getName());
    +      }
           /**
            * UNKNOWN = 0;
            */
    @@ -253,7 +270,7 @@ private ErrorSource(int value) {
         }
     
         public static final int ERROR_SOURCE_FIELD_NUMBER = 1;
    -    private int errorSource_;
    +    private int errorSource_ = 0;
         /**
          * .tensorflow.core.platform.ErrorSourceProto.ErrorSource error_source = 1;
          * @return The enum numeric value on the wire for errorSource.
    @@ -266,8 +283,7 @@ private ErrorSource(int value) {
          * @return The errorSource.
          */
         @java.lang.Override public org.tensorflow.proto.core.platform.CorePlatformPayloads.ErrorSourceProto.ErrorSource getErrorSource() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.core.platform.CorePlatformPayloads.ErrorSourceProto.ErrorSource result = org.tensorflow.proto.core.platform.CorePlatformPayloads.ErrorSourceProto.ErrorSource.valueOf(errorSource_);
    +      org.tensorflow.proto.core.platform.CorePlatformPayloads.ErrorSourceProto.ErrorSource result = org.tensorflow.proto.core.platform.CorePlatformPayloads.ErrorSourceProto.ErrorSource.forNumber(errorSource_);
           return result == null ? org.tensorflow.proto.core.platform.CorePlatformPayloads.ErrorSourceProto.ErrorSource.UNRECOGNIZED : result;
         }
     
    @@ -369,39 +385,41 @@ public static org.tensorflow.proto.core.platform.CorePlatformPayloads.ErrorSourc
         }
         public static org.tensorflow.proto.core.platform.CorePlatformPayloads.ErrorSourceProto parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.core.platform.CorePlatformPayloads.ErrorSourceProto parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.core.platform.CorePlatformPayloads.ErrorSourceProto parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.core.platform.CorePlatformPayloads.ErrorSourceProto parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.core.platform.CorePlatformPayloads.ErrorSourceProto parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.core.platform.CorePlatformPayloads.ErrorSourceProto parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -421,7 +439,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -435,7 +453,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.core.platform.ErrorSourceProto}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.core.platform.ErrorSourceProto)
             org.tensorflow.proto.core.platform.CorePlatformPayloads.ErrorSourceProtoOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -444,7 +462,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.core.platform.CorePlatformPayloads.internal_static_tensorflow_core_platform_ErrorSourceProto_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -457,15 +475,15 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             errorSource_ = 0;
    -
             return this;
           }
     
    @@ -492,43 +510,18 @@ public org.tensorflow.proto.core.platform.CorePlatformPayloads.ErrorSourceProto
           @java.lang.Override
           public org.tensorflow.proto.core.platform.CorePlatformPayloads.ErrorSourceProto buildPartial() {
             org.tensorflow.proto.core.platform.CorePlatformPayloads.ErrorSourceProto result = new org.tensorflow.proto.core.platform.CorePlatformPayloads.ErrorSourceProto(this);
    -        result.errorSource_ = errorSource_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.core.platform.CorePlatformPayloads.ErrorSourceProto result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.errorSource_ = errorSource_;
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.core.platform.CorePlatformPayloads.ErrorSourceProto) {
    @@ -572,7 +565,7 @@ public Builder mergeFrom(
                     break;
                   case 8: {
                     errorSource_ = input.readEnum();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 8
                   default: {
    @@ -590,6 +583,7 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    +      private int bitField0_;
     
           private int errorSource_ = 0;
           /**
    @@ -605,8 +599,8 @@ public Builder mergeFrom(
            * @return This builder for chaining.
            */
           public Builder setErrorSourceValue(int value) {
    -        
             errorSource_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -616,8 +610,7 @@ public Builder setErrorSourceValue(int value) {
            */
           @java.lang.Override
           public org.tensorflow.proto.core.platform.CorePlatformPayloads.ErrorSourceProto.ErrorSource getErrorSource() {
    -        @SuppressWarnings("deprecation")
    -        org.tensorflow.proto.core.platform.CorePlatformPayloads.ErrorSourceProto.ErrorSource result = org.tensorflow.proto.core.platform.CorePlatformPayloads.ErrorSourceProto.ErrorSource.valueOf(errorSource_);
    +        org.tensorflow.proto.core.platform.CorePlatformPayloads.ErrorSourceProto.ErrorSource result = org.tensorflow.proto.core.platform.CorePlatformPayloads.ErrorSourceProto.ErrorSource.forNumber(errorSource_);
             return result == null ? org.tensorflow.proto.core.platform.CorePlatformPayloads.ErrorSourceProto.ErrorSource.UNRECOGNIZED : result;
           }
           /**
    @@ -629,7 +622,7 @@ public Builder setErrorSource(org.tensorflow.proto.core.platform.CorePlatformPay
             if (value == null) {
               throw new NullPointerException();
             }
    -        
    +        bitField0_ |= 0x00000001;
             errorSource_ = value.getNumber();
             onChanged();
             return this;
    @@ -639,23 +632,11 @@ public Builder setErrorSource(org.tensorflow.proto.core.platform.CorePlatformPay
            * @return This builder for chaining.
            */
           public Builder clearErrorSource() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000001);
             errorSource_ = 0;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.core.platform.ErrorSourceProto)
         }
    @@ -711,7 +692,7 @@ public org.tensorflow.proto.core.platform.CorePlatformPayloads.ErrorSourceProto
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_core_platform_ErrorSourceProto_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_core_platform_ErrorSourceProto_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -742,9 +723,10 @@ public org.tensorflow.proto.core.platform.CorePlatformPayloads.ErrorSourceProto
         internal_static_tensorflow_core_platform_ErrorSourceProto_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_core_platform_ErrorSourceProto_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_core_platform_ErrorSourceProto_descriptor,
             new java.lang.String[] { "ErrorSource", });
    +    descriptor.resolveAllFeaturesImmutable();
       }
     
       // @@protoc_insertion_point(outer_class_scope)
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/DataService.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/DataService.java
    index 6277eb98834..1896f0356f2 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/DataService.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/DataService.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/data_service.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto.data;
     
     public final class DataService {
       private DataService() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      DataService.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -55,6 +66,15 @@ public enum DeploymentMode
         UNRECOGNIZED(-1),
         ;
     
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        DeploymentMode.class.getName());
    +    }
         /**
          * DEPLOYMENT_MODE_UNSPECIFIED = 0;
          */
    @@ -193,37 +213,34 @@ public interface ProcessingModeDefOrBuilder extends
        * Protobuf type {@code tensorflow.data.ProcessingModeDef}
        */
       public static final class ProcessingModeDef extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.data.ProcessingModeDef)
           ProcessingModeDefOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        ProcessingModeDef.class.getName());
    +    }
         // Use ProcessingModeDef.newBuilder() to construct.
    -    private ProcessingModeDef(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private ProcessingModeDef(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private ProcessingModeDef() {
           shardingPolicy_ = 0;
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new ProcessingModeDef();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.data.DataService.internal_static_tensorflow_data_ProcessingModeDef_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.data.DataService.internal_static_tensorflow_data_ProcessingModeDef_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -265,8 +282,9 @@ public enum ShardingPolicy
            * The following are static sharding policies. The semantics are similar to
            * `tf.data.experimental.AutoShardPolicy`. These policies require:
            * * The tf.data service cluster has a fixed size, and you need to specify
    -       *   the workers in DispatcherConfig.
    +       * the workers in DispatcherConfig.
            * * Each client only reads from the local tf.data service worker.
    +       *
            * Shards by input files (each worker will get a set of files to process).
            * When this option is selected, make sure that there is at least as many
            * files as workers. If there are fewer input files than workers, a runtime
    @@ -308,6 +326,15 @@ public enum ShardingPolicy
           UNRECOGNIZED(-1),
           ;
     
    +      static {
    +        com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +          com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +          /* major= */ 4,
    +          /* minor= */ 28,
    +          /* patch= */ 3,
    +          /* suffix= */ "",
    +          ShardingPolicy.class.getName());
    +      }
           /**
            * 
            * No sharding will be performed. Each worker produces the entire dataset
    @@ -334,8 +361,9 @@ public enum ShardingPolicy
            * The following are static sharding policies. The semantics are similar to
            * `tf.data.experimental.AutoShardPolicy`. These policies require:
            * * The tf.data service cluster has a fixed size, and you need to specify
    -       *   the workers in DispatcherConfig.
    +       * the workers in DispatcherConfig.
            * * Each client only reads from the local tf.data service worker.
    +       *
            * Shards by input files (each worker will get a set of files to process).
            * When this option is selected, make sure that there is at least as many
            * files as workers. If there are fewer input files than workers, a runtime
    @@ -463,7 +491,7 @@ private ShardingPolicy(int value) {
         }
     
         public static final int SHARDING_POLICY_FIELD_NUMBER = 1;
    -    private int shardingPolicy_;
    +    private int shardingPolicy_ = 0;
         /**
          * .tensorflow.data.ProcessingModeDef.ShardingPolicy sharding_policy = 1;
          * @return The enum numeric value on the wire for shardingPolicy.
    @@ -476,8 +504,7 @@ private ShardingPolicy(int value) {
          * @return The shardingPolicy.
          */
         @java.lang.Override public org.tensorflow.proto.data.DataService.ProcessingModeDef.ShardingPolicy getShardingPolicy() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.data.DataService.ProcessingModeDef.ShardingPolicy result = org.tensorflow.proto.data.DataService.ProcessingModeDef.ShardingPolicy.valueOf(shardingPolicy_);
    +      org.tensorflow.proto.data.DataService.ProcessingModeDef.ShardingPolicy result = org.tensorflow.proto.data.DataService.ProcessingModeDef.ShardingPolicy.forNumber(shardingPolicy_);
           return result == null ? org.tensorflow.proto.data.DataService.ProcessingModeDef.ShardingPolicy.UNRECOGNIZED : result;
         }
     
    @@ -579,39 +606,41 @@ public static org.tensorflow.proto.data.DataService.ProcessingModeDef parseFrom(
         }
         public static org.tensorflow.proto.data.DataService.ProcessingModeDef parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.DataService.ProcessingModeDef parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.data.DataService.ProcessingModeDef parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.data.DataService.ProcessingModeDef parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.data.DataService.ProcessingModeDef parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.DataService.ProcessingModeDef parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -631,7 +660,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -643,7 +672,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.data.ProcessingModeDef}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.data.ProcessingModeDef)
             org.tensorflow.proto.data.DataService.ProcessingModeDefOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -652,7 +681,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.data.DataService.internal_static_tensorflow_data_ProcessingModeDef_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -665,15 +694,15 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             shardingPolicy_ = 0;
    -
             return this;
           }
     
    @@ -700,43 +729,18 @@ public org.tensorflow.proto.data.DataService.ProcessingModeDef build() {
           @java.lang.Override
           public org.tensorflow.proto.data.DataService.ProcessingModeDef buildPartial() {
             org.tensorflow.proto.data.DataService.ProcessingModeDef result = new org.tensorflow.proto.data.DataService.ProcessingModeDef(this);
    -        result.shardingPolicy_ = shardingPolicy_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.data.DataService.ProcessingModeDef result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.shardingPolicy_ = shardingPolicy_;
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.data.DataService.ProcessingModeDef) {
    @@ -780,7 +784,7 @@ public Builder mergeFrom(
                     break;
                   case 8: {
                     shardingPolicy_ = input.readEnum();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 8
                   default: {
    @@ -798,6 +802,7 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    +      private int bitField0_;
     
           private int shardingPolicy_ = 0;
           /**
    @@ -813,8 +818,8 @@ public Builder mergeFrom(
            * @return This builder for chaining.
            */
           public Builder setShardingPolicyValue(int value) {
    -        
             shardingPolicy_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -824,8 +829,7 @@ public Builder setShardingPolicyValue(int value) {
            */
           @java.lang.Override
           public org.tensorflow.proto.data.DataService.ProcessingModeDef.ShardingPolicy getShardingPolicy() {
    -        @SuppressWarnings("deprecation")
    -        org.tensorflow.proto.data.DataService.ProcessingModeDef.ShardingPolicy result = org.tensorflow.proto.data.DataService.ProcessingModeDef.ShardingPolicy.valueOf(shardingPolicy_);
    +        org.tensorflow.proto.data.DataService.ProcessingModeDef.ShardingPolicy result = org.tensorflow.proto.data.DataService.ProcessingModeDef.ShardingPolicy.forNumber(shardingPolicy_);
             return result == null ? org.tensorflow.proto.data.DataService.ProcessingModeDef.ShardingPolicy.UNRECOGNIZED : result;
           }
           /**
    @@ -837,7 +841,7 @@ public Builder setShardingPolicy(org.tensorflow.proto.data.DataService.Processin
             if (value == null) {
               throw new NullPointerException();
             }
    -        
    +        bitField0_ |= 0x00000001;
             shardingPolicy_ = value.getNumber();
             onChanged();
             return this;
    @@ -847,23 +851,11 @@ public Builder setShardingPolicy(org.tensorflow.proto.data.DataService.Processin
            * @return This builder for chaining.
            */
           public Builder clearShardingPolicy() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000001);
             shardingPolicy_ = 0;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.data.ProcessingModeDef)
         }
    @@ -960,7 +952,7 @@ public interface DataServiceMetadataOrBuilder extends
          */
         long getCardinality();
     
    -    public org.tensorflow.proto.data.DataService.DataServiceMetadata.OptionalElementSpecCase getOptionalElementSpecCase();
    +    org.tensorflow.proto.data.DataService.DataServiceMetadata.OptionalElementSpecCase getOptionalElementSpecCase();
       }
       /**
        * 
    @@ -971,37 +963,34 @@ public interface DataServiceMetadataOrBuilder extends
        * Protobuf type {@code tensorflow.data.DataServiceMetadata}
        */
       public static final class DataServiceMetadata extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.data.DataServiceMetadata)
           DataServiceMetadataOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        DataServiceMetadata.class.getName());
    +    }
         // Use DataServiceMetadata.newBuilder() to construct.
    -    private DataServiceMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private DataServiceMetadata(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private DataServiceMetadata() {
           compression_ = 0;
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new DataServiceMetadata();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.data.DataService.internal_static_tensorflow_data_DataServiceMetadata_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.data.DataService.internal_static_tensorflow_data_DataServiceMetadata_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -1027,15 +1016,33 @@ public enum Compression
           COMPRESSION_OFF(1),
           /**
            * 
    -       * Snappy compression as defined in tensorflow/core/platform/snappy.h.
    +       * AUTO compression, either none or snappy compression as defined in
    +       * tensorflow/core/platform/snappy.h.
            * 
    * * COMPRESSION_SNAPPY = 2; */ COMPRESSION_SNAPPY(2), + /** + *
    +       * Forced a snappy compression as in tensorflow/core/platform/snappy.h.
    +       * 
    + * + * COMPRESSION_FORCED_SNAPPY = 3; + */ + COMPRESSION_FORCED_SNAPPY(3), UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + Compression.class.getName()); + } /** * COMPRESSION_UNSPECIFIED = 0; */ @@ -1050,12 +1057,21 @@ public enum Compression public static final int COMPRESSION_OFF_VALUE = 1; /** *
    -       * Snappy compression as defined in tensorflow/core/platform/snappy.h.
    +       * AUTO compression, either none or snappy compression as defined in
    +       * tensorflow/core/platform/snappy.h.
            * 
    * * COMPRESSION_SNAPPY = 2; */ public static final int COMPRESSION_SNAPPY_VALUE = 2; + /** + *
    +       * Forced a snappy compression as in tensorflow/core/platform/snappy.h.
    +       * 
    + * + * COMPRESSION_FORCED_SNAPPY = 3; + */ + public static final int COMPRESSION_FORCED_SNAPPY_VALUE = 3; public final int getNumber() { @@ -1085,6 +1101,7 @@ public static Compression forNumber(int value) { case 0: return COMPRESSION_UNSPECIFIED; case 1: return COMPRESSION_OFF; case 2: return COMPRESSION_SNAPPY; + case 3: return COMPRESSION_FORCED_SNAPPY; default: return null; } } @@ -1142,6 +1159,7 @@ private Compression(int value) { } private int optionalElementSpecCase_ = 0; + @SuppressWarnings("serial") private java.lang.Object optionalElementSpec_; public enum OptionalElementSpecCase implements com.google.protobuf.Internal.EnumLite, @@ -1210,7 +1228,7 @@ public com.google.protobuf.ByteString getElementSpec() { } public static final int COMPRESSION_FIELD_NUMBER = 2; - private int compression_; + private int compression_ = 0; /** * .tensorflow.data.DataServiceMetadata.Compression compression = 2; * @return The enum numeric value on the wire for compression. @@ -1223,13 +1241,12 @@ public com.google.protobuf.ByteString getElementSpec() { * @return The compression. */ @java.lang.Override public org.tensorflow.proto.data.DataService.DataServiceMetadata.Compression getCompression() { - @SuppressWarnings("deprecation") - org.tensorflow.proto.data.DataService.DataServiceMetadata.Compression result = org.tensorflow.proto.data.DataService.DataServiceMetadata.Compression.valueOf(compression_); + org.tensorflow.proto.data.DataService.DataServiceMetadata.Compression result = org.tensorflow.proto.data.DataService.DataServiceMetadata.Compression.forNumber(compression_); return result == null ? org.tensorflow.proto.data.DataService.DataServiceMetadata.Compression.UNRECOGNIZED : result; } public static final int CARDINALITY_FIELD_NUMBER = 3; - private long cardinality_; + private long cardinality_ = 0L; /** *
          * Cardinality of the dataset.
    @@ -1379,39 +1396,41 @@ public static org.tensorflow.proto.data.DataService.DataServiceMetadata parseFro
         }
         public static org.tensorflow.proto.data.DataService.DataServiceMetadata parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.DataService.DataServiceMetadata parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.data.DataService.DataServiceMetadata parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.data.DataService.DataServiceMetadata parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.data.DataService.DataServiceMetadata parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.DataService.DataServiceMetadata parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -1431,7 +1450,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -1444,7 +1463,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.data.DataServiceMetadata}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.data.DataServiceMetadata)
             org.tensorflow.proto.data.DataService.DataServiceMetadataOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -1453,7 +1472,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.data.DataService.internal_static_tensorflow_data_DataServiceMetadata_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -1466,17 +1485,16 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             compression_ = 0;
    -
             cardinality_ = 0L;
    -
             optionalElementSpecCase_ = 0;
             optionalElementSpec_ = null;
             return this;
    @@ -1505,48 +1523,27 @@ public org.tensorflow.proto.data.DataService.DataServiceMetadata build() {
           @java.lang.Override
           public org.tensorflow.proto.data.DataService.DataServiceMetadata buildPartial() {
             org.tensorflow.proto.data.DataService.DataServiceMetadata result = new org.tensorflow.proto.data.DataService.DataServiceMetadata(this);
    -        if (optionalElementSpecCase_ == 1) {
    -          result.optionalElementSpec_ = optionalElementSpec_;
    -        }
    -        result.compression_ = compression_;
    -        result.cardinality_ = cardinality_;
    -        result.optionalElementSpecCase_ = optionalElementSpecCase_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        buildPartialOneofs(result);
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    +      private void buildPartial0(org.tensorflow.proto.data.DataService.DataServiceMetadata result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.compression_ = compression_;
    +        }
    +        if (((from_bitField0_ & 0x00000004) != 0)) {
    +          result.cardinality_ = cardinality_;
    +        }
           }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +
    +      private void buildPartialOneofs(org.tensorflow.proto.data.DataService.DataServiceMetadata result) {
    +        result.optionalElementSpecCase_ = optionalElementSpecCase_;
    +        result.optionalElementSpec_ = this.optionalElementSpec_;
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.data.DataService.DataServiceMetadata) {
    @@ -1607,12 +1604,12 @@ public Builder mergeFrom(
                   } // case 10
                   case 16: {
                     compression_ = input.readEnum();
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 16
                   case 24: {
                     cardinality_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000004;
                     break;
                   } // case 24
                   default: {
    @@ -1645,6 +1642,7 @@ public Builder clearOptionalElementSpec() {
             return this;
           }
     
    +      private int bitField0_;
     
           /**
            * 
    @@ -1681,10 +1679,8 @@ public com.google.protobuf.ByteString getElementSpec() {
            * @return This builder for chaining.
            */
           public Builder setElementSpec(com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  optionalElementSpecCase_ = 1;
    +        if (value == null) { throw new NullPointerException(); }
    +        optionalElementSpecCase_ = 1;
             optionalElementSpec_ = value;
             onChanged();
             return this;
    @@ -1720,8 +1716,8 @@ public Builder clearElementSpec() {
            * @return This builder for chaining.
            */
           public Builder setCompressionValue(int value) {
    -        
             compression_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -1731,8 +1727,7 @@ public Builder setCompressionValue(int value) {
            */
           @java.lang.Override
           public org.tensorflow.proto.data.DataService.DataServiceMetadata.Compression getCompression() {
    -        @SuppressWarnings("deprecation")
    -        org.tensorflow.proto.data.DataService.DataServiceMetadata.Compression result = org.tensorflow.proto.data.DataService.DataServiceMetadata.Compression.valueOf(compression_);
    +        org.tensorflow.proto.data.DataService.DataServiceMetadata.Compression result = org.tensorflow.proto.data.DataService.DataServiceMetadata.Compression.forNumber(compression_);
             return result == null ? org.tensorflow.proto.data.DataService.DataServiceMetadata.Compression.UNRECOGNIZED : result;
           }
           /**
    @@ -1744,7 +1739,7 @@ public Builder setCompression(org.tensorflow.proto.data.DataService.DataServiceM
             if (value == null) {
               throw new NullPointerException();
             }
    -        
    +        bitField0_ |= 0x00000002;
             compression_ = value.getNumber();
             onChanged();
             return this;
    @@ -1754,7 +1749,7 @@ public Builder setCompression(org.tensorflow.proto.data.DataService.DataServiceM
            * @return This builder for chaining.
            */
           public Builder clearCompression() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000002);
             compression_ = 0;
             onChanged();
             return this;
    @@ -1783,8 +1778,9 @@ public long getCardinality() {
            * @return This builder for chaining.
            */
           public Builder setCardinality(long value) {
    -        
    +
             cardinality_ = value;
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -1797,23 +1793,11 @@ public Builder setCardinality(long value) {
            * @return This builder for chaining.
            */
           public Builder clearCardinality() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000004);
             cardinality_ = 0L;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.data.DataServiceMetadata)
         }
    @@ -1886,37 +1870,34 @@ public interface CrossTrainerCacheOptionsOrBuilder extends
        * Protobuf type {@code tensorflow.data.CrossTrainerCacheOptions}
        */
       public static final class CrossTrainerCacheOptions extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.data.CrossTrainerCacheOptions)
           CrossTrainerCacheOptionsOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        CrossTrainerCacheOptions.class.getName());
    +    }
         // Use CrossTrainerCacheOptions.newBuilder() to construct.
    -    private CrossTrainerCacheOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private CrossTrainerCacheOptions(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private CrossTrainerCacheOptions() {
           trainerId_ = "";
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new CrossTrainerCacheOptions();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.data.DataService.internal_static_tensorflow_data_CrossTrainerCacheOptions_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.data.DataService.internal_static_tensorflow_data_CrossTrainerCacheOptions_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -1924,7 +1905,8 @@ protected java.lang.Object newInstance(
         }
     
         public static final int TRAINER_ID_FIELD_NUMBER = 1;
    -    private volatile java.lang.Object trainerId_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object trainerId_ = "";
         /**
          * string trainer_id = 1;
          * @return The trainerId.
    @@ -1975,8 +1957,8 @@ public final boolean isInitialized() {
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output)
                             throws java.io.IOException {
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(trainerId_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, trainerId_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(trainerId_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 1, trainerId_);
           }
           getUnknownFields().writeTo(output);
         }
    @@ -1987,8 +1969,8 @@ public int getSerializedSize() {
           if (size != -1) return size;
     
           size = 0;
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(trainerId_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, trainerId_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(trainerId_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, trainerId_);
           }
           size += getUnknownFields().getSerializedSize();
           memoizedSize = size;
    @@ -2059,39 +2041,41 @@ public static org.tensorflow.proto.data.DataService.CrossTrainerCacheOptions par
         }
         public static org.tensorflow.proto.data.DataService.CrossTrainerCacheOptions parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.DataService.CrossTrainerCacheOptions parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.data.DataService.CrossTrainerCacheOptions parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.data.DataService.CrossTrainerCacheOptions parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.data.DataService.CrossTrainerCacheOptions parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.DataService.CrossTrainerCacheOptions parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -2111,7 +2095,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -2119,7 +2103,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.data.CrossTrainerCacheOptions}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.data.CrossTrainerCacheOptions)
             org.tensorflow.proto.data.DataService.CrossTrainerCacheOptionsOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -2128,7 +2112,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.data.DataService.internal_static_tensorflow_data_CrossTrainerCacheOptions_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -2141,15 +2125,15 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             trainerId_ = "";
    -
             return this;
           }
     
    @@ -2176,43 +2160,18 @@ public org.tensorflow.proto.data.DataService.CrossTrainerCacheOptions build() {
           @java.lang.Override
           public org.tensorflow.proto.data.DataService.CrossTrainerCacheOptions buildPartial() {
             org.tensorflow.proto.data.DataService.CrossTrainerCacheOptions result = new org.tensorflow.proto.data.DataService.CrossTrainerCacheOptions(this);
    -        result.trainerId_ = trainerId_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.data.DataService.CrossTrainerCacheOptions result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.trainerId_ = trainerId_;
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.data.DataService.CrossTrainerCacheOptions) {
    @@ -2227,6 +2186,7 @@ public Builder mergeFrom(org.tensorflow.proto.data.DataService.CrossTrainerCache
             if (other == org.tensorflow.proto.data.DataService.CrossTrainerCacheOptions.getDefaultInstance()) return this;
             if (!other.getTrainerId().isEmpty()) {
               trainerId_ = other.trainerId_;
    +          bitField0_ |= 0x00000001;
               onChanged();
             }
             this.mergeUnknownFields(other.getUnknownFields());
    @@ -2257,7 +2217,7 @@ public Builder mergeFrom(
                     break;
                   case 10: {
                     trainerId_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 10
                   default: {
    @@ -2275,6 +2235,7 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    +      private int bitField0_;
     
           private java.lang.Object trainerId_ = "";
           /**
    @@ -2317,11 +2278,9 @@ public java.lang.String getTrainerId() {
            */
           public Builder setTrainerId(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             trainerId_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -2330,8 +2289,8 @@ public Builder setTrainerId(
            * @return This builder for chaining.
            */
           public Builder clearTrainerId() {
    -        
             trainerId_ = getDefaultInstance().getTrainerId();
    +        bitField0_ = (bitField0_ & ~0x00000001);
             onChanged();
             return this;
           }
    @@ -2342,27 +2301,13 @@ public Builder clearTrainerId() {
            */
           public Builder setTrainerIdBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             trainerId_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.data.CrossTrainerCacheOptions)
         }
    @@ -2439,37 +2384,34 @@ public interface DataServiceConfigOrBuilder extends
        * Protobuf type {@code tensorflow.data.DataServiceConfig}
        */
       public static final class DataServiceConfig extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.data.DataServiceConfig)
           DataServiceConfigOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        DataServiceConfig.class.getName());
    +    }
         // Use DataServiceConfig.newBuilder() to construct.
    -    private DataServiceConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private DataServiceConfig(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private DataServiceConfig() {
           deploymentMode_ = 0;
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new DataServiceConfig();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.data.DataService.internal_static_tensorflow_data_DataServiceConfig_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.data.DataService.internal_static_tensorflow_data_DataServiceConfig_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -2477,7 +2419,7 @@ protected java.lang.Object newInstance(
         }
     
         public static final int DEPLOYMENT_MODE_FIELD_NUMBER = 1;
    -    private int deploymentMode_;
    +    private int deploymentMode_ = 0;
         /**
          * .tensorflow.data.DeploymentMode deployment_mode = 1;
          * @return The enum numeric value on the wire for deploymentMode.
    @@ -2490,8 +2432,7 @@ protected java.lang.Object newInstance(
          * @return The deploymentMode.
          */
         @java.lang.Override public org.tensorflow.proto.data.DataService.DeploymentMode getDeploymentMode() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.data.DataService.DeploymentMode result = org.tensorflow.proto.data.DataService.DeploymentMode.valueOf(deploymentMode_);
    +      org.tensorflow.proto.data.DataService.DeploymentMode result = org.tensorflow.proto.data.DataService.DeploymentMode.forNumber(deploymentMode_);
           return result == null ? org.tensorflow.proto.data.DataService.DeploymentMode.UNRECOGNIZED : result;
         }
     
    @@ -2593,39 +2534,41 @@ public static org.tensorflow.proto.data.DataService.DataServiceConfig parseFrom(
         }
         public static org.tensorflow.proto.data.DataService.DataServiceConfig parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.DataService.DataServiceConfig parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.data.DataService.DataServiceConfig parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.data.DataService.DataServiceConfig parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.data.DataService.DataServiceConfig parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.DataService.DataServiceConfig parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -2645,7 +2588,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -2658,7 +2601,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.data.DataServiceConfig}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.data.DataServiceConfig)
             org.tensorflow.proto.data.DataService.DataServiceConfigOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -2667,7 +2610,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.data.DataService.internal_static_tensorflow_data_DataServiceConfig_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -2680,15 +2623,15 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             deploymentMode_ = 0;
    -
             return this;
           }
     
    @@ -2715,43 +2658,18 @@ public org.tensorflow.proto.data.DataService.DataServiceConfig build() {
           @java.lang.Override
           public org.tensorflow.proto.data.DataService.DataServiceConfig buildPartial() {
             org.tensorflow.proto.data.DataService.DataServiceConfig result = new org.tensorflow.proto.data.DataService.DataServiceConfig(this);
    -        result.deploymentMode_ = deploymentMode_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.data.DataService.DataServiceConfig result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.deploymentMode_ = deploymentMode_;
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.data.DataService.DataServiceConfig) {
    @@ -2795,7 +2713,7 @@ public Builder mergeFrom(
                     break;
                   case 8: {
                     deploymentMode_ = input.readEnum();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 8
                   default: {
    @@ -2813,6 +2731,7 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    +      private int bitField0_;
     
           private int deploymentMode_ = 0;
           /**
    @@ -2828,8 +2747,8 @@ public Builder mergeFrom(
            * @return This builder for chaining.
            */
           public Builder setDeploymentModeValue(int value) {
    -        
             deploymentMode_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -2839,8 +2758,7 @@ public Builder setDeploymentModeValue(int value) {
            */
           @java.lang.Override
           public org.tensorflow.proto.data.DataService.DeploymentMode getDeploymentMode() {
    -        @SuppressWarnings("deprecation")
    -        org.tensorflow.proto.data.DataService.DeploymentMode result = org.tensorflow.proto.data.DataService.DeploymentMode.valueOf(deploymentMode_);
    +        org.tensorflow.proto.data.DataService.DeploymentMode result = org.tensorflow.proto.data.DataService.DeploymentMode.forNumber(deploymentMode_);
             return result == null ? org.tensorflow.proto.data.DataService.DeploymentMode.UNRECOGNIZED : result;
           }
           /**
    @@ -2852,7 +2770,7 @@ public Builder setDeploymentMode(org.tensorflow.proto.data.DataService.Deploymen
             if (value == null) {
               throw new NullPointerException();
             }
    -        
    +        bitField0_ |= 0x00000001;
             deploymentMode_ = value.getNumber();
             onChanged();
             return this;
    @@ -2862,23 +2780,11 @@ public Builder setDeploymentMode(org.tensorflow.proto.data.DataService.Deploymen
            * @return This builder for chaining.
            */
           public Builder clearDeploymentMode() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000001);
             deploymentMode_ = 0;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.data.DataServiceConfig)
         }
    @@ -2934,22 +2840,22 @@ public org.tensorflow.proto.data.DataService.DataServiceConfig getDefaultInstanc
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_data_ProcessingModeDef_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_data_ProcessingModeDef_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_data_DataServiceMetadata_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_data_DataServiceMetadata_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_data_CrossTrainerCacheOptions_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_data_CrossTrainerCacheOptions_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_data_DataServiceConfig_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_data_DataServiceConfig_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -2966,23 +2872,24 @@ public org.tensorflow.proto.data.DataService.DataServiceConfig getDefaultInstanc
           "ow.data.ProcessingModeDef.ShardingPolicy" +
           "\"V\n\016ShardingPolicy\022\007\n\003OFF\020\000\022\013\n\007DYNAMIC\020\001" +
           "\022\010\n\004FILE\020\002\022\010\n\004DATA\020\003\022\020\n\014FILE_OR_DATA\020\004\022\010" +
    -      "\n\004HINT\020\005\"\373\001\n\023DataServiceMetadata\022\026\n\014elem" +
    +      "\n\004HINT\020\005\"\232\002\n\023DataServiceMetadata\022\026\n\014elem" +
           "ent_spec\030\001 \001(\014H\000\022E\n\013compression\030\002 \001(\01620." +
           "tensorflow.data.DataServiceMetadata.Comp" +
    -      "ression\022\023\n\013cardinality\030\003 \001(\003\"W\n\013Compress" +
    +      "ression\022\023\n\013cardinality\030\003 \001(\003\"v\n\013Compress" +
           "ion\022\033\n\027COMPRESSION_UNSPECIFIED\020\000\022\023\n\017COMP" +
    -      "RESSION_OFF\020\001\022\026\n\022COMPRESSION_SNAPPY\020\002B\027\n" +
    -      "\025optional_element_spec\".\n\030CrossTrainerCa" +
    -      "cheOptions\022\022\n\ntrainer_id\030\001 \001(\t\"M\n\021DataSe" +
    -      "rviceConfig\0228\n\017deployment_mode\030\001 \001(\0162\037.t" +
    -      "ensorflow.data.DeploymentMode*\210\001\n\016Deploy" +
    -      "mentMode\022\037\n\033DEPLOYMENT_MODE_UNSPECIFIED\020" +
    -      "\000\022\035\n\031DEPLOYMENT_MODE_COLOCATED\020\001\022\032\n\026DEPL" +
    -      "OYMENT_MODE_REMOTE\020\002\022\032\n\026DEPLOYMENT_MODE_" +
    -      "HYBRID\020\003Br\n\031org.tensorflow.proto.dataZUg" +
    -      "ithub.com/tensorflow/tensorflow/tensorfl" +
    -      "ow/go/core/protobuf/for_core_protos_go_p" +
    -      "rotob\006proto3"
    +      "RESSION_OFF\020\001\022\026\n\022COMPRESSION_SNAPPY\020\002\022\035\n" +
    +      "\031COMPRESSION_FORCED_SNAPPY\020\003B\027\n\025optional" +
    +      "_element_spec\".\n\030CrossTrainerCacheOption" +
    +      "s\022\022\n\ntrainer_id\030\001 \001(\t\"M\n\021DataServiceConf" +
    +      "ig\0228\n\017deployment_mode\030\001 \001(\0162\037.tensorflow" +
    +      ".data.DeploymentMode*\210\001\n\016DeploymentMode\022" +
    +      "\037\n\033DEPLOYMENT_MODE_UNSPECIFIED\020\000\022\035\n\031DEPL" +
    +      "OYMENT_MODE_COLOCATED\020\001\022\032\n\026DEPLOYMENT_MO" +
    +      "DE_REMOTE\020\002\022\032\n\026DEPLOYMENT_MODE_HYBRID\020\003B" +
    +      "r\n\031org.tensorflow.proto.dataZUgithub.com" +
    +      "/tensorflow/tensorflow/tensorflow/go/cor" +
    +      "e/protobuf/for_core_protos_go_protob\006pro" +
    +      "to3"
         };
         descriptor = com.google.protobuf.Descriptors.FileDescriptor
           .internalBuildGeneratedFileFrom(descriptorData,
    @@ -2991,27 +2898,28 @@ public org.tensorflow.proto.data.DataService.DataServiceConfig getDefaultInstanc
         internal_static_tensorflow_data_ProcessingModeDef_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_data_ProcessingModeDef_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_data_ProcessingModeDef_descriptor,
             new java.lang.String[] { "ShardingPolicy", });
         internal_static_tensorflow_data_DataServiceMetadata_descriptor =
           getDescriptor().getMessageTypes().get(1);
         internal_static_tensorflow_data_DataServiceMetadata_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_data_DataServiceMetadata_descriptor,
             new java.lang.String[] { "ElementSpec", "Compression", "Cardinality", "OptionalElementSpec", });
         internal_static_tensorflow_data_CrossTrainerCacheOptions_descriptor =
           getDescriptor().getMessageTypes().get(2);
         internal_static_tensorflow_data_CrossTrainerCacheOptions_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_data_CrossTrainerCacheOptions_descriptor,
             new java.lang.String[] { "TrainerId", });
         internal_static_tensorflow_data_DataServiceConfig_descriptor =
           getDescriptor().getMessageTypes().get(3);
         internal_static_tensorflow_data_DataServiceConfig_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_data_DataServiceConfig_descriptor,
             new java.lang.String[] { "DeploymentMode", });
    +    descriptor.resolveAllFeaturesImmutable();
       }
     
       // @@protoc_insertion_point(outer_class_scope)
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/Dataset.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/Dataset.java
    index 2b3101beb94..c381a210b70 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/Dataset.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/Dataset.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/dataset.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto.data;
     
     public final class Dataset {
       private Dataset() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      Dataset.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -113,12 +124,21 @@ public interface CompressedComponentMetadataOrBuilder extends
        * Protobuf type {@code tensorflow.data.CompressedComponentMetadata}
        */
       public static final class CompressedComponentMetadata extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.data.CompressedComponentMetadata)
           CompressedComponentMetadataOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        CompressedComponentMetadata.class.getName());
    +    }
         // Use CompressedComponentMetadata.newBuilder() to construct.
    -    private CompressedComponentMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private CompressedComponentMetadata(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private CompressedComponentMetadata() {
    @@ -126,33 +146,22 @@ private CompressedComponentMetadata() {
           uncompressedBytes_ = emptyLongList();
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new CompressedComponentMetadata();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.data.Dataset.internal_static_tensorflow_data_CompressedComponentMetadata_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.data.Dataset.internal_static_tensorflow_data_CompressedComponentMetadata_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
                   org.tensorflow.proto.data.Dataset.CompressedComponentMetadata.class, org.tensorflow.proto.data.Dataset.CompressedComponentMetadata.Builder.class);
         }
     
    +    private int bitField0_;
         public static final int DTYPE_FIELD_NUMBER = 1;
    -    private int dtype_;
    +    private int dtype_ = 0;
         /**
          * 
          * The dtype of the component tensor.
    @@ -173,8 +182,7 @@ protected java.lang.Object newInstance(
          * @return The dtype.
          */
         @java.lang.Override public org.tensorflow.proto.DataType getDtype() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(dtype_);
    +      org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(dtype_);
           return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
         }
     
    @@ -190,7 +198,7 @@ protected java.lang.Object newInstance(
          */
         @java.lang.Override
         public boolean hasTensorShape() {
    -      return tensorShape_ != null;
    +      return ((bitField0_ & 0x00000001) != 0);
         }
         /**
          * 
    @@ -213,11 +221,13 @@ public org.tensorflow.proto.TensorShapeProto getTensorShape() {
          */
         @java.lang.Override
         public org.tensorflow.proto.TensorShapeProtoOrBuilder getTensorShapeOrBuilder() {
    -      return getTensorShape();
    +      return tensorShape_ == null ? org.tensorflow.proto.TensorShapeProto.getDefaultInstance() : tensorShape_;
         }
     
         public static final int UNCOMPRESSED_BYTES_FIELD_NUMBER = 4;
    -    private com.google.protobuf.Internal.LongList uncompressedBytes_;
    +    @SuppressWarnings("serial")
    +    private com.google.protobuf.Internal.LongList uncompressedBytes_ =
    +        emptyLongList();
         /**
          * 
          * The amount of uncompressed tensor data.
    @@ -286,7 +296,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           if (dtype_ != org.tensorflow.proto.DataType.DT_INVALID.getNumber()) {
             output.writeEnum(1, dtype_);
           }
    -      if (tensorShape_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             output.writeMessage(2, getTensorShape());
           }
           if (getUncompressedBytesList().size() > 0) {
    @@ -309,7 +319,7 @@ public int getSerializedSize() {
             size += com.google.protobuf.CodedOutputStream
               .computeEnumSize(1, dtype_);
           }
    -      if (tensorShape_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(2, getTensorShape());
           }
    @@ -410,39 +420,41 @@ public static org.tensorflow.proto.data.Dataset.CompressedComponentMetadata pars
         }
         public static org.tensorflow.proto.data.Dataset.CompressedComponentMetadata parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.Dataset.CompressedComponentMetadata parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.data.Dataset.CompressedComponentMetadata parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.data.Dataset.CompressedComponentMetadata parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.data.Dataset.CompressedComponentMetadata parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.Dataset.CompressedComponentMetadata parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -462,7 +474,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -474,7 +486,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.data.CompressedComponentMetadata}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.data.CompressedComponentMetadata)
             org.tensorflow.proto.data.Dataset.CompressedComponentMetadataOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -483,7 +495,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.data.Dataset.internal_static_tensorflow_data_CompressedComponentMetadata_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -492,27 +504,31 @@ public static final class Builder extends
     
           // Construct using org.tensorflow.proto.data.Dataset.CompressedComponentMetadata.newBuilder()
           private Builder() {
    -
    +        maybeForceBuilderInitialization();
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
    -
    +        maybeForceBuilderInitialization();
    +      }
    +      private void maybeForceBuilderInitialization() {
    +        if (com.google.protobuf.GeneratedMessage
    +                .alwaysUseFieldBuilders) {
    +          getTensorShapeFieldBuilder();
    +        }
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             dtype_ = 0;
    -
    -        if (tensorShapeBuilder_ == null) {
    -          tensorShape_ = null;
    -        } else {
    -          tensorShape_ = null;
    +        tensorShape_ = null;
    +        if (tensorShapeBuilder_ != null) {
    +          tensorShapeBuilder_.dispose();
               tensorShapeBuilder_ = null;
             }
             uncompressedBytes_ = emptyLongList();
    -        bitField0_ = (bitField0_ & ~0x00000001);
             return this;
           }
     
    @@ -539,54 +555,30 @@ public org.tensorflow.proto.data.Dataset.CompressedComponentMetadata build() {
           @java.lang.Override
           public org.tensorflow.proto.data.Dataset.CompressedComponentMetadata buildPartial() {
             org.tensorflow.proto.data.Dataset.CompressedComponentMetadata result = new org.tensorflow.proto.data.Dataset.CompressedComponentMetadata(this);
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        onBuilt();
    +        return result;
    +      }
    +
    +      private void buildPartial0(org.tensorflow.proto.data.Dataset.CompressedComponentMetadata result) {
             int from_bitField0_ = bitField0_;
    -        result.dtype_ = dtype_;
    -        if (tensorShapeBuilder_ == null) {
    -          result.tensorShape_ = tensorShape_;
    -        } else {
    -          result.tensorShape_ = tensorShapeBuilder_.build();
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.dtype_ = dtype_;
    +        }
    +        int to_bitField0_ = 0;
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.tensorShape_ = tensorShapeBuilder_ == null
    +              ? tensorShape_
    +              : tensorShapeBuilder_.build();
    +          to_bitField0_ |= 0x00000001;
             }
    -        if (((bitField0_ & 0x00000001) != 0)) {
    +        if (((from_bitField0_ & 0x00000004) != 0)) {
               uncompressedBytes_.makeImmutable();
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          result.uncompressedBytes_ = uncompressedBytes_;
             }
    -        result.uncompressedBytes_ = uncompressedBytes_;
    -        onBuilt();
    -        return result;
    +        result.bitField0_ |= to_bitField0_;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    -      }
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.data.Dataset.CompressedComponentMetadata) {
    @@ -608,7 +600,8 @@ public Builder mergeFrom(org.tensorflow.proto.data.Dataset.CompressedComponentMe
             if (!other.uncompressedBytes_.isEmpty()) {
               if (uncompressedBytes_.isEmpty()) {
                 uncompressedBytes_ = other.uncompressedBytes_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            uncompressedBytes_.makeImmutable();
    +            bitField0_ |= 0x00000004;
               } else {
                 ensureUncompressedBytesIsMutable();
                 uncompressedBytes_.addAll(other.uncompressedBytes_);
    @@ -643,14 +636,14 @@ public Builder mergeFrom(
                     break;
                   case 8: {
                     dtype_ = input.readEnum();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 8
                   case 18: {
                     input.readMessage(
                         getTensorShapeFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 18
                   case 32: {
    @@ -708,8 +701,8 @@ public Builder mergeFrom(
            * @return This builder for chaining.
            */
           public Builder setDtypeValue(int value) {
    -        
             dtype_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -723,8 +716,7 @@ public Builder setDtypeValue(int value) {
            */
           @java.lang.Override
           public org.tensorflow.proto.DataType getDtype() {
    -        @SuppressWarnings("deprecation")
    -        org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(dtype_);
    +        org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(dtype_);
             return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
           }
           /**
    @@ -740,7 +732,7 @@ public Builder setDtype(org.tensorflow.proto.DataType value) {
             if (value == null) {
               throw new NullPointerException();
             }
    -        
    +        bitField0_ |= 0x00000001;
             dtype_ = value.getNumber();
             onChanged();
             return this;
    @@ -754,14 +746,14 @@ public Builder setDtype(org.tensorflow.proto.DataType value) {
            * @return This builder for chaining.
            */
           public Builder clearDtype() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000001);
             dtype_ = 0;
             onChanged();
             return this;
           }
     
           private org.tensorflow.proto.TensorShapeProto tensorShape_;
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> tensorShapeBuilder_;
           /**
            * 
    @@ -772,7 +764,7 @@ public Builder clearDtype() {
            * @return Whether the tensorShape field is set.
            */
           public boolean hasTensorShape() {
    -        return tensorShapeBuilder_ != null || tensorShape_ != null;
    +        return ((bitField0_ & 0x00000002) != 0);
           }
           /**
            * 
    @@ -802,11 +794,11 @@ public Builder setTensorShape(org.tensorflow.proto.TensorShapeProto value) {
                 throw new NullPointerException();
               }
               tensorShape_ = value;
    -          onChanged();
             } else {
               tensorShapeBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000002;
    +        onChanged();
             return this;
           }
           /**
    @@ -820,11 +812,11 @@ public Builder setTensorShape(
               org.tensorflow.proto.TensorShapeProto.Builder builderForValue) {
             if (tensorShapeBuilder_ == null) {
               tensorShape_ = builderForValue.build();
    -          onChanged();
             } else {
               tensorShapeBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000002;
    +        onChanged();
             return this;
           }
           /**
    @@ -836,17 +828,20 @@ public Builder setTensorShape(
            */
           public Builder mergeTensorShape(org.tensorflow.proto.TensorShapeProto value) {
             if (tensorShapeBuilder_ == null) {
    -          if (tensorShape_ != null) {
    -            tensorShape_ =
    -              org.tensorflow.proto.TensorShapeProto.newBuilder(tensorShape_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000002) != 0) &&
    +            tensorShape_ != null &&
    +            tensorShape_ != org.tensorflow.proto.TensorShapeProto.getDefaultInstance()) {
    +            getTensorShapeBuilder().mergeFrom(value);
               } else {
                 tensorShape_ = value;
               }
    -          onChanged();
             } else {
               tensorShapeBuilder_.mergeFrom(value);
             }
    -
    +        if (tensorShape_ != null) {
    +          bitField0_ |= 0x00000002;
    +          onChanged();
    +        }
             return this;
           }
           /**
    @@ -857,14 +852,13 @@ public Builder mergeTensorShape(org.tensorflow.proto.TensorShapeProto value) {
            * .tensorflow.TensorShapeProto tensor_shape = 2;
            */
           public Builder clearTensorShape() {
    -        if (tensorShapeBuilder_ == null) {
    -          tensorShape_ = null;
    -          onChanged();
    -        } else {
    -          tensorShape_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000002);
    +        tensorShape_ = null;
    +        if (tensorShapeBuilder_ != null) {
    +          tensorShapeBuilder_.dispose();
               tensorShapeBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
    @@ -875,7 +869,7 @@ public Builder clearTensorShape() {
            * .tensorflow.TensorShapeProto tensor_shape = 2;
            */
           public org.tensorflow.proto.TensorShapeProto.Builder getTensorShapeBuilder() {
    -        
    +        bitField0_ |= 0x00000002;
             onChanged();
             return getTensorShapeFieldBuilder().getBuilder();
           }
    @@ -901,11 +895,11 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getTensorShapeOrBuilder()
            *
            * .tensorflow.TensorShapeProto tensor_shape = 2;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> 
               getTensorShapeFieldBuilder() {
             if (tensorShapeBuilder_ == null) {
    -          tensorShapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          tensorShapeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder>(
                       getTensorShape(),
                       getParentForChildren(),
    @@ -917,10 +911,10 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getTensorShapeOrBuilder()
     
           private com.google.protobuf.Internal.LongList uncompressedBytes_ = emptyLongList();
           private void ensureUncompressedBytesIsMutable() {
    -        if (!((bitField0_ & 0x00000001) != 0)) {
    -          uncompressedBytes_ = mutableCopy(uncompressedBytes_);
    -          bitField0_ |= 0x00000001;
    -         }
    +        if (!uncompressedBytes_.isModifiable()) {
    +          uncompressedBytes_ = makeMutableCopy(uncompressedBytes_);
    +        }
    +        bitField0_ |= 0x00000004;
           }
           /**
            * 
    @@ -936,8 +930,8 @@ private void ensureUncompressedBytesIsMutable() {
            */
           public java.util.List
               getUncompressedBytesList() {
    -        return ((bitField0_ & 0x00000001) != 0) ?
    -                 java.util.Collections.unmodifiableList(uncompressedBytes_) : uncompressedBytes_;
    +        uncompressedBytes_.makeImmutable();
    +        return uncompressedBytes_;
           }
           /**
            * 
    @@ -986,8 +980,10 @@ public long getUncompressedBytes(int index) {
            */
           public Builder setUncompressedBytes(
               int index, long value) {
    +
             ensureUncompressedBytesIsMutable();
             uncompressedBytes_.setLong(index, value);
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -1005,8 +1001,10 @@ public Builder setUncompressedBytes(
            * @return This builder for chaining.
            */
           public Builder addUncompressedBytes(long value) {
    +
             ensureUncompressedBytesIsMutable();
             uncompressedBytes_.addLong(value);
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -1028,6 +1026,7 @@ public Builder addAllUncompressedBytes(
             ensureUncompressedBytesIsMutable();
             com.google.protobuf.AbstractMessageLite.Builder.addAll(
                 values, uncompressedBytes_);
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -1045,22 +1044,10 @@ public Builder addAllUncompressedBytes(
            */
           public Builder clearUncompressedBytes() {
             uncompressedBytes_ = emptyLongList();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        bitField0_ = (bitField0_ & ~0x00000004);
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.data.CompressedComponentMetadata)
         }
    @@ -1189,12 +1176,21 @@ org.tensorflow.proto.data.Dataset.CompressedComponentMetadataOrBuilder getCompon
        * Protobuf type {@code tensorflow.data.CompressedElement}
        */
       public static final class CompressedElement extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.data.CompressedElement)
           CompressedElementOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        CompressedElement.class.getName());
    +    }
         // Use CompressedElement.newBuilder() to construct.
    -    private CompressedElement(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private CompressedElement(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private CompressedElement() {
    @@ -1202,25 +1198,13 @@ private CompressedElement() {
           componentMetadata_ = java.util.Collections.emptyList();
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new CompressedElement();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.data.Dataset.internal_static_tensorflow_data_CompressedElement_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.data.Dataset.internal_static_tensorflow_data_CompressedElement_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -1228,7 +1212,7 @@ protected java.lang.Object newInstance(
         }
     
         public static final int DATA_FIELD_NUMBER = 1;
    -    private com.google.protobuf.ByteString data_;
    +    private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY;
         /**
          * 
          * Compressed tensor bytes for all components of the element.
    @@ -1243,6 +1227,7 @@ public com.google.protobuf.ByteString getData() {
         }
     
         public static final int COMPONENT_METADATA_FIELD_NUMBER = 2;
    +    @SuppressWarnings("serial")
         private java.util.List componentMetadata_;
         /**
          * 
    @@ -1303,7 +1288,7 @@ public org.tensorflow.proto.data.Dataset.CompressedComponentMetadataOrBuilder ge
         }
     
         public static final int VERSION_FIELD_NUMBER = 3;
    -    private int version_;
    +    private int version_ = 0;
         /**
          * 
          * Version of the CompressedElement. CompressedElements may be stored on disk
    @@ -1444,39 +1429,41 @@ public static org.tensorflow.proto.data.Dataset.CompressedElement parseFrom(
         }
         public static org.tensorflow.proto.data.Dataset.CompressedElement parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.Dataset.CompressedElement parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.data.Dataset.CompressedElement parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.data.Dataset.CompressedElement parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.data.Dataset.CompressedElement parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.Dataset.CompressedElement parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -1496,7 +1483,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -1504,7 +1491,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.data.CompressedElement}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.data.CompressedElement)
             org.tensorflow.proto.data.Dataset.CompressedElementOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -1513,7 +1500,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.data.Dataset.internal_static_tensorflow_data_CompressedElement_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -1526,24 +1513,23 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             data_ = com.google.protobuf.ByteString.EMPTY;
    -
             if (componentMetadataBuilder_ == null) {
               componentMetadata_ = java.util.Collections.emptyList();
             } else {
               componentMetadata_ = null;
               componentMetadataBuilder_.clear();
             }
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        bitField0_ = (bitField0_ & ~0x00000002);
             version_ = 0;
    -
             return this;
           }
     
    @@ -1570,54 +1556,34 @@ public org.tensorflow.proto.data.Dataset.CompressedElement build() {
           @java.lang.Override
           public org.tensorflow.proto.data.Dataset.CompressedElement buildPartial() {
             org.tensorflow.proto.data.Dataset.CompressedElement result = new org.tensorflow.proto.data.Dataset.CompressedElement(this);
    -        int from_bitField0_ = bitField0_;
    -        result.data_ = data_;
    +        buildPartialRepeatedFields(result);
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        onBuilt();
    +        return result;
    +      }
    +
    +      private void buildPartialRepeatedFields(org.tensorflow.proto.data.Dataset.CompressedElement result) {
             if (componentMetadataBuilder_ == null) {
    -          if (((bitField0_ & 0x00000001) != 0)) {
    +          if (((bitField0_ & 0x00000002) != 0)) {
                 componentMetadata_ = java.util.Collections.unmodifiableList(componentMetadata_);
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000002);
               }
               result.componentMetadata_ = componentMetadata_;
             } else {
               result.componentMetadata_ = componentMetadataBuilder_.build();
             }
    -        result.version_ = version_;
    -        onBuilt();
    -        return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.data.Dataset.CompressedElement result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.data_ = data_;
    +        }
    +        if (((from_bitField0_ & 0x00000004) != 0)) {
    +          result.version_ = version_;
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.data.Dataset.CompressedElement) {
    @@ -1637,7 +1603,7 @@ public Builder mergeFrom(org.tensorflow.proto.data.Dataset.CompressedElement oth
               if (!other.componentMetadata_.isEmpty()) {
                 if (componentMetadata_.isEmpty()) {
                   componentMetadata_ = other.componentMetadata_;
    -              bitField0_ = (bitField0_ & ~0x00000001);
    +              bitField0_ = (bitField0_ & ~0x00000002);
                 } else {
                   ensureComponentMetadataIsMutable();
                   componentMetadata_.addAll(other.componentMetadata_);
    @@ -1650,9 +1616,9 @@ public Builder mergeFrom(org.tensorflow.proto.data.Dataset.CompressedElement oth
                   componentMetadataBuilder_.dispose();
                   componentMetadataBuilder_ = null;
                   componentMetadata_ = other.componentMetadata_;
    -              bitField0_ = (bitField0_ & ~0x00000001);
    +              bitField0_ = (bitField0_ & ~0x00000002);
                   componentMetadataBuilder_ = 
    -                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                        getComponentMetadataFieldBuilder() : null;
                 } else {
                   componentMetadataBuilder_.addAllMessages(other.componentMetadata_);
    @@ -1690,7 +1656,7 @@ public Builder mergeFrom(
                     break;
                   case 10: {
                     data_ = input.readBytes();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 10
                   case 18: {
    @@ -1708,7 +1674,7 @@ public Builder mergeFrom(
                   } // case 18
                   case 24: {
                     version_ = input.readInt32();
    -
    +                bitField0_ |= 0x00000004;
                     break;
                   } // case 24
                   default: {
    @@ -1751,11 +1717,9 @@ public com.google.protobuf.ByteString getData() {
            * @return This builder for chaining.
            */
           public Builder setData(com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             data_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -1768,7 +1732,7 @@ public Builder setData(com.google.protobuf.ByteString value) {
            * @return This builder for chaining.
            */
           public Builder clearData() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000001);
             data_ = getDefaultInstance().getData();
             onChanged();
             return this;
    @@ -1777,13 +1741,13 @@ public Builder clearData() {
           private java.util.List componentMetadata_ =
             java.util.Collections.emptyList();
           private void ensureComponentMetadataIsMutable() {
    -        if (!((bitField0_ & 0x00000001) != 0)) {
    +        if (!((bitField0_ & 0x00000002) != 0)) {
               componentMetadata_ = new java.util.ArrayList(componentMetadata_);
    -          bitField0_ |= 0x00000001;
    +          bitField0_ |= 0x00000002;
              }
           }
     
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.data.Dataset.CompressedComponentMetadata, org.tensorflow.proto.data.Dataset.CompressedComponentMetadata.Builder, org.tensorflow.proto.data.Dataset.CompressedComponentMetadataOrBuilder> componentMetadataBuilder_;
     
           /**
    @@ -1973,7 +1937,7 @@ public Builder addAllComponentMetadata(
           public Builder clearComponentMetadata() {
             if (componentMetadataBuilder_ == null) {
               componentMetadata_ = java.util.Collections.emptyList();
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ = (bitField0_ & ~0x00000002);
               onChanged();
             } else {
               componentMetadataBuilder_.clear();
    @@ -2071,14 +2035,14 @@ public org.tensorflow.proto.data.Dataset.CompressedComponentMetadata.Builder add
                getComponentMetadataBuilderList() {
             return getComponentMetadataFieldBuilder().getBuilderList();
           }
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.data.Dataset.CompressedComponentMetadata, org.tensorflow.proto.data.Dataset.CompressedComponentMetadata.Builder, org.tensorflow.proto.data.Dataset.CompressedComponentMetadataOrBuilder> 
               getComponentMetadataFieldBuilder() {
             if (componentMetadataBuilder_ == null) {
    -          componentMetadataBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +          componentMetadataBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                   org.tensorflow.proto.data.Dataset.CompressedComponentMetadata, org.tensorflow.proto.data.Dataset.CompressedComponentMetadata.Builder, org.tensorflow.proto.data.Dataset.CompressedComponentMetadataOrBuilder>(
                       componentMetadata_,
    -                  ((bitField0_ & 0x00000001) != 0),
    +                  ((bitField0_ & 0x00000002) != 0),
                       getParentForChildren(),
                       isClean());
               componentMetadata_ = null;
    @@ -2117,8 +2081,9 @@ public int getVersion() {
            * @return This builder for chaining.
            */
           public Builder setVersion(int value) {
    -        
    +
             version_ = value;
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -2135,23 +2100,11 @@ public Builder setVersion(int value) {
            * @return This builder for chaining.
            */
           public Builder clearVersion() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000004);
             version_ = 0;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.data.CompressedElement)
         }
    @@ -2240,37 +2193,34 @@ org.tensorflow.proto.TensorProtoOrBuilder getComponentsOrBuilder(
        * Protobuf type {@code tensorflow.data.UncompressedElement}
        */
       public static final class UncompressedElement extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.data.UncompressedElement)
           UncompressedElementOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        UncompressedElement.class.getName());
    +    }
         // Use UncompressedElement.newBuilder() to construct.
    -    private UncompressedElement(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private UncompressedElement(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private UncompressedElement() {
           components_ = java.util.Collections.emptyList();
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new UncompressedElement();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.data.Dataset.internal_static_tensorflow_data_UncompressedElement_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.data.Dataset.internal_static_tensorflow_data_UncompressedElement_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -2278,6 +2228,7 @@ protected java.lang.Object newInstance(
         }
     
         public static final int COMPONENTS_FIELD_NUMBER = 1;
    +    @SuppressWarnings("serial")
         private java.util.List components_;
         /**
          * repeated .tensorflow.TensorProto components = 1;
    @@ -2418,39 +2369,41 @@ public static org.tensorflow.proto.data.Dataset.UncompressedElement parseFrom(
         }
         public static org.tensorflow.proto.data.Dataset.UncompressedElement parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.Dataset.UncompressedElement parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.data.Dataset.UncompressedElement parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.data.Dataset.UncompressedElement parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.data.Dataset.UncompressedElement parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.Dataset.UncompressedElement parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -2470,7 +2423,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -2482,7 +2435,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.data.UncompressedElement}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.data.UncompressedElement)
             org.tensorflow.proto.data.Dataset.UncompressedElementOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -2491,7 +2444,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.data.Dataset.internal_static_tensorflow_data_UncompressedElement_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -2504,13 +2457,14 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             if (componentsBuilder_ == null) {
               components_ = java.util.Collections.emptyList();
             } else {
    @@ -2544,7 +2498,13 @@ public org.tensorflow.proto.data.Dataset.UncompressedElement build() {
           @java.lang.Override
           public org.tensorflow.proto.data.Dataset.UncompressedElement buildPartial() {
             org.tensorflow.proto.data.Dataset.UncompressedElement result = new org.tensorflow.proto.data.Dataset.UncompressedElement(this);
    -        int from_bitField0_ = bitField0_;
    +        buildPartialRepeatedFields(result);
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        onBuilt();
    +        return result;
    +      }
    +
    +      private void buildPartialRepeatedFields(org.tensorflow.proto.data.Dataset.UncompressedElement result) {
             if (componentsBuilder_ == null) {
               if (((bitField0_ & 0x00000001) != 0)) {
                 components_ = java.util.Collections.unmodifiableList(components_);
    @@ -2554,42 +2514,12 @@ public org.tensorflow.proto.data.Dataset.UncompressedElement buildPartial() {
             } else {
               result.components_ = componentsBuilder_.build();
             }
    -        onBuilt();
    -        return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.data.Dataset.UncompressedElement result) {
    +        int from_bitField0_ = bitField0_;
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.data.Dataset.UncompressedElement) {
    @@ -2621,7 +2551,7 @@ public Builder mergeFrom(org.tensorflow.proto.data.Dataset.UncompressedElement o
                   components_ = other.components_;
                   bitField0_ = (bitField0_ & ~0x00000001);
                   componentsBuilder_ = 
    -                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                        getComponentsFieldBuilder() : null;
                 } else {
                   componentsBuilder_.addAllMessages(other.components_);
    @@ -2693,7 +2623,7 @@ private void ensureComponentsIsMutable() {
              }
           }
     
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> componentsBuilder_;
     
           /**
    @@ -2909,11 +2839,11 @@ public org.tensorflow.proto.TensorProto.Builder addComponentsBuilder(
                getComponentsBuilderList() {
             return getComponentsFieldBuilder().getBuilderList();
           }
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> 
               getComponentsFieldBuilder() {
             if (componentsBuilder_ == null) {
    -          componentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +          componentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                   org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder>(
                       components_,
                       ((bitField0_ & 0x00000001) != 0),
    @@ -2923,18 +2853,6 @@ public org.tensorflow.proto.TensorProto.Builder addComponentsBuilder(
             }
             return componentsBuilder_;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.data.UncompressedElement)
         }
    @@ -2990,17 +2908,17 @@ public org.tensorflow.proto.data.Dataset.UncompressedElement getDefaultInstanceF
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_data_CompressedComponentMetadata_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_data_CompressedComponentMetadata_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_data_CompressedElement_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_data_CompressedElement_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_data_UncompressedElement_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_data_UncompressedElement_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -3037,21 +2955,22 @@ public org.tensorflow.proto.data.Dataset.UncompressedElement getDefaultInstanceF
         internal_static_tensorflow_data_CompressedComponentMetadata_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_data_CompressedComponentMetadata_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_data_CompressedComponentMetadata_descriptor,
             new java.lang.String[] { "Dtype", "TensorShape", "UncompressedBytes", });
         internal_static_tensorflow_data_CompressedElement_descriptor =
           getDescriptor().getMessageTypes().get(1);
         internal_static_tensorflow_data_CompressedElement_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_data_CompressedElement_descriptor,
             new java.lang.String[] { "Data", "ComponentMetadata", "Version", });
         internal_static_tensorflow_data_UncompressedElement_descriptor =
           getDescriptor().getMessageTypes().get(2);
         internal_static_tensorflow_data_UncompressedElement_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_data_UncompressedElement_descriptor,
             new java.lang.String[] { "Components", });
    +    descriptor.resolveAllFeaturesImmutable();
         org.tensorflow.proto.TensorProtos.getDescriptor();
         org.tensorflow.proto.TensorShapeProtos.getDescriptor();
         org.tensorflow.proto.TypesProtos.getDescriptor();
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/DatasetMetadata.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/DatasetMetadata.java
    index 4295ac2f661..984536f55e7 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/DatasetMetadata.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/DatasetMetadata.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/dataset_metadata.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto.data;
     
     public final class DatasetMetadata {
       private DatasetMetadata() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      DatasetMetadata.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -23,46 +34,56 @@ public interface MetadataOrBuilder extends
          * @return The name.
          */
         com.google.protobuf.ByteString getName();
    +
    +    /**
    +     * string data_service_address = 2;
    +     * @return The dataServiceAddress.
    +     */
    +    java.lang.String getDataServiceAddress();
    +    /**
    +     * string data_service_address = 2;
    +     * @return The bytes for dataServiceAddress.
    +     */
    +    com.google.protobuf.ByteString
    +        getDataServiceAddressBytes();
       }
       /**
        * 
    -   * next: 2
    +   * next: 3
        * 
    * * Protobuf type {@code tensorflow.data.Metadata} */ public static final class Metadata extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.data.Metadata) MetadataOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + Metadata.class.getName()); + } // Use Metadata.newBuilder() to construct. - private Metadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Metadata(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Metadata() { name_ = com.google.protobuf.ByteString.EMPTY; + dataServiceAddress_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Metadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.data.DatasetMetadata.internal_static_tensorflow_data_Metadata_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.data.DatasetMetadata.internal_static_tensorflow_data_Metadata_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -70,7 +91,7 @@ protected java.lang.Object newInstance( } public static final int NAME_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString name_; + private com.google.protobuf.ByteString name_ = com.google.protobuf.ByteString.EMPTY; /** * bytes name = 1; * @return The name. @@ -80,6 +101,45 @@ public com.google.protobuf.ByteString getName() { return name_; } + public static final int DATA_SERVICE_ADDRESS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object dataServiceAddress_ = ""; + /** + * string data_service_address = 2; + * @return The dataServiceAddress. + */ + @java.lang.Override + public java.lang.String getDataServiceAddress() { + java.lang.Object ref = dataServiceAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataServiceAddress_ = s; + return s; + } + } + /** + * string data_service_address = 2; + * @return The bytes for dataServiceAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDataServiceAddressBytes() { + java.lang.Object ref = dataServiceAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + dataServiceAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -97,6 +157,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!name_.isEmpty()) { output.writeBytes(1, name_); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataServiceAddress_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, dataServiceAddress_); + } getUnknownFields().writeTo(output); } @@ -110,6 +173,9 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, name_); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataServiceAddress_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, dataServiceAddress_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -127,6 +193,8 @@ public boolean equals(final java.lang.Object obj) { if (!getName() .equals(other.getName())) return false; + if (!getDataServiceAddress() + .equals(other.getDataServiceAddress())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -140,6 +208,8 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DATA_SERVICE_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getDataServiceAddress().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -179,39 +249,41 @@ public static org.tensorflow.proto.data.DatasetMetadata.Metadata parseFrom( } public static org.tensorflow.proto.data.DatasetMetadata.Metadata parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.data.DatasetMetadata.Metadata parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.data.DatasetMetadata.Metadata parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.data.DatasetMetadata.Metadata parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.data.DatasetMetadata.Metadata parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.data.DatasetMetadata.Metadata parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -231,19 +303,19 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
    -     * next: 2
    +     * next: 3
          * 
    * * Protobuf type {@code tensorflow.data.Metadata} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.data.Metadata) org.tensorflow.proto.data.DatasetMetadata.MetadataOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -252,7 +324,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.data.DatasetMetadata.internal_static_tensorflow_data_Metadata_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -265,15 +337,16 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; name_ = com.google.protobuf.ByteString.EMPTY; - + dataServiceAddress_ = ""; return this; } @@ -300,43 +373,21 @@ public org.tensorflow.proto.data.DatasetMetadata.Metadata build() { @java.lang.Override public org.tensorflow.proto.data.DatasetMetadata.Metadata buildPartial() { org.tensorflow.proto.data.DatasetMetadata.Metadata result = new org.tensorflow.proto.data.DatasetMetadata.Metadata(this); - result.name_ = name_; + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.data.DatasetMetadata.Metadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.dataServiceAddress_ = dataServiceAddress_; + } } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.data.DatasetMetadata.Metadata) { @@ -352,6 +403,11 @@ public Builder mergeFrom(org.tensorflow.proto.data.DatasetMetadata.Metadata othe if (other.getName() != com.google.protobuf.ByteString.EMPTY) { setName(other.getName()); } + if (!other.getDataServiceAddress().isEmpty()) { + dataServiceAddress_ = other.dataServiceAddress_; + bitField0_ |= 0x00000002; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -380,9 +436,14 @@ public Builder mergeFrom( break; case 10: { name_ = input.readBytes(); - + bitField0_ |= 0x00000001; break; } // case 10 + case 18: { + dataServiceAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -398,6 +459,7 @@ public Builder mergeFrom( } // finally return this; } + private int bitField0_; private com.google.protobuf.ByteString name_ = com.google.protobuf.ByteString.EMPTY; /** @@ -414,11 +476,9 @@ public com.google.protobuf.ByteString getName() { * @return This builder for chaining. */ public Builder setName(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } name_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -427,23 +487,83 @@ public Builder setName(com.google.protobuf.ByteString value) { * @return This builder for chaining. */ public Builder clearName() { - + bitField0_ = (bitField0_ & ~0x00000001); name_ = getDefaultInstance().getName(); onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + private java.lang.Object dataServiceAddress_ = ""; + /** + * string data_service_address = 2; + * @return The dataServiceAddress. + */ + public java.lang.String getDataServiceAddress() { + java.lang.Object ref = dataServiceAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataServiceAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string data_service_address = 2; + * @return The bytes for dataServiceAddress. + */ + public com.google.protobuf.ByteString + getDataServiceAddressBytes() { + java.lang.Object ref = dataServiceAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + dataServiceAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string data_service_address = 2; + * @param value The dataServiceAddress to set. + * @return This builder for chaining. + */ + public Builder setDataServiceAddress( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + dataServiceAddress_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string data_service_address = 2; + * @return This builder for chaining. + */ + public Builder clearDataServiceAddress() { + dataServiceAddress_ = getDefaultInstance().getDataServiceAddress(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string data_service_address = 2; + * @param value The bytes for dataServiceAddress to set. + * @return This builder for chaining. + */ + public Builder setDataServiceAddressBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + dataServiceAddress_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; } - // @@protoc_insertion_point(builder_scope:tensorflow.data.Metadata) } @@ -499,7 +619,7 @@ public org.tensorflow.proto.data.DatasetMetadata.Metadata getDefaultInstanceForT private static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_data_Metadata_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_data_Metadata_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor @@ -511,11 +631,12 @@ public org.tensorflow.proto.data.DatasetMetadata.Metadata getDefaultInstanceForT static { java.lang.String[] descriptorData = { "\n0tensorflow/core/framework/dataset_meta" + - "data.proto\022\017tensorflow.data\"\030\n\010Metadata\022" + - "\014\n\004name\030\001 \001(\014Bt\n\031org.tensorflow.proto.da" + - "taZWgithub.com/tensorflow/tensorflow/ten" + - "sorflow/go/core/framework/dataset_metada" + - "ta_go_protob\006proto3" + "data.proto\022\017tensorflow.data\"6\n\010Metadata\022" + + "\014\n\004name\030\001 \001(\014\022\034\n\024data_service_address\030\002 " + + "\001(\tBt\n\031org.tensorflow.proto.dataZWgithub" + + ".com/tensorflow/tensorflow/tensorflow/go" + + "/core/framework/dataset_metadata_go_prot" + + "ob\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -524,9 +645,10 @@ public org.tensorflow.proto.data.DatasetMetadata.Metadata getDefaultInstanceForT internal_static_tensorflow_data_Metadata_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_tensorflow_data_Metadata_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_data_Metadata_descriptor, - new java.lang.String[] { "Name", }); + new java.lang.String[] { "Name", "DataServiceAddress", }); + descriptor.resolveAllFeaturesImmutable(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/DatasetOptions.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/DatasetOptions.java index 424adecedbd..da4fbd9787b 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/DatasetOptions.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/DatasetOptions.java @@ -1,10 +1,21 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/framework/dataset_options.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto.data; public final class DatasetOptions { private DatasetOptions() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + DatasetOptions.class.getName()); + } public static void registerAllExtensions( com.google.protobuf.ExtensionRegistryLite registry) { } @@ -73,6 +84,15 @@ public enum AutoShardPolicy UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + AutoShardPolicy.class.getName()); + } /** *
          * AUTO: Attempts FILE-based sharding, falling back to DATA-based sharding.
    @@ -231,6 +251,15 @@ public enum ExternalStatePolicy
         UNRECOGNIZED(-1),
         ;
     
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        ExternalStatePolicy.class.getName());
    +    }
         /**
          * POLICY_WARN = 0;
          */
    @@ -392,54 +421,64 @@ public interface AutotuneOptionsOrBuilder extends
          */
         long getInitialParallelism();
     
    -    public org.tensorflow.proto.data.DatasetOptions.AutotuneOptions.OptionalEnabledCase getOptionalEnabledCase();
    +    /**
    +     * int64 min_parallelism = 6;
    +     * @return Whether the minParallelism field is set.
    +     */
    +    boolean hasMinParallelism();
    +    /**
    +     * int64 min_parallelism = 6;
    +     * @return The minParallelism.
    +     */
    +    long getMinParallelism();
    +
    +    org.tensorflow.proto.data.DatasetOptions.AutotuneOptions.OptionalEnabledCase getOptionalEnabledCase();
    +
    +    org.tensorflow.proto.data.DatasetOptions.AutotuneOptions.OptionalCpuBudgetCase getOptionalCpuBudgetCase();
     
    -    public org.tensorflow.proto.data.DatasetOptions.AutotuneOptions.OptionalCpuBudgetCase getOptionalCpuBudgetCase();
    +    org.tensorflow.proto.data.DatasetOptions.AutotuneOptions.OptionalRamBudgetCase getOptionalRamBudgetCase();
     
    -    public org.tensorflow.proto.data.DatasetOptions.AutotuneOptions.OptionalRamBudgetCase getOptionalRamBudgetCase();
    +    org.tensorflow.proto.data.DatasetOptions.AutotuneOptions.OptionalAutotuneAlgorithmCase getOptionalAutotuneAlgorithmCase();
     
    -    public org.tensorflow.proto.data.DatasetOptions.AutotuneOptions.OptionalAutotuneAlgorithmCase getOptionalAutotuneAlgorithmCase();
    +    org.tensorflow.proto.data.DatasetOptions.AutotuneOptions.OptionalInitialParallelismCase getOptionalInitialParallelismCase();
     
    -    public org.tensorflow.proto.data.DatasetOptions.AutotuneOptions.OptionalInitialParallelismCase getOptionalInitialParallelismCase();
    +    org.tensorflow.proto.data.DatasetOptions.AutotuneOptions.OptionalMinParallelismCase getOptionalMinParallelismCase();
       }
       /**
        * 
    -   * next: 6
    +   * next: 7
        * 
    * * Protobuf type {@code tensorflow.data.AutotuneOptions} */ public static final class AutotuneOptions extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.data.AutotuneOptions) AutotuneOptionsOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + AutotuneOptions.class.getName()); + } // Use AutotuneOptions.newBuilder() to construct. - private AutotuneOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private AutotuneOptions(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private AutotuneOptions() { } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AutotuneOptions(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.data.DatasetOptions.internal_static_tensorflow_data_AutotuneOptions_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.data.DatasetOptions.internal_static_tensorflow_data_AutotuneOptions_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -447,6 +486,7 @@ protected java.lang.Object newInstance( } private int optionalEnabledCase_ = 0; + @SuppressWarnings("serial") private java.lang.Object optionalEnabled_; public enum OptionalEnabledCase implements com.google.protobuf.Internal.EnumLite, @@ -486,6 +526,7 @@ public int getNumber() { } private int optionalCpuBudgetCase_ = 0; + @SuppressWarnings("serial") private java.lang.Object optionalCpuBudget_; public enum OptionalCpuBudgetCase implements com.google.protobuf.Internal.EnumLite, @@ -525,6 +566,7 @@ public int getNumber() { } private int optionalRamBudgetCase_ = 0; + @SuppressWarnings("serial") private java.lang.Object optionalRamBudget_; public enum OptionalRamBudgetCase implements com.google.protobuf.Internal.EnumLite, @@ -564,6 +606,7 @@ public int getNumber() { } private int optionalAutotuneAlgorithmCase_ = 0; + @SuppressWarnings("serial") private java.lang.Object optionalAutotuneAlgorithm_; public enum OptionalAutotuneAlgorithmCase implements com.google.protobuf.Internal.EnumLite, @@ -603,6 +646,7 @@ public int getNumber() { } private int optionalInitialParallelismCase_ = 0; + @SuppressWarnings("serial") private java.lang.Object optionalInitialParallelism_; public enum OptionalInitialParallelismCase implements com.google.protobuf.Internal.EnumLite, @@ -641,6 +685,46 @@ public int getNumber() { optionalInitialParallelismCase_); } + private int optionalMinParallelismCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object optionalMinParallelism_; + public enum OptionalMinParallelismCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + MIN_PARALLELISM(6), + OPTIONALMINPARALLELISM_NOT_SET(0); + private final int value; + private OptionalMinParallelismCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static OptionalMinParallelismCase valueOf(int value) { + return forNumber(value); + } + + public static OptionalMinParallelismCase forNumber(int value) { + switch (value) { + case 6: return MIN_PARALLELISM; + case 0: return OPTIONALMINPARALLELISM_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public OptionalMinParallelismCase + getOptionalMinParallelismCase() { + return OptionalMinParallelismCase.forNumber( + optionalMinParallelismCase_); + } + public static final int ENABLED_FIELD_NUMBER = 1; /** * bool enabled = 1; @@ -728,8 +812,7 @@ public int getAutotuneAlgorithmValue() { */ public org.tensorflow.proto.data.model.Model.AutotuneAlgorithm getAutotuneAlgorithm() { if (optionalAutotuneAlgorithmCase_ == 4) { - @SuppressWarnings("deprecation") - org.tensorflow.proto.data.model.Model.AutotuneAlgorithm result = org.tensorflow.proto.data.model.Model.AutotuneAlgorithm.valueOf( + org.tensorflow.proto.data.model.Model.AutotuneAlgorithm result = org.tensorflow.proto.data.model.Model.AutotuneAlgorithm.forNumber( (java.lang.Integer) optionalAutotuneAlgorithm_); return result == null ? org.tensorflow.proto.data.model.Model.AutotuneAlgorithm.UNRECOGNIZED : result; } @@ -757,6 +840,27 @@ public long getInitialParallelism() { return 0L; } + public static final int MIN_PARALLELISM_FIELD_NUMBER = 6; + /** + * int64 min_parallelism = 6; + * @return Whether the minParallelism field is set. + */ + @java.lang.Override + public boolean hasMinParallelism() { + return optionalMinParallelismCase_ == 6; + } + /** + * int64 min_parallelism = 6; + * @return The minParallelism. + */ + @java.lang.Override + public long getMinParallelism() { + if (optionalMinParallelismCase_ == 6) { + return (java.lang.Long) optionalMinParallelism_; + } + return 0L; + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -790,6 +894,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) output.writeInt64( 5, (long)((java.lang.Long) optionalInitialParallelism_)); } + if (optionalMinParallelismCase_ == 6) { + output.writeInt64( + 6, (long)((java.lang.Long) optionalMinParallelism_)); + } getUnknownFields().writeTo(output); } @@ -823,6 +931,11 @@ public int getSerializedSize() { .computeInt64Size( 5, (long)((java.lang.Long) optionalInitialParallelism_)); } + if (optionalMinParallelismCase_ == 6) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size( + 6, (long)((java.lang.Long) optionalMinParallelism_)); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -883,6 +996,15 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } + if (!getOptionalMinParallelismCase().equals(other.getOptionalMinParallelismCase())) return false; + switch (optionalMinParallelismCase_) { + case 6: + if (getMinParallelism() + != other.getMinParallelism()) return false; + break; + case 0: + default: + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -937,6 +1059,15 @@ public int hashCode() { case 0: default: } + switch (optionalMinParallelismCase_) { + case 6: + hash = (37 * hash) + MIN_PARALLELISM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMinParallelism()); + break; + case 0: + default: + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -976,39 +1107,41 @@ public static org.tensorflow.proto.data.DatasetOptions.AutotuneOptions parseFrom } public static org.tensorflow.proto.data.DatasetOptions.AutotuneOptions parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.data.DatasetOptions.AutotuneOptions parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.data.DatasetOptions.AutotuneOptions parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.data.DatasetOptions.AutotuneOptions parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.data.DatasetOptions.AutotuneOptions parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.data.DatasetOptions.AutotuneOptions parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -1028,19 +1161,19 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
    -     * next: 6
    +     * next: 7
          * 
    * * Protobuf type {@code tensorflow.data.AutotuneOptions} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.data.AutotuneOptions) org.tensorflow.proto.data.DatasetOptions.AutotuneOptionsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -1049,7 +1182,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.data.DatasetOptions.internal_static_tensorflow_data_AutotuneOptions_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -1062,13 +1195,14 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; optionalEnabledCase_ = 0; optionalEnabled_ = null; optionalCpuBudgetCase_ = 0; @@ -1079,6 +1213,8 @@ public Builder clear() { optionalAutotuneAlgorithm_ = null; optionalInitialParallelismCase_ = 0; optionalInitialParallelism_ = null; + optionalMinParallelismCase_ = 0; + optionalMinParallelism_ = null; return this; } @@ -1105,62 +1241,31 @@ public org.tensorflow.proto.data.DatasetOptions.AutotuneOptions build() { @java.lang.Override public org.tensorflow.proto.data.DatasetOptions.AutotuneOptions buildPartial() { org.tensorflow.proto.data.DatasetOptions.AutotuneOptions result = new org.tensorflow.proto.data.DatasetOptions.AutotuneOptions(this); - if (optionalEnabledCase_ == 1) { - result.optionalEnabled_ = optionalEnabled_; - } - if (optionalCpuBudgetCase_ == 2) { - result.optionalCpuBudget_ = optionalCpuBudget_; - } - if (optionalRamBudgetCase_ == 3) { - result.optionalRamBudget_ = optionalRamBudget_; - } - if (optionalAutotuneAlgorithmCase_ == 4) { - result.optionalAutotuneAlgorithm_ = optionalAutotuneAlgorithm_; - } - if (optionalInitialParallelismCase_ == 5) { - result.optionalInitialParallelism_ = optionalInitialParallelism_; - } + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(org.tensorflow.proto.data.DatasetOptions.AutotuneOptions result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(org.tensorflow.proto.data.DatasetOptions.AutotuneOptions result) { result.optionalEnabledCase_ = optionalEnabledCase_; + result.optionalEnabled_ = this.optionalEnabled_; result.optionalCpuBudgetCase_ = optionalCpuBudgetCase_; + result.optionalCpuBudget_ = this.optionalCpuBudget_; result.optionalRamBudgetCase_ = optionalRamBudgetCase_; + result.optionalRamBudget_ = this.optionalRamBudget_; result.optionalAutotuneAlgorithmCase_ = optionalAutotuneAlgorithmCase_; + result.optionalAutotuneAlgorithm_ = this.optionalAutotuneAlgorithm_; result.optionalInitialParallelismCase_ = optionalInitialParallelismCase_; - onBuilt(); - return result; + result.optionalInitialParallelism_ = this.optionalInitialParallelism_; + result.optionalMinParallelismCase_ = optionalMinParallelismCase_; + result.optionalMinParallelism_ = this.optionalMinParallelism_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.data.DatasetOptions.AutotuneOptions) { @@ -1218,6 +1323,15 @@ public Builder mergeFrom(org.tensorflow.proto.data.DatasetOptions.AutotuneOption break; } } + switch (other.getOptionalMinParallelismCase()) { + case MIN_PARALLELISM: { + setMinParallelism(other.getMinParallelism()); + break; + } + case OPTIONALMINPARALLELISM_NOT_SET: { + break; + } + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1270,6 +1384,11 @@ public Builder mergeFrom( optionalInitialParallelismCase_ = 5; break; } // case 40 + case 48: { + optionalMinParallelism_ = input.readInt64(); + optionalMinParallelismCase_ = 6; + break; + } // case 48 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -1360,6 +1479,22 @@ public Builder clearOptionalInitialParallelism() { return this; } + private int optionalMinParallelismCase_ = 0; + private java.lang.Object optionalMinParallelism_; + public OptionalMinParallelismCase + getOptionalMinParallelismCase() { + return OptionalMinParallelismCase.forNumber( + optionalMinParallelismCase_); + } + + public Builder clearOptionalMinParallelism() { + optionalMinParallelismCase_ = 0; + optionalMinParallelism_ = null; + onChanged(); + return this; + } + + private int bitField0_; /** * bool enabled = 1; @@ -1384,6 +1519,7 @@ public boolean getEnabled() { * @return This builder for chaining. */ public Builder setEnabled(boolean value) { + optionalEnabledCase_ = 1; optionalEnabled_ = value; onChanged(); @@ -1425,6 +1561,7 @@ public int getCpuBudget() { * @return This builder for chaining. */ public Builder setCpuBudget(int value) { + optionalCpuBudgetCase_ = 2; optionalCpuBudget_ = value; onChanged(); @@ -1466,6 +1603,7 @@ public long getRamBudget() { * @return This builder for chaining. */ public Builder setRamBudget(long value) { + optionalRamBudgetCase_ = 3; optionalRamBudget_ = value; onChanged(); @@ -1521,8 +1659,7 @@ public Builder setAutotuneAlgorithmValue(int value) { @java.lang.Override public org.tensorflow.proto.data.model.Model.AutotuneAlgorithm getAutotuneAlgorithm() { if (optionalAutotuneAlgorithmCase_ == 4) { - @SuppressWarnings("deprecation") - org.tensorflow.proto.data.model.Model.AutotuneAlgorithm result = org.tensorflow.proto.data.model.Model.AutotuneAlgorithm.valueOf( + org.tensorflow.proto.data.model.Model.AutotuneAlgorithm result = org.tensorflow.proto.data.model.Model.AutotuneAlgorithm.forNumber( (java.lang.Integer) optionalAutotuneAlgorithm_); return result == null ? org.tensorflow.proto.data.model.Model.AutotuneAlgorithm.UNRECOGNIZED : result; } @@ -1578,6 +1715,7 @@ public long getInitialParallelism() { * @return This builder for chaining. */ public Builder setInitialParallelism(long value) { + optionalInitialParallelismCase_ = 5; optionalInitialParallelism_ = value; onChanged(); @@ -1595,18 +1733,48 @@ public Builder clearInitialParallelism() { } return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + /** + * int64 min_parallelism = 6; + * @return Whether the minParallelism field is set. + */ + public boolean hasMinParallelism() { + return optionalMinParallelismCase_ == 6; } + /** + * int64 min_parallelism = 6; + * @return The minParallelism. + */ + public long getMinParallelism() { + if (optionalMinParallelismCase_ == 6) { + return (java.lang.Long) optionalMinParallelism_; + } + return 0L; + } + /** + * int64 min_parallelism = 6; + * @param value The minParallelism to set. + * @return This builder for chaining. + */ + public Builder setMinParallelism(long value) { + optionalMinParallelismCase_ = 6; + optionalMinParallelism_ = value; + onChanged(); + return this; + } + /** + * int64 min_parallelism = 6; + * @return This builder for chaining. + */ + public Builder clearMinParallelism() { + if (optionalMinParallelismCase_ == 6) { + optionalMinParallelismCase_ = 0; + optionalMinParallelism_ = null; + onChanged(); + } + return this; + } // @@protoc_insertion_point(builder_scope:tensorflow.data.AutotuneOptions) } @@ -1682,37 +1850,34 @@ public interface CardinalityOptionsOrBuilder extends * Protobuf type {@code tensorflow.data.CardinalityOptions} */ public static final class CardinalityOptions extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.data.CardinalityOptions) CardinalityOptionsOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + CardinalityOptions.class.getName()); + } // Use CardinalityOptions.newBuilder() to construct. - private CardinalityOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CardinalityOptions(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private CardinalityOptions() { computeLevel_ = 0; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CardinalityOptions(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.data.DatasetOptions.internal_static_tensorflow_data_CardinalityOptions_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.data.DatasetOptions.internal_static_tensorflow_data_CardinalityOptions_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -1752,6 +1917,15 @@ public enum ComputeLevel UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + ComputeLevel.class.getName()); + } /** * CARDINALITY_COMPUTE_UNSPECIFIED = 0; */ @@ -1863,7 +2037,7 @@ private ComputeLevel(int value) { } public static final int COMPUTE_LEVEL_FIELD_NUMBER = 1; - private int computeLevel_; + private int computeLevel_ = 0; /** * .tensorflow.data.CardinalityOptions.ComputeLevel compute_level = 1; * @return The enum numeric value on the wire for computeLevel. @@ -1876,8 +2050,7 @@ private ComputeLevel(int value) { * @return The computeLevel. */ @java.lang.Override public org.tensorflow.proto.data.DatasetOptions.CardinalityOptions.ComputeLevel getComputeLevel() { - @SuppressWarnings("deprecation") - org.tensorflow.proto.data.DatasetOptions.CardinalityOptions.ComputeLevel result = org.tensorflow.proto.data.DatasetOptions.CardinalityOptions.ComputeLevel.valueOf(computeLevel_); + org.tensorflow.proto.data.DatasetOptions.CardinalityOptions.ComputeLevel result = org.tensorflow.proto.data.DatasetOptions.CardinalityOptions.ComputeLevel.forNumber(computeLevel_); return result == null ? org.tensorflow.proto.data.DatasetOptions.CardinalityOptions.ComputeLevel.UNRECOGNIZED : result; } @@ -1979,39 +2152,41 @@ public static org.tensorflow.proto.data.DatasetOptions.CardinalityOptions parseF } public static org.tensorflow.proto.data.DatasetOptions.CardinalityOptions parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.data.DatasetOptions.CardinalityOptions parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.data.DatasetOptions.CardinalityOptions parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.data.DatasetOptions.CardinalityOptions parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.data.DatasetOptions.CardinalityOptions parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.data.DatasetOptions.CardinalityOptions parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -2031,7 +2206,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -2043,7 +2218,7 @@ protected Builder newBuilderForType( * Protobuf type {@code tensorflow.data.CardinalityOptions} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.data.CardinalityOptions) org.tensorflow.proto.data.DatasetOptions.CardinalityOptionsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -2052,7 +2227,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.data.DatasetOptions.internal_static_tensorflow_data_CardinalityOptions_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -2065,15 +2240,15 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; computeLevel_ = 0; - return this; } @@ -2100,43 +2275,18 @@ public org.tensorflow.proto.data.DatasetOptions.CardinalityOptions build() { @java.lang.Override public org.tensorflow.proto.data.DatasetOptions.CardinalityOptions buildPartial() { org.tensorflow.proto.data.DatasetOptions.CardinalityOptions result = new org.tensorflow.proto.data.DatasetOptions.CardinalityOptions(this); - result.computeLevel_ = computeLevel_; + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.data.DatasetOptions.CardinalityOptions result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.computeLevel_ = computeLevel_; + } } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.data.DatasetOptions.CardinalityOptions) { @@ -2180,7 +2330,7 @@ public Builder mergeFrom( break; case 8: { computeLevel_ = input.readEnum(); - + bitField0_ |= 0x00000001; break; } // case 8 default: { @@ -2198,6 +2348,7 @@ public Builder mergeFrom( } // finally return this; } + private int bitField0_; private int computeLevel_ = 0; /** @@ -2213,8 +2364,8 @@ public Builder mergeFrom( * @return This builder for chaining. */ public Builder setComputeLevelValue(int value) { - computeLevel_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -2224,8 +2375,7 @@ public Builder setComputeLevelValue(int value) { */ @java.lang.Override public org.tensorflow.proto.data.DatasetOptions.CardinalityOptions.ComputeLevel getComputeLevel() { - @SuppressWarnings("deprecation") - org.tensorflow.proto.data.DatasetOptions.CardinalityOptions.ComputeLevel result = org.tensorflow.proto.data.DatasetOptions.CardinalityOptions.ComputeLevel.valueOf(computeLevel_); + org.tensorflow.proto.data.DatasetOptions.CardinalityOptions.ComputeLevel result = org.tensorflow.proto.data.DatasetOptions.CardinalityOptions.ComputeLevel.forNumber(computeLevel_); return result == null ? org.tensorflow.proto.data.DatasetOptions.CardinalityOptions.ComputeLevel.UNRECOGNIZED : result; } /** @@ -2237,7 +2387,7 @@ public Builder setComputeLevel(org.tensorflow.proto.data.DatasetOptions.Cardinal if (value == null) { throw new NullPointerException(); } - + bitField0_ |= 0x00000001; computeLevel_ = value.getNumber(); onChanged(); return this; @@ -2247,23 +2397,11 @@ public Builder setComputeLevel(org.tensorflow.proto.data.DatasetOptions.Cardinal * @return This builder for chaining. */ public Builder clearComputeLevel() { - + bitField0_ = (bitField0_ & ~0x00000001); computeLevel_ = 0; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.data.CardinalityOptions) } @@ -2342,7 +2480,7 @@ public interface DistributeOptionsOrBuilder extends */ int getNumDevices(); - public org.tensorflow.proto.data.DatasetOptions.DistributeOptions.OptionalNumDevicesCase getOptionalNumDevicesCase(); + org.tensorflow.proto.data.DatasetOptions.DistributeOptions.OptionalNumDevicesCase getOptionalNumDevicesCase(); } /** *
    @@ -2352,37 +2490,34 @@ public interface DistributeOptionsOrBuilder extends
        * Protobuf type {@code tensorflow.data.DistributeOptions}
        */
       public static final class DistributeOptions extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.data.DistributeOptions)
           DistributeOptionsOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        DistributeOptions.class.getName());
    +    }
         // Use DistributeOptions.newBuilder() to construct.
    -    private DistributeOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private DistributeOptions(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private DistributeOptions() {
           autoShardPolicy_ = 0;
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new DistributeOptions();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.data.DatasetOptions.internal_static_tensorflow_data_DistributeOptions_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.data.DatasetOptions.internal_static_tensorflow_data_DistributeOptions_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -2390,6 +2525,7 @@ protected java.lang.Object newInstance(
         }
     
         private int optionalNumDevicesCase_ = 0;
    +    @SuppressWarnings("serial")
         private java.lang.Object optionalNumDevices_;
         public enum OptionalNumDevicesCase
             implements com.google.protobuf.Internal.EnumLite,
    @@ -2429,7 +2565,7 @@ public int getNumber() {
         }
     
         public static final int AUTO_SHARD_POLICY_FIELD_NUMBER = 1;
    -    private int autoShardPolicy_;
    +    private int autoShardPolicy_ = 0;
         /**
          * .tensorflow.data.AutoShardPolicy auto_shard_policy = 1;
          * @return The enum numeric value on the wire for autoShardPolicy.
    @@ -2442,8 +2578,7 @@ public int getNumber() {
          * @return The autoShardPolicy.
          */
         @java.lang.Override public org.tensorflow.proto.data.DatasetOptions.AutoShardPolicy getAutoShardPolicy() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.data.DatasetOptions.AutoShardPolicy result = org.tensorflow.proto.data.DatasetOptions.AutoShardPolicy.valueOf(autoShardPolicy_);
    +      org.tensorflow.proto.data.DatasetOptions.AutoShardPolicy result = org.tensorflow.proto.data.DatasetOptions.AutoShardPolicy.forNumber(autoShardPolicy_);
           return result == null ? org.tensorflow.proto.data.DatasetOptions.AutoShardPolicy.UNRECOGNIZED : result;
         }
     
    @@ -2592,39 +2727,41 @@ public static org.tensorflow.proto.data.DatasetOptions.DistributeOptions parseFr
         }
         public static org.tensorflow.proto.data.DatasetOptions.DistributeOptions parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.DatasetOptions.DistributeOptions parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.data.DatasetOptions.DistributeOptions parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.data.DatasetOptions.DistributeOptions parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.data.DatasetOptions.DistributeOptions parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.DatasetOptions.DistributeOptions parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -2644,7 +2781,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -2656,7 +2793,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.data.DistributeOptions}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.data.DistributeOptions)
             org.tensorflow.proto.data.DatasetOptions.DistributeOptionsOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -2665,7 +2802,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.data.DatasetOptions.internal_static_tensorflow_data_DistributeOptions_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -2678,15 +2815,15 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             autoShardPolicy_ = 0;
    -
             optionalNumDevicesCase_ = 0;
             optionalNumDevices_ = null;
             return this;
    @@ -2715,47 +2852,24 @@ public org.tensorflow.proto.data.DatasetOptions.DistributeOptions build() {
           @java.lang.Override
           public org.tensorflow.proto.data.DatasetOptions.DistributeOptions buildPartial() {
             org.tensorflow.proto.data.DatasetOptions.DistributeOptions result = new org.tensorflow.proto.data.DatasetOptions.DistributeOptions(this);
    -        result.autoShardPolicy_ = autoShardPolicy_;
    -        if (optionalNumDevicesCase_ == 2) {
    -          result.optionalNumDevices_ = optionalNumDevices_;
    -        }
    -        result.optionalNumDevicesCase_ = optionalNumDevicesCase_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        buildPartialOneofs(result);
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    +      private void buildPartial0(org.tensorflow.proto.data.DatasetOptions.DistributeOptions result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.autoShardPolicy_ = autoShardPolicy_;
    +        }
           }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +
    +      private void buildPartialOneofs(org.tensorflow.proto.data.DatasetOptions.DistributeOptions result) {
    +        result.optionalNumDevicesCase_ = optionalNumDevicesCase_;
    +        result.optionalNumDevices_ = this.optionalNumDevices_;
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.data.DatasetOptions.DistributeOptions) {
    @@ -2808,7 +2922,7 @@ public Builder mergeFrom(
                     break;
                   case 8: {
                     autoShardPolicy_ = input.readEnum();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 8
                   case 16: {
    @@ -2846,6 +2960,7 @@ public Builder clearOptionalNumDevices() {
             return this;
           }
     
    +      private int bitField0_;
     
           private int autoShardPolicy_ = 0;
           /**
    @@ -2861,8 +2976,8 @@ public Builder clearOptionalNumDevices() {
            * @return This builder for chaining.
            */
           public Builder setAutoShardPolicyValue(int value) {
    -        
             autoShardPolicy_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -2872,8 +2987,7 @@ public Builder setAutoShardPolicyValue(int value) {
            */
           @java.lang.Override
           public org.tensorflow.proto.data.DatasetOptions.AutoShardPolicy getAutoShardPolicy() {
    -        @SuppressWarnings("deprecation")
    -        org.tensorflow.proto.data.DatasetOptions.AutoShardPolicy result = org.tensorflow.proto.data.DatasetOptions.AutoShardPolicy.valueOf(autoShardPolicy_);
    +        org.tensorflow.proto.data.DatasetOptions.AutoShardPolicy result = org.tensorflow.proto.data.DatasetOptions.AutoShardPolicy.forNumber(autoShardPolicy_);
             return result == null ? org.tensorflow.proto.data.DatasetOptions.AutoShardPolicy.UNRECOGNIZED : result;
           }
           /**
    @@ -2885,7 +2999,7 @@ public Builder setAutoShardPolicy(org.tensorflow.proto.data.DatasetOptions.AutoS
             if (value == null) {
               throw new NullPointerException();
             }
    -        
    +        bitField0_ |= 0x00000001;
             autoShardPolicy_ = value.getNumber();
             onChanged();
             return this;
    @@ -2895,7 +3009,7 @@ public Builder setAutoShardPolicy(org.tensorflow.proto.data.DatasetOptions.AutoS
            * @return This builder for chaining.
            */
           public Builder clearAutoShardPolicy() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000001);
             autoShardPolicy_ = 0;
             onChanged();
             return this;
    @@ -2924,6 +3038,7 @@ public int getNumDevices() {
            * @return This builder for chaining.
            */
           public Builder setNumDevices(int value) {
    +
             optionalNumDevicesCase_ = 2;
             optionalNumDevices_ = value;
             onChanged();
    @@ -2941,18 +3056,6 @@ public Builder clearNumDevices() {
             }
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.data.DistributeOptions)
         }
    @@ -3141,29 +3244,29 @@ public interface OptimizationOptionsOrBuilder extends
          */
         boolean getSeqInterleavePrefetch();
     
    -    public org.tensorflow.proto.data.DatasetOptions.OptimizationOptions.OptionalApplyDefaultOptimizationsCase getOptionalApplyDefaultOptimizationsCase();
    +    org.tensorflow.proto.data.DatasetOptions.OptimizationOptions.OptionalApplyDefaultOptimizationsCase getOptionalApplyDefaultOptimizationsCase();
     
    -    public org.tensorflow.proto.data.DatasetOptions.OptimizationOptions.OptionalFilterFusionCase getOptionalFilterFusionCase();
    +    org.tensorflow.proto.data.DatasetOptions.OptimizationOptions.OptionalFilterFusionCase getOptionalFilterFusionCase();
     
    -    public org.tensorflow.proto.data.DatasetOptions.OptimizationOptions.OptionalMapAndBatchFusionCase getOptionalMapAndBatchFusionCase();
    +    org.tensorflow.proto.data.DatasetOptions.OptimizationOptions.OptionalMapAndBatchFusionCase getOptionalMapAndBatchFusionCase();
     
    -    public org.tensorflow.proto.data.DatasetOptions.OptimizationOptions.OptionalMapAndFilterFusionCase getOptionalMapAndFilterFusionCase();
    +    org.tensorflow.proto.data.DatasetOptions.OptimizationOptions.OptionalMapAndFilterFusionCase getOptionalMapAndFilterFusionCase();
     
    -    public org.tensorflow.proto.data.DatasetOptions.OptimizationOptions.OptionalMapFusionCase getOptionalMapFusionCase();
    +    org.tensorflow.proto.data.DatasetOptions.OptimizationOptions.OptionalMapFusionCase getOptionalMapFusionCase();
     
    -    public org.tensorflow.proto.data.DatasetOptions.OptimizationOptions.OptionalMapParallelizationCase getOptionalMapParallelizationCase();
    +    org.tensorflow.proto.data.DatasetOptions.OptimizationOptions.OptionalMapParallelizationCase getOptionalMapParallelizationCase();
     
    -    public org.tensorflow.proto.data.DatasetOptions.OptimizationOptions.OptionalNoopEliminationCase getOptionalNoopEliminationCase();
    +    org.tensorflow.proto.data.DatasetOptions.OptimizationOptions.OptionalNoopEliminationCase getOptionalNoopEliminationCase();
     
    -    public org.tensorflow.proto.data.DatasetOptions.OptimizationOptions.OptionalParallelBatchCase getOptionalParallelBatchCase();
    +    org.tensorflow.proto.data.DatasetOptions.OptimizationOptions.OptionalParallelBatchCase getOptionalParallelBatchCase();
     
    -    public org.tensorflow.proto.data.DatasetOptions.OptimizationOptions.OptionalShuffleAndRepeatFusionCase getOptionalShuffleAndRepeatFusionCase();
    +    org.tensorflow.proto.data.DatasetOptions.OptimizationOptions.OptionalShuffleAndRepeatFusionCase getOptionalShuffleAndRepeatFusionCase();
     
    -    public org.tensorflow.proto.data.DatasetOptions.OptimizationOptions.OptionalFilterParallelizationCase getOptionalFilterParallelizationCase();
    +    org.tensorflow.proto.data.DatasetOptions.OptimizationOptions.OptionalFilterParallelizationCase getOptionalFilterParallelizationCase();
     
    -    public org.tensorflow.proto.data.DatasetOptions.OptimizationOptions.OptionalInjectPrefetchCase getOptionalInjectPrefetchCase();
    +    org.tensorflow.proto.data.DatasetOptions.OptimizationOptions.OptionalInjectPrefetchCase getOptionalInjectPrefetchCase();
     
    -    public org.tensorflow.proto.data.DatasetOptions.OptimizationOptions.OptionalSeqInterleavePrefetchCase getOptionalSeqInterleavePrefetchCase();
    +    org.tensorflow.proto.data.DatasetOptions.OptimizationOptions.OptionalSeqInterleavePrefetchCase getOptionalSeqInterleavePrefetchCase();
       }
       /**
        * 
    @@ -3173,36 +3276,33 @@ public interface OptimizationOptionsOrBuilder extends
        * Protobuf type {@code tensorflow.data.OptimizationOptions}
        */
       public static final class OptimizationOptions extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.data.OptimizationOptions)
           OptimizationOptionsOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        OptimizationOptions.class.getName());
    +    }
         // Use OptimizationOptions.newBuilder() to construct.
    -    private OptimizationOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private OptimizationOptions(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private OptimizationOptions() {
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new OptimizationOptions();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.data.DatasetOptions.internal_static_tensorflow_data_OptimizationOptions_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.data.DatasetOptions.internal_static_tensorflow_data_OptimizationOptions_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -3210,6 +3310,7 @@ protected java.lang.Object newInstance(
         }
     
         private int optionalApplyDefaultOptimizationsCase_ = 0;
    +    @SuppressWarnings("serial")
         private java.lang.Object optionalApplyDefaultOptimizations_;
         public enum OptionalApplyDefaultOptimizationsCase
             implements com.google.protobuf.Internal.EnumLite,
    @@ -3249,6 +3350,7 @@ public int getNumber() {
         }
     
         private int optionalFilterFusionCase_ = 0;
    +    @SuppressWarnings("serial")
         private java.lang.Object optionalFilterFusion_;
         public enum OptionalFilterFusionCase
             implements com.google.protobuf.Internal.EnumLite,
    @@ -3288,6 +3390,7 @@ public int getNumber() {
         }
     
         private int optionalMapAndBatchFusionCase_ = 0;
    +    @SuppressWarnings("serial")
         private java.lang.Object optionalMapAndBatchFusion_;
         public enum OptionalMapAndBatchFusionCase
             implements com.google.protobuf.Internal.EnumLite,
    @@ -3327,6 +3430,7 @@ public int getNumber() {
         }
     
         private int optionalMapAndFilterFusionCase_ = 0;
    +    @SuppressWarnings("serial")
         private java.lang.Object optionalMapAndFilterFusion_;
         public enum OptionalMapAndFilterFusionCase
             implements com.google.protobuf.Internal.EnumLite,
    @@ -3366,6 +3470,7 @@ public int getNumber() {
         }
     
         private int optionalMapFusionCase_ = 0;
    +    @SuppressWarnings("serial")
         private java.lang.Object optionalMapFusion_;
         public enum OptionalMapFusionCase
             implements com.google.protobuf.Internal.EnumLite,
    @@ -3405,6 +3510,7 @@ public int getNumber() {
         }
     
         private int optionalMapParallelizationCase_ = 0;
    +    @SuppressWarnings("serial")
         private java.lang.Object optionalMapParallelization_;
         public enum OptionalMapParallelizationCase
             implements com.google.protobuf.Internal.EnumLite,
    @@ -3444,6 +3550,7 @@ public int getNumber() {
         }
     
         private int optionalNoopEliminationCase_ = 0;
    +    @SuppressWarnings("serial")
         private java.lang.Object optionalNoopElimination_;
         public enum OptionalNoopEliminationCase
             implements com.google.protobuf.Internal.EnumLite,
    @@ -3483,6 +3590,7 @@ public int getNumber() {
         }
     
         private int optionalParallelBatchCase_ = 0;
    +    @SuppressWarnings("serial")
         private java.lang.Object optionalParallelBatch_;
         public enum OptionalParallelBatchCase
             implements com.google.protobuf.Internal.EnumLite,
    @@ -3522,6 +3630,7 @@ public int getNumber() {
         }
     
         private int optionalShuffleAndRepeatFusionCase_ = 0;
    +    @SuppressWarnings("serial")
         private java.lang.Object optionalShuffleAndRepeatFusion_;
         public enum OptionalShuffleAndRepeatFusionCase
             implements com.google.protobuf.Internal.EnumLite,
    @@ -3561,6 +3670,7 @@ public int getNumber() {
         }
     
         private int optionalFilterParallelizationCase_ = 0;
    +    @SuppressWarnings("serial")
         private java.lang.Object optionalFilterParallelization_;
         public enum OptionalFilterParallelizationCase
             implements com.google.protobuf.Internal.EnumLite,
    @@ -3600,6 +3710,7 @@ public int getNumber() {
         }
     
         private int optionalInjectPrefetchCase_ = 0;
    +    @SuppressWarnings("serial")
         private java.lang.Object optionalInjectPrefetch_;
         public enum OptionalInjectPrefetchCase
             implements com.google.protobuf.Internal.EnumLite,
    @@ -3639,6 +3750,7 @@ public int getNumber() {
         }
     
         private int optionalSeqInterleavePrefetchCase_ = 0;
    +    @SuppressWarnings("serial")
         private java.lang.Object optionalSeqInterleavePrefetch_;
         public enum OptionalSeqInterleavePrefetchCase
             implements com.google.protobuf.Internal.EnumLite,
    @@ -4341,39 +4453,41 @@ public static org.tensorflow.proto.data.DatasetOptions.OptimizationOptions parse
         }
         public static org.tensorflow.proto.data.DatasetOptions.OptimizationOptions parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.DatasetOptions.OptimizationOptions parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.data.DatasetOptions.OptimizationOptions parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.data.DatasetOptions.OptimizationOptions parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.data.DatasetOptions.OptimizationOptions parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.DatasetOptions.OptimizationOptions parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -4393,7 +4507,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -4405,7 +4519,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.data.OptimizationOptions}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.data.OptimizationOptions)
             org.tensorflow.proto.data.DatasetOptions.OptimizationOptionsOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -4414,7 +4528,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.data.DatasetOptions.internal_static_tensorflow_data_OptimizationOptions_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -4427,13 +4541,14 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             optionalApplyDefaultOptimizationsCase_ = 0;
             optionalApplyDefaultOptimizations_ = null;
             optionalFilterFusionCase_ = 0;
    @@ -4484,97 +4599,50 @@ public org.tensorflow.proto.data.DatasetOptions.OptimizationOptions build() {
           @java.lang.Override
           public org.tensorflow.proto.data.DatasetOptions.OptimizationOptions buildPartial() {
             org.tensorflow.proto.data.DatasetOptions.OptimizationOptions result = new org.tensorflow.proto.data.DatasetOptions.OptimizationOptions(this);
    -        if (optionalApplyDefaultOptimizationsCase_ == 1) {
    -          result.optionalApplyDefaultOptimizations_ = optionalApplyDefaultOptimizations_;
    -        }
    -        if (optionalFilterFusionCase_ == 6) {
    -          result.optionalFilterFusion_ = optionalFilterFusion_;
    -        }
    -        if (optionalMapAndBatchFusionCase_ == 9) {
    -          result.optionalMapAndBatchFusion_ = optionalMapAndBatchFusion_;
    -        }
    -        if (optionalMapAndFilterFusionCase_ == 10) {
    -          result.optionalMapAndFilterFusion_ = optionalMapAndFilterFusion_;
    -        }
    -        if (optionalMapFusionCase_ == 11) {
    -          result.optionalMapFusion_ = optionalMapFusion_;
    -        }
    -        if (optionalMapParallelizationCase_ == 12) {
    -          result.optionalMapParallelization_ = optionalMapParallelization_;
    -        }
    -        if (optionalNoopEliminationCase_ == 14) {
    -          result.optionalNoopElimination_ = optionalNoopElimination_;
    -        }
    -        if (optionalParallelBatchCase_ == 15) {
    -          result.optionalParallelBatch_ = optionalParallelBatch_;
    -        }
    -        if (optionalShuffleAndRepeatFusionCase_ == 17) {
    -          result.optionalShuffleAndRepeatFusion_ = optionalShuffleAndRepeatFusion_;
    -        }
    -        if (optionalFilterParallelizationCase_ == 18) {
    -          result.optionalFilterParallelization_ = optionalFilterParallelization_;
    -        }
    -        if (optionalInjectPrefetchCase_ == 19) {
    -          result.optionalInjectPrefetch_ = optionalInjectPrefetch_;
    -        }
    -        if (optionalSeqInterleavePrefetchCase_ == 21) {
    -          result.optionalSeqInterleavePrefetch_ = optionalSeqInterleavePrefetch_;
    -        }
    -        result.optionalApplyDefaultOptimizationsCase_ = optionalApplyDefaultOptimizationsCase_;
    -        result.optionalFilterFusionCase_ = optionalFilterFusionCase_;
    -        result.optionalMapAndBatchFusionCase_ = optionalMapAndBatchFusionCase_;
    -        result.optionalMapAndFilterFusionCase_ = optionalMapAndFilterFusionCase_;
    -        result.optionalMapFusionCase_ = optionalMapFusionCase_;
    -        result.optionalMapParallelizationCase_ = optionalMapParallelizationCase_;
    -        result.optionalNoopEliminationCase_ = optionalNoopEliminationCase_;
    -        result.optionalParallelBatchCase_ = optionalParallelBatchCase_;
    -        result.optionalShuffleAndRepeatFusionCase_ = optionalShuffleAndRepeatFusionCase_;
    -        result.optionalFilterParallelizationCase_ = optionalFilterParallelizationCase_;
    -        result.optionalInjectPrefetchCase_ = optionalInjectPrefetchCase_;
    -        result.optionalSeqInterleavePrefetchCase_ = optionalSeqInterleavePrefetchCase_;
    -        onBuilt();
    -        return result;
    -      }
    -
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder mergeFrom(com.google.protobuf.Message other) {
    -        if (other instanceof org.tensorflow.proto.data.DatasetOptions.OptimizationOptions) {
    -          return mergeFrom((org.tensorflow.proto.data.DatasetOptions.OptimizationOptions)other);
    -        } else {
    -          super.mergeFrom(other);
    -          return this;
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        buildPartialOneofs(result);
    +        onBuilt();
    +        return result;
    +      }
    +
    +      private void buildPartial0(org.tensorflow.proto.data.DatasetOptions.OptimizationOptions result) {
    +        int from_bitField0_ = bitField0_;
    +      }
    +
    +      private void buildPartialOneofs(org.tensorflow.proto.data.DatasetOptions.OptimizationOptions result) {
    +        result.optionalApplyDefaultOptimizationsCase_ = optionalApplyDefaultOptimizationsCase_;
    +        result.optionalApplyDefaultOptimizations_ = this.optionalApplyDefaultOptimizations_;
    +        result.optionalFilterFusionCase_ = optionalFilterFusionCase_;
    +        result.optionalFilterFusion_ = this.optionalFilterFusion_;
    +        result.optionalMapAndBatchFusionCase_ = optionalMapAndBatchFusionCase_;
    +        result.optionalMapAndBatchFusion_ = this.optionalMapAndBatchFusion_;
    +        result.optionalMapAndFilterFusionCase_ = optionalMapAndFilterFusionCase_;
    +        result.optionalMapAndFilterFusion_ = this.optionalMapAndFilterFusion_;
    +        result.optionalMapFusionCase_ = optionalMapFusionCase_;
    +        result.optionalMapFusion_ = this.optionalMapFusion_;
    +        result.optionalMapParallelizationCase_ = optionalMapParallelizationCase_;
    +        result.optionalMapParallelization_ = this.optionalMapParallelization_;
    +        result.optionalNoopEliminationCase_ = optionalNoopEliminationCase_;
    +        result.optionalNoopElimination_ = this.optionalNoopElimination_;
    +        result.optionalParallelBatchCase_ = optionalParallelBatchCase_;
    +        result.optionalParallelBatch_ = this.optionalParallelBatch_;
    +        result.optionalShuffleAndRepeatFusionCase_ = optionalShuffleAndRepeatFusionCase_;
    +        result.optionalShuffleAndRepeatFusion_ = this.optionalShuffleAndRepeatFusion_;
    +        result.optionalFilterParallelizationCase_ = optionalFilterParallelizationCase_;
    +        result.optionalFilterParallelization_ = this.optionalFilterParallelization_;
    +        result.optionalInjectPrefetchCase_ = optionalInjectPrefetchCase_;
    +        result.optionalInjectPrefetch_ = this.optionalInjectPrefetch_;
    +        result.optionalSeqInterleavePrefetchCase_ = optionalSeqInterleavePrefetchCase_;
    +        result.optionalSeqInterleavePrefetch_ = this.optionalSeqInterleavePrefetch_;
    +      }
    +
    +      @java.lang.Override
    +      public Builder mergeFrom(com.google.protobuf.Message other) {
    +        if (other instanceof org.tensorflow.proto.data.DatasetOptions.OptimizationOptions) {
    +          return mergeFrom((org.tensorflow.proto.data.DatasetOptions.OptimizationOptions)other);
    +        } else {
    +          super.mergeFrom(other);
    +          return this;
             }
           }
     
    @@ -4969,6 +5037,7 @@ public Builder clearOptionalSeqInterleavePrefetch() {
             return this;
           }
     
    +      private int bitField0_;
     
           /**
            * bool apply_default_optimizations = 1;
    @@ -4993,6 +5062,7 @@ public boolean getApplyDefaultOptimizations() {
            * @return This builder for chaining.
            */
           public Builder setApplyDefaultOptimizations(boolean value) {
    +
             optionalApplyDefaultOptimizationsCase_ = 1;
             optionalApplyDefaultOptimizations_ = value;
             onChanged();
    @@ -5034,6 +5104,7 @@ public boolean getFilterFusion() {
            * @return This builder for chaining.
            */
           public Builder setFilterFusion(boolean value) {
    +
             optionalFilterFusionCase_ = 6;
             optionalFilterFusion_ = value;
             onChanged();
    @@ -5075,6 +5146,7 @@ public boolean getMapAndBatchFusion() {
            * @return This builder for chaining.
            */
           public Builder setMapAndBatchFusion(boolean value) {
    +
             optionalMapAndBatchFusionCase_ = 9;
             optionalMapAndBatchFusion_ = value;
             onChanged();
    @@ -5116,6 +5188,7 @@ public boolean getMapAndFilterFusion() {
            * @return This builder for chaining.
            */
           public Builder setMapAndFilterFusion(boolean value) {
    +
             optionalMapAndFilterFusionCase_ = 10;
             optionalMapAndFilterFusion_ = value;
             onChanged();
    @@ -5157,6 +5230,7 @@ public boolean getMapFusion() {
            * @return This builder for chaining.
            */
           public Builder setMapFusion(boolean value) {
    +
             optionalMapFusionCase_ = 11;
             optionalMapFusion_ = value;
             onChanged();
    @@ -5198,6 +5272,7 @@ public boolean getMapParallelization() {
            * @return This builder for chaining.
            */
           public Builder setMapParallelization(boolean value) {
    +
             optionalMapParallelizationCase_ = 12;
             optionalMapParallelization_ = value;
             onChanged();
    @@ -5239,6 +5314,7 @@ public boolean getNoopElimination() {
            * @return This builder for chaining.
            */
           public Builder setNoopElimination(boolean value) {
    +
             optionalNoopEliminationCase_ = 14;
             optionalNoopElimination_ = value;
             onChanged();
    @@ -5280,6 +5356,7 @@ public boolean getParallelBatch() {
            * @return This builder for chaining.
            */
           public Builder setParallelBatch(boolean value) {
    +
             optionalParallelBatchCase_ = 15;
             optionalParallelBatch_ = value;
             onChanged();
    @@ -5321,6 +5398,7 @@ public boolean getShuffleAndRepeatFusion() {
            * @return This builder for chaining.
            */
           public Builder setShuffleAndRepeatFusion(boolean value) {
    +
             optionalShuffleAndRepeatFusionCase_ = 17;
             optionalShuffleAndRepeatFusion_ = value;
             onChanged();
    @@ -5362,6 +5440,7 @@ public boolean getFilterParallelization() {
            * @return This builder for chaining.
            */
           public Builder setFilterParallelization(boolean value) {
    +
             optionalFilterParallelizationCase_ = 18;
             optionalFilterParallelization_ = value;
             onChanged();
    @@ -5403,6 +5482,7 @@ public boolean getInjectPrefetch() {
            * @return This builder for chaining.
            */
           public Builder setInjectPrefetch(boolean value) {
    +
             optionalInjectPrefetchCase_ = 19;
             optionalInjectPrefetch_ = value;
             onChanged();
    @@ -5444,6 +5524,7 @@ public boolean getSeqInterleavePrefetch() {
            * @return This builder for chaining.
            */
           public Builder setSeqInterleavePrefetch(boolean value) {
    +
             optionalSeqInterleavePrefetchCase_ = 21;
             optionalSeqInterleavePrefetch_ = value;
             onChanged();
    @@ -5461,18 +5542,6 @@ public Builder clearSeqInterleavePrefetch() {
             }
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.data.OptimizationOptions)
         }
    @@ -5540,7 +5609,7 @@ public interface ServiceOptionsOrBuilder extends
          */
         boolean getPinned();
     
    -    public org.tensorflow.proto.data.DatasetOptions.ServiceOptions.OptionalPinnedCase getOptionalPinnedCase();
    +    org.tensorflow.proto.data.DatasetOptions.ServiceOptions.OptionalPinnedCase getOptionalPinnedCase();
       }
       /**
        * 
    @@ -5550,36 +5619,33 @@ public interface ServiceOptionsOrBuilder extends
        * Protobuf type {@code tensorflow.data.ServiceOptions}
        */
       public static final class ServiceOptions extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.data.ServiceOptions)
           ServiceOptionsOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        ServiceOptions.class.getName());
    +    }
         // Use ServiceOptions.newBuilder() to construct.
    -    private ServiceOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private ServiceOptions(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private ServiceOptions() {
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new ServiceOptions();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.data.DatasetOptions.internal_static_tensorflow_data_ServiceOptions_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.data.DatasetOptions.internal_static_tensorflow_data_ServiceOptions_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -5587,6 +5653,7 @@ protected java.lang.Object newInstance(
         }
     
         private int optionalPinnedCase_ = 0;
    +    @SuppressWarnings("serial")
         private java.lang.Object optionalPinned_;
         public enum OptionalPinnedCase
             implements com.google.protobuf.Internal.EnumLite,
    @@ -5761,39 +5828,41 @@ public static org.tensorflow.proto.data.DatasetOptions.ServiceOptions parseFrom(
         }
         public static org.tensorflow.proto.data.DatasetOptions.ServiceOptions parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.DatasetOptions.ServiceOptions parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.data.DatasetOptions.ServiceOptions parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.data.DatasetOptions.ServiceOptions parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.data.DatasetOptions.ServiceOptions parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.DatasetOptions.ServiceOptions parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -5813,7 +5882,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -5825,7 +5894,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.data.ServiceOptions}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.data.ServiceOptions)
             org.tensorflow.proto.data.DatasetOptions.ServiceOptionsOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -5834,7 +5903,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.data.DatasetOptions.internal_static_tensorflow_data_ServiceOptions_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -5847,13 +5916,14 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             optionalPinnedCase_ = 0;
             optionalPinned_ = null;
             return this;
    @@ -5882,46 +5952,21 @@ public org.tensorflow.proto.data.DatasetOptions.ServiceOptions build() {
           @java.lang.Override
           public org.tensorflow.proto.data.DatasetOptions.ServiceOptions buildPartial() {
             org.tensorflow.proto.data.DatasetOptions.ServiceOptions result = new org.tensorflow.proto.data.DatasetOptions.ServiceOptions(this);
    -        if (optionalPinnedCase_ == 1) {
    -          result.optionalPinned_ = optionalPinned_;
    -        }
    -        result.optionalPinnedCase_ = optionalPinnedCase_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        buildPartialOneofs(result);
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    +      private void buildPartial0(org.tensorflow.proto.data.DatasetOptions.ServiceOptions result) {
    +        int from_bitField0_ = bitField0_;
           }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +
    +      private void buildPartialOneofs(org.tensorflow.proto.data.DatasetOptions.ServiceOptions result) {
    +        result.optionalPinnedCase_ = optionalPinnedCase_;
    +        result.optionalPinned_ = this.optionalPinned_;
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.data.DatasetOptions.ServiceOptions) {
    @@ -6004,6 +6049,7 @@ public Builder clearOptionalPinned() {
             return this;
           }
     
    +      private int bitField0_;
     
           /**
            * bool pinned = 1;
    @@ -6028,6 +6074,7 @@ public boolean getPinned() {
            * @return This builder for chaining.
            */
           public Builder setPinned(boolean value) {
    +
             optionalPinnedCase_ = 1;
             optionalPinned_ = value;
             onChanged();
    @@ -6045,18 +6092,6 @@ public Builder clearPinned() {
             }
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.data.ServiceOptions)
         }
    @@ -6135,9 +6170,9 @@ public interface ThreadingOptionsOrBuilder extends
          */
         int getPrivateThreadpoolSize();
     
    -    public org.tensorflow.proto.data.DatasetOptions.ThreadingOptions.OptionalMaxIntraOpParallelismCase getOptionalMaxIntraOpParallelismCase();
    +    org.tensorflow.proto.data.DatasetOptions.ThreadingOptions.OptionalMaxIntraOpParallelismCase getOptionalMaxIntraOpParallelismCase();
     
    -    public org.tensorflow.proto.data.DatasetOptions.ThreadingOptions.OptionalPrivateThreadpoolSizeCase getOptionalPrivateThreadpoolSizeCase();
    +    org.tensorflow.proto.data.DatasetOptions.ThreadingOptions.OptionalPrivateThreadpoolSizeCase getOptionalPrivateThreadpoolSizeCase();
       }
       /**
        * 
    @@ -6147,36 +6182,33 @@ public interface ThreadingOptionsOrBuilder extends
        * Protobuf type {@code tensorflow.data.ThreadingOptions}
        */
       public static final class ThreadingOptions extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.data.ThreadingOptions)
           ThreadingOptionsOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        ThreadingOptions.class.getName());
    +    }
         // Use ThreadingOptions.newBuilder() to construct.
    -    private ThreadingOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private ThreadingOptions(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private ThreadingOptions() {
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new ThreadingOptions();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.data.DatasetOptions.internal_static_tensorflow_data_ThreadingOptions_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.data.DatasetOptions.internal_static_tensorflow_data_ThreadingOptions_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -6184,6 +6216,7 @@ protected java.lang.Object newInstance(
         }
     
         private int optionalMaxIntraOpParallelismCase_ = 0;
    +    @SuppressWarnings("serial")
         private java.lang.Object optionalMaxIntraOpParallelism_;
         public enum OptionalMaxIntraOpParallelismCase
             implements com.google.protobuf.Internal.EnumLite,
    @@ -6223,6 +6256,7 @@ public int getNumber() {
         }
     
         private int optionalPrivateThreadpoolSizeCase_ = 0;
    +    @SuppressWarnings("serial")
         private java.lang.Object optionalPrivateThreadpoolSize_;
         public enum OptionalPrivateThreadpoolSizeCase
             implements com.google.protobuf.Internal.EnumLite,
    @@ -6443,39 +6477,41 @@ public static org.tensorflow.proto.data.DatasetOptions.ThreadingOptions parseFro
         }
         public static org.tensorflow.proto.data.DatasetOptions.ThreadingOptions parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.DatasetOptions.ThreadingOptions parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.data.DatasetOptions.ThreadingOptions parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.data.DatasetOptions.ThreadingOptions parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.data.DatasetOptions.ThreadingOptions parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.DatasetOptions.ThreadingOptions parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -6495,7 +6531,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -6507,7 +6543,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.data.ThreadingOptions}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.data.ThreadingOptions)
             org.tensorflow.proto.data.DatasetOptions.ThreadingOptionsOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -6516,7 +6552,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.data.DatasetOptions.internal_static_tensorflow_data_ThreadingOptions_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -6529,13 +6565,14 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             optionalMaxIntraOpParallelismCase_ = 0;
             optionalMaxIntraOpParallelism_ = null;
             optionalPrivateThreadpoolSizeCase_ = 0;
    @@ -6566,50 +6603,23 @@ public org.tensorflow.proto.data.DatasetOptions.ThreadingOptions build() {
           @java.lang.Override
           public org.tensorflow.proto.data.DatasetOptions.ThreadingOptions buildPartial() {
             org.tensorflow.proto.data.DatasetOptions.ThreadingOptions result = new org.tensorflow.proto.data.DatasetOptions.ThreadingOptions(this);
    -        if (optionalMaxIntraOpParallelismCase_ == 1) {
    -          result.optionalMaxIntraOpParallelism_ = optionalMaxIntraOpParallelism_;
    -        }
    -        if (optionalPrivateThreadpoolSizeCase_ == 2) {
    -          result.optionalPrivateThreadpoolSize_ = optionalPrivateThreadpoolSize_;
    -        }
    -        result.optionalMaxIntraOpParallelismCase_ = optionalMaxIntraOpParallelismCase_;
    -        result.optionalPrivateThreadpoolSizeCase_ = optionalPrivateThreadpoolSizeCase_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        buildPartialOneofs(result);
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    +      private void buildPartial0(org.tensorflow.proto.data.DatasetOptions.ThreadingOptions result) {
    +        int from_bitField0_ = bitField0_;
           }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +
    +      private void buildPartialOneofs(org.tensorflow.proto.data.DatasetOptions.ThreadingOptions result) {
    +        result.optionalMaxIntraOpParallelismCase_ = optionalMaxIntraOpParallelismCase_;
    +        result.optionalMaxIntraOpParallelism_ = this.optionalMaxIntraOpParallelism_;
    +        result.optionalPrivateThreadpoolSizeCase_ = optionalPrivateThreadpoolSizeCase_;
    +        result.optionalPrivateThreadpoolSize_ = this.optionalPrivateThreadpoolSize_;
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.data.DatasetOptions.ThreadingOptions) {
    @@ -6721,6 +6731,7 @@ public Builder clearOptionalPrivateThreadpoolSize() {
             return this;
           }
     
    +      private int bitField0_;
     
           /**
            * int32 max_intra_op_parallelism = 1;
    @@ -6745,6 +6756,7 @@ public int getMaxIntraOpParallelism() {
            * @return This builder for chaining.
            */
           public Builder setMaxIntraOpParallelism(int value) {
    +
             optionalMaxIntraOpParallelismCase_ = 1;
             optionalMaxIntraOpParallelism_ = value;
             onChanged();
    @@ -6786,6 +6798,7 @@ public int getPrivateThreadpoolSize() {
            * @return This builder for chaining.
            */
           public Builder setPrivateThreadpoolSize(int value) {
    +
             optionalPrivateThreadpoolSizeCase_ = 2;
             optionalPrivateThreadpoolSize_ = value;
             onChanged();
    @@ -6803,18 +6816,6 @@ public Builder clearPrivateThreadpoolSize() {
             }
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.data.ThreadingOptions)
         }
    @@ -7124,66 +7125,67 @@ public interface OptionsOrBuilder extends
          */
         boolean getWarmStart();
     
    -    public org.tensorflow.proto.data.DatasetOptions.Options.OptionalDatasetNameCase getOptionalDatasetNameCase();
    +    org.tensorflow.proto.data.DatasetOptions.Options.OptionalDatasetNameCase getOptionalDatasetNameCase();
     
    -    public org.tensorflow.proto.data.DatasetOptions.Options.OptionalDeterministicCase getOptionalDeterministicCase();
    +    org.tensorflow.proto.data.DatasetOptions.Options.OptionalDeterministicCase getOptionalDeterministicCase();
     
    -    public org.tensorflow.proto.data.DatasetOptions.Options.OptionalSlackCase getOptionalSlackCase();
    +    org.tensorflow.proto.data.DatasetOptions.Options.OptionalSlackCase getOptionalSlackCase();
     
    -    public org.tensorflow.proto.data.DatasetOptions.Options.OptionalExternalStatePolicyCase getOptionalExternalStatePolicyCase();
    +    org.tensorflow.proto.data.DatasetOptions.Options.OptionalExternalStatePolicyCase getOptionalExternalStatePolicyCase();
     
    -    public org.tensorflow.proto.data.DatasetOptions.Options.OptionalSymbolicCheckpointCase getOptionalSymbolicCheckpointCase();
    +    org.tensorflow.proto.data.DatasetOptions.Options.OptionalSymbolicCheckpointCase getOptionalSymbolicCheckpointCase();
     
    -    public org.tensorflow.proto.data.DatasetOptions.Options.OptionalWarmStartCase getOptionalWarmStartCase();
    +    org.tensorflow.proto.data.DatasetOptions.Options.OptionalWarmStartCase getOptionalWarmStartCase();
       }
       /**
        * 
        * Message stored with Dataset objects to control how datasets are processed and
        * optimized.
    +   *
        * next: 13
        * 
    * * Protobuf type {@code tensorflow.data.Options} */ public static final class Options extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.data.Options) OptionsOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + Options.class.getName()); + } // Use Options.newBuilder() to construct. - private Options(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Options(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Options() { - frameworkType_ = com.google.protobuf.LazyStringArrayList.EMPTY; + frameworkType_ = + com.google.protobuf.LazyStringArrayList.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Options(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.data.DatasetOptions.internal_static_tensorflow_data_Options_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.data.DatasetOptions.internal_static_tensorflow_data_Options_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.proto.data.DatasetOptions.Options.class, org.tensorflow.proto.data.DatasetOptions.Options.Builder.class); } + private int bitField0_; private int optionalDatasetNameCase_ = 0; + @SuppressWarnings("serial") private java.lang.Object optionalDatasetName_; public enum OptionalDatasetNameCase implements com.google.protobuf.Internal.EnumLite, @@ -7223,6 +7225,7 @@ public int getNumber() { } private int optionalDeterministicCase_ = 0; + @SuppressWarnings("serial") private java.lang.Object optionalDeterministic_; public enum OptionalDeterministicCase implements com.google.protobuf.Internal.EnumLite, @@ -7262,6 +7265,7 @@ public int getNumber() { } private int optionalSlackCase_ = 0; + @SuppressWarnings("serial") private java.lang.Object optionalSlack_; public enum OptionalSlackCase implements com.google.protobuf.Internal.EnumLite, @@ -7301,6 +7305,7 @@ public int getNumber() { } private int optionalExternalStatePolicyCase_ = 0; + @SuppressWarnings("serial") private java.lang.Object optionalExternalStatePolicy_; public enum OptionalExternalStatePolicyCase implements com.google.protobuf.Internal.EnumLite, @@ -7340,6 +7345,7 @@ public int getNumber() { } private int optionalSymbolicCheckpointCase_ = 0; + @SuppressWarnings("serial") private java.lang.Object optionalSymbolicCheckpoint_; public enum OptionalSymbolicCheckpointCase implements com.google.protobuf.Internal.EnumLite, @@ -7379,6 +7385,7 @@ public int getNumber() { } private int optionalWarmStartCase_ = 0; + @SuppressWarnings("serial") private java.lang.Object optionalWarmStart_; public enum OptionalWarmStartCase implements com.google.protobuf.Internal.EnumLite, @@ -7470,7 +7477,9 @@ public java.lang.String getDatasetName() { } public static final int FRAMEWORK_TYPE_FIELD_NUMBER = 11; - private com.google.protobuf.LazyStringList frameworkType_; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList frameworkType_ = + com.google.protobuf.LazyStringArrayList.emptyList(); /** *
          * List of frameworks used to generate this dataset.
    @@ -7553,7 +7562,7 @@ public boolean getDeterministic() {
          */
         @java.lang.Override
         public boolean hasAutotuneOptions() {
    -      return autotuneOptions_ != null;
    +      return ((bitField0_ & 0x00000001) != 0);
         }
         /**
          * 
    @@ -7576,7 +7585,7 @@ public org.tensorflow.proto.data.DatasetOptions.AutotuneOptions getAutotuneOptio
          */
         @java.lang.Override
         public org.tensorflow.proto.data.DatasetOptions.AutotuneOptionsOrBuilder getAutotuneOptionsOrBuilder() {
    -      return getAutotuneOptions();
    +      return autotuneOptions_ == null ? org.tensorflow.proto.data.DatasetOptions.AutotuneOptions.getDefaultInstance() : autotuneOptions_;
         }
     
         public static final int DISTRIBUTE_OPTIONS_FIELD_NUMBER = 2;
    @@ -7591,7 +7600,7 @@ public org.tensorflow.proto.data.DatasetOptions.AutotuneOptionsOrBuilder getAuto
          */
         @java.lang.Override
         public boolean hasDistributeOptions() {
    -      return distributeOptions_ != null;
    +      return ((bitField0_ & 0x00000002) != 0);
         }
         /**
          * 
    @@ -7614,7 +7623,7 @@ public org.tensorflow.proto.data.DatasetOptions.DistributeOptions getDistributeO
          */
         @java.lang.Override
         public org.tensorflow.proto.data.DatasetOptions.DistributeOptionsOrBuilder getDistributeOptionsOrBuilder() {
    -      return getDistributeOptions();
    +      return distributeOptions_ == null ? org.tensorflow.proto.data.DatasetOptions.DistributeOptions.getDefaultInstance() : distributeOptions_;
         }
     
         public static final int OPTIMIZATION_OPTIONS_FIELD_NUMBER = 3;
    @@ -7629,7 +7638,7 @@ public org.tensorflow.proto.data.DatasetOptions.DistributeOptionsOrBuilder getDi
          */
         @java.lang.Override
         public boolean hasOptimizationOptions() {
    -      return optimizationOptions_ != null;
    +      return ((bitField0_ & 0x00000004) != 0);
         }
         /**
          * 
    @@ -7652,7 +7661,7 @@ public org.tensorflow.proto.data.DatasetOptions.OptimizationOptions getOptimizat
          */
         @java.lang.Override
         public org.tensorflow.proto.data.DatasetOptions.OptimizationOptionsOrBuilder getOptimizationOptionsOrBuilder() {
    -      return getOptimizationOptions();
    +      return optimizationOptions_ == null ? org.tensorflow.proto.data.DatasetOptions.OptimizationOptions.getDefaultInstance() : optimizationOptions_;
         }
     
         public static final int SERVICE_OPTIONS_FIELD_NUMBER = 12;
    @@ -7667,7 +7676,7 @@ public org.tensorflow.proto.data.DatasetOptions.OptimizationOptionsOrBuilder get
          */
         @java.lang.Override
         public boolean hasServiceOptions() {
    -      return serviceOptions_ != null;
    +      return ((bitField0_ & 0x00000008) != 0);
         }
         /**
          * 
    @@ -7690,7 +7699,7 @@ public org.tensorflow.proto.data.DatasetOptions.ServiceOptions getServiceOptions
          */
         @java.lang.Override
         public org.tensorflow.proto.data.DatasetOptions.ServiceOptionsOrBuilder getServiceOptionsOrBuilder() {
    -      return getServiceOptions();
    +      return serviceOptions_ == null ? org.tensorflow.proto.data.DatasetOptions.ServiceOptions.getDefaultInstance() : serviceOptions_;
         }
     
         public static final int SLACK_FIELD_NUMBER = 4;
    @@ -7726,7 +7735,7 @@ public boolean getSlack() {
          */
         @java.lang.Override
         public boolean hasThreadingOptions() {
    -      return threadingOptions_ != null;
    +      return ((bitField0_ & 0x00000010) != 0);
         }
         /**
          * 
    @@ -7749,7 +7758,7 @@ public org.tensorflow.proto.data.DatasetOptions.ThreadingOptions getThreadingOpt
          */
         @java.lang.Override
         public org.tensorflow.proto.data.DatasetOptions.ThreadingOptionsOrBuilder getThreadingOptionsOrBuilder() {
    -      return getThreadingOptions();
    +      return threadingOptions_ == null ? org.tensorflow.proto.data.DatasetOptions.ThreadingOptions.getDefaultInstance() : threadingOptions_;
         }
     
         public static final int EXTERNAL_STATE_POLICY_FIELD_NUMBER = 6;
    @@ -7776,8 +7785,7 @@ public int getExternalStatePolicyValue() {
          */
         public org.tensorflow.proto.data.DatasetOptions.ExternalStatePolicy getExternalStatePolicy() {
           if (optionalExternalStatePolicyCase_ == 6) {
    -        @SuppressWarnings("deprecation")
    -        org.tensorflow.proto.data.DatasetOptions.ExternalStatePolicy result = org.tensorflow.proto.data.DatasetOptions.ExternalStatePolicy.valueOf(
    +        org.tensorflow.proto.data.DatasetOptions.ExternalStatePolicy result = org.tensorflow.proto.data.DatasetOptions.ExternalStatePolicy.forNumber(
                 (java.lang.Integer) optionalExternalStatePolicy_);
             return result == null ? org.tensorflow.proto.data.DatasetOptions.ExternalStatePolicy.UNRECOGNIZED : result;
           }
    @@ -7844,23 +7852,23 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
             output.writeBool(
                 1, (boolean)((java.lang.Boolean) optionalDeterministic_));
           }
    -      if (distributeOptions_ != null) {
    +      if (((bitField0_ & 0x00000002) != 0)) {
             output.writeMessage(2, getDistributeOptions());
           }
    -      if (optimizationOptions_ != null) {
    +      if (((bitField0_ & 0x00000004) != 0)) {
             output.writeMessage(3, getOptimizationOptions());
           }
           if (optionalSlackCase_ == 4) {
             output.writeBool(
                 4, (boolean)((java.lang.Boolean) optionalSlack_));
           }
    -      if (threadingOptions_ != null) {
    +      if (((bitField0_ & 0x00000010) != 0)) {
             output.writeMessage(5, getThreadingOptions());
           }
           if (optionalExternalStatePolicyCase_ == 6) {
             output.writeEnum(6, ((java.lang.Integer) optionalExternalStatePolicy_));
           }
    -      if (autotuneOptions_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             output.writeMessage(7, getAutotuneOptions());
           }
           if (optionalSymbolicCheckpointCase_ == 8) {
    @@ -7872,12 +7880,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
                 9, (boolean)((java.lang.Boolean) optionalWarmStart_));
           }
           if (optionalDatasetNameCase_ == 10) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 10, optionalDatasetName_);
    +        com.google.protobuf.GeneratedMessage.writeString(output, 10, optionalDatasetName_);
           }
           for (int i = 0; i < frameworkType_.size(); i++) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 11, frameworkType_.getRaw(i));
    +        com.google.protobuf.GeneratedMessage.writeString(output, 11, frameworkType_.getRaw(i));
           }
    -      if (serviceOptions_ != null) {
    +      if (((bitField0_ & 0x00000008) != 0)) {
             output.writeMessage(12, getServiceOptions());
           }
           getUnknownFields().writeTo(output);
    @@ -7894,11 +7902,11 @@ public int getSerializedSize() {
               .computeBoolSize(
                   1, (boolean)((java.lang.Boolean) optionalDeterministic_));
           }
    -      if (distributeOptions_ != null) {
    +      if (((bitField0_ & 0x00000002) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(2, getDistributeOptions());
           }
    -      if (optimizationOptions_ != null) {
    +      if (((bitField0_ & 0x00000004) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(3, getOptimizationOptions());
           }
    @@ -7907,7 +7915,7 @@ public int getSerializedSize() {
               .computeBoolSize(
                   4, (boolean)((java.lang.Boolean) optionalSlack_));
           }
    -      if (threadingOptions_ != null) {
    +      if (((bitField0_ & 0x00000010) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(5, getThreadingOptions());
           }
    @@ -7915,7 +7923,7 @@ public int getSerializedSize() {
             size += com.google.protobuf.CodedOutputStream
               .computeEnumSize(6, ((java.lang.Integer) optionalExternalStatePolicy_));
           }
    -      if (autotuneOptions_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(7, getAutotuneOptions());
           }
    @@ -7930,7 +7938,7 @@ public int getSerializedSize() {
                   9, (boolean)((java.lang.Boolean) optionalWarmStart_));
           }
           if (optionalDatasetNameCase_ == 10) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, optionalDatasetName_);
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(10, optionalDatasetName_);
           }
           {
             int dataSize = 0;
    @@ -7940,7 +7948,7 @@ public int getSerializedSize() {
             size += dataSize;
             size += 1 * getFrameworkTypeList().size();
           }
    -      if (serviceOptions_ != null) {
    +      if (((bitField0_ & 0x00000008) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(12, getServiceOptions());
           }
    @@ -8166,39 +8174,41 @@ public static org.tensorflow.proto.data.DatasetOptions.Options parseFrom(
         }
         public static org.tensorflow.proto.data.DatasetOptions.Options parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.DatasetOptions.Options parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.data.DatasetOptions.Options parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.data.DatasetOptions.Options parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.data.DatasetOptions.Options parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.DatasetOptions.Options parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -8218,7 +8228,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -8226,13 +8236,14 @@ protected Builder newBuilderForType(
          * 
          * Message stored with Dataset objects to control how datasets are processed and
          * optimized.
    +     *
          * next: 13
          * 
    * * Protobuf type {@code tensorflow.data.Options} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.data.Options) org.tensorflow.proto.data.DatasetOptions.OptionsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -8241,7 +8252,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.data.DatasetOptions.internal_static_tensorflow_data_Options_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -8250,47 +8261,53 @@ public static final class Builder extends // Construct using org.tensorflow.proto.data.DatasetOptions.Options.newBuilder() private Builder() { - + maybeForceBuilderInitialization(); } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getAutotuneOptionsFieldBuilder(); + getDistributeOptionsFieldBuilder(); + getOptimizationOptionsFieldBuilder(); + getServiceOptionsFieldBuilder(); + getThreadingOptionsFieldBuilder(); + } } @java.lang.Override public Builder clear() { super.clear(); - frameworkType_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - if (autotuneOptionsBuilder_ == null) { - autotuneOptions_ = null; - } else { - autotuneOptions_ = null; + bitField0_ = 0; + frameworkType_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + autotuneOptions_ = null; + if (autotuneOptionsBuilder_ != null) { + autotuneOptionsBuilder_.dispose(); autotuneOptionsBuilder_ = null; } - if (distributeOptionsBuilder_ == null) { - distributeOptions_ = null; - } else { - distributeOptions_ = null; + distributeOptions_ = null; + if (distributeOptionsBuilder_ != null) { + distributeOptionsBuilder_.dispose(); distributeOptionsBuilder_ = null; } - if (optimizationOptionsBuilder_ == null) { - optimizationOptions_ = null; - } else { - optimizationOptions_ = null; + optimizationOptions_ = null; + if (optimizationOptionsBuilder_ != null) { + optimizationOptionsBuilder_.dispose(); optimizationOptionsBuilder_ = null; } - if (serviceOptionsBuilder_ == null) { - serviceOptions_ = null; - } else { - serviceOptions_ = null; + serviceOptions_ = null; + if (serviceOptionsBuilder_ != null) { + serviceOptionsBuilder_.dispose(); serviceOptionsBuilder_ = null; } - if (threadingOptionsBuilder_ == null) { - threadingOptions_ = null; - } else { - threadingOptions_ = null; + threadingOptions_ = null; + if (threadingOptionsBuilder_ != null) { + threadingOptionsBuilder_.dispose(); threadingOptionsBuilder_ = null; } optionalDatasetNameCase_ = 0; @@ -8331,97 +8348,67 @@ public org.tensorflow.proto.data.DatasetOptions.Options build() { @java.lang.Override public org.tensorflow.proto.data.DatasetOptions.Options buildPartial() { org.tensorflow.proto.data.DatasetOptions.Options result = new org.tensorflow.proto.data.DatasetOptions.Options(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(org.tensorflow.proto.data.DatasetOptions.Options result) { int from_bitField0_ = bitField0_; - if (optionalDatasetNameCase_ == 10) { - result.optionalDatasetName_ = optionalDatasetName_; - } - if (((bitField0_ & 0x00000001) != 0)) { - frameworkType_ = frameworkType_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.frameworkType_ = frameworkType_; - if (optionalDeterministicCase_ == 1) { - result.optionalDeterministic_ = optionalDeterministic_; - } - if (autotuneOptionsBuilder_ == null) { - result.autotuneOptions_ = autotuneOptions_; - } else { - result.autotuneOptions_ = autotuneOptionsBuilder_.build(); - } - if (distributeOptionsBuilder_ == null) { - result.distributeOptions_ = distributeOptions_; - } else { - result.distributeOptions_ = distributeOptionsBuilder_.build(); - } - if (optimizationOptionsBuilder_ == null) { - result.optimizationOptions_ = optimizationOptions_; - } else { - result.optimizationOptions_ = optimizationOptionsBuilder_.build(); - } - if (serviceOptionsBuilder_ == null) { - result.serviceOptions_ = serviceOptions_; - } else { - result.serviceOptions_ = serviceOptionsBuilder_.build(); - } - if (optionalSlackCase_ == 4) { - result.optionalSlack_ = optionalSlack_; - } - if (threadingOptionsBuilder_ == null) { - result.threadingOptions_ = threadingOptions_; - } else { - result.threadingOptions_ = threadingOptionsBuilder_.build(); - } - if (optionalExternalStatePolicyCase_ == 6) { - result.optionalExternalStatePolicy_ = optionalExternalStatePolicy_; - } - if (optionalSymbolicCheckpointCase_ == 8) { - result.optionalSymbolicCheckpoint_ = optionalSymbolicCheckpoint_; - } - if (optionalWarmStartCase_ == 9) { - result.optionalWarmStart_ = optionalWarmStart_; - } + if (((from_bitField0_ & 0x00000002) != 0)) { + frameworkType_.makeImmutable(); + result.frameworkType_ = frameworkType_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.autotuneOptions_ = autotuneOptionsBuilder_ == null + ? autotuneOptions_ + : autotuneOptionsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.distributeOptions_ = distributeOptionsBuilder_ == null + ? distributeOptions_ + : distributeOptionsBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.optimizationOptions_ = optimizationOptionsBuilder_ == null + ? optimizationOptions_ + : optimizationOptionsBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.serviceOptions_ = serviceOptionsBuilder_ == null + ? serviceOptions_ + : serviceOptionsBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.threadingOptions_ = threadingOptionsBuilder_ == null + ? threadingOptions_ + : threadingOptionsBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(org.tensorflow.proto.data.DatasetOptions.Options result) { result.optionalDatasetNameCase_ = optionalDatasetNameCase_; + result.optionalDatasetName_ = this.optionalDatasetName_; result.optionalDeterministicCase_ = optionalDeterministicCase_; + result.optionalDeterministic_ = this.optionalDeterministic_; result.optionalSlackCase_ = optionalSlackCase_; + result.optionalSlack_ = this.optionalSlack_; result.optionalExternalStatePolicyCase_ = optionalExternalStatePolicyCase_; + result.optionalExternalStatePolicy_ = this.optionalExternalStatePolicy_; result.optionalSymbolicCheckpointCase_ = optionalSymbolicCheckpointCase_; + result.optionalSymbolicCheckpoint_ = this.optionalSymbolicCheckpoint_; result.optionalWarmStartCase_ = optionalWarmStartCase_; - onBuilt(); - return result; + result.optionalWarmStart_ = this.optionalWarmStart_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.data.DatasetOptions.Options) { @@ -8437,7 +8424,7 @@ public Builder mergeFrom(org.tensorflow.proto.data.DatasetOptions.Options other) if (!other.frameworkType_.isEmpty()) { if (frameworkType_.isEmpty()) { frameworkType_ = other.frameworkType_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ |= 0x00000002; } else { ensureFrameworkTypeIsMutable(); frameworkType_.addAll(other.frameworkType_); @@ -8550,14 +8537,14 @@ public Builder mergeFrom( input.readMessage( getDistributeOptionsFieldBuilder().getBuilder(), extensionRegistry); - + bitField0_ |= 0x00000010; break; } // case 18 case 26: { input.readMessage( getOptimizationOptionsFieldBuilder().getBuilder(), extensionRegistry); - + bitField0_ |= 0x00000020; break; } // case 26 case 32: { @@ -8569,7 +8556,7 @@ public Builder mergeFrom( input.readMessage( getThreadingOptionsFieldBuilder().getBuilder(), extensionRegistry); - + bitField0_ |= 0x00000100; break; } // case 42 case 48: { @@ -8582,7 +8569,7 @@ public Builder mergeFrom( input.readMessage( getAutotuneOptionsFieldBuilder().getBuilder(), extensionRegistry); - + bitField0_ |= 0x00000008; break; } // case 58 case 64: { @@ -8611,7 +8598,7 @@ public Builder mergeFrom( input.readMessage( getServiceOptionsFieldBuilder().getBuilder(), extensionRegistry); - + bitField0_ |= 0x00000040; break; } // case 98 default: { @@ -8781,10 +8768,8 @@ public java.lang.String getDatasetName() { */ public Builder setDatasetName( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - optionalDatasetNameCase_ = 10; + if (value == null) { throw new NullPointerException(); } + optionalDatasetNameCase_ = 10; optionalDatasetName_ = value; onChanged(); return this; @@ -8808,22 +8793,21 @@ public Builder clearDatasetName() { */ public Builder setDatasetNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); optionalDatasetNameCase_ = 10; optionalDatasetName_ = value; onChanged(); return this; } - private com.google.protobuf.LazyStringList frameworkType_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private com.google.protobuf.LazyStringArrayList frameworkType_ = + com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureFrameworkTypeIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!frameworkType_.isModifiable()) { frameworkType_ = new com.google.protobuf.LazyStringArrayList(frameworkType_); - bitField0_ |= 0x00000001; - } + } + bitField0_ |= 0x00000002; } /** *
    @@ -8835,7 +8819,8 @@ private void ensureFrameworkTypeIsMutable() {
            */
           public com.google.protobuf.ProtocolStringList
               getFrameworkTypeList() {
    -        return frameworkType_.getUnmodifiableView();
    +        frameworkType_.makeImmutable();
    +        return frameworkType_;
           }
           /**
            * 
    @@ -8885,11 +8870,10 @@ public java.lang.String getFrameworkType(int index) {
            */
           public Builder setFrameworkType(
               int index, java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureFrameworkTypeIsMutable();
    +        if (value == null) { throw new NullPointerException(); }
    +        ensureFrameworkTypeIsMutable();
             frameworkType_.set(index, value);
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -8904,11 +8888,10 @@ public Builder setFrameworkType(
            */
           public Builder addFrameworkType(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureFrameworkTypeIsMutable();
    +        if (value == null) { throw new NullPointerException(); }
    +        ensureFrameworkTypeIsMutable();
             frameworkType_.add(value);
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -8926,6 +8909,7 @@ public Builder addAllFrameworkType(
             ensureFrameworkTypeIsMutable();
             com.google.protobuf.AbstractMessageLite.Builder.addAll(
                 values, frameworkType_);
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -8938,8 +8922,9 @@ public Builder addAllFrameworkType(
            * @return This builder for chaining.
            */
           public Builder clearFrameworkType() {
    -        frameworkType_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        frameworkType_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
    +        bitField0_ = (bitField0_ & ~0x00000002);;
             onChanged();
             return this;
           }
    @@ -8954,12 +8939,11 @@ public Builder clearFrameworkType() {
            */
           public Builder addFrameworkTypeBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             ensureFrameworkTypeIsMutable();
             frameworkType_.add(value);
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -8987,6 +8971,7 @@ public boolean getDeterministic() {
            * @return This builder for chaining.
            */
           public Builder setDeterministic(boolean value) {
    +
             optionalDeterministicCase_ = 1;
             optionalDeterministic_ = value;
             onChanged();
    @@ -9006,7 +8991,7 @@ public Builder clearDeterministic() {
           }
     
           private org.tensorflow.proto.data.DatasetOptions.AutotuneOptions autotuneOptions_;
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.data.DatasetOptions.AutotuneOptions, org.tensorflow.proto.data.DatasetOptions.AutotuneOptions.Builder, org.tensorflow.proto.data.DatasetOptions.AutotuneOptionsOrBuilder> autotuneOptionsBuilder_;
           /**
            * 
    @@ -9017,7 +9002,7 @@ public Builder clearDeterministic() {
            * @return Whether the autotuneOptions field is set.
            */
           public boolean hasAutotuneOptions() {
    -        return autotuneOptionsBuilder_ != null || autotuneOptions_ != null;
    +        return ((bitField0_ & 0x00000008) != 0);
           }
           /**
            * 
    @@ -9047,11 +9032,11 @@ public Builder setAutotuneOptions(org.tensorflow.proto.data.DatasetOptions.Autot
                 throw new NullPointerException();
               }
               autotuneOptions_ = value;
    -          onChanged();
             } else {
               autotuneOptionsBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000008;
    +        onChanged();
             return this;
           }
           /**
    @@ -9065,11 +9050,11 @@ public Builder setAutotuneOptions(
               org.tensorflow.proto.data.DatasetOptions.AutotuneOptions.Builder builderForValue) {
             if (autotuneOptionsBuilder_ == null) {
               autotuneOptions_ = builderForValue.build();
    -          onChanged();
             } else {
               autotuneOptionsBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000008;
    +        onChanged();
             return this;
           }
           /**
    @@ -9081,17 +9066,20 @@ public Builder setAutotuneOptions(
            */
           public Builder mergeAutotuneOptions(org.tensorflow.proto.data.DatasetOptions.AutotuneOptions value) {
             if (autotuneOptionsBuilder_ == null) {
    -          if (autotuneOptions_ != null) {
    -            autotuneOptions_ =
    -              org.tensorflow.proto.data.DatasetOptions.AutotuneOptions.newBuilder(autotuneOptions_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000008) != 0) &&
    +            autotuneOptions_ != null &&
    +            autotuneOptions_ != org.tensorflow.proto.data.DatasetOptions.AutotuneOptions.getDefaultInstance()) {
    +            getAutotuneOptionsBuilder().mergeFrom(value);
               } else {
                 autotuneOptions_ = value;
               }
    -          onChanged();
             } else {
               autotuneOptionsBuilder_.mergeFrom(value);
             }
    -
    +        if (autotuneOptions_ != null) {
    +          bitField0_ |= 0x00000008;
    +          onChanged();
    +        }
             return this;
           }
           /**
    @@ -9102,14 +9090,13 @@ public Builder mergeAutotuneOptions(org.tensorflow.proto.data.DatasetOptions.Aut
            * .tensorflow.data.AutotuneOptions autotune_options = 7;
            */
           public Builder clearAutotuneOptions() {
    -        if (autotuneOptionsBuilder_ == null) {
    -          autotuneOptions_ = null;
    -          onChanged();
    -        } else {
    -          autotuneOptions_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000008);
    +        autotuneOptions_ = null;
    +        if (autotuneOptionsBuilder_ != null) {
    +          autotuneOptionsBuilder_.dispose();
               autotuneOptionsBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
    @@ -9120,7 +9107,7 @@ public Builder clearAutotuneOptions() {
            * .tensorflow.data.AutotuneOptions autotune_options = 7;
            */
           public org.tensorflow.proto.data.DatasetOptions.AutotuneOptions.Builder getAutotuneOptionsBuilder() {
    -        
    +        bitField0_ |= 0x00000008;
             onChanged();
             return getAutotuneOptionsFieldBuilder().getBuilder();
           }
    @@ -9146,11 +9133,11 @@ public org.tensorflow.proto.data.DatasetOptions.AutotuneOptionsOrBuilder getAuto
            *
            * .tensorflow.data.AutotuneOptions autotune_options = 7;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.data.DatasetOptions.AutotuneOptions, org.tensorflow.proto.data.DatasetOptions.AutotuneOptions.Builder, org.tensorflow.proto.data.DatasetOptions.AutotuneOptionsOrBuilder> 
               getAutotuneOptionsFieldBuilder() {
             if (autotuneOptionsBuilder_ == null) {
    -          autotuneOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          autotuneOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.data.DatasetOptions.AutotuneOptions, org.tensorflow.proto.data.DatasetOptions.AutotuneOptions.Builder, org.tensorflow.proto.data.DatasetOptions.AutotuneOptionsOrBuilder>(
                       getAutotuneOptions(),
                       getParentForChildren(),
    @@ -9161,7 +9148,7 @@ public org.tensorflow.proto.data.DatasetOptions.AutotuneOptionsOrBuilder getAuto
           }
     
           private org.tensorflow.proto.data.DatasetOptions.DistributeOptions distributeOptions_;
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.data.DatasetOptions.DistributeOptions, org.tensorflow.proto.data.DatasetOptions.DistributeOptions.Builder, org.tensorflow.proto.data.DatasetOptions.DistributeOptionsOrBuilder> distributeOptionsBuilder_;
           /**
            * 
    @@ -9172,7 +9159,7 @@ public org.tensorflow.proto.data.DatasetOptions.AutotuneOptionsOrBuilder getAuto
            * @return Whether the distributeOptions field is set.
            */
           public boolean hasDistributeOptions() {
    -        return distributeOptionsBuilder_ != null || distributeOptions_ != null;
    +        return ((bitField0_ & 0x00000010) != 0);
           }
           /**
            * 
    @@ -9202,11 +9189,11 @@ public Builder setDistributeOptions(org.tensorflow.proto.data.DatasetOptions.Dis
                 throw new NullPointerException();
               }
               distributeOptions_ = value;
    -          onChanged();
             } else {
               distributeOptionsBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000010;
    +        onChanged();
             return this;
           }
           /**
    @@ -9220,11 +9207,11 @@ public Builder setDistributeOptions(
               org.tensorflow.proto.data.DatasetOptions.DistributeOptions.Builder builderForValue) {
             if (distributeOptionsBuilder_ == null) {
               distributeOptions_ = builderForValue.build();
    -          onChanged();
             } else {
               distributeOptionsBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000010;
    +        onChanged();
             return this;
           }
           /**
    @@ -9236,17 +9223,20 @@ public Builder setDistributeOptions(
            */
           public Builder mergeDistributeOptions(org.tensorflow.proto.data.DatasetOptions.DistributeOptions value) {
             if (distributeOptionsBuilder_ == null) {
    -          if (distributeOptions_ != null) {
    -            distributeOptions_ =
    -              org.tensorflow.proto.data.DatasetOptions.DistributeOptions.newBuilder(distributeOptions_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000010) != 0) &&
    +            distributeOptions_ != null &&
    +            distributeOptions_ != org.tensorflow.proto.data.DatasetOptions.DistributeOptions.getDefaultInstance()) {
    +            getDistributeOptionsBuilder().mergeFrom(value);
               } else {
                 distributeOptions_ = value;
               }
    -          onChanged();
             } else {
               distributeOptionsBuilder_.mergeFrom(value);
             }
    -
    +        if (distributeOptions_ != null) {
    +          bitField0_ |= 0x00000010;
    +          onChanged();
    +        }
             return this;
           }
           /**
    @@ -9257,14 +9247,13 @@ public Builder mergeDistributeOptions(org.tensorflow.proto.data.DatasetOptions.D
            * .tensorflow.data.DistributeOptions distribute_options = 2;
            */
           public Builder clearDistributeOptions() {
    -        if (distributeOptionsBuilder_ == null) {
    -          distributeOptions_ = null;
    -          onChanged();
    -        } else {
    -          distributeOptions_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000010);
    +        distributeOptions_ = null;
    +        if (distributeOptionsBuilder_ != null) {
    +          distributeOptionsBuilder_.dispose();
               distributeOptionsBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
    @@ -9275,7 +9264,7 @@ public Builder clearDistributeOptions() {
            * .tensorflow.data.DistributeOptions distribute_options = 2;
            */
           public org.tensorflow.proto.data.DatasetOptions.DistributeOptions.Builder getDistributeOptionsBuilder() {
    -        
    +        bitField0_ |= 0x00000010;
             onChanged();
             return getDistributeOptionsFieldBuilder().getBuilder();
           }
    @@ -9301,11 +9290,11 @@ public org.tensorflow.proto.data.DatasetOptions.DistributeOptionsOrBuilder getDi
            *
            * .tensorflow.data.DistributeOptions distribute_options = 2;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.data.DatasetOptions.DistributeOptions, org.tensorflow.proto.data.DatasetOptions.DistributeOptions.Builder, org.tensorflow.proto.data.DatasetOptions.DistributeOptionsOrBuilder> 
               getDistributeOptionsFieldBuilder() {
             if (distributeOptionsBuilder_ == null) {
    -          distributeOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          distributeOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.data.DatasetOptions.DistributeOptions, org.tensorflow.proto.data.DatasetOptions.DistributeOptions.Builder, org.tensorflow.proto.data.DatasetOptions.DistributeOptionsOrBuilder>(
                       getDistributeOptions(),
                       getParentForChildren(),
    @@ -9316,7 +9305,7 @@ public org.tensorflow.proto.data.DatasetOptions.DistributeOptionsOrBuilder getDi
           }
     
           private org.tensorflow.proto.data.DatasetOptions.OptimizationOptions optimizationOptions_;
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.data.DatasetOptions.OptimizationOptions, org.tensorflow.proto.data.DatasetOptions.OptimizationOptions.Builder, org.tensorflow.proto.data.DatasetOptions.OptimizationOptionsOrBuilder> optimizationOptionsBuilder_;
           /**
            * 
    @@ -9327,7 +9316,7 @@ public org.tensorflow.proto.data.DatasetOptions.DistributeOptionsOrBuilder getDi
            * @return Whether the optimizationOptions field is set.
            */
           public boolean hasOptimizationOptions() {
    -        return optimizationOptionsBuilder_ != null || optimizationOptions_ != null;
    +        return ((bitField0_ & 0x00000020) != 0);
           }
           /**
            * 
    @@ -9357,11 +9346,11 @@ public Builder setOptimizationOptions(org.tensorflow.proto.data.DatasetOptions.O
                 throw new NullPointerException();
               }
               optimizationOptions_ = value;
    -          onChanged();
             } else {
               optimizationOptionsBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000020;
    +        onChanged();
             return this;
           }
           /**
    @@ -9375,11 +9364,11 @@ public Builder setOptimizationOptions(
               org.tensorflow.proto.data.DatasetOptions.OptimizationOptions.Builder builderForValue) {
             if (optimizationOptionsBuilder_ == null) {
               optimizationOptions_ = builderForValue.build();
    -          onChanged();
             } else {
               optimizationOptionsBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000020;
    +        onChanged();
             return this;
           }
           /**
    @@ -9391,17 +9380,20 @@ public Builder setOptimizationOptions(
            */
           public Builder mergeOptimizationOptions(org.tensorflow.proto.data.DatasetOptions.OptimizationOptions value) {
             if (optimizationOptionsBuilder_ == null) {
    -          if (optimizationOptions_ != null) {
    -            optimizationOptions_ =
    -              org.tensorflow.proto.data.DatasetOptions.OptimizationOptions.newBuilder(optimizationOptions_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000020) != 0) &&
    +            optimizationOptions_ != null &&
    +            optimizationOptions_ != org.tensorflow.proto.data.DatasetOptions.OptimizationOptions.getDefaultInstance()) {
    +            getOptimizationOptionsBuilder().mergeFrom(value);
               } else {
                 optimizationOptions_ = value;
               }
    -          onChanged();
             } else {
               optimizationOptionsBuilder_.mergeFrom(value);
             }
    -
    +        if (optimizationOptions_ != null) {
    +          bitField0_ |= 0x00000020;
    +          onChanged();
    +        }
             return this;
           }
           /**
    @@ -9412,14 +9404,13 @@ public Builder mergeOptimizationOptions(org.tensorflow.proto.data.DatasetOptions
            * .tensorflow.data.OptimizationOptions optimization_options = 3;
            */
           public Builder clearOptimizationOptions() {
    -        if (optimizationOptionsBuilder_ == null) {
    -          optimizationOptions_ = null;
    -          onChanged();
    -        } else {
    -          optimizationOptions_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000020);
    +        optimizationOptions_ = null;
    +        if (optimizationOptionsBuilder_ != null) {
    +          optimizationOptionsBuilder_.dispose();
               optimizationOptionsBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
    @@ -9430,7 +9421,7 @@ public Builder clearOptimizationOptions() {
            * .tensorflow.data.OptimizationOptions optimization_options = 3;
            */
           public org.tensorflow.proto.data.DatasetOptions.OptimizationOptions.Builder getOptimizationOptionsBuilder() {
    -        
    +        bitField0_ |= 0x00000020;
             onChanged();
             return getOptimizationOptionsFieldBuilder().getBuilder();
           }
    @@ -9456,11 +9447,11 @@ public org.tensorflow.proto.data.DatasetOptions.OptimizationOptionsOrBuilder get
            *
            * .tensorflow.data.OptimizationOptions optimization_options = 3;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.data.DatasetOptions.OptimizationOptions, org.tensorflow.proto.data.DatasetOptions.OptimizationOptions.Builder, org.tensorflow.proto.data.DatasetOptions.OptimizationOptionsOrBuilder> 
               getOptimizationOptionsFieldBuilder() {
             if (optimizationOptionsBuilder_ == null) {
    -          optimizationOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          optimizationOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.data.DatasetOptions.OptimizationOptions, org.tensorflow.proto.data.DatasetOptions.OptimizationOptions.Builder, org.tensorflow.proto.data.DatasetOptions.OptimizationOptionsOrBuilder>(
                       getOptimizationOptions(),
                       getParentForChildren(),
    @@ -9471,7 +9462,7 @@ public org.tensorflow.proto.data.DatasetOptions.OptimizationOptionsOrBuilder get
           }
     
           private org.tensorflow.proto.data.DatasetOptions.ServiceOptions serviceOptions_;
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.data.DatasetOptions.ServiceOptions, org.tensorflow.proto.data.DatasetOptions.ServiceOptions.Builder, org.tensorflow.proto.data.DatasetOptions.ServiceOptionsOrBuilder> serviceOptionsBuilder_;
           /**
            * 
    @@ -9482,7 +9473,7 @@ public org.tensorflow.proto.data.DatasetOptions.OptimizationOptionsOrBuilder get
            * @return Whether the serviceOptions field is set.
            */
           public boolean hasServiceOptions() {
    -        return serviceOptionsBuilder_ != null || serviceOptions_ != null;
    +        return ((bitField0_ & 0x00000040) != 0);
           }
           /**
            * 
    @@ -9512,11 +9503,11 @@ public Builder setServiceOptions(org.tensorflow.proto.data.DatasetOptions.Servic
                 throw new NullPointerException();
               }
               serviceOptions_ = value;
    -          onChanged();
             } else {
               serviceOptionsBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000040;
    +        onChanged();
             return this;
           }
           /**
    @@ -9530,11 +9521,11 @@ public Builder setServiceOptions(
               org.tensorflow.proto.data.DatasetOptions.ServiceOptions.Builder builderForValue) {
             if (serviceOptionsBuilder_ == null) {
               serviceOptions_ = builderForValue.build();
    -          onChanged();
             } else {
               serviceOptionsBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000040;
    +        onChanged();
             return this;
           }
           /**
    @@ -9546,17 +9537,20 @@ public Builder setServiceOptions(
            */
           public Builder mergeServiceOptions(org.tensorflow.proto.data.DatasetOptions.ServiceOptions value) {
             if (serviceOptionsBuilder_ == null) {
    -          if (serviceOptions_ != null) {
    -            serviceOptions_ =
    -              org.tensorflow.proto.data.DatasetOptions.ServiceOptions.newBuilder(serviceOptions_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000040) != 0) &&
    +            serviceOptions_ != null &&
    +            serviceOptions_ != org.tensorflow.proto.data.DatasetOptions.ServiceOptions.getDefaultInstance()) {
    +            getServiceOptionsBuilder().mergeFrom(value);
               } else {
                 serviceOptions_ = value;
               }
    -          onChanged();
             } else {
               serviceOptionsBuilder_.mergeFrom(value);
             }
    -
    +        if (serviceOptions_ != null) {
    +          bitField0_ |= 0x00000040;
    +          onChanged();
    +        }
             return this;
           }
           /**
    @@ -9567,14 +9561,13 @@ public Builder mergeServiceOptions(org.tensorflow.proto.data.DatasetOptions.Serv
            * .tensorflow.data.ServiceOptions service_options = 12;
            */
           public Builder clearServiceOptions() {
    -        if (serviceOptionsBuilder_ == null) {
    -          serviceOptions_ = null;
    -          onChanged();
    -        } else {
    -          serviceOptions_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000040);
    +        serviceOptions_ = null;
    +        if (serviceOptionsBuilder_ != null) {
    +          serviceOptionsBuilder_.dispose();
               serviceOptionsBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
    @@ -9585,7 +9578,7 @@ public Builder clearServiceOptions() {
            * .tensorflow.data.ServiceOptions service_options = 12;
            */
           public org.tensorflow.proto.data.DatasetOptions.ServiceOptions.Builder getServiceOptionsBuilder() {
    -        
    +        bitField0_ |= 0x00000040;
             onChanged();
             return getServiceOptionsFieldBuilder().getBuilder();
           }
    @@ -9611,11 +9604,11 @@ public org.tensorflow.proto.data.DatasetOptions.ServiceOptionsOrBuilder getServi
            *
            * .tensorflow.data.ServiceOptions service_options = 12;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.data.DatasetOptions.ServiceOptions, org.tensorflow.proto.data.DatasetOptions.ServiceOptions.Builder, org.tensorflow.proto.data.DatasetOptions.ServiceOptionsOrBuilder> 
               getServiceOptionsFieldBuilder() {
             if (serviceOptionsBuilder_ == null) {
    -          serviceOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          serviceOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.data.DatasetOptions.ServiceOptions, org.tensorflow.proto.data.DatasetOptions.ServiceOptions.Builder, org.tensorflow.proto.data.DatasetOptions.ServiceOptionsOrBuilder>(
                       getServiceOptions(),
                       getParentForChildren(),
    @@ -9648,6 +9641,7 @@ public boolean getSlack() {
            * @return This builder for chaining.
            */
           public Builder setSlack(boolean value) {
    +
             optionalSlackCase_ = 4;
             optionalSlack_ = value;
             onChanged();
    @@ -9667,7 +9661,7 @@ public Builder clearSlack() {
           }
     
           private org.tensorflow.proto.data.DatasetOptions.ThreadingOptions threadingOptions_;
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.data.DatasetOptions.ThreadingOptions, org.tensorflow.proto.data.DatasetOptions.ThreadingOptions.Builder, org.tensorflow.proto.data.DatasetOptions.ThreadingOptionsOrBuilder> threadingOptionsBuilder_;
           /**
            * 
    @@ -9678,7 +9672,7 @@ public Builder clearSlack() {
            * @return Whether the threadingOptions field is set.
            */
           public boolean hasThreadingOptions() {
    -        return threadingOptionsBuilder_ != null || threadingOptions_ != null;
    +        return ((bitField0_ & 0x00000100) != 0);
           }
           /**
            * 
    @@ -9708,11 +9702,11 @@ public Builder setThreadingOptions(org.tensorflow.proto.data.DatasetOptions.Thre
                 throw new NullPointerException();
               }
               threadingOptions_ = value;
    -          onChanged();
             } else {
               threadingOptionsBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000100;
    +        onChanged();
             return this;
           }
           /**
    @@ -9726,11 +9720,11 @@ public Builder setThreadingOptions(
               org.tensorflow.proto.data.DatasetOptions.ThreadingOptions.Builder builderForValue) {
             if (threadingOptionsBuilder_ == null) {
               threadingOptions_ = builderForValue.build();
    -          onChanged();
             } else {
               threadingOptionsBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000100;
    +        onChanged();
             return this;
           }
           /**
    @@ -9742,17 +9736,20 @@ public Builder setThreadingOptions(
            */
           public Builder mergeThreadingOptions(org.tensorflow.proto.data.DatasetOptions.ThreadingOptions value) {
             if (threadingOptionsBuilder_ == null) {
    -          if (threadingOptions_ != null) {
    -            threadingOptions_ =
    -              org.tensorflow.proto.data.DatasetOptions.ThreadingOptions.newBuilder(threadingOptions_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000100) != 0) &&
    +            threadingOptions_ != null &&
    +            threadingOptions_ != org.tensorflow.proto.data.DatasetOptions.ThreadingOptions.getDefaultInstance()) {
    +            getThreadingOptionsBuilder().mergeFrom(value);
               } else {
                 threadingOptions_ = value;
               }
    -          onChanged();
             } else {
               threadingOptionsBuilder_.mergeFrom(value);
             }
    -
    +        if (threadingOptions_ != null) {
    +          bitField0_ |= 0x00000100;
    +          onChanged();
    +        }
             return this;
           }
           /**
    @@ -9763,14 +9760,13 @@ public Builder mergeThreadingOptions(org.tensorflow.proto.data.DatasetOptions.Th
            * .tensorflow.data.ThreadingOptions threading_options = 5;
            */
           public Builder clearThreadingOptions() {
    -        if (threadingOptionsBuilder_ == null) {
    -          threadingOptions_ = null;
    -          onChanged();
    -        } else {
    -          threadingOptions_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000100);
    +        threadingOptions_ = null;
    +        if (threadingOptionsBuilder_ != null) {
    +          threadingOptionsBuilder_.dispose();
               threadingOptionsBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
    @@ -9781,7 +9777,7 @@ public Builder clearThreadingOptions() {
            * .tensorflow.data.ThreadingOptions threading_options = 5;
            */
           public org.tensorflow.proto.data.DatasetOptions.ThreadingOptions.Builder getThreadingOptionsBuilder() {
    -        
    +        bitField0_ |= 0x00000100;
             onChanged();
             return getThreadingOptionsFieldBuilder().getBuilder();
           }
    @@ -9807,11 +9803,11 @@ public org.tensorflow.proto.data.DatasetOptions.ThreadingOptionsOrBuilder getThr
            *
            * .tensorflow.data.ThreadingOptions threading_options = 5;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.data.DatasetOptions.ThreadingOptions, org.tensorflow.proto.data.DatasetOptions.ThreadingOptions.Builder, org.tensorflow.proto.data.DatasetOptions.ThreadingOptionsOrBuilder> 
               getThreadingOptionsFieldBuilder() {
             if (threadingOptionsBuilder_ == null) {
    -          threadingOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          threadingOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.data.DatasetOptions.ThreadingOptions, org.tensorflow.proto.data.DatasetOptions.ThreadingOptions.Builder, org.tensorflow.proto.data.DatasetOptions.ThreadingOptionsOrBuilder>(
                       getThreadingOptions(),
                       getParentForChildren(),
    @@ -9858,8 +9854,7 @@ public Builder setExternalStatePolicyValue(int value) {
           @java.lang.Override
           public org.tensorflow.proto.data.DatasetOptions.ExternalStatePolicy getExternalStatePolicy() {
             if (optionalExternalStatePolicyCase_ == 6) {
    -          @SuppressWarnings("deprecation")
    -          org.tensorflow.proto.data.DatasetOptions.ExternalStatePolicy result = org.tensorflow.proto.data.DatasetOptions.ExternalStatePolicy.valueOf(
    +          org.tensorflow.proto.data.DatasetOptions.ExternalStatePolicy result = org.tensorflow.proto.data.DatasetOptions.ExternalStatePolicy.forNumber(
                   (java.lang.Integer) optionalExternalStatePolicy_);
               return result == null ? org.tensorflow.proto.data.DatasetOptions.ExternalStatePolicy.UNRECOGNIZED : result;
             }
    @@ -9915,6 +9910,7 @@ public boolean getSymbolicCheckpoint() {
            * @return This builder for chaining.
            */
           public Builder setSymbolicCheckpoint(boolean value) {
    +
             optionalSymbolicCheckpointCase_ = 8;
             optionalSymbolicCheckpoint_ = value;
             onChanged();
    @@ -9956,6 +9952,7 @@ public boolean getWarmStart() {
            * @return This builder for chaining.
            */
           public Builder setWarmStart(boolean value) {
    +
             optionalWarmStartCase_ = 9;
             optionalWarmStart_ = value;
             onChanged();
    @@ -9973,18 +9970,6 @@ public Builder clearWarmStart() {
             }
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.data.Options)
         }
    @@ -10040,37 +10025,37 @@ public org.tensorflow.proto.data.DatasetOptions.Options getDefaultInstanceForTyp
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_data_AutotuneOptions_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_data_AutotuneOptions_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_data_CardinalityOptions_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_data_CardinalityOptions_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_data_DistributeOptions_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_data_DistributeOptions_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_data_OptimizationOptions_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_data_OptimizationOptions_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_data_ServiceOptions_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_data_ServiceOptions_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_data_ThreadingOptions_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_data_ThreadingOptions_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_data_Options_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_data_Options_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -10083,74 +10068,75 @@ public org.tensorflow.proto.data.DatasetOptions.Options getDefaultInstanceForTyp
         java.lang.String[] descriptorData = {
           "\n/tensorflow/core/framework/dataset_opti" +
           "ons.proto\022\017tensorflow.data\032%tensorflow/c" +
    -      "ore/framework/model.proto\"\270\002\n\017AutotuneOp" +
    +      "ore/framework/model.proto\"\357\002\n\017AutotuneOp" +
           "tions\022\021\n\007enabled\030\001 \001(\010H\000\022\024\n\ncpu_budget\030\002" +
           " \001(\005H\001\022\024\n\nram_budget\030\003 \001(\003H\002\022F\n\022autotune" +
           "_algorithm\030\004 \001(\0162(.tensorflow.data.model" +
           ".AutotuneAlgorithmH\003\022\035\n\023initial_parallel" +
    -      "ism\030\005 \001(\003H\004B\022\n\020optional_enabledB\025\n\023optio" +
    -      "nal_cpu_budgetB\025\n\023optional_ram_budgetB\035\n" +
    -      "\033optional_autotune_algorithmB\036\n\034optional" +
    -      "_initial_parallelism\"\321\001\n\022CardinalityOpti" +
    -      "ons\022G\n\rcompute_level\030\001 \001(\01620.tensorflow." +
    -      "data.CardinalityOptions.ComputeLevel\"r\n\014" +
    -      "ComputeLevel\022#\n\037CARDINALITY_COMPUTE_UNSP" +
    -      "ECIFIED\020\000\022\033\n\027CARDINALITY_COMPUTE_LOW\020\001\022 " +
    -      "\n\034CARDINALITY_COMPUTE_MODERATE\020\002\"\177\n\021Dist" +
    -      "ributeOptions\022;\n\021auto_shard_policy\030\001 \001(\016" +
    -      "2 .tensorflow.data.AutoShardPolicy\022\025\n\013nu" +
    -      "m_devices\030\002 \001(\005H\000B\026\n\024optional_num_device" +
    -      "s\"\271\006\n\023OptimizationOptions\022%\n\033apply_defau" +
    -      "lt_optimizations\030\001 \001(\010H\000\022\027\n\rfilter_fusio" +
    -      "n\030\006 \001(\010H\001\022\036\n\024map_and_batch_fusion\030\t \001(\010H" +
    -      "\002\022\037\n\025map_and_filter_fusion\030\n \001(\010H\003\022\024\n\nma" +
    -      "p_fusion\030\013 \001(\010H\004\022\035\n\023map_parallelization\030" +
    -      "\014 \001(\010H\005\022\032\n\020noop_elimination\030\016 \001(\010H\006\022\030\n\016p" +
    -      "arallel_batch\030\017 \001(\010H\007\022#\n\031shuffle_and_rep" +
    -      "eat_fusion\030\021 \001(\010H\010\022 \n\026filter_paralleliza" +
    -      "tion\030\022 \001(\010H\t\022\031\n\017inject_prefetch\030\023 \001(\010H\n\022" +
    -      "!\n\027seq_interleave_prefetch\030\025 \001(\010H\013B&\n$op" +
    -      "tional_apply_default_optimizationsB\030\n\026op" +
    -      "tional_filter_fusionB\037\n\035optional_map_and" +
    -      "_batch_fusionB \n\036optional_map_and_filter" +
    -      "_fusionB\025\n\023optional_map_fusionB\036\n\034option" +
    -      "al_map_parallelizationB\033\n\031optional_noop_" +
    -      "eliminationB\031\n\027optional_parallel_batchB$" +
    -      "\n\"optional_shuffle_and_repeat_fusionB!\n\037" +
    -      "optional_filter_parallelizationB\032\n\030optio" +
    -      "nal_inject_prefetchB\"\n optional_seq_inte" +
    -      "rleave_prefetchJ\004\010\002\020\003J\004\010\003\020\004J\004\010\004\020\005J\004\010\005\020\006J" +
    -      "\004\010\007\020\010J\004\010\010\020\tJ\004\010\r\020\016J\004\010\020\020\021J\004\010\024\020\025\"5\n\016Service" +
    -      "Options\022\020\n\006pinned\030\001 \001(\010H\000B\021\n\017optional_pi" +
    -      "nned\"\242\001\n\020ThreadingOptions\022\"\n\030max_intra_o" +
    -      "p_parallelism\030\001 \001(\005H\000\022!\n\027private_threadp" +
    -      "ool_size\030\002 \001(\005H\001B#\n!optional_max_intra_o" +
    -      "p_parallelismB\"\n optional_private_thread" +
    -      "pool_size\"\265\005\n\007Options\022\026\n\014dataset_name\030\n " +
    -      "\001(\tH\000\022\026\n\016framework_type\030\013 \003(\t\022\027\n\rdetermi" +
    -      "nistic\030\001 \001(\010H\001\022:\n\020autotune_options\030\007 \001(\013" +
    -      "2 .tensorflow.data.AutotuneOptions\022>\n\022di" +
    -      "stribute_options\030\002 \001(\0132\".tensorflow.data" +
    -      ".DistributeOptions\022B\n\024optimization_optio" +
    -      "ns\030\003 \001(\0132$.tensorflow.data.OptimizationO" +
    -      "ptions\0228\n\017service_options\030\014 \001(\0132\037.tensor" +
    -      "flow.data.ServiceOptions\022\017\n\005slack\030\004 \001(\010H" +
    -      "\002\022<\n\021threading_options\030\005 \001(\0132!.tensorflo" +
    -      "w.data.ThreadingOptions\022E\n\025external_stat" +
    -      "e_policy\030\006 \001(\0162$.tensorflow.data.Externa" +
    -      "lStatePolicyH\003\022\035\n\023symbolic_checkpoint\030\010 " +
    -      "\001(\010H\004\022\024\n\nwarm_start\030\t \001(\010H\005B\027\n\025optional_" +
    -      "dataset_nameB\030\n\026optional_deterministicB\020" +
    -      "\n\016optional_slackB \n\036optional_external_st" +
    -      "ate_policyB\036\n\034optional_symbolic_checkpoi" +
    -      "ntB\025\n\023optional_warm_start*K\n\017AutoShardPo" +
    -      "licy\022\010\n\004AUTO\020\000\022\010\n\004FILE\020\001\022\010\n\004DATA\020\002\022\010\n\004HI" +
    -      "NT\020\003\022\020\n\003OFF\020\377\377\377\377\377\377\377\377\377\001*J\n\023ExternalStateP" +
    -      "olicy\022\017\n\013POLICY_WARN\020\000\022\021\n\rPOLICY_IGNORE\020" +
    -      "\001\022\017\n\013POLICY_FAIL\020\002Bs\n\031org.tensorflow.pro" +
    -      "to.dataZVgithub.com/tensorflow/tensorflo" +
    -      "w/tensorflow/go/core/framework/dataset_o" +
    -      "ptions_go_protob\006proto3"
    +      "ism\030\005 \001(\003H\004\022\031\n\017min_parallelism\030\006 \001(\003H\005B\022" +
    +      "\n\020optional_enabledB\025\n\023optional_cpu_budge" +
    +      "tB\025\n\023optional_ram_budgetB\035\n\033optional_aut" +
    +      "otune_algorithmB\036\n\034optional_initial_para" +
    +      "llelismB\032\n\030optional_min_parallelism\"\321\001\n\022" +
    +      "CardinalityOptions\022G\n\rcompute_level\030\001 \001(" +
    +      "\01620.tensorflow.data.CardinalityOptions.C" +
    +      "omputeLevel\"r\n\014ComputeLevel\022#\n\037CARDINALI" +
    +      "TY_COMPUTE_UNSPECIFIED\020\000\022\033\n\027CARDINALITY_" +
    +      "COMPUTE_LOW\020\001\022 \n\034CARDINALITY_COMPUTE_MOD" +
    +      "ERATE\020\002\"\177\n\021DistributeOptions\022;\n\021auto_sha" +
    +      "rd_policy\030\001 \001(\0162 .tensorflow.data.AutoSh" +
    +      "ardPolicy\022\025\n\013num_devices\030\002 \001(\005H\000B\026\n\024opti" +
    +      "onal_num_devices\"\271\006\n\023OptimizationOptions" +
    +      "\022%\n\033apply_default_optimizations\030\001 \001(\010H\000\022" +
    +      "\027\n\rfilter_fusion\030\006 \001(\010H\001\022\036\n\024map_and_batc" +
    +      "h_fusion\030\t \001(\010H\002\022\037\n\025map_and_filter_fusio" +
    +      "n\030\n \001(\010H\003\022\024\n\nmap_fusion\030\013 \001(\010H\004\022\035\n\023map_p" +
    +      "arallelization\030\014 \001(\010H\005\022\032\n\020noop_eliminati" +
    +      "on\030\016 \001(\010H\006\022\030\n\016parallel_batch\030\017 \001(\010H\007\022#\n\031" +
    +      "shuffle_and_repeat_fusion\030\021 \001(\010H\010\022 \n\026fil" +
    +      "ter_parallelization\030\022 \001(\010H\t\022\031\n\017inject_pr" +
    +      "efetch\030\023 \001(\010H\n\022!\n\027seq_interleave_prefetc" +
    +      "h\030\025 \001(\010H\013B&\n$optional_apply_default_opti" +
    +      "mizationsB\030\n\026optional_filter_fusionB\037\n\035o" +
    +      "ptional_map_and_batch_fusionB \n\036optional" +
    +      "_map_and_filter_fusionB\025\n\023optional_map_f" +
    +      "usionB\036\n\034optional_map_parallelizationB\033\n" +
    +      "\031optional_noop_eliminationB\031\n\027optional_p" +
    +      "arallel_batchB$\n\"optional_shuffle_and_re" +
    +      "peat_fusionB!\n\037optional_filter_paralleli" +
    +      "zationB\032\n\030optional_inject_prefetchB\"\n op" +
    +      "tional_seq_interleave_prefetchJ\004\010\002\020\003J\004\010\003" +
    +      "\020\004J\004\010\004\020\005J\004\010\005\020\006J\004\010\007\020\010J\004\010\010\020\tJ\004\010\r\020\016J\004\010\020\020\021J\004" +
    +      "\010\024\020\025\"5\n\016ServiceOptions\022\020\n\006pinned\030\001 \001(\010H\000" +
    +      "B\021\n\017optional_pinned\"\242\001\n\020ThreadingOptions" +
    +      "\022\"\n\030max_intra_op_parallelism\030\001 \001(\005H\000\022!\n\027" +
    +      "private_threadpool_size\030\002 \001(\005H\001B#\n!optio" +
    +      "nal_max_intra_op_parallelismB\"\n optional" +
    +      "_private_threadpool_size\"\265\005\n\007Options\022\026\n\014" +
    +      "dataset_name\030\n \001(\tH\000\022\026\n\016framework_type\030\013" +
    +      " \003(\t\022\027\n\rdeterministic\030\001 \001(\010H\001\022:\n\020autotun" +
    +      "e_options\030\007 \001(\0132 .tensorflow.data.Autotu" +
    +      "neOptions\022>\n\022distribute_options\030\002 \001(\0132\"." +
    +      "tensorflow.data.DistributeOptions\022B\n\024opt" +
    +      "imization_options\030\003 \001(\0132$.tensorflow.dat" +
    +      "a.OptimizationOptions\0228\n\017service_options" +
    +      "\030\014 \001(\0132\037.tensorflow.data.ServiceOptions\022" +
    +      "\017\n\005slack\030\004 \001(\010H\002\022<\n\021threading_options\030\005 " +
    +      "\001(\0132!.tensorflow.data.ThreadingOptions\022E" +
    +      "\n\025external_state_policy\030\006 \001(\0162$.tensorfl" +
    +      "ow.data.ExternalStatePolicyH\003\022\035\n\023symboli" +
    +      "c_checkpoint\030\010 \001(\010H\004\022\024\n\nwarm_start\030\t \001(\010" +
    +      "H\005B\027\n\025optional_dataset_nameB\030\n\026optional_" +
    +      "deterministicB\020\n\016optional_slackB \n\036optio" +
    +      "nal_external_state_policyB\036\n\034optional_sy" +
    +      "mbolic_checkpointB\025\n\023optional_warm_start" +
    +      "*K\n\017AutoShardPolicy\022\010\n\004AUTO\020\000\022\010\n\004FILE\020\001\022" +
    +      "\010\n\004DATA\020\002\022\010\n\004HINT\020\003\022\020\n\003OFF\020\377\377\377\377\377\377\377\377\377\001*J\n" +
    +      "\023ExternalStatePolicy\022\017\n\013POLICY_WARN\020\000\022\021\n" +
    +      "\rPOLICY_IGNORE\020\001\022\017\n\013POLICY_FAIL\020\002Bs\n\031org" +
    +      ".tensorflow.proto.dataZVgithub.com/tenso" +
    +      "rflow/tensorflow/tensorflow/go/core/fram" +
    +      "ework/dataset_options_go_protob\006proto3"
         };
         descriptor = com.google.protobuf.Descriptors.FileDescriptor
           .internalBuildGeneratedFileFrom(descriptorData,
    @@ -10160,45 +10146,46 @@ public org.tensorflow.proto.data.DatasetOptions.Options getDefaultInstanceForTyp
         internal_static_tensorflow_data_AutotuneOptions_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_data_AutotuneOptions_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_data_AutotuneOptions_descriptor,
    -        new java.lang.String[] { "Enabled", "CpuBudget", "RamBudget", "AutotuneAlgorithm", "InitialParallelism", "OptionalEnabled", "OptionalCpuBudget", "OptionalRamBudget", "OptionalAutotuneAlgorithm", "OptionalInitialParallelism", });
    +        new java.lang.String[] { "Enabled", "CpuBudget", "RamBudget", "AutotuneAlgorithm", "InitialParallelism", "MinParallelism", "OptionalEnabled", "OptionalCpuBudget", "OptionalRamBudget", "OptionalAutotuneAlgorithm", "OptionalInitialParallelism", "OptionalMinParallelism", });
         internal_static_tensorflow_data_CardinalityOptions_descriptor =
           getDescriptor().getMessageTypes().get(1);
         internal_static_tensorflow_data_CardinalityOptions_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_data_CardinalityOptions_descriptor,
             new java.lang.String[] { "ComputeLevel", });
         internal_static_tensorflow_data_DistributeOptions_descriptor =
           getDescriptor().getMessageTypes().get(2);
         internal_static_tensorflow_data_DistributeOptions_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_data_DistributeOptions_descriptor,
             new java.lang.String[] { "AutoShardPolicy", "NumDevices", "OptionalNumDevices", });
         internal_static_tensorflow_data_OptimizationOptions_descriptor =
           getDescriptor().getMessageTypes().get(3);
         internal_static_tensorflow_data_OptimizationOptions_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_data_OptimizationOptions_descriptor,
             new java.lang.String[] { "ApplyDefaultOptimizations", "FilterFusion", "MapAndBatchFusion", "MapAndFilterFusion", "MapFusion", "MapParallelization", "NoopElimination", "ParallelBatch", "ShuffleAndRepeatFusion", "FilterParallelization", "InjectPrefetch", "SeqInterleavePrefetch", "OptionalApplyDefaultOptimizations", "OptionalFilterFusion", "OptionalMapAndBatchFusion", "OptionalMapAndFilterFusion", "OptionalMapFusion", "OptionalMapParallelization", "OptionalNoopElimination", "OptionalParallelBatch", "OptionalShuffleAndRepeatFusion", "OptionalFilterParallelization", "OptionalInjectPrefetch", "OptionalSeqInterleavePrefetch", });
         internal_static_tensorflow_data_ServiceOptions_descriptor =
           getDescriptor().getMessageTypes().get(4);
         internal_static_tensorflow_data_ServiceOptions_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_data_ServiceOptions_descriptor,
             new java.lang.String[] { "Pinned", "OptionalPinned", });
         internal_static_tensorflow_data_ThreadingOptions_descriptor =
           getDescriptor().getMessageTypes().get(5);
         internal_static_tensorflow_data_ThreadingOptions_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_data_ThreadingOptions_descriptor,
             new java.lang.String[] { "MaxIntraOpParallelism", "PrivateThreadpoolSize", "OptionalMaxIntraOpParallelism", "OptionalPrivateThreadpoolSize", });
         internal_static_tensorflow_data_Options_descriptor =
           getDescriptor().getMessageTypes().get(6);
         internal_static_tensorflow_data_Options_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_data_Options_descriptor,
             new java.lang.String[] { "DatasetName", "FrameworkType", "Deterministic", "AutotuneOptions", "DistributeOptions", "OptimizationOptions", "ServiceOptions", "Slack", "ThreadingOptions", "ExternalStatePolicy", "SymbolicCheckpoint", "WarmStart", "OptionalDatasetName", "OptionalDeterministic", "OptionalSlack", "OptionalExternalStatePolicy", "OptionalSymbolicCheckpoint", "OptionalWarmStart", });
    +    descriptor.resolveAllFeaturesImmutable();
         org.tensorflow.proto.data.model.Model.getDescriptor();
       }
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/experimental/ServiceConfig.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/experimental/ServiceConfig.java
    index de029b2baa5..1da009dbcf5 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/experimental/ServiceConfig.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/experimental/ServiceConfig.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/service_config.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto.data.experimental;
     
     public final class ServiceConfig {
       private ServiceConfig() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      ServiceConfig.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -241,40 +252,38 @@ public interface DispatcherConfigOrBuilder extends
        * Protobuf type {@code tensorflow.data.experimental.DispatcherConfig}
        */
       public static final class DispatcherConfig extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.data.experimental.DispatcherConfig)
           DispatcherConfigOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        DispatcherConfig.class.getName());
    +    }
         // Use DispatcherConfig.newBuilder() to construct.
    -    private DispatcherConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private DispatcherConfig(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private DispatcherConfig() {
           protocol_ = "";
           workDir_ = "";
    -      workerAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +      workerAddresses_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
           deploymentMode_ = 0;
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new DispatcherConfig();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.data.experimental.ServiceConfig.internal_static_tensorflow_data_experimental_DispatcherConfig_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.data.experimental.ServiceConfig.internal_static_tensorflow_data_experimental_DispatcherConfig_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -282,7 +291,7 @@ protected java.lang.Object newInstance(
         }
     
         public static final int PORT_FIELD_NUMBER = 1;
    -    private long port_;
    +    private long port_ = 0L;
         /**
          * 
          * The port for the dispatcher to bind to. A value of 0 indicates that the
    @@ -298,7 +307,8 @@ public long getPort() {
         }
     
         public static final int PROTOCOL_FIELD_NUMBER = 2;
    -    private volatile java.lang.Object protocol_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object protocol_ = "";
         /**
          * 
          * The protocol for the dispatcher to use when connecting to workers.
    @@ -344,7 +354,8 @@ public java.lang.String getProtocol() {
         }
     
         public static final int WORK_DIR_FIELD_NUMBER = 3;
    -    private volatile java.lang.Object workDir_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object workDir_ = "";
         /**
          * 
          * A work directory to use for storing dispatcher state, and for recovering
    @@ -392,7 +403,7 @@ public java.lang.String getWorkDir() {
         }
     
         public static final int FAULT_TOLERANT_MODE_FIELD_NUMBER = 4;
    -    private boolean faultTolerantMode_;
    +    private boolean faultTolerantMode_ = false;
         /**
          * 
          * Whether to run in fault tolerant mode, where dispatcher state is saved
    @@ -408,7 +419,9 @@ public boolean getFaultTolerantMode() {
         }
     
         public static final int WORKER_ADDRESSES_FIELD_NUMBER = 7;
    -    private com.google.protobuf.LazyStringList workerAddresses_;
    +    @SuppressWarnings("serial")
    +    private com.google.protobuf.LazyStringArrayList workerAddresses_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         /**
          * 
          * (Optional.) If the job uses auto-sharding, it needs to specify a fixed list
    @@ -471,7 +484,7 @@ public java.lang.String getWorkerAddresses(int index) {
         }
     
         public static final int DEPLOYMENT_MODE_FIELD_NUMBER = 9;
    -    private int deploymentMode_;
    +    private int deploymentMode_ = 0;
         /**
          * 
          * (Optional.) tf.data service deployment mode. Supported values are "REMOTE",
    @@ -494,13 +507,12 @@ public java.lang.String getWorkerAddresses(int index) {
          * @return The deploymentMode.
          */
         @java.lang.Override public org.tensorflow.proto.data.DataService.DeploymentMode getDeploymentMode() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.data.DataService.DeploymentMode result = org.tensorflow.proto.data.DataService.DeploymentMode.valueOf(deploymentMode_);
    +      org.tensorflow.proto.data.DataService.DeploymentMode result = org.tensorflow.proto.data.DataService.DeploymentMode.forNumber(deploymentMode_);
           return result == null ? org.tensorflow.proto.data.DataService.DeploymentMode.UNRECOGNIZED : result;
         }
     
         public static final int JOB_GC_CHECK_INTERVAL_MS_FIELD_NUMBER = 5;
    -    private long jobGcCheckIntervalMs_;
    +    private long jobGcCheckIntervalMs_ = 0L;
         /**
          * 
          * How often the dispatcher should scan through to delete old and unused
    @@ -517,7 +529,7 @@ public long getJobGcCheckIntervalMs() {
         }
     
         public static final int JOB_GC_TIMEOUT_MS_FIELD_NUMBER = 6;
    -    private long jobGcTimeoutMs_;
    +    private long jobGcTimeoutMs_ = 0L;
         /**
          * 
          * How long a job needs to be unused before it becomes a candidate for garbage
    @@ -536,7 +548,7 @@ public long getJobGcTimeoutMs() {
         }
     
         public static final int GC_DYNAMIC_SHARDING_JOBS_FIELD_NUMBER = 11;
    -    private boolean gcDynamicShardingJobs_;
    +    private boolean gcDynamicShardingJobs_ = false;
         /**
          * 
          * Whether dynamically sharded jobs should be eligible for garbage collection.
    @@ -555,7 +567,7 @@ public boolean getGcDynamicShardingJobs() {
         }
     
         public static final int CLIENT_TIMEOUT_MS_FIELD_NUMBER = 8;
    -    private long clientTimeoutMs_;
    +    private long clientTimeoutMs_ = 0L;
         /**
          * 
          * How long to wait before garbage-collecting a client that hasn't
    @@ -572,7 +584,7 @@ public long getClientTimeoutMs() {
         }
     
         public static final int WORKER_TIMEOUT_MS_FIELD_NUMBER = 10;
    -    private long workerTimeoutMs_;
    +    private long workerTimeoutMs_ = 0L;
         /**
          * 
          * How long to wait for a worker to heartbeat before considering it missing.
    @@ -588,7 +600,7 @@ public long getWorkerTimeoutMs() {
         }
     
         public static final int WORKER_MAX_CONCURRENT_SNAPSHOTS_FIELD_NUMBER = 12;
    -    private long workerMaxConcurrentSnapshots_;
    +    private long workerMaxConcurrentSnapshots_ = 0L;
         /**
          * 
          * The maximum number of snapshots that a worker can concurrently process at a
    @@ -622,11 +634,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           if (port_ != 0L) {
             output.writeInt64(1, port_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(protocol_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, protocol_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(protocol_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 2, protocol_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(workDir_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 3, workDir_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(workDir_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 3, workDir_);
           }
           if (faultTolerantMode_ != false) {
             output.writeBool(4, faultTolerantMode_);
    @@ -638,7 +650,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
             output.writeInt64(6, jobGcTimeoutMs_);
           }
           for (int i = 0; i < workerAddresses_.size(); i++) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 7, workerAddresses_.getRaw(i));
    +        com.google.protobuf.GeneratedMessage.writeString(output, 7, workerAddresses_.getRaw(i));
           }
           if (clientTimeoutMs_ != 0L) {
             output.writeInt64(8, clientTimeoutMs_);
    @@ -668,11 +680,11 @@ public int getSerializedSize() {
             size += com.google.protobuf.CodedOutputStream
               .computeInt64Size(1, port_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(protocol_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, protocol_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(protocol_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, protocol_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(workDir_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, workDir_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(workDir_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(3, workDir_);
           }
           if (faultTolerantMode_ != false) {
             size += com.google.protobuf.CodedOutputStream
    @@ -836,39 +848,41 @@ public static org.tensorflow.proto.data.experimental.ServiceConfig.DispatcherCon
         }
         public static org.tensorflow.proto.data.experimental.ServiceConfig.DispatcherConfig parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.experimental.ServiceConfig.DispatcherConfig parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.data.experimental.ServiceConfig.DispatcherConfig parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.data.experimental.ServiceConfig.DispatcherConfig parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.data.experimental.ServiceConfig.DispatcherConfig parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.experimental.ServiceConfig.DispatcherConfig parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -888,7 +902,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -901,7 +915,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.data.experimental.DispatcherConfig}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.data.experimental.DispatcherConfig)
             org.tensorflow.proto.data.experimental.ServiceConfig.DispatcherConfigOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -910,7 +924,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.data.experimental.ServiceConfig.internal_static_tensorflow_data_experimental_DispatcherConfig_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -923,37 +937,27 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             port_ = 0L;
    -
             protocol_ = "";
    -
             workDir_ = "";
    -
             faultTolerantMode_ = false;
    -
    -        workerAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        workerAddresses_ =
    +            com.google.protobuf.LazyStringArrayList.emptyList();
             deploymentMode_ = 0;
    -
             jobGcCheckIntervalMs_ = 0L;
    -
             jobGcTimeoutMs_ = 0L;
    -
             gcDynamicShardingJobs_ = false;
    -
             clientTimeoutMs_ = 0L;
    -
             workerTimeoutMs_ = 0L;
    -
             workerMaxConcurrentSnapshots_ = 0L;
    -
             return this;
           }
     
    @@ -980,59 +984,52 @@ public org.tensorflow.proto.data.experimental.ServiceConfig.DispatcherConfig bui
           @java.lang.Override
           public org.tensorflow.proto.data.experimental.ServiceConfig.DispatcherConfig buildPartial() {
             org.tensorflow.proto.data.experimental.ServiceConfig.DispatcherConfig result = new org.tensorflow.proto.data.experimental.ServiceConfig.DispatcherConfig(this);
    -        int from_bitField0_ = bitField0_;
    -        result.port_ = port_;
    -        result.protocol_ = protocol_;
    -        result.workDir_ = workDir_;
    -        result.faultTolerantMode_ = faultTolerantMode_;
    -        if (((bitField0_ & 0x00000001) != 0)) {
    -          workerAddresses_ = workerAddresses_.getUnmodifiableView();
    -          bitField0_ = (bitField0_ & ~0x00000001);
    -        }
    -        result.workerAddresses_ = workerAddresses_;
    -        result.deploymentMode_ = deploymentMode_;
    -        result.jobGcCheckIntervalMs_ = jobGcCheckIntervalMs_;
    -        result.jobGcTimeoutMs_ = jobGcTimeoutMs_;
    -        result.gcDynamicShardingJobs_ = gcDynamicShardingJobs_;
    -        result.clientTimeoutMs_ = clientTimeoutMs_;
    -        result.workerTimeoutMs_ = workerTimeoutMs_;
    -        result.workerMaxConcurrentSnapshots_ = workerMaxConcurrentSnapshots_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.data.experimental.ServiceConfig.DispatcherConfig result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.port_ = port_;
    +        }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.protocol_ = protocol_;
    +        }
    +        if (((from_bitField0_ & 0x00000004) != 0)) {
    +          result.workDir_ = workDir_;
    +        }
    +        if (((from_bitField0_ & 0x00000008) != 0)) {
    +          result.faultTolerantMode_ = faultTolerantMode_;
    +        }
    +        if (((from_bitField0_ & 0x00000010) != 0)) {
    +          workerAddresses_.makeImmutable();
    +          result.workerAddresses_ = workerAddresses_;
    +        }
    +        if (((from_bitField0_ & 0x00000020) != 0)) {
    +          result.deploymentMode_ = deploymentMode_;
    +        }
    +        if (((from_bitField0_ & 0x00000040) != 0)) {
    +          result.jobGcCheckIntervalMs_ = jobGcCheckIntervalMs_;
    +        }
    +        if (((from_bitField0_ & 0x00000080) != 0)) {
    +          result.jobGcTimeoutMs_ = jobGcTimeoutMs_;
    +        }
    +        if (((from_bitField0_ & 0x00000100) != 0)) {
    +          result.gcDynamicShardingJobs_ = gcDynamicShardingJobs_;
    +        }
    +        if (((from_bitField0_ & 0x00000200) != 0)) {
    +          result.clientTimeoutMs_ = clientTimeoutMs_;
    +        }
    +        if (((from_bitField0_ & 0x00000400) != 0)) {
    +          result.workerTimeoutMs_ = workerTimeoutMs_;
    +        }
    +        if (((from_bitField0_ & 0x00000800) != 0)) {
    +          result.workerMaxConcurrentSnapshots_ = workerMaxConcurrentSnapshots_;
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.data.experimental.ServiceConfig.DispatcherConfig) {
    @@ -1050,10 +1047,12 @@ public Builder mergeFrom(org.tensorflow.proto.data.experimental.ServiceConfig.Di
             }
             if (!other.getProtocol().isEmpty()) {
               protocol_ = other.protocol_;
    +          bitField0_ |= 0x00000002;
               onChanged();
             }
             if (!other.getWorkDir().isEmpty()) {
               workDir_ = other.workDir_;
    +          bitField0_ |= 0x00000004;
               onChanged();
             }
             if (other.getFaultTolerantMode() != false) {
    @@ -1062,7 +1061,7 @@ public Builder mergeFrom(org.tensorflow.proto.data.experimental.ServiceConfig.Di
             if (!other.workerAddresses_.isEmpty()) {
               if (workerAddresses_.isEmpty()) {
                 workerAddresses_ = other.workerAddresses_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ |= 0x00000010;
               } else {
                 ensureWorkerAddressesIsMutable();
                 workerAddresses_.addAll(other.workerAddresses_);
    @@ -1118,32 +1117,32 @@ public Builder mergeFrom(
                     break;
                   case 8: {
                     port_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 8
                   case 18: {
                     protocol_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 18
                   case 26: {
                     workDir_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000004;
                     break;
                   } // case 26
                   case 32: {
                     faultTolerantMode_ = input.readBool();
    -
    +                bitField0_ |= 0x00000008;
                     break;
                   } // case 32
                   case 40: {
                     jobGcCheckIntervalMs_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000040;
                     break;
                   } // case 40
                   case 48: {
                     jobGcTimeoutMs_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000080;
                     break;
                   } // case 48
                   case 58: {
    @@ -1154,27 +1153,27 @@ public Builder mergeFrom(
                   } // case 58
                   case 64: {
                     clientTimeoutMs_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000200;
                     break;
                   } // case 64
                   case 72: {
                     deploymentMode_ = input.readEnum();
    -
    +                bitField0_ |= 0x00000020;
                     break;
                   } // case 72
                   case 80: {
                     workerTimeoutMs_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000400;
                     break;
                   } // case 80
                   case 88: {
                     gcDynamicShardingJobs_ = input.readBool();
    -
    +                bitField0_ |= 0x00000100;
                     break;
                   } // case 88
                   case 96: {
                     workerMaxConcurrentSnapshots_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000800;
                     break;
                   } // case 96
                   default: {
    @@ -1219,8 +1218,9 @@ public long getPort() {
            * @return This builder for chaining.
            */
           public Builder setPort(long value) {
    -        
    +
             port_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -1234,7 +1234,7 @@ public Builder setPort(long value) {
            * @return This builder for chaining.
            */
           public Builder clearPort() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000001);
             port_ = 0L;
             onChanged();
             return this;
    @@ -1293,11 +1293,9 @@ public java.lang.String getProtocol() {
            */
           public Builder setProtocol(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             protocol_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -1310,8 +1308,8 @@ public Builder setProtocol(
            * @return This builder for chaining.
            */
           public Builder clearProtocol() {
    -        
             protocol_ = getDefaultInstance().getProtocol();
    +        bitField0_ = (bitField0_ & ~0x00000002);
             onChanged();
             return this;
           }
    @@ -1326,12 +1324,10 @@ public Builder clearProtocol() {
            */
           public Builder setProtocolBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             protocol_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -1392,11 +1388,9 @@ public java.lang.String getWorkDir() {
            */
           public Builder setWorkDir(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             workDir_ = value;
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -1410,8 +1404,8 @@ public Builder setWorkDir(
            * @return This builder for chaining.
            */
           public Builder clearWorkDir() {
    -        
             workDir_ = getDefaultInstance().getWorkDir();
    +        bitField0_ = (bitField0_ & ~0x00000004);
             onChanged();
             return this;
           }
    @@ -1427,12 +1421,10 @@ public Builder clearWorkDir() {
            */
           public Builder setWorkDirBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             workDir_ = value;
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -1462,8 +1454,9 @@ public boolean getFaultTolerantMode() {
            * @return This builder for chaining.
            */
           public Builder setFaultTolerantMode(boolean value) {
    -        
    +
             faultTolerantMode_ = value;
    +        bitField0_ |= 0x00000008;
             onChanged();
             return this;
           }
    @@ -1477,18 +1470,19 @@ public Builder setFaultTolerantMode(boolean value) {
            * @return This builder for chaining.
            */
           public Builder clearFaultTolerantMode() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000008);
             faultTolerantMode_ = false;
             onChanged();
             return this;
           }
     
    -      private com.google.protobuf.LazyStringList workerAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +      private com.google.protobuf.LazyStringArrayList workerAddresses_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
           private void ensureWorkerAddressesIsMutable() {
    -        if (!((bitField0_ & 0x00000001) != 0)) {
    +        if (!workerAddresses_.isModifiable()) {
               workerAddresses_ = new com.google.protobuf.LazyStringArrayList(workerAddresses_);
    -          bitField0_ |= 0x00000001;
    -         }
    +        }
    +        bitField0_ |= 0x00000010;
           }
           /**
            * 
    @@ -1503,7 +1497,8 @@ private void ensureWorkerAddressesIsMutable() {
            */
           public com.google.protobuf.ProtocolStringList
               getWorkerAddressesList() {
    -        return workerAddresses_.getUnmodifiableView();
    +        workerAddresses_.makeImmutable();
    +        return workerAddresses_;
           }
           /**
            * 
    @@ -1565,11 +1560,10 @@ public java.lang.String getWorkerAddresses(int index) {
            */
           public Builder setWorkerAddresses(
               int index, java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureWorkerAddressesIsMutable();
    +        if (value == null) { throw new NullPointerException(); }
    +        ensureWorkerAddressesIsMutable();
             workerAddresses_.set(index, value);
    +        bitField0_ |= 0x00000010;
             onChanged();
             return this;
           }
    @@ -1587,11 +1581,10 @@ public Builder setWorkerAddresses(
            */
           public Builder addWorkerAddresses(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureWorkerAddressesIsMutable();
    +        if (value == null) { throw new NullPointerException(); }
    +        ensureWorkerAddressesIsMutable();
             workerAddresses_.add(value);
    +        bitField0_ |= 0x00000010;
             onChanged();
             return this;
           }
    @@ -1612,6 +1605,7 @@ public Builder addAllWorkerAddresses(
             ensureWorkerAddressesIsMutable();
             com.google.protobuf.AbstractMessageLite.Builder.addAll(
                 values, workerAddresses_);
    +        bitField0_ |= 0x00000010;
             onChanged();
             return this;
           }
    @@ -1627,8 +1621,9 @@ public Builder addAllWorkerAddresses(
            * @return This builder for chaining.
            */
           public Builder clearWorkerAddresses() {
    -        workerAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        workerAddresses_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
    +        bitField0_ = (bitField0_ & ~0x00000010);;
             onChanged();
             return this;
           }
    @@ -1646,12 +1641,11 @@ public Builder clearWorkerAddresses() {
            */
           public Builder addWorkerAddressesBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             ensureWorkerAddressesIsMutable();
             workerAddresses_.add(value);
    +        bitField0_ |= 0x00000010;
             onChanged();
             return this;
           }
    @@ -1680,8 +1674,8 @@ public Builder addWorkerAddressesBytes(
            * @return This builder for chaining.
            */
           public Builder setDeploymentModeValue(int value) {
    -        
             deploymentMode_ = value;
    +        bitField0_ |= 0x00000020;
             onChanged();
             return this;
           }
    @@ -1696,8 +1690,7 @@ public Builder setDeploymentModeValue(int value) {
            */
           @java.lang.Override
           public org.tensorflow.proto.data.DataService.DeploymentMode getDeploymentMode() {
    -        @SuppressWarnings("deprecation")
    -        org.tensorflow.proto.data.DataService.DeploymentMode result = org.tensorflow.proto.data.DataService.DeploymentMode.valueOf(deploymentMode_);
    +        org.tensorflow.proto.data.DataService.DeploymentMode result = org.tensorflow.proto.data.DataService.DeploymentMode.forNumber(deploymentMode_);
             return result == null ? org.tensorflow.proto.data.DataService.DeploymentMode.UNRECOGNIZED : result;
           }
           /**
    @@ -1714,7 +1707,7 @@ public Builder setDeploymentMode(org.tensorflow.proto.data.DataService.Deploymen
             if (value == null) {
               throw new NullPointerException();
             }
    -        
    +        bitField0_ |= 0x00000020;
             deploymentMode_ = value.getNumber();
             onChanged();
             return this;
    @@ -1729,7 +1722,7 @@ public Builder setDeploymentMode(org.tensorflow.proto.data.DataService.Deploymen
            * @return This builder for chaining.
            */
           public Builder clearDeploymentMode() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000020);
             deploymentMode_ = 0;
             onChanged();
             return this;
    @@ -1762,8 +1755,9 @@ public long getJobGcCheckIntervalMs() {
            * @return This builder for chaining.
            */
           public Builder setJobGcCheckIntervalMs(long value) {
    -        
    +
             jobGcCheckIntervalMs_ = value;
    +        bitField0_ |= 0x00000040;
             onChanged();
             return this;
           }
    @@ -1778,7 +1772,7 @@ public Builder setJobGcCheckIntervalMs(long value) {
            * @return This builder for chaining.
            */
           public Builder clearJobGcCheckIntervalMs() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000040);
             jobGcCheckIntervalMs_ = 0L;
             onChanged();
             return this;
    @@ -1815,8 +1809,9 @@ public long getJobGcTimeoutMs() {
            * @return This builder for chaining.
            */
           public Builder setJobGcTimeoutMs(long value) {
    -        
    +
             jobGcTimeoutMs_ = value;
    +        bitField0_ |= 0x00000080;
             onChanged();
             return this;
           }
    @@ -1833,7 +1828,7 @@ public Builder setJobGcTimeoutMs(long value) {
            * @return This builder for chaining.
            */
           public Builder clearJobGcTimeoutMs() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000080);
             jobGcTimeoutMs_ = 0L;
             onChanged();
             return this;
    @@ -1870,8 +1865,9 @@ public boolean getGcDynamicShardingJobs() {
            * @return This builder for chaining.
            */
           public Builder setGcDynamicShardingJobs(boolean value) {
    -        
    +
             gcDynamicShardingJobs_ = value;
    +        bitField0_ |= 0x00000100;
             onChanged();
             return this;
           }
    @@ -1888,7 +1884,7 @@ public Builder setGcDynamicShardingJobs(boolean value) {
            * @return This builder for chaining.
            */
           public Builder clearGcDynamicShardingJobs() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000100);
             gcDynamicShardingJobs_ = false;
             onChanged();
             return this;
    @@ -1921,8 +1917,9 @@ public long getClientTimeoutMs() {
            * @return This builder for chaining.
            */
           public Builder setClientTimeoutMs(long value) {
    -        
    +
             clientTimeoutMs_ = value;
    +        bitField0_ |= 0x00000200;
             onChanged();
             return this;
           }
    @@ -1937,7 +1934,7 @@ public Builder setClientTimeoutMs(long value) {
            * @return This builder for chaining.
            */
           public Builder clearClientTimeoutMs() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000200);
             clientTimeoutMs_ = 0L;
             onChanged();
             return this;
    @@ -1968,8 +1965,9 @@ public long getWorkerTimeoutMs() {
            * @return This builder for chaining.
            */
           public Builder setWorkerTimeoutMs(long value) {
    -        
    +
             workerTimeoutMs_ = value;
    +        bitField0_ |= 0x00000400;
             onChanged();
             return this;
           }
    @@ -1983,7 +1981,7 @@ public Builder setWorkerTimeoutMs(long value) {
            * @return This builder for chaining.
            */
           public Builder clearWorkerTimeoutMs() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000400);
             workerTimeoutMs_ = 0L;
             onChanged();
             return this;
    @@ -2018,8 +2016,9 @@ public long getWorkerMaxConcurrentSnapshots() {
            * @return This builder for chaining.
            */
           public Builder setWorkerMaxConcurrentSnapshots(long value) {
    -        
    +
             workerMaxConcurrentSnapshots_ = value;
    +        bitField0_ |= 0x00000800;
             onChanged();
             return this;
           }
    @@ -2035,23 +2034,11 @@ public Builder setWorkerMaxConcurrentSnapshots(long value) {
            * @return This builder for chaining.
            */
           public Builder clearWorkerMaxConcurrentSnapshots() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000800);
             workerMaxConcurrentSnapshots_ = 0L;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.data.experimental.DispatcherConfig)
         }
    @@ -2367,42 +2354,40 @@ public interface WorkerConfigOrBuilder extends
        * Protobuf type {@code tensorflow.data.experimental.WorkerConfig}
        */
       public static final class WorkerConfig extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.data.experimental.WorkerConfig)
           WorkerConfigOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        WorkerConfig.class.getName());
    +    }
         // Use WorkerConfig.newBuilder() to construct.
    -    private WorkerConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private WorkerConfig(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private WorkerConfig() {
           protocol_ = "";
           dispatcherAddress_ = "";
           workerAddress_ = "";
    -      workerTags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +      workerTags_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
           dataTransferProtocol_ = "";
           dataTransferAddress_ = "";
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new WorkerConfig();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.data.experimental.ServiceConfig.internal_static_tensorflow_data_experimental_WorkerConfig_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.data.experimental.ServiceConfig.internal_static_tensorflow_data_experimental_WorkerConfig_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -2410,7 +2395,7 @@ protected java.lang.Object newInstance(
         }
     
         public static final int PORT_FIELD_NUMBER = 1;
    -    private long port_;
    +    private long port_ = 0L;
         /**
          * 
          * The port for the worker to bind to. A value of 0 indicates that the
    @@ -2426,7 +2411,8 @@ public long getPort() {
         }
     
         public static final int PROTOCOL_FIELD_NUMBER = 2;
    -    private volatile java.lang.Object protocol_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object protocol_ = "";
         /**
          * 
          * The protocol for the worker to use when connecting to the dispatcher.
    @@ -2472,7 +2458,8 @@ public java.lang.String getProtocol() {
         }
     
         public static final int DISPATCHER_ADDRESS_FIELD_NUMBER = 3;
    -    private volatile java.lang.Object dispatcherAddress_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object dispatcherAddress_ = "";
         /**
          * 
          * The address of the dispatcher to register with.
    @@ -2518,7 +2505,8 @@ public java.lang.String getDispatcherAddress() {
         }
     
         public static final int WORKER_ADDRESS_FIELD_NUMBER = 4;
    -    private volatile java.lang.Object workerAddress_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object workerAddress_ = "";
         /**
          * 
          * The address of the worker server. The substring "%port%", if specified,
    @@ -2568,7 +2556,9 @@ public java.lang.String getWorkerAddress() {
         }
     
         public static final int WORKER_TAGS_FIELD_NUMBER = 10;
    -    private com.google.protobuf.LazyStringList workerTags_;
    +    @SuppressWarnings("serial")
    +    private com.google.protobuf.LazyStringArrayList workerTags_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         /**
          * 
          * Tags attached to the worker. This allows reading from selected workers.
    @@ -2631,7 +2621,7 @@ public java.lang.String getWorkerTags(int index) {
         }
     
         public static final int HEARTBEAT_INTERVAL_MS_FIELD_NUMBER = 5;
    -    private long heartbeatIntervalMs_;
    +    private long heartbeatIntervalMs_ = 0L;
         /**
          * 
          * How often the worker should heartbeat to the master. A value of 0 indicates
    @@ -2647,7 +2637,7 @@ public long getHeartbeatIntervalMs() {
         }
     
         public static final int DISPATCHER_TIMEOUT_MS_FIELD_NUMBER = 6;
    -    private long dispatcherTimeoutMs_;
    +    private long dispatcherTimeoutMs_ = 0L;
         /**
          * 
          * How long to retry requests to the dispatcher before giving up and reporting
    @@ -2664,7 +2654,8 @@ public long getDispatcherTimeoutMs() {
         }
     
         public static final int DATA_TRANSFER_PROTOCOL_FIELD_NUMBER = 7;
    -    private volatile java.lang.Object dataTransferProtocol_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object dataTransferProtocol_ = "";
         /**
          * 
          * If set, the name of an alternative data transfer protocol for which the
    @@ -2718,7 +2709,7 @@ public java.lang.String getDataTransferProtocol() {
         }
     
         public static final int DATA_TRANSFER_PORT_FIELD_NUMBER = 13;
    -    private long dataTransferPort_;
    +    private long dataTransferPort_ = 0L;
         /**
          * 
          * If `data_transfer_protocol` is set, the port to which the data transfer
    @@ -2734,7 +2725,8 @@ public long getDataTransferPort() {
         }
     
         public static final int DATA_TRANSFER_ADDRESS_FIELD_NUMBER = 8;
    -    private volatile java.lang.Object dataTransferAddress_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object dataTransferAddress_ = "";
         /**
          * 
          * If `data_transfer_protocol` is set, the address of the data transfer
    @@ -2786,7 +2778,7 @@ public java.lang.String getDataTransferAddress() {
         }
     
         public static final int CROSS_TRAINER_CACHE_SIZE_BYTES_FIELD_NUMBER = 11;
    -    private long crossTrainerCacheSizeBytes_;
    +    private long crossTrainerCacheSizeBytes_ = 0L;
         /**
          * 
          * Maximum size of the cross-trainer cache in bytes. If enabled, make sure
    @@ -2802,7 +2794,7 @@ public long getCrossTrainerCacheSizeBytes() {
         }
     
         public static final int SNAPSHOT_MAX_CHUNK_SIZE_BYTES_FIELD_NUMBER = 12;
    -    private long snapshotMaxChunkSizeBytes_;
    +    private long snapshotMaxChunkSizeBytes_ = 0L;
         /**
          * 
          * The maximum size of a distributed snapshot chunk file. A value of 0
    @@ -2818,7 +2810,7 @@ public long getSnapshotMaxChunkSizeBytes() {
         }
     
         public static final int SHUTDOWN_QUIET_PERIOD_MS_FIELD_NUMBER = 9;
    -    private long shutdownQuietPeriodMs_;
    +    private long shutdownQuietPeriodMs_ = 0L;
         /**
          * 
          * When shutting down a worker, how long to wait for the gRPC server to
    @@ -2851,14 +2843,14 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           if (port_ != 0L) {
             output.writeInt64(1, port_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(protocol_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, protocol_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(protocol_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 2, protocol_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dispatcherAddress_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 3, dispatcherAddress_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dispatcherAddress_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 3, dispatcherAddress_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(workerAddress_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 4, workerAddress_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(workerAddress_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 4, workerAddress_);
           }
           if (heartbeatIntervalMs_ != 0L) {
             output.writeInt64(5, heartbeatIntervalMs_);
    @@ -2866,17 +2858,17 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           if (dispatcherTimeoutMs_ != 0L) {
             output.writeInt64(6, dispatcherTimeoutMs_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataTransferProtocol_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 7, dataTransferProtocol_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataTransferProtocol_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 7, dataTransferProtocol_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataTransferAddress_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 8, dataTransferAddress_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataTransferAddress_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 8, dataTransferAddress_);
           }
           if (shutdownQuietPeriodMs_ != 0L) {
             output.writeInt64(9, shutdownQuietPeriodMs_);
           }
           for (int i = 0; i < workerTags_.size(); i++) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 10, workerTags_.getRaw(i));
    +        com.google.protobuf.GeneratedMessage.writeString(output, 10, workerTags_.getRaw(i));
           }
           if (crossTrainerCacheSizeBytes_ != 0L) {
             output.writeInt64(11, crossTrainerCacheSizeBytes_);
    @@ -2900,14 +2892,14 @@ public int getSerializedSize() {
             size += com.google.protobuf.CodedOutputStream
               .computeInt64Size(1, port_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(protocol_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, protocol_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(protocol_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, protocol_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dispatcherAddress_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, dispatcherAddress_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dispatcherAddress_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(3, dispatcherAddress_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(workerAddress_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, workerAddress_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(workerAddress_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(4, workerAddress_);
           }
           if (heartbeatIntervalMs_ != 0L) {
             size += com.google.protobuf.CodedOutputStream
    @@ -2917,11 +2909,11 @@ public int getSerializedSize() {
             size += com.google.protobuf.CodedOutputStream
               .computeInt64Size(6, dispatcherTimeoutMs_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataTransferProtocol_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, dataTransferProtocol_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataTransferProtocol_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(7, dataTransferProtocol_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataTransferAddress_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, dataTransferAddress_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataTransferAddress_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(8, dataTransferAddress_);
           }
           if (shutdownQuietPeriodMs_ != 0L) {
             size += com.google.protobuf.CodedOutputStream
    @@ -3073,39 +3065,41 @@ public static org.tensorflow.proto.data.experimental.ServiceConfig.WorkerConfig
         }
         public static org.tensorflow.proto.data.experimental.ServiceConfig.WorkerConfig parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.experimental.ServiceConfig.WorkerConfig parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.data.experimental.ServiceConfig.WorkerConfig parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.data.experimental.ServiceConfig.WorkerConfig parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.data.experimental.ServiceConfig.WorkerConfig parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.experimental.ServiceConfig.WorkerConfig parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -3125,7 +3119,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -3138,7 +3132,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.data.experimental.WorkerConfig}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.data.experimental.WorkerConfig)
             org.tensorflow.proto.data.experimental.ServiceConfig.WorkerConfigOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -3147,7 +3141,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.data.experimental.ServiceConfig.internal_static_tensorflow_data_experimental_WorkerConfig_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -3160,39 +3154,28 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             port_ = 0L;
    -
             protocol_ = "";
    -
             dispatcherAddress_ = "";
    -
             workerAddress_ = "";
    -
    -        workerTags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        workerTags_ =
    +            com.google.protobuf.LazyStringArrayList.emptyList();
             heartbeatIntervalMs_ = 0L;
    -
             dispatcherTimeoutMs_ = 0L;
    -
             dataTransferProtocol_ = "";
    -
             dataTransferPort_ = 0L;
    -
             dataTransferAddress_ = "";
    -
             crossTrainerCacheSizeBytes_ = 0L;
    -
             snapshotMaxChunkSizeBytes_ = 0L;
    -
             shutdownQuietPeriodMs_ = 0L;
    -
             return this;
           }
     
    @@ -3219,60 +3202,55 @@ public org.tensorflow.proto.data.experimental.ServiceConfig.WorkerConfig build()
           @java.lang.Override
           public org.tensorflow.proto.data.experimental.ServiceConfig.WorkerConfig buildPartial() {
             org.tensorflow.proto.data.experimental.ServiceConfig.WorkerConfig result = new org.tensorflow.proto.data.experimental.ServiceConfig.WorkerConfig(this);
    -        int from_bitField0_ = bitField0_;
    -        result.port_ = port_;
    -        result.protocol_ = protocol_;
    -        result.dispatcherAddress_ = dispatcherAddress_;
    -        result.workerAddress_ = workerAddress_;
    -        if (((bitField0_ & 0x00000001) != 0)) {
    -          workerTags_ = workerTags_.getUnmodifiableView();
    -          bitField0_ = (bitField0_ & ~0x00000001);
    -        }
    -        result.workerTags_ = workerTags_;
    -        result.heartbeatIntervalMs_ = heartbeatIntervalMs_;
    -        result.dispatcherTimeoutMs_ = dispatcherTimeoutMs_;
    -        result.dataTransferProtocol_ = dataTransferProtocol_;
    -        result.dataTransferPort_ = dataTransferPort_;
    -        result.dataTransferAddress_ = dataTransferAddress_;
    -        result.crossTrainerCacheSizeBytes_ = crossTrainerCacheSizeBytes_;
    -        result.snapshotMaxChunkSizeBytes_ = snapshotMaxChunkSizeBytes_;
    -        result.shutdownQuietPeriodMs_ = shutdownQuietPeriodMs_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.data.experimental.ServiceConfig.WorkerConfig result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.port_ = port_;
    +        }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.protocol_ = protocol_;
    +        }
    +        if (((from_bitField0_ & 0x00000004) != 0)) {
    +          result.dispatcherAddress_ = dispatcherAddress_;
    +        }
    +        if (((from_bitField0_ & 0x00000008) != 0)) {
    +          result.workerAddress_ = workerAddress_;
    +        }
    +        if (((from_bitField0_ & 0x00000010) != 0)) {
    +          workerTags_.makeImmutable();
    +          result.workerTags_ = workerTags_;
    +        }
    +        if (((from_bitField0_ & 0x00000020) != 0)) {
    +          result.heartbeatIntervalMs_ = heartbeatIntervalMs_;
    +        }
    +        if (((from_bitField0_ & 0x00000040) != 0)) {
    +          result.dispatcherTimeoutMs_ = dispatcherTimeoutMs_;
    +        }
    +        if (((from_bitField0_ & 0x00000080) != 0)) {
    +          result.dataTransferProtocol_ = dataTransferProtocol_;
    +        }
    +        if (((from_bitField0_ & 0x00000100) != 0)) {
    +          result.dataTransferPort_ = dataTransferPort_;
    +        }
    +        if (((from_bitField0_ & 0x00000200) != 0)) {
    +          result.dataTransferAddress_ = dataTransferAddress_;
    +        }
    +        if (((from_bitField0_ & 0x00000400) != 0)) {
    +          result.crossTrainerCacheSizeBytes_ = crossTrainerCacheSizeBytes_;
    +        }
    +        if (((from_bitField0_ & 0x00000800) != 0)) {
    +          result.snapshotMaxChunkSizeBytes_ = snapshotMaxChunkSizeBytes_;
    +        }
    +        if (((from_bitField0_ & 0x00001000) != 0)) {
    +          result.shutdownQuietPeriodMs_ = shutdownQuietPeriodMs_;
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.data.experimental.ServiceConfig.WorkerConfig) {
    @@ -3290,20 +3268,23 @@ public Builder mergeFrom(org.tensorflow.proto.data.experimental.ServiceConfig.Wo
             }
             if (!other.getProtocol().isEmpty()) {
               protocol_ = other.protocol_;
    +          bitField0_ |= 0x00000002;
               onChanged();
             }
             if (!other.getDispatcherAddress().isEmpty()) {
               dispatcherAddress_ = other.dispatcherAddress_;
    +          bitField0_ |= 0x00000004;
               onChanged();
             }
             if (!other.getWorkerAddress().isEmpty()) {
               workerAddress_ = other.workerAddress_;
    +          bitField0_ |= 0x00000008;
               onChanged();
             }
             if (!other.workerTags_.isEmpty()) {
               if (workerTags_.isEmpty()) {
                 workerTags_ = other.workerTags_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ |= 0x00000010;
               } else {
                 ensureWorkerTagsIsMutable();
                 workerTags_.addAll(other.workerTags_);
    @@ -3318,6 +3299,7 @@ public Builder mergeFrom(org.tensorflow.proto.data.experimental.ServiceConfig.Wo
             }
             if (!other.getDataTransferProtocol().isEmpty()) {
               dataTransferProtocol_ = other.dataTransferProtocol_;
    +          bitField0_ |= 0x00000080;
               onChanged();
             }
             if (other.getDataTransferPort() != 0L) {
    @@ -3325,6 +3307,7 @@ public Builder mergeFrom(org.tensorflow.proto.data.experimental.ServiceConfig.Wo
             }
             if (!other.getDataTransferAddress().isEmpty()) {
               dataTransferAddress_ = other.dataTransferAddress_;
    +          bitField0_ |= 0x00000200;
               onChanged();
             }
             if (other.getCrossTrainerCacheSizeBytes() != 0L) {
    @@ -3364,47 +3347,47 @@ public Builder mergeFrom(
                     break;
                   case 8: {
                     port_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 8
                   case 18: {
                     protocol_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 18
                   case 26: {
                     dispatcherAddress_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000004;
                     break;
                   } // case 26
                   case 34: {
                     workerAddress_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000008;
                     break;
                   } // case 34
                   case 40: {
                     heartbeatIntervalMs_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000020;
                     break;
                   } // case 40
                   case 48: {
                     dispatcherTimeoutMs_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000040;
                     break;
                   } // case 48
                   case 58: {
                     dataTransferProtocol_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000080;
                     break;
                   } // case 58
                   case 66: {
                     dataTransferAddress_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000200;
                     break;
                   } // case 66
                   case 72: {
                     shutdownQuietPeriodMs_ = input.readInt64();
    -
    +                bitField0_ |= 0x00001000;
                     break;
                   } // case 72
                   case 82: {
    @@ -3415,17 +3398,17 @@ public Builder mergeFrom(
                   } // case 82
                   case 88: {
                     crossTrainerCacheSizeBytes_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000400;
                     break;
                   } // case 88
                   case 96: {
                     snapshotMaxChunkSizeBytes_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000800;
                     break;
                   } // case 96
                   case 104: {
                     dataTransferPort_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000100;
                     break;
                   } // case 104
                   default: {
    @@ -3470,8 +3453,9 @@ public long getPort() {
            * @return This builder for chaining.
            */
           public Builder setPort(long value) {
    -        
    +
             port_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -3485,7 +3469,7 @@ public Builder setPort(long value) {
            * @return This builder for chaining.
            */
           public Builder clearPort() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000001);
             port_ = 0L;
             onChanged();
             return this;
    @@ -3544,11 +3528,9 @@ public java.lang.String getProtocol() {
            */
           public Builder setProtocol(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             protocol_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -3561,8 +3543,8 @@ public Builder setProtocol(
            * @return This builder for chaining.
            */
           public Builder clearProtocol() {
    -        
             protocol_ = getDefaultInstance().getProtocol();
    +        bitField0_ = (bitField0_ & ~0x00000002);
             onChanged();
             return this;
           }
    @@ -3577,12 +3559,10 @@ public Builder clearProtocol() {
            */
           public Builder setProtocolBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             protocol_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -3640,11 +3620,9 @@ public java.lang.String getDispatcherAddress() {
            */
           public Builder setDispatcherAddress(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             dispatcherAddress_ = value;
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -3657,8 +3635,8 @@ public Builder setDispatcherAddress(
            * @return This builder for chaining.
            */
           public Builder clearDispatcherAddress() {
    -        
             dispatcherAddress_ = getDefaultInstance().getDispatcherAddress();
    +        bitField0_ = (bitField0_ & ~0x00000004);
             onChanged();
             return this;
           }
    @@ -3673,12 +3651,10 @@ public Builder clearDispatcherAddress() {
            */
           public Builder setDispatcherAddressBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             dispatcherAddress_ = value;
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -3742,11 +3718,9 @@ public java.lang.String getWorkerAddress() {
            */
           public Builder setWorkerAddress(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             workerAddress_ = value;
    +        bitField0_ |= 0x00000008;
             onChanged();
             return this;
           }
    @@ -3761,8 +3735,8 @@ public Builder setWorkerAddress(
            * @return This builder for chaining.
            */
           public Builder clearWorkerAddress() {
    -        
             workerAddress_ = getDefaultInstance().getWorkerAddress();
    +        bitField0_ = (bitField0_ & ~0x00000008);
             onChanged();
             return this;
           }
    @@ -3779,22 +3753,21 @@ public Builder clearWorkerAddress() {
            */
           public Builder setWorkerAddressBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             workerAddress_ = value;
    +        bitField0_ |= 0x00000008;
             onChanged();
             return this;
           }
     
    -      private com.google.protobuf.LazyStringList workerTags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +      private com.google.protobuf.LazyStringArrayList workerTags_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
           private void ensureWorkerTagsIsMutable() {
    -        if (!((bitField0_ & 0x00000001) != 0)) {
    +        if (!workerTags_.isModifiable()) {
               workerTags_ = new com.google.protobuf.LazyStringArrayList(workerTags_);
    -          bitField0_ |= 0x00000001;
    -         }
    +        }
    +        bitField0_ |= 0x00000010;
           }
           /**
            * 
    @@ -3809,7 +3782,8 @@ private void ensureWorkerTagsIsMutable() {
            */
           public com.google.protobuf.ProtocolStringList
               getWorkerTagsList() {
    -        return workerTags_.getUnmodifiableView();
    +        workerTags_.makeImmutable();
    +        return workerTags_;
           }
           /**
            * 
    @@ -3871,11 +3845,10 @@ public java.lang.String getWorkerTags(int index) {
            */
           public Builder setWorkerTags(
               int index, java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureWorkerTagsIsMutable();
    +        if (value == null) { throw new NullPointerException(); }
    +        ensureWorkerTagsIsMutable();
             workerTags_.set(index, value);
    +        bitField0_ |= 0x00000010;
             onChanged();
             return this;
           }
    @@ -3893,11 +3866,10 @@ public Builder setWorkerTags(
            */
           public Builder addWorkerTags(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureWorkerTagsIsMutable();
    +        if (value == null) { throw new NullPointerException(); }
    +        ensureWorkerTagsIsMutable();
             workerTags_.add(value);
    +        bitField0_ |= 0x00000010;
             onChanged();
             return this;
           }
    @@ -3918,6 +3890,7 @@ public Builder addAllWorkerTags(
             ensureWorkerTagsIsMutable();
             com.google.protobuf.AbstractMessageLite.Builder.addAll(
                 values, workerTags_);
    +        bitField0_ |= 0x00000010;
             onChanged();
             return this;
           }
    @@ -3933,8 +3906,9 @@ public Builder addAllWorkerTags(
            * @return This builder for chaining.
            */
           public Builder clearWorkerTags() {
    -        workerTags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        workerTags_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
    +        bitField0_ = (bitField0_ & ~0x00000010);;
             onChanged();
             return this;
           }
    @@ -3952,12 +3926,11 @@ public Builder clearWorkerTags() {
            */
           public Builder addWorkerTagsBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             ensureWorkerTagsIsMutable();
             workerTags_.add(value);
    +        bitField0_ |= 0x00000010;
             onChanged();
             return this;
           }
    @@ -3987,8 +3960,9 @@ public long getHeartbeatIntervalMs() {
            * @return This builder for chaining.
            */
           public Builder setHeartbeatIntervalMs(long value) {
    -        
    +
             heartbeatIntervalMs_ = value;
    +        bitField0_ |= 0x00000020;
             onChanged();
             return this;
           }
    @@ -4002,7 +3976,7 @@ public Builder setHeartbeatIntervalMs(long value) {
            * @return This builder for chaining.
            */
           public Builder clearHeartbeatIntervalMs() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000020);
             heartbeatIntervalMs_ = 0L;
             onChanged();
             return this;
    @@ -4035,8 +4009,9 @@ public long getDispatcherTimeoutMs() {
            * @return This builder for chaining.
            */
           public Builder setDispatcherTimeoutMs(long value) {
    -        
    +
             dispatcherTimeoutMs_ = value;
    +        bitField0_ |= 0x00000040;
             onChanged();
             return this;
           }
    @@ -4051,7 +4026,7 @@ public Builder setDispatcherTimeoutMs(long value) {
            * @return This builder for chaining.
            */
           public Builder clearDispatcherTimeoutMs() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000040);
             dispatcherTimeoutMs_ = 0L;
             onChanged();
             return this;
    @@ -4122,11 +4097,9 @@ public java.lang.String getDataTransferProtocol() {
            */
           public Builder setDataTransferProtocol(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             dataTransferProtocol_ = value;
    +        bitField0_ |= 0x00000080;
             onChanged();
             return this;
           }
    @@ -4143,8 +4116,8 @@ public Builder setDataTransferProtocol(
            * @return This builder for chaining.
            */
           public Builder clearDataTransferProtocol() {
    -        
             dataTransferProtocol_ = getDefaultInstance().getDataTransferProtocol();
    +        bitField0_ = (bitField0_ & ~0x00000080);
             onChanged();
             return this;
           }
    @@ -4163,12 +4136,10 @@ public Builder clearDataTransferProtocol() {
            */
           public Builder setDataTransferProtocolBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             dataTransferProtocol_ = value;
    +        bitField0_ |= 0x00000080;
             onChanged();
             return this;
           }
    @@ -4198,8 +4169,9 @@ public long getDataTransferPort() {
            * @return This builder for chaining.
            */
           public Builder setDataTransferPort(long value) {
    -        
    +
             dataTransferPort_ = value;
    +        bitField0_ |= 0x00000100;
             onChanged();
             return this;
           }
    @@ -4213,7 +4185,7 @@ public Builder setDataTransferPort(long value) {
            * @return This builder for chaining.
            */
           public Builder clearDataTransferPort() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000100);
             dataTransferPort_ = 0L;
             onChanged();
             return this;
    @@ -4281,11 +4253,9 @@ public java.lang.String getDataTransferAddress() {
            */
           public Builder setDataTransferAddress(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             dataTransferAddress_ = value;
    +        bitField0_ |= 0x00000200;
             onChanged();
             return this;
           }
    @@ -4301,8 +4271,8 @@ public Builder setDataTransferAddress(
            * @return This builder for chaining.
            */
           public Builder clearDataTransferAddress() {
    -        
             dataTransferAddress_ = getDefaultInstance().getDataTransferAddress();
    +        bitField0_ = (bitField0_ & ~0x00000200);
             onChanged();
             return this;
           }
    @@ -4320,12 +4290,10 @@ public Builder clearDataTransferAddress() {
            */
           public Builder setDataTransferAddressBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             dataTransferAddress_ = value;
    +        bitField0_ |= 0x00000200;
             onChanged();
             return this;
           }
    @@ -4355,8 +4323,9 @@ public long getCrossTrainerCacheSizeBytes() {
            * @return This builder for chaining.
            */
           public Builder setCrossTrainerCacheSizeBytes(long value) {
    -        
    +
             crossTrainerCacheSizeBytes_ = value;
    +        bitField0_ |= 0x00000400;
             onChanged();
             return this;
           }
    @@ -4370,7 +4339,7 @@ public Builder setCrossTrainerCacheSizeBytes(long value) {
            * @return This builder for chaining.
            */
           public Builder clearCrossTrainerCacheSizeBytes() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000400);
             crossTrainerCacheSizeBytes_ = 0L;
             onChanged();
             return this;
    @@ -4401,8 +4370,9 @@ public long getSnapshotMaxChunkSizeBytes() {
            * @return This builder for chaining.
            */
           public Builder setSnapshotMaxChunkSizeBytes(long value) {
    -        
    +
             snapshotMaxChunkSizeBytes_ = value;
    +        bitField0_ |= 0x00000800;
             onChanged();
             return this;
           }
    @@ -4416,7 +4386,7 @@ public Builder setSnapshotMaxChunkSizeBytes(long value) {
            * @return This builder for chaining.
            */
           public Builder clearSnapshotMaxChunkSizeBytes() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000800);
             snapshotMaxChunkSizeBytes_ = 0L;
             onChanged();
             return this;
    @@ -4449,8 +4419,9 @@ public long getShutdownQuietPeriodMs() {
            * @return This builder for chaining.
            */
           public Builder setShutdownQuietPeriodMs(long value) {
    -        
    +
             shutdownQuietPeriodMs_ = value;
    +        bitField0_ |= 0x00001000;
             onChanged();
             return this;
           }
    @@ -4465,23 +4436,11 @@ public Builder setShutdownQuietPeriodMs(long value) {
            * @return This builder for chaining.
            */
           public Builder clearShutdownQuietPeriodMs() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00001000);
             shutdownQuietPeriodMs_ = 0L;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.data.experimental.WorkerConfig)
         }
    @@ -4537,12 +4496,12 @@ public org.tensorflow.proto.data.experimental.ServiceConfig.WorkerConfig getDefa
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_data_experimental_DispatcherConfig_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_data_experimental_DispatcherConfig_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_data_experimental_WorkerConfig_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_data_experimental_WorkerConfig_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -4588,15 +4547,16 @@ public org.tensorflow.proto.data.experimental.ServiceConfig.WorkerConfig getDefa
         internal_static_tensorflow_data_experimental_DispatcherConfig_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_data_experimental_DispatcherConfig_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_data_experimental_DispatcherConfig_descriptor,
             new java.lang.String[] { "Port", "Protocol", "WorkDir", "FaultTolerantMode", "WorkerAddresses", "DeploymentMode", "JobGcCheckIntervalMs", "JobGcTimeoutMs", "GcDynamicShardingJobs", "ClientTimeoutMs", "WorkerTimeoutMs", "WorkerMaxConcurrentSnapshots", });
         internal_static_tensorflow_data_experimental_WorkerConfig_descriptor =
           getDescriptor().getMessageTypes().get(1);
         internal_static_tensorflow_data_experimental_WorkerConfig_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_data_experimental_WorkerConfig_descriptor,
             new java.lang.String[] { "Port", "Protocol", "DispatcherAddress", "WorkerAddress", "WorkerTags", "HeartbeatIntervalMs", "DispatcherTimeoutMs", "DataTransferProtocol", "DataTransferPort", "DataTransferAddress", "CrossTrainerCacheSizeBytes", "SnapshotMaxChunkSizeBytes", "ShutdownQuietPeriodMs", });
    +    descriptor.resolveAllFeaturesImmutable();
         org.tensorflow.proto.data.DataService.getDescriptor();
       }
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/experimental/Snapshot.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/experimental/Snapshot.java
    index 03e1ca6f053..f21a9672404 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/experimental/Snapshot.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/experimental/Snapshot.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/snapshot.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto.data.experimental;
     
     public final class Snapshot {
       private Snapshot() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      Snapshot.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -52,37 +63,34 @@ org.tensorflow.proto.TensorProtoOrBuilder getTensorOrBuilder(
        * Protobuf type {@code tensorflow.data.experimental.SnapshotRecord}
        */
       public static final class SnapshotRecord extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.data.experimental.SnapshotRecord)
           SnapshotRecordOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        SnapshotRecord.class.getName());
    +    }
         // Use SnapshotRecord.newBuilder() to construct.
    -    private SnapshotRecord(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private SnapshotRecord(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private SnapshotRecord() {
           tensor_ = java.util.Collections.emptyList();
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new SnapshotRecord();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.data.experimental.Snapshot.internal_static_tensorflow_data_experimental_SnapshotRecord_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.data.experimental.Snapshot.internal_static_tensorflow_data_experimental_SnapshotRecord_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -90,6 +98,7 @@ protected java.lang.Object newInstance(
         }
     
         public static final int TENSOR_FIELD_NUMBER = 1;
    +    @SuppressWarnings("serial")
         private java.util.List tensor_;
         /**
          * repeated .tensorflow.TensorProto tensor = 1;
    @@ -230,39 +239,41 @@ public static org.tensorflow.proto.data.experimental.Snapshot.SnapshotRecord par
         }
         public static org.tensorflow.proto.data.experimental.Snapshot.SnapshotRecord parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.experimental.Snapshot.SnapshotRecord parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.data.experimental.Snapshot.SnapshotRecord parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.data.experimental.Snapshot.SnapshotRecord parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.data.experimental.Snapshot.SnapshotRecord parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.experimental.Snapshot.SnapshotRecord parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -282,7 +293,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -296,7 +307,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.data.experimental.SnapshotRecord}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.data.experimental.SnapshotRecord)
             org.tensorflow.proto.data.experimental.Snapshot.SnapshotRecordOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -305,7 +316,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.data.experimental.Snapshot.internal_static_tensorflow_data_experimental_SnapshotRecord_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -318,13 +329,14 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             if (tensorBuilder_ == null) {
               tensor_ = java.util.Collections.emptyList();
             } else {
    @@ -358,7 +370,13 @@ public org.tensorflow.proto.data.experimental.Snapshot.SnapshotRecord build() {
           @java.lang.Override
           public org.tensorflow.proto.data.experimental.Snapshot.SnapshotRecord buildPartial() {
             org.tensorflow.proto.data.experimental.Snapshot.SnapshotRecord result = new org.tensorflow.proto.data.experimental.Snapshot.SnapshotRecord(this);
    -        int from_bitField0_ = bitField0_;
    +        buildPartialRepeatedFields(result);
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        onBuilt();
    +        return result;
    +      }
    +
    +      private void buildPartialRepeatedFields(org.tensorflow.proto.data.experimental.Snapshot.SnapshotRecord result) {
             if (tensorBuilder_ == null) {
               if (((bitField0_ & 0x00000001) != 0)) {
                 tensor_ = java.util.Collections.unmodifiableList(tensor_);
    @@ -368,42 +386,12 @@ public org.tensorflow.proto.data.experimental.Snapshot.SnapshotRecord buildParti
             } else {
               result.tensor_ = tensorBuilder_.build();
             }
    -        onBuilt();
    -        return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.data.experimental.Snapshot.SnapshotRecord result) {
    +        int from_bitField0_ = bitField0_;
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.data.experimental.Snapshot.SnapshotRecord) {
    @@ -435,7 +423,7 @@ public Builder mergeFrom(org.tensorflow.proto.data.experimental.Snapshot.Snapsho
                   tensor_ = other.tensor_;
                   bitField0_ = (bitField0_ & ~0x00000001);
                   tensorBuilder_ = 
    -                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                        getTensorFieldBuilder() : null;
                 } else {
                   tensorBuilder_.addAllMessages(other.tensor_);
    @@ -507,7 +495,7 @@ private void ensureTensorIsMutable() {
              }
           }
     
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> tensorBuilder_;
     
           /**
    @@ -723,11 +711,11 @@ public org.tensorflow.proto.TensorProto.Builder addTensorBuilder(
                getTensorBuilderList() {
             return getTensorFieldBuilder().getBuilderList();
           }
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> 
               getTensorFieldBuilder() {
             if (tensorBuilder_ == null) {
    -          tensorBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +          tensorBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                   org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder>(
                       tensor_,
                       ((bitField0_ & 0x00000001) != 0),
    @@ -737,18 +725,6 @@ public org.tensorflow.proto.TensorProto.Builder addTensorBuilder(
             }
             return tensorBuilder_;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.data.experimental.SnapshotRecord)
         }
    @@ -940,39 +916,36 @@ public interface SnapshotMetadataRecordOrBuilder extends
        * Protobuf type {@code tensorflow.data.experimental.SnapshotMetadataRecord}
        */
       public static final class SnapshotMetadataRecord extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.data.experimental.SnapshotMetadataRecord)
           SnapshotMetadataRecordOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        SnapshotMetadataRecord.class.getName());
    +    }
         // Use SnapshotMetadataRecord.newBuilder() to construct.
    -    private SnapshotMetadataRecord(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private SnapshotMetadataRecord(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private SnapshotMetadataRecord() {
           graphHash_ = "";
           runId_ = "";
    -      dtype_ = java.util.Collections.emptyList();
    -    }
    -
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new SnapshotMetadataRecord();
    +      dtype_ = emptyIntList();
         }
     
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.data.experimental.Snapshot.internal_static_tensorflow_data_experimental_SnapshotMetadataRecord_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.data.experimental.Snapshot.internal_static_tensorflow_data_experimental_SnapshotMetadataRecord_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -980,7 +953,8 @@ protected java.lang.Object newInstance(
         }
     
         public static final int GRAPH_HASH_FIELD_NUMBER = 1;
    -    private volatile java.lang.Object graphHash_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object graphHash_ = "";
         /**
          * 
          * Stores the fingerprint of the graph that describes the dataset that is
    @@ -1028,7 +1002,8 @@ public java.lang.String getGraphHash() {
         }
     
         public static final int RUN_ID_FIELD_NUMBER = 2;
    -    private volatile java.lang.Object runId_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object runId_ = "";
         /**
          * 
          * Run ID that this snapshot corresponds to.
    @@ -1074,7 +1049,7 @@ public java.lang.String getRunId() {
         }
     
         public static final int CREATION_TIMESTAMP_FIELD_NUMBER = 3;
    -    private long creationTimestamp_;
    +    private long creationTimestamp_ = 0L;
         /**
          * 
          * Time when we started creating this snapshot.
    @@ -1089,7 +1064,7 @@ public long getCreationTimestamp() {
         }
     
         public static final int VERSION_FIELD_NUMBER = 4;
    -    private long version_;
    +    private long version_ = 0L;
         /**
          * 
          * Version of the snapshot data file format.
    @@ -1104,14 +1079,14 @@ public long getVersion() {
         }
     
         public static final int DTYPE_FIELD_NUMBER = 5;
    -    private java.util.List dtype_;
    -    private static final com.google.protobuf.Internal.ListAdapter.Converter<
    -        java.lang.Integer, org.tensorflow.proto.DataType> dtype_converter_ =
    -            new com.google.protobuf.Internal.ListAdapter.Converter<
    -                java.lang.Integer, org.tensorflow.proto.DataType>() {
    -              public org.tensorflow.proto.DataType convert(java.lang.Integer from) {
    -                @SuppressWarnings("deprecation")
    -                org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(from);
    +    @SuppressWarnings("serial")
    +    private com.google.protobuf.Internal.IntList dtype_;
    +    private static final com.google.protobuf.Internal.IntListAdapter.IntConverter<
    +        org.tensorflow.proto.DataType> dtype_converter_ =
    +            new com.google.protobuf.Internal.IntListAdapter.IntConverter<
    +                org.tensorflow.proto.DataType>() {
    +              public org.tensorflow.proto.DataType convert(int from) {
    +                org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(from);
                     return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
                   }
                 };
    @@ -1125,8 +1100,8 @@ public org.tensorflow.proto.DataType convert(java.lang.Integer from) {
          */
         @java.lang.Override
         public java.util.List getDtypeList() {
    -      return new com.google.protobuf.Internal.ListAdapter<
    -          java.lang.Integer, org.tensorflow.proto.DataType>(dtype_, dtype_converter_);
    +      return new com.google.protobuf.Internal.IntListAdapter<
    +          org.tensorflow.proto.DataType>(dtype_, dtype_converter_);
         }
         /**
          * 
    @@ -1151,7 +1126,7 @@ public int getDtypeCount() {
          */
         @java.lang.Override
         public org.tensorflow.proto.DataType getDtype(int index) {
    -      return dtype_converter_.convert(dtype_.get(index));
    +      return dtype_converter_.convert(dtype_.getInt(index));
         }
         /**
          * 
    @@ -1177,12 +1152,12 @@ public org.tensorflow.proto.DataType getDtype(int index) {
          */
         @java.lang.Override
         public int getDtypeValue(int index) {
    -      return dtype_.get(index);
    +      return dtype_.getInt(index);
         }
         private int dtypeMemoizedSerializedSize;
     
         public static final int NUM_ELEMENTS_FIELD_NUMBER = 6;
    -    private long numElements_;
    +    private long numElements_ = 0L;
         /**
          * 
          * The number of elements in the snapshot.
    @@ -1197,7 +1172,7 @@ public long getNumElements() {
         }
     
         public static final int FINALIZED_FIELD_NUMBER = 1000;
    -    private boolean finalized_;
    +    private boolean finalized_ = false;
         /**
          * bool finalized = 1000;
          * @return The finalized.
    @@ -1222,11 +1197,11 @@ public final boolean isInitialized() {
         public void writeTo(com.google.protobuf.CodedOutputStream output)
                             throws java.io.IOException {
           getSerializedSize();
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(graphHash_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, graphHash_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(graphHash_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 1, graphHash_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(runId_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, runId_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(runId_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 2, runId_);
           }
           if (creationTimestamp_ != 0L) {
             output.writeInt64(3, creationTimestamp_);
    @@ -1239,7 +1214,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
             output.writeUInt32NoTag(dtypeMemoizedSerializedSize);
           }
           for (int i = 0; i < dtype_.size(); i++) {
    -        output.writeEnumNoTag(dtype_.get(i));
    +        output.writeEnumNoTag(dtype_.getInt(i));
           }
           if (numElements_ != 0L) {
             output.writeInt64(6, numElements_);
    @@ -1256,11 +1231,11 @@ public int getSerializedSize() {
           if (size != -1) return size;
     
           size = 0;
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(graphHash_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, graphHash_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(graphHash_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, graphHash_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(runId_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, runId_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(runId_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, runId_);
           }
           if (creationTimestamp_ != 0L) {
             size += com.google.protobuf.CodedOutputStream
    @@ -1274,7 +1249,7 @@ public int getSerializedSize() {
             int dataSize = 0;
             for (int i = 0; i < dtype_.size(); i++) {
               dataSize += com.google.protobuf.CodedOutputStream
    -            .computeEnumSizeNoTag(dtype_.get(i));
    +            .computeEnumSizeNoTag(dtype_.getInt(i));
             }
             size += dataSize;
             if (!getDtypeList().isEmpty()) {  size += 1;
    @@ -1388,39 +1363,41 @@ public static org.tensorflow.proto.data.experimental.Snapshot.SnapshotMetadataRe
         }
         public static org.tensorflow.proto.data.experimental.Snapshot.SnapshotMetadataRecord parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.experimental.Snapshot.SnapshotMetadataRecord parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.data.experimental.Snapshot.SnapshotMetadataRecord parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.data.experimental.Snapshot.SnapshotMetadataRecord parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.data.experimental.Snapshot.SnapshotMetadataRecord parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.experimental.Snapshot.SnapshotMetadataRecord parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -1440,7 +1417,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -1452,7 +1429,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.data.experimental.SnapshotMetadataRecord}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.data.experimental.SnapshotMetadataRecord)
             org.tensorflow.proto.data.experimental.Snapshot.SnapshotMetadataRecordOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -1461,7 +1438,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.data.experimental.Snapshot.internal_static_tensorflow_data_experimental_SnapshotMetadataRecord_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -1474,27 +1451,22 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             graphHash_ = "";
    -
             runId_ = "";
    -
             creationTimestamp_ = 0L;
    -
             version_ = 0L;
    -
    -        dtype_ = java.util.Collections.emptyList();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        dtype_ = emptyIntList();
    +        bitField0_ = (bitField0_ & ~0x00000010);
             numElements_ = 0L;
    -
             finalized_ = false;
    -
             return this;
           }
     
    @@ -1521,54 +1493,42 @@ public org.tensorflow.proto.data.experimental.Snapshot.SnapshotMetadataRecord bu
           @java.lang.Override
           public org.tensorflow.proto.data.experimental.Snapshot.SnapshotMetadataRecord buildPartial() {
             org.tensorflow.proto.data.experimental.Snapshot.SnapshotMetadataRecord result = new org.tensorflow.proto.data.experimental.Snapshot.SnapshotMetadataRecord(this);
    -        int from_bitField0_ = bitField0_;
    -        result.graphHash_ = graphHash_;
    -        result.runId_ = runId_;
    -        result.creationTimestamp_ = creationTimestamp_;
    -        result.version_ = version_;
    -        if (((bitField0_ & 0x00000001) != 0)) {
    -          dtype_ = java.util.Collections.unmodifiableList(dtype_);
    -          bitField0_ = (bitField0_ & ~0x00000001);
    -        }
    -        result.dtype_ = dtype_;
    -        result.numElements_ = numElements_;
    -        result.finalized_ = finalized_;
    +        buildPartialRepeatedFields(result);
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    +      private void buildPartialRepeatedFields(org.tensorflow.proto.data.experimental.Snapshot.SnapshotMetadataRecord result) {
    +        if (((bitField0_ & 0x00000010) != 0)) {
    +          dtype_.makeImmutable();
    +          bitField0_ = (bitField0_ & ~0x00000010);
    +        }
    +        result.dtype_ = dtype_;
           }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +
    +      private void buildPartial0(org.tensorflow.proto.data.experimental.Snapshot.SnapshotMetadataRecord result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.graphHash_ = graphHash_;
    +        }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.runId_ = runId_;
    +        }
    +        if (((from_bitField0_ & 0x00000004) != 0)) {
    +          result.creationTimestamp_ = creationTimestamp_;
    +        }
    +        if (((from_bitField0_ & 0x00000008) != 0)) {
    +          result.version_ = version_;
    +        }
    +        if (((from_bitField0_ & 0x00000020) != 0)) {
    +          result.numElements_ = numElements_;
    +        }
    +        if (((from_bitField0_ & 0x00000040) != 0)) {
    +          result.finalized_ = finalized_;
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.data.experimental.Snapshot.SnapshotMetadataRecord) {
    @@ -1583,10 +1543,12 @@ public Builder mergeFrom(org.tensorflow.proto.data.experimental.Snapshot.Snapsho
             if (other == org.tensorflow.proto.data.experimental.Snapshot.SnapshotMetadataRecord.getDefaultInstance()) return this;
             if (!other.getGraphHash().isEmpty()) {
               graphHash_ = other.graphHash_;
    +          bitField0_ |= 0x00000001;
               onChanged();
             }
             if (!other.getRunId().isEmpty()) {
               runId_ = other.runId_;
    +          bitField0_ |= 0x00000002;
               onChanged();
             }
             if (other.getCreationTimestamp() != 0L) {
    @@ -1598,7 +1560,7 @@ public Builder mergeFrom(org.tensorflow.proto.data.experimental.Snapshot.Snapsho
             if (!other.dtype_.isEmpty()) {
               if (dtype_.isEmpty()) {
                 dtype_ = other.dtype_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000010);
               } else {
                 ensureDtypeIsMutable();
                 dtype_.addAll(other.dtype_);
    @@ -1639,28 +1601,28 @@ public Builder mergeFrom(
                     break;
                   case 10: {
                     graphHash_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 10
                   case 18: {
                     runId_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 18
                   case 24: {
                     creationTimestamp_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000004;
                     break;
                   } // case 24
                   case 32: {
                     version_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000008;
                     break;
                   } // case 32
                   case 40: {
                     int tmpRaw = input.readEnum();
                     ensureDtypeIsMutable();
    -                dtype_.add(tmpRaw);
    +                dtype_.addInt(tmpRaw);
                     break;
                   } // case 40
                   case 42: {
    @@ -1669,19 +1631,19 @@ public Builder mergeFrom(
                     while(input.getBytesUntilLimit() > 0) {
                       int tmpRaw = input.readEnum();
                       ensureDtypeIsMutable();
    -                  dtype_.add(tmpRaw);
    +                  dtype_.addInt(tmpRaw);
                     }
                     input.popLimit(oldLimit);
                     break;
                   } // case 42
                   case 48: {
                     numElements_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000020;
                     break;
                   } // case 48
                   case 8000: {
                     finalized_ = input.readBool();
    -
    +                bitField0_ |= 0x00000040;
                     break;
                   } // case 8000
                   default: {
    @@ -1757,11 +1719,9 @@ public java.lang.String getGraphHash() {
            */
           public Builder setGraphHash(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             graphHash_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -1775,8 +1735,8 @@ public Builder setGraphHash(
            * @return This builder for chaining.
            */
           public Builder clearGraphHash() {
    -        
             graphHash_ = getDefaultInstance().getGraphHash();
    +        bitField0_ = (bitField0_ & ~0x00000001);
             onChanged();
             return this;
           }
    @@ -1792,12 +1752,10 @@ public Builder clearGraphHash() {
            */
           public Builder setGraphHashBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             graphHash_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -1855,11 +1813,9 @@ public java.lang.String getRunId() {
            */
           public Builder setRunId(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             runId_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -1872,8 +1828,8 @@ public Builder setRunId(
            * @return This builder for chaining.
            */
           public Builder clearRunId() {
    -        
             runId_ = getDefaultInstance().getRunId();
    +        bitField0_ = (bitField0_ & ~0x00000002);
             onChanged();
             return this;
           }
    @@ -1888,12 +1844,10 @@ public Builder clearRunId() {
            */
           public Builder setRunIdBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             runId_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -1921,8 +1875,9 @@ public long getCreationTimestamp() {
            * @return This builder for chaining.
            */
           public Builder setCreationTimestamp(long value) {
    -        
    +
             creationTimestamp_ = value;
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -1935,7 +1890,7 @@ public Builder setCreationTimestamp(long value) {
            * @return This builder for chaining.
            */
           public Builder clearCreationTimestamp() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000004);
             creationTimestamp_ = 0L;
             onChanged();
             return this;
    @@ -1964,8 +1919,9 @@ public long getVersion() {
            * @return This builder for chaining.
            */
           public Builder setVersion(long value) {
    -        
    +
             version_ = value;
    +        bitField0_ |= 0x00000008;
             onChanged();
             return this;
           }
    @@ -1978,18 +1934,18 @@ public Builder setVersion(long value) {
            * @return This builder for chaining.
            */
           public Builder clearVersion() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000008);
             version_ = 0L;
             onChanged();
             return this;
           }
     
    -      private java.util.List dtype_ =
    -        java.util.Collections.emptyList();
    +      private com.google.protobuf.Internal.IntList dtype_ =
    +        emptyIntList();
           private void ensureDtypeIsMutable() {
    -        if (!((bitField0_ & 0x00000001) != 0)) {
    -          dtype_ = new java.util.ArrayList(dtype_);
    -          bitField0_ |= 0x00000001;
    +        if (!((bitField0_ & 0x00000010) != 0)) {
    +          dtype_ = makeMutableCopy(dtype_);
    +          bitField0_ |= 0x00000010;
             }
           }
           /**
    @@ -2001,8 +1957,8 @@ private void ensureDtypeIsMutable() {
            * @return A list containing the dtype.
            */
           public java.util.List getDtypeList() {
    -        return new com.google.protobuf.Internal.ListAdapter<
    -            java.lang.Integer, org.tensorflow.proto.DataType>(dtype_, dtype_converter_);
    +        return new com.google.protobuf.Internal.IntListAdapter<
    +            org.tensorflow.proto.DataType>(dtype_, dtype_converter_);
           }
           /**
            * 
    @@ -2025,7 +1981,7 @@ public int getDtypeCount() {
            * @return The dtype at the given index.
            */
           public org.tensorflow.proto.DataType getDtype(int index) {
    -        return dtype_converter_.convert(dtype_.get(index));
    +        return dtype_converter_.convert(dtype_.getInt(index));
           }
           /**
            * 
    @@ -2043,7 +1999,7 @@ public Builder setDtype(
               throw new NullPointerException();
             }
             ensureDtypeIsMutable();
    -        dtype_.set(index, value.getNumber());
    +        dtype_.setInt(index, value.getNumber());
             onChanged();
             return this;
           }
    @@ -2061,7 +2017,7 @@ public Builder addDtype(org.tensorflow.proto.DataType value) {
               throw new NullPointerException();
             }
             ensureDtypeIsMutable();
    -        dtype_.add(value.getNumber());
    +        dtype_.addInt(value.getNumber());
             onChanged();
             return this;
           }
    @@ -2078,7 +2034,7 @@ public Builder addAllDtype(
               java.lang.Iterable values) {
             ensureDtypeIsMutable();
             for (org.tensorflow.proto.DataType value : values) {
    -          dtype_.add(value.getNumber());
    +          dtype_.addInt(value.getNumber());
             }
             onChanged();
             return this;
    @@ -2092,8 +2048,8 @@ public Builder addAllDtype(
            * @return This builder for chaining.
            */
           public Builder clearDtype() {
    -        dtype_ = java.util.Collections.emptyList();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        dtype_ = emptyIntList();
    +        bitField0_ = (bitField0_ & ~0x00000010);
             onChanged();
             return this;
           }
    @@ -2119,7 +2075,7 @@ public Builder clearDtype() {
            * @return The enum numeric value on the wire of dtype at the given index.
            */
           public int getDtypeValue(int index) {
    -        return dtype_.get(index);
    +        return dtype_.getInt(index);
           }
           /**
            * 
    @@ -2134,7 +2090,7 @@ public int getDtypeValue(int index) {
           public Builder setDtypeValue(
               int index, int value) {
             ensureDtypeIsMutable();
    -        dtype_.set(index, value);
    +        dtype_.setInt(index, value);
             onChanged();
             return this;
           }
    @@ -2149,7 +2105,7 @@ public Builder setDtypeValue(
            */
           public Builder addDtypeValue(int value) {
             ensureDtypeIsMutable();
    -        dtype_.add(value);
    +        dtype_.addInt(value);
             onChanged();
             return this;
           }
    @@ -2166,7 +2122,7 @@ public Builder addAllDtypeValue(
               java.lang.Iterable values) {
             ensureDtypeIsMutable();
             for (int value : values) {
    -          dtype_.add(value);
    +          dtype_.addInt(value);
             }
             onChanged();
             return this;
    @@ -2195,8 +2151,9 @@ public long getNumElements() {
            * @return This builder for chaining.
            */
           public Builder setNumElements(long value) {
    -        
    +
             numElements_ = value;
    +        bitField0_ |= 0x00000020;
             onChanged();
             return this;
           }
    @@ -2209,7 +2166,7 @@ public Builder setNumElements(long value) {
            * @return This builder for chaining.
            */
           public Builder clearNumElements() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000020);
             numElements_ = 0L;
             onChanged();
             return this;
    @@ -2230,8 +2187,9 @@ public boolean getFinalized() {
            * @return This builder for chaining.
            */
           public Builder setFinalized(boolean value) {
    -        
    +
             finalized_ = value;
    +        bitField0_ |= 0x00000040;
             onChanged();
             return this;
           }
    @@ -2240,23 +2198,11 @@ public Builder setFinalized(boolean value) {
            * @return This builder for chaining.
            */
           public Builder clearFinalized() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000040);
             finalized_ = false;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.data.experimental.SnapshotMetadataRecord)
         }
    @@ -2346,42 +2292,40 @@ public interface TensorMetadataOrBuilder extends
        * Protobuf type {@code tensorflow.data.experimental.TensorMetadata}
        */
       public static final class TensorMetadata extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.data.experimental.TensorMetadata)
           TensorMetadataOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        TensorMetadata.class.getName());
    +    }
         // Use TensorMetadata.newBuilder() to construct.
    -    private TensorMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private TensorMetadata(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private TensorMetadata() {
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new TensorMetadata();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.data.experimental.Snapshot.internal_static_tensorflow_data_experimental_TensorMetadata_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.data.experimental.Snapshot.internal_static_tensorflow_data_experimental_TensorMetadata_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
                   org.tensorflow.proto.data.experimental.Snapshot.TensorMetadata.class, org.tensorflow.proto.data.experimental.Snapshot.TensorMetadata.Builder.class);
         }
     
    +    private int bitField0_;
         public static final int TENSOR_SHAPE_FIELD_NUMBER = 2;
         private org.tensorflow.proto.TensorShapeProto tensorShape_;
         /**
    @@ -2390,7 +2334,7 @@ protected java.lang.Object newInstance(
          */
         @java.lang.Override
         public boolean hasTensorShape() {
    -      return tensorShape_ != null;
    +      return ((bitField0_ & 0x00000001) != 0);
         }
         /**
          * .tensorflow.TensorShapeProto tensor_shape = 2;
    @@ -2405,11 +2349,11 @@ public org.tensorflow.proto.TensorShapeProto getTensorShape() {
          */
         @java.lang.Override
         public org.tensorflow.proto.TensorShapeProtoOrBuilder getTensorShapeOrBuilder() {
    -      return getTensorShape();
    +      return tensorShape_ == null ? org.tensorflow.proto.TensorShapeProto.getDefaultInstance() : tensorShape_;
         }
     
         public static final int TENSOR_SIZE_BYTES_FIELD_NUMBER = 3;
    -    private long tensorSizeBytes_;
    +    private long tensorSizeBytes_ = 0L;
         /**
          * 
          * Number of uncompressed bytes used to store the tensor representation.
    @@ -2437,7 +2381,7 @@ public final boolean isInitialized() {
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output)
                             throws java.io.IOException {
    -      if (tensorShape_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             output.writeMessage(2, getTensorShape());
           }
           if (tensorSizeBytes_ != 0L) {
    @@ -2452,7 +2396,7 @@ public int getSerializedSize() {
           if (size != -1) return size;
     
           size = 0;
    -      if (tensorShape_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(2, getTensorShape());
           }
    @@ -2539,39 +2483,41 @@ public static org.tensorflow.proto.data.experimental.Snapshot.TensorMetadata par
         }
         public static org.tensorflow.proto.data.experimental.Snapshot.TensorMetadata parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.experimental.Snapshot.TensorMetadata parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.data.experimental.Snapshot.TensorMetadata parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.data.experimental.Snapshot.TensorMetadata parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.data.experimental.Snapshot.TensorMetadata parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.experimental.Snapshot.TensorMetadata parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -2591,7 +2537,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -2603,7 +2549,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.data.experimental.TensorMetadata}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.data.experimental.TensorMetadata)
             org.tensorflow.proto.data.experimental.Snapshot.TensorMetadataOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -2612,7 +2558,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.data.experimental.Snapshot.internal_static_tensorflow_data_experimental_TensorMetadata_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -2621,25 +2567,30 @@ public static final class Builder extends
     
           // Construct using org.tensorflow.proto.data.experimental.Snapshot.TensorMetadata.newBuilder()
           private Builder() {
    -
    +        maybeForceBuilderInitialization();
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
    -
    +        maybeForceBuilderInitialization();
    +      }
    +      private void maybeForceBuilderInitialization() {
    +        if (com.google.protobuf.GeneratedMessage
    +                .alwaysUseFieldBuilders) {
    +          getTensorShapeFieldBuilder();
    +        }
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    -        if (tensorShapeBuilder_ == null) {
    -          tensorShape_ = null;
    -        } else {
    -          tensorShape_ = null;
    +        bitField0_ = 0;
    +        tensorShape_ = null;
    +        if (tensorShapeBuilder_ != null) {
    +          tensorShapeBuilder_.dispose();
               tensorShapeBuilder_ = null;
             }
             tensorSizeBytes_ = 0L;
    -
             return this;
           }
     
    @@ -2666,48 +2617,26 @@ public org.tensorflow.proto.data.experimental.Snapshot.TensorMetadata build() {
           @java.lang.Override
           public org.tensorflow.proto.data.experimental.Snapshot.TensorMetadata buildPartial() {
             org.tensorflow.proto.data.experimental.Snapshot.TensorMetadata result = new org.tensorflow.proto.data.experimental.Snapshot.TensorMetadata(this);
    -        if (tensorShapeBuilder_ == null) {
    -          result.tensorShape_ = tensorShape_;
    -        } else {
    -          result.tensorShape_ = tensorShapeBuilder_.build();
    -        }
    -        result.tensorSizeBytes_ = tensorSizeBytes_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.data.experimental.Snapshot.TensorMetadata result) {
    +        int from_bitField0_ = bitField0_;
    +        int to_bitField0_ = 0;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.tensorShape_ = tensorShapeBuilder_ == null
    +              ? tensorShape_
    +              : tensorShapeBuilder_.build();
    +          to_bitField0_ |= 0x00000001;
    +        }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.tensorSizeBytes_ = tensorSizeBytes_;
    +        }
    +        result.bitField0_ |= to_bitField0_;
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.data.experimental.Snapshot.TensorMetadata) {
    @@ -2756,12 +2685,12 @@ public Builder mergeFrom(
                     input.readMessage(
                         getTensorShapeFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 18
                   case 24: {
                     tensorSizeBytes_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 24
                   default: {
    @@ -2779,16 +2708,17 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    +      private int bitField0_;
     
           private org.tensorflow.proto.TensorShapeProto tensorShape_;
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> tensorShapeBuilder_;
           /**
            * .tensorflow.TensorShapeProto tensor_shape = 2;
            * @return Whether the tensorShape field is set.
            */
           public boolean hasTensorShape() {
    -        return tensorShapeBuilder_ != null || tensorShape_ != null;
    +        return ((bitField0_ & 0x00000001) != 0);
           }
           /**
            * .tensorflow.TensorShapeProto tensor_shape = 2;
    @@ -2810,11 +2740,11 @@ public Builder setTensorShape(org.tensorflow.proto.TensorShapeProto value) {
                 throw new NullPointerException();
               }
               tensorShape_ = value;
    -          onChanged();
             } else {
               tensorShapeBuilder_.setMessage(value);
             }
    -
    +        bitField0_ |= 0x00000001;
    +        onChanged();
             return this;
           }
           /**
    @@ -2824,11 +2754,11 @@ public Builder setTensorShape(
               org.tensorflow.proto.TensorShapeProto.Builder builderForValue) {
             if (tensorShapeBuilder_ == null) {
               tensorShape_ = builderForValue.build();
    -          onChanged();
             } else {
               tensorShapeBuilder_.setMessage(builderForValue.build());
             }
    -
    +        bitField0_ |= 0x00000001;
    +        onChanged();
             return this;
           }
           /**
    @@ -2836,38 +2766,40 @@ public Builder setTensorShape(
            */
           public Builder mergeTensorShape(org.tensorflow.proto.TensorShapeProto value) {
             if (tensorShapeBuilder_ == null) {
    -          if (tensorShape_ != null) {
    -            tensorShape_ =
    -              org.tensorflow.proto.TensorShapeProto.newBuilder(tensorShape_).mergeFrom(value).buildPartial();
    +          if (((bitField0_ & 0x00000001) != 0) &&
    +            tensorShape_ != null &&
    +            tensorShape_ != org.tensorflow.proto.TensorShapeProto.getDefaultInstance()) {
    +            getTensorShapeBuilder().mergeFrom(value);
               } else {
                 tensorShape_ = value;
               }
    -          onChanged();
             } else {
               tensorShapeBuilder_.mergeFrom(value);
             }
    -
    +        if (tensorShape_ != null) {
    +          bitField0_ |= 0x00000001;
    +          onChanged();
    +        }
             return this;
           }
           /**
            * .tensorflow.TensorShapeProto tensor_shape = 2;
            */
           public Builder clearTensorShape() {
    -        if (tensorShapeBuilder_ == null) {
    -          tensorShape_ = null;
    -          onChanged();
    -        } else {
    -          tensorShape_ = null;
    +        bitField0_ = (bitField0_ & ~0x00000001);
    +        tensorShape_ = null;
    +        if (tensorShapeBuilder_ != null) {
    +          tensorShapeBuilder_.dispose();
               tensorShapeBuilder_ = null;
             }
    -
    +        onChanged();
             return this;
           }
           /**
            * .tensorflow.TensorShapeProto tensor_shape = 2;
            */
           public org.tensorflow.proto.TensorShapeProto.Builder getTensorShapeBuilder() {
    -        
    +        bitField0_ |= 0x00000001;
             onChanged();
             return getTensorShapeFieldBuilder().getBuilder();
           }
    @@ -2885,11 +2817,11 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getTensorShapeOrBuilder()
           /**
            * .tensorflow.TensorShapeProto tensor_shape = 2;
            */
    -      private com.google.protobuf.SingleFieldBuilderV3<
    +      private com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> 
               getTensorShapeFieldBuilder() {
             if (tensorShapeBuilder_ == null) {
    -          tensorShapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +          tensorShapeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                   org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder>(
                       getTensorShape(),
                       getParentForChildren(),
    @@ -2922,8 +2854,9 @@ public long getTensorSizeBytes() {
            * @return This builder for chaining.
            */
           public Builder setTensorSizeBytes(long value) {
    -        
    +
             tensorSizeBytes_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -2936,23 +2869,11 @@ public Builder setTensorSizeBytes(long value) {
            * @return This builder for chaining.
            */
           public Builder clearTensorSizeBytes() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000002);
             tensorSizeBytes_ = 0L;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.data.experimental.TensorMetadata)
         }
    @@ -3041,37 +2962,34 @@ org.tensorflow.proto.data.experimental.Snapshot.TensorMetadataOrBuilder getTenso
        * Protobuf type {@code tensorflow.data.experimental.SnapshotTensorMetadata}
        */
       public static final class SnapshotTensorMetadata extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.data.experimental.SnapshotTensorMetadata)
           SnapshotTensorMetadataOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        SnapshotTensorMetadata.class.getName());
    +    }
         // Use SnapshotTensorMetadata.newBuilder() to construct.
    -    private SnapshotTensorMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private SnapshotTensorMetadata(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private SnapshotTensorMetadata() {
           tensorMetadata_ = java.util.Collections.emptyList();
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new SnapshotTensorMetadata();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.data.experimental.Snapshot.internal_static_tensorflow_data_experimental_SnapshotTensorMetadata_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.data.experimental.Snapshot.internal_static_tensorflow_data_experimental_SnapshotTensorMetadata_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -3079,6 +2997,7 @@ protected java.lang.Object newInstance(
         }
     
         public static final int TENSOR_METADATA_FIELD_NUMBER = 1;
    +    @SuppressWarnings("serial")
         private java.util.List tensorMetadata_;
         /**
          * repeated .tensorflow.data.experimental.TensorMetadata tensor_metadata = 1;
    @@ -3219,39 +3138,41 @@ public static org.tensorflow.proto.data.experimental.Snapshot.SnapshotTensorMeta
         }
         public static org.tensorflow.proto.data.experimental.Snapshot.SnapshotTensorMetadata parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.experimental.Snapshot.SnapshotTensorMetadata parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.data.experimental.Snapshot.SnapshotTensorMetadata parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.data.experimental.Snapshot.SnapshotTensorMetadata parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.data.experimental.Snapshot.SnapshotTensorMetadata parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.experimental.Snapshot.SnapshotTensorMetadata parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -3271,7 +3192,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -3283,7 +3204,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.data.experimental.SnapshotTensorMetadata}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.data.experimental.SnapshotTensorMetadata)
             org.tensorflow.proto.data.experimental.Snapshot.SnapshotTensorMetadataOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -3292,7 +3213,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.data.experimental.Snapshot.internal_static_tensorflow_data_experimental_SnapshotTensorMetadata_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -3305,13 +3226,14 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             if (tensorMetadataBuilder_ == null) {
               tensorMetadata_ = java.util.Collections.emptyList();
             } else {
    @@ -3345,7 +3267,13 @@ public org.tensorflow.proto.data.experimental.Snapshot.SnapshotTensorMetadata bu
           @java.lang.Override
           public org.tensorflow.proto.data.experimental.Snapshot.SnapshotTensorMetadata buildPartial() {
             org.tensorflow.proto.data.experimental.Snapshot.SnapshotTensorMetadata result = new org.tensorflow.proto.data.experimental.Snapshot.SnapshotTensorMetadata(this);
    -        int from_bitField0_ = bitField0_;
    +        buildPartialRepeatedFields(result);
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        onBuilt();
    +        return result;
    +      }
    +
    +      private void buildPartialRepeatedFields(org.tensorflow.proto.data.experimental.Snapshot.SnapshotTensorMetadata result) {
             if (tensorMetadataBuilder_ == null) {
               if (((bitField0_ & 0x00000001) != 0)) {
                 tensorMetadata_ = java.util.Collections.unmodifiableList(tensorMetadata_);
    @@ -3355,42 +3283,12 @@ public org.tensorflow.proto.data.experimental.Snapshot.SnapshotTensorMetadata bu
             } else {
               result.tensorMetadata_ = tensorMetadataBuilder_.build();
             }
    -        onBuilt();
    -        return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.data.experimental.Snapshot.SnapshotTensorMetadata result) {
    +        int from_bitField0_ = bitField0_;
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.data.experimental.Snapshot.SnapshotTensorMetadata) {
    @@ -3422,7 +3320,7 @@ public Builder mergeFrom(org.tensorflow.proto.data.experimental.Snapshot.Snapsho
                   tensorMetadata_ = other.tensorMetadata_;
                   bitField0_ = (bitField0_ & ~0x00000001);
                   tensorMetadataBuilder_ = 
    -                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                        getTensorMetadataFieldBuilder() : null;
                 } else {
                   tensorMetadataBuilder_.addAllMessages(other.tensorMetadata_);
    @@ -3494,7 +3392,7 @@ private void ensureTensorMetadataIsMutable() {
              }
           }
     
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.data.experimental.Snapshot.TensorMetadata, org.tensorflow.proto.data.experimental.Snapshot.TensorMetadata.Builder, org.tensorflow.proto.data.experimental.Snapshot.TensorMetadataOrBuilder> tensorMetadataBuilder_;
     
           /**
    @@ -3710,11 +3608,11 @@ public org.tensorflow.proto.data.experimental.Snapshot.TensorMetadata.Builder ad
                getTensorMetadataBuilderList() {
             return getTensorMetadataFieldBuilder().getBuilderList();
           }
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.data.experimental.Snapshot.TensorMetadata, org.tensorflow.proto.data.experimental.Snapshot.TensorMetadata.Builder, org.tensorflow.proto.data.experimental.Snapshot.TensorMetadataOrBuilder> 
               getTensorMetadataFieldBuilder() {
             if (tensorMetadataBuilder_ == null) {
    -          tensorMetadataBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +          tensorMetadataBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                   org.tensorflow.proto.data.experimental.Snapshot.TensorMetadata, org.tensorflow.proto.data.experimental.Snapshot.TensorMetadata.Builder, org.tensorflow.proto.data.experimental.Snapshot.TensorMetadataOrBuilder>(
                       tensorMetadata_,
                       ((bitField0_ & 0x00000001) != 0),
    @@ -3724,18 +3622,6 @@ public org.tensorflow.proto.data.experimental.Snapshot.TensorMetadata.Builder ad
             }
             return tensorMetadataBuilder_;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.data.experimental.SnapshotTensorMetadata)
         }
    @@ -3834,12 +3720,21 @@ public interface DistributedSnapshotMetadataOrBuilder extends
        * Protobuf type {@code tensorflow.data.experimental.DistributedSnapshotMetadata}
        */
       public static final class DistributedSnapshotMetadata extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.data.experimental.DistributedSnapshotMetadata)
           DistributedSnapshotMetadataOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        DistributedSnapshotMetadata.class.getName());
    +    }
         // Use DistributedSnapshotMetadata.newBuilder() to construct.
    -    private DistributedSnapshotMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private DistributedSnapshotMetadata(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private DistributedSnapshotMetadata() {
    @@ -3847,25 +3742,13 @@ private DistributedSnapshotMetadata() {
           compression_ = "";
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new DistributedSnapshotMetadata();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.data.experimental.Snapshot.internal_static_tensorflow_data_experimental_DistributedSnapshotMetadata_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.data.experimental.Snapshot.internal_static_tensorflow_data_experimental_DistributedSnapshotMetadata_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -3873,7 +3756,7 @@ protected java.lang.Object newInstance(
         }
     
         public static final int ELEMENT_SPEC_FIELD_NUMBER = 1;
    -    private com.google.protobuf.ByteString elementSpec_;
    +    private com.google.protobuf.ByteString elementSpec_ = com.google.protobuf.ByteString.EMPTY;
         /**
          * 
          * The element spec of the snapshotted dataset.
    @@ -3888,7 +3771,8 @@ public com.google.protobuf.ByteString getElementSpec() {
         }
     
         public static final int COMPRESSION_FIELD_NUMBER = 2;
    -    private volatile java.lang.Object compression_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object compression_ = "";
         /**
          * 
          * Whether and how to compress the snapshot.  Supported values are defined in
    @@ -3954,8 +3838,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           if (!elementSpec_.isEmpty()) {
             output.writeBytes(1, elementSpec_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(compression_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, compression_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(compression_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 2, compression_);
           }
           getUnknownFields().writeTo(output);
         }
    @@ -3970,8 +3854,8 @@ public int getSerializedSize() {
             size += com.google.protobuf.CodedOutputStream
               .computeBytesSize(1, elementSpec_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(compression_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, compression_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(compression_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, compression_);
           }
           size += getUnknownFields().getSerializedSize();
           memoizedSize = size;
    @@ -4046,39 +3930,41 @@ public static org.tensorflow.proto.data.experimental.Snapshot.DistributedSnapsho
         }
         public static org.tensorflow.proto.data.experimental.Snapshot.DistributedSnapshotMetadata parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.experimental.Snapshot.DistributedSnapshotMetadata parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.data.experimental.Snapshot.DistributedSnapshotMetadata parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.data.experimental.Snapshot.DistributedSnapshotMetadata parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.data.experimental.Snapshot.DistributedSnapshotMetadata parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.experimental.Snapshot.DistributedSnapshotMetadata parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -4098,7 +3984,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -4110,7 +3996,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.data.experimental.DistributedSnapshotMetadata}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.data.experimental.DistributedSnapshotMetadata)
             org.tensorflow.proto.data.experimental.Snapshot.DistributedSnapshotMetadataOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -4119,7 +4005,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.data.experimental.Snapshot.internal_static_tensorflow_data_experimental_DistributedSnapshotMetadata_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -4132,17 +4018,16 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             elementSpec_ = com.google.protobuf.ByteString.EMPTY;
    -
             compression_ = "";
    -
             return this;
           }
     
    @@ -4169,44 +4054,21 @@ public org.tensorflow.proto.data.experimental.Snapshot.DistributedSnapshotMetada
           @java.lang.Override
           public org.tensorflow.proto.data.experimental.Snapshot.DistributedSnapshotMetadata buildPartial() {
             org.tensorflow.proto.data.experimental.Snapshot.DistributedSnapshotMetadata result = new org.tensorflow.proto.data.experimental.Snapshot.DistributedSnapshotMetadata(this);
    -        result.elementSpec_ = elementSpec_;
    -        result.compression_ = compression_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.data.experimental.Snapshot.DistributedSnapshotMetadata result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.elementSpec_ = elementSpec_;
    +        }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.compression_ = compression_;
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.data.experimental.Snapshot.DistributedSnapshotMetadata) {
    @@ -4224,6 +4086,7 @@ public Builder mergeFrom(org.tensorflow.proto.data.experimental.Snapshot.Distrib
             }
             if (!other.getCompression().isEmpty()) {
               compression_ = other.compression_;
    +          bitField0_ |= 0x00000002;
               onChanged();
             }
             this.mergeUnknownFields(other.getUnknownFields());
    @@ -4254,12 +4117,12 @@ public Builder mergeFrom(
                     break;
                   case 10: {
                     elementSpec_ = input.readBytes();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 10
                   case 18: {
                     compression_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 18
                   default: {
    @@ -4277,6 +4140,7 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    +      private int bitField0_;
     
           private com.google.protobuf.ByteString elementSpec_ = com.google.protobuf.ByteString.EMPTY;
           /**
    @@ -4301,11 +4165,9 @@ public com.google.protobuf.ByteString getElementSpec() {
            * @return This builder for chaining.
            */
           public Builder setElementSpec(com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             elementSpec_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -4318,7 +4180,7 @@ public Builder setElementSpec(com.google.protobuf.ByteString value) {
            * @return This builder for chaining.
            */
           public Builder clearElementSpec() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000001);
             elementSpec_ = getDefaultInstance().getElementSpec();
             onChanged();
             return this;
    @@ -4383,11 +4245,9 @@ public java.lang.String getCompression() {
            */
           public Builder setCompression(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             compression_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -4402,8 +4262,8 @@ public Builder setCompression(
            * @return This builder for chaining.
            */
           public Builder clearCompression() {
    -        
             compression_ = getDefaultInstance().getCompression();
    +        bitField0_ = (bitField0_ & ~0x00000002);
             onChanged();
             return this;
           }
    @@ -4420,27 +4280,13 @@ public Builder clearCompression() {
            */
           public Builder setCompressionBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             compression_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.data.experimental.DistributedSnapshotMetadata)
         }
    @@ -4496,27 +4342,27 @@ public org.tensorflow.proto.data.experimental.Snapshot.DistributedSnapshotMetada
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_data_experimental_SnapshotRecord_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_data_experimental_SnapshotRecord_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_data_experimental_SnapshotMetadataRecord_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_data_experimental_SnapshotMetadataRecord_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_data_experimental_TensorMetadata_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_data_experimental_TensorMetadata_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_data_experimental_SnapshotTensorMetadata_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_data_experimental_SnapshotTensorMetadata_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_data_experimental_DistributedSnapshotMetadata_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_data_experimental_DistributedSnapshotMetadata_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -4560,33 +4406,34 @@ public org.tensorflow.proto.data.experimental.Snapshot.DistributedSnapshotMetada
         internal_static_tensorflow_data_experimental_SnapshotRecord_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_data_experimental_SnapshotRecord_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_data_experimental_SnapshotRecord_descriptor,
             new java.lang.String[] { "Tensor", });
         internal_static_tensorflow_data_experimental_SnapshotMetadataRecord_descriptor =
           getDescriptor().getMessageTypes().get(1);
         internal_static_tensorflow_data_experimental_SnapshotMetadataRecord_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_data_experimental_SnapshotMetadataRecord_descriptor,
             new java.lang.String[] { "GraphHash", "RunId", "CreationTimestamp", "Version", "Dtype", "NumElements", "Finalized", });
         internal_static_tensorflow_data_experimental_TensorMetadata_descriptor =
           getDescriptor().getMessageTypes().get(2);
         internal_static_tensorflow_data_experimental_TensorMetadata_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_data_experimental_TensorMetadata_descriptor,
             new java.lang.String[] { "TensorShape", "TensorSizeBytes", });
         internal_static_tensorflow_data_experimental_SnapshotTensorMetadata_descriptor =
           getDescriptor().getMessageTypes().get(3);
         internal_static_tensorflow_data_experimental_SnapshotTensorMetadata_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_data_experimental_SnapshotTensorMetadata_descriptor,
             new java.lang.String[] { "TensorMetadata", });
         internal_static_tensorflow_data_experimental_DistributedSnapshotMetadata_descriptor =
           getDescriptor().getMessageTypes().get(4);
         internal_static_tensorflow_data_experimental_DistributedSnapshotMetadata_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_data_experimental_DistributedSnapshotMetadata_descriptor,
             new java.lang.String[] { "ElementSpec", "Compression", });
    +    descriptor.resolveAllFeaturesImmutable();
         org.tensorflow.proto.TensorProtos.getDescriptor();
         org.tensorflow.proto.TensorShapeProtos.getDescriptor();
         org.tensorflow.proto.TypesProtos.getDescriptor();
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/model/Model.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/model/Model.java
    index e89b1024d4c..871c4585112 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/model/Model.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/model/Model.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/framework/model.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto.data.model;
     
     public final class Model {
       private Model() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      Model.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -54,6 +65,15 @@ public enum NodeClass
         UNRECOGNIZED(-1),
         ;
     
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        NodeClass.class.getName());
    +    }
         /**
          * UNKNOWN = 0;
          */
    @@ -203,6 +223,15 @@ public enum AutotuneAlgorithm
         UNRECOGNIZED(-1),
         ;
     
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        AutotuneAlgorithm.class.getName());
    +    }
         /**
          * DEFAULT = 0;
          */
    @@ -373,7 +402,6 @@ boolean containsNodes(
          *
          * map<int64, .tensorflow.data.model.ModelProto.Node> nodes = 1;
          */
    -
         /* nullable */
     org.tensorflow.proto.data.model.Model.ModelProto.Node getNodesOrDefault(
             long key,
    @@ -386,7 +414,6 @@ org.tensorflow.proto.data.model.Model.ModelProto.Node getNodesOrDefault(
          *
          * map<int64, .tensorflow.data.model.ModelProto.Node> nodes = 1;
          */
    -
         org.tensorflow.proto.data.model.Model.ModelProto.Node getNodesOrThrow(
             long key);
     
    @@ -451,12 +478,21 @@ org.tensorflow.proto.data.model.Model.ModelProto.Node getNodesOrThrow(
        * Protobuf type {@code tensorflow.data.model.ModelProto}
        */
       public static final class ModelProto extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.data.model.ModelProto)
           ModelProtoOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        ModelProto.class.getName());
    +    }
         // Use ModelProto.newBuilder() to construct.
    -    private ModelProto(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private ModelProto(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private ModelProto() {
    @@ -464,18 +500,6 @@ private ModelProto() {
           gapTimes_ = emptyLongList();
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new ModelProto();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.data.model.Model.internal_static_tensorflow_data_model_ModelProto_descriptor;
    @@ -483,7 +507,7 @@ protected java.lang.Object newInstance(
     
         @SuppressWarnings({"rawtypes"})
         @java.lang.Override
    -    protected com.google.protobuf.MapField internalGetMapField(
    +    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
             int number) {
           switch (number) {
             case 1:
    @@ -494,7 +518,7 @@ protected com.google.protobuf.MapField internalGetMapField(
           }
         }
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.data.model.Model.internal_static_tensorflow_data_model_ModelProto_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -754,12 +778,21 @@ org.tensorflow.proto.data.model.Model.ModelProto.Node.ParameterOrBuilder getPara
          * Protobuf type {@code tensorflow.data.model.ModelProto.Node}
          */
         public static final class Node extends
    -        com.google.protobuf.GeneratedMessageV3 implements
    +        com.google.protobuf.GeneratedMessage implements
             // @@protoc_insertion_point(message_implements:tensorflow.data.model.ModelProto.Node)
             NodeOrBuilder {
         private static final long serialVersionUID = 0L;
    +      static {
    +        com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +          com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +          /* major= */ 4,
    +          /* minor= */ 28,
    +          /* patch= */ 3,
    +          /* suffix= */ "",
    +          Node.class.getName());
    +      }
           // Use Node.newBuilder() to construct.
    -      private Node(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +      private Node(com.google.protobuf.GeneratedMessage.Builder builder) {
             super(builder);
           }
           private Node() {
    @@ -769,25 +802,13 @@ private Node() {
             nodeClass_ = 0;
           }
     
    -      @java.lang.Override
    -      @SuppressWarnings({"unused"})
    -      protected java.lang.Object newInstance(
    -          UnusedPrivateParameter unused) {
    -        return new Node();
    -      }
    -
    -      @java.lang.Override
    -      public final com.google.protobuf.UnknownFieldSet
    -      getUnknownFields() {
    -        return this.unknownFields;
    -      }
           public static final com.google.protobuf.Descriptors.Descriptor
               getDescriptor() {
             return org.tensorflow.proto.data.model.Model.internal_static_tensorflow_data_model_ModelProto_Node_descriptor;
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.data.model.Model.internal_static_tensorflow_data_model_ModelProto_Node_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -877,37 +898,34 @@ public interface ParameterOrBuilder extends
            * Protobuf type {@code tensorflow.data.model.ModelProto.Node.Parameter}
            */
           public static final class Parameter extends
    -          com.google.protobuf.GeneratedMessageV3 implements
    +          com.google.protobuf.GeneratedMessage implements
               // @@protoc_insertion_point(message_implements:tensorflow.data.model.ModelProto.Node.Parameter)
               ParameterOrBuilder {
           private static final long serialVersionUID = 0L;
    +        static {
    +          com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +            com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +            /* major= */ 4,
    +            /* minor= */ 28,
    +            /* patch= */ 3,
    +            /* suffix= */ "",
    +            Parameter.class.getName());
    +        }
             // Use Parameter.newBuilder() to construct.
    -        private Parameter(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +        private Parameter(com.google.protobuf.GeneratedMessage.Builder builder) {
               super(builder);
             }
             private Parameter() {
               name_ = "";
             }
     
    -        @java.lang.Override
    -        @SuppressWarnings({"unused"})
    -        protected java.lang.Object newInstance(
    -            UnusedPrivateParameter unused) {
    -          return new Parameter();
    -        }
    -
    -        @java.lang.Override
    -        public final com.google.protobuf.UnknownFieldSet
    -        getUnknownFields() {
    -          return this.unknownFields;
    -        }
             public static final com.google.protobuf.Descriptors.Descriptor
                 getDescriptor() {
               return org.tensorflow.proto.data.model.Model.internal_static_tensorflow_data_model_ModelProto_Node_Parameter_descriptor;
             }
     
             @java.lang.Override
    -        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +        protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
                 internalGetFieldAccessorTable() {
               return org.tensorflow.proto.data.model.Model.internal_static_tensorflow_data_model_ModelProto_Node_Parameter_fieldAccessorTable
                   .ensureFieldAccessorsInitialized(
    @@ -915,7 +933,8 @@ protected java.lang.Object newInstance(
             }
     
             public static final int NAME_FIELD_NUMBER = 1;
    -        private volatile java.lang.Object name_;
    +        @SuppressWarnings("serial")
    +        private volatile java.lang.Object name_ = "";
             /**
              * 
              * Human-readable name of the parameter.
    @@ -961,7 +980,7 @@ public java.lang.String getName() {
             }
     
             public static final int VALUE_FIELD_NUMBER = 2;
    -        private double value_;
    +        private double value_ = 0D;
             /**
              * 
              * Identifies the model value of the parameter. This can be different from
    @@ -977,7 +996,7 @@ public double getValue() {
             }
     
             public static final int STATE_VALUE_FIELD_NUMBER = 3;
    -        private double stateValue_;
    +        private double stateValue_ = 0D;
             /**
              * 
              * The actual value of the parameter.
    @@ -992,7 +1011,7 @@ public double getStateValue() {
             }
     
             public static final int MIN_FIELD_NUMBER = 4;
    -        private double min_;
    +        private double min_ = 0D;
             /**
              * 
              * Minimum value of the parameter.
    @@ -1007,7 +1026,7 @@ public double getMin() {
             }
     
             public static final int MAX_FIELD_NUMBER = 5;
    -        private double max_;
    +        private double max_ = 0D;
             /**
              * 
              * Maximum value of the parameter.
    @@ -1022,7 +1041,7 @@ public double getMax() {
             }
     
             public static final int TUNABLE_FIELD_NUMBER = 6;
    -        private boolean tunable_;
    +        private boolean tunable_ = false;
             /**
              * 
              * Identifies whether the parameter should participate in autotuning.
    @@ -1050,8 +1069,8 @@ public final boolean isInitialized() {
             @java.lang.Override
             public void writeTo(com.google.protobuf.CodedOutputStream output)
                                 throws java.io.IOException {
    -          if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -            com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    +          if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +            com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
               }
               if (java.lang.Double.doubleToRawLongBits(value_) != 0) {
                 output.writeDouble(2, value_);
    @@ -1077,8 +1096,8 @@ public int getSerializedSize() {
               if (size != -1) return size;
     
               size = 0;
    -          if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    +          if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +            size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
               }
               if (java.lang.Double.doubleToRawLongBits(value_) != 0) {
                 size += com.google.protobuf.CodedOutputStream
    @@ -1198,39 +1217,41 @@ public static org.tensorflow.proto.data.model.Model.ModelProto.Node.Parameter pa
             }
             public static org.tensorflow.proto.data.model.Model.ModelProto.Node.Parameter parseFrom(java.io.InputStream input)
                 throws java.io.IOException {
    -          return com.google.protobuf.GeneratedMessageV3
    +          return com.google.protobuf.GeneratedMessage
                   .parseWithIOException(PARSER, input);
             }
             public static org.tensorflow.proto.data.model.Model.ModelProto.Node.Parameter parseFrom(
                 java.io.InputStream input,
                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                 throws java.io.IOException {
    -          return com.google.protobuf.GeneratedMessageV3
    +          return com.google.protobuf.GeneratedMessage
                   .parseWithIOException(PARSER, input, extensionRegistry);
             }
    +
             public static org.tensorflow.proto.data.model.Model.ModelProto.Node.Parameter parseDelimitedFrom(java.io.InputStream input)
                 throws java.io.IOException {
    -          return com.google.protobuf.GeneratedMessageV3
    +          return com.google.protobuf.GeneratedMessage
                   .parseDelimitedWithIOException(PARSER, input);
             }
    +
             public static org.tensorflow.proto.data.model.Model.ModelProto.Node.Parameter parseDelimitedFrom(
                 java.io.InputStream input,
                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                 throws java.io.IOException {
    -          return com.google.protobuf.GeneratedMessageV3
    +          return com.google.protobuf.GeneratedMessage
                   .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
             }
             public static org.tensorflow.proto.data.model.Model.ModelProto.Node.Parameter parseFrom(
                 com.google.protobuf.CodedInputStream input)
                 throws java.io.IOException {
    -          return com.google.protobuf.GeneratedMessageV3
    +          return com.google.protobuf.GeneratedMessage
                   .parseWithIOException(PARSER, input);
             }
             public static org.tensorflow.proto.data.model.Model.ModelProto.Node.Parameter parseFrom(
                 com.google.protobuf.CodedInputStream input,
                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                 throws java.io.IOException {
    -          return com.google.protobuf.GeneratedMessageV3
    +          return com.google.protobuf.GeneratedMessage
                   .parseWithIOException(PARSER, input, extensionRegistry);
             }
     
    @@ -1250,7 +1271,7 @@ public Builder toBuilder() {
     
             @java.lang.Override
             protected Builder newBuilderForType(
    -            com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +            com.google.protobuf.GeneratedMessage.BuilderParent parent) {
               Builder builder = new Builder(parent);
               return builder;
             }
    @@ -1262,7 +1283,7 @@ protected Builder newBuilderForType(
              * Protobuf type {@code tensorflow.data.model.ModelProto.Node.Parameter}
              */
             public static final class Builder extends
    -            com.google.protobuf.GeneratedMessageV3.Builder implements
    +            com.google.protobuf.GeneratedMessage.Builder implements
                 // @@protoc_insertion_point(builder_implements:tensorflow.data.model.ModelProto.Node.Parameter)
                 org.tensorflow.proto.data.model.Model.ModelProto.Node.ParameterOrBuilder {
               public static final com.google.protobuf.Descriptors.Descriptor
    @@ -1271,7 +1292,7 @@ public static final class Builder extends
               }
     
               @java.lang.Override
    -          protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +          protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
                   internalGetFieldAccessorTable() {
                 return org.tensorflow.proto.data.model.Model.internal_static_tensorflow_data_model_ModelProto_Node_Parameter_fieldAccessorTable
                     .ensureFieldAccessorsInitialized(
    @@ -1284,25 +1305,20 @@ private Builder() {
               }
     
               private Builder(
    -              com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +              com.google.protobuf.GeneratedMessage.BuilderParent parent) {
                 super(parent);
     
               }
               @java.lang.Override
               public Builder clear() {
                 super.clear();
    +            bitField0_ = 0;
                 name_ = "";
    -
                 value_ = 0D;
    -
                 stateValue_ = 0D;
    -
                 min_ = 0D;
    -
                 max_ = 0D;
    -
                 tunable_ = false;
    -
                 return this;
               }
     
    @@ -1329,48 +1345,33 @@ public org.tensorflow.proto.data.model.Model.ModelProto.Node.Parameter build() {
               @java.lang.Override
               public org.tensorflow.proto.data.model.Model.ModelProto.Node.Parameter buildPartial() {
                 org.tensorflow.proto.data.model.Model.ModelProto.Node.Parameter result = new org.tensorflow.proto.data.model.Model.ModelProto.Node.Parameter(this);
    -            result.name_ = name_;
    -            result.value_ = value_;
    -            result.stateValue_ = stateValue_;
    -            result.min_ = min_;
    -            result.max_ = max_;
    -            result.tunable_ = tunable_;
    +            if (bitField0_ != 0) { buildPartial0(result); }
                 onBuilt();
                 return result;
               }
     
    -          @java.lang.Override
    -          public Builder clone() {
    -            return super.clone();
    -          }
    -          @java.lang.Override
    -          public Builder setField(
    -              com.google.protobuf.Descriptors.FieldDescriptor field,
    -              java.lang.Object value) {
    -            return super.setField(field, value);
    -          }
    -          @java.lang.Override
    -          public Builder clearField(
    -              com.google.protobuf.Descriptors.FieldDescriptor field) {
    -            return super.clearField(field);
    -          }
    -          @java.lang.Override
    -          public Builder clearOneof(
    -              com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -            return super.clearOneof(oneof);
    -          }
    -          @java.lang.Override
    -          public Builder setRepeatedField(
    -              com.google.protobuf.Descriptors.FieldDescriptor field,
    -              int index, java.lang.Object value) {
    -            return super.setRepeatedField(field, index, value);
    -          }
    -          @java.lang.Override
    -          public Builder addRepeatedField(
    -              com.google.protobuf.Descriptors.FieldDescriptor field,
    -              java.lang.Object value) {
    -            return super.addRepeatedField(field, value);
    +          private void buildPartial0(org.tensorflow.proto.data.model.Model.ModelProto.Node.Parameter result) {
    +            int from_bitField0_ = bitField0_;
    +            if (((from_bitField0_ & 0x00000001) != 0)) {
    +              result.name_ = name_;
    +            }
    +            if (((from_bitField0_ & 0x00000002) != 0)) {
    +              result.value_ = value_;
    +            }
    +            if (((from_bitField0_ & 0x00000004) != 0)) {
    +              result.stateValue_ = stateValue_;
    +            }
    +            if (((from_bitField0_ & 0x00000008) != 0)) {
    +              result.min_ = min_;
    +            }
    +            if (((from_bitField0_ & 0x00000010) != 0)) {
    +              result.max_ = max_;
    +            }
    +            if (((from_bitField0_ & 0x00000020) != 0)) {
    +              result.tunable_ = tunable_;
    +            }
               }
    +
               @java.lang.Override
               public Builder mergeFrom(com.google.protobuf.Message other) {
                 if (other instanceof org.tensorflow.proto.data.model.Model.ModelProto.Node.Parameter) {
    @@ -1385,6 +1386,7 @@ public Builder mergeFrom(org.tensorflow.proto.data.model.Model.ModelProto.Node.P
                 if (other == org.tensorflow.proto.data.model.Model.ModelProto.Node.Parameter.getDefaultInstance()) return this;
                 if (!other.getName().isEmpty()) {
                   name_ = other.name_;
    +              bitField0_ |= 0x00000001;
                   onChanged();
                 }
                 if (other.getValue() != 0D) {
    @@ -1430,32 +1432,32 @@ public Builder mergeFrom(
                         break;
                       case 10: {
                         name_ = input.readStringRequireUtf8();
    -
    +                    bitField0_ |= 0x00000001;
                         break;
                       } // case 10
                       case 17: {
                         value_ = input.readDouble();
    -
    +                    bitField0_ |= 0x00000002;
                         break;
                       } // case 17
                       case 25: {
                         stateValue_ = input.readDouble();
    -
    +                    bitField0_ |= 0x00000004;
                         break;
                       } // case 25
                       case 33: {
                         min_ = input.readDouble();
    -
    +                    bitField0_ |= 0x00000008;
                         break;
                       } // case 33
                       case 41: {
                         max_ = input.readDouble();
    -
    +                    bitField0_ |= 0x00000010;
                         break;
                       } // case 41
                       case 48: {
                         tunable_ = input.readBool();
    -
    +                    bitField0_ |= 0x00000020;
                         break;
                       } // case 48
                       default: {
    @@ -1473,6 +1475,7 @@ public Builder mergeFrom(
                 } // finally
                 return this;
               }
    +          private int bitField0_;
     
               private java.lang.Object name_ = "";
               /**
    @@ -1527,11 +1530,9 @@ public java.lang.String getName() {
                */
               public Builder setName(
                   java.lang.String value) {
    -            if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +            if (value == null) { throw new NullPointerException(); }
                 name_ = value;
    +            bitField0_ |= 0x00000001;
                 onChanged();
                 return this;
               }
    @@ -1544,8 +1545,8 @@ public Builder setName(
                * @return This builder for chaining.
                */
               public Builder clearName() {
    -            
                 name_ = getDefaultInstance().getName();
    +            bitField0_ = (bitField0_ & ~0x00000001);
                 onChanged();
                 return this;
               }
    @@ -1560,12 +1561,10 @@ public Builder clearName() {
                */
               public Builder setNameBytes(
                   com.google.protobuf.ByteString value) {
    -            if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -            
    +            if (value == null) { throw new NullPointerException(); }
    +            checkByteStringIsUtf8(value);
                 name_ = value;
    +            bitField0_ |= 0x00000001;
                 onChanged();
                 return this;
               }
    @@ -1595,8 +1594,9 @@ public double getValue() {
                * @return This builder for chaining.
                */
               public Builder setValue(double value) {
    -            
    +
                 value_ = value;
    +            bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
               }
    @@ -1610,7 +1610,7 @@ public Builder setValue(double value) {
                * @return This builder for chaining.
                */
               public Builder clearValue() {
    -            
    +            bitField0_ = (bitField0_ & ~0x00000002);
                 value_ = 0D;
                 onChanged();
                 return this;
    @@ -1639,8 +1639,9 @@ public double getStateValue() {
                * @return This builder for chaining.
                */
               public Builder setStateValue(double value) {
    -            
    +
                 stateValue_ = value;
    +            bitField0_ |= 0x00000004;
                 onChanged();
                 return this;
               }
    @@ -1653,7 +1654,7 @@ public Builder setStateValue(double value) {
                * @return This builder for chaining.
                */
               public Builder clearStateValue() {
    -            
    +            bitField0_ = (bitField0_ & ~0x00000004);
                 stateValue_ = 0D;
                 onChanged();
                 return this;
    @@ -1682,8 +1683,9 @@ public double getMin() {
                * @return This builder for chaining.
                */
               public Builder setMin(double value) {
    -            
    +
                 min_ = value;
    +            bitField0_ |= 0x00000008;
                 onChanged();
                 return this;
               }
    @@ -1696,7 +1698,7 @@ public Builder setMin(double value) {
                * @return This builder for chaining.
                */
               public Builder clearMin() {
    -            
    +            bitField0_ = (bitField0_ & ~0x00000008);
                 min_ = 0D;
                 onChanged();
                 return this;
    @@ -1725,8 +1727,9 @@ public double getMax() {
                * @return This builder for chaining.
                */
               public Builder setMax(double value) {
    -            
    +
                 max_ = value;
    +            bitField0_ |= 0x00000010;
                 onChanged();
                 return this;
               }
    @@ -1739,7 +1742,7 @@ public Builder setMax(double value) {
                * @return This builder for chaining.
                */
               public Builder clearMax() {
    -            
    +            bitField0_ = (bitField0_ & ~0x00000010);
                 max_ = 0D;
                 onChanged();
                 return this;
    @@ -1768,8 +1771,9 @@ public boolean getTunable() {
                * @return This builder for chaining.
                */
               public Builder setTunable(boolean value) {
    -            
    +
                 tunable_ = value;
    +            bitField0_ |= 0x00000020;
                 onChanged();
                 return this;
               }
    @@ -1782,23 +1786,11 @@ public Builder setTunable(boolean value) {
                * @return This builder for chaining.
                */
               public Builder clearTunable() {
    -            
    +            bitField0_ = (bitField0_ & ~0x00000020);
                 tunable_ = false;
                 onChanged();
                 return this;
               }
    -          @java.lang.Override
    -          public final Builder setUnknownFields(
    -              final com.google.protobuf.UnknownFieldSet unknownFields) {
    -            return super.setUnknownFields(unknownFields);
    -          }
    -
    -          @java.lang.Override
    -          public final Builder mergeUnknownFields(
    -              final com.google.protobuf.UnknownFieldSet unknownFields) {
    -            return super.mergeUnknownFields(unknownFields);
    -          }
    -
     
               // @@protoc_insertion_point(builder_scope:tensorflow.data.model.ModelProto.Node.Parameter)
             }
    @@ -1852,7 +1844,7 @@ public org.tensorflow.proto.data.model.Model.ModelProto.Node.Parameter getDefaul
           }
     
           public static final int ID_FIELD_NUMBER = 1;
    -      private long id_;
    +      private long id_ = 0L;
           /**
            * 
            * Unique node ID.
    @@ -1867,7 +1859,8 @@ public long getId() {
           }
     
           public static final int NAME_FIELD_NUMBER = 2;
    -      private volatile java.lang.Object name_;
    +      @SuppressWarnings("serial")
    +      private volatile java.lang.Object name_ = "";
           /**
            * 
            * Human-readable name of the node.
    @@ -1913,7 +1906,7 @@ public java.lang.String getName() {
           }
     
           public static final int AUTOTUNE_FIELD_NUMBER = 3;
    -      private boolean autotune_;
    +      private boolean autotune_ = false;
           /**
            * 
            * An indication whether autotuning is enabled for this node.
    @@ -1928,7 +1921,7 @@ public boolean getAutotune() {
           }
     
           public static final int BUFFERED_BYTES_FIELD_NUMBER = 4;
    -      private long bufferedBytes_;
    +      private long bufferedBytes_ = 0L;
           /**
            * 
            * The number of bytes stored in this node's buffer.
    @@ -1943,7 +1936,7 @@ public long getBufferedBytes() {
           }
     
           public static final int BUFFERED_ELEMENTS_FIELD_NUMBER = 5;
    -      private long bufferedElements_;
    +      private long bufferedElements_ = 0L;
           /**
            * 
            * The number of elements stored in this node's buffer.
    @@ -1958,7 +1951,7 @@ public long getBufferedElements() {
           }
     
           public static final int BYTES_CONSUMED_FIELD_NUMBER = 6;
    -      private long bytesConsumed_;
    +      private long bytesConsumed_ = 0L;
           /**
            * 
            * The number of bytes consumed by the node.
    @@ -1973,7 +1966,7 @@ public long getBytesConsumed() {
           }
     
           public static final int BYTES_PRODUCED_FIELD_NUMBER = 7;
    -      private long bytesProduced_;
    +      private long bytesProduced_ = 0L;
           /**
            * 
            * The number of bytes produced by the node.
    @@ -1988,7 +1981,7 @@ public long getBytesProduced() {
           }
     
           public static final int NUM_ELEMENTS_FIELD_NUMBER = 8;
    -      private long numElements_;
    +      private long numElements_ = 0L;
           /**
            * 
            * The number of elements produced by the node.
    @@ -2003,7 +1996,7 @@ public long getNumElements() {
           }
     
           public static final int PROCESSING_TIME_FIELD_NUMBER = 9;
    -      private long processingTime_;
    +      private long processingTime_ = 0L;
           /**
            * 
            * The aggregate processing time spent in this node in nanoseconds.
    @@ -2018,7 +2011,7 @@ public long getProcessingTime() {
           }
     
           public static final int RECORD_METRICS_FIELD_NUMBER = 10;
    -      private boolean recordMetrics_;
    +      private boolean recordMetrics_ = false;
           /**
            * 
            * An indication whether this node records metrics about produced and
    @@ -2034,6 +2027,7 @@ public boolean getRecordMetrics() {
           }
     
           public static final int PARAMETERS_FIELD_NUMBER = 11;
    +      @SuppressWarnings("serial")
           private java.util.List parameters_;
           /**
            * 
    @@ -2094,7 +2088,7 @@ public org.tensorflow.proto.data.model.Model.ModelProto.Node.ParameterOrBuilder
           }
     
           public static final int INPUT_PROCESSING_TIME_SUM_FIELD_NUMBER = 12;
    -      private double inputProcessingTimeSum_;
    +      private double inputProcessingTimeSum_ = 0D;
           /**
            * 
            * Statistic of inputs processing time history.
    @@ -2109,7 +2103,7 @@ public double getInputProcessingTimeSum() {
           }
     
           public static final int INPUT_PROCESSING_TIME_COUNT_FIELD_NUMBER = 13;
    -      private long inputProcessingTimeCount_;
    +      private long inputProcessingTimeCount_ = 0L;
           /**
            * int64 input_processing_time_count = 13;
            * @return The inputProcessingTimeCount.
    @@ -2120,7 +2114,9 @@ public long getInputProcessingTimeCount() {
           }
     
           public static final int INPUTS_FIELD_NUMBER = 14;
    -      private com.google.protobuf.Internal.LongList inputs_;
    +      @SuppressWarnings("serial")
    +      private com.google.protobuf.Internal.LongList inputs_ =
    +          emptyLongList();
           /**
            * 
            * IDs of inputs of this node.
    @@ -2160,7 +2156,7 @@ public long getInputs(int index) {
           private int inputsMemoizedSerializedSize = -1;
     
           public static final int NODE_CLASS_FIELD_NUMBER = 15;
    -      private int nodeClass_;
    +      private int nodeClass_ = 0;
           /**
            * 
            * Class of this node.
    @@ -2181,13 +2177,12 @@ public long getInputs(int index) {
            * @return The nodeClass.
            */
           @java.lang.Override public org.tensorflow.proto.data.model.Model.NodeClass getNodeClass() {
    -        @SuppressWarnings("deprecation")
    -        org.tensorflow.proto.data.model.Model.NodeClass result = org.tensorflow.proto.data.model.Model.NodeClass.valueOf(nodeClass_);
    +        org.tensorflow.proto.data.model.Model.NodeClass result = org.tensorflow.proto.data.model.Model.NodeClass.forNumber(nodeClass_);
             return result == null ? org.tensorflow.proto.data.model.Model.NodeClass.UNRECOGNIZED : result;
           }
     
           public static final int RATIO_FIELD_NUMBER = 16;
    -      private double ratio_;
    +      private double ratio_ = 0D;
           /**
            * 
            * Ratio of input to output elements. This is only used by KNOWN_RATIO and
    @@ -2203,7 +2198,7 @@ public double getRatio() {
           }
     
           public static final int MEMORY_RATIO_FIELD_NUMBER = 17;
    -      private double memoryRatio_;
    +      private double memoryRatio_ = 0D;
           /**
            * 
            * Ratio identifies how many parallelism calls are introduced by one
    @@ -2236,8 +2231,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
             if (id_ != 0L) {
               output.writeInt64(1, id_);
             }
    -        if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -          com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_);
    +        if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +          com.google.protobuf.GeneratedMessage.writeString(output, 2, name_);
             }
             if (autotune_ != false) {
               output.writeBool(3, autotune_);
    @@ -2301,8 +2296,8 @@ public int getSerializedSize() {
               size += com.google.protobuf.CodedOutputStream
                 .computeInt64Size(1, id_);
             }
    -        if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -          size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_);
    +        if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +          size += com.google.protobuf.GeneratedMessage.computeStringSize(2, name_);
             }
             if (autotune_ != false) {
               size += com.google.protobuf.CodedOutputStream
    @@ -2526,39 +2521,41 @@ public static org.tensorflow.proto.data.model.Model.ModelProto.Node parseFrom(
           }
           public static org.tensorflow.proto.data.model.Model.ModelProto.Node parseFrom(java.io.InputStream input)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input);
           }
           public static org.tensorflow.proto.data.model.Model.ModelProto.Node parseFrom(
               java.io.InputStream input,
               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input, extensionRegistry);
           }
    +
           public static org.tensorflow.proto.data.model.Model.ModelProto.Node parseDelimitedFrom(java.io.InputStream input)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseDelimitedWithIOException(PARSER, input);
           }
    +
           public static org.tensorflow.proto.data.model.Model.ModelProto.Node parseDelimitedFrom(
               java.io.InputStream input,
               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
           }
           public static org.tensorflow.proto.data.model.Model.ModelProto.Node parseFrom(
               com.google.protobuf.CodedInputStream input)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input);
           }
           public static org.tensorflow.proto.data.model.Model.ModelProto.Node parseFrom(
               com.google.protobuf.CodedInputStream input,
               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input, extensionRegistry);
           }
     
    @@ -2578,7 +2575,7 @@ public Builder toBuilder() {
     
           @java.lang.Override
           protected Builder newBuilderForType(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             Builder builder = new Builder(parent);
             return builder;
           }
    @@ -2590,7 +2587,7 @@ protected Builder newBuilderForType(
            * Protobuf type {@code tensorflow.data.model.ModelProto.Node}
            */
           public static final class Builder extends
    -          com.google.protobuf.GeneratedMessageV3.Builder implements
    +          com.google.protobuf.GeneratedMessage.Builder implements
               // @@protoc_insertion_point(builder_implements:tensorflow.data.model.ModelProto.Node)
               org.tensorflow.proto.data.model.Model.ModelProto.NodeOrBuilder {
             public static final com.google.protobuf.Descriptors.Descriptor
    @@ -2599,7 +2596,7 @@ public static final class Builder extends
             }
     
             @java.lang.Override
    -        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +        protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
                 internalGetFieldAccessorTable() {
               return org.tensorflow.proto.data.model.Model.internal_static_tensorflow_data_model_ModelProto_Node_fieldAccessorTable
                   .ensureFieldAccessorsInitialized(
    @@ -2612,52 +2609,37 @@ private Builder() {
             }
     
             private Builder(
    -            com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +            com.google.protobuf.GeneratedMessage.BuilderParent parent) {
               super(parent);
     
             }
             @java.lang.Override
             public Builder clear() {
               super.clear();
    +          bitField0_ = 0;
               id_ = 0L;
    -
               name_ = "";
    -
               autotune_ = false;
    -
               bufferedBytes_ = 0L;
    -
               bufferedElements_ = 0L;
    -
               bytesConsumed_ = 0L;
    -
               bytesProduced_ = 0L;
    -
               numElements_ = 0L;
    -
               processingTime_ = 0L;
    -
               recordMetrics_ = false;
    -
               if (parametersBuilder_ == null) {
                 parameters_ = java.util.Collections.emptyList();
               } else {
                 parameters_ = null;
                 parametersBuilder_.clear();
               }
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ = (bitField0_ & ~0x00000400);
               inputProcessingTimeSum_ = 0D;
    -
               inputProcessingTimeCount_ = 0L;
    -
               inputs_ = emptyLongList();
    -          bitField0_ = (bitField0_ & ~0x00000002);
               nodeClass_ = 0;
    -
               ratio_ = 0D;
    -
               memoryRatio_ = 0D;
    -
               return this;
             }
     
    @@ -2684,72 +2666,77 @@ public org.tensorflow.proto.data.model.Model.ModelProto.Node build() {
             @java.lang.Override
             public org.tensorflow.proto.data.model.Model.ModelProto.Node buildPartial() {
               org.tensorflow.proto.data.model.Model.ModelProto.Node result = new org.tensorflow.proto.data.model.Model.ModelProto.Node(this);
    -          int from_bitField0_ = bitField0_;
    -          result.id_ = id_;
    -          result.name_ = name_;
    -          result.autotune_ = autotune_;
    -          result.bufferedBytes_ = bufferedBytes_;
    -          result.bufferedElements_ = bufferedElements_;
    -          result.bytesConsumed_ = bytesConsumed_;
    -          result.bytesProduced_ = bytesProduced_;
    -          result.numElements_ = numElements_;
    -          result.processingTime_ = processingTime_;
    -          result.recordMetrics_ = recordMetrics_;
    +          buildPartialRepeatedFields(result);
    +          if (bitField0_ != 0) { buildPartial0(result); }
    +          onBuilt();
    +          return result;
    +        }
    +
    +        private void buildPartialRepeatedFields(org.tensorflow.proto.data.model.Model.ModelProto.Node result) {
               if (parametersBuilder_ == null) {
    -            if (((bitField0_ & 0x00000001) != 0)) {
    +            if (((bitField0_ & 0x00000400) != 0)) {
                   parameters_ = java.util.Collections.unmodifiableList(parameters_);
    -              bitField0_ = (bitField0_ & ~0x00000001);
    +              bitField0_ = (bitField0_ & ~0x00000400);
                 }
                 result.parameters_ = parameters_;
               } else {
                 result.parameters_ = parametersBuilder_.build();
               }
    -          result.inputProcessingTimeSum_ = inputProcessingTimeSum_;
    -          result.inputProcessingTimeCount_ = inputProcessingTimeCount_;
    -          if (((bitField0_ & 0x00000002) != 0)) {
    +        }
    +
    +        private void buildPartial0(org.tensorflow.proto.data.model.Model.ModelProto.Node result) {
    +          int from_bitField0_ = bitField0_;
    +          if (((from_bitField0_ & 0x00000001) != 0)) {
    +            result.id_ = id_;
    +          }
    +          if (((from_bitField0_ & 0x00000002) != 0)) {
    +            result.name_ = name_;
    +          }
    +          if (((from_bitField0_ & 0x00000004) != 0)) {
    +            result.autotune_ = autotune_;
    +          }
    +          if (((from_bitField0_ & 0x00000008) != 0)) {
    +            result.bufferedBytes_ = bufferedBytes_;
    +          }
    +          if (((from_bitField0_ & 0x00000010) != 0)) {
    +            result.bufferedElements_ = bufferedElements_;
    +          }
    +          if (((from_bitField0_ & 0x00000020) != 0)) {
    +            result.bytesConsumed_ = bytesConsumed_;
    +          }
    +          if (((from_bitField0_ & 0x00000040) != 0)) {
    +            result.bytesProduced_ = bytesProduced_;
    +          }
    +          if (((from_bitField0_ & 0x00000080) != 0)) {
    +            result.numElements_ = numElements_;
    +          }
    +          if (((from_bitField0_ & 0x00000100) != 0)) {
    +            result.processingTime_ = processingTime_;
    +          }
    +          if (((from_bitField0_ & 0x00000200) != 0)) {
    +            result.recordMetrics_ = recordMetrics_;
    +          }
    +          if (((from_bitField0_ & 0x00000800) != 0)) {
    +            result.inputProcessingTimeSum_ = inputProcessingTimeSum_;
    +          }
    +          if (((from_bitField0_ & 0x00001000) != 0)) {
    +            result.inputProcessingTimeCount_ = inputProcessingTimeCount_;
    +          }
    +          if (((from_bitField0_ & 0x00002000) != 0)) {
                 inputs_.makeImmutable();
    -            bitField0_ = (bitField0_ & ~0x00000002);
    +            result.inputs_ = inputs_;
    +          }
    +          if (((from_bitField0_ & 0x00004000) != 0)) {
    +            result.nodeClass_ = nodeClass_;
    +          }
    +          if (((from_bitField0_ & 0x00008000) != 0)) {
    +            result.ratio_ = ratio_;
    +          }
    +          if (((from_bitField0_ & 0x00010000) != 0)) {
    +            result.memoryRatio_ = memoryRatio_;
               }
    -          result.inputs_ = inputs_;
    -          result.nodeClass_ = nodeClass_;
    -          result.ratio_ = ratio_;
    -          result.memoryRatio_ = memoryRatio_;
    -          onBuilt();
    -          return result;
             }
     
    -        @java.lang.Override
    -        public Builder clone() {
    -          return super.clone();
    -        }
    -        @java.lang.Override
    -        public Builder setField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field,
    -            java.lang.Object value) {
    -          return super.setField(field, value);
    -        }
    -        @java.lang.Override
    -        public Builder clearField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field) {
    -          return super.clearField(field);
    -        }
    -        @java.lang.Override
    -        public Builder clearOneof(
    -            com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -          return super.clearOneof(oneof);
    -        }
    -        @java.lang.Override
    -        public Builder setRepeatedField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field,
    -            int index, java.lang.Object value) {
    -          return super.setRepeatedField(field, index, value);
    -        }
    -        @java.lang.Override
    -        public Builder addRepeatedField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field,
    -            java.lang.Object value) {
    -          return super.addRepeatedField(field, value);
    -        }
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.Message other) {
               if (other instanceof org.tensorflow.proto.data.model.Model.ModelProto.Node) {
    @@ -2767,6 +2754,7 @@ public Builder mergeFrom(org.tensorflow.proto.data.model.Model.ModelProto.Node o
               }
               if (!other.getName().isEmpty()) {
                 name_ = other.name_;
    +            bitField0_ |= 0x00000002;
                 onChanged();
               }
               if (other.getAutotune() != false) {
    @@ -2797,7 +2785,7 @@ public Builder mergeFrom(org.tensorflow.proto.data.model.Model.ModelProto.Node o
                 if (!other.parameters_.isEmpty()) {
                   if (parameters_.isEmpty()) {
                     parameters_ = other.parameters_;
    -                bitField0_ = (bitField0_ & ~0x00000001);
    +                bitField0_ = (bitField0_ & ~0x00000400);
                   } else {
                     ensureParametersIsMutable();
                     parameters_.addAll(other.parameters_);
    @@ -2810,9 +2798,9 @@ public Builder mergeFrom(org.tensorflow.proto.data.model.Model.ModelProto.Node o
                     parametersBuilder_.dispose();
                     parametersBuilder_ = null;
                     parameters_ = other.parameters_;
    -                bitField0_ = (bitField0_ & ~0x00000001);
    +                bitField0_ = (bitField0_ & ~0x00000400);
                     parametersBuilder_ = 
    -                  com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +                  com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                          getParametersFieldBuilder() : null;
                   } else {
                     parametersBuilder_.addAllMessages(other.parameters_);
    @@ -2828,7 +2816,8 @@ public Builder mergeFrom(org.tensorflow.proto.data.model.Model.ModelProto.Node o
               if (!other.inputs_.isEmpty()) {
                 if (inputs_.isEmpty()) {
                   inputs_ = other.inputs_;
    -              bitField0_ = (bitField0_ & ~0x00000002);
    +              inputs_.makeImmutable();
    +              bitField0_ |= 0x00002000;
                 } else {
                   ensureInputsIsMutable();
                   inputs_.addAll(other.inputs_);
    @@ -2872,52 +2861,52 @@ public Builder mergeFrom(
                       break;
                     case 8: {
                       id_ = input.readInt64();
    -
    +                  bitField0_ |= 0x00000001;
                       break;
                     } // case 8
                     case 18: {
                       name_ = input.readStringRequireUtf8();
    -
    +                  bitField0_ |= 0x00000002;
                       break;
                     } // case 18
                     case 24: {
                       autotune_ = input.readBool();
    -
    +                  bitField0_ |= 0x00000004;
                       break;
                     } // case 24
                     case 32: {
                       bufferedBytes_ = input.readInt64();
    -
    +                  bitField0_ |= 0x00000008;
                       break;
                     } // case 32
                     case 40: {
                       bufferedElements_ = input.readInt64();
    -
    +                  bitField0_ |= 0x00000010;
                       break;
                     } // case 40
                     case 48: {
                       bytesConsumed_ = input.readInt64();
    -
    +                  bitField0_ |= 0x00000020;
                       break;
                     } // case 48
                     case 56: {
                       bytesProduced_ = input.readInt64();
    -
    +                  bitField0_ |= 0x00000040;
                       break;
                     } // case 56
                     case 64: {
                       numElements_ = input.readInt64();
    -
    +                  bitField0_ |= 0x00000080;
                       break;
                     } // case 64
                     case 72: {
                       processingTime_ = input.readInt64();
    -
    +                  bitField0_ |= 0x00000100;
                       break;
                     } // case 72
                     case 80: {
                       recordMetrics_ = input.readBool();
    -
    +                  bitField0_ |= 0x00000200;
                       break;
                     } // case 80
                     case 90: {
    @@ -2935,12 +2924,12 @@ public Builder mergeFrom(
                     } // case 90
                     case 97: {
                       inputProcessingTimeSum_ = input.readDouble();
    -
    +                  bitField0_ |= 0x00000800;
                       break;
                     } // case 97
                     case 104: {
                       inputProcessingTimeCount_ = input.readInt64();
    -
    +                  bitField0_ |= 0x00001000;
                       break;
                     } // case 104
                     case 112: {
    @@ -2961,17 +2950,17 @@ public Builder mergeFrom(
                     } // case 114
                     case 120: {
                       nodeClass_ = input.readEnum();
    -
    +                  bitField0_ |= 0x00004000;
                       break;
                     } // case 120
                     case 129: {
                       ratio_ = input.readDouble();
    -
    +                  bitField0_ |= 0x00008000;
                       break;
                     } // case 129
                     case 137: {
                       memoryRatio_ = input.readDouble();
    -
    +                  bitField0_ |= 0x00010000;
                       break;
                     } // case 137
                     default: {
    @@ -3014,8 +3003,9 @@ public long getId() {
              * @return This builder for chaining.
              */
             public Builder setId(long value) {
    -          
    +
               id_ = value;
    +          bitField0_ |= 0x00000001;
               onChanged();
               return this;
             }
    @@ -3028,7 +3018,7 @@ public Builder setId(long value) {
              * @return This builder for chaining.
              */
             public Builder clearId() {
    -          
    +          bitField0_ = (bitField0_ & ~0x00000001);
               id_ = 0L;
               onChanged();
               return this;
    @@ -3087,11 +3077,9 @@ public java.lang.String getName() {
              */
             public Builder setName(
                 java.lang.String value) {
    -          if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +          if (value == null) { throw new NullPointerException(); }
               name_ = value;
    +          bitField0_ |= 0x00000002;
               onChanged();
               return this;
             }
    @@ -3104,8 +3092,8 @@ public Builder setName(
              * @return This builder for chaining.
              */
             public Builder clearName() {
    -          
               name_ = getDefaultInstance().getName();
    +          bitField0_ = (bitField0_ & ~0x00000002);
               onChanged();
               return this;
             }
    @@ -3120,12 +3108,10 @@ public Builder clearName() {
              */
             public Builder setNameBytes(
                 com.google.protobuf.ByteString value) {
    -          if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -          
    +          if (value == null) { throw new NullPointerException(); }
    +          checkByteStringIsUtf8(value);
               name_ = value;
    +          bitField0_ |= 0x00000002;
               onChanged();
               return this;
             }
    @@ -3153,8 +3139,9 @@ public boolean getAutotune() {
              * @return This builder for chaining.
              */
             public Builder setAutotune(boolean value) {
    -          
    +
               autotune_ = value;
    +          bitField0_ |= 0x00000004;
               onChanged();
               return this;
             }
    @@ -3167,7 +3154,7 @@ public Builder setAutotune(boolean value) {
              * @return This builder for chaining.
              */
             public Builder clearAutotune() {
    -          
    +          bitField0_ = (bitField0_ & ~0x00000004);
               autotune_ = false;
               onChanged();
               return this;
    @@ -3196,8 +3183,9 @@ public long getBufferedBytes() {
              * @return This builder for chaining.
              */
             public Builder setBufferedBytes(long value) {
    -          
    +
               bufferedBytes_ = value;
    +          bitField0_ |= 0x00000008;
               onChanged();
               return this;
             }
    @@ -3210,7 +3198,7 @@ public Builder setBufferedBytes(long value) {
              * @return This builder for chaining.
              */
             public Builder clearBufferedBytes() {
    -          
    +          bitField0_ = (bitField0_ & ~0x00000008);
               bufferedBytes_ = 0L;
               onChanged();
               return this;
    @@ -3239,8 +3227,9 @@ public long getBufferedElements() {
              * @return This builder for chaining.
              */
             public Builder setBufferedElements(long value) {
    -          
    +
               bufferedElements_ = value;
    +          bitField0_ |= 0x00000010;
               onChanged();
               return this;
             }
    @@ -3253,7 +3242,7 @@ public Builder setBufferedElements(long value) {
              * @return This builder for chaining.
              */
             public Builder clearBufferedElements() {
    -          
    +          bitField0_ = (bitField0_ & ~0x00000010);
               bufferedElements_ = 0L;
               onChanged();
               return this;
    @@ -3282,8 +3271,9 @@ public long getBytesConsumed() {
              * @return This builder for chaining.
              */
             public Builder setBytesConsumed(long value) {
    -          
    +
               bytesConsumed_ = value;
    +          bitField0_ |= 0x00000020;
               onChanged();
               return this;
             }
    @@ -3296,7 +3286,7 @@ public Builder setBytesConsumed(long value) {
              * @return This builder for chaining.
              */
             public Builder clearBytesConsumed() {
    -          
    +          bitField0_ = (bitField0_ & ~0x00000020);
               bytesConsumed_ = 0L;
               onChanged();
               return this;
    @@ -3325,8 +3315,9 @@ public long getBytesProduced() {
              * @return This builder for chaining.
              */
             public Builder setBytesProduced(long value) {
    -          
    +
               bytesProduced_ = value;
    +          bitField0_ |= 0x00000040;
               onChanged();
               return this;
             }
    @@ -3339,7 +3330,7 @@ public Builder setBytesProduced(long value) {
              * @return This builder for chaining.
              */
             public Builder clearBytesProduced() {
    -          
    +          bitField0_ = (bitField0_ & ~0x00000040);
               bytesProduced_ = 0L;
               onChanged();
               return this;
    @@ -3368,8 +3359,9 @@ public long getNumElements() {
              * @return This builder for chaining.
              */
             public Builder setNumElements(long value) {
    -          
    +
               numElements_ = value;
    +          bitField0_ |= 0x00000080;
               onChanged();
               return this;
             }
    @@ -3382,7 +3374,7 @@ public Builder setNumElements(long value) {
              * @return This builder for chaining.
              */
             public Builder clearNumElements() {
    -          
    +          bitField0_ = (bitField0_ & ~0x00000080);
               numElements_ = 0L;
               onChanged();
               return this;
    @@ -3411,8 +3403,9 @@ public long getProcessingTime() {
              * @return This builder for chaining.
              */
             public Builder setProcessingTime(long value) {
    -          
    +
               processingTime_ = value;
    +          bitField0_ |= 0x00000100;
               onChanged();
               return this;
             }
    @@ -3425,7 +3418,7 @@ public Builder setProcessingTime(long value) {
              * @return This builder for chaining.
              */
             public Builder clearProcessingTime() {
    -          
    +          bitField0_ = (bitField0_ & ~0x00000100);
               processingTime_ = 0L;
               onChanged();
               return this;
    @@ -3456,8 +3449,9 @@ public boolean getRecordMetrics() {
              * @return This builder for chaining.
              */
             public Builder setRecordMetrics(boolean value) {
    -          
    +
               recordMetrics_ = value;
    +          bitField0_ |= 0x00000200;
               onChanged();
               return this;
             }
    @@ -3471,7 +3465,7 @@ public Builder setRecordMetrics(boolean value) {
              * @return This builder for chaining.
              */
             public Builder clearRecordMetrics() {
    -          
    +          bitField0_ = (bitField0_ & ~0x00000200);
               recordMetrics_ = false;
               onChanged();
               return this;
    @@ -3480,13 +3474,13 @@ public Builder clearRecordMetrics() {
             private java.util.List parameters_ =
               java.util.Collections.emptyList();
             private void ensureParametersIsMutable() {
    -          if (!((bitField0_ & 0x00000001) != 0)) {
    +          if (!((bitField0_ & 0x00000400) != 0)) {
                 parameters_ = new java.util.ArrayList(parameters_);
    -            bitField0_ |= 0x00000001;
    +            bitField0_ |= 0x00000400;
                }
             }
     
    -        private com.google.protobuf.RepeatedFieldBuilderV3<
    +        private com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.data.model.Model.ModelProto.Node.Parameter, org.tensorflow.proto.data.model.Model.ModelProto.Node.Parameter.Builder, org.tensorflow.proto.data.model.Model.ModelProto.Node.ParameterOrBuilder> parametersBuilder_;
     
             /**
    @@ -3676,7 +3670,7 @@ public Builder addAllParameters(
             public Builder clearParameters() {
               if (parametersBuilder_ == null) {
                 parameters_ = java.util.Collections.emptyList();
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000400);
                 onChanged();
               } else {
                 parametersBuilder_.clear();
    @@ -3774,14 +3768,14 @@ public org.tensorflow.proto.data.model.Model.ModelProto.Node.Parameter.Builder a
                  getParametersBuilderList() {
               return getParametersFieldBuilder().getBuilderList();
             }
    -        private com.google.protobuf.RepeatedFieldBuilderV3<
    +        private com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.data.model.Model.ModelProto.Node.Parameter, org.tensorflow.proto.data.model.Model.ModelProto.Node.Parameter.Builder, org.tensorflow.proto.data.model.Model.ModelProto.Node.ParameterOrBuilder> 
                 getParametersFieldBuilder() {
               if (parametersBuilder_ == null) {
    -            parametersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +            parametersBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                     org.tensorflow.proto.data.model.Model.ModelProto.Node.Parameter, org.tensorflow.proto.data.model.Model.ModelProto.Node.Parameter.Builder, org.tensorflow.proto.data.model.Model.ModelProto.Node.ParameterOrBuilder>(
                         parameters_,
    -                    ((bitField0_ & 0x00000001) != 0),
    +                    ((bitField0_ & 0x00000400) != 0),
                         getParentForChildren(),
                         isClean());
                 parameters_ = null;
    @@ -3812,8 +3806,9 @@ public double getInputProcessingTimeSum() {
              * @return This builder for chaining.
              */
             public Builder setInputProcessingTimeSum(double value) {
    -          
    +
               inputProcessingTimeSum_ = value;
    +          bitField0_ |= 0x00000800;
               onChanged();
               return this;
             }
    @@ -3826,7 +3821,7 @@ public Builder setInputProcessingTimeSum(double value) {
              * @return This builder for chaining.
              */
             public Builder clearInputProcessingTimeSum() {
    -          
    +          bitField0_ = (bitField0_ & ~0x00000800);
               inputProcessingTimeSum_ = 0D;
               onChanged();
               return this;
    @@ -3847,8 +3842,9 @@ public long getInputProcessingTimeCount() {
              * @return This builder for chaining.
              */
             public Builder setInputProcessingTimeCount(long value) {
    -          
    +
               inputProcessingTimeCount_ = value;
    +          bitField0_ |= 0x00001000;
               onChanged();
               return this;
             }
    @@ -3857,7 +3853,7 @@ public Builder setInputProcessingTimeCount(long value) {
              * @return This builder for chaining.
              */
             public Builder clearInputProcessingTimeCount() {
    -          
    +          bitField0_ = (bitField0_ & ~0x00001000);
               inputProcessingTimeCount_ = 0L;
               onChanged();
               return this;
    @@ -3865,10 +3861,10 @@ public Builder clearInputProcessingTimeCount() {
     
             private com.google.protobuf.Internal.LongList inputs_ = emptyLongList();
             private void ensureInputsIsMutable() {
    -          if (!((bitField0_ & 0x00000002) != 0)) {
    -            inputs_ = mutableCopy(inputs_);
    -            bitField0_ |= 0x00000002;
    -           }
    +          if (!inputs_.isModifiable()) {
    +            inputs_ = makeMutableCopy(inputs_);
    +          }
    +          bitField0_ |= 0x00002000;
             }
             /**
              * 
    @@ -3880,8 +3876,8 @@ private void ensureInputsIsMutable() {
              */
             public java.util.List
                 getInputsList() {
    -          return ((bitField0_ & 0x00000002) != 0) ?
    -                   java.util.Collections.unmodifiableList(inputs_) : inputs_;
    +          inputs_.makeImmutable();
    +          return inputs_;
             }
             /**
              * 
    @@ -3918,8 +3914,10 @@ public long getInputs(int index) {
              */
             public Builder setInputs(
                 int index, long value) {
    +
               ensureInputsIsMutable();
               inputs_.setLong(index, value);
    +          bitField0_ |= 0x00002000;
               onChanged();
               return this;
             }
    @@ -3933,8 +3931,10 @@ public Builder setInputs(
              * @return This builder for chaining.
              */
             public Builder addInputs(long value) {
    +
               ensureInputsIsMutable();
               inputs_.addLong(value);
    +          bitField0_ |= 0x00002000;
               onChanged();
               return this;
             }
    @@ -3952,6 +3952,7 @@ public Builder addAllInputs(
               ensureInputsIsMutable();
               com.google.protobuf.AbstractMessageLite.Builder.addAll(
                   values, inputs_);
    +          bitField0_ |= 0x00002000;
               onChanged();
               return this;
             }
    @@ -3965,7 +3966,7 @@ public Builder addAllInputs(
              */
             public Builder clearInputs() {
               inputs_ = emptyLongList();
    -          bitField0_ = (bitField0_ & ~0x00000002);
    +          bitField0_ = (bitField0_ & ~0x00002000);
               onChanged();
               return this;
             }
    @@ -3992,8 +3993,8 @@ public Builder clearInputs() {
              * @return This builder for chaining.
              */
             public Builder setNodeClassValue(int value) {
    -          
               nodeClass_ = value;
    +          bitField0_ |= 0x00004000;
               onChanged();
               return this;
             }
    @@ -4007,8 +4008,7 @@ public Builder setNodeClassValue(int value) {
              */
             @java.lang.Override
             public org.tensorflow.proto.data.model.Model.NodeClass getNodeClass() {
    -          @SuppressWarnings("deprecation")
    -          org.tensorflow.proto.data.model.Model.NodeClass result = org.tensorflow.proto.data.model.Model.NodeClass.valueOf(nodeClass_);
    +          org.tensorflow.proto.data.model.Model.NodeClass result = org.tensorflow.proto.data.model.Model.NodeClass.forNumber(nodeClass_);
               return result == null ? org.tensorflow.proto.data.model.Model.NodeClass.UNRECOGNIZED : result;
             }
             /**
    @@ -4024,7 +4024,7 @@ public Builder setNodeClass(org.tensorflow.proto.data.model.Model.NodeClass valu
               if (value == null) {
                 throw new NullPointerException();
               }
    -          
    +          bitField0_ |= 0x00004000;
               nodeClass_ = value.getNumber();
               onChanged();
               return this;
    @@ -4038,7 +4038,7 @@ public Builder setNodeClass(org.tensorflow.proto.data.model.Model.NodeClass valu
              * @return This builder for chaining.
              */
             public Builder clearNodeClass() {
    -          
    +          bitField0_ = (bitField0_ & ~0x00004000);
               nodeClass_ = 0;
               onChanged();
               return this;
    @@ -4069,8 +4069,9 @@ public double getRatio() {
              * @return This builder for chaining.
              */
             public Builder setRatio(double value) {
    -          
    +
               ratio_ = value;
    +          bitField0_ |= 0x00008000;
               onChanged();
               return this;
             }
    @@ -4084,7 +4085,7 @@ public Builder setRatio(double value) {
              * @return This builder for chaining.
              */
             public Builder clearRatio() {
    -          
    +          bitField0_ = (bitField0_ & ~0x00008000);
               ratio_ = 0D;
               onChanged();
               return this;
    @@ -4115,8 +4116,9 @@ public double getMemoryRatio() {
              * @return This builder for chaining.
              */
             public Builder setMemoryRatio(double value) {
    -          
    +
               memoryRatio_ = value;
    +          bitField0_ |= 0x00010000;
               onChanged();
               return this;
             }
    @@ -4130,23 +4132,11 @@ public Builder setMemoryRatio(double value) {
              * @return This builder for chaining.
              */
             public Builder clearMemoryRatio() {
    -          
    +          bitField0_ = (bitField0_ & ~0x00010000);
               memoryRatio_ = 0D;
               onChanged();
               return this;
             }
    -        @java.lang.Override
    -        public final Builder setUnknownFields(
    -            final com.google.protobuf.UnknownFieldSet unknownFields) {
    -          return super.setUnknownFields(unknownFields);
    -        }
    -
    -        @java.lang.Override
    -        public final Builder mergeUnknownFields(
    -            final com.google.protobuf.UnknownFieldSet unknownFields) {
    -          return super.mergeUnknownFields(unknownFields);
    -        }
    -
     
             // @@protoc_insertion_point(builder_scope:tensorflow.data.model.ModelProto.Node)
           }
    @@ -4261,37 +4251,34 @@ public interface OptimizationParamsOrBuilder extends
          * Protobuf type {@code tensorflow.data.model.ModelProto.OptimizationParams}
          */
         public static final class OptimizationParams extends
    -        com.google.protobuf.GeneratedMessageV3 implements
    +        com.google.protobuf.GeneratedMessage implements
             // @@protoc_insertion_point(message_implements:tensorflow.data.model.ModelProto.OptimizationParams)
             OptimizationParamsOrBuilder {
         private static final long serialVersionUID = 0L;
    +      static {
    +        com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +          com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +          /* major= */ 4,
    +          /* minor= */ 28,
    +          /* patch= */ 3,
    +          /* suffix= */ "",
    +          OptimizationParams.class.getName());
    +      }
           // Use OptimizationParams.newBuilder() to construct.
    -      private OptimizationParams(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +      private OptimizationParams(com.google.protobuf.GeneratedMessage.Builder builder) {
             super(builder);
           }
           private OptimizationParams() {
             algorithm_ = 0;
           }
     
    -      @java.lang.Override
    -      @SuppressWarnings({"unused"})
    -      protected java.lang.Object newInstance(
    -          UnusedPrivateParameter unused) {
    -        return new OptimizationParams();
    -      }
    -
    -      @java.lang.Override
    -      public final com.google.protobuf.UnknownFieldSet
    -      getUnknownFields() {
    -        return this.unknownFields;
    -      }
           public static final com.google.protobuf.Descriptors.Descriptor
               getDescriptor() {
             return org.tensorflow.proto.data.model.Model.internal_static_tensorflow_data_model_ModelProto_OptimizationParams_descriptor;
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.data.model.Model.internal_static_tensorflow_data_model_ModelProto_OptimizationParams_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -4299,7 +4286,7 @@ protected java.lang.Object newInstance(
           }
     
           public static final int ALGORITHM_FIELD_NUMBER = 1;
    -      private int algorithm_;
    +      private int algorithm_ = 0;
           /**
            * 
            * Algorithm used for autotuning optimization.
    @@ -4320,13 +4307,12 @@ protected java.lang.Object newInstance(
            * @return The algorithm.
            */
           @java.lang.Override public org.tensorflow.proto.data.model.Model.AutotuneAlgorithm getAlgorithm() {
    -        @SuppressWarnings("deprecation")
    -        org.tensorflow.proto.data.model.Model.AutotuneAlgorithm result = org.tensorflow.proto.data.model.Model.AutotuneAlgorithm.valueOf(algorithm_);
    +        org.tensorflow.proto.data.model.Model.AutotuneAlgorithm result = org.tensorflow.proto.data.model.Model.AutotuneAlgorithm.forNumber(algorithm_);
             return result == null ? org.tensorflow.proto.data.model.Model.AutotuneAlgorithm.UNRECOGNIZED : result;
           }
     
           public static final int CPU_BUDGET_FIELD_NUMBER = 2;
    -      private long cpuBudget_;
    +      private long cpuBudget_ = 0L;
           /**
            * 
            * Number of available logical threads.
    @@ -4341,7 +4327,7 @@ public long getCpuBudget() {
           }
     
           public static final int RAM_BUDGET_FIELD_NUMBER = 3;
    -      private long ramBudget_;
    +      private long ramBudget_ = 0L;
           /**
            * 
            * Amount of available memory in bytes.
    @@ -4356,7 +4342,7 @@ public long getRamBudget() {
           }
     
           public static final int MODEL_INPUT_TIME_FIELD_NUMBER = 4;
    -      private double modelInputTime_;
    +      private double modelInputTime_ = 0D;
           /**
            * 
            * Time between two consecutive `GetNext` calls to the iterator represented
    @@ -4506,39 +4492,41 @@ public static org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParam
           }
           public static org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParams parseFrom(java.io.InputStream input)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input);
           }
           public static org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParams parseFrom(
               java.io.InputStream input,
               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input, extensionRegistry);
           }
    +
           public static org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParams parseDelimitedFrom(java.io.InputStream input)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseDelimitedWithIOException(PARSER, input);
           }
    +
           public static org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParams parseDelimitedFrom(
               java.io.InputStream input,
               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
           }
           public static org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParams parseFrom(
               com.google.protobuf.CodedInputStream input)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input);
           }
           public static org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParams parseFrom(
               com.google.protobuf.CodedInputStream input,
               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
               throws java.io.IOException {
    -        return com.google.protobuf.GeneratedMessageV3
    +        return com.google.protobuf.GeneratedMessage
                 .parseWithIOException(PARSER, input, extensionRegistry);
           }
     
    @@ -4558,7 +4546,7 @@ public Builder toBuilder() {
     
           @java.lang.Override
           protected Builder newBuilderForType(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             Builder builder = new Builder(parent);
             return builder;
           }
    @@ -4570,7 +4558,7 @@ protected Builder newBuilderForType(
            * Protobuf type {@code tensorflow.data.model.ModelProto.OptimizationParams}
            */
           public static final class Builder extends
    -          com.google.protobuf.GeneratedMessageV3.Builder implements
    +          com.google.protobuf.GeneratedMessage.Builder implements
               // @@protoc_insertion_point(builder_implements:tensorflow.data.model.ModelProto.OptimizationParams)
               org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParamsOrBuilder {
             public static final com.google.protobuf.Descriptors.Descriptor
    @@ -4579,7 +4567,7 @@ public static final class Builder extends
             }
     
             @java.lang.Override
    -        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +        protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
                 internalGetFieldAccessorTable() {
               return org.tensorflow.proto.data.model.Model.internal_static_tensorflow_data_model_ModelProto_OptimizationParams_fieldAccessorTable
                   .ensureFieldAccessorsInitialized(
    @@ -4592,21 +4580,18 @@ private Builder() {
             }
     
             private Builder(
    -            com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +            com.google.protobuf.GeneratedMessage.BuilderParent parent) {
               super(parent);
     
             }
             @java.lang.Override
             public Builder clear() {
               super.clear();
    +          bitField0_ = 0;
               algorithm_ = 0;
    -
               cpuBudget_ = 0L;
    -
               ramBudget_ = 0L;
    -
               modelInputTime_ = 0D;
    -
               return this;
             }
     
    @@ -4633,46 +4618,27 @@ public org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParams build
             @java.lang.Override
             public org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParams buildPartial() {
               org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParams result = new org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParams(this);
    -          result.algorithm_ = algorithm_;
    -          result.cpuBudget_ = cpuBudget_;
    -          result.ramBudget_ = ramBudget_;
    -          result.modelInputTime_ = modelInputTime_;
    +          if (bitField0_ != 0) { buildPartial0(result); }
               onBuilt();
               return result;
             }
     
    -        @java.lang.Override
    -        public Builder clone() {
    -          return super.clone();
    -        }
    -        @java.lang.Override
    -        public Builder setField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field,
    -            java.lang.Object value) {
    -          return super.setField(field, value);
    -        }
    -        @java.lang.Override
    -        public Builder clearField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field) {
    -          return super.clearField(field);
    -        }
    -        @java.lang.Override
    -        public Builder clearOneof(
    -            com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -          return super.clearOneof(oneof);
    -        }
    -        @java.lang.Override
    -        public Builder setRepeatedField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field,
    -            int index, java.lang.Object value) {
    -          return super.setRepeatedField(field, index, value);
    -        }
    -        @java.lang.Override
    -        public Builder addRepeatedField(
    -            com.google.protobuf.Descriptors.FieldDescriptor field,
    -            java.lang.Object value) {
    -          return super.addRepeatedField(field, value);
    +        private void buildPartial0(org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParams result) {
    +          int from_bitField0_ = bitField0_;
    +          if (((from_bitField0_ & 0x00000001) != 0)) {
    +            result.algorithm_ = algorithm_;
    +          }
    +          if (((from_bitField0_ & 0x00000002) != 0)) {
    +            result.cpuBudget_ = cpuBudget_;
    +          }
    +          if (((from_bitField0_ & 0x00000004) != 0)) {
    +            result.ramBudget_ = ramBudget_;
    +          }
    +          if (((from_bitField0_ & 0x00000008) != 0)) {
    +            result.modelInputTime_ = modelInputTime_;
    +          }
             }
    +
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.Message other) {
               if (other instanceof org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParams) {
    @@ -4725,22 +4691,22 @@ public Builder mergeFrom(
                       break;
                     case 8: {
                       algorithm_ = input.readEnum();
    -
    +                  bitField0_ |= 0x00000001;
                       break;
                     } // case 8
                     case 16: {
                       cpuBudget_ = input.readInt64();
    -
    +                  bitField0_ |= 0x00000002;
                       break;
                     } // case 16
                     case 24: {
                       ramBudget_ = input.readInt64();
    -
    +                  bitField0_ |= 0x00000004;
                       break;
                     } // case 24
                     case 33: {
                       modelInputTime_ = input.readDouble();
    -
    +                  bitField0_ |= 0x00000008;
                       break;
                     } // case 33
                     default: {
    @@ -4758,6 +4724,7 @@ public Builder mergeFrom(
               } // finally
               return this;
             }
    +        private int bitField0_;
     
             private int algorithm_ = 0;
             /**
    @@ -4781,8 +4748,8 @@ public Builder mergeFrom(
              * @return This builder for chaining.
              */
             public Builder setAlgorithmValue(int value) {
    -          
               algorithm_ = value;
    +          bitField0_ |= 0x00000001;
               onChanged();
               return this;
             }
    @@ -4796,8 +4763,7 @@ public Builder setAlgorithmValue(int value) {
              */
             @java.lang.Override
             public org.tensorflow.proto.data.model.Model.AutotuneAlgorithm getAlgorithm() {
    -          @SuppressWarnings("deprecation")
    -          org.tensorflow.proto.data.model.Model.AutotuneAlgorithm result = org.tensorflow.proto.data.model.Model.AutotuneAlgorithm.valueOf(algorithm_);
    +          org.tensorflow.proto.data.model.Model.AutotuneAlgorithm result = org.tensorflow.proto.data.model.Model.AutotuneAlgorithm.forNumber(algorithm_);
               return result == null ? org.tensorflow.proto.data.model.Model.AutotuneAlgorithm.UNRECOGNIZED : result;
             }
             /**
    @@ -4813,7 +4779,7 @@ public Builder setAlgorithm(org.tensorflow.proto.data.model.Model.AutotuneAlgori
               if (value == null) {
                 throw new NullPointerException();
               }
    -          
    +          bitField0_ |= 0x00000001;
               algorithm_ = value.getNumber();
               onChanged();
               return this;
    @@ -4827,7 +4793,7 @@ public Builder setAlgorithm(org.tensorflow.proto.data.model.Model.AutotuneAlgori
              * @return This builder for chaining.
              */
             public Builder clearAlgorithm() {
    -          
    +          bitField0_ = (bitField0_ & ~0x00000001);
               algorithm_ = 0;
               onChanged();
               return this;
    @@ -4856,8 +4822,9 @@ public long getCpuBudget() {
              * @return This builder for chaining.
              */
             public Builder setCpuBudget(long value) {
    -          
    +
               cpuBudget_ = value;
    +          bitField0_ |= 0x00000002;
               onChanged();
               return this;
             }
    @@ -4870,7 +4837,7 @@ public Builder setCpuBudget(long value) {
              * @return This builder for chaining.
              */
             public Builder clearCpuBudget() {
    -          
    +          bitField0_ = (bitField0_ & ~0x00000002);
               cpuBudget_ = 0L;
               onChanged();
               return this;
    @@ -4899,8 +4866,9 @@ public long getRamBudget() {
              * @return This builder for chaining.
              */
             public Builder setRamBudget(long value) {
    -          
    +
               ramBudget_ = value;
    +          bitField0_ |= 0x00000004;
               onChanged();
               return this;
             }
    @@ -4913,7 +4881,7 @@ public Builder setRamBudget(long value) {
              * @return This builder for chaining.
              */
             public Builder clearRamBudget() {
    -          
    +          bitField0_ = (bitField0_ & ~0x00000004);
               ramBudget_ = 0L;
               onChanged();
               return this;
    @@ -4944,8 +4912,9 @@ public double getModelInputTime() {
              * @return This builder for chaining.
              */
             public Builder setModelInputTime(double value) {
    -          
    +
               modelInputTime_ = value;
    +          bitField0_ |= 0x00000008;
               onChanged();
               return this;
             }
    @@ -4959,23 +4928,11 @@ public Builder setModelInputTime(double value) {
              * @return This builder for chaining.
              */
             public Builder clearModelInputTime() {
    -          
    +          bitField0_ = (bitField0_ & ~0x00000008);
               modelInputTime_ = 0D;
               onChanged();
               return this;
             }
    -        @java.lang.Override
    -        public final Builder setUnknownFields(
    -            final com.google.protobuf.UnknownFieldSet unknownFields) {
    -          return super.setUnknownFields(unknownFields);
    -        }
    -
    -        @java.lang.Override
    -        public final Builder mergeUnknownFields(
    -            final com.google.protobuf.UnknownFieldSet unknownFields) {
    -          return super.mergeUnknownFields(unknownFields);
    -        }
    -
     
             // @@protoc_insertion_point(builder_scope:tensorflow.data.model.ModelProto.OptimizationParams)
           }
    @@ -5028,8 +4985,10 @@ public org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParams getDe
     
         }
     
    +    private int bitField0_;
         public static final int DATASET_NAME_FIELD_NUMBER = 7;
    -    private volatile java.lang.Object datasetName_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object datasetName_ = "";
         /**
          * 
          * User-defined name for the dataset. Empty if no name was set.
    @@ -5086,6 +5045,7 @@ private static final class NodesDefaultEntryHolder {
                       com.google.protobuf.WireFormat.FieldType.MESSAGE,
                       org.tensorflow.proto.data.model.Model.ModelProto.Node.getDefaultInstance());
         }
    +    @SuppressWarnings("serial")
         private com.google.protobuf.MapField<
             java.lang.Long, org.tensorflow.proto.data.model.Model.ModelProto.Node> nodes_;
         private com.google.protobuf.MapField
    @@ -5096,7 +5056,6 @@ private static final class NodesDefaultEntryHolder {
           }
           return nodes_;
         }
    -
         public int getNodesCount() {
           return internalGetNodes().getMap().size();
         }
    @@ -5107,11 +5066,10 @@ public int getNodesCount() {
          *
          * map<int64, .tensorflow.data.model.ModelProto.Node> nodes = 1;
          */
    -
         @java.lang.Override
         public boolean containsNodes(
             long key) {
    -      
    +
           return internalGetNodes().getMap().containsKey(key);
         }
         /**
    @@ -5130,7 +5088,6 @@ public java.util.Mapmap<int64, .tensorflow.data.model.ModelProto.Node> nodes = 1;
          */
         @java.lang.Override
    -
         public java.util.Map getNodesMap() {
           return internalGetNodes().getMap();
         }
    @@ -5142,11 +5099,12 @@ public java.util.Mapmap<int64, .tensorflow.data.model.ModelProto.Node> nodes = 1;
          */
         @java.lang.Override
    -
    -    public org.tensorflow.proto.data.model.Model.ModelProto.Node getNodesOrDefault(
    +    public /* nullable */
    +org.tensorflow.proto.data.model.Model.ModelProto.Node getNodesOrDefault(
             long key,
    -        org.tensorflow.proto.data.model.Model.ModelProto.Node defaultValue) {
    -      
    +        /* nullable */
    +org.tensorflow.proto.data.model.Model.ModelProto.Node defaultValue) {
    +
           java.util.Map map =
               internalGetNodes().getMap();
           return map.containsKey(key) ? map.get(key) : defaultValue;
    @@ -5159,10 +5117,9 @@ public org.tensorflow.proto.data.model.Model.ModelProto.Node getNodesOrDefault(
          * map<int64, .tensorflow.data.model.ModelProto.Node> nodes = 1;
          */
         @java.lang.Override
    -
         public org.tensorflow.proto.data.model.Model.ModelProto.Node getNodesOrThrow(
             long key) {
    -      
    +
           java.util.Map map =
               internalGetNodes().getMap();
           if (!map.containsKey(key)) {
    @@ -5172,7 +5129,7 @@ public org.tensorflow.proto.data.model.Model.ModelProto.Node getNodesOrThrow(
         }
     
         public static final int OUTPUT_FIELD_NUMBER = 2;
    -    private long output_;
    +    private long output_ = 0L;
         /**
          * 
          * ID of the output node of this model.
    @@ -5187,7 +5144,7 @@ public long getOutput() {
         }
     
         public static final int ID_COUNTER_FIELD_NUMBER = 3;
    -    private long idCounter_;
    +    private long idCounter_ = 0L;
         /**
          * 
          * Counter for node IDs of this model.
    @@ -5209,7 +5166,7 @@ public long getIdCounter() {
          */
         @java.lang.Override
         public boolean hasOptimizationParams() {
    -      return optimizationParams_ != null;
    +      return ((bitField0_ & 0x00000001) != 0);
         }
         /**
          * .tensorflow.data.model.ModelProto.OptimizationParams optimization_params = 5;
    @@ -5224,11 +5181,13 @@ public org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParams getOp
          */
         @java.lang.Override
         public org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParamsOrBuilder getOptimizationParamsOrBuilder() {
    -      return getOptimizationParams();
    +      return optimizationParams_ == null ? org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParams.getDefaultInstance() : optimizationParams_;
         }
     
         public static final int GAP_TIMES_FIELD_NUMBER = 6;
    -    private com.google.protobuf.Internal.LongList gapTimes_;
    +    @SuppressWarnings("serial")
    +    private com.google.protobuf.Internal.LongList gapTimes_ =
    +        emptyLongList();
         /**
          * repeated uint64 gap_times = 6;
          * @return A list containing the gapTimes.
    @@ -5270,7 +5229,7 @@ public final boolean isInitialized() {
         public void writeTo(com.google.protobuf.CodedOutputStream output)
                             throws java.io.IOException {
           getSerializedSize();
    -      com.google.protobuf.GeneratedMessageV3
    +      com.google.protobuf.GeneratedMessage
             .serializeLongMapTo(
               output,
               internalGetNodes(),
    @@ -5282,7 +5241,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           if (idCounter_ != 0L) {
             output.writeInt64(3, idCounter_);
           }
    -      if (optimizationParams_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             output.writeMessage(5, getOptimizationParams());
           }
           if (getGapTimesList().size() > 0) {
    @@ -5292,8 +5251,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           for (int i = 0; i < gapTimes_.size(); i++) {
             output.writeUInt64NoTag(gapTimes_.getLong(i));
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(datasetName_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 7, datasetName_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(datasetName_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 7, datasetName_);
           }
           getUnknownFields().writeTo(output);
         }
    @@ -5322,7 +5281,7 @@ public int getSerializedSize() {
             size += com.google.protobuf.CodedOutputStream
               .computeInt64Size(3, idCounter_);
           }
    -      if (optimizationParams_ != null) {
    +      if (((bitField0_ & 0x00000001) != 0)) {
             size += com.google.protobuf.CodedOutputStream
               .computeMessageSize(5, getOptimizationParams());
           }
    @@ -5340,8 +5299,8 @@ public int getSerializedSize() {
             }
             gapTimesMemoizedSerializedSize = dataSize;
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(datasetName_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, datasetName_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(datasetName_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(7, datasetName_);
           }
           size += getUnknownFields().getSerializedSize();
           memoizedSize = size;
    @@ -5443,39 +5402,41 @@ public static org.tensorflow.proto.data.model.Model.ModelProto parseFrom(
         }
         public static org.tensorflow.proto.data.model.Model.ModelProto parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.model.Model.ModelProto parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.data.model.Model.ModelProto parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.data.model.Model.ModelProto parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.data.model.Model.ModelProto parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.data.model.Model.ModelProto parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -5495,7 +5456,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -5508,7 +5469,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.data.model.ModelProto}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.data.model.ModelProto)
             org.tensorflow.proto.data.model.Model.ModelProtoOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -5517,7 +5478,7 @@ public static final class Builder extends
           }
     
           @SuppressWarnings({"rawtypes"})
    -      protected com.google.protobuf.MapField internalGetMapField(
    +      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
               int number) {
             switch (number) {
               case 1:
    @@ -5528,7 +5489,7 @@ protected com.google.protobuf.MapField internalGetMapField(
             }
           }
           @SuppressWarnings({"rawtypes"})
    -      protected com.google.protobuf.MapField internalGetMutableMapField(
    +      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
               int number) {
             switch (number) {
               case 1:
    @@ -5539,7 +5500,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField(
             }
           }
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.data.model.Model.internal_static_tensorflow_data_model_ModelProto_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -5548,32 +5509,34 @@ protected com.google.protobuf.MapField internalGetMutableMapField(
     
           // Construct using org.tensorflow.proto.data.model.Model.ModelProto.newBuilder()
           private Builder() {
    -
    +        maybeForceBuilderInitialization();
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
    -
    +        maybeForceBuilderInitialization();
    +      }
    +      private void maybeForceBuilderInitialization() {
    +        if (com.google.protobuf.GeneratedMessage
    +                .alwaysUseFieldBuilders) {
    +          getOptimizationParamsFieldBuilder();
    +        }
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             datasetName_ = "";
    -
             internalGetMutableNodes().clear();
             output_ = 0L;
    -
             idCounter_ = 0L;
    -
    -        if (optimizationParamsBuilder_ == null) {
    -          optimizationParams_ = null;
    -        } else {
    -          optimizationParams_ = null;
    +        optimizationParams_ = null;
    +        if (optimizationParamsBuilder_ != null) {
    +          optimizationParamsBuilder_.dispose();
               optimizationParamsBuilder_ = null;
             }
             gapTimes_ = emptyLongList();
    -        bitField0_ = (bitField0_ & ~0x00000002);
             return this;
           }
     
    @@ -5600,58 +5563,39 @@ public org.tensorflow.proto.data.model.Model.ModelProto build() {
           @java.lang.Override
           public org.tensorflow.proto.data.model.Model.ModelProto buildPartial() {
             org.tensorflow.proto.data.model.Model.ModelProto result = new org.tensorflow.proto.data.model.Model.ModelProto(this);
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        onBuilt();
    +        return result;
    +      }
    +
    +      private void buildPartial0(org.tensorflow.proto.data.model.Model.ModelProto result) {
             int from_bitField0_ = bitField0_;
    -        result.datasetName_ = datasetName_;
    -        result.nodes_ = internalGetNodes();
    -        result.nodes_.makeImmutable();
    -        result.output_ = output_;
    -        result.idCounter_ = idCounter_;
    -        if (optimizationParamsBuilder_ == null) {
    -          result.optimizationParams_ = optimizationParams_;
    -        } else {
    -          result.optimizationParams_ = optimizationParamsBuilder_.build();
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.datasetName_ = datasetName_;
             }
    -        if (((bitField0_ & 0x00000002) != 0)) {
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.nodes_ = internalGetNodes().build(NodesDefaultEntryHolder.defaultEntry);
    +        }
    +        if (((from_bitField0_ & 0x00000004) != 0)) {
    +          result.output_ = output_;
    +        }
    +        if (((from_bitField0_ & 0x00000008) != 0)) {
    +          result.idCounter_ = idCounter_;
    +        }
    +        int to_bitField0_ = 0;
    +        if (((from_bitField0_ & 0x00000010) != 0)) {
    +          result.optimizationParams_ = optimizationParamsBuilder_ == null
    +              ? optimizationParams_
    +              : optimizationParamsBuilder_.build();
    +          to_bitField0_ |= 0x00000001;
    +        }
    +        if (((from_bitField0_ & 0x00000020) != 0)) {
               gapTimes_.makeImmutable();
    -          bitField0_ = (bitField0_ & ~0x00000002);
    +          result.gapTimes_ = gapTimes_;
             }
    -        result.gapTimes_ = gapTimes_;
    -        onBuilt();
    -        return result;
    +        result.bitField0_ |= to_bitField0_;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    -      }
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.data.model.Model.ModelProto) {
    @@ -5666,10 +5610,12 @@ public Builder mergeFrom(org.tensorflow.proto.data.model.Model.ModelProto other)
             if (other == org.tensorflow.proto.data.model.Model.ModelProto.getDefaultInstance()) return this;
             if (!other.getDatasetName().isEmpty()) {
               datasetName_ = other.datasetName_;
    +          bitField0_ |= 0x00000001;
               onChanged();
             }
             internalGetMutableNodes().mergeFrom(
                 other.internalGetNodes());
    +        bitField0_ |= 0x00000002;
             if (other.getOutput() != 0L) {
               setOutput(other.getOutput());
             }
    @@ -5682,7 +5628,8 @@ public Builder mergeFrom(org.tensorflow.proto.data.model.Model.ModelProto other)
             if (!other.gapTimes_.isEmpty()) {
               if (gapTimes_.isEmpty()) {
                 gapTimes_ = other.gapTimes_;
    -            bitField0_ = (bitField0_ & ~0x00000002);
    +            gapTimes_.makeImmutable();
    +            bitField0_ |= 0x00000020;
               } else {
                 ensureGapTimesIsMutable();
                 gapTimes_.addAll(other.gapTimes_);
    @@ -5719,25 +5666,26 @@ public Builder mergeFrom(
                     com.google.protobuf.MapEntry
                     nodes__ = input.readMessage(
                         NodesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
    -                internalGetMutableNodes().getMutableMap().put(
    +                internalGetMutableNodes().ensureBuilderMap().put(
                         nodes__.getKey(), nodes__.getValue());
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 10
                   case 16: {
                     output_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000004;
                     break;
                   } // case 16
                   case 24: {
                     idCounter_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000008;
                     break;
                   } // case 24
                   case 42: {
                     input.readMessage(
                         getOptimizationParamsFieldBuilder().getBuilder(),
                         extensionRegistry);
    -
    +                bitField0_ |= 0x00000010;
                     break;
                   } // case 42
                   case 48: {
    @@ -5758,7 +5706,7 @@ public Builder mergeFrom(
                   } // case 50
                   case 58: {
                     datasetName_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 58
                   default: {
    @@ -5831,11 +5779,9 @@ public java.lang.String getDatasetName() {
            */
           public Builder setDatasetName(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             datasetName_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -5848,8 +5794,8 @@ public Builder setDatasetName(
            * @return This builder for chaining.
            */
           public Builder clearDatasetName() {
    -        
             datasetName_ = getDefaultInstance().getDatasetName();
    +        bitField0_ = (bitField0_ & ~0x00000001);
             onChanged();
             return this;
           }
    @@ -5864,41 +5810,48 @@ public Builder clearDatasetName() {
            */
           public Builder setDatasetNameBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             datasetName_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
     
    -      private com.google.protobuf.MapField<
    -          java.lang.Long, org.tensorflow.proto.data.model.Model.ModelProto.Node> nodes_;
    -      private com.google.protobuf.MapField
    -      internalGetNodes() {
    +      private static final class NodesConverter implements com.google.protobuf.MapFieldBuilder.Converter {
    +        @java.lang.Override
    +        public org.tensorflow.proto.data.model.Model.ModelProto.Node build(org.tensorflow.proto.data.model.Model.ModelProto.NodeOrBuilder val) {
    +          if (val instanceof org.tensorflow.proto.data.model.Model.ModelProto.Node) { return (org.tensorflow.proto.data.model.Model.ModelProto.Node) val; }
    +          return ((org.tensorflow.proto.data.model.Model.ModelProto.Node.Builder) val).build();
    +        }
    +
    +        @java.lang.Override
    +        public com.google.protobuf.MapEntry defaultEntry() {
    +          return NodesDefaultEntryHolder.defaultEntry;
    +        }
    +      };
    +      private static final NodesConverter nodesConverter = new NodesConverter();
    +
    +      private com.google.protobuf.MapFieldBuilder<
    +          java.lang.Long, org.tensorflow.proto.data.model.Model.ModelProto.NodeOrBuilder, org.tensorflow.proto.data.model.Model.ModelProto.Node, org.tensorflow.proto.data.model.Model.ModelProto.Node.Builder> nodes_;
    +      private com.google.protobuf.MapFieldBuilder
    +          internalGetNodes() {
             if (nodes_ == null) {
    -          return com.google.protobuf.MapField.emptyMapField(
    -              NodesDefaultEntryHolder.defaultEntry);
    +          return new com.google.protobuf.MapFieldBuilder<>(nodesConverter);
             }
             return nodes_;
           }
    -      private com.google.protobuf.MapField
    -      internalGetMutableNodes() {
    -        onChanged();;
    +      private com.google.protobuf.MapFieldBuilder
    +          internalGetMutableNodes() {
             if (nodes_ == null) {
    -          nodes_ = com.google.protobuf.MapField.newMapField(
    -              NodesDefaultEntryHolder.defaultEntry);
    -        }
    -        if (!nodes_.isMutable()) {
    -          nodes_ = nodes_.copy();
    +          nodes_ = new com.google.protobuf.MapFieldBuilder<>(nodesConverter);
             }
    +        bitField0_ |= 0x00000002;
    +        onChanged();
             return nodes_;
           }
    -
           public int getNodesCount() {
    -        return internalGetNodes().getMap().size();
    +        return internalGetNodes().ensureBuilderMap().size();
           }
           /**
            * 
    @@ -5907,12 +5860,11 @@ public int getNodesCount() {
            *
            * map<int64, .tensorflow.data.model.ModelProto.Node> nodes = 1;
            */
    -
           @java.lang.Override
           public boolean containsNodes(
               long key) {
    -        
    -        return internalGetNodes().getMap().containsKey(key);
    +
    +        return internalGetNodes().ensureBuilderMap().containsKey(key);
           }
           /**
            * Use {@link #getNodesMap()} instead.
    @@ -5930,9 +5882,8 @@ public java.util.Mapmap<int64, .tensorflow.data.model.ModelProto.Node> nodes = 1;
            */
           @java.lang.Override
    -
           public java.util.Map getNodesMap() {
    -        return internalGetNodes().getMap();
    +        return internalGetNodes().getImmutableMap();
           }
           /**
            * 
    @@ -5942,14 +5893,14 @@ public java.util.Mapmap<int64, .tensorflow.data.model.ModelProto.Node> nodes = 1;
            */
           @java.lang.Override
    -
    -      public org.tensorflow.proto.data.model.Model.ModelProto.Node getNodesOrDefault(
    +      public /* nullable */
    +org.tensorflow.proto.data.model.Model.ModelProto.Node getNodesOrDefault(
               long key,
    -          org.tensorflow.proto.data.model.Model.ModelProto.Node defaultValue) {
    -        
    -        java.util.Map map =
    -            internalGetNodes().getMap();
    -        return map.containsKey(key) ? map.get(key) : defaultValue;
    +          /* nullable */
    +org.tensorflow.proto.data.model.Model.ModelProto.Node defaultValue) {
    +
    +        java.util.Map map = internalGetMutableNodes().ensureBuilderMap();
    +        return map.containsKey(key) ? nodesConverter.build(map.get(key)) : defaultValue;
           }
           /**
            * 
    @@ -5959,21 +5910,18 @@ public org.tensorflow.proto.data.model.Model.ModelProto.Node getNodesOrDefault(
            * map<int64, .tensorflow.data.model.ModelProto.Node> nodes = 1;
            */
           @java.lang.Override
    -
           public org.tensorflow.proto.data.model.Model.ModelProto.Node getNodesOrThrow(
               long key) {
    -        
    -        java.util.Map map =
    -            internalGetNodes().getMap();
    +
    +        java.util.Map map = internalGetMutableNodes().ensureBuilderMap();
             if (!map.containsKey(key)) {
               throw new java.lang.IllegalArgumentException();
             }
    -        return map.get(key);
    +        return nodesConverter.build(map.get(key));
           }
    -
           public Builder clearNodes() {
    -        internalGetMutableNodes().getMutableMap()
    -            .clear();
    +        bitField0_ = (bitField0_ & ~0x00000002);
    +        internalGetMutableNodes().clear();
             return this;
           }
           /**
    @@ -5983,11 +5931,10 @@ public Builder clearNodes() {
            *
            * map<int64, .tensorflow.data.model.ModelProto.Node> nodes = 1;
            */
    -
           public Builder removeNodes(
               long key) {
    -        
    -        internalGetMutableNodes().getMutableMap()
    +
    +        internalGetMutableNodes().ensureBuilderMap()
                 .remove(key);
             return this;
           }
    @@ -5996,8 +5943,9 @@ public Builder removeNodes(
            */
           @java.lang.Deprecated
           public java.util.Map
    -      getMutableNodes() {
    -        return internalGetMutableNodes().getMutableMap();
    +          getMutableNodes() {
    +        bitField0_ |= 0x00000002;
    +        return internalGetMutableNodes().ensureMessageMap();
           }
           /**
            * 
    @@ -6009,13 +5957,11 @@ public Builder removeNodes(
           public Builder putNodes(
               long key,
               org.tensorflow.proto.data.model.Model.ModelProto.Node value) {
    -        
    -        if (value == null) {
    -  throw new NullPointerException("map value");
    -}
     
    -        internalGetMutableNodes().getMutableMap()
    +        if (value == null) { throw new NullPointerException("map value"); }
    +        internalGetMutableNodes().ensureBuilderMap()
                 .put(key, value);
    +        bitField0_ |= 0x00000002;
             return this;
           }
           /**
    @@ -6025,13 +5971,39 @@ public Builder putNodes(
            *
            * map<int64, .tensorflow.data.model.ModelProto.Node> nodes = 1;
            */
    -
           public Builder putAllNodes(
               java.util.Map values) {
    -        internalGetMutableNodes().getMutableMap()
    +        for (java.util.Map.Entry e : values.entrySet()) {
    +          if (e.getKey() == null || e.getValue() == null) {
    +            throw new NullPointerException();
    +          }
    +        }
    +        internalGetMutableNodes().ensureBuilderMap()
                 .putAll(values);
    +        bitField0_ |= 0x00000002;
             return this;
           }
    +      /**
    +       * 
    +       * Map of node IDs to nodes of this model.
    +       * 
    + * + * map<int64, .tensorflow.data.model.ModelProto.Node> nodes = 1; + */ + public org.tensorflow.proto.data.model.Model.ModelProto.Node.Builder putNodesBuilderIfAbsent( + long key) { + java.util.Map builderMap = internalGetMutableNodes().ensureBuilderMap(); + org.tensorflow.proto.data.model.Model.ModelProto.NodeOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = org.tensorflow.proto.data.model.Model.ModelProto.Node.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof org.tensorflow.proto.data.model.Model.ModelProto.Node) { + entry = ((org.tensorflow.proto.data.model.Model.ModelProto.Node) entry).toBuilder(); + builderMap.put(key, entry); + } + return (org.tensorflow.proto.data.model.Model.ModelProto.Node.Builder) entry; + } private long output_ ; /** @@ -6056,8 +6028,9 @@ public long getOutput() { * @return This builder for chaining. */ public Builder setOutput(long value) { - + output_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -6070,7 +6043,7 @@ public Builder setOutput(long value) { * @return This builder for chaining. */ public Builder clearOutput() { - + bitField0_ = (bitField0_ & ~0x00000004); output_ = 0L; onChanged(); return this; @@ -6099,8 +6072,9 @@ public long getIdCounter() { * @return This builder for chaining. */ public Builder setIdCounter(long value) { - + idCounter_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -6113,21 +6087,21 @@ public Builder setIdCounter(long value) { * @return This builder for chaining. */ public Builder clearIdCounter() { - + bitField0_ = (bitField0_ & ~0x00000008); idCounter_ = 0L; onChanged(); return this; } private org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParams optimizationParams_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParams, org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParams.Builder, org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParamsOrBuilder> optimizationParamsBuilder_; /** * .tensorflow.data.model.ModelProto.OptimizationParams optimization_params = 5; * @return Whether the optimizationParams field is set. */ public boolean hasOptimizationParams() { - return optimizationParamsBuilder_ != null || optimizationParams_ != null; + return ((bitField0_ & 0x00000010) != 0); } /** * .tensorflow.data.model.ModelProto.OptimizationParams optimization_params = 5; @@ -6149,11 +6123,11 @@ public Builder setOptimizationParams(org.tensorflow.proto.data.model.Model.Model throw new NullPointerException(); } optimizationParams_ = value; - onChanged(); } else { optimizationParamsBuilder_.setMessage(value); } - + bitField0_ |= 0x00000010; + onChanged(); return this; } /** @@ -6163,11 +6137,11 @@ public Builder setOptimizationParams( org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParams.Builder builderForValue) { if (optimizationParamsBuilder_ == null) { optimizationParams_ = builderForValue.build(); - onChanged(); } else { optimizationParamsBuilder_.setMessage(builderForValue.build()); } - + bitField0_ |= 0x00000010; + onChanged(); return this; } /** @@ -6175,38 +6149,40 @@ public Builder setOptimizationParams( */ public Builder mergeOptimizationParams(org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParams value) { if (optimizationParamsBuilder_ == null) { - if (optimizationParams_ != null) { - optimizationParams_ = - org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParams.newBuilder(optimizationParams_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000010) != 0) && + optimizationParams_ != null && + optimizationParams_ != org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParams.getDefaultInstance()) { + getOptimizationParamsBuilder().mergeFrom(value); } else { optimizationParams_ = value; } - onChanged(); } else { optimizationParamsBuilder_.mergeFrom(value); } - + if (optimizationParams_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } return this; } /** * .tensorflow.data.model.ModelProto.OptimizationParams optimization_params = 5; */ public Builder clearOptimizationParams() { - if (optimizationParamsBuilder_ == null) { - optimizationParams_ = null; - onChanged(); - } else { - optimizationParams_ = null; + bitField0_ = (bitField0_ & ~0x00000010); + optimizationParams_ = null; + if (optimizationParamsBuilder_ != null) { + optimizationParamsBuilder_.dispose(); optimizationParamsBuilder_ = null; } - + onChanged(); return this; } /** * .tensorflow.data.model.ModelProto.OptimizationParams optimization_params = 5; */ public org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParams.Builder getOptimizationParamsBuilder() { - + bitField0_ |= 0x00000010; onChanged(); return getOptimizationParamsFieldBuilder().getBuilder(); } @@ -6224,11 +6200,11 @@ public org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParamsOrBuil /** * .tensorflow.data.model.ModelProto.OptimizationParams optimization_params = 5; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParams, org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParams.Builder, org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParamsOrBuilder> getOptimizationParamsFieldBuilder() { if (optimizationParamsBuilder_ == null) { - optimizationParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + optimizationParamsBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParams, org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParams.Builder, org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParamsOrBuilder>( getOptimizationParams(), getParentForChildren(), @@ -6240,10 +6216,10 @@ public org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParamsOrBuil private com.google.protobuf.Internal.LongList gapTimes_ = emptyLongList(); private void ensureGapTimesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - gapTimes_ = mutableCopy(gapTimes_); - bitField0_ |= 0x00000002; - } + if (!gapTimes_.isModifiable()) { + gapTimes_ = makeMutableCopy(gapTimes_); + } + bitField0_ |= 0x00000020; } /** * repeated uint64 gap_times = 6; @@ -6251,8 +6227,8 @@ private void ensureGapTimesIsMutable() { */ public java.util.List getGapTimesList() { - return ((bitField0_ & 0x00000002) != 0) ? - java.util.Collections.unmodifiableList(gapTimes_) : gapTimes_; + gapTimes_.makeImmutable(); + return gapTimes_; } /** * repeated uint64 gap_times = 6; @@ -6277,8 +6253,10 @@ public long getGapTimes(int index) { */ public Builder setGapTimes( int index, long value) { + ensureGapTimesIsMutable(); gapTimes_.setLong(index, value); + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -6288,8 +6266,10 @@ public Builder setGapTimes( * @return This builder for chaining. */ public Builder addGapTimes(long value) { + ensureGapTimesIsMutable(); gapTimes_.addLong(value); + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -6303,6 +6283,7 @@ public Builder addAllGapTimes( ensureGapTimesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, gapTimes_); + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -6312,22 +6293,10 @@ public Builder addAllGapTimes( */ public Builder clearGapTimes() { gapTimes_ = emptyLongList(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.data.model.ModelProto) } @@ -6383,27 +6352,27 @@ public org.tensorflow.proto.data.model.Model.ModelProto getDefaultInstanceForTyp private static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_data_model_ModelProto_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_data_model_ModelProto_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_data_model_ModelProto_Node_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_data_model_ModelProto_Node_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_data_model_ModelProto_Node_Parameter_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_data_model_ModelProto_Node_Parameter_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_data_model_ModelProto_NodesEntry_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_data_model_ModelProto_NodesEntry_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_data_model_ModelProto_OptimizationParams_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_data_model_ModelProto_OptimizationParams_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor @@ -6460,33 +6429,34 @@ public org.tensorflow.proto.data.model.Model.ModelProto getDefaultInstanceForTyp internal_static_tensorflow_data_model_ModelProto_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_tensorflow_data_model_ModelProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_data_model_ModelProto_descriptor, new java.lang.String[] { "DatasetName", "Nodes", "Output", "IdCounter", "OptimizationParams", "GapTimes", }); internal_static_tensorflow_data_model_ModelProto_Node_descriptor = internal_static_tensorflow_data_model_ModelProto_descriptor.getNestedTypes().get(0); internal_static_tensorflow_data_model_ModelProto_Node_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_data_model_ModelProto_Node_descriptor, new java.lang.String[] { "Id", "Name", "Autotune", "BufferedBytes", "BufferedElements", "BytesConsumed", "BytesProduced", "NumElements", "ProcessingTime", "RecordMetrics", "Parameters", "InputProcessingTimeSum", "InputProcessingTimeCount", "Inputs", "NodeClass", "Ratio", "MemoryRatio", }); internal_static_tensorflow_data_model_ModelProto_Node_Parameter_descriptor = internal_static_tensorflow_data_model_ModelProto_Node_descriptor.getNestedTypes().get(0); internal_static_tensorflow_data_model_ModelProto_Node_Parameter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_data_model_ModelProto_Node_Parameter_descriptor, new java.lang.String[] { "Name", "Value", "StateValue", "Min", "Max", "Tunable", }); internal_static_tensorflow_data_model_ModelProto_NodesEntry_descriptor = internal_static_tensorflow_data_model_ModelProto_descriptor.getNestedTypes().get(1); internal_static_tensorflow_data_model_ModelProto_NodesEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_data_model_ModelProto_NodesEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_tensorflow_data_model_ModelProto_OptimizationParams_descriptor = internal_static_tensorflow_data_model_ModelProto_descriptor.getNestedTypes().get(2); internal_static_tensorflow_data_model_ModelProto_OptimizationParams_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_tensorflow_data_model_ModelProto_OptimizationParams_descriptor, new java.lang.String[] { "Algorithm", "CpuBudget", "RamBudget", "ModelInputTime", }); + descriptor.resolveAllFeaturesImmutable(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/distributed_runtime/DistributedRuntimePayloads.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/distributed_runtime/DistributedRuntimePayloads.java index 8e895de5c4d..a7c20819032 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/distributed_runtime/DistributedRuntimePayloads.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/distributed_runtime/DistributedRuntimePayloads.java @@ -1,10 +1,21 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tsl/protobuf/distributed_runtime_payloads.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: xla/tsl/protobuf/distributed_runtime_payloads.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto.distributed_runtime; public final class DistributedRuntimePayloads { private DistributedRuntimePayloads() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + DistributedRuntimePayloads.class.getName()); + } public static void registerAllExtensions( com.google.protobuf.ExtensionRegistryLite registry) { } @@ -41,7 +52,6 @@ boolean containsPayloads( /** * map<string, bytes> payloads = 1; */ - /* nullable */ com.google.protobuf.ByteString getPayloadsOrDefault( java.lang.String key, @@ -50,7 +60,6 @@ com.google.protobuf.ByteString getPayloadsOrDefault( /** * map<string, bytes> payloads = 1; */ - com.google.protobuf.ByteString getPayloadsOrThrow( java.lang.String key); } @@ -64,29 +73,26 @@ com.google.protobuf.ByteString getPayloadsOrThrow( * Protobuf type {@code tensorflow.distributed_runtime.GrpcPayloadContainer} */ public static final class GrpcPayloadContainer extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.distributed_runtime.GrpcPayloadContainer) GrpcPayloadContainerOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + GrpcPayloadContainer.class.getName()); + } // Use GrpcPayloadContainer.newBuilder() to construct. - private GrpcPayloadContainer(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private GrpcPayloadContainer(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private GrpcPayloadContainer() { } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GrpcPayloadContainer(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.internal_static_tensorflow_distributed_runtime_GrpcPayloadContainer_descriptor; @@ -94,7 +100,7 @@ protected java.lang.Object newInstance( @SuppressWarnings({"rawtypes"}) @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 1: @@ -105,7 +111,7 @@ protected com.google.protobuf.MapField internalGetMapField( } } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.internal_static_tensorflow_distributed_runtime_GrpcPayloadContainer_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -124,6 +130,7 @@ private static final class PayloadsDefaultEntryHolder { com.google.protobuf.WireFormat.FieldType.BYTES, com.google.protobuf.ByteString.EMPTY); } + @SuppressWarnings("serial") private com.google.protobuf.MapField< java.lang.String, com.google.protobuf.ByteString> payloads_; private com.google.protobuf.MapField @@ -134,14 +141,12 @@ private static final class PayloadsDefaultEntryHolder { } return payloads_; } - public int getPayloadsCount() { return internalGetPayloads().getMap().size(); } /** * map<string, bytes> payloads = 1; */ - @java.lang.Override public boolean containsPayloads( java.lang.String key) { @@ -160,7 +165,6 @@ public java.util.Map getPayloa * map<string, bytes> payloads = 1; */ @java.lang.Override - public java.util.Map getPayloadsMap() { return internalGetPayloads().getMap(); } @@ -168,10 +172,11 @@ public java.util.Map getPayloa * map<string, bytes> payloads = 1; */ @java.lang.Override - - public com.google.protobuf.ByteString getPayloadsOrDefault( + public /* nullable */ +com.google.protobuf.ByteString getPayloadsOrDefault( java.lang.String key, - com.google.protobuf.ByteString defaultValue) { + /* nullable */ +com.google.protobuf.ByteString defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetPayloads().getMap(); @@ -181,7 +186,6 @@ public com.google.protobuf.ByteString getPayloadsOrDefault( * map<string, bytes> payloads = 1; */ @java.lang.Override - public com.google.protobuf.ByteString getPayloadsOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } @@ -207,7 +211,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3 + com.google.protobuf.GeneratedMessage .serializeStringMapTo( output, internalGetPayloads(), @@ -303,39 +307,41 @@ public static org.tensorflow.proto.distributed_runtime.DistributedRuntimePayload } public static org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.GrpcPayloadContainer parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.GrpcPayloadContainer parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.GrpcPayloadContainer parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.GrpcPayloadContainer parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.GrpcPayloadContainer parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.GrpcPayloadContainer parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -355,7 +361,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -369,7 +375,7 @@ protected Builder newBuilderForType( * Protobuf type {@code tensorflow.distributed_runtime.GrpcPayloadContainer} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.distributed_runtime.GrpcPayloadContainer) org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.GrpcPayloadContainerOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -378,7 +384,7 @@ public static final class Builder extends } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 1: @@ -389,7 +395,7 @@ protected com.google.protobuf.MapField internalGetMapField( } } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( int number) { switch (number) { case 1: @@ -400,7 +406,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField( } } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.internal_static_tensorflow_distributed_runtime_GrpcPayloadContainer_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -413,13 +419,14 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; internalGetMutablePayloads().clear(); return this; } @@ -447,45 +454,19 @@ public org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.GrpcP @java.lang.Override public org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.GrpcPayloadContainer buildPartial() { org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.GrpcPayloadContainer result = new org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.GrpcPayloadContainer(this); - int from_bitField0_ = bitField0_; - result.payloads_ = internalGetPayloads(); - result.payloads_.makeImmutable(); + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.GrpcPayloadContainer result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.payloads_ = internalGetPayloads(); + result.payloads_.makeImmutable(); + } } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.GrpcPayloadContainer) { @@ -500,6 +481,7 @@ public Builder mergeFrom(org.tensorflow.proto.distributed_runtime.DistributedRun if (other == org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.GrpcPayloadContainer.getDefaultInstance()) return this; internalGetMutablePayloads().mergeFrom( other.internalGetPayloads()); + bitField0_ |= 0x00000001; this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -532,6 +514,7 @@ public Builder mergeFrom( PayloadsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutablePayloads().getMutableMap().put( payloads__.getKey(), payloads__.getValue()); + bitField0_ |= 0x00000001; break; } // case 10 default: { @@ -554,7 +537,7 @@ public Builder mergeFrom( private com.google.protobuf.MapField< java.lang.String, com.google.protobuf.ByteString> payloads_; private com.google.protobuf.MapField - internalGetPayloads() { + internalGetPayloads() { if (payloads_ == null) { return com.google.protobuf.MapField.emptyMapField( PayloadsDefaultEntryHolder.defaultEntry); @@ -562,8 +545,7 @@ public Builder mergeFrom( return payloads_; } private com.google.protobuf.MapField - internalGetMutablePayloads() { - onChanged();; + internalGetMutablePayloads() { if (payloads_ == null) { payloads_ = com.google.protobuf.MapField.newMapField( PayloadsDefaultEntryHolder.defaultEntry); @@ -571,16 +553,16 @@ public Builder mergeFrom( if (!payloads_.isMutable()) { payloads_ = payloads_.copy(); } + bitField0_ |= 0x00000001; + onChanged(); return payloads_; } - public int getPayloadsCount() { return internalGetPayloads().getMap().size(); } /** * map<string, bytes> payloads = 1; */ - @java.lang.Override public boolean containsPayloads( java.lang.String key) { @@ -599,7 +581,6 @@ public java.util.Map getPayloa * map<string, bytes> payloads = 1; */ @java.lang.Override - public java.util.Map getPayloadsMap() { return internalGetPayloads().getMap(); } @@ -607,10 +588,11 @@ public java.util.Map getPayloa * map<string, bytes> payloads = 1; */ @java.lang.Override - - public com.google.protobuf.ByteString getPayloadsOrDefault( + public /* nullable */ +com.google.protobuf.ByteString getPayloadsOrDefault( java.lang.String key, - com.google.protobuf.ByteString defaultValue) { + /* nullable */ +com.google.protobuf.ByteString defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetPayloads().getMap(); @@ -620,7 +602,6 @@ public com.google.protobuf.ByteString getPayloadsOrDefault( * map<string, bytes> payloads = 1; */ @java.lang.Override - public com.google.protobuf.ByteString getPayloadsOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } @@ -631,8 +612,8 @@ public com.google.protobuf.ByteString getPayloadsOrThrow( } return map.get(key); } - public Builder clearPayloads() { + bitField0_ = (bitField0_ & ~0x00000001); internalGetMutablePayloads().getMutableMap() .clear(); return this; @@ -640,7 +621,6 @@ public Builder clearPayloads() { /** * map<string, bytes> payloads = 1; */ - public Builder removePayloads( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } @@ -653,7 +633,8 @@ public Builder removePayloads( */ @java.lang.Deprecated public java.util.Map - getMutablePayloads() { + getMutablePayloads() { + bitField0_ |= 0x00000001; return internalGetMutablePayloads().getMutableMap(); } /** @@ -663,36 +644,22 @@ public Builder putPayloads( java.lang.String key, com.google.protobuf.ByteString value) { if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { - throw new NullPointerException("map value"); -} - + if (value == null) { throw new NullPointerException("map value"); } internalGetMutablePayloads().getMutableMap() .put(key, value); + bitField0_ |= 0x00000001; return this; } /** * map<string, bytes> payloads = 1; */ - public Builder putAllPayloads( java.util.Map values) { internalGetMutablePayloads().getMutableMap() .putAll(values); + bitField0_ |= 0x00000001; return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.distributed_runtime.GrpcPayloadContainer) } @@ -759,36 +726,33 @@ public interface GrpcPayloadsLostOrBuilder extends * Protobuf type {@code tensorflow.distributed_runtime.GrpcPayloadsLost} */ public static final class GrpcPayloadsLost extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.distributed_runtime.GrpcPayloadsLost) GrpcPayloadsLostOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + GrpcPayloadsLost.class.getName()); + } // Use GrpcPayloadsLost.newBuilder() to construct. - private GrpcPayloadsLost(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private GrpcPayloadsLost(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private GrpcPayloadsLost() { } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GrpcPayloadsLost(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.internal_static_tensorflow_distributed_runtime_GrpcPayloadsLost_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.internal_static_tensorflow_distributed_runtime_GrpcPayloadsLost_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -883,39 +847,41 @@ public static org.tensorflow.proto.distributed_runtime.DistributedRuntimePayload } public static org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.GrpcPayloadsLost parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.GrpcPayloadsLost parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.GrpcPayloadsLost parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.GrpcPayloadsLost parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.GrpcPayloadsLost parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.GrpcPayloadsLost parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -935,7 +901,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -949,7 +915,7 @@ protected Builder newBuilderForType( * Protobuf type {@code tensorflow.distributed_runtime.GrpcPayloadsLost} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.distributed_runtime.GrpcPayloadsLost) org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.GrpcPayloadsLostOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -958,7 +924,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.internal_static_tensorflow_distributed_runtime_GrpcPayloadsLost_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -971,7 +937,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -1008,38 +974,6 @@ public org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.GrpcP return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.GrpcPayloadsLost) { @@ -1093,18 +1027,6 @@ public Builder mergeFrom( } // finally return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.distributed_runtime.GrpcPayloadsLost) } @@ -1172,36 +1094,33 @@ public interface WorkerPossiblyRestartedOrBuilder extends * Protobuf type {@code tensorflow.distributed_runtime.WorkerPossiblyRestarted} */ public static final class WorkerPossiblyRestarted extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.distributed_runtime.WorkerPossiblyRestarted) WorkerPossiblyRestartedOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + WorkerPossiblyRestarted.class.getName()); + } // Use WorkerPossiblyRestarted.newBuilder() to construct. - private WorkerPossiblyRestarted(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private WorkerPossiblyRestarted(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private WorkerPossiblyRestarted() { } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new WorkerPossiblyRestarted(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.internal_static_tensorflow_distributed_runtime_WorkerPossiblyRestarted_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.internal_static_tensorflow_distributed_runtime_WorkerPossiblyRestarted_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -1296,39 +1215,41 @@ public static org.tensorflow.proto.distributed_runtime.DistributedRuntimePayload } public static org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.WorkerPossiblyRestarted parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.WorkerPossiblyRestarted parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.WorkerPossiblyRestarted parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.WorkerPossiblyRestarted parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.WorkerPossiblyRestarted parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.WorkerPossiblyRestarted parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -1348,7 +1269,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -1363,7 +1284,7 @@ protected Builder newBuilderForType( * Protobuf type {@code tensorflow.distributed_runtime.WorkerPossiblyRestarted} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.distributed_runtime.WorkerPossiblyRestarted) org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.WorkerPossiblyRestartedOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -1372,7 +1293,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.internal_static_tensorflow_distributed_runtime_WorkerPossiblyRestarted_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -1385,7 +1306,7 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -1422,38 +1343,6 @@ public org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.Worke return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.WorkerPossiblyRestarted) { @@ -1507,18 +1396,6 @@ public Builder mergeFrom( } // finally return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.distributed_runtime.WorkerPossiblyRestarted) } @@ -1574,22 +1451,22 @@ public org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.Worke private static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_distributed_runtime_GrpcPayloadContainer_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_distributed_runtime_GrpcPayloadContainer_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_distributed_runtime_GrpcPayloadContainer_PayloadsEntry_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_distributed_runtime_GrpcPayloadContainer_PayloadsEntry_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_distributed_runtime_GrpcPayloadsLost_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_distributed_runtime_GrpcPayloadsLost_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_distributed_runtime_WorkerPossiblyRestarted_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tensorflow_distributed_runtime_WorkerPossiblyRestarted_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor @@ -1600,17 +1477,17 @@ public org.tensorflow.proto.distributed_runtime.DistributedRuntimePayloads.Worke descriptor; static { java.lang.String[] descriptorData = { - "\n/tsl/protobuf/distributed_runtime_paylo" + - "ads.proto\022\036tensorflow.distributed_runtim" + - "e\"\235\001\n\024GrpcPayloadContainer\022T\n\010payloads\030\001" + - " \003(\0132B.tensorflow.distributed_runtime.Gr" + - "pcPayloadContainer.PayloadsEntry\032/\n\rPayl" + - "oadsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\014:\0028" + - "\001\"\022\n\020GrpcPayloadsLost\"\031\n\027WorkerPossiblyR" + - "estartedBk\n(org.tensorflow.proto.distrib" + - "uted_runtimeZ builder) { + private RemoteTensorHandle(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private RemoteTensorHandle() { @@ -22,25 +33,13 @@ private RemoteTensorHandle() { resourceDtypesAndShapes_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RemoteTensorHandle(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.eager.RemoteTensorHandleProtos.internal_static_tensorflow_eager_RemoteTensorHandle_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.eager.RemoteTensorHandleProtos.internal_static_tensorflow_eager_RemoteTensorHandle_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -48,7 +47,7 @@ protected java.lang.Object newInstance( } public static final int OP_ID_FIELD_NUMBER = 1; - private long opId_; + private long opId_ = 0L; /** *
        * The ID of the operation that produced this tensor.
    @@ -63,7 +62,7 @@ public long getOpId() {
       }
     
       public static final int OUTPUT_NUM_FIELD_NUMBER = 2;
    -  private int outputNum_;
    +  private int outputNum_ = 0;
       /**
        * 
        * The index into the outputs of the operation that produced this tensor.
    @@ -78,7 +77,8 @@ public int getOutputNum() {
       }
     
       public static final int DEVICE_FIELD_NUMBER = 3;
    -  private volatile java.lang.Object device_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object device_ = "";
       /**
        * 
        * Device where the tensor is located. Cannot be empty.
    @@ -126,7 +126,8 @@ public java.lang.String getDevice() {
       }
     
       public static final int OP_DEVICE_FIELD_NUMBER = 4;
    -  private volatile java.lang.Object opDevice_;
    +  @SuppressWarnings("serial")
    +  private volatile java.lang.Object opDevice_ = "";
       /**
        * 
        * Device of the operation producing this tensor. Can be empty if the
    @@ -174,7 +175,7 @@ public java.lang.String getOpDevice() {
       }
     
       public static final int DTYPE_FIELD_NUMBER = 5;
    -  private int dtype_;
    +  private int dtype_ = 0;
       /**
        * 
        * Tensor type.
    @@ -195,12 +196,12 @@ public java.lang.String getOpDevice() {
        * @return The dtype.
        */
       @java.lang.Override public org.tensorflow.proto.DataType getDtype() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(dtype_);
    +    org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(dtype_);
         return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
       }
     
       public static final int RESOURCE_DTYPES_AND_SHAPES_FIELD_NUMBER = 6;
    +  @SuppressWarnings("serial")
       private java.util.List resourceDtypesAndShapes_;
       /**
        * 
    @@ -280,11 +281,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         if (outputNum_ != 0) {
           output.writeInt32(2, outputNum_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(device_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, device_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(device_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 3, device_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(opDevice_)) {
    -      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, opDevice_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(opDevice_)) {
    +      com.google.protobuf.GeneratedMessage.writeString(output, 4, opDevice_);
         }
         if (dtype_ != org.tensorflow.proto.DataType.DT_INVALID.getNumber()) {
           output.writeEnum(5, dtype_);
    @@ -309,11 +310,11 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeInt32Size(2, outputNum_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(device_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, device_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(device_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(3, device_);
         }
    -    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(opDevice_)) {
    -      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, opDevice_);
    +    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(opDevice_)) {
    +      size += com.google.protobuf.GeneratedMessage.computeStringSize(4, opDevice_);
         }
         if (dtype_ != org.tensorflow.proto.DataType.DT_INVALID.getNumber()) {
           size += com.google.protobuf.CodedOutputStream
    @@ -414,39 +415,41 @@ public static org.tensorflow.proto.eager.RemoteTensorHandle parseFrom(
       }
       public static org.tensorflow.proto.eager.RemoteTensorHandle parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.eager.RemoteTensorHandle parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.eager.RemoteTensorHandle parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.eager.RemoteTensorHandle parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.eager.RemoteTensorHandle parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.eager.RemoteTensorHandle parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -466,7 +469,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -474,7 +477,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.eager.RemoteTensorHandle}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.eager.RemoteTensorHandle)
           org.tensorflow.proto.eager.RemoteTensorHandleOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -483,7 +486,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.eager.RemoteTensorHandleProtos.internal_static_tensorflow_eager_RemoteTensorHandle_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -496,30 +499,26 @@ private Builder() {
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
     
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           opId_ = 0L;
    -
           outputNum_ = 0;
    -
           device_ = "";
    -
           opDevice_ = "";
    -
           dtype_ = 0;
    -
           if (resourceDtypesAndShapesBuilder_ == null) {
             resourceDtypesAndShapes_ = java.util.Collections.emptyList();
           } else {
             resourceDtypesAndShapes_ = null;
             resourceDtypesAndShapesBuilder_.clear();
           }
    -      bitField0_ = (bitField0_ & ~0x00000001);
    +      bitField0_ = (bitField0_ & ~0x00000020);
           return this;
         }
     
    @@ -546,57 +545,43 @@ public org.tensorflow.proto.eager.RemoteTensorHandle build() {
         @java.lang.Override
         public org.tensorflow.proto.eager.RemoteTensorHandle buildPartial() {
           org.tensorflow.proto.eager.RemoteTensorHandle result = new org.tensorflow.proto.eager.RemoteTensorHandle(this);
    -      int from_bitField0_ = bitField0_;
    -      result.opId_ = opId_;
    -      result.outputNum_ = outputNum_;
    -      result.device_ = device_;
    -      result.opDevice_ = opDevice_;
    -      result.dtype_ = dtype_;
    +      buildPartialRepeatedFields(result);
    +      if (bitField0_ != 0) { buildPartial0(result); }
    +      onBuilt();
    +      return result;
    +    }
    +
    +    private void buildPartialRepeatedFields(org.tensorflow.proto.eager.RemoteTensorHandle result) {
           if (resourceDtypesAndShapesBuilder_ == null) {
    -        if (((bitField0_ & 0x00000001) != 0)) {
    +        if (((bitField0_ & 0x00000020) != 0)) {
               resourceDtypesAndShapes_ = java.util.Collections.unmodifiableList(resourceDtypesAndShapes_);
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ = (bitField0_ & ~0x00000020);
             }
             result.resourceDtypesAndShapes_ = resourceDtypesAndShapes_;
           } else {
             result.resourceDtypesAndShapes_ = resourceDtypesAndShapesBuilder_.build();
           }
    -      onBuilt();
    -      return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.eager.RemoteTensorHandle result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.opId_ = opId_;
    +      }
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.outputNum_ = outputNum_;
    +      }
    +      if (((from_bitField0_ & 0x00000004) != 0)) {
    +        result.device_ = device_;
    +      }
    +      if (((from_bitField0_ & 0x00000008) != 0)) {
    +        result.opDevice_ = opDevice_;
    +      }
    +      if (((from_bitField0_ & 0x00000010) != 0)) {
    +        result.dtype_ = dtype_;
    +      }
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.eager.RemoteTensorHandle) {
    @@ -617,10 +602,12 @@ public Builder mergeFrom(org.tensorflow.proto.eager.RemoteTensorHandle other) {
           }
           if (!other.getDevice().isEmpty()) {
             device_ = other.device_;
    +        bitField0_ |= 0x00000004;
             onChanged();
           }
           if (!other.getOpDevice().isEmpty()) {
             opDevice_ = other.opDevice_;
    +        bitField0_ |= 0x00000008;
             onChanged();
           }
           if (other.dtype_ != 0) {
    @@ -630,7 +617,7 @@ public Builder mergeFrom(org.tensorflow.proto.eager.RemoteTensorHandle other) {
             if (!other.resourceDtypesAndShapes_.isEmpty()) {
               if (resourceDtypesAndShapes_.isEmpty()) {
                 resourceDtypesAndShapes_ = other.resourceDtypesAndShapes_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000020);
               } else {
                 ensureResourceDtypesAndShapesIsMutable();
                 resourceDtypesAndShapes_.addAll(other.resourceDtypesAndShapes_);
    @@ -643,9 +630,9 @@ public Builder mergeFrom(org.tensorflow.proto.eager.RemoteTensorHandle other) {
                 resourceDtypesAndShapesBuilder_.dispose();
                 resourceDtypesAndShapesBuilder_ = null;
                 resourceDtypesAndShapes_ = other.resourceDtypesAndShapes_;
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000020);
                 resourceDtypesAndShapesBuilder_ = 
    -              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                      getResourceDtypesAndShapesFieldBuilder() : null;
               } else {
                 resourceDtypesAndShapesBuilder_.addAllMessages(other.resourceDtypesAndShapes_);
    @@ -680,27 +667,27 @@ public Builder mergeFrom(
                   break;
                 case 8: {
                   opId_ = input.readInt64();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 8
                 case 16: {
                   outputNum_ = input.readInt32();
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 16
                 case 26: {
                   device_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000004;
                   break;
                 } // case 26
                 case 34: {
                   opDevice_ = input.readStringRequireUtf8();
    -
    +              bitField0_ |= 0x00000008;
                   break;
                 } // case 34
                 case 40: {
                   dtype_ = input.readEnum();
    -
    +              bitField0_ |= 0x00000010;
                   break;
                 } // case 40
                 case 50: {
    @@ -756,8 +743,9 @@ public long getOpId() {
          * @return This builder for chaining.
          */
         public Builder setOpId(long value) {
    -      
    +
           opId_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -770,7 +758,7 @@ public Builder setOpId(long value) {
          * @return This builder for chaining.
          */
         public Builder clearOpId() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000001);
           opId_ = 0L;
           onChanged();
           return this;
    @@ -799,8 +787,9 @@ public int getOutputNum() {
          * @return This builder for chaining.
          */
         public Builder setOutputNum(int value) {
    -      
    +
           outputNum_ = value;
    +      bitField0_ |= 0x00000002;
           onChanged();
           return this;
         }
    @@ -813,7 +802,7 @@ public Builder setOutputNum(int value) {
          * @return This builder for chaining.
          */
         public Builder clearOutputNum() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000002);
           outputNum_ = 0;
           onChanged();
           return this;
    @@ -875,11 +864,9 @@ public java.lang.String getDevice() {
          */
         public Builder setDevice(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           device_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -893,8 +880,8 @@ public Builder setDevice(
          * @return This builder for chaining.
          */
         public Builder clearDevice() {
    -      
           device_ = getDefaultInstance().getDevice();
    +      bitField0_ = (bitField0_ & ~0x00000004);
           onChanged();
           return this;
         }
    @@ -910,12 +897,10 @@ public Builder clearDevice() {
          */
         public Builder setDeviceBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           device_ = value;
    +      bitField0_ |= 0x00000004;
           onChanged();
           return this;
         }
    @@ -976,11 +961,9 @@ public java.lang.String getOpDevice() {
          */
         public Builder setOpDevice(
             java.lang.String value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +      if (value == null) { throw new NullPointerException(); }
           opDevice_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -994,8 +977,8 @@ public Builder setOpDevice(
          * @return This builder for chaining.
          */
         public Builder clearOpDevice() {
    -      
           opDevice_ = getDefaultInstance().getOpDevice();
    +      bitField0_ = (bitField0_ & ~0x00000008);
           onChanged();
           return this;
         }
    @@ -1011,12 +994,10 @@ public Builder clearOpDevice() {
          */
         public Builder setOpDeviceBytes(
             com.google.protobuf.ByteString value) {
    -      if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -      
    +      if (value == null) { throw new NullPointerException(); }
    +      checkByteStringIsUtf8(value);
           opDevice_ = value;
    +      bitField0_ |= 0x00000008;
           onChanged();
           return this;
         }
    @@ -1043,8 +1024,8 @@ public Builder setOpDeviceBytes(
          * @return This builder for chaining.
          */
         public Builder setDtypeValue(int value) {
    -      
           dtype_ = value;
    +      bitField0_ |= 0x00000010;
           onChanged();
           return this;
         }
    @@ -1058,8 +1039,7 @@ public Builder setDtypeValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.DataType getDtype() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(dtype_);
    +      org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(dtype_);
           return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
         }
         /**
    @@ -1075,7 +1055,7 @@ public Builder setDtype(org.tensorflow.proto.DataType value) {
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00000010;
           dtype_ = value.getNumber();
           onChanged();
           return this;
    @@ -1089,7 +1069,7 @@ public Builder setDtype(org.tensorflow.proto.DataType value) {
          * @return This builder for chaining.
          */
         public Builder clearDtype() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000010);
           dtype_ = 0;
           onChanged();
           return this;
    @@ -1098,13 +1078,13 @@ public Builder clearDtype() {
         private java.util.List resourceDtypesAndShapes_ =
           java.util.Collections.emptyList();
         private void ensureResourceDtypesAndShapesIsMutable() {
    -      if (!((bitField0_ & 0x00000001) != 0)) {
    +      if (!((bitField0_ & 0x00000020) != 0)) {
             resourceDtypesAndShapes_ = new java.util.ArrayList(resourceDtypesAndShapes_);
    -        bitField0_ |= 0x00000001;
    +        bitField0_ |= 0x00000020;
            }
         }
     
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.eager.ResourceDtypeAndShape, org.tensorflow.proto.eager.ResourceDtypeAndShape.Builder, org.tensorflow.proto.eager.ResourceDtypeAndShapeOrBuilder> resourceDtypesAndShapesBuilder_;
     
         /**
    @@ -1294,7 +1274,7 @@ public Builder addAllResourceDtypesAndShapes(
         public Builder clearResourceDtypesAndShapes() {
           if (resourceDtypesAndShapesBuilder_ == null) {
             resourceDtypesAndShapes_ = java.util.Collections.emptyList();
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        bitField0_ = (bitField0_ & ~0x00000020);
             onChanged();
           } else {
             resourceDtypesAndShapesBuilder_.clear();
    @@ -1392,32 +1372,20 @@ public org.tensorflow.proto.eager.ResourceDtypeAndShape.Builder addResourceDtype
              getResourceDtypesAndShapesBuilderList() {
           return getResourceDtypesAndShapesFieldBuilder().getBuilderList();
         }
    -    private com.google.protobuf.RepeatedFieldBuilderV3<
    +    private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.eager.ResourceDtypeAndShape, org.tensorflow.proto.eager.ResourceDtypeAndShape.Builder, org.tensorflow.proto.eager.ResourceDtypeAndShapeOrBuilder> 
             getResourceDtypesAndShapesFieldBuilder() {
           if (resourceDtypesAndShapesBuilder_ == null) {
    -        resourceDtypesAndShapesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +        resourceDtypesAndShapesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.eager.ResourceDtypeAndShape, org.tensorflow.proto.eager.ResourceDtypeAndShape.Builder, org.tensorflow.proto.eager.ResourceDtypeAndShapeOrBuilder>(
                     resourceDtypesAndShapes_,
    -                ((bitField0_ & 0x00000001) != 0),
    +                ((bitField0_ & 0x00000020) != 0),
                     getParentForChildren(),
                     isClean());
             resourceDtypesAndShapes_ = null;
           }
           return resourceDtypesAndShapesBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.eager.RemoteTensorHandle)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/eager/RemoteTensorHandleOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/eager/RemoteTensorHandleOrBuilder.java
    index 4727a45247b..9eb4ee66050 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/eager/RemoteTensorHandleOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/eager/RemoteTensorHandleOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/remote_tensor_handle.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto.eager;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/eager/RemoteTensorHandleProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/eager/RemoteTensorHandleProtos.java
    index fc295ca1179..45419a5c2bc 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/eager/RemoteTensorHandleProtos.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/eager/RemoteTensorHandleProtos.java
    @@ -1,10 +1,21 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/remote_tensor_handle.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto.eager;
     
     public final class RemoteTensorHandleProtos {
       private RemoteTensorHandleProtos() {}
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      RemoteTensorHandleProtos.class.getName());
    +  }
       public static void registerAllExtensions(
           com.google.protobuf.ExtensionRegistryLite registry) {
       }
    @@ -17,12 +28,12 @@ public static void registerAllExtensions(
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_eager_ResourceDtypeAndShape_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_eager_ResourceDtypeAndShape_fieldAccessorTable;
       static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_eager_RemoteTensorHandle_descriptor;
       static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_eager_RemoteTensorHandle_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -59,15 +70,16 @@ public static void registerAllExtensions(
         internal_static_tensorflow_eager_ResourceDtypeAndShape_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_eager_ResourceDtypeAndShape_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_eager_ResourceDtypeAndShape_descriptor,
             new java.lang.String[] { "Dtype", "Shape", });
         internal_static_tensorflow_eager_RemoteTensorHandle_descriptor =
           getDescriptor().getMessageTypes().get(1);
         internal_static_tensorflow_eager_RemoteTensorHandle_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_eager_RemoteTensorHandle_descriptor,
             new java.lang.String[] { "OpId", "OutputNum", "Device", "OpDevice", "Dtype", "ResourceDtypesAndShapes", });
    +    descriptor.resolveAllFeaturesImmutable();
         org.tensorflow.proto.TensorShapeProtos.getDescriptor();
         org.tensorflow.proto.TypesProtos.getDescriptor();
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/eager/ResourceDtypeAndShape.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/eager/ResourceDtypeAndShape.java
    index 34bcff52797..5612cb28e21 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/eager/ResourceDtypeAndShape.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/eager/ResourceDtypeAndShape.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/remote_tensor_handle.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto.eager;
     
    @@ -7,45 +9,43 @@
      * Protobuf type {@code tensorflow.eager.ResourceDtypeAndShape}
      */
     public final class ResourceDtypeAndShape extends
    -    com.google.protobuf.GeneratedMessageV3 implements
    +    com.google.protobuf.GeneratedMessage implements
         // @@protoc_insertion_point(message_implements:tensorflow.eager.ResourceDtypeAndShape)
         ResourceDtypeAndShapeOrBuilder {
     private static final long serialVersionUID = 0L;
    +  static {
    +    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +      /* major= */ 4,
    +      /* minor= */ 28,
    +      /* patch= */ 3,
    +      /* suffix= */ "",
    +      ResourceDtypeAndShape.class.getName());
    +  }
       // Use ResourceDtypeAndShape.newBuilder() to construct.
    -  private ResourceDtypeAndShape(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +  private ResourceDtypeAndShape(com.google.protobuf.GeneratedMessage.Builder builder) {
         super(builder);
       }
       private ResourceDtypeAndShape() {
         dtype_ = 0;
       }
     
    -  @java.lang.Override
    -  @SuppressWarnings({"unused"})
    -  protected java.lang.Object newInstance(
    -      UnusedPrivateParameter unused) {
    -    return new ResourceDtypeAndShape();
    -  }
    -
    -  @java.lang.Override
    -  public final com.google.protobuf.UnknownFieldSet
    -  getUnknownFields() {
    -    return this.unknownFields;
    -  }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.tensorflow.proto.eager.RemoteTensorHandleProtos.internal_static_tensorflow_eager_ResourceDtypeAndShape_descriptor;
       }
     
       @java.lang.Override
    -  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return org.tensorflow.proto.eager.RemoteTensorHandleProtos.internal_static_tensorflow_eager_ResourceDtypeAndShape_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
                 org.tensorflow.proto.eager.ResourceDtypeAndShape.class, org.tensorflow.proto.eager.ResourceDtypeAndShape.Builder.class);
       }
     
    +  private int bitField0_;
       public static final int DTYPE_FIELD_NUMBER = 1;
    -  private int dtype_;
    +  private int dtype_ = 0;
       /**
        * .tensorflow.DataType dtype = 1;
        * @return The enum numeric value on the wire for dtype.
    @@ -58,8 +58,7 @@ protected java.lang.Object newInstance(
        * @return The dtype.
        */
       @java.lang.Override public org.tensorflow.proto.DataType getDtype() {
    -    @SuppressWarnings("deprecation")
    -    org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(dtype_);
    +    org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(dtype_);
         return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
       }
     
    @@ -71,7 +70,7 @@ protected java.lang.Object newInstance(
        */
       @java.lang.Override
       public boolean hasShape() {
    -    return shape_ != null;
    +    return ((bitField0_ & 0x00000001) != 0);
       }
       /**
        * .tensorflow.TensorShapeProto shape = 2;
    @@ -86,7 +85,7 @@ public org.tensorflow.proto.TensorShapeProto getShape() {
        */
       @java.lang.Override
       public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
    -    return getShape();
    +    return shape_ == null ? org.tensorflow.proto.TensorShapeProto.getDefaultInstance() : shape_;
       }
     
       private byte memoizedIsInitialized = -1;
    @@ -106,7 +105,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         if (dtype_ != org.tensorflow.proto.DataType.DT_INVALID.getNumber()) {
           output.writeEnum(1, dtype_);
         }
    -    if (shape_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           output.writeMessage(2, getShape());
         }
         getUnknownFields().writeTo(output);
    @@ -122,7 +121,7 @@ public int getSerializedSize() {
           size += com.google.protobuf.CodedOutputStream
             .computeEnumSize(1, dtype_);
         }
    -    if (shape_ != null) {
    +    if (((bitField0_ & 0x00000001) != 0)) {
           size += com.google.protobuf.CodedOutputStream
             .computeMessageSize(2, getShape());
         }
    @@ -203,39 +202,41 @@ public static org.tensorflow.proto.eager.ResourceDtypeAndShape parseFrom(
       }
       public static org.tensorflow.proto.eager.ResourceDtypeAndShape parseFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.eager.ResourceDtypeAndShape parseFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
    +
       public static org.tensorflow.proto.eager.ResourceDtypeAndShape parseDelimitedFrom(java.io.InputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input);
       }
    +
       public static org.tensorflow.proto.eager.ResourceDtypeAndShape parseDelimitedFrom(
           java.io.InputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
       }
       public static org.tensorflow.proto.eager.ResourceDtypeAndShape parseFrom(
           com.google.protobuf.CodedInputStream input)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input);
       }
       public static org.tensorflow.proto.eager.ResourceDtypeAndShape parseFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
    -    return com.google.protobuf.GeneratedMessageV3
    +    return com.google.protobuf.GeneratedMessage
             .parseWithIOException(PARSER, input, extensionRegistry);
       }
     
    @@ -255,7 +256,7 @@ public Builder toBuilder() {
     
       @java.lang.Override
       protected Builder newBuilderForType(
    -      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
       }
    @@ -263,7 +264,7 @@ protected Builder newBuilderForType(
        * Protobuf type {@code tensorflow.eager.ResourceDtypeAndShape}
        */
       public static final class Builder extends
    -      com.google.protobuf.GeneratedMessageV3.Builder implements
    +      com.google.protobuf.GeneratedMessage.Builder implements
           // @@protoc_insertion_point(builder_implements:tensorflow.eager.ResourceDtypeAndShape)
           org.tensorflow.proto.eager.ResourceDtypeAndShapeOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
    @@ -272,7 +273,7 @@ public static final class Builder extends
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.eager.RemoteTensorHandleProtos.internal_static_tensorflow_eager_ResourceDtypeAndShape_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -281,23 +282,28 @@ public static final class Builder extends
     
         // Construct using org.tensorflow.proto.eager.ResourceDtypeAndShape.newBuilder()
         private Builder() {
    -
    +      maybeForceBuilderInitialization();
         }
     
         private Builder(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           super(parent);
    -
    +      maybeForceBuilderInitialization();
    +    }
    +    private void maybeForceBuilderInitialization() {
    +      if (com.google.protobuf.GeneratedMessage
    +              .alwaysUseFieldBuilders) {
    +        getShapeFieldBuilder();
    +      }
         }
         @java.lang.Override
         public Builder clear() {
           super.clear();
    +      bitField0_ = 0;
           dtype_ = 0;
    -
    -      if (shapeBuilder_ == null) {
    -        shape_ = null;
    -      } else {
    -        shape_ = null;
    +      shape_ = null;
    +      if (shapeBuilder_ != null) {
    +        shapeBuilder_.dispose();
             shapeBuilder_ = null;
           }
           return this;
    @@ -326,48 +332,26 @@ public org.tensorflow.proto.eager.ResourceDtypeAndShape build() {
         @java.lang.Override
         public org.tensorflow.proto.eager.ResourceDtypeAndShape buildPartial() {
           org.tensorflow.proto.eager.ResourceDtypeAndShape result = new org.tensorflow.proto.eager.ResourceDtypeAndShape(this);
    -      result.dtype_ = dtype_;
    -      if (shapeBuilder_ == null) {
    -        result.shape_ = shape_;
    -      } else {
    -        result.shape_ = shapeBuilder_.build();
    -      }
    +      if (bitField0_ != 0) { buildPartial0(result); }
           onBuilt();
           return result;
         }
     
    -    @java.lang.Override
    -    public Builder clone() {
    -      return super.clone();
    -    }
    -    @java.lang.Override
    -    public Builder setField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.setField(field, value);
    -    }
    -    @java.lang.Override
    -    public Builder clearField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field) {
    -      return super.clearField(field);
    -    }
    -    @java.lang.Override
    -    public Builder clearOneof(
    -        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -      return super.clearOneof(oneof);
    -    }
    -    @java.lang.Override
    -    public Builder setRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        int index, java.lang.Object value) {
    -      return super.setRepeatedField(field, index, value);
    -    }
    -    @java.lang.Override
    -    public Builder addRepeatedField(
    -        com.google.protobuf.Descriptors.FieldDescriptor field,
    -        java.lang.Object value) {
    -      return super.addRepeatedField(field, value);
    +    private void buildPartial0(org.tensorflow.proto.eager.ResourceDtypeAndShape result) {
    +      int from_bitField0_ = bitField0_;
    +      if (((from_bitField0_ & 0x00000001) != 0)) {
    +        result.dtype_ = dtype_;
    +      }
    +      int to_bitField0_ = 0;
    +      if (((from_bitField0_ & 0x00000002) != 0)) {
    +        result.shape_ = shapeBuilder_ == null
    +            ? shape_
    +            : shapeBuilder_.build();
    +        to_bitField0_ |= 0x00000001;
    +      }
    +      result.bitField0_ |= to_bitField0_;
         }
    +
         @java.lang.Override
         public Builder mergeFrom(com.google.protobuf.Message other) {
           if (other instanceof org.tensorflow.proto.eager.ResourceDtypeAndShape) {
    @@ -414,14 +398,14 @@ public Builder mergeFrom(
                   break;
                 case 8: {
                   dtype_ = input.readEnum();
    -
    +              bitField0_ |= 0x00000001;
                   break;
                 } // case 8
                 case 18: {
                   input.readMessage(
                       getShapeFieldBuilder().getBuilder(),
                       extensionRegistry);
    -
    +              bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 default: {
    @@ -439,6 +423,7 @@ public Builder mergeFrom(
           } // finally
           return this;
         }
    +    private int bitField0_;
     
         private int dtype_ = 0;
         /**
    @@ -454,8 +439,8 @@ public Builder mergeFrom(
          * @return This builder for chaining.
          */
         public Builder setDtypeValue(int value) {
    -      
           dtype_ = value;
    +      bitField0_ |= 0x00000001;
           onChanged();
           return this;
         }
    @@ -465,8 +450,7 @@ public Builder setDtypeValue(int value) {
          */
         @java.lang.Override
         public org.tensorflow.proto.DataType getDtype() {
    -      @SuppressWarnings("deprecation")
    -      org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.valueOf(dtype_);
    +      org.tensorflow.proto.DataType result = org.tensorflow.proto.DataType.forNumber(dtype_);
           return result == null ? org.tensorflow.proto.DataType.UNRECOGNIZED : result;
         }
         /**
    @@ -478,7 +462,7 @@ public Builder setDtype(org.tensorflow.proto.DataType value) {
           if (value == null) {
             throw new NullPointerException();
           }
    -      
    +      bitField0_ |= 0x00000001;
           dtype_ = value.getNumber();
           onChanged();
           return this;
    @@ -488,21 +472,21 @@ public Builder setDtype(org.tensorflow.proto.DataType value) {
          * @return This builder for chaining.
          */
         public Builder clearDtype() {
    -      
    +      bitField0_ = (bitField0_ & ~0x00000001);
           dtype_ = 0;
           onChanged();
           return this;
         }
     
         private org.tensorflow.proto.TensorShapeProto shape_;
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> shapeBuilder_;
         /**
          * .tensorflow.TensorShapeProto shape = 2;
          * @return Whether the shape field is set.
          */
         public boolean hasShape() {
    -      return shapeBuilder_ != null || shape_ != null;
    +      return ((bitField0_ & 0x00000002) != 0);
         }
         /**
          * .tensorflow.TensorShapeProto shape = 2;
    @@ -524,11 +508,11 @@ public Builder setShape(org.tensorflow.proto.TensorShapeProto value) {
               throw new NullPointerException();
             }
             shape_ = value;
    -        onChanged();
           } else {
             shapeBuilder_.setMessage(value);
           }
    -
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return this;
         }
         /**
    @@ -538,11 +522,11 @@ public Builder setShape(
             org.tensorflow.proto.TensorShapeProto.Builder builderForValue) {
           if (shapeBuilder_ == null) {
             shape_ = builderForValue.build();
    -        onChanged();
           } else {
             shapeBuilder_.setMessage(builderForValue.build());
           }
    -
    +      bitField0_ |= 0x00000002;
    +      onChanged();
           return this;
         }
         /**
    @@ -550,38 +534,40 @@ public Builder setShape(
          */
         public Builder mergeShape(org.tensorflow.proto.TensorShapeProto value) {
           if (shapeBuilder_ == null) {
    -        if (shape_ != null) {
    -          shape_ =
    -            org.tensorflow.proto.TensorShapeProto.newBuilder(shape_).mergeFrom(value).buildPartial();
    +        if (((bitField0_ & 0x00000002) != 0) &&
    +          shape_ != null &&
    +          shape_ != org.tensorflow.proto.TensorShapeProto.getDefaultInstance()) {
    +          getShapeBuilder().mergeFrom(value);
             } else {
               shape_ = value;
             }
    -        onChanged();
           } else {
             shapeBuilder_.mergeFrom(value);
           }
    -
    +      if (shape_ != null) {
    +        bitField0_ |= 0x00000002;
    +        onChanged();
    +      }
           return this;
         }
         /**
          * .tensorflow.TensorShapeProto shape = 2;
          */
         public Builder clearShape() {
    -      if (shapeBuilder_ == null) {
    -        shape_ = null;
    -        onChanged();
    -      } else {
    -        shape_ = null;
    +      bitField0_ = (bitField0_ & ~0x00000002);
    +      shape_ = null;
    +      if (shapeBuilder_ != null) {
    +        shapeBuilder_.dispose();
             shapeBuilder_ = null;
           }
    -
    +      onChanged();
           return this;
         }
         /**
          * .tensorflow.TensorShapeProto shape = 2;
          */
         public org.tensorflow.proto.TensorShapeProto.Builder getShapeBuilder() {
    -      
    +      bitField0_ |= 0x00000002;
           onChanged();
           return getShapeFieldBuilder().getBuilder();
         }
    @@ -599,11 +585,11 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
         /**
          * .tensorflow.TensorShapeProto shape = 2;
          */
    -    private com.google.protobuf.SingleFieldBuilderV3<
    +    private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> 
             getShapeFieldBuilder() {
           if (shapeBuilder_ == null) {
    -        shapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    +        shapeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder>(
                     getShape(),
                     getParentForChildren(),
    @@ -612,18 +598,6 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
           }
           return shapeBuilder_;
         }
    -    @java.lang.Override
    -    public final Builder setUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.setUnknownFields(unknownFields);
    -    }
    -
    -    @java.lang.Override
    -    public final Builder mergeUnknownFields(
    -        final com.google.protobuf.UnknownFieldSet unknownFields) {
    -      return super.mergeUnknownFields(unknownFields);
    -    }
    -
     
         // @@protoc_insertion_point(builder_scope:tensorflow.eager.ResourceDtypeAndShape)
       }
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/eager/ResourceDtypeAndShapeOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/eager/ResourceDtypeAndShapeOrBuilder.java
    index bbbdd73d315..62bf875b768 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/eager/ResourceDtypeAndShapeOrBuilder.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/eager/ResourceDtypeAndShapeOrBuilder.java
    @@ -1,5 +1,7 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    +// NO CHECKED-IN PROTOBUF GENCODE
     // source: tensorflow/core/protobuf/remote_tensor_handle.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto.eager;
     
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/error/Code.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/error/Code.java
    index 3c8fe9c414e..ccc93676255 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/error/Code.java
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/error/Code.java
    @@ -1,18 +1,23 @@
     // Generated by the protocol buffer compiler.  DO NOT EDIT!
    -// source: tsl/protobuf/error_codes.proto
    +// NO CHECKED-IN PROTOBUF GENCODE
    +// source: xla/tsl/protobuf/error_codes.proto
    +// Protobuf Java Version: 4.28.3
     
     package org.tensorflow.proto.error;
     
     /**
      * 
      * The canonical error codes for TensorFlow APIs.
    + *
      * Warnings:
    + *
      * -   Do not change any numeric assignments.
      * -   Changes to this list should only be made if there is a compelling
    - *     need that can't be satisfied in another way.  Such changes
    - *     must be approved by at least two OWNERS.
    + * need that can't be satisfied in another way.  Such changes
    + * must be approved by at least two OWNERS.
      * -   These error codes must match gRPC and protobuf error codes (except for
    - *     DO_NOT_USE_RESERVED_FOR_FUTURE_EXPANSION_USE_DEFAULT_IN_SWITCH_INSTEAD_).
    + * DO_NOT_USE_RESERVED_FOR_FUTURE_EXPANSION_USE_DEFAULT_IN_SWITCH_INSTEAD_).
    + *
      * Sometimes multiple error codes may apply.  Services should return
      * the most specific error code that applies.  For example, prefer
      * OUT_OF_RANGE over FAILED_PRECONDITION if both codes apply.
    @@ -130,20 +135,21 @@ public enum Code
        * required for the operation's execution.  For example, directory
        * to be deleted may be non-empty, an rmdir operation is applied to
        * a non-directory, etc.
    +   *
        * A litmus test that may help a service implementor in deciding
        * between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE:
    -   *  (a) Use UNAVAILABLE if the client can retry just the failing call.
    -   *  (b) Use ABORTED if the client should retry at a higher-level
    -   *      (e.g., restarting a read-modify-write sequence).
    -   *  (c) Use FAILED_PRECONDITION if the client should not retry until
    -   *      the system state has been explicitly fixed.  E.g., if an "rmdir"
    -   *      fails because the directory is non-empty, FAILED_PRECONDITION
    -   *      should be returned since the client should not retry unless
    -   *      they have first fixed up the directory by deleting files from it.
    -   *  (d) Use FAILED_PRECONDITION if the client performs conditional
    -   *      REST Get/Update/Delete on a resource and the resource on the
    -   *      server does not match the condition. E.g., conflicting
    -   *      read-modify-write on the same resource.
    +   * (a) Use UNAVAILABLE if the client can retry just the failing call.
    +   * (b) Use ABORTED if the client should retry at a higher-level
    +   * (e.g., restarting a read-modify-write sequence).
    +   * (c) Use FAILED_PRECONDITION if the client should not retry until
    +   * the system state has been explicitly fixed.  E.g., if an "rmdir"
    +   * fails because the directory is non-empty, FAILED_PRECONDITION
    +   * should be returned since the client should not retry unless
    +   * they have first fixed up the directory by deleting files from it.
    +   * (d) Use FAILED_PRECONDITION if the client performs conditional
    +   * REST Get/Update/Delete on a resource and the resource on the
    +   * server does not match the condition. E.g., conflicting
    +   * read-modify-write on the same resource.
        * 
    * * FAILED_PRECONDITION = 9; @@ -153,6 +159,7 @@ public enum Code *
        * The operation was aborted, typically due to a concurrency issue
        * like sequencer check failures, transaction aborts, etc.
    +   *
        * See litmus test above for deciding between FAILED_PRECONDITION,
        * ABORTED, and UNAVAILABLE.
        * 
    @@ -164,12 +171,14 @@ public enum Code *
        * Operation tried to iterate past the valid input range.  E.g., seeking or
        * reading past end of file.
    +   *
        * Unlike INVALID_ARGUMENT, this error indicates a problem that may
        * be fixed if the system state changes. For example, a 32-bit file
        * system will generate INVALID_ARGUMENT if asked to read at an
        * offset that is not in the range [0,2^32-1], but it will generate
        * OUT_OF_RANGE if asked to read from an offset past the current
        * file size.
    +   *
        * There is a fair bit of overlap between FAILED_PRECONDITION and
        * OUT_OF_RANGE.  We recommend using OUT_OF_RANGE (the more specific
        * error) when it applies so that callers who are iterating through
    @@ -203,6 +212,7 @@ public enum Code
        * The service is currently unavailable.  This is a most likely a
        * transient condition and may be corrected by retrying with
        * a backoff.
    +   *
        * See litmus test above for deciding between FAILED_PRECONDITION,
        * ABORTED, and UNAVAILABLE.
        * 
    @@ -222,9 +232,11 @@ public enum Code *
        * An extra enum entry to prevent people from writing code that
        * fails to compile when a new code is added.
    +   *
        * Nobody should ever reference this enumeration entry. In particular,
        * if you write C++ code that switches on this enumeration, add a default:
        * case instead of a case that mentions this enumeration entry.
    +   *
        * Nobody should rely on the value (currently 20) listed here.  It
        * may change in the future.
        * 
    @@ -235,6 +247,15 @@ public enum Code UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + Code.class.getName()); + } /** *
        * Not an error; returned on success
    @@ -342,20 +363,21 @@ public enum Code
        * required for the operation's execution.  For example, directory
        * to be deleted may be non-empty, an rmdir operation is applied to
        * a non-directory, etc.
    +   *
        * A litmus test that may help a service implementor in deciding
        * between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE:
    -   *  (a) Use UNAVAILABLE if the client can retry just the failing call.
    -   *  (b) Use ABORTED if the client should retry at a higher-level
    -   *      (e.g., restarting a read-modify-write sequence).
    -   *  (c) Use FAILED_PRECONDITION if the client should not retry until
    -   *      the system state has been explicitly fixed.  E.g., if an "rmdir"
    -   *      fails because the directory is non-empty, FAILED_PRECONDITION
    -   *      should be returned since the client should not retry unless
    -   *      they have first fixed up the directory by deleting files from it.
    -   *  (d) Use FAILED_PRECONDITION if the client performs conditional
    -   *      REST Get/Update/Delete on a resource and the resource on the
    -   *      server does not match the condition. E.g., conflicting
    -   *      read-modify-write on the same resource.
    +   * (a) Use UNAVAILABLE if the client can retry just the failing call.
    +   * (b) Use ABORTED if the client should retry at a higher-level
    +   * (e.g., restarting a read-modify-write sequence).
    +   * (c) Use FAILED_PRECONDITION if the client should not retry until
    +   * the system state has been explicitly fixed.  E.g., if an "rmdir"
    +   * fails because the directory is non-empty, FAILED_PRECONDITION
    +   * should be returned since the client should not retry unless
    +   * they have first fixed up the directory by deleting files from it.
    +   * (d) Use FAILED_PRECONDITION if the client performs conditional
    +   * REST Get/Update/Delete on a resource and the resource on the
    +   * server does not match the condition. E.g., conflicting
    +   * read-modify-write on the same resource.
        * 
    * * FAILED_PRECONDITION = 9; @@ -365,6 +387,7 @@ public enum Code *
        * The operation was aborted, typically due to a concurrency issue
        * like sequencer check failures, transaction aborts, etc.
    +   *
        * See litmus test above for deciding between FAILED_PRECONDITION,
        * ABORTED, and UNAVAILABLE.
        * 
    @@ -376,12 +399,14 @@ public enum Code *
        * Operation tried to iterate past the valid input range.  E.g., seeking or
        * reading past end of file.
    +   *
        * Unlike INVALID_ARGUMENT, this error indicates a problem that may
        * be fixed if the system state changes. For example, a 32-bit file
        * system will generate INVALID_ARGUMENT if asked to read at an
        * offset that is not in the range [0,2^32-1], but it will generate
        * OUT_OF_RANGE if asked to read from an offset past the current
        * file size.
    +   *
        * There is a fair bit of overlap between FAILED_PRECONDITION and
        * OUT_OF_RANGE.  We recommend using OUT_OF_RANGE (the more specific
        * error) when it applies so that callers who are iterating through
    @@ -415,6 +440,7 @@ public enum Code
        * The service is currently unavailable.  This is a most likely a
        * transient condition and may be corrected by retrying with
        * a backoff.
    +   *
        * See litmus test above for deciding between FAILED_PRECONDITION,
        * ABORTED, and UNAVAILABLE.
        * 
    @@ -434,9 +460,11 @@ public enum Code *
        * An extra enum entry to prevent people from writing code that
        * fails to compile when a new code is added.
    +   *
        * Nobody should ever reference this enumeration entry. In particular,
        * if you write C++ code that switches on this enumeration, add a default:
        * case instead of a case that mentions this enumeration entry.
    +   *
        * Nobody should rely on the value (currently 20) listed here.  It
        * may change in the future.
        * 
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/error/ErrorCodesProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/error/ErrorCodesProtos.java index ab56718ac13..929653c772d 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/error/ErrorCodesProtos.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/error/ErrorCodesProtos.java @@ -1,10 +1,21 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: tsl/protobuf/error_codes.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: xla/tsl/protobuf/error_codes.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto.error; public final class ErrorCodesProtos { private ErrorCodesProtos() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + ErrorCodesProtos.class.getName()); + } public static void registerAllExtensions( com.google.protobuf.ExtensionRegistryLite registry) { } @@ -23,26 +34,27 @@ public static void registerAllExtensions( descriptor; static { java.lang.String[] descriptorData = { - "\n\036tsl/protobuf/error_codes.proto\022\020tensor" + - "flow.error*\204\003\n\004Code\022\006\n\002OK\020\000\022\r\n\tCANCELLED" + - "\020\001\022\013\n\007UNKNOWN\020\002\022\024\n\020INVALID_ARGUMENT\020\003\022\025\n" + - "\021DEADLINE_EXCEEDED\020\004\022\r\n\tNOT_FOUND\020\005\022\022\n\016A" + - "LREADY_EXISTS\020\006\022\025\n\021PERMISSION_DENIED\020\007\022\023" + - "\n\017UNAUTHENTICATED\020\020\022\026\n\022RESOURCE_EXHAUSTE" + - "D\020\010\022\027\n\023FAILED_PRECONDITION\020\t\022\013\n\007ABORTED\020" + - "\n\022\020\n\014OUT_OF_RANGE\020\013\022\021\n\rUNIMPLEMENTED\020\014\022\014" + - "\n\010INTERNAL\020\r\022\017\n\013UNAVAILABLE\020\016\022\r\n\tDATA_LO" + - "SS\020\017\022K\nGDO_NOT_USE_RESERVED_FOR_FUTURE_E" + - "XPANSION_USE_DEFAULT_IN_SWITCH_INSTEAD_\020" + - "\024Bs\n\032org.tensorflow.proto.errorB\020ErrorCo" + - "desProtosP\001Z>github.com/google/tsl/tsl/g" + - "o/protobuf/for_core_protos_go_proto\370\001\001b\006" + - "proto3" + "\n\"xla/tsl/protobuf/error_codes.proto\022\020te" + + "nsorflow.error*\204\003\n\004Code\022\006\n\002OK\020\000\022\r\n\tCANCE" + + "LLED\020\001\022\013\n\007UNKNOWN\020\002\022\024\n\020INVALID_ARGUMENT\020" + + "\003\022\025\n\021DEADLINE_EXCEEDED\020\004\022\r\n\tNOT_FOUND\020\005\022" + + "\022\n\016ALREADY_EXISTS\020\006\022\025\n\021PERMISSION_DENIED" + + "\020\007\022\023\n\017UNAUTHENTICATED\020\020\022\026\n\022RESOURCE_EXHA" + + "USTED\020\010\022\027\n\023FAILED_PRECONDITION\020\t\022\013\n\007ABOR" + + "TED\020\n\022\020\n\014OUT_OF_RANGE\020\013\022\021\n\rUNIMPLEMENTED" + + "\020\014\022\014\n\010INTERNAL\020\r\022\017\n\013UNAVAILABLE\020\016\022\r\n\tDAT" + + "A_LOSS\020\017\022K\nGDO_NOT_USE_RESERVED_FOR_FUTU" + + "RE_EXPANSION_USE_DEFAULT_IN_SWITCH_INSTE" + + "AD_\020\024Bs\n\032org.tensorflow.proto.errorB\020Err" + + "orCodesProtosP\001Z>github.com/google/tsl/t" + + "sl/go/protobuf/for_core_protos_go_proto\370" + + "\001\001b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { }); + descriptor.resolveAllFeaturesImmutable(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/error/dummy/ErrorCodes.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/error/dummy/ErrorCodes.java index 9cb61ca6aac..508d4b92941 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/error/dummy/ErrorCodes.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/error/dummy/ErrorCodes.java @@ -1,10 +1,21 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/protobuf/error_codes.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto.error.dummy; public final class ErrorCodes { private ErrorCodes() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + ErrorCodes.class.getName()); + } public static void registerAllExtensions( com.google.protobuf.ExtensionRegistryLite registry) { } @@ -24,17 +35,18 @@ public static void registerAllExtensions( static { java.lang.String[] descriptorData = { "\n*tensorflow/core/protobuf/error_codes.p" + - "roto\022\026tensorflow.error.dummy\032\036tsl/protob" + - "uf/error_codes.protoBy\n org.tensorflow.p" + - "roto.error.dummyZUgithub.com/tensorflow/" + - "tensorflow/tensorflow/go/core/protobuf/f" + - "or_core_protos_go_protoP\000b\006proto3" + "roto\022\026tensorflow.error.dummy\032\"xla/tsl/pr" + + "otobuf/error_codes.protoBy\n org.tensorfl" + + "ow.proto.error.dummyZUgithub.com/tensorf" + + "low/tensorflow/tensorflow/go/core/protob" + + "uf/for_core_protos_go_protoP\000b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { org.tensorflow.proto.error.ErrorCodesProtos.getDescriptor(), }); + descriptor.resolveAllFeaturesImmutable(); org.tensorflow.proto.error.ErrorCodesProtos.getDescriptor(); } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/profiler/Xplane.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/profiler/Xplane.java index 8365662edbd..957746c4e45 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/profiler/Xplane.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/profiler/Xplane.java @@ -1,10 +1,21 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: tsl/profiler/protobuf/xplane.proto +// Protobuf Java Version: 4.28.3 package org.tensorflow.proto.profiler; public final class Xplane { private Xplane() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + Xplane.class.getName()); + } public static void registerAllExtensions( com.google.protobuf.ExtensionRegistryLite registry) { } @@ -174,40 +185,40 @@ org.tensorflow.proto.profiler.Xplane.XPlaneOrBuilder getPlanesOrBuilder( * Protobuf type {@code tensorflow.profiler.XSpace} */ public static final class XSpace extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.profiler.XSpace) XSpaceOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + XSpace.class.getName()); + } // Use XSpace.newBuilder() to construct. - private XSpace(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private XSpace(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private XSpace() { planes_ = java.util.Collections.emptyList(); - errors_ = com.google.protobuf.LazyStringArrayList.EMPTY; - warnings_ = com.google.protobuf.LazyStringArrayList.EMPTY; - hostnames_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new XSpace(); + errors_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + warnings_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + hostnames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.profiler.Xplane.internal_static_tensorflow_profiler_XSpace_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.profiler.Xplane.internal_static_tensorflow_profiler_XSpace_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -215,6 +226,7 @@ protected java.lang.Object newInstance( } public static final int PLANES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List planes_; /** * repeated .tensorflow.profiler.XPlane planes = 1; @@ -255,7 +267,9 @@ public org.tensorflow.proto.profiler.Xplane.XPlaneOrBuilder getPlanesOrBuilder( } public static final int ERRORS_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList errors_; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList errors_ = + com.google.protobuf.LazyStringArrayList.emptyList(); /** *
          * Errors (if any) in the generation of planes.
    @@ -306,7 +320,9 @@ public java.lang.String getErrors(int index) {
         }
     
         public static final int WARNINGS_FIELD_NUMBER = 3;
    -    private com.google.protobuf.LazyStringList warnings_;
    +    @SuppressWarnings("serial")
    +    private com.google.protobuf.LazyStringArrayList warnings_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         /**
          * 
          * Warnings (if any) in the generation of planes;
    @@ -357,7 +373,9 @@ public java.lang.String getWarnings(int index) {
         }
     
         public static final int HOSTNAMES_FIELD_NUMBER = 4;
    -    private com.google.protobuf.LazyStringList hostnames_;
    +    @SuppressWarnings("serial")
    +    private com.google.protobuf.LazyStringArrayList hostnames_ =
    +        com.google.protobuf.LazyStringArrayList.emptyList();
         /**
          * 
          * List of hostnames that XPlanes are generated from.
    @@ -425,13 +443,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
             output.writeMessage(1, planes_.get(i));
           }
           for (int i = 0; i < errors_.size(); i++) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, errors_.getRaw(i));
    +        com.google.protobuf.GeneratedMessage.writeString(output, 2, errors_.getRaw(i));
           }
           for (int i = 0; i < warnings_.size(); i++) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 3, warnings_.getRaw(i));
    +        com.google.protobuf.GeneratedMessage.writeString(output, 3, warnings_.getRaw(i));
           }
           for (int i = 0; i < hostnames_.size(); i++) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 4, hostnames_.getRaw(i));
    +        com.google.protobuf.GeneratedMessage.writeString(output, 4, hostnames_.getRaw(i));
           }
           getUnknownFields().writeTo(output);
         }
    @@ -559,39 +577,41 @@ public static org.tensorflow.proto.profiler.Xplane.XSpace parseFrom(
         }
         public static org.tensorflow.proto.profiler.Xplane.XSpace parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.profiler.Xplane.XSpace parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.profiler.Xplane.XSpace parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.profiler.Xplane.XSpace parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.profiler.Xplane.XSpace parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.profiler.Xplane.XSpace parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -611,7 +631,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -624,7 +644,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.profiler.XSpace}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.profiler.XSpace)
             org.tensorflow.proto.profiler.Xplane.XSpaceOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -633,7 +653,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.profiler.Xplane.internal_static_tensorflow_profiler_XSpace_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -646,13 +666,14 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             if (planesBuilder_ == null) {
               planes_ = java.util.Collections.emptyList();
             } else {
    @@ -660,12 +681,12 @@ public Builder clear() {
               planesBuilder_.clear();
             }
             bitField0_ = (bitField0_ & ~0x00000001);
    -        errors_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -        bitField0_ = (bitField0_ & ~0x00000002);
    -        warnings_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -        bitField0_ = (bitField0_ & ~0x00000004);
    -        hostnames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -        bitField0_ = (bitField0_ & ~0x00000008);
    +        errors_ =
    +            com.google.protobuf.LazyStringArrayList.emptyList();
    +        warnings_ =
    +            com.google.protobuf.LazyStringArrayList.emptyList();
    +        hostnames_ =
    +            com.google.protobuf.LazyStringArrayList.emptyList();
             return this;
           }
     
    @@ -692,7 +713,13 @@ public org.tensorflow.proto.profiler.Xplane.XSpace build() {
           @java.lang.Override
           public org.tensorflow.proto.profiler.Xplane.XSpace buildPartial() {
             org.tensorflow.proto.profiler.Xplane.XSpace result = new org.tensorflow.proto.profiler.Xplane.XSpace(this);
    -        int from_bitField0_ = bitField0_;
    +        buildPartialRepeatedFields(result);
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        onBuilt();
    +        return result;
    +      }
    +
    +      private void buildPartialRepeatedFields(org.tensorflow.proto.profiler.Xplane.XSpace result) {
             if (planesBuilder_ == null) {
               if (((bitField0_ & 0x00000001) != 0)) {
                 planes_ = java.util.Collections.unmodifiableList(planes_);
    @@ -702,57 +729,24 @@ public org.tensorflow.proto.profiler.Xplane.XSpace buildPartial() {
             } else {
               result.planes_ = planesBuilder_.build();
             }
    -        if (((bitField0_ & 0x00000002) != 0)) {
    -          errors_ = errors_.getUnmodifiableView();
    -          bitField0_ = (bitField0_ & ~0x00000002);
    +      }
    +
    +      private void buildPartial0(org.tensorflow.proto.profiler.Xplane.XSpace result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          errors_.makeImmutable();
    +          result.errors_ = errors_;
             }
    -        result.errors_ = errors_;
    -        if (((bitField0_ & 0x00000004) != 0)) {
    -          warnings_ = warnings_.getUnmodifiableView();
    -          bitField0_ = (bitField0_ & ~0x00000004);
    +        if (((from_bitField0_ & 0x00000004) != 0)) {
    +          warnings_.makeImmutable();
    +          result.warnings_ = warnings_;
             }
    -        result.warnings_ = warnings_;
    -        if (((bitField0_ & 0x00000008) != 0)) {
    -          hostnames_ = hostnames_.getUnmodifiableView();
    -          bitField0_ = (bitField0_ & ~0x00000008);
    +        if (((from_bitField0_ & 0x00000008) != 0)) {
    +          hostnames_.makeImmutable();
    +          result.hostnames_ = hostnames_;
             }
    -        result.hostnames_ = hostnames_;
    -        onBuilt();
    -        return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    -      }
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.profiler.Xplane.XSpace) {
    @@ -784,7 +778,7 @@ public Builder mergeFrom(org.tensorflow.proto.profiler.Xplane.XSpace other) {
                   planes_ = other.planes_;
                   bitField0_ = (bitField0_ & ~0x00000001);
                   planesBuilder_ = 
    -                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                        getPlanesFieldBuilder() : null;
                 } else {
                   planesBuilder_.addAllMessages(other.planes_);
    @@ -794,7 +788,7 @@ public Builder mergeFrom(org.tensorflow.proto.profiler.Xplane.XSpace other) {
             if (!other.errors_.isEmpty()) {
               if (errors_.isEmpty()) {
                 errors_ = other.errors_;
    -            bitField0_ = (bitField0_ & ~0x00000002);
    +            bitField0_ |= 0x00000002;
               } else {
                 ensureErrorsIsMutable();
                 errors_.addAll(other.errors_);
    @@ -804,7 +798,7 @@ public Builder mergeFrom(org.tensorflow.proto.profiler.Xplane.XSpace other) {
             if (!other.warnings_.isEmpty()) {
               if (warnings_.isEmpty()) {
                 warnings_ = other.warnings_;
    -            bitField0_ = (bitField0_ & ~0x00000004);
    +            bitField0_ |= 0x00000004;
               } else {
                 ensureWarningsIsMutable();
                 warnings_.addAll(other.warnings_);
    @@ -814,7 +808,7 @@ public Builder mergeFrom(org.tensorflow.proto.profiler.Xplane.XSpace other) {
             if (!other.hostnames_.isEmpty()) {
               if (hostnames_.isEmpty()) {
                 hostnames_ = other.hostnames_;
    -            bitField0_ = (bitField0_ & ~0x00000008);
    +            bitField0_ |= 0x00000008;
               } else {
                 ensureHostnamesIsMutable();
                 hostnames_.addAll(other.hostnames_);
    @@ -904,7 +898,7 @@ private void ensurePlanesIsMutable() {
              }
           }
     
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.profiler.Xplane.XPlane, org.tensorflow.proto.profiler.Xplane.XPlane.Builder, org.tensorflow.proto.profiler.Xplane.XPlaneOrBuilder> planesBuilder_;
     
           /**
    @@ -1120,11 +1114,11 @@ public org.tensorflow.proto.profiler.Xplane.XPlane.Builder addPlanesBuilder(
                getPlanesBuilderList() {
             return getPlanesFieldBuilder().getBuilderList();
           }
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.profiler.Xplane.XPlane, org.tensorflow.proto.profiler.Xplane.XPlane.Builder, org.tensorflow.proto.profiler.Xplane.XPlaneOrBuilder> 
               getPlanesFieldBuilder() {
             if (planesBuilder_ == null) {
    -          planesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +          planesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                   org.tensorflow.proto.profiler.Xplane.XPlane, org.tensorflow.proto.profiler.Xplane.XPlane.Builder, org.tensorflow.proto.profiler.Xplane.XPlaneOrBuilder>(
                       planes_,
                       ((bitField0_ & 0x00000001) != 0),
    @@ -1135,12 +1129,13 @@ public org.tensorflow.proto.profiler.Xplane.XPlane.Builder addPlanesBuilder(
             return planesBuilder_;
           }
     
    -      private com.google.protobuf.LazyStringList errors_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +      private com.google.protobuf.LazyStringArrayList errors_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
           private void ensureErrorsIsMutable() {
    -        if (!((bitField0_ & 0x00000002) != 0)) {
    +        if (!errors_.isModifiable()) {
               errors_ = new com.google.protobuf.LazyStringArrayList(errors_);
    -          bitField0_ |= 0x00000002;
    -         }
    +        }
    +        bitField0_ |= 0x00000002;
           }
           /**
            * 
    @@ -1152,7 +1147,8 @@ private void ensureErrorsIsMutable() {
            */
           public com.google.protobuf.ProtocolStringList
               getErrorsList() {
    -        return errors_.getUnmodifiableView();
    +        errors_.makeImmutable();
    +        return errors_;
           }
           /**
            * 
    @@ -1202,11 +1198,10 @@ public java.lang.String getErrors(int index) {
            */
           public Builder setErrors(
               int index, java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureErrorsIsMutable();
    +        if (value == null) { throw new NullPointerException(); }
    +        ensureErrorsIsMutable();
             errors_.set(index, value);
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -1221,11 +1216,10 @@ public Builder setErrors(
            */
           public Builder addErrors(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureErrorsIsMutable();
    +        if (value == null) { throw new NullPointerException(); }
    +        ensureErrorsIsMutable();
             errors_.add(value);
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -1243,6 +1237,7 @@ public Builder addAllErrors(
             ensureErrorsIsMutable();
             com.google.protobuf.AbstractMessageLite.Builder.addAll(
                 values, errors_);
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -1255,8 +1250,9 @@ public Builder addAllErrors(
            * @return This builder for chaining.
            */
           public Builder clearErrors() {
    -        errors_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -        bitField0_ = (bitField0_ & ~0x00000002);
    +        errors_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
    +        bitField0_ = (bitField0_ & ~0x00000002);;
             onChanged();
             return this;
           }
    @@ -1271,22 +1267,22 @@ public Builder clearErrors() {
            */
           public Builder addErrorsBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             ensureErrorsIsMutable();
             errors_.add(value);
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
     
    -      private com.google.protobuf.LazyStringList warnings_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +      private com.google.protobuf.LazyStringArrayList warnings_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
           private void ensureWarningsIsMutable() {
    -        if (!((bitField0_ & 0x00000004) != 0)) {
    +        if (!warnings_.isModifiable()) {
               warnings_ = new com.google.protobuf.LazyStringArrayList(warnings_);
    -          bitField0_ |= 0x00000004;
    -         }
    +        }
    +        bitField0_ |= 0x00000004;
           }
           /**
            * 
    @@ -1298,7 +1294,8 @@ private void ensureWarningsIsMutable() {
            */
           public com.google.protobuf.ProtocolStringList
               getWarningsList() {
    -        return warnings_.getUnmodifiableView();
    +        warnings_.makeImmutable();
    +        return warnings_;
           }
           /**
            * 
    @@ -1348,11 +1345,10 @@ public java.lang.String getWarnings(int index) {
            */
           public Builder setWarnings(
               int index, java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureWarningsIsMutable();
    +        if (value == null) { throw new NullPointerException(); }
    +        ensureWarningsIsMutable();
             warnings_.set(index, value);
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -1367,11 +1363,10 @@ public Builder setWarnings(
            */
           public Builder addWarnings(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureWarningsIsMutable();
    +        if (value == null) { throw new NullPointerException(); }
    +        ensureWarningsIsMutable();
             warnings_.add(value);
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -1389,6 +1384,7 @@ public Builder addAllWarnings(
             ensureWarningsIsMutable();
             com.google.protobuf.AbstractMessageLite.Builder.addAll(
                 values, warnings_);
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -1401,8 +1397,9 @@ public Builder addAllWarnings(
            * @return This builder for chaining.
            */
           public Builder clearWarnings() {
    -        warnings_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -        bitField0_ = (bitField0_ & ~0x00000004);
    +        warnings_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
    +        bitField0_ = (bitField0_ & ~0x00000004);;
             onChanged();
             return this;
           }
    @@ -1417,22 +1414,22 @@ public Builder clearWarnings() {
            */
           public Builder addWarningsBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             ensureWarningsIsMutable();
             warnings_.add(value);
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
     
    -      private com.google.protobuf.LazyStringList hostnames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    +      private com.google.protobuf.LazyStringArrayList hostnames_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
           private void ensureHostnamesIsMutable() {
    -        if (!((bitField0_ & 0x00000008) != 0)) {
    +        if (!hostnames_.isModifiable()) {
               hostnames_ = new com.google.protobuf.LazyStringArrayList(hostnames_);
    -          bitField0_ |= 0x00000008;
    -         }
    +        }
    +        bitField0_ |= 0x00000008;
           }
           /**
            * 
    @@ -1444,7 +1441,8 @@ private void ensureHostnamesIsMutable() {
            */
           public com.google.protobuf.ProtocolStringList
               getHostnamesList() {
    -        return hostnames_.getUnmodifiableView();
    +        hostnames_.makeImmutable();
    +        return hostnames_;
           }
           /**
            * 
    @@ -1494,11 +1492,10 @@ public java.lang.String getHostnames(int index) {
            */
           public Builder setHostnames(
               int index, java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureHostnamesIsMutable();
    +        if (value == null) { throw new NullPointerException(); }
    +        ensureHostnamesIsMutable();
             hostnames_.set(index, value);
    +        bitField0_ |= 0x00000008;
             onChanged();
             return this;
           }
    @@ -1513,11 +1510,10 @@ public Builder setHostnames(
            */
           public Builder addHostnames(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  ensureHostnamesIsMutable();
    +        if (value == null) { throw new NullPointerException(); }
    +        ensureHostnamesIsMutable();
             hostnames_.add(value);
    +        bitField0_ |= 0x00000008;
             onChanged();
             return this;
           }
    @@ -1535,6 +1531,7 @@ public Builder addAllHostnames(
             ensureHostnamesIsMutable();
             com.google.protobuf.AbstractMessageLite.Builder.addAll(
                 values, hostnames_);
    +        bitField0_ |= 0x00000008;
             onChanged();
             return this;
           }
    @@ -1547,8 +1544,9 @@ public Builder addAllHostnames(
            * @return This builder for chaining.
            */
           public Builder clearHostnames() {
    -        hostnames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    -        bitField0_ = (bitField0_ & ~0x00000008);
    +        hostnames_ =
    +          com.google.protobuf.LazyStringArrayList.emptyList();
    +        bitField0_ = (bitField0_ & ~0x00000008);;
             onChanged();
             return this;
           }
    @@ -1563,27 +1561,14 @@ public Builder clearHostnames() {
            */
           public Builder addHostnamesBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             ensureHostnamesIsMutable();
             hostnames_.add(value);
    +        bitField0_ |= 0x00000008;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.profiler.XSpace)
         }
    @@ -1758,7 +1743,6 @@ boolean containsEventMetadata(
          *
          * map<int64, .tensorflow.profiler.XEventMetadata> event_metadata = 4;
          */
    -
         /* nullable */
     org.tensorflow.proto.profiler.Xplane.XEventMetadata getEventMetadataOrDefault(
             long key,
    @@ -1772,7 +1756,6 @@ org.tensorflow.proto.profiler.Xplane.XEventMetadata getEventMetadataOrDefault(
          *
          * map<int64, .tensorflow.profiler.XEventMetadata> event_metadata = 4;
          */
    -
         org.tensorflow.proto.profiler.Xplane.XEventMetadata getEventMetadataOrThrow(
             long key);
     
    @@ -1819,7 +1802,6 @@ boolean containsStatMetadata(
          *
          * map<int64, .tensorflow.profiler.XStatMetadata> stat_metadata = 5;
          */
    -
         /* nullable */
     org.tensorflow.proto.profiler.Xplane.XStatMetadata getStatMetadataOrDefault(
             long key,
    @@ -1833,7 +1815,6 @@ org.tensorflow.proto.profiler.Xplane.XStatMetadata getStatMetadataOrDefault(
          *
          * map<int64, .tensorflow.profiler.XStatMetadata> stat_metadata = 5;
          */
    -
         org.tensorflow.proto.profiler.Xplane.XStatMetadata getStatMetadataOrThrow(
             long key);
     
    @@ -1896,12 +1877,21 @@ org.tensorflow.proto.profiler.Xplane.XStatOrBuilder getStatsOrBuilder(
        * Protobuf type {@code tensorflow.profiler.XPlane}
        */
       public static final class XPlane extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.profiler.XPlane)
           XPlaneOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        XPlane.class.getName());
    +    }
         // Use XPlane.newBuilder() to construct.
    -    private XPlane(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private XPlane(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private XPlane() {
    @@ -1910,18 +1900,6 @@ private XPlane() {
           stats_ = java.util.Collections.emptyList();
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new XPlane();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.profiler.Xplane.internal_static_tensorflow_profiler_XPlane_descriptor;
    @@ -1929,7 +1907,7 @@ protected java.lang.Object newInstance(
     
         @SuppressWarnings({"rawtypes"})
         @java.lang.Override
    -    protected com.google.protobuf.MapField internalGetMapField(
    +    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
             int number) {
           switch (number) {
             case 4:
    @@ -1942,7 +1920,7 @@ protected com.google.protobuf.MapField internalGetMapField(
           }
         }
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.profiler.Xplane.internal_static_tensorflow_profiler_XPlane_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -1950,7 +1928,7 @@ protected com.google.protobuf.MapField internalGetMapField(
         }
     
         public static final int ID_FIELD_NUMBER = 1;
    -    private long id_;
    +    private long id_ = 0L;
         /**
          * int64 id = 1;
          * @return The id.
    @@ -1961,7 +1939,8 @@ public long getId() {
         }
     
         public static final int NAME_FIELD_NUMBER = 2;
    -    private volatile java.lang.Object name_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object name_ = "";
         /**
          * 
          * Name of this XPlane.
    @@ -2007,6 +1986,7 @@ public java.lang.String getName() {
         }
     
         public static final int LINES_FIELD_NUMBER = 3;
    +    @SuppressWarnings("serial")
         private java.util.List lines_;
         /**
          * 
    @@ -2083,6 +2063,7 @@ private static final class EventMetadataDefaultEntryHolder {
                       com.google.protobuf.WireFormat.FieldType.MESSAGE,
                       org.tensorflow.proto.profiler.Xplane.XEventMetadata.getDefaultInstance());
         }
    +    @SuppressWarnings("serial")
         private com.google.protobuf.MapField<
             java.lang.Long, org.tensorflow.proto.profiler.Xplane.XEventMetadata> eventMetadata_;
         private com.google.protobuf.MapField
    @@ -2093,7 +2074,6 @@ private static final class EventMetadataDefaultEntryHolder {
           }
           return eventMetadata_;
         }
    -
         public int getEventMetadataCount() {
           return internalGetEventMetadata().getMap().size();
         }
    @@ -2105,11 +2085,10 @@ public int getEventMetadataCount() {
          *
          * map<int64, .tensorflow.profiler.XEventMetadata> event_metadata = 4;
          */
    -
         @java.lang.Override
         public boolean containsEventMetadata(
             long key) {
    -      
    +
           return internalGetEventMetadata().getMap().containsKey(key);
         }
         /**
    @@ -2129,7 +2108,6 @@ public java.util.Mapmap<int64, .tensorflow.profiler.XEventMetadata> event_metadata = 4;
          */
         @java.lang.Override
    -
         public java.util.Map getEventMetadataMap() {
           return internalGetEventMetadata().getMap();
         }
    @@ -2142,11 +2120,12 @@ public java.util.Mapmap<int64, .tensorflow.profiler.XEventMetadata> event_metadata = 4;
          */
         @java.lang.Override
    -
    -    public org.tensorflow.proto.profiler.Xplane.XEventMetadata getEventMetadataOrDefault(
    +    public /* nullable */
    +org.tensorflow.proto.profiler.Xplane.XEventMetadata getEventMetadataOrDefault(
             long key,
    -        org.tensorflow.proto.profiler.Xplane.XEventMetadata defaultValue) {
    -      
    +        /* nullable */
    +org.tensorflow.proto.profiler.Xplane.XEventMetadata defaultValue) {
    +
           java.util.Map map =
               internalGetEventMetadata().getMap();
           return map.containsKey(key) ? map.get(key) : defaultValue;
    @@ -2160,10 +2139,9 @@ public org.tensorflow.proto.profiler.Xplane.XEventMetadata getEventMetadataOrDef
          * map<int64, .tensorflow.profiler.XEventMetadata> event_metadata = 4;
          */
         @java.lang.Override
    -
         public org.tensorflow.proto.profiler.Xplane.XEventMetadata getEventMetadataOrThrow(
             long key) {
    -      
    +
           java.util.Map map =
               internalGetEventMetadata().getMap();
           if (!map.containsKey(key)) {
    @@ -2184,6 +2162,7 @@ private static final class StatMetadataDefaultEntryHolder {
                       com.google.protobuf.WireFormat.FieldType.MESSAGE,
                       org.tensorflow.proto.profiler.Xplane.XStatMetadata.getDefaultInstance());
         }
    +    @SuppressWarnings("serial")
         private com.google.protobuf.MapField<
             java.lang.Long, org.tensorflow.proto.profiler.Xplane.XStatMetadata> statMetadata_;
         private com.google.protobuf.MapField
    @@ -2194,7 +2173,6 @@ private static final class StatMetadataDefaultEntryHolder {
           }
           return statMetadata_;
         }
    -
         public int getStatMetadataCount() {
           return internalGetStatMetadata().getMap().size();
         }
    @@ -2206,11 +2184,10 @@ public int getStatMetadataCount() {
          *
          * map<int64, .tensorflow.profiler.XStatMetadata> stat_metadata = 5;
          */
    -
         @java.lang.Override
         public boolean containsStatMetadata(
             long key) {
    -      
    +
           return internalGetStatMetadata().getMap().containsKey(key);
         }
         /**
    @@ -2230,7 +2207,6 @@ public java.util.Mapmap<int64, .tensorflow.profiler.XStatMetadata> stat_metadata = 5;
          */
         @java.lang.Override
    -
         public java.util.Map getStatMetadataMap() {
           return internalGetStatMetadata().getMap();
         }
    @@ -2243,11 +2219,12 @@ public java.util.Mapmap<int64, .tensorflow.profiler.XStatMetadata> stat_metadata = 5;
          */
         @java.lang.Override
    -
    -    public org.tensorflow.proto.profiler.Xplane.XStatMetadata getStatMetadataOrDefault(
    +    public /* nullable */
    +org.tensorflow.proto.profiler.Xplane.XStatMetadata getStatMetadataOrDefault(
             long key,
    -        org.tensorflow.proto.profiler.Xplane.XStatMetadata defaultValue) {
    -      
    +        /* nullable */
    +org.tensorflow.proto.profiler.Xplane.XStatMetadata defaultValue) {
    +
           java.util.Map map =
               internalGetStatMetadata().getMap();
           return map.containsKey(key) ? map.get(key) : defaultValue;
    @@ -2261,10 +2238,9 @@ public org.tensorflow.proto.profiler.Xplane.XStatMetadata getStatMetadataOrDefau
          * map<int64, .tensorflow.profiler.XStatMetadata> stat_metadata = 5;
          */
         @java.lang.Override
    -
         public org.tensorflow.proto.profiler.Xplane.XStatMetadata getStatMetadataOrThrow(
             long key) {
    -      
    +
           java.util.Map map =
               internalGetStatMetadata().getMap();
           if (!map.containsKey(key)) {
    @@ -2274,6 +2250,7 @@ public org.tensorflow.proto.profiler.Xplane.XStatMetadata getStatMetadataOrThrow
         }
     
         public static final int STATS_FIELD_NUMBER = 6;
    +    @SuppressWarnings("serial")
         private java.util.List stats_;
         /**
          * 
    @@ -2355,19 +2332,19 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           if (id_ != 0L) {
             output.writeInt64(1, id_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 2, name_);
           }
           for (int i = 0; i < lines_.size(); i++) {
             output.writeMessage(3, lines_.get(i));
           }
    -      com.google.protobuf.GeneratedMessageV3
    +      com.google.protobuf.GeneratedMessage
             .serializeLongMapTo(
               output,
               internalGetEventMetadata(),
               EventMetadataDefaultEntryHolder.defaultEntry,
               4);
    -      com.google.protobuf.GeneratedMessageV3
    +      com.google.protobuf.GeneratedMessage
             .serializeLongMapTo(
               output,
               internalGetStatMetadata(),
    @@ -2389,8 +2366,8 @@ public int getSerializedSize() {
             size += com.google.protobuf.CodedOutputStream
               .computeInt64Size(1, id_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, name_);
           }
           for (int i = 0; i < lines_.size(); i++) {
             size += com.google.protobuf.CodedOutputStream
    @@ -2518,39 +2495,41 @@ public static org.tensorflow.proto.profiler.Xplane.XPlane parseFrom(
         }
         public static org.tensorflow.proto.profiler.Xplane.XPlane parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.profiler.Xplane.XPlane parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.profiler.Xplane.XPlane parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.profiler.Xplane.XPlane parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.profiler.Xplane.XPlane parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.profiler.Xplane.XPlane parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -2570,7 +2549,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -2584,7 +2563,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.profiler.XPlane}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.profiler.XPlane)
             org.tensorflow.proto.profiler.Xplane.XPlaneOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -2593,7 +2572,7 @@ public static final class Builder extends
           }
     
           @SuppressWarnings({"rawtypes"})
    -      protected com.google.protobuf.MapField internalGetMapField(
    +      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
               int number) {
             switch (number) {
               case 4:
    @@ -2606,7 +2585,7 @@ protected com.google.protobuf.MapField internalGetMapField(
             }
           }
           @SuppressWarnings({"rawtypes"})
    -      protected com.google.protobuf.MapField internalGetMutableMapField(
    +      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
               int number) {
             switch (number) {
               case 4:
    @@ -2619,7 +2598,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField(
             }
           }
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.profiler.Xplane.internal_static_tensorflow_profiler_XPlane_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -2632,24 +2611,23 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             id_ = 0L;
    -
             name_ = "";
    -
             if (linesBuilder_ == null) {
               lines_ = java.util.Collections.emptyList();
             } else {
               lines_ = null;
               linesBuilder_.clear();
             }
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        bitField0_ = (bitField0_ & ~0x00000004);
             internalGetMutableEventMetadata().clear();
             internalGetMutableStatMetadata().clear();
             if (statsBuilder_ == null) {
    @@ -2658,7 +2636,7 @@ public Builder clear() {
               stats_ = null;
               statsBuilder_.clear();
             }
    -        bitField0_ = (bitField0_ & ~0x00000008);
    +        bitField0_ = (bitField0_ & ~0x00000020);
             return this;
           }
     
    @@ -2685,67 +2663,49 @@ public org.tensorflow.proto.profiler.Xplane.XPlane build() {
           @java.lang.Override
           public org.tensorflow.proto.profiler.Xplane.XPlane buildPartial() {
             org.tensorflow.proto.profiler.Xplane.XPlane result = new org.tensorflow.proto.profiler.Xplane.XPlane(this);
    -        int from_bitField0_ = bitField0_;
    -        result.id_ = id_;
    -        result.name_ = name_;
    +        buildPartialRepeatedFields(result);
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        onBuilt();
    +        return result;
    +      }
    +
    +      private void buildPartialRepeatedFields(org.tensorflow.proto.profiler.Xplane.XPlane result) {
             if (linesBuilder_ == null) {
    -          if (((bitField0_ & 0x00000001) != 0)) {
    +          if (((bitField0_ & 0x00000004) != 0)) {
                 lines_ = java.util.Collections.unmodifiableList(lines_);
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000004);
               }
               result.lines_ = lines_;
             } else {
               result.lines_ = linesBuilder_.build();
             }
    -        result.eventMetadata_ = internalGetEventMetadata();
    -        result.eventMetadata_.makeImmutable();
    -        result.statMetadata_ = internalGetStatMetadata();
    -        result.statMetadata_.makeImmutable();
             if (statsBuilder_ == null) {
    -          if (((bitField0_ & 0x00000008) != 0)) {
    +          if (((bitField0_ & 0x00000020) != 0)) {
                 stats_ = java.util.Collections.unmodifiableList(stats_);
    -            bitField0_ = (bitField0_ & ~0x00000008);
    +            bitField0_ = (bitField0_ & ~0x00000020);
               }
               result.stats_ = stats_;
             } else {
               result.stats_ = statsBuilder_.build();
             }
    -        onBuilt();
    -        return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.profiler.Xplane.XPlane result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.id_ = id_;
    +        }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.name_ = name_;
    +        }
    +        if (((from_bitField0_ & 0x00000008) != 0)) {
    +          result.eventMetadata_ = internalGetEventMetadata().build(EventMetadataDefaultEntryHolder.defaultEntry);
    +        }
    +        if (((from_bitField0_ & 0x00000010) != 0)) {
    +          result.statMetadata_ = internalGetStatMetadata().build(StatMetadataDefaultEntryHolder.defaultEntry);
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.profiler.Xplane.XPlane) {
    @@ -2763,13 +2723,14 @@ public Builder mergeFrom(org.tensorflow.proto.profiler.Xplane.XPlane other) {
             }
             if (!other.getName().isEmpty()) {
               name_ = other.name_;
    +          bitField0_ |= 0x00000002;
               onChanged();
             }
             if (linesBuilder_ == null) {
               if (!other.lines_.isEmpty()) {
                 if (lines_.isEmpty()) {
                   lines_ = other.lines_;
    -              bitField0_ = (bitField0_ & ~0x00000001);
    +              bitField0_ = (bitField0_ & ~0x00000004);
                 } else {
                   ensureLinesIsMutable();
                   lines_.addAll(other.lines_);
    @@ -2782,9 +2743,9 @@ public Builder mergeFrom(org.tensorflow.proto.profiler.Xplane.XPlane other) {
                   linesBuilder_.dispose();
                   linesBuilder_ = null;
                   lines_ = other.lines_;
    -              bitField0_ = (bitField0_ & ~0x00000001);
    +              bitField0_ = (bitField0_ & ~0x00000004);
                   linesBuilder_ = 
    -                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                        getLinesFieldBuilder() : null;
                 } else {
                   linesBuilder_.addAllMessages(other.lines_);
    @@ -2793,13 +2754,15 @@ public Builder mergeFrom(org.tensorflow.proto.profiler.Xplane.XPlane other) {
             }
             internalGetMutableEventMetadata().mergeFrom(
                 other.internalGetEventMetadata());
    +        bitField0_ |= 0x00000008;
             internalGetMutableStatMetadata().mergeFrom(
                 other.internalGetStatMetadata());
    +        bitField0_ |= 0x00000010;
             if (statsBuilder_ == null) {
               if (!other.stats_.isEmpty()) {
                 if (stats_.isEmpty()) {
                   stats_ = other.stats_;
    -              bitField0_ = (bitField0_ & ~0x00000008);
    +              bitField0_ = (bitField0_ & ~0x00000020);
                 } else {
                   ensureStatsIsMutable();
                   stats_.addAll(other.stats_);
    @@ -2812,9 +2775,9 @@ public Builder mergeFrom(org.tensorflow.proto.profiler.Xplane.XPlane other) {
                   statsBuilder_.dispose();
                   statsBuilder_ = null;
                   stats_ = other.stats_;
    -              bitField0_ = (bitField0_ & ~0x00000008);
    +              bitField0_ = (bitField0_ & ~0x00000020);
                   statsBuilder_ = 
    -                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                        getStatsFieldBuilder() : null;
                 } else {
                   statsBuilder_.addAllMessages(other.stats_);
    @@ -2849,12 +2812,12 @@ public Builder mergeFrom(
                     break;
                   case 8: {
                     id_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 8
                   case 18: {
                     name_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 18
                   case 26: {
    @@ -2874,16 +2837,18 @@ public Builder mergeFrom(
                     com.google.protobuf.MapEntry
                     eventMetadata__ = input.readMessage(
                         EventMetadataDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
    -                internalGetMutableEventMetadata().getMutableMap().put(
    +                internalGetMutableEventMetadata().ensureBuilderMap().put(
                         eventMetadata__.getKey(), eventMetadata__.getValue());
    +                bitField0_ |= 0x00000008;
                     break;
                   } // case 34
                   case 42: {
                     com.google.protobuf.MapEntry
                     statMetadata__ = input.readMessage(
                         StatMetadataDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
    -                internalGetMutableStatMetadata().getMutableMap().put(
    +                internalGetMutableStatMetadata().ensureBuilderMap().put(
                         statMetadata__.getKey(), statMetadata__.getValue());
    +                bitField0_ |= 0x00000010;
                     break;
                   } // case 42
                   case 50: {
    @@ -2931,8 +2896,9 @@ public long getId() {
            * @return This builder for chaining.
            */
           public Builder setId(long value) {
    -        
    +
             id_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -2941,7 +2907,7 @@ public Builder setId(long value) {
            * @return This builder for chaining.
            */
           public Builder clearId() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000001);
             id_ = 0L;
             onChanged();
             return this;
    @@ -3000,11 +2966,9 @@ public java.lang.String getName() {
            */
           public Builder setName(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             name_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -3017,8 +2981,8 @@ public Builder setName(
            * @return This builder for chaining.
            */
           public Builder clearName() {
    -        
             name_ = getDefaultInstance().getName();
    +        bitField0_ = (bitField0_ & ~0x00000002);
             onChanged();
             return this;
           }
    @@ -3033,12 +2997,10 @@ public Builder clearName() {
            */
           public Builder setNameBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             name_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -3046,13 +3008,13 @@ public Builder setNameBytes(
           private java.util.List lines_ =
             java.util.Collections.emptyList();
           private void ensureLinesIsMutable() {
    -        if (!((bitField0_ & 0x00000001) != 0)) {
    +        if (!((bitField0_ & 0x00000004) != 0)) {
               lines_ = new java.util.ArrayList(lines_);
    -          bitField0_ |= 0x00000001;
    +          bitField0_ |= 0x00000004;
              }
           }
     
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.profiler.Xplane.XLine, org.tensorflow.proto.profiler.Xplane.XLine.Builder, org.tensorflow.proto.profiler.Xplane.XLineOrBuilder> linesBuilder_;
     
           /**
    @@ -3253,7 +3215,7 @@ public Builder addAllLines(
           public Builder clearLines() {
             if (linesBuilder_ == null) {
               lines_ = java.util.Collections.emptyList();
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ = (bitField0_ & ~0x00000004);
               onChanged();
             } else {
               linesBuilder_.clear();
    @@ -3358,14 +3320,14 @@ public org.tensorflow.proto.profiler.Xplane.XLine.Builder addLinesBuilder(
                getLinesBuilderList() {
             return getLinesFieldBuilder().getBuilderList();
           }
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.profiler.Xplane.XLine, org.tensorflow.proto.profiler.Xplane.XLine.Builder, org.tensorflow.proto.profiler.Xplane.XLineOrBuilder> 
               getLinesFieldBuilder() {
             if (linesBuilder_ == null) {
    -          linesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +          linesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                   org.tensorflow.proto.profiler.Xplane.XLine, org.tensorflow.proto.profiler.Xplane.XLine.Builder, org.tensorflow.proto.profiler.Xplane.XLineOrBuilder>(
                       lines_,
    -                  ((bitField0_ & 0x00000001) != 0),
    +                  ((bitField0_ & 0x00000004) != 0),
                       getParentForChildren(),
                       isClean());
               lines_ = null;
    @@ -3373,31 +3335,40 @@ public org.tensorflow.proto.profiler.Xplane.XLine.Builder addLinesBuilder(
             return linesBuilder_;
           }
     
    -      private com.google.protobuf.MapField<
    -          java.lang.Long, org.tensorflow.proto.profiler.Xplane.XEventMetadata> eventMetadata_;
    -      private com.google.protobuf.MapField
    -      internalGetEventMetadata() {
    +      private static final class EventMetadataConverter implements com.google.protobuf.MapFieldBuilder.Converter {
    +        @java.lang.Override
    +        public org.tensorflow.proto.profiler.Xplane.XEventMetadata build(org.tensorflow.proto.profiler.Xplane.XEventMetadataOrBuilder val) {
    +          if (val instanceof org.tensorflow.proto.profiler.Xplane.XEventMetadata) { return (org.tensorflow.proto.profiler.Xplane.XEventMetadata) val; }
    +          return ((org.tensorflow.proto.profiler.Xplane.XEventMetadata.Builder) val).build();
    +        }
    +
    +        @java.lang.Override
    +        public com.google.protobuf.MapEntry defaultEntry() {
    +          return EventMetadataDefaultEntryHolder.defaultEntry;
    +        }
    +      };
    +      private static final EventMetadataConverter eventMetadataConverter = new EventMetadataConverter();
    +
    +      private com.google.protobuf.MapFieldBuilder<
    +          java.lang.Long, org.tensorflow.proto.profiler.Xplane.XEventMetadataOrBuilder, org.tensorflow.proto.profiler.Xplane.XEventMetadata, org.tensorflow.proto.profiler.Xplane.XEventMetadata.Builder> eventMetadata_;
    +      private com.google.protobuf.MapFieldBuilder
    +          internalGetEventMetadata() {
             if (eventMetadata_ == null) {
    -          return com.google.protobuf.MapField.emptyMapField(
    -              EventMetadataDefaultEntryHolder.defaultEntry);
    +          return new com.google.protobuf.MapFieldBuilder<>(eventMetadataConverter);
             }
             return eventMetadata_;
           }
    -      private com.google.protobuf.MapField
    -      internalGetMutableEventMetadata() {
    -        onChanged();;
    +      private com.google.protobuf.MapFieldBuilder
    +          internalGetMutableEventMetadata() {
             if (eventMetadata_ == null) {
    -          eventMetadata_ = com.google.protobuf.MapField.newMapField(
    -              EventMetadataDefaultEntryHolder.defaultEntry);
    -        }
    -        if (!eventMetadata_.isMutable()) {
    -          eventMetadata_ = eventMetadata_.copy();
    +          eventMetadata_ = new com.google.protobuf.MapFieldBuilder<>(eventMetadataConverter);
             }
    +        bitField0_ |= 0x00000008;
    +        onChanged();
             return eventMetadata_;
           }
    -
           public int getEventMetadataCount() {
    -        return internalGetEventMetadata().getMap().size();
    +        return internalGetEventMetadata().ensureBuilderMap().size();
           }
           /**
            * 
    @@ -3407,12 +3378,11 @@ public int getEventMetadataCount() {
            *
            * map<int64, .tensorflow.profiler.XEventMetadata> event_metadata = 4;
            */
    -
           @java.lang.Override
           public boolean containsEventMetadata(
               long key) {
    -        
    -        return internalGetEventMetadata().getMap().containsKey(key);
    +
    +        return internalGetEventMetadata().ensureBuilderMap().containsKey(key);
           }
           /**
            * Use {@link #getEventMetadataMap()} instead.
    @@ -3431,9 +3401,8 @@ public java.util.Mapmap<int64, .tensorflow.profiler.XEventMetadata> event_metadata = 4;
            */
           @java.lang.Override
    -
           public java.util.Map getEventMetadataMap() {
    -        return internalGetEventMetadata().getMap();
    +        return internalGetEventMetadata().getImmutableMap();
           }
           /**
            * 
    @@ -3444,14 +3413,14 @@ public java.util.Mapmap<int64, .tensorflow.profiler.XEventMetadata> event_metadata = 4;
            */
           @java.lang.Override
    -
    -      public org.tensorflow.proto.profiler.Xplane.XEventMetadata getEventMetadataOrDefault(
    +      public /* nullable */
    +org.tensorflow.proto.profiler.Xplane.XEventMetadata getEventMetadataOrDefault(
               long key,
    -          org.tensorflow.proto.profiler.Xplane.XEventMetadata defaultValue) {
    -        
    -        java.util.Map map =
    -            internalGetEventMetadata().getMap();
    -        return map.containsKey(key) ? map.get(key) : defaultValue;
    +          /* nullable */
    +org.tensorflow.proto.profiler.Xplane.XEventMetadata defaultValue) {
    +
    +        java.util.Map map = internalGetMutableEventMetadata().ensureBuilderMap();
    +        return map.containsKey(key) ? eventMetadataConverter.build(map.get(key)) : defaultValue;
           }
           /**
            * 
    @@ -3462,21 +3431,18 @@ public org.tensorflow.proto.profiler.Xplane.XEventMetadata getEventMetadataOrDef
            * map<int64, .tensorflow.profiler.XEventMetadata> event_metadata = 4;
            */
           @java.lang.Override
    -
           public org.tensorflow.proto.profiler.Xplane.XEventMetadata getEventMetadataOrThrow(
               long key) {
    -        
    -        java.util.Map map =
    -            internalGetEventMetadata().getMap();
    +
    +        java.util.Map map = internalGetMutableEventMetadata().ensureBuilderMap();
             if (!map.containsKey(key)) {
               throw new java.lang.IllegalArgumentException();
             }
    -        return map.get(key);
    +        return eventMetadataConverter.build(map.get(key));
           }
    -
           public Builder clearEventMetadata() {
    -        internalGetMutableEventMetadata().getMutableMap()
    -            .clear();
    +        bitField0_ = (bitField0_ & ~0x00000008);
    +        internalGetMutableEventMetadata().clear();
             return this;
           }
           /**
    @@ -3487,11 +3453,10 @@ public Builder clearEventMetadata() {
            *
            * map<int64, .tensorflow.profiler.XEventMetadata> event_metadata = 4;
            */
    -
           public Builder removeEventMetadata(
               long key) {
    -        
    -        internalGetMutableEventMetadata().getMutableMap()
    +
    +        internalGetMutableEventMetadata().ensureBuilderMap()
                 .remove(key);
             return this;
           }
    @@ -3500,8 +3465,9 @@ public Builder removeEventMetadata(
            */
           @java.lang.Deprecated
           public java.util.Map
    -      getMutableEventMetadata() {
    -        return internalGetMutableEventMetadata().getMutableMap();
    +          getMutableEventMetadata() {
    +        bitField0_ |= 0x00000008;
    +        return internalGetMutableEventMetadata().ensureMessageMap();
           }
           /**
            * 
    @@ -3514,13 +3480,11 @@ public Builder removeEventMetadata(
           public Builder putEventMetadata(
               long key,
               org.tensorflow.proto.profiler.Xplane.XEventMetadata value) {
    -        
    -        if (value == null) {
    -  throw new NullPointerException("map value");
    -}
     
    -        internalGetMutableEventMetadata().getMutableMap()
    +        if (value == null) { throw new NullPointerException("map value"); }
    +        internalGetMutableEventMetadata().ensureBuilderMap()
                 .put(key, value);
    +        bitField0_ |= 0x00000008;
             return this;
           }
           /**
    @@ -3531,39 +3495,75 @@ public Builder putEventMetadata(
            *
            * map<int64, .tensorflow.profiler.XEventMetadata> event_metadata = 4;
            */
    -
           public Builder putAllEventMetadata(
               java.util.Map values) {
    -        internalGetMutableEventMetadata().getMutableMap()
    +        for (java.util.Map.Entry e : values.entrySet()) {
    +          if (e.getKey() == null || e.getValue() == null) {
    +            throw new NullPointerException();
    +          }
    +        }
    +        internalGetMutableEventMetadata().ensureBuilderMap()
                 .putAll(values);
    +        bitField0_ |= 0x00000008;
             return this;
           }
    +      /**
    +       * 
    +       * XEventMetadata map, each entry uses the XEventMetadata.id as key. This map
    +       * should be used for events that share the same ID over the whole XPlane.
    +       * 
    + * + * map<int64, .tensorflow.profiler.XEventMetadata> event_metadata = 4; + */ + public org.tensorflow.proto.profiler.Xplane.XEventMetadata.Builder putEventMetadataBuilderIfAbsent( + long key) { + java.util.Map builderMap = internalGetMutableEventMetadata().ensureBuilderMap(); + org.tensorflow.proto.profiler.Xplane.XEventMetadataOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = org.tensorflow.proto.profiler.Xplane.XEventMetadata.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof org.tensorflow.proto.profiler.Xplane.XEventMetadata) { + entry = ((org.tensorflow.proto.profiler.Xplane.XEventMetadata) entry).toBuilder(); + builderMap.put(key, entry); + } + return (org.tensorflow.proto.profiler.Xplane.XEventMetadata.Builder) entry; + } - private com.google.protobuf.MapField< - java.lang.Long, org.tensorflow.proto.profiler.Xplane.XStatMetadata> statMetadata_; - private com.google.protobuf.MapField - internalGetStatMetadata() { + private static final class StatMetadataConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public org.tensorflow.proto.profiler.Xplane.XStatMetadata build(org.tensorflow.proto.profiler.Xplane.XStatMetadataOrBuilder val) { + if (val instanceof org.tensorflow.proto.profiler.Xplane.XStatMetadata) { return (org.tensorflow.proto.profiler.Xplane.XStatMetadata) val; } + return ((org.tensorflow.proto.profiler.Xplane.XStatMetadata.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return StatMetadataDefaultEntryHolder.defaultEntry; + } + }; + private static final StatMetadataConverter statMetadataConverter = new StatMetadataConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.Long, org.tensorflow.proto.profiler.Xplane.XStatMetadataOrBuilder, org.tensorflow.proto.profiler.Xplane.XStatMetadata, org.tensorflow.proto.profiler.Xplane.XStatMetadata.Builder> statMetadata_; + private com.google.protobuf.MapFieldBuilder + internalGetStatMetadata() { if (statMetadata_ == null) { - return com.google.protobuf.MapField.emptyMapField( - StatMetadataDefaultEntryHolder.defaultEntry); + return new com.google.protobuf.MapFieldBuilder<>(statMetadataConverter); } return statMetadata_; } - private com.google.protobuf.MapField - internalGetMutableStatMetadata() { - onChanged();; + private com.google.protobuf.MapFieldBuilder + internalGetMutableStatMetadata() { if (statMetadata_ == null) { - statMetadata_ = com.google.protobuf.MapField.newMapField( - StatMetadataDefaultEntryHolder.defaultEntry); - } - if (!statMetadata_.isMutable()) { - statMetadata_ = statMetadata_.copy(); + statMetadata_ = new com.google.protobuf.MapFieldBuilder<>(statMetadataConverter); } + bitField0_ |= 0x00000010; + onChanged(); return statMetadata_; } - public int getStatMetadataCount() { - return internalGetStatMetadata().getMap().size(); + return internalGetStatMetadata().ensureBuilderMap().size(); } /** *
    @@ -3573,12 +3573,11 @@ public int getStatMetadataCount() {
            *
            * map<int64, .tensorflow.profiler.XStatMetadata> stat_metadata = 5;
            */
    -
           @java.lang.Override
           public boolean containsStatMetadata(
               long key) {
    -        
    -        return internalGetStatMetadata().getMap().containsKey(key);
    +
    +        return internalGetStatMetadata().ensureBuilderMap().containsKey(key);
           }
           /**
            * Use {@link #getStatMetadataMap()} instead.
    @@ -3597,9 +3596,8 @@ public java.util.Mapmap<int64, .tensorflow.profiler.XStatMetadata> stat_metadata = 5;
            */
           @java.lang.Override
    -
           public java.util.Map getStatMetadataMap() {
    -        return internalGetStatMetadata().getMap();
    +        return internalGetStatMetadata().getImmutableMap();
           }
           /**
            * 
    @@ -3610,14 +3608,14 @@ public java.util.Mapmap<int64, .tensorflow.profiler.XStatMetadata> stat_metadata = 5;
            */
           @java.lang.Override
    -
    -      public org.tensorflow.proto.profiler.Xplane.XStatMetadata getStatMetadataOrDefault(
    +      public /* nullable */
    +org.tensorflow.proto.profiler.Xplane.XStatMetadata getStatMetadataOrDefault(
               long key,
    -          org.tensorflow.proto.profiler.Xplane.XStatMetadata defaultValue) {
    -        
    -        java.util.Map map =
    -            internalGetStatMetadata().getMap();
    -        return map.containsKey(key) ? map.get(key) : defaultValue;
    +          /* nullable */
    +org.tensorflow.proto.profiler.Xplane.XStatMetadata defaultValue) {
    +
    +        java.util.Map map = internalGetMutableStatMetadata().ensureBuilderMap();
    +        return map.containsKey(key) ? statMetadataConverter.build(map.get(key)) : defaultValue;
           }
           /**
            * 
    @@ -3628,21 +3626,18 @@ public org.tensorflow.proto.profiler.Xplane.XStatMetadata getStatMetadataOrDefau
            * map<int64, .tensorflow.profiler.XStatMetadata> stat_metadata = 5;
            */
           @java.lang.Override
    -
           public org.tensorflow.proto.profiler.Xplane.XStatMetadata getStatMetadataOrThrow(
               long key) {
    -        
    -        java.util.Map map =
    -            internalGetStatMetadata().getMap();
    +
    +        java.util.Map map = internalGetMutableStatMetadata().ensureBuilderMap();
             if (!map.containsKey(key)) {
               throw new java.lang.IllegalArgumentException();
             }
    -        return map.get(key);
    +        return statMetadataConverter.build(map.get(key));
           }
    -
           public Builder clearStatMetadata() {
    -        internalGetMutableStatMetadata().getMutableMap()
    -            .clear();
    +        bitField0_ = (bitField0_ & ~0x00000010);
    +        internalGetMutableStatMetadata().clear();
             return this;
           }
           /**
    @@ -3653,11 +3648,10 @@ public Builder clearStatMetadata() {
            *
            * map<int64, .tensorflow.profiler.XStatMetadata> stat_metadata = 5;
            */
    -
           public Builder removeStatMetadata(
               long key) {
    -        
    -        internalGetMutableStatMetadata().getMutableMap()
    +
    +        internalGetMutableStatMetadata().ensureBuilderMap()
                 .remove(key);
             return this;
           }
    @@ -3666,8 +3660,9 @@ public Builder removeStatMetadata(
            */
           @java.lang.Deprecated
           public java.util.Map
    -      getMutableStatMetadata() {
    -        return internalGetMutableStatMetadata().getMutableMap();
    +          getMutableStatMetadata() {
    +        bitField0_ |= 0x00000010;
    +        return internalGetMutableStatMetadata().ensureMessageMap();
           }
           /**
            * 
    @@ -3680,13 +3675,11 @@ public Builder removeStatMetadata(
           public Builder putStatMetadata(
               long key,
               org.tensorflow.proto.profiler.Xplane.XStatMetadata value) {
    -        
    -        if (value == null) {
    -  throw new NullPointerException("map value");
    -}
     
    -        internalGetMutableStatMetadata().getMutableMap()
    +        if (value == null) { throw new NullPointerException("map value"); }
    +        internalGetMutableStatMetadata().ensureBuilderMap()
                 .put(key, value);
    +        bitField0_ |= 0x00000010;
             return this;
           }
           /**
    @@ -3697,24 +3690,51 @@ public Builder putStatMetadata(
            *
            * map<int64, .tensorflow.profiler.XStatMetadata> stat_metadata = 5;
            */
    -
           public Builder putAllStatMetadata(
               java.util.Map values) {
    -        internalGetMutableStatMetadata().getMutableMap()
    +        for (java.util.Map.Entry e : values.entrySet()) {
    +          if (e.getKey() == null || e.getValue() == null) {
    +            throw new NullPointerException();
    +          }
    +        }
    +        internalGetMutableStatMetadata().ensureBuilderMap()
                 .putAll(values);
    +        bitField0_ |= 0x00000010;
             return this;
           }
    +      /**
    +       * 
    +       * XStatMetadata map, each entry uses the XStatMetadata.id as key. This map
    +       * should be used for stats that share the same ID over the whole XPlane.
    +       * 
    + * + * map<int64, .tensorflow.profiler.XStatMetadata> stat_metadata = 5; + */ + public org.tensorflow.proto.profiler.Xplane.XStatMetadata.Builder putStatMetadataBuilderIfAbsent( + long key) { + java.util.Map builderMap = internalGetMutableStatMetadata().ensureBuilderMap(); + org.tensorflow.proto.profiler.Xplane.XStatMetadataOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = org.tensorflow.proto.profiler.Xplane.XStatMetadata.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof org.tensorflow.proto.profiler.Xplane.XStatMetadata) { + entry = ((org.tensorflow.proto.profiler.Xplane.XStatMetadata) entry).toBuilder(); + builderMap.put(key, entry); + } + return (org.tensorflow.proto.profiler.Xplane.XStatMetadata.Builder) entry; + } private java.util.List stats_ = java.util.Collections.emptyList(); private void ensureStatsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { + if (!((bitField0_ & 0x00000020) != 0)) { stats_ = new java.util.ArrayList(stats_); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000020; } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.profiler.Xplane.XStat, org.tensorflow.proto.profiler.Xplane.XStat.Builder, org.tensorflow.proto.profiler.Xplane.XStatOrBuilder> statsBuilder_; /** @@ -3915,7 +3935,7 @@ public Builder addAllStats( public Builder clearStats() { if (statsBuilder_ == null) { stats_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000020); onChanged(); } else { statsBuilder_.clear(); @@ -4020,32 +4040,20 @@ public org.tensorflow.proto.profiler.Xplane.XStat.Builder addStatsBuilder( getStatsBuilderList() { return getStatsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.profiler.Xplane.XStat, org.tensorflow.proto.profiler.Xplane.XStat.Builder, org.tensorflow.proto.profiler.Xplane.XStatOrBuilder> getStatsFieldBuilder() { if (statsBuilder_ == null) { - statsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + statsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.profiler.Xplane.XStat, org.tensorflow.proto.profiler.Xplane.XStat.Builder, org.tensorflow.proto.profiler.Xplane.XStatOrBuilder>( stats_, - ((bitField0_ & 0x00000008) != 0), + ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); stats_ = null; } return statsBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:tensorflow.profiler.XPlane) } @@ -4243,12 +4251,21 @@ org.tensorflow.proto.profiler.Xplane.XEventOrBuilder getEventsOrBuilder( * Protobuf type {@code tensorflow.profiler.XLine} */ public static final class XLine extends - com.google.protobuf.GeneratedMessageV3 implements + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.profiler.XLine) XLineOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 3, + /* suffix= */ "", + XLine.class.getName()); + } // Use XLine.newBuilder() to construct. - private XLine(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private XLine(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private XLine() { @@ -4257,25 +4274,13 @@ private XLine() { events_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new XLine(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.proto.profiler.Xplane.internal_static_tensorflow_profiler_XLine_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.proto.profiler.Xplane.internal_static_tensorflow_profiler_XLine_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -4283,7 +4288,7 @@ protected java.lang.Object newInstance( } public static final int ID_FIELD_NUMBER = 1; - private long id_; + private long id_ = 0L; /** *
          * Id of this line, can be repeated within an XPlane. All XLines with the
    @@ -4299,7 +4304,7 @@ public long getId() {
         }
     
         public static final int DISPLAY_ID_FIELD_NUMBER = 10;
    -    private long displayId_;
    +    private long displayId_ = 0L;
         /**
          * 
          * Display id of this line. Multiple lines with the same display_id are
    @@ -4315,7 +4320,8 @@ public long getDisplayId() {
         }
     
         public static final int NAME_FIELD_NUMBER = 2;
    -    private volatile java.lang.Object name_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object name_ = "";
         /**
          * 
          * Name of this XLine.
    @@ -4361,7 +4367,8 @@ public java.lang.String getName() {
         }
     
         public static final int DISPLAY_NAME_FIELD_NUMBER = 11;
    -    private volatile java.lang.Object displayName_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object displayName_ = "";
         /**
          * 
          * Name of this XLine to display in trace viewer.
    @@ -4407,7 +4414,7 @@ public java.lang.String getDisplayName() {
         }
     
         public static final int TIMESTAMP_NS_FIELD_NUMBER = 3;
    -    private long timestampNs_;
    +    private long timestampNs_ = 0L;
         /**
          * 
          * Start time of this line in nanoseconds since the UNIX epoch.
    @@ -4423,7 +4430,7 @@ public long getTimestampNs() {
         }
     
         public static final int DURATION_PS_FIELD_NUMBER = 9;
    -    private long durationPs_;
    +    private long durationPs_ = 0L;
         /**
          * 
          * Profiling duration for this line in picoseconds.
    @@ -4438,6 +4445,7 @@ public long getDurationPs() {
         }
     
         public static final int EVENTS_FIELD_NUMBER = 4;
    +    @SuppressWarnings("serial")
         private java.util.List events_;
         /**
          * 
    @@ -4519,8 +4527,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           if (id_ != 0L) {
             output.writeInt64(1, id_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 2, name_);
           }
           if (timestampNs_ != 0L) {
             output.writeInt64(3, timestampNs_);
    @@ -4534,8 +4542,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           if (displayId_ != 0L) {
             output.writeInt64(10, displayId_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 11, displayName_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 11, displayName_);
           }
           getUnknownFields().writeTo(output);
         }
    @@ -4550,8 +4558,8 @@ public int getSerializedSize() {
             size += com.google.protobuf.CodedOutputStream
               .computeInt64Size(1, id_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, name_);
           }
           if (timestampNs_ != 0L) {
             size += com.google.protobuf.CodedOutputStream
    @@ -4569,8 +4577,8 @@ public int getSerializedSize() {
             size += com.google.protobuf.CodedOutputStream
               .computeInt64Size(10, displayId_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, displayName_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(11, displayName_);
           }
           size += getUnknownFields().getSerializedSize();
           memoizedSize = size;
    @@ -4671,39 +4679,41 @@ public static org.tensorflow.proto.profiler.Xplane.XLine parseFrom(
         }
         public static org.tensorflow.proto.profiler.Xplane.XLine parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.profiler.Xplane.XLine parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.profiler.Xplane.XLine parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.profiler.Xplane.XLine parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.profiler.Xplane.XLine parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.profiler.Xplane.XLine parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -4723,7 +4733,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -4736,7 +4746,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.profiler.XLine}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.profiler.XLine)
             org.tensorflow.proto.profiler.Xplane.XLineOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -4745,7 +4755,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.profiler.Xplane.internal_static_tensorflow_profiler_XLine_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -4758,32 +4768,27 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             id_ = 0L;
    -
             displayId_ = 0L;
    -
             name_ = "";
    -
             displayName_ = "";
    -
             timestampNs_ = 0L;
    -
             durationPs_ = 0L;
    -
             if (eventsBuilder_ == null) {
               events_ = java.util.Collections.emptyList();
             } else {
               events_ = null;
               eventsBuilder_.clear();
             }
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        bitField0_ = (bitField0_ & ~0x00000040);
             return this;
           }
     
    @@ -4810,58 +4815,46 @@ public org.tensorflow.proto.profiler.Xplane.XLine build() {
           @java.lang.Override
           public org.tensorflow.proto.profiler.Xplane.XLine buildPartial() {
             org.tensorflow.proto.profiler.Xplane.XLine result = new org.tensorflow.proto.profiler.Xplane.XLine(this);
    -        int from_bitField0_ = bitField0_;
    -        result.id_ = id_;
    -        result.displayId_ = displayId_;
    -        result.name_ = name_;
    -        result.displayName_ = displayName_;
    -        result.timestampNs_ = timestampNs_;
    -        result.durationPs_ = durationPs_;
    +        buildPartialRepeatedFields(result);
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        onBuilt();
    +        return result;
    +      }
    +
    +      private void buildPartialRepeatedFields(org.tensorflow.proto.profiler.Xplane.XLine result) {
             if (eventsBuilder_ == null) {
    -          if (((bitField0_ & 0x00000001) != 0)) {
    +          if (((bitField0_ & 0x00000040) != 0)) {
                 events_ = java.util.Collections.unmodifiableList(events_);
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000040);
               }
               result.events_ = events_;
             } else {
               result.events_ = eventsBuilder_.build();
             }
    -        onBuilt();
    -        return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.profiler.Xplane.XLine result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.id_ = id_;
    +        }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.displayId_ = displayId_;
    +        }
    +        if (((from_bitField0_ & 0x00000004) != 0)) {
    +          result.name_ = name_;
    +        }
    +        if (((from_bitField0_ & 0x00000008) != 0)) {
    +          result.displayName_ = displayName_;
    +        }
    +        if (((from_bitField0_ & 0x00000010) != 0)) {
    +          result.timestampNs_ = timestampNs_;
    +        }
    +        if (((from_bitField0_ & 0x00000020) != 0)) {
    +          result.durationPs_ = durationPs_;
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.profiler.Xplane.XLine) {
    @@ -4882,10 +4875,12 @@ public Builder mergeFrom(org.tensorflow.proto.profiler.Xplane.XLine other) {
             }
             if (!other.getName().isEmpty()) {
               name_ = other.name_;
    +          bitField0_ |= 0x00000004;
               onChanged();
             }
             if (!other.getDisplayName().isEmpty()) {
               displayName_ = other.displayName_;
    +          bitField0_ |= 0x00000008;
               onChanged();
             }
             if (other.getTimestampNs() != 0L) {
    @@ -4898,7 +4893,7 @@ public Builder mergeFrom(org.tensorflow.proto.profiler.Xplane.XLine other) {
               if (!other.events_.isEmpty()) {
                 if (events_.isEmpty()) {
                   events_ = other.events_;
    -              bitField0_ = (bitField0_ & ~0x00000001);
    +              bitField0_ = (bitField0_ & ~0x00000040);
                 } else {
                   ensureEventsIsMutable();
                   events_.addAll(other.events_);
    @@ -4911,9 +4906,9 @@ public Builder mergeFrom(org.tensorflow.proto.profiler.Xplane.XLine other) {
                   eventsBuilder_.dispose();
                   eventsBuilder_ = null;
                   events_ = other.events_;
    -              bitField0_ = (bitField0_ & ~0x00000001);
    +              bitField0_ = (bitField0_ & ~0x00000040);
                   eventsBuilder_ = 
    -                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                        getEventsFieldBuilder() : null;
                 } else {
                   eventsBuilder_.addAllMessages(other.events_);
    @@ -4948,17 +4943,17 @@ public Builder mergeFrom(
                     break;
                   case 8: {
                     id_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 8
                   case 18: {
                     name_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000004;
                     break;
                   } // case 18
                   case 24: {
                     timestampNs_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000010;
                     break;
                   } // case 24
                   case 34: {
    @@ -4976,17 +4971,17 @@ public Builder mergeFrom(
                   } // case 34
                   case 72: {
                     durationPs_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000020;
                     break;
                   } // case 72
                   case 80: {
                     displayId_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 80
                   case 90: {
                     displayName_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000008;
                     break;
                   } // case 90
                   default: {
    @@ -5031,8 +5026,9 @@ public long getId() {
            * @return This builder for chaining.
            */
           public Builder setId(long value) {
    -        
    +
             id_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -5046,7 +5042,7 @@ public Builder setId(long value) {
            * @return This builder for chaining.
            */
           public Builder clearId() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000001);
             id_ = 0L;
             onChanged();
             return this;
    @@ -5077,8 +5073,9 @@ public long getDisplayId() {
            * @return This builder for chaining.
            */
           public Builder setDisplayId(long value) {
    -        
    +
             displayId_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -5092,7 +5089,7 @@ public Builder setDisplayId(long value) {
            * @return This builder for chaining.
            */
           public Builder clearDisplayId() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000002);
             displayId_ = 0L;
             onChanged();
             return this;
    @@ -5151,11 +5148,9 @@ public java.lang.String getName() {
            */
           public Builder setName(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             name_ = value;
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -5168,8 +5163,8 @@ public Builder setName(
            * @return This builder for chaining.
            */
           public Builder clearName() {
    -        
             name_ = getDefaultInstance().getName();
    +        bitField0_ = (bitField0_ & ~0x00000004);
             onChanged();
             return this;
           }
    @@ -5184,12 +5179,10 @@ public Builder clearName() {
            */
           public Builder setNameBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             name_ = value;
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -5247,11 +5240,9 @@ public java.lang.String getDisplayName() {
            */
           public Builder setDisplayName(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             displayName_ = value;
    +        bitField0_ |= 0x00000008;
             onChanged();
             return this;
           }
    @@ -5264,8 +5255,8 @@ public Builder setDisplayName(
            * @return This builder for chaining.
            */
           public Builder clearDisplayName() {
    -        
             displayName_ = getDefaultInstance().getDisplayName();
    +        bitField0_ = (bitField0_ & ~0x00000008);
             onChanged();
             return this;
           }
    @@ -5280,12 +5271,10 @@ public Builder clearDisplayName() {
            */
           public Builder setDisplayNameBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             displayName_ = value;
    +        bitField0_ |= 0x00000008;
             onChanged();
             return this;
           }
    @@ -5315,8 +5304,9 @@ public long getTimestampNs() {
            * @return This builder for chaining.
            */
           public Builder setTimestampNs(long value) {
    -        
    +
             timestampNs_ = value;
    +        bitField0_ |= 0x00000010;
             onChanged();
             return this;
           }
    @@ -5330,7 +5320,7 @@ public Builder setTimestampNs(long value) {
            * @return This builder for chaining.
            */
           public Builder clearTimestampNs() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000010);
             timestampNs_ = 0L;
             onChanged();
             return this;
    @@ -5359,8 +5349,9 @@ public long getDurationPs() {
            * @return This builder for chaining.
            */
           public Builder setDurationPs(long value) {
    -        
    +
             durationPs_ = value;
    +        bitField0_ |= 0x00000020;
             onChanged();
             return this;
           }
    @@ -5373,7 +5364,7 @@ public Builder setDurationPs(long value) {
            * @return This builder for chaining.
            */
           public Builder clearDurationPs() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000020);
             durationPs_ = 0L;
             onChanged();
             return this;
    @@ -5382,13 +5373,13 @@ public Builder clearDurationPs() {
           private java.util.List events_ =
             java.util.Collections.emptyList();
           private void ensureEventsIsMutable() {
    -        if (!((bitField0_ & 0x00000001) != 0)) {
    +        if (!((bitField0_ & 0x00000040) != 0)) {
               events_ = new java.util.ArrayList(events_);
    -          bitField0_ |= 0x00000001;
    +          bitField0_ |= 0x00000040;
              }
           }
     
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.profiler.Xplane.XEvent, org.tensorflow.proto.profiler.Xplane.XEvent.Builder, org.tensorflow.proto.profiler.Xplane.XEventOrBuilder> eventsBuilder_;
     
           /**
    @@ -5589,7 +5580,7 @@ public Builder addAllEvents(
           public Builder clearEvents() {
             if (eventsBuilder_ == null) {
               events_ = java.util.Collections.emptyList();
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ = (bitField0_ & ~0x00000040);
               onChanged();
             } else {
               eventsBuilder_.clear();
    @@ -5694,32 +5685,20 @@ public org.tensorflow.proto.profiler.Xplane.XEvent.Builder addEventsBuilder(
                getEventsBuilderList() {
             return getEventsFieldBuilder().getBuilderList();
           }
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.profiler.Xplane.XEvent, org.tensorflow.proto.profiler.Xplane.XEvent.Builder, org.tensorflow.proto.profiler.Xplane.XEventOrBuilder> 
               getEventsFieldBuilder() {
             if (eventsBuilder_ == null) {
    -          eventsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +          eventsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                   org.tensorflow.proto.profiler.Xplane.XEvent, org.tensorflow.proto.profiler.Xplane.XEvent.Builder, org.tensorflow.proto.profiler.Xplane.XEventOrBuilder>(
                       events_,
    -                  ((bitField0_ & 0x00000001) != 0),
    +                  ((bitField0_ & 0x00000040) != 0),
                       getParentForChildren(),
                       isClean());
               events_ = null;
             }
             return eventsBuilder_;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.profiler.XLine)
         }
    @@ -5885,7 +5864,7 @@ public interface XEventOrBuilder extends
         org.tensorflow.proto.profiler.Xplane.XStatOrBuilder getStatsOrBuilder(
             int index);
     
    -    public org.tensorflow.proto.profiler.Xplane.XEvent.DataCase getDataCase();
    +    org.tensorflow.proto.profiler.Xplane.XEvent.DataCase getDataCase();
       }
       /**
        * 
    @@ -5896,37 +5875,34 @@ org.tensorflow.proto.profiler.Xplane.XStatOrBuilder getStatsOrBuilder(
        * Protobuf type {@code tensorflow.profiler.XEvent}
        */
       public static final class XEvent extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.profiler.XEvent)
           XEventOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        XEvent.class.getName());
    +    }
         // Use XEvent.newBuilder() to construct.
    -    private XEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private XEvent(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private XEvent() {
           stats_ = java.util.Collections.emptyList();
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new XEvent();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.profiler.Xplane.internal_static_tensorflow_profiler_XEvent_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.profiler.Xplane.internal_static_tensorflow_profiler_XEvent_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -5934,6 +5910,7 @@ protected java.lang.Object newInstance(
         }
     
         private int dataCase_ = 0;
    +    @SuppressWarnings("serial")
         private java.lang.Object data_;
         public enum DataCase
             implements com.google.protobuf.Internal.EnumLite,
    @@ -5975,7 +5952,7 @@ public int getNumber() {
         }
     
         public static final int METADATA_ID_FIELD_NUMBER = 1;
    -    private long metadataId_;
    +    private long metadataId_ = 0L;
         /**
          * 
          * XEventMetadata.id of corresponding metadata.
    @@ -6050,7 +6027,7 @@ public long getNumOccurrences() {
         }
     
         public static final int DURATION_PS_FIELD_NUMBER = 3;
    -    private long durationPs_;
    +    private long durationPs_ = 0L;
         /**
          * 
          * Duration of the event in picoseconds. Can be zero for an instant event.
    @@ -6065,6 +6042,7 @@ public long getDurationPs() {
         }
     
         public static final int STATS_FIELD_NUMBER = 4;
    +    @SuppressWarnings("serial")
         private java.util.List stats_;
         /**
          * 
    @@ -6299,39 +6277,41 @@ public static org.tensorflow.proto.profiler.Xplane.XEvent parseFrom(
         }
         public static org.tensorflow.proto.profiler.Xplane.XEvent parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.profiler.Xplane.XEvent parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.profiler.Xplane.XEvent parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.profiler.Xplane.XEvent parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.profiler.Xplane.XEvent parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.profiler.Xplane.XEvent parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -6351,7 +6331,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -6364,7 +6344,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.profiler.XEvent}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.profiler.XEvent)
             org.tensorflow.proto.profiler.Xplane.XEventOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -6373,7 +6353,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.profiler.Xplane.internal_static_tensorflow_profiler_XEvent_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -6386,24 +6366,23 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             metadataId_ = 0L;
    -
             durationPs_ = 0L;
    -
             if (statsBuilder_ == null) {
               stats_ = java.util.Collections.emptyList();
             } else {
               stats_ = null;
               statsBuilder_.clear();
             }
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        bitField0_ = (bitField0_ & ~0x00000010);
             dataCase_ = 0;
             data_ = null;
             return this;
    @@ -6432,61 +6411,40 @@ public org.tensorflow.proto.profiler.Xplane.XEvent build() {
           @java.lang.Override
           public org.tensorflow.proto.profiler.Xplane.XEvent buildPartial() {
             org.tensorflow.proto.profiler.Xplane.XEvent result = new org.tensorflow.proto.profiler.Xplane.XEvent(this);
    -        int from_bitField0_ = bitField0_;
    -        result.metadataId_ = metadataId_;
    -        if (dataCase_ == 2) {
    -          result.data_ = data_;
    -        }
    -        if (dataCase_ == 5) {
    -          result.data_ = data_;
    -        }
    -        result.durationPs_ = durationPs_;
    +        buildPartialRepeatedFields(result);
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        buildPartialOneofs(result);
    +        onBuilt();
    +        return result;
    +      }
    +
    +      private void buildPartialRepeatedFields(org.tensorflow.proto.profiler.Xplane.XEvent result) {
             if (statsBuilder_ == null) {
    -          if (((bitField0_ & 0x00000001) != 0)) {
    +          if (((bitField0_ & 0x00000010) != 0)) {
                 stats_ = java.util.Collections.unmodifiableList(stats_);
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000010);
               }
               result.stats_ = stats_;
             } else {
               result.stats_ = statsBuilder_.build();
             }
    -        result.dataCase_ = dataCase_;
    -        onBuilt();
    -        return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    +      private void buildPartial0(org.tensorflow.proto.profiler.Xplane.XEvent result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.metadataId_ = metadataId_;
    +        }
    +        if (((from_bitField0_ & 0x00000008) != 0)) {
    +          result.durationPs_ = durationPs_;
    +        }
           }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +
    +      private void buildPartialOneofs(org.tensorflow.proto.profiler.Xplane.XEvent result) {
    +        result.dataCase_ = dataCase_;
    +        result.data_ = this.data_;
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.profiler.Xplane.XEvent) {
    @@ -6509,7 +6467,7 @@ public Builder mergeFrom(org.tensorflow.proto.profiler.Xplane.XEvent other) {
               if (!other.stats_.isEmpty()) {
                 if (stats_.isEmpty()) {
                   stats_ = other.stats_;
    -              bitField0_ = (bitField0_ & ~0x00000001);
    +              bitField0_ = (bitField0_ & ~0x00000010);
                 } else {
                   ensureStatsIsMutable();
                   stats_.addAll(other.stats_);
    @@ -6522,9 +6480,9 @@ public Builder mergeFrom(org.tensorflow.proto.profiler.Xplane.XEvent other) {
                   statsBuilder_.dispose();
                   statsBuilder_ = null;
                   stats_ = other.stats_;
    -              bitField0_ = (bitField0_ & ~0x00000001);
    +              bitField0_ = (bitField0_ & ~0x00000010);
                   statsBuilder_ = 
    -                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                        getStatsFieldBuilder() : null;
                 } else {
                   statsBuilder_.addAllMessages(other.stats_);
    @@ -6572,7 +6530,7 @@ public Builder mergeFrom(
                     break;
                   case 8: {
                     metadataId_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 8
                   case 16: {
    @@ -6582,7 +6540,7 @@ public Builder mergeFrom(
                   } // case 16
                   case 24: {
                     durationPs_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000008;
                     break;
                   } // case 24
                   case 34: {
    @@ -6658,8 +6616,9 @@ public long getMetadataId() {
            * @return This builder for chaining.
            */
           public Builder setMetadataId(long value) {
    -        
    +
             metadataId_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -6672,7 +6631,7 @@ public Builder setMetadataId(long value) {
            * @return This builder for chaining.
            */
           public Builder clearMetadataId() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000001);
             metadataId_ = 0L;
             onChanged();
             return this;
    @@ -6716,6 +6675,7 @@ public long getOffsetPs() {
            * @return This builder for chaining.
            */
           public Builder setOffsetPs(long value) {
    +
             dataCase_ = 2;
             data_ = value;
             onChanged();
    @@ -6774,6 +6734,7 @@ public long getNumOccurrences() {
            * @return This builder for chaining.
            */
           public Builder setNumOccurrences(long value) {
    +
             dataCase_ = 5;
             data_ = value;
             onChanged();
    @@ -6819,8 +6780,9 @@ public long getDurationPs() {
            * @return This builder for chaining.
            */
           public Builder setDurationPs(long value) {
    -        
    +
             durationPs_ = value;
    +        bitField0_ |= 0x00000008;
             onChanged();
             return this;
           }
    @@ -6833,7 +6795,7 @@ public Builder setDurationPs(long value) {
            * @return This builder for chaining.
            */
           public Builder clearDurationPs() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000008);
             durationPs_ = 0L;
             onChanged();
             return this;
    @@ -6842,13 +6804,13 @@ public Builder clearDurationPs() {
           private java.util.List stats_ =
             java.util.Collections.emptyList();
           private void ensureStatsIsMutable() {
    -        if (!((bitField0_ & 0x00000001) != 0)) {
    +        if (!((bitField0_ & 0x00000010) != 0)) {
               stats_ = new java.util.ArrayList(stats_);
    -          bitField0_ |= 0x00000001;
    +          bitField0_ |= 0x00000010;
              }
           }
     
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.profiler.Xplane.XStat, org.tensorflow.proto.profiler.Xplane.XStat.Builder, org.tensorflow.proto.profiler.Xplane.XStatOrBuilder> statsBuilder_;
     
           /**
    @@ -7049,7 +7011,7 @@ public Builder addAllStats(
           public Builder clearStats() {
             if (statsBuilder_ == null) {
               stats_ = java.util.Collections.emptyList();
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ = (bitField0_ & ~0x00000010);
               onChanged();
             } else {
               statsBuilder_.clear();
    @@ -7154,32 +7116,20 @@ public org.tensorflow.proto.profiler.Xplane.XStat.Builder addStatsBuilder(
                getStatsBuilderList() {
             return getStatsFieldBuilder().getBuilderList();
           }
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.profiler.Xplane.XStat, org.tensorflow.proto.profiler.Xplane.XStat.Builder, org.tensorflow.proto.profiler.Xplane.XStatOrBuilder> 
               getStatsFieldBuilder() {
             if (statsBuilder_ == null) {
    -          statsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +          statsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                   org.tensorflow.proto.profiler.Xplane.XStat, org.tensorflow.proto.profiler.Xplane.XStat.Builder, org.tensorflow.proto.profiler.Xplane.XStatOrBuilder>(
                       stats_,
    -                  ((bitField0_ & 0x00000001) != 0),
    +                  ((bitField0_ & 0x00000010) != 0),
                       getParentForChildren(),
                       isClean());
               stats_ = null;
             }
             return statsBuilder_;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.profiler.XEvent)
         }
    @@ -7326,7 +7276,7 @@ public interface XStatOrBuilder extends
          */
         long getRefValue();
     
    -    public org.tensorflow.proto.profiler.Xplane.XStat.ValueCase getValueCase();
    +    org.tensorflow.proto.profiler.Xplane.XStat.ValueCase getValueCase();
       }
       /**
        * 
    @@ -7339,36 +7289,33 @@ public interface XStatOrBuilder extends
        * Protobuf type {@code tensorflow.profiler.XStat}
        */
       public static final class XStat extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.profiler.XStat)
           XStatOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        XStat.class.getName());
    +    }
         // Use XStat.newBuilder() to construct.
    -    private XStat(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private XStat(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private XStat() {
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new XStat();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.profiler.Xplane.internal_static_tensorflow_profiler_XStat_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.profiler.Xplane.internal_static_tensorflow_profiler_XStat_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -7376,6 +7323,7 @@ protected java.lang.Object newInstance(
         }
     
         private int valueCase_ = 0;
    +    @SuppressWarnings("serial")
         private java.lang.Object value_;
         public enum ValueCase
             implements com.google.protobuf.Internal.EnumLite,
    @@ -7425,7 +7373,7 @@ public int getNumber() {
         }
     
         public static final int METADATA_ID_FIELD_NUMBER = 1;
    -    private long metadataId_;
    +    private long metadataId_ = 0L;
         /**
          * 
          * XStatMetadata.id of corresponding metadata.
    @@ -7634,7 +7582,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
                 4, (long)((java.lang.Long) value_));
           }
           if (valueCase_ == 5) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 5, value_);
    +        com.google.protobuf.GeneratedMessage.writeString(output, 5, value_);
           }
           if (valueCase_ == 6) {
             output.writeBytes(
    @@ -7673,7 +7621,7 @@ public int getSerializedSize() {
                   4, (long)((java.lang.Long) value_));
           }
           if (valueCase_ == 5) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, value_);
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(5, value_);
           }
           if (valueCase_ == 6) {
             size += com.google.protobuf.CodedOutputStream
    @@ -7817,39 +7765,41 @@ public static org.tensorflow.proto.profiler.Xplane.XStat parseFrom(
         }
         public static org.tensorflow.proto.profiler.Xplane.XStat parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.profiler.Xplane.XStat parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.profiler.Xplane.XStat parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.profiler.Xplane.XStat parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.profiler.Xplane.XStat parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.profiler.Xplane.XStat parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -7869,7 +7819,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -7884,7 +7834,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.profiler.XStat}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.profiler.XStat)
             org.tensorflow.proto.profiler.Xplane.XStatOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -7893,7 +7843,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.profiler.Xplane.internal_static_tensorflow_profiler_XStat_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -7906,15 +7856,15 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             metadataId_ = 0L;
    -
             valueCase_ = 0;
             value_ = null;
             return this;
    @@ -7943,62 +7893,24 @@ public org.tensorflow.proto.profiler.Xplane.XStat build() {
           @java.lang.Override
           public org.tensorflow.proto.profiler.Xplane.XStat buildPartial() {
             org.tensorflow.proto.profiler.Xplane.XStat result = new org.tensorflow.proto.profiler.Xplane.XStat(this);
    -        result.metadataId_ = metadataId_;
    -        if (valueCase_ == 2) {
    -          result.value_ = value_;
    -        }
    -        if (valueCase_ == 3) {
    -          result.value_ = value_;
    -        }
    -        if (valueCase_ == 4) {
    -          result.value_ = value_;
    -        }
    -        if (valueCase_ == 5) {
    -          result.value_ = value_;
    -        }
    -        if (valueCase_ == 6) {
    -          result.value_ = value_;
    -        }
    -        if (valueCase_ == 7) {
    -          result.value_ = value_;
    -        }
    -        result.valueCase_ = valueCase_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        buildPartialOneofs(result);
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    +      private void buildPartial0(org.tensorflow.proto.profiler.Xplane.XStat result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.metadataId_ = metadataId_;
    +        }
           }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +
    +      private void buildPartialOneofs(org.tensorflow.proto.profiler.Xplane.XStat result) {
    +        result.valueCase_ = valueCase_;
    +        result.value_ = this.value_;
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.profiler.Xplane.XStat) {
    @@ -8073,7 +7985,7 @@ public Builder mergeFrom(
                     break;
                   case 8: {
                     metadataId_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 8
                   case 17: {
    @@ -8137,6 +8049,7 @@ public Builder clearValue() {
             return this;
           }
     
    +      private int bitField0_;
     
           private long metadataId_ ;
           /**
    @@ -8161,8 +8074,9 @@ public long getMetadataId() {
            * @return This builder for chaining.
            */
           public Builder setMetadataId(long value) {
    -        
    +
             metadataId_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -8175,7 +8089,7 @@ public Builder setMetadataId(long value) {
            * @return This builder for chaining.
            */
           public Builder clearMetadataId() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000001);
             metadataId_ = 0L;
             onChanged();
             return this;
    @@ -8204,6 +8118,7 @@ public double getDoubleValue() {
            * @return This builder for chaining.
            */
           public Builder setDoubleValue(double value) {
    +
             valueCase_ = 2;
             value_ = value;
             onChanged();
    @@ -8245,6 +8160,7 @@ public long getUint64Value() {
            * @return This builder for chaining.
            */
           public Builder setUint64Value(long value) {
    +
             valueCase_ = 3;
             value_ = value;
             onChanged();
    @@ -8286,6 +8202,7 @@ public long getInt64Value() {
            * @return This builder for chaining.
            */
           public Builder setInt64Value(long value) {
    +
             valueCase_ = 4;
             value_ = value;
             onChanged();
    @@ -8364,10 +8281,8 @@ public java.lang.String getStrValue() {
            */
           public Builder setStrValue(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  valueCase_ = 5;
    +        if (value == null) { throw new NullPointerException(); }
    +        valueCase_ = 5;
             value_ = value;
             onChanged();
             return this;
    @@ -8391,10 +8306,8 @@ public Builder clearStrValue() {
            */
           public Builder setStrValueBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             valueCase_ = 5;
             value_ = value;
             onChanged();
    @@ -8424,10 +8337,8 @@ public com.google.protobuf.ByteString getBytesValue() {
            * @return This builder for chaining.
            */
           public Builder setBytesValue(com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  valueCase_ = 6;
    +        if (value == null) { throw new NullPointerException(); }
    +        valueCase_ = 6;
             value_ = value;
             onChanged();
             return this;
    @@ -8480,6 +8391,7 @@ public long getRefValue() {
            * @return This builder for chaining.
            */
           public Builder setRefValue(long value) {
    +
             valueCase_ = 7;
             value_ = value;
             onChanged();
    @@ -8501,18 +8413,6 @@ public Builder clearRefValue() {
             }
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.profiler.XStat)
         }
    @@ -8717,12 +8617,21 @@ org.tensorflow.proto.profiler.Xplane.XStatOrBuilder getStatsOrBuilder(
        * Protobuf type {@code tensorflow.profiler.XEventMetadata}
        */
       public static final class XEventMetadata extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.profiler.XEventMetadata)
           XEventMetadataOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        XEventMetadata.class.getName());
    +    }
         // Use XEventMetadata.newBuilder() to construct.
    -    private XEventMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private XEventMetadata(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private XEventMetadata() {
    @@ -8733,25 +8642,13 @@ private XEventMetadata() {
           childId_ = emptyLongList();
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new XEventMetadata();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.profiler.Xplane.internal_static_tensorflow_profiler_XEventMetadata_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.profiler.Xplane.internal_static_tensorflow_profiler_XEventMetadata_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -8759,7 +8656,7 @@ protected java.lang.Object newInstance(
         }
     
         public static final int ID_FIELD_NUMBER = 1;
    -    private long id_;
    +    private long id_ = 0L;
         /**
          * 
          * XPlane.event_metadata map key.
    @@ -8774,7 +8671,8 @@ public long getId() {
         }
     
         public static final int NAME_FIELD_NUMBER = 2;
    -    private volatile java.lang.Object name_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object name_ = "";
         /**
          * 
          * Name of the event.
    @@ -8820,7 +8718,8 @@ public java.lang.String getName() {
         }
     
         public static final int DISPLAY_NAME_FIELD_NUMBER = 4;
    -    private volatile java.lang.Object displayName_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object displayName_ = "";
         /**
          * 
          * Name of the event shown in trace viewer.
    @@ -8866,7 +8765,7 @@ public java.lang.String getDisplayName() {
         }
     
         public static final int METADATA_FIELD_NUMBER = 3;
    -    private com.google.protobuf.ByteString metadata_;
    +    private com.google.protobuf.ByteString metadata_ = com.google.protobuf.ByteString.EMPTY;
         /**
          * 
          * Additional metadata in serialized format.
    @@ -8881,6 +8780,7 @@ public com.google.protobuf.ByteString getMetadata() {
         }
     
         public static final int STATS_FIELD_NUMBER = 5;
    +    @SuppressWarnings("serial")
         private java.util.List stats_;
         /**
          * 
    @@ -8946,7 +8846,9 @@ public org.tensorflow.proto.profiler.Xplane.XStatOrBuilder getStatsOrBuilder(
         }
     
         public static final int CHILD_ID_FIELD_NUMBER = 6;
    -    private com.google.protobuf.Internal.LongList childId_;
    +    @SuppressWarnings("serial")
    +    private com.google.protobuf.Internal.LongList childId_ =
    +        emptyLongList();
         /**
          * 
          * XPlane.event_metadata map key for children events.
    @@ -9003,14 +8905,14 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           if (id_ != 0L) {
             output.writeInt64(1, id_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 2, name_);
           }
           if (!metadata_.isEmpty()) {
             output.writeBytes(3, metadata_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 4, displayName_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 4, displayName_);
           }
           for (int i = 0; i < stats_.size(); i++) {
             output.writeMessage(5, stats_.get(i));
    @@ -9035,15 +8937,15 @@ public int getSerializedSize() {
             size += com.google.protobuf.CodedOutputStream
               .computeInt64Size(1, id_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, name_);
           }
           if (!metadata_.isEmpty()) {
             size += com.google.protobuf.CodedOutputStream
               .computeBytesSize(3, metadata_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, displayName_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(4, displayName_);
           }
           for (int i = 0; i < stats_.size(); i++) {
             size += com.google.protobuf.CodedOutputStream
    @@ -9157,39 +9059,41 @@ public static org.tensorflow.proto.profiler.Xplane.XEventMetadata parseFrom(
         }
         public static org.tensorflow.proto.profiler.Xplane.XEventMetadata parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.profiler.Xplane.XEventMetadata parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.profiler.Xplane.XEventMetadata parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.profiler.Xplane.XEventMetadata parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.profiler.Xplane.XEventMetadata parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.profiler.Xplane.XEventMetadata parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -9209,7 +9113,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -9223,7 +9127,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.profiler.XEventMetadata}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.profiler.XEventMetadata)
             org.tensorflow.proto.profiler.Xplane.XEventMetadataOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -9232,7 +9136,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.profiler.Xplane.internal_static_tensorflow_profiler_XEventMetadata_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -9245,30 +9149,26 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             id_ = 0L;
    -
             name_ = "";
    -
             displayName_ = "";
    -
             metadata_ = com.google.protobuf.ByteString.EMPTY;
    -
             if (statsBuilder_ == null) {
               stats_ = java.util.Collections.emptyList();
             } else {
               stats_ = null;
               statsBuilder_.clear();
             }
    -        bitField0_ = (bitField0_ & ~0x00000001);
    +        bitField0_ = (bitField0_ & ~0x00000010);
             childId_ = emptyLongList();
    -        bitField0_ = (bitField0_ & ~0x00000002);
             return this;
           }
     
    @@ -9295,61 +9195,44 @@ public org.tensorflow.proto.profiler.Xplane.XEventMetadata build() {
           @java.lang.Override
           public org.tensorflow.proto.profiler.Xplane.XEventMetadata buildPartial() {
             org.tensorflow.proto.profiler.Xplane.XEventMetadata result = new org.tensorflow.proto.profiler.Xplane.XEventMetadata(this);
    -        int from_bitField0_ = bitField0_;
    -        result.id_ = id_;
    -        result.name_ = name_;
    -        result.displayName_ = displayName_;
    -        result.metadata_ = metadata_;
    +        buildPartialRepeatedFields(result);
    +        if (bitField0_ != 0) { buildPartial0(result); }
    +        onBuilt();
    +        return result;
    +      }
    +
    +      private void buildPartialRepeatedFields(org.tensorflow.proto.profiler.Xplane.XEventMetadata result) {
             if (statsBuilder_ == null) {
    -          if (((bitField0_ & 0x00000001) != 0)) {
    +          if (((bitField0_ & 0x00000010) != 0)) {
                 stats_ = java.util.Collections.unmodifiableList(stats_);
    -            bitField0_ = (bitField0_ & ~0x00000001);
    +            bitField0_ = (bitField0_ & ~0x00000010);
               }
               result.stats_ = stats_;
             } else {
               result.stats_ = statsBuilder_.build();
             }
    -        if (((bitField0_ & 0x00000002) != 0)) {
    +      }
    +
    +      private void buildPartial0(org.tensorflow.proto.profiler.Xplane.XEventMetadata result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.id_ = id_;
    +        }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.name_ = name_;
    +        }
    +        if (((from_bitField0_ & 0x00000004) != 0)) {
    +          result.displayName_ = displayName_;
    +        }
    +        if (((from_bitField0_ & 0x00000008) != 0)) {
    +          result.metadata_ = metadata_;
    +        }
    +        if (((from_bitField0_ & 0x00000020) != 0)) {
               childId_.makeImmutable();
    -          bitField0_ = (bitField0_ & ~0x00000002);
    +          result.childId_ = childId_;
             }
    -        result.childId_ = childId_;
    -        onBuilt();
    -        return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    -      }
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.profiler.Xplane.XEventMetadata) {
    @@ -9367,10 +9250,12 @@ public Builder mergeFrom(org.tensorflow.proto.profiler.Xplane.XEventMetadata oth
             }
             if (!other.getName().isEmpty()) {
               name_ = other.name_;
    +          bitField0_ |= 0x00000002;
               onChanged();
             }
             if (!other.getDisplayName().isEmpty()) {
               displayName_ = other.displayName_;
    +          bitField0_ |= 0x00000004;
               onChanged();
             }
             if (other.getMetadata() != com.google.protobuf.ByteString.EMPTY) {
    @@ -9380,7 +9265,7 @@ public Builder mergeFrom(org.tensorflow.proto.profiler.Xplane.XEventMetadata oth
               if (!other.stats_.isEmpty()) {
                 if (stats_.isEmpty()) {
                   stats_ = other.stats_;
    -              bitField0_ = (bitField0_ & ~0x00000001);
    +              bitField0_ = (bitField0_ & ~0x00000010);
                 } else {
                   ensureStatsIsMutable();
                   stats_.addAll(other.stats_);
    @@ -9393,9 +9278,9 @@ public Builder mergeFrom(org.tensorflow.proto.profiler.Xplane.XEventMetadata oth
                   statsBuilder_.dispose();
                   statsBuilder_ = null;
                   stats_ = other.stats_;
    -              bitField0_ = (bitField0_ & ~0x00000001);
    +              bitField0_ = (bitField0_ & ~0x00000010);
                   statsBuilder_ = 
    -                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
    +                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                        getStatsFieldBuilder() : null;
                 } else {
                   statsBuilder_.addAllMessages(other.stats_);
    @@ -9405,7 +9290,8 @@ public Builder mergeFrom(org.tensorflow.proto.profiler.Xplane.XEventMetadata oth
             if (!other.childId_.isEmpty()) {
               if (childId_.isEmpty()) {
                 childId_ = other.childId_;
    -            bitField0_ = (bitField0_ & ~0x00000002);
    +            childId_.makeImmutable();
    +            bitField0_ |= 0x00000020;
               } else {
                 ensureChildIdIsMutable();
                 childId_.addAll(other.childId_);
    @@ -9440,22 +9326,22 @@ public Builder mergeFrom(
                     break;
                   case 8: {
                     id_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 8
                   case 18: {
                     name_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 18
                   case 26: {
                     metadata_ = input.readBytes();
    -
    +                bitField0_ |= 0x00000008;
                     break;
                   } // case 26
                   case 34: {
                     displayName_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000004;
                     break;
                   } // case 34
                   case 42: {
    @@ -9527,8 +9413,9 @@ public long getId() {
            * @return This builder for chaining.
            */
           public Builder setId(long value) {
    -        
    +
             id_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -9541,7 +9428,7 @@ public Builder setId(long value) {
            * @return This builder for chaining.
            */
           public Builder clearId() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000001);
             id_ = 0L;
             onChanged();
             return this;
    @@ -9600,11 +9487,9 @@ public java.lang.String getName() {
            */
           public Builder setName(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             name_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -9617,8 +9502,8 @@ public Builder setName(
            * @return This builder for chaining.
            */
           public Builder clearName() {
    -        
             name_ = getDefaultInstance().getName();
    +        bitField0_ = (bitField0_ & ~0x00000002);
             onChanged();
             return this;
           }
    @@ -9633,12 +9518,10 @@ public Builder clearName() {
            */
           public Builder setNameBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             name_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -9696,11 +9579,9 @@ public java.lang.String getDisplayName() {
            */
           public Builder setDisplayName(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             displayName_ = value;
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -9713,8 +9594,8 @@ public Builder setDisplayName(
            * @return This builder for chaining.
            */
           public Builder clearDisplayName() {
    -        
             displayName_ = getDefaultInstance().getDisplayName();
    +        bitField0_ = (bitField0_ & ~0x00000004);
             onChanged();
             return this;
           }
    @@ -9729,12 +9610,10 @@ public Builder clearDisplayName() {
            */
           public Builder setDisplayNameBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             displayName_ = value;
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -9762,11 +9641,9 @@ public com.google.protobuf.ByteString getMetadata() {
            * @return This builder for chaining.
            */
           public Builder setMetadata(com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             metadata_ = value;
    +        bitField0_ |= 0x00000008;
             onChanged();
             return this;
           }
    @@ -9779,7 +9656,7 @@ public Builder setMetadata(com.google.protobuf.ByteString value) {
            * @return This builder for chaining.
            */
           public Builder clearMetadata() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000008);
             metadata_ = getDefaultInstance().getMetadata();
             onChanged();
             return this;
    @@ -9788,13 +9665,13 @@ public Builder clearMetadata() {
           private java.util.List stats_ =
             java.util.Collections.emptyList();
           private void ensureStatsIsMutable() {
    -        if (!((bitField0_ & 0x00000001) != 0)) {
    +        if (!((bitField0_ & 0x00000010) != 0)) {
               stats_ = new java.util.ArrayList(stats_);
    -          bitField0_ |= 0x00000001;
    +          bitField0_ |= 0x00000010;
              }
           }
     
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.profiler.Xplane.XStat, org.tensorflow.proto.profiler.Xplane.XStat.Builder, org.tensorflow.proto.profiler.Xplane.XStatOrBuilder> statsBuilder_;
     
           /**
    @@ -9995,7 +9872,7 @@ public Builder addAllStats(
           public Builder clearStats() {
             if (statsBuilder_ == null) {
               stats_ = java.util.Collections.emptyList();
    -          bitField0_ = (bitField0_ & ~0x00000001);
    +          bitField0_ = (bitField0_ & ~0x00000010);
               onChanged();
             } else {
               statsBuilder_.clear();
    @@ -10100,14 +9977,14 @@ public org.tensorflow.proto.profiler.Xplane.XStat.Builder addStatsBuilder(
                getStatsBuilderList() {
             return getStatsFieldBuilder().getBuilderList();
           }
    -      private com.google.protobuf.RepeatedFieldBuilderV3<
    +      private com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.profiler.Xplane.XStat, org.tensorflow.proto.profiler.Xplane.XStat.Builder, org.tensorflow.proto.profiler.Xplane.XStatOrBuilder> 
               getStatsFieldBuilder() {
             if (statsBuilder_ == null) {
    -          statsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
    +          statsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                   org.tensorflow.proto.profiler.Xplane.XStat, org.tensorflow.proto.profiler.Xplane.XStat.Builder, org.tensorflow.proto.profiler.Xplane.XStatOrBuilder>(
                       stats_,
    -                  ((bitField0_ & 0x00000001) != 0),
    +                  ((bitField0_ & 0x00000010) != 0),
                       getParentForChildren(),
                       isClean());
               stats_ = null;
    @@ -10117,10 +9994,10 @@ public org.tensorflow.proto.profiler.Xplane.XStat.Builder addStatsBuilder(
     
           private com.google.protobuf.Internal.LongList childId_ = emptyLongList();
           private void ensureChildIdIsMutable() {
    -        if (!((bitField0_ & 0x00000002) != 0)) {
    -          childId_ = mutableCopy(childId_);
    -          bitField0_ |= 0x00000002;
    -         }
    +        if (!childId_.isModifiable()) {
    +          childId_ = makeMutableCopy(childId_);
    +        }
    +        bitField0_ |= 0x00000020;
           }
           /**
            * 
    @@ -10132,8 +10009,8 @@ private void ensureChildIdIsMutable() {
            */
           public java.util.List
               getChildIdList() {
    -        return ((bitField0_ & 0x00000002) != 0) ?
    -                 java.util.Collections.unmodifiableList(childId_) : childId_;
    +        childId_.makeImmutable();
    +        return childId_;
           }
           /**
            * 
    @@ -10170,8 +10047,10 @@ public long getChildId(int index) {
            */
           public Builder setChildId(
               int index, long value) {
    +
             ensureChildIdIsMutable();
             childId_.setLong(index, value);
    +        bitField0_ |= 0x00000020;
             onChanged();
             return this;
           }
    @@ -10185,8 +10064,10 @@ public Builder setChildId(
            * @return This builder for chaining.
            */
           public Builder addChildId(long value) {
    +
             ensureChildIdIsMutable();
             childId_.addLong(value);
    +        bitField0_ |= 0x00000020;
             onChanged();
             return this;
           }
    @@ -10204,6 +10085,7 @@ public Builder addAllChildId(
             ensureChildIdIsMutable();
             com.google.protobuf.AbstractMessageLite.Builder.addAll(
                 values, childId_);
    +        bitField0_ |= 0x00000020;
             onChanged();
             return this;
           }
    @@ -10217,22 +10099,10 @@ public Builder addAllChildId(
            */
           public Builder clearChildId() {
             childId_ = emptyLongList();
    -        bitField0_ = (bitField0_ & ~0x00000002);
    +        bitField0_ = (bitField0_ & ~0x00000020);
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.profiler.XEventMetadata)
         }
    @@ -10351,12 +10221,21 @@ public interface XStatMetadataOrBuilder extends
        * Protobuf type {@code tensorflow.profiler.XStatMetadata}
        */
       public static final class XStatMetadata extends
    -      com.google.protobuf.GeneratedMessageV3 implements
    +      com.google.protobuf.GeneratedMessage implements
           // @@protoc_insertion_point(message_implements:tensorflow.profiler.XStatMetadata)
           XStatMetadataOrBuilder {
       private static final long serialVersionUID = 0L;
    +    static {
    +      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
    +        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
    +        /* major= */ 4,
    +        /* minor= */ 28,
    +        /* patch= */ 3,
    +        /* suffix= */ "",
    +        XStatMetadata.class.getName());
    +    }
         // Use XStatMetadata.newBuilder() to construct.
    -    private XStatMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    +    private XStatMetadata(com.google.protobuf.GeneratedMessage.Builder builder) {
           super(builder);
         }
         private XStatMetadata() {
    @@ -10364,25 +10243,13 @@ private XStatMetadata() {
           description_ = "";
         }
     
    -    @java.lang.Override
    -    @SuppressWarnings({"unused"})
    -    protected java.lang.Object newInstance(
    -        UnusedPrivateParameter unused) {
    -      return new XStatMetadata();
    -    }
    -
    -    @java.lang.Override
    -    public final com.google.protobuf.UnknownFieldSet
    -    getUnknownFields() {
    -      return this.unknownFields;
    -    }
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.tensorflow.proto.profiler.Xplane.internal_static_tensorflow_profiler_XStatMetadata_descriptor;
         }
     
         @java.lang.Override
    -    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
             internalGetFieldAccessorTable() {
           return org.tensorflow.proto.profiler.Xplane.internal_static_tensorflow_profiler_XStatMetadata_fieldAccessorTable
               .ensureFieldAccessorsInitialized(
    @@ -10390,7 +10257,7 @@ protected java.lang.Object newInstance(
         }
     
         public static final int ID_FIELD_NUMBER = 1;
    -    private long id_;
    +    private long id_ = 0L;
         /**
          * 
          * XPlane.stat_metadata map key.
    @@ -10405,7 +10272,8 @@ public long getId() {
         }
     
         public static final int NAME_FIELD_NUMBER = 2;
    -    private volatile java.lang.Object name_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object name_ = "";
         /**
          * 
          * Name of the stat (should be short).
    @@ -10453,7 +10321,8 @@ public java.lang.String getName() {
         }
     
         public static final int DESCRIPTION_FIELD_NUMBER = 3;
    -    private volatile java.lang.Object description_;
    +    @SuppressWarnings("serial")
    +    private volatile java.lang.Object description_ = "";
         /**
          * 
          * Description of the stat (might be long).
    @@ -10515,11 +10384,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           if (id_ != 0L) {
             output.writeInt64(1, id_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 2, name_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
    -        com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) {
    +        com.google.protobuf.GeneratedMessage.writeString(output, 3, description_);
           }
           getUnknownFields().writeTo(output);
         }
    @@ -10534,11 +10403,11 @@ public int getSerializedSize() {
             size += com.google.protobuf.CodedOutputStream
               .computeInt64Size(1, id_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, name_);
           }
    -      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
    -        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_);
    +      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) {
    +        size += com.google.protobuf.GeneratedMessage.computeStringSize(3, description_);
           }
           size += getUnknownFields().getSerializedSize();
           memoizedSize = size;
    @@ -10618,39 +10487,41 @@ public static org.tensorflow.proto.profiler.Xplane.XStatMetadata parseFrom(
         }
         public static org.tensorflow.proto.profiler.Xplane.XStatMetadata parseFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.profiler.Xplane.XStatMetadata parseFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
    +
         public static org.tensorflow.proto.profiler.Xplane.XStatMetadata parseDelimitedFrom(java.io.InputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input);
         }
    +
         public static org.tensorflow.proto.profiler.Xplane.XStatMetadata parseDelimitedFrom(
             java.io.InputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
         public static org.tensorflow.proto.profiler.Xplane.XStatMetadata parseFrom(
             com.google.protobuf.CodedInputStream input)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input);
         }
         public static org.tensorflow.proto.profiler.Xplane.XStatMetadata parseFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws java.io.IOException {
    -      return com.google.protobuf.GeneratedMessageV3
    +      return com.google.protobuf.GeneratedMessage
               .parseWithIOException(PARSER, input, extensionRegistry);
         }
     
    @@ -10670,7 +10541,7 @@ public Builder toBuilder() {
     
         @java.lang.Override
         protected Builder newBuilderForType(
    -        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
           Builder builder = new Builder(parent);
           return builder;
         }
    @@ -10684,7 +10555,7 @@ protected Builder newBuilderForType(
          * Protobuf type {@code tensorflow.profiler.XStatMetadata}
          */
         public static final class Builder extends
    -        com.google.protobuf.GeneratedMessageV3.Builder implements
    +        com.google.protobuf.GeneratedMessage.Builder implements
             // @@protoc_insertion_point(builder_implements:tensorflow.profiler.XStatMetadata)
             org.tensorflow.proto.profiler.Xplane.XStatMetadataOrBuilder {
           public static final com.google.protobuf.Descriptors.Descriptor
    @@ -10693,7 +10564,7 @@ public static final class Builder extends
           }
     
           @java.lang.Override
    -      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
               internalGetFieldAccessorTable() {
             return org.tensorflow.proto.profiler.Xplane.internal_static_tensorflow_profiler_XStatMetadata_fieldAccessorTable
                 .ensureFieldAccessorsInitialized(
    @@ -10706,19 +10577,17 @@ private Builder() {
           }
     
           private Builder(
    -          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    +          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
             super(parent);
     
           }
           @java.lang.Override
           public Builder clear() {
             super.clear();
    +        bitField0_ = 0;
             id_ = 0L;
    -
             name_ = "";
    -
             description_ = "";
    -
             return this;
           }
     
    @@ -10745,45 +10614,24 @@ public org.tensorflow.proto.profiler.Xplane.XStatMetadata build() {
           @java.lang.Override
           public org.tensorflow.proto.profiler.Xplane.XStatMetadata buildPartial() {
             org.tensorflow.proto.profiler.Xplane.XStatMetadata result = new org.tensorflow.proto.profiler.Xplane.XStatMetadata(this);
    -        result.id_ = id_;
    -        result.name_ = name_;
    -        result.description_ = description_;
    +        if (bitField0_ != 0) { buildPartial0(result); }
             onBuilt();
             return result;
           }
     
    -      @java.lang.Override
    -      public Builder clone() {
    -        return super.clone();
    -      }
    -      @java.lang.Override
    -      public Builder setField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.setField(field, value);
    -      }
    -      @java.lang.Override
    -      public Builder clearField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field) {
    -        return super.clearField(field);
    -      }
    -      @java.lang.Override
    -      public Builder clearOneof(
    -          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
    -        return super.clearOneof(oneof);
    -      }
    -      @java.lang.Override
    -      public Builder setRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          int index, java.lang.Object value) {
    -        return super.setRepeatedField(field, index, value);
    -      }
    -      @java.lang.Override
    -      public Builder addRepeatedField(
    -          com.google.protobuf.Descriptors.FieldDescriptor field,
    -          java.lang.Object value) {
    -        return super.addRepeatedField(field, value);
    +      private void buildPartial0(org.tensorflow.proto.profiler.Xplane.XStatMetadata result) {
    +        int from_bitField0_ = bitField0_;
    +        if (((from_bitField0_ & 0x00000001) != 0)) {
    +          result.id_ = id_;
    +        }
    +        if (((from_bitField0_ & 0x00000002) != 0)) {
    +          result.name_ = name_;
    +        }
    +        if (((from_bitField0_ & 0x00000004) != 0)) {
    +          result.description_ = description_;
    +        }
           }
    +
           @java.lang.Override
           public Builder mergeFrom(com.google.protobuf.Message other) {
             if (other instanceof org.tensorflow.proto.profiler.Xplane.XStatMetadata) {
    @@ -10801,10 +10649,12 @@ public Builder mergeFrom(org.tensorflow.proto.profiler.Xplane.XStatMetadata othe
             }
             if (!other.getName().isEmpty()) {
               name_ = other.name_;
    +          bitField0_ |= 0x00000002;
               onChanged();
             }
             if (!other.getDescription().isEmpty()) {
               description_ = other.description_;
    +          bitField0_ |= 0x00000004;
               onChanged();
             }
             this.mergeUnknownFields(other.getUnknownFields());
    @@ -10835,17 +10685,17 @@ public Builder mergeFrom(
                     break;
                   case 8: {
                     id_ = input.readInt64();
    -
    +                bitField0_ |= 0x00000001;
                     break;
                   } // case 8
                   case 18: {
                     name_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000002;
                     break;
                   } // case 18
                   case 26: {
                     description_ = input.readStringRequireUtf8();
    -
    +                bitField0_ |= 0x00000004;
                     break;
                   } // case 26
                   default: {
    @@ -10863,6 +10713,7 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    +      private int bitField0_;
     
           private long id_ ;
           /**
    @@ -10887,8 +10738,9 @@ public long getId() {
            * @return This builder for chaining.
            */
           public Builder setId(long value) {
    -        
    +
             id_ = value;
    +        bitField0_ |= 0x00000001;
             onChanged();
             return this;
           }
    @@ -10901,7 +10753,7 @@ public Builder setId(long value) {
            * @return This builder for chaining.
            */
           public Builder clearId() {
    -        
    +        bitField0_ = (bitField0_ & ~0x00000001);
             id_ = 0L;
             onChanged();
             return this;
    @@ -10963,11 +10815,9 @@ public java.lang.String getName() {
            */
           public Builder setName(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             name_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -10981,8 +10831,8 @@ public Builder setName(
            * @return This builder for chaining.
            */
           public Builder clearName() {
    -        
             name_ = getDefaultInstance().getName();
    +        bitField0_ = (bitField0_ & ~0x00000002);
             onChanged();
             return this;
           }
    @@ -10998,12 +10848,10 @@ public Builder clearName() {
            */
           public Builder setNameBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             name_ = value;
    +        bitField0_ |= 0x00000002;
             onChanged();
             return this;
           }
    @@ -11061,11 +10909,9 @@ public java.lang.String getDescription() {
            */
           public Builder setDescription(
               java.lang.String value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  
    +        if (value == null) { throw new NullPointerException(); }
             description_ = value;
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    @@ -11078,8 +10924,8 @@ public Builder setDescription(
            * @return This builder for chaining.
            */
           public Builder clearDescription() {
    -        
             description_ = getDefaultInstance().getDescription();
    +        bitField0_ = (bitField0_ & ~0x00000004);
             onChanged();
             return this;
           }
    @@ -11094,27 +10940,13 @@ public Builder clearDescription() {
            */
           public Builder setDescriptionBytes(
               com.google.protobuf.ByteString value) {
    -        if (value == null) {
    -    throw new NullPointerException();
    -  }
    -  checkByteStringIsUtf8(value);
    -        
    +        if (value == null) { throw new NullPointerException(); }
    +        checkByteStringIsUtf8(value);
             description_ = value;
    +        bitField0_ |= 0x00000004;
             onChanged();
             return this;
           }
    -      @java.lang.Override
    -      public final Builder setUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.setUnknownFields(unknownFields);
    -      }
    -
    -      @java.lang.Override
    -      public final Builder mergeUnknownFields(
    -          final com.google.protobuf.UnknownFieldSet unknownFields) {
    -        return super.mergeUnknownFields(unknownFields);
    -      }
    -
     
           // @@protoc_insertion_point(builder_scope:tensorflow.profiler.XStatMetadata)
         }
    @@ -11170,47 +11002,47 @@ public org.tensorflow.proto.profiler.Xplane.XStatMetadata getDefaultInstanceForT
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_profiler_XSpace_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_profiler_XSpace_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_profiler_XPlane_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_profiler_XPlane_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_profiler_XPlane_EventMetadataEntry_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_profiler_XPlane_EventMetadataEntry_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_profiler_XPlane_StatMetadataEntry_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_profiler_XPlane_StatMetadataEntry_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_profiler_XLine_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_profiler_XLine_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_profiler_XEvent_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_profiler_XEvent_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_profiler_XStat_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_profiler_XStat_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_profiler_XEventMetadata_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_profiler_XEventMetadata_fieldAccessorTable;
       private static final com.google.protobuf.Descriptors.Descriptor
         internal_static_tensorflow_profiler_XStatMetadata_descriptor;
       private static final 
    -    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    +    com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internal_static_tensorflow_profiler_XStatMetadata_fieldAccessorTable;
     
       public static com.google.protobuf.Descriptors.FileDescriptor
    @@ -11264,57 +11096,58 @@ public org.tensorflow.proto.profiler.Xplane.XStatMetadata getDefaultInstanceForT
         internal_static_tensorflow_profiler_XSpace_descriptor =
           getDescriptor().getMessageTypes().get(0);
         internal_static_tensorflow_profiler_XSpace_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_profiler_XSpace_descriptor,
             new java.lang.String[] { "Planes", "Errors", "Warnings", "Hostnames", });
         internal_static_tensorflow_profiler_XPlane_descriptor =
           getDescriptor().getMessageTypes().get(1);
         internal_static_tensorflow_profiler_XPlane_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_profiler_XPlane_descriptor,
             new java.lang.String[] { "Id", "Name", "Lines", "EventMetadata", "StatMetadata", "Stats", });
         internal_static_tensorflow_profiler_XPlane_EventMetadataEntry_descriptor =
           internal_static_tensorflow_profiler_XPlane_descriptor.getNestedTypes().get(0);
         internal_static_tensorflow_profiler_XPlane_EventMetadataEntry_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_profiler_XPlane_EventMetadataEntry_descriptor,
             new java.lang.String[] { "Key", "Value", });
         internal_static_tensorflow_profiler_XPlane_StatMetadataEntry_descriptor =
           internal_static_tensorflow_profiler_XPlane_descriptor.getNestedTypes().get(1);
         internal_static_tensorflow_profiler_XPlane_StatMetadataEntry_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_profiler_XPlane_StatMetadataEntry_descriptor,
             new java.lang.String[] { "Key", "Value", });
         internal_static_tensorflow_profiler_XLine_descriptor =
           getDescriptor().getMessageTypes().get(2);
         internal_static_tensorflow_profiler_XLine_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_profiler_XLine_descriptor,
             new java.lang.String[] { "Id", "DisplayId", "Name", "DisplayName", "TimestampNs", "DurationPs", "Events", });
         internal_static_tensorflow_profiler_XEvent_descriptor =
           getDescriptor().getMessageTypes().get(3);
         internal_static_tensorflow_profiler_XEvent_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_profiler_XEvent_descriptor,
             new java.lang.String[] { "MetadataId", "OffsetPs", "NumOccurrences", "DurationPs", "Stats", "Data", });
         internal_static_tensorflow_profiler_XStat_descriptor =
           getDescriptor().getMessageTypes().get(4);
         internal_static_tensorflow_profiler_XStat_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_profiler_XStat_descriptor,
             new java.lang.String[] { "MetadataId", "DoubleValue", "Uint64Value", "Int64Value", "StrValue", "BytesValue", "RefValue", "Value", });
         internal_static_tensorflow_profiler_XEventMetadata_descriptor =
           getDescriptor().getMessageTypes().get(5);
         internal_static_tensorflow_profiler_XEventMetadata_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_profiler_XEventMetadata_descriptor,
             new java.lang.String[] { "Id", "Name", "DisplayName", "Metadata", "Stats", "ChildId", });
         internal_static_tensorflow_profiler_XStatMetadata_descriptor =
           getDescriptor().getMessageTypes().get(6);
         internal_static_tensorflow_profiler_XStatMetadata_fieldAccessorTable = new
    -      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
    +      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
             internal_static_tensorflow_profiler_XStatMetadata_descriptor,
             new java.lang.String[] { "Id", "Name", "Description", });
    +    descriptor.resolveAllFeaturesImmutable();
       }
     
       // @@protoc_insertion_point(outer_class_scope)
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/profiler/empty/Xplane.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/profiler/empty/Xplane.java
    deleted file mode 100644
    index 79d1e115f9c..00000000000
    --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/profiler/empty/Xplane.java
    +++ /dev/null
    @@ -1,40 +0,0 @@
    -// Generated by the protocol buffer compiler.  DO NOT EDIT!
    -// source: tensorflow/core/profiler/protobuf/xplane.proto
    -
    -package org.tensorflow.proto.profiler.empty;
    -
    -public final class Xplane {
    -  private Xplane() {}
    -  public static void registerAllExtensions(
    -      com.google.protobuf.ExtensionRegistryLite registry) {
    -  }
    -
    -  public static void registerAllExtensions(
    -      com.google.protobuf.ExtensionRegistry registry) {
    -    registerAllExtensions(
    -        (com.google.protobuf.ExtensionRegistryLite) registry);
    -  }
    -
    -  public static com.google.protobuf.Descriptors.FileDescriptor
    -      getDescriptor() {
    -    return descriptor;
    -  }
    -  private static  com.google.protobuf.Descriptors.FileDescriptor
    -      descriptor;
    -  static {
    -    java.lang.String[] descriptorData = {
    -      "\n.tensorflow/core/profiler/protobuf/xpla" +
    -      "ne.proto\022\031tensorflow.profiler.empty\032\"tsl" +
    -      "/profiler/protobuf/xplane.protoB%\n#org.t" +
    -      "ensorflow.proto.profiler.emptyP\000b\006proto3"
    -    };
    -    descriptor = com.google.protobuf.Descriptors.FileDescriptor
    -      .internalBuildGeneratedFileFrom(descriptorData,
    -        new com.google.protobuf.Descriptors.FileDescriptor[] {
    -          org.tensorflow.proto.profiler.Xplane.getDescriptor(),
    -        });
    -    org.tensorflow.proto.profiler.Xplane.getDescriptor();
    -  }
    -
    -  // @@protoc_insertion_point(outer_class_scope)
    -}
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/resources/org/tensorflow/base_api/api_def_AsString.pbtxt b/tensorflow-core/tensorflow-core-native/src/gen/resources/org/tensorflow/base_api/api_def_AsString.pbtxt
    index f90f0d5650b..5b066f8b132 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/resources/org/tensorflow/base_api/api_def_AsString.pbtxt
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/resources/org/tensorflow/base_api/api_def_AsString.pbtxt
    @@ -40,7 +40,7 @@ END
     Supports many numeric types and boolean.
     
     For Unicode, see the
    -[https://www.tensorflow.org/tutorials/representation/unicode](Working with Unicode text)
    +[https://www.tensorflow.org/text/guide/unicode](Working with Unicode text)
     tutorial.
     
     Examples:
    diff --git a/tensorflow-core/tensorflow-core-native/src/gen/resources/org/tensorflow/base_api/api_def_DecodeImage.pbtxt b/tensorflow-core/tensorflow-core-native/src/gen/resources/org/tensorflow/base_api/api_def_DecodeImage.pbtxt
    index 7174c8d3daf..3e1f81cc959 100644
    --- a/tensorflow-core/tensorflow-core-native/src/gen/resources/org/tensorflow/base_api/api_def_DecodeImage.pbtxt
    +++ b/tensorflow-core/tensorflow-core-native/src/gen/resources/org/tensorflow/base_api/api_def_DecodeImage.pbtxt
    @@ -28,25 +28,27 @@ END
       attr {
         name: "expand_animations"
         description: <
+ * + * It is important to note that there is no guarantee the memory managed by a {@code DataBuffer} is + * linear, specially when dealing with non-primitive types or large buffers. + * * @param type of data stored in this buffer */ public interface DataBuffer { /** * Size of the buffer, in elements. - *

- * For exemple, in case of a byte buffer, this value is equal to the number of bytes this buffer - * can hold. For an integer buffer, it is equal to the number of integers, therefore the size - * in bytes of this buffer is {@code size() * Integer.BYTES}. - * + * + *

For exemple, in case of a byte buffer, this value is equal to the number of bytes this + * buffer can hold. For an integer buffer, it is equal to the number of integers, therefore the + * size in bytes of this buffer is {@code size() * Integer.BYTES}. + * * @return the buffer size */ long size(); /** * Tells whether or not this buffer is backed by an accessible array. - * + * * @return true if, and only if, this buffer is read-only */ boolean isReadOnly(); @@ -60,11 +62,11 @@ public interface DataBuffer { /** * Reads the value at the given index. * - * Important: Usage of this method should be limited to buffers of non-primitive types or - * when the data type is not deterministically known by the caller. In any other case, prefer - * the usage of its primitive variant which will significantly improve performances - * (e.g. {@code IntDataBuffer.getInt(idx)} - * + *

Important: Usage of this method should be limited to buffers of non-primitive types + * or when the data type is not deterministically known by the caller. In any other case, prefer + * the usage of its primitive variant which will significantly improve performances (e.g. {@code + * IntDataBuffer.getInt(idx)} + * * @param index the index from which the float will be read * @return the value at the given index * @throws IndexOutOfBoundsException if index is negative or not smaller than the buffer size @@ -74,10 +76,10 @@ public interface DataBuffer { /** * Writes the given value into this buffer at the given index. * - * Important: Usage of this method should be limited to buffers of non-primitive types or - * when the data type is not deterministically known by the caller. In any other case, prefer - * the usage of its primitive variant which will significantly improve performances - * (e.g. {@code IntDataBuffer.setInt(idx)} + *

Important: Usage of this method should be limited to buffers of non-primitive types + * or when the data type is not deterministically known by the caller. In any other case, prefer + * the usage of its primitive variant which will significantly improve performances (e.g. {@code + * IntDataBuffer.setInt(idx)} * * @param value the value to be written * @param index the index at which the value will be written @@ -86,16 +88,15 @@ public interface DataBuffer { * @throws ReadOnlyBufferException if this buffer is read-only */ DataBuffer setObject(T value, long index); - + /** * Read the references of the objects in this buffer into the destination array. - *

- * This method transfers values from this buffer into the given destination array. If there are - * fewer values in the buffer than are required to satisfy the request, that is, if - * {@code dst.length > size()}, then no values are transferred and a - * BufferUnderflowException is thrown. - *

- * Otherwise, this method copies {@code n = dst.length} values from this buffer into the given + * + *

This method transfers values from this buffer into the given destination array. If there are + * fewer values in the buffer than are required to satisfy the request, that is, if {@code + * dst.length > size()}, then no values are transferred and a BufferUnderflowException is thrown. + * + *

Otherwise, this method copies {@code n = dst.length} values from this buffer into the given * array. * * @param dst the array into which values are to be written @@ -108,41 +109,39 @@ default DataBuffer read(T[] dst) { /** * Read the references of the objects in this buffer into the destination array. - *

- * This method transfers values from this buffer into the given destination array. If there are - * fewer values in the buffer than are required to satisfy the request, that is, if - * {@code length > size()}, then no values are transferred and a - * BufferUnderflowException is thrown. - *

- * Otherwise, this method copies {@code n = length} values from this buffer into the given array - * starting at the given offset. + * + *

This method transfers values from this buffer into the given destination array. If there are + * fewer values in the buffer than are required to satisfy the request, that is, if {@code length + * > size()}, then no values are transferred and a BufferUnderflowException is thrown. + * + *

Otherwise, this method copies {@code n = length} values from this buffer into the given + * array starting at the given offset. * * @param dst the array into which values are to be written * @param offset the offset within the array of the first value to be written; must be - * non-negative and no larger than {@code dst.length} + * non-negative and no larger than {@code dst.length} * @param length the maximum number of values to be written to the given array; must be - * non-negative and no larger than {@code dst.length - offset} + * non-negative and no larger than {@code dst.length - offset} * @return this buffer * @throws BufferUnderflowException if there are fewer than length values remaining in this buffer * @throws IndexOutOfBoundsException if the preconditions on the offset and length parameters do - * not hold + * not hold */ DataBuffer read(T[] dst, int offset, int length); /** * Write the references of the objects in the source array into this buffer. - *

- * This method transfers the values in the given source array into this buffer. If there are - * more values in the source array than in this buffer, that is, if - * {@code src.length > size()}, then no values are transferred and a - * BufferOverflowException is thrown. - *

- * Otherwise, this method copies {@code n = src.length} values from the given array. + * + *

This method transfers the values in the given source array into this buffer. If there are + * more values in the source array than in this buffer, that is, if {@code src.length > size()}, + * then no values are transferred and a BufferOverflowException is thrown. + * + *

Otherwise, this method copies {@code n = src.length} values from the given array. * * @param src the source array from which values are to be read * @return this buffer * @throws BufferOverflowException if there is insufficient space in this buffer for the values in - * the source array + * the source array * @throws ReadOnlyBufferException if this buffer is read-only */ default DataBuffer write(T[] src) { @@ -151,39 +150,38 @@ default DataBuffer write(T[] src) { /** * Bulk put method, using int arrays. - *

- * This method transfers the values in the given source array into this buffer. If there are - * more values in the source array than in this buffer, that is, if - * {@code length > size()}, then no values are transferred and a - * BufferOverflowException is thrown. - *

- * Otherwise, this method copies {@code n = length} values from the given array into this buffer, - * starting at the given offset. + * + *

This method transfers the values in the given source array into this buffer. If there are + * more values in the source array than in this buffer, that is, if {@code length > size()}, then + * no values are transferred and a BufferOverflowException is thrown. + * + *

Otherwise, this method copies {@code n = length} values from the given array into this + * buffer, starting at the given offset. * * @param src the source array from which values are to be read * @param offset the offset within the array of the first value to be read; must be non-negative - * and no larger than {@code src.length} + * and no larger than {@code src.length} * @param length the number of values to be read from the given array; must be non-negative and no - * larger than {@code src.length - offset} + * larger than {@code src.length - offset} * @return this buffer * @throws BufferOverflowException if there is insufficient space in this buffer for the values in - * the source array + * the source array * @throws IndexOutOfBoundsException if the preconditions on the offset and length parameters do - * not hold + * not hold * @throws ReadOnlyBufferException if this buffer is read-only */ DataBuffer write(T[] src, int offset, int length); /** * Write the references of the objects in the source array into this buffer. - *

- * If there are more values to copy than the destination buffer size, i.e. - * {@code size > dst.size()}, then no values are transferred and a - * BufferOverflowException is thrown. On the other hand, if there are more values to copy that - * the source buffer size, i.e. {@code > src.size()}, then a BufferUnderfloatException is thrown. - *

- * Otherwise, this method copies {@code n = size} values from this buffer into - * the destination buffer. + * + *

If there are more values to copy than the destination buffer size, i.e. {@code size > + * dst.size()}, then no values are transferred and a BufferOverflowException is thrown. On the + * other hand, if there are more values to copy that the source buffer size, i.e. {@code > + * src.size()}, then a BufferUnderfloatException is thrown. + * + *

Otherwise, this method copies {@code n = size} values from this buffer into the destination + * buffer. * * @param dst the destination buffer into which values are copied; must not be this buffer * @param size number of values to copy to the destination buffer @@ -198,15 +196,15 @@ default DataBuffer write(T[] src) { /** * Creates a new buffer whose content is a shared subsequence of this buffer's content, starting * at the given index. - *

- * The index must not be greater than this buffer size. Changes to this buffer's content will + * + *

The index must not be greater than this buffer size. Changes to this buffer's content will * be visible in the new buffer and vice versa. The new buffer will be read-only if, and only if, * this buffer is read-only. - *

- * This call is equivalent to {@link #slice(long, long) slice(index, size() - index)} + * + *

This call is equivalent to {@link #slice(long, long) slice(index, size() - index)} * * @param index index of the first value of the new buffer created, must not be greater than - * {@code size()} + * {@code size()} * @return the new buffer * @throws IllegalArgumentException if index do not pass validation checks */ @@ -215,14 +213,14 @@ default DataBuffer offset(long index) { } /** - * Creates a new buffer whose content is a shared subsequence of this buffer's content, whose - * size is set to the given value. - *

- * The new size must not be greater than this buffer size. Changes to this buffer's - * content will be visible in the new buffer and vice versa. The new buffer will be read-only if, - * and only if, this buffer is read-only. - *

- * This call is equivalent to {@link #slice(long, long) slice(0, size)} + * Creates a new buffer whose content is a shared subsequence of this buffer's content, whose size + * is set to the given value. + * + *

The new size must not be greater than this buffer size. Changes to this buffer's content + * will be visible in the new buffer and vice versa. The new buffer will be read-only if, and only + * if, this buffer is read-only. + * + *

This call is equivalent to {@link #slice(long, long) slice(0, size)} * * @param size size of this new buffer * @return the new buffer @@ -235,8 +233,8 @@ default DataBuffer narrow(long size) { /** * Creates a new buffer whose content is a shared subsequence of this buffer's content, starting * at the given index and of the given size. - *

- * The index plus the new size must not be greater than this buffer size. Changes to this + * + *

The index plus the new size must not be greater than this buffer size. Changes to this * buffer's content will be visible in the new buffer and vice versa. The new buffer will be * read-only if, and only if, this buffer is read-only. * @@ -283,9 +281,9 @@ default DataBufferWindow> window(long size) { * Visits the backing storage of this buffer. * *

The buffer implementation is responsible of passing back a reference to the actual data - * storage to the provided visitor. The visitor does not have to handle all possible types of - * data storage and can override only methods for storage it is actually interested in. For any - * other type of storage, this call will fallback to {@link DataStorageVisitor#fallback()} so the + * storage to the provided visitor. The visitor does not have to handle all possible types of data + * storage and can override only methods for storage it is actually interested in. For any other + * type of storage, this call will fallback to {@link DataStorageVisitor#fallback()} so the * visitor can execute some generic routine if needed. * * @param visitor visits the data storage of this buffer @@ -313,8 +311,8 @@ default R accept(DataStorageVisitor visitor) { * } * *

Note that the computation required to verify equality between two buffers can be expensive - * in some cases and therefore, it is recommended to not use this method in a critical path - * where performances matter. + * in some cases and therefore, it is recommended to not use this method in a critical path where + * performances matter. * * @param obj object to compare this buffer with * @return true if this buffer is equal to the provided object diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/DataBufferWindow.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/DataBufferWindow.java index 85fc8c43d05..c153200fd5f 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/DataBufferWindow.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/DataBufferWindow.java @@ -28,50 +28,45 @@ */ public interface DataBufferWindow> { - /** - * Returns the current offset of this window in the original buffer. - */ + /** Returns the current offset of this window in the original buffer. */ long offset(); - /** - * Returns the size of this buffer window. - */ + /** Returns the size of this buffer window. */ long size(); /** * Moves the window at the given position in the original buffer. * *

The size of the window remains the same and its offset is set to {@code index}, so that - * accessing the value of {@link #buffer()} at index {@code x} will return the value at - * {@code index + x} in the original buffer. + * accessing the value of {@link #buffer()} at index {@code x} will return the value at {@code + * index + x} in the original buffer. * * @param index new offset for this window * @return this instance - * @throws IndexOutOfBoundsException if the window cannot be slid because it goes beyond - * the original buffer limits + * @throws IndexOutOfBoundsException if the window cannot be slid because it goes beyond the + * original buffer limits */ DataBufferWindow slideTo(long index); /** * Moves the window of {@code step} elements in the original buffer. * - *

The size of the window remains the same and its offset is set to {@code offset() + step}. - * If {@code step} is positive, then the window will slide forward. If it is negative, it will - * slide backward. + *

The size of the window remains the same and its offset is set to {@code offset() + step}. If + * {@code step} is positive, then the window will slide forward. If it is negative, it will slide + * backward. * * @param step value to add to the current offset of this window * @return this instance - * @throws IndexOutOfBoundsException if the window cannot be slid because it goes beyond - * the original buffer limits + * @throws IndexOutOfBoundsException if the window cannot be slid because it goes beyond the + * original buffer limits */ DataBufferWindow slide(long step); /** * Returns the buffer backing this window. * - *

Each window instance has it's own buffer providing a view onto the original - * {@link DataBuffer}. The buffers are mutated when the window slides to different offsets. - * For example: + *

Each window instance has it's own buffer providing a view onto the original {@link + * DataBuffer}. The buffers are mutated when the window slides to different offsets. For example: * *

{@code
    * IntDataBuffer buffer = DataBuffers.of(0, 1, 2, 3);
diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/DataBuffers.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/DataBuffers.java
index a5feb2599d0..cc60aa8a68a 100644
--- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/DataBuffers.java
+++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/DataBuffers.java
@@ -1,19 +1,19 @@
 /*
- Copyright 2019 The TensorFlow Authors. All Rights Reserved.
+Copyright 2019 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.
- You may obtain a copy of the License at
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
 
-     http://www.apache.org/licenses/LICENSE-2.0
+    http://www.apache.org/licenses/LICENSE-2.0
 
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- =======================================================================
- */
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+=======================================================================
+*/
 package org.tensorflow.ndarray.buffer;
 
 import java.lang.reflect.Array;
@@ -30,9 +30,7 @@
 import org.tensorflow.ndarray.impl.buffer.nio.NioDataBufferFactory;
 import org.tensorflow.ndarray.impl.buffer.raw.RawDataBufferFactory;
 
-/**
- * Helper class for creating {@code DataBuffer} instances.
- */
+/** Helper class for creating {@code DataBuffer} instances. */
 public final class DataBuffers {
 
   /**
@@ -44,9 +42,9 @@ public final class DataBuffers {
   public static ByteDataBuffer ofBytes(long size) {
     Validator.createArgs(size, MAX_32BITS);
     if (RawDataBufferFactory.canBeUsed()) {
-      return RawDataBufferFactory.create(new byte[(int)size], false);
+      return RawDataBufferFactory.create(new byte[(int) size], false);
     }
-    return NioDataBufferFactory.create(ByteBuffer.allocate((int)size));
+    return NioDataBufferFactory.create(ByteBuffer.allocate((int) size));
   }
 
   /**
@@ -58,9 +56,9 @@ public static ByteDataBuffer ofBytes(long size) {
   public static LongDataBuffer ofLongs(long size) {
     Validator.createArgs(size, MAX_32BITS);
     if (RawDataBufferFactory.canBeUsed()) {
-      return RawDataBufferFactory.create(new long[(int)size], false);
+      return RawDataBufferFactory.create(new long[(int) size], false);
     }
-    return NioDataBufferFactory.create(LongBuffer.allocate((int)size));
+    return NioDataBufferFactory.create(LongBuffer.allocate((int) size));
   }
 
   /**
@@ -72,9 +70,9 @@ public static LongDataBuffer ofLongs(long size) {
   public static IntDataBuffer ofInts(long size) {
     Validator.createArgs(size, MAX_32BITS);
     if (RawDataBufferFactory.canBeUsed()) {
-      return RawDataBufferFactory.create(new int[(int)size], false);
+      return RawDataBufferFactory.create(new int[(int) size], false);
     }
-    return NioDataBufferFactory.create(IntBuffer.allocate((int)size));
+    return NioDataBufferFactory.create(IntBuffer.allocate((int) size));
   }
 
   /**
@@ -86,9 +84,9 @@ public static IntDataBuffer ofInts(long size) {
   public static ShortDataBuffer ofShorts(long size) {
     Validator.createArgs(size, MAX_32BITS);
     if (RawDataBufferFactory.canBeUsed()) {
-      return RawDataBufferFactory.create(new short[(int)size], false);
+      return RawDataBufferFactory.create(new short[(int) size], false);
     }
-    return NioDataBufferFactory.create(ShortBuffer.allocate((int)size));
+    return NioDataBufferFactory.create(ShortBuffer.allocate((int) size));
   }
 
   /**
@@ -100,9 +98,9 @@ public static ShortDataBuffer ofShorts(long size) {
   public static DoubleDataBuffer ofDoubles(long size) {
     Validator.createArgs(size, MAX_32BITS);
     if (RawDataBufferFactory.canBeUsed()) {
-      return RawDataBufferFactory.create(new double[(int)size], false);
+      return RawDataBufferFactory.create(new double[(int) size], false);
     }
-    return NioDataBufferFactory.create(DoubleBuffer.allocate((int)size));
+    return NioDataBufferFactory.create(DoubleBuffer.allocate((int) size));
   }
 
   /**
@@ -114,9 +112,9 @@ public static DoubleDataBuffer ofDoubles(long size) {
   public static FloatDataBuffer ofFloats(long size) {
     Validator.createArgs(size, MAX_32BITS);
     if (RawDataBufferFactory.canBeUsed()) {
-      return RawDataBufferFactory.create(new float[(int)size], false);
+      return RawDataBufferFactory.create(new float[(int) size], false);
     }
-    return NioDataBufferFactory.create(FloatBuffer.allocate((int)size));
+    return NioDataBufferFactory.create(FloatBuffer.allocate((int) size));
   }
 
   /**
@@ -128,9 +126,9 @@ public static FloatDataBuffer ofFloats(long size) {
   public static BooleanDataBuffer ofBooleans(long size) {
     Validator.createArgs(size, MAX_32BITS);
     if (RawDataBufferFactory.canBeUsed()) {
-      return RawDataBufferFactory.create(new boolean[(int)size], false);
+      return RawDataBufferFactory.create(new boolean[(int) size], false);
     }
-    return MiscDataBufferFactory.create(new BitSet((int)size), size, false);
+    return MiscDataBufferFactory.create(new BitSet((int) size), size, false);
   }
 
   /**
@@ -145,7 +143,7 @@ public static BooleanDataBuffer ofBooleans(long size) {
   public static  DataBuffer ofObjects(Class type, long size) {
     Validator.createArgs(size, MAX_32BITS);
     @SuppressWarnings("unchecked")
-    T[] array = (T[])Array.newInstance(type, (int)size);
+    T[] array = (T[]) Array.newInstance(type, (int) size);
     return MiscDataBufferFactory.create(array, false);
   }
 
@@ -153,7 +151,8 @@ public static  DataBuffer ofObjects(Class type, long size) {
    * Create a buffer from an array of floats into a data buffer.
    *
    * 

The returned buffer allows read and write operations and share the memory of the source - * array, which is equivalent to call {@link #of(float[], boolean, boolean) of(values, false, false}} + * array, which is equivalent to call {@link #of(float[], boolean, boolean) of(values, false, + * false}} * * @param values float values * @return a new buffer @@ -166,7 +165,8 @@ public static FloatDataBuffer of(float... values) { * Create a buffer from an array of bytes into a data buffer. * *

The returned buffer allows read and write operations and share the memory of the source - * array, which is equivalent to call {@link #of(byte[], boolean, boolean) of(values, false, false}} + * array, which is equivalent to call {@link #of(byte[], boolean, boolean) of(values, false, + * false}} * * @param values byte values * @return a new buffer @@ -179,7 +179,8 @@ public static ByteDataBuffer of(byte... values) { * Create a buffer from an array of longs into a data buffer. * *

The returned buffer allows read and write operations and share the memory of the source - * array, which is equivalent to call {@link #of(long[], boolean, boolean) of(values, false, false}} + * array, which is equivalent to call {@link #of(long[], boolean, boolean) of(values, false, + * false}} * * @param values long values * @return a new buffer @@ -192,7 +193,8 @@ public static LongDataBuffer of(long... values) { * Create a buffer from an array of ints into a data buffer. * *

The returned buffer allows read and write operations and share the memory of the source - * array, which is equivalent to call {@link #of(int[], boolean, boolean) of(values, false, false}} + * array, which is equivalent to call {@link #of(int[], boolean, boolean) of(values, false, + * false}} * * @param values int values * @return a new buffer @@ -205,7 +207,8 @@ public static IntDataBuffer of(int... values) { * Create a buffer from an array of shorts into a data buffer. * *

The returned buffer allows read and write operations and share the memory of the source - * array, which is equivalent to call {@link #of(short[], boolean, boolean) of(values, false, false}} + * array, which is equivalent to call {@link #of(short[], boolean, boolean) of(values, false, + * false}} * * @param values short values * @return a new buffer @@ -218,7 +221,8 @@ public static ShortDataBuffer of(short... values) { * Create a buffer from an array of doubles into a data buffer. * *

The returned buffer allows read and write operations and share the memory of the source - * array, which is equivalent to call {@link #of(double[], boolean, boolean) of(array, false, false}} + * array, which is equivalent to call {@link #of(double[], boolean, boolean) of(array, false, + * false}} * * @param values double values * @return a new buffer @@ -231,7 +235,8 @@ public static DoubleDataBuffer of(double... values) { * Create a buffer from an array of booleans into a data buffer. * *

The returned buffer allows read and write operations and share the memory of the source - * array, which is equivalent to call {@link #of(boolean[], boolean, boolean) of(values, false, false}} + * array, which is equivalent to call {@link #of(boolean[], boolean, boolean) of(values, false, + * false}} * * @param values booleans values * @return a new buffer @@ -244,7 +249,8 @@ public static BooleanDataBuffer of(boolean... values) { * Create a buffer from an array of objects into a data buffer. * *

The returned buffer allows read and write operations and share the memory of the source - * array, which is equivalent to call {@link #of(Object[], boolean, boolean) of(values, false, false}} + * array, which is equivalent to call {@link #of(Object[], boolean, boolean) of(values, false, + * false}} * * @param values objects values * @param data type diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/DataStorageVisitor.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/DataStorageVisitor.java index 560320cd7eb..fa6ef03e570 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/DataStorageVisitor.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/DataStorageVisitor.java @@ -134,11 +134,11 @@ default R visit(long address, long length, long scale) { } /** - * Fallback method called if the visitor implementation does not support the type of backing storage - * for a given {@link DataBuffer} + * Fallback method called if the visitor implementation does not support the type of backing + * storage for a given {@link DataBuffer} * - *

The implementor of this interface must override the {@code visit} methods for type of storage - * it supports. If {@link DataBuffer#accept(DataStorageVisitor)} is called on a buffer + *

The implementor of this interface must override the {@code visit} methods for type of + * storage it supports. If {@link DataBuffer#accept(DataStorageVisitor)} is called on a buffer * using a different type of storage, the invocation will fallback to this method. * * @return any value diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/DoubleDataBuffer.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/DoubleDataBuffer.java index f2db925eb78..50367c38a06 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/DoubleDataBuffer.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/DoubleDataBuffer.java @@ -1,28 +1,26 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.buffer; import java.nio.BufferOverflowException; import java.nio.BufferUnderflowException; import java.nio.ReadOnlyBufferException; -/** - * A {@link DataBuffer} of doubles. - */ +/** A {@link DataBuffer} of doubles. */ public interface DoubleDataBuffer extends DataBuffer { /** @@ -47,13 +45,12 @@ public interface DoubleDataBuffer extends DataBuffer { /** * Bulk get method, using double arrays. - *

- * This method transfers values from this buffer into the given destination array. If there are - * fewer values in the buffer than are required to satisfy the request, that is, if - * {@code dst.length > size()}, then no values are transferred and a - * BufferUnderflowException is thrown. - *

- * Otherwise, this method copies {@code n = dst.length} values from this buffer into the given + * + *

This method transfers values from this buffer into the given destination array. If there are + * fewer values in the buffer than are required to satisfy the request, that is, if {@code + * dst.length > size()}, then no values are transferred and a BufferUnderflowException is thrown. + * + *

Otherwise, this method copies {@code n = dst.length} values from this buffer into the given * array. * * @param dst the array into which values are to be written @@ -66,41 +63,39 @@ default DoubleDataBuffer read(double[] dst) { /** * Bulk get method, using double arrays. - *

- * This method transfers values from this buffer into the given destination array. If there are - * fewer values in the buffer than are required to satisfy the request, that is, if - * {@code length > size()}, then no values are transferred and a - * BufferUnderflowException is thrown. - *

- * Otherwise, this method copies {@code n = length} values from this buffer into the given array - * starting at the given offset. + * + *

This method transfers values from this buffer into the given destination array. If there are + * fewer values in the buffer than are required to satisfy the request, that is, if {@code length + * > size()}, then no values are transferred and a BufferUnderflowException is thrown. + * + *

Otherwise, this method copies {@code n = length} values from this buffer into the given + * array starting at the given offset. * * @param dst the array into which values are to be written * @param offset the offset within the array of the first value to be written; must be - * non-negative and no larger than {@code dst.length} + * non-negative and no larger than {@code dst.length} * @param length the maximum number of values to be written to the given array; must be - * non-negative and no larger than {@code dst.length - offset} + * non-negative and no larger than {@code dst.length - offset} * @return this buffer * @throws BufferUnderflowException if there are fewer than length values remaining in this buffer * @throws IndexOutOfBoundsException if the preconditions on the offset and length parameters do - * not hold + * not hold */ DoubleDataBuffer read(double[] dst, int offset, int length); /** * Bulk put method, using double arrays. - *

- * This method transfers the values in the given source array into this buffer. If there are - * more values in the source array than in this buffer, that is, if - * {@code src.length > size()}, then no values are transferred and a - * BufferOverflowException is thrown. - *

- * Otherwise, this method copies {@code n = src.length} values from the given array. + * + *

This method transfers the values in the given source array into this buffer. If there are + * more values in the source array than in this buffer, that is, if {@code src.length > size()}, + * then no values are transferred and a BufferOverflowException is thrown. + * + *

Otherwise, this method copies {@code n = src.length} values from the given array. * * @param src the source array from which values are to be read * @return this buffer * @throws BufferOverflowException if there is insufficient space in this buffer for the values in - * the source array + * the source array * @throws ReadOnlyBufferException if this buffer is read-only */ default DoubleDataBuffer write(double[] src) { @@ -109,25 +104,24 @@ default DoubleDataBuffer write(double[] src) { /** * Bulk put method, using double arrays. - *

- * This method transfers the values in the given source array into this buffer. If there are - * more values in the source array than in this buffer, that is, if - * {@code length > size()}, then no values are transferred and a - * BufferOverflowException is thrown. - *

- * Otherwise, this method copies {@code n = length} values from the given array into this buffer, - * starting at the given offset. + * + *

This method transfers the values in the given source array into this buffer. If there are + * more values in the source array than in this buffer, that is, if {@code length > size()}, then + * no values are transferred and a BufferOverflowException is thrown. + * + *

Otherwise, this method copies {@code n = length} values from the given array into this + * buffer, starting at the given offset. * * @param src the source array from which values are to be read * @param offset the offset within the array of the first value to be read; must be non-negative - * and no larger than {@code src.length} + * and no larger than {@code src.length} * @param length the number of values to be read from the given array; must be non-negative and no - * larger than {@code src.length - offset} + * larger than {@code src.length - offset} * @return this buffer * @throws BufferOverflowException if there is insufficient space in this buffer for the values in - * the source array + * the source array * @throws IndexOutOfBoundsException if the preconditions on the offset and length parameters do - * not hold + * not hold * @throws ReadOnlyBufferException if this buffer is read-only */ DoubleDataBuffer write(double[] src, int offset, int length); diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/FloatDataBuffer.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/FloatDataBuffer.java index 4961c1b3445..45e389a559e 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/FloatDataBuffer.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/FloatDataBuffer.java @@ -1,28 +1,26 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.buffer; import java.nio.BufferOverflowException; import java.nio.BufferUnderflowException; import java.nio.ReadOnlyBufferException; -/** - * A {@link DataBuffer} of floats. - */ +/** A {@link DataBuffer} of floats. */ public interface FloatDataBuffer extends DataBuffer { /** @@ -47,13 +45,12 @@ public interface FloatDataBuffer extends DataBuffer { /** * Bulk get method, using float arrays. - *

- * This method transfers values from this buffer into the given destination array. If there are - * fewer values in the buffer than are required to satisfy the request, that is, if - * {@code dst.length > size()}, then no values are transferred and a - * BufferUnderflowException is thrown. - *

- * Otherwise, this method copies {@code n = dst.length} values from this buffer into the given + * + *

This method transfers values from this buffer into the given destination array. If there are + * fewer values in the buffer than are required to satisfy the request, that is, if {@code + * dst.length > size()}, then no values are transferred and a BufferUnderflowException is thrown. + * + *

Otherwise, this method copies {@code n = dst.length} values from this buffer into the given * array. * * @param dst the array into which values are to be written @@ -66,41 +63,39 @@ default FloatDataBuffer read(float[] dst) { /** * Bulk get method, using float arrays. - *

- * This method transfers values from this buffer into the given destination array. If there are - * fewer values in the buffer than are required to satisfy the request, that is, if - * {@code length > size()}, then no values are transferred and a - * BufferUnderflowException is thrown. - *

- * Otherwise, this method copies {@code n = length} values from this buffer into the given array - * starting at the given offset. + * + *

This method transfers values from this buffer into the given destination array. If there are + * fewer values in the buffer than are required to satisfy the request, that is, if {@code length + * > size()}, then no values are transferred and a BufferUnderflowException is thrown. + * + *

Otherwise, this method copies {@code n = length} values from this buffer into the given + * array starting at the given offset. * * @param dst the array into which values are to be written * @param offset the offset within the array of the first value to be written; must be - * non-negative and no larger than {@code dst.length} + * non-negative and no larger than {@code dst.length} * @param length the maximum number of values to be written to the given array; must be - * non-negative and no larger than {@code dst.length - offset} + * non-negative and no larger than {@code dst.length - offset} * @return this buffer * @throws BufferUnderflowException if there are fewer than length values remaining in this buffer * @throws IndexOutOfBoundsException if the preconditions on the offset and length parameters do - * not hold + * not hold */ FloatDataBuffer read(float[] dst, int offset, int length); /** * Bulk put method, using float arrays. - *

- * This method transfers the values in the given source array into this buffer. If there are - * more values in the source array than in this buffer, that is, if - * {@code src.length > size()}, then no values are transferred and a - * BufferOverflowException is thrown. - *

- * Otherwise, this method copies {@code n = src.length} values from the given array. + * + *

This method transfers the values in the given source array into this buffer. If there are + * more values in the source array than in this buffer, that is, if {@code src.length > size()}, + * then no values are transferred and a BufferOverflowException is thrown. + * + *

Otherwise, this method copies {@code n = src.length} values from the given array. * * @param src the source array from which values are to be read * @return this buffer * @throws BufferOverflowException if there is insufficient space in this buffer for the values in - * the source array + * the source array * @throws ReadOnlyBufferException if this buffer is read-only */ default FloatDataBuffer write(float[] src) { @@ -109,25 +104,24 @@ default FloatDataBuffer write(float[] src) { /** * Bulk put method, using float arrays. - *

- * This method transfers the values in the given source array into this buffer. If there are - * more values in the source array than in this buffer, that is, if - * {@code length > size()}, then no values are transferred and a - * BufferOverflowException is thrown. - *

- * Otherwise, this method copies {@code n = length} values from the given array into this buffer, - * starting at the given offset. + * + *

This method transfers the values in the given source array into this buffer. If there are + * more values in the source array than in this buffer, that is, if {@code length > size()}, then + * no values are transferred and a BufferOverflowException is thrown. + * + *

Otherwise, this method copies {@code n = length} values from the given array into this + * buffer, starting at the given offset. * * @param src the source array from which values are to be read * @param offset the offset within the array of the first value to be read; must be non-negative - * and no larger than {@code src.length} + * and no larger than {@code src.length} * @param length the number of values to be read from the given array; must be non-negative and no - * larger than {@code src.length - offset} + * larger than {@code src.length - offset} * @return this buffer * @throws BufferOverflowException if there is insufficient space in this buffer for the values in - * the source array + * the source array * @throws IndexOutOfBoundsException if the preconditions on the offset and length parameters do - * not hold + * not hold * @throws ReadOnlyBufferException if this buffer is read-only */ FloatDataBuffer write(float[] src, int offset, int length); diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/IntDataBuffer.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/IntDataBuffer.java index 2d660756e09..52e3428f02d 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/IntDataBuffer.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/IntDataBuffer.java @@ -1,28 +1,26 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.buffer; import java.nio.BufferOverflowException; import java.nio.BufferUnderflowException; import java.nio.ReadOnlyBufferException; -/** - * A {@link DataBuffer} of ints. - */ +/** A {@link DataBuffer} of ints. */ public interface IntDataBuffer extends DataBuffer { /** @@ -47,13 +45,12 @@ public interface IntDataBuffer extends DataBuffer { /** * Bulk get method, using int arrays. - *

- * This method transfers values from this buffer into the given destination array. If there are - * fewer values in the buffer than are required to satisfy the request, that is, if - * {@code dst.length > size()}, then no values are transferred and a - * BufferUnderflowException is thrown. - *

- * Otherwise, this method copies {@code n = dst.length} values from this buffer into the given + * + *

This method transfers values from this buffer into the given destination array. If there are + * fewer values in the buffer than are required to satisfy the request, that is, if {@code + * dst.length > size()}, then no values are transferred and a BufferUnderflowException is thrown. + * + *

Otherwise, this method copies {@code n = dst.length} values from this buffer into the given * array. * * @param dst the array into which values are to be written @@ -66,41 +63,39 @@ default IntDataBuffer read(int[] dst) { /** * Bulk get method, using int arrays. - *

- * This method transfers values from this buffer into the given destination array. If there are - * fewer values in the buffer than are required to satisfy the request, that is, if - * {@code length > size()}, then no values are transferred and a - * BufferUnderflowException is thrown. - *

- * Otherwise, this method copies {@code n = length} values from this buffer into the given array - * starting at the given offset. + * + *

This method transfers values from this buffer into the given destination array. If there are + * fewer values in the buffer than are required to satisfy the request, that is, if {@code length + * > size()}, then no values are transferred and a BufferUnderflowException is thrown. + * + *

Otherwise, this method copies {@code n = length} values from this buffer into the given + * array starting at the given offset. * * @param dst the array into which values are to be written * @param offset the offset within the array of the first value to be written; must be - * non-negative and no larger than {@code dst.length} + * non-negative and no larger than {@code dst.length} * @param length the maximum number of values to be written to the given array; must be - * non-negative and no larger than {@code dst.length - offset} + * non-negative and no larger than {@code dst.length - offset} * @return this buffer * @throws BufferUnderflowException if there are fewer than length values remaining in this buffer * @throws IndexOutOfBoundsException if the preconditions on the offset and length parameters do - * not hold + * not hold */ IntDataBuffer read(int[] dst, int offset, int length); /** * Bulk put method, using int arrays. - *

- * This method transfers the values in the given source array into this buffer. If there are - * more values in the source array than in this buffer, that is, if - * {@code src.length > size()}, then no values are transferred and a - * BufferOverflowException is thrown. - *

- * Otherwise, this method copies {@code n = src.length} values from the given array. + * + *

This method transfers the values in the given source array into this buffer. If there are + * more values in the source array than in this buffer, that is, if {@code src.length > size()}, + * then no values are transferred and a BufferOverflowException is thrown. + * + *

Otherwise, this method copies {@code n = src.length} values from the given array. * * @param src the source array from which values are to be read * @return this buffer * @throws BufferOverflowException if there is insufficient space in this buffer for the values in - * the source array + * the source array * @throws ReadOnlyBufferException if this buffer is read-only */ default IntDataBuffer write(int[] src) { @@ -109,25 +104,24 @@ default IntDataBuffer write(int[] src) { /** * Bulk put method, using int arrays. - *

- * This method transfers the values in the given source array into this buffer. If there are - * more values in the source array than in this buffer, that is, if - * {@code length > size()}, then no values are transferred and a - * BufferOverflowException is thrown. - *

- * Otherwise, this method copies {@code n = length} values from the given array into this buffer, - * starting at the given offset. + * + *

This method transfers the values in the given source array into this buffer. If there are + * more values in the source array than in this buffer, that is, if {@code length > size()}, then + * no values are transferred and a BufferOverflowException is thrown. + * + *

Otherwise, this method copies {@code n = length} values from the given array into this + * buffer, starting at the given offset. * * @param src the source array from which values are to be read * @param offset the offset within the array of the first value to be read; must be non-negative - * and no larger than {@code src.length} + * and no larger than {@code src.length} * @param length the number of values to be read from the given array; must be non-negative and no - * larger than {@code src.length - offset} + * larger than {@code src.length - offset} * @return this buffer * @throws BufferOverflowException if there is insufficient space in this buffer for the values in - * the source array + * the source array * @throws IndexOutOfBoundsException if the preconditions on the offset and length parameters do - * not hold + * not hold * @throws ReadOnlyBufferException if this buffer is read-only */ IntDataBuffer write(int[] src, int offset, int length); diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/LongDataBuffer.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/LongDataBuffer.java index f88ae4a80b4..89ae7ae3aed 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/LongDataBuffer.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/LongDataBuffer.java @@ -1,28 +1,26 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.buffer; import java.nio.BufferOverflowException; import java.nio.BufferUnderflowException; import java.nio.ReadOnlyBufferException; -/** - * A {@link DataBuffer} of longs. - */ +/** A {@link DataBuffer} of longs. */ public interface LongDataBuffer extends DataBuffer { /** @@ -47,13 +45,12 @@ public interface LongDataBuffer extends DataBuffer { /** * Bulk get method, using long arrays. - *

- * This method transfers values from this buffer into the given destination array. If there are - * fewer values in the buffer than are required to satisfy the request, that is, if - * {@code dst.length > size()}, then no values are transferred and a - * BufferUnderflowException is thrown. - *

- * Otherwise, this method copies {@code n = dst.length} values from this buffer into the given + * + *

This method transfers values from this buffer into the given destination array. If there are + * fewer values in the buffer than are required to satisfy the request, that is, if {@code + * dst.length > size()}, then no values are transferred and a BufferUnderflowException is thrown. + * + *

Otherwise, this method copies {@code n = dst.length} values from this buffer into the given * array. * * @param dst the array into which values are to be written @@ -66,41 +63,39 @@ default LongDataBuffer read(long[] dst) { /** * Bulk get method, using long arrays. - *

- * This method transfers values from this buffer into the given destination array. If there are - * fewer values in the buffer than are required to satisfy the request, that is, if - * {@code length > size()}, then no values are transferred and a - * BufferUnderflowException is thrown. - *

- * Otherwise, this method copies {@code n = length} values from this buffer into the given array - * starting at the given offset. + * + *

This method transfers values from this buffer into the given destination array. If there are + * fewer values in the buffer than are required to satisfy the request, that is, if {@code length + * > size()}, then no values are transferred and a BufferUnderflowException is thrown. + * + *

Otherwise, this method copies {@code n = length} values from this buffer into the given + * array starting at the given offset. * * @param dst the array into which values are to be written * @param offset the offset within the array of the first value to be written; must be - * non-negative and no larger than {@code dst.length} + * non-negative and no larger than {@code dst.length} * @param length the maximum number of values to be written to the given array; must be - * non-negative and no larger than {@code dst.length - offset} + * non-negative and no larger than {@code dst.length - offset} * @return this buffer * @throws BufferUnderflowException if there are fewer than length values remaining in this buffer * @throws IndexOutOfBoundsException if the preconditions on the offset and length parameters do - * not hold + * not hold */ LongDataBuffer read(long[] dst, int offset, int length); /** * Bulk put method, using long arrays. - *

- * This method transfers the values in the given source array into this buffer. If there are - * more values in the source array than in this buffer, that is, if - * {@code src.length > size()}, then no values are transferred and a - * BufferOverflowException is thrown. - *

- * Otherwise, this method copies {@code n = src.length} values from the given array. + * + *

This method transfers the values in the given source array into this buffer. If there are + * more values in the source array than in this buffer, that is, if {@code src.length > size()}, + * then no values are transferred and a BufferOverflowException is thrown. + * + *

Otherwise, this method copies {@code n = src.length} values from the given array. * * @param src the source array from which values are to be read * @return this buffer * @throws BufferOverflowException if there is insufficient space in this buffer for the values in - * the source array + * the source array * @throws ReadOnlyBufferException if this buffer is read-only */ default LongDataBuffer write(long[] src) { @@ -109,25 +104,24 @@ default LongDataBuffer write(long[] src) { /** * Bulk put method, using long arrays. - *

- * This method transfers the values in the given source array into this buffer. If there are - * more values in the source array than in this buffer, that is, if - * {@code length > size()}, then no values are transferred and a - * BufferOverflowException is thrown. - *

- * Otherwise, this method copies {@code n = length} values from the given array into this buffer, - * starting at the given offset. + * + *

This method transfers the values in the given source array into this buffer. If there are + * more values in the source array than in this buffer, that is, if {@code length > size()}, then + * no values are transferred and a BufferOverflowException is thrown. + * + *

Otherwise, this method copies {@code n = length} values from the given array into this + * buffer, starting at the given offset. * * @param src the source array from which values are to be read * @param offset the offset within the array of the first value to be read; must be non-negative - * and no larger than {@code src.length} + * and no larger than {@code src.length} * @param length the number of values to be read from the given array; must be non-negative and no - * larger than {@code src.length - offset} + * larger than {@code src.length - offset} * @return this buffer * @throws BufferOverflowException if there is insufficient space in this buffer for the values in - * the source array + * the source array * @throws IndexOutOfBoundsException if the preconditions on the offset and length parameters do - * not hold + * not hold * @throws ReadOnlyBufferException if this buffer is read-only */ LongDataBuffer write(long[] src, int offset, int length); diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/ShortDataBuffer.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/ShortDataBuffer.java index 290e2d57619..1ae128d4e69 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/ShortDataBuffer.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/ShortDataBuffer.java @@ -1,28 +1,26 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.buffer; import java.nio.BufferOverflowException; import java.nio.BufferUnderflowException; import java.nio.ReadOnlyBufferException; -/** - * A {@link DataBuffer} of shorts. - */ +/** A {@link DataBuffer} of shorts. */ public interface ShortDataBuffer extends DataBuffer { /** @@ -47,13 +45,12 @@ public interface ShortDataBuffer extends DataBuffer { /** * Bulk get method, using short arrays. - *

- * This method transfers values from this buffer into the given destination array. If there are - * fewer values in the buffer than are required to satisfy the request, that is, if - * {@code dst.length > size()}, then no values are transferred and a - * BufferUnderflowException is thrown. - *

- * Otherwise, this method copies {@code n = dst.length} values from this buffer into the given + * + *

This method transfers values from this buffer into the given destination array. If there are + * fewer values in the buffer than are required to satisfy the request, that is, if {@code + * dst.length > size()}, then no values are transferred and a BufferUnderflowException is thrown. + * + *

Otherwise, this method copies {@code n = dst.length} values from this buffer into the given * array. * * @param dst the array into which values are to be written @@ -66,41 +63,39 @@ default ShortDataBuffer read(short[] dst) { /** * Bulk get method, using short arrays. - *

- * This method transfers values from this buffer into the given destination array. If there are - * fewer values in the buffer than are required to satisfy the request, that is, if - * {@code length > size()}, then no values are transferred and a - * BufferUnderflowException is thrown. - *

- * Otherwise, this method copies {@code n = length} values from this buffer into the given array - * starting at the given offset. + * + *

This method transfers values from this buffer into the given destination array. If there are + * fewer values in the buffer than are required to satisfy the request, that is, if {@code length + * > size()}, then no values are transferred and a BufferUnderflowException is thrown. + * + *

Otherwise, this method copies {@code n = length} values from this buffer into the given + * array starting at the given offset. * * @param dst the array into which values are to be written * @param offset the offset within the array of the first value to be written; must be - * non-negative and no larger than {@code dst.length} + * non-negative and no larger than {@code dst.length} * @param length the maximum number of values to be written to the given array; must be - * non-negative and no larger than {@code dst.length - offset} + * non-negative and no larger than {@code dst.length - offset} * @return this buffer * @throws BufferUnderflowException if there are fewer than length values remaining in this buffer * @throws IndexOutOfBoundsException if the preconditions on the offset and length parameters do - * not hold + * not hold */ ShortDataBuffer read(short[] dst, int offset, int length); /** * Bulk put method, using short arrays. - *

- * This method transfers the values in the given source array into this buffer. If there are - * more values in the source array than in this buffer, that is, if - * {@code src.length > size()}, then no values are transferred and a - * BufferOverflowException is thrown. - *

- * Otherwise, this method copies {@code n = src.length} values from the given array. + * + *

This method transfers the values in the given source array into this buffer. If there are + * more values in the source array than in this buffer, that is, if {@code src.length > size()}, + * then no values are transferred and a BufferOverflowException is thrown. + * + *

Otherwise, this method copies {@code n = src.length} values from the given array. * * @param src the source array from which values are to be read * @return this buffer * @throws BufferOverflowException if there is insufficient space in this buffer for the values in - * the source array + * the source array * @throws ReadOnlyBufferException if this buffer is read-only */ default ShortDataBuffer write(short[] src) { @@ -109,25 +104,24 @@ default ShortDataBuffer write(short[] src) { /** * Bulk put method, using short arrays. - *

- * This method transfers the values in the given source array into this buffer. If there are - * more values in the source array than in this buffer, that is, if - * {@code length > size()}, then no values are transferred and a - * BufferOverflowException is thrown. - *

- * Otherwise, this method copies {@code n = length} values from the given array into this buffer, - * starting at the given offset. + * + *

This method transfers the values in the given source array into this buffer. If there are + * more values in the source array than in this buffer, that is, if {@code length > size()}, then + * no values are transferred and a BufferOverflowException is thrown. + * + *

Otherwise, this method copies {@code n = length} values from the given array into this + * buffer, starting at the given offset. * * @param src the source array from which values are to be read * @param offset the offset within the array of the first value to be read; must be non-negative - * and no larger than {@code src.length} + * and no larger than {@code src.length} * @param length the number of values to be read from the given array; must be non-negative and no - * larger than {@code src.length - offset} + * larger than {@code src.length - offset} * @return this buffer * @throws BufferOverflowException if there is insufficient space in this buffer for the values in - * the source array + * the source array * @throws IndexOutOfBoundsException if the preconditions on the offset and length parameters do - * not hold + * not hold * @throws ReadOnlyBufferException if this buffer is read-only */ ShortDataBuffer write(short[] src, int offset, int length); diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/BooleanDataLayout.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/BooleanDataLayout.java index c7092c8720d..fd69a957e69 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/BooleanDataLayout.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/BooleanDataLayout.java @@ -44,7 +44,8 @@ default BooleanDataBuffer applyTo(S buffer) { void writeBoolean(S buffer, boolean value, long index); /** - * Reads {@code n = scale()} values from the buffer at the given index and return them as a boolean. + * Reads {@code n = scale()} values from the buffer at the given index and return them as a + * boolean. * * @param buffer the buffer to read from * @param index position of the buffer to read in the buffer diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/ByteDataLayout.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/ByteDataLayout.java index e4d4bf9c8cf..f9d868dabdd 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/ByteDataLayout.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/ByteDataLayout.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.buffer.layout; import org.tensorflow.ndarray.buffer.ByteDataBuffer; diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/DataLayout.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/DataLayout.java index 93cc542e07a..97c26530ddd 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/DataLayout.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/DataLayout.java @@ -24,15 +24,15 @@ * *

{@code DataLayout} instances are used to define a custom format for storing and reading data * of a {@link DataBuffer}. They provide a segregation layer between the type of data stored in the - * buffer (the buffer type) and the type of data manipulated by the end user (the - * user type). + * buffer (the buffer type) and the type of data manipulated by the end user (the user + * type). * - *

Since the conversion methods are invoked for every value that is written or read, working - * with data layouts may have a negative impact on the performances so using primitive types directly + *

Since the conversion methods are invoked for every value that is written or read, working with + * data layouts may have a negative impact on the performances so using primitive types directly * should be preferred whenever possible. * - *

It is also recommended to implement immutable data layouts so they can be reapplied to multiple - * buffers without reallocating a new instance for each of them. For example: + *

It is also recommended to implement immutable data layouts so they can be reapplied to + * multiple buffers without reallocating a new instance for each of them. For example: * *

  * class BigIntegerBufferAllocator {
@@ -80,12 +80,14 @@ default DataBuffer applyTo(S buffer) {
    * 

It is the responsibility of the implementors of this interface to write the converted value * to the given buffer before this call returns, using the most appropriate method. For example, * for a layout converting a {@code BigInteger} to a single {@code long}, + * *

    * @Override
    * public void writeObject(LongDataBuffer buffer, BigInteger value, long index) {
    *   buffer.setLong(value.longValue(), index);
    * }
    * 
+ * * If a single user value scales over more than one buffer values, {@code index} indicates the * starting position of the sequence to be written to the buffer. * @@ -102,12 +104,14 @@ default DataBuffer applyTo(S buffer) { *

It is the responsibility of the implementors of this interface to read the value to be * converted from the given buffer, using the most appropriate method. For example, for a layout * that converting a single {@code long} to a {@code BigInteger}, + * *

    * @Override
    * public BigInteger readObject(LongDataBuffer buffer, long index) {
    *   return BigInteger.valueOf(buffer.getLong(index));
    * }
    * 
+ * * If a single user value scales over more than one buffer values, {@code index} indicates the * starting position of the sequence to be read from the buffer. * @@ -118,10 +122,11 @@ default DataBuffer applyTo(S buffer) { T readObject(S buffer, long index); /** - * Indicates the number of buffer values are required to represent a single user value, default is 1. + * Indicates the number of buffer values are required to represent a single user value, default is + * 1. * - *

Scale must be positive and must be an integer, meaning that a single buffer value in a buffer cannot - * be used to represent more than one user value. + *

Scale must be positive and must be an integer, meaning that a single buffer value in a + * buffer cannot be used to represent more than one user value. */ default int scale() { return 1; diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/DataLayouts.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/DataLayouts.java index 8f69168930c..e58ca550636 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/DataLayouts.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/DataLayouts.java @@ -27,9 +27,11 @@ import org.tensorflow.ndarray.impl.buffer.layout.StringLayout; /** - * Exposes {@link DataLayout} instances of data formats frequently used in linear algebra computation. + * Exposes {@link DataLayout} instances of data formats frequently used in linear algebra + * computation. * *

Example of usage: + * *

{@code
  * // Storing boolean values in a ByteDataBuffer
  * BooleanDataBuffer boolBuffer = DataLayouts.BOOL.applyTo(byteDataBuffer);
@@ -50,7 +52,8 @@ public final class DataLayouts {
    * 

Therefore, this is a lost of precision in the fraction part compared to the IEEE-754 * half-precision floating point specification (see {@link #FLOAT16} but it has a larger range of * possible values in the whole part as it preserves the 8-bit exponent and uses the same bias, - * (i.e. an absolute range above 0 of approximately [10-40, 3.39 × 1038] + * (i.e. an absolute range above 0 of approximately [10-40, 3.39 × + * 1038] * *

Some CPUs support the bfloat16 format natively for better performances. */ @@ -63,12 +66,12 @@ public final class DataLayouts { * specification, and are converted to/from 32-bit floats in the user space. * *

There is a potential loss of precision when converting a single float (32-bit) to a half - * float (16-bit). Absolute range of values above 0 for a half float is approximately - * [5.96 × 10-8, 6.55 × 104] and their decimal part is rounded up - * to a 10 bits mantissa. + * float (16-bit). Absolute range of values above 0 for a half float is approximately [5.96 × + * 10-8, 6.55 × 104] and their decimal part is rounded up to a 10 bits + * mantissa. * *

In general, half float computation perform better on GPUs since, in general, CPUs do not - * support this format natively.

+ * support this format natively. */ public static final FloatDataLayout FLOAT16 = new Float16Layout(); diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/LongDataLayout.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/LongDataLayout.java index f5c86ddd378..de8fddc8407 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/LongDataLayout.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/layout/LongDataLayout.java @@ -26,7 +26,7 @@ * @param type of buffer this layout can be applied to * @see DataLayout */ -public interface LongDataLayout> extends DataLayout { +public interface LongDataLayout> extends DataLayout { @Override default LongDataBuffer applyTo(S buffer) { diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/AbstractNdArray.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/AbstractNdArray.java index cf0d9f1596f..41f2cb5977f 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/AbstractNdArray.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/AbstractNdArray.java @@ -16,14 +16,13 @@ */ package org.tensorflow.ndarray.impl; +import java.util.Iterator; +import java.util.Objects; import org.tensorflow.ndarray.NdArray; import org.tensorflow.ndarray.NdArraySequence; import org.tensorflow.ndarray.Shape; import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; -import java.util.Iterator; -import java.util.Objects; - @SuppressWarnings("unchecked") public abstract class AbstractNdArray> implements NdArray { diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/Validator.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/Validator.java index 3e0ba204325..da7ca2354e0 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/Validator.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/Validator.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl; import java.nio.BufferOverflowException; @@ -25,8 +25,12 @@ public class Validator { public static void copyToNdArrayArgs(NdArray ndArray, NdArray otherNdArray) { if (!ndArray.shape().equals(otherNdArray.shape())) { - throw new IllegalArgumentException("Can only copy to arrays of the same shape (" + - ndArray.shape() + " != " + otherNdArray.shape() + ")"); + throw new IllegalArgumentException( + "Can only copy to arrays of the same shape (" + + ndArray.shape() + + " != " + + otherNdArray.shape() + + ")"); } } diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/AbstractDataBuffer.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/AbstractDataBuffer.java index e5103a2c17a..5de34b23f7e 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/AbstractDataBuffer.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/AbstractDataBuffer.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.buffer; import java.util.Arrays; @@ -49,7 +49,8 @@ public DataBuffer copyTo(DataBuffer dst, long size) { @Override public int hashCode() { - // This hash code computation is generic to all types of data buffers and accurate but not optimized + // This hash code computation is generic to all types of data buffers and accurate but not + // optimized // for performances, it needs to be improved if there is a present use case for such hash codes. return slowHashCode(); } @@ -62,7 +63,7 @@ public boolean equals(Object obj) { if (!(obj instanceof DataBuffer)) { return false; } - return slowEquals((DataBuffer)obj); + return slowEquals((DataBuffer) obj); } @SuppressWarnings("unchecked") @@ -71,7 +72,7 @@ protected > U slowCopyTo(DataBuffer dst, long size) { for (long idx = 0L; idx < size; ++idx) { dst.setObject(getObject(idx), idx); } - return (U)this; + return (U) this; } protected int slowHashCode() { @@ -84,11 +85,13 @@ protected int slowHashCode() { T o = getObject(idx); if (o != null) { if (o.getClass().isArray()) { - result = prime * result + arrayHashCode(idx, o.getClass()); // compute hash codes based on array elements + result = + prime * result + + arrayHashCode(idx, o.getClass()); // compute hash codes based on array elements return result; } result = prime * result + o.hashCode(); - break; // continue hash code computation without array type check + break; // continue hash code computation without array type check } result = prime * result; } @@ -112,7 +115,7 @@ protected boolean slowEquals(DataBuffer other) { if (!Objects.equals(other.getObject(idx), thisObject)) { return false; } - break; // continue equality comparison without array type check + break; // continue equality comparison without array type check } if (other.getObject(idx) != null) { return false; @@ -137,7 +140,8 @@ private int arrayHashCode(long startIdx, Class arrayClass) { } private boolean arrayEquals(long startIdx, Class arrayClass, DataBuffer other) { - ArrayComparator comparator = ARRAY_COMPARATORS.getOrDefault(arrayClass, DEFAULT_ARRAY_COMPARATOR); + ArrayComparator comparator = + ARRAY_COMPARATORS.getOrDefault(arrayClass, DEFAULT_ARRAY_COMPARATOR); for (long idx = startIdx; idx < size(); ++idx) { if (!comparator.equals(this, other, idx)) { return false; @@ -150,6 +154,7 @@ private boolean arrayEquals(long startIdx, Class arrayClass, DataBuffer ot private static interface ArrayHashCoder { int hashCode(DataBuffer buffer, long index); } + private static final Map, ArrayHashCoder> ARRAY_HASH_CODERS = new HashMap<>(); private static final ArrayHashCoder DEFAULT_ARRAY_HASH_CODER; @@ -157,26 +162,45 @@ private static interface ArrayHashCoder { private static interface ArrayComparator { boolean equals(DataBuffer buffer, DataBuffer otherBuffer, long index); } + private static final Map, ArrayComparator> ARRAY_COMPARATORS = new HashMap<>(); private static final ArrayComparator DEFAULT_ARRAY_COMPARATOR; static { - ARRAY_HASH_CODERS.put(byte[].class, (b, idx) -> Arrays.hashCode((byte[])b.getObject(idx))); - ARRAY_HASH_CODERS.put(int[].class, (b, idx) -> Arrays.hashCode((int[])b.getObject(idx))); - ARRAY_HASH_CODERS.put(short[].class, (b, idx) -> Arrays.hashCode((short[])b.getObject(idx))); - ARRAY_HASH_CODERS.put(long[].class, (b, idx) -> Arrays.hashCode((long[])b.getObject(idx))); - ARRAY_HASH_CODERS.put(float[].class, (b, idx) -> Arrays.hashCode((float[])b.getObject(idx))); - ARRAY_HASH_CODERS.put(double[].class, (b, idx) -> Arrays.hashCode((double[])b.getObject(idx))); - ARRAY_HASH_CODERS.put(boolean[].class, (b, idx) -> Arrays.hashCode((boolean[])b.getObject(idx))); - DEFAULT_ARRAY_HASH_CODER = (b, idx) -> Arrays.deepHashCode((Object[])b.getObject(idx)); - - ARRAY_COMPARATORS.put(byte[].class, (b1, b2, idx) -> Arrays.equals((byte[])b1.getObject(idx), (byte[])b2.getObject(idx))); - ARRAY_COMPARATORS.put(int[].class, (b1, b2, idx) -> Arrays.equals((int[])b1.getObject(idx), (int[])b2.getObject(idx))); - ARRAY_COMPARATORS.put(short[].class, (b1, b2, idx) -> Arrays.equals((short[])b1.getObject(idx), (short[])b2.getObject(idx))); - ARRAY_COMPARATORS.put(long[].class, (b1, b2, idx) -> Arrays.equals((long[])b1.getObject(idx), (long[])b2.getObject(idx))); - ARRAY_COMPARATORS.put(float[].class, (b1, b2, idx) -> Arrays.equals((float[])b1.getObject(idx), (float[])b2.getObject(idx))); - ARRAY_COMPARATORS.put(double[].class, (b1, b2, idx) -> Arrays.equals((double[])b1.getObject(idx), (double[])b2.getObject(idx))); - ARRAY_COMPARATORS.put(boolean[].class, (b1, b2, idx) -> Arrays.equals((boolean[])b1.getObject(idx), (boolean[])b2.getObject(idx))); - DEFAULT_ARRAY_COMPARATOR = (b1, b2, idx) -> Arrays.deepEquals((Object[])b1.getObject(idx), (Object[])b2.getObject(idx)); + ARRAY_HASH_CODERS.put(byte[].class, (b, idx) -> Arrays.hashCode((byte[]) b.getObject(idx))); + ARRAY_HASH_CODERS.put(int[].class, (b, idx) -> Arrays.hashCode((int[]) b.getObject(idx))); + ARRAY_HASH_CODERS.put(short[].class, (b, idx) -> Arrays.hashCode((short[]) b.getObject(idx))); + ARRAY_HASH_CODERS.put(long[].class, (b, idx) -> Arrays.hashCode((long[]) b.getObject(idx))); + ARRAY_HASH_CODERS.put(float[].class, (b, idx) -> Arrays.hashCode((float[]) b.getObject(idx))); + ARRAY_HASH_CODERS.put(double[].class, (b, idx) -> Arrays.hashCode((double[]) b.getObject(idx))); + ARRAY_HASH_CODERS.put( + boolean[].class, (b, idx) -> Arrays.hashCode((boolean[]) b.getObject(idx))); + DEFAULT_ARRAY_HASH_CODER = (b, idx) -> Arrays.deepHashCode((Object[]) b.getObject(idx)); + + ARRAY_COMPARATORS.put( + byte[].class, + (b1, b2, idx) -> Arrays.equals((byte[]) b1.getObject(idx), (byte[]) b2.getObject(idx))); + ARRAY_COMPARATORS.put( + int[].class, + (b1, b2, idx) -> Arrays.equals((int[]) b1.getObject(idx), (int[]) b2.getObject(idx))); + ARRAY_COMPARATORS.put( + short[].class, + (b1, b2, idx) -> Arrays.equals((short[]) b1.getObject(idx), (short[]) b2.getObject(idx))); + ARRAY_COMPARATORS.put( + long[].class, + (b1, b2, idx) -> Arrays.equals((long[]) b1.getObject(idx), (long[]) b2.getObject(idx))); + ARRAY_COMPARATORS.put( + float[].class, + (b1, b2, idx) -> Arrays.equals((float[]) b1.getObject(idx), (float[]) b2.getObject(idx))); + ARRAY_COMPARATORS.put( + double[].class, + (b1, b2, idx) -> Arrays.equals((double[]) b1.getObject(idx), (double[]) b2.getObject(idx))); + ARRAY_COMPARATORS.put( + boolean[].class, + (b1, b2, idx) -> + Arrays.equals((boolean[]) b1.getObject(idx), (boolean[]) b2.getObject(idx))); + DEFAULT_ARRAY_COMPARATOR = + (b1, b2, idx) -> + Arrays.deepEquals((Object[]) b1.getObject(idx), (Object[]) b2.getObject(idx)); } } diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/AbstractDataBufferWindow.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/AbstractDataBufferWindow.java index 55d4fd56021..cf28df86ca1 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/AbstractDataBufferWindow.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/AbstractDataBufferWindow.java @@ -3,7 +3,8 @@ import org.tensorflow.ndarray.buffer.DataBuffer; import org.tensorflow.ndarray.buffer.DataBufferWindow; -public abstract class AbstractDataBufferWindow> implements DataBufferWindow { +public abstract class AbstractDataBufferWindow> + implements DataBufferWindow { @Override public final long offset() { diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/Validator.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/Validator.java index 8f18e620b90..d85a6ded17f 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/Validator.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/Validator.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.buffer; import java.nio.BufferOverflowException; @@ -28,7 +28,8 @@ public static void createArgs(long size, long maxSize) { throw new IllegalArgumentException("Size must be non-negative"); } if (size > maxSize) { - throw new IllegalArgumentException("Buffer size must be no greater than maximum size allowed (" + maxSize + ")"); + throw new IllegalArgumentException( + "Buffer size must be no greater than maximum size allowed (" + maxSize + ")"); } } @@ -99,7 +100,8 @@ public static void narrowArgs(DataBuffer buffer, long size) { throw new IllegalArgumentException("Size must be non-negative"); } if (size > buffer.size()) { - throw new IllegalArgumentException("Cannot narrow a buffer of size " + buffer.size() + " to " + size); + throw new IllegalArgumentException( + "Cannot narrow a buffer of size " + buffer.size() + " to " + size); } } @@ -126,7 +128,8 @@ private static void arrayArgs(int arrayLength, int offset, int length) { throw new IndexOutOfBoundsException("Length must be non-negative"); } if (length > arrayLength - offset) { - throw new IndexOutOfBoundsException("Length must be no larger than array length minus the offset"); + throw new IndexOutOfBoundsException( + "Length must be no larger than array length minus the offset"); } } } diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/AbstractDataBufferAdapter.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/AbstractDataBufferAdapter.java index 3c9b6df1e93..901a7ed8905 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/AbstractDataBufferAdapter.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/AbstractDataBufferAdapter.java @@ -17,13 +17,14 @@ package org.tensorflow.ndarray.impl.buffer.adapter; -import org.tensorflow.ndarray.impl.buffer.Validator; import org.tensorflow.ndarray.buffer.DataBuffer; -import org.tensorflow.ndarray.impl.buffer.AbstractDataBuffer; import org.tensorflow.ndarray.buffer.layout.DataLayout; +import org.tensorflow.ndarray.impl.buffer.AbstractDataBuffer; +import org.tensorflow.ndarray.impl.buffer.Validator; @SuppressWarnings("unchecked") -abstract class AbstractDataBufferAdapter, T, U extends DataBuffer> extends AbstractDataBuffer { +abstract class AbstractDataBufferAdapter, T, U extends DataBuffer> + extends AbstractDataBuffer { @Override public long size() { @@ -45,7 +46,7 @@ public T getObject(long index) { public U setObject(T value, long index) { Validator.setArgs(this, index); layout.writeObject(buffer, value, index * layout.scale()); - return (U)this; + return (U) this; } AbstractDataBufferAdapter(S buffer, DataLayout layout) { diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/BooleanDataBufferAdapter.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/BooleanDataBufferAdapter.java index 40217b57d6a..f32d2292423 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/BooleanDataBufferAdapter.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/BooleanDataBufferAdapter.java @@ -17,13 +17,13 @@ package org.tensorflow.ndarray.impl.buffer.adapter; -import org.tensorflow.ndarray.impl.buffer.Validator; import org.tensorflow.ndarray.buffer.BooleanDataBuffer; import org.tensorflow.ndarray.buffer.DataBuffer; import org.tensorflow.ndarray.buffer.layout.BooleanDataLayout; +import org.tensorflow.ndarray.impl.buffer.Validator; -class BooleanDataBufferAdapter> extends AbstractDataBufferAdapter - implements BooleanDataBuffer { +class BooleanDataBufferAdapter> + extends AbstractDataBufferAdapter implements BooleanDataBuffer { @Override public boolean getBoolean(long index) { @@ -60,7 +60,7 @@ public BooleanDataBuffer write(boolean[] src, int offset, int length) { public BooleanDataBuffer copyTo(DataBuffer dst, long size) { Validator.copyToArgs(this, dst, size); if (dst instanceof BooleanDataBuffer) { - BooleanDataBuffer booleanDst = (BooleanDataBuffer)dst; + BooleanDataBuffer booleanDst = (BooleanDataBuffer) dst; for (long idx = 0L; idx < size; ++idx) { booleanDst.setBoolean(getBoolean(idx), idx); } @@ -72,19 +72,20 @@ public BooleanDataBuffer copyTo(DataBuffer dst, long size) { @Override @SuppressWarnings("unchecked") public BooleanDataBuffer offset(long index) { - return new BooleanDataBufferAdapter<>((S)buffer().offset(index * layout.scale()), layout); + return new BooleanDataBufferAdapter<>((S) buffer().offset(index * layout.scale()), layout); } @Override @SuppressWarnings("unchecked") public BooleanDataBuffer narrow(long size) { - return new BooleanDataBufferAdapter<>((S)buffer().narrow(size * layout.scale()), layout); + return new BooleanDataBufferAdapter<>((S) buffer().narrow(size * layout.scale()), layout); } @Override @SuppressWarnings("unchecked") public BooleanDataBuffer slice(long index, long size) { - return new BooleanDataBufferAdapter<>((S)buffer().slice(index * layout.scale(), size * layout.scale()), layout); + return new BooleanDataBufferAdapter<>( + (S) buffer().slice(index * layout.scale(), size * layout.scale()), layout); } @Override @@ -95,7 +96,7 @@ public boolean equals(Object obj) { if (!(obj instanceof BooleanDataBuffer)) { return super.equals(obj); } - BooleanDataBuffer other = (BooleanDataBuffer)obj; + BooleanDataBuffer other = (BooleanDataBuffer) obj; if (other.size() != size()) { return false; } diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/ByteDataBufferAdapter.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/ByteDataBufferAdapter.java index c120a3ba810..e93ce3054b0 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/ByteDataBufferAdapter.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/ByteDataBufferAdapter.java @@ -1,6 +1,5 @@ package org.tensorflow.ndarray.impl.buffer.adapter; -import org.tensorflow.ndarray.impl.buffer.Validator; import org.tensorflow.ndarray.buffer.BooleanDataBuffer; import org.tensorflow.ndarray.buffer.ByteDataBuffer; import org.tensorflow.ndarray.buffer.DataBuffer; @@ -10,9 +9,10 @@ import org.tensorflow.ndarray.buffer.LongDataBuffer; import org.tensorflow.ndarray.buffer.ShortDataBuffer; import org.tensorflow.ndarray.buffer.layout.ByteDataLayout; +import org.tensorflow.ndarray.impl.buffer.Validator; -class ByteDataBufferAdapter> extends AbstractDataBufferAdapter - implements ByteDataBuffer { +class ByteDataBufferAdapter> + extends AbstractDataBufferAdapter implements ByteDataBuffer { @Override public byte getByte(long index) { @@ -49,7 +49,7 @@ public ByteDataBuffer write(byte[] src, int offset, int length) { public ByteDataBuffer copyTo(DataBuffer dst, long size) { Validator.copyToArgs(this, dst, size); if (dst instanceof ByteDataBuffer) { - ByteDataBuffer byteDst = (ByteDataBuffer)dst; + ByteDataBuffer byteDst = (ByteDataBuffer) dst; for (long idx = 0L; idx < size; ++idx) { byteDst.setByte(getByte(idx), idx); } @@ -91,19 +91,20 @@ public BooleanDataBuffer asBooleans() { @Override @SuppressWarnings("unchecked") public ByteDataBuffer offset(long index) { - return new ByteDataBufferAdapter<>((S)buffer().offset(index * layout.scale()), layout); + return new ByteDataBufferAdapter<>((S) buffer().offset(index * layout.scale()), layout); } @Override @SuppressWarnings("unchecked") public ByteDataBuffer narrow(long size) { - return new ByteDataBufferAdapter<>((S)buffer().narrow(size * layout.scale()), layout); + return new ByteDataBufferAdapter<>((S) buffer().narrow(size * layout.scale()), layout); } @Override @SuppressWarnings("unchecked") public ByteDataBuffer slice(long index, long size) { - return new ByteDataBufferAdapter<>((S)buffer().slice(index * layout.scale(), size * layout.scale()), layout); + return new ByteDataBufferAdapter<>( + (S) buffer().slice(index * layout.scale(), size * layout.scale()), layout); } @Override @@ -114,7 +115,7 @@ public boolean equals(Object obj) { if (!(obj instanceof ByteDataBuffer)) { return super.equals(obj); } - ByteDataBuffer other = (ByteDataBuffer)obj; + ByteDataBuffer other = (ByteDataBuffer) obj; if (other.size() != size()) { return false; } diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/DataBufferAdapter.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/DataBufferAdapter.java index de20ab2cfd7..3d5e98111d2 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/DataBufferAdapter.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/DataBufferAdapter.java @@ -21,24 +21,26 @@ import org.tensorflow.ndarray.buffer.layout.DataLayout; @SuppressWarnings("unchecked") -class DataBufferAdapter, T> extends AbstractDataBufferAdapter> { +class DataBufferAdapter, T> + extends AbstractDataBufferAdapter> { @Override @SuppressWarnings("unchecked") public DataBuffer offset(long index) { - return new DataBufferAdapter<>((S)buffer().offset(index * layout().scale()), layout()); + return new DataBufferAdapter<>((S) buffer().offset(index * layout().scale()), layout()); } @Override @SuppressWarnings("unchecked") public DataBuffer narrow(long size) { - return new DataBufferAdapter<>((S)buffer().narrow(size * layout().scale()), layout()); + return new DataBufferAdapter<>((S) buffer().narrow(size * layout().scale()), layout()); } @Override @SuppressWarnings("unchecked") public DataBuffer slice(long index, long size) { - return new DataBufferAdapter<>((S)buffer().slice(index * layout().scale(), size * layout().scale()), layout()); + return new DataBufferAdapter<>( + (S) buffer().slice(index * layout().scale(), size * layout().scale()), layout()); } DataBufferAdapter(S buffer, DataLayout layout) { diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/DataBufferAdapterFactory.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/DataBufferAdapterFactory.java index 468051e1b46..8b82282864e 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/DataBufferAdapterFactory.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/DataBufferAdapterFactory.java @@ -37,9 +37,9 @@ /** * Factory of data buffer adapters. * - *

Data buffer adapters are used to apply a {@link DataLayout} to a buffer. Conceptually, they act - * as a proxy that intercept each I/O call and perform the required type conversions after/before - * delegating the task to the underlying buffer. + *

Data buffer adapters are used to apply a {@link DataLayout} to a buffer. Conceptually, they + * act as a proxy that intercept each I/O call and perform the required type conversions + * after/before delegating the task to the underlying buffer. */ public class DataBufferAdapterFactory { @@ -51,7 +51,8 @@ public class DataBufferAdapterFactory { * @param the type of the buffer * @return buffer adapter */ - public static > ByteDataBuffer create(S buffer, ByteDataLayout layout) { + public static > ByteDataBuffer create( + S buffer, ByteDataLayout layout) { return new ByteDataBufferAdapter<>(buffer, layout); } @@ -63,7 +64,8 @@ public static > ByteDataBuffer create(S buffer, ByteData * @param the type of the buffer * @return buffer adapter */ - public static > BooleanDataBuffer create(S buffer, BooleanDataLayout layout) { + public static > BooleanDataBuffer create( + S buffer, BooleanDataLayout layout) { return new BooleanDataBufferAdapter<>(buffer, layout); } @@ -75,7 +77,8 @@ public static > BooleanDataBuffer create(S buffer, Boole * @param the type of the buffer * @return buffer adapter */ - public static > DoubleDataBuffer create(S buffer, DoubleDataLayout layout) { + public static > DoubleDataBuffer create( + S buffer, DoubleDataLayout layout) { return new DoubleDataBufferAdapter<>(buffer, layout); } @@ -87,7 +90,8 @@ public static > DoubleDataBuffer create(S buffer, Double * @param the type of the buffer * @return buffer adapter */ - public static > FloatDataBuffer create(S buffer, FloatDataLayout layout) { + public static > FloatDataBuffer create( + S buffer, FloatDataLayout layout) { return new FloatDataBufferAdapter<>(buffer, layout); } @@ -111,7 +115,8 @@ public static > IntDataBuffer create(S buffer, IntDataLa * @param the type of the buffer * @return buffer adapter */ - public static > LongDataBuffer create(S buffer, LongDataLayout layout) { + public static > LongDataBuffer create( + S buffer, LongDataLayout layout) { return new LongDataBufferAdapter<>(buffer, layout); } @@ -123,7 +128,8 @@ public static > LongDataBuffer create(S buffer, LongData * @param the type of the buffer * @return buffer adapter */ - public static > ShortDataBuffer create(S buffer, ShortDataLayout layout) { + public static > ShortDataBuffer create( + S buffer, ShortDataLayout layout) { return new ShortDataBufferAdapter<>(buffer, layout); } @@ -136,7 +142,8 @@ public static > ShortDataBuffer create(S buffer, ShortDa * @param the type of data returned by the layout * @return buffer adapter */ - public static , T> DataBuffer create(S buffer, DataLayout layout) { + public static , T> DataBuffer create( + S buffer, DataLayout layout) { return new DataBufferAdapter<>(buffer, layout); } } diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/DoubleDataBufferAdapter.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/DoubleDataBufferAdapter.java index 253acbac269..542b4dfe4dd 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/DoubleDataBufferAdapter.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/DoubleDataBufferAdapter.java @@ -17,13 +17,13 @@ package org.tensorflow.ndarray.impl.buffer.adapter; -import org.tensorflow.ndarray.impl.buffer.Validator; import org.tensorflow.ndarray.buffer.DataBuffer; import org.tensorflow.ndarray.buffer.DoubleDataBuffer; import org.tensorflow.ndarray.buffer.layout.DoubleDataLayout; +import org.tensorflow.ndarray.impl.buffer.Validator; -class DoubleDataBufferAdapter> extends AbstractDataBufferAdapter - implements DoubleDataBuffer { +class DoubleDataBufferAdapter> + extends AbstractDataBufferAdapter implements DoubleDataBuffer { @Override public double getDouble(long index) { @@ -60,7 +60,7 @@ public DoubleDataBuffer write(double[] src, int offset, int length) { public DoubleDataBuffer copyTo(DataBuffer dst, long size) { Validator.copyToArgs(this, dst, size); if (dst instanceof DoubleDataBuffer) { - DoubleDataBuffer doubleDst = (DoubleDataBuffer)dst; + DoubleDataBuffer doubleDst = (DoubleDataBuffer) dst; for (long idx = 0L; idx < size; ++idx) { doubleDst.setDouble(getDouble(idx), idx); } @@ -72,19 +72,20 @@ public DoubleDataBuffer copyTo(DataBuffer dst, long size) { @Override @SuppressWarnings("unchecked") public DoubleDataBuffer offset(long index) { - return new DoubleDataBufferAdapter<>((S)buffer().offset(index * layout.scale()), layout); + return new DoubleDataBufferAdapter<>((S) buffer().offset(index * layout.scale()), layout); } @Override @SuppressWarnings("unchecked") public DoubleDataBuffer narrow(long size) { - return new DoubleDataBufferAdapter<>((S)buffer().narrow(size * layout.scale()), layout); + return new DoubleDataBufferAdapter<>((S) buffer().narrow(size * layout.scale()), layout); } @Override @SuppressWarnings("unchecked") public DoubleDataBuffer slice(long index, long size) { - return new DoubleDataBufferAdapter<>((S)buffer().slice(index * layout.scale(), size * layout.scale()), layout); + return new DoubleDataBufferAdapter<>( + (S) buffer().slice(index * layout.scale(), size * layout.scale()), layout); } @Override @@ -95,7 +96,7 @@ public boolean equals(Object obj) { if (!(obj instanceof DoubleDataBuffer)) { return super.equals(obj); } - DoubleDataBuffer other = (DoubleDataBuffer)obj; + DoubleDataBuffer other = (DoubleDataBuffer) obj; if (other.size() != size()) { return false; } diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/FloatDataBufferAdapter.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/FloatDataBufferAdapter.java index 69928bf0ccb..2c581f4b1e0 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/FloatDataBufferAdapter.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/FloatDataBufferAdapter.java @@ -17,13 +17,13 @@ package org.tensorflow.ndarray.impl.buffer.adapter; -import org.tensorflow.ndarray.impl.buffer.Validator; import org.tensorflow.ndarray.buffer.DataBuffer; import org.tensorflow.ndarray.buffer.FloatDataBuffer; import org.tensorflow.ndarray.buffer.layout.FloatDataLayout; +import org.tensorflow.ndarray.impl.buffer.Validator; -class FloatDataBufferAdapter> extends AbstractDataBufferAdapter - implements FloatDataBuffer { +class FloatDataBufferAdapter> + extends AbstractDataBufferAdapter implements FloatDataBuffer { @Override public float getFloat(long index) { @@ -60,7 +60,7 @@ public FloatDataBuffer write(float[] src, int offset, int length) { public FloatDataBuffer copyTo(DataBuffer dst, long size) { Validator.copyToArgs(this, dst, size); if (dst instanceof FloatDataBuffer) { - FloatDataBuffer floatDst = (FloatDataBuffer)dst; + FloatDataBuffer floatDst = (FloatDataBuffer) dst; for (long idx = 0L; idx < size; ++idx) { floatDst.setFloat(getFloat(idx), idx); } @@ -72,19 +72,20 @@ public FloatDataBuffer copyTo(DataBuffer dst, long size) { @Override @SuppressWarnings("unchecked") public FloatDataBuffer offset(long index) { - return new FloatDataBufferAdapter<>((S)buffer().offset(index * layout.scale()), layout); + return new FloatDataBufferAdapter<>((S) buffer().offset(index * layout.scale()), layout); } @Override @SuppressWarnings("unchecked") public FloatDataBuffer narrow(long size) { - return new FloatDataBufferAdapter<>((S)buffer().narrow(size * layout.scale()), layout); + return new FloatDataBufferAdapter<>((S) buffer().narrow(size * layout.scale()), layout); } @Override @SuppressWarnings("unchecked") public FloatDataBuffer slice(long index, long size) { - return new FloatDataBufferAdapter<>((S)buffer().slice(index * layout.scale(), size * layout.scale()), layout); + return new FloatDataBufferAdapter<>( + (S) buffer().slice(index * layout.scale(), size * layout.scale()), layout); } @Override @@ -95,7 +96,7 @@ public boolean equals(Object obj) { if (!(obj instanceof FloatDataBuffer)) { return super.equals(obj); } - FloatDataBuffer other = (FloatDataBuffer)obj; + FloatDataBuffer other = (FloatDataBuffer) obj; if (other.size() != size()) { return false; } diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/IntDataBufferAdapter.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/IntDataBufferAdapter.java index 052b63fe0f3..7a93d52e6a7 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/IntDataBufferAdapter.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/IntDataBufferAdapter.java @@ -17,13 +17,13 @@ package org.tensorflow.ndarray.impl.buffer.adapter; -import org.tensorflow.ndarray.impl.buffer.Validator; import org.tensorflow.ndarray.buffer.DataBuffer; import org.tensorflow.ndarray.buffer.IntDataBuffer; import org.tensorflow.ndarray.buffer.layout.IntDataLayout; +import org.tensorflow.ndarray.impl.buffer.Validator; -class IntDataBufferAdapter> extends AbstractDataBufferAdapter - implements IntDataBuffer { +class IntDataBufferAdapter> + extends AbstractDataBufferAdapter implements IntDataBuffer { @Override public int getInt(long index) { @@ -60,7 +60,7 @@ public IntDataBuffer write(int[] src, int offset, int length) { public IntDataBuffer copyTo(DataBuffer dst, long size) { Validator.copyToArgs(this, dst, size); if (dst instanceof IntDataBuffer) { - IntDataBuffer intDst = (IntDataBuffer)dst; + IntDataBuffer intDst = (IntDataBuffer) dst; for (long idx = 0L; idx < size; ++idx) { intDst.setInt(getInt(idx), idx); } @@ -72,19 +72,20 @@ public IntDataBuffer copyTo(DataBuffer dst, long size) { @Override @SuppressWarnings("unchecked") public IntDataBuffer offset(long index) { - return new IntDataBufferAdapter<>((S)buffer().offset(index * layout.scale()), layout); + return new IntDataBufferAdapter<>((S) buffer().offset(index * layout.scale()), layout); } @Override @SuppressWarnings("unchecked") public IntDataBuffer narrow(long size) { - return new IntDataBufferAdapter<>((S)buffer().narrow(size * layout.scale()), layout); + return new IntDataBufferAdapter<>((S) buffer().narrow(size * layout.scale()), layout); } @Override @SuppressWarnings("unchecked") public IntDataBuffer slice(long index, long size) { - return new IntDataBufferAdapter<>((S)buffer().slice(index * layout.scale(), size * layout.scale()), layout); + return new IntDataBufferAdapter<>( + (S) buffer().slice(index * layout.scale(), size * layout.scale()), layout); } @Override @@ -95,7 +96,7 @@ public boolean equals(Object obj) { if (!(obj instanceof IntDataBuffer)) { return super.equals(obj); } - IntDataBuffer other = (IntDataBuffer)obj; + IntDataBuffer other = (IntDataBuffer) obj; if (other.size() != size()) { return false; } diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/LongDataBufferAdapter.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/LongDataBufferAdapter.java index aea154d4b9f..db31050b02f 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/LongDataBufferAdapter.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/LongDataBufferAdapter.java @@ -17,13 +17,13 @@ package org.tensorflow.ndarray.impl.buffer.adapter; -import org.tensorflow.ndarray.impl.buffer.Validator; import org.tensorflow.ndarray.buffer.DataBuffer; import org.tensorflow.ndarray.buffer.LongDataBuffer; import org.tensorflow.ndarray.buffer.layout.LongDataLayout; +import org.tensorflow.ndarray.impl.buffer.Validator; -class LongDataBufferAdapter> extends AbstractDataBufferAdapter - implements LongDataBuffer { +class LongDataBufferAdapter> + extends AbstractDataBufferAdapter implements LongDataBuffer { @Override public long getLong(long index) { @@ -60,7 +60,7 @@ public LongDataBuffer write(long[] src, int offset, int length) { public LongDataBuffer copyTo(DataBuffer dst, long size) { Validator.copyToArgs(this, dst, size); if (dst instanceof LongDataBuffer) { - LongDataBuffer longDst = (LongDataBuffer)dst; + LongDataBuffer longDst = (LongDataBuffer) dst; for (long idx = 0L; idx < size; ++idx) { longDst.setLong(getLong(idx), idx); } @@ -72,19 +72,20 @@ public LongDataBuffer copyTo(DataBuffer dst, long size) { @Override @SuppressWarnings("unchecked") public LongDataBuffer offset(long index) { - return new LongDataBufferAdapter<>((S)buffer().offset(index * layout.scale()), layout); + return new LongDataBufferAdapter<>((S) buffer().offset(index * layout.scale()), layout); } @Override @SuppressWarnings("unchecked") public LongDataBuffer narrow(long size) { - return new LongDataBufferAdapter<>((S)buffer().narrow(size * layout.scale()), layout); + return new LongDataBufferAdapter<>((S) buffer().narrow(size * layout.scale()), layout); } @Override @SuppressWarnings("unchecked") public LongDataBuffer slice(long index, long size) { - return new LongDataBufferAdapter<>((S)buffer().slice(index * layout.scale(), size * layout.scale()), layout); + return new LongDataBufferAdapter<>( + (S) buffer().slice(index * layout.scale(), size * layout.scale()), layout); } @Override @@ -95,7 +96,7 @@ public boolean equals(Object obj) { if (!(obj instanceof LongDataBuffer)) { return super.equals(obj); } - LongDataBuffer other = (LongDataBuffer)obj; + LongDataBuffer other = (LongDataBuffer) obj; if (other.size() != size()) { return false; } diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/ShortDataBufferAdapter.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/ShortDataBufferAdapter.java index 6b6b1bb24b7..001b31ef176 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/ShortDataBufferAdapter.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/ShortDataBufferAdapter.java @@ -17,13 +17,13 @@ package org.tensorflow.ndarray.impl.buffer.adapter; -import org.tensorflow.ndarray.impl.buffer.Validator; import org.tensorflow.ndarray.buffer.DataBuffer; import org.tensorflow.ndarray.buffer.ShortDataBuffer; import org.tensorflow.ndarray.buffer.layout.ShortDataLayout; +import org.tensorflow.ndarray.impl.buffer.Validator; -class ShortDataBufferAdapter> extends AbstractDataBufferAdapter - implements ShortDataBuffer { +class ShortDataBufferAdapter> + extends AbstractDataBufferAdapter implements ShortDataBuffer { @Override public short getShort(long index) { @@ -60,7 +60,7 @@ public ShortDataBuffer write(short[] src, int offset, int length) { public ShortDataBuffer copyTo(DataBuffer dst, long size) { Validator.copyToArgs(this, dst, size); if (dst instanceof ShortDataBuffer) { - ShortDataBuffer shortDst = (ShortDataBuffer)dst; + ShortDataBuffer shortDst = (ShortDataBuffer) dst; for (long idx = 0L; idx < size; ++idx) { shortDst.setShort(getShort(idx), idx); } @@ -72,19 +72,20 @@ public ShortDataBuffer copyTo(DataBuffer dst, long size) { @Override @SuppressWarnings("unchecked") public ShortDataBuffer offset(long index) { - return new ShortDataBufferAdapter<>((S)buffer().offset(index * layout.scale()), layout); + return new ShortDataBufferAdapter<>((S) buffer().offset(index * layout.scale()), layout); } @Override @SuppressWarnings("unchecked") public ShortDataBuffer narrow(long size) { - return new ShortDataBufferAdapter<>((S)buffer().narrow(size * layout.scale()), layout); + return new ShortDataBufferAdapter<>((S) buffer().narrow(size * layout.scale()), layout); } @Override @SuppressWarnings("unchecked") public ShortDataBuffer slice(long index, long size) { - return new ShortDataBufferAdapter<>((S)buffer().slice(index * layout.scale(), size * layout.scale()), layout); + return new ShortDataBufferAdapter<>( + (S) buffer().slice(index * layout.scale(), size * layout.scale()), layout); } @Override @@ -95,7 +96,7 @@ public boolean equals(Object obj) { if (!(obj instanceof ShortDataBuffer)) { return super.equals(obj); } - ShortDataBuffer other = (ShortDataBuffer)obj; + ShortDataBuffer other = (ShortDataBuffer) obj; if (other.size() != size()) { return false; } diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/Bfloat16Layout.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/Bfloat16Layout.java index 3f8171088cb..444e7f8f674 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/Bfloat16Layout.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/Bfloat16Layout.java @@ -44,11 +44,11 @@ public float readFloat(ShortDataBuffer buffer, long index) { // VisibleForTesting static short float32to16(float f32) { - return (short)(Float.floatToIntBits(f32) >>> 16); + return (short) (Float.floatToIntBits(f32) >>> 16); } // Visible for testing static float float16to32(short i16) { - return Float.intBitsToFloat((int)i16 << 16); + return Float.intBitsToFloat((int) i16 << 16); } } diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/BoolLayout.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/BoolLayout.java index 0358d60d662..ea76aafb823 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/BoolLayout.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/BoolLayout.java @@ -20,9 +20,7 @@ import org.tensorflow.ndarray.buffer.ByteDataBuffer; import org.tensorflow.ndarray.buffer.layout.BooleanDataLayout; -/** - * Data layout that converts booleans from/to bytes. - */ +/** Data layout that converts booleans from/to bytes. */ public final class BoolLayout implements BooleanDataLayout { @Override @@ -37,7 +35,7 @@ public boolean readBoolean(ByteDataBuffer buffer, long index) { // Visible for testing static byte booleanToByte(boolean b) { - return (byte)(b ? 0x1 : 0x0); + return (byte) (b ? 0x1 : 0x0); } // Visible for testing diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/Float16Layout.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/Float16Layout.java index b19744bbd13..7d7a32ad203 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/Float16Layout.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/Float16Layout.java @@ -21,8 +21,8 @@ import org.tensorflow.ndarray.buffer.layout.FloatDataLayout; /** - * Data layout that converts 32-bit floats from/to 16-bit, accordingly to the IEEE-754 half-precision - * floating point specification. + * Data layout that converts 32-bit floats from/to 16-bit, accordingly to the IEEE-754 + * half-precision floating point specification. */ public final class Float16Layout implements FloatDataLayout { @@ -58,25 +58,27 @@ static short float32to16(float f32) { // - else, float16 value is forced to infinite (0x7c00) i16 = i32 > E32MASK ? 0x7E00 : 0x7C00; - } else if (i32 < (E32BIAS + E16MIN) << E32SHIFT){ + } else if (i32 < (E32BIAS + E16MIN) << E32SHIFT) { // float32 abs value is smaller than float16 min abs value (min16 = 2^-14), could also be 0 - // - apply magic number to align significand 10 bits at the bottom on the float and subtract bias + // - apply magic number to align significand 10 bits at the bottom on the float and subtract + // bias i16 = Float.floatToIntBits(Float.intBitsToFloat(i32) + MAGIC_32_16_FLOAT) - MAGIC_32_16; } else { - // float32 value can be rounded up to a normalized float16 value (i.e. exp32 = [113(-14), 142(15)]) + // float32 value can be rounded up to a normalized float16 value (i.e. exp32 = [113(-14), + // 142(15)]) // - rebase exponent to float16 // - round up significand to the 13nd bit if s16 is even, on the 12nd bit if it is odd int round = 0xFFF + ((i32 >>> 13) & 0x1); i16 = (i32 + ((E16BIAS - E32BIAS) << E32SHIFT) + round) >>> 13; } - return (short)(i16 | sign16); + return (short) (i16 | sign16); } // Visible for testing static float float16to32(short i16) { - int i32 = (i16 & 0x7FFF) << (S32BITS - S16BITS); // remove sign and align in float32 - i32 += (E32BIAS - E16BIAS) << E32SHIFT; // rebase exponent to float32 + int i32 = (i16 & 0x7FFF) << (S32BITS - S16BITS); // remove sign and align in float32 + i32 += (E32BIAS - E16BIAS) << E32SHIFT; // rebase exponent to float32 // Handle float16 exponent special cases switch (i16 & E16MASK) { @@ -94,25 +96,26 @@ static float float16to32(short i16) { default: break; } - return Float.intBitsToFloat(i32 | ((i16 & 0x8000) << 16)); // reapply sign + return Float.intBitsToFloat(i32 | ((i16 & 0x8000) << 16)); // reapply sign } // float32 format - private static final int E32SHIFT = 23; // position of the exponent in float32 - private static final int E32MASK = 0xFF << E32SHIFT; // mask for float32 exponent (== Infinity) - private static final int E32BIAS = 127; // exponent bias for float32 - private static final int S32BITS = 23; // number of bits in float32 significand + private static final int E32SHIFT = 23; // position of the exponent in float32 + private static final int E32MASK = 0xFF << E32SHIFT; // mask for float32 exponent (== Infinity) + private static final int E32BIAS = 127; // exponent bias for float32 + private static final int S32BITS = 23; // number of bits in float32 significand // float16 format - private static final int E16SHIFT = 10; // position of the exponent in float16 - private static final int E16MASK = 0x1F << E16SHIFT; // mask for float16 exponent (== Infinity) - private static final int E16BIAS = 15; // exponent bias for float16 - private static final int E16MAX = 15; // max value for float16 exponent - private static final int E16MIN = -14; // min value for float16 exponent - private static final int S16BITS = 10; // number of bits in float16 significand + private static final int E16SHIFT = 10; // position of the exponent in float16 + private static final int E16MASK = 0x1F << E16SHIFT; // mask for float16 exponent (== Infinity) + private static final int E16BIAS = 15; // exponent bias for float16 + private static final int E16MAX = 15; // max value for float16 exponent + private static final int E16MIN = -14; // min value for float16 exponent + private static final int S16BITS = 10; // number of bits in float16 significand // magic numbers used when converting denormalized values - private static final int MAGIC_32_16 = ((E32BIAS - E16BIAS) + (S32BITS - S16BITS) + 1) << E32SHIFT; + private static final int MAGIC_32_16 = + ((E32BIAS - E16BIAS) + (S32BITS - S16BITS) + 1) << E32SHIFT; private static final float MAGIC_32_16_FLOAT = Float.intBitsToFloat(MAGIC_32_16); private static final int MAGIC_16_32 = (E32BIAS - E16BIAS + 1) << E32SHIFT; private static final float MAGIC_16_32_FLOAT = Float.intBitsToFloat(MAGIC_16_32); diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/StringLayout.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/StringLayout.java index 51576c0100b..e77427bd4e8 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/StringLayout.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/StringLayout.java @@ -21,9 +21,7 @@ import org.tensorflow.ndarray.buffer.DataBuffer; import org.tensorflow.ndarray.buffer.layout.DataLayout; -/** - * Data layout that converts a String to/from a sequence of bytes applying a given charset. - */ +/** Data layout that converts a String to/from a sequence of bytes applying a given charset. */ public final class StringLayout implements DataLayout, String> { public static StringLayout of(Charset charset) { diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/ArrayDataBuffer.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/ArrayDataBuffer.java index 676e291357a..1a26843713f 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/ArrayDataBuffer.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/ArrayDataBuffer.java @@ -1,26 +1,26 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.buffer.misc; import java.util.Arrays; -import org.tensorflow.ndarray.impl.buffer.AbstractDataBuffer; -import org.tensorflow.ndarray.impl.buffer.Validator; import org.tensorflow.ndarray.buffer.DataBuffer; import org.tensorflow.ndarray.buffer.DataStorageVisitor; +import org.tensorflow.ndarray.impl.buffer.AbstractDataBuffer; +import org.tensorflow.ndarray.impl.buffer.Validator; class ArrayDataBuffer extends AbstractDataBuffer { @@ -37,41 +37,42 @@ public boolean isReadOnly() { @Override public T getObject(long index) { Validator.getArgs(this, index); - return values[(int)index + offset]; + return values[(int) index + offset]; } @Override public DataBuffer setObject(T value, long index) { Validator.setArgs(this, index); - values[(int)index + offset] = value; + values[(int) index + offset] = value; return this; } @Override public DataBuffer copyTo(DataBuffer dst, long size) { Validator.copyToArgs(this, dst, size); - return dst.accept(new DataStorageVisitor>() { - - @Override - public DataBuffer visit(Object[] array, int arrayOffset, int arrayLength) { - System.arraycopy(values, offset, array, arrayOffset, (int)size); - return ArrayDataBuffer.this; - } - - @Override - public DataBuffer fallback() { - for (int idx = 0; idx < size; ++idx) { - dst.setObject(values[idx + offset], idx); - } - return ArrayDataBuffer.this; - } - }); + return dst.accept( + new DataStorageVisitor>() { + + @Override + public DataBuffer visit(Object[] array, int arrayOffset, int arrayLength) { + System.arraycopy(values, offset, array, arrayOffset, (int) size); + return ArrayDataBuffer.this; + } + + @Override + public DataBuffer fallback() { + for (int idx = 0; idx < size; ++idx) { + dst.setObject(values[idx + offset], idx); + } + return ArrayDataBuffer.this; + } + }); } @Override public DataBuffer slice(long index, long size) { Validator.sliceArgs(this, index, size); - return new ArrayDataBuffer<>(values, readOnly, offset + (int)index, (int)size); + return new ArrayDataBuffer<>(values, readOnly, offset + (int) index, (int) size); } @Override @@ -87,25 +88,29 @@ public boolean equals(Object obj) { if (!(obj instanceof DataBuffer)) { return false; } - DataBuffer other = (DataBuffer)obj; + DataBuffer other = (DataBuffer) obj; if (size() != other.size()) { return false; } - return other.accept(new DataStorageVisitor() { - - @Override - public Boolean visit(Object[] array, int arrayOffset, int arrayLength) { - if (offset == 0 && values.length == length && arrayOffset == 0 && array.length == arrayLength) { - return Arrays.deepEquals(array, values); - } - return slowEquals(other); - } - - @Override - public Boolean fallback() { - return slowEquals(other); - } - }); + return other.accept( + new DataStorageVisitor() { + + @Override + public Boolean visit(Object[] array, int arrayOffset, int arrayLength) { + if (offset == 0 + && values.length == length + && arrayOffset == 0 + && array.length == arrayLength) { + return Arrays.deepEquals(array, values); + } + return slowEquals(other); + } + + @Override + public Boolean fallback() { + return slowEquals(other); + } + }); } ArrayDataBuffer(T[] values, boolean readOnly) { @@ -118,7 +123,7 @@ private ArrayDataBuffer(T[] values, boolean readOnly, int offset, int length) { this.offset = offset; this.length = length; } - + private final T[] values; private final boolean readOnly; private final int offset; diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BitSetDataBuffer.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BitSetDataBuffer.java index 5b5ec15294b..62b658f7cf4 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BitSetDataBuffer.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BitSetDataBuffer.java @@ -18,11 +18,11 @@ package org.tensorflow.ndarray.impl.buffer.misc; import java.util.BitSet; -import org.tensorflow.ndarray.impl.buffer.AbstractDataBuffer; -import org.tensorflow.ndarray.impl.buffer.Validator; import org.tensorflow.ndarray.buffer.BooleanDataBuffer; import org.tensorflow.ndarray.buffer.DataBuffer; import org.tensorflow.ndarray.buffer.DataStorageVisitor; +import org.tensorflow.ndarray.impl.buffer.AbstractDataBuffer; +import org.tensorflow.ndarray.impl.buffer.Validator; class BitSetDataBuffer extends AbstractDataBuffer implements BooleanDataBuffer { @@ -39,13 +39,13 @@ public boolean isReadOnly() { @Override public boolean getBoolean(long index) { Validator.getArgs(this, index); - return bitSet.get((int)index + offset); + return bitSet.get((int) index + offset); } @Override public BooleanDataBuffer setBoolean(boolean value, long index) { Validator.setArgs(this, index); - bitSet.set((int)index + offset, value); + bitSet.set((int) index + offset, value); return this; } @@ -70,45 +70,46 @@ public BooleanDataBuffer write(boolean[] src, int offset, int length) { @Override public BooleanDataBuffer copyTo(DataBuffer dst, long size) { Validator.copyToArgs(this, dst, size); - return dst.accept(new DataStorageVisitor() { - - @Override - public BooleanDataBuffer visit(boolean[] array, int arrayOffset, int arrayLength) { - for (int idx = 0; idx < size; ++idx) { - array[idx + arrayOffset] = bitSet.get(idx + offset); - } - return BitSetDataBuffer.this; - } - - @Override - public BooleanDataBuffer visit(BitSet dstBitSet, int dstOffset, long numBits) { - for (int idx = 0; idx < size; ++idx) { - dstBitSet.set(idx + dstOffset, bitSet.get(idx + offset)); - } - return BitSetDataBuffer.this; - } - - @Override - public BooleanDataBuffer fallback() { - if (dst instanceof BooleanDataBuffer) { - BooleanDataBuffer booleanDst = (BooleanDataBuffer)dst; - for (int idx = 0; idx < size; ++idx) { - booleanDst.setBoolean(bitSet.get(idx + offset), idx); + return dst.accept( + new DataStorageVisitor() { + + @Override + public BooleanDataBuffer visit(boolean[] array, int arrayOffset, int arrayLength) { + for (int idx = 0; idx < size; ++idx) { + array[idx + arrayOffset] = bitSet.get(idx + offset); + } + return BitSetDataBuffer.this; + } + + @Override + public BooleanDataBuffer visit(BitSet dstBitSet, int dstOffset, long numBits) { + for (int idx = 0; idx < size; ++idx) { + dstBitSet.set(idx + dstOffset, bitSet.get(idx + offset)); + } + return BitSetDataBuffer.this; } - } else { - for (int idx = 0; idx < size; ++idx) { - dst.setObject(bitSet.get(idx + offset), idx); + + @Override + public BooleanDataBuffer fallback() { + if (dst instanceof BooleanDataBuffer) { + BooleanDataBuffer booleanDst = (BooleanDataBuffer) dst; + for (int idx = 0; idx < size; ++idx) { + booleanDst.setBoolean(bitSet.get(idx + offset), idx); + } + } else { + for (int idx = 0; idx < size; ++idx) { + dst.setObject(bitSet.get(idx + offset), idx); + } + } + return BitSetDataBuffer.this; } - } - return BitSetDataBuffer.this; - } - }); + }); } @Override public BooleanDataBuffer slice(long index, long size) { Validator.sliceArgs(this, index, size); - return new BitSetDataBuffer(bitSet, size, readOnly, offset + (int)index); + return new BitSetDataBuffer(bitSet, size, readOnly, offset + (int) index); } @Override @@ -124,45 +125,46 @@ public boolean equals(Object obj) { if (!(obj instanceof BooleanDataBuffer)) { return super.equals(obj); } - BooleanDataBuffer other = (BooleanDataBuffer)obj; + BooleanDataBuffer other = (BooleanDataBuffer) obj; if (size() != other.size()) { return false; } - return other.accept(new DataStorageVisitor() { - - @Override - public Boolean visit(boolean[] array, int arrayOffset, int length) { - for (int idx = 0; idx < size(); ++idx) { - if (array[idx + arrayOffset] != bitSet.get(idx + offset)) { - return false; + return other.accept( + new DataStorageVisitor() { + + @Override + public Boolean visit(boolean[] array, int arrayOffset, int length) { + for (int idx = 0; idx < size(); ++idx) { + if (array[idx + arrayOffset] != bitSet.get(idx + offset)) { + return false; + } + } + return true; } - } - return true; - } - - @Override - public Boolean visit(BitSet otherBitSet, int otherOffset, long otherNumBits) { - if (offset == 0 && otherOffset == 0 && numBits == otherNumBits) { - return bitSet.equals(otherBitSet); - } - for (int idx = 0; idx < size(); ++idx) { - if (otherBitSet.get(idx + otherOffset) != bitSet.get(idx + offset)) { - return false; + + @Override + public Boolean visit(BitSet otherBitSet, int otherOffset, long otherNumBits) { + if (offset == 0 && otherOffset == 0 && numBits == otherNumBits) { + return bitSet.equals(otherBitSet); + } + for (int idx = 0; idx < size(); ++idx) { + if (otherBitSet.get(idx + otherOffset) != bitSet.get(idx + offset)) { + return false; + } + } + return true; } - } - return true; - } - - @Override - public Boolean fallback() { - for (int idx = 0; idx < size(); ++idx) { - if (other.getBoolean(idx) != bitSet.get(idx + offset)) { - return false; + + @Override + public Boolean fallback() { + for (int idx = 0; idx < size(); ++idx) { + if (other.getBoolean(idx) != bitSet.get(idx + offset)) { + return false; + } + } + return true; } - } - return true; - } - }); + }); } BitSetDataBuffer(BitSet bitSet, long numBits, boolean readOnly) { diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BooleanArrayDataBuffer.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BooleanArrayDataBuffer.java index f8d033519ec..ac1715a7d27 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BooleanArrayDataBuffer.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BooleanArrayDataBuffer.java @@ -1,31 +1,30 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.buffer.misc; import java.util.Arrays; import java.util.BitSet; -import org.tensorflow.ndarray.impl.buffer.AbstractDataBuffer; -import org.tensorflow.ndarray.impl.buffer.Validator; import org.tensorflow.ndarray.buffer.BooleanDataBuffer; import org.tensorflow.ndarray.buffer.DataBuffer; import org.tensorflow.ndarray.buffer.DataStorageVisitor; +import org.tensorflow.ndarray.impl.buffer.AbstractDataBuffer; +import org.tensorflow.ndarray.impl.buffer.Validator; -class BooleanArrayDataBuffer extends AbstractDataBuffer implements - BooleanDataBuffer { +class BooleanArrayDataBuffer extends AbstractDataBuffer implements BooleanDataBuffer { @Override public long size() { @@ -40,13 +39,13 @@ public boolean isReadOnly() { @Override public boolean getBoolean(long index) { Validator.getArgs(this, index); - return values[(int)index + offset]; + return values[(int) index + offset]; } @Override public BooleanDataBuffer setBoolean(boolean value, long index) { Validator.setArgs(this, index); - values[(int)index + offset] = value; + values[(int) index + offset] = value; return this; } @@ -65,43 +64,44 @@ public BooleanDataBuffer write(boolean[] src, int offset, int length) { @Override public BooleanDataBuffer copyTo(DataBuffer dst, long size) { Validator.copyToArgs(this, dst, size); - return dst.accept(new DataStorageVisitor() { - - @Override - public BooleanDataBuffer visit(boolean[] array, int arrayOffset, int arrayLength) { - System.arraycopy(values, offset, array, arrayOffset, (int)size); - return BooleanArrayDataBuffer.this; - } - - @Override - public BooleanDataBuffer visit(BitSet bitSet, int bitSetOffset, long numBits) { - for (int idx = 0; idx < size; ++idx) { - bitSet.set(idx + bitSetOffset, values[idx + offset]); - } - return BooleanArrayDataBuffer.this; - } - - @Override - public BooleanDataBuffer fallback() { - if (dst instanceof BooleanDataBuffer) { - BooleanDataBuffer booleanDst = (BooleanDataBuffer)dst; - for (int idx = 0; idx < size; ++idx) { - booleanDst.setBoolean(values[idx + offset], idx); + return dst.accept( + new DataStorageVisitor() { + + @Override + public BooleanDataBuffer visit(boolean[] array, int arrayOffset, int arrayLength) { + System.arraycopy(values, offset, array, arrayOffset, (int) size); + return BooleanArrayDataBuffer.this; } - } else { - for (int idx = 0; idx < size; ++idx) { - dst.setObject(values[idx + offset], idx); + + @Override + public BooleanDataBuffer visit(BitSet bitSet, int bitSetOffset, long numBits) { + for (int idx = 0; idx < size; ++idx) { + bitSet.set(idx + bitSetOffset, values[idx + offset]); + } + return BooleanArrayDataBuffer.this; } - } - return BooleanArrayDataBuffer.this; - } - }); + + @Override + public BooleanDataBuffer fallback() { + if (dst instanceof BooleanDataBuffer) { + BooleanDataBuffer booleanDst = (BooleanDataBuffer) dst; + for (int idx = 0; idx < size; ++idx) { + booleanDst.setBoolean(values[idx + offset], idx); + } + } else { + for (int idx = 0; idx < size; ++idx) { + dst.setObject(values[idx + offset], idx); + } + } + return BooleanArrayDataBuffer.this; + } + }); } @Override public BooleanDataBuffer slice(long index, long size) { Validator.sliceArgs(this, index, size); - return new BooleanArrayDataBuffer(values, readOnly, offset + (int)index, (int)size); + return new BooleanArrayDataBuffer(values, readOnly, offset + (int) index, (int) size); } @Override @@ -117,45 +117,49 @@ public boolean equals(Object obj) { if (!(obj instanceof BooleanDataBuffer)) { return super.equals(obj); } - BooleanDataBuffer other = (BooleanDataBuffer)obj; + BooleanDataBuffer other = (BooleanDataBuffer) obj; if (size() != other.size()) { return false; } - return other.accept(new DataStorageVisitor() { - - @Override - public Boolean visit(boolean[] array, int arrayOffset, int arrayLength) { - if (offset == 0 && values.length == length && arrayOffset == 0 && array.length == arrayLength) { - return Arrays.equals(array, values); - } - for (int idx = 0; idx < size(); ++idx) { - if (array[idx + arrayOffset] != values[idx + offset]) { - return false; + return other.accept( + new DataStorageVisitor() { + + @Override + public Boolean visit(boolean[] array, int arrayOffset, int arrayLength) { + if (offset == 0 + && values.length == length + && arrayOffset == 0 + && array.length == arrayLength) { + return Arrays.equals(array, values); + } + for (int idx = 0; idx < size(); ++idx) { + if (array[idx + arrayOffset] != values[idx + offset]) { + return false; + } + } + return true; } - } - return true; - } - - @Override - public Boolean visit(BitSet bitSet, int bitSetOffset, long numBits) { - for (int idx = 0; idx < size(); ++idx) { - if (bitSet.get(idx + bitSetOffset) != values[idx + offset]) { - return false; + + @Override + public Boolean visit(BitSet bitSet, int bitSetOffset, long numBits) { + for (int idx = 0; idx < size(); ++idx) { + if (bitSet.get(idx + bitSetOffset) != values[idx + offset]) { + return false; + } + } + return true; } - } - return true; - } - - @Override - public Boolean fallback() { - for (int idx = 0; idx < size(); ++idx) { - if (other.getBoolean(idx) != values[idx + offset]) { - return false; + + @Override + public Boolean fallback() { + for (int idx = 0; idx < size(); ++idx) { + if (other.getBoolean(idx) != values[idx + offset]) { + return false; + } + } + return true; } - } - return true; - } - }); + }); } BooleanArrayDataBuffer(boolean[] values, boolean readOnly) { @@ -168,7 +172,7 @@ private BooleanArrayDataBuffer(boolean[] values, boolean readOnly, int offset, i this.offset = offset; this.length = length; } - + private final boolean[] values; private final boolean readOnly; private final int offset; diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/MiscDataBufferFactory.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/MiscDataBufferFactory.java index 84cfce6bc66..73bbaa2d3d3 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/MiscDataBufferFactory.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/MiscDataBufferFactory.java @@ -21,9 +21,7 @@ import org.tensorflow.ndarray.buffer.BooleanDataBuffer; import org.tensorflow.ndarray.buffer.DataBuffer; -/** - * Factory of miscellaneous data buffers - */ +/** Factory of miscellaneous data buffers */ public class MiscDataBufferFactory { public static BooleanDataBuffer create(BitSet bitSet, long numBits, boolean readOnly) { @@ -34,7 +32,7 @@ public static BooleanDataBuffer create(boolean[] array, boolean readOnly) { return new BooleanArrayDataBuffer(array, readOnly); } - public static DataBuffer create(T[] array, boolean readOnly) { + public static DataBuffer create(T[] array, boolean readOnly) { return new ArrayDataBuffer<>(array, readOnly); } } diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/AbstractNioDataBuffer.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/AbstractNioDataBuffer.java index 82bc981ad46..3709b97008c 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/AbstractNioDataBuffer.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/AbstractNioDataBuffer.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.buffer.nio; @@ -22,7 +22,7 @@ /** * Base class for all JDK-based data buffers. - * + * * @param type of elements (or values) stored in this buffer */ abstract class AbstractNioDataBuffer extends AbstractDataBuffer { diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/ByteNioDataBuffer.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/ByteNioDataBuffer.java index 5ede97cef78..9263286ddb4 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/ByteNioDataBuffer.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/ByteNioDataBuffer.java @@ -1,25 +1,23 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.buffer.nio; import java.nio.ByteBuffer; -import org.tensorflow.ndarray.impl.buffer.Validator; -import org.tensorflow.ndarray.impl.buffer.adapter.DataBufferAdapterFactory; import org.tensorflow.ndarray.buffer.BooleanDataBuffer; import org.tensorflow.ndarray.buffer.ByteDataBuffer; import org.tensorflow.ndarray.buffer.DataBuffer; @@ -30,21 +28,20 @@ import org.tensorflow.ndarray.buffer.LongDataBuffer; import org.tensorflow.ndarray.buffer.ShortDataBuffer; import org.tensorflow.ndarray.buffer.layout.DataLayouts; +import org.tensorflow.ndarray.impl.buffer.Validator; +import org.tensorflow.ndarray.impl.buffer.adapter.DataBufferAdapterFactory; -/** - * A buffer of bytes using a JDK {@link ByteBuffer} for storage. - */ -final class ByteNioDataBuffer extends AbstractNioDataBuffer - implements ByteDataBuffer { +/** A buffer of bytes using a JDK {@link ByteBuffer} for storage. */ +final class ByteNioDataBuffer extends AbstractNioDataBuffer implements ByteDataBuffer { @Override public byte getByte(long index) { - return buf.get((int)index); + return buf.get((int) index); } @Override public ByteDataBuffer setByte(byte value, long index) { - buf.put((int)index, value); + buf.put((int) index, value); return this; } @@ -63,26 +60,27 @@ public ByteDataBuffer write(byte[] src, int offset, int length) { @Override public ByteDataBuffer copyTo(DataBuffer dst, long size) { Validator.copyToArgs(this, dst, size); - return dst.accept(new DataStorageVisitor() { - - @Override - public ByteDataBuffer visit(ByteBuffer buffer) { - buffer.duplicate().put((ByteBuffer)buf.duplicate().limit((int)size)); - return ByteNioDataBuffer.this; - } - - @Override - public ByteDataBuffer fallback() { - if (dst instanceof ByteDataBuffer) { - ByteDataBuffer byteDst = (ByteDataBuffer)dst; - for (long idx = 0L; idx < size; ++idx) { - byteDst.setByte(getByte(idx), idx); + return dst.accept( + new DataStorageVisitor() { + + @Override + public ByteDataBuffer visit(ByteBuffer buffer) { + buffer.duplicate().put((ByteBuffer) buf.duplicate().limit((int) size)); + return ByteNioDataBuffer.this; } - return ByteNioDataBuffer.this; - } - return slowCopyTo(dst, size); - } - }); + + @Override + public ByteDataBuffer fallback() { + if (dst instanceof ByteDataBuffer) { + ByteDataBuffer byteDst = (ByteDataBuffer) dst; + for (long idx = 0L; idx < size; ++idx) { + byteDst.setByte(getByte(idx), idx); + } + return ByteNioDataBuffer.this; + } + return slowCopyTo(dst, size); + } + }); } @Override @@ -118,21 +116,21 @@ public BooleanDataBuffer asBooleans() { @Override public ByteDataBuffer offset(long index) { Validator.offsetArgs(this, index); - return new ByteNioDataBuffer(((ByteBuffer)buf.duplicate().position((int)index)).slice()); + return new ByteNioDataBuffer(((ByteBuffer) buf.duplicate().position((int) index)).slice()); } @Override public ByteDataBuffer narrow(long size) { Validator.narrowArgs(this, size); - return new ByteNioDataBuffer(((ByteBuffer)buf.duplicate().limit((int)size)).slice()); + return new ByteNioDataBuffer(((ByteBuffer) buf.duplicate().limit((int) size)).slice()); } @Override public ByteDataBuffer slice(long index, long size) { Validator.sliceArgs(this, index, size); ByteBuffer sliceBuf = buf.duplicate(); - sliceBuf.position((int)index); - sliceBuf.limit((int)index + (int)size); + sliceBuf.position((int) index); + sliceBuf.limit((int) index + (int) size); return new ByteNioDataBuffer(sliceBuf.slice()); } @@ -149,27 +147,28 @@ public boolean equals(Object obj) { if (!(obj instanceof ByteDataBuffer)) { return super.equals(obj); } - ByteDataBuffer other = (ByteDataBuffer)obj; + ByteDataBuffer other = (ByteDataBuffer) obj; if (size() != other.size()) { return false; } - return other.accept(new DataStorageVisitor() { - - @Override - public Boolean visit(ByteBuffer buffer) { - return buf.equals(buffer); - } - - @Override - public Boolean fallback() { - for (int idx = 0; idx < size(); ++idx) { - if (other.getByte(idx) != getByte(idx)) { - return false; + return other.accept( + new DataStorageVisitor() { + + @Override + public Boolean visit(ByteBuffer buffer) { + return buf.equals(buffer); + } + + @Override + public Boolean fallback() { + for (int idx = 0; idx < size(); ++idx) { + if (other.getByte(idx) != getByte(idx)) { + return false; + } + } + return true; } - } - return true; - } - }); + }); } @Override diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/DoubleNioDataBuffer.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/DoubleNioDataBuffer.java index bddc5db1e3f..87d16da292d 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/DoubleNioDataBuffer.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/DoubleNioDataBuffer.java @@ -1,42 +1,39 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.buffer.nio; import java.nio.DoubleBuffer; -import org.tensorflow.ndarray.impl.buffer.Validator; import org.tensorflow.ndarray.buffer.DataBuffer; import org.tensorflow.ndarray.buffer.DataStorageVisitor; import org.tensorflow.ndarray.buffer.DoubleDataBuffer; +import org.tensorflow.ndarray.impl.buffer.Validator; -/** - * A buffer of bytes using a JDK {@link DoubleBuffer} for storage. - */ -final class DoubleNioDataBuffer extends AbstractNioDataBuffer - implements DoubleDataBuffer { +/** A buffer of bytes using a JDK {@link DoubleBuffer} for storage. */ +final class DoubleNioDataBuffer extends AbstractNioDataBuffer implements DoubleDataBuffer { @Override public double getDouble(long index) { - return buf.get((int)index); + return buf.get((int) index); } @Override public DoubleDataBuffer setDouble(double value, long index) { - buf.put((int)index, value); + buf.put((int) index, value); return this; } @@ -55,46 +52,47 @@ public DoubleDataBuffer write(double[] src, int offset, int length) { @Override public DoubleDataBuffer copyTo(DataBuffer dst, long size) { Validator.copyToArgs(this, dst, size); - return dst.accept(new DataStorageVisitor() { - - @Override - public DoubleDataBuffer visit(DoubleBuffer buffer) { - buffer.duplicate().put((DoubleBuffer)buf.duplicate().limit((int)size)); - return DoubleNioDataBuffer.this; - } - - @Override - public DoubleDataBuffer fallback() { - if (dst instanceof DoubleDataBuffer) { - DoubleDataBuffer doubleDst = (DoubleDataBuffer)dst; - for (long idx = 0L; idx < size; ++idx) { - doubleDst.setDouble(getDouble(idx), idx); + return dst.accept( + new DataStorageVisitor() { + + @Override + public DoubleDataBuffer visit(DoubleBuffer buffer) { + buffer.duplicate().put((DoubleBuffer) buf.duplicate().limit((int) size)); + return DoubleNioDataBuffer.this; + } + + @Override + public DoubleDataBuffer fallback() { + if (dst instanceof DoubleDataBuffer) { + DoubleDataBuffer doubleDst = (DoubleDataBuffer) dst; + for (long idx = 0L; idx < size; ++idx) { + doubleDst.setDouble(getDouble(idx), idx); + } + return DoubleNioDataBuffer.this; + } + return slowCopyTo(dst, size); } - return DoubleNioDataBuffer.this; - } - return slowCopyTo(dst, size); - } - }); + }); } @Override public DoubleDataBuffer offset(long index) { Validator.offsetArgs(this, index); - return new DoubleNioDataBuffer(((DoubleBuffer)buf.duplicate().position((int)index)).slice()); + return new DoubleNioDataBuffer(((DoubleBuffer) buf.duplicate().position((int) index)).slice()); } @Override public DoubleDataBuffer narrow(long size) { Validator.narrowArgs(this, size); - return new DoubleNioDataBuffer(((DoubleBuffer)buf.duplicate().limit((int)size)).slice()); + return new DoubleNioDataBuffer(((DoubleBuffer) buf.duplicate().limit((int) size)).slice()); } @Override public DoubleDataBuffer slice(long index, long size) { Validator.sliceArgs(this, index, size); DoubleBuffer sliceBuf = buf.duplicate(); - sliceBuf.position((int)index); - sliceBuf.limit((int)index + (int)size); + sliceBuf.position((int) index); + sliceBuf.limit((int) index + (int) size); return new DoubleNioDataBuffer(sliceBuf.slice()); } @@ -111,27 +109,28 @@ public boolean equals(Object obj) { if (!(obj instanceof DoubleDataBuffer)) { return super.equals(obj); } - DoubleDataBuffer other = (DoubleDataBuffer)obj; + DoubleDataBuffer other = (DoubleDataBuffer) obj; if (size() != other.size()) { return false; } - return other.accept(new DataStorageVisitor() { - - @Override - public Boolean visit(DoubleBuffer buffer) { - return buf.equals(buffer); - } - - @Override - public Boolean fallback() { - for (int idx = 0; idx < size(); ++idx) { - if (other.getDouble(idx) != getDouble(idx)) { - return false; + return other.accept( + new DataStorageVisitor() { + + @Override + public Boolean visit(DoubleBuffer buffer) { + return buf.equals(buffer); + } + + @Override + public Boolean fallback() { + for (int idx = 0; idx < size(); ++idx) { + if (other.getDouble(idx) != getDouble(idx)) { + return false; + } + } + return true; } - } - return true; - } - }); + }); } @Override @@ -142,6 +141,6 @@ DoubleBuffer buf() { DoubleNioDataBuffer(DoubleBuffer buf) { this.buf = buf; } - + private DoubleBuffer buf; } diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/FloatNioDataBuffer.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/FloatNioDataBuffer.java index 06a9a31b56a..8fc3d2681e6 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/FloatNioDataBuffer.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/FloatNioDataBuffer.java @@ -1,42 +1,39 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.buffer.nio; import java.nio.FloatBuffer; -import org.tensorflow.ndarray.impl.buffer.Validator; import org.tensorflow.ndarray.buffer.DataBuffer; import org.tensorflow.ndarray.buffer.DataStorageVisitor; import org.tensorflow.ndarray.buffer.FloatDataBuffer; +import org.tensorflow.ndarray.impl.buffer.Validator; -/** - * A buffer of bytes using a JDK {@link FloatBuffer} for storage. - */ -final class FloatNioDataBuffer extends AbstractNioDataBuffer - implements FloatDataBuffer { +/** A buffer of bytes using a JDK {@link FloatBuffer} for storage. */ +final class FloatNioDataBuffer extends AbstractNioDataBuffer implements FloatDataBuffer { @Override public float getFloat(long index) { - return buf.get((int)index); + return buf.get((int) index); } @Override public FloatDataBuffer setFloat(float value, long index) { - buf.put((int)index, value); + buf.put((int) index, value); return this; } @@ -55,46 +52,47 @@ public FloatDataBuffer write(float[] src, int offset, int length) { @Override public FloatDataBuffer copyTo(DataBuffer dst, long size) { Validator.copyToArgs(this, dst, size); - return dst.accept(new DataStorageVisitor() { - - @Override - public FloatDataBuffer visit(FloatBuffer buffer) { - buffer.duplicate().put((FloatBuffer)buf.duplicate().limit((int)size)); - return FloatNioDataBuffer.this; - } - - @Override - public FloatDataBuffer fallback() { - if (dst instanceof FloatDataBuffer) { - FloatDataBuffer floatDst = (FloatDataBuffer)dst; - for (long idx = 0L; idx < size; ++idx) { - floatDst.setFloat(getFloat(idx), idx); + return dst.accept( + new DataStorageVisitor() { + + @Override + public FloatDataBuffer visit(FloatBuffer buffer) { + buffer.duplicate().put((FloatBuffer) buf.duplicate().limit((int) size)); + return FloatNioDataBuffer.this; + } + + @Override + public FloatDataBuffer fallback() { + if (dst instanceof FloatDataBuffer) { + FloatDataBuffer floatDst = (FloatDataBuffer) dst; + for (long idx = 0L; idx < size; ++idx) { + floatDst.setFloat(getFloat(idx), idx); + } + return FloatNioDataBuffer.this; + } + return slowCopyTo(dst, size); } - return FloatNioDataBuffer.this; - } - return slowCopyTo(dst, size); - } - }); + }); } @Override public FloatDataBuffer offset(long index) { Validator.offsetArgs(this, index); - return new FloatNioDataBuffer(((FloatBuffer)buf.duplicate().position((int)index)).slice()); + return new FloatNioDataBuffer(((FloatBuffer) buf.duplicate().position((int) index)).slice()); } @Override public FloatDataBuffer narrow(long size) { Validator.narrowArgs(this, size); - return new FloatNioDataBuffer(((FloatBuffer)buf.duplicate().limit((int)size)).slice()); + return new FloatNioDataBuffer(((FloatBuffer) buf.duplicate().limit((int) size)).slice()); } @Override public FloatDataBuffer slice(long index, long size) { Validator.sliceArgs(this, index, size); FloatBuffer sliceBuf = buf.duplicate(); - sliceBuf.position((int)index); - sliceBuf.limit((int)index + (int)size); + sliceBuf.position((int) index); + sliceBuf.limit((int) index + (int) size); return new FloatNioDataBuffer(sliceBuf.slice()); } @@ -111,27 +109,28 @@ public boolean equals(Object obj) { if (!(obj instanceof FloatDataBuffer)) { return super.equals(obj); } - FloatDataBuffer other = (FloatDataBuffer)obj; + FloatDataBuffer other = (FloatDataBuffer) obj; if (size() != other.size()) { return false; } - return other.accept(new DataStorageVisitor() { - - @Override - public Boolean visit(FloatBuffer buffer) { - return buf.equals(buffer); - } - - @Override - public Boolean fallback() { - for (int idx = 0; idx < size(); ++idx) { - if (other.getFloat(idx) != getFloat(idx)) { - return false; + return other.accept( + new DataStorageVisitor() { + + @Override + public Boolean visit(FloatBuffer buffer) { + return buf.equals(buffer); + } + + @Override + public Boolean fallback() { + for (int idx = 0; idx < size(); ++idx) { + if (other.getFloat(idx) != getFloat(idx)) { + return false; + } + } + return true; } - } - return true; - } - }); + }); } @Override diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/IntNioDataBuffer.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/IntNioDataBuffer.java index cea729e86a7..eda8c8f61b5 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/IntNioDataBuffer.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/IntNioDataBuffer.java @@ -1,42 +1,39 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.buffer.nio; import java.nio.IntBuffer; -import org.tensorflow.ndarray.impl.buffer.Validator; import org.tensorflow.ndarray.buffer.DataBuffer; import org.tensorflow.ndarray.buffer.DataStorageVisitor; import org.tensorflow.ndarray.buffer.IntDataBuffer; +import org.tensorflow.ndarray.impl.buffer.Validator; -/** - * A buffer of bytes using a JDK {@link IntBuffer} for storage. - */ -final class IntNioDataBuffer extends AbstractNioDataBuffer - implements IntDataBuffer { +/** A buffer of bytes using a JDK {@link IntBuffer} for storage. */ +final class IntNioDataBuffer extends AbstractNioDataBuffer implements IntDataBuffer { @Override public int getInt(long index) { - return buf.get((int)index); + return buf.get((int) index); } @Override public IntDataBuffer setInt(int value, long index) { - buf.put((int)index, value); + buf.put((int) index, value); return this; } @@ -55,46 +52,47 @@ public IntDataBuffer write(int[] src, int offset, int length) { @Override public IntDataBuffer copyTo(DataBuffer dst, long size) { Validator.copyToArgs(this, dst, size); - return dst.accept(new DataStorageVisitor() { - - @Override - public IntDataBuffer visit(IntBuffer buffer) { - buffer.duplicate().put((IntBuffer)buf.duplicate().limit((int)size)); - return IntNioDataBuffer.this; - } - - @Override - public IntDataBuffer fallback() { - if (dst instanceof IntDataBuffer) { - IntDataBuffer intDst = (IntDataBuffer)dst; - for (long idx = 0L; idx < size; ++idx) { - intDst.setInt(getInt(idx), idx); + return dst.accept( + new DataStorageVisitor() { + + @Override + public IntDataBuffer visit(IntBuffer buffer) { + buffer.duplicate().put((IntBuffer) buf.duplicate().limit((int) size)); + return IntNioDataBuffer.this; + } + + @Override + public IntDataBuffer fallback() { + if (dst instanceof IntDataBuffer) { + IntDataBuffer intDst = (IntDataBuffer) dst; + for (long idx = 0L; idx < size; ++idx) { + intDst.setInt(getInt(idx), idx); + } + return IntNioDataBuffer.this; + } + return slowCopyTo(dst, size); } - return IntNioDataBuffer.this; - } - return slowCopyTo(dst, size); - } - }); + }); } @Override public IntDataBuffer offset(long index) { Validator.offsetArgs(this, index); - return new IntNioDataBuffer(((IntBuffer)buf.duplicate().position((int)index)).slice()); + return new IntNioDataBuffer(((IntBuffer) buf.duplicate().position((int) index)).slice()); } @Override public IntDataBuffer narrow(long size) { Validator.narrowArgs(this, size); - return new IntNioDataBuffer(((IntBuffer)buf.duplicate().limit((int)size)).slice()); + return new IntNioDataBuffer(((IntBuffer) buf.duplicate().limit((int) size)).slice()); } @Override public IntDataBuffer slice(long index, long size) { Validator.sliceArgs(this, index, size); IntBuffer sliceBuf = buf.duplicate(); - sliceBuf.position((int)index); - sliceBuf.limit((int)index + (int)size); + sliceBuf.position((int) index); + sliceBuf.limit((int) index + (int) size); return new IntNioDataBuffer(sliceBuf.slice()); } @@ -111,27 +109,28 @@ public boolean equals(Object obj) { if (!(obj instanceof IntDataBuffer)) { return super.equals(obj); } - IntDataBuffer other = (IntDataBuffer)obj; + IntDataBuffer other = (IntDataBuffer) obj; if (size() != other.size()) { return false; } - return other.accept(new DataStorageVisitor() { - - @Override - public Boolean visit(IntBuffer buffer) { - return buf.equals(buffer); - } - - @Override - public Boolean fallback() { - for (int idx = 0; idx < size(); ++idx) { - if (other.getInt(idx) != getInt(idx)) { - return false; + return other.accept( + new DataStorageVisitor() { + + @Override + public Boolean visit(IntBuffer buffer) { + return buf.equals(buffer); + } + + @Override + public Boolean fallback() { + for (int idx = 0; idx < size(); ++idx) { + if (other.getInt(idx) != getInt(idx)) { + return false; + } + } + return true; } - } - return true; - } - }); + }); } @Override diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/LongNioDataBuffer.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/LongNioDataBuffer.java index 7231ee7d408..ceffbeb216e 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/LongNioDataBuffer.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/LongNioDataBuffer.java @@ -1,42 +1,39 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.buffer.nio; import java.nio.LongBuffer; -import org.tensorflow.ndarray.impl.buffer.Validator; import org.tensorflow.ndarray.buffer.DataBuffer; import org.tensorflow.ndarray.buffer.DataStorageVisitor; import org.tensorflow.ndarray.buffer.LongDataBuffer; +import org.tensorflow.ndarray.impl.buffer.Validator; -/** - * A buffer of bytes using a JDK {@link LongBuffer} for storage. - */ -final class LongNioDataBuffer extends AbstractNioDataBuffer - implements LongDataBuffer { +/** A buffer of bytes using a JDK {@link LongBuffer} for storage. */ +final class LongNioDataBuffer extends AbstractNioDataBuffer implements LongDataBuffer { @Override public long getLong(long index) { - return buf.get((int)index); + return buf.get((int) index); } @Override public LongDataBuffer setLong(long value, long index) { - buf.put((int)index, value); + buf.put((int) index, value); return this; } @@ -55,46 +52,47 @@ public LongDataBuffer write(long[] src, int offset, int length) { @Override public LongDataBuffer copyTo(DataBuffer dst, long size) { Validator.copyToArgs(this, dst, size); - return dst.accept(new DataStorageVisitor() { - - @Override - public LongDataBuffer visit(LongBuffer buffer) { - buffer.duplicate().put((LongBuffer)buf.duplicate().limit((int)size)); - return LongNioDataBuffer.this; - } - - @Override - public LongDataBuffer fallback() { - if (dst instanceof LongDataBuffer) { - LongDataBuffer longDst = (LongDataBuffer)dst; - for (long idx = 0L; idx < size; ++idx) { - longDst.setLong(getLong(idx), idx); + return dst.accept( + new DataStorageVisitor() { + + @Override + public LongDataBuffer visit(LongBuffer buffer) { + buffer.duplicate().put((LongBuffer) buf.duplicate().limit((int) size)); + return LongNioDataBuffer.this; + } + + @Override + public LongDataBuffer fallback() { + if (dst instanceof LongDataBuffer) { + LongDataBuffer longDst = (LongDataBuffer) dst; + for (long idx = 0L; idx < size; ++idx) { + longDst.setLong(getLong(idx), idx); + } + return LongNioDataBuffer.this; + } + return slowCopyTo(dst, size); } - return LongNioDataBuffer.this; - } - return slowCopyTo(dst, size); - } - }); + }); } @Override public LongDataBuffer offset(long index) { Validator.offsetArgs(this, index); - return new LongNioDataBuffer(((LongBuffer)buf.duplicate().position((int)index)).slice()); + return new LongNioDataBuffer(((LongBuffer) buf.duplicate().position((int) index)).slice()); } @Override public LongDataBuffer narrow(long size) { Validator.narrowArgs(this, size); - return new LongNioDataBuffer(((LongBuffer)buf.duplicate().limit((int)size)).slice()); + return new LongNioDataBuffer(((LongBuffer) buf.duplicate().limit((int) size)).slice()); } @Override public LongDataBuffer slice(long index, long size) { Validator.sliceArgs(this, index, size); LongBuffer sliceBuf = buf.duplicate(); - sliceBuf.position((int)index); - sliceBuf.limit((int)index + (int)size); + sliceBuf.position((int) index); + sliceBuf.limit((int) index + (int) size); return new LongNioDataBuffer(sliceBuf.slice()); } @@ -111,27 +109,28 @@ public boolean equals(Object obj) { if (!(obj instanceof LongDataBuffer)) { return super.equals(obj); } - LongDataBuffer other = (LongDataBuffer)obj; + LongDataBuffer other = (LongDataBuffer) obj; if (size() != other.size()) { return false; } - return other.accept(new DataStorageVisitor() { - - @Override - public Boolean visit(LongBuffer buffer) { - return buf.equals(buffer); - } - - @Override - public Boolean fallback() { - for (int idx = 0; idx < size(); ++idx) { - if (other.getLong(idx) != getLong(idx)) { - return false; + return other.accept( + new DataStorageVisitor() { + + @Override + public Boolean visit(LongBuffer buffer) { + return buf.equals(buffer); + } + + @Override + public Boolean fallback() { + for (int idx = 0; idx < size(); ++idx) { + if (other.getLong(idx) != getLong(idx)) { + return false; + } + } + return true; } - } - return true; - } - }); + }); } @Override diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/NioDataBufferFactory.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/NioDataBufferFactory.java index 4e84fc9bc17..e26b2a702ff 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/NioDataBufferFactory.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/NioDataBufferFactory.java @@ -30,9 +30,7 @@ import org.tensorflow.ndarray.buffer.LongDataBuffer; import org.tensorflow.ndarray.buffer.ShortDataBuffer; -/** - * Factory of JDK NIO-based data buffers - */ +/** Factory of JDK NIO-based data buffers */ public class NioDataBufferFactory { public static ByteDataBuffer create(ByteBuffer buffer) { diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/ShortNioDataBuffer.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/ShortNioDataBuffer.java index 776faa103c2..e6535275f07 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/ShortNioDataBuffer.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/ShortNioDataBuffer.java @@ -1,42 +1,39 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.buffer.nio; import java.nio.ShortBuffer; -import org.tensorflow.ndarray.impl.buffer.Validator; import org.tensorflow.ndarray.buffer.DataBuffer; import org.tensorflow.ndarray.buffer.DataStorageVisitor; import org.tensorflow.ndarray.buffer.ShortDataBuffer; +import org.tensorflow.ndarray.impl.buffer.Validator; -/** - * A buffer of bytes using a JDK {@link ShortBuffer} for storage. - */ -final class ShortNioDataBuffer extends AbstractNioDataBuffer - implements ShortDataBuffer { +/** A buffer of bytes using a JDK {@link ShortBuffer} for storage. */ +final class ShortNioDataBuffer extends AbstractNioDataBuffer implements ShortDataBuffer { @Override public short getShort(long index) { - return buf.get((int)index); + return buf.get((int) index); } @Override public ShortDataBuffer setShort(short value, long index) { - buf.put((int)index, value); + buf.put((int) index, value); return this; } @@ -55,46 +52,47 @@ public ShortDataBuffer write(short[] src, int offset, int length) { @Override public ShortDataBuffer copyTo(DataBuffer dst, long size) { Validator.copyToArgs(this, dst, size); - return dst.accept(new DataStorageVisitor() { - - @Override - public ShortDataBuffer visit(ShortBuffer buffer) { - buffer.duplicate().put((ShortBuffer)buf.duplicate().limit((int)size)); - return ShortNioDataBuffer.this; - } - - @Override - public ShortDataBuffer fallback() { - if (dst instanceof ShortDataBuffer) { - ShortDataBuffer shortDst = (ShortDataBuffer)dst; - for (long idx = 0L; idx < size; ++idx) { - shortDst.setShort(getShort(idx), idx); + return dst.accept( + new DataStorageVisitor() { + + @Override + public ShortDataBuffer visit(ShortBuffer buffer) { + buffer.duplicate().put((ShortBuffer) buf.duplicate().limit((int) size)); + return ShortNioDataBuffer.this; + } + + @Override + public ShortDataBuffer fallback() { + if (dst instanceof ShortDataBuffer) { + ShortDataBuffer shortDst = (ShortDataBuffer) dst; + for (long idx = 0L; idx < size; ++idx) { + shortDst.setShort(getShort(idx), idx); + } + return ShortNioDataBuffer.this; + } + return slowCopyTo(dst, size); } - return ShortNioDataBuffer.this; - } - return slowCopyTo(dst, size); - } - }); + }); } @Override public ShortDataBuffer offset(long index) { Validator.offsetArgs(this, index); - return new ShortNioDataBuffer(((ShortBuffer)buf.duplicate().position((int)index)).slice()); + return new ShortNioDataBuffer(((ShortBuffer) buf.duplicate().position((int) index)).slice()); } @Override public ShortDataBuffer narrow(long size) { Validator.narrowArgs(this, size); - return new ShortNioDataBuffer(((ShortBuffer)buf.duplicate().limit((int)size)).slice()); + return new ShortNioDataBuffer(((ShortBuffer) buf.duplicate().limit((int) size)).slice()); } @Override public ShortDataBuffer slice(long index, long size) { Validator.sliceArgs(this, index, size); ShortBuffer sliceBuf = buf.duplicate(); - sliceBuf.position((int)index); - sliceBuf.limit((int)index + (int)size); + sliceBuf.position((int) index); + sliceBuf.limit((int) index + (int) size); return new ShortNioDataBuffer(sliceBuf.slice()); } @@ -111,27 +109,28 @@ public boolean equals(Object obj) { if (!(obj instanceof ShortDataBuffer)) { return super.equals(obj); } - ShortDataBuffer other = (ShortDataBuffer)obj; + ShortDataBuffer other = (ShortDataBuffer) obj; if (size() != other.size()) { return false; } - return other.accept(new DataStorageVisitor() { - - @Override - public Boolean visit(ShortBuffer buffer) { - return buf.equals(buffer); - } - - @Override - public Boolean fallback() { - for (int idx = 0; idx < size(); ++idx) { - if (other.getShort(idx) != getShort(idx)) { - return false; + return other.accept( + new DataStorageVisitor() { + + @Override + public Boolean visit(ShortBuffer buffer) { + return buf.equals(buffer); + } + + @Override + public Boolean fallback() { + for (int idx = 0; idx < size(); ++idx) { + if (other.getShort(idx) != getShort(idx)) { + return false; + } + } + return true; } - } - return true; - } - }); + }); } @Override diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/AbstractRawDataBuffer.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/AbstractRawDataBuffer.java index c6050385b77..0ce4da0f602 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/AbstractRawDataBuffer.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/AbstractRawDataBuffer.java @@ -17,10 +17,10 @@ package org.tensorflow.ndarray.impl.buffer.raw; -import org.tensorflow.ndarray.impl.buffer.AbstractDataBuffer; -import org.tensorflow.ndarray.impl.buffer.Validator; import org.tensorflow.ndarray.buffer.DataBuffer; import org.tensorflow.ndarray.buffer.DataBufferWindow; +import org.tensorflow.ndarray.impl.buffer.AbstractDataBuffer; +import org.tensorflow.ndarray.impl.buffer.Validator; @SuppressWarnings("unchecked") abstract class AbstractRawDataBuffer> extends AbstractDataBuffer { @@ -37,37 +37,37 @@ public boolean isReadOnly() { public B read(Object dst, int dstLength) { Validator.readArgs(this, dstLength, 0, dstLength); memory.copyTo(UnsafeMemoryHandle.fromArray(dst, dstLength), dstLength); - return (B)this; + return (B) this; } public B read(Object dst, int dstLength, int offset, int length) { Validator.readArgs(this, dstLength, offset, length); memory.copyTo(UnsafeMemoryHandle.fromArray(dst, dstLength).offset(offset), length); - return (B)this; + return (B) this; } public B write(Object src, int srcLength) { Validator.writeArgs(this, srcLength, 0, srcLength); UnsafeMemoryHandle.fromArray(src, srcLength).copyTo(memory, srcLength); - return (B)this; + return (B) this; } public B write(Object src, int srcLength, int offset, int length) { Validator.writeArgs(this, srcLength, offset, length); UnsafeMemoryHandle.fromArray(src, srcLength).offset(offset).copyTo(memory, length); - return (B)this; + return (B) this; } @Override public B copyTo(DataBuffer dst, long size) { Validator.copyToArgs(this, dst, size); if (dst instanceof AbstractRawDataBuffer) { - AbstractRawDataBuffer unsafeDst = (AbstractRawDataBuffer)dst; + AbstractRawDataBuffer unsafeDst = (AbstractRawDataBuffer) dst; memory.copyTo(unsafeDst.memory, size); } else { super.copyTo(dst, size); } - return (B)this; + return (B) this; } @Override @@ -79,7 +79,7 @@ public B slice(long index, long size) { @Override public DataBufferWindow window(long size) { B windowBuffer = instantiate(memory.slice(0, size)); - return new RawDataBufferWindow<>((AbstractRawDataBuffer)windowBuffer, size()); + return new RawDataBufferWindow<>((AbstractRawDataBuffer) windowBuffer, size()); } protected final UnsafeMemoryHandle memory; diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/BooleanRawDataBuffer.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/BooleanRawDataBuffer.java index e7e825ea505..ecde38f72d8 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/BooleanRawDataBuffer.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/BooleanRawDataBuffer.java @@ -18,10 +18,10 @@ package org.tensorflow.ndarray.impl.buffer.raw; import java.util.Arrays; -import org.tensorflow.ndarray.impl.buffer.Validator; import org.tensorflow.ndarray.buffer.BooleanDataBuffer; import org.tensorflow.ndarray.buffer.DataBuffer; import org.tensorflow.ndarray.buffer.DataStorageVisitor; +import org.tensorflow.ndarray.impl.buffer.Validator; final class BooleanRawDataBuffer extends AbstractRawDataBuffer implements BooleanDataBuffer { @@ -62,38 +62,40 @@ public BooleanDataBuffer write(boolean[] src, int offset, int length) { @Override public BooleanDataBuffer copyTo(DataBuffer dst, long size) { Validator.copyToArgs(this, dst, size); - return dst.accept(new DataStorageVisitor() { - - @Override - public BooleanDataBuffer visit(boolean[] array, int offset, int length) { - memory.copyTo(UnsafeMemoryHandle.fromArray(array, offset, length), size); - return BooleanRawDataBuffer.this; - } - - @Override - public BooleanDataBuffer visit(long address, long length, long scale) { - memory.copyTo(UnsafeMemoryHandle.fromAddress(address, length, scale), size); - return BooleanRawDataBuffer.this; - } - - @Override - public BooleanDataBuffer fallback() { - if (dst instanceof BooleanDataBuffer) { - BooleanDataBuffer booleanDst = (BooleanDataBuffer)dst; - for (long idx = 0L; idx < size; ++idx) { - booleanDst.setBoolean(getBoolean(idx), idx); + return dst.accept( + new DataStorageVisitor() { + + @Override + public BooleanDataBuffer visit(boolean[] array, int offset, int length) { + memory.copyTo(UnsafeMemoryHandle.fromArray(array, offset, length), size); + return BooleanRawDataBuffer.this; + } + + @Override + public BooleanDataBuffer visit(long address, long length, long scale) { + memory.copyTo(UnsafeMemoryHandle.fromAddress(address, length, scale), size); + return BooleanRawDataBuffer.this; + } + + @Override + public BooleanDataBuffer fallback() { + if (dst instanceof BooleanDataBuffer) { + BooleanDataBuffer booleanDst = (BooleanDataBuffer) dst; + for (long idx = 0L; idx < size; ++idx) { + booleanDst.setBoolean(getBoolean(idx), idx); + } + return BooleanRawDataBuffer.this; + } + return slowCopyTo(dst, size); } - return BooleanRawDataBuffer.this; - } - return slowCopyTo(dst, size); - } - }); + }); } @Override public R accept(DataStorageVisitor visitor) { if (memory.isArray()) { - return visitor.visit((boolean[])memory.object, memory.arrayOffset(boolean[].class), (int)memory.size()); + return visitor.visit( + (boolean[]) memory.object, memory.arrayOffset(boolean[].class), (int) memory.size()); } return visitor.visit(memory.byteOffset, memory.byteSize, memory.scale); } @@ -106,33 +108,34 @@ public boolean equals(Object obj) { if (!(obj instanceof BooleanDataBuffer)) { return super.equals(obj); } - BooleanDataBuffer other = (BooleanDataBuffer)obj; + BooleanDataBuffer other = (BooleanDataBuffer) obj; if (size() != other.size()) { return false; } - return other.accept(new DataStorageVisitor() { - - @Override - public Boolean visit(boolean[] array, int offset, int length) { - if (memory.isArray() && memory.arrayOffset(boolean[].class) == 0 && offset == 0) { - boolean[] thisArray = memory.array(); - if (thisArray.length == array.length) { - return Arrays.equals(thisArray, array); + return other.accept( + new DataStorageVisitor() { + + @Override + public Boolean visit(boolean[] array, int offset, int length) { + if (memory.isArray() && memory.arrayOffset(boolean[].class) == 0 && offset == 0) { + boolean[] thisArray = memory.array(); + if (thisArray.length == array.length) { + return Arrays.equals(thisArray, array); + } + } + return fallback(); } - } - return fallback(); - } - - @Override - public Boolean fallback() { - for (long idx = 0L; idx < size(); ++idx) { - if (other.getBoolean(idx) != getBoolean(idx)) { - return false; + + @Override + public Boolean fallback() { + for (long idx = 0L; idx < size(); ++idx) { + if (other.getBoolean(idx) != getBoolean(idx)) { + return false; + } + } + return true; } - } - return true; - } - }); + }); } @Override diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/ByteRawDataBuffer.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/ByteRawDataBuffer.java index b4b490e98ed..5916064a516 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/ByteRawDataBuffer.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/ByteRawDataBuffer.java @@ -18,7 +18,6 @@ package org.tensorflow.ndarray.impl.buffer.raw; import java.nio.ByteBuffer; -import org.tensorflow.ndarray.impl.buffer.Validator; import org.tensorflow.ndarray.buffer.BooleanDataBuffer; import org.tensorflow.ndarray.buffer.ByteDataBuffer; import org.tensorflow.ndarray.buffer.DataBuffer; @@ -28,6 +27,7 @@ import org.tensorflow.ndarray.buffer.IntDataBuffer; import org.tensorflow.ndarray.buffer.LongDataBuffer; import org.tensorflow.ndarray.buffer.ShortDataBuffer; +import org.tensorflow.ndarray.impl.buffer.Validator; final class ByteRawDataBuffer extends AbstractRawDataBuffer implements ByteDataBuffer { @@ -68,38 +68,41 @@ public ByteDataBuffer write(byte[] src, int offset, int length) { @Override public ByteDataBuffer copyTo(DataBuffer dst, long size) { Validator.copyToArgs(this, dst, size); - return dst.accept(new DataStorageVisitor() { - - @Override - public ByteDataBuffer visit(ByteBuffer buffer) { - if (buffer.hasArray()) { - memory.copyTo(UnsafeMemoryHandle.fromArray(buffer.array(), buffer.position(), buffer.limit()), size); - } else if (memory.isArray()) { - buffer.put(memory.toArrayByteBuffer()); - } else { - slowCopyTo(dst, size); - } - return ByteRawDataBuffer.this; - } - - @Override - public ByteDataBuffer visit(long address, long length, long scale) { - memory.copyTo(UnsafeMemoryHandle.fromAddress(address, length, scale), size); - return ByteRawDataBuffer.this; - } - - @Override - public ByteDataBuffer fallback() { - if (dst instanceof ByteDataBuffer) { - ByteDataBuffer byteDst = (ByteDataBuffer)dst; - for (long idx = 0L; idx < size; ++idx) { - byteDst.setByte(getByte(idx), idx); + return dst.accept( + new DataStorageVisitor() { + + @Override + public ByteDataBuffer visit(ByteBuffer buffer) { + if (buffer.hasArray()) { + memory.copyTo( + UnsafeMemoryHandle.fromArray(buffer.array(), buffer.position(), buffer.limit()), + size); + } else if (memory.isArray()) { + buffer.put(memory.toArrayByteBuffer()); + } else { + slowCopyTo(dst, size); + } + return ByteRawDataBuffer.this; + } + + @Override + public ByteDataBuffer visit(long address, long length, long scale) { + memory.copyTo(UnsafeMemoryHandle.fromAddress(address, length, scale), size); + return ByteRawDataBuffer.this; } - return ByteRawDataBuffer.this; - } - return slowCopyTo(dst, size); - } - }); + + @Override + public ByteDataBuffer fallback() { + if (dst instanceof ByteDataBuffer) { + ByteDataBuffer byteDst = (ByteDataBuffer) dst; + for (long idx = 0L; idx < size; ++idx) { + byteDst.setByte(getByte(idx), idx); + } + return ByteRawDataBuffer.this; + } + return slowCopyTo(dst, size); + } + }); } @Override @@ -148,30 +151,31 @@ public boolean equals(Object obj) { if (!(obj instanceof ByteDataBuffer)) { return super.equals(obj); } - ByteDataBuffer other = (ByteDataBuffer)obj; + ByteDataBuffer other = (ByteDataBuffer) obj; if (size() != other.size()) { return false; } - return other.accept(new DataStorageVisitor() { - - @Override - public Boolean visit(ByteBuffer buffer) { - if (memory.isArray()) { - return buffer.equals(memory.toArrayByteBuffer()); - } - return fallback(); - } - - @Override - public Boolean fallback() { - for (long idx = 0L; idx < size(); ++idx) { - if (other.getByte(idx) != getByte(idx)) { - return false; + return other.accept( + new DataStorageVisitor() { + + @Override + public Boolean visit(ByteBuffer buffer) { + if (memory.isArray()) { + return buffer.equals(memory.toArrayByteBuffer()); + } + return fallback(); + } + + @Override + public Boolean fallback() { + for (long idx = 0L; idx < size(); ++idx) { + if (other.getByte(idx) != getByte(idx)) { + return false; + } + } + return true; } - } - return true; - } - }); + }); } @Override diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/DoubleRawDataBuffer.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/DoubleRawDataBuffer.java index 680d9565184..c6259f7aa61 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/DoubleRawDataBuffer.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/DoubleRawDataBuffer.java @@ -18,10 +18,10 @@ package org.tensorflow.ndarray.impl.buffer.raw; import java.nio.DoubleBuffer; -import org.tensorflow.ndarray.impl.buffer.Validator; import org.tensorflow.ndarray.buffer.DataBuffer; import org.tensorflow.ndarray.buffer.DataStorageVisitor; import org.tensorflow.ndarray.buffer.DoubleDataBuffer; +import org.tensorflow.ndarray.impl.buffer.Validator; final class DoubleRawDataBuffer extends AbstractRawDataBuffer implements DoubleDataBuffer { @@ -62,38 +62,41 @@ public DoubleDataBuffer write(double[] src, int offset, int length) { @Override public DoubleDataBuffer copyTo(DataBuffer dst, long size) { Validator.copyToArgs(this, dst, size); - return dst.accept(new DataStorageVisitor() { - - @Override - public DoubleDataBuffer visit(DoubleBuffer buffer) { - if (buffer.hasArray()) { - memory.copyTo(UnsafeMemoryHandle.fromArray(buffer.array(), buffer.position(), buffer.limit()), size); - } else if (memory.isArray()) { - buffer.put(memory.toArrayDoubleBuffer()); - } else { - slowCopyTo(dst, size); - } - return DoubleRawDataBuffer.this; - } - - @Override - public DoubleDataBuffer visit(long address, long length, long scale) { - memory.copyTo(UnsafeMemoryHandle.fromAddress(address, length, scale), size); - return DoubleRawDataBuffer.this; - } - - @Override - public DoubleDataBuffer fallback() { - if (dst instanceof DoubleDataBuffer) { - DoubleDataBuffer doubleDst = (DoubleDataBuffer)dst; - for (long idx = 0L; idx < size; ++idx) { - doubleDst.setDouble(getDouble(idx), idx); + return dst.accept( + new DataStorageVisitor() { + + @Override + public DoubleDataBuffer visit(DoubleBuffer buffer) { + if (buffer.hasArray()) { + memory.copyTo( + UnsafeMemoryHandle.fromArray(buffer.array(), buffer.position(), buffer.limit()), + size); + } else if (memory.isArray()) { + buffer.put(memory.toArrayDoubleBuffer()); + } else { + slowCopyTo(dst, size); + } + return DoubleRawDataBuffer.this; + } + + @Override + public DoubleDataBuffer visit(long address, long length, long scale) { + memory.copyTo(UnsafeMemoryHandle.fromAddress(address, length, scale), size); + return DoubleRawDataBuffer.this; } - return DoubleRawDataBuffer.this; - } - return slowCopyTo(dst, size); - } - }); + + @Override + public DoubleDataBuffer fallback() { + if (dst instanceof DoubleDataBuffer) { + DoubleDataBuffer doubleDst = (DoubleDataBuffer) dst; + for (long idx = 0L; idx < size; ++idx) { + doubleDst.setDouble(getDouble(idx), idx); + } + return DoubleRawDataBuffer.this; + } + return slowCopyTo(dst, size); + } + }); } @Override @@ -112,30 +115,31 @@ public boolean equals(Object obj) { if (!(obj instanceof DoubleDataBuffer)) { return super.equals(obj); } - DoubleDataBuffer other = (DoubleDataBuffer)obj; + DoubleDataBuffer other = (DoubleDataBuffer) obj; if (size() != other.size()) { return false; } - return other.accept(new DataStorageVisitor() { - - @Override - public Boolean visit(DoubleBuffer buffer) { - if (memory.isArray()) { - return buffer.equals(memory.toArrayDoubleBuffer()); - } - return fallback(); - } - - @Override - public Boolean fallback() { - for (long idx = 0L; idx < size(); ++idx) { - if (other.getDouble(idx) != getDouble(idx)) { - return false; + return other.accept( + new DataStorageVisitor() { + + @Override + public Boolean visit(DoubleBuffer buffer) { + if (memory.isArray()) { + return buffer.equals(memory.toArrayDoubleBuffer()); + } + return fallback(); + } + + @Override + public Boolean fallback() { + for (long idx = 0L; idx < size(); ++idx) { + if (other.getDouble(idx) != getDouble(idx)) { + return false; + } + } + return true; } - } - return true; - } - }); + }); } @Override diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/FloatRawDataBuffer.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/FloatRawDataBuffer.java index 43bd370a88b..2a9d12f47b3 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/FloatRawDataBuffer.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/FloatRawDataBuffer.java @@ -18,11 +18,10 @@ package org.tensorflow.ndarray.impl.buffer.raw; import java.nio.FloatBuffer; - -import org.tensorflow.ndarray.impl.buffer.Validator; import org.tensorflow.ndarray.buffer.DataBuffer; import org.tensorflow.ndarray.buffer.DataStorageVisitor; import org.tensorflow.ndarray.buffer.FloatDataBuffer; +import org.tensorflow.ndarray.impl.buffer.Validator; final class FloatRawDataBuffer extends AbstractRawDataBuffer implements FloatDataBuffer { @@ -63,38 +62,41 @@ public FloatDataBuffer write(float[] src, int offset, int length) { @Override public FloatDataBuffer copyTo(DataBuffer dst, long size) { Validator.copyToArgs(this, dst, size); - return dst.accept(new DataStorageVisitor() { - - @Override - public FloatDataBuffer visit(FloatBuffer buffer) { - if (buffer.hasArray()) { - memory.copyTo(UnsafeMemoryHandle.fromArray(buffer.array(), buffer.position(), buffer.limit()), size); - } else if (memory.isArray()) { - buffer.put(memory.toArrayFloatBuffer()); - } else { - slowCopyTo(dst, size); - } - return FloatRawDataBuffer.this; - } - - @Override - public FloatDataBuffer visit(long address, long length, long scale) { - memory.copyTo(UnsafeMemoryHandle.fromAddress(address, length, scale), size); - return FloatRawDataBuffer.this; - } - - @Override - public FloatDataBuffer fallback() { - if (dst instanceof FloatDataBuffer) { - FloatDataBuffer floatDst = (FloatDataBuffer)dst; - for (long idx = 0L; idx < size; ++idx) { - floatDst.setFloat(getFloat(idx), idx); + return dst.accept( + new DataStorageVisitor() { + + @Override + public FloatDataBuffer visit(FloatBuffer buffer) { + if (buffer.hasArray()) { + memory.copyTo( + UnsafeMemoryHandle.fromArray(buffer.array(), buffer.position(), buffer.limit()), + size); + } else if (memory.isArray()) { + buffer.put(memory.toArrayFloatBuffer()); + } else { + slowCopyTo(dst, size); + } + return FloatRawDataBuffer.this; + } + + @Override + public FloatDataBuffer visit(long address, long length, long scale) { + memory.copyTo(UnsafeMemoryHandle.fromAddress(address, length, scale), size); + return FloatRawDataBuffer.this; } - return FloatRawDataBuffer.this; - } - return slowCopyTo(dst, size); - } - }); + + @Override + public FloatDataBuffer fallback() { + if (dst instanceof FloatDataBuffer) { + FloatDataBuffer floatDst = (FloatDataBuffer) dst; + for (long idx = 0L; idx < size; ++idx) { + floatDst.setFloat(getFloat(idx), idx); + } + return FloatRawDataBuffer.this; + } + return slowCopyTo(dst, size); + } + }); } @Override @@ -113,30 +115,31 @@ public boolean equals(Object obj) { if (!(obj instanceof FloatDataBuffer)) { return super.equals(obj); } - FloatDataBuffer other = (FloatDataBuffer)obj; + FloatDataBuffer other = (FloatDataBuffer) obj; if (size() != other.size()) { return false; } - return other.accept(new DataStorageVisitor() { - - @Override - public Boolean visit(FloatBuffer buffer) { - if (memory.isArray()) { - return buffer.equals(memory.toArrayFloatBuffer()); - } - return fallback(); - } - - @Override - public Boolean fallback() { - for (long idx = 0L; idx < size(); ++idx) { - if (other.getFloat(idx) != getFloat(idx)) { - return false; + return other.accept( + new DataStorageVisitor() { + + @Override + public Boolean visit(FloatBuffer buffer) { + if (memory.isArray()) { + return buffer.equals(memory.toArrayFloatBuffer()); + } + return fallback(); + } + + @Override + public Boolean fallback() { + for (long idx = 0L; idx < size(); ++idx) { + if (other.getFloat(idx) != getFloat(idx)) { + return false; + } + } + return true; } - } - return true; - } - }); + }); } @Override diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/IntRawDataBuffer.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/IntRawDataBuffer.java index 1c905e2756d..891c4c6f3aa 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/IntRawDataBuffer.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/IntRawDataBuffer.java @@ -18,10 +18,10 @@ package org.tensorflow.ndarray.impl.buffer.raw; import java.nio.IntBuffer; -import org.tensorflow.ndarray.impl.buffer.Validator; import org.tensorflow.ndarray.buffer.DataBuffer; import org.tensorflow.ndarray.buffer.DataStorageVisitor; import org.tensorflow.ndarray.buffer.IntDataBuffer; +import org.tensorflow.ndarray.impl.buffer.Validator; final class IntRawDataBuffer extends AbstractRawDataBuffer implements IntDataBuffer { @@ -62,38 +62,41 @@ public IntDataBuffer write(int[] src, int offset, int length) { @Override public IntDataBuffer copyTo(DataBuffer dst, long size) { Validator.copyToArgs(this, dst, size); - return dst.accept(new DataStorageVisitor() { - - @Override - public IntDataBuffer visit(IntBuffer buffer) { - if (buffer.hasArray()) { - memory.copyTo(UnsafeMemoryHandle.fromArray(buffer.array(), buffer.position(), buffer.limit()), size); - } else if (memory.isArray()) { - buffer.put(memory.toArrayIntBuffer()); - } else { - slowCopyTo(dst, size); - } - return IntRawDataBuffer.this; - } - - @Override - public IntDataBuffer visit(long address, long length, long scale) { - memory.copyTo(UnsafeMemoryHandle.fromAddress(address, length, scale), size); - return IntRawDataBuffer.this; - } - - @Override - public IntDataBuffer fallback() { - if (dst instanceof IntDataBuffer) { - IntDataBuffer intDst = (IntDataBuffer)dst; - for (long idx = 0L; idx < size; ++idx) { - intDst.setInt(getInt(idx), idx); + return dst.accept( + new DataStorageVisitor() { + + @Override + public IntDataBuffer visit(IntBuffer buffer) { + if (buffer.hasArray()) { + memory.copyTo( + UnsafeMemoryHandle.fromArray(buffer.array(), buffer.position(), buffer.limit()), + size); + } else if (memory.isArray()) { + buffer.put(memory.toArrayIntBuffer()); + } else { + slowCopyTo(dst, size); + } + return IntRawDataBuffer.this; + } + + @Override + public IntDataBuffer visit(long address, long length, long scale) { + memory.copyTo(UnsafeMemoryHandle.fromAddress(address, length, scale), size); + return IntRawDataBuffer.this; } - return IntRawDataBuffer.this; - } - return slowCopyTo(dst, size); - } - }); + + @Override + public IntDataBuffer fallback() { + if (dst instanceof IntDataBuffer) { + IntDataBuffer intDst = (IntDataBuffer) dst; + for (long idx = 0L; idx < size; ++idx) { + intDst.setInt(getInt(idx), idx); + } + return IntRawDataBuffer.this; + } + return slowCopyTo(dst, size); + } + }); } @Override @@ -112,30 +115,31 @@ public boolean equals(Object obj) { if (!(obj instanceof IntDataBuffer)) { return super.equals(obj); } - IntDataBuffer other = (IntDataBuffer)obj; + IntDataBuffer other = (IntDataBuffer) obj; if (size() != other.size()) { return false; } - return other.accept(new DataStorageVisitor() { - - @Override - public Boolean visit(IntBuffer buffer) { - if (memory.isArray()) { - return buffer.equals(memory.toArrayIntBuffer()); - } - return fallback(); - } - - @Override - public Boolean fallback() { - for (long idx = 0L; idx < size(); ++idx) { - if (other.getInt(idx) != getInt(idx)) { - return false; + return other.accept( + new DataStorageVisitor() { + + @Override + public Boolean visit(IntBuffer buffer) { + if (memory.isArray()) { + return buffer.equals(memory.toArrayIntBuffer()); + } + return fallback(); + } + + @Override + public Boolean fallback() { + for (long idx = 0L; idx < size(); ++idx) { + if (other.getInt(idx) != getInt(idx)) { + return false; + } + } + return true; } - } - return true; - } - }); + }); } @Override diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/LongRawDataBuffer.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/LongRawDataBuffer.java index 724868fe81f..6fb918ae093 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/LongRawDataBuffer.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/LongRawDataBuffer.java @@ -18,10 +18,10 @@ package org.tensorflow.ndarray.impl.buffer.raw; import java.nio.LongBuffer; -import org.tensorflow.ndarray.impl.buffer.Validator; import org.tensorflow.ndarray.buffer.DataBuffer; import org.tensorflow.ndarray.buffer.DataStorageVisitor; import org.tensorflow.ndarray.buffer.LongDataBuffer; +import org.tensorflow.ndarray.impl.buffer.Validator; final class LongRawDataBuffer extends AbstractRawDataBuffer implements LongDataBuffer { @@ -62,38 +62,41 @@ public LongDataBuffer write(long[] src, int offset, int length) { @Override public LongDataBuffer copyTo(DataBuffer dst, long size) { Validator.copyToArgs(this, dst, size); - return dst.accept(new DataStorageVisitor() { - - @Override - public LongDataBuffer visit(LongBuffer buffer) { - if (buffer.hasArray()) { - memory.copyTo(UnsafeMemoryHandle.fromArray(buffer.array(), buffer.position(), buffer.limit()), size); - } else if (memory.isArray()) { - buffer.put(memory.toArrayLongBuffer()); - } else { - slowCopyTo(dst, size); - } - return LongRawDataBuffer.this; - } - - @Override - public LongDataBuffer visit(long address, long length, long scale) { - memory.copyTo(UnsafeMemoryHandle.fromAddress(address, length, scale), size); - return LongRawDataBuffer.this; - } - - @Override - public LongDataBuffer fallback() { - if (dst instanceof LongDataBuffer) { - LongDataBuffer longDst = (LongDataBuffer)dst; - for (long idx = 0L; idx < size; ++idx) { - longDst.setLong(getLong(idx), idx); + return dst.accept( + new DataStorageVisitor() { + + @Override + public LongDataBuffer visit(LongBuffer buffer) { + if (buffer.hasArray()) { + memory.copyTo( + UnsafeMemoryHandle.fromArray(buffer.array(), buffer.position(), buffer.limit()), + size); + } else if (memory.isArray()) { + buffer.put(memory.toArrayLongBuffer()); + } else { + slowCopyTo(dst, size); + } + return LongRawDataBuffer.this; + } + + @Override + public LongDataBuffer visit(long address, long length, long scale) { + memory.copyTo(UnsafeMemoryHandle.fromAddress(address, length, scale), size); + return LongRawDataBuffer.this; } - return LongRawDataBuffer.this; - } - return slowCopyTo(dst, size); - } - }); + + @Override + public LongDataBuffer fallback() { + if (dst instanceof LongDataBuffer) { + LongDataBuffer longDst = (LongDataBuffer) dst; + for (long idx = 0L; idx < size; ++idx) { + longDst.setLong(getLong(idx), idx); + } + return LongRawDataBuffer.this; + } + return slowCopyTo(dst, size); + } + }); } @Override @@ -112,30 +115,31 @@ public boolean equals(Object obj) { if (!(obj instanceof LongDataBuffer)) { return super.equals(obj); } - LongDataBuffer other = (LongDataBuffer)obj; + LongDataBuffer other = (LongDataBuffer) obj; if (size() != other.size()) { return false; } - return other.accept(new DataStorageVisitor() { - - @Override - public Boolean visit(LongBuffer buffer) { - if (memory.isArray()) { - return buffer.equals(memory.toArrayLongBuffer()); - } - return fallback(); - } - - @Override - public Boolean fallback() { - for (long idx = 0L; idx < size(); ++idx) { - if (other.getLong(idx) != getLong(idx)) { - return false; + return other.accept( + new DataStorageVisitor() { + + @Override + public Boolean visit(LongBuffer buffer) { + if (memory.isArray()) { + return buffer.equals(memory.toArrayLongBuffer()); + } + return fallback(); + } + + @Override + public Boolean fallback() { + for (long idx = 0L; idx < size(); ++idx) { + if (other.getLong(idx) != getLong(idx)) { + return false; + } + } + return true; } - } - return true; - } - }); + }); } @Override diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/RawDataBufferFactory.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/RawDataBufferFactory.java index 7253b239af2..b185eefa6b5 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/RawDataBufferFactory.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/RawDataBufferFactory.java @@ -17,7 +17,6 @@ package org.tensorflow.ndarray.impl.buffer.raw; -import org.tensorflow.ndarray.impl.buffer.Validator; import org.tensorflow.ndarray.buffer.BooleanDataBuffer; import org.tensorflow.ndarray.buffer.ByteDataBuffer; import org.tensorflow.ndarray.buffer.DoubleDataBuffer; @@ -25,10 +24,9 @@ import org.tensorflow.ndarray.buffer.IntDataBuffer; import org.tensorflow.ndarray.buffer.LongDataBuffer; import org.tensorflow.ndarray.buffer.ShortDataBuffer; +import org.tensorflow.ndarray.impl.buffer.Validator; -/** - * Factory of raw data buffers - */ +/** Factory of raw data buffers */ public class RawDataBufferFactory { public static boolean canBeUsed() { @@ -86,7 +84,8 @@ protected static BooleanDataBuffer mapNativeBooleans(long address, long size, bo throw new IllegalStateException("Raw data buffers are not available"); } Validator.createArgs(size, MAX_64BITS); - return new BooleanRawDataBuffer(UnsafeMemoryHandle.fromAddress(address, size, Byte.BYTES), readOnly); + return new BooleanRawDataBuffer( + UnsafeMemoryHandle.fromAddress(address, size, Byte.BYTES), readOnly); } protected static ByteDataBuffer mapNativeBytes(long address, long size, boolean readOnly) { @@ -94,7 +93,8 @@ protected static ByteDataBuffer mapNativeBytes(long address, long size, boolean throw new IllegalStateException("Raw data buffers are not available"); } Validator.createArgs(size, MAX_64BITS); - return new ByteRawDataBuffer(UnsafeMemoryHandle.fromAddress(address, size, Byte.BYTES), readOnly); + return new ByteRawDataBuffer( + UnsafeMemoryHandle.fromAddress(address, size, Byte.BYTES), readOnly); } protected static DoubleDataBuffer mapNativeDoubles(long address, long size, boolean readOnly) { @@ -102,7 +102,8 @@ protected static DoubleDataBuffer mapNativeDoubles(long address, long size, bool throw new IllegalStateException("Raw data buffers are not available"); } Validator.createArgs(size, MAX_64BITS); - return new DoubleRawDataBuffer(UnsafeMemoryHandle.fromAddress(address, size, Double.BYTES), readOnly); + return new DoubleRawDataBuffer( + UnsafeMemoryHandle.fromAddress(address, size, Double.BYTES), readOnly); } protected static FloatDataBuffer mapNativeFloats(long address, long size, boolean readOnly) { @@ -110,7 +111,8 @@ protected static FloatDataBuffer mapNativeFloats(long address, long size, boolea throw new IllegalStateException("Raw data buffers are not available"); } Validator.createArgs(size, MAX_64BITS); - return new FloatRawDataBuffer(UnsafeMemoryHandle.fromAddress(address, size, Float.BYTES), readOnly); + return new FloatRawDataBuffer( + UnsafeMemoryHandle.fromAddress(address, size, Float.BYTES), readOnly); } protected static IntDataBuffer mapNativeInts(long address, long size, boolean readOnly) { @@ -118,7 +120,8 @@ protected static IntDataBuffer mapNativeInts(long address, long size, boolean re throw new IllegalStateException("Raw data buffers are not available"); } Validator.createArgs(size, MAX_64BITS); - return new IntRawDataBuffer(UnsafeMemoryHandle.fromAddress(address, size, Integer.BYTES), readOnly); + return new IntRawDataBuffer( + UnsafeMemoryHandle.fromAddress(address, size, Integer.BYTES), readOnly); } protected static LongDataBuffer mapNativeLongs(long address, long size, boolean readOnly) { @@ -126,7 +129,8 @@ protected static LongDataBuffer mapNativeLongs(long address, long size, boolean throw new IllegalStateException("Raw data buffers are not available"); } Validator.createArgs(size, MAX_64BITS); - return new LongRawDataBuffer(UnsafeMemoryHandle.fromAddress(address, size, Long.BYTES), readOnly); + return new LongRawDataBuffer( + UnsafeMemoryHandle.fromAddress(address, size, Long.BYTES), readOnly); } protected static ShortDataBuffer mapNativeShorts(long address, long size, boolean readOnly) { @@ -134,7 +138,8 @@ protected static ShortDataBuffer mapNativeShorts(long address, long size, boolea throw new IllegalStateException("Raw data buffers are not available"); } Validator.createArgs(size, MAX_64BITS); - return new ShortRawDataBuffer(UnsafeMemoryHandle.fromAddress(address, size, Short.BYTES), readOnly); + return new ShortRawDataBuffer( + UnsafeMemoryHandle.fromAddress(address, size, Short.BYTES), readOnly); } /* diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/RawDataBufferWindow.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/RawDataBufferWindow.java index dc18a6caa6e..0b5aa464ea3 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/RawDataBufferWindow.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/RawDataBufferWindow.java @@ -11,7 +11,7 @@ public void offset(long offset) { } > RawDataBufferWindow(R windowBuffer, long bufferLimit) { - super((B)windowBuffer, bufferLimit); + super((B) windowBuffer, bufferLimit); this.windowMemory = windowBuffer.memory; } diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/ShortRawDataBuffer.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/ShortRawDataBuffer.java index 80f9c289852..df3320ff4bd 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/ShortRawDataBuffer.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/ShortRawDataBuffer.java @@ -18,10 +18,10 @@ package org.tensorflow.ndarray.impl.buffer.raw; import java.nio.ShortBuffer; -import org.tensorflow.ndarray.impl.buffer.Validator; import org.tensorflow.ndarray.buffer.DataBuffer; import org.tensorflow.ndarray.buffer.DataStorageVisitor; import org.tensorflow.ndarray.buffer.ShortDataBuffer; +import org.tensorflow.ndarray.impl.buffer.Validator; final class ShortRawDataBuffer extends AbstractRawDataBuffer implements ShortDataBuffer { @@ -62,38 +62,41 @@ public ShortDataBuffer write(short[] src, int offset, int length) { @Override public ShortDataBuffer copyTo(DataBuffer dst, long size) { Validator.copyToArgs(this, dst, size); - return dst.accept(new DataStorageVisitor() { - - @Override - public ShortDataBuffer visit(ShortBuffer buffer) { - if (buffer.hasArray()) { - memory.copyTo(UnsafeMemoryHandle.fromArray(buffer.array(), buffer.position(), buffer.limit()), size); - } else if (memory.isArray()) { - buffer.put(memory.toArrayShortBuffer()); - } else { - slowCopyTo(dst, size); - } - return ShortRawDataBuffer.this; - } - - @Override - public ShortDataBuffer visit(long address, long length, long scale) { - memory.copyTo(UnsafeMemoryHandle.fromAddress(address, length, scale), size); - return ShortRawDataBuffer.this; - } - - @Override - public ShortDataBuffer fallback() { - if (dst instanceof ShortDataBuffer) { - ShortDataBuffer shortDst = (ShortDataBuffer)dst; - for (long idx = 0L; idx < size; ++idx) { - shortDst.setShort(getShort(idx), idx); + return dst.accept( + new DataStorageVisitor() { + + @Override + public ShortDataBuffer visit(ShortBuffer buffer) { + if (buffer.hasArray()) { + memory.copyTo( + UnsafeMemoryHandle.fromArray(buffer.array(), buffer.position(), buffer.limit()), + size); + } else if (memory.isArray()) { + buffer.put(memory.toArrayShortBuffer()); + } else { + slowCopyTo(dst, size); + } + return ShortRawDataBuffer.this; + } + + @Override + public ShortDataBuffer visit(long address, long length, long scale) { + memory.copyTo(UnsafeMemoryHandle.fromAddress(address, length, scale), size); + return ShortRawDataBuffer.this; } - return ShortRawDataBuffer.this; - } - return slowCopyTo(dst, size); - } - }); + + @Override + public ShortDataBuffer fallback() { + if (dst instanceof ShortDataBuffer) { + ShortDataBuffer shortDst = (ShortDataBuffer) dst; + for (long idx = 0L; idx < size; ++idx) { + shortDst.setShort(getShort(idx), idx); + } + return ShortRawDataBuffer.this; + } + return slowCopyTo(dst, size); + } + }); } @Override @@ -112,30 +115,31 @@ public boolean equals(Object obj) { if (!(obj instanceof ShortDataBuffer)) { return super.equals(obj); } - ShortDataBuffer other = (ShortDataBuffer)obj; + ShortDataBuffer other = (ShortDataBuffer) obj; if (size() != other.size()) { return false; } - return other.accept(new DataStorageVisitor() { - - @Override - public Boolean visit(ShortBuffer buffer) { - if (memory.isArray()) { - return buffer.equals(memory.toArrayShortBuffer()); - } - return fallback(); - } - - @Override - public Boolean fallback() { - for (long idx = 0L; idx < size(); ++idx) { - if (other.getShort(idx) != getShort(idx)) { - return false; + return other.accept( + new DataStorageVisitor() { + + @Override + public Boolean visit(ShortBuffer buffer) { + if (memory.isArray()) { + return buffer.equals(memory.toArrayShortBuffer()); + } + return fallback(); + } + + @Override + public Boolean fallback() { + for (long idx = 0L; idx < size(); ++idx) { + if (other.getShort(idx) != getShort(idx)) { + return false; + } + } + return true; } - } - return true; - } - }); + }); } @Override diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/UnsafeMemoryHandle.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/UnsafeMemoryHandle.java index bd61e53a128..e2022cb9dc7 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/UnsafeMemoryHandle.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/UnsafeMemoryHandle.java @@ -101,7 +101,8 @@ void setLong(long value, long index) { } void copyTo(UnsafeMemoryHandle memory, long length) { - UnsafeReference.UNSAFE.copyMemory(object, byteOffset, memory.object, memory.byteOffset, length * scale); + UnsafeReference.UNSAFE.copyMemory( + object, byteOffset, memory.object, memory.byteOffset, length * scale); } UnsafeMemoryHandle offset(long index) { @@ -134,35 +135,53 @@ boolean isArray() { @SuppressWarnings("unchecked") A array() { - return (A)object; + return (A) object; } int arrayOffset(Class arrayClass) { - return (int)((byteOffset - UnsafeReference.UNSAFE.arrayBaseOffset(arrayClass)) / scale); + return (int) ((byteOffset - UnsafeReference.UNSAFE.arrayBaseOffset(arrayClass)) / scale); } ByteBuffer toArrayByteBuffer() { - return ByteBuffer.wrap((byte[])object, (int) byteOffset - UnsafeReference.UNSAFE.arrayBaseOffset(byte[].class), (int)size); + return ByteBuffer.wrap( + (byte[]) object, + (int) byteOffset - UnsafeReference.UNSAFE.arrayBaseOffset(byte[].class), + (int) size); } ShortBuffer toArrayShortBuffer() { - return ShortBuffer.wrap((short[])object, (int)((byteOffset - UnsafeReference.UNSAFE.arrayBaseOffset(short[].class)) / scale), (int)size); + return ShortBuffer.wrap( + (short[]) object, + (int) ((byteOffset - UnsafeReference.UNSAFE.arrayBaseOffset(short[].class)) / scale), + (int) size); } IntBuffer toArrayIntBuffer() { - return IntBuffer.wrap((int[])object, (int)((byteOffset - UnsafeReference.UNSAFE.arrayBaseOffset(int[].class)) / scale), (int)size); + return IntBuffer.wrap( + (int[]) object, + (int) ((byteOffset - UnsafeReference.UNSAFE.arrayBaseOffset(int[].class)) / scale), + (int) size); } LongBuffer toArrayLongBuffer() { - return LongBuffer.wrap((long[])object, (int)((byteOffset - UnsafeReference.UNSAFE.arrayBaseOffset(long[].class)) / scale), (int)size); + return LongBuffer.wrap( + (long[]) object, + (int) ((byteOffset - UnsafeReference.UNSAFE.arrayBaseOffset(long[].class)) / scale), + (int) size); } FloatBuffer toArrayFloatBuffer() { - return FloatBuffer.wrap((float[])object, (int)((byteOffset - UnsafeReference.UNSAFE.arrayBaseOffset(float[].class)) / scale), (int)size); + return FloatBuffer.wrap( + (float[]) object, + (int) ((byteOffset - UnsafeReference.UNSAFE.arrayBaseOffset(float[].class)) / scale), + (int) size); } DoubleBuffer toArrayDoubleBuffer() { - return DoubleBuffer.wrap((double[])object, (int)((byteOffset - UnsafeReference.UNSAFE.arrayBaseOffset(double[].class)) / scale), (int)size); + return DoubleBuffer.wrap( + (double[]) object, + (int) ((byteOffset - UnsafeReference.UNSAFE.arrayBaseOffset(double[].class)) / scale), + (int) size); } final Object object; diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/UnsafeReference.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/UnsafeReference.java index a8cc16d94d2..d0a4e1a3e89 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/UnsafeReference.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/UnsafeReference.java @@ -50,13 +50,19 @@ static boolean isAvailable() { checkMethod(clazz, "putDouble", Object.class, long.class, double.class); checkMethod(clazz, "getBoolean", Object.class, long.class); checkMethod(clazz, "putBoolean", Object.class, long.class, boolean.class); - checkMethod(clazz, "copyMemory", Object.class, long.class, Object.class, long.class, long.class); + checkMethod( + clazz, "copyMemory", Object.class, long.class, Object.class, long.class, long.class); checkMethod(clazz, "arrayBaseOffset", Class.class); checkMethod(clazz, "arrayIndexScale", Class.class); unsafe = (Unsafe) instance; } - } catch (ClassNotFoundException | NoSuchMethodException | NoSuchFieldException | SecurityException | IllegalAccessException | ClassCastException ex) { + } catch (ClassNotFoundException + | NoSuchMethodException + | NoSuchFieldException + | SecurityException + | IllegalAccessException + | ClassCastException ex) { // Do nothing, keep unsafe as null } UNSAFE = unsafe; @@ -65,10 +71,13 @@ static boolean isAvailable() { /** * Validate that this Unsafe instance exposes this method * - * ErrorProne does not like that we do nothing with the returned method... but there is nothing to do with it, so disable the check + *

ErrorProne does not like that we do nothing with the returned method... but there is nothing + * to do with it, so disable the check */ @SuppressWarnings("ReturnValueIgnored") - private static void checkMethod(Class unsafeClass, String methodName, Class... parameterTypes) throws NoSuchMethodException { + private static void checkMethod( + Class unsafeClass, String methodName, Class... parameterTypes) + throws NoSuchMethodException { unsafeClass.getDeclaredMethod(methodName, parameterTypes); } } diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/AbstractDenseNdArray.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/AbstractDenseNdArray.java index a22518d28f6..399e45d2934 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/AbstractDenseNdArray.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/AbstractDenseNdArray.java @@ -1,33 +1,33 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.dense; import org.tensorflow.ndarray.NdArray; import org.tensorflow.ndarray.NdArraySequence; import org.tensorflow.ndarray.Shape; -import org.tensorflow.ndarray.impl.AbstractNdArray; -import org.tensorflow.ndarray.impl.dimension.RelativeDimensionalSpace; -import org.tensorflow.ndarray.impl.sequence.FastElementSequence; -import org.tensorflow.ndarray.index.Index; import org.tensorflow.ndarray.buffer.DataBuffer; import org.tensorflow.ndarray.buffer.DataBufferWindow; +import org.tensorflow.ndarray.impl.AbstractNdArray; import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; -import org.tensorflow.ndarray.impl.sequence.SlicingElementSequence; +import org.tensorflow.ndarray.impl.dimension.RelativeDimensionalSpace; +import org.tensorflow.ndarray.impl.sequence.FastElementSequence; import org.tensorflow.ndarray.impl.sequence.SingleElementSequence; +import org.tensorflow.ndarray.impl.sequence.SlicingElementSequence; +import org.tensorflow.ndarray.index.Index; @SuppressWarnings("unchecked") public abstract class AbstractDenseNdArray> extends AbstractNdArray { @@ -35,15 +35,19 @@ public abstract class AbstractDenseNdArray> extends Abst @Override public NdArraySequence elements(int dimensionIdx) { if (dimensionIdx >= shape().numDimensions()) { - throw new IllegalArgumentException("Cannot iterate elements in dimension '" + dimensionIdx + - "' of array with shape " + shape()); + throw new IllegalArgumentException( + "Cannot iterate elements in dimension '" + + dimensionIdx + + "' of array with shape " + + shape()); } if (rank() == 0 && dimensionIdx < 0) { return new SingleElementSequence<>(this); } DimensionalSpace elemDims = dimensions().from(dimensionIdx + 1); try { - DataBufferWindow> elemWindow = buffer().window(elemDims.physicalSize()); + DataBufferWindow> elemWindow = + buffer().window(elemDims.physicalSize()); U element = instantiateView(elemWindow.buffer(), elemDims); return new FastElementSequence(this, dimensionIdx, element, elemWindow); } catch (UnsupportedOperationException e) { @@ -55,10 +59,11 @@ public NdArraySequence elements(int dimensionIdx) { @Override public U withShape(Shape shape) { if (shape == null || shape.isUnknown() || shape.size() != this.shape().size()) { - throw new IllegalArgumentException("Shape " + shape + " cannot be used to reshape ndarray of shape " + this.shape()); + throw new IllegalArgumentException( + "Shape " + shape + " cannot be used to reshape ndarray of shape " + this.shape()); } if (shape.equals(this.shape())) { - return (U)this; + return (U) this; } return instantiateView(buffer(), DimensionalSpace.create(shape)); } @@ -91,27 +96,27 @@ public T getObject(long... coords) { @Override public U set(NdArray src, long... coordinates) { src.copyTo((coordinates == null || coordinates.length == 0) ? this : get(coordinates)); - return (U)this; + return (U) this; } @Override public U setObject(T value, long... coords) { buffer().setObject(value, positionOf(coords, true)); - return (U)this; + return (U) this; } @Override public U copyTo(DataBuffer dst) { Validator.copyToBufferArgs(this, dst); DataTransfer.execute(buffer(), dimensions(), dst, DataTransfer::ofValue); - return (U)this; + return (U) this; } @Override public U copyFrom(DataBuffer src) { Validator.copyFromBufferArgs(this, src); DataTransfer.execute(src, buffer(), dimensions(), DataTransfer::ofValue); - return (U)this; + return (U) this; } @Override @@ -134,7 +139,7 @@ public boolean equals(Object obj) { if (!(obj instanceof AbstractDenseNdArray)) { return super.equals(obj); } - AbstractDenseNdArray other = (AbstractDenseNdArray)obj; + AbstractDenseNdArray other = (AbstractDenseNdArray) obj; if (dimensions().isSegmented() || other.dimensions().isSegmented()) { return slowEquals(other); } @@ -146,6 +151,7 @@ public boolean equals(Object obj) { /** * A String showing the type and shape of this dense ndarray. + * * @return A string containing the type and shape. */ @Override @@ -157,7 +163,7 @@ protected AbstractDenseNdArray(DimensionalSpace dimensions) { super(dimensions); } - abstract protected DataBuffer buffer(); + protected abstract DataBuffer buffer(); abstract U instantiateView(DataBuffer buffer, DimensionalSpace dimensions); @@ -172,7 +178,7 @@ long positionOf(long[] coords, boolean isValue) { @Override protected void slowCopyTo(NdArray array) { if (array instanceof AbstractDenseNdArray) { - AbstractDenseNdArray dst = (AbstractDenseNdArray)array; + AbstractDenseNdArray dst = (AbstractDenseNdArray) array; long offset = 0L; for (NdArray s : scalars()) { dst.buffer().setObject(s.getObject(), offset++); diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/BooleanDenseNdArray.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/BooleanDenseNdArray.java index c3df6e8d4f6..ea428b02ca2 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/BooleanDenseNdArray.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/BooleanDenseNdArray.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.dense; import org.tensorflow.ndarray.BooleanNdArray; @@ -46,8 +46,13 @@ public BooleanNdArray setBoolean(boolean value, long... indices) { public BooleanNdArray copyTo(NdArray dst) { Validator.copyToNdArrayArgs(this, dst); if (dst instanceof BooleanDenseNdArray) { - BooleanDenseNdArray booleanDst = (BooleanDenseNdArray)dst; - DataTransfer.execute(buffer, dimensions(), booleanDst.buffer, booleanDst.dimensions(), DataTransfer::ofBoolean); + BooleanDenseNdArray booleanDst = (BooleanDenseNdArray) dst; + DataTransfer.execute( + buffer, + dimensions(), + booleanDst.buffer, + booleanDst.dimensions(), + DataTransfer::ofBoolean); } else { slowCopyTo(dst); } @@ -74,7 +79,7 @@ protected BooleanDenseNdArray(BooleanDataBuffer buffer, Shape shape) { @Override BooleanDenseNdArray instantiateView(DataBuffer buffer, DimensionalSpace dimensions) { - return new BooleanDenseNdArray((BooleanDataBuffer)buffer, dimensions); + return new BooleanDenseNdArray((BooleanDataBuffer) buffer, dimensions); } @Override @@ -88,4 +93,4 @@ private BooleanDenseNdArray(BooleanDataBuffer buffer, DimensionalSpace dimension super(dimensions); this.buffer = buffer; } -} \ No newline at end of file +} diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ByteDenseNdArray.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ByteDenseNdArray.java index 1f01ce6f169..a8aff33063a 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ByteDenseNdArray.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ByteDenseNdArray.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.dense; import org.tensorflow.ndarray.ByteNdArray; @@ -46,8 +46,9 @@ public ByteNdArray setByte(byte value, long... indices) { public ByteNdArray copyTo(NdArray dst) { Validator.copyToNdArrayArgs(this, dst); if (dst instanceof ByteDenseNdArray) { - ByteDenseNdArray byteDst = (ByteDenseNdArray)dst; - DataTransfer.execute(buffer, dimensions(), byteDst.buffer, byteDst.dimensions(), DataTransfer::ofByte); + ByteDenseNdArray byteDst = (ByteDenseNdArray) dst; + DataTransfer.execute( + buffer, dimensions(), byteDst.buffer, byteDst.dimensions(), DataTransfer::ofByte); } else { slowCopyTo(dst); } @@ -74,7 +75,7 @@ protected ByteDenseNdArray(ByteDataBuffer buffer, Shape shape) { @Override ByteDenseNdArray instantiateView(DataBuffer buffer, DimensionalSpace dimensions) { - return new ByteDenseNdArray((ByteDataBuffer)buffer, dimensions); + return new ByteDenseNdArray((ByteDataBuffer) buffer, dimensions); } @Override @@ -88,4 +89,4 @@ private ByteDenseNdArray(ByteDataBuffer buffer, DimensionalSpace dimensions) { super(dimensions); this.buffer = buffer; } -} \ No newline at end of file +} diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DataTransfer.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DataTransfer.java index d3afa223231..aa3c874e021 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DataTransfer.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DataTransfer.java @@ -63,27 +63,34 @@ static void ofShort(ShortDataBuffer srcBuf, long srcIdx, ShortDataBuffer dstBuf, dstBuf.setShort(srcBuf.getShort(srcIdx), dstIdx); } - static void ofBoolean(BooleanDataBuffer srcBuf, long srcIdx, BooleanDataBuffer dstBuf, long dstIdx) { + static void ofBoolean( + BooleanDataBuffer srcBuf, long srcIdx, BooleanDataBuffer dstBuf, long dstIdx) { dstBuf.setBoolean(srcBuf.getBoolean(srcIdx), dstIdx); } - static > void execute(B srcBuffer, DimensionalSpace srcDimensions, B dstBuffer, DimensionalSpace dstDimensions, OfValue valueTransfer) { + static > void execute( + B srcBuffer, + DimensionalSpace srcDimensions, + B dstBuffer, + DimensionalSpace dstDimensions, + OfValue valueTransfer) { if (srcDimensions.isSegmented() || dstDimensions.isSegmented()) { - int segmentationIdx = Math.max(srcDimensions.segmentationIdx(), dstDimensions.segmentationIdx()); + int segmentationIdx = + Math.max(srcDimensions.segmentationIdx(), dstDimensions.segmentationIdx()); copyByElement( srcBuffer, PositionIterator.create(srcDimensions, segmentationIdx), dstBuffer, PositionIterator.create(dstDimensions, segmentationIdx), srcDimensions.get(segmentationIdx).elementSize(), - valueTransfer - ); + valueTransfer); } else { srcBuffer.copyTo(dstBuffer, srcDimensions.physicalSize()); } } - static > void execute(B srcBuffer, B dstBuffer, DimensionalSpace dstDimensions, OfValue valueTransfer) { + static > void execute( + B srcBuffer, B dstBuffer, DimensionalSpace dstDimensions, OfValue valueTransfer) { if (dstDimensions.isSegmented()) { long elementSize = dstDimensions.get(dstDimensions.segmentationIdx()).elementSize(); copyByElement( @@ -92,14 +99,14 @@ static > void execute(B srcBuffer, B dstBuffer, Dimen dstBuffer, PositionIterator.create(dstDimensions, dstDimensions.segmentationIdx()), elementSize, - valueTransfer - ); + valueTransfer); } else { srcBuffer.copyTo(dstBuffer, dstDimensions.physicalSize()); } } - static > void execute(B srcBuffer, DimensionalSpace srcDimensions, B dstBuffer, OfValue valueTransfer) { + static > void execute( + B srcBuffer, DimensionalSpace srcDimensions, B dstBuffer, OfValue valueTransfer) { if (srcDimensions.isSegmented()) { long elementSize = srcDimensions.get(srcDimensions.segmentationIdx()).elementSize(); copyByElement( @@ -108,8 +115,7 @@ static > void execute(B srcBuffer, DimensionalSpace s dstBuffer, PositionIterator.sequence(elementSize, dstBuffer.size()), elementSize, - valueTransfer - ); + valueTransfer); } else { srcBuffer.copyTo(dstBuffer, srcDimensions.physicalSize()); } @@ -121,15 +127,16 @@ private static > void copyByElement( B dstBuffer, PositionIterator dstIterator, long elementSize, - OfValue valueTransfer - ) { + OfValue valueTransfer) { if (elementSize == 1) { while (srcIterator.hasNext()) { valueTransfer.copy(srcBuffer, srcIterator.nextLong(), dstBuffer, dstIterator.nextLong()); } } else { while (srcIterator.hasNext()) { - srcBuffer.offset(srcIterator.nextLong()).copyTo(dstBuffer.offset(dstIterator.nextLong()), elementSize); + srcBuffer + .offset(srcIterator.nextLong()) + .copyTo(dstBuffer.offset(dstIterator.nextLong()), elementSize); } } } diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DenseNdArray.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DenseNdArray.java index 18b37552739..1006b5c05c5 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DenseNdArray.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DenseNdArray.java @@ -1,24 +1,24 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.dense; +import org.tensorflow.ndarray.NdArray; import org.tensorflow.ndarray.Shape; import org.tensorflow.ndarray.buffer.DataBuffer; -import org.tensorflow.ndarray.NdArray; import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; public class DenseNdArray extends AbstractDenseNdArray> { @@ -32,8 +32,9 @@ public static NdArray wrap(DataBuffer buffer, Shape shape) { public NdArray copyTo(NdArray dst) { Validator.copyToNdArrayArgs(this, dst); if (dst instanceof DenseNdArray) { - DenseNdArray denseDst = (DenseNdArray)dst; - DataTransfer.execute(buffer, dimensions(), denseDst.buffer, denseDst.dimensions(), DataTransfer::ofValue); + DenseNdArray denseDst = (DenseNdArray) dst; + DataTransfer.execute( + buffer, dimensions(), denseDst.buffer, denseDst.dimensions(), DataTransfer::ofValue); } else { slowCopyTo(dst); } @@ -60,4 +61,4 @@ private DenseNdArray(DataBuffer buffer, DimensionalSpace dimensions) { super(dimensions); this.buffer = buffer; } -} \ No newline at end of file +} diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DoubleDenseNdArray.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DoubleDenseNdArray.java index d983d16ac50..4e9883c9c80 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DoubleDenseNdArray.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DoubleDenseNdArray.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.dense; import org.tensorflow.ndarray.DoubleNdArray; @@ -46,8 +46,9 @@ public DoubleNdArray setDouble(double value, long... indices) { public DoubleNdArray copyTo(NdArray dst) { Validator.copyToNdArrayArgs(this, dst); if (dst instanceof DoubleDenseNdArray) { - DoubleDenseNdArray doubleDst = (DoubleDenseNdArray)dst; - DataTransfer.execute(buffer, dimensions(), doubleDst.buffer, doubleDst.dimensions(), DataTransfer::ofDouble); + DoubleDenseNdArray doubleDst = (DoubleDenseNdArray) dst; + DataTransfer.execute( + buffer, dimensions(), doubleDst.buffer, doubleDst.dimensions(), DataTransfer::ofDouble); } else { slowCopyTo(dst); } @@ -74,7 +75,7 @@ protected DoubleDenseNdArray(DoubleDataBuffer buffer, Shape shape) { @Override DoubleDenseNdArray instantiateView(DataBuffer buffer, DimensionalSpace dimensions) { - return new DoubleDenseNdArray((DoubleDataBuffer)buffer, dimensions); + return new DoubleDenseNdArray((DoubleDataBuffer) buffer, dimensions); } @Override @@ -88,4 +89,4 @@ private DoubleDenseNdArray(DoubleDataBuffer buffer, DimensionalSpace dimensions) super(dimensions); this.buffer = buffer; } -} \ No newline at end of file +} diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/FloatDenseNdArray.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/FloatDenseNdArray.java index 779e047e3f0..74369bcf1bc 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/FloatDenseNdArray.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/FloatDenseNdArray.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.dense; import org.tensorflow.ndarray.FloatNdArray; @@ -46,8 +46,9 @@ public FloatNdArray setFloat(float value, long... indices) { public FloatNdArray copyTo(NdArray dst) { Validator.copyToNdArrayArgs(this, dst); if (dst instanceof FloatDenseNdArray) { - FloatDenseNdArray floatDst = (FloatDenseNdArray)dst; - DataTransfer.execute(buffer, dimensions(), floatDst.buffer, floatDst.dimensions(), DataTransfer::ofFloat); + FloatDenseNdArray floatDst = (FloatDenseNdArray) dst; + DataTransfer.execute( + buffer, dimensions(), floatDst.buffer, floatDst.dimensions(), DataTransfer::ofFloat); } else { slowCopyTo(dst); } diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/IntDenseNdArray.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/IntDenseNdArray.java index 4e2183d8625..e3210b18a7f 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/IntDenseNdArray.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/IntDenseNdArray.java @@ -1,26 +1,26 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.dense; +import org.tensorflow.ndarray.IntNdArray; +import org.tensorflow.ndarray.NdArray; import org.tensorflow.ndarray.Shape; import org.tensorflow.ndarray.buffer.DataBuffer; import org.tensorflow.ndarray.buffer.IntDataBuffer; -import org.tensorflow.ndarray.IntNdArray; -import org.tensorflow.ndarray.NdArray; import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; public class IntDenseNdArray extends AbstractDenseNdArray @@ -46,8 +46,9 @@ public IntNdArray setInt(int value, long... indices) { public IntNdArray copyTo(NdArray dst) { Validator.copyToNdArrayArgs(this, dst); if (dst instanceof IntDenseNdArray) { - IntDenseNdArray intDst = (IntDenseNdArray)dst; - DataTransfer.execute(buffer, dimensions(), intDst.buffer, intDst.dimensions(), DataTransfer::ofInt); + IntDenseNdArray intDst = (IntDenseNdArray) dst; + DataTransfer.execute( + buffer, dimensions(), intDst.buffer, intDst.dimensions(), DataTransfer::ofInt); } else { slowCopyTo(dst); } @@ -74,7 +75,7 @@ protected IntDenseNdArray(IntDataBuffer buffer, Shape shape) { @Override IntDenseNdArray instantiateView(DataBuffer buffer, DimensionalSpace dimensions) { - return new IntDenseNdArray((IntDataBuffer)buffer, dimensions); + return new IntDenseNdArray((IntDataBuffer) buffer, dimensions); } @Override @@ -88,4 +89,4 @@ private IntDenseNdArray(IntDataBuffer buffer, DimensionalSpace dimensions) { super(dimensions); this.buffer = buffer; } -} \ No newline at end of file +} diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/LongDenseNdArray.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/LongDenseNdArray.java index cde91a3dc3d..7018f756c4f 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/LongDenseNdArray.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/LongDenseNdArray.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.dense; import org.tensorflow.ndarray.LongNdArray; @@ -46,8 +46,9 @@ public LongNdArray setLong(long value, long... indices) { public LongNdArray copyTo(NdArray dst) { Validator.copyToNdArrayArgs(this, dst); if (dst instanceof LongDenseNdArray) { - LongDenseNdArray longDst = (LongDenseNdArray)dst; - DataTransfer.execute(buffer, dimensions(), longDst.buffer, longDst.dimensions(), DataTransfer::ofLong); + LongDenseNdArray longDst = (LongDenseNdArray) dst; + DataTransfer.execute( + buffer, dimensions(), longDst.buffer, longDst.dimensions(), DataTransfer::ofLong); } else { slowCopyTo(dst); } @@ -74,7 +75,7 @@ protected LongDenseNdArray(LongDataBuffer buffer, Shape shape) { @Override LongDenseNdArray instantiateView(DataBuffer buffer, DimensionalSpace dimensions) { - return new LongDenseNdArray((LongDataBuffer)buffer, dimensions); + return new LongDenseNdArray((LongDataBuffer) buffer, dimensions); } @Override @@ -88,4 +89,4 @@ private LongDenseNdArray(LongDataBuffer buffer, DimensionalSpace dimensions) { super(dimensions); this.buffer = buffer; } -} \ No newline at end of file +} diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ShortDenseNdArray.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ShortDenseNdArray.java index 8d0dfc86c8f..3aa2880adae 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ShortDenseNdArray.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ShortDenseNdArray.java @@ -1,24 +1,24 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.dense; import org.tensorflow.ndarray.NdArray; -import org.tensorflow.ndarray.ShortNdArray; import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.ShortNdArray; import org.tensorflow.ndarray.buffer.DataBuffer; import org.tensorflow.ndarray.buffer.ShortDataBuffer; import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; @@ -46,8 +46,9 @@ public ShortNdArray setShort(short value, long... indices) { public ShortNdArray copyTo(NdArray dst) { Validator.copyToNdArrayArgs(this, dst); if (dst instanceof ShortDenseNdArray) { - ShortDenseNdArray shortDst = (ShortDenseNdArray)dst; - DataTransfer.execute(buffer, dimensions(), shortDst.buffer, shortDst.dimensions(), DataTransfer::ofShort); + ShortDenseNdArray shortDst = (ShortDenseNdArray) dst; + DataTransfer.execute( + buffer, dimensions(), shortDst.buffer, shortDst.dimensions(), DataTransfer::ofShort); } else { slowCopyTo(dst); } @@ -74,7 +75,7 @@ protected ShortDenseNdArray(ShortDataBuffer buffer, Shape shape) { @Override ShortDenseNdArray instantiateView(DataBuffer buffer, DimensionalSpace dimensions) { - return new ShortDenseNdArray((ShortDataBuffer)buffer, dimensions); + return new ShortDenseNdArray((ShortDataBuffer) buffer, dimensions); } @Override @@ -88,4 +89,4 @@ private ShortDenseNdArray(ShortDataBuffer buffer, DimensionalSpace dimensions) { super(dimensions); this.buffer = buffer; } -} \ No newline at end of file +} diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/Validator.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/Validator.java index b0bcae252fb..3d2e9c5ed9b 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/Validator.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/Validator.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.dense; import org.tensorflow.ndarray.IllegalRankException; @@ -23,8 +23,7 @@ final class Validator extends org.tensorflow.ndarray.impl.Validator { - static void coordinates(DimensionalSpace dimensions, long[] coords, - boolean isValue) { + static void coordinates(DimensionalSpace dimensions, long[] coords, boolean isValue) { if (coords.length > dimensions.numDimensions()) { throw new IndexOutOfBoundsException(); } @@ -42,7 +41,8 @@ static void denseShape(DataBuffer buffer, Shape shape) { } if (buffer.size() < shape.size()) { throw new IllegalArgumentException("Buffer size is smaller than the shape size"); - }; + } + ; } private Validator() {} diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/AbstractDimension.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/AbstractDimension.java index f2a0fb05b6e..4c038ef581e 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/AbstractDimension.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/AbstractDimension.java @@ -1,36 +1,32 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.dimension; abstract class AbstractDimension implements Dimension { - /** - * Dimensions are known to be equal if they have the same number of elements - */ + /** Dimensions are known to be equal if they have the same number of elements */ @Override public int hashCode() { final int prime = 17; long numElements = numElements(); - return 31 * prime + (int)(numElements ^ (numElements >>> 32)); + return 31 * prime + (int) (numElements ^ (numElements >>> 32)); } - /** - * Dimensions are known to be equal if they have the same number of elements - */ + /** Dimensions are known to be equal if they have the same number of elements */ @Override public boolean equals(Object obj) { if (this == obj) { diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/Axis.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/Axis.java index 91973c752a1..e031150efc3 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/Axis.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/Axis.java @@ -1,28 +1,28 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.dimension; final class Axis extends AbstractDimension { - + @Override public long numElements() { return numElements; } - + @Override public long positionOf(long coord) { if (coord >= numElements) { @@ -33,7 +33,7 @@ public long positionOf(long coord) { @Override public boolean isSegmented() { - return false; // all axis are continuous + return false; // all axis are continuous } @Override diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/Dimension.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/Dimension.java index cbae2d897a8..c24cd825403 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/Dimension.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/Dimension.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.dimension; import org.tensorflow.ndarray.index.Index; diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/DimensionalSpace.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/DimensionalSpace.java index 71d16776687..598000d23e0 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/DimensionalSpace.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/DimensionalSpace.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.dimension; @@ -79,14 +79,16 @@ public RelativeDimensionalSpace mapTo(Index[] indices) { initialOffset = offset; } else { long reducedSize = dimensions[dimIdx - 1].elementSize(); - newDimensions[newDimIdx - 1] = new ReducedDimension(newDimensions[newDimIdx - 1], offset, reducedSize); + newDimensions[newDimIdx - 1] = + new ReducedDimension(newDimensions[newDimIdx - 1], offset, reducedSize); segmentationIdx = newDimIdx - 1; } } else if (indices[indexIdx].isNewAxis()) { long newSize; if (dimIdx == 0) { - // includes everything. Should really include future reduction (at()) but that doesn't seem to cause issues + // includes everything. Should really include future reduction (at()) but that doesn't + // seem to cause issues // elsewhere newSize = dimensions[0].numElements() * dimensions[0].elementSize(); } else { @@ -136,7 +138,8 @@ public RelativeDimensionalSpace mapTo(Index[] indices) { segmentationIdx = newDimIdx; } } - return new RelativeDimensionalSpace(Arrays.copyOf(newDimensions, newDimIdx), segmentationIdx, initialOffset); + return new RelativeDimensionalSpace( + Arrays.copyOf(newDimensions, newDimIdx), segmentationIdx, initialOffset); } public DimensionalSpace from(int dimensionStart) { @@ -166,7 +169,9 @@ public long numElements(int i) { } public long physicalSize() { - return dimensions.length > 0 ? dimensions[0].physicalSize() : 1; // dimensions.length == 0 for scalars + return dimensions.length > 0 + ? dimensions[0].physicalSize() + : 1; // dimensions.length == 0 for scalars } public Dimension get(int i) { @@ -189,9 +194,7 @@ public long positionOf(long[] coords) { return position; } - /** - * Succinct description of the shape meant for debugging. - */ + /** Succinct description of the shape meant for debugging. */ @Override public String toString() { return Arrays.toString(dimensions); diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/IndexedDimension.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/IndexedDimension.java index 2b609bc3535..6129ff55e71 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/IndexedDimension.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/IndexedDimension.java @@ -1,19 +1,19 @@ /* - Copyright 2019 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. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Copyright 2019 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.dimension; import org.tensorflow.ndarray.index.Index; @@ -24,7 +24,7 @@ final class IndexedDimension extends AbstractDimension { public long numElements() { return numElements; } - + @Override public long positionOf(long coord) { if (coord >= numElements()) { @@ -32,7 +32,7 @@ public long positionOf(long coord) { } return originalDimension.positionOf(index.mapCoordinate(coord, originalDimension)); } - + @Override public boolean isSegmented() { // TODO (karllessard) for now we consider all indexed dimensions as segmented but might depend @@ -42,7 +42,7 @@ public boolean isSegmented() { @Override public long elementSize() { - return originalDimension.elementSize(); // indices do not change the size of an inner element + return originalDimension.elementSize(); // indices do not change the size of an inner element } @Override diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/ReducedDimension.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/ReducedDimension.java index 4b5cb1adcf8..a432b0754dd 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/ReducedDimension.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/ReducedDimension.java @@ -1,19 +1,19 @@ /* - Copyright 2019 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. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Copyright 2019 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.dimension; final class ReducedDimension extends AbstractDimension { diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/RelativeDimensionalSpace.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/RelativeDimensionalSpace.java index 4259bbcf76e..b2d3cdd91a4 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/RelativeDimensionalSpace.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/RelativeDimensionalSpace.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.dimension; diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/FastElementSequence.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/FastElementSequence.java index 92cebeb2338..eec12671911 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/FastElementSequence.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/FastElementSequence.java @@ -19,7 +19,6 @@ import java.util.Iterator; import java.util.function.BiConsumer; - import org.tensorflow.ndarray.NdArray; import org.tensorflow.ndarray.NdArraySequence; import org.tensorflow.ndarray.buffer.DataBufferWindow; @@ -33,7 +32,11 @@ */ public final class FastElementSequence> implements NdArraySequence { - public FastElementSequence(AbstractNdArray ndArray, int dimensionIdx, U element, DataBufferWindow elementWindow) { + public FastElementSequence( + AbstractNdArray ndArray, + int dimensionIdx, + U element, + DataBufferWindow elementWindow) { this.ndArray = ndArray; this.dimensionIdx = dimensionIdx; this.element = element; @@ -47,10 +50,12 @@ public Iterator iterator() { @Override public void forEachIndexed(BiConsumer consumer) { - PositionIterator.createIndexed(ndArray.dimensions(), dimensionIdx).forEachIndexed((long[] coords, long position) -> { - elementWindow.slideTo(position); - consumer.accept(coords, element); - }); + PositionIterator.createIndexed(ndArray.dimensions(), dimensionIdx) + .forEachIndexed( + (long[] coords, long position) -> { + elementWindow.slideTo(position); + consumer.accept(coords, element); + }); } @Override @@ -60,18 +65,19 @@ public NdArraySequence asSlices() { private class SequenceIterator implements Iterator { - @Override - public boolean hasNext() { - return positionIterator.hasNext(); - } + @Override + public boolean hasNext() { + return positionIterator.hasNext(); + } - @Override - public U next() { - elementWindow.slideTo(positionIterator.nextLong()); - return element; - } + @Override + public U next() { + elementWindow.slideTo(positionIterator.nextLong()); + return element; + } - private final PositionIterator positionIterator = PositionIterator.create(ndArray.dimensions(), dimensionIdx); + private final PositionIterator positionIterator = + PositionIterator.create(ndArray.dimensions(), dimensionIdx); } private final AbstractNdArray ndArray; diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/IndexedSequentialPositionIterator.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/IndexedSequentialPositionIterator.java index 80b3de681bd..9ba90130ae1 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/IndexedSequentialPositionIterator.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/IndexedSequentialPositionIterator.java @@ -19,7 +19,8 @@ import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; -class IndexedSequentialPositionIterator extends SequentialPositionIterator implements IndexedPositionIterator { +class IndexedSequentialPositionIterator extends SequentialPositionIterator + implements IndexedPositionIterator { @Override public void forEachIndexed(CoordsLongConsumer consumer) { @@ -43,7 +44,8 @@ private void incrementCoords() { super(dimensions, dimensionIdx); this.shape = dimensions.shape().asArray(); this.coords = new long[dimensionIdx + 1]; - //this.coordsIncrementor = new CoordinatesIncrementor(dimensions.shape().asArray(), dimensionIdx); + // this.coordsIncrementor = new CoordinatesIncrementor(dimensions.shape().asArray(), + // dimensionIdx); } private final long[] shape; diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/SingleElementSequence.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/SingleElementSequence.java index 59525bf486b..98f7b1919ca 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/SingleElementSequence.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/SingleElementSequence.java @@ -53,18 +53,19 @@ public U next() { } @SuppressWarnings("unchecked") - private U element = (U)ndArray; + private U element = (U) ndArray; }; } @Override public NdArraySequence asSlices() { - return this; // no need to slice, as there are only one element + return this; // no need to slice, as there are only one element } @Override public void forEachIndexed(BiConsumer consumer) { - throw new IllegalRankException("Single element has no coordinates to iterate on, use forEach()"); + throw new IllegalRankException( + "Single element has no coordinates to iterate on, use forEach()"); } private final AbstractNdArray ndArray; diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/SlicingElementSequence.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/SlicingElementSequence.java index 6fe8398ea70..9d550d387d6 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/SlicingElementSequence.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/SlicingElementSequence.java @@ -36,7 +36,8 @@ public SlicingElementSequence(AbstractNdArray ndArray, int dimensionIdx) { this(ndArray, dimensionIdx, ndArray.dimensions().from(dimensionIdx + 1)); } - public SlicingElementSequence(AbstractNdArray ndArray, int dimensionIdx, DimensionalSpace elementDimensions) { + public SlicingElementSequence( + AbstractNdArray ndArray, int dimensionIdx, DimensionalSpace elementDimensions) { this.ndArray = ndArray; this.dimensionIdx = dimensionIdx; this.elementDimensions = elementDimensions; @@ -61,9 +62,10 @@ public U next() { @Override public void forEachIndexed(BiConsumer consumer) { - PositionIterator.createIndexed(ndArray.dimensions(), dimensionIdx).forEachIndexed((long[] coords, long position) -> - consumer.accept(coords, ndArray.slice(position, elementDimensions)) - ); + PositionIterator.createIndexed(ndArray.dimensions(), dimensionIdx) + .forEachIndexed( + (long[] coords, long position) -> + consumer.accept(coords, ndArray.slice(position, elementDimensions))); } @Override diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/AbstractSparseNdArray.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/AbstractSparseNdArray.java index e4a2fba6a0c..2a471aca19f 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/AbstractSparseNdArray.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/AbstractSparseNdArray.java @@ -14,6 +14,11 @@ =======================================================================*/ package org.tensorflow.ndarray.impl.sparse; +import java.nio.ReadOnlyBufferException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.LongStream; import org.tensorflow.ndarray.IllegalRankException; import org.tensorflow.ndarray.LongNdArray; import org.tensorflow.ndarray.NdArray; @@ -30,12 +35,6 @@ import org.tensorflow.ndarray.impl.sequence.SlicingElementSequence; import org.tensorflow.ndarray.index.Index; -import java.nio.ReadOnlyBufferException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.stream.LongStream; - /** * Abstract base class for sparse array. * @@ -214,7 +213,8 @@ protected long[] getIndicesCoordinates(LongNdArray l) { @Override public U withShape(Shape shape) { - throw new UnsupportedOperationException("Sparse NdArrays cannot be viewed with a different shape"); + throw new UnsupportedOperationException( + "Sparse NdArrays cannot be viewed with a different shape"); } /** {@inheritDoc} */ @@ -408,8 +408,9 @@ public boolean equals(Object obj) { } /** - * A String showing the type, default value, number of elements and - * the dense shape of this sparse ndarray. + * A String showing the type, default value, number of elements and the dense shape of this sparse + * ndarray. + * * @return A string containing the type, default value, number of elements and shape. */ @Override @@ -423,8 +424,14 @@ public String toString() { } else { strDefault = "'" + defaultValue + "'"; } - return this.getClass().getSimpleName() + "(defaultValue=" + strDefault - + ", numElements=" + numElements + ", shape=" + this.shape() + ")"; + return this.getClass().getSimpleName() + + "(defaultValue=" + + strDefault + + ", numElements=" + + numElements + + ", shape=" + + this.shape() + + ")"; } /** diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java index d5d8d725990..d000eddaed9 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java @@ -14,6 +14,11 @@ =======================================================================*/ package org.tensorflow.ndarray.impl.sparse; +import java.nio.ReadOnlyBufferException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.atomic.AtomicInteger; import org.tensorflow.ndarray.BooleanNdArray; import org.tensorflow.ndarray.LongNdArray; import org.tensorflow.ndarray.NdArray; @@ -27,12 +32,6 @@ import org.tensorflow.ndarray.impl.sparse.slice.BooleanSparseSlice; import org.tensorflow.ndarray.index.Index; -import java.nio.ReadOnlyBufferException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.concurrent.atomic.AtomicInteger; - /** * sparse array for the boolean data type * @@ -269,6 +268,7 @@ public static BooleanSparseNdArray create(BooleanNdArray src) { src.copyTo(buffer); return new BooleanSparseNdArray(buffer, DimensionalSpace.create(src.shape())); } + /** * Creates a new BooleanSparseNdArray from a BooleanNdArray * diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArray.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArray.java index 633ca496f13..5614c233fe0 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArray.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArray.java @@ -14,6 +14,11 @@ =======================================================================*/ package org.tensorflow.ndarray.impl.sparse; +import java.nio.ReadOnlyBufferException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.atomic.AtomicInteger; import org.tensorflow.ndarray.ByteNdArray; import org.tensorflow.ndarray.LongNdArray; import org.tensorflow.ndarray.NdArray; @@ -27,12 +32,6 @@ import org.tensorflow.ndarray.impl.sparse.slice.ByteSparseSlice; import org.tensorflow.ndarray.index.Index; -import java.nio.ReadOnlyBufferException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.concurrent.atomic.AtomicInteger; - /** * sparse array for the byte data type * diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArray.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArray.java index 35b3541bb21..2a1611725f4 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArray.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArray.java @@ -14,6 +14,11 @@ =======================================================================*/ package org.tensorflow.ndarray.impl.sparse; +import java.nio.ReadOnlyBufferException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.atomic.AtomicInteger; import org.tensorflow.ndarray.DoubleNdArray; import org.tensorflow.ndarray.LongNdArray; import org.tensorflow.ndarray.NdArray; @@ -27,12 +32,6 @@ import org.tensorflow.ndarray.impl.sparse.slice.DoubleSparseSlice; import org.tensorflow.ndarray.index.Index; -import java.nio.ReadOnlyBufferException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.concurrent.atomic.AtomicInteger; - /** * A sparse array for the double data type * @@ -107,6 +106,7 @@ protected DoubleSparseNdArray( DoubleSparseNdArray(DoubleDataBuffer dataBuffer, DimensionalSpace dimensions) { this(dataBuffer, 0d, dimensions); } + /** * Creates a DoubleSparseNdArray * @@ -260,6 +260,7 @@ public static DoubleSparseNdArray create(DoubleNdArray src) { src.copyTo(buffer); return new DoubleSparseNdArray(buffer, DimensionalSpace.create(src.shape())); } + /** * Creates a new DoubleSparseNdArray from a DoubleNdArray * diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArray.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArray.java index 88f34b16e31..accb92f385d 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArray.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArray.java @@ -14,6 +14,11 @@ =======================================================================*/ package org.tensorflow.ndarray.impl.sparse; +import java.nio.ReadOnlyBufferException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.atomic.AtomicInteger; import org.tensorflow.ndarray.FloatNdArray; import org.tensorflow.ndarray.LongNdArray; import org.tensorflow.ndarray.NdArray; @@ -27,12 +32,6 @@ import org.tensorflow.ndarray.impl.sparse.slice.FloatSparseSlice; import org.tensorflow.ndarray.index.Index; -import java.nio.ReadOnlyBufferException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.concurrent.atomic.AtomicInteger; - /** * sparse array for the float data type * @@ -258,6 +257,7 @@ public static FloatSparseNdArray create(FloatNdArray src) { src.copyTo(buffer); return new FloatSparseNdArray(buffer, DimensionalSpace.create(src.shape())); } + /** * Creates a new FloatSparseNdArray from a FloatNdArray * diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArray.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArray.java index d79c4415aab..46be8f624cd 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArray.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArray.java @@ -14,6 +14,11 @@ =======================================================================*/ package org.tensorflow.ndarray.impl.sparse; +import java.nio.ReadOnlyBufferException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.atomic.AtomicInteger; import org.tensorflow.ndarray.IntNdArray; import org.tensorflow.ndarray.LongNdArray; import org.tensorflow.ndarray.NdArray; @@ -27,12 +32,6 @@ import org.tensorflow.ndarray.impl.sparse.slice.IntSparseSlice; import org.tensorflow.ndarray.index.Index; -import java.nio.ReadOnlyBufferException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.concurrent.atomic.AtomicInteger; - /** * sparse array for the int data type * @@ -107,6 +106,7 @@ protected IntSparseNdArray( IntSparseNdArray(IntDataBuffer dataBuffer, DimensionalSpace dimensions) { this(dataBuffer, 0, dimensions); } + /** * Creates a IntSparseNdArray * @@ -227,6 +227,7 @@ public static IntSparseNdArray create(int defaultValue, DimensionalSpace dimensi public static IntSparseNdArray create(Shape shape) { return new IntSparseNdArray(DimensionalSpace.create(shape)); } + /** * Creates a new empty IntSparseNdArray from a data buffer * diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArray.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArray.java index 1c01198e71f..098482e4cc0 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArray.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArray.java @@ -14,6 +14,11 @@ =======================================================================*/ package org.tensorflow.ndarray.impl.sparse; +import java.nio.ReadOnlyBufferException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.atomic.AtomicLong; import org.tensorflow.ndarray.LongNdArray; import org.tensorflow.ndarray.NdArray; import org.tensorflow.ndarray.NdArrays; @@ -26,12 +31,6 @@ import org.tensorflow.ndarray.impl.sparse.slice.LongSparseSlice; import org.tensorflow.ndarray.index.Index; -import java.nio.ReadOnlyBufferException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.concurrent.atomic.AtomicLong; - /** * sparse array for the long data type * diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArray.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArray.java index 051a7cb5d49..f9c9c1bf1c9 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArray.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArray.java @@ -14,6 +14,11 @@ =======================================================================*/ package org.tensorflow.ndarray.impl.sparse; +import java.nio.ReadOnlyBufferException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.atomic.AtomicInteger; import org.tensorflow.ndarray.LongNdArray; import org.tensorflow.ndarray.NdArray; import org.tensorflow.ndarray.NdArrays; @@ -27,12 +32,6 @@ import org.tensorflow.ndarray.impl.sparse.slice.ShortSparseSlice; import org.tensorflow.ndarray.index.Index; -import java.nio.ReadOnlyBufferException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.concurrent.atomic.AtomicInteger; - /** * sparse array for the short data type * diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/SparseNdArray.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/SparseNdArray.java index c6d93f27996..10a854ff47d 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/SparseNdArray.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/SparseNdArray.java @@ -14,6 +14,12 @@ =======================================================================*/ package org.tensorflow.ndarray.impl.sparse; +import java.lang.reflect.Array; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Objects; +import java.util.concurrent.atomic.AtomicInteger; import org.tensorflow.ndarray.LongNdArray; import org.tensorflow.ndarray.NdArray; import org.tensorflow.ndarray.NdArrays; @@ -24,13 +30,6 @@ import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; import org.tensorflow.ndarray.impl.sparse.slice.ObjectSparseSlice; -import java.lang.reflect.Array; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; -import java.util.concurrent.atomic.AtomicInteger; - /** * sparse array for the any data type * @@ -269,6 +268,7 @@ public static > SparseNdArray create(Class type src.copyTo(buffer); return new SparseNdArray<>(type, buffer, DimensionalSpace.create(src.shape())); } + /** * Creates a new SparseNdArray from a NdArray * @@ -360,6 +360,7 @@ public NdArray copyFrom(DataBuffer src) { setValues((U) NdArrays.vectorOfObjects(valuesArray)); return this; } + /** * Converts the sparse array to a dense array * @@ -396,8 +397,9 @@ public Class getType() { } /** - * A String showing the type, default value, number of elements and - * the dense shape of this sparse ndarray. + * A String showing the type, default value, number of elements and the dense shape of this sparse + * ndarray. + * * @return A string containing the type, default value, number of elements and shape. */ @Override @@ -412,7 +414,15 @@ public String toString() { } else { strDefault = "'" + defaultVal + "'"; } - return this.getClass().getSimpleName() + "(type="+type.getSimpleName()+", defaultValue=" + strDefault - + ", numElements=" + numElements + ", shape=" + this.shape() + ")"; + return this.getClass().getSimpleName() + + "(type=" + + type.getSimpleName() + + ", defaultValue=" + + strDefault + + ", numElements=" + + numElements + + ", shape=" + + this.shape() + + ")"; } } diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/BooleanSparseSlice.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/BooleanSparseSlice.java index 945ccdc5a06..0f31c7181a4 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/BooleanSparseSlice.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/BooleanSparseSlice.java @@ -14,6 +14,8 @@ =======================================================================*/ package org.tensorflow.ndarray.impl.sparse.slice; +import java.nio.ReadOnlyBufferException; +import java.util.concurrent.atomic.AtomicInteger; import org.tensorflow.ndarray.BooleanNdArray; import org.tensorflow.ndarray.NdArray; import org.tensorflow.ndarray.NdArrays; @@ -25,9 +27,6 @@ import org.tensorflow.ndarray.impl.sparse.AbstractSparseNdArray; import org.tensorflow.ndarray.index.Index; -import java.nio.ReadOnlyBufferException; -import java.util.concurrent.atomic.AtomicInteger; - public class BooleanSparseSlice extends SparseSlice implements BooleanNdArray { diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ByteSparseSlice.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ByteSparseSlice.java index 35e33d9d4fe..1da93a133de 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ByteSparseSlice.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ByteSparseSlice.java @@ -14,6 +14,8 @@ =======================================================================*/ package org.tensorflow.ndarray.impl.sparse.slice; +import java.nio.ReadOnlyBufferException; +import java.util.concurrent.atomic.AtomicInteger; import org.tensorflow.ndarray.ByteNdArray; import org.tensorflow.ndarray.NdArray; import org.tensorflow.ndarray.NdArrays; @@ -25,9 +27,6 @@ import org.tensorflow.ndarray.impl.sparse.AbstractSparseNdArray; import org.tensorflow.ndarray.index.Index; -import java.nio.ReadOnlyBufferException; -import java.util.concurrent.atomic.AtomicInteger; - public class ByteSparseSlice extends SparseSlice implements ByteNdArray { /** diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/DoubleSparseSlice.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/DoubleSparseSlice.java index 3f66308e5fa..0e99aa4750f 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/DoubleSparseSlice.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/DoubleSparseSlice.java @@ -14,6 +14,9 @@ =======================================================================*/ package org.tensorflow.ndarray.impl.sparse.slice; +import java.nio.ReadOnlyBufferException; +import java.util.Arrays; +import java.util.concurrent.atomic.AtomicInteger; import org.tensorflow.ndarray.DoubleNdArray; import org.tensorflow.ndarray.NdArray; import org.tensorflow.ndarray.NdArrays; @@ -25,10 +28,6 @@ import org.tensorflow.ndarray.impl.sparse.AbstractSparseNdArray; import org.tensorflow.ndarray.index.Index; -import java.nio.ReadOnlyBufferException; -import java.util.Arrays; -import java.util.concurrent.atomic.AtomicInteger; - public class DoubleSparseSlice extends SparseSlice implements DoubleNdArray { /** diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/FloatSparseSlice.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/FloatSparseSlice.java index 8e2204d5a5a..75abfe46f54 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/FloatSparseSlice.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/FloatSparseSlice.java @@ -14,6 +14,9 @@ =======================================================================*/ package org.tensorflow.ndarray.impl.sparse.slice; +import java.nio.ReadOnlyBufferException; +import java.util.Arrays; +import java.util.concurrent.atomic.AtomicInteger; import org.tensorflow.ndarray.FloatNdArray; import org.tensorflow.ndarray.NdArray; import org.tensorflow.ndarray.NdArrays; @@ -25,10 +28,6 @@ import org.tensorflow.ndarray.impl.sparse.AbstractSparseNdArray; import org.tensorflow.ndarray.index.Index; -import java.nio.ReadOnlyBufferException; -import java.util.Arrays; -import java.util.concurrent.atomic.AtomicInteger; - public class FloatSparseSlice extends SparseSlice implements FloatNdArray { /** diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/IntSparseSlice.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/IntSparseSlice.java index 988551bee34..831d6727d4f 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/IntSparseSlice.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/IntSparseSlice.java @@ -14,6 +14,9 @@ =======================================================================*/ package org.tensorflow.ndarray.impl.sparse.slice; +import java.nio.ReadOnlyBufferException; +import java.util.Arrays; +import java.util.concurrent.atomic.AtomicInteger; import org.tensorflow.ndarray.IntNdArray; import org.tensorflow.ndarray.NdArray; import org.tensorflow.ndarray.NdArrays; @@ -25,10 +28,6 @@ import org.tensorflow.ndarray.impl.sparse.AbstractSparseNdArray; import org.tensorflow.ndarray.index.Index; -import java.nio.ReadOnlyBufferException; -import java.util.Arrays; -import java.util.concurrent.atomic.AtomicInteger; - public class IntSparseSlice extends SparseSlice implements IntNdArray { /** diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/LongSparseSlice.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/LongSparseSlice.java index 0916293633c..e882eb08a34 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/LongSparseSlice.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/LongSparseSlice.java @@ -14,6 +14,9 @@ =======================================================================*/ package org.tensorflow.ndarray.impl.sparse.slice; +import java.nio.ReadOnlyBufferException; +import java.util.Arrays; +import java.util.concurrent.atomic.AtomicLong; import org.tensorflow.ndarray.LongNdArray; import org.tensorflow.ndarray.NdArray; import org.tensorflow.ndarray.NdArrays; @@ -25,10 +28,6 @@ import org.tensorflow.ndarray.impl.sparse.AbstractSparseNdArray; import org.tensorflow.ndarray.index.Index; -import java.nio.ReadOnlyBufferException; -import java.util.Arrays; -import java.util.concurrent.atomic.AtomicLong; - public class LongSparseSlice extends SparseSlice implements LongNdArray { /** diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ObjectSparseSlice.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ObjectSparseSlice.java index 9f62bf80ffe..9d547670803 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ObjectSparseSlice.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ObjectSparseSlice.java @@ -14,6 +14,10 @@ =======================================================================*/ package org.tensorflow.ndarray.impl.sparse.slice; +import java.lang.reflect.Array; +import java.nio.ReadOnlyBufferException; +import java.util.Arrays; +import java.util.concurrent.atomic.AtomicInteger; import org.tensorflow.ndarray.NdArray; import org.tensorflow.ndarray.NdArrays; import org.tensorflow.ndarray.buffer.DataBuffer; @@ -23,11 +27,6 @@ import org.tensorflow.ndarray.impl.sparse.SparseNdArray; import org.tensorflow.ndarray.index.Index; -import java.lang.reflect.Array; -import java.nio.ReadOnlyBufferException; -import java.util.Arrays; -import java.util.concurrent.atomic.AtomicInteger; - public class ObjectSparseSlice> extends SparseSlice implements NdArray { diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ShortSparseSlice.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ShortSparseSlice.java index 2da0f8c83a6..43424d25fce 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ShortSparseSlice.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ShortSparseSlice.java @@ -14,6 +14,9 @@ =======================================================================*/ package org.tensorflow.ndarray.impl.sparse.slice; +import java.nio.ReadOnlyBufferException; +import java.util.Arrays; +import java.util.concurrent.atomic.AtomicLong; import org.tensorflow.ndarray.NdArray; import org.tensorflow.ndarray.NdArrays; import org.tensorflow.ndarray.ShortNdArray; @@ -25,10 +28,6 @@ import org.tensorflow.ndarray.impl.sparse.AbstractSparseNdArray; import org.tensorflow.ndarray.index.Index; -import java.nio.ReadOnlyBufferException; -import java.util.Arrays; -import java.util.concurrent.atomic.AtomicLong; - public class ShortSparseSlice extends SparseSlice implements ShortNdArray { /** diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/SparseSlice.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/SparseSlice.java index 3e5be6f4246..3f09456ec8b 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/SparseSlice.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/SparseSlice.java @@ -14,6 +14,7 @@ =======================================================================*/ package org.tensorflow.ndarray.impl.sparse.slice; +import java.nio.ReadOnlyBufferException; import org.tensorflow.ndarray.NdArray; import org.tensorflow.ndarray.NdArraySequence; import org.tensorflow.ndarray.Shape; @@ -25,8 +26,6 @@ import org.tensorflow.ndarray.impl.sparse.AbstractSparseNdArray; import org.tensorflow.ndarray.index.Index; -import java.nio.ReadOnlyBufferException; - /** * A sparse window is a view into an AbstractSparseNdArray. It is used internally by the slice * methods. diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/All.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/All.java index 9d3139f3248..e21b9030315 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/All.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/All.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.index; import org.tensorflow.ndarray.impl.dimension.Dimension; @@ -37,8 +37,7 @@ public Dimension apply(Dimension dim) { return dim; } - private All() { - } + private All() {} @Override public boolean beginMask() { diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/At.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/At.java index 31ce021ddc8..cbe142a84b1 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/At.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/At.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.index; import java.util.StringJoiner; diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/Ellipsis.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/Ellipsis.java index d4085735df2..244ea333bd4 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/Ellipsis.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/Ellipsis.java @@ -1,19 +1,19 @@ /* - Copyright 2020 The TensorFlow Authors. All Rights Reserved. + Copyright 2020 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ============================================================================== - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +============================================================================== +*/ package org.tensorflow.ndarray.index; import org.tensorflow.ndarray.impl.dimension.Dimension; @@ -22,9 +22,7 @@ final class Ellipsis implements Index { static final Ellipsis INSTANCE = new Ellipsis(); - private Ellipsis() { - - } + private Ellipsis() {} @Override public long numElements(Dimension dim) { diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/Hyperslab.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/Hyperslab.java index 55c4e510748..8d01b3d21d6 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/Hyperslab.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/Hyperslab.java @@ -20,20 +20,18 @@ /** * A hyperslab is a rectangular pattern defined by four arrays. - * - * The {@code start} defines the origin of the hyperslab in the original coordinates. - * The {@code stride} is the number of elements to increment between selected elements. - * A stride of '1' is every element, a stride of '2' is every second element, etc. - * The default stride is 1. - * The {@code count} is the number of elements in the hyperslab selection. - * When the stride is 1, the selection is a hyper rectangle with a corner at {@code start} - * and size {@code count[0]} by {@code count[1]} by ... - * When stride is greater than one, the hyperslab bounded by start and the corners - * defined by {@code stride[n] * count[n]}. - * The {@code block} is a count on the number of repetitions of the hyperslab. - * The default block size is '1', which is one hyperslab. A block of 2 would be - * two hyperslabs in that dimension, with the second starting at {@code start[n]+ (count[n] * stride[n]) + 1}. - * + * + *

The {@code start} defines the origin of the hyperslab in the original coordinates. The {@code + * stride} is the number of elements to increment between selected elements. A stride of '1' is + * every element, a stride of '2' is every second element, etc. The default stride is 1. The {@code + * count} is the number of elements in the hyperslab selection. When the stride is 1, the selection + * is a hyper rectangle with a corner at {@code start} and size {@code count[0]} by {@code count[1]} + * by ... When stride is greater than one, the hyperslab bounded by start and the corners defined by + * {@code stride[n] * count[n]}. The {@code block} is a count on the number of repetitions of the + * hyperslab. The default block size is '1', which is one hyperslab. A block of 2 would be two + * hyperslabs in that dimension, with the second starting at {@code start[n]+ (count[n] * stride[n]) + * + 1}. + * * @see https://portal.hdfgroup.org/display/HDF5/Reading+From+or+Writing+To+a+Subset+of+a+Dataset * @see https://portal.hdfgroup.org/display/HDF5/H5S_SELECT_HYPERSLAB * @see https://support.hdfgroup.org/HDF5/doc1.6/UG/12_Dataspaces.html diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/Index.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/Index.java index 617ca4d474b..b98bb0dc988 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/Index.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/Index.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.index; import org.tensorflow.ndarray.NdArray; @@ -22,17 +22,18 @@ /** * An index used for slicing a view out of an N-dimensional array. * - *

A slice, i.e. a reduced view, of an N-dimensional array is obtain by calling - * {@link NdArray#slice(Index...)}, given a list of indices that select which elements on a given dimension should be - * included/excluded from that view. + *

A slice, i.e. a reduced view, of an N-dimensional array is obtain by calling {@link + * NdArray#slice(Index...)}, given a list of indices that select which elements on a given dimension + * should be included/excluded from that view. */ public interface Index { /** * Returns the number of elements that can be retrieved using this index on the given dimension. * - *

An index that maps one-by-one all elements of the dimensions will return a value - * equal to {@code dim.numElements()}, while an index that only maps a subset of these will return a smaller value. + *

An index that maps one-by-one all elements of the dimensions will return a value equal to + * {@code dim.numElements()}, while an index that only maps a subset of these will return a + * smaller value. * * @param dim the indexed dimension * @return number of elements accessible @@ -40,7 +41,8 @@ public interface Index { long numElements(Dimension dim); /** - * Transforms an element coordinate to a new coordinate by applying this index to the given dimension. + * Transforms an element coordinate to a new coordinate by applying this index to the given + * dimension. * *

For example, if the coordinate is 0 and this index flips the {@code n} elements on this * dimension, then the returned value will be {@code n-1}. @@ -54,8 +56,8 @@ public interface Index { /** * Applies this index to the given dimension. * - *

When accessing the elements from the returned dimension, this index will automatically - * apply and may transform the original position. + *

When accessing the elements from the returned dimension, this index will automatically apply + * and may transform the original position. * * @param dim dimension to apply this index to * @return an indexed dimension @@ -64,66 +66,59 @@ default Dimension apply(Dimension dim) { return dim.withIndex(this); } - /** - * Returns true if this index is a single point, reducing the number of dimensions by one - */ + /** Returns true if this index is a single point, reducing the number of dimensions by one */ default boolean isPoint() { return false; } - /** - * Returns true if this index is a new axis, adding a dimension of size 1 - */ + /** Returns true if this index is a new axis, adding a dimension of size 1 */ default boolean isNewAxis() { return false; } /** - * Returns true if this index is an ellipsis, expanding to take as many dimensions as possible (and applying all() to - * them) + * Returns true if this index is an ellipsis, expanding to take as many dimensions as possible + * (and applying all() to them) */ default boolean isEllipsis() { return false; } /** - * Get whether the Index supports strided slice style indexing (using start, end, stride, and flags, i.e. TensorFlow's). */ default boolean isStridedSlicingCompliant() { return true; } - /** - * Get the start of the index, for strided slice style indexing. - */ + /** Get the start of the index, for strided slice style indexing. */ default long begin() { return 0; } - /** - * Get the end of the index, strided slice style indexing. - */ + /** Get the end of the index, strided slice style indexing. */ default long end() { return 0; } - /** - * Get the stride of the index, for strided slice style indexing. - */ + /** Get the stride of the index, for strided slice style indexing. */ default long stride() { return 1; } /** - * Get whether the Index should start at the beginning of the dimension, for strided slice style indexing. + * Get whether the Index should start at the beginning of the dimension, for strided slice style + * indexing. */ default boolean beginMask() { return false; } /** - * Get whether the Index should end at the beginning of the dimension, for strided slice style indexing. + * Get whether the Index should end at the beginning of the dimension, for strided slice style + * indexing. */ default boolean endMask() { return false; diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/Indices.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/Indices.java index 346ab705595..39f37b90205 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/Indices.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/Indices.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.index; import org.tensorflow.ndarray.IllegalRankException; @@ -22,20 +22,18 @@ import org.tensorflow.ndarray.Shape; import org.tensorflow.ndarray.buffer.DataBuffers; -/** - * Helper class for instantiating {@link Index} objects. - */ +/** Helper class for instantiating {@link Index} objects. */ public final class Indices { /** * A coordinate that selects a specific element on a given dimension. * - *

When this index is applied to a given dimension, the dimension is resolved as a - * single element and therefore is excluded from the computation of the rank. + *

When this index is applied to a given dimension, the dimension is resolved as a single + * element and therefore is excluded from the computation of the rank. * - *

For example, given a 3D matrix on the axis [x, y, z], if - * {@code matrix.slice(all(), at(0), at(0)}, then the rank of the returned slice is 1 and its number of elements is - * {@code x.numElements()} + *

For example, given a 3D matrix on the axis [x, y, z], if {@code matrix.slice(all(), at(0), + * at(0)}, then the rank of the returned slice is 1 and its number of elements is {@code + * x.numElements()} * * @param coord coordinate of the element on the indexed axis * @return index @@ -64,13 +62,13 @@ public static Index at(NdArray coord) { /** * A coordinate that selects a specific element on a given dimension. * - *

When this index is applied to a given dimension, the dimension is resolved as a - * single element and therefore, if {@code keepDim} is false, is excluded from the computation of the rank. If {@code} - * keepDim is true, the dimension is collapsed down to one element. + *

When this index is applied to a given dimension, the dimension is resolved as a single + * element and therefore, if {@code keepDim} is false, is excluded from the computation of the + * rank. If {@code} keepDim is true, the dimension is collapsed down to one element. * - *

For example, given a 3D matrix on the axis [x, y, z], if - * {@code matrix.slice(all(), at(0), at(0)}, then the rank of the returned slice is 1 and its number of elements is - * {@code x.numElements()} + *

For example, given a 3D matrix on the axis [x, y, z], if {@code matrix.slice(all(), at(0), + * at(0)}, then the rank of the returned slice is 1 and its number of elements is {@code + * x.numElements()} * * @param coord coordinate of the element on the indexed axis * @param keepDim whether to remove the dimension. @@ -83,10 +81,11 @@ public static Index at(long coord, boolean keepDim) { /** * A coordinate that selects a specific element on a given dimension. * - *

This is equivalent to call {@link #at(long, boolean)} but where the value of the coordinate is - * provided by an N-dimensional array. - *

- * If {@code} keepDim is true, the dimension is collapsed down to one element instead of being removed. + *

This is equivalent to call {@link #at(long, boolean)} but where the value of the coordinate + * is provided by an N-dimensional array. + * + *

If {@code} keepDim is true, the dimension is collapsed down to one element instead of being + * removed. * * @param coord scalar indicating the coordinate of the element on the indexed axis * @param keepDim whether to remove the dimension. @@ -103,11 +102,10 @@ public static Index at(NdArray coord, boolean keepDim) { /** * An index that returns all elements of a dimension in the original order. * - *

Applying this index to a given dimension will return the original dimension - * directly. + *

Applying this index to a given dimension will return the original dimension directly. * - *

For example, given a vector with {@code n} elements, {@code all()} returns - * x0, x1, ..., xn-1 + *

For example, given a vector with {@code n} elements, {@code all()} returns x0, + * x1, ..., xn-1 * * @return index */ @@ -118,8 +116,8 @@ public static Index all() { /** * An index that returns only specific elements on a given dimension. * - *

For example, given a vector with {@code n} elements on the {@code x} axis, and {@code n > 10}, - * {@code seq(8, 0, 3)} returns x8, x0, x3 + *

For example, given a vector with {@code n} elements on the {@code x} axis, and {@code n > + * 10}, {@code seq(8, 0, 3)} returns x8, x0, x3 * * @param coords coordinates of the elements in the sequence * @return index @@ -128,14 +126,15 @@ public static Index seq(long... coords) { if (coords == null) { throw new IllegalArgumentException(); } - return new Sequence(NdArrays.wrap(Shape.of(coords.length), DataBuffers.of(coords, true, false))); + return new Sequence( + NdArrays.wrap(Shape.of(coords.length), DataBuffers.of(coords, true, false))); } /** * An index that returns only specific elements on a given dimension. * - *

This is equivalent to {@link #seq(long...)} but where the coordinates of the elements in - * the sequence are provided by an N-dimensional array. + *

This is equivalent to {@link #seq(long...)} but where the coordinates of the elements in the + * sequence are provided by an N-dimensional array. * * @param coords vector of coordinates of the elements in the sequence * @return index @@ -175,8 +174,8 @@ public static Index odd() { /** * An index that skips a fixed amount of coordinates between each values returned. * - *

For example, given a vector with {@code n} elements on the {@code x} axis, - * {@code step(k)} returns x0, xk, xk*2, ... + *

For example, given a vector with {@code n} elements on the {@code x} axis, {@code step(k)} + * returns x0, xk, xk*2, ... * * @param stride the number of elements between each steps * @return index @@ -188,8 +187,8 @@ public static Index step(long stride) { /** * An index that returns only elements on a given dimension starting at a specific coordinate. * - *

For example, given a vector with {@code n} elements on the {@code x} axis, and {@code n > k}, - * {@code from(k)} returns xk, xk+1, ..., xn-1 + *

For example, given a vector with {@code n} elements on the {@code x} axis, and {@code n > + * k}, {@code from(k)} returns xk, xk+1, ..., xn-1 * * @param start coordinate of the first element of the sequence * @return index @@ -199,11 +198,11 @@ public static Index sliceFrom(long start) { } /** - * An index that returns only elements on a given dimension starting at a specific coordinate, using the given - * stride. + * An index that returns only elements on a given dimension starting at a specific coordinate, + * using the given stride. * - *

For example, given a vector with {@code n} elements on the {@code x} axis, and {@code n > k}, - * {@code from(k)} returns xk, xk+1, ..., xn-1 + *

For example, given a vector with {@code n} elements on the {@code x} axis, and {@code n > + * k}, {@code from(k)} returns xk, xk+1, ..., xn-1 * * @param start coordinate of the first element of the sequence * @param stride the stride to use @@ -217,8 +216,8 @@ public static Index sliceFrom(long start, long stride) { /** * An index that returns only elements on a given dimension up to a specific coordinate. * - *

For example, given a vector with {@code n} elements on the {@code x} axis, and {@code n > k}, - * {@code to(k)} returns x0, x1, ..., xk + *

For example, given a vector with {@code n} elements on the {@code x} axis, and {@code n > + * k}, {@code to(k)} returns x0, x1, ..., xk * * @param end coordinate of the last element of the sequence (exclusive) * @return index @@ -228,10 +227,11 @@ public static Index sliceTo(long end) { } /** - * An index that returns only elements on a given dimension up to a specific coordinate, using the given stride. + * An index that returns only elements on a given dimension up to a specific coordinate, using the + * given stride. * - *

For example, given a vector with {@code n} elements on the {@code x} axis, and {@code n > k}, - * {@code to(k)} returns x0, x1, ..., xk + *

For example, given a vector with {@code n} elements on the {@code x} axis, and {@code n > + * k}, {@code to(k)} returns x0, x1, ..., xk * * @param end coordinate of the last element of the sequence (exclusive) * @param stride the stride to use @@ -245,8 +245,8 @@ public static Index sliceTo(long end, long stride) { /** * An index that returns only elements on a given dimension between two coordinates. * - *

For example, given a vector with {@code n} elements on the {@code x} axis, and {@code n > k > j}, - * {@code range(j, k)} returns xj, xj+1, ..., xk + *

For example, given a vector with {@code n} elements on the {@code x} axis, and {@code n > k + * > j}, {@code range(j, k)} returns xj, xj+1, ..., xk * * @param start coordinate of the first element of the sequence * @param end coordinate of the last element of the sequence (exclusive) @@ -259,8 +259,8 @@ public static Index range(long start, long end) { /** * An index that returns only elements on a given dimension between two coordinates. * - *

For example, given a vector with {@code n} elements on the {@code x} axis, and {@code n > k > j}, - * {@code range(j, k)} returns xj, xj+1, ..., xk + *

For example, given a vector with {@code n} elements on the {@code x} axis, and {@code n > k + * > j}, {@code range(j, k)} returns xj, xj+1, ..., xk * * @return index */ @@ -269,8 +269,8 @@ public static Index flip() { } /** - * An index that returns elements according to an hyperslab defined by {@code start}, {@code stride}, {@code count}, - * {@code block}. See {@link Hyperslab}. + * An index that returns elements according to an hyperslab defined by {@code start}, {@code + * stride}, {@code count}, {@code block}. See {@link Hyperslab}. * * @param start Starting location for the hyperslab. * @param stride The number of elements to separate each element or block to be selected. @@ -292,7 +292,8 @@ public static Index newAxis() { } /** - * An index that expands to fill all available source dimensions. Works the same as Python's {@code ...}. + * An index that expands to fill all available source dimensions. Works the same as Python's + * {@code ...}. * * @return index */ @@ -301,10 +302,10 @@ public static Index ellipsis() { } /** - * An index that returns elements between {@code start} and {@code end}. If {@code start} or {@code end} is {@code - * null}, starts or ends at the beginning or the end, respectively. - *

- * Analogous to Python's {@code :} slice syntax. + * An index that returns elements between {@code start} and {@code end}. If {@code start} or + * {@code end} is {@code null}, starts or ends at the beginning or the end, respectively. + * + *

Analogous to Python's {@code :} slice syntax. * * @return index */ @@ -313,10 +314,11 @@ public static Index slice(long start, long end) { } /** - * An index that returns every {@code stride}-th element between {@code start} and {@code end}. If {@code start} or - * {@code end} is {@code null}, starts or ends at the beginning or the end, respectively. - *

- * Analogous to Python's {@code :} slice syntax. + * An index that returns every {@code stride}-th element between {@code start} and {@code end}. If + * {@code start} or {@code end} is {@code null}, starts or ends at the beginning or the end, + * respectively. + * + *

Analogous to Python's {@code :} slice syntax. * * @return index */ @@ -325,10 +327,10 @@ public static Index slice(long start, long end, long stride) { } /** - * An index that returns elements between {@code start} and {@code end}. If {@code start} or {@code end} is {@code - * null}, starts or ends at the beginning or the end, respectively. - *

- * Analogous to Python's {@code :} slice syntax. + * An index that returns elements between {@code start} and {@code end}. If {@code start} or + * {@code end} is {@code null}, starts or ends at the beginning or the end, respectively. + * + *

Analogous to Python's {@code :} slice syntax. * * @return index */ @@ -337,10 +339,11 @@ public static Index slice(Long start, Long end) { } /** - * An index that returns every {@code stride}-th element between {@code start} and {@code end}. If {@code start} or - * {@code end} is {@code null}, starts or ends at the beginning or the end, respectively. - *

- * Analogous to Python's {@code :} slice syntax. + * An index that returns every {@code stride}-th element between {@code start} and {@code end}. If + * {@code start} or {@code end} is {@code null}, starts or ends at the beginning or the end, + * respectively. + * + *

Analogous to Python's {@code :} slice syntax. * * @return index */ @@ -359,5 +362,4 @@ public static Index slice(Long start, Long end, long stride) { return slice(start.longValue(), end.longValue(), stride); } - } diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/NewAxis.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/NewAxis.java index a68b1ed9ad1..47f31bdf9b1 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/NewAxis.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/NewAxis.java @@ -1,19 +1,19 @@ /* - Copyright 2020 The TensorFlow Authors. All Rights Reserved. + Copyright 2020 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ============================================================================== - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +============================================================================== +*/ package org.tensorflow.ndarray.index; import org.tensorflow.ndarray.impl.dimension.Dimension; @@ -22,9 +22,7 @@ final class NewAxis implements Index { static final NewAxis INSTANCE = new NewAxis(); - private NewAxis() { - - } + private NewAxis() {} @Override public long numElements(Dimension dim) { diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/Sequence.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/Sequence.java index 5b93e434e54..beda853abb3 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/Sequence.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/Sequence.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.index; import java.util.StringJoiner; diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/Slice.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/Slice.java index 1be4368261c..74743c68fa2 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/Slice.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/Slice.java @@ -1,19 +1,19 @@ /* - Copyright 2020 The TensorFlow Authors. All Rights Reserved. + Copyright 2020 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ============================================================================== - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +============================================================================== +*/ package org.tensorflow.ndarray.index; import java.util.StringJoiner; diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/SliceFrom.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/SliceFrom.java index c968a325cf7..10ae6d0f09a 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/SliceFrom.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/SliceFrom.java @@ -1,19 +1,19 @@ /* - Copyright 2020 The TensorFlow Authors. All Rights Reserved. + Copyright 2020 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ============================================================================== - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +============================================================================== +*/ package org.tensorflow.ndarray.index; import java.util.StringJoiner; diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/SliceTo.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/SliceTo.java index 761d1d52a3a..18f72585530 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/SliceTo.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/SliceTo.java @@ -1,19 +1,19 @@ /* - Copyright 2020 The TensorFlow Authors. All Rights Reserved. + Copyright 2020 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ============================================================================== - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +============================================================================== +*/ package org.tensorflow.ndarray.index; import java.util.StringJoiner; diff --git a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/Step.java b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/Step.java index c9a21c507b6..fc407bbe55b 100644 --- a/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/Step.java +++ b/tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/Step.java @@ -1,19 +1,19 @@ /* - Copyright 2020 The TensorFlow Authors. All Rights Reserved. + Copyright 2020 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ============================================================================== - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +============================================================================== +*/ package org.tensorflow.ndarray.index; import java.util.StringJoiner; diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/BooleanNdArrayTestBase.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/BooleanNdArrayTestBase.java index 6426ff5a1c2..f11a1193a35 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/BooleanNdArrayTestBase.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/BooleanNdArrayTestBase.java @@ -1,57 +1,53 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray; -import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.tensorflow.ndarray.NdArrays.vectorOf; import org.junit.jupiter.api.Test; public abstract class BooleanNdArrayTestBase extends NdArrayTestBase { - @Override - protected abstract BooleanNdArray allocate(Shape shape); + @Override + protected abstract BooleanNdArray allocate(Shape shape); - @Override - protected Boolean valueOf(Long val) { - return val > 0; - } + @Override + protected Boolean valueOf(Long val) { + return val > 0; + } - @Test - public void iteratePrimitiveElements() { - BooleanNdArray matrix3d = allocate(Shape.of(5, 4, 5)); + @Test + public void iteratePrimitiveElements() { + BooleanNdArray matrix3d = allocate(Shape.of(5, 4, 5)); - matrix3d.scalars().forEachIndexed((coords, scalar) -> - scalar.setBoolean(coords[2] > 0) - ); + matrix3d.scalars().forEachIndexed((coords, scalar) -> scalar.setBoolean(coords[2] > 0)); - assertFalse(matrix3d.getBoolean(0, 0, 0)); - assertTrue(matrix3d.getBoolean(0, 0, 1)); - assertTrue(matrix3d.getBoolean(0, 0, 4)); - assertTrue(matrix3d.getBoolean(0, 1, 2)); + assertFalse(matrix3d.getBoolean(0, 0, 0)); + assertTrue(matrix3d.getBoolean(0, 0, 1)); + assertTrue(matrix3d.getBoolean(0, 0, 4)); + assertTrue(matrix3d.getBoolean(0, 1, 2)); - matrix3d.elements(1).forEach(vector -> - vector.set(vectorOf(true, false, true, false, true)) - ); + matrix3d.elements(1).forEach(vector -> vector.set(vectorOf(true, false, true, false, true))); - assertTrue(matrix3d.getBoolean(0, 0, 0)); - assertFalse(matrix3d.getBoolean(0, 0, 1)); - assertTrue(matrix3d.getBoolean(0, 0, 4)); - assertTrue(matrix3d.getBoolean(0, 1, 2)); - } + assertTrue(matrix3d.getBoolean(0, 0, 0)); + assertFalse(matrix3d.getBoolean(0, 0, 1)); + assertTrue(matrix3d.getBoolean(0, 0, 4)); + assertTrue(matrix3d.getBoolean(0, 1, 2)); + } } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/ByteNdArrayTestBase.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/ByteNdArrayTestBase.java index 407efffda94..be8c99a6b1e 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/ByteNdArrayTestBase.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/ByteNdArrayTestBase.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -22,34 +22,34 @@ public abstract class ByteNdArrayTestBase extends NdArrayTestBase { - @Override - protected abstract ByteNdArray allocate(Shape shape); + @Override + protected abstract ByteNdArray allocate(Shape shape); - @Override - protected Byte valueOf(Long val) { - return val.byteValue(); - } + @Override + protected Byte valueOf(Long val) { + return val.byteValue(); + } - @Test - public void iteratePrimitiveElements() { - ByteNdArray matrix3d = allocate(Shape.of(5, 4, 5)); + @Test + public void iteratePrimitiveElements() { + ByteNdArray matrix3d = allocate(Shape.of(5, 4, 5)); - matrix3d.scalars().forEachIndexed((coords, scalar) -> - scalar.setByte((byte)coords[2]) - ); + matrix3d.scalars().forEachIndexed((coords, scalar) -> scalar.setByte((byte) coords[2])); - assertEquals(0, matrix3d.getByte(0, 0, 0)); - assertEquals(1, matrix3d.getByte(0, 0, 1)); - assertEquals(4, matrix3d.getByte(0, 0, 4)); - assertEquals(2, matrix3d.getByte(0, 1, 2)); + assertEquals(0, matrix3d.getByte(0, 0, 0)); + assertEquals(1, matrix3d.getByte(0, 0, 1)); + assertEquals(4, matrix3d.getByte(0, 0, 4)); + assertEquals(2, matrix3d.getByte(0, 1, 2)); - matrix3d.elements(1).forEach(vector -> - vector.set(NdArrays.vectorOf((byte)5, (byte)6, (byte)7, (byte)8, (byte)9)) - ); + matrix3d + .elements(1) + .forEach( + vector -> + vector.set(NdArrays.vectorOf((byte) 5, (byte) 6, (byte) 7, (byte) 8, (byte) 9))); - assertEquals(5, matrix3d.getByte(0, 0, 0)); - assertEquals(6, matrix3d.getByte(0, 0, 1)); - assertEquals(9, matrix3d.getByte(0, 0, 4)); - assertEquals(7, matrix3d.getByte(0, 1, 2)); - } + assertEquals(5, matrix3d.getByte(0, 0, 0)); + assertEquals(6, matrix3d.getByte(0, 0, 1)); + assertEquals(9, matrix3d.getByte(0, 0, 4)); + assertEquals(7, matrix3d.getByte(0, 1, 2)); + } } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/DoubleNdArrayTestBase.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/DoubleNdArrayTestBase.java index d4f98e2caa0..1bcca203ff7 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/DoubleNdArrayTestBase.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/DoubleNdArrayTestBase.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -22,34 +22,30 @@ public abstract class DoubleNdArrayTestBase extends NdArrayTestBase { - @Override - protected abstract DoubleNdArray allocate(Shape shape); + @Override + protected abstract DoubleNdArray allocate(Shape shape); - @Override - protected Double valueOf(Long val) { - return val.doubleValue(); - } + @Override + protected Double valueOf(Long val) { + return val.doubleValue(); + } - @Test - public void iteratePrimitiveElements() { - DoubleNdArray matrix3d = allocate(Shape.of(5, 4, 5)); + @Test + public void iteratePrimitiveElements() { + DoubleNdArray matrix3d = allocate(Shape.of(5, 4, 5)); - matrix3d.scalars().forEachIndexed((coords, scalar) -> - scalar.setDouble((double)coords[2]) - ); + matrix3d.scalars().forEachIndexed((coords, scalar) -> scalar.setDouble((double) coords[2])); - assertEquals(0.0, matrix3d.getDouble(0, 0, 0), 0.0); - assertEquals(1.0, matrix3d.getDouble(0, 0, 1), 0.0); - assertEquals(4.0, matrix3d.getDouble(0, 0, 4), 0.0); - assertEquals(2.0, matrix3d.getDouble(0, 1, 2), 0.0); + assertEquals(0.0, matrix3d.getDouble(0, 0, 0), 0.0); + assertEquals(1.0, matrix3d.getDouble(0, 0, 1), 0.0); + assertEquals(4.0, matrix3d.getDouble(0, 0, 4), 0.0); + assertEquals(2.0, matrix3d.getDouble(0, 1, 2), 0.0); - matrix3d.elements(1).forEach(vector -> - vector.set(NdArrays.vectorOf(5.0, 6.0, 7.0, 8.0, 9.0)) - ); + matrix3d.elements(1).forEach(vector -> vector.set(NdArrays.vectorOf(5.0, 6.0, 7.0, 8.0, 9.0))); - assertEquals(5, matrix3d.getDouble(0, 0, 0), 0.0); - assertEquals(6, matrix3d.getDouble(0, 0, 1), 0.0); - assertEquals(9, matrix3d.getDouble(0, 0, 4), 0.0); - assertEquals(7, matrix3d.getDouble(0, 1, 2), 0.0); - } + assertEquals(5, matrix3d.getDouble(0, 0, 0), 0.0); + assertEquals(6, matrix3d.getDouble(0, 0, 1), 0.0); + assertEquals(9, matrix3d.getDouble(0, 0, 4), 0.0); + assertEquals(7, matrix3d.getDouble(0, 1, 2), 0.0); + } } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/FloatNdArrayTestBase.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/FloatNdArrayTestBase.java index 55f05ae3de1..6d11346df76 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/FloatNdArrayTestBase.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/FloatNdArrayTestBase.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -22,34 +22,32 @@ public abstract class FloatNdArrayTestBase extends NdArrayTestBase { - @Override - protected abstract FloatNdArray allocate(Shape shape); + @Override + protected abstract FloatNdArray allocate(Shape shape); - @Override - protected Float valueOf(Long val) { - return val.floatValue(); - } + @Override + protected Float valueOf(Long val) { + return val.floatValue(); + } - @Test - public void iteratePrimitiveElements() { - FloatNdArray matrix3d = allocate(Shape.of(5, 4, 5)); + @Test + public void iteratePrimitiveElements() { + FloatNdArray matrix3d = allocate(Shape.of(5, 4, 5)); - matrix3d.scalars().forEachIndexed((coords, scalar) -> - scalar.setFloat((float)coords[2]) - ); + matrix3d.scalars().forEachIndexed((coords, scalar) -> scalar.setFloat((float) coords[2])); - assertEquals(0.0f, matrix3d.getFloat(0, 0, 0), 0.0f); - assertEquals(1.0f, matrix3d.getFloat(0, 0, 1), 0.0f); - assertEquals(4.0f, matrix3d.getFloat(0, 0, 4), 0.0f); - assertEquals(2.0f, matrix3d.getFloat(0, 1, 2), 0.0f); + assertEquals(0.0f, matrix3d.getFloat(0, 0, 0), 0.0f); + assertEquals(1.0f, matrix3d.getFloat(0, 0, 1), 0.0f); + assertEquals(4.0f, matrix3d.getFloat(0, 0, 4), 0.0f); + assertEquals(2.0f, matrix3d.getFloat(0, 1, 2), 0.0f); - matrix3d.elements(1).forEach(vector -> - vector.set(NdArrays.vectorOf(5.0f, 6.0f, 7.0f, 8.0f, 9.0f)) - ); + matrix3d + .elements(1) + .forEach(vector -> vector.set(NdArrays.vectorOf(5.0f, 6.0f, 7.0f, 8.0f, 9.0f))); - assertEquals(5, matrix3d.getFloat(0, 0, 0), 0.0f); - assertEquals(6, matrix3d.getFloat(0, 0, 1), 0.0f); - assertEquals(9, matrix3d.getFloat(0, 0, 4), 0.0f); - assertEquals(7, matrix3d.getFloat(0, 1, 2), 0.0f); - } + assertEquals(5, matrix3d.getFloat(0, 0, 0), 0.0f); + assertEquals(6, matrix3d.getFloat(0, 0, 1), 0.0f); + assertEquals(9, matrix3d.getFloat(0, 0, 4), 0.0f); + assertEquals(7, matrix3d.getFloat(0, 1, 2), 0.0f); + } } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/IndexTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/IndexTest.java index 10c08064a82..94897f63129 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/IndexTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/IndexTest.java @@ -1,57 +1,59 @@ /* - Copyright 2020 The TensorFlow Authors. All Rights Reserved. + Copyright 2020 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ============================================================================== - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +============================================================================== +*/ package org.tensorflow.ndarray; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.junit.jupiter.api.Assertions.assertArrayEquals; import org.junit.jupiter.api.Test; import org.tensorflow.ndarray.index.Indices; public class IndexTest { @Test - public void testNullConversions(){ - assertTrue(Indices.slice(null, 0L).beginMask(), + public void testNullConversions() { + assertTrue( + Indices.slice(null, 0L).beginMask(), "Passed null for slice start but didn't set begin mask"); - assertTrue(Indices.slice(null, 0L).beginMask(), + assertTrue( + Indices.slice(null, 0L).beginMask(), "Passed null for slice start but didn't set begin mask"); - assertTrue(Indices.slice(null, null).beginMask(), + assertTrue( + Indices.slice(null, null).beginMask(), "Passed null for slice start but didn't set begin mask"); - assertTrue(Indices.slice(0L, null).endMask(), - "Passed null for slice end but didn't set end mask"); + assertTrue( + Indices.slice(0L, null).endMask(), "Passed null for slice end but didn't set end mask"); - assertTrue(Indices.slice(0L, null).endMask(), - "Passed null for slice end but didn't set end mask"); + assertTrue( + Indices.slice(0L, null).endMask(), "Passed null for slice end but didn't set end mask"); - assertTrue(Indices.slice(null, null).endMask(), - "Passed null for slice end but didn't set end mask"); + assertTrue( + Indices.slice(null, null).endMask(), "Passed null for slice end but didn't set end mask"); } - + @Test - public void testIndices(){ + public void testIndices() { String[][] indexData = new String[5][4]; - for (int i=0 ; i < 5; i++){ - for (int j=0 ; j < 4; j++) - indexData[i][j] = "("+j+", "+i+")"; + for (int i = 0; i < 5; i++) { + for (int j = 0; j < 4; j++) indexData[i][j] = "(" + j + ", " + i + ")"; } NdArray matrix2d = StdArrays.ndCopyOf(indexData); @@ -62,9 +64,9 @@ public void testIndices(){ |(0, 1), (1, 1), (2, 1), (3, 1)| |(0, 2), (1, 2), (2, 2), (3, 2)| |(0, 3), (1, 3), (2, 3), (3, 3)| - |(0, 4), (1, 4), (2, 4), (3, 4)| + |(0, 4), (1, 4), (2, 4), (3, 4)| */ - assertArrayEquals(new String[]{"(0, 0)", "(1, 0)", "(2, 0)", "(3, 0)"}, indexData[0]); + assertArrayEquals(new String[] {"(0, 0)", "(1, 0)", "(2, 0)", "(3, 0)"}, indexData[0]); NdArray same1 = matrix2d.slice(Indices.all()); String[][] same1j = StdArrays.array2dCopyOf(same1, String.class); @@ -82,7 +84,7 @@ public void testIndices(){ NdArray same3 = matrix2d.slice(Indices.all(), Indices.at(1)); assertEquals(1, same3.rank()); String[] same3j = StdArrays.array1dCopyOf(same3, String.class); - assertArrayEquals(new String[] { "(1, 0)", "(1, 1)", "(1, 2)", "(1, 3)", "(1, 4)" }, same3j); + assertArrayEquals(new String[] {"(1, 0)", "(1, 1)", "(1, 2)", "(1, 3)", "(1, 4)"}, same3j); // row 2, all columns NdArray same4 = matrix2d.slice(Indices.at(2), Indices.all()); @@ -100,23 +102,21 @@ public void testIndices(){ assertEquals("(1, 2)", same5j); // rows 1 to 2, all columns - NdArray same6 = matrix2d.slice(Indices.slice(1,3)); + NdArray same6 = matrix2d.slice(Indices.slice(1, 3)); assertEquals(2, same6.rank()); String[][] same6j = StdArrays.array2dCopyOf(same6, String.class); assertArrayEquals( - new String[][] - { - {"(0, 1)", "(1, 1)", "(2, 1)", "(3, 1)"}, - {"(0, 2)", "(1, 2)", "(2, 2)", "(3, 2)"} - }, - same6j - ); + new String[][] { + {"(0, 1)", "(1, 1)", "(2, 1)", "(3, 1)"}, + {"(0, 2)", "(1, 2)", "(2, 2)", "(3, 2)"} + }, + same6j); // Exception in thread "main" java.nio.BufferOverflowException // all rows, columns 1 to 2 - NdArray same7 = matrix2d.slice(Indices.all(), Indices.slice(1,3)); + NdArray same7 = matrix2d.slice(Indices.all(), Indices.slice(1, 3)); assertEquals(2, same7.rank()); - assertEquals(Shape.of(5,2), same7.shape()); + assertEquals(Shape.of(5, 2), same7.shape()); assertEquals(10, same7.size()); NdArray r7_0 = same7.get(0); NdArray r7_1 = same7.get(1); @@ -129,43 +129,42 @@ public void testIndices(){ // TODO: I get a (0,0) which is not what I expected // System.out.println(r7_0.getObject()); // assertEquals("(1,0)", r7_0.getObject()); - assertEquals( "(1, 0)", r7_0.getObject(0)); - assertEquals( "(2, 0)", r7_0.getObject(1)); - assertEquals( "(1, 1)", r7_1.getObject(0)); - assertEquals( "(2, 1)", r7_1.getObject(1)); - assertEquals( "(1, 2)", r7_2.getObject(0)); - assertEquals( "(2, 2)", r7_2.getObject(1)); - assertEquals( "(1, 3)", r7_3.getObject(0)); - assertEquals( "(2, 3)", r7_3.getObject(1)); - assertEquals( "(1, 4)", r7_4.getObject(0)); - assertEquals( "(2, 4)", r7_4.getObject(1)); - String[][] expectedr7 = new String[][] - { - {"(1, 0)", "(2, 0)"}, - {"(1, 1)", "(2, 1)"}, - {"(1, 2)", "(2, 2)"}, - {"(1, 3)", "(2, 3)"}, - {"(1, 4)", "(2, 4)"} - }; + assertEquals("(1, 0)", r7_0.getObject(0)); + assertEquals("(2, 0)", r7_0.getObject(1)); + assertEquals("(1, 1)", r7_1.getObject(0)); + assertEquals("(2, 1)", r7_1.getObject(1)); + assertEquals("(1, 2)", r7_2.getObject(0)); + assertEquals("(2, 2)", r7_2.getObject(1)); + assertEquals("(1, 3)", r7_3.getObject(0)); + assertEquals("(2, 3)", r7_3.getObject(1)); + assertEquals("(1, 4)", r7_4.getObject(0)); + assertEquals("(2, 4)", r7_4.getObject(1)); + String[][] expectedr7 = + new String[][] { + {"(1, 0)", "(2, 0)"}, + {"(1, 1)", "(2, 1)"}, + {"(1, 2)", "(2, 2)"}, + {"(1, 3)", "(2, 3)"}, + {"(1, 4)", "(2, 4)"} + }; String[][] lArray = new String[5][2]; StdArrays.copyFrom(same7, lArray); - assertArrayEquals( expectedr7, lArray); + assertArrayEquals(expectedr7, lArray); String[][] same7j = StdArrays.array2dCopyOf(same7, String.class); - assertArrayEquals( expectedr7, same7j); - + assertArrayEquals(expectedr7, same7j); // rows 1 to 2, columns 1 to 2 - NdArray same8 = matrix2d.slice(Indices.slice(1,3), Indices.slice(1,3)); + NdArray same8 = matrix2d.slice(Indices.slice(1, 3), Indices.slice(1, 3)); assertEquals(2, same8.rank()); - assertEquals(Shape.of(2,2), same8.shape()); + assertEquals(Shape.of(2, 2), same8.shape()); assertEquals(4, same8.size()); String[][] same8j = StdArrays.array2dCopyOf(same8, String.class); // print2D(same8j) - String[][] expected_r8 = new String[][] - { - {"(1, 1)", "(2, 1)"}, - {"(1, 2)", "(2, 2)"} - }; + String[][] expected_r8 = + new String[][] { + {"(1, 1)", "(2, 1)"}, + {"(1, 2)", "(2, 2)"} + }; assertArrayEquals(expected_r8, same8j); NdArray r8_0 = same8.get(0); NdArray r8_1 = same8.get(1); @@ -178,16 +177,16 @@ public void testIndices(){ assertEquals("(2, 2)", r8_1.getObject(1)); // rows 1 to 2, columns 1 to 2 - NdArray same9 = matrix2d.slice(Indices.range(1,3), Indices.range(1,3)); + NdArray same9 = matrix2d.slice(Indices.range(1, 3), Indices.range(1, 3)); assertEquals(2, same9.rank()); - assertEquals(Shape.of(2,2), same9.shape()); + assertEquals(Shape.of(2, 2), same9.shape()); assertEquals(4, same9.size()); String[][] same9j = StdArrays.array2dCopyOf(same9, String.class); - String[][] expected_r9 = new String[][] - { - {"(1, 1)", "(2, 1)"}, - {"(1, 2)", "(2, 2)"} - }; + String[][] expected_r9 = + new String[][] { + {"(1, 1)", "(2, 1)"}, + {"(1, 2)", "(2, 2)"} + }; assertArrayEquals(expected_r9, same9j); NdArray r9_0 = same9.get(0); NdArray r9_1 = same9.get(1); @@ -200,16 +199,16 @@ public void testIndices(){ assertEquals("(2, 2)", r9_1.getObject(1)); // rows 1, 3 and 4, columns 0 to 2 - NdArray same10 = matrix2d.slice(Indices.odd(), Indices.even()); + NdArray same10 = matrix2d.slice(Indices.odd(), Indices.even()); String[][] same10j = StdArrays.array2dCopyOf(same10, String.class); assertEquals(2, same10.rank()); - assertEquals(Shape.of(2,2), same10.shape()); + assertEquals(Shape.of(2, 2), same10.shape()); assertEquals(4, same10.size()); - String[][] expected_r10 = new String[][] - { - {"(0, 1)", "(2, 1)"}, - {"(0, 3)", "(2, 3)"} - }; + String[][] expected_r10 = + new String[][] { + {"(0, 1)", "(2, 1)"}, + {"(0, 3)", "(2, 3)"} + }; assertArrayEquals(expected_r10, same10j); NdArray r10_0 = same10.get(0); NdArray r10_1 = same10.get(1); @@ -222,16 +221,16 @@ public void testIndices(){ assertEquals("(2, 3)", r10_1.getObject(1)); // rows 3 and 4, columns 0 and 1. Second value is stride - NdArray same11 = matrix2d.slice(Indices.sliceFrom(3,1), Indices.sliceFrom(2,1)); + NdArray same11 = matrix2d.slice(Indices.sliceFrom(3, 1), Indices.sliceFrom(2, 1)); String[][] same11j = StdArrays.array2dCopyOf(same11, String.class); assertEquals(2, same11.rank()); - assertEquals(Shape.of(2,2), same11.shape()); + assertEquals(Shape.of(2, 2), same11.shape()); assertEquals(4, same11.size()); - String[][] expected_r11 = new String[][] - { - {"(2, 3)", "(3, 3)"}, - {"(2, 4)", "(3, 4)"} - }; + String[][] expected_r11 = + new String[][] { + {"(2, 3)", "(3, 3)"}, + {"(2, 4)", "(3, 4)"} + }; assertArrayEquals(expected_r11, same11j); NdArray r11_0 = same11.get(0); NdArray r11_1 = same11.get(1); @@ -243,18 +242,17 @@ public void testIndices(){ assertEquals("(2, 4)", r11_1.getObject(0)); assertEquals("(3, 4)", r11_1.getObject(1)); - // rows 0 and 2, columns 0 and 1. Second value is stride. Index non inclusive - NdArray same12 = matrix2d.slice(Indices.sliceTo(3,2), Indices.sliceTo(2,1)); + NdArray same12 = matrix2d.slice(Indices.sliceTo(3, 2), Indices.sliceTo(2, 1)); String[][] same12j = StdArrays.array2dCopyOf(same12, String.class); assertEquals(2, same12.rank()); - assertEquals(Shape.of(2,2), same12.shape()); + assertEquals(Shape.of(2, 2), same12.shape()); assertEquals(4, same12.size()); - String[][] expected_r12 = new String[][] - { - {"(0, 0)", "(1, 0)"}, - {"(0, 2)", "(1, 2)"} - }; + String[][] expected_r12 = + new String[][] { + {"(0, 0)", "(1, 0)"}, + {"(0, 2)", "(1, 2)"} + }; assertArrayEquals(expected_r12, same12j); NdArray r12_0 = same12.get(0); NdArray r12_1 = same12.get(1); @@ -270,14 +268,14 @@ public void testIndices(){ NdArray same13 = matrix2d.slice(Indices.step(2), Indices.step(2)); String[][] same13j = StdArrays.array2dCopyOf(same13, String.class); assertEquals(2, same13.rank()); - assertEquals(Shape.of(3,2), same13.shape()); + assertEquals(Shape.of(3, 2), same13.shape()); assertEquals(6, same13.size()); - String[][] expected_r13 = new String[][] - { - {"(0, 0)", "(2, 0)"}, - {"(0, 2)", "(2, 2)"}, - {"(0, 4)", "(2, 4)"} - }; + String[][] expected_r13 = + new String[][] { + {"(0, 0)", "(2, 0)"}, + {"(0, 2)", "(2, 2)"}, + {"(0, 4)", "(2, 4)"} + }; assertArrayEquals(expected_r13, same13j); NdArray r13_0 = same13.get(0); NdArray r13_1 = same13.get(1); @@ -292,18 +290,17 @@ public void testIndices(){ assertEquals("(0, 4)", r13_2.getObject(0)); assertEquals("(2, 4)", r13_2.getObject(1)); - NdArray same14 = same13.slice(Indices.flip(), Indices.flip()); String[][] same14j = StdArrays.array2dCopyOf(same14, String.class); assertEquals(2, same14.rank()); - assertEquals(Shape.of(3,2), same14.shape()); + assertEquals(Shape.of(3, 2), same14.shape()); assertEquals(6, same14.size()); - String[][] expected_r14 = new String[][] - { - {"(2, 4)", "(0, 4)"}, - {"(2, 2)", "(0, 2)"}, - {"(2, 0)", "(0, 0)"} - }; + String[][] expected_r14 = + new String[][] { + {"(2, 4)", "(0, 4)"}, + {"(2, 2)", "(0, 2)"}, + {"(2, 0)", "(0, 0)"} + }; assertArrayEquals(same14j, expected_r14); NdArray r14_0 = same14.get(0); NdArray r14_1 = same14.get(1); @@ -318,17 +315,16 @@ public void testIndices(){ assertEquals("(0, 4)", r14_0.getObject(1)); assertEquals("(2, 4)", r14_0.getObject(0)); - - NdArray same15 = matrix2d.slice(Indices.slice(4,0,-2), Indices.slice(3L,null,-2)); + NdArray same15 = matrix2d.slice(Indices.slice(4, 0, -2), Indices.slice(3L, null, -2)); String[][] same15j = StdArrays.array2dCopyOf(same15, String.class); assertEquals(2, same15.rank()); - assertEquals(Shape.of(2,2), same15.shape()); - assertEquals(4,same15.size()); - String[][] expected_r15 = new String[][] - { - {"(3, 4)", "(1, 4)"}, - {"(3, 2)", "(1, 2)"}, - }; + assertEquals(Shape.of(2, 2), same15.shape()); + assertEquals(4, same15.size()); + String[][] expected_r15 = + new String[][] { + {"(3, 4)", "(1, 4)"}, + {"(3, 2)", "(1, 2)"}, + }; assertArrayEquals(expected_r15, same15j); NdArray r15_0 = same15.get(0); NdArray r15_1 = same15.get(1); @@ -340,16 +336,16 @@ public void testIndices(){ assertEquals("(3, 2)", r15_1.getObject(0)); assertEquals("(1, 2)", r15_1.getObject(1)); - NdArray same16 = matrix2d.slice(Indices.seq(4,2), Indices.seq(3,1)); + NdArray same16 = matrix2d.slice(Indices.seq(4, 2), Indices.seq(3, 1)); String[][] same16j = StdArrays.array2dCopyOf(same16, String.class); assertEquals(2, same16.rank()); - assertEquals(Shape.of(2,2), same16.shape()); + assertEquals(Shape.of(2, 2), same16.shape()); assertEquals(4, same16.size()); - String[][] expected_r16 = new String[][] - { - {"(3, 4)", "(1, 4)"}, - {"(3, 2)", "(1, 2)"} - }; + String[][] expected_r16 = + new String[][] { + {"(3, 4)", "(1, 4)"}, + {"(3, 2)", "(1, 2)"} + }; assertArrayEquals(expected_r16, same16j); NdArray r16_0 = same16.get(0); NdArray r16_1 = same16.get(1); @@ -360,22 +356,21 @@ public void testIndices(){ assertEquals("(1, 4)", r16_0.getObject(1)); assertEquals("(3, 2)", r16_1.getObject(0)); assertEquals("(1, 2)", r16_1.getObject(1)); - - // New axis always has size 1 + // New axis always has size 1 NdArray same17 = matrix2d.slice(Indices.all(), Indices.all(), Indices.newAxis()); String[][][] same17j = StdArrays.array3dCopyOf(same17, String.class); assertEquals(3, same17.rank()); - assertEquals(Shape.of(5,4,1), same17.shape()); + assertEquals(Shape.of(5, 4, 1), same17.shape()); assertEquals(20, same17.size()); - String[][][] expected_r17 = new String[][][] - { - {{"(0, 0)"}, {"(1, 0)"}, {"(2, 0)"}, {"(3, 0)"}}, - {{"(0, 1)"}, {"(1, 1)"}, {"(2, 1)"}, {"(3, 1)"}}, - {{"(0, 2)"}, {"(1, 2)"}, {"(2, 2)"}, {"(3, 2)"}}, - {{"(0, 3)"}, {"(1, 3)"}, {"(2, 3)"}, {"(3, 3)"}}, - {{"(0, 4)"}, {"(1, 4)"}, {"(2, 4)"}, {"(3, 4)"}} - }; + String[][][] expected_r17 = + new String[][][] { + {{"(0, 0)"}, {"(1, 0)"}, {"(2, 0)"}, {"(3, 0)"}}, + {{"(0, 1)"}, {"(1, 1)"}, {"(2, 1)"}, {"(3, 1)"}}, + {{"(0, 2)"}, {"(1, 2)"}, {"(2, 2)"}, {"(3, 2)"}}, + {{"(0, 3)"}, {"(1, 3)"}, {"(2, 3)"}, {"(3, 3)"}}, + {{"(0, 4)"}, {"(1, 4)"}, {"(2, 4)"}, {"(3, 4)"}} + }; assertArrayEquals(expected_r17, same17j); NdArray r17_0 = same17.get(0); NdArray r17_1 = same17.get(1); @@ -383,42 +378,40 @@ public void testIndices(){ NdArray r17_3 = same17.get(3); NdArray r17_4 = same17.get(4); assertEquals(2, r17_0.rank()); - assertEquals(Shape.of(4,1), r17_0.shape()); + assertEquals(Shape.of(4, 1), r17_0.shape()); assertEquals(4, r17_0.size()); // row 0 // What use case can we have for a new index of size 1? // row 1 - assertEquals("(0, 1)", r17_1.getObject(0,0)); - assertEquals("(1, 1)", r17_1.getObject(1,0)); - assertEquals("(2, 1)", r17_1.getObject(2,0)); - assertEquals("(3, 1)", r17_1.getObject(3,0)); + assertEquals("(0, 1)", r17_1.getObject(0, 0)); + assertEquals("(1, 1)", r17_1.getObject(1, 0)); + assertEquals("(2, 1)", r17_1.getObject(2, 0)); + assertEquals("(3, 1)", r17_1.getObject(3, 0)); // row 2 - assertEquals("(0, 2)", r17_2.getObject(0,0)); - assertEquals("(1, 2)", r17_2.getObject(1,0)); - assertEquals("(2, 2)", r17_2.getObject(2,0)); - assertEquals("(3, 2)", r17_2.getObject(3,0)); + assertEquals("(0, 2)", r17_2.getObject(0, 0)); + assertEquals("(1, 2)", r17_2.getObject(1, 0)); + assertEquals("(2, 2)", r17_2.getObject(2, 0)); + assertEquals("(3, 2)", r17_2.getObject(3, 0)); // row 3 - assertEquals("(0, 3)", r17_3.getObject(0,0)); - assertEquals("(1, 3)", r17_3.getObject(1,0)); - assertEquals("(2, 3)", r17_3.getObject(2,0)); - assertEquals("(3, 3)", r17_3.getObject(3,0)); + assertEquals("(0, 3)", r17_3.getObject(0, 0)); + assertEquals("(1, 3)", r17_3.getObject(1, 0)); + assertEquals("(2, 3)", r17_3.getObject(2, 0)); + assertEquals("(3, 3)", r17_3.getObject(3, 0)); // row 4 - assertEquals("(0, 4)", r17_4.getObject(0,0)); - assertEquals("(1, 4)", r17_4.getObject(1,0)); - assertEquals("(2, 4)", r17_4.getObject(2,0)); - assertEquals("(3, 4)", r17_4.getObject(3,0)); - + assertEquals("(0, 4)", r17_4.getObject(0, 0)); + assertEquals("(1, 4)", r17_4.getObject(1, 0)); + assertEquals("(2, 4)", r17_4.getObject(2, 0)); + assertEquals("(3, 4)", r17_4.getObject(3, 0)); } @Test - public void testNewaxis(){ + public void testNewaxis() { IntNdArray matrix3d = NdArrays.ofInts(Shape.of(5, 4, 5)); - matrix3d.scalars().forEachIndexed((coords, scalar) -> - scalar.setInt((int)coords[2]) - ); + matrix3d.scalars().forEachIndexed((coords, scalar) -> scalar.setInt((int) coords[2])); - IntNdArray slice1 = matrix3d.slice(Indices.all(), Indices.all(), Indices.all(), Indices.newAxis()); + IntNdArray slice1 = + matrix3d.slice(Indices.all(), Indices.all(), Indices.all(), Indices.newAxis()); assertEquals(Shape.of(5, 4, 5, 1), slice1.shape()); assertEquals(0, slice1.getInt(0, 0, 0, 0)); @@ -426,7 +419,8 @@ public void testNewaxis(){ assertEquals(4, slice1.getInt(0, 0, 4, 0)); assertEquals(2, slice1.getInt(0, 1, 2, 0)); - IntNdArray slice2 = matrix3d.slice(Indices.all(), Indices.all(), Indices.newAxis(), Indices.all()); + IntNdArray slice2 = + matrix3d.slice(Indices.all(), Indices.all(), Indices.newAxis(), Indices.all()); assertEquals(Shape.of(5, 4, 1, 5), slice2.shape()); assertEquals(0, slice2.getInt(0, 0, 0, 0)); @@ -434,7 +428,8 @@ public void testNewaxis(){ assertEquals(4, slice2.getInt(0, 0, 0, 4)); assertEquals(2, slice2.getInt(0, 1, 0, 2)); - IntNdArray slice3 = matrix3d.slice(Indices.all(), Indices.newAxis(), Indices.all(), Indices.all()); + IntNdArray slice3 = + matrix3d.slice(Indices.all(), Indices.newAxis(), Indices.all(), Indices.all()); assertEquals(Shape.of(5, 1, 4, 5), slice3.shape()); assertEquals(0, slice3.getInt(0, 0, 0, 0)); @@ -442,64 +437,54 @@ public void testNewaxis(){ assertEquals(4, slice3.getInt(0, 0, 0, 4)); assertEquals(2, slice3.getInt(0, 0, 1, 2)); - IntNdArray slice4 = matrix3d.slice(Indices.newAxis(), Indices.all(), Indices.all(), Indices.all()); + IntNdArray slice4 = + matrix3d.slice(Indices.newAxis(), Indices.all(), Indices.all(), Indices.all()); assertEquals(Shape.of(1, 5, 4, 5), slice4.shape()); assertEquals(0, slice4.getInt(0, 0, 0, 0)); assertEquals(1, slice4.getInt(0, 0, 0, 1)); assertEquals(4, slice4.getInt(0, 0, 0, 4)); assertEquals(2, slice4.getInt(0, 0, 1, 2)); - } @Test - public void testEllipsis(){ + public void testEllipsis() { IntNdArray matrix3d = NdArrays.ofInts(Shape.of(5, 4, 5)); - matrix3d.scalars().forEachIndexed((coords, scalar) -> - scalar.setInt((int)coords[2]) - ); + matrix3d.scalars().forEachIndexed((coords, scalar) -> scalar.setInt((int) coords[2])); assertEquals( matrix3d.slice(Indices.all(), Indices.all(), Indices.at(0)), - matrix3d.slice(Indices.ellipsis(), Indices.at(0)) - ); + matrix3d.slice(Indices.ellipsis(), Indices.at(0))); assertEquals( matrix3d.slice(Indices.at(0), Indices.all(), Indices.all()), - matrix3d.slice(Indices.at(0), Indices.ellipsis()) - ); + matrix3d.slice(Indices.at(0), Indices.ellipsis())); assertEquals( matrix3d.slice(Indices.at(0), Indices.all(), Indices.at(0)), - matrix3d.slice(Indices.at(0), Indices.ellipsis(), Indices.at(0)) - ); + matrix3d.slice(Indices.at(0), Indices.ellipsis(), Indices.at(0))); // newaxis interacts specially with ellipsis (since it doesn't consume a dimension), test this assertEquals( matrix3d.slice(Indices.all(), Indices.all(), Indices.newAxis(), Indices.at(0)), - matrix3d.slice(Indices.ellipsis(), Indices.newAxis(), Indices.at(0)) - ); + matrix3d.slice(Indices.ellipsis(), Indices.newAxis(), Indices.at(0))); assertEquals( matrix3d.slice(Indices.newAxis(), Indices.all(), Indices.all(), Indices.at(0)), - matrix3d.slice(Indices.newAxis(), Indices.ellipsis(), Indices.at(0)) - ); + matrix3d.slice(Indices.newAxis(), Indices.ellipsis(), Indices.at(0))); assertEquals( matrix3d.slice(Indices.all(), Indices.all(), Indices.at(0), Indices.newAxis()), - matrix3d.slice(Indices.ellipsis(), Indices.at(0), Indices.newAxis()) - ); + matrix3d.slice(Indices.ellipsis(), Indices.at(0), Indices.newAxis())); } @Test - public void testSlice(){ + public void testSlice() { IntNdArray matrix3d = NdArrays.ofInts(Shape.of(5, 4, 5)); - matrix3d.scalars().forEachIndexed((coords, scalar) -> - scalar.setInt((int)coords[2]) - ); + matrix3d.scalars().forEachIndexed((coords, scalar) -> scalar.setInt((int) coords[2])); IntNdArray slice1 = matrix3d.slice(Indices.all(), Indices.sliceTo(3), Indices.all()); @@ -519,7 +504,9 @@ public void testSlice(){ assertEquals(slice2, matrix3d.slice(Indices.all(), Indices.all(), Indices.slice(-4, -1))); - assertEquals(Shape.of(5, 4, 0), matrix3d.slice(Indices.all(), Indices.all(), Indices.slice(1, 4, -2)).shape()); + assertEquals( + Shape.of(5, 4, 0), + matrix3d.slice(Indices.all(), Indices.all(), Indices.slice(1, 4, -2)).shape()); IntNdArray slice3 = matrix3d.slice(Indices.all(), Indices.all(), Indices.slice(4, 1, -2)); @@ -540,12 +527,10 @@ public void testSlice(){ } @Test - public void testAt(){ + public void testAt() { IntNdArray matrix3d = NdArrays.ofInts(Shape.of(5, 4, 5)); - matrix3d.scalars().forEachIndexed((coords, scalar) -> - scalar.setInt((int)coords[2]) - ); + matrix3d.scalars().forEachIndexed((coords, scalar) -> scalar.setInt((int) coords[2])); IntNdArray slice1 = matrix3d.slice(Indices.all(), Indices.all(), Indices.at(0)); @@ -567,5 +552,4 @@ public void testAt(){ assertEquals(Shape.of(5, 4, 1), slice4.shape()); assertEquals(2, slice4.getInt(0, 0, 0)); } - } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/IntNdArrayTestBase.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/IntNdArrayTestBase.java index 0fba8fb9fb7..f3278196901 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/IntNdArrayTestBase.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/IntNdArrayTestBase.java @@ -1,81 +1,77 @@ /* - Copyright 2019-2023 The TensorFlow Authors. All Rights Reserved. +Copyright 2019-2023 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray; -import org.junit.jupiter.api.Test; - import static org.junit.jupiter.api.Assertions.assertArrayEquals; import static org.junit.jupiter.api.Assertions.assertEquals; +import org.junit.jupiter.api.Test; + public abstract class IntNdArrayTestBase extends NdArrayTestBase { - @Override - protected abstract IntNdArray allocate(Shape shape); - - @Override - protected Integer valueOf(Long val) { - return val.intValue(); - } - - @Test - public void iteratePrimitiveElements() { - IntNdArray matrix3d = allocate(Shape.of(5, 4, 5)); - - matrix3d.scalars().forEachIndexed((coords, scalar) -> - scalar.setInt((int)coords[2]) - ); - - assertEquals(0, matrix3d.getInt(0, 0, 0)); - assertEquals(1, matrix3d.getInt(0, 0, 1)); - assertEquals(4, matrix3d.getInt(0, 0, 4)); - assertEquals(2, matrix3d.getInt(0, 1, 2)); - - matrix3d.elements(1).forEach(vector -> - vector.set(NdArrays.vectorOf(5, 6, 7, 8, 9)) - ); - - assertEquals(5, matrix3d.getInt(0, 0, 0)); - assertEquals(6, matrix3d.getInt(0, 0, 1)); - assertEquals(9, matrix3d.getInt(0, 0, 4)); - assertEquals(7, matrix3d.getInt(0, 1, 2)); - } - - @Test - public void streamingInts() { - IntNdArray scalar = allocate(Shape.scalar()); - scalar.setInt(1); - var values = scalar.streamOfInts().toArray(); - assertArrayEquals(new int[]{1}, values); - - IntNdArray vector = allocate(Shape.of(5)); - vector.setInt(1, 0); - vector.setInt(2, 1); - vector.setInt(3, 2); - vector.setInt(4, 3); - vector.setInt(5, 4); - values = vector.streamOfInts().toArray(); - assertArrayEquals(new int[]{1, 2, 3, 4, 5}, values); - - IntNdArray matrix = allocate(Shape.of(2, 2)); - matrix.setInt(1, 0, 0); - matrix.setInt(2, 0, 1); - matrix.setInt(3, 1, 0); - matrix.setInt(4, 1, 1); - values = matrix.streamOfInts().toArray(); - assertArrayEquals(new int[]{1, 2, 3, 4}, values); - } + @Override + protected abstract IntNdArray allocate(Shape shape); + + @Override + protected Integer valueOf(Long val) { + return val.intValue(); + } + + @Test + public void iteratePrimitiveElements() { + IntNdArray matrix3d = allocate(Shape.of(5, 4, 5)); + + matrix3d.scalars().forEachIndexed((coords, scalar) -> scalar.setInt((int) coords[2])); + + assertEquals(0, matrix3d.getInt(0, 0, 0)); + assertEquals(1, matrix3d.getInt(0, 0, 1)); + assertEquals(4, matrix3d.getInt(0, 0, 4)); + assertEquals(2, matrix3d.getInt(0, 1, 2)); + + matrix3d.elements(1).forEach(vector -> vector.set(NdArrays.vectorOf(5, 6, 7, 8, 9))); + + assertEquals(5, matrix3d.getInt(0, 0, 0)); + assertEquals(6, matrix3d.getInt(0, 0, 1)); + assertEquals(9, matrix3d.getInt(0, 0, 4)); + assertEquals(7, matrix3d.getInt(0, 1, 2)); + } + + @Test + public void streamingInts() { + IntNdArray scalar = allocate(Shape.scalar()); + scalar.setInt(1); + var values = scalar.streamOfInts().toArray(); + assertArrayEquals(new int[] {1}, values); + + IntNdArray vector = allocate(Shape.of(5)); + vector.setInt(1, 0); + vector.setInt(2, 1); + vector.setInt(3, 2); + vector.setInt(4, 3); + vector.setInt(5, 4); + values = vector.streamOfInts().toArray(); + assertArrayEquals(new int[] {1, 2, 3, 4, 5}, values); + + IntNdArray matrix = allocate(Shape.of(2, 2)); + matrix.setInt(1, 0, 0); + matrix.setInt(2, 0, 1); + matrix.setInt(3, 1, 0); + matrix.setInt(4, 1, 1); + values = matrix.streamOfInts().toArray(); + assertArrayEquals(new int[] {1, 2, 3, 4}, values); + } } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/LongNdArrayTestBase.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/LongNdArrayTestBase.java index 520d9bc3a61..ad8023284f1 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/LongNdArrayTestBase.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/LongNdArrayTestBase.java @@ -1,19 +1,19 @@ /* - Copyright 2019-2023 The TensorFlow Authors. All Rights Reserved. +Copyright 2019-2023 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray; import static org.junit.jupiter.api.Assertions.assertArrayEquals; @@ -23,59 +23,55 @@ public abstract class LongNdArrayTestBase extends NdArrayTestBase { - @Override - protected abstract LongNdArray allocate(Shape shape); - - @Override - protected Long valueOf(Long val) { - return val; - } - - @Test - public void iteratePrimitiveElements() { - LongNdArray matrix3d = allocate(Shape.of(5, 4, 5)); - - matrix3d.scalars().forEachIndexed((coords, scalar) -> - scalar.setLong(coords[2]) - ); - - assertEquals(0, matrix3d.getLong(0, 0, 0)); - assertEquals(1, matrix3d.getLong(0, 0, 1)); - assertEquals(4, matrix3d.getLong(0, 0, 4)); - assertEquals(2, matrix3d.getLong(0, 1, 2)); - - matrix3d.elements(1).forEach(vector -> - vector.set(NdArrays.vectorOf(5L, 6L, 7L, 8L, 9L)) - ); - - assertEquals(5, matrix3d.getLong(0, 0, 0)); - assertEquals(6, matrix3d.getLong(0, 0, 1)); - assertEquals(9, matrix3d.getLong(0, 0, 4)); - assertEquals(7, matrix3d.getLong(0, 1, 2)); - } - - @Test - public void streamingLongs() { - LongNdArray scalar = allocate(Shape.scalar()); - scalar.setLong(1L); - var values = scalar.streamOfLongs().toArray(); - assertArrayEquals(new long[]{1L}, values); - - LongNdArray vector = allocate(Shape.of(5)); - vector.setLong(1L, 0); - vector.setLong(2L, 1); - vector.setLong(3L, 2); - vector.setLong(4L, 3); - vector.setLong(5L, 4); - values = vector.streamOfLongs().toArray(); - assertArrayEquals(new long[]{1L, 2L, 3L, 4L, 5L}, values); - - LongNdArray matrix = allocate(Shape.of(2, 2)); - matrix.setLong(1L, 0, 0); - matrix.setLong(2L, 0, 1); - matrix.setLong(3L, 1, 0); - matrix.setLong(4L, 1, 1); - values = matrix.streamOfLongs().toArray(); - assertArrayEquals(new long[]{1L, 2L, 3L, 4L}, values); - } + @Override + protected abstract LongNdArray allocate(Shape shape); + + @Override + protected Long valueOf(Long val) { + return val; + } + + @Test + public void iteratePrimitiveElements() { + LongNdArray matrix3d = allocate(Shape.of(5, 4, 5)); + + matrix3d.scalars().forEachIndexed((coords, scalar) -> scalar.setLong(coords[2])); + + assertEquals(0, matrix3d.getLong(0, 0, 0)); + assertEquals(1, matrix3d.getLong(0, 0, 1)); + assertEquals(4, matrix3d.getLong(0, 0, 4)); + assertEquals(2, matrix3d.getLong(0, 1, 2)); + + matrix3d.elements(1).forEach(vector -> vector.set(NdArrays.vectorOf(5L, 6L, 7L, 8L, 9L))); + + assertEquals(5, matrix3d.getLong(0, 0, 0)); + assertEquals(6, matrix3d.getLong(0, 0, 1)); + assertEquals(9, matrix3d.getLong(0, 0, 4)); + assertEquals(7, matrix3d.getLong(0, 1, 2)); + } + + @Test + public void streamingLongs() { + LongNdArray scalar = allocate(Shape.scalar()); + scalar.setLong(1L); + var values = scalar.streamOfLongs().toArray(); + assertArrayEquals(new long[] {1L}, values); + + LongNdArray vector = allocate(Shape.of(5)); + vector.setLong(1L, 0); + vector.setLong(2L, 1); + vector.setLong(3L, 2); + vector.setLong(4L, 3); + vector.setLong(5L, 4); + values = vector.streamOfLongs().toArray(); + assertArrayEquals(new long[] {1L, 2L, 3L, 4L, 5L}, values); + + LongNdArray matrix = allocate(Shape.of(2, 2)); + matrix.setLong(1L, 0, 0); + matrix.setLong(2L, 0, 1); + matrix.setLong(3L, 1, 0); + matrix.setLong(4L, 1, 1); + values = matrix.streamOfLongs().toArray(); + assertArrayEquals(new long[] {1L, 2L, 3L, 4L}, values); + } } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/NdArrayTestBase.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/NdArrayTestBase.java index 36064d24a73..ce6d990dd90 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/NdArrayTestBase.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/NdArrayTestBase.java @@ -1,19 +1,19 @@ /* - Copyright 2019-2023 The TensorFlow Authors. All Rights Reserved. +Copyright 2019-2023 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray; import static org.junit.jupiter.api.Assertions.*; @@ -32,7 +32,6 @@ import java.nio.BufferUnderflowException; import java.util.List; import java.util.stream.Collectors; - import org.junit.jupiter.api.Test; import org.tensorflow.ndarray.buffer.DataBuffer; import org.tensorflow.ndarray.index.Indices; @@ -95,11 +94,12 @@ public void setAndGetValues() { // as expected } - NdArray matrix2 = allocate(Shape.of(3, 2)) - .set(vectorOfObjects(valueOf(1L), valueOf(2L)), 0) - .set(vectorOfObjects(valueOf(3L), valueOf(4L)), 1) - .setObject(valueOf(5L), 2, 0) - .setObject(valueOf(6L), 2, 1); + NdArray matrix2 = + allocate(Shape.of(3, 2)) + .set(vectorOfObjects(valueOf(1L), valueOf(2L)), 0) + .set(vectorOfObjects(valueOf(3L), valueOf(4L)), 1) + .setObject(valueOf(5L), 2, 0) + .setObject(valueOf(6L), 2, 1); assertEquals(valueOf(1L), matrix2.getObject(0, 0)); assertEquals(valueOf(2L), matrix2.getObject(0, 1)); @@ -113,18 +113,25 @@ public void setAndGetValues() { public void iterateElements() { NdArray matrix3d = allocate(Shape.of(5, 4, 5)); - matrix3d.scalars().forEachIndexed((coords, scalar) -> { - scalar.setObject(valueOf(coords[2])); - }); + matrix3d + .scalars() + .forEachIndexed( + (coords, scalar) -> { + scalar.setObject(valueOf(coords[2])); + }); assertEquals(valueOf(0L), matrix3d.getObject(0, 0, 0)); assertEquals(valueOf(1L), matrix3d.getObject(0, 0, 1)); assertEquals(valueOf(4L), matrix3d.getObject(0, 0, 4)); assertEquals(valueOf(2L), matrix3d.getObject(0, 1, 2)); - matrix3d.elements(1).forEach(vector -> { - vector.set(vectorOfObjects(valueOf(5L), valueOf(6L), valueOf(7L), valueOf(8L), valueOf(9L))); - }); + matrix3d + .elements(1) + .forEach( + vector -> { + vector.set( + vectorOfObjects(valueOf(5L), valueOf(6L), valueOf(7L), valueOf(8L), valueOf(9L))); + }); assertEquals(valueOf(5L), matrix3d.getObject(0, 0, 0)); assertEquals(valueOf(6L), matrix3d.getObject(0, 0, 1)); @@ -320,9 +327,8 @@ public void equalsAndHashCode() { NdArray array4 = allocate(Shape.of(1, 2, 2)); @SuppressWarnings("unchecked") - T[][][] values = (T[][][]) (new Object[][][]{ - {{valueOf(0L), valueOf(1L)}, {valueOf(2L), valueOf(0L)}} - }); + T[][][] values = + (T[][][]) (new Object[][][] {{{valueOf(0L), valueOf(1L)}, {valueOf(2L), valueOf(0L)}}}); StdArrays.copyTo(values[0], array1); StdArrays.copyTo(values[0], array2); @@ -353,11 +359,18 @@ public void iterateScalarsOnSegmentedElements() { NdArray slice = originalTensor.slice(Indices.all(), Indices.sliceFrom(1)); assertEquals(Shape.of(2, 2), slice.shape()); - slice.elements(0).forEachIndexed((eCoord, e) -> { - e.scalars().forEachIndexed((sCoord, s) -> { - assertEquals(valueOf((eCoord[0] * originalTensor.shape().get(1)) + sCoord[0] + 1), s.getObject()); - }); - }); + slice + .elements(0) + .forEachIndexed( + (eCoord, e) -> { + e.scalars() + .forEachIndexed( + (sCoord, s) -> { + assertEquals( + valueOf((eCoord[0] * originalTensor.shape().get(1)) + sCoord[0] + 1), + s.getObject()); + }); + }); } @Test @@ -374,7 +387,8 @@ public void streamingObjects() { vector.setObject(valueOf(4L), 3); vector.setObject(valueOf(5L), 4); values = vector.streamOfObjects().collect(Collectors.toList()); - assertIterableEquals(List.of(valueOf(1L), valueOf(2L), valueOf(3L), valueOf(4L), valueOf(5L)), values); + assertIterableEquals( + List.of(valueOf(1L), valueOf(2L), valueOf(3L), valueOf(4L), valueOf(5L)), values); NdArray matrix = allocate(Shape.of(2, 2)); matrix.setObject(valueOf(1L), 0, 0); diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/ShapeTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/ShapeTest.java index c1247aba4e9..f6bec66cb25 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/ShapeTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/ShapeTest.java @@ -36,7 +36,7 @@ public void allKnownDimensions() { assertEquals(4, shape.get(1)); assertEquals(5, shape.get(2)); assertEquals(100, shape.size()); - assertArrayEquals(new long[]{5, 4, 5}, shape.asArray()); + assertArrayEquals(new long[] {5, 4, 5}, shape.asArray()); try { shape.get(3); fail(); diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/ShortNdArrayTestBase.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/ShortNdArrayTestBase.java index f9043fec4f5..347ac7a7b6a 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/ShortNdArrayTestBase.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/ShortNdArrayTestBase.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -22,34 +22,35 @@ public abstract class ShortNdArrayTestBase extends NdArrayTestBase { - @Override - protected abstract ShortNdArray allocate(Shape shape); - - @Override - protected Short valueOf(Long val) { - return val.shortValue(); - } - - @Test - public void iteratePrimitiveElements() { - ShortNdArray matrix3d = allocate(Shape.of(5, 4, 5)); - - matrix3d.scalars().forEachIndexed((coords, scalar) -> - scalar.setShort((short)coords[2]) - ); - - assertEquals(0, matrix3d.getShort(0, 0, 0)); - assertEquals(1, matrix3d.getShort(0, 0, 1)); - assertEquals(4, matrix3d.getShort(0, 0, 4)); - assertEquals(2, matrix3d.getShort(0, 1, 2)); - - matrix3d.elements(1).forEach(vector -> - vector.set(NdArrays.vectorOf((short)5, (short)6, (short)7, (short)8, (short)9)) - ); - - assertEquals(5, matrix3d.getShort(0, 0, 0)); - assertEquals(6, matrix3d.getShort(0, 0, 1)); - assertEquals(9, matrix3d.getShort(0, 0, 4)); - assertEquals(7, matrix3d.getShort(0, 1, 2)); - } + @Override + protected abstract ShortNdArray allocate(Shape shape); + + @Override + protected Short valueOf(Long val) { + return val.shortValue(); + } + + @Test + public void iteratePrimitiveElements() { + ShortNdArray matrix3d = allocate(Shape.of(5, 4, 5)); + + matrix3d.scalars().forEachIndexed((coords, scalar) -> scalar.setShort((short) coords[2])); + + assertEquals(0, matrix3d.getShort(0, 0, 0)); + assertEquals(1, matrix3d.getShort(0, 0, 1)); + assertEquals(4, matrix3d.getShort(0, 0, 4)); + assertEquals(2, matrix3d.getShort(0, 1, 2)); + + matrix3d + .elements(1) + .forEach( + vector -> + vector.set( + NdArrays.vectorOf((short) 5, (short) 6, (short) 7, (short) 8, (short) 9))); + + assertEquals(5, matrix3d.getShort(0, 0, 0)); + assertEquals(6, matrix3d.getShort(0, 0, 1)); + assertEquals(9, matrix3d.getShort(0, 0, 4)); + assertEquals(7, matrix3d.getShort(0, 1, 2)); + } } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/SparseNdArrayTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/SparseNdArrayTest.java index 0c5d6b30e9d..9c001dbaf80 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/SparseNdArrayTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/SparseNdArrayTest.java @@ -14,6 +14,11 @@ =======================================================================*/ package org.tensorflow.ndarray; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + import org.junit.jupiter.api.Test; import org.tensorflow.ndarray.impl.sparse.BooleanSparseNdArray; import org.tensorflow.ndarray.impl.sparse.ByteSparseNdArray; @@ -23,11 +28,6 @@ import org.tensorflow.ndarray.impl.sparse.LongSparseNdArray; import org.tensorflow.ndarray.impl.sparse.ShortSparseNdArray; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertThrows; -import static org.junit.jupiter.api.Assertions.assertTrue; - public class SparseNdArrayTest { long[][] indicesArray = {{0, 0}, {1, 2}, {2, 3}}; LongNdArray indices = StdArrays.ndCopyOf(indicesArray); @@ -59,8 +59,7 @@ public void testBoolean() { @Test public void testByte() { ByteSparseNdArray instance = - NdArrays.sparseOf( - indices, NdArrays.vectorOf((byte) 1, (byte) 18, (byte) 0xff), shape); + NdArrays.sparseOf(indices, NdArrays.vectorOf((byte) 1, (byte) 18, (byte) 0xff), shape); assertEquals(6, instance.getIndices().size()); assertEquals(3, instance.getValues().size()); assertEquals((byte) 1, instance.getByte(0, 0)); @@ -125,8 +124,7 @@ public void testFloat() { @Test public void testInt() { - IntSparseNdArray instance = - NdArrays.sparseOf(indices, NdArrays.vectorOf(1, 18, 256), shape); + IntSparseNdArray instance = NdArrays.sparseOf(indices, NdArrays.vectorOf(1, 18, 256), shape); assertEquals(6, instance.getIndices().size()); assertEquals(3, instance.getValues().size()); assertEquals(1, instance.getInt(0, 0)); @@ -170,8 +168,7 @@ public void testLong() { @Test public void testShort() { ShortSparseNdArray instance = - NdArrays.sparseOf( - indices, NdArrays.vectorOf((short) 1, (short) 18, (short) 0xff00), shape); + NdArrays.sparseOf(indices, NdArrays.vectorOf((short) 1, (short) 18, (short) 0xff00), shape); assertEquals(6, instance.getIndices().size()); assertEquals(3, instance.getValues().size()); assertEquals((short) 1, instance.getShort(0, 0)); @@ -193,6 +190,7 @@ public void testShort() { @Test public void withShape() { NdArray sparseArray = NdArrays.sparseOf(indices, NdArrays.vectorOf(1, 2, 3), shape); - assertThrows(UnsupportedOperationException.class, () -> sparseArray.withShape(shape.prepend(1))); + assertThrows( + UnsupportedOperationException.class, () -> sparseArray.withShape(shape.prepend(1))); } } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/StdArraysTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/StdArraysTest.java index b7b41564c33..7b1c9663a39 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/StdArraysTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/StdArraysTest.java @@ -70,10 +70,12 @@ public void vectors() { public void matrices() { IntNdArray matrix = NdArrays.ofInts(Shape.of(2, 2)); - StdArrays.copyTo(new int[][] { - {1, 2}, - {3, 4} - }, matrix); + StdArrays.copyTo( + new int[][] { + {1, 2}, + {3, 4} + }, + matrix); assertEquals(1, matrix.getInt(0, 0)); assertEquals(2, matrix.getInt(0, 1)); assertEquals(3, matrix.getInt(1, 0)); @@ -105,9 +107,9 @@ public void matrices() { array = new int[3][3]; StdArrays.copyFrom(matrix, array); - assertArrayEquals(new int[] { 1, 2, 0 }, array[0]); - assertArrayEquals(new int[] { 3, 4, 0 }, array[1]); - assertArrayEquals(new int[] { 0, 0, 0 }, array[2]); + assertArrayEquals(new int[] {1, 2, 0}, array[0]); + assertArrayEquals(new int[] {3, 4, 0}, array[1]); + assertArrayEquals(new int[] {0, 0, 0}, array[2]); try { StdArrays.copyFrom(matrix, new int[1][2]); @@ -167,10 +169,12 @@ public void objectMatrix() { public void cannotInitDenseMatrixWithRaggedArray() { IntNdArray matrix = NdArrays.ofInts(Shape.of(2, 2)); try { - StdArrays.copyTo(new int[][]{ - {1, 2}, - {3} - }, matrix); + StdArrays.copyTo( + new int[][] { + {1, 2}, + {3} + }, + matrix); fail(); } catch (IllegalArgumentException e) { // as expected @@ -179,27 +183,23 @@ public void cannotInitDenseMatrixWithRaggedArray() { @Test public void computeShapeDense3DMatrix() { - Shape shape = StdArrays.shapeOf(new int[][][] { - { - {1, 2, 3}, {4, 5, 6} - }, - { - {1, 2, 3}, {4, 5, 6} - } - }); + Shape shape = + StdArrays.shapeOf( + new int[][][] { + {{1, 2, 3}, {4, 5, 6}}, + {{1, 2, 3}, {4, 5, 6}} + }); assertArrayEquals(new long[] {2, 2, 3}, shape.asArray()); } @Test public void shapeOfRagged3DMatrix() { - Shape shape = StdArrays.shapeOf(new int[][][] { - { - {1, 2, 3}, {4, 5, 6}, {7, 8, 9} - }, - { - {1, 2, 3}, {4, 5, 6} - } - }); + Shape shape = + StdArrays.shapeOf( + new int[][][] { + {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}, + {{1, 2, 3}, {4, 5, 6}} + }); assertArrayEquals(new long[] {2, Shape.UNKNOWN_SIZE, 3}, shape.asArray()); } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/benchmark/NdArrayBenchmark.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/benchmark/NdArrayBenchmark.java index fb7022bc830..5dbb5b034eb 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/benchmark/NdArrayBenchmark.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/benchmark/NdArrayBenchmark.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.benchmark; import static org.tensorflow.ndarray.index.Indices.all; @@ -33,131 +33,139 @@ import org.openjdk.jmh.annotations.State; import org.openjdk.jmh.annotations.Warmup; import org.openjdk.jmh.runner.RunnerException; -import org.tensorflow.ndarray.Shape; import org.tensorflow.ndarray.FloatNdArray; import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.Shape; import org.tensorflow.ndarray.StdArrays; -@Fork(value = 1, jvmArgs = {"-Xms4G", "-Xmx4G"}) +@Fork( + value = 1, + jvmArgs = {"-Xms4G", "-Xmx4G"}) @BenchmarkMode(Mode.AverageTime) @Warmup(iterations = 3) @Measurement(iterations = 5) @State(Scope.Benchmark) public class NdArrayBenchmark { - public static void main(String[] args) throws IOException, RunnerException { - org.openjdk.jmh.Main.main(args); - } - - @Setup - public void setUp() throws IOException { - BufferedImage image = ImageIO.read(getClass().getClassLoader().getResourceAsStream(TEST_IMAGE)); - - int numPixels = image.getWidth() * image.getHeight(); - pixels = NdArrays.ofFloats(Shape.of(numPixels, 3)); - channels = NdArrays.ofFloats(Shape.of(3, numPixels)); - - Raster imageData = image.getData(); - float[] pixel = new float[3]; - for (int y = 0, pixelIdx = 0; y < image.getHeight(); ++y) { - for (int x = 0; x < image.getWidth(); ++x, ++pixelIdx) { - imageData.getPixel(x, y, pixel); - StdArrays.copyTo(pixel, pixels.get(pixelIdx)); - StdArrays.copyTo(pixel, channels.slice(all(), at(pixelIdx))); - } - } - batches = NdArrays.ofFloats(Shape.of(BATCH_SIZE, 3, numPixels)); - firstBatch = batches.get(0); - } - - @Benchmark + public static void main(String[] args) throws IOException, RunnerException { + org.openjdk.jmh.Main.main(args); + } + + @Setup + public void setUp() throws IOException { + BufferedImage image = ImageIO.read(getClass().getClassLoader().getResourceAsStream(TEST_IMAGE)); + + int numPixels = image.getWidth() * image.getHeight(); + pixels = NdArrays.ofFloats(Shape.of(numPixels, 3)); + channels = NdArrays.ofFloats(Shape.of(3, numPixels)); + + Raster imageData = image.getData(); + float[] pixel = new float[3]; + for (int y = 0, pixelIdx = 0; y < image.getHeight(); ++y) { + for (int x = 0; x < image.getWidth(); ++x, ++pixelIdx) { + imageData.getPixel(x, y, pixel); + StdArrays.copyTo(pixel, pixels.get(pixelIdx)); + StdArrays.copyTo(pixel, channels.slice(all(), at(pixelIdx))); + } + } + batches = NdArrays.ofFloats(Shape.of(BATCH_SIZE, 3, numPixels)); + firstBatch = batches.get(0); + } + + @Benchmark + @Measurement(batchSize = 2049 * 1537) + public void getElementAtIndex() { + pixels.get(0); + } + + @Benchmark @Measurement(batchSize = 2049 * 1537) - public void getElementAtIndex() { - pixels.get(0); - } - - @Benchmark - @Measurement(batchSize = 2049 * 1537) - public void slicing() { - batches.slice(at(0), all(), at(0)); - } - - @Benchmark - public void readingAllPixelsChannelsBySequence() { - pixels.scalars().forEach(pixel -> pixel.getFloat()); - } - - @Benchmark - public void readingAllPixelsChannelsBySequenceSlices() { - pixels.scalars().asSlices().forEach(pixel -> pixel.getFloat()); - } - - @Benchmark - @Measurement(batchSize = 100) - public void readingAllPixelsChannelsByIndex() { - long[] shape = pixels.shape().asArray(); - for (int i = 0; i < shape[0]; ++i) { - for (int j = 0; j < shape[1]; ++j) { - pixels.getFloat(i, j); - } - } - } - - @Benchmark + public void slicing() { + batches.slice(at(0), all(), at(0)); + } + + @Benchmark + public void readingAllPixelsChannelsBySequence() { + pixels.scalars().forEach(pixel -> pixel.getFloat()); + } + + @Benchmark + public void readingAllPixelsChannelsBySequenceSlices() { + pixels.scalars().asSlices().forEach(pixel -> pixel.getFloat()); + } + + @Benchmark + @Measurement(batchSize = 100) + public void readingAllPixelsChannelsByIndex() { + long[] shape = pixels.shape().asArray(); + for (int i = 0; i < shape[0]; ++i) { + for (int j = 0; j < shape[1]; ++j) { + pixels.getFloat(i, j); + } + } + } + + @Benchmark @Measurement(batchSize = BATCH_SIZE) - public void writeFirstBatchChannels() { - firstBatch.set(channels); - } - - @Benchmark - public void writeAllBatchChannels() { - batches.elements(0).forEach(batch -> - batch.set(channels) - ); - } - - @Benchmark - @Measurement(batchSize = 2049 * 1537) - public void writeOnePixelBySlicing() { - batches.slice(at(0), all(), at(0)).set(pixels.get(0)); - } - - @Benchmark - public void writeAllPixelsBySlicing() { - batches.elements(0).forEach(batch -> - pixels.elements(0).forEachIndexed((coords, pixel) -> - batch.slice(all(), at(coords[0])).set(pixel) - ) - ); - } - - @Benchmark - @Measurement(batchSize = 2049 * 1537) - public void writeOnePixelsByIndex() { - batches - .setFloat(pixels.getFloat(0, 0), 0, 0, 0) - .setFloat(pixels.getFloat(0, 1), 0, 1, 0) - .setFloat(pixels.getFloat(0, 2), 0, 2, 0); - } - - @Benchmark - public void writeAllPixelsByIndex() { - batches.elements(0).forEach(batch -> - pixels.elements(0).forEachIndexed((coords, pixel) -> { - long pixelIndex = coords[0]; - batch - .setFloat(pixel.getFloat(0), 0, pixelIndex) - .setFloat(pixel.getFloat(1), 1, pixelIndex) - .setFloat(pixel.getFloat(2), 2, pixelIndex); - }) - ); - } - - private static final String TEST_IMAGE = "castle.jpg"; - private static final int BATCH_SIZE = 60; - - private FloatNdArray pixels; - private FloatNdArray channels; - private FloatNdArray batches; - private FloatNdArray firstBatch; + public void writeFirstBatchChannels() { + firstBatch.set(channels); + } + + @Benchmark + public void writeAllBatchChannels() { + batches.elements(0).forEach(batch -> batch.set(channels)); + } + + @Benchmark + @Measurement(batchSize = 2049 * 1537) + public void writeOnePixelBySlicing() { + batches.slice(at(0), all(), at(0)).set(pixels.get(0)); + } + + @Benchmark + public void writeAllPixelsBySlicing() { + batches + .elements(0) + .forEach( + batch -> + pixels + .elements(0) + .forEachIndexed( + (coords, pixel) -> batch.slice(all(), at(coords[0])).set(pixel))); + } + + @Benchmark + @Measurement(batchSize = 2049 * 1537) + public void writeOnePixelsByIndex() { + batches + .setFloat(pixels.getFloat(0, 0), 0, 0, 0) + .setFloat(pixels.getFloat(0, 1), 0, 1, 0) + .setFloat(pixels.getFloat(0, 2), 0, 2, 0); + } + + @Benchmark + public void writeAllPixelsByIndex() { + batches + .elements(0) + .forEach( + batch -> + pixels + .elements(0) + .forEachIndexed( + (coords, pixel) -> { + long pixelIndex = coords[0]; + batch + .setFloat(pixel.getFloat(0), 0, pixelIndex) + .setFloat(pixel.getFloat(1), 1, pixelIndex) + .setFloat(pixel.getFloat(2), 2, pixelIndex); + })); + } + + private static final String TEST_IMAGE = "castle.jpg"; + private static final int BATCH_SIZE = 60; + + private FloatNdArray pixels; + private FloatNdArray channels; + private FloatNdArray batches; + private FloatNdArray firstBatch; } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/buffer/BooleanDataBufferTestBase.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/buffer/BooleanDataBufferTestBase.java index 3f6df8aa1ce..e1d522e689f 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/buffer/BooleanDataBufferTestBase.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/buffer/BooleanDataBufferTestBase.java @@ -1,26 +1,26 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.buffer; -import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.assertArrayEquals; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; import java.util.Arrays; import java.util.BitSet; @@ -40,7 +40,7 @@ protected Boolean valueOf(Long val) { @Test public void writeAndReadFromArray() { BooleanDataBuffer buffer = allocate(10L); - boolean[] values = new boolean[]{true, false, false, true, false}; + boolean[] values = new boolean[] {true, false, false, true, false}; buffer.write(values); assertTrue(buffer.getObject(0)); @@ -68,15 +68,13 @@ public void writeAndReadFromArray() { @Test public void equalWithBitSetBuffer() { - BitSet bitSet1 = BitSet.valueOf(new byte[] { 0x01, 0x01 }); + BitSet bitSet1 = BitSet.valueOf(new byte[] {0x01, 0x01}); BooleanDataBuffer bitSet1Buffer = MiscDataBufferFactory.create(bitSet1, 12, true); - BitSet bitSet2 = BitSet.valueOf(new byte[] { 0x11, 0x01 }); + BitSet bitSet2 = BitSet.valueOf(new byte[] {0x11, 0x01}); BooleanDataBuffer bitSet2Buffer = MiscDataBufferFactory.create(bitSet2, 12, true); - BooleanDataBuffer buffer = allocate(12) - .setBoolean(true, 0) - .setBoolean(true, 8); + BooleanDataBuffer buffer = allocate(12).setBoolean(true, 0).setBoolean(true, 8); assertTrue(bitSet1Buffer.equals(buffer)); assertTrue(buffer.equals(bitSet1Buffer)); @@ -89,15 +87,13 @@ public void equalWithBitSetBuffer() { @Test public void equalWithBooleanArrayBuffer() { - boolean[] array1 = new boolean[] { false, false, false, true, true, false }; + boolean[] array1 = new boolean[] {false, false, false, true, true, false}; BooleanDataBuffer array1Buffer = MiscDataBufferFactory.create(array1, true); - boolean[] array2 = new boolean[] { false, false, false, true, true, true }; + boolean[] array2 = new boolean[] {false, false, false, true, true, true}; BooleanDataBuffer array2Buffer = MiscDataBufferFactory.create(array2, true); - BooleanDataBuffer buffer = allocate(6) - .setBoolean(true, 3) - .setBoolean(true, 4); + BooleanDataBuffer buffer = allocate(6).setBoolean(true, 3).setBoolean(true, 4); assertTrue(array1Buffer.equals(buffer)); assertTrue(buffer.equals(array1Buffer)); @@ -110,15 +106,13 @@ public void equalWithBooleanArrayBuffer() { @Test public void equalWithBooleanObjectBuffer() { - Boolean[] array1 = new Boolean[] { false, false, false, true, true, false }; + Boolean[] array1 = new Boolean[] {false, false, false, true, true, false}; DataBuffer array1Buffer = MiscDataBufferFactory.create(array1, true); - boolean[] array2 = new boolean[] { false, false, false, true, true, true }; + boolean[] array2 = new boolean[] {false, false, false, true, true, true}; DataBuffer array2Buffer = MiscDataBufferFactory.create(array2, true); - BooleanDataBuffer buffer = allocate(6) - .setBoolean(true, 3) - .setBoolean(true, 4); + BooleanDataBuffer buffer = allocate(6).setBoolean(true, 3).setBoolean(true, 4); assertTrue(array1Buffer.equals(buffer)); assertTrue(buffer.equals(array1Buffer)); @@ -131,10 +125,8 @@ public void equalWithBooleanObjectBuffer() { @Test public void notEqualWithOtherTypes() { - BooleanDataBuffer buffer = allocate(2) - .setBoolean(false, 0) - .setBoolean(true, 1); - ByteDataBuffer byteBuffer = DataBuffers.of((byte)0, (byte)1); + BooleanDataBuffer buffer = allocate(2).setBoolean(false, 0).setBoolean(true, 1); + ByteDataBuffer byteBuffer = DataBuffers.of((byte) 0, (byte) 1); assertFalse(buffer.equals(byteBuffer)); assertFalse(byteBuffer.equals(buffer)); diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/buffer/ByteDataBufferTestBase.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/buffer/ByteDataBufferTestBase.java index 777368466f5..59f27cabfae 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/buffer/ByteDataBufferTestBase.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/buffer/ByteDataBufferTestBase.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.buffer; import static org.junit.jupiter.api.Assertions.assertArrayEquals; @@ -42,7 +42,7 @@ protected Byte valueOf(Long val) { @Test public void writeAndReadFromArray() { ByteDataBuffer buffer = allocate(10L); - byte[] oneToFive = new byte[]{ 1, 2, 3, 4, 5 }; + byte[] oneToFive = new byte[] {1, 2, 3, 4, 5}; buffer.write(oneToFive); assertEquals(2, buffer.getByte(1)); @@ -70,12 +70,12 @@ public void writeAndReadFromArray() { @Test public void equalWithByteNioBuffer() { - ByteDataBuffer nioBuffer1 = NioDataBufferFactory.create(ByteBuffer.wrap(new byte[] { 0x01, 0x10 })); - ByteDataBuffer nioBuffer2 = NioDataBufferFactory.create(ByteBuffer.wrap(new byte[] { 0x01, 0x11 })); + ByteDataBuffer nioBuffer1 = + NioDataBufferFactory.create(ByteBuffer.wrap(new byte[] {0x01, 0x10})); + ByteDataBuffer nioBuffer2 = + NioDataBufferFactory.create(ByteBuffer.wrap(new byte[] {0x01, 0x11})); - ByteDataBuffer buffer = allocate(2) - .setByte((byte)0x01, 0) - .setByte((byte)0x10, 1); + ByteDataBuffer buffer = allocate(2).setByte((byte) 0x01, 0).setByte((byte) 0x10, 1); assertTrue(nioBuffer1.equals(buffer)); assertTrue(buffer.equals(nioBuffer1)); @@ -88,12 +88,10 @@ public void equalWithByteNioBuffer() { @Test public void equalWithByteRawBuffer() { - ByteDataBuffer rawBuffer1 = RawDataBufferFactory.create(new byte[] { 0x01, 0x10 }, true); - ByteDataBuffer rawBuffer2 = RawDataBufferFactory.create(new byte[] { 0x01, 0x11 }, true); + ByteDataBuffer rawBuffer1 = RawDataBufferFactory.create(new byte[] {0x01, 0x10}, true); + ByteDataBuffer rawBuffer2 = RawDataBufferFactory.create(new byte[] {0x01, 0x11}, true); - ByteDataBuffer buffer = allocate(2) - .setByte((byte)0x01, 0) - .setByte((byte)0x10, 1); + ByteDataBuffer buffer = allocate(2).setByte((byte) 0x01, 0).setByte((byte) 0x10, 1); assertTrue(rawBuffer1.equals(buffer)); assertTrue(buffer.equals(rawBuffer1)); @@ -106,12 +104,10 @@ public void equalWithByteRawBuffer() { @Test public void equalWithByteObjectBuffer() { - DataBuffer objBuffer1 = MiscDataBufferFactory.create(new Byte[] { 0x01, 0x10 }, true); - DataBuffer objBuffer2 = MiscDataBufferFactory.create(new Byte[] { 0x01, 0x11 }, true); + DataBuffer objBuffer1 = MiscDataBufferFactory.create(new Byte[] {0x01, 0x10}, true); + DataBuffer objBuffer2 = MiscDataBufferFactory.create(new Byte[] {0x01, 0x11}, true); - ByteDataBuffer buffer = allocate(2) - .setByte((byte)0x01, 0) - .setByte((byte)0x10, 1); + ByteDataBuffer buffer = allocate(2).setByte((byte) 0x01, 0).setByte((byte) 0x10, 1); assertTrue(objBuffer1.equals(buffer)); assertTrue(buffer.equals(objBuffer1)); @@ -124,9 +120,7 @@ public void equalWithByteObjectBuffer() { @Test public void notEqualWithOtherTypes() { - ByteDataBuffer buffer = allocate(2) - .setByte((byte)1, 0) - .setByte((byte)16, 1); + ByteDataBuffer buffer = allocate(2).setByte((byte) 1, 0).setByte((byte) 16, 1); LongDataBuffer longBuffer = DataBuffers.of(1L, 16L); assertFalse(buffer.equals(longBuffer)); diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/buffer/DataBufferTestBase.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/buffer/DataBufferTestBase.java index 9a023915735..46ec6520210 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/buffer/DataBufferTestBase.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/buffer/DataBufferTestBase.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.buffer; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -26,9 +26,6 @@ import java.nio.BufferOverflowException; import java.nio.BufferUnderflowException; import org.junit.jupiter.api.Test; -import org.tensorflow.ndarray.buffer.DataBuffer; -import org.tensorflow.ndarray.buffer.DataBufferWindow; -import org.tensorflow.ndarray.buffer.DataBuffers; public abstract class DataBufferTestBase { @@ -77,7 +74,7 @@ public void offsetNarrowAndSlice() { subBuffer.getObject(2); fail(); } catch (IndexOutOfBoundsException e) { - //as expected + // as expected } try { buffer.slice(2, 12); @@ -196,21 +193,12 @@ public void createFromVarargs() { @Test public void equalWithObjectBuffer() { - DataBuffer buffer1 = allocate(2) - .setObject(valueOf(0L), 0) - .setObject(valueOf(1L), 1); - DataBuffer buffer2 = allocate(2) - .setObject(valueOf(0L), 0) - .setObject(valueOf(1L), 1); - DataBuffer buffer3 = allocate(2) - .setObject(valueOf(1L), 0) - .setObject(valueOf(0L), 1); - DataBuffer buffer4 = allocate(1) - .setObject(valueOf(0L), 0); - DataBuffer buffer5 = allocate(3) - .setObject(valueOf(0L), 0) - .setObject(valueOf(1L), 1) - .setObject(valueOf(2L), 2); + DataBuffer buffer1 = allocate(2).setObject(valueOf(0L), 0).setObject(valueOf(1L), 1); + DataBuffer buffer2 = allocate(2).setObject(valueOf(0L), 0).setObject(valueOf(1L), 1); + DataBuffer buffer3 = allocate(2).setObject(valueOf(1L), 0).setObject(valueOf(0L), 1); + DataBuffer buffer4 = allocate(1).setObject(valueOf(0L), 0); + DataBuffer buffer5 = + allocate(3).setObject(valueOf(0L), 0).setObject(valueOf(1L), 1).setObject(valueOf(2L), 2); assertTrue(buffer1.equals(buffer2)); assertTrue(buffer2.equals(buffer1)); @@ -237,7 +225,7 @@ public void bufferWindow() { try { bufferWindow = buffer.window(4); } catch (UnsupportedOperationException e) { - return; // skip test if this buffer does not support windows + return; // skip test if this buffer does not support windows } assertEquals(0, bufferWindow.offset()); assertEquals(4, bufferWindow.size()); diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/buffer/DoubleDataBufferTestBase.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/buffer/DoubleDataBufferTestBase.java index 4dee064968c..c09badfc415 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/buffer/DoubleDataBufferTestBase.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/buffer/DoubleDataBufferTestBase.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.buffer; import static org.junit.jupiter.api.Assertions.assertArrayEquals; @@ -42,7 +42,7 @@ protected Double valueOf(Long val) { @Test public void writeAndReadFromArray() { DoubleDataBuffer buffer = allocate(10L); - double[] oneToFive = new double[]{ 1.0, 2.0, 3.0, 4.0, 5.0 }; + double[] oneToFive = new double[] {1.0, 2.0, 3.0, 4.0, 5.0}; buffer.write(oneToFive); assertEquals(2.0, buffer.getDouble(1), 0.0); @@ -70,12 +70,12 @@ public void writeAndReadFromArray() { @Test public void equalWithDoubleNioBuffer() { - DoubleDataBuffer nioBuffer1 = NioDataBufferFactory.create(DoubleBuffer.wrap(new double[] { 1.0, 16.0 })); - DoubleDataBuffer nioBuffer2 = NioDataBufferFactory.create(DoubleBuffer.wrap(new double[] { 1.0, 25.0 })); + DoubleDataBuffer nioBuffer1 = + NioDataBufferFactory.create(DoubleBuffer.wrap(new double[] {1.0, 16.0})); + DoubleDataBuffer nioBuffer2 = + NioDataBufferFactory.create(DoubleBuffer.wrap(new double[] {1.0, 25.0})); - DoubleDataBuffer buffer = allocate(2) - .setDouble(1.0, 0) - .setDouble(16.0, 1); + DoubleDataBuffer buffer = allocate(2).setDouble(1.0, 0).setDouble(16.0, 1); assertTrue(nioBuffer1.equals(buffer)); assertTrue(buffer.equals(nioBuffer1)); @@ -88,12 +88,10 @@ public void equalWithDoubleNioBuffer() { @Test public void equalWithDoubleRawBuffer() { - DoubleDataBuffer rawBuffer1 = RawDataBufferFactory.create(new double[] { 1.0, 16.0 }, true); - DoubleDataBuffer rawBuffer2 = RawDataBufferFactory.create(new double[] { 1.0, 25.0 }, true); + DoubleDataBuffer rawBuffer1 = RawDataBufferFactory.create(new double[] {1.0, 16.0}, true); + DoubleDataBuffer rawBuffer2 = RawDataBufferFactory.create(new double[] {1.0, 25.0}, true); - DoubleDataBuffer buffer = allocate(2) - .setDouble(1.0, 0) - .setDouble(16.0, 1); + DoubleDataBuffer buffer = allocate(2).setDouble(1.0, 0).setDouble(16.0, 1); assertTrue(rawBuffer1.equals(buffer)); assertTrue(buffer.equals(rawBuffer1)); @@ -106,12 +104,10 @@ public void equalWithDoubleRawBuffer() { @Test public void equalWithDoubleObjectBuffer() { - DataBuffer objBuffer1 = MiscDataBufferFactory.create(new Double[] { 1.0, 16.0 }, true); - DataBuffer objBuffer2 = MiscDataBufferFactory.create(new Double[] { 1.0, 25.0 }, true); + DataBuffer objBuffer1 = MiscDataBufferFactory.create(new Double[] {1.0, 16.0}, true); + DataBuffer objBuffer2 = MiscDataBufferFactory.create(new Double[] {1.0, 25.0}, true); - DoubleDataBuffer buffer = allocate(2) - .setDouble(1.0, 0) - .setDouble(16.0, 1); + DoubleDataBuffer buffer = allocate(2).setDouble(1.0, 0).setDouble(16.0, 1); assertTrue(objBuffer1.equals(buffer)); assertTrue(buffer.equals(objBuffer1)); @@ -124,9 +120,7 @@ public void equalWithDoubleObjectBuffer() { @Test public void notEqualWithOtherTypes() { - DoubleDataBuffer buffer = allocate(2) - .setDouble(1.0, 0) - .setDouble(16.0, 1); + DoubleDataBuffer buffer = allocate(2).setDouble(1.0, 0).setDouble(16.0, 1); FloatDataBuffer floatBuffer = DataBuffers.of(1.0f, 16.0f); assertFalse(buffer.equals(floatBuffer)); diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/buffer/FloatDataBufferTestBase.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/buffer/FloatDataBufferTestBase.java index 49c4f15b808..7fca8363634 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/buffer/FloatDataBufferTestBase.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/buffer/FloatDataBufferTestBase.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.buffer; import static org.junit.jupiter.api.Assertions.assertArrayEquals; @@ -42,7 +42,7 @@ protected Float valueOf(Long val) { @Test public void writeAndReadFromArray() { FloatDataBuffer buffer = allocate(10L); - float[] oneToFive = new float[]{ 1.0f, 2.0f, 3.0f, 4.0f, 5.0f }; + float[] oneToFive = new float[] {1.0f, 2.0f, 3.0f, 4.0f, 5.0f}; buffer.write(oneToFive); assertEquals(2.0f, buffer.getFloat(1), 0.0f); @@ -70,12 +70,12 @@ public void writeAndReadFromArray() { @Test public void equalWithFloatNioBuffer() { - FloatDataBuffer nioBuffer1 = NioDataBufferFactory.create(FloatBuffer.wrap(new float[] { 1.0f, 16.0f })); - FloatDataBuffer nioBuffer2 = NioDataBufferFactory.create(FloatBuffer.wrap(new float[] { 1.0f, 25.0f })); + FloatDataBuffer nioBuffer1 = + NioDataBufferFactory.create(FloatBuffer.wrap(new float[] {1.0f, 16.0f})); + FloatDataBuffer nioBuffer2 = + NioDataBufferFactory.create(FloatBuffer.wrap(new float[] {1.0f, 25.0f})); - FloatDataBuffer buffer = allocate(2) - .setFloat(1.0f, 0) - .setFloat(16.0f, 1); + FloatDataBuffer buffer = allocate(2).setFloat(1.0f, 0).setFloat(16.0f, 1); assertTrue(nioBuffer1.equals(buffer)); assertTrue(buffer.equals(nioBuffer1)); @@ -88,12 +88,10 @@ public void equalWithFloatNioBuffer() { @Test public void equalWithFloatRawBuffer() { - FloatDataBuffer rawBuffer1 = RawDataBufferFactory.create(new float[] { 1.0f, 16.0f }, true); - FloatDataBuffer rawBuffer2 = RawDataBufferFactory.create(new float[] { 1.0f, 25.0f }, true); + FloatDataBuffer rawBuffer1 = RawDataBufferFactory.create(new float[] {1.0f, 16.0f}, true); + FloatDataBuffer rawBuffer2 = RawDataBufferFactory.create(new float[] {1.0f, 25.0f}, true); - FloatDataBuffer buffer = allocate(2) - .setFloat(1.0f, 0) - .setFloat(16.0f, 1); + FloatDataBuffer buffer = allocate(2).setFloat(1.0f, 0).setFloat(16.0f, 1); assertTrue(rawBuffer1.equals(buffer)); assertTrue(buffer.equals(rawBuffer1)); @@ -106,12 +104,10 @@ public void equalWithFloatRawBuffer() { @Test public void equalWithFloatObjectBuffer() { - DataBuffer objBuffer1 = MiscDataBufferFactory.create(new Float[] { 1.0f, 16.0f }, true); - DataBuffer objBuffer2 = MiscDataBufferFactory.create(new Float[] { 1.0f, 25.0f }, true); + DataBuffer objBuffer1 = MiscDataBufferFactory.create(new Float[] {1.0f, 16.0f}, true); + DataBuffer objBuffer2 = MiscDataBufferFactory.create(new Float[] {1.0f, 25.0f}, true); - FloatDataBuffer buffer = allocate(2) - .setFloat(1.0f, 0) - .setFloat(16.0f, 1); + FloatDataBuffer buffer = allocate(2).setFloat(1.0f, 0).setFloat(16.0f, 1); assertTrue(objBuffer1.equals(buffer)); assertTrue(buffer.equals(objBuffer1)); @@ -124,9 +120,7 @@ public void equalWithFloatObjectBuffer() { @Test public void notEqualWithOtherTypes() { - FloatDataBuffer buffer = allocate(2) - .setFloat(1.0f, 0) - .setFloat(16.0f, 1); + FloatDataBuffer buffer = allocate(2).setFloat(1.0f, 0).setFloat(16.0f, 1); DoubleDataBuffer doubleBuffer = DataBuffers.of(1.0, 16.0); assertFalse(buffer.equals(doubleBuffer)); diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/buffer/IntDataBufferTestBase.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/buffer/IntDataBufferTestBase.java index f3642e88ef8..7593411a85a 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/buffer/IntDataBufferTestBase.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/buffer/IntDataBufferTestBase.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.buffer; import static org.junit.jupiter.api.Assertions.assertArrayEquals; @@ -42,7 +42,7 @@ protected Integer valueOf(Long val) { @Test public void writeAndReadFromArray() { IntDataBuffer buffer = allocate(10L); - int[] oneToFive = new int[]{ 1, 2, 3, 4, 5 }; + int[] oneToFive = new int[] {1, 2, 3, 4, 5}; buffer.write(oneToFive); assertEquals(2, buffer.getInt(1)); @@ -70,12 +70,10 @@ public void writeAndReadFromArray() { @Test public void equalWithIntNioBuffer() { - IntDataBuffer nioBuffer1 = NioDataBufferFactory.create(IntBuffer.wrap(new int[] { 1, 16 })); - IntDataBuffer nioBuffer2 = NioDataBufferFactory.create(IntBuffer.wrap(new int[] { 1, 25 })); + IntDataBuffer nioBuffer1 = NioDataBufferFactory.create(IntBuffer.wrap(new int[] {1, 16})); + IntDataBuffer nioBuffer2 = NioDataBufferFactory.create(IntBuffer.wrap(new int[] {1, 25})); - IntDataBuffer buffer = allocate(2) - .setInt(1, 0) - .setInt(16, 1); + IntDataBuffer buffer = allocate(2).setInt(1, 0).setInt(16, 1); assertTrue(nioBuffer1.equals(buffer)); assertTrue(buffer.equals(nioBuffer1)); @@ -88,12 +86,10 @@ public void equalWithIntNioBuffer() { @Test public void equalWithIntRawBuffer() { - IntDataBuffer rawBuffer1 = RawDataBufferFactory.create(new int[] { 1, 16 }, true); - IntDataBuffer rawBuffer2 = RawDataBufferFactory.create(new int[] { 1, 25 }, true); + IntDataBuffer rawBuffer1 = RawDataBufferFactory.create(new int[] {1, 16}, true); + IntDataBuffer rawBuffer2 = RawDataBufferFactory.create(new int[] {1, 25}, true); - IntDataBuffer buffer = allocate(2) - .setInt(1, 0) - .setInt(16, 1); + IntDataBuffer buffer = allocate(2).setInt(1, 0).setInt(16, 1); assertTrue(rawBuffer1.equals(buffer)); assertTrue(buffer.equals(rawBuffer1)); @@ -106,12 +102,10 @@ public void equalWithIntRawBuffer() { @Test public void equalWithIntObjectBuffer() { - DataBuffer objBuffer1 = MiscDataBufferFactory.create(new Integer[] { 1, 16 }, true); - DataBuffer objBuffer2 = MiscDataBufferFactory.create(new Integer[] { 1, 25 }, true); + DataBuffer objBuffer1 = MiscDataBufferFactory.create(new Integer[] {1, 16}, true); + DataBuffer objBuffer2 = MiscDataBufferFactory.create(new Integer[] {1, 25}, true); - IntDataBuffer buffer = allocate(2) - .setInt(1, 0) - .setInt(16, 1); + IntDataBuffer buffer = allocate(2).setInt(1, 0).setInt(16, 1); assertTrue(objBuffer1.equals(buffer)); assertTrue(buffer.equals(objBuffer1)); @@ -124,9 +118,7 @@ public void equalWithIntObjectBuffer() { @Test public void notEqualWithOtherTypes() { - IntDataBuffer buffer = allocate(2) - .setInt(1, 0) - .setInt(16, 1); + IntDataBuffer buffer = allocate(2).setInt(1, 0).setInt(16, 1); LongDataBuffer longBuffer = DataBuffers.of(1L, 16L); assertFalse(buffer.equals(longBuffer)); diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/buffer/LongDataBufferTestBase.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/buffer/LongDataBufferTestBase.java index e0d8b1b4539..a3bdb068113 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/buffer/LongDataBufferTestBase.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/buffer/LongDataBufferTestBase.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.buffer; import static org.junit.jupiter.api.Assertions.assertArrayEquals; @@ -42,7 +42,7 @@ protected Long valueOf(Long val) { @Test public void writeAndReadFromArray() { LongDataBuffer buffer = allocate(10L); - long[] oneToFive = new long[]{ 1L, 2L, 3L, 4L, 5L }; + long[] oneToFive = new long[] {1L, 2L, 3L, 4L, 5L}; buffer.write(oneToFive); assertEquals(2, buffer.getLong(1)); @@ -70,12 +70,10 @@ public void writeAndReadFromArray() { @Test public void equalWithLongNioBuffer() { - LongDataBuffer nioBuffer1 = NioDataBufferFactory.create(LongBuffer.wrap(new long[] { 1, 16 })); - LongDataBuffer nioBuffer2 = NioDataBufferFactory.create(LongBuffer.wrap(new long[] { 1, 25 })); + LongDataBuffer nioBuffer1 = NioDataBufferFactory.create(LongBuffer.wrap(new long[] {1, 16})); + LongDataBuffer nioBuffer2 = NioDataBufferFactory.create(LongBuffer.wrap(new long[] {1, 25})); - LongDataBuffer buffer = allocate(2) - .setLong(1, 0) - .setLong(16, 1); + LongDataBuffer buffer = allocate(2).setLong(1, 0).setLong(16, 1); assertTrue(nioBuffer1.equals(buffer)); assertTrue(buffer.equals(nioBuffer1)); @@ -88,12 +86,10 @@ public void equalWithLongNioBuffer() { @Test public void equalWithLongRawBuffer() { - LongDataBuffer rawBuffer1 = RawDataBufferFactory.create(new long[] { 1, 16 }, true); - LongDataBuffer rawBuffer2 = RawDataBufferFactory.create(new long[] { 1, 25 }, true); + LongDataBuffer rawBuffer1 = RawDataBufferFactory.create(new long[] {1, 16}, true); + LongDataBuffer rawBuffer2 = RawDataBufferFactory.create(new long[] {1, 25}, true); - LongDataBuffer buffer = allocate(2) - .setLong(1, 0) - .setLong(16, 1); + LongDataBuffer buffer = allocate(2).setLong(1, 0).setLong(16, 1); assertTrue(rawBuffer1.equals(buffer)); assertTrue(buffer.equals(rawBuffer1)); @@ -106,12 +102,10 @@ public void equalWithLongRawBuffer() { @Test public void equalWithLongObjectBuffer() { - DataBuffer objBuffer1 = MiscDataBufferFactory.create(new Long[] { 1L, 16L }, true); - DataBuffer objBuffer2 = MiscDataBufferFactory.create(new Long[] { 1L, 25L }, true); + DataBuffer objBuffer1 = MiscDataBufferFactory.create(new Long[] {1L, 16L}, true); + DataBuffer objBuffer2 = MiscDataBufferFactory.create(new Long[] {1L, 25L}, true); - LongDataBuffer buffer = allocate(2) - .setLong(1, 0) - .setLong(16, 1); + LongDataBuffer buffer = allocate(2).setLong(1, 0).setLong(16, 1); assertTrue(objBuffer1.equals(buffer)); assertTrue(buffer.equals(objBuffer1)); @@ -124,9 +118,7 @@ public void equalWithLongObjectBuffer() { @Test public void notEqualWithOtherTypes() { - LongDataBuffer buffer = allocate(2) - .setLong(1L, 0) - .setLong(16L, 1); + LongDataBuffer buffer = allocate(2).setLong(1L, 0).setLong(16L, 1); IntDataBuffer intBuffer = DataBuffers.of(1, 16); assertFalse(buffer.equals(intBuffer)); diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/buffer/ShortDataBufferTestBase.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/buffer/ShortDataBufferTestBase.java index f3269e85a8f..40569842125 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/buffer/ShortDataBufferTestBase.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/buffer/ShortDataBufferTestBase.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.buffer; import static org.junit.jupiter.api.Assertions.assertArrayEquals; @@ -42,7 +42,7 @@ protected Short valueOf(Long val) { @Test public void writeAndReadFromArray() { ShortDataBuffer buffer = allocate(10L); - short[] oneToFive = new short[]{ 1, 2, 3, 4, 5 }; + short[] oneToFive = new short[] {1, 2, 3, 4, 5}; buffer.write(oneToFive); assertEquals(2, buffer.getShort(1)); @@ -70,12 +70,10 @@ public void writeAndReadFromArray() { @Test public void equalWithShortNioBuffer() { - ShortDataBuffer nioBuffer1 = NioDataBufferFactory.create(ShortBuffer.wrap(new short[] { 1, 16 })); - ShortDataBuffer nioBuffer2 = NioDataBufferFactory.create(ShortBuffer.wrap(new short[] { 1, 25 })); + ShortDataBuffer nioBuffer1 = NioDataBufferFactory.create(ShortBuffer.wrap(new short[] {1, 16})); + ShortDataBuffer nioBuffer2 = NioDataBufferFactory.create(ShortBuffer.wrap(new short[] {1, 25})); - ShortDataBuffer buffer = allocate(2) - .setShort((short)1, 0) - .setShort((short)16, 1); + ShortDataBuffer buffer = allocate(2).setShort((short) 1, 0).setShort((short) 16, 1); assertTrue(nioBuffer1.equals(buffer)); assertTrue(buffer.equals(nioBuffer1)); @@ -88,12 +86,10 @@ public void equalWithShortNioBuffer() { @Test public void equalWithShortRawBuffer() { - ShortDataBuffer rawBuffer1 = RawDataBufferFactory.create(new short[] { 1, 16 }, true); - ShortDataBuffer rawBuffer2 = RawDataBufferFactory.create(new short[] { 1, 25 }, true); + ShortDataBuffer rawBuffer1 = RawDataBufferFactory.create(new short[] {1, 16}, true); + ShortDataBuffer rawBuffer2 = RawDataBufferFactory.create(new short[] {1, 25}, true); - ShortDataBuffer buffer = allocate(2) - .setShort((short)1, 0) - .setShort((short)16, 1); + ShortDataBuffer buffer = allocate(2).setShort((short) 1, 0).setShort((short) 16, 1); assertTrue(rawBuffer1.equals(buffer)); assertTrue(buffer.equals(rawBuffer1)); @@ -106,12 +102,10 @@ public void equalWithShortRawBuffer() { @Test public void equalWithShortObjectBuffer() { - DataBuffer objBuffer1 = MiscDataBufferFactory.create(new Short[] { 1, 16 }, true); - DataBuffer objBuffer2 = MiscDataBufferFactory.create(new Short[] { 1, 25 }, true); + DataBuffer objBuffer1 = MiscDataBufferFactory.create(new Short[] {1, 16}, true); + DataBuffer objBuffer2 = MiscDataBufferFactory.create(new Short[] {1, 25}, true); - ShortDataBuffer buffer = allocate(2) - .setShort((short)1, 0) - .setShort((short)16, 1); + ShortDataBuffer buffer = allocate(2).setShort((short) 1, 0).setShort((short) 16, 1); assertTrue(objBuffer1.equals(buffer)); assertTrue(buffer.equals(objBuffer1)); @@ -124,9 +118,7 @@ public void equalWithShortObjectBuffer() { @Test public void notEqualWithOtherTypes() { - ShortDataBuffer buffer = allocate(2) - .setShort((short)1, 0) - .setShort((short)16, 1); + ShortDataBuffer buffer = allocate(2).setShort((short) 1, 0).setShort((short) 16, 1); LongDataBuffer longBuffer = DataBuffers.of(1L, 16L); assertFalse(buffer.equals(longBuffer)); diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/BigIntegerDataBufferAdapterTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/BigIntegerDataBufferAdapterTest.java index 4bb86fe3f33..f8109666b1f 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/BigIntegerDataBufferAdapterTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/BigIntegerDataBufferAdapterTest.java @@ -41,27 +41,28 @@ protected BigInteger valueOf(Long val) { return BigInteger.valueOf(val); } - private static DataLayout LAYOUT = new DataLayout() { + private static DataLayout LAYOUT = + new DataLayout() { - @Override - public void writeObject(ByteDataBuffer buffer, BigInteger value, long index) { - byte[] bytes = value.toByteArray(); - buffer.setByte(bytes.length > 2 ? bytes[2] : 0, index); - buffer.setByte(bytes.length > 1 ? bytes[1] : 0, index + 1); - buffer.setByte(bytes[0], index + 2); - } + @Override + public void writeObject(ByteDataBuffer buffer, BigInteger value, long index) { + byte[] bytes = value.toByteArray(); + buffer.setByte(bytes.length > 2 ? bytes[2] : 0, index); + buffer.setByte(bytes.length > 1 ? bytes[1] : 0, index + 1); + buffer.setByte(bytes[0], index + 2); + } - @Override - public BigInteger readObject(ByteDataBuffer buffer, long index) { - byte byte2 = buffer.getByte(index); - byte byte1 = buffer.getByte(index + 1); - byte byte0 = buffer.getByte(index + 2); - return new BigInteger(new byte[] { byte2, byte1, byte0 }); - } + @Override + public BigInteger readObject(ByteDataBuffer buffer, long index) { + byte byte2 = buffer.getByte(index); + byte byte1 = buffer.getByte(index + 1); + byte byte0 = buffer.getByte(index + 2); + return new BigInteger(new byte[] {byte2, byte1, byte0}); + } - @Override - public int scale() { - return 3; - } - }; + @Override + public int scale() { + return 3; + } + }; } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/BooleanDataBufferAdapterTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/BooleanDataBufferAdapterTest.java index a15e8f388a8..9507cef3456 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/BooleanDataBufferAdapterTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/BooleanDataBufferAdapterTest.java @@ -30,16 +30,17 @@ protected BooleanDataBuffer allocate(long size) { return LAYOUT.applyTo(DataBuffers.ofBytes(size * LAYOUT.scale())); } - private static BooleanDataLayout LAYOUT = new BooleanDataLayout() { + private static BooleanDataLayout LAYOUT = + new BooleanDataLayout() { - @Override - public void writeBoolean(ByteDataBuffer buffer, boolean value, long index) { - buffer.setByte((byte)(value ? 1 : 0), index); - } + @Override + public void writeBoolean(ByteDataBuffer buffer, boolean value, long index) { + buffer.setByte((byte) (value ? 1 : 0), index); + } - @Override - public boolean readBoolean(ByteDataBuffer buffer, long index) { - return buffer.getByte(index) > 0; - } - }; + @Override + public boolean readBoolean(ByteDataBuffer buffer, long index) { + return buffer.getByte(index) > 0; + } + }; } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/ByteDataBufferAdapterTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/ByteDataBufferAdapterTest.java index 8a6287601f5..59462ba436a 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/ByteDataBufferAdapterTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/ByteDataBufferAdapterTest.java @@ -12,16 +12,17 @@ public ByteDataBuffer allocate(long size) { return LAYOUT.applyTo(DataBuffers.ofShorts(size * LAYOUT.scale())); } - private static ByteDataLayout LAYOUT = new ByteDataLayout() { + private static ByteDataLayout LAYOUT = + new ByteDataLayout() { - @Override - public void writeByte(ShortDataBuffer buffer, byte value, long index) { - buffer.setShort(value, index); - } + @Override + public void writeByte(ShortDataBuffer buffer, byte value, long index) { + buffer.setShort(value, index); + } - @Override - public byte readByte(ShortDataBuffer buffer, long index) { - return (byte)buffer.getShort(index); - } - }; + @Override + public byte readByte(ShortDataBuffer buffer, long index) { + return (byte) buffer.getShort(index); + } + }; } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/DoubleDataBufferAdapterTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/DoubleDataBufferAdapterTest.java index 8dfee1182b1..898409f3541 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/DoubleDataBufferAdapterTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/DoubleDataBufferAdapterTest.java @@ -35,27 +35,29 @@ protected long maxSize() { return super.maxSize() / 3; } - private static DoubleDataLayout LAYOUT = new DoubleDataLayout() { - - @Override - public void writeDouble(ByteDataBuffer buffer, double value, long index) { - long bits = Double.doubleToLongBits(value); - buffer.setByte((byte)((bits >> 56) & 0xFF), index); - buffer.setByte((byte)((bits >> 48) & 0xFF), index + 1); - buffer.setByte((byte)((bits >> 40) & 0xFF), index + 2); - } - - @Override - public double readDouble(ByteDataBuffer buffer, long index) { - long byte7 = buffer.getByte(index); - long byte6 = buffer.getByte(index + 1); - long byte5 = buffer.getByte(index + 2); - return Double.longBitsToDouble(((byte7 & 0xFF) << 56) | ((byte6 & 0xFF) << 48) | ((byte5 & 0xFF) << 40)); - } - - @Override - public int scale() { - return 3; - } - }; + private static DoubleDataLayout LAYOUT = + new DoubleDataLayout() { + + @Override + public void writeDouble(ByteDataBuffer buffer, double value, long index) { + long bits = Double.doubleToLongBits(value); + buffer.setByte((byte) ((bits >> 56) & 0xFF), index); + buffer.setByte((byte) ((bits >> 48) & 0xFF), index + 1); + buffer.setByte((byte) ((bits >> 40) & 0xFF), index + 2); + } + + @Override + public double readDouble(ByteDataBuffer buffer, long index) { + long byte7 = buffer.getByte(index); + long byte6 = buffer.getByte(index + 1); + long byte5 = buffer.getByte(index + 2); + return Double.longBitsToDouble( + ((byte7 & 0xFF) << 56) | ((byte6 & 0xFF) << 48) | ((byte5 & 0xFF) << 40)); + } + + @Override + public int scale() { + return 3; + } + }; } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/FloatDataBufferAdapterTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/FloatDataBufferAdapterTest.java index 82b8ee947dd..325ef9c05cf 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/FloatDataBufferAdapterTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/FloatDataBufferAdapterTest.java @@ -35,18 +35,19 @@ protected long maxSize() { return super.maxSize() / 2; } - private static FloatDataLayout LAYOUT = new FloatDataLayout() { - - @Override - public void writeFloat(ShortDataBuffer buffer, float value, long index) { - int bits = Float.floatToIntBits(value); - buffer.setShort((short)(bits >> 16), index); - } - - @Override - public float readFloat(ShortDataBuffer buffer, long index) { - int i = buffer.getShort(index); - return Float.intBitsToFloat(i << 16); - } - }; + private static FloatDataLayout LAYOUT = + new FloatDataLayout() { + + @Override + public void writeFloat(ShortDataBuffer buffer, float value, long index) { + int bits = Float.floatToIntBits(value); + buffer.setShort((short) (bits >> 16), index); + } + + @Override + public float readFloat(ShortDataBuffer buffer, long index) { + int i = buffer.getShort(index); + return Float.intBitsToFloat(i << 16); + } + }; } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/IntDataBufferAdapterTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/IntDataBufferAdapterTest.java index 9c00f92b00d..ac045e24662 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/IntDataBufferAdapterTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/IntDataBufferAdapterTest.java @@ -35,17 +35,18 @@ protected long maxSize() { return super.maxSize() / 2; } - private static IntDataLayout LAYOUT = new IntDataLayout() { - - @Override - public void writeInt(ShortDataBuffer buffer, int value, long index) { - buffer.setShort((short)(((value & 0x80000000) >> 16) | (value & 0x7FFF)), index); - } - - @Override - public int readInt(ShortDataBuffer buffer, long index) { - int i = buffer.getShort(index); - return ((i & 0x8000) << 16) | ((i & 0x7FFF)); - } - }; + private static IntDataLayout LAYOUT = + new IntDataLayout() { + + @Override + public void writeInt(ShortDataBuffer buffer, int value, long index) { + buffer.setShort((short) (((value & 0x80000000) >> 16) | (value & 0x7FFF)), index); + } + + @Override + public int readInt(ShortDataBuffer buffer, long index) { + int i = buffer.getShort(index); + return ((i & 0x8000) << 16) | ((i & 0x7FFF)); + } + }; } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/LongDataBufferAdapterTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/LongDataBufferAdapterTest.java index 40bc4c55b3e..bdb17d50fed 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/LongDataBufferAdapterTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/LongDataBufferAdapterTest.java @@ -35,26 +35,27 @@ protected long maxSize() { return super.maxSize() / 3; } - private static LongDataLayout LAYOUT = new LongDataLayout() { - - @Override - public void writeLong(ByteDataBuffer buffer, long value, long index) { - buffer.setByte((byte)(((value >> 56) & 0x80) | ((value >> 16) & 0x7F)), index); - buffer.setByte((byte)((value >> 8) & 0xFF), index + 1); - buffer.setByte((byte)(value & 0xFF), index + 2); - } - - @Override - public long readLong(ByteDataBuffer buffer, long index) { - long msb = buffer.getByte(index); - long midb = buffer.getByte(index + 1); - long lsb = buffer.getByte(index + 2); - return ((msb & 0x80) << 56) | ((msb & 0x7F) << 16) | ((midb & 0xFF) << 8) | (lsb & 0xFF); - } - - @Override - public int scale() { - return 3; - } - }; + private static LongDataLayout LAYOUT = + new LongDataLayout() { + + @Override + public void writeLong(ByteDataBuffer buffer, long value, long index) { + buffer.setByte((byte) (((value >> 56) & 0x80) | ((value >> 16) & 0x7F)), index); + buffer.setByte((byte) ((value >> 8) & 0xFF), index + 1); + buffer.setByte((byte) (value & 0xFF), index + 2); + } + + @Override + public long readLong(ByteDataBuffer buffer, long index) { + long msb = buffer.getByte(index); + long midb = buffer.getByte(index + 1); + long lsb = buffer.getByte(index + 2); + return ((msb & 0x80) << 56) | ((msb & 0x7F) << 16) | ((midb & 0xFF) << 8) | (lsb & 0xFF); + } + + @Override + public int scale() { + return 3; + } + }; } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/ShortDataBufferAdapterTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/ShortDataBufferAdapterTest.java index 3c11d3a46ad..dd446028c60 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/ShortDataBufferAdapterTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/adapter/ShortDataBufferAdapterTest.java @@ -29,17 +29,18 @@ public ShortDataBuffer allocate(long size) { return LAYOUT.applyTo(DataBuffers.ofBytes(size * LAYOUT.scale())); } - private static ShortDataLayout LAYOUT = new ShortDataLayout() { + private static ShortDataLayout LAYOUT = + new ShortDataLayout() { - @Override - public void writeShort(ByteDataBuffer buffer, short value, long index) { - buffer.setByte((byte)(((value & 0x8000) >> 8) | (value & 0x7F)), index); - } + @Override + public void writeShort(ByteDataBuffer buffer, short value, long index) { + buffer.setByte((byte) (((value & 0x8000) >> 8) | (value & 0x7F)), index); + } - @Override - public short readShort(ByteDataBuffer buffer, long index) { - int b = buffer.getByte(index); - return (short)(((b & 0x80) << 8) | (b & 0x7F)); - } - }; + @Override + public short readShort(ByteDataBuffer buffer, long index) { + int b = buffer.getByte(index); + return (short) (((b & 0x80) << 8) | (b & 0x7F)); + } + }; } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/layout/Bfloat16LayoutTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/layout/Bfloat16LayoutTest.java index 48ddeb1c56e..30eff04bfac 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/layout/Bfloat16LayoutTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/layout/Bfloat16LayoutTest.java @@ -27,58 +27,58 @@ public class Bfloat16LayoutTest { public void testFloat32to16() { // Zero and subnormals - assertEquals((short)0x0000, Bfloat16Layout.float32to16(0.0f)); - assertEquals((short)0x8000, Bfloat16Layout.float32to16(-0.0f)); - assertEquals((short)0x0001, Bfloat16Layout.float32to16(1e-40f)); - assertEquals((short)0xC000, Bfloat16Layout.float32to16(-2.0f)); - assertEquals((short)0x0000, Bfloat16Layout.float32to16(4.59e-41f)); + assertEquals((short) 0x0000, Bfloat16Layout.float32to16(0.0f)); + assertEquals((short) 0x8000, Bfloat16Layout.float32to16(-0.0f)); + assertEquals((short) 0x0001, Bfloat16Layout.float32to16(1e-40f)); + assertEquals((short) 0xC000, Bfloat16Layout.float32to16(-2.0f)); + assertEquals((short) 0x0000, Bfloat16Layout.float32to16(4.59e-41f)); // Infinite and NaN - assertEquals((short)0x7F80, Bfloat16Layout.float32to16(Float.POSITIVE_INFINITY)); - assertEquals((short)0xFF80, Bfloat16Layout.float32to16(Float.NEGATIVE_INFINITY)); - assertEquals((short)0x7FC0, Bfloat16Layout.float32to16(Float.NaN)); - assertEquals((short)0x7FC0, Bfloat16Layout.float32to16(Float.intBitsToFloat(0xFFFFFFFF))); + assertEquals((short) 0x7F80, Bfloat16Layout.float32to16(Float.POSITIVE_INFINITY)); + assertEquals((short) 0xFF80, Bfloat16Layout.float32to16(Float.NEGATIVE_INFINITY)); + assertEquals((short) 0x7FC0, Bfloat16Layout.float32to16(Float.NaN)); + assertEquals((short) 0x7FC0, Bfloat16Layout.float32to16(Float.intBitsToFloat(0xFFFFFFFF))); // Normalized - assertEquals((short)0x3F80, Bfloat16Layout.float32to16(1.0f)); - assertEquals((short)0xBF80, Bfloat16Layout.float32to16(-1.0f)); - assertEquals((short)0x42C8, Bfloat16Layout.float32to16(100.0f)); - assertEquals((short)0xC2CA, Bfloat16Layout.float32to16(-101.0f)); - assertEquals((short)0x3F8F, Bfloat16Layout.float32to16(1.1171875f)); - assertEquals((short)0x4800, Bfloat16Layout.float32to16(131072f)); - assertEquals((short)0x7F7F, Bfloat16Layout.float32to16(3.3895314e38f)); - assertEquals((short)0xFF7F, Bfloat16Layout.float32to16(-3.3895314e38f)); + assertEquals((short) 0x3F80, Bfloat16Layout.float32to16(1.0f)); + assertEquals((short) 0xBF80, Bfloat16Layout.float32to16(-1.0f)); + assertEquals((short) 0x42C8, Bfloat16Layout.float32to16(100.0f)); + assertEquals((short) 0xC2CA, Bfloat16Layout.float32to16(-101.0f)); + assertEquals((short) 0x3F8F, Bfloat16Layout.float32to16(1.1171875f)); + assertEquals((short) 0x4800, Bfloat16Layout.float32to16(131072f)); + assertEquals((short) 0x7F7F, Bfloat16Layout.float32to16(3.3895314e38f)); + assertEquals((short) 0xFF7F, Bfloat16Layout.float32to16(-3.3895314e38f)); // Rounding up - assertEquals((short)0x3FCF, Bfloat16Layout.float32to16(1.6191406f)); // 1.6171875 - assertEquals((short)0x4780, Bfloat16Layout.float32to16(65600.0f)); // 65536.0 + assertEquals((short) 0x3FCF, Bfloat16Layout.float32to16(1.6191406f)); // 1.6171875 + assertEquals((short) 0x4780, Bfloat16Layout.float32to16(65600.0f)); // 65536.0 } @Test public void testFloat16to32() { // Zero and subnormals - assertEquals(0.0f, Bfloat16Layout.float16to32((short)0x0000), 0); - assertEquals(-0.0f, Bfloat16Layout.float16to32((short)0x8000), 0); - assertEquals(9.18355E-41f, Bfloat16Layout.float16to32((short)0x0001), 1e-8f); - assertEquals(-9.403955E-38, Bfloat16Layout.float16to32((short)0x8200), 1e-8f); + assertEquals(0.0f, Bfloat16Layout.float16to32((short) 0x0000), 0); + assertEquals(-0.0f, Bfloat16Layout.float16to32((short) 0x8000), 0); + assertEquals(9.18355E-41f, Bfloat16Layout.float16to32((short) 0x0001), 1e-8f); + assertEquals(-9.403955E-38, Bfloat16Layout.float16to32((short) 0x8200), 1e-8f); // Infinite and NaN - assertEquals(Float.POSITIVE_INFINITY, Bfloat16Layout.float16to32((short)0x7F80), 0); - assertEquals(Float.NEGATIVE_INFINITY, Bfloat16Layout.float16to32((short)0xFF80), 0); - assertEquals(Float.NaN, Bfloat16Layout.float16to32((short)0x7FC0), 0); - assertEquals(Float.intBitsToFloat(0xFFFFFFFF), Bfloat16Layout.float16to32((short)0x7FC0), 0); + assertEquals(Float.POSITIVE_INFINITY, Bfloat16Layout.float16to32((short) 0x7F80), 0); + assertEquals(Float.NEGATIVE_INFINITY, Bfloat16Layout.float16to32((short) 0xFF80), 0); + assertEquals(Float.NaN, Bfloat16Layout.float16to32((short) 0x7FC0), 0); + assertEquals(Float.intBitsToFloat(0xFFFFFFFF), Bfloat16Layout.float16to32((short) 0x7FC0), 0); // Normalized - assertEquals(1.0f, Bfloat16Layout.float16to32((short)0x3F80), 0); - assertEquals(-1.0f, Bfloat16Layout.float16to32((short)0xBF80), 0); - assertEquals(100.0f, Bfloat16Layout.float16to32((short)0x42C8), 0); - assertEquals(-101.0f, Bfloat16Layout.float16to32((short)0xC2CA), 0); - assertEquals(1.1171875f, Bfloat16Layout.float16to32((short)0x3F8F), 0); - assertEquals(131072f, Bfloat16Layout.float16to32((short)0x4800), 0); - assertEquals(3.3895314e38f, Bfloat16Layout.float16to32((short)0x7F7F), 0); - assertEquals(-3.3895314e38f, Bfloat16Layout.float16to32((short)0xFF7F), 0); - assertEquals(1.6171875f, Bfloat16Layout.float16to32((short)0x3FCF), 0); - assertEquals(65536.0, Bfloat16Layout.float16to32((short)0x4780), 0); + assertEquals(1.0f, Bfloat16Layout.float16to32((short) 0x3F80), 0); + assertEquals(-1.0f, Bfloat16Layout.float16to32((short) 0xBF80), 0); + assertEquals(100.0f, Bfloat16Layout.float16to32((short) 0x42C8), 0); + assertEquals(-101.0f, Bfloat16Layout.float16to32((short) 0xC2CA), 0); + assertEquals(1.1171875f, Bfloat16Layout.float16to32((short) 0x3F8F), 0); + assertEquals(131072f, Bfloat16Layout.float16to32((short) 0x4800), 0); + assertEquals(3.3895314e38f, Bfloat16Layout.float16to32((short) 0x7F7F), 0); + assertEquals(-3.3895314e38f, Bfloat16Layout.float16to32((short) 0xFF7F), 0); + assertEquals(1.6171875f, Bfloat16Layout.float16to32((short) 0x3FCF), 0); + assertEquals(65536.0, Bfloat16Layout.float16to32((short) 0x4780), 0); } } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/layout/BoolLayoutTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/layout/BoolLayoutTest.java index 6ba903cadec..7cdc010e478 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/layout/BoolLayoutTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/layout/BoolLayoutTest.java @@ -27,16 +27,16 @@ public class BoolLayoutTest { @Test public void booleanToByteTest() { - assertEquals((byte)1, BoolLayout.booleanToByte(true)); - assertEquals((byte)0, BoolLayout.booleanToByte(false)); + assertEquals((byte) 1, BoolLayout.booleanToByte(true)); + assertEquals((byte) 0, BoolLayout.booleanToByte(false)); } @Test public void byteToBooleanTest() { - assertTrue(BoolLayout.byteToBoolean((byte)1)); - assertTrue(BoolLayout.byteToBoolean((byte)127)); - assertTrue(BoolLayout.byteToBoolean((byte)-128)); - assertTrue(BoolLayout.byteToBoolean((byte)255)); - assertFalse(BoolLayout.byteToBoolean((byte)0)); + assertTrue(BoolLayout.byteToBoolean((byte) 1)); + assertTrue(BoolLayout.byteToBoolean((byte) 127)); + assertTrue(BoolLayout.byteToBoolean((byte) -128)); + assertTrue(BoolLayout.byteToBoolean((byte) 255)); + assertFalse(BoolLayout.byteToBoolean((byte) 0)); } } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/layout/Float16LayoutTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/layout/Float16LayoutTest.java index 7bc430ac4ba..2c7c8c281a6 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/layout/Float16LayoutTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/layout/Float16LayoutTest.java @@ -27,64 +27,64 @@ public class Float16LayoutTest { public void testFloat32to16() { // Zero and subnormals - assertEquals((short)0x0000, Float16Layout.float32to16(0.0f)); - assertEquals((short)0x8000, Float16Layout.float32to16(-0.0f)); - assertEquals((short)0x0001, Float16Layout.float32to16(6e-8f)); - assertEquals((short)0x8200, Float16Layout.float32to16(-3.052e-5f)); - assertEquals((short)0x0000, Float16Layout.float32to16(6e-9f)); + assertEquals((short) 0x0000, Float16Layout.float32to16(0.0f)); + assertEquals((short) 0x8000, Float16Layout.float32to16(-0.0f)); + assertEquals((short) 0x0001, Float16Layout.float32to16(6e-8f)); + assertEquals((short) 0x8200, Float16Layout.float32to16(-3.052e-5f)); + assertEquals((short) 0x0000, Float16Layout.float32to16(6e-9f)); // Infinite and NaN - assertEquals((short)0x7C00, Float16Layout.float32to16(Float.POSITIVE_INFINITY)); - assertEquals((short)0xFC00, Float16Layout.float32to16(Float.NEGATIVE_INFINITY)); - assertEquals((short)0x7C00, Float16Layout.float32to16(65520.0f)); - assertEquals((short)0x7C00, Float16Layout.float32to16(165536.0f)); - assertEquals((short)0xFC00, Float16Layout.float32to16(-65520.0f)); - assertEquals((short)0x7E00, Float16Layout.float32to16(Float.NaN)); - assertEquals((short)0x7E00, Float16Layout.float32to16(Float.intBitsToFloat(0xFFFFFFFF))); + assertEquals((short) 0x7C00, Float16Layout.float32to16(Float.POSITIVE_INFINITY)); + assertEquals((short) 0xFC00, Float16Layout.float32to16(Float.NEGATIVE_INFINITY)); + assertEquals((short) 0x7C00, Float16Layout.float32to16(65520.0f)); + assertEquals((short) 0x7C00, Float16Layout.float32to16(165536.0f)); + assertEquals((short) 0xFC00, Float16Layout.float32to16(-65520.0f)); + assertEquals((short) 0x7E00, Float16Layout.float32to16(Float.NaN)); + assertEquals((short) 0x7E00, Float16Layout.float32to16(Float.intBitsToFloat(0xFFFFFFFF))); // Normalized - assertEquals((short)0x7BFF, Float16Layout.float32to16(65519.0f)); - assertEquals((short)0x3C00, Float16Layout.float32to16(1.0f)); - assertEquals((short)0xBC00, Float16Layout.float32to16(-1.0f)); - assertEquals((short)0x5640, Float16Layout.float32to16(100.0f)); - assertEquals((short)0xD650, Float16Layout.float32to16(-101.0f)); - assertEquals((short)0x3C7E, Float16Layout.float32to16(1.123f)); + assertEquals((short) 0x7BFF, Float16Layout.float32to16(65519.0f)); + assertEquals((short) 0x3C00, Float16Layout.float32to16(1.0f)); + assertEquals((short) 0xBC00, Float16Layout.float32to16(-1.0f)); + assertEquals((short) 0x5640, Float16Layout.float32to16(100.0f)); + assertEquals((short) 0xD650, Float16Layout.float32to16(-101.0f)); + assertEquals((short) 0x3C7E, Float16Layout.float32to16(1.123f)); // Rounding up - assertEquals((short)0x3C7E, Float16Layout.float32to16(1.1235f)); // 1.123 - assertEquals((short)0x3C7F, Float16Layout.float32to16(1.1236f)); // 1.124 - assertEquals((short)0x4000, Float16Layout.float32to16(2.0009f)); // 2.0 - assertEquals((short)0x4001, Float16Layout.float32to16(2.001f)); // 2.002 - assertEquals((short)0x5C00, Float16Layout.float32to16(256.125f)); // 256.0 - assertEquals((short)0x5C01, Float16Layout.float32to16(256.126f)); // 256.3 - assertEquals((short)0x5C01, Float16Layout.float32to16(256.30f)); // 256.3 - assertEquals((short)0x5C01, Float16Layout.float32to16(256.374f)); // 256.3 - assertEquals((short)0x5C02, Float16Layout.float32to16(256.375f)); // 256.5 - assertEquals((short)0x5C02, Float16Layout.float32to16(256.51f)); // 256.5 + assertEquals((short) 0x3C7E, Float16Layout.float32to16(1.1235f)); // 1.123 + assertEquals((short) 0x3C7F, Float16Layout.float32to16(1.1236f)); // 1.124 + assertEquals((short) 0x4000, Float16Layout.float32to16(2.0009f)); // 2.0 + assertEquals((short) 0x4001, Float16Layout.float32to16(2.001f)); // 2.002 + assertEquals((short) 0x5C00, Float16Layout.float32to16(256.125f)); // 256.0 + assertEquals((short) 0x5C01, Float16Layout.float32to16(256.126f)); // 256.3 + assertEquals((short) 0x5C01, Float16Layout.float32to16(256.30f)); // 256.3 + assertEquals((short) 0x5C01, Float16Layout.float32to16(256.374f)); // 256.3 + assertEquals((short) 0x5C02, Float16Layout.float32to16(256.375f)); // 256.5 + assertEquals((short) 0x5C02, Float16Layout.float32to16(256.51f)); // 256.5 } @Test public void testFloat16to32() { // Zero and subnormals - assertEquals(0.0f, Float16Layout.float16to32((short)0x0000), 0); - assertEquals(-0.0f, Float16Layout.float16to32((short)0x8000), 0); - assertEquals(6e-8f, Float16Layout.float16to32((short)0x0001), 1e-8f); - assertEquals(-3.052e-5f, Float16Layout.float16to32((short)0x8200), 1e-8f); + assertEquals(0.0f, Float16Layout.float16to32((short) 0x0000), 0); + assertEquals(-0.0f, Float16Layout.float16to32((short) 0x8000), 0); + assertEquals(6e-8f, Float16Layout.float16to32((short) 0x0001), 1e-8f); + assertEquals(-3.052e-5f, Float16Layout.float16to32((short) 0x8200), 1e-8f); // Infinite and NaN - assertEquals(Float.POSITIVE_INFINITY, Float16Layout.float16to32((short)0x7C00), 0); - assertEquals(Float.NEGATIVE_INFINITY, Float16Layout.float16to32((short)0xFC00), 0); - assertEquals(Float.NaN, Float16Layout.float16to32((short)0x7E00), 0); - assertEquals(Float.intBitsToFloat(0xFFFFFFFF), Float16Layout.float16to32((short)0x7E00), 0); + assertEquals(Float.POSITIVE_INFINITY, Float16Layout.float16to32((short) 0x7C00), 0); + assertEquals(Float.NEGATIVE_INFINITY, Float16Layout.float16to32((short) 0xFC00), 0); + assertEquals(Float.NaN, Float16Layout.float16to32((short) 0x7E00), 0); + assertEquals(Float.intBitsToFloat(0xFFFFFFFF), Float16Layout.float16to32((short) 0x7E00), 0); // Normalized - assertEquals(1.0f, Float16Layout.float16to32((short)0x3C00), 1e-1f); - assertEquals(-1.0f, Float16Layout.float16to32((short)0xBC00), 1e-1f); - assertEquals(100.0f, Float16Layout.float16to32((short)0x5640), 1e-1f); - assertEquals(-101.0f, Float16Layout.float16to32((short)0xD650), 1e-1f); - assertEquals(1.123f, Float16Layout.float16to32((short)0x3C7E), 1e-3f); - assertEquals(1.123f, Float16Layout.float16to32((short)0x3C7E), 1e-3f); - assertEquals(-62.34f, Float16Layout.float16to32((short)0xD3CB), 1e-2f); + assertEquals(1.0f, Float16Layout.float16to32((short) 0x3C00), 1e-1f); + assertEquals(-1.0f, Float16Layout.float16to32((short) 0xBC00), 1e-1f); + assertEquals(100.0f, Float16Layout.float16to32((short) 0x5640), 1e-1f); + assertEquals(-101.0f, Float16Layout.float16to32((short) 0xD650), 1e-1f); + assertEquals(1.123f, Float16Layout.float16to32((short) 0x3C7E), 1e-3f); + assertEquals(1.123f, Float16Layout.float16to32((short) 0x3C7E), 1e-3f); + assertEquals(-62.34f, Float16Layout.float16to32((short) 0xD3CB), 1e-2f); } } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/misc/ArrayDataBufferTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/misc/ArrayDataBufferTest.java index 1c43a3e3638..60ab337c8f2 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/misc/ArrayDataBufferTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/misc/ArrayDataBufferTest.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.buffer.misc; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -30,7 +30,7 @@ public class ArrayDataBufferTest extends DataBufferTestBase { @Override protected DataBuffer allocate(long size) { - return new ArrayDataBuffer<>(new BigDecimal[(int)size], false); + return new ArrayDataBuffer<>(new BigDecimal[(int) size], false); } @Override @@ -40,11 +40,11 @@ protected BigDecimal valueOf(Long val) { @Test public void byteArrayBufferEquals() { - DataBuffer buffer1 = new ArrayDataBuffer<>(new byte[][] { { 0x01 }, { 0x03 } }, true); - DataBuffer buffer2 = new ArrayDataBuffer<>(new byte[][] { { 0x01 }, { 0x03 } }, true); - DataBuffer buffer3 = new ArrayDataBuffer<>(new byte[][] { { 0x02 }, { 0x03 } }, true); - DataBuffer buffer4 = new ArrayDataBuffer<>(new byte[][][] { { { 0x01 } }, { { 0x03 } } }, true); - DataBuffer buffer5 = new ArrayDataBuffer<>(new byte[][][] { { { 0x01 } }, { { 0x03 } } }, true); + DataBuffer buffer1 = new ArrayDataBuffer<>(new byte[][] {{0x01}, {0x03}}, true); + DataBuffer buffer2 = new ArrayDataBuffer<>(new byte[][] {{0x01}, {0x03}}, true); + DataBuffer buffer3 = new ArrayDataBuffer<>(new byte[][] {{0x02}, {0x03}}, true); + DataBuffer buffer4 = new ArrayDataBuffer<>(new byte[][][] {{{0x01}}, {{0x03}}}, true); + DataBuffer buffer5 = new ArrayDataBuffer<>(new byte[][][] {{{0x01}}, {{0x03}}}, true); assertTrue(buffer1.equals(buffer2)); assertTrue(buffer2.equals(buffer1)); @@ -65,11 +65,11 @@ public void byteArrayBufferEquals() { @Test public void intArrayBufferEquals() { - DataBuffer buffer1 = new ArrayDataBuffer<>(new int[][] { { 10 }, { 30 } }, true); - DataBuffer buffer2 = new ArrayDataBuffer<>(new int[][] { { 10 }, { 30 } }, true); - DataBuffer buffer3 = new ArrayDataBuffer<>(new int[][] { { 20 }, { 30 } }, true); - DataBuffer buffer4 = new ArrayDataBuffer<>(new int[][][] { { { 10 } }, { { 30 } } }, true); - DataBuffer buffer5 = new ArrayDataBuffer<>(new int[][][] { { { 10 } }, { { 30 } } }, true); + DataBuffer buffer1 = new ArrayDataBuffer<>(new int[][] {{10}, {30}}, true); + DataBuffer buffer2 = new ArrayDataBuffer<>(new int[][] {{10}, {30}}, true); + DataBuffer buffer3 = new ArrayDataBuffer<>(new int[][] {{20}, {30}}, true); + DataBuffer buffer4 = new ArrayDataBuffer<>(new int[][][] {{{10}}, {{30}}}, true); + DataBuffer buffer5 = new ArrayDataBuffer<>(new int[][][] {{{10}}, {{30}}}, true); assertTrue(buffer1.equals(buffer2)); assertTrue(buffer2.equals(buffer1)); @@ -90,11 +90,11 @@ public void intArrayBufferEquals() { @Test public void shortArrayBufferEquals() { - DataBuffer buffer1 = new ArrayDataBuffer<>(new short[][] { { 10 }, { 30 } }, true); - DataBuffer buffer2 = new ArrayDataBuffer<>(new short[][] { { 10 }, { 30 } }, true); - DataBuffer buffer3 = new ArrayDataBuffer<>(new short[][] { { 20 }, { 30 } }, true); - DataBuffer buffer4 = new ArrayDataBuffer<>(new short[][][] { { { 10 } }, { { 30 } } }, true); - DataBuffer buffer5 = new ArrayDataBuffer<>(new short[][][] { { { 10 } }, { { 30 } } }, true); + DataBuffer buffer1 = new ArrayDataBuffer<>(new short[][] {{10}, {30}}, true); + DataBuffer buffer2 = new ArrayDataBuffer<>(new short[][] {{10}, {30}}, true); + DataBuffer buffer3 = new ArrayDataBuffer<>(new short[][] {{20}, {30}}, true); + DataBuffer buffer4 = new ArrayDataBuffer<>(new short[][][] {{{10}}, {{30}}}, true); + DataBuffer buffer5 = new ArrayDataBuffer<>(new short[][][] {{{10}}, {{30}}}, true); assertTrue(buffer1.equals(buffer2)); assertTrue(buffer2.equals(buffer1)); @@ -115,11 +115,11 @@ public void shortArrayBufferEquals() { @Test public void longArrayBufferEquals() { - DataBuffer buffer1 = new ArrayDataBuffer<>(new long[][] { { 10 }, { 30 } }, true); - DataBuffer buffer2 = new ArrayDataBuffer<>(new long[][] { { 10 }, { 30 } }, true); - DataBuffer buffer3 = new ArrayDataBuffer<>(new long[][] { { 20 }, { 30 } }, true); - DataBuffer buffer4 = new ArrayDataBuffer<>(new long[][][] { { { 10 } }, { { 30 } } }, true); - DataBuffer buffer5 = new ArrayDataBuffer<>(new long[][][] { { { 10 } }, { { 30 } } }, true); + DataBuffer buffer1 = new ArrayDataBuffer<>(new long[][] {{10}, {30}}, true); + DataBuffer buffer2 = new ArrayDataBuffer<>(new long[][] {{10}, {30}}, true); + DataBuffer buffer3 = new ArrayDataBuffer<>(new long[][] {{20}, {30}}, true); + DataBuffer buffer4 = new ArrayDataBuffer<>(new long[][][] {{{10}}, {{30}}}, true); + DataBuffer buffer5 = new ArrayDataBuffer<>(new long[][][] {{{10}}, {{30}}}, true); assertTrue(buffer1.equals(buffer2)); assertTrue(buffer2.equals(buffer1)); @@ -140,11 +140,11 @@ public void longArrayBufferEquals() { @Test public void floatArrayBufferEquals() { - DataBuffer buffer1 = new ArrayDataBuffer<>(new float[][] { { 10 }, { 30 } }, true); - DataBuffer buffer2 = new ArrayDataBuffer<>(new float[][] { { 10 }, { 30 } }, true); - DataBuffer buffer3 = new ArrayDataBuffer<>(new float[][] { { 20 }, { 30 } }, true); - DataBuffer buffer4 = new ArrayDataBuffer<>(new float[][][] { { { 10 } }, { { 30 } } }, true); - DataBuffer buffer5 = new ArrayDataBuffer<>(new float[][][] { { { 10 } }, { { 30 } } }, true); + DataBuffer buffer1 = new ArrayDataBuffer<>(new float[][] {{10}, {30}}, true); + DataBuffer buffer2 = new ArrayDataBuffer<>(new float[][] {{10}, {30}}, true); + DataBuffer buffer3 = new ArrayDataBuffer<>(new float[][] {{20}, {30}}, true); + DataBuffer buffer4 = new ArrayDataBuffer<>(new float[][][] {{{10}}, {{30}}}, true); + DataBuffer buffer5 = new ArrayDataBuffer<>(new float[][][] {{{10}}, {{30}}}, true); assertTrue(buffer1.equals(buffer2)); assertTrue(buffer2.equals(buffer1)); @@ -165,11 +165,11 @@ public void floatArrayBufferEquals() { @Test public void doubleArrayBufferEquals() { - DataBuffer buffer1 = new ArrayDataBuffer<>(new double[][] { { 10 }, { 30 } }, true); - DataBuffer buffer2 = new ArrayDataBuffer<>(new double[][] { { 10 }, { 30 } }, true); - DataBuffer buffer3 = new ArrayDataBuffer<>(new double[][] { { 20 }, { 30 } }, true); - DataBuffer buffer4 = new ArrayDataBuffer<>(new double[][][] { { { 10 } }, { { 30 } } }, true); - DataBuffer buffer5 = new ArrayDataBuffer<>(new double[][][] { { { 10 } }, { { 30 } } }, true); + DataBuffer buffer1 = new ArrayDataBuffer<>(new double[][] {{10}, {30}}, true); + DataBuffer buffer2 = new ArrayDataBuffer<>(new double[][] {{10}, {30}}, true); + DataBuffer buffer3 = new ArrayDataBuffer<>(new double[][] {{20}, {30}}, true); + DataBuffer buffer4 = new ArrayDataBuffer<>(new double[][][] {{{10}}, {{30}}}, true); + DataBuffer buffer5 = new ArrayDataBuffer<>(new double[][][] {{{10}}, {{30}}}, true); assertTrue(buffer1.equals(buffer2)); assertTrue(buffer2.equals(buffer1)); @@ -190,11 +190,13 @@ public void doubleArrayBufferEquals() { @Test public void booleanArrayBufferEquals() { - DataBuffer buffer1 = new ArrayDataBuffer<>(new boolean[][] { { true }, { false } }, true); - DataBuffer buffer2 = new ArrayDataBuffer<>(new boolean[][] { { true }, { false} }, true); - DataBuffer buffer3 = new ArrayDataBuffer<>(new boolean[][] { { false }, { false } }, true); - DataBuffer buffer4 = new ArrayDataBuffer<>(new boolean[][][] { { { true } }, { { false } } }, true); - DataBuffer buffer5 = new ArrayDataBuffer<>(new boolean[][][] { { { true } }, { { false } } }, true); + DataBuffer buffer1 = new ArrayDataBuffer<>(new boolean[][] {{true}, {false}}, true); + DataBuffer buffer2 = new ArrayDataBuffer<>(new boolean[][] {{true}, {false}}, true); + DataBuffer buffer3 = new ArrayDataBuffer<>(new boolean[][] {{false}, {false}}, true); + DataBuffer buffer4 = + new ArrayDataBuffer<>(new boolean[][][] {{{true}}, {{false}}}, true); + DataBuffer buffer5 = + new ArrayDataBuffer<>(new boolean[][][] {{{true}}, {{false}}}, true); assertTrue(buffer1.equals(buffer2)); assertTrue(buffer2.equals(buffer1)); @@ -215,11 +217,13 @@ public void booleanArrayBufferEquals() { @Test public void objectArrayBufferEquals() { - DataBuffer buffer1 = new ArrayDataBuffer<>(new String[][] { { "10" }, { "30" } }, true); - DataBuffer buffer2 = new ArrayDataBuffer<>(new String[][] { { "10" }, { "30" } }, true); - DataBuffer buffer3 = new ArrayDataBuffer<>(new String[][] { { "20" }, { "30" } }, true); - DataBuffer buffer4 = new ArrayDataBuffer<>(new String[][][] { { { "10" } }, { { "30" } } }, true); - DataBuffer buffer5 = new ArrayDataBuffer<>(new String[][][] { { { "10" } }, { { "30" } } }, true); + DataBuffer buffer1 = new ArrayDataBuffer<>(new String[][] {{"10"}, {"30"}}, true); + DataBuffer buffer2 = new ArrayDataBuffer<>(new String[][] {{"10"}, {"30"}}, true); + DataBuffer buffer3 = new ArrayDataBuffer<>(new String[][] {{"20"}, {"30"}}, true); + DataBuffer buffer4 = + new ArrayDataBuffer<>(new String[][][] {{{"10"}}, {{"30"}}}, true); + DataBuffer buffer5 = + new ArrayDataBuffer<>(new String[][][] {{{"10"}}, {{"30"}}}, true); assertTrue(buffer1.equals(buffer2)); assertTrue(buffer2.equals(buffer1)); @@ -240,11 +244,11 @@ public void objectArrayBufferEquals() { @Test public void nullableObjectArrayBufferEquals() { - DataBuffer buffer1 = new ArrayDataBuffer<>(new String[][] { null, { "30" } }, true); - DataBuffer buffer2 = new ArrayDataBuffer<>(new String[][] { null, { "30" } }, true); - DataBuffer buffer3 = new ArrayDataBuffer<>(new String[][] { { "20" }, { "30" } }, true); - DataBuffer buffer4 = new ArrayDataBuffer<>(new String[][][] { { { "10" } }, null }, true); - DataBuffer buffer5 = new ArrayDataBuffer<>(new String[][][] { { { "10" } }, null }, true); + DataBuffer buffer1 = new ArrayDataBuffer<>(new String[][] {null, {"30"}}, true); + DataBuffer buffer2 = new ArrayDataBuffer<>(new String[][] {null, {"30"}}, true); + DataBuffer buffer3 = new ArrayDataBuffer<>(new String[][] {{"20"}, {"30"}}, true); + DataBuffer buffer4 = new ArrayDataBuffer<>(new String[][][] {{{"10"}}, null}, true); + DataBuffer buffer5 = new ArrayDataBuffer<>(new String[][][] {{{"10"}}, null}, true); assertTrue(buffer1.equals(buffer2)); assertTrue(buffer2.equals(buffer1)); diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/misc/BitSetDataBufferTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/misc/BitSetDataBufferTest.java index ec5c513869a..2ebd7c492d3 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/misc/BitSetDataBufferTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/misc/BitSetDataBufferTest.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.buffer.misc; import java.util.BitSet; @@ -24,7 +24,7 @@ public class BitSetDataBufferTest extends BooleanDataBufferTestBase { @Override protected BooleanDataBuffer allocate(long size) { - return new BitSetDataBuffer(new BitSet((int)size), size, false); + return new BitSetDataBuffer(new BitSet((int) size), size, false); } @Override diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/misc/StringArrayDataBufferTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/misc/StringArrayDataBufferTest.java index 3e9c3c0cdbf..e91f44bbb9e 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/misc/StringArrayDataBufferTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/misc/StringArrayDataBufferTest.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.buffer.misc; import org.tensorflow.ndarray.buffer.DataBuffer; @@ -23,7 +23,7 @@ public class StringArrayDataBufferTest extends DataBufferTestBase { @Override protected DataBuffer allocate(long size) { - return new ArrayDataBuffer<>(new String[(int)size], false); + return new ArrayDataBuffer<>(new String[(int) size], false); } @Override diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/ByteNioDataBufferTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/ByteNioDataBufferTest.java index 28ff5a6c104..8c80e1cbac5 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/ByteNioDataBufferTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/ByteNioDataBufferTest.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.buffer.nio; import java.nio.ByteBuffer; @@ -24,6 +24,6 @@ public class ByteNioDataBufferTest extends ByteDataBufferTestBase { @Override protected ByteDataBuffer allocate(long size) { - return new ByteNioDataBuffer(ByteBuffer.allocate((int)size)); + return new ByteNioDataBuffer(ByteBuffer.allocate((int) size)); } } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/DoubleNioDataBufferTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/DoubleNioDataBufferTest.java index 7a4d39dce94..47b9562ec1e 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/DoubleNioDataBufferTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/DoubleNioDataBufferTest.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.buffer.nio; import java.nio.DoubleBuffer; @@ -24,6 +24,6 @@ public class DoubleNioDataBufferTest extends DoubleDataBufferTestBase { @Override protected DoubleDataBuffer allocate(long size) { - return new DoubleNioDataBuffer(DoubleBuffer.allocate((int)size)); + return new DoubleNioDataBuffer(DoubleBuffer.allocate((int) size)); } } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/FloatNioDataBufferTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/FloatNioDataBufferTest.java index 08089e76ad8..2dfe3620556 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/FloatNioDataBufferTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/FloatNioDataBufferTest.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.buffer.nio; import java.nio.FloatBuffer; @@ -24,6 +24,6 @@ public class FloatNioDataBufferTest extends FloatDataBufferTestBase { @Override protected FloatDataBuffer allocate(long size) { - return new FloatNioDataBuffer(FloatBuffer.allocate((int)size)); + return new FloatNioDataBuffer(FloatBuffer.allocate((int) size)); } } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/IntNioDataBufferTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/IntNioDataBufferTest.java index 00a993e42ed..28e9525f4a0 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/IntNioDataBufferTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/IntNioDataBufferTest.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.buffer.nio; import java.nio.IntBuffer; @@ -24,6 +24,6 @@ public class IntNioDataBufferTest extends IntDataBufferTestBase { @Override protected IntDataBuffer allocate(long size) { - return new IntNioDataBuffer(IntBuffer.allocate((int)size)); + return new IntNioDataBuffer(IntBuffer.allocate((int) size)); } } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/LongNioDataBufferTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/LongNioDataBufferTest.java index 5922d2b922c..57538c7d348 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/LongNioDataBufferTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/LongNioDataBufferTest.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.buffer.nio; import java.nio.LongBuffer; @@ -24,6 +24,6 @@ public class LongNioDataBufferTest extends LongDataBufferTestBase { @Override protected LongDataBuffer allocate(long size) { - return new LongNioDataBuffer(LongBuffer.allocate((int)size)); + return new LongNioDataBuffer(LongBuffer.allocate((int) size)); } } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/ShortNioDataBufferTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/ShortNioDataBufferTest.java index c76191fbcf1..dc2d5f8aea6 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/ShortNioDataBufferTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/nio/ShortNioDataBufferTest.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.buffer.nio; import java.nio.ShortBuffer; @@ -24,6 +24,6 @@ public class ShortNioDataBufferTest extends ShortDataBufferTestBase { @Override protected ShortDataBuffer allocate(long size) { - return new ShortNioDataBuffer(ShortBuffer.allocate((int)size)); + return new ShortNioDataBuffer(ShortBuffer.allocate((int) size)); } } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/BooleanRawDataBufferTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/BooleanRawDataBufferTest.java index 1f09d76055d..bd0f18d861c 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/BooleanRawDataBufferTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/BooleanRawDataBufferTest.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.buffer.raw; import org.tensorflow.ndarray.buffer.BooleanDataBuffer; @@ -23,6 +23,7 @@ public class BooleanRawDataBufferTest extends BooleanDataBufferTestBase { @Override protected BooleanDataBuffer allocate(long size) { - return new BooleanRawDataBuffer(UnsafeMemoryHandle.fromArray(new boolean[(int)size], (int)size), false); + return new BooleanRawDataBuffer( + UnsafeMemoryHandle.fromArray(new boolean[(int) size], (int) size), false); } } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/ByteRawDataBufferTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/ByteRawDataBufferTest.java index 4a415aff49f..79d07e8644c 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/ByteRawDataBufferTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/ByteRawDataBufferTest.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.buffer.raw; import org.tensorflow.ndarray.buffer.ByteDataBuffer; @@ -23,6 +23,7 @@ public class ByteRawDataBufferTest extends ByteDataBufferTestBase { @Override protected ByteDataBuffer allocate(long size) { - return new ByteRawDataBuffer(UnsafeMemoryHandle.fromArray(new byte[(int)size], (int)size), false); + return new ByteRawDataBuffer( + UnsafeMemoryHandle.fromArray(new byte[(int) size], (int) size), false); } } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/DoubleRawDataBufferTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/DoubleRawDataBufferTest.java index df845092dd1..b2d82fc3d26 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/DoubleRawDataBufferTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/DoubleRawDataBufferTest.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.buffer.raw; import org.tensorflow.ndarray.buffer.DoubleDataBuffer; @@ -23,6 +23,7 @@ public class DoubleRawDataBufferTest extends DoubleDataBufferTestBase { @Override protected DoubleDataBuffer allocate(long size) { - return new DoubleRawDataBuffer(UnsafeMemoryHandle.fromArray(new double[(int)size], (int)size), false); + return new DoubleRawDataBuffer( + UnsafeMemoryHandle.fromArray(new double[(int) size], (int) size), false); } } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/FloatRawDataBufferTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/FloatRawDataBufferTest.java index bc453d79f37..ef4fbbce6cd 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/FloatRawDataBufferTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/FloatRawDataBufferTest.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.buffer.raw; import org.tensorflow.ndarray.buffer.FloatDataBuffer; @@ -23,6 +23,7 @@ public class FloatRawDataBufferTest extends FloatDataBufferTestBase { @Override protected FloatDataBuffer allocate(long size) { - return new FloatRawDataBuffer(UnsafeMemoryHandle.fromArray(new float[(int)size], (int)size), false); + return new FloatRawDataBuffer( + UnsafeMemoryHandle.fromArray(new float[(int) size], (int) size), false); } } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/IntRawDataBufferTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/IntRawDataBufferTest.java index 1142f19131d..f2efd0324cb 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/IntRawDataBufferTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/IntRawDataBufferTest.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.buffer.raw; import org.tensorflow.ndarray.buffer.IntDataBuffer; @@ -23,6 +23,7 @@ public class IntRawDataBufferTest extends IntDataBufferTestBase { @Override protected IntDataBuffer allocate(long size) { - return new IntRawDataBuffer(UnsafeMemoryHandle.fromArray(new int[(int)size], (int)size), false); + return new IntRawDataBuffer( + UnsafeMemoryHandle.fromArray(new int[(int) size], (int) size), false); } } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/LongRawDataBufferTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/LongRawDataBufferTest.java index af86d64a414..e2cacf4a84d 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/LongRawDataBufferTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/LongRawDataBufferTest.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.buffer.raw; import org.tensorflow.ndarray.buffer.LongDataBuffer; @@ -23,6 +23,7 @@ public class LongRawDataBufferTest extends LongDataBufferTestBase { @Override protected LongDataBuffer allocate(long size) { - return new LongRawDataBuffer(UnsafeMemoryHandle.fromArray(new long[(int)size], (int)size), false); + return new LongRawDataBuffer( + UnsafeMemoryHandle.fromArray(new long[(int) size], (int) size), false); } } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/ShortRawDataBufferTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/ShortRawDataBufferTest.java index 1ce1f25391b..887a3d747f7 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/ShortRawDataBufferTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/buffer/raw/ShortRawDataBufferTest.java @@ -1,19 +1,19 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.buffer.raw; import org.tensorflow.ndarray.buffer.ShortDataBuffer; @@ -23,6 +23,7 @@ public class ShortRawDataBufferTest extends ShortDataBufferTestBase { @Override protected ShortDataBuffer allocate(long size) { - return new ShortRawDataBuffer(UnsafeMemoryHandle.fromArray(new short[(int)size], (int)size), false); + return new ShortRawDataBuffer( + UnsafeMemoryHandle.fromArray(new short[(int) size], (int) size), false); } } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/BooleanDenseNdArrayTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/BooleanDenseNdArrayTest.java index d47766826e6..35cbf07fab9 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/BooleanDenseNdArrayTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/BooleanDenseNdArrayTest.java @@ -1,45 +1,47 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.dense; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.tensorflow.ndarray.Shape; -import org.tensorflow.ndarray.buffer.DataBuffer; -import org.tensorflow.ndarray.buffer.DataBuffers; import org.tensorflow.ndarray.BooleanNdArray; import org.tensorflow.ndarray.BooleanNdArrayTestBase; import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; public class BooleanDenseNdArrayTest extends BooleanNdArrayTestBase { - @Override protected BooleanNdArray allocate(Shape shape) { + @Override + protected BooleanNdArray allocate(Shape shape) { return NdArrays.ofBooleans(shape); } - @Override protected DataBuffer allocateBuffer(long size) { + @Override + protected DataBuffer allocateBuffer(long size) { return DataBuffers.ofBooleans(size); } @Test public void testToString() { BooleanNdArray matrix3d = allocate(Shape.of(5, 4, 5)); - Assertions.assertEquals("BooleanDenseNdArray(shape=[5, 4, 5])",matrix3d.toString()); + Assertions.assertEquals("BooleanDenseNdArray(shape=[5, 4, 5])", matrix3d.toString()); BooleanNdArray scalar = allocate(Shape.of()); - Assertions.assertEquals("BooleanDenseNdArray(shape=[])",scalar.toString()); + Assertions.assertEquals("BooleanDenseNdArray(shape=[])", scalar.toString()); } } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/ByteDenseNdArrayTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/ByteDenseNdArrayTest.java index 2e5d1939bc3..848999025d9 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/ByteDenseNdArrayTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/ByteDenseNdArrayTest.java @@ -1,35 +1,37 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.dense; -import org.tensorflow.ndarray.Shape; -import org.tensorflow.ndarray.buffer.DataBuffer; -import org.tensorflow.ndarray.buffer.DataBuffers; import org.tensorflow.ndarray.ByteNdArray; import org.tensorflow.ndarray.ByteNdArrayTestBase; import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; public class ByteDenseNdArrayTest extends ByteNdArrayTestBase { - @Override protected ByteNdArray allocate(Shape shape) { + @Override + protected ByteNdArray allocate(Shape shape) { return NdArrays.ofBytes(shape); } - @Override protected DataBuffer allocateBuffer(long size) { + @Override + protected DataBuffer allocateBuffer(long size) { return DataBuffers.ofBytes(size); } } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/DenseNdArrayTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/DenseNdArrayTest.java index 375f7643875..fb3a44ccb39 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/DenseNdArrayTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/DenseNdArrayTest.java @@ -4,9 +4,9 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import org.junit.jupiter.api.Test; -import org.tensorflow.ndarray.Shape; import org.tensorflow.ndarray.IntNdArray; import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.Shape; import org.tensorflow.ndarray.StdArrays; import org.tensorflow.ndarray.index.Indices; @@ -14,9 +14,10 @@ public class DenseNdArrayTest { @Test public void arrayEquals() { - IntNdArray array = NdArrays.ofInts(Shape.of(2, 2)) - .set(NdArrays.vectorOf(1, 2), 0) - .set(NdArrays.vectorOf(3, 4), 1); + IntNdArray array = + NdArrays.ofInts(Shape.of(2, 2)) + .set(NdArrays.vectorOf(1, 2), 0) + .set(NdArrays.vectorOf(3, 4), 1); assertTrue(array.equals(StdArrays.ndCopyOf(new int[][] {{1, 2}, {3, 4}}))); assertTrue(array.equals(StdArrays.ndCopyOf(new Integer[][] {{1, 2}, {3, 4}}))); @@ -31,14 +32,18 @@ public void equalsAndHashCodeOnSlices() { IntNdArray vector2 = NdArrays.vectorOf(1, 2, 3, 4); IntNdArray matrix1 = StdArrays.ndCopyOf(new int[][] {{1, 2}, {3, 4}}); IntNdArray matrix2 = StdArrays.ndCopyOf(new int[][] {{1, 0, 2, 0}, {3, 0, 4, 0}}); - IntNdArray matrix3d1 = StdArrays.ndCopyOf(new int[][][] { - {{1, 2}, {3, 4}}, - {{5, 6}, {7, 8}} - }); - IntNdArray matrix3d2 = StdArrays.ndCopyOf(new int[][][] { - {{1, 2}, {4, 5}}, - {{3, 4}, {6, 7}} - }); + IntNdArray matrix3d1 = + StdArrays.ndCopyOf( + new int[][][] { + {{1, 2}, {3, 4}}, + {{5, 6}, {7, 8}} + }); + IntNdArray matrix3d2 = + StdArrays.ndCopyOf( + new int[][][] { + {{1, 2}, {4, 5}}, + {{3, 4}, {6, 7}} + }); assertTrue(vector1.equals(vector2.slice(Indices.sliceFrom(2)))); assertTrue(vector1.equals(matrix1.get(1))); diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/DoubleDenseNdArrayTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/DoubleDenseNdArrayTest.java index 279c7b8da59..1d5ad93bc27 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/DoubleDenseNdArrayTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/DoubleDenseNdArrayTest.java @@ -1,47 +1,49 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.dense; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.tensorflow.ndarray.Shape; -import org.tensorflow.ndarray.buffer.DataBuffer; -import org.tensorflow.ndarray.buffer.DataBuffers; import org.tensorflow.ndarray.DoubleNdArray; import org.tensorflow.ndarray.DoubleNdArrayTestBase; import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; public class DoubleDenseNdArrayTest extends DoubleNdArrayTestBase { - @Override protected DoubleNdArray allocate(Shape shape) { + @Override + protected DoubleNdArray allocate(Shape shape) { return NdArrays.ofDoubles(shape); } - @Override protected DataBuffer allocateBuffer(long size) { + @Override + protected DataBuffer allocateBuffer(long size) { return DataBuffers.ofDoubles(size); } @Test public void testToString() { DoubleNdArray matrix3d = allocate(Shape.of(5, 4, 5)); - Assertions.assertEquals("DoubleDenseNdArray(shape=[5, 4, 5])",matrix3d.toString()); + Assertions.assertEquals("DoubleDenseNdArray(shape=[5, 4, 5])", matrix3d.toString()); DoubleNdArray vector = allocate(Shape.of(5)); - Assertions.assertEquals("DoubleDenseNdArray(shape=[5])",vector.toString()); + Assertions.assertEquals("DoubleDenseNdArray(shape=[5])", vector.toString()); DoubleNdArray scalar = allocate(Shape.of()); - Assertions.assertEquals("DoubleDenseNdArray(shape=[])",scalar.toString()); + Assertions.assertEquals("DoubleDenseNdArray(shape=[])", scalar.toString()); } } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/FloatDenseNdArrayTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/FloatDenseNdArrayTest.java index 900ba8a78be..5023d832edd 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/FloatDenseNdArrayTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/FloatDenseNdArrayTest.java @@ -16,6 +16,9 @@ */ package org.tensorflow.ndarray.impl.dense; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.util.concurrent.atomic.AtomicInteger; import org.junit.jupiter.api.Test; import org.tensorflow.ndarray.FloatNdArray; import org.tensorflow.ndarray.FloatNdArrayTestBase; @@ -26,10 +29,6 @@ import org.tensorflow.ndarray.buffer.FloatDataBuffer; import org.tensorflow.ndarray.index.Indices; -import java.util.concurrent.atomic.AtomicInteger; - -import static org.junit.jupiter.api.Assertions.assertEquals; - public class FloatDenseNdArrayTest extends FloatNdArrayTestBase { @Override diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/IntDenseNdArrayTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/IntDenseNdArrayTest.java index 712f6f44333..8a6496976ec 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/IntDenseNdArrayTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/IntDenseNdArrayTest.java @@ -1,35 +1,37 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.dense; -import org.tensorflow.ndarray.Shape; -import org.tensorflow.ndarray.buffer.DataBuffer; -import org.tensorflow.ndarray.buffer.DataBuffers; import org.tensorflow.ndarray.IntNdArray; import org.tensorflow.ndarray.IntNdArrayTestBase; import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; public class IntDenseNdArrayTest extends IntNdArrayTestBase { - @Override protected IntNdArray allocate(Shape shape) { + @Override + protected IntNdArray allocate(Shape shape) { return NdArrays.ofInts(shape); } - @Override protected DataBuffer allocateBuffer(long size) { + @Override + protected DataBuffer allocateBuffer(long size) { return DataBuffers.ofInts(size); } } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/LongDenseNdArrayTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/LongDenseNdArrayTest.java index 346e3845080..a8affa58ef0 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/LongDenseNdArrayTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/LongDenseNdArrayTest.java @@ -1,35 +1,37 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.dense; -import org.tensorflow.ndarray.Shape; -import org.tensorflow.ndarray.buffer.DataBuffer; -import org.tensorflow.ndarray.buffer.DataBuffers; import org.tensorflow.ndarray.LongNdArray; import org.tensorflow.ndarray.LongNdArrayTestBase; import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; public class LongDenseNdArrayTest extends LongNdArrayTestBase { - @Override protected LongNdArray allocate(Shape shape) { + @Override + protected LongNdArray allocate(Shape shape) { return NdArrays.ofLongs(shape); } - @Override protected DataBuffer allocateBuffer(long size) { + @Override + protected DataBuffer allocateBuffer(long size) { return DataBuffers.ofLongs(size); } } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/ShortDenseNdArrayTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/ShortDenseNdArrayTest.java index 6f845c7c65d..0b41cb8a575 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/ShortDenseNdArrayTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/ShortDenseNdArrayTest.java @@ -1,35 +1,37 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.dense; -import org.tensorflow.ndarray.Shape; -import org.tensorflow.ndarray.buffer.DataBuffer; -import org.tensorflow.ndarray.buffer.DataBuffers; import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.Shape; import org.tensorflow.ndarray.ShortNdArray; import org.tensorflow.ndarray.ShortNdArrayTestBase; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; public class ShortDenseNdArrayTest extends ShortNdArrayTestBase { - @Override protected ShortNdArray allocate(Shape shape) { + @Override + protected ShortNdArray allocate(Shape shape) { return NdArrays.ofShorts(shape); } - @Override protected DataBuffer allocateBuffer(long size) { + @Override + protected DataBuffer allocateBuffer(long size) { return DataBuffers.ofShorts(size); } } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/StringDenseNdArrayTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/StringDenseNdArrayTest.java index 5afc1420ab2..76168b7cc1c 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/StringDenseNdArrayTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/dense/StringDenseNdArrayTest.java @@ -1,39 +1,42 @@ /* - Copyright 2019 The TensorFlow Authors. All Rights Reserved. +Copyright 2019 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. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ======================================================================= - */ +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +======================================================================= +*/ package org.tensorflow.ndarray.impl.dense; -import org.tensorflow.ndarray.Shape; -import org.tensorflow.ndarray.buffer.DataBuffer; -import org.tensorflow.ndarray.buffer.DataBuffers; import org.tensorflow.ndarray.NdArray; import org.tensorflow.ndarray.NdArrayTestBase; import org.tensorflow.ndarray.NdArrays; +import org.tensorflow.ndarray.Shape; +import org.tensorflow.ndarray.buffer.DataBuffer; +import org.tensorflow.ndarray.buffer.DataBuffers; public class StringDenseNdArrayTest extends NdArrayTestBase { - @Override protected NdArray allocate(Shape shape) { + @Override + protected NdArray allocate(Shape shape) { return NdArrays.ofObjects(String.class, shape); } - @Override protected DataBuffer allocateBuffer(long size) { + @Override + protected DataBuffer allocateBuffer(long size) { return DataBuffers.ofObjects(String.class, size); } - @Override protected String valueOf(Long val) { + @Override + protected String valueOf(Long val) { return val.toString(); } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/sequence/ElementSequenceTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/sequence/ElementSequenceTest.java index bad78404e9b..87ebd4da4be 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/sequence/ElementSequenceTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/sequence/ElementSequenceTest.java @@ -25,13 +25,13 @@ import java.util.Arrays; import java.util.List; import org.junit.jupiter.api.Test; +import org.tensorflow.ndarray.IntNdArray; +import org.tensorflow.ndarray.NdArraySequence; +import org.tensorflow.ndarray.NdArrays; import org.tensorflow.ndarray.Shape; import org.tensorflow.ndarray.buffer.DataBufferWindow; import org.tensorflow.ndarray.buffer.DataBuffers; import org.tensorflow.ndarray.buffer.IntDataBuffer; -import org.tensorflow.ndarray.IntNdArray; -import org.tensorflow.ndarray.NdArraySequence; -import org.tensorflow.ndarray.NdArrays; import org.tensorflow.ndarray.impl.AbstractNdArray; public class ElementSequenceTest { @@ -40,9 +40,9 @@ public class ElementSequenceTest { public void iterateVectorsWithIndex() { IntNdArray array = NdArrays.ofInts(Shape.of(2, 3, 2)); - NdArraySequence sequence = new SlicingElementSequence( - (AbstractNdArray)array, 1); - List coords = new ArrayList<>((int)array.shape().size()); + NdArraySequence sequence = + new SlicingElementSequence((AbstractNdArray) array, 1); + List coords = new ArrayList<>((int) array.shape().size()); sequence.forEachIndexed((c, e) -> coords.add(Arrays.copyOf(c, c.length))); assertEquals(6, coords.size()); @@ -58,9 +58,9 @@ public void iterateVectorsWithIndex() { public void iterateScalarsWithIndex() { IntNdArray array = NdArrays.ofInts(Shape.of(2, 3, 2)); - NdArraySequence cursor = new SlicingElementSequence( - (AbstractNdArray)array, 2); - List coords = new ArrayList<>((int)array.shape().size()); + NdArraySequence cursor = + new SlicingElementSequence((AbstractNdArray) array, 2); + List coords = new ArrayList<>((int) array.shape().size()); cursor.forEachIndexed((c, e) -> coords.add(Arrays.copyOf(c, c.length))); assertEquals(12, coords.size()); @@ -81,30 +81,34 @@ public void iterateScalarsWithIndex() { @Test public void slicingElementSequenceReturnsUniqueInstances() { IntNdArray array = NdArrays.ofInts(Shape.of(2, 3, 2)); - NdArraySequence sequence = new SlicingElementSequence( - (AbstractNdArray) array, 1); + NdArraySequence sequence = + new SlicingElementSequence((AbstractNdArray) array, 1); List elements = new ArrayList<>(); - sequence.forEach(e -> { - elements.forEach(tmp -> { - if (tmp == e) { - fail(); - } - }); - elements.add(e); - }); + sequence.forEach( + e -> { + elements.forEach( + tmp -> { + if (tmp == e) { + fail(); + } + }); + elements.add(e); + }); } @Test public void fastElementSequenceReturnsSameInstance() { IntNdArray array = NdArrays.ofInts(Shape.of(2, 3, 2)); IntNdArray element = array.get(0); - NdArraySequence sequence = new FastElementSequence( - (AbstractNdArray) array, 1, element, mockDataBufferWindow(2)); - sequence.forEach(e -> { - if (e != element) { - fail(); - } - }); + NdArraySequence sequence = + new FastElementSequence( + (AbstractNdArray) array, 1, element, mockDataBufferWindow(2)); + sequence.forEach( + e -> { + if (e != element) { + fail(); + } + }); } private DataBufferWindow mockDataBufferWindow(long size) { diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArrayTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArrayTest.java index ecd9e8520eb..32ea120e0e1 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArrayTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArrayTest.java @@ -1,5 +1,12 @@ package org.tensorflow.ndarray.impl.sparse; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; + +import java.util.concurrent.atomic.AtomicInteger; import org.junit.jupiter.api.Test; import org.tensorflow.ndarray.BooleanNdArray; import org.tensorflow.ndarray.LongNdArray; @@ -12,14 +19,6 @@ import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; import org.tensorflow.ndarray.index.Indices; -import java.util.concurrent.atomic.AtomicInteger; - -import static org.junit.jupiter.api.Assertions.assertArrayEquals; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertThrows; - class BooleanSparseNdArrayTest { long[][] indicesArray = {{0, 0}, {1, 2}}; boolean[] valuesArray = {true, true}; diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArrayTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArrayTest.java index efa05720e00..b0504659055 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArrayTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArrayTest.java @@ -1,5 +1,11 @@ package org.tensorflow.ndarray.impl.sparse; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; + +import java.util.concurrent.atomic.AtomicInteger; import org.junit.jupiter.api.Test; import org.tensorflow.ndarray.ByteNdArray; import org.tensorflow.ndarray.LongNdArray; @@ -12,13 +18,6 @@ import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; import org.tensorflow.ndarray.index.Indices; -import java.util.concurrent.atomic.AtomicInteger; - -import static org.junit.jupiter.api.Assertions.assertArrayEquals; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertThrows; - class ByteSparseNdArrayTest { long[][] indicesArray = {{0, 0}, {1, 2}}; byte[] valuesArray = {1, 16}; diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArrayTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArrayTest.java index f7ff65f1a04..e7209902d86 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArrayTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArrayTest.java @@ -1,5 +1,13 @@ package org.tensorflow.ndarray.impl.sparse; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; + +import java.nio.DoubleBuffer; +import java.util.Arrays; +import java.util.concurrent.atomic.AtomicInteger; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.tensorflow.ndarray.DoubleNdArray; @@ -14,15 +22,6 @@ import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; import org.tensorflow.ndarray.index.Indices; -import java.nio.DoubleBuffer; -import java.util.Arrays; -import java.util.concurrent.atomic.AtomicInteger; - -import static org.junit.jupiter.api.Assertions.assertArrayEquals; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertThrows; - class DoubleSparseNdArrayTest { long[][] indicesArray = {{0, 0}, {1, 2}}; double[] valuesArray = {1, 256}; @@ -308,10 +307,12 @@ public void testSlice() { public void testToString() { DoubleNdArray ndArray = StdArrays.ndCopyOf(dense2DArray); DoubleSparseNdArray instance = - DoubleSparseNdArray.create(DimensionalSpace.create(ndArray.shape())); + DoubleSparseNdArray.create(DimensionalSpace.create(ndArray.shape())); instance.fromDense(ndArray); - Assertions.assertEquals("DoubleSparseNdArray(defaultValue=0.0, numElements=2, shape=[3, 4])",instance.toString()); + Assertions.assertEquals( + "DoubleSparseNdArray(defaultValue=0.0, numElements=2, shape=[3, 4])", instance.toString()); DoubleSparseNdArray empty = DoubleSparseNdArray.create(DimensionalSpace.create(Shape.of(5))); - Assertions.assertEquals("DoubleSparseNdArray(defaultValue=0.0, numElements=0, shape=[5])",empty.toString()); + Assertions.assertEquals( + "DoubleSparseNdArray(defaultValue=0.0, numElements=0, shape=[5])", empty.toString()); } } diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArrayTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArrayTest.java index d948d1ec476..de5d3bbb634 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArrayTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArrayTest.java @@ -1,5 +1,12 @@ package org.tensorflow.ndarray.impl.sparse; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; + +import java.nio.FloatBuffer; +import java.util.concurrent.atomic.AtomicInteger; import org.junit.jupiter.api.Test; import org.tensorflow.ndarray.FloatNdArray; import org.tensorflow.ndarray.LongNdArray; @@ -13,14 +20,6 @@ import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; import org.tensorflow.ndarray.index.Indices; -import java.nio.FloatBuffer; -import java.util.concurrent.atomic.AtomicInteger; - -import static org.junit.jupiter.api.Assertions.assertArrayEquals; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertThrows; - class FloatSparseNdArrayTest { long[][] indicesArray = {{0, 0}, {1, 2}}; float[] valuesArray = {1, 2}; diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArrayTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArrayTest.java index b60b7db540f..669cd8080e5 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArrayTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArrayTest.java @@ -1,5 +1,13 @@ package org.tensorflow.ndarray.impl.sparse; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; + +import java.nio.IntBuffer; +import java.util.Arrays; +import java.util.concurrent.atomic.AtomicInteger; import org.junit.jupiter.api.Test; import org.tensorflow.ndarray.IntNdArray; import org.tensorflow.ndarray.LongNdArray; @@ -13,15 +21,6 @@ import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; import org.tensorflow.ndarray.index.Indices; -import java.nio.IntBuffer; -import java.util.Arrays; -import java.util.concurrent.atomic.AtomicInteger; - -import static org.junit.jupiter.api.Assertions.assertArrayEquals; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertThrows; - class IntSparseNdArrayTest { long[][] indicesArray = {{0, 0}, {1, 2}}; int[] valuesArray = {1, 2}; diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArrayTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArrayTest.java index 7f9a13682ea..93864683650 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArrayTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArrayTest.java @@ -1,5 +1,13 @@ package org.tensorflow.ndarray.impl.sparse; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; + +import java.nio.LongBuffer; +import java.util.Arrays; +import java.util.concurrent.atomic.AtomicInteger; import org.junit.jupiter.api.Test; import org.tensorflow.ndarray.LongNdArray; import org.tensorflow.ndarray.NdArrays; @@ -12,15 +20,6 @@ import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; import org.tensorflow.ndarray.index.Indices; -import java.nio.LongBuffer; -import java.util.Arrays; -import java.util.concurrent.atomic.AtomicInteger; - -import static org.junit.jupiter.api.Assertions.assertArrayEquals; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertThrows; - class LongSparseNdArrayTest { long[][] indicesArray = {{0, 0}, {1, 2}}; long[] valuesArray = {1, 2}; diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArrayTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArrayTest.java index 5f854130632..ae5b8ffef44 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArrayTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArrayTest.java @@ -1,5 +1,12 @@ package org.tensorflow.ndarray.impl.sparse; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; + +import java.nio.ShortBuffer; +import java.util.concurrent.atomic.AtomicInteger; import org.junit.jupiter.api.Test; import org.tensorflow.ndarray.LongNdArray; import org.tensorflow.ndarray.NdArrays; @@ -13,14 +20,6 @@ import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; import org.tensorflow.ndarray.index.Indices; -import java.nio.ShortBuffer; -import java.util.concurrent.atomic.AtomicInteger; - -import static org.junit.jupiter.api.Assertions.assertArrayEquals; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertThrows; - class ShortSparseNdArrayTest { long[][] indicesArray = {{0, 0}, {1, 2}}; short[] valuesArray = {1, 2}; diff --git a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/StringSparseNdArrayTest.java b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/StringSparseNdArrayTest.java index a93cd4508fe..32b83ef702f 100644 --- a/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/StringSparseNdArrayTest.java +++ b/tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/impl/sparse/StringSparseNdArrayTest.java @@ -14,6 +14,13 @@ =======================================================================*/ package org.tensorflow.ndarray.impl.sparse; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertThrows; + +import java.util.concurrent.atomic.AtomicInteger; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.tensorflow.ndarray.LongNdArray; @@ -26,14 +33,6 @@ import org.tensorflow.ndarray.impl.dimension.DimensionalSpace; import org.tensorflow.ndarray.index.Indices; -import java.util.concurrent.atomic.AtomicInteger; - -import static org.junit.jupiter.api.Assertions.assertArrayEquals; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertNull; -import static org.junit.jupiter.api.Assertions.assertThrows; - public class StringSparseNdArrayTest { long[][] indicesArray = {{0, 0}, {1, 2}}; String[] valuesArray = {"alpha", "omega"}; @@ -343,10 +342,15 @@ public void testNullDefault() { @Test public void testToString() { SparseNdArray> instance = - new SparseNdArray<>(String.class, indices, values, DimensionalSpace.create(shape)); - Assertions.assertEquals("SparseNdArray(type=String, defaultValue=, numElements=2, shape=[3, 4])",instance.toString()); - instance = new SparseNdArray<>( - String.class, indices, values, "a default", DimensionalSpace.create(shape)); - Assertions.assertEquals("SparseNdArray(type=String, defaultValue='a default', numElements=2, shape=[3, 4])",instance.toString()); + new SparseNdArray<>(String.class, indices, values, DimensionalSpace.create(shape)); + Assertions.assertEquals( + "SparseNdArray(type=String, defaultValue=, numElements=2, shape=[3, 4])", + instance.toString()); + instance = + new SparseNdArray<>( + String.class, indices, values, "a default", DimensionalSpace.create(shape)); + Assertions.assertEquals( + "SparseNdArray(type=String, defaultValue='a default', numElements=2, shape=[3, 4])", + instance.toString()); } } From da6c216498586c321433a16579a8014ab3b85bf9 Mon Sep 17 00:00:00 2001 From: Adam Pocock Date: Fri, 6 Mar 2026 15:14:12 -0500 Subject: [PATCH 52/60] Minimising the custom gradient fix. --- .../org/tensorflow/op/CustomGradient.java | 42 -------------- .../org/tensorflow/op/RawCustomGradient.java | 40 ------------- .../org/tensorflow/op/RawGradientAdapter.java | 44 -------------- .../tensorflow/op/TypedGradientAdapter.java | 58 ------------------- 4 files changed, 184 deletions(-) delete mode 100644 tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/RawGradientAdapter.java delete mode 100644 tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/TypedGradientAdapter.java diff --git a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/CustomGradient.java b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/CustomGradient.java index 4c3b80a6cad..5af78959b39 100644 --- a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/CustomGradient.java +++ b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/CustomGradient.java @@ -17,15 +17,9 @@ package org.tensorflow.op; import java.util.List; -import org.bytedeco.javacpp.PointerPointer; import org.tensorflow.Operand; import org.tensorflow.Output; import org.tensorflow.TensorFlow; -import org.tensorflow.internal.c_api.TFJ_GradFuncAdapter; -import org.tensorflow.internal.c_api.TFJ_GraphId; -import org.tensorflow.internal.c_api.TFJ_Scope; -import org.tensorflow.internal.c_api.TF_Operation; -import org.tensorflow.internal.c_api.TF_Output; /** * A custom gradient for ops of type {@link T}. Should be registered using {@link @@ -53,40 +47,4 @@ public interface CustomGradient { * @return the gradients of the op's inputs. */ List> call(Ops tf, T op, List> gradInputs); - - /** - * Create an adapter for the custom gradient so that it can be used by native code. - * - *

You should not be calling this yourself, use {@link TensorFlow#registerCustomGradient(Class, - * CustomGradient)}. - */ - static > TFJ_GradFuncAdapter adapter( - CustomGradient gradient, Class opClass) { - - final TypedGradientAdapter impl = new TypedGradientAdapter(gradient, opClass); - - // IMPORTANT: - // Return a *direct* TFJ_GradFuncAdapter subclass, so JavaCPP reliably materializes a function - // pointer thunk for the native side. Some call paths may pass NULL if we return a deeper - // subclass. - return new TFJ_GradFuncAdapter() { - @Override - public int call( - TFJ_GraphId nativeGraphId, - TFJ_Scope nativeScope, - TF_Operation nativeOperation, - TF_Output nativeGradInputs, - int nativeGradInputsLength, - PointerPointer nativeGradOutputsPtr) { - - return impl.call( - nativeGraphId, - nativeScope, - nativeOperation, - nativeGradInputs, - nativeGradInputsLength, - nativeGradOutputsPtr); - } - }; - } } diff --git a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/RawCustomGradient.java b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/RawCustomGradient.java index 723d45d58ad..ad348600e74 100644 --- a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/RawCustomGradient.java +++ b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/RawCustomGradient.java @@ -17,16 +17,10 @@ package org.tensorflow.op; import java.util.List; -import org.bytedeco.javacpp.PointerPointer; import org.tensorflow.GraphOperation; import org.tensorflow.Operand; import org.tensorflow.Output; import org.tensorflow.TensorFlow; -import org.tensorflow.internal.c_api.TFJ_GradFuncAdapter; -import org.tensorflow.internal.c_api.TFJ_GraphId; -import org.tensorflow.internal.c_api.TFJ_Scope; -import org.tensorflow.internal.c_api.TF_Operation; -import org.tensorflow.internal.c_api.TF_Output; /** * A custom gradient for an op of unspecified type. Should be registered using {@link @@ -51,38 +45,4 @@ public interface RawCustomGradient { * @return the gradients of the op's inputs. */ List> call(Ops tf, GraphOperation op, List> gradInputs); - - /** - * Create an adapter for the custom gradient so that it can be used by native code. - * - *

You should not be calling this yourself, use {@link - * TensorFlow#registerCustomGradient(String, RawCustomGradient)}. - */ - static TFJ_GradFuncAdapter adapter(RawCustomGradient gradient) { - final RawGradientAdapter impl = new RawGradientAdapter(gradient); - - // IMPORTANT: - // Return a *direct* TFJ_GradFuncAdapter subclass, so JavaCPP reliably materializes a function - // pointer thunk for the native side. Some call paths may pass NULL if we return a deeper - // subclass. - return new TFJ_GradFuncAdapter() { - @Override - public int call( - TFJ_GraphId nativeGraphId, - TFJ_Scope nativeScope, - TF_Operation nativeOperation, - TF_Output nativeGradInputs, - int nativeGradInputsLength, - PointerPointer nativeGradOutputsPtr) { - - return impl.call( - nativeGraphId, - nativeScope, - nativeOperation, - nativeGradInputs, - nativeGradInputsLength, - nativeGradOutputsPtr); - } - }; - } } diff --git a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/RawGradientAdapter.java b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/RawGradientAdapter.java deleted file mode 100644 index 2324fb75f32..00000000000 --- a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/RawGradientAdapter.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - Copyright 2024 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. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -======================================================================= - -*/ -package org.tensorflow.op; - -import java.util.List; -import org.tensorflow.AbstractGradientAdapter; -import org.tensorflow.Graph; -import org.tensorflow.GraphOperation; -import org.tensorflow.Operand; -import org.tensorflow.Output; -import org.tensorflow.internal.c_api.TFJ_Scope; - -/** A native adapter for {@link RawCustomGradient}. */ -final class RawGradientAdapter extends AbstractGradientAdapter { - - private final RawCustomGradient gradient; - - RawGradientAdapter(RawCustomGradient gradient) { - super(); - this.gradient = gradient; - } - - @Override - protected List> apply( - Graph graph, TFJ_Scope scope, GraphOperation operation, List> gradInputs) { - Scope nativeScope = new NativeScope(scope, graph, null).withSubScope(operation.name()); - return gradient.call(new Ops(nativeScope), operation, gradInputs); - } -} diff --git a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/TypedGradientAdapter.java b/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/TypedGradientAdapter.java deleted file mode 100644 index 33d71679fae..00000000000 --- a/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/TypedGradientAdapter.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - Copyright 2021 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. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -======================================================================= - -*/ -package org.tensorflow.op; - -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; -import java.util.List; -import org.tensorflow.AbstractGradientAdapter; -import org.tensorflow.Graph; -import org.tensorflow.GraphOperation; -import org.tensorflow.Operand; -import org.tensorflow.Output; -import org.tensorflow.internal.c_api.TFJ_Scope; - -/** A native adapter for {@link CustomGradient}. */ -final class TypedGradientAdapter> extends AbstractGradientAdapter { - - private final CustomGradient gradient; - private final Class opInputClass; - private final Constructor ctor; - - @SuppressWarnings("unchecked") - TypedGradientAdapter(CustomGradient gradient, Class opInputClass) { - super(); - this.gradient = gradient; - this.opInputClass = opInputClass; - this.ctor = (Constructor) this.opInputClass.getDeclaredConstructors()[0]; - } - - @Override - protected List> apply( - Graph graph, TFJ_Scope scope, GraphOperation operation, List> gradInputs) { - try { - T rawOp = ctor.newInstance(operation); - Scope nativeScope = - new NativeScope(scope, graph, null).withSubScope(rawOp.getOutputs().op().name()); - return gradient.call(new Ops(nativeScope), rawOp, gradInputs); - - } catch (InvocationTargetException | InstantiationException | IllegalAccessException e) { - throw new RuntimeException("Could not instantiate Op class " + opInputClass, e); - } - } -} From 6c63e4240160699d2c4bdff9dcc2e55ff4216c7e Mon Sep 17 00:00:00 2001 From: Karl Lessard Date: Fri, 20 Mar 2026 15:32:33 -0400 Subject: [PATCH 53/60] Publish snapshots to Maven Central (#639) --- .github/workflows/build.yml | 24 +++++++----------------- pom.xml | 28 ++++++++++------------------ 2 files changed, 17 insertions(+), 35 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e43d793064e..d08a9999c60 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,16 +54,6 @@ jobs: echo "::set-output name=stagingRepositoryId::$STAGING_REPOSITORY_ID" - name: Checkout repository uses: actions/checkout@v6 - - name: Extract distribution repository URL - id: repository - run: | - if [[ "${{ env.DEPLOY_RELEASE }}" = "true" ]]; then - export REPOSITORY_URL=`mvn exec:exec -q -N -Dexec.executable='echo' -Dexec.args="\\${project.distributionManagement.repository.url}" -DstagingRepositoryId=${{ steps.staging.outputs.stagingRepositoryId }}` - else - export REPOSITORY_URL=`mvn exec:exec -q -N -Dexec.executable='echo' -Dexec.args="\\${project.distributionManagement.snapshotRepository.url}"` - fi - echo "Repository URL: $REPOSITORY_URL" - echo "::set-output name=repositoryUrl::$REPOSITORY_URL" linux-arm64: runs-on: ubuntu-2204-arm64-2c needs: prepare @@ -87,11 +77,11 @@ jobs: run: | gcc --version mvn -version - echo "ossrh${{ secrets.CI_DEPLOY_USERNAME }}${{ secrets.CI_DEPLOY_PASSWORD }}" > $HOME/.m2/settings.xml + echo "central${{ secrets.CI_DEPLOY_USERNAME }}${{ secrets.CI_DEPLOY_PASSWORD }}" > $HOME/.m2/settings.xml mvn clean install -pl '!tensorflow-framework' -B -U -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }} - name: Deploy native artifact if: env.DEPLOY_RELEASE == 'true' || env.DEPLOY_SNAPSHOT == 'true' - run: mvn -f tensorflow-core/tensorflow-core-native/pom.xml deploy:deploy-file@native-only -B -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }} -Durl=${{ needs.prepare.outputs.repositoryUrl }} + run: mvn -f tensorflow-core/tensorflow-core-native/pom.xml deploy:deploy-file@native-only -B -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }} linux-x86_64: runs-on: ubuntu-22.04 needs: prepare @@ -110,11 +100,11 @@ jobs: run: | gcc --version mvn -version - echo "ossrh${{ secrets.CI_DEPLOY_USERNAME }}${{ secrets.CI_DEPLOY_PASSWORD }}" > $HOME/.m2/settings.xml + echo "central${{ secrets.CI_DEPLOY_USERNAME }}${{ secrets.CI_DEPLOY_PASSWORD }}" > $HOME/.m2/settings.xml mvn clean install -pl '!tensorflow-framework' -B -U -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }} - name: Deploy native artifact if: env.DEPLOY_RELEASE == 'true' || env.DEPLOY_SNAPSHOT == 'true' - run: mvn -f tensorflow-core/tensorflow-core-native/pom.xml deploy:deploy-file@native-only -B -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }} -Durl=${{ needs.prepare.outputs.repositoryUrl }} + run: mvn -f tensorflow-core/tensorflow-core-native/pom.xml deploy:deploy-file@native-only -B -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }} macosx-arm64: runs-on: macos-14 needs: prepare @@ -134,11 +124,11 @@ jobs: run: | clang --version mvn -version - echo "ossrh${{ secrets.CI_DEPLOY_USERNAME }}${{ secrets.CI_DEPLOY_PASSWORD }}" > $HOME/.m2/settings.xml + echo "central${{ secrets.CI_DEPLOY_USERNAME }}${{ secrets.CI_DEPLOY_PASSWORD }}" > $HOME/.m2/settings.xml mvn clean install -pl '!tensorflow-framework' -B -U -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }} - name: Deploy native artifact if: env.DEPLOY_RELEASE == 'true' || env.DEPLOY_SNAPSHOT == 'true' - run: mvn -f tensorflow-core/tensorflow-core-native/pom.xml deploy:deploy-file@native-only -B -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }} -Durl=${{ needs.prepare.outputs.repositoryUrl }} + run: mvn -f tensorflow-core/tensorflow-core-native/pom.xml deploy:deploy-file@native-only -B -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }} deploy: if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/staging') }} # DEPLOY_SNAPSHOT (releases should be signed and deployed manually from local machine) needs: [linux-x86_64, macosx-arm64, linux-arm64] @@ -158,5 +148,5 @@ jobs: mvn clean install -B -U -e -Pdeploying - name: Deploy snapshot artifacts run: | - echo "ossrh${{ secrets.CI_DEPLOY_USERNAME }}${{ secrets.CI_DEPLOY_PASSWORD }}" > $HOME/.m2/settings.xml + echo "central${{ secrets.CI_DEPLOY_USERNAME }}${{ secrets.CI_DEPLOY_PASSWORD }}" > $HOME/.m2/settings.xml mvn deploy -Pdeploying -B -e -Dmaven.test.skip=true diff --git a/pom.xml b/pom.xml index 7fa0865af0a..f61e4ce182e 100644 --- a/pom.xml +++ b/pom.xml @@ -81,24 +81,6 @@ - - - - ossrh - https://oss.sonatype.org/content/repositories/snapshots - - - ossrh - - https://oss.sonatype.org/service/local/staging/deployByRepositoryId/${stagingRepositoryId}/ - - - - @@ -512,6 +494,16 @@ + + + org.sonatype.central + central-publishing-maven-plugin + 0.9.0 + true + + central + + org.apache.maven.plugins From 3e14cd3bd3b21914805d32d98e8c1d3e28d4f55a Mon Sep 17 00:00:00 2001 From: Karl Lessard Date: Fri, 20 Mar 2026 16:01:47 -0400 Subject: [PATCH 54/60] Rollback to deployment management (#640) --- .github/workflows/build.yml | 14 ++++++++++++-- pom.xml | 28 ++++++++++++++++++---------- 2 files changed, 30 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d08a9999c60..34766138373 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,6 +54,16 @@ jobs: echo "::set-output name=stagingRepositoryId::$STAGING_REPOSITORY_ID" - name: Checkout repository uses: actions/checkout@v6 + - name: Extract distribution repository URL + id: repository + run: | + if [[ "${{ env.DEPLOY_RELEASE }}" = "true" ]]; then + export REPOSITORY_URL=`mvn exec:exec -q -N -Dexec.executable='echo' -Dexec.args="\\${project.distributionManagement.repository.url}" -DstagingRepositoryId=${{ steps.staging.outputs.stagingRepositoryId }}` + else + export REPOSITORY_URL=`mvn exec:exec -q -N -Dexec.executable='echo' -Dexec.args="\\${project.distributionManagement.snapshotRepository.url}"` + fi + echo "Repository URL: $REPOSITORY_URL" + echo "::set-output name=repositoryUrl::$REPOSITORY_URL" linux-arm64: runs-on: ubuntu-2204-arm64-2c needs: prepare @@ -81,7 +91,7 @@ jobs: mvn clean install -pl '!tensorflow-framework' -B -U -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }} - name: Deploy native artifact if: env.DEPLOY_RELEASE == 'true' || env.DEPLOY_SNAPSHOT == 'true' - run: mvn -f tensorflow-core/tensorflow-core-native/pom.xml deploy:deploy-file@native-only -B -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }} + run: mvn -f tensorflow-core/tensorflow-core-native/pom.xml deploy:deploy-file@native-only -B -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }} -Durl=${{ needs.prepare.outputs.repositoryUrl }} linux-x86_64: runs-on: ubuntu-22.04 needs: prepare @@ -104,7 +114,7 @@ jobs: mvn clean install -pl '!tensorflow-framework' -B -U -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }} - name: Deploy native artifact if: env.DEPLOY_RELEASE == 'true' || env.DEPLOY_SNAPSHOT == 'true' - run: mvn -f tensorflow-core/tensorflow-core-native/pom.xml deploy:deploy-file@native-only -B -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }} + run: mvn -f tensorflow-core/tensorflow-core-native/pom.xml deploy:deploy-file@native-only -B -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }} -Durl=${{ needs.prepare.outputs.repositoryUrl }} macosx-arm64: runs-on: macos-14 needs: prepare diff --git a/pom.xml b/pom.xml index f61e4ce182e..cd986f316a8 100644 --- a/pom.xml +++ b/pom.xml @@ -81,6 +81,24 @@ + + + + central + https://central.sonatype.com/repository/maven-snapshots + + + ossrh + + https://oss.sonatype.org/service/local/staging/deployByRepositoryId/${stagingRepositoryId}/ + + + + @@ -494,16 +512,6 @@ - - - org.sonatype.central - central-publishing-maven-plugin - 0.9.0 - true - - central - - org.apache.maven.plugins From dfc55ddd5c5e67637e85eeb5cf6049c3654e7984 Mon Sep 17 00:00:00 2001 From: Karl Lessard Date: Fri, 20 Mar 2026 16:09:57 -0400 Subject: [PATCH 55/60] Rollback to deployment management fix (#641) --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 34766138373..1b464b21c3c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -138,7 +138,7 @@ jobs: mvn clean install -pl '!tensorflow-framework' -B -U -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }} - name: Deploy native artifact if: env.DEPLOY_RELEASE == 'true' || env.DEPLOY_SNAPSHOT == 'true' - run: mvn -f tensorflow-core/tensorflow-core-native/pom.xml deploy:deploy-file@native-only -B -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }} + run: mvn -f tensorflow-core/tensorflow-core-native/pom.xml deploy:deploy-file@native-only -B -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }} -Durl=${{ needs.prepare.outputs.repositoryUrl }} deploy: if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/staging') }} # DEPLOY_SNAPSHOT (releases should be signed and deployed manually from local machine) needs: [linux-x86_64, macosx-arm64, linux-arm64] From 9266bdf501c877b61f0b37c3d988dfa98f52a6ca Mon Sep 17 00:00:00 2001 From: karllessard Date: Fri, 20 Mar 2026 16:34:16 -0400 Subject: [PATCH 56/60] Deploy native files to central repo --- tensorflow-core/tensorflow-core-native/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensorflow-core/tensorflow-core-native/pom.xml b/tensorflow-core/tensorflow-core-native/pom.xml index ce6041d0427..2e9102b450b 100644 --- a/tensorflow-core/tensorflow-core-native/pom.xml +++ b/tensorflow-core/tensorflow-core-native/pom.xml @@ -582,7 +582,7 @@ ${project.build.directory}/${project.artifactId}-${project.version}-${native.classifier}.jar - ossrh + central ${project.groupId} ${project.artifactId} ${native.classifier} From ecc113a286b16c415444de0a12006575a92bcac5 Mon Sep 17 00:00:00 2001 From: Rohan Pawar <142420754+Rohan13253@users.noreply.github.com> Date: Fri, 24 Apr 2026 23:46:15 +0530 Subject: [PATCH 57/60] test(ops): add JUnit tests for unary math ops Square and Abs (#642) Adds testUnaryMathOps() to GeneratedOperationsTest to verify that the Square and Abs operations correctly execute through the Java API and produce expected scalar TFloat32 results via the native TF engine. --- .../op/core/GeneratedOperationsTest.java | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/op/core/GeneratedOperationsTest.java b/tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/op/core/GeneratedOperationsTest.java index 0eca95aab59..3cf6833c458 100644 --- a/tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/op/core/GeneratedOperationsTest.java +++ b/tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/op/core/GeneratedOperationsTest.java @@ -25,6 +25,7 @@ import org.tensorflow.ndarray.Shape; import org.tensorflow.op.Op; import org.tensorflow.op.Ops; +import org.tensorflow.types.TFloat32; import org.tensorflow.types.TInt32; public final class GeneratedOperationsTest { @@ -80,4 +81,30 @@ public void testControlDependencies() { } } } + + /** + * Test for basic unary math operations. Ensures that the JNI bridge correctly handles Square and + * Absolute value functions. + */ + @Test + public void testUnaryMathOps() { + try (Graph g = new Graph(); + Session sess = new Session(g)) { + Ops ops = Ops.create(g); + + Operand square = ops.math.square(ops.constant(4.0f)); + @SuppressWarnings("unchecked") + TFloat32 squareRaw = (TFloat32) sess.runner().fetch(square).run().get(0); + try (TFloat32 result = squareRaw) { + assertEquals(16.0f, result.getFloat(), 0.0f); + } + + Operand abs = ops.math.abs(ops.constant(-5.5f)); + @SuppressWarnings("unchecked") + TFloat32 absRaw = (TFloat32) sess.runner().fetch(abs).run().get(0); + try (TFloat32 result = absRaw) { + assertEquals(5.5f, result.getFloat(), 0.0f); + } + } + } } From 82373b893db875a7bdf2c8572f15d6e9e57368a1 Mon Sep 17 00:00:00 2001 From: Adam Pocock Date: Fri, 24 Apr 2026 14:39:52 -0400 Subject: [PATCH 58/60] 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. --- README.md | 2 +- tensorflow-core/pom.xml | 2 +- .../scripts/test_download.sh | 6 +- .../tensorflow/op/DataExperimentalOps.java | 1 - .../org/tensorflow/op/DataOps.java | 1 - .../org/tensorflow/op/ImageOps.java | 16 +- .../org/tensorflow/op/MathOps.java | 12 +- .../annotations/org/tensorflow/op/NnOps.java | 10 +- .../annotations/org/tensorflow/op/Ops.java | 8 +- .../org/tensorflow/op/QuantizationOps.java | 6 +- .../org/tensorflow/op/SignalOps.java | 20 +- .../tensorflow/op/core/TensorListGetItem.java | 29 +- .../op/data/StatsAggregatorHandle.java | 9 +- .../tensorflow/op/data/ThreadPoolHandle.java | 14 +- .../data/experimental/ThreadPoolHandle.java | 14 +- .../org/tensorflow/op/dtypes/AsString.java | 6 + .../org/tensorflow/op/image/DecodeImage.java | 20 +- .../tensorflow/op/image/ExtractGlimpse.java | 3 + .../java/org/tensorflow/op/io/DecodeCsv.java | 20 +- .../org/tensorflow/op/math/ComplexAbs.java | 6 +- .../org/tensorflow/op/math/DenseBincount.java | 24 +- .../gen/java/org/tensorflow/op/math/Imag.java | 6 +- .../tensorflow/op/nn/IsotonicRegression.java | 20 +- .../tensorflow/op/quantization/Quantize.java | 6 +- .../QuantizeAndDequantizeV4Grad.java | 12 +- .../java/org/tensorflow/op/signal/Rfft.java | 10 +- .../java/org/tensorflow/op/signal/Rfft2d.java | 10 +- .../java/org/tensorflow/op/signal/Rfft3d.java | 10 +- .../java/org/tensorflow/op/signal/RfftNd.java | 10 +- .../java/org/tensorflow/TensorFlowTest.java | 2 + .../tensorflow-core-native/.bazelversion | 2 +- tensorflow-core/tensorflow-core-native/BUILD | 2 +- .../tensorflow-core-native/WORKSPACE | 107 +- .../scripts/bazel_generate.sh | 5 +- .../scripts/dist_download.sh | 15 +- .../internal/c_api/TF_TString_View.java | 1 + .../internal/c_api/TStringOwnerCApi.java | 33 + .../internal/c_api/global/tensorflow.java | 27 +- .../internal/c_api/tstring_owner_ref_t.java | 22 + .../internal/c_api/tstring_owner_unref_t.java | 19 + .../proto/AllocationDescription.java | 7 +- .../proto/AllocationDescriptionOrBuilder.java | 3 +- .../proto/AllocationDescriptionProtos.java | 7 +- .../tensorflow/proto/AllocationRecord.java | 7 +- .../proto/AllocationRecordOrBuilder.java | 3 +- .../tensorflow/proto/AllocatorMemoryUsed.java | 19 +- .../proto/AllocatorMemoryUsedOrBuilder.java | 3 +- .../gen/java/org/tensorflow/proto/ApiDef.java | 85 +- .../org/tensorflow/proto/ApiDefOrBuilder.java | 3 +- .../org/tensorflow/proto/ApiDefProtos.java | 7 +- .../java/org/tensorflow/proto/ApiDefs.java | 19 +- .../tensorflow/proto/ApiDefsOrBuilder.java | 3 +- .../org/tensorflow/proto/AssetFileDef.java | 15 +- .../proto/AssetFileDefOrBuilder.java | 3 +- .../java/org/tensorflow/proto/AttrValue.java | 122 ++- .../tensorflow/proto/AttrValueOrBuilder.java | 3 +- .../org/tensorflow/proto/AttrValueProtos.java | 7 +- .../tensorflow/proto/AutoParallelOptions.java | 7 +- .../proto/AutoParallelOptionsOrBuilder.java | 3 +- .../tensorflow/proto/AvailableDeviceInfo.java | 7 +- .../proto/AvailableDeviceInfoOrBuilder.java | 3 +- .../org/tensorflow/proto/BatchingOptions.java | 7 +- .../proto/BatchingOptionsOrBuilder.java | 3 +- .../tensorflow/proto/BenchmarkEntries.java | 19 +- .../proto/BenchmarkEntriesOrBuilder.java | 3 +- .../org/tensorflow/proto/BenchmarkEntry.java | 25 +- .../proto/BenchmarkEntryOrBuilder.java | 3 +- .../org/tensorflow/proto/BfcMemoryMap.java | 79 +- .../tensorflow/proto/BuildConfiguration.java | 7 +- .../proto/BuildConfigurationOrBuilder.java | 3 +- .../tensorflow/proto/BundleEntryProto.java | 33 +- .../proto/BundleEntryProtoOrBuilder.java | 3 +- .../tensorflow/proto/BundleHeaderProto.java | 25 +- .../proto/BundleHeaderProtoOrBuilder.java | 3 +- .../java/org/tensorflow/proto/BytesList.java | 7 +- .../tensorflow/proto/BytesListOrBuilder.java | 3 +- .../java/org/tensorflow/proto/CPUInfo.java | 9 +- .../tensorflow/proto/CPUInfoOrBuilder.java | 3 +- .../org/tensorflow/proto/CallableOptions.java | 29 +- .../proto/CallableOptionsOrBuilder.java | 3 +- .../java/org/tensorflow/proto/ClusterDef.java | 19 +- .../tensorflow/proto/ClusterDefOrBuilder.java | 3 +- .../proto/ClusterDeviceFilters.java | 19 +- .../proto/ClusterDeviceFiltersOrBuilder.java | 3 +- .../org/tensorflow/proto/ClusterProtos.java | 7 +- .../org/tensorflow/proto/CodeLocation.java | 7 +- .../proto/CodeLocationOrBuilder.java | 3 +- .../org/tensorflow/proto/CollectionDef.java | 69 +- .../proto/CollectionDefOrBuilder.java | 3 +- .../java/org/tensorflow/proto/CommitId.java | 7 +- .../tensorflow/proto/CommitIdOrBuilder.java | 3 +- .../proto/CompositeTensorVariant.java | 19 +- .../org/tensorflow/proto/CondContextDef.java | 29 +- .../proto/CondContextDefOrBuilder.java | 3 +- .../org/tensorflow/proto/ConfigProto.java | 405 +++++++- .../proto/ConfigProtoOrBuilder.java | 3 +- .../org/tensorflow/proto/ConfigProtos.java | 121 +-- .../proto/ControlFlowContextDef.java | 19 +- .../proto/ControlFlowContextDefOrBuilder.java | 3 +- .../tensorflow/proto/ControlFlowProtos.java | 7 +- .../tensorflow/proto/CoordinationConfig.java | 27 +- .../org/tensorflow/proto/CostGraphDef.java | 85 +- .../proto/CostGraphDefOrBuilder.java | 3 +- .../org/tensorflow/proto/CostGraphProtos.java | 7 +- .../java/org/tensorflow/proto/DataClass.java | 9 +- .../java/org/tensorflow/proto/DataType.java | 43 +- .../java/org/tensorflow/proto/DebugEvent.java | 57 +- .../tensorflow/proto/DebugEventOrBuilder.java | 3 +- .../tensorflow/proto/DebugEventProtos.java | 7 +- .../org/tensorflow/proto/DebugMetadata.java | 7 +- .../proto/DebugMetadataOrBuilder.java | 3 +- .../org/tensorflow/proto/DebugOptions.java | 19 +- .../proto/DebugOptionsOrBuilder.java | 3 +- .../org/tensorflow/proto/DebugProtos.java | 7 +- .../tensorflow/proto/DebugTensorWatch.java | 7 +- .../proto/DebugTensorWatchOrBuilder.java | 3 +- .../org/tensorflow/proto/DebuggedDevice.java | 7 +- .../proto/DebuggedDeviceOrBuilder.java | 3 +- .../org/tensorflow/proto/DebuggedGraph.java | 11 +- .../proto/DebuggedGraphOrBuilder.java | 3 +- .../tensorflow/proto/DebuggedSourceFile.java | 7 +- .../proto/DebuggedSourceFileOrBuilder.java | 3 +- .../tensorflow/proto/DebuggedSourceFiles.java | 19 +- .../proto/DebuggedSourceFilesOrBuilder.java | 3 +- .../tensorflow/proto/DeviceAttributes.java | 15 +- .../proto/DeviceAttributesOrBuilder.java | 3 +- .../proto/DeviceAttributesProtos.java | 7 +- .../tensorflow/proto/DeviceFiltersProtos.java | 7 +- .../org/tensorflow/proto/DeviceLocality.java | 15 +- .../proto/DeviceLocalityOrBuilder.java | 3 +- .../proto/DevicePropertiesProtos.java | 23 +- .../org/tensorflow/proto/DeviceStepStats.java | 19 +- .../proto/DeviceStepStatsOrBuilder.java | 3 +- .../java/org/tensorflow/proto/EntryValue.java | 7 +- .../tensorflow/proto/EntryValueOrBuilder.java | 3 +- .../java/org/tensorflow/proto/ErrorCodes.java | 7 +- .../gen/java/org/tensorflow/proto/Event.java | 41 +- .../org/tensorflow/proto/EventOrBuilder.java | 3 +- .../org/tensorflow/proto/EventProtos.java | 7 +- .../java/org/tensorflow/proto/Example.java | 15 +- .../tensorflow/proto/ExampleOrBuilder.java | 3 +- .../proto/ExampleParserConfiguration.java | 7 +- .../ExampleParserConfigurationOrBuilder.java | 3 +- .../ExampleParserConfigurationProtos.java | 7 +- .../org/tensorflow/proto/ExampleProtos.java | 7 +- .../java/org/tensorflow/proto/Execution.java | 33 +- .../tensorflow/proto/ExecutionOrBuilder.java | 3 +- .../java/org/tensorflow/proto/Feature.java | 25 +- .../proto/FeatureConfiguration.java | 19 +- .../proto/FeatureConfigurationOrBuilder.java | 3 +- .../org/tensorflow/proto/FeatureList.java | 19 +- .../proto/FeatureListOrBuilder.java | 3 +- .../org/tensorflow/proto/FeatureLists.java | 7 +- .../proto/FeatureListsOrBuilder.java | 3 +- .../tensorflow/proto/FeatureOrBuilder.java | 3 +- .../org/tensorflow/proto/FeatureProtos.java | 7 +- .../java/org/tensorflow/proto/Features.java | 7 +- .../tensorflow/proto/FeaturesOrBuilder.java | 3 +- .../org/tensorflow/proto/FingerprintDef.java | 15 +- .../proto/FingerprintDefOrBuilder.java | 3 +- .../tensorflow/proto/FingerprintProtos.java | 7 +- .../proto/FixedLenFeatureProto.java | 27 +- .../proto/FixedLenFeatureProtoOrBuilder.java | 3 +- .../java/org/tensorflow/proto/FloatList.java | 7 +- .../tensorflow/proto/FloatListOrBuilder.java | 3 +- .../org/tensorflow/proto/FullTypeDef.java | 23 +- .../proto/FullTypeDefOrBuilder.java | 3 +- .../java/org/tensorflow/proto/FullTypeId.java | 9 +- .../org/tensorflow/proto/FullTypeProtos.java | 7 +- .../org/tensorflow/proto/FunctionDef.java | 33 +- .../tensorflow/proto/FunctionDefLibrary.java | 43 +- .../proto/FunctionDefLibraryOrBuilder.java | 3 +- .../proto/FunctionDefOrBuilder.java | 3 +- .../org/tensorflow/proto/FunctionProtos.java | 7 +- .../java/org/tensorflow/proto/GPUInfo.java | 7 +- .../tensorflow/proto/GPUInfoOrBuilder.java | 3 +- .../java/org/tensorflow/proto/GPUOptions.java | 55 +- .../tensorflow/proto/GPUOptionsOrBuilder.java | 3 +- .../org/tensorflow/proto/GradientDef.java | 7 +- .../proto/GradientDefOrBuilder.java | 3 +- .../org/tensorflow/proto/GraphDebugInfo.java | 27 +- .../proto/GraphDebugInfoOrBuilder.java | 3 +- .../proto/GraphDebugInfoProtos.java | 7 +- .../java/org/tensorflow/proto/GraphDef.java | 45 +- .../tensorflow/proto/GraphDefOrBuilder.java | 3 +- .../tensorflow/proto/GraphExecutionTrace.java | 19 +- .../proto/GraphExecutionTraceOrBuilder.java | 3 +- .../org/tensorflow/proto/GraphOpCreation.java | 15 +- .../proto/GraphOpCreationOrBuilder.java | 3 +- .../org/tensorflow/proto/GraphOptions.java | 23 +- .../proto/GraphOptionsOrBuilder.java | 3 +- .../org/tensorflow/proto/GraphProtos.java | 7 +- .../proto/GraphTransferConstNodeInfo.java | 13 +- .../GraphTransferConstNodeInfoOrBuilder.java | 3 +- .../GraphTransferGraphInputNodeInfo.java | 11 +- ...phTransferGraphInputNodeInfoOrBuilder.java | 3 +- .../GraphTransferGraphOutputNodeInfo.java | 11 +- ...hTransferGraphOutputNodeInfoOrBuilder.java | 3 +- .../tensorflow/proto/GraphTransferInfo.java | 89 +- .../proto/GraphTransferInfoOrBuilder.java | 3 +- .../proto/GraphTransferInfoProto.java | 7 +- .../proto/GraphTransferNodeInfo.java | 7 +- .../proto/GraphTransferNodeInfoOrBuilder.java | 3 +- .../proto/GraphTransferNodeInput.java | 7 +- .../proto/GraphTransferNodeInputInfo.java | 19 +- .../GraphTransferNodeInputInfoOrBuilder.java | 3 +- .../GraphTransferNodeInputOrBuilder.java | 3 +- .../proto/GraphTransferNodeOutputInfo.java | 7 +- .../GraphTransferNodeOutputInfoOrBuilder.java | 3 +- .../java/org/tensorflow/proto/Histogram.java | 7 +- .../org/tensorflow/proto/HistogramProto.java | 17 +- .../proto/HistogramProtoOrBuilder.java | 3 +- .../java/org/tensorflow/proto/Int64List.java | 7 +- .../tensorflow/proto/Int64ListOrBuilder.java | 3 +- .../tensorflow/proto/InterconnectLink.java | 7 +- .../proto/InterconnectLinkOrBuilder.java | 3 +- .../gen/java/org/tensorflow/proto/JobDef.java | 7 +- .../org/tensorflow/proto/JobDefOrBuilder.java | 3 +- .../tensorflow/proto/JobDeviceFilters.java | 7 +- .../proto/JobDeviceFiltersOrBuilder.java | 3 +- .../java/org/tensorflow/proto/KernelDef.java | 31 +- .../tensorflow/proto/KernelDefOrBuilder.java | 3 +- .../org/tensorflow/proto/KernelDefProtos.java | 7 +- .../java/org/tensorflow/proto/KernelList.java | 19 +- .../tensorflow/proto/KernelListOrBuilder.java | 3 +- .../java/org/tensorflow/proto/LocalLinks.java | 19 +- .../tensorflow/proto/LocalLinksOrBuilder.java | 3 +- .../org/tensorflow/proto/LogMemoryProtos.java | 7 +- .../java/org/tensorflow/proto/LogMessage.java | 17 +- .../tensorflow/proto/LogMessageOrBuilder.java | 3 +- .../proto/MachineConfiguration.java | 59 +- .../proto/MachineConfigurationOrBuilder.java | 3 +- .../tensorflow/proto/MemmappedFileSystem.java | 27 +- .../java/org/tensorflow/proto/MemoryInfo.java | 7 +- .../tensorflow/proto/MemoryInfoOrBuilder.java | 3 +- .../proto/MemoryLogRawAllocation.java | 7 +- .../MemoryLogRawAllocationOrBuilder.java | 3 +- .../proto/MemoryLogRawDeallocation.java | 7 +- .../MemoryLogRawDeallocationOrBuilder.java | 3 +- .../org/tensorflow/proto/MemoryLogStep.java | 7 +- .../proto/MemoryLogStepOrBuilder.java | 3 +- .../proto/MemoryLogTensorAllocation.java | 15 +- .../MemoryLogTensorAllocationOrBuilder.java | 3 +- .../proto/MemoryLogTensorDeallocation.java | 7 +- .../MemoryLogTensorDeallocationOrBuilder.java | 3 +- .../proto/MemoryLogTensorOutput.java | 15 +- .../proto/MemoryLogTensorOutputOrBuilder.java | 3 +- .../org/tensorflow/proto/MemoryStats.java | 7 +- .../proto/MemoryStatsOrBuilder.java | 3 +- .../org/tensorflow/proto/MetaGraphDef.java | 73 +- .../proto/MetaGraphDefOrBuilder.java | 3 +- .../org/tensorflow/proto/MetaGraphProtos.java | 7 +- .../org/tensorflow/proto/MetricEntry.java | 25 +- .../proto/MetricEntryOrBuilder.java | 3 +- .../org/tensorflow/proto/NameAttrList.java | 7 +- .../proto/NameAttrListOrBuilder.java | 3 +- .../tensorflow/proto/NamedTensorProto.java | 15 +- .../proto/NamedTensorProtoOrBuilder.java | 3 +- .../tensorflow/proto/NamedTensorProtos.java | 7 +- .../java/org/tensorflow/proto/NodeDef.java | 27 +- .../tensorflow/proto/NodeDefOrBuilder.java | 3 +- .../org/tensorflow/proto/NodeExecStats.java | 57 +- .../proto/NodeExecStatsOrBuilder.java | 3 +- .../java/org/tensorflow/proto/NodeOutput.java | 15 +- .../tensorflow/proto/NodeOutputOrBuilder.java | 3 +- .../java/org/tensorflow/proto/NodeProto.java | 7 +- .../gen/java/org/tensorflow/proto/OpDef.java | 107 +- .../org/tensorflow/proto/OpDefOrBuilder.java | 3 +- .../org/tensorflow/proto/OpDefProtos.java | 7 +- .../org/tensorflow/proto/OpDeprecation.java | 7 +- .../proto/OpDeprecationOrBuilder.java | 3 +- .../gen/java/org/tensorflow/proto/OpList.java | 19 +- .../org/tensorflow/proto/OpListOrBuilder.java | 3 +- .../tensorflow/proto/OpPerformanceData.java | 163 ++- .../OptimizedFunctionGraphOuterClass.java | 82 +- .../tensorflow/proto/OptimizerOptions.java | 27 +- .../proto/OptimizerOptionsOrBuilder.java | 3 +- .../org/tensorflow/proto/PlatformInfo.java | 7 +- .../proto/PlatformInfoOrBuilder.java | 3 +- .../org/tensorflow/proto/ProfilerOptions.java | 467 ++++++++- .../org/tensorflow/proto/QueueRunnerDef.java | 58 +- .../proto/QueueRunnerDefOrBuilder.java | 3 +- .../tensorflow/proto/QueueRunnerProtos.java | 7 +- .../tensorflow/proto/ReaderBaseProtos.java | 7 +- .../org/tensorflow/proto/ReaderBaseState.java | 9 +- .../proto/ReaderBaseStateOrBuilder.java | 3 +- .../tensorflow/proto/RegisteredGradient.java | 7 +- .../proto/RegisteredGradientOrBuilder.java | 3 +- .../tensorflow/proto/RequestedExitCode.java | 7 +- .../proto/RequestedExitCodeOrBuilder.java | 3 +- .../org/tensorflow/proto/ResourceHandle.java | 7 +- .../tensorflow/proto/ResourceHandleProto.java | 35 +- .../proto/ResourceHandleProtoOrBuilder.java | 3 +- .../org/tensorflow/proto/RewriterConfig.java | 169 ++-- .../proto/RewriterConfigOrBuilder.java | 3 +- .../proto/RewriterConfigProtos.java | 7 +- .../java/org/tensorflow/proto/RpcOptions.java | 11 +- .../tensorflow/proto/RunConfiguration.java | 7 +- .../proto/RunConfigurationOrBuilder.java | 3 +- .../org/tensorflow/proto/RunMetadata.java | 93 +- .../proto/RunMetadataOrBuilder.java | 3 +- .../java/org/tensorflow/proto/RunOptions.java | 49 +- .../tensorflow/proto/RunOptionsOrBuilder.java | 3 +- .../tensorflow/proto/SaveSliceInfoDef.java | 7 +- .../proto/SaveSliceInfoDefOrBuilder.java | 3 +- .../java/org/tensorflow/proto/SavedModel.java | 19 +- .../tensorflow/proto/SavedModelOrBuilder.java | 3 +- .../tensorflow/proto/SavedModelProtos.java | 7 +- .../proto/SavedObjectGraphOuterClass.java | 269 +++-- .../java/org/tensorflow/proto/SavedSlice.java | 23 +- .../org/tensorflow/proto/SavedSliceMeta.java | 33 +- .../proto/SavedSliceMetaOrBuilder.java | 3 +- .../tensorflow/proto/SavedSliceOrBuilder.java | 3 +- .../proto/SavedTensorSliceMeta.java | 29 +- .../proto/SavedTensorSliceMetaOrBuilder.java | 3 +- .../proto/SavedTensorSliceProtos.java | 7 +- .../tensorflow/proto/SavedTensorSlices.java | 23 +- .../proto/SavedTensorSlicesOrBuilder.java | 3 +- .../java/org/tensorflow/proto/SaverDef.java | 19 +- .../tensorflow/proto/SaverDefOrBuilder.java | 3 +- .../org/tensorflow/proto/SaverProtos.java | 7 +- .../proto/ScopedAllocatorOptions.java | 7 +- .../ScopedAllocatorOptionsOrBuilder.java | 3 +- .../org/tensorflow/proto/SequenceExample.java | 23 +- .../proto/SequenceExampleOrBuilder.java | 3 +- .../org/tensorflow/proto/SerializedDType.java | 11 +- .../proto/SerializedDTypeOrBuilder.java | 3 +- .../java/org/tensorflow/proto/ServerDef.java | 31 +- .../tensorflow/proto/ServerDefOrBuilder.java | 3 +- .../org/tensorflow/proto/ServerProtos.java | 7 +- .../java/org/tensorflow/proto/SessionLog.java | 17 +- .../tensorflow/proto/SessionLogOrBuilder.java | 3 +- .../org/tensorflow/proto/SessionMetadata.java | 7 +- .../proto/SessionMetadataOrBuilder.java | 3 +- .../org/tensorflow/proto/SignatureDef.java | 7 +- .../proto/SignatureDefOrBuilder.java | 3 +- .../java/org/tensorflow/proto/SourceFile.java | 7 +- .../tensorflow/proto/SourceFileOrBuilder.java | 3 +- .../org/tensorflow/proto/SourceMetadata.java | 7 +- .../proto/SourceMetadataOrBuilder.java | 3 +- .../tensorflow/proto/StackFrameWithId.java | 15 +- .../proto/StackFrameWithIdOrBuilder.java | 3 +- .../gen/java/org/tensorflow/proto/Status.java | 7 +- .../org/tensorflow/proto/StatusProto.java | 11 +- .../proto/StatusProtoOrBuilder.java | 3 +- .../java/org/tensorflow/proto/StepStats.java | 19 +- .../tensorflow/proto/StepStatsOrBuilder.java | 3 +- .../org/tensorflow/proto/StepStatsProtos.java | 7 +- .../gen/java/org/tensorflow/proto/Struct.java | 219 ++-- .../java/org/tensorflow/proto/Summary.java | 69 +- .../tensorflow/proto/SummaryDescription.java | 7 +- .../proto/SummaryDescriptionOrBuilder.java | 3 +- .../org/tensorflow/proto/SummaryMetadata.java | 25 +- .../proto/SummaryMetadataOrBuilder.java | 3 +- .../tensorflow/proto/SummaryOrBuilder.java | 3 +- .../org/tensorflow/proto/SummaryProtos.java | 7 +- .../tensorflow/proto/TaggedRunMetadata.java | 9 +- .../proto/TaggedRunMetadataOrBuilder.java | 3 +- .../tensorflow/proto/TaskDeviceFilters.java | 7 +- .../proto/TaskDeviceFiltersOrBuilder.java | 3 +- .../tensorflow/proto/TensorBundleProtos.java | 7 +- .../tensorflow/proto/TensorConnection.java | 7 +- .../proto/TensorConnectionOrBuilder.java | 3 +- .../org/tensorflow/proto/TensorDebugMode.java | 9 +- .../tensorflow/proto/TensorDescription.java | 27 +- .../proto/TensorDescriptionOrBuilder.java | 3 +- .../proto/TensorDescriptionProtos.java | 7 +- .../java/org/tensorflow/proto/TensorInfo.java | 61 +- .../tensorflow/proto/TensorInfoOrBuilder.java | 3 +- .../org/tensorflow/proto/TensorProto.java | 51 +- .../proto/TensorProtoOrBuilder.java | 3 +- .../org/tensorflow/proto/TensorProtos.java | 7 +- .../tensorflow/proto/TensorShapeProto.java | 23 +- .../proto/TensorShapeProtoOrBuilder.java | 3 +- .../tensorflow/proto/TensorShapeProtos.java | 7 +- .../tensorflow/proto/TensorSliceProto.java | 119 +-- .../proto/TensorSliceProtoOrBuilder.java | 3 +- .../tensorflow/proto/TensorSliceProtos.java | 23 +- .../org/tensorflow/proto/TestLogProtos.java | 7 +- .../org/tensorflow/proto/TestResults.java | 59 +- .../proto/TestResultsOrBuilder.java | 3 +- .../proto/ThreadPoolOptionProto.java | 7 +- .../proto/ThreadPoolOptionProtoOrBuilder.java | 3 +- .../proto/TrackableObjectGraphOuterClass.java | 101 +- .../tensorflow/proto/TransportOptions.java | 11 +- .../org/tensorflow/proto/TypesProtos.java | 51 +- .../tensorflow/proto/UniformQuantOpsAttr.java | 11 +- .../java/org/tensorflow/proto/ValuesDef.java | 7 +- .../tensorflow/proto/ValuesDefOrBuilder.java | 3 +- .../tensorflow/proto/VarLenFeatureProto.java | 11 +- .../proto/VarLenFeatureProtoOrBuilder.java | 3 +- .../tensorflow/proto/VariableAggregation.java | 9 +- .../org/tensorflow/proto/VariableDef.java | 23 +- .../proto/VariableDefOrBuilder.java | 3 +- .../org/tensorflow/proto/VariableProtos.java | 7 +- .../proto/VariableSynchronization.java | 9 +- .../proto/VariantTensorDataProto.java | 21 +- .../VariantTensorDataProtoOrBuilder.java | 3 +- .../org/tensorflow/proto/VerifierConfig.java | 17 +- .../proto/VerifierConfigOrBuilder.java | 3 +- .../proto/VerifierConfigProtos.java | 7 +- .../java/org/tensorflow/proto/VersionDef.java | 7 +- .../tensorflow/proto/VersionDefOrBuilder.java | 3 +- .../org/tensorflow/proto/VersionsProtos.java | 7 +- .../org/tensorflow/proto/WatchdogConfig.java | 7 +- .../proto/WatchdogConfigOrBuilder.java | 3 +- .../org/tensorflow/proto/WhileContextDef.java | 29 +- .../proto/WhileContextDefOrBuilder.java | 3 +- .../org/tensorflow/proto/WorkerHealth.java | 9 +- .../proto/WorkerHeartbeatRequest.java | 27 +- .../WorkerHeartbeatRequestOrBuilder.java | 3 +- .../proto/WorkerHeartbeatResponse.java | 23 +- .../WorkerHeartbeatResponseOrBuilder.java | 3 +- .../tensorflow/proto/WorkerShutdownMode.java | 9 +- .../proto/core/CppShapeInference.java | 71 +- .../core/platform/CorePlatformPayloads.java | 21 +- .../tensorflow/proto/data/DataService.java | 53 +- .../org/tensorflow/proto/data/Dataset.java | 57 +- .../proto/data/DatasetMetadata.java | 13 +- .../tensorflow/proto/data/DatasetOptions.java | 109 +- .../data/experimental/ServiceConfig.java | 19 +- .../proto/data/experimental/Snapshot.java | 112 +-- .../tensorflow/proto/data/model/Model.java | 79 +- .../DistributedRuntimePayloads.java | 19 +- .../tensorflow/proto/dummy/BfcMemoryMap.java | 7 +- .../proto/dummy/ProfilerOptions.java | 7 +- .../tensorflow/proto/dummy/RpcOptions.java | 7 +- .../org/tensorflow/proto/dummy/Status.java | 7 +- .../org/tensorflow/proto/dummy/TestLog.java | 7 +- .../proto/eager/RemoteTensorHandle.java | 23 +- .../eager/RemoteTensorHandleOrBuilder.java | 3 +- .../proto/eager/RemoteTensorHandleProtos.java | 7 +- .../proto/eager/ResourceDtypeAndShape.java | 19 +- .../eager/ResourceDtypeAndShapeOrBuilder.java | 3 +- .../java/org/tensorflow/proto/error/Code.java | 9 +- .../proto/error/ErrorCodesProtos.java | 7 +- .../proto/error/dummy/ErrorCodes.java | 7 +- .../org/tensorflow/proto/profiler/Xplane.java | 221 ++-- .../base_api/api_def_AsString.pbtxt | 2 + .../base_api/api_def_ComplexAbs.pbtxt | 7 + .../base_api/api_def_DecodeCSV.pbtxt | 8 + .../base_api/api_def_DecodeImage.pbtxt | 12 +- .../base_api/api_def_DecodeJXL.pbtxt | 35 + .../base_api/api_def_DenseBincount.pbtxt | 10 +- ...api_def_ExperimentalThreadPoolHandle.pbtxt | 19 +- .../base_api/api_def_ExtractGlimpse.pbtxt | 1 + .../base_api/api_def_ExtractGlimpseV2.pbtxt | 1 + .../tensorflow/base_api/api_def_Imag.pbtxt | 7 + .../base_api/api_def_IsotonicRegression.pbtxt | 17 +- .../api_def_QuantizeAndDequantizeV4Grad.pbtxt | 14 + .../base_api/api_def_QuantizeV2.pbtxt | 6 + .../tensorflow/base_api/api_def_RFFT.pbtxt | 9 +- .../tensorflow/base_api/api_def_RFFT2D.pbtxt | 9 +- .../tensorflow/base_api/api_def_RFFT3D.pbtxt | 9 +- .../tensorflow/base_api/api_def_RFFTND.pbtxt | 11 +- .../api_def_StatsAggregatorHandleV2.pbtxt | 7 + .../base_api/api_def_ThreadPoolHandle.pbtxt | 19 +- .../gen/resources/org/tensorflow/ops.pbtxt | 15 +- .../internal/c_api/presets/tensorflow.java | 2 +- .../tensorflow-core-native/tensorflow.bazelrc | 945 +++++++++--------- 460 files changed, 5255 insertions(+), 3958 deletions(-) create mode 100644 tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TStringOwnerCApi.java create mode 100644 tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/tstring_owner_ref_t.java create mode 100644 tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/tstring_owner_unref_t.java create mode 100644 tensorflow-core/tensorflow-core-native/src/gen/resources/org/tensorflow/base_api/api_def_DecodeJXL.pbtxt diff --git a/README.md b/README.md index 67dae4fc1ab..536ce3f27ba 100644 --- a/README.md +++ b/README.md @@ -215,7 +215,7 @@ This table shows the mapping between TensorFlow, TensorFlow Java and minimum sup | 1.0.0-rc.2 | 2.16.2 | 11 | | 1.0.0 | 2.16.2 | 11 | | 1.1.0 | 2.18.0 | 11 | -| 1.2.0-SNAPSHOT | 2.20.0 | 11 | +| 1.2.0-SNAPSHOT | 2.21.0 | 11 | ## How to Contribute? diff --git a/tensorflow-core/pom.xml b/tensorflow-core/pom.xml index 03c548a4111..cc87f6a76bc 100644 --- a/tensorflow-core/pom.xml +++ b/tensorflow-core/pom.xml @@ -42,7 +42,7 @@ https://github.com/tensorflow/tensorflow/blob/master/tensorflow/workspace2.bzl (but for the currently used release, not master) --> - 4.28.3 + 4.31.1 ${javacpp.platform}${javacpp.platform.extension} diff --git a/tensorflow-core/tensorflow-core-api/scripts/test_download.sh b/tensorflow-core/tensorflow-core-api/scripts/test_download.sh index 509468bade2..22666bb2b80 100755 --- a/tensorflow-core/tensorflow-core-api/scripts/test_download.sh +++ b/tensorflow-core/tensorflow-core-api/scripts/test_download.sh @@ -5,13 +5,13 @@ DOWNLOAD_FOLDER="$1" case ${PLATFORM:-} in 'linux-x86_64') - 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' + 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' ;; 'linux-arm64') - 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' + 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' ;; 'macosx-arm64') - TEXT_WHEEL_URL='https://files.pythonhosted.org/packages/98/e4/e3c72d0a73caeba90cf5b31e69d44e9a08d614e0e829484d813f3b63e037/tensorflow_text-2.20.0-cp312-cp312-macosx_11_0_arm64.whl' + TEXT_WHEEL_URL='https://files.pythonhosted.org/packages/61/b8/ccb0c3b048f268860f4c92f6bb7ab55c6af6c2fe4e26746c8dc384063915/tensorflow_text-2.20.1-cp313-cp313-macosx_11_0_arm64.whl' ;; *) echo "TensorFlow Text distribution for ${PLATFORM} is not supported for download" diff --git a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/DataExperimentalOps.java b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/DataExperimentalOps.java index 4fa8e60e295..b5b1ee3750f 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/DataExperimentalOps.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/DataExperimentalOps.java @@ -694,7 +694,6 @@ public ThreadPoolDataset threadPoolDataset(Operand inputDataset * @param numThreads The number of threads in the thread pool. * @param displayName A human-readable name for the threads that may be visible in some * visualizations. - * threadpool. * @param options carries optional attribute values * @return a new instance of ThreadPoolHandle */ diff --git a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/DataOps.java b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/DataOps.java index 5a3a14b799e..0f8695568db 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/DataOps.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/DataOps.java @@ -2197,7 +2197,6 @@ public ThreadPoolDataset threadPoolDataset(Operand inputDataset * @param numThreads The number of threads in the thread pool. * @param displayName A human-readable name for the threads that may be visible in some * visualizations. - * threadpool. * @param options carries optional attribute values * @return a new instance of ThreadPoolHandle */ diff --git a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/ImageOps.java b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/ImageOps.java index 896bb62de5c..471e1435cb6 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/ImageOps.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/ImageOps.java @@ -337,10 +337,10 @@ public DecodeGif decodeGif(Operand contents) { } /** - * Function for decode_bmp, decode_gif, decode_jpeg, decode_webp, and decode_png. - * Detects whether an image is a BMP, GIF, JPEG, WebP, or PNG, and performs the - * appropriate operation to convert the input bytes string into a Tensor of type - * dtype. + * Function for decode_bmp, decode_gif, decode_jpeg, decode_jxl, decode_webp, and decode_png. + * Detects whether an image is a BMP, GIF, JPEG, JPEG XL, WebP, or PNG, and + * performs the appropriate operation to convert the input bytes string into a + * Tensor of type dtype. *

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

NOTE: decode_gif and decode_webp return a 4-D * array [num_frames, height, width, 3], as opposed to decode_bmp, * decode_jpeg, and decode_png, which always return 3-D arrays [height, diff --git a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/MathOps.java b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/MathOps.java index d3dcfc686ad..9b67c49c2d4 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/MathOps.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/MathOps.java @@ -668,7 +668,8 @@ public ComplexAbs complexAbs(Operand x) { * * * @param x The x value - * @param Tout The value of the Tout attribute + * @param Tout Need to be {@code tf.float32} when the type of {@code x} is {@code tf.complex64}. + * Need to be {@code tf.float64} when the type of {@code x} is {@code tf.complex128}. * @param data type for {@code ComplexAbs} output and operands * @return a new instance of ComplexAbs */ @@ -850,9 +851,9 @@ public CumulativeLogsumexp cumulativeLogsumexp(Operand * * @param input 1D or 2D int {@code Tensor}. * @param sizeOutput non-negative int scalar {@code Tensor}. - * @param weights is an int32, int64, float32, or float64 {@code Tensor} with the same - * shape as {@code arr}, or a length-0 {@code Tensor}, in which case it acts as all weights - * equal to 1. + * @param weights {@code Tensor} with the same shape as {@code arr}, or a length-0 {@code Tensor}, + * in which case it acts as all weights equal to 1. + * Not supported by the GPU implementation of Bincount. * @param options carries optional attribute values * @param data type for {@code DenseBincount} output and operands * @param data type for {@code DenseBincount} output and operands @@ -1196,7 +1197,8 @@ public Imag imag(Operand input) { *

* * @param input The input value - * @param Tout The value of the Tout attribute + * @param Tout Need to be {@code tf.float32} when the type of {@code x} is {@code tf.complex64}. + * Need to be {@code tf.float64} when the type of {@code x} is {@code tf.complex128}. * @param data type for {@code Imag} output and operands * @return a new instance of Imag */ diff --git a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/NnOps.java b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/NnOps.java index c9f086a3255..91b5207edfa 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/NnOps.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/NnOps.java @@ -1753,7 +1753,15 @@ public IsotonicRegression isotonicRegression(OperandNote on supported input-output type combinations: + *
    + *
  • For floating-point types, the output has the same dtype as the input.
  • + *
  • For 8-bit and 16-bit integer inputs, the output is a 32-bit float.
  • + *
  • For 32-bit and 64-bit integer inputs, the output is a 64-bit float.
  • + *
+ *

Using unsupported dtype pairs (for example, input=float64 with output=float32) + * will result in a "Could not find device for node" error. * @param data type for {@code IsotonicRegression} output and operands * @return a new instance of IsotonicRegression */ diff --git a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/Ops.java b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/Ops.java index 8483a4efb61..40c5d8f1ace 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/Ops.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/Ops.java @@ -7743,12 +7743,12 @@ public TensorListGather tensorListGather( * @param index The index value * @param elementShape The elementShape value * @param elementDtype The value of the elementDtype attribute - * @param data type for {@code TensorListGetItem} output and operands + * @param data type for {@code TensorListGetItem} output and operands * @return a new instance of TensorListGetItem */ - public TensorListGetItem tensorListGetItem( - Operand inputHandle, Operand index, Operand elementShape, - Class elementDtype) { + public TensorListGetItem tensorListGetItem( + Operand inputHandle, Operand index, + Operand elementShape, Class elementDtype) { return TensorListGetItem.create(scope, inputHandle, index, elementShape, elementDtype); } diff --git a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/QuantizationOps.java b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/QuantizationOps.java index 88df6bf8a0e..8485f694be2 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/QuantizationOps.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/QuantizationOps.java @@ -562,8 +562,10 @@ public QuantizeAndDequantizeV4 quantizeAndDequantizeV4(Op * * @param gradients The gradients value * @param input The input value - * @param inputMin The inputMin value - * @param inputMax The inputMax value + * @param inputMin If {@code axis} is specified, the shape of the minimum input tensor + * must be rank 1. + * @param inputMax If {@code axis} is specified, the shape of the maximum input tensor + * must be rank 1. * @param options carries optional attribute values * @param data type for {@code QuantizeAndDequantizeV4Grad} output and operands * @return a new instance of QuantizeAndDequantizeV4Grad diff --git a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/SignalOps.java b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/SignalOps.java index ac5703c264a..8537e79ada7 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/SignalOps.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/SignalOps.java @@ -444,9 +444,10 @@ public IrfftNd irfftNd(Operand input, * corresponding dimension of {@code input}, the dimension is cropped. If it is larger, * the dimension is padded with zeros. * - * @param input A float32 tensor. + * @param input A float32 or float64 tensor. * @param fftLength An int32 tensor of shape [1]. The FFT length. - * @param Tcomplex The value of the Tcomplex attribute + * @param Tcomplex Should be {@code tf.complex64} when the type of {@code input} is {@code float32}. + * Should be {@code tf.complex128} when the type of {@code input} is {@code float64}. * @param data type for {@code RFFT} output and operands * @return a new instance of Rfft */ @@ -467,9 +468,10 @@ public Rfft rfft(Operand input, Operand< * corresponding dimension of {@code input}, the dimension is cropped. If it is larger, * the dimension is padded with zeros. * - * @param input A float32 tensor. + * @param input A float32 or float64 tensor. * @param fftLength An int32 tensor of shape [2]. The FFT length for each dimension. - * @param Tcomplex The value of the Tcomplex attribute + * @param Tcomplex Should be {@code tf.complex64} when the type of {@code input} is {@code float32}. + * Should be {@code tf.complex128} when the type of {@code input} is {@code float64}. * @param data type for {@code RFFT2D} output and operands * @return a new instance of Rfft2d */ @@ -490,9 +492,10 @@ public Rfft2d rfft2d(Operand input, * corresponding dimension of {@code input}, the dimension is cropped. If it is larger, * the dimension is padded with zeros. * - * @param input A float32 tensor. + * @param input A float32 or float64 tensor. * @param fftLength An int32 tensor of shape [3]. The FFT length for each dimension. - * @param Tcomplex The value of the Tcomplex attribute + * @param Tcomplex Should be {@code tf.complex64} when the type of {@code input} is {@code float32}. + * Should be {@code tf.complex128} when the type of {@code input} is {@code float64}. * @param data type for {@code RFFT3D} output and operands * @return a new instance of Rfft3d */ @@ -513,10 +516,11 @@ public Rfft3d rfft3d(Operand input, *

Axes mean the dimensions to perform the transform on. Default is to perform on * all axes. * - * @param input A complex tensor. + * @param input A float32 or float64 tensor. * @param fftLength An int32 tensor. The FFT length for each dimension. * @param axes An int32 tensor with a same shape as fft_length. Axes to perform the transform. - * @param Tcomplex The value of the Tcomplex attribute + * @param Tcomplex Should be {@code tf.complex64} when the type of {@code input} is {@code float32}. + * Should be {@code tf.complex128} when the type of {@code input} is {@code float64}. * @param data type for {@code RFFTND} output and operands * @return a new instance of RfftNd */ diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/TensorListGetItem.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/TensorListGetItem.java index 244704b5754..8fbdb5e80e0 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/TensorListGetItem.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/TensorListGetItem.java @@ -33,6 +33,7 @@ import org.tensorflow.op.annotation.Operator; import org.tensorflow.proto.DataType; import org.tensorflow.types.TInt32; +import org.tensorflow.types.family.TNumber; import org.tensorflow.types.family.TType; /** @@ -46,13 +47,13 @@ inputsClass = TensorListGetItem.Inputs.class ) @Operator -public final class TensorListGetItem extends RawOp implements Operand { +public final class TensorListGetItem extends RawOp implements Operand { /** * The name of this op, as known by TensorFlow core engine */ public static final String OP_NAME = "TensorListGetItem"; - private Output item; + private Output item; public TensorListGetItem(Operation operation) { super(operation, OP_NAME); @@ -68,15 +69,15 @@ public TensorListGetItem(Operation operation) { * @param index The index value * @param elementShape The elementShape value * @param elementDtype The value of the elementDtype attribute - * @param data type for {@code TensorListGetItem} output and operands + * @param data type for {@code TensorListGetItem} output and operands * @return a new instance of TensorListGetItem */ @Endpoint( describeByClass = true ) - public static TensorListGetItem create(Scope scope, - Operand inputHandle, Operand index, Operand elementShape, - Class elementDtype) { + public static TensorListGetItem create(Scope scope, + Operand inputHandle, Operand index, + Operand elementShape, Class elementDtype) { OperationBuilder opBuilder = scope.opBuilder(OP_NAME, "TensorListGetItem"); opBuilder.addInput(inputHandle.asOutput()); opBuilder.addInput(index.asOutput()); @@ -90,12 +91,12 @@ public static TensorListGetItem create(Scope scope, * * @return item. */ - public Output item() { + public Output item() { return item; } @Override - public Output asOutput() { + public Output asOutput() { return item; } @@ -116,20 +117,26 @@ public static class Inputs extends RawOpInputs> { /** * The elementShape input */ - public final Operand elementShape; + public final Operand elementShape; /** * The elementDtype attribute */ public final DataType elementDtype; + /** + * The Tshape attribute + */ + public final DataType Tshape; + public Inputs(GraphOperation op) { - super(new TensorListGetItem<>(op), op, Arrays.asList("element_dtype")); + super(new TensorListGetItem<>(op), op, Arrays.asList("element_dtype", "Tshape")); int inputIndex = 0; inputHandle = (Operand) op.input(inputIndex++); index = (Operand) op.input(inputIndex++); - elementShape = (Operand) op.input(inputIndex++); + elementShape = (Operand) op.input(inputIndex++); elementDtype = op.attributes().getAttrType("element_dtype"); + Tshape = op.attributes().getAttrType("Tshape"); } } } diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/StatsAggregatorHandle.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/StatsAggregatorHandle.java index 080585d34a6..c17850e66a4 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/StatsAggregatorHandle.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/StatsAggregatorHandle.java @@ -85,7 +85,8 @@ public static StatsAggregatorHandle create(Scope scope, Options... options) { /** * Sets the container option. * - * @param container the container option + * @param container The name of {@code container} should start with {@code '.'} or {@code letter} or {@code digit}, + * with ['-', '.', '/'] or {@code letter} or {@code digit} follows several times. * @return this Options instance. */ public static Options container(String container) { @@ -131,7 +132,8 @@ private Options() { /** * Sets the container option. * - * @param container the container option + * @param container The name of {@code container} should start with {@code '.'} or {@code letter} or {@code digit}, + * with ['-', '.', '/'] or {@code letter} or {@code digit} follows several times. * @return this Options instance. */ public Options container(String container) { @@ -156,7 +158,8 @@ public Options sharedName(String sharedName) { ) public static class Inputs extends RawOpInputs { /** - * The container attribute + * The name of {@code container} should start with {@code '.'} or {@code letter} or {@code digit}, + * with ['-', '.', '/'] or {@code letter} or {@code digit} follows several times. */ public final String container; diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/ThreadPoolHandle.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/ThreadPoolHandle.java index 8e110f97a30..f372fcd859d 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/ThreadPoolHandle.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/ThreadPoolHandle.java @@ -64,7 +64,6 @@ public ThreadPoolHandle(Operation operation) { * @param numThreads The number of threads in the thread pool. * @param displayName A human-readable name for the threads that may be visible in some * visualizations. - * threadpool. * @param options carries optional attribute values * @return a new instance of ThreadPoolHandle */ @@ -106,7 +105,8 @@ public static Options maxIntraOpParallelism(Long maxIntraOpParallelism) { /** * Sets the container option. * - * @param container the container option + * @param container The name of {@code container} should start with {@code '.'} or {@code letter} or {@code digit}, + * with ['-', '.', '/'] or {@code letter} or {@code digit} follows several times. * @return this Options instance. */ public static Options container(String container) { @@ -125,8 +125,7 @@ public static Options sharedName(String sharedName) { /** * Gets handle. - * A resource that can be consumed by one or more ExperimentalThreadPoolDataset - * ops. + * * @return handle. */ public Output handle() { @@ -167,7 +166,8 @@ public Options maxIntraOpParallelism(Long maxIntraOpParallelism) { /** * Sets the container option. * - * @param container the container option + * @param container The name of {@code container} should start with {@code '.'} or {@code letter} or {@code digit}, + * with ['-', '.', '/'] or {@code letter} or {@code digit} follows several times. * @return this Options instance. */ public Options container(String container) { @@ -205,12 +205,12 @@ public static class Inputs extends RawOpInputs { /** * A human-readable name for the threads that may be visible in some * visualizations. - * threadpool. */ public final String displayName; /** - * The container attribute + * The name of {@code container} should start with {@code '.'} or {@code letter} or {@code digit}, + * with ['-', '.', '/'] or {@code letter} or {@code digit} follows several times. */ public final String container; diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/experimental/ThreadPoolHandle.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/experimental/ThreadPoolHandle.java index edcfe5cd3b8..2022bbba44d 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/experimental/ThreadPoolHandle.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/experimental/ThreadPoolHandle.java @@ -64,7 +64,6 @@ public ThreadPoolHandle(Operation operation) { * @param numThreads The number of threads in the thread pool. * @param displayName A human-readable name for the threads that may be visible in some * visualizations. - * threadpool. * @param options carries optional attribute values * @return a new instance of ThreadPoolHandle */ @@ -106,7 +105,8 @@ public static Options maxIntraOpParallelism(Long maxIntraOpParallelism) { /** * Sets the container option. * - * @param container the container option + * @param container The name of {@code container} should start with {@code '.'} or {@code letter} or {@code digit}, + * with ['-', '.', '/'] or {@code letter} or {@code digit} follows several times. * @return this Options instance. */ public static Options container(String container) { @@ -125,8 +125,7 @@ public static Options sharedName(String sharedName) { /** * Gets handle. - * A resource that can be consumed by one or more ExperimentalThreadPoolDataset - * ops. + * * @return handle. */ public Output handle() { @@ -167,7 +166,8 @@ public Options maxIntraOpParallelism(Long maxIntraOpParallelism) { /** * Sets the container option. * - * @param container the container option + * @param container The name of {@code container} should start with {@code '.'} or {@code letter} or {@code digit}, + * with ['-', '.', '/'] or {@code letter} or {@code digit} follows several times. * @return this Options instance. */ public Options container(String container) { @@ -205,12 +205,12 @@ public static class Inputs extends RawOpInputs { /** * A human-readable name for the threads that may be visible in some * visualizations. - * threadpool. */ public final String displayName; /** - * The container attribute + * The name of {@code container} should start with {@code '.'} or {@code letter} or {@code digit}, + * with ['-', '.', '/'] or {@code letter} or {@code digit} follows several times. */ public final String container; diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/dtypes/AsString.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/dtypes/AsString.java index 25dfbfe50ff..463a55959d4 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/dtypes/AsString.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/dtypes/AsString.java @@ -124,6 +124,7 @@ public static Options precision(Long precision) { * Sets the scientific option. * * @param scientific Use scientific notation for floating point numbers. + * Can't be specified to {@code True} when {@code shortest} is set to {@code True}. * @return this Options instance. */ public static Options scientific(Boolean scientific) { @@ -135,6 +136,7 @@ public static Options scientific(Boolean scientific) { * * @param shortest Use shortest representation (either scientific or standard) for * floating point numbers. + * Can't be specified to {@code True} when {@code scientific} is set to {@code True}. * @return this Options instance. */ public static Options shortest(Boolean shortest) { @@ -211,6 +213,7 @@ public Options precision(Long precision) { * Sets the scientific option. * * @param scientific Use scientific notation for floating point numbers. + * Can't be specified to {@code True} when {@code shortest} is set to {@code True}. * @return this Options instance. */ public Options scientific(Boolean scientific) { @@ -223,6 +226,7 @@ public Options scientific(Boolean scientific) { * * @param shortest Use shortest representation (either scientific or standard) for * floating point numbers. + * Can't be specified to {@code True} when {@code scientific} is set to {@code True}. * @return this Options instance. */ public Options shortest(Boolean shortest) { @@ -278,12 +282,14 @@ public static class Inputs extends RawOpInputs { /** * Use scientific notation for floating point numbers. + * Can't be specified to {@code True} when {@code shortest} is set to {@code True}. */ public final boolean scientific; /** * Use shortest representation (either scientific or standard) for * floating point numbers. + * Can't be specified to {@code True} when {@code scientific} is set to {@code True}. */ public final boolean shortest; diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/image/DecodeImage.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/image/DecodeImage.java index 891c31bb514..ced9e2198c5 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/image/DecodeImage.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/image/DecodeImage.java @@ -37,10 +37,10 @@ import org.tensorflow.types.family.TNumber; /** - * Function for decode_bmp, decode_gif, decode_jpeg, decode_webp, and decode_png. - * Detects whether an image is a BMP, GIF, JPEG, WebP, or PNG, and performs the - * appropriate operation to convert the input bytes string into a Tensor of type - * dtype. + * Function for decode_bmp, decode_gif, decode_jpeg, decode_jxl, decode_webp, and decode_png. + * Detects whether an image is a BMP, GIF, JPEG, JPEG XL, WebP, or PNG, and + * performs the appropriate operation to convert the input bytes string into a + * Tensor of type dtype. *

NOTE: decode_gif and decode_webp return a 4-D * array [num_frames, height, width, 3], as opposed to decode_bmp, * decode_jpeg, and decode_png, which always return 3-D arrays [height, @@ -137,8 +137,8 @@ public static Options channels(Long channels) { * Sets the expandAnimations option. * * @param expandAnimations Controls the output shape of the returned op. If True, the returned op - * will produce a 3-D tensor for PNG, JPEG, and BMP files; and a 4-D - * tensor for all GIFs and WebP images, whether animated or not. If, + * will produce a 3-D tensor for PNG, JPEG, JPEG XL, and BMP files; and a + * 4-D tensor for all GIFs and WebP images, whether animated or not. If, * False, the returned op will produce a 3-D tensor for all file types * and will truncate animated images to the first frame. * @return this Options instance. @@ -188,8 +188,8 @@ public Options channels(Long channels) { * Sets the expandAnimations option. * * @param expandAnimations Controls the output shape of the returned op. If True, the returned op - * will produce a 3-D tensor for PNG, JPEG, and BMP files; and a 4-D - * tensor for all GIFs and WebP images, whether animated or not. If, + * will produce a 3-D tensor for PNG, JPEG, JPEG XL, and BMP files; and a + * 4-D tensor for all GIFs and WebP images, whether animated or not. If, * False, the returned op will produce a 3-D tensor for all file types * and will truncate animated images to the first frame. * @return this Options instance. @@ -221,8 +221,8 @@ public static class Inputs extends RawOpInputs> { /** * Controls the output shape of the returned op. If True, the returned op - * will produce a 3-D tensor for PNG, JPEG, and BMP files; and a 4-D - * tensor for all GIFs and WebP images, whether animated or not. If, + * will produce a 3-D tensor for PNG, JPEG, JPEG XL, and BMP files; and a + * 4-D tensor for all GIFs and WebP images, whether animated or not. If, * False, the returned op will produce a 3-D tensor for all file types * and will truncate animated images to the first frame. */ diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/image/ExtractGlimpse.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/image/ExtractGlimpse.java index 44daff67647..ee9c2316946 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/image/ExtractGlimpse.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/image/ExtractGlimpse.java @@ -145,6 +145,7 @@ public static Options normalized(Boolean normalized) { * * @param uniformNoise indicates if the noise should be generated using a * uniform distribution or a Gaussian distribution. + * It should not be {@code True} when {@code noise} is not {@code uniform}. * @return this Options instance. */ public static Options uniformNoise(Boolean uniformNoise) { @@ -222,6 +223,7 @@ public Options normalized(Boolean normalized) { * * @param uniformNoise indicates if the noise should be generated using a * uniform distribution or a Gaussian distribution. + * It should not be {@code True} when {@code noise} is not {@code uniform}. * @return this Options instance. */ public Options uniformNoise(Boolean uniformNoise) { @@ -281,6 +283,7 @@ public static class Inputs extends RawOpInputs { /** * indicates if the noise should be generated using a * uniform distribution or a Gaussian distribution. + * It should not be {@code True} when {@code noise} is not {@code uniform}. */ public final boolean uniformNoise; diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/io/DecodeCsv.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/io/DecodeCsv.java index 899877be0c6..a6c00ac6e3c 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/io/DecodeCsv.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/io/DecodeCsv.java @@ -145,7 +145,9 @@ public static Options naValue(String naValue) { /** * Sets the selectCols option. * - * @param selectCols the selectCols option + * @param selectCols Optional sorted list of column indices to select. If specified, + * only this subset of columns will be parsed and returned. + * It only works on {@code records} except for {@code record_defaults}. * @return this Options instance. */ public static Options selectCols(List selectCols) { @@ -155,7 +157,9 @@ public static Options selectCols(List selectCols) { /** * Sets the selectCols option. * - * @param selectCols the selectCols option + * @param selectCols Optional sorted list of column indices to select. If specified, + * only this subset of columns will be parsed and returned. + * It only works on {@code records} except for {@code record_defaults}. * @return this Options instance. */ public static Options selectCols(Long... selectCols) { @@ -230,7 +234,9 @@ public Options naValue(String naValue) { /** * Sets the selectCols option. * - * @param selectCols the selectCols option + * @param selectCols Optional sorted list of column indices to select. If specified, + * only this subset of columns will be parsed and returned. + * It only works on {@code records} except for {@code record_defaults}. * @return this Options instance. */ public Options selectCols(List selectCols) { @@ -241,7 +247,9 @@ public Options selectCols(List selectCols) { /** * Sets the selectCols option. * - * @param selectCols the selectCols option + * @param selectCols Optional sorted list of column indices to select. If specified, + * only this subset of columns will be parsed and returned. + * It only works on {@code records} except for {@code record_defaults}. * @return this Options instance. */ public Options selectCols(Long... selectCols) { @@ -290,7 +298,9 @@ public static class Inputs extends RawOpInputs { public final String naValue; /** - * The selectCols attribute + * Optional sorted list of column indices to select. If specified, + * only this subset of columns will be parsed and returned. + * It only works on {@code records} except for {@code record_defaults}. */ public final long[] selectCols; diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/ComplexAbs.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/ComplexAbs.java index 9461d599888..807724d575d 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/ComplexAbs.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/ComplexAbs.java @@ -79,7 +79,8 @@ public ComplexAbs(Operation operation) { * * @param scope current scope * @param x The x value - * @param Tout The value of the Tout attribute + * @param Tout Need to be {@code tf.float32} when the type of {@code x} is {@code tf.complex64}. + * Need to be {@code tf.float64} when the type of {@code x} is {@code tf.complex128}. * @param data type for {@code ComplexAbs} output and operands * @return a new instance of ComplexAbs */ @@ -137,7 +138,8 @@ public static class Inputs extends RawOpInputs> { public final DataType T; /** - * The Tout attribute + * Need to be {@code tf.float32} when the type of {@code x} is {@code tf.complex64}. + * Need to be {@code tf.float64} when the type of {@code x} is {@code tf.complex128}. */ public final DataType Tout; diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/DenseBincount.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/DenseBincount.java index 808be372c5f..f4581fe9844 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/DenseBincount.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/DenseBincount.java @@ -69,9 +69,9 @@ public DenseBincount(Operation operation) { * @param scope current scope * @param input 1D or 2D int {@code Tensor}. * @param sizeOutput non-negative int scalar {@code Tensor}. - * @param weights is an int32, int64, float32, or float64 {@code Tensor} with the same - * shape as {@code arr}, or a length-0 {@code Tensor}, in which case it acts as all weights - * equal to 1. + * @param weights {@code Tensor} with the same shape as {@code arr}, or a length-0 {@code Tensor}, + * in which case it acts as all weights equal to 1. + * Not supported by the GPU implementation of Bincount. * @param options carries optional attribute values * @param data type for {@code DenseBincount} output and operands * @param data type for {@code DenseBincount} output and operands @@ -99,7 +99,9 @@ public static DenseBincount create(Sco /** * Sets the binaryOutput option. * - * @param binaryOutput bool; Whether the kernel should count the appearance or number of occurrences. + * @param binaryOutput Whether the kernel should count the appearance or number of occurrences. + * Will raise {@code UnimplementedError} when {@code binary_output} is specified to {@code True} + * and the size of {@code weights} is not 0. * @return this Options instance. */ public static Options binaryOutput(Boolean binaryOutput) { @@ -133,7 +135,9 @@ private Options() { /** * Sets the binaryOutput option. * - * @param binaryOutput bool; Whether the kernel should count the appearance or number of occurrences. + * @param binaryOutput Whether the kernel should count the appearance or number of occurrences. + * Will raise {@code UnimplementedError} when {@code binary_output} is specified to {@code True} + * and the size of {@code weights} is not 0. * @return this Options instance. */ public Options binaryOutput(Boolean binaryOutput) { @@ -157,9 +161,9 @@ public static class Inputs extends RawOpIn public final Operand sizeOutput; /** - * is an int32, int64, float32, or float64 {@code Tensor} with the same - * shape as {@code arr}, or a length-0 {@code Tensor}, in which case it acts as all weights - * equal to 1. + * {@code Tensor} with the same shape as {@code arr}, or a length-0 {@code Tensor}, + * in which case it acts as all weights equal to 1. + * Not supported by the GPU implementation of Bincount. */ public final Operand weights; @@ -174,7 +178,9 @@ public static class Inputs extends RawOpIn public final DataType T; /** - * bool; Whether the kernel should count the appearance or number of occurrences. + * Whether the kernel should count the appearance or number of occurrences. + * Will raise {@code UnimplementedError} when {@code binary_output} is specified to {@code True} + * and the size of {@code weights} is not 0. */ public final boolean binaryOutput; diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/Imag.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/Imag.java index 509de2b8c7b..ce739b420de 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/Imag.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/math/Imag.java @@ -74,7 +74,8 @@ public Imag(Operation operation) { * * @param scope current scope * @param input The input value - * @param Tout The value of the Tout attribute + * @param Tout Need to be {@code tf.float32} when the type of {@code x} is {@code tf.complex64}. + * Need to be {@code tf.float64} when the type of {@code x} is {@code tf.complex128}. * @param data type for {@code Imag} output and operands * @return a new instance of Imag */ @@ -132,7 +133,8 @@ public static class Inputs extends RawOpInputs> { public final DataType T; /** - * The Tout attribute + * Need to be {@code tf.float32} when the type of {@code x} is {@code tf.complex64}. + * Need to be {@code tf.float64} when the type of {@code x} is {@code tf.complex128}. */ public final DataType Tout; diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/nn/IsotonicRegression.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/nn/IsotonicRegression.java index ecd511253e8..73ea2a63c84 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/nn/IsotonicRegression.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/nn/IsotonicRegression.java @@ -68,7 +68,15 @@ public IsotonicRegression(Operation operation) { * * @param scope current scope * @param input A (batch_size, dim)-tensor holding a batch of inputs. - * @param outputDtype Dtype of output. + * @param outputDtype Dtype of the output tensor. + *

Note on supported input-output type combinations: + *

    + *
  • For floating-point types, the output has the same dtype as the input.
  • + *
  • For 8-bit and 16-bit integer inputs, the output is a 32-bit float.
  • + *
  • For 32-bit and 64-bit integer inputs, the output is a 64-bit float.
  • + *
+ *

Using unsupported dtype pairs (for example, input=float64 with output=float32) + * will result in a "Could not find device for node" error. * @param data type for {@code IsotonicRegression} output and operands * @return a new instance of IsotonicRegression */ @@ -130,7 +138,15 @@ public static class Inputs extends RawOpInputs> { public final DataType T; /** - * Dtype of output. + * Dtype of the output tensor. + *

Note on supported input-output type combinations: + *

    + *
  • For floating-point types, the output has the same dtype as the input.
  • + *
  • For 8-bit and 16-bit integer inputs, the output is a 32-bit float.
  • + *
  • For 32-bit and 64-bit integer inputs, the output is a 64-bit float.
  • + *
+ *

Using unsupported dtype pairs (for example, input=float64 with output=float32) + * will result in a "Could not find device for node" error. */ public final DataType outputDtype; diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/quantization/Quantize.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/quantization/Quantize.java index ed34d301ec7..e6987733af8 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/quantization/Quantize.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/quantization/Quantize.java @@ -219,7 +219,7 @@ public static Options mode(String mode) { /** * Sets the roundMode option. * - * @param roundMode the roundMode option + * @param roundMode {@code round_mode='HALF_TO_EVEN'} only supported for mode 'SCALED'. * @return this Options instance. */ public static Options roundMode(String roundMode) { @@ -320,7 +320,7 @@ public Options mode(String mode) { /** * Sets the roundMode option. * - * @param roundMode the roundMode option + * @param roundMode {@code round_mode='HALF_TO_EVEN'} only supported for mode 'SCALED'. * @return this Options instance. */ public Options roundMode(String roundMode) { @@ -398,7 +398,7 @@ public static class Inputs extends RawOpInputs> { public final String mode; /** - * The roundMode attribute + * {@code round_mode='HALF_TO_EVEN'} only supported for mode 'SCALED'. */ public final String roundMode; diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/quantization/QuantizeAndDequantizeV4Grad.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/quantization/QuantizeAndDequantizeV4Grad.java index 65cf77c43ca..097901b206c 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/quantization/QuantizeAndDequantizeV4Grad.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/quantization/QuantizeAndDequantizeV4Grad.java @@ -71,8 +71,10 @@ public QuantizeAndDequantizeV4Grad(Operation operation) { * @param scope current scope * @param gradients The gradients value * @param input The input value - * @param inputMin The inputMin value - * @param inputMax The inputMax value + * @param inputMin If {@code axis} is specified, the shape of the minimum input tensor + * must be rank 1. + * @param inputMax If {@code axis} is specified, the shape of the maximum input tensor + * must be rank 1. * @param options carries optional attribute values * @param data type for {@code QuantizeAndDequantizeV4Grad} output and operands * @return a new instance of QuantizeAndDequantizeV4Grad @@ -171,12 +173,14 @@ public static class Inputs extends RawOpInputs input; /** - * The inputMin input + * If {@code axis} is specified, the shape of the minimum input tensor + * must be rank 1. */ public final Operand inputMin; /** - * The inputMax input + * If {@code axis} is specified, the shape of the maximum input tensor + * must be rank 1. */ public final Operand inputMax; diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/signal/Rfft.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/signal/Rfft.java index c4d7b74e39a..7aeb9f690dc 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/signal/Rfft.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/signal/Rfft.java @@ -72,9 +72,10 @@ public Rfft(Operation operation) { * Factory method to create a class wrapping a new RFFT operation. * * @param scope current scope - * @param input A float32 tensor. + * @param input A float32 or float64 tensor. * @param fftLength An int32 tensor of shape [1]. The FFT length. - * @param Tcomplex The value of the Tcomplex attribute + * @param Tcomplex Should be {@code tf.complex64} when the type of {@code input} is {@code float32}. + * Should be {@code tf.complex128} when the type of {@code input} is {@code float64}. * @param data type for {@code RFFT} output and operands * @return a new instance of Rfft */ @@ -114,7 +115,7 @@ public Output asOutput() { ) public static class Inputs extends RawOpInputs> { /** - * A float32 tensor. + * A float32 or float64 tensor. */ public final Operand input; @@ -129,7 +130,8 @@ public static class Inputs extends RawOpInputs> { public final DataType Treal; /** - * The Tcomplex attribute + * Should be {@code tf.complex64} when the type of {@code input} is {@code float32}. + * Should be {@code tf.complex128} when the type of {@code input} is {@code float64}. */ public final DataType Tcomplex; diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/signal/Rfft2d.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/signal/Rfft2d.java index 314d16f4eec..d440d3b706c 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/signal/Rfft2d.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/signal/Rfft2d.java @@ -73,9 +73,10 @@ public Rfft2d(Operation operation) { * Factory method to create a class wrapping a new RFFT2D operation. * * @param scope current scope - * @param input A float32 tensor. + * @param input A float32 or float64 tensor. * @param fftLength An int32 tensor of shape [2]. The FFT length for each dimension. - * @param Tcomplex The value of the Tcomplex attribute + * @param Tcomplex Should be {@code tf.complex64} when the type of {@code input} is {@code float32}. + * Should be {@code tf.complex128} when the type of {@code input} is {@code float64}. * @param data type for {@code RFFT2D} output and operands * @return a new instance of Rfft2d */ @@ -116,7 +117,7 @@ public Output asOutput() { ) public static class Inputs extends RawOpInputs> { /** - * A float32 tensor. + * A float32 or float64 tensor. */ public final Operand input; @@ -131,7 +132,8 @@ public static class Inputs extends RawOpInputs> { public final DataType Treal; /** - * The Tcomplex attribute + * Should be {@code tf.complex64} when the type of {@code input} is {@code float32}. + * Should be {@code tf.complex128} when the type of {@code input} is {@code float64}. */ public final DataType Tcomplex; diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/signal/Rfft3d.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/signal/Rfft3d.java index 282c4b7386e..92b44cfd563 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/signal/Rfft3d.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/signal/Rfft3d.java @@ -73,9 +73,10 @@ public Rfft3d(Operation operation) { * Factory method to create a class wrapping a new RFFT3D operation. * * @param scope current scope - * @param input A float32 tensor. + * @param input A float32 or float64 tensor. * @param fftLength An int32 tensor of shape [3]. The FFT length for each dimension. - * @param Tcomplex The value of the Tcomplex attribute + * @param Tcomplex Should be {@code tf.complex64} when the type of {@code input} is {@code float32}. + * Should be {@code tf.complex128} when the type of {@code input} is {@code float64}. * @param data type for {@code RFFT3D} output and operands * @return a new instance of Rfft3d */ @@ -116,7 +117,7 @@ public Output asOutput() { ) public static class Inputs extends RawOpInputs> { /** - * A float32 tensor. + * A float32 or float64 tensor. */ public final Operand input; @@ -131,7 +132,8 @@ public static class Inputs extends RawOpInputs> { public final DataType Treal; /** - * The Tcomplex attribute + * Should be {@code tf.complex64} when the type of {@code input} is {@code float32}. + * Should be {@code tf.complex128} when the type of {@code input} is {@code float64}. */ public final DataType Tcomplex; diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/signal/RfftNd.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/signal/RfftNd.java index 17bf1368600..72183e79a42 100644 --- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/signal/RfftNd.java +++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/signal/RfftNd.java @@ -73,10 +73,11 @@ public RfftNd(Operation operation) { * Factory method to create a class wrapping a new RFFTND operation. * * @param scope current scope - * @param input A complex tensor. + * @param input A float32 or float64 tensor. * @param fftLength An int32 tensor. The FFT length for each dimension. * @param axes An int32 tensor with a same shape as fft_length. Axes to perform the transform. - * @param Tcomplex The value of the Tcomplex attribute + * @param Tcomplex Should be {@code tf.complex64} when the type of {@code input} is {@code float32}. + * Should be {@code tf.complex128} when the type of {@code input} is {@code float64}. * @param data type for {@code RFFTND} output and operands * @return a new instance of RfftNd */ @@ -116,7 +117,7 @@ public Output asOutput() { ) public static class Inputs extends RawOpInputs> { /** - * A complex tensor. + * A float32 or float64 tensor. */ public final Operand input; @@ -136,7 +137,8 @@ public static class Inputs extends RawOpInputs> { public final DataType Treal; /** - * The Tcomplex attribute + * Should be {@code tf.complex64} when the type of {@code input} is {@code float32}. + * Should be {@code tf.complex128} when the type of {@code input} is {@code float64}. */ public final DataType Tcomplex; diff --git a/tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/TensorFlowTest.java b/tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/TensorFlowTest.java index edf7bcd7190..a3626bfcdc8 100644 --- a/tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/TensorFlowTest.java +++ b/tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/TensorFlowTest.java @@ -22,6 +22,7 @@ import java.io.File; import java.nio.file.Paths; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.tensorflow.proto.OpList; @@ -38,6 +39,7 @@ public void registeredOpList() { assertNotNull(TensorFlow.registeredOpList()); } + @Disabled // until a version of tensorflow-text that's compatible with v2.21.0 @Test public void loadTFTextLibrary() { String libname = diff --git a/tensorflow-core/tensorflow-core-native/.bazelversion b/tensorflow-core/tensorflow-core-native/.bazelversion index 5c733d6c13a..26c75fe8ad4 100644 --- a/tensorflow-core/tensorflow-core-native/.bazelversion +++ b/tensorflow-core/tensorflow-core-native/.bazelversion @@ -1,2 +1,2 @@ -7.4.1 +7.7.0 # NOTE: Update Bazel version in tensorflow/tools/ci_build/release/common.sh.oss \ No newline at end of file diff --git a/tensorflow-core/tensorflow-core-native/BUILD b/tensorflow-core/tensorflow-core-native/BUILD index f480e638867..9d658d37a5d 100644 --- a/tensorflow-core/tensorflow-core-native/BUILD +++ b/tensorflow-core/tensorflow-core-native/BUILD @@ -4,6 +4,6 @@ java_proto_library( name = "java_proto_gen_sources", deps = [ "@org_tensorflow//tensorflow/core:protos_all", - "@local_xla//xla/tsl/protobuf:protos_all" + "@xla//xla/tsl/protobuf:protos_all" ] ) diff --git a/tensorflow-core/tensorflow-core-native/WORKSPACE b/tensorflow-core/tensorflow-core-native/WORKSPACE index a0f6b30323e..428352c0167 100644 --- a/tensorflow-core/tensorflow-core-native/WORKSPACE +++ b/tensorflow-core/tensorflow-core-native/WORKSPACE @@ -18,25 +18,54 @@ http_archive( "find tensorflow third_party/xla/third_party/tsl third_party/xla/xla/tsl -name \\*.proto | xargs sed -i.bak 's/^package tensorflow\\([^;]*\\).*$/package tensorflow\\1;\\noption java_package = \"org.tensorflow.proto\\1\";/'", ], urls = [ - "https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.20.0.tar.gz", + "https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.21.0.tar.gz", ], - sha256 = "a640d1f97be316a09301dfc9347e3d929ad4d9a2336e3ca23c32c93b0ff7e5d0", - strip_prefix = "tensorflow-2.20.0" + sha256 = "ef3568bb4865d6c1b2564fb5689c19b6b9a5311572cd1f2ff9198636a8520921", + strip_prefix = "tensorflow-2.21.0" ) ##### Copy content of tensorflow/WORKSPACE here (make sure to change references of default package "//" to "@org_tensorflow//") - # buildifier: disable=load-on-top -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +load("@org_tensorflow//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls") -http_archive( +tf_http_archive( name = "rules_shell", sha256 = "bc61ef94facc78e20a645726f64756e5e285a045037c7a61f65af2941f4c25e1", strip_prefix = "rules_shell-0.4.1", - url = "https://github.com/bazelbuild/rules_shell/releases/download/v0.4.1/rules_shell-v0.4.1.tar.gz", + urls = tf_mirror_urls( + "https://github.com/bazelbuild/rules_shell/releases/download/v0.4.1/rules_shell-v0.4.1.tar.gz", + ), ) +# Initialize toolchains for ML projects. +# +# A hermetic build system is designed to produce completely reproducible builds for C++. +# Details: https://github.com/google-ml-infra/rules_ml_toolchain +tf_http_archive( + name = "rules_ml_toolchain", + sha256 = "54c1a357f71f611efdb4891ebd4bcbe4aeb6dfa7e473f14fd7ecad5062096616", + strip_prefix = "rules_ml_toolchain-d8cb9c2c168cd64000eaa6eda0781a9615a26ffe", + urls = tf_mirror_urls( + "https://github.com/google-ml-infra/rules_ml_toolchain/archive/d8cb9c2c168cd64000eaa6eda0781a9615a26ffe.tar.gz", + ), +) + +load( + "@rules_ml_toolchain//cc/deps:cc_toolchain_deps.bzl", + "cc_toolchain_deps", +) + +cc_toolchain_deps() + +register_toolchains("@rules_ml_toolchain//cc:linux_x86_64_linux_x86_64") + +register_toolchains("@rules_ml_toolchain//cc:linux_x86_64_linux_x86_64_cuda") + +register_toolchains("@rules_ml_toolchain//cc:linux_aarch64_linux_aarch64") + +register_toolchains("@rules_ml_toolchain//cc:linux_aarch64_linux_aarch64_cuda") + # Initialize the TensorFlow repository and all dependencies. # # The cascade of load() statements and tf_workspace?() calls works around the @@ -54,11 +83,11 @@ rules_shell_dependencies() rules_shell_toolchains() # Initialize hermetic Python -load("@local_xla//third_party/py:python_init_rules.bzl", "python_init_rules") +load("@xla//third_party/py:python_init_rules.bzl", "python_init_rules") python_init_rules() -load("@local_xla//third_party/py:python_init_repositories.bzl", "python_init_repositories") +load("@xla//third_party/py:python_init_repositories.bzl", "python_init_repositories") python_init_repositories( default_python_version = "system", @@ -69,7 +98,6 @@ python_init_repositories( ], local_wheel_workspaces = ["@org_tensorflow//:WORKSPACE"], requirements = { - "3.9": "@org_tensorflow//:requirements_lock_3_9.txt", "3.10": "@org_tensorflow//:requirements_lock_3_10.txt", "3.11": "@org_tensorflow//:requirements_lock_3_11.txt", "3.12": "@org_tensorflow//:requirements_lock_3_12.txt", @@ -77,11 +105,11 @@ python_init_repositories( }, ) -load("@local_xla//third_party/py:python_init_toolchains.bzl", "python_init_toolchains") +load("@xla//third_party/py:python_init_toolchains.bzl", "python_init_toolchains") python_init_toolchains() -load("@local_xla//third_party/py:python_init_pip.bzl", "python_init_pip") +load("@xla//third_party/py:python_init_pip.bzl", "python_init_pip") python_init_pip() @@ -94,13 +122,6 @@ load("@org_tensorflow//tensorflow:workspace2.bzl", "tf_workspace2") tf_workspace2() -# Added to fix macOS compiler support on Tahoe? -#http_archive( -# name = "build_bazel_apple_support", -# sha256 = "1ae6fcf983cff3edab717636f91ad0efff2e5ba75607fdddddfd6ad0dbdfaf10", -# urls = ["https://github.com/bazelbuild/apple_support/releases/download/1.24.5/apple_support.1.24.5.tar.gz"] -#) - load("@org_tensorflow//tensorflow:workspace1.bzl", "tf_workspace1") tf_workspace1() @@ -110,14 +131,20 @@ load("@org_tensorflow//tensorflow:workspace0.bzl", "tf_workspace0") tf_workspace0() load( - "@local_xla//third_party/py:python_wheel.bzl", + "@xla//third_party/py:python_wheel.bzl", + "nvidia_wheel_versions_repository", "python_wheel_version_suffix_repository", ) +nvidia_wheel_versions_repository( + name = "nvidia_wheel_versions", + versions_source = "//ci/official/requirements_updater:nvidia-requirements.txt", +) + python_wheel_version_suffix_repository(name = "tf_wheel_version_suffix") load( - "@rules_ml_toolchain//third_party/gpus/cuda/hermetic:cuda_json_init_repository.bzl", + "@rules_ml_toolchain//gpu/cuda:cuda_json_init_repository.bzl", "cuda_json_init_repository", ) @@ -129,13 +156,19 @@ load( "CUDNN_REDISTRIBUTIONS", ) load( - "@rules_ml_toolchain//third_party/gpus/cuda/hermetic:cuda_redist_init_repositories.bzl", + "@rules_ml_toolchain//gpu/cuda:cuda_redist_init_repositories.bzl", "cuda_redist_init_repositories", "cudnn_redist_init_repository", ) +load( + "@rules_ml_toolchain//gpu/cuda:cuda_redist_versions.bzl", + "REDIST_VERSIONS_TO_BUILD_TEMPLATES", +) +load("@xla//third_party/cccl:workspace.bzl", "CCCL_DIST_DICT", "CCCL_GITHUB_VERSIONS_TO_BUILD_TEMPLATES") cuda_redist_init_repositories( - cuda_redistributions = CUDA_REDISTRIBUTIONS, + cuda_redistributions = CUDA_REDISTRIBUTIONS | CCCL_DIST_DICT, + redist_versions_to_build_templates = REDIST_VERSIONS_TO_BUILD_TEMPLATES | CCCL_GITHUB_VERSIONS_TO_BUILD_TEMPLATES, ) cudnn_redist_init_repository( @@ -143,28 +176,28 @@ cudnn_redist_init_repository( ) load( - "@rules_ml_toolchain//third_party/gpus/cuda/hermetic:cuda_configure.bzl", + "@rules_ml_toolchain//gpu/cuda:cuda_configure.bzl", "cuda_configure", ) cuda_configure(name = "local_config_cuda") load( - "@rules_ml_toolchain//third_party/nccl/hermetic:nccl_redist_init_repository.bzl", + "@rules_ml_toolchain//gpu/nccl:nccl_redist_init_repository.bzl", "nccl_redist_init_repository", ) nccl_redist_init_repository() load( - "@rules_ml_toolchain//third_party/nccl/hermetic:nccl_configure.bzl", + "@rules_ml_toolchain//gpu/nccl:nccl_configure.bzl", "nccl_configure", ) nccl_configure(name = "local_config_nccl") load( - "@rules_ml_toolchain//third_party/nvshmem/hermetic:nvshmem_json_init_repository.bzl", + "@rules_ml_toolchain//gpu/nvshmem:nvshmem_json_init_repository.bzl", "nvshmem_json_init_repository", ) @@ -175,28 +208,10 @@ load( "NVSHMEM_REDISTRIBUTIONS", ) load( - "@rules_ml_toolchain//third_party/nvshmem/hermetic:nvshmem_redist_init_repository.bzl", + "@rules_ml_toolchain//gpu/nvshmem:nvshmem_redist_init_repository.bzl", "nvshmem_redist_init_repository", ) nvshmem_redist_init_repository( nvshmem_redistributions = NVSHMEM_REDISTRIBUTIONS, ) - -load( - "@rules_ml_toolchain//third_party/nvshmem/hermetic:nvshmem_configure.bzl", - "nvshmem_configure", -) - -nvshmem_configure(name = "local_config_nvshmem") - -load( - "@rules_ml_toolchain//cc_toolchain/deps:cc_toolchain_deps.bzl", - "cc_toolchain_deps", -) - -cc_toolchain_deps() - -register_toolchains("@rules_ml_toolchain//cc_toolchain:lx64_lx64") - -register_toolchains("@rules_ml_toolchain//cc_toolchain:lx64_lx64_cuda") \ No newline at end of file diff --git a/tensorflow-core/tensorflow-core-native/scripts/bazel_generate.sh b/tensorflow-core/tensorflow-core-native/scripts/bazel_generate.sh index ab0fd0ec6c1..cb5b82f4461 100755 --- a/tensorflow-core/tensorflow-core-native/scripts/bazel_generate.sh +++ b/tensorflow-core/tensorflow-core-native/scripts/bazel_generate.sh @@ -6,8 +6,7 @@ source $(pwd -P)/scripts/bazel_common.sh echo "Generate sources with Bazel" # Build C/C++ API of TensorFlow itself including a target to generate ops for Java ${BAZEL_CMD:=bazel} --bazelrc=tensorflow.bazelrc $BUILD_FLAGS ${BUILD_USER_FLAGS:-} \ - @org_tensorflow//tensorflow/tools/lib_package:jnilicenses_generate \ - :java_proto_gen_sources + @org_tensorflow//tensorflow/tools/lib_package:libtensorflow_proto :java_proto_gen_sources echo "Rebuilding generated source directories" GEN_SRCS_DIR=src/gen/java @@ -26,5 +25,5 @@ cp -rf $TENSORFLOW_SRCS/core/api_def/base_api $GEN_RESOURCE_DIR/org/tensorflow/ # Copy generated Java protos from source jars echo "Extracting TF/TSL/XLA proto Java sources" cd $GEN_SRCS_DIR -find $TENSORFLOW_BIN $BAZEL_BIN/external/local_tsl/tsl $BAZEL_BIN/external/local_xla/xla -name \*-speed-src.jar -exec jar xf {} \; +find $TENSORFLOW_BIN $BAZEL_BIN/external/tsl/tsl $BAZEL_BIN/external/xla/xla -name \*-speed-src.jar -exec jar xf {} \; rm -rf META-INF diff --git a/tensorflow-core/tensorflow-core-native/scripts/dist_download.sh b/tensorflow-core/tensorflow-core-native/scripts/dist_download.sh index 54ffca74ac0..998e73422e2 100755 --- a/tensorflow-core/tensorflow-core-native/scripts/dist_download.sh +++ b/tensorflow-core/tensorflow-core-native/scripts/dist_download.sh @@ -5,16 +5,16 @@ DOWNLOAD_FOLDER="$1" case ${PLATFORM:-} in 'linux-x86_64') - WHEEL_URL='https://files.pythonhosted.org/packages/1a/9e/594164db23e3e262da1a0e8983258811eff56e5af6b7b6da5eccccb8d4c7/tensorflow_cpu-2.20.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl' + WHEEL_URL='https://files.pythonhosted.org/packages/ac/21/48cd18bfd214042ecb7392e01e016d3dd60b4f1ef13f10954ab472cd3c13/tensorflow_cpu-2.21.0-cp313-cp313-manylinux_2_27_x86_64.whl' ;; 'linux-x86_64-gpu') - WHEEL_URL='https://files.pythonhosted.org/packages/43/fb/8be8547c128613d82a2b006004026d86ed0bd672e913029a98153af4ffab/tensorflow-2.20.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl' + WHEEL_URL='https://files.pythonhosted.org/packages/86/6c/10d075ffc09754c7f10e749ba3c9d46dd809fb007990c7f788128044180c/tensorflow-2.21.0-cp313-cp313-manylinux_2_27_x86_64.whl' ;; 'linux-arm64') - WHEEL_URL='https://files.pythonhosted.org/packages/ea/4c/c1aa90c5cc92e9f7f9c78421e121ef25bae7d378f8d1d4cbad46c6308836/tensorflow-2.20.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl' + WHEEL_URL='https://files.pythonhosted.org/packages/72/72/343b86b4c9bfe28e81f749439f908c1e26aeac73d9f12b8dcdb996eb8ecb/tensorflow-2.21.0-cp313-cp313-manylinux_2_27_aarch64.whl' ;; 'macosx-arm64') - WHEEL_URL='https://files.pythonhosted.org/packages/04/82/af283f402f8d1e9315644a331a5f0f326264c5d1de08262f3de5a5ade422/tensorflow-2.20.0-cp313-cp313-macosx_12_0_arm64.whl' + WHEEL_URL='https://files.pythonhosted.org/packages/40/09/268b45a61be2bce136dabf3a3cd7099c8a984ae398198f71920b4c60c502/tensorflow-2.21.0-cp313-cp313-macosx_12_0_arm64.whl' ;; *) echo "TensorFlow distribution for ${PLATFORM} is not supported for download" @@ -30,9 +30,6 @@ if [[ -n "$WHEEL_URL" ]]; then curl -L $WHEEL_URL --output 'tensorflow.whl' fi yes | unzip -q -u 'tensorflow.whl' # use 'yes' because for some reasons -u does not work on Windows - if [[ "$PLATFORM" == "linux-arm64" ]]; then - cp $DOWNLOAD_FOLDER/tensorflow.libs/* $DOWNLOAD_FOLDER/tensorflow/ - fi fi if [[ -n "$CLIB_URL" ]]; then @@ -47,10 +44,6 @@ cd tensorflow if [[ "$PLATFORM" =~ "linux" ]]; then ln -fs libtensorflow_cc.so.2 libtensorflow_cc.so ln -fs libtensorflow_framework.so.2 libtensorflow_framework.so - if [[ "$PLATFORM" == "linux-arm64" ]]; then - cp ../tensorflow.libs/libomp-f1025659.so.5 libomp-f1025659.so.5 - ln -fs libomp-f1025659.so.5 libomp-f1025659.so - fi elif [[ "$PLATFORM" =~ "macosx" ]]; then ln -fs libtensorflow_cc.2.dylib libtensorflow_cc.dylib ln -fs libtensorflow_framework.2.dylib libtensorflow_framework.dylib diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_View.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_View.java index e3cac3b45a2..0949de62d34 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_View.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TF_TString_View.java @@ -29,4 +29,5 @@ public class TF_TString_View extends Pointer { // NOLINT public native @Cast("size_t") long size(); public native TF_TString_View size(long setter); public native @Cast("const char*") BytePointer ptr(); public native TF_TString_View ptr(BytePointer setter); + public native TStringOwnerCApi owner_ref(); public native TF_TString_View owner_ref(TStringOwnerCApi setter); } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TStringOwnerCApi.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TStringOwnerCApi.java new file mode 100644 index 00000000000..cd37da92516 --- /dev/null +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/TStringOwnerCApi.java @@ -0,0 +1,33 @@ +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE + +package org.tensorflow.internal.c_api; + +import java.nio.*; +import org.bytedeco.javacpp.*; +import org.bytedeco.javacpp.annotation.*; + +import static org.tensorflow.internal.c_api.global.tensorflow.*; + + +@Properties(inherit = org.tensorflow.internal.c_api.presets.tensorflow.class) +public class TStringOwnerCApi extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public TStringOwnerCApi() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public TStringOwnerCApi(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public TStringOwnerCApi(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public TStringOwnerCApi position(long position) { + return (TStringOwnerCApi)super.position(position); + } + @Override public TStringOwnerCApi getPointer(long i) { + return new TStringOwnerCApi((Pointer)this).offsetAddress(i); + } + + public native tstring_owner_ref_t ref(); public native TStringOwnerCApi ref(tstring_owner_ref_t setter); + public native tstring_owner_unref_t unref(); public native TStringOwnerCApi unref(tstring_owner_unref_t setter); + public native Pointer obj(); public native TStringOwnerCApi obj(Pointer setter); // Opaque pointer to the C++ owner object +} diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/global/tensorflow.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/global/tensorflow.java index 48a6a3ded36..243c7165ee0 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/global/tensorflow.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/global/tensorflow.java @@ -32,6 +32,7 @@ public class tensorflow extends org.tensorflow.internal.c_api.presets.tensorflow // #define TENSORFLOW_TSL_PLATFORM_CTSTRING_INTERNAL_H_ // #include +// #include // IWYU pragma: keep, provides bool // #include // #include // #include @@ -75,6 +76,15 @@ public class tensorflow extends org.tensorflow.internal.c_api.presets.tensorflow TF_TSTR_OFFSET = 0x02, TF_TSTR_VIEW = 0x03, TF_TSTR_TYPE_MASK = 0x03; +// Targeting ../tstring_owner_ref_t.java + + +// Targeting ../tstring_owner_unref_t.java + + +// Targeting ../TStringOwnerCApi.java + + // Targeting ../TF_TString_Large.java @@ -141,6 +151,13 @@ public static native void TF_TString_ReserveAmortized(TF_TString str, public static native @Cast("char*") BytePointer TF_TString_Resize(TF_TString str, @Cast("size_t") long new_size, @Cast("char") byte c); +public static native void TF_TString_AssignViewWithOwner(TF_TString dst, + @Cast("const char*") BytePointer src, @Cast("size_t") long size, + TStringOwnerCApi owner_ref); +public static native void TF_TString_AssignViewWithOwner(TF_TString dst, + String src, @Cast("size_t") long size, + TStringOwnerCApi owner_ref); + public static native void TF_TString_AssignView(TF_TString dst, @Cast("const char*") BytePointer src, @Cast("size_t") long size); public static native void TF_TString_AssignView(TF_TString dst, String src, @@ -248,6 +265,9 @@ public static native void TF_TString_Copy(TF_TString dst, String src, // will result in a copy into an owned SMALL or LARGE type, and will not modify // `src'. +// Sets `dst' as an owning VIEW type to `src', taking shared ownership via +// `owner_ref`. If `owner_ref` is null, behaves as TF_TString_AssignView. + // Appends `src' onto `dst'. If `dst' is a VIEW or OFFSET type, it will first // be converted to an owned LARGE or SMALL type. `dst' should not point to // memory owned by `src'. @@ -477,7 +497,8 @@ public static native void TF_TString_Copy(TF_TString dst, String src, TF_INT4 = 29, TF_UINT4 = 30, TF_INT2 = 31, - TF_UINT2 = 32; + TF_UINT2 = 32, + TF_FLOAT4_E2M1FN = 33; // 2 exponent bits, 1 mantissa bit, finite-only // TF_DataTypeSize returns the sizeof() for the underlying type corresponding // to the given TF_DataType enum value. Returns 0 for variable length types @@ -5337,8 +5358,8 @@ public static native void TF_GraphRemoveFunction(TF_Graph g, /** Registers a gradient function for operations of type {@code op_type}. * * Returns true if the function has been registered successfully, false if operation failed or if gradient function is already registered to that {@code op_type}. */ -public static native @Cast("bool") boolean TFJ_RegisterCustomGradient(@Cast("const char*") BytePointer op_type, TFJ_GradFuncAdapter custom_gradient_adapter); -public static native @Cast("bool") boolean TFJ_RegisterCustomGradient(String op_type, TFJ_GradFuncAdapter custom_gradient_adapter); +public static native @Cast("bool") boolean TFJ_RegisterCustomGradient(@Cast("const char*") BytePointer op_type, @Cast("TFJ_GradFuncAdapter") TFJ_GradFuncAdapter custom_gradient_adapter); +public static native @Cast("bool") boolean TFJ_RegisterCustomGradient(@Cast("const char*") String op_type, @Cast("TFJ_GradFuncAdapter") TFJ_GradFuncAdapter custom_gradient_adapter); // #include "tfj_gradients_impl.cc" // include CC file in its header to compile it with JavaCPP diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/tstring_owner_ref_t.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/tstring_owner_ref_t.java new file mode 100644 index 00000000000..a1454d93a00 --- /dev/null +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/tstring_owner_ref_t.java @@ -0,0 +1,22 @@ +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE + +package org.tensorflow.internal.c_api; + +import java.nio.*; +import org.bytedeco.javacpp.*; +import org.bytedeco.javacpp.annotation.*; + +import static org.tensorflow.internal.c_api.global.tensorflow.*; + + +// C-compatible API for tstring shared ownership. + +@Properties(inherit = org.tensorflow.internal.c_api.presets.tensorflow.class) +public class tstring_owner_ref_t extends FunctionPointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public tstring_owner_ref_t(Pointer p) { super(p); } + protected tstring_owner_ref_t() { allocate(); } + private native void allocate(); + public native void call(TStringOwnerCApi self); +} diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/tstring_owner_unref_t.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/tstring_owner_unref_t.java new file mode 100644 index 00000000000..547e149e074 --- /dev/null +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/internal/c_api/tstring_owner_unref_t.java @@ -0,0 +1,19 @@ +// Targeted by JavaCPP version 1.5.12: DO NOT EDIT THIS FILE + +package org.tensorflow.internal.c_api; + +import java.nio.*; +import org.bytedeco.javacpp.*; +import org.bytedeco.javacpp.annotation.*; + +import static org.tensorflow.internal.c_api.global.tensorflow.*; + +@Properties(inherit = org.tensorflow.internal.c_api.presets.tensorflow.class) +public class tstring_owner_unref_t extends FunctionPointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public tstring_owner_unref_t(Pointer p) { super(p); } + protected tstring_owner_unref_t() { allocate(); } + private native void allocate(); + public native @Cast("bool") boolean call(TStringOwnerCApi self); +} diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationDescription.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationDescription.java index 967073358af..610a2e94e39 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationDescription.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationDescription.java @@ -1,13 +1,14 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/framework/allocation_description.proto -// Protobuf Java Version: 4.28.3 +// Protobuf Java Version: 4.31.1 package org.tensorflow.proto; /** * Protobuf type {@code tensorflow.AllocationDescription} */ +@com.google.protobuf.Generated public final class AllocationDescription extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.AllocationDescription) @@ -17,8 +18,8 @@ public final class AllocationDescription extends com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, /* major= */ 4, - /* minor= */ 28, - /* patch= */ 3, + /* minor= */ 31, + /* patch= */ 1, /* suffix= */ "", AllocationDescription.class.getName()); } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationDescriptionOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationDescriptionOrBuilder.java index bb64ef9e0c4..17f0f069d8c 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationDescriptionOrBuilder.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationDescriptionOrBuilder.java @@ -1,10 +1,11 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/framework/allocation_description.proto -// Protobuf Java Version: 4.28.3 +// Protobuf Java Version: 4.31.1 package org.tensorflow.proto; +@com.google.protobuf.Generated public interface AllocationDescriptionOrBuilder extends // @@protoc_insertion_point(interface_extends:tensorflow.AllocationDescription) com.google.protobuf.MessageOrBuilder { diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationDescriptionProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationDescriptionProtos.java index 80ca6baa735..767f668b0c3 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationDescriptionProtos.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationDescriptionProtos.java @@ -1,18 +1,19 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/framework/allocation_description.proto -// Protobuf Java Version: 4.28.3 +// Protobuf Java Version: 4.31.1 package org.tensorflow.proto; +@com.google.protobuf.Generated public final class AllocationDescriptionProtos { private AllocationDescriptionProtos() {} static { com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, /* major= */ 4, - /* minor= */ 28, - /* patch= */ 3, + /* minor= */ 31, + /* patch= */ 1, /* suffix= */ "", AllocationDescriptionProtos.class.getName()); } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationRecord.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationRecord.java index 64ef50b0cce..cb51bf021e9 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationRecord.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationRecord.java @@ -1,7 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/framework/step_stats.proto -// Protobuf Java Version: 4.28.3 +// Protobuf Java Version: 4.31.1 package org.tensorflow.proto; @@ -12,6 +12,7 @@ * * Protobuf type {@code tensorflow.AllocationRecord} */ +@com.google.protobuf.Generated public final class AllocationRecord extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.AllocationRecord) @@ -21,8 +22,8 @@ public final class AllocationRecord extends com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, /* major= */ 4, - /* minor= */ 28, - /* patch= */ 3, + /* minor= */ 31, + /* patch= */ 1, /* suffix= */ "", AllocationRecord.class.getName()); } diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationRecordOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationRecordOrBuilder.java index 4825baf1aaf..52882ca8aa8 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationRecordOrBuilder.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocationRecordOrBuilder.java @@ -1,10 +1,11 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/framework/step_stats.proto -// Protobuf Java Version: 4.28.3 +// Protobuf Java Version: 4.31.1 package org.tensorflow.proto; +@com.google.protobuf.Generated public interface AllocationRecordOrBuilder extends // @@protoc_insertion_point(interface_extends:tensorflow.AllocationRecord) com.google.protobuf.MessageOrBuilder { diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocatorMemoryUsed.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocatorMemoryUsed.java index 49e5a0df53f..e1335d5d9a2 100644 --- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocatorMemoryUsed.java +++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocatorMemoryUsed.java @@ -1,13 +1,14 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // NO CHECKED-IN PROTOBUF GENCODE // source: tensorflow/core/framework/step_stats.proto -// Protobuf Java Version: 4.28.3 +// Protobuf Java Version: 4.31.1 package org.tensorflow.proto; /** * Protobuf type {@code tensorflow.AllocatorMemoryUsed} */ +@com.google.protobuf.Generated public final class AllocatorMemoryUsed extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tensorflow.AllocatorMemoryUsed) @@ -17,8 +18,8 @@ public final class AllocatorMemoryUsed extends com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, /* major= */ 4, - /* minor= */ 28, - /* patch= */ 3, + /* minor= */ 31, + /* patch= */ 1, /* suffix= */ "", AllocatorMemoryUsed.class.getName()); } @@ -573,7 +574,7 @@ public Builder mergeFrom(org.tensorflow.proto.AllocatorMemoryUsed other) { bitField0_ = (bitField0_ & ~0x00000010); allocationRecordsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getAllocationRecordsFieldBuilder() : null; + internalGetAllocationRecordsFieldBuilder() : null; } else { allocationRecordsBuilder_.addAllMessages(other.allocationRecords_); } @@ -1087,7 +1088,7 @@ public Builder removeAllocationRecords(int index) { */ public org.tensorflow.proto.AllocationRecord.Builder getAllocationRecordsBuilder( int index) { - return getAllocationRecordsFieldBuilder().getBuilder(index); + return internalGetAllocationRecordsFieldBuilder().getBuilder(index); } /** *

@@ -1126,7 +1127,7 @@ public org.tensorflow.proto.AllocationRecordOrBuilder getAllocationRecordsOrBuil
      * repeated .tensorflow.AllocationRecord allocation_records = 6;
      */
     public org.tensorflow.proto.AllocationRecord.Builder addAllocationRecordsBuilder() {
-      return getAllocationRecordsFieldBuilder().addBuilder(
+      return internalGetAllocationRecordsFieldBuilder().addBuilder(
           org.tensorflow.proto.AllocationRecord.getDefaultInstance());
     }
     /**
@@ -1138,7 +1139,7 @@ public org.tensorflow.proto.AllocationRecord.Builder addAllocationRecordsBuilder
      */
     public org.tensorflow.proto.AllocationRecord.Builder addAllocationRecordsBuilder(
         int index) {
-      return getAllocationRecordsFieldBuilder().addBuilder(
+      return internalGetAllocationRecordsFieldBuilder().addBuilder(
           index, org.tensorflow.proto.AllocationRecord.getDefaultInstance());
     }
     /**
@@ -1150,11 +1151,11 @@ public org.tensorflow.proto.AllocationRecord.Builder addAllocationRecordsBuilder
      */
     public java.util.List 
          getAllocationRecordsBuilderList() {
-      return getAllocationRecordsFieldBuilder().getBuilderList();
+      return internalGetAllocationRecordsFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.AllocationRecord, org.tensorflow.proto.AllocationRecord.Builder, org.tensorflow.proto.AllocationRecordOrBuilder> 
-        getAllocationRecordsFieldBuilder() {
+        internalGetAllocationRecordsFieldBuilder() {
       if (allocationRecordsBuilder_ == null) {
         allocationRecordsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.AllocationRecord, org.tensorflow.proto.AllocationRecord.Builder, org.tensorflow.proto.AllocationRecordOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocatorMemoryUsedOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocatorMemoryUsedOrBuilder.java
index 64564b22ffa..1b2ab921f83 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocatorMemoryUsedOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AllocatorMemoryUsedOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/step_stats.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface AllocatorMemoryUsedOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.AllocatorMemoryUsed)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDef.java
index eba5e89cca2..307e7ad4b87 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDef.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDef.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/api_def.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -27,6 +27,7 @@
  *
  * Protobuf type {@code tensorflow.ApiDef}
  */
+@com.google.protobuf.Generated
 public final class ApiDef extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.ApiDef)
@@ -36,8 +37,8 @@ public final class ApiDef extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       ApiDef.class.getName());
   }
@@ -121,8 +122,8 @@ public enum Visibility
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         Visibility.class.getName());
     }
@@ -219,7 +220,7 @@ public Visibility findValueByNumber(int number) {
         getDescriptorForType() {
       return getDescriptor();
     }
-    public static final com.google.protobuf.Descriptors.EnumDescriptor
+    public static com.google.protobuf.Descriptors.EnumDescriptor
         getDescriptor() {
       return org.tensorflow.proto.ApiDef.getDescriptor().getEnumTypes().get(0);
     }
@@ -318,8 +319,8 @@ public static final class Endpoint extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         Endpoint.class.getName());
     }
@@ -1106,8 +1107,8 @@ public static final class Arg extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         Arg.class.getName());
     }
@@ -2060,8 +2061,8 @@ public static final class Attr extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         Attr.class.getName());
     }
@@ -2506,7 +2507,7 @@ private Builder(
       private void maybeForceBuilderInitialization() {
         if (com.google.protobuf.GeneratedMessage
                 .alwaysUseFieldBuilders) {
-          getDefaultValueFieldBuilder();
+          internalGetDefaultValueFieldBuilder();
         }
       }
       @java.lang.Override
@@ -2641,7 +2642,7 @@ public Builder mergeFrom(
               } // case 18
               case 26: {
                 input.readMessage(
-                    getDefaultValueFieldBuilder().getBuilder(),
+                    internalGetDefaultValueFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000004;
                 break;
@@ -2982,7 +2983,7 @@ public Builder clearDefaultValue() {
       public org.tensorflow.proto.AttrValue.Builder getDefaultValueBuilder() {
         bitField0_ |= 0x00000004;
         onChanged();
-        return getDefaultValueFieldBuilder().getBuilder();
+        return internalGetDefaultValueFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -3014,7 +3015,7 @@ public org.tensorflow.proto.AttrValueOrBuilder getDefaultValueOrBuilder() {
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.AttrValue, org.tensorflow.proto.AttrValue.Builder, org.tensorflow.proto.AttrValueOrBuilder> 
-          getDefaultValueFieldBuilder() {
+          internalGetDefaultValueFieldBuilder() {
         if (defaultValueBuilder_ == null) {
           defaultValueBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.AttrValue, org.tensorflow.proto.AttrValue.Builder, org.tensorflow.proto.AttrValueOrBuilder>(
@@ -4252,7 +4253,7 @@ public Builder mergeFrom(org.tensorflow.proto.ApiDef other) {
             bitField0_ = (bitField0_ & ~0x00000010);
             endpointBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getEndpointFieldBuilder() : null;
+                 internalGetEndpointFieldBuilder() : null;
           } else {
             endpointBuilder_.addAllMessages(other.endpoint_);
           }
@@ -4278,7 +4279,7 @@ public Builder mergeFrom(org.tensorflow.proto.ApiDef other) {
             bitField0_ = (bitField0_ & ~0x00000020);
             inArgBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getInArgFieldBuilder() : null;
+                 internalGetInArgFieldBuilder() : null;
           } else {
             inArgBuilder_.addAllMessages(other.inArg_);
           }
@@ -4304,7 +4305,7 @@ public Builder mergeFrom(org.tensorflow.proto.ApiDef other) {
             bitField0_ = (bitField0_ & ~0x00000040);
             outArgBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getOutArgFieldBuilder() : null;
+                 internalGetOutArgFieldBuilder() : null;
           } else {
             outArgBuilder_.addAllMessages(other.outArg_);
           }
@@ -4340,7 +4341,7 @@ public Builder mergeFrom(org.tensorflow.proto.ApiDef other) {
             bitField0_ = (bitField0_ & ~0x00000100);
             attrBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getAttrFieldBuilder() : null;
+                 internalGetAttrFieldBuilder() : null;
           } else {
             attrBuilder_.addAllMessages(other.attr_);
           }
@@ -4785,9 +4786,7 @@ public org.tensorflow.proto.ApiDef.Visibility getVisibility() {
      * @return This builder for chaining.
      */
     public Builder setVisibility(org.tensorflow.proto.ApiDef.Visibility value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000008;
       visibility_ = value.getNumber();
       onChanged();
@@ -4984,7 +4983,7 @@ public Builder removeEndpoint(int index) {
      */
     public org.tensorflow.proto.ApiDef.Endpoint.Builder getEndpointBuilder(
         int index) {
-      return getEndpointFieldBuilder().getBuilder(index);
+      return internalGetEndpointFieldBuilder().getBuilder(index);
     }
     /**
      * repeated .tensorflow.ApiDef.Endpoint endpoint = 3;
@@ -5011,7 +5010,7 @@ public org.tensorflow.proto.ApiDef.EndpointOrBuilder getEndpointOrBuilder(
      * repeated .tensorflow.ApiDef.Endpoint endpoint = 3;
      */
     public org.tensorflow.proto.ApiDef.Endpoint.Builder addEndpointBuilder() {
-      return getEndpointFieldBuilder().addBuilder(
+      return internalGetEndpointFieldBuilder().addBuilder(
           org.tensorflow.proto.ApiDef.Endpoint.getDefaultInstance());
     }
     /**
@@ -5019,7 +5018,7 @@ public org.tensorflow.proto.ApiDef.Endpoint.Builder addEndpointBuilder() {
      */
     public org.tensorflow.proto.ApiDef.Endpoint.Builder addEndpointBuilder(
         int index) {
-      return getEndpointFieldBuilder().addBuilder(
+      return internalGetEndpointFieldBuilder().addBuilder(
           index, org.tensorflow.proto.ApiDef.Endpoint.getDefaultInstance());
     }
     /**
@@ -5027,11 +5026,11 @@ public org.tensorflow.proto.ApiDef.Endpoint.Builder addEndpointBuilder(
      */
     public java.util.List 
          getEndpointBuilderList() {
-      return getEndpointFieldBuilder().getBuilderList();
+      return internalGetEndpointFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.ApiDef.Endpoint, org.tensorflow.proto.ApiDef.Endpoint.Builder, org.tensorflow.proto.ApiDef.EndpointOrBuilder> 
-        getEndpointFieldBuilder() {
+        internalGetEndpointFieldBuilder() {
       if (endpointBuilder_ == null) {
         endpointBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.ApiDef.Endpoint, org.tensorflow.proto.ApiDef.Endpoint.Builder, org.tensorflow.proto.ApiDef.EndpointOrBuilder>(
@@ -5224,7 +5223,7 @@ public Builder removeInArg(int index) {
      */
     public org.tensorflow.proto.ApiDef.Arg.Builder getInArgBuilder(
         int index) {
-      return getInArgFieldBuilder().getBuilder(index);
+      return internalGetInArgFieldBuilder().getBuilder(index);
     }
     /**
      * repeated .tensorflow.ApiDef.Arg in_arg = 4;
@@ -5251,7 +5250,7 @@ public org.tensorflow.proto.ApiDef.ArgOrBuilder getInArgOrBuilder(
      * repeated .tensorflow.ApiDef.Arg in_arg = 4;
      */
     public org.tensorflow.proto.ApiDef.Arg.Builder addInArgBuilder() {
-      return getInArgFieldBuilder().addBuilder(
+      return internalGetInArgFieldBuilder().addBuilder(
           org.tensorflow.proto.ApiDef.Arg.getDefaultInstance());
     }
     /**
@@ -5259,7 +5258,7 @@ public org.tensorflow.proto.ApiDef.Arg.Builder addInArgBuilder() {
      */
     public org.tensorflow.proto.ApiDef.Arg.Builder addInArgBuilder(
         int index) {
-      return getInArgFieldBuilder().addBuilder(
+      return internalGetInArgFieldBuilder().addBuilder(
           index, org.tensorflow.proto.ApiDef.Arg.getDefaultInstance());
     }
     /**
@@ -5267,11 +5266,11 @@ public org.tensorflow.proto.ApiDef.Arg.Builder addInArgBuilder(
      */
     public java.util.List 
          getInArgBuilderList() {
-      return getInArgFieldBuilder().getBuilderList();
+      return internalGetInArgFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.ApiDef.Arg, org.tensorflow.proto.ApiDef.Arg.Builder, org.tensorflow.proto.ApiDef.ArgOrBuilder> 
-        getInArgFieldBuilder() {
+        internalGetInArgFieldBuilder() {
       if (inArgBuilder_ == null) {
         inArgBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.ApiDef.Arg, org.tensorflow.proto.ApiDef.Arg.Builder, org.tensorflow.proto.ApiDef.ArgOrBuilder>(
@@ -5464,7 +5463,7 @@ public Builder removeOutArg(int index) {
      */
     public org.tensorflow.proto.ApiDef.Arg.Builder getOutArgBuilder(
         int index) {
-      return getOutArgFieldBuilder().getBuilder(index);
+      return internalGetOutArgFieldBuilder().getBuilder(index);
     }
     /**
      * repeated .tensorflow.ApiDef.Arg out_arg = 5;
@@ -5491,7 +5490,7 @@ public org.tensorflow.proto.ApiDef.ArgOrBuilder getOutArgOrBuilder(
      * repeated .tensorflow.ApiDef.Arg out_arg = 5;
      */
     public org.tensorflow.proto.ApiDef.Arg.Builder addOutArgBuilder() {
-      return getOutArgFieldBuilder().addBuilder(
+      return internalGetOutArgFieldBuilder().addBuilder(
           org.tensorflow.proto.ApiDef.Arg.getDefaultInstance());
     }
     /**
@@ -5499,7 +5498,7 @@ public org.tensorflow.proto.ApiDef.Arg.Builder addOutArgBuilder() {
      */
     public org.tensorflow.proto.ApiDef.Arg.Builder addOutArgBuilder(
         int index) {
-      return getOutArgFieldBuilder().addBuilder(
+      return internalGetOutArgFieldBuilder().addBuilder(
           index, org.tensorflow.proto.ApiDef.Arg.getDefaultInstance());
     }
     /**
@@ -5507,11 +5506,11 @@ public org.tensorflow.proto.ApiDef.Arg.Builder addOutArgBuilder(
      */
     public java.util.List 
          getOutArgBuilderList() {
-      return getOutArgFieldBuilder().getBuilderList();
+      return internalGetOutArgFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.ApiDef.Arg, org.tensorflow.proto.ApiDef.Arg.Builder, org.tensorflow.proto.ApiDef.ArgOrBuilder> 
-        getOutArgFieldBuilder() {
+        internalGetOutArgFieldBuilder() {
       if (outArgBuilder_ == null) {
         outArgBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.ApiDef.Arg, org.tensorflow.proto.ApiDef.Arg.Builder, org.tensorflow.proto.ApiDef.ArgOrBuilder>(
@@ -5869,7 +5868,7 @@ public Builder removeAttr(int index) {
      */
     public org.tensorflow.proto.ApiDef.Attr.Builder getAttrBuilder(
         int index) {
-      return getAttrFieldBuilder().getBuilder(index);
+      return internalGetAttrFieldBuilder().getBuilder(index);
     }
     /**
      * repeated .tensorflow.ApiDef.Attr attr = 6;
@@ -5896,7 +5895,7 @@ public org.tensorflow.proto.ApiDef.AttrOrBuilder getAttrOrBuilder(
      * repeated .tensorflow.ApiDef.Attr attr = 6;
      */
     public org.tensorflow.proto.ApiDef.Attr.Builder addAttrBuilder() {
-      return getAttrFieldBuilder().addBuilder(
+      return internalGetAttrFieldBuilder().addBuilder(
           org.tensorflow.proto.ApiDef.Attr.getDefaultInstance());
     }
     /**
@@ -5904,7 +5903,7 @@ public org.tensorflow.proto.ApiDef.Attr.Builder addAttrBuilder() {
      */
     public org.tensorflow.proto.ApiDef.Attr.Builder addAttrBuilder(
         int index) {
-      return getAttrFieldBuilder().addBuilder(
+      return internalGetAttrFieldBuilder().addBuilder(
           index, org.tensorflow.proto.ApiDef.Attr.getDefaultInstance());
     }
     /**
@@ -5912,11 +5911,11 @@ public org.tensorflow.proto.ApiDef.Attr.Builder addAttrBuilder(
      */
     public java.util.List 
          getAttrBuilderList() {
-      return getAttrFieldBuilder().getBuilderList();
+      return internalGetAttrFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.ApiDef.Attr, org.tensorflow.proto.ApiDef.Attr.Builder, org.tensorflow.proto.ApiDef.AttrOrBuilder> 
-        getAttrFieldBuilder() {
+        internalGetAttrFieldBuilder() {
       if (attrBuilder_ == null) {
         attrBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.ApiDef.Attr, org.tensorflow.proto.ApiDef.Attr.Builder, org.tensorflow.proto.ApiDef.AttrOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDefOrBuilder.java
index 14dadfc1643..ad2c452e12d 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDefOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDefOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/api_def.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface ApiDefOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.ApiDef)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDefProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDefProtos.java
index 8c7940039f2..9323f9275ab 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDefProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDefProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/api_def.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class ApiDefProtos {
   private ApiDefProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       ApiDefProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDefs.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDefs.java
index a260fd1794e..521ccb486ac 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDefs.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDefs.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/api_def.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.ApiDefs}
  */
+@com.google.protobuf.Generated
 public final class ApiDefs extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.ApiDefs)
@@ -17,8 +18,8 @@ public final class ApiDefs extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       ApiDefs.class.getName());
   }
@@ -364,7 +365,7 @@ public Builder mergeFrom(org.tensorflow.proto.ApiDefs other) {
             bitField0_ = (bitField0_ & ~0x00000001);
             opBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getOpFieldBuilder() : null;
+                 internalGetOpFieldBuilder() : null;
           } else {
             opBuilder_.addAllMessages(other.op_);
           }
@@ -606,7 +607,7 @@ public Builder removeOp(int index) {
      */
     public org.tensorflow.proto.ApiDef.Builder getOpBuilder(
         int index) {
-      return getOpFieldBuilder().getBuilder(index);
+      return internalGetOpFieldBuilder().getBuilder(index);
     }
     /**
      * repeated .tensorflow.ApiDef op = 1;
@@ -633,7 +634,7 @@ public org.tensorflow.proto.ApiDefOrBuilder getOpOrBuilder(
      * repeated .tensorflow.ApiDef op = 1;
      */
     public org.tensorflow.proto.ApiDef.Builder addOpBuilder() {
-      return getOpFieldBuilder().addBuilder(
+      return internalGetOpFieldBuilder().addBuilder(
           org.tensorflow.proto.ApiDef.getDefaultInstance());
     }
     /**
@@ -641,7 +642,7 @@ public org.tensorflow.proto.ApiDef.Builder addOpBuilder() {
      */
     public org.tensorflow.proto.ApiDef.Builder addOpBuilder(
         int index) {
-      return getOpFieldBuilder().addBuilder(
+      return internalGetOpFieldBuilder().addBuilder(
           index, org.tensorflow.proto.ApiDef.getDefaultInstance());
     }
     /**
@@ -649,11 +650,11 @@ public org.tensorflow.proto.ApiDef.Builder addOpBuilder(
      */
     public java.util.List 
          getOpBuilderList() {
-      return getOpFieldBuilder().getBuilderList();
+      return internalGetOpFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.ApiDef, org.tensorflow.proto.ApiDef.Builder, org.tensorflow.proto.ApiDefOrBuilder> 
-        getOpFieldBuilder() {
+        internalGetOpFieldBuilder() {
       if (opBuilder_ == null) {
         opBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.ApiDef, org.tensorflow.proto.ApiDef.Builder, org.tensorflow.proto.ApiDefOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDefsOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDefsOrBuilder.java
index b8ebc086863..ac86bddb32f 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDefsOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ApiDefsOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/api_def.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface ApiDefsOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.ApiDefs)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AssetFileDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AssetFileDef.java
index db61fe4a55e..55b11c49683 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AssetFileDef.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AssetFileDef.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/meta_graph.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -13,6 +13,7 @@
  *
  * Protobuf type {@code tensorflow.AssetFileDef}
  */
+@com.google.protobuf.Generated
 public final class AssetFileDef extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.AssetFileDef)
@@ -22,8 +23,8 @@ public final class AssetFileDef extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       AssetFileDef.class.getName());
   }
@@ -348,7 +349,7 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getTensorInfoFieldBuilder();
+        internalGetTensorInfoFieldBuilder();
       }
     }
     @java.lang.Override
@@ -455,7 +456,7 @@ public Builder mergeFrom(
               break;
             case 10: {
               input.readMessage(
-                  getTensorInfoFieldBuilder().getBuilder(),
+                  internalGetTensorInfoFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000001;
               break;
@@ -601,7 +602,7 @@ public Builder clearTensorInfo() {
     public org.tensorflow.proto.TensorInfo.Builder getTensorInfoBuilder() {
       bitField0_ |= 0x00000001;
       onChanged();
-      return getTensorInfoFieldBuilder().getBuilder();
+      return internalGetTensorInfoFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -627,7 +628,7 @@ public org.tensorflow.proto.TensorInfoOrBuilder getTensorInfoOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.TensorInfo, org.tensorflow.proto.TensorInfo.Builder, org.tensorflow.proto.TensorInfoOrBuilder> 
-        getTensorInfoFieldBuilder() {
+        internalGetTensorInfoFieldBuilder() {
       if (tensorInfoBuilder_ == null) {
         tensorInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorInfo, org.tensorflow.proto.TensorInfo.Builder, org.tensorflow.proto.TensorInfoOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AssetFileDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AssetFileDefOrBuilder.java
index 52a03d57c0e..a3c32ffddce 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AssetFileDefOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AssetFileDefOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/meta_graph.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface AssetFileDefOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.AssetFileDef)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AttrValue.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AttrValue.java
index 50282f98466..51eaaa09014 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AttrValue.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AttrValue.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/attr_value.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -14,6 +14,7 @@
  *
  * Protobuf type {@code tensorflow.AttrValue}
  */
+@com.google.protobuf.Generated
 public final class AttrValue extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.AttrValue)
@@ -23,8 +24,8 @@ public final class AttrValue extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       AttrValue.class.getName());
   }
@@ -365,8 +366,8 @@ public static final class ListValue extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         ListValue.class.getName());
     }
@@ -567,8 +568,9 @@ public boolean getB(int index) {
 
     public static final int TYPE_FIELD_NUMBER = 6;
     @SuppressWarnings("serial")
-    private com.google.protobuf.Internal.IntList type_;
-    private static final com.google.protobuf.Internal.IntListAdapter.IntConverter<
+    private com.google.protobuf.Internal.IntList type_ =
+        emptyIntList();
+    private static final     com.google.protobuf.Internal.IntListAdapter.IntConverter<
         org.tensorflow.proto.DataType> type_converter_ =
             new com.google.protobuf.Internal.IntListAdapter.IntConverter<
                 org.tensorflow.proto.DataType>() {
@@ -1172,7 +1174,6 @@ public Builder clear() {
         f_ = emptyFloatList();
         b_ = emptyBooleanList();
         type_ = emptyIntList();
-        bitField0_ = (bitField0_ & ~0x00000010);
         if (shapeBuilder_ == null) {
           shape_ = java.util.Collections.emptyList();
         } else {
@@ -1227,11 +1228,6 @@ public org.tensorflow.proto.AttrValue.ListValue buildPartial() {
       }
 
       private void buildPartialRepeatedFields(org.tensorflow.proto.AttrValue.ListValue result) {
-        if (((bitField0_ & 0x00000010) != 0)) {
-          type_.makeImmutable();
-          bitField0_ = (bitField0_ & ~0x00000010);
-        }
-        result.type_ = type_;
         if (shapeBuilder_ == null) {
           if (((bitField0_ & 0x00000020) != 0)) {
             shape_ = java.util.Collections.unmodifiableList(shape_);
@@ -1279,6 +1275,10 @@ private void buildPartial0(org.tensorflow.proto.AttrValue.ListValue result) {
           b_.makeImmutable();
           result.b_ = b_;
         }
+        if (((from_bitField0_ & 0x00000010) != 0)) {
+          type_.makeImmutable();
+          result.type_ = type_;
+        }
       }
 
       @java.lang.Override
@@ -1340,7 +1340,8 @@ public Builder mergeFrom(org.tensorflow.proto.AttrValue.ListValue other) {
         if (!other.type_.isEmpty()) {
           if (type_.isEmpty()) {
             type_ = other.type_;
-            bitField0_ = (bitField0_ & ~0x00000010);
+            type_.makeImmutable();
+            bitField0_ |= 0x00000010;
           } else {
             ensureTypeIsMutable();
             type_.addAll(other.type_);
@@ -1367,7 +1368,7 @@ public Builder mergeFrom(org.tensorflow.proto.AttrValue.ListValue other) {
               bitField0_ = (bitField0_ & ~0x00000020);
               shapeBuilder_ = 
                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                   getShapeFieldBuilder() : null;
+                   internalGetShapeFieldBuilder() : null;
             } else {
               shapeBuilder_.addAllMessages(other.shape_);
             }
@@ -1393,7 +1394,7 @@ public Builder mergeFrom(org.tensorflow.proto.AttrValue.ListValue other) {
               bitField0_ = (bitField0_ & ~0x00000040);
               tensorBuilder_ = 
                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                   getTensorFieldBuilder() : null;
+                   internalGetTensorFieldBuilder() : null;
             } else {
               tensorBuilder_.addAllMessages(other.tensor_);
             }
@@ -1419,7 +1420,7 @@ public Builder mergeFrom(org.tensorflow.proto.AttrValue.ListValue other) {
               bitField0_ = (bitField0_ & ~0x00000080);
               funcBuilder_ = 
                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                   getFuncFieldBuilder() : null;
+                   internalGetFuncFieldBuilder() : null;
             } else {
               funcBuilder_.addAllMessages(other.func_);
             }
@@ -1515,13 +1516,12 @@ public Builder mergeFrom(
               } // case 48
               case 50: {
                 int length = input.readRawVarint32();
-                int oldLimit = input.pushLimit(length);
-                while(input.getBytesUntilLimit() > 0) {
-                  int tmpRaw = input.readEnum();
-                  ensureTypeIsMutable();
-                  type_.addInt(tmpRaw);
+                int limit = input.pushLimit(length);
+                ensureTypeIsMutable();
+                while (input.getBytesUntilLimit() > 0) {
+                  type_.addInt(input.readEnum());
                 }
-                input.popLimit(oldLimit);
+                input.popLimit(limit);
                 break;
               } // case 50
               case 58: {
@@ -2040,13 +2040,12 @@ public Builder clearB() {
         return this;
       }
 
-      private com.google.protobuf.Internal.IntList type_ =
-        emptyIntList();
+      private com.google.protobuf.Internal.IntList type_ = emptyIntList();
       private void ensureTypeIsMutable() {
-        if (!((bitField0_ & 0x00000010) != 0)) {
+        if (!type_.isModifiable()) {
           type_ = makeMutableCopy(type_);
-          bitField0_ |= 0x00000010;
         }
+        bitField0_ |= 0x00000010;
       }
       /**
        * 
@@ -2095,9 +2094,7 @@ public org.tensorflow.proto.DataType getType(int index) {
        */
       public Builder setType(
           int index, org.tensorflow.proto.DataType value) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
+        if (value == null) { throw new NullPointerException(); }
         ensureTypeIsMutable();
         type_.setInt(index, value.getNumber());
         onChanged();
@@ -2113,9 +2110,7 @@ public Builder setType(
        * @return This builder for chaining.
        */
       public Builder addType(org.tensorflow.proto.DataType value) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
+        if (value == null) { throw new NullPointerException(); }
         ensureTypeIsMutable();
         type_.addInt(value.getNumber());
         onChanged();
@@ -2163,7 +2158,8 @@ public Builder clearType() {
        */
       public java.util.List
       getTypeValueList() {
-        return java.util.Collections.unmodifiableList(type_);
+        type_.makeImmutable();
+        return type_;
       }
       /**
        * 
@@ -2460,7 +2456,7 @@ public Builder removeShape(int index) {
        */
       public org.tensorflow.proto.TensorShapeProto.Builder getShapeBuilder(
           int index) {
-        return getShapeFieldBuilder().getBuilder(index);
+        return internalGetShapeFieldBuilder().getBuilder(index);
       }
       /**
        * 
@@ -2499,7 +2495,7 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder(
        * repeated .tensorflow.TensorShapeProto shape = 7;
        */
       public org.tensorflow.proto.TensorShapeProto.Builder addShapeBuilder() {
-        return getShapeFieldBuilder().addBuilder(
+        return internalGetShapeFieldBuilder().addBuilder(
             org.tensorflow.proto.TensorShapeProto.getDefaultInstance());
       }
       /**
@@ -2511,7 +2507,7 @@ public org.tensorflow.proto.TensorShapeProto.Builder addShapeBuilder() {
        */
       public org.tensorflow.proto.TensorShapeProto.Builder addShapeBuilder(
           int index) {
-        return getShapeFieldBuilder().addBuilder(
+        return internalGetShapeFieldBuilder().addBuilder(
             index, org.tensorflow.proto.TensorShapeProto.getDefaultInstance());
       }
       /**
@@ -2523,11 +2519,11 @@ public org.tensorflow.proto.TensorShapeProto.Builder addShapeBuilder(
        */
       public java.util.List 
            getShapeBuilderList() {
-        return getShapeFieldBuilder().getBuilderList();
+        return internalGetShapeFieldBuilder().getBuilderList();
       }
       private com.google.protobuf.RepeatedFieldBuilder<
           org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> 
-          getShapeFieldBuilder() {
+          internalGetShapeFieldBuilder() {
         if (shapeBuilder_ == null) {
           shapeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder>(
@@ -2772,7 +2768,7 @@ public Builder removeTensor(int index) {
        */
       public org.tensorflow.proto.TensorProto.Builder getTensorBuilder(
           int index) {
-        return getTensorFieldBuilder().getBuilder(index);
+        return internalGetTensorFieldBuilder().getBuilder(index);
       }
       /**
        * 
@@ -2811,7 +2807,7 @@ public org.tensorflow.proto.TensorProtoOrBuilder getTensorOrBuilder(
        * repeated .tensorflow.TensorProto tensor = 8;
        */
       public org.tensorflow.proto.TensorProto.Builder addTensorBuilder() {
-        return getTensorFieldBuilder().addBuilder(
+        return internalGetTensorFieldBuilder().addBuilder(
             org.tensorflow.proto.TensorProto.getDefaultInstance());
       }
       /**
@@ -2823,7 +2819,7 @@ public org.tensorflow.proto.TensorProto.Builder addTensorBuilder() {
        */
       public org.tensorflow.proto.TensorProto.Builder addTensorBuilder(
           int index) {
-        return getTensorFieldBuilder().addBuilder(
+        return internalGetTensorFieldBuilder().addBuilder(
             index, org.tensorflow.proto.TensorProto.getDefaultInstance());
       }
       /**
@@ -2835,11 +2831,11 @@ public org.tensorflow.proto.TensorProto.Builder addTensorBuilder(
        */
       public java.util.List 
            getTensorBuilderList() {
-        return getTensorFieldBuilder().getBuilderList();
+        return internalGetTensorFieldBuilder().getBuilderList();
       }
       private com.google.protobuf.RepeatedFieldBuilder<
           org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> 
-          getTensorFieldBuilder() {
+          internalGetTensorFieldBuilder() {
         if (tensorBuilder_ == null) {
           tensorBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder>(
@@ -3084,7 +3080,7 @@ public Builder removeFunc(int index) {
        */
       public org.tensorflow.proto.NameAttrList.Builder getFuncBuilder(
           int index) {
-        return getFuncFieldBuilder().getBuilder(index);
+        return internalGetFuncFieldBuilder().getBuilder(index);
       }
       /**
        * 
@@ -3123,7 +3119,7 @@ public org.tensorflow.proto.NameAttrListOrBuilder getFuncOrBuilder(
        * repeated .tensorflow.NameAttrList func = 9;
        */
       public org.tensorflow.proto.NameAttrList.Builder addFuncBuilder() {
-        return getFuncFieldBuilder().addBuilder(
+        return internalGetFuncFieldBuilder().addBuilder(
             org.tensorflow.proto.NameAttrList.getDefaultInstance());
       }
       /**
@@ -3135,7 +3131,7 @@ public org.tensorflow.proto.NameAttrList.Builder addFuncBuilder() {
        */
       public org.tensorflow.proto.NameAttrList.Builder addFuncBuilder(
           int index) {
-        return getFuncFieldBuilder().addBuilder(
+        return internalGetFuncFieldBuilder().addBuilder(
             index, org.tensorflow.proto.NameAttrList.getDefaultInstance());
       }
       /**
@@ -3147,11 +3143,11 @@ public org.tensorflow.proto.NameAttrList.Builder addFuncBuilder(
        */
       public java.util.List 
            getFuncBuilderList() {
-        return getFuncFieldBuilder().getBuilderList();
+        return internalGetFuncFieldBuilder().getBuilderList();
       }
       private com.google.protobuf.RepeatedFieldBuilder<
           org.tensorflow.proto.NameAttrList, org.tensorflow.proto.NameAttrList.Builder, org.tensorflow.proto.NameAttrListOrBuilder> 
-          getFuncFieldBuilder() {
+          internalGetFuncFieldBuilder() {
         if (funcBuilder_ == null) {
           funcBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.NameAttrList, org.tensorflow.proto.NameAttrList.Builder, org.tensorflow.proto.NameAttrListOrBuilder>(
@@ -4209,7 +4205,7 @@ public Builder mergeFrom(
               break;
             case 10: {
               input.readMessage(
-                  getListFieldBuilder().getBuilder(),
+                  internalGetListFieldBuilder().getBuilder(),
                   extensionRegistry);
               valueCase_ = 1;
               break;
@@ -4242,14 +4238,14 @@ public Builder mergeFrom(
             } // case 48
             case 58: {
               input.readMessage(
-                  getShapeFieldBuilder().getBuilder(),
+                  internalGetShapeFieldBuilder().getBuilder(),
                   extensionRegistry);
               valueCase_ = 7;
               break;
             } // case 58
             case 66: {
               input.readMessage(
-                  getTensorFieldBuilder().getBuilder(),
+                  internalGetTensorFieldBuilder().getBuilder(),
                   extensionRegistry);
               valueCase_ = 8;
               break;
@@ -4262,7 +4258,7 @@ public Builder mergeFrom(
             } // case 74
             case 82: {
               input.readMessage(
-                  getFuncFieldBuilder().getBuilder(),
+                  internalGetFuncFieldBuilder().getBuilder(),
                   extensionRegistry);
               valueCase_ = 10;
               break;
@@ -4600,9 +4596,7 @@ public org.tensorflow.proto.DataType getType() {
      * @return This builder for chaining.
      */
     public Builder setType(org.tensorflow.proto.DataType value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       valueCase_ = 6;
       value_ = value.getNumber();
       onChanged();
@@ -4757,7 +4751,7 @@ public Builder clearShape() {
      * .tensorflow.TensorShapeProto shape = 7;
      */
     public org.tensorflow.proto.TensorShapeProto.Builder getShapeBuilder() {
-      return getShapeFieldBuilder().getBuilder();
+      return internalGetShapeFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -4786,7 +4780,7 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> 
-        getShapeFieldBuilder() {
+        internalGetShapeFieldBuilder() {
       if (shapeBuilder_ == null) {
         if (!(valueCase_ == 7)) {
           value_ = org.tensorflow.proto.TensorShapeProto.getDefaultInstance();
@@ -4935,7 +4929,7 @@ public Builder clearTensor() {
      * .tensorflow.TensorProto tensor = 8;
      */
     public org.tensorflow.proto.TensorProto.Builder getTensorBuilder() {
-      return getTensorFieldBuilder().getBuilder();
+      return internalGetTensorFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -4964,7 +4958,7 @@ public org.tensorflow.proto.TensorProtoOrBuilder getTensorOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> 
-        getTensorFieldBuilder() {
+        internalGetTensorFieldBuilder() {
       if (tensorBuilder_ == null) {
         if (!(valueCase_ == 8)) {
           value_ = org.tensorflow.proto.TensorProto.getDefaultInstance();
@@ -5113,7 +5107,7 @@ public Builder clearList() {
      * .tensorflow.AttrValue.ListValue list = 1;
      */
     public org.tensorflow.proto.AttrValue.ListValue.Builder getListBuilder() {
-      return getListFieldBuilder().getBuilder();
+      return internalGetListFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -5142,7 +5136,7 @@ public org.tensorflow.proto.AttrValue.ListValueOrBuilder getListOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.AttrValue.ListValue, org.tensorflow.proto.AttrValue.ListValue.Builder, org.tensorflow.proto.AttrValue.ListValueOrBuilder> 
-        getListFieldBuilder() {
+        internalGetListFieldBuilder() {
       if (listBuilder_ == null) {
         if (!(valueCase_ == 1)) {
           value_ = org.tensorflow.proto.AttrValue.ListValue.getDefaultInstance();
@@ -5312,7 +5306,7 @@ public Builder clearFunc() {
      * .tensorflow.NameAttrList func = 10;
      */
     public org.tensorflow.proto.NameAttrList.Builder getFuncBuilder() {
-      return getFuncFieldBuilder().getBuilder();
+      return internalGetFuncFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -5347,7 +5341,7 @@ public org.tensorflow.proto.NameAttrListOrBuilder getFuncOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.NameAttrList, org.tensorflow.proto.NameAttrList.Builder, org.tensorflow.proto.NameAttrListOrBuilder> 
-        getFuncFieldBuilder() {
+        internalGetFuncFieldBuilder() {
       if (funcBuilder_ == null) {
         if (!(valueCase_ == 10)) {
           value_ = org.tensorflow.proto.NameAttrList.getDefaultInstance();
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AttrValueOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AttrValueOrBuilder.java
index 88837631bad..3c90ef57151 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AttrValueOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AttrValueOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/attr_value.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface AttrValueOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.AttrValue)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AttrValueProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AttrValueProtos.java
index e37ba3edf83..c79adb43149 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AttrValueProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AttrValueProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/attr_value.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class AttrValueProtos {
   private AttrValueProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       AttrValueProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AutoParallelOptions.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AutoParallelOptions.java
index 9c98cce7b81..8f3f9321fd5 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AutoParallelOptions.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AutoParallelOptions.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/rewriter_config.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.AutoParallelOptions}
  */
+@com.google.protobuf.Generated
 public final class AutoParallelOptions extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.AutoParallelOptions)
@@ -17,8 +18,8 @@ public final class AutoParallelOptions extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       AutoParallelOptions.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AutoParallelOptionsOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AutoParallelOptionsOrBuilder.java
index 2220bc1d192..5b77cc22916 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AutoParallelOptionsOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AutoParallelOptionsOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/rewriter_config.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface AutoParallelOptionsOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.AutoParallelOptions)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AvailableDeviceInfo.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AvailableDeviceInfo.java
index 174ab3c3307..19d8a8dc32c 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AvailableDeviceInfo.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AvailableDeviceInfo.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/test_log.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.AvailableDeviceInfo}
  */
+@com.google.protobuf.Generated
 public final class AvailableDeviceInfo extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.AvailableDeviceInfo)
@@ -21,8 +22,8 @@ public final class AvailableDeviceInfo extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       AvailableDeviceInfo.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AvailableDeviceInfoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AvailableDeviceInfoOrBuilder.java
index de445a4283f..6ed96b1d0dc 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AvailableDeviceInfoOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/AvailableDeviceInfoOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/test_log.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface AvailableDeviceInfoOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.AvailableDeviceInfo)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BatchingOptions.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BatchingOptions.java
index fb63a3ec488..ea4f716db19 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BatchingOptions.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BatchingOptions.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/config.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.BatchingOptions}
  */
+@com.google.protobuf.Generated
 public final class BatchingOptions extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.BatchingOptions)
@@ -17,8 +18,8 @@ public final class BatchingOptions extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       BatchingOptions.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BatchingOptionsOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BatchingOptionsOrBuilder.java
index f23c6d205d3..13afd39f0f7 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BatchingOptionsOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BatchingOptionsOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/config.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface BatchingOptionsOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.BatchingOptions)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BenchmarkEntries.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BenchmarkEntries.java
index 78647b68d29..768bed79b75 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BenchmarkEntries.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BenchmarkEntries.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/test_log.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.BenchmarkEntries}
  */
+@com.google.protobuf.Generated
 public final class BenchmarkEntries extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.BenchmarkEntries)
@@ -17,8 +18,8 @@ public final class BenchmarkEntries extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       BenchmarkEntries.class.getName());
   }
@@ -364,7 +365,7 @@ public Builder mergeFrom(org.tensorflow.proto.BenchmarkEntries other) {
             bitField0_ = (bitField0_ & ~0x00000001);
             entryBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getEntryFieldBuilder() : null;
+                 internalGetEntryFieldBuilder() : null;
           } else {
             entryBuilder_.addAllMessages(other.entry_);
           }
@@ -606,7 +607,7 @@ public Builder removeEntry(int index) {
      */
     public org.tensorflow.proto.BenchmarkEntry.Builder getEntryBuilder(
         int index) {
-      return getEntryFieldBuilder().getBuilder(index);
+      return internalGetEntryFieldBuilder().getBuilder(index);
     }
     /**
      * repeated .tensorflow.BenchmarkEntry entry = 1;
@@ -633,7 +634,7 @@ public org.tensorflow.proto.BenchmarkEntryOrBuilder getEntryOrBuilder(
      * repeated .tensorflow.BenchmarkEntry entry = 1;
      */
     public org.tensorflow.proto.BenchmarkEntry.Builder addEntryBuilder() {
-      return getEntryFieldBuilder().addBuilder(
+      return internalGetEntryFieldBuilder().addBuilder(
           org.tensorflow.proto.BenchmarkEntry.getDefaultInstance());
     }
     /**
@@ -641,7 +642,7 @@ public org.tensorflow.proto.BenchmarkEntry.Builder addEntryBuilder() {
      */
     public org.tensorflow.proto.BenchmarkEntry.Builder addEntryBuilder(
         int index) {
-      return getEntryFieldBuilder().addBuilder(
+      return internalGetEntryFieldBuilder().addBuilder(
           index, org.tensorflow.proto.BenchmarkEntry.getDefaultInstance());
     }
     /**
@@ -649,11 +650,11 @@ public org.tensorflow.proto.BenchmarkEntry.Builder addEntryBuilder(
      */
     public java.util.List 
          getEntryBuilderList() {
-      return getEntryFieldBuilder().getBuilderList();
+      return internalGetEntryFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.BenchmarkEntry, org.tensorflow.proto.BenchmarkEntry.Builder, org.tensorflow.proto.BenchmarkEntryOrBuilder> 
-        getEntryFieldBuilder() {
+        internalGetEntryFieldBuilder() {
       if (entryBuilder_ == null) {
         entryBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.BenchmarkEntry, org.tensorflow.proto.BenchmarkEntry.Builder, org.tensorflow.proto.BenchmarkEntryOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BenchmarkEntriesOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BenchmarkEntriesOrBuilder.java
index 7f439a05b87..a505ffd5527 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BenchmarkEntriesOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BenchmarkEntriesOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/test_log.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface BenchmarkEntriesOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.BenchmarkEntries)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BenchmarkEntry.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BenchmarkEntry.java
index 7b41d4e7a15..4da85f64984 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BenchmarkEntry.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BenchmarkEntry.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/test_log.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -18,6 +18,7 @@
  *
  * Protobuf type {@code tensorflow.BenchmarkEntry}
  */
+@com.google.protobuf.Generated
 public final class BenchmarkEntry extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.BenchmarkEntry)
@@ -27,8 +28,8 @@ public final class BenchmarkEntry extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       BenchmarkEntry.class.getName());
   }
@@ -743,13 +744,13 @@ public Builder mergeFrom(org.tensorflow.proto.BenchmarkEntry other) {
       if (other.getIters() != 0L) {
         setIters(other.getIters());
       }
-      if (other.getCpuTime() != 0D) {
+      if (java.lang.Double.doubleToRawLongBits(other.getCpuTime()) != 0) {
         setCpuTime(other.getCpuTime());
       }
-      if (other.getWallTime() != 0D) {
+      if (java.lang.Double.doubleToRawLongBits(other.getWallTime()) != 0) {
         setWallTime(other.getWallTime());
       }
-      if (other.getThroughput() != 0D) {
+      if (java.lang.Double.doubleToRawLongBits(other.getThroughput()) != 0) {
         setThroughput(other.getThroughput());
       }
       internalGetMutableExtras().mergeFrom(
@@ -775,7 +776,7 @@ public Builder mergeFrom(org.tensorflow.proto.BenchmarkEntry other) {
             bitField0_ = (bitField0_ & ~0x00000040);
             metricsBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getMetricsFieldBuilder() : null;
+                 internalGetMetricsFieldBuilder() : null;
           } else {
             metricsBuilder_.addAllMessages(other.metrics_);
           }
@@ -1576,7 +1577,7 @@ public Builder removeMetrics(int index) {
      */
     public org.tensorflow.proto.MetricEntry.Builder getMetricsBuilder(
         int index) {
-      return getMetricsFieldBuilder().getBuilder(index);
+      return internalGetMetricsFieldBuilder().getBuilder(index);
     }
     /**
      * 
@@ -1618,7 +1619,7 @@ public org.tensorflow.proto.MetricEntryOrBuilder getMetricsOrBuilder(
      * repeated .tensorflow.MetricEntry metrics = 7;
      */
     public org.tensorflow.proto.MetricEntry.Builder addMetricsBuilder() {
-      return getMetricsFieldBuilder().addBuilder(
+      return internalGetMetricsFieldBuilder().addBuilder(
           org.tensorflow.proto.MetricEntry.getDefaultInstance());
     }
     /**
@@ -1631,7 +1632,7 @@ public org.tensorflow.proto.MetricEntry.Builder addMetricsBuilder() {
      */
     public org.tensorflow.proto.MetricEntry.Builder addMetricsBuilder(
         int index) {
-      return getMetricsFieldBuilder().addBuilder(
+      return internalGetMetricsFieldBuilder().addBuilder(
           index, org.tensorflow.proto.MetricEntry.getDefaultInstance());
     }
     /**
@@ -1644,11 +1645,11 @@ public org.tensorflow.proto.MetricEntry.Builder addMetricsBuilder(
      */
     public java.util.List 
          getMetricsBuilderList() {
-      return getMetricsFieldBuilder().getBuilderList();
+      return internalGetMetricsFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.MetricEntry, org.tensorflow.proto.MetricEntry.Builder, org.tensorflow.proto.MetricEntryOrBuilder> 
-        getMetricsFieldBuilder() {
+        internalGetMetricsFieldBuilder() {
       if (metricsBuilder_ == null) {
         metricsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.MetricEntry, org.tensorflow.proto.MetricEntry.Builder, org.tensorflow.proto.MetricEntryOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BenchmarkEntryOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BenchmarkEntryOrBuilder.java
index 9e699bd4b76..2ac3cd182d3 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BenchmarkEntryOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BenchmarkEntryOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/test_log.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface BenchmarkEntryOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.BenchmarkEntry)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BfcMemoryMap.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BfcMemoryMap.java
index d84aebde9c7..97c575c1ac5 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BfcMemoryMap.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BfcMemoryMap.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/bfc_memory_map.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class BfcMemoryMap {
   private BfcMemoryMap() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       BfcMemoryMap.class.getName());
   }
@@ -75,8 +76,8 @@ public static final class MemAllocatorStats extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         MemAllocatorStats.class.getName());
     }
@@ -479,7 +480,7 @@ public Builder mergeFrom(org.tensorflow.proto.BfcMemoryMap.MemAllocatorStats oth
         if (other.getLargestAllocSize() != 0L) {
           setLargestAllocSize(other.getLargestAllocSize());
         }
-        if (other.getFragmentationMetric() != 0F) {
+        if (java.lang.Float.floatToRawIntBits(other.getFragmentationMetric()) != 0) {
           setFragmentationMetric(other.getFragmentationMetric());
         }
         this.mergeUnknownFields(other.getUnknownFields());
@@ -837,8 +838,8 @@ public static final class MemChunk extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         MemChunk.class.getName());
     }
@@ -1900,8 +1901,8 @@ public static final class BinSummary extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         BinSummary.class.getName());
     }
@@ -2608,8 +2609,8 @@ public static final class SnapShot extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         SnapShot.class.getName());
     }
@@ -3203,8 +3204,8 @@ public static final class MemoryDump extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         MemoryDump.class.getName());
     }
@@ -3665,10 +3666,10 @@ private Builder(
       private void maybeForceBuilderInitialization() {
         if (com.google.protobuf.GeneratedMessage
                 .alwaysUseFieldBuilders) {
-          getBinSummaryFieldBuilder();
-          getChunkFieldBuilder();
-          getSnapShotFieldBuilder();
-          getStatsFieldBuilder();
+          internalGetBinSummaryFieldBuilder();
+          internalGetChunkFieldBuilder();
+          internalGetSnapShotFieldBuilder();
+          internalGetStatsFieldBuilder();
         }
       }
       @java.lang.Override
@@ -3816,7 +3817,7 @@ public Builder mergeFrom(org.tensorflow.proto.BfcMemoryMap.MemoryDump other) {
               bitField0_ = (bitField0_ & ~0x00000002);
               binSummaryBuilder_ = 
                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                   getBinSummaryFieldBuilder() : null;
+                   internalGetBinSummaryFieldBuilder() : null;
             } else {
               binSummaryBuilder_.addAllMessages(other.binSummary_);
             }
@@ -3842,7 +3843,7 @@ public Builder mergeFrom(org.tensorflow.proto.BfcMemoryMap.MemoryDump other) {
               bitField0_ = (bitField0_ & ~0x00000004);
               chunkBuilder_ = 
                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                   getChunkFieldBuilder() : null;
+                   internalGetChunkFieldBuilder() : null;
             } else {
               chunkBuilder_.addAllMessages(other.chunk_);
             }
@@ -3868,7 +3869,7 @@ public Builder mergeFrom(org.tensorflow.proto.BfcMemoryMap.MemoryDump other) {
               bitField0_ = (bitField0_ & ~0x00000008);
               snapShotBuilder_ = 
                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                   getSnapShotFieldBuilder() : null;
+                   internalGetSnapShotFieldBuilder() : null;
             } else {
               snapShotBuilder_.addAllMessages(other.snapShot_);
             }
@@ -3949,7 +3950,7 @@ public Builder mergeFrom(
               } // case 34
               case 42: {
                 input.readMessage(
-                    getStatsFieldBuilder().getBuilder(),
+                    internalGetStatsFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000010;
                 break;
@@ -4223,7 +4224,7 @@ public Builder removeBinSummary(int index) {
        */
       public org.tensorflow.proto.BfcMemoryMap.BinSummary.Builder getBinSummaryBuilder(
           int index) {
-        return getBinSummaryFieldBuilder().getBuilder(index);
+        return internalGetBinSummaryFieldBuilder().getBuilder(index);
       }
       /**
        * repeated .tensorflow.BinSummary bin_summary = 2;
@@ -4250,7 +4251,7 @@ public org.tensorflow.proto.BfcMemoryMap.BinSummaryOrBuilder getBinSummaryOrBuil
        * repeated .tensorflow.BinSummary bin_summary = 2;
        */
       public org.tensorflow.proto.BfcMemoryMap.BinSummary.Builder addBinSummaryBuilder() {
-        return getBinSummaryFieldBuilder().addBuilder(
+        return internalGetBinSummaryFieldBuilder().addBuilder(
             org.tensorflow.proto.BfcMemoryMap.BinSummary.getDefaultInstance());
       }
       /**
@@ -4258,7 +4259,7 @@ public org.tensorflow.proto.BfcMemoryMap.BinSummary.Builder addBinSummaryBuilder
        */
       public org.tensorflow.proto.BfcMemoryMap.BinSummary.Builder addBinSummaryBuilder(
           int index) {
-        return getBinSummaryFieldBuilder().addBuilder(
+        return internalGetBinSummaryFieldBuilder().addBuilder(
             index, org.tensorflow.proto.BfcMemoryMap.BinSummary.getDefaultInstance());
       }
       /**
@@ -4266,11 +4267,11 @@ public org.tensorflow.proto.BfcMemoryMap.BinSummary.Builder addBinSummaryBuilder
        */
       public java.util.List 
            getBinSummaryBuilderList() {
-        return getBinSummaryFieldBuilder().getBuilderList();
+        return internalGetBinSummaryFieldBuilder().getBuilderList();
       }
       private com.google.protobuf.RepeatedFieldBuilder<
           org.tensorflow.proto.BfcMemoryMap.BinSummary, org.tensorflow.proto.BfcMemoryMap.BinSummary.Builder, org.tensorflow.proto.BfcMemoryMap.BinSummaryOrBuilder> 
-          getBinSummaryFieldBuilder() {
+          internalGetBinSummaryFieldBuilder() {
         if (binSummaryBuilder_ == null) {
           binSummaryBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.BfcMemoryMap.BinSummary, org.tensorflow.proto.BfcMemoryMap.BinSummary.Builder, org.tensorflow.proto.BfcMemoryMap.BinSummaryOrBuilder>(
@@ -4463,7 +4464,7 @@ public Builder removeChunk(int index) {
        */
       public org.tensorflow.proto.BfcMemoryMap.MemChunk.Builder getChunkBuilder(
           int index) {
-        return getChunkFieldBuilder().getBuilder(index);
+        return internalGetChunkFieldBuilder().getBuilder(index);
       }
       /**
        * repeated .tensorflow.MemChunk chunk = 3;
@@ -4490,7 +4491,7 @@ public org.tensorflow.proto.BfcMemoryMap.MemChunkOrBuilder getChunkOrBuilder(
        * repeated .tensorflow.MemChunk chunk = 3;
        */
       public org.tensorflow.proto.BfcMemoryMap.MemChunk.Builder addChunkBuilder() {
-        return getChunkFieldBuilder().addBuilder(
+        return internalGetChunkFieldBuilder().addBuilder(
             org.tensorflow.proto.BfcMemoryMap.MemChunk.getDefaultInstance());
       }
       /**
@@ -4498,7 +4499,7 @@ public org.tensorflow.proto.BfcMemoryMap.MemChunk.Builder addChunkBuilder() {
        */
       public org.tensorflow.proto.BfcMemoryMap.MemChunk.Builder addChunkBuilder(
           int index) {
-        return getChunkFieldBuilder().addBuilder(
+        return internalGetChunkFieldBuilder().addBuilder(
             index, org.tensorflow.proto.BfcMemoryMap.MemChunk.getDefaultInstance());
       }
       /**
@@ -4506,11 +4507,11 @@ public org.tensorflow.proto.BfcMemoryMap.MemChunk.Builder addChunkBuilder(
        */
       public java.util.List 
            getChunkBuilderList() {
-        return getChunkFieldBuilder().getBuilderList();
+        return internalGetChunkFieldBuilder().getBuilderList();
       }
       private com.google.protobuf.RepeatedFieldBuilder<
           org.tensorflow.proto.BfcMemoryMap.MemChunk, org.tensorflow.proto.BfcMemoryMap.MemChunk.Builder, org.tensorflow.proto.BfcMemoryMap.MemChunkOrBuilder> 
-          getChunkFieldBuilder() {
+          internalGetChunkFieldBuilder() {
         if (chunkBuilder_ == null) {
           chunkBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.BfcMemoryMap.MemChunk, org.tensorflow.proto.BfcMemoryMap.MemChunk.Builder, org.tensorflow.proto.BfcMemoryMap.MemChunkOrBuilder>(
@@ -4703,7 +4704,7 @@ public Builder removeSnapShot(int index) {
        */
       public org.tensorflow.proto.BfcMemoryMap.SnapShot.Builder getSnapShotBuilder(
           int index) {
-        return getSnapShotFieldBuilder().getBuilder(index);
+        return internalGetSnapShotFieldBuilder().getBuilder(index);
       }
       /**
        * repeated .tensorflow.SnapShot snap_shot = 4;
@@ -4730,7 +4731,7 @@ public org.tensorflow.proto.BfcMemoryMap.SnapShotOrBuilder getSnapShotOrBuilder(
        * repeated .tensorflow.SnapShot snap_shot = 4;
        */
       public org.tensorflow.proto.BfcMemoryMap.SnapShot.Builder addSnapShotBuilder() {
-        return getSnapShotFieldBuilder().addBuilder(
+        return internalGetSnapShotFieldBuilder().addBuilder(
             org.tensorflow.proto.BfcMemoryMap.SnapShot.getDefaultInstance());
       }
       /**
@@ -4738,7 +4739,7 @@ public org.tensorflow.proto.BfcMemoryMap.SnapShot.Builder addSnapShotBuilder() {
        */
       public org.tensorflow.proto.BfcMemoryMap.SnapShot.Builder addSnapShotBuilder(
           int index) {
-        return getSnapShotFieldBuilder().addBuilder(
+        return internalGetSnapShotFieldBuilder().addBuilder(
             index, org.tensorflow.proto.BfcMemoryMap.SnapShot.getDefaultInstance());
       }
       /**
@@ -4746,11 +4747,11 @@ public org.tensorflow.proto.BfcMemoryMap.SnapShot.Builder addSnapShotBuilder(
        */
       public java.util.List 
            getSnapShotBuilderList() {
-        return getSnapShotFieldBuilder().getBuilderList();
+        return internalGetSnapShotFieldBuilder().getBuilderList();
       }
       private com.google.protobuf.RepeatedFieldBuilder<
           org.tensorflow.proto.BfcMemoryMap.SnapShot, org.tensorflow.proto.BfcMemoryMap.SnapShot.Builder, org.tensorflow.proto.BfcMemoryMap.SnapShotOrBuilder> 
-          getSnapShotFieldBuilder() {
+          internalGetSnapShotFieldBuilder() {
         if (snapShotBuilder_ == null) {
           snapShotBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.BfcMemoryMap.SnapShot, org.tensorflow.proto.BfcMemoryMap.SnapShot.Builder, org.tensorflow.proto.BfcMemoryMap.SnapShotOrBuilder>(
@@ -4854,7 +4855,7 @@ public Builder clearStats() {
       public org.tensorflow.proto.BfcMemoryMap.MemAllocatorStats.Builder getStatsBuilder() {
         bitField0_ |= 0x00000010;
         onChanged();
-        return getStatsFieldBuilder().getBuilder();
+        return internalGetStatsFieldBuilder().getBuilder();
       }
       /**
        * .tensorflow.MemAllocatorStats stats = 5;
@@ -4872,7 +4873,7 @@ public org.tensorflow.proto.BfcMemoryMap.MemAllocatorStatsOrBuilder getStatsOrBu
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.BfcMemoryMap.MemAllocatorStats, org.tensorflow.proto.BfcMemoryMap.MemAllocatorStats.Builder, org.tensorflow.proto.BfcMemoryMap.MemAllocatorStatsOrBuilder> 
-          getStatsFieldBuilder() {
+          internalGetStatsFieldBuilder() {
         if (statsBuilder_ == null) {
           statsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.BfcMemoryMap.MemAllocatorStats, org.tensorflow.proto.BfcMemoryMap.MemAllocatorStats.Builder, org.tensorflow.proto.BfcMemoryMap.MemAllocatorStatsOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BuildConfiguration.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BuildConfiguration.java
index 5924c47cbc4..24d76a8e774 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BuildConfiguration.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BuildConfiguration.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/test_log.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.BuildConfiguration}
  */
+@com.google.protobuf.Generated
 public final class BuildConfiguration extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.BuildConfiguration)
@@ -17,8 +18,8 @@ public final class BuildConfiguration extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       BuildConfiguration.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BuildConfigurationOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BuildConfigurationOrBuilder.java
index 4e529158905..0a0d7b2ab3b 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BuildConfigurationOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BuildConfigurationOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/test_log.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface BuildConfigurationOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.BuildConfiguration)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BundleEntryProto.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BundleEntryProto.java
index 778eb17b5d2..68292027a91 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BundleEntryProto.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BundleEntryProto.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/tensor_bundle.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.BundleEntryProto}
  */
+@com.google.protobuf.Generated
 public final class BundleEntryProto extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.BundleEntryProto)
@@ -21,8 +22,8 @@ public final class BundleEntryProto extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       BundleEntryProto.class.getName());
   }
@@ -513,8 +514,8 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getShapeFieldBuilder();
-        getSlicesFieldBuilder();
+        internalGetShapeFieldBuilder();
+        internalGetSlicesFieldBuilder();
       }
     }
     @java.lang.Override
@@ -659,7 +660,7 @@ public Builder mergeFrom(org.tensorflow.proto.BundleEntryProto other) {
             bitField0_ = (bitField0_ & ~0x00000040);
             slicesBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getSlicesFieldBuilder() : null;
+                 internalGetSlicesFieldBuilder() : null;
           } else {
             slicesBuilder_.addAllMessages(other.slices_);
           }
@@ -698,7 +699,7 @@ public Builder mergeFrom(
             } // case 8
             case 18: {
               input.readMessage(
-                  getShapeFieldBuilder().getBuilder(),
+                  internalGetShapeFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000002;
               break;
@@ -803,9 +804,7 @@ public org.tensorflow.proto.DataType getDtype() {
      * @return This builder for chaining.
      */
     public Builder setDtype(org.tensorflow.proto.DataType value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000001;
       dtype_ = value.getNumber();
       onChanged();
@@ -917,7 +916,7 @@ public Builder clearShape() {
     public org.tensorflow.proto.TensorShapeProto.Builder getShapeBuilder() {
       bitField0_ |= 0x00000002;
       onChanged();
-      return getShapeFieldBuilder().getBuilder();
+      return internalGetShapeFieldBuilder().getBuilder();
     }
     /**
      * .tensorflow.TensorShapeProto shape = 2;
@@ -935,7 +934,7 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> 
-        getShapeFieldBuilder() {
+        internalGetShapeFieldBuilder() {
       if (shapeBuilder_ == null) {
         shapeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder>(
@@ -1412,7 +1411,7 @@ public Builder removeSlices(int index) {
      */
     public org.tensorflow.proto.TensorSliceProto.Builder getSlicesBuilder(
         int index) {
-      return getSlicesFieldBuilder().getBuilder(index);
+      return internalGetSlicesFieldBuilder().getBuilder(index);
     }
     /**
      * 
@@ -1469,7 +1468,7 @@ public org.tensorflow.proto.TensorSliceProtoOrBuilder getSlicesOrBuilder(
      * repeated .tensorflow.TensorSliceProto slices = 7;
      */
     public org.tensorflow.proto.TensorSliceProto.Builder addSlicesBuilder() {
-      return getSlicesFieldBuilder().addBuilder(
+      return internalGetSlicesFieldBuilder().addBuilder(
           org.tensorflow.proto.TensorSliceProto.getDefaultInstance());
     }
     /**
@@ -1487,7 +1486,7 @@ public org.tensorflow.proto.TensorSliceProto.Builder addSlicesBuilder() {
      */
     public org.tensorflow.proto.TensorSliceProto.Builder addSlicesBuilder(
         int index) {
-      return getSlicesFieldBuilder().addBuilder(
+      return internalGetSlicesFieldBuilder().addBuilder(
           index, org.tensorflow.proto.TensorSliceProto.getDefaultInstance());
     }
     /**
@@ -1505,11 +1504,11 @@ public org.tensorflow.proto.TensorSliceProto.Builder addSlicesBuilder(
      */
     public java.util.List 
          getSlicesBuilderList() {
-      return getSlicesFieldBuilder().getBuilderList();
+      return internalGetSlicesFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.TensorSliceProto, org.tensorflow.proto.TensorSliceProto.Builder, org.tensorflow.proto.TensorSliceProtoOrBuilder> 
-        getSlicesFieldBuilder() {
+        internalGetSlicesFieldBuilder() {
       if (slicesBuilder_ == null) {
         slicesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.TensorSliceProto, org.tensorflow.proto.TensorSliceProto.Builder, org.tensorflow.proto.TensorSliceProtoOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BundleEntryProtoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BundleEntryProtoOrBuilder.java
index cc082e079da..a9eed07e791 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BundleEntryProtoOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BundleEntryProtoOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/tensor_bundle.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface BundleEntryProtoOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.BundleEntryProto)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BundleHeaderProto.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BundleHeaderProto.java
index b3794d41c2e..ad3391c8a65 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BundleHeaderProto.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BundleHeaderProto.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/tensor_bundle.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -18,6 +18,7 @@
  *
  * Protobuf type {@code tensorflow.BundleHeaderProto}
  */
+@com.google.protobuf.Generated
 public final class BundleHeaderProto extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.BundleHeaderProto)
@@ -27,8 +28,8 @@ public final class BundleHeaderProto extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       BundleHeaderProto.class.getName());
   }
@@ -81,8 +82,8 @@ public enum Endianness
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         Endianness.class.getName());
     }
@@ -150,7 +151,7 @@ public Endianness findValueByNumber(int number) {
         getDescriptorForType() {
       return getDescriptor();
     }
-    public static final com.google.protobuf.Descriptors.EnumDescriptor
+    public static com.google.protobuf.Descriptors.EnumDescriptor
         getDescriptor() {
       return org.tensorflow.proto.BundleHeaderProto.getDescriptor().getEnumTypes().get(0);
     }
@@ -476,7 +477,7 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getVersionFieldBuilder();
+        internalGetVersionFieldBuilder();
       }
     }
     @java.lang.Override
@@ -598,7 +599,7 @@ public Builder mergeFrom(
             } // case 16
             case 26: {
               input.readMessage(
-                  getVersionFieldBuilder().getBuilder(),
+                  internalGetVersionFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000004;
               break;
@@ -698,9 +699,7 @@ public org.tensorflow.proto.BundleHeaderProto.Endianness getEndianness() {
      * @return This builder for chaining.
      */
     public Builder setEndianness(org.tensorflow.proto.BundleHeaderProto.Endianness value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000002;
       endianness_ = value.getNumber();
       onChanged();
@@ -836,7 +835,7 @@ public Builder clearVersion() {
     public org.tensorflow.proto.VersionDef.Builder getVersionBuilder() {
       bitField0_ |= 0x00000004;
       onChanged();
-      return getVersionFieldBuilder().getBuilder();
+      return internalGetVersionFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -862,7 +861,7 @@ public org.tensorflow.proto.VersionDefOrBuilder getVersionOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.VersionDef, org.tensorflow.proto.VersionDef.Builder, org.tensorflow.proto.VersionDefOrBuilder> 
-        getVersionFieldBuilder() {
+        internalGetVersionFieldBuilder() {
       if (versionBuilder_ == null) {
         versionBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.VersionDef, org.tensorflow.proto.VersionDef.Builder, org.tensorflow.proto.VersionDefOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BundleHeaderProtoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BundleHeaderProtoOrBuilder.java
index af4013c645d..e487eb9771a 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BundleHeaderProtoOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BundleHeaderProtoOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/tensor_bundle.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface BundleHeaderProtoOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.BundleHeaderProto)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BytesList.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BytesList.java
index 2f6bc835be9..37d78b62b2d 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BytesList.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BytesList.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/example/feature.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -13,6 +13,7 @@
  *
  * Protobuf type {@code tensorflow.BytesList}
  */
+@com.google.protobuf.Generated
 public final class BytesList extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.BytesList)
@@ -22,8 +23,8 @@ public final class BytesList extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       BytesList.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BytesListOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BytesListOrBuilder.java
index aedd4074e8e..163d0486fc6 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BytesListOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/BytesListOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/example/feature.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface BytesListOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.BytesList)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CPUInfo.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CPUInfo.java
index 035624d0f53..9541e623a08 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CPUInfo.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CPUInfo.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/test_log.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.CPUInfo}
  */
+@com.google.protobuf.Generated
 public final class CPUInfo extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.CPUInfo)
@@ -17,8 +18,8 @@ public final class CPUInfo extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       CPUInfo.class.getName());
   }
@@ -643,7 +644,7 @@ public Builder mergeFrom(org.tensorflow.proto.CPUInfo other) {
       if (other.getNumCoresAllowed() != 0L) {
         setNumCoresAllowed(other.getNumCoresAllowed());
       }
-      if (other.getMhzPerCpu() != 0D) {
+      if (java.lang.Double.doubleToRawLongBits(other.getMhzPerCpu()) != 0) {
         setMhzPerCpu(other.getMhzPerCpu());
       }
       if (!other.getCpuInfo().isEmpty()) {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CPUInfoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CPUInfoOrBuilder.java
index 7989860564f..23465ab8b77 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CPUInfoOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CPUInfoOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/test_log.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface CPUInfoOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.CPUInfo)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CallableOptions.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CallableOptions.java
index 5e11341845b..d05ecd2cc20 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CallableOptions.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CallableOptions.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/config.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -15,6 +15,7 @@
  *
  * Protobuf type {@code tensorflow.CallableOptions}
  */
+@com.google.protobuf.Generated
 public final class CallableOptions extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.CallableOptions)
@@ -24,8 +25,8 @@ public final class CallableOptions extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       CallableOptions.class.getName());
   }
@@ -1081,8 +1082,8 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getRunOptionsFieldBuilder();
-        getTensorConnectionFieldBuilder();
+        internalGetRunOptionsFieldBuilder();
+        internalGetTensorConnectionFieldBuilder();
       }
     }
     @java.lang.Override
@@ -1254,7 +1255,7 @@ public Builder mergeFrom(org.tensorflow.proto.CallableOptions other) {
             bitField0_ = (bitField0_ & ~0x00000010);
             tensorConnectionBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getTensorConnectionFieldBuilder() : null;
+                 internalGetTensorConnectionFieldBuilder() : null;
           } else {
             tensorConnectionBuilder_.addAllMessages(other.tensorConnection_);
           }
@@ -1315,7 +1316,7 @@ public Builder mergeFrom(
             } // case 26
             case 34: {
               input.readMessage(
-                  getRunOptionsFieldBuilder().getBuilder(),
+                  internalGetRunOptionsFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000008;
               break;
@@ -1960,7 +1961,7 @@ public Builder clearRunOptions() {
     public org.tensorflow.proto.RunOptions.Builder getRunOptionsBuilder() {
       bitField0_ |= 0x00000008;
       onChanged();
-      return getRunOptionsFieldBuilder().getBuilder();
+      return internalGetRunOptionsFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -1986,7 +1987,7 @@ public org.tensorflow.proto.RunOptionsOrBuilder getRunOptionsOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.RunOptions, org.tensorflow.proto.RunOptions.Builder, org.tensorflow.proto.RunOptionsOrBuilder> 
-        getRunOptionsFieldBuilder() {
+        internalGetRunOptionsFieldBuilder() {
       if (runOptionsBuilder_ == null) {
         runOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.RunOptions, org.tensorflow.proto.RunOptions.Builder, org.tensorflow.proto.RunOptionsOrBuilder>(
@@ -2256,7 +2257,7 @@ public Builder removeTensorConnection(int index) {
      */
     public org.tensorflow.proto.TensorConnection.Builder getTensorConnectionBuilder(
         int index) {
-      return getTensorConnectionFieldBuilder().getBuilder(index);
+      return internalGetTensorConnectionFieldBuilder().getBuilder(index);
     }
     /**
      * 
@@ -2301,7 +2302,7 @@ public org.tensorflow.proto.TensorConnectionOrBuilder getTensorConnectionOrBuild
      * repeated .tensorflow.TensorConnection tensor_connection = 5;
      */
     public org.tensorflow.proto.TensorConnection.Builder addTensorConnectionBuilder() {
-      return getTensorConnectionFieldBuilder().addBuilder(
+      return internalGetTensorConnectionFieldBuilder().addBuilder(
           org.tensorflow.proto.TensorConnection.getDefaultInstance());
     }
     /**
@@ -2315,7 +2316,7 @@ public org.tensorflow.proto.TensorConnection.Builder addTensorConnectionBuilder(
      */
     public org.tensorflow.proto.TensorConnection.Builder addTensorConnectionBuilder(
         int index) {
-      return getTensorConnectionFieldBuilder().addBuilder(
+      return internalGetTensorConnectionFieldBuilder().addBuilder(
           index, org.tensorflow.proto.TensorConnection.getDefaultInstance());
     }
     /**
@@ -2329,11 +2330,11 @@ public org.tensorflow.proto.TensorConnection.Builder addTensorConnectionBuilder(
      */
     public java.util.List 
          getTensorConnectionBuilderList() {
-      return getTensorConnectionFieldBuilder().getBuilderList();
+      return internalGetTensorConnectionFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.TensorConnection, org.tensorflow.proto.TensorConnection.Builder, org.tensorflow.proto.TensorConnectionOrBuilder> 
-        getTensorConnectionFieldBuilder() {
+        internalGetTensorConnectionFieldBuilder() {
       if (tensorConnectionBuilder_ == null) {
         tensorConnectionBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.TensorConnection, org.tensorflow.proto.TensorConnection.Builder, org.tensorflow.proto.TensorConnectionOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CallableOptionsOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CallableOptionsOrBuilder.java
index 422a47d8e89..5377377211c 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CallableOptionsOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CallableOptionsOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/config.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface CallableOptionsOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.CallableOptions)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterDef.java
index e0593e89941..3f3c4fc101a 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterDef.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterDef.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/cluster.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.ClusterDef}
  */
+@com.google.protobuf.Generated
 public final class ClusterDef extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.ClusterDef)
@@ -21,8 +22,8 @@ public final class ClusterDef extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       ClusterDef.class.getName());
   }
@@ -392,7 +393,7 @@ public Builder mergeFrom(org.tensorflow.proto.ClusterDef other) {
             bitField0_ = (bitField0_ & ~0x00000001);
             jobBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getJobFieldBuilder() : null;
+                 internalGetJobFieldBuilder() : null;
           } else {
             jobBuilder_.addAllMessages(other.job_);
           }
@@ -686,7 +687,7 @@ public Builder removeJob(int index) {
      */
     public org.tensorflow.proto.JobDef.Builder getJobBuilder(
         int index) {
-      return getJobFieldBuilder().getBuilder(index);
+      return internalGetJobFieldBuilder().getBuilder(index);
     }
     /**
      * 
@@ -725,7 +726,7 @@ public org.tensorflow.proto.JobDefOrBuilder getJobOrBuilder(
      * repeated .tensorflow.JobDef job = 1;
      */
     public org.tensorflow.proto.JobDef.Builder addJobBuilder() {
-      return getJobFieldBuilder().addBuilder(
+      return internalGetJobFieldBuilder().addBuilder(
           org.tensorflow.proto.JobDef.getDefaultInstance());
     }
     /**
@@ -737,7 +738,7 @@ public org.tensorflow.proto.JobDef.Builder addJobBuilder() {
      */
     public org.tensorflow.proto.JobDef.Builder addJobBuilder(
         int index) {
-      return getJobFieldBuilder().addBuilder(
+      return internalGetJobFieldBuilder().addBuilder(
           index, org.tensorflow.proto.JobDef.getDefaultInstance());
     }
     /**
@@ -749,11 +750,11 @@ public org.tensorflow.proto.JobDef.Builder addJobBuilder(
      */
     public java.util.List 
          getJobBuilderList() {
-      return getJobFieldBuilder().getBuilderList();
+      return internalGetJobFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.JobDef, org.tensorflow.proto.JobDef.Builder, org.tensorflow.proto.JobDefOrBuilder> 
-        getJobFieldBuilder() {
+        internalGetJobFieldBuilder() {
       if (jobBuilder_ == null) {
         jobBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.JobDef, org.tensorflow.proto.JobDef.Builder, org.tensorflow.proto.JobDefOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterDefOrBuilder.java
index ffec98bc2ca..ce3d4a017d0 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterDefOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterDefOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/cluster.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface ClusterDefOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.ClusterDef)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterDeviceFilters.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterDeviceFilters.java
index 250aec1e1ad..d78ada96a8b 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterDeviceFilters.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterDeviceFilters.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/device_filters.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.ClusterDeviceFilters}
  */
+@com.google.protobuf.Generated
 public final class ClusterDeviceFilters extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.ClusterDeviceFilters)
@@ -21,8 +22,8 @@ public final class ClusterDeviceFilters extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       ClusterDeviceFilters.class.getName());
   }
@@ -372,7 +373,7 @@ public Builder mergeFrom(org.tensorflow.proto.ClusterDeviceFilters other) {
             bitField0_ = (bitField0_ & ~0x00000001);
             jobsBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getJobsFieldBuilder() : null;
+                 internalGetJobsFieldBuilder() : null;
           } else {
             jobsBuilder_.addAllMessages(other.jobs_);
           }
@@ -614,7 +615,7 @@ public Builder removeJobs(int index) {
      */
     public org.tensorflow.proto.JobDeviceFilters.Builder getJobsBuilder(
         int index) {
-      return getJobsFieldBuilder().getBuilder(index);
+      return internalGetJobsFieldBuilder().getBuilder(index);
     }
     /**
      * repeated .tensorflow.JobDeviceFilters jobs = 1;
@@ -641,7 +642,7 @@ public org.tensorflow.proto.JobDeviceFiltersOrBuilder getJobsOrBuilder(
      * repeated .tensorflow.JobDeviceFilters jobs = 1;
      */
     public org.tensorflow.proto.JobDeviceFilters.Builder addJobsBuilder() {
-      return getJobsFieldBuilder().addBuilder(
+      return internalGetJobsFieldBuilder().addBuilder(
           org.tensorflow.proto.JobDeviceFilters.getDefaultInstance());
     }
     /**
@@ -649,7 +650,7 @@ public org.tensorflow.proto.JobDeviceFilters.Builder addJobsBuilder() {
      */
     public org.tensorflow.proto.JobDeviceFilters.Builder addJobsBuilder(
         int index) {
-      return getJobsFieldBuilder().addBuilder(
+      return internalGetJobsFieldBuilder().addBuilder(
           index, org.tensorflow.proto.JobDeviceFilters.getDefaultInstance());
     }
     /**
@@ -657,11 +658,11 @@ public org.tensorflow.proto.JobDeviceFilters.Builder addJobsBuilder(
      */
     public java.util.List 
          getJobsBuilderList() {
-      return getJobsFieldBuilder().getBuilderList();
+      return internalGetJobsFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.JobDeviceFilters, org.tensorflow.proto.JobDeviceFilters.Builder, org.tensorflow.proto.JobDeviceFiltersOrBuilder> 
-        getJobsFieldBuilder() {
+        internalGetJobsFieldBuilder() {
       if (jobsBuilder_ == null) {
         jobsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.JobDeviceFilters, org.tensorflow.proto.JobDeviceFilters.Builder, org.tensorflow.proto.JobDeviceFiltersOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterDeviceFiltersOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterDeviceFiltersOrBuilder.java
index 56c5436ebcd..3cee6b07f48 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterDeviceFiltersOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterDeviceFiltersOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/device_filters.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface ClusterDeviceFiltersOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.ClusterDeviceFilters)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterProtos.java
index 5f55a24f00b..425a699c9dd 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ClusterProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/cluster.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class ClusterProtos {
   private ClusterProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       ClusterProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CodeLocation.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CodeLocation.java
index c19176e024a..db30f4d8fd4 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CodeLocation.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CodeLocation.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/debug_event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -14,6 +14,7 @@
  *
  * Protobuf type {@code tensorflow.CodeLocation}
  */
+@com.google.protobuf.Generated
 public final class CodeLocation extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.CodeLocation)
@@ -23,8 +24,8 @@ public final class CodeLocation extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       CodeLocation.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CodeLocationOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CodeLocationOrBuilder.java
index 4c1cc378579..b454cf6fc2a 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CodeLocationOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CodeLocationOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/debug_event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface CodeLocationOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.CodeLocation)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CollectionDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CollectionDef.java
index e072f35c64f..c1651729603 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CollectionDef.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CollectionDef.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/meta_graph.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -73,6 +73,7 @@
  *
  * Protobuf type {@code tensorflow.CollectionDef}
  */
+@com.google.protobuf.Generated
 public final class CollectionDef extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.CollectionDef)
@@ -82,8 +83,8 @@ public final class CollectionDef extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       CollectionDef.class.getName());
   }
@@ -161,8 +162,8 @@ public static final class NodeList extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         NodeList.class.getName());
     }
@@ -758,8 +759,8 @@ public static final class BytesList extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         BytesList.class.getName());
     }
@@ -1311,8 +1312,8 @@ public static final class Int64List extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         Int64List.class.getName());
     }
@@ -1873,8 +1874,8 @@ public static final class FloatList extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         FloatList.class.getName());
     }
@@ -2446,8 +2447,8 @@ public static final class AnyList extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         AnyList.class.getName());
     }
@@ -2797,7 +2798,7 @@ public Builder mergeFrom(org.tensorflow.proto.CollectionDef.AnyList other) {
               bitField0_ = (bitField0_ & ~0x00000001);
               valueBuilder_ = 
                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                   getValueFieldBuilder() : null;
+                   internalGetValueFieldBuilder() : null;
             } else {
               valueBuilder_.addAllMessages(other.value_);
             }
@@ -3039,7 +3040,7 @@ public Builder removeValue(int index) {
        */
       public com.google.protobuf.Any.Builder getValueBuilder(
           int index) {
-        return getValueFieldBuilder().getBuilder(index);
+        return internalGetValueFieldBuilder().getBuilder(index);
       }
       /**
        * repeated .google.protobuf.Any value = 1;
@@ -3066,7 +3067,7 @@ public com.google.protobuf.AnyOrBuilder getValueOrBuilder(
        * repeated .google.protobuf.Any value = 1;
        */
       public com.google.protobuf.Any.Builder addValueBuilder() {
-        return getValueFieldBuilder().addBuilder(
+        return internalGetValueFieldBuilder().addBuilder(
             com.google.protobuf.Any.getDefaultInstance());
       }
       /**
@@ -3074,7 +3075,7 @@ public com.google.protobuf.Any.Builder addValueBuilder() {
        */
       public com.google.protobuf.Any.Builder addValueBuilder(
           int index) {
-        return getValueFieldBuilder().addBuilder(
+        return internalGetValueFieldBuilder().addBuilder(
             index, com.google.protobuf.Any.getDefaultInstance());
       }
       /**
@@ -3082,11 +3083,11 @@ public com.google.protobuf.Any.Builder addValueBuilder(
        */
       public java.util.List 
            getValueBuilderList() {
-        return getValueFieldBuilder().getBuilderList();
+        return internalGetValueFieldBuilder().getBuilderList();
       }
       private com.google.protobuf.RepeatedFieldBuilder<
           com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> 
-          getValueFieldBuilder() {
+          internalGetValueFieldBuilder() {
         if (valueBuilder_ == null) {
           valueBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
               com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>(
@@ -3825,35 +3826,35 @@ public Builder mergeFrom(
               break;
             case 10: {
               input.readMessage(
-                  getNodeListFieldBuilder().getBuilder(),
+                  internalGetNodeListFieldBuilder().getBuilder(),
                   extensionRegistry);
               kindCase_ = 1;
               break;
             } // case 10
             case 18: {
               input.readMessage(
-                  getBytesListFieldBuilder().getBuilder(),
+                  internalGetBytesListFieldBuilder().getBuilder(),
                   extensionRegistry);
               kindCase_ = 2;
               break;
             } // case 18
             case 26: {
               input.readMessage(
-                  getInt64ListFieldBuilder().getBuilder(),
+                  internalGetInt64ListFieldBuilder().getBuilder(),
                   extensionRegistry);
               kindCase_ = 3;
               break;
             } // case 26
             case 34: {
               input.readMessage(
-                  getFloatListFieldBuilder().getBuilder(),
+                  internalGetFloatListFieldBuilder().getBuilder(),
                   extensionRegistry);
               kindCase_ = 4;
               break;
             } // case 34
             case 42: {
               input.readMessage(
-                  getAnyListFieldBuilder().getBuilder(),
+                  internalGetAnyListFieldBuilder().getBuilder(),
                   extensionRegistry);
               kindCase_ = 5;
               break;
@@ -3994,7 +3995,7 @@ public Builder clearNodeList() {
      * .tensorflow.CollectionDef.NodeList node_list = 1;
      */
     public org.tensorflow.proto.CollectionDef.NodeList.Builder getNodeListBuilder() {
-      return getNodeListFieldBuilder().getBuilder();
+      return internalGetNodeListFieldBuilder().getBuilder();
     }
     /**
      * .tensorflow.CollectionDef.NodeList node_list = 1;
@@ -4015,7 +4016,7 @@ public org.tensorflow.proto.CollectionDef.NodeListOrBuilder getNodeListOrBuilder
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.CollectionDef.NodeList, org.tensorflow.proto.CollectionDef.NodeList.Builder, org.tensorflow.proto.CollectionDef.NodeListOrBuilder> 
-        getNodeListFieldBuilder() {
+        internalGetNodeListFieldBuilder() {
       if (nodeListBuilder_ == null) {
         if (!(kindCase_ == 1)) {
           kind_ = org.tensorflow.proto.CollectionDef.NodeList.getDefaultInstance();
@@ -4136,7 +4137,7 @@ public Builder clearBytesList() {
      * .tensorflow.CollectionDef.BytesList bytes_list = 2;
      */
     public org.tensorflow.proto.CollectionDef.BytesList.Builder getBytesListBuilder() {
-      return getBytesListFieldBuilder().getBuilder();
+      return internalGetBytesListFieldBuilder().getBuilder();
     }
     /**
      * .tensorflow.CollectionDef.BytesList bytes_list = 2;
@@ -4157,7 +4158,7 @@ public org.tensorflow.proto.CollectionDef.BytesListOrBuilder getBytesListOrBuild
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.CollectionDef.BytesList, org.tensorflow.proto.CollectionDef.BytesList.Builder, org.tensorflow.proto.CollectionDef.BytesListOrBuilder> 
-        getBytesListFieldBuilder() {
+        internalGetBytesListFieldBuilder() {
       if (bytesListBuilder_ == null) {
         if (!(kindCase_ == 2)) {
           kind_ = org.tensorflow.proto.CollectionDef.BytesList.getDefaultInstance();
@@ -4278,7 +4279,7 @@ public Builder clearInt64List() {
      * .tensorflow.CollectionDef.Int64List int64_list = 3;
      */
     public org.tensorflow.proto.CollectionDef.Int64List.Builder getInt64ListBuilder() {
-      return getInt64ListFieldBuilder().getBuilder();
+      return internalGetInt64ListFieldBuilder().getBuilder();
     }
     /**
      * .tensorflow.CollectionDef.Int64List int64_list = 3;
@@ -4299,7 +4300,7 @@ public org.tensorflow.proto.CollectionDef.Int64ListOrBuilder getInt64ListOrBuild
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.CollectionDef.Int64List, org.tensorflow.proto.CollectionDef.Int64List.Builder, org.tensorflow.proto.CollectionDef.Int64ListOrBuilder> 
-        getInt64ListFieldBuilder() {
+        internalGetInt64ListFieldBuilder() {
       if (int64ListBuilder_ == null) {
         if (!(kindCase_ == 3)) {
           kind_ = org.tensorflow.proto.CollectionDef.Int64List.getDefaultInstance();
@@ -4420,7 +4421,7 @@ public Builder clearFloatList() {
      * .tensorflow.CollectionDef.FloatList float_list = 4;
      */
     public org.tensorflow.proto.CollectionDef.FloatList.Builder getFloatListBuilder() {
-      return getFloatListFieldBuilder().getBuilder();
+      return internalGetFloatListFieldBuilder().getBuilder();
     }
     /**
      * .tensorflow.CollectionDef.FloatList float_list = 4;
@@ -4441,7 +4442,7 @@ public org.tensorflow.proto.CollectionDef.FloatListOrBuilder getFloatListOrBuild
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.CollectionDef.FloatList, org.tensorflow.proto.CollectionDef.FloatList.Builder, org.tensorflow.proto.CollectionDef.FloatListOrBuilder> 
-        getFloatListFieldBuilder() {
+        internalGetFloatListFieldBuilder() {
       if (floatListBuilder_ == null) {
         if (!(kindCase_ == 4)) {
           kind_ = org.tensorflow.proto.CollectionDef.FloatList.getDefaultInstance();
@@ -4562,7 +4563,7 @@ public Builder clearAnyList() {
      * .tensorflow.CollectionDef.AnyList any_list = 5;
      */
     public org.tensorflow.proto.CollectionDef.AnyList.Builder getAnyListBuilder() {
-      return getAnyListFieldBuilder().getBuilder();
+      return internalGetAnyListFieldBuilder().getBuilder();
     }
     /**
      * .tensorflow.CollectionDef.AnyList any_list = 5;
@@ -4583,7 +4584,7 @@ public org.tensorflow.proto.CollectionDef.AnyListOrBuilder getAnyListOrBuilder()
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.CollectionDef.AnyList, org.tensorflow.proto.CollectionDef.AnyList.Builder, org.tensorflow.proto.CollectionDef.AnyListOrBuilder> 
-        getAnyListFieldBuilder() {
+        internalGetAnyListFieldBuilder() {
       if (anyListBuilder_ == null) {
         if (!(kindCase_ == 5)) {
           kind_ = org.tensorflow.proto.CollectionDef.AnyList.getDefaultInstance();
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CollectionDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CollectionDefOrBuilder.java
index 0b80d88866e..a8539d52c30 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CollectionDefOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CollectionDefOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/meta_graph.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface CollectionDefOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.CollectionDef)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CommitId.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CommitId.java
index e47f5125f55..9ce1eadc4c0 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CommitId.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CommitId.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/test_log.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.CommitId}
  */
+@com.google.protobuf.Generated
 public final class CommitId extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.CommitId)
@@ -17,8 +18,8 @@ public final class CommitId extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       CommitId.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CommitIdOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CommitIdOrBuilder.java
index 0975a2c537f..8a0b033b067 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CommitIdOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CommitIdOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/test_log.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface CommitIdOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.CommitId)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CompositeTensorVariant.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CompositeTensorVariant.java
index 80fd1875558..f7f338f601d 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CompositeTensorVariant.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CompositeTensorVariant.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/composite_tensor_variant.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class CompositeTensorVariant {
   private CompositeTensorVariant() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       CompositeTensorVariant.class.getName());
   }
@@ -64,8 +65,8 @@ public static final class CompositeTensorVariantMetadata extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         CompositeTensorVariantMetadata.class.getName());
     }
@@ -319,7 +320,7 @@ private Builder(
       private void maybeForceBuilderInitialization() {
         if (com.google.protobuf.GeneratedMessage
                 .alwaysUseFieldBuilders) {
-          getTypeSpecProtoFieldBuilder();
+          internalGetTypeSpecProtoFieldBuilder();
         }
       }
       @java.lang.Override
@@ -417,7 +418,7 @@ public Builder mergeFrom(
                 break;
               case 10: {
                 input.readMessage(
-                    getTypeSpecProtoFieldBuilder().getBuilder(),
+                    internalGetTypeSpecProtoFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000001;
                 break;
@@ -530,7 +531,7 @@ public Builder clearTypeSpecProto() {
       public org.tensorflow.proto.Struct.TypeSpecProto.Builder getTypeSpecProtoBuilder() {
         bitField0_ |= 0x00000001;
         onChanged();
-        return getTypeSpecProtoFieldBuilder().getBuilder();
+        return internalGetTypeSpecProtoFieldBuilder().getBuilder();
       }
       /**
        * .tensorflow.TypeSpecProto type_spec_proto = 1;
@@ -548,7 +549,7 @@ public org.tensorflow.proto.Struct.TypeSpecProtoOrBuilder getTypeSpecProtoOrBuil
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.Struct.TypeSpecProto, org.tensorflow.proto.Struct.TypeSpecProto.Builder, org.tensorflow.proto.Struct.TypeSpecProtoOrBuilder> 
-          getTypeSpecProtoFieldBuilder() {
+          internalGetTypeSpecProtoFieldBuilder() {
         if (typeSpecProtoBuilder_ == null) {
           typeSpecProtoBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Struct.TypeSpecProto, org.tensorflow.proto.Struct.TypeSpecProto.Builder, org.tensorflow.proto.Struct.TypeSpecProtoOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CondContextDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CondContextDef.java
index a75ca0e43fb..81e24b19a64 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CondContextDef.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CondContextDef.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/control_flow.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.CondContextDef}
  */
+@com.google.protobuf.Generated
 public final class CondContextDef extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.CondContextDef)
@@ -21,8 +22,8 @@ public final class CondContextDef extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       CondContextDef.class.getName());
   }
@@ -559,8 +560,8 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getValuesDefFieldBuilder();
-        getNestedContextsFieldBuilder();
+        internalGetValuesDefFieldBuilder();
+        internalGetNestedContextsFieldBuilder();
       }
     }
     @java.lang.Override
@@ -704,7 +705,7 @@ public Builder mergeFrom(org.tensorflow.proto.CondContextDef other) {
             bitField0_ = (bitField0_ & ~0x00000020);
             nestedContextsBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getNestedContextsFieldBuilder() : null;
+                 internalGetNestedContextsFieldBuilder() : null;
           } else {
             nestedContextsBuilder_.addAllMessages(other.nestedContexts_);
           }
@@ -758,7 +759,7 @@ public Builder mergeFrom(
             } // case 32
             case 42: {
               input.readMessage(
-                  getValuesDefFieldBuilder().getBuilder(),
+                  internalGetValuesDefFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000010;
               break;
@@ -1232,7 +1233,7 @@ public Builder clearValuesDef() {
     public org.tensorflow.proto.ValuesDef.Builder getValuesDefBuilder() {
       bitField0_ |= 0x00000010;
       onChanged();
-      return getValuesDefFieldBuilder().getBuilder();
+      return internalGetValuesDefFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -1258,7 +1259,7 @@ public org.tensorflow.proto.ValuesDefOrBuilder getValuesDefOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.ValuesDef, org.tensorflow.proto.ValuesDef.Builder, org.tensorflow.proto.ValuesDefOrBuilder> 
-        getValuesDefFieldBuilder() {
+        internalGetValuesDefFieldBuilder() {
       if (valuesDefBuilder_ == null) {
         valuesDefBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.ValuesDef, org.tensorflow.proto.ValuesDef.Builder, org.tensorflow.proto.ValuesDefOrBuilder>(
@@ -1502,7 +1503,7 @@ public Builder removeNestedContexts(int index) {
      */
     public org.tensorflow.proto.ControlFlowContextDef.Builder getNestedContextsBuilder(
         int index) {
-      return getNestedContextsFieldBuilder().getBuilder(index);
+      return internalGetNestedContextsFieldBuilder().getBuilder(index);
     }
     /**
      * 
@@ -1541,7 +1542,7 @@ public org.tensorflow.proto.ControlFlowContextDefOrBuilder getNestedContextsOrBu
      * repeated .tensorflow.ControlFlowContextDef nested_contexts = 6;
      */
     public org.tensorflow.proto.ControlFlowContextDef.Builder addNestedContextsBuilder() {
-      return getNestedContextsFieldBuilder().addBuilder(
+      return internalGetNestedContextsFieldBuilder().addBuilder(
           org.tensorflow.proto.ControlFlowContextDef.getDefaultInstance());
     }
     /**
@@ -1553,7 +1554,7 @@ public org.tensorflow.proto.ControlFlowContextDef.Builder addNestedContextsBuild
      */
     public org.tensorflow.proto.ControlFlowContextDef.Builder addNestedContextsBuilder(
         int index) {
-      return getNestedContextsFieldBuilder().addBuilder(
+      return internalGetNestedContextsFieldBuilder().addBuilder(
           index, org.tensorflow.proto.ControlFlowContextDef.getDefaultInstance());
     }
     /**
@@ -1565,11 +1566,11 @@ public org.tensorflow.proto.ControlFlowContextDef.Builder addNestedContextsBuild
      */
     public java.util.List 
          getNestedContextsBuilderList() {
-      return getNestedContextsFieldBuilder().getBuilderList();
+      return internalGetNestedContextsFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.ControlFlowContextDef, org.tensorflow.proto.ControlFlowContextDef.Builder, org.tensorflow.proto.ControlFlowContextDefOrBuilder> 
-        getNestedContextsFieldBuilder() {
+        internalGetNestedContextsFieldBuilder() {
       if (nestedContextsBuilder_ == null) {
         nestedContextsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.ControlFlowContextDef, org.tensorflow.proto.ControlFlowContextDef.Builder, org.tensorflow.proto.ControlFlowContextDefOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CondContextDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CondContextDefOrBuilder.java
index e136d8849da..61918f6597f 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CondContextDefOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CondContextDefOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/control_flow.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface CondContextDefOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.CondContextDef)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ConfigProto.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ConfigProto.java
index 08d6ec83d47..d84229b8c5b 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ConfigProto.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ConfigProto.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/config.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -13,6 +13,7 @@
  *
  * Protobuf type {@code tensorflow.ConfigProto}
  */
+@com.google.protobuf.Generated
 public final class ConfigProto extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.ConfigProto)
@@ -22,8 +23,8 @@ public final class ConfigProto extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       ConfigProto.class.getName());
   }
@@ -524,6 +525,42 @@ public interface ExperimentalOrBuilder extends
      * @return The finalizeResourceManager.
      */
     boolean getFinalizeResourceManager();
+
+    /**
+     * 
+     * If set, TF2XLA will dump compilation call arguments to the specified
+     * directory.
+     * 
+ * + * string tf2xla_dump_dir = 35; + * @return The tf2xlaDumpDir. + */ + java.lang.String getTf2XlaDumpDir(); + /** + *
+     * If set, TF2XLA will dump compilation call arguments to the specified
+     * directory.
+     * 
+ * + * string tf2xla_dump_dir = 35; + * @return The bytes for tf2xlaDumpDir. + */ + com.google.protobuf.ByteString + getTf2XlaDumpDirBytes(); + + /** + *
+     * When set to true, the online op cost analysis will be enabled. This
+     * will run the cost analysis once for the first model execution and
+     * use the obtained cost to optimize subsequent executions.
+     * Typically `stream_merge_threshold` should be tuned to set to a non-zero
+     * value when this option is enabled.
+     * 
+ * + * bool online_cost_analysis = 36; + * @return The onlineCostAnalysis. + */ + boolean getOnlineCostAnalysis(); } /** *
@@ -543,8 +580,8 @@ public static final class Experimental extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         Experimental.class.getName());
     }
@@ -556,6 +593,7 @@ private Experimental() {
       collectiveGroupLeader_ = "";
       executorType_ = "";
       mlirBridgeRollout_ = 0;
+      tf2XlaDumpDir_ = "";
     }
 
     public static final com.google.protobuf.Descriptors.Descriptor
@@ -612,8 +650,8 @@ public enum MlirBridgeRollout
         com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
           com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
           /* major= */ 4,
-          /* minor= */ 28,
-          /* patch= */ 3,
+          /* minor= */ 31,
+          /* patch= */ 1,
           /* suffix= */ "",
           MlirBridgeRollout.class.getName());
       }
@@ -699,7 +737,7 @@ public MlirBridgeRollout findValueByNumber(int number) {
           getDescriptorForType() {
         return getDescriptor();
       }
-      public static final com.google.protobuf.Descriptors.EnumDescriptor
+      public static com.google.protobuf.Descriptors.EnumDescriptor
           getDescriptor() {
         return org.tensorflow.proto.ConfigProto.Experimental.getDescriptor().getEnumTypes().get(0);
       }
@@ -1395,6 +1433,74 @@ public boolean getFinalizeResourceManager() {
       return finalizeResourceManager_;
     }
 
+    public static final int TF2XLA_DUMP_DIR_FIELD_NUMBER = 35;
+    @SuppressWarnings("serial")
+    private volatile java.lang.Object tf2XlaDumpDir_ = "";
+    /**
+     * 
+     * If set, TF2XLA will dump compilation call arguments to the specified
+     * directory.
+     * 
+ * + * string tf2xla_dump_dir = 35; + * @return The tf2xlaDumpDir. + */ + @java.lang.Override + public java.lang.String getTf2XlaDumpDir() { + java.lang.Object ref = tf2XlaDumpDir_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tf2XlaDumpDir_ = s; + return s; + } + } + /** + *
+     * If set, TF2XLA will dump compilation call arguments to the specified
+     * directory.
+     * 
+ * + * string tf2xla_dump_dir = 35; + * @return The bytes for tf2xlaDumpDir. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTf2XlaDumpDirBytes() { + java.lang.Object ref = tf2XlaDumpDir_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tf2XlaDumpDir_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ONLINE_COST_ANALYSIS_FIELD_NUMBER = 36; + private boolean onlineCostAnalysis_ = false; + /** + *
+     * When set to true, the online op cost analysis will be enabled. This
+     * will run the cost analysis once for the first model execution and
+     * use the obtained cost to optimize subsequent executions.
+     * Typically `stream_merge_threshold` should be tuned to set to a non-zero
+     * value when this option is enabled.
+     * 
+ * + * bool online_cost_analysis = 36; + * @return The onlineCostAnalysis. + */ + @java.lang.Override + public boolean getOnlineCostAnalysis() { + return onlineCostAnalysis_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -1499,6 +1605,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (finalizeResourceManager_ != false) { output.writeBool(34, finalizeResourceManager_); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tf2XlaDumpDir_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 35, tf2XlaDumpDir_); + } + if (onlineCostAnalysis_ != false) { + output.writeBool(36, onlineCostAnalysis_); + } getUnknownFields().writeTo(output); } @@ -1626,6 +1738,13 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBoolSize(34, finalizeResourceManager_); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tf2XlaDumpDir_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(35, tf2XlaDumpDir_); + } + if (onlineCostAnalysis_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(36, onlineCostAnalysis_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1706,6 +1825,10 @@ public boolean equals(final java.lang.Object obj) { != other.getFinalizeFunctionLibraryRuntime()) return false; if (getFinalizeResourceManager() != other.getFinalizeResourceManager()) return false; + if (!getTf2XlaDumpDir() + .equals(other.getTf2XlaDumpDir())) return false; + if (getOnlineCostAnalysis() + != other.getOnlineCostAnalysis()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1803,6 +1926,11 @@ public int hashCode() { hash = (37 * hash) + FINALIZE_RESOURCE_MANAGER_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getFinalizeResourceManager()); + hash = (37 * hash) + TF2XLA_DUMP_DIR_FIELD_NUMBER; + hash = (53 * hash) + getTf2XlaDumpDir().hashCode(); + hash = (37 * hash) + ONLINE_COST_ANALYSIS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getOnlineCostAnalysis()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1939,8 +2067,8 @@ private Builder( private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage .alwaysUseFieldBuilders) { - getSessionMetadataFieldBuilder(); - getCoordinationConfigFieldBuilder(); + internalGetSessionMetadataFieldBuilder(); + internalGetCoordinationConfigFieldBuilder(); } } @java.lang.Override @@ -1985,6 +2113,8 @@ public Builder clear() { disableEagerExecutorStreamingEnqueue_ = false; finalizeFunctionLibraryRuntime_ = false; finalizeResourceManager_ = false; + tf2XlaDumpDir_ = ""; + onlineCostAnalysis_ = false; return this; } @@ -2115,6 +2245,12 @@ private void buildPartial0(org.tensorflow.proto.ConfigProto.Experimental result) if (((from_bitField0_ & 0x20000000) != 0)) { result.finalizeResourceManager_ = finalizeResourceManager_; } + if (((from_bitField0_ & 0x40000000) != 0)) { + result.tf2XlaDumpDir_ = tf2XlaDumpDir_; + } + if (((from_bitField0_ & 0x80000000) != 0)) { + result.onlineCostAnalysis_ = onlineCostAnalysis_; + } result.bitField0_ |= to_bitField0_; } @@ -2224,6 +2360,14 @@ public Builder mergeFrom(org.tensorflow.proto.ConfigProto.Experimental other) { if (other.getFinalizeResourceManager() != false) { setFinalizeResourceManager(other.getFinalizeResourceManager()); } + if (!other.getTf2XlaDumpDir().isEmpty()) { + tf2XlaDumpDir_ = other.tf2XlaDumpDir_; + bitField0_ |= 0x40000000; + onChanged(); + } + if (other.getOnlineCostAnalysis() != false) { + setOnlineCostAnalysis(other.getOnlineCostAnalysis()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2297,7 +2441,7 @@ public Builder mergeFrom( } // case 80 case 90: { input.readMessage( - getSessionMetadataFieldBuilder().getBuilder(), + internalGetSessionMetadataFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000200; break; @@ -2349,7 +2493,7 @@ public Builder mergeFrom( } // case 176 case 186: { input.readMessage( - getCoordinationConfigFieldBuilder().getBuilder(), + internalGetCoordinationConfigFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x02000000; break; @@ -2404,6 +2548,16 @@ public Builder mergeFrom( bitField0_ |= 0x20000000; break; } // case 272 + case 282: { + tf2XlaDumpDir_ = input.readStringRequireUtf8(); + bitField0_ |= 0x40000000; + break; + } // case 282 + case 288: { + onlineCostAnalysis_ = input.readBool(); + bitField0_ |= 0x80000000; + break; + } // case 288 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -3166,7 +3320,7 @@ public Builder clearSessionMetadata() { public org.tensorflow.proto.SessionMetadata.Builder getSessionMetadataBuilder() { bitField0_ |= 0x00000200; onChanged(); - return getSessionMetadataFieldBuilder().getBuilder(); + return internalGetSessionMetadataFieldBuilder().getBuilder(); } /** *
@@ -3204,7 +3358,7 @@ public org.tensorflow.proto.SessionMetadataOrBuilder getSessionMetadataOrBuilder
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.SessionMetadata, org.tensorflow.proto.SessionMetadata.Builder, org.tensorflow.proto.SessionMetadataOrBuilder> 
-          getSessionMetadataFieldBuilder() {
+          internalGetSessionMetadataFieldBuilder() {
         if (sessionMetadataBuilder_ == null) {
           sessionMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.SessionMetadata, org.tensorflow.proto.SessionMetadata.Builder, org.tensorflow.proto.SessionMetadataOrBuilder>(
@@ -3399,9 +3553,7 @@ public org.tensorflow.proto.ConfigProto.Experimental.MlirBridgeRollout getMlirBr
        * @return This builder for chaining.
        */
       public Builder setMlirBridgeRollout(org.tensorflow.proto.ConfigProto.Experimental.MlirBridgeRollout value) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
+        if (value == null) { throw new NullPointerException(); }
         bitField0_ |= 0x00001000;
         mlirBridgeRollout_ = value.getNumber();
         onChanged();
@@ -4129,7 +4281,7 @@ public Builder clearCoordinationConfig() {
       public org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfig.Builder getCoordinationConfigBuilder() {
         bitField0_ |= 0x02000000;
         onChanged();
-        return getCoordinationConfigFieldBuilder().getBuilder();
+        return internalGetCoordinationConfigFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -4155,7 +4307,7 @@ public org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfigOrBuilde
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfig, org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfig.Builder, org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfigOrBuilder> 
-          getCoordinationConfigFieldBuilder() {
+          internalGetCoordinationConfigFieldBuilder() {
         if (coordinationConfigBuilder_ == null) {
           coordinationConfigBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfig, org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfig.Builder, org.tensorflow.proto.CoordinationConfig.CoordinationServiceConfigOrBuilder>(
@@ -4379,6 +4531,159 @@ public Builder clearFinalizeResourceManager() {
         return this;
       }
 
+      private java.lang.Object tf2XlaDumpDir_ = "";
+      /**
+       * 
+       * If set, TF2XLA will dump compilation call arguments to the specified
+       * directory.
+       * 
+ * + * string tf2xla_dump_dir = 35; + * @return The tf2xlaDumpDir. + */ + public java.lang.String getTf2XlaDumpDir() { + java.lang.Object ref = tf2XlaDumpDir_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tf2XlaDumpDir_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * If set, TF2XLA will dump compilation call arguments to the specified
+       * directory.
+       * 
+ * + * string tf2xla_dump_dir = 35; + * @return The bytes for tf2xlaDumpDir. + */ + public com.google.protobuf.ByteString + getTf2XlaDumpDirBytes() { + java.lang.Object ref = tf2XlaDumpDir_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tf2XlaDumpDir_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * If set, TF2XLA will dump compilation call arguments to the specified
+       * directory.
+       * 
+ * + * string tf2xla_dump_dir = 35; + * @param value The tf2xlaDumpDir to set. + * @return This builder for chaining. + */ + public Builder setTf2XlaDumpDir( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + tf2XlaDumpDir_ = value; + bitField0_ |= 0x40000000; + onChanged(); + return this; + } + /** + *
+       * If set, TF2XLA will dump compilation call arguments to the specified
+       * directory.
+       * 
+ * + * string tf2xla_dump_dir = 35; + * @return This builder for chaining. + */ + public Builder clearTf2XlaDumpDir() { + tf2XlaDumpDir_ = getDefaultInstance().getTf2XlaDumpDir(); + bitField0_ = (bitField0_ & ~0x40000000); + onChanged(); + return this; + } + /** + *
+       * If set, TF2XLA will dump compilation call arguments to the specified
+       * directory.
+       * 
+ * + * string tf2xla_dump_dir = 35; + * @param value The bytes for tf2xlaDumpDir to set. + * @return This builder for chaining. + */ + public Builder setTf2XlaDumpDirBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + tf2XlaDumpDir_ = value; + bitField0_ |= 0x40000000; + onChanged(); + return this; + } + + private boolean onlineCostAnalysis_ ; + /** + *
+       * When set to true, the online op cost analysis will be enabled. This
+       * will run the cost analysis once for the first model execution and
+       * use the obtained cost to optimize subsequent executions.
+       * Typically `stream_merge_threshold` should be tuned to set to a non-zero
+       * value when this option is enabled.
+       * 
+ * + * bool online_cost_analysis = 36; + * @return The onlineCostAnalysis. + */ + @java.lang.Override + public boolean getOnlineCostAnalysis() { + return onlineCostAnalysis_; + } + /** + *
+       * When set to true, the online op cost analysis will be enabled. This
+       * will run the cost analysis once for the first model execution and
+       * use the obtained cost to optimize subsequent executions.
+       * Typically `stream_merge_threshold` should be tuned to set to a non-zero
+       * value when this option is enabled.
+       * 
+ * + * bool online_cost_analysis = 36; + * @param value The onlineCostAnalysis to set. + * @return This builder for chaining. + */ + public Builder setOnlineCostAnalysis(boolean value) { + + onlineCostAnalysis_ = value; + bitField0_ |= 0x80000000; + onChanged(); + return this; + } + /** + *
+       * When set to true, the online op cost analysis will be enabled. This
+       * will run the cost analysis once for the first model execution and
+       * use the obtained cost to optimize subsequent executions.
+       * Typically `stream_merge_threshold` should be tuned to set to a non-zero
+       * value when this option is enabled.
+       * 
+ * + * bool online_cost_analysis = 36; + * @return This builder for chaining. + */ + public Builder clearOnlineCostAnalysis() { + bitField0_ = (bitField0_ & ~0x80000000); + onlineCostAnalysis_ = false; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:tensorflow.ConfigProto.Experimental) } @@ -5602,13 +5907,13 @@ private Builder( private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage .alwaysUseFieldBuilders) { - getSessionInterOpThreadPoolFieldBuilder(); - getGpuOptionsFieldBuilder(); - getPluggableDeviceOptionsFieldBuilder(); - getGraphOptionsFieldBuilder(); - getRpcOptionsFieldBuilder(); - getClusterDefFieldBuilder(); - getExperimentalFieldBuilder(); + internalGetSessionInterOpThreadPoolFieldBuilder(); + internalGetGpuOptionsFieldBuilder(); + internalGetPluggableDeviceOptionsFieldBuilder(); + internalGetGraphOptionsFieldBuilder(); + internalGetRpcOptionsFieldBuilder(); + internalGetClusterDefFieldBuilder(); + internalGetExperimentalFieldBuilder(); } } @java.lang.Override @@ -5829,7 +6134,7 @@ public Builder mergeFrom(org.tensorflow.proto.ConfigProto other) { bitField0_ = (bitField0_ & ~0x00000010); sessionInterOpThreadPoolBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getSessionInterOpThreadPoolFieldBuilder() : null; + internalGetSessionInterOpThreadPoolFieldBuilder() : null; } else { sessionInterOpThreadPoolBuilder_.addAllMessages(other.sessionInterOpThreadPool_); } @@ -5939,7 +6244,7 @@ public Builder mergeFrom( } // case 40 case 50: { input.readMessage( - getGpuOptionsFieldBuilder().getBuilder(), + internalGetGpuOptionsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000080; break; @@ -5961,7 +6266,7 @@ public Builder mergeFrom( } // case 72 case 82: { input.readMessage( - getGraphOptionsFieldBuilder().getBuilder(), + internalGetGraphOptionsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000800; break; @@ -5986,14 +6291,14 @@ public Builder mergeFrom( } // case 98 case 106: { input.readMessage( - getRpcOptionsFieldBuilder().getBuilder(), + internalGetRpcOptionsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00002000; break; } // case 106 case 114: { input.readMessage( - getClusterDefFieldBuilder().getBuilder(), + internalGetClusterDefFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00004000; break; @@ -6005,7 +6310,7 @@ public Builder mergeFrom( } // case 120 case 130: { input.readMessage( - getExperimentalFieldBuilder().getBuilder(), + internalGetExperimentalFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00020000; break; @@ -6017,7 +6322,7 @@ public Builder mergeFrom( } // case 136 case 146: { input.readMessage( - getPluggableDeviceOptionsFieldBuilder().getBuilder(), + internalGetPluggableDeviceOptionsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000100; break; @@ -6898,7 +7203,7 @@ public Builder removeSessionInterOpThreadPool(int index) { */ public org.tensorflow.proto.ThreadPoolOptionProto.Builder getSessionInterOpThreadPoolBuilder( int index) { - return getSessionInterOpThreadPoolFieldBuilder().getBuilder(index); + return internalGetSessionInterOpThreadPoolFieldBuilder().getBuilder(index); } /** *
@@ -6991,7 +7296,7 @@ public org.tensorflow.proto.ThreadPoolOptionProtoOrBuilder getSessionInterOpThre
      * repeated .tensorflow.ThreadPoolOptionProto session_inter_op_thread_pool = 12;
      */
     public org.tensorflow.proto.ThreadPoolOptionProto.Builder addSessionInterOpThreadPoolBuilder() {
-      return getSessionInterOpThreadPoolFieldBuilder().addBuilder(
+      return internalGetSessionInterOpThreadPoolFieldBuilder().addBuilder(
           org.tensorflow.proto.ThreadPoolOptionProto.getDefaultInstance());
     }
     /**
@@ -7021,7 +7326,7 @@ public org.tensorflow.proto.ThreadPoolOptionProto.Builder addSessionInterOpThrea
      */
     public org.tensorflow.proto.ThreadPoolOptionProto.Builder addSessionInterOpThreadPoolBuilder(
         int index) {
-      return getSessionInterOpThreadPoolFieldBuilder().addBuilder(
+      return internalGetSessionInterOpThreadPoolFieldBuilder().addBuilder(
           index, org.tensorflow.proto.ThreadPoolOptionProto.getDefaultInstance());
     }
     /**
@@ -7051,11 +7356,11 @@ public org.tensorflow.proto.ThreadPoolOptionProto.Builder addSessionInterOpThrea
      */
     public java.util.List 
          getSessionInterOpThreadPoolBuilderList() {
-      return getSessionInterOpThreadPoolFieldBuilder().getBuilderList();
+      return internalGetSessionInterOpThreadPoolFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.ThreadPoolOptionProto, org.tensorflow.proto.ThreadPoolOptionProto.Builder, org.tensorflow.proto.ThreadPoolOptionProtoOrBuilder> 
-        getSessionInterOpThreadPoolFieldBuilder() {
+        internalGetSessionInterOpThreadPoolFieldBuilder() {
       if (sessionInterOpThreadPoolBuilder_ == null) {
         sessionInterOpThreadPoolBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.ThreadPoolOptionProto, org.tensorflow.proto.ThreadPoolOptionProto.Builder, org.tensorflow.proto.ThreadPoolOptionProtoOrBuilder>(
@@ -7402,7 +7707,7 @@ public Builder clearGpuOptions() {
     public org.tensorflow.proto.GPUOptions.Builder getGpuOptionsBuilder() {
       bitField0_ |= 0x00000080;
       onChanged();
-      return getGpuOptionsFieldBuilder().getBuilder();
+      return internalGetGpuOptionsFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -7428,7 +7733,7 @@ public org.tensorflow.proto.GPUOptionsOrBuilder getGpuOptionsOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.GPUOptions, org.tensorflow.proto.GPUOptions.Builder, org.tensorflow.proto.GPUOptionsOrBuilder> 
-        getGpuOptionsFieldBuilder() {
+        internalGetGpuOptionsFieldBuilder() {
       if (gpuOptionsBuilder_ == null) {
         gpuOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.GPUOptions, org.tensorflow.proto.GPUOptions.Builder, org.tensorflow.proto.GPUOptionsOrBuilder>(
@@ -7559,7 +7864,7 @@ public Builder clearPluggableDeviceOptions() {
     public org.tensorflow.proto.GPUOptions.Builder getPluggableDeviceOptionsBuilder() {
       bitField0_ |= 0x00000100;
       onChanged();
-      return getPluggableDeviceOptionsFieldBuilder().getBuilder();
+      return internalGetPluggableDeviceOptionsFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -7585,7 +7890,7 @@ public org.tensorflow.proto.GPUOptionsOrBuilder getPluggableDeviceOptionsOrBuild
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.GPUOptions, org.tensorflow.proto.GPUOptions.Builder, org.tensorflow.proto.GPUOptionsOrBuilder> 
-        getPluggableDeviceOptionsFieldBuilder() {
+        internalGetPluggableDeviceOptionsFieldBuilder() {
       if (pluggableDeviceOptionsBuilder_ == null) {
         pluggableDeviceOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.GPUOptions, org.tensorflow.proto.GPUOptions.Builder, org.tensorflow.proto.GPUOptionsOrBuilder>(
@@ -7822,7 +8127,7 @@ public Builder clearGraphOptions() {
     public org.tensorflow.proto.GraphOptions.Builder getGraphOptionsBuilder() {
       bitField0_ |= 0x00000800;
       onChanged();
-      return getGraphOptionsFieldBuilder().getBuilder();
+      return internalGetGraphOptionsFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -7848,7 +8153,7 @@ public org.tensorflow.proto.GraphOptionsOrBuilder getGraphOptionsOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.GraphOptions, org.tensorflow.proto.GraphOptions.Builder, org.tensorflow.proto.GraphOptionsOrBuilder> 
-        getGraphOptionsFieldBuilder() {
+        internalGetGraphOptionsFieldBuilder() {
       if (graphOptionsBuilder_ == null) {
         graphOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.GraphOptions, org.tensorflow.proto.GraphOptions.Builder, org.tensorflow.proto.GraphOptionsOrBuilder>(
@@ -8029,7 +8334,7 @@ public Builder clearRpcOptions() {
     public org.tensorflow.proto.RpcOptions.RPCOptions.Builder getRpcOptionsBuilder() {
       bitField0_ |= 0x00002000;
       onChanged();
-      return getRpcOptionsFieldBuilder().getBuilder();
+      return internalGetRpcOptionsFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -8055,7 +8360,7 @@ public org.tensorflow.proto.RpcOptions.RPCOptionsOrBuilder getRpcOptionsOrBuilde
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.RpcOptions.RPCOptions, org.tensorflow.proto.RpcOptions.RPCOptions.Builder, org.tensorflow.proto.RpcOptions.RPCOptionsOrBuilder> 
-        getRpcOptionsFieldBuilder() {
+        internalGetRpcOptionsFieldBuilder() {
       if (rpcOptionsBuilder_ == null) {
         rpcOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.RpcOptions.RPCOptions, org.tensorflow.proto.RpcOptions.RPCOptions.Builder, org.tensorflow.proto.RpcOptions.RPCOptionsOrBuilder>(
@@ -8186,7 +8491,7 @@ public Builder clearClusterDef() {
     public org.tensorflow.proto.ClusterDef.Builder getClusterDefBuilder() {
       bitField0_ |= 0x00004000;
       onChanged();
-      return getClusterDefFieldBuilder().getBuilder();
+      return internalGetClusterDefFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -8212,7 +8517,7 @@ public org.tensorflow.proto.ClusterDefOrBuilder getClusterDefOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.ClusterDef, org.tensorflow.proto.ClusterDef.Builder, org.tensorflow.proto.ClusterDefOrBuilder> 
-        getClusterDefFieldBuilder() {
+        internalGetClusterDefFieldBuilder() {
       if (clusterDefBuilder_ == null) {
         clusterDefBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.ClusterDef, org.tensorflow.proto.ClusterDef.Builder, org.tensorflow.proto.ClusterDefOrBuilder>(
@@ -8418,7 +8723,7 @@ public Builder clearExperimental() {
     public org.tensorflow.proto.ConfigProto.Experimental.Builder getExperimentalBuilder() {
       bitField0_ |= 0x00020000;
       onChanged();
-      return getExperimentalFieldBuilder().getBuilder();
+      return internalGetExperimentalFieldBuilder().getBuilder();
     }
     /**
      * .tensorflow.ConfigProto.Experimental experimental = 16;
@@ -8436,7 +8741,7 @@ public org.tensorflow.proto.ConfigProto.ExperimentalOrBuilder getExperimentalOrB
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.ConfigProto.Experimental, org.tensorflow.proto.ConfigProto.Experimental.Builder, org.tensorflow.proto.ConfigProto.ExperimentalOrBuilder> 
-        getExperimentalFieldBuilder() {
+        internalGetExperimentalFieldBuilder() {
       if (experimentalBuilder_ == null) {
         experimentalBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.ConfigProto.Experimental, org.tensorflow.proto.ConfigProto.Experimental.Builder, org.tensorflow.proto.ConfigProto.ExperimentalOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ConfigProtoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ConfigProtoOrBuilder.java
index 915822fff06..f901ff5c2cf 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ConfigProtoOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ConfigProtoOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/config.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface ConfigProtoOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.ConfigProto)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ConfigProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ConfigProtos.java
index 63e85085fa7..46922e34229 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ConfigProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ConfigProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/config.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class ConfigProtos {
   private ConfigProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       ConfigProtos.class.getName());
   }
@@ -203,7 +204,7 @@ public static void registerAllExtensions(
       "mon_subexpression_elimination\"A\n\025ThreadP" +
       "oolOptionProto\022\023\n\013num_threads\030\001 \001(\005\022\023\n\013g" +
       "lobal_name\030\002 \001(\t\"0\n\017SessionMetadata\022\014\n\004n" +
-      "ame\030\001 \001(\t\022\017\n\007version\030\002 \001(\003\"\264\021\n\013ConfigPro" +
+      "ame\030\001 \001(\t\022\017\n\007version\030\002 \001(\003\"\353\021\n\013ConfigPro" +
       "to\022>\n\014device_count\030\001 \003(\0132(.tensorflow.Co" +
       "nfigProto.DeviceCountEntry\022$\n\034intra_op_p" +
       "arallelism_threads\030\002 \001(\005\022$\n\034inter_op_par" +
@@ -224,7 +225,7 @@ public static void registerAllExtensions(
       "r_devices_in_session\030\021 \001(\010\022:\n\014experiment" +
       "al\030\020 \001(\0132$.tensorflow.ConfigProto.Experi" +
       "mental\0322\n\020DeviceCountEntry\022\013\n\003key\030\001 \001(\t\022" +
-      "\r\n\005value\030\002 \001(\005:\0028\001\032\364\n\n\014Experimental\022\037\n\027c" +
+      "\r\n\005value\030\002 \001(\005:\0028\001\032\253\013\n\014Experimental\022\037\n\027c" +
       "ollective_group_leader\030\001 \001(\t\022\025\n\rexecutor" +
       "_type\030\003 \001(\t\022\032\n\022recv_buf_max_chunk\030\004 \001(\005\022" +
       "\031\n\021use_numa_affinity\030\005 \001(\010\0225\n-collective" +
@@ -253,59 +254,61 @@ public static void registerAllExtensions(
       "\0220\n(disable_eager_executor_streaming_enq" +
       "ueue\030\032 \001(\010\022)\n!finalize_function_library_" +
       "runtime\030! \001(\010\022!\n\031finalize_resource_manag" +
-      "er\030\" \001(\010\"\336\001\n\021MlirBridgeRollout\022#\n\037MLIR_B" +
-      "RIDGE_ROLLOUT_UNSPECIFIED\020\000\022\037\n\033MLIR_BRID" +
-      "GE_ROLLOUT_ENABLED\020\001\022 \n\034MLIR_BRIDGE_ROLL" +
-      "OUT_DISABLED\020\002\"\004\010\003\020\003\"\004\010\004\020\004*%MLIR_BRIDGE_" +
-      "ROLLOUT_SAFE_MODE_ENABLED*.MLIR_BRIDGE_R" +
-      "OLLOUT_SAFE_MODE_FALLBACK_ENABLEDJ\004\010\002\020\003J" +
-      "\004\010\023\020\024J\004\010\024\020\025J\004\010\031\020\032\"\341\004\n\nRunOptions\0226\n\013trac" +
-      "e_level\030\001 \001(\0162!.tensorflow.RunOptions.Tr" +
-      "aceLevel\022\025\n\rtimeout_in_ms\030\002 \001(\003\022\034\n\024inter" +
-      "_op_thread_pool\030\003 \001(\005\022\037\n\027output_partitio" +
-      "n_graphs\030\005 \001(\010\022/\n\rdebug_options\030\006 \001(\0132\030." +
-      "tensorflow.DebugOptions\022*\n\"report_tensor" +
-      "_allocations_upon_oom\030\007 \001(\010\0229\n\014experimen" +
-      "tal\030\010 \001(\0132#.tensorflow.RunOptions.Experi" +
-      "mental\032\322\001\n\014Experimental\022\034\n\024collective_gr" +
-      "aph_key\030\001 \001(\003\022\034\n\024use_run_handler_pool\030\002 " +
-      "\001(\010\022[\n\030run_handler_pool_options\030\003 \001(\01329." +
-      "tensorflow.RunOptions.Experimental.RunHa" +
-      "ndlerPoolOptions\032)\n\025RunHandlerPoolOption" +
-      "s\022\020\n\010priority\030\001 \001(\003\"R\n\nTraceLevel\022\014\n\010NO_" +
-      "TRACE\020\000\022\022\n\016SOFTWARE_TRACE\020\001\022\022\n\016HARDWARE_" +
-      "TRACE\020\002\022\016\n\nFULL_TRACE\020\003J\004\010\004\020\005\"\276\003\n\013RunMet" +
-      "adata\022)\n\nstep_stats\030\001 \001(\0132\025.tensorflow.S" +
-      "tepStats\022,\n\ncost_graph\030\002 \001(\0132\030.tensorflo" +
-      "w.CostGraphDef\022.\n\020partition_graphs\030\003 \003(\013" +
-      "2\024.tensorflow.GraphDef\022?\n\017function_graph" +
-      "s\030\004 \003(\0132&.tensorflow.RunMetadata.Functio" +
-      "nGraphs\0225\n\020session_metadata\030\005 \001(\0132\033.tens" +
-      "orflow.SessionMetadata\032\255\001\n\016FunctionGraph" +
-      "s\022.\n\020partition_graphs\030\001 \003(\0132\024.tensorflow" +
-      ".GraphDef\0224\n\026pre_optimization_graph\030\002 \001(" +
-      "\0132\024.tensorflow.GraphDef\0225\n\027post_optimiza" +
-      "tion_graph\030\003 \001(\0132\024.tensorflow.GraphDef\":" +
-      "\n\020TensorConnection\022\023\n\013from_tensor\030\001 \001(\t\022" +
-      "\021\n\tto_tensor\030\002 \001(\t\"\260\003\n\017CallableOptions\022\014" +
-      "\n\004feed\030\001 \003(\t\022\r\n\005fetch\030\002 \003(\t\022\016\n\006target\030\003 " +
-      "\003(\t\022+\n\013run_options\030\004 \001(\0132\026.tensorflow.Ru" +
-      "nOptions\0227\n\021tensor_connection\030\005 \003(\0132\034.te" +
-      "nsorflow.TensorConnection\022B\n\014feed_device" +
-      "s\030\006 \003(\0132,.tensorflow.CallableOptions.Fee" +
-      "dDevicesEntry\022D\n\rfetch_devices\030\007 \003(\0132-.t" +
-      "ensorflow.CallableOptions.FetchDevicesEn" +
-      "try\022\027\n\017fetch_skip_sync\030\010 \001(\010\0322\n\020FeedDevi" +
-      "cesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001" +
-      "\0323\n\021FetchDevicesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005va" +
-      "lue\030\002 \001(\t:\0028\001\"\235\001\n\017BatchingOptions\022\031\n\021num" +
-      "_batch_threads\030\001 \001(\005\022\026\n\016max_batch_size\030\002" +
-      " \001(\005\022\034\n\024batch_timeout_micros\030\003 \001(\005\022\033\n\023al" +
-      "lowed_batch_sizes\030\004 \003(\005\022\034\n\024max_enqueued_" +
-      "batches\030\005 \001(\005B\200\001\n\024org.tensorflow.protoB\014" +
-      "ConfigProtosP\001ZUgithub.com/tensorflow/te" +
-      "nsorflow/tensorflow/go/core/protobuf/for" +
-      "_core_protos_go_proto\370\001\001b\006proto3"
+      "er\030\" \001(\010\022\027\n\017tf2xla_dump_dir\030# \001(\t\022\034\n\024onl" +
+      "ine_cost_analysis\030$ \001(\010\"\336\001\n\021MlirBridgeRo" +
+      "llout\022#\n\037MLIR_BRIDGE_ROLLOUT_UNSPECIFIED" +
+      "\020\000\022\037\n\033MLIR_BRIDGE_ROLLOUT_ENABLED\020\001\022 \n\034M" +
+      "LIR_BRIDGE_ROLLOUT_DISABLED\020\002\"\004\010\003\020\003\"\004\010\004\020" +
+      "\004*%MLIR_BRIDGE_ROLLOUT_SAFE_MODE_ENABLED" +
+      "*.MLIR_BRIDGE_ROLLOUT_SAFE_MODE_FALLBACK" +
+      "_ENABLEDJ\004\010\002\020\003J\004\010\023\020\024J\004\010\024\020\025J\004\010\031\020\032\"\341\004\n\nRun" +
+      "Options\0226\n\013trace_level\030\001 \001(\0162!.tensorflo" +
+      "w.RunOptions.TraceLevel\022\025\n\rtimeout_in_ms" +
+      "\030\002 \001(\003\022\034\n\024inter_op_thread_pool\030\003 \001(\005\022\037\n\027" +
+      "output_partition_graphs\030\005 \001(\010\022/\n\rdebug_o" +
+      "ptions\030\006 \001(\0132\030.tensorflow.DebugOptions\022*" +
+      "\n\"report_tensor_allocations_upon_oom\030\007 \001" +
+      "(\010\0229\n\014experimental\030\010 \001(\0132#.tensorflow.Ru" +
+      "nOptions.Experimental\032\322\001\n\014Experimental\022\034" +
+      "\n\024collective_graph_key\030\001 \001(\003\022\034\n\024use_run_" +
+      "handler_pool\030\002 \001(\010\022[\n\030run_handler_pool_o" +
+      "ptions\030\003 \001(\01329.tensorflow.RunOptions.Exp" +
+      "erimental.RunHandlerPoolOptions\032)\n\025RunHa" +
+      "ndlerPoolOptions\022\020\n\010priority\030\001 \001(\003\"R\n\nTr" +
+      "aceLevel\022\014\n\010NO_TRACE\020\000\022\022\n\016SOFTWARE_TRACE" +
+      "\020\001\022\022\n\016HARDWARE_TRACE\020\002\022\016\n\nFULL_TRACE\020\003J\004" +
+      "\010\004\020\005\"\276\003\n\013RunMetadata\022)\n\nstep_stats\030\001 \001(\013" +
+      "2\025.tensorflow.StepStats\022,\n\ncost_graph\030\002 " +
+      "\001(\0132\030.tensorflow.CostGraphDef\022.\n\020partiti" +
+      "on_graphs\030\003 \003(\0132\024.tensorflow.GraphDef\022?\n" +
+      "\017function_graphs\030\004 \003(\0132&.tensorflow.RunM" +
+      "etadata.FunctionGraphs\0225\n\020session_metada" +
+      "ta\030\005 \001(\0132\033.tensorflow.SessionMetadata\032\255\001" +
+      "\n\016FunctionGraphs\022.\n\020partition_graphs\030\001 \003" +
+      "(\0132\024.tensorflow.GraphDef\0224\n\026pre_optimiza" +
+      "tion_graph\030\002 \001(\0132\024.tensorflow.GraphDef\0225" +
+      "\n\027post_optimization_graph\030\003 \001(\0132\024.tensor" +
+      "flow.GraphDef\":\n\020TensorConnection\022\023\n\013fro" +
+      "m_tensor\030\001 \001(\t\022\021\n\tto_tensor\030\002 \001(\t\"\260\003\n\017Ca" +
+      "llableOptions\022\014\n\004feed\030\001 \003(\t\022\r\n\005fetch\030\002 \003" +
+      "(\t\022\016\n\006target\030\003 \003(\t\022+\n\013run_options\030\004 \001(\0132" +
+      "\026.tensorflow.RunOptions\0227\n\021tensor_connec" +
+      "tion\030\005 \003(\0132\034.tensorflow.TensorConnection" +
+      "\022B\n\014feed_devices\030\006 \003(\0132,.tensorflow.Call" +
+      "ableOptions.FeedDevicesEntry\022D\n\rfetch_de" +
+      "vices\030\007 \003(\0132-.tensorflow.CallableOptions" +
+      ".FetchDevicesEntry\022\027\n\017fetch_skip_sync\030\010 " +
+      "\001(\010\0322\n\020FeedDevicesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005" +
+      "value\030\002 \001(\t:\0028\001\0323\n\021FetchDevicesEntry\022\013\n\003" +
+      "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\235\001\n\017Batchin" +
+      "gOptions\022\031\n\021num_batch_threads\030\001 \001(\005\022\026\n\016m" +
+      "ax_batch_size\030\002 \001(\005\022\034\n\024batch_timeout_mic" +
+      "ros\030\003 \001(\005\022\033\n\023allowed_batch_sizes\030\004 \003(\005\022\034" +
+      "\n\024max_enqueued_batches\030\005 \001(\005B\200\001\n\024org.ten" +
+      "sorflow.protoB\014ConfigProtosP\001ZUgithub.co" +
+      "m/tensorflow/tensorflow/tensorflow/go/co" +
+      "re/protobuf/for_core_protos_go_proto\370\001\001b" +
+      "\006proto3"
     };
     descriptor = com.google.protobuf.Descriptors.FileDescriptor
       .internalBuildGeneratedFileFrom(descriptorData,
@@ -384,7 +387,7 @@ public static void registerAllExtensions(
     internal_static_tensorflow_ConfigProto_Experimental_fieldAccessorTable = new
       com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_tensorflow_ConfigProto_Experimental_descriptor,
-        new java.lang.String[] { "CollectiveGroupLeader", "ExecutorType", "RecvBufMaxChunk", "UseNumaAffinity", "CollectiveDeterministicSequentialExecution", "CollectiveNccl", "ShareSessionStateInClusterspecPropagation", "DisableThreadSpinning", "ShareClusterDevicesInSession", "SessionMetadata", "OptimizeForStaticGraph", "EnableMlirBridge", "MlirBridgeRollout", "EnableMlirGraphOptimization", "DisableOutputPartitionGraphs", "XlaFusionAutotunerThresh", "UseTfrt", "EnableMultiHost", "TfrtUseIfrt", "BackendServerPort", "TargetTpu", "TargetGpu", "StreamMergeThreshold", "DisableFunctionalOpsLowering", "XlaPreferSingleGraphCluster", "CoordinationConfig", "DisableOptimizeForStaticGraph", "DisableEagerExecutorStreamingEnqueue", "FinalizeFunctionLibraryRuntime", "FinalizeResourceManager", });
+        new java.lang.String[] { "CollectiveGroupLeader", "ExecutorType", "RecvBufMaxChunk", "UseNumaAffinity", "CollectiveDeterministicSequentialExecution", "CollectiveNccl", "ShareSessionStateInClusterspecPropagation", "DisableThreadSpinning", "ShareClusterDevicesInSession", "SessionMetadata", "OptimizeForStaticGraph", "EnableMlirBridge", "MlirBridgeRollout", "EnableMlirGraphOptimization", "DisableOutputPartitionGraphs", "XlaFusionAutotunerThresh", "UseTfrt", "EnableMultiHost", "TfrtUseIfrt", "BackendServerPort", "TargetTpu", "TargetGpu", "StreamMergeThreshold", "DisableFunctionalOpsLowering", "XlaPreferSingleGraphCluster", "CoordinationConfig", "DisableOptimizeForStaticGraph", "DisableEagerExecutorStreamingEnqueue", "FinalizeFunctionLibraryRuntime", "FinalizeResourceManager", "Tf2XlaDumpDir", "OnlineCostAnalysis", });
     internal_static_tensorflow_RunOptions_descriptor =
       getDescriptor().getMessageTypes().get(6);
     internal_static_tensorflow_RunOptions_fieldAccessorTable = new
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ControlFlowContextDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ControlFlowContextDef.java
index 94e682160fc..bea391d0d32 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ControlFlowContextDef.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ControlFlowContextDef.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/control_flow.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -13,6 +13,7 @@
  *
  * Protobuf type {@code tensorflow.ControlFlowContextDef}
  */
+@com.google.protobuf.Generated
 public final class ControlFlowContextDef extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.ControlFlowContextDef)
@@ -22,8 +23,8 @@ public final class ControlFlowContextDef extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       ControlFlowContextDef.class.getName());
   }
@@ -485,14 +486,14 @@ public Builder mergeFrom(
               break;
             case 10: {
               input.readMessage(
-                  getCondCtxtFieldBuilder().getBuilder(),
+                  internalGetCondCtxtFieldBuilder().getBuilder(),
                   extensionRegistry);
               ctxtCase_ = 1;
               break;
             } // case 10
             case 18: {
               input.readMessage(
-                  getWhileCtxtFieldBuilder().getBuilder(),
+                  internalGetWhileCtxtFieldBuilder().getBuilder(),
                   extensionRegistry);
               ctxtCase_ = 2;
               break;
@@ -633,7 +634,7 @@ public Builder clearCondCtxt() {
      * .tensorflow.CondContextDef cond_ctxt = 1;
      */
     public org.tensorflow.proto.CondContextDef.Builder getCondCtxtBuilder() {
-      return getCondCtxtFieldBuilder().getBuilder();
+      return internalGetCondCtxtFieldBuilder().getBuilder();
     }
     /**
      * .tensorflow.CondContextDef cond_ctxt = 1;
@@ -654,7 +655,7 @@ public org.tensorflow.proto.CondContextDefOrBuilder getCondCtxtOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.CondContextDef, org.tensorflow.proto.CondContextDef.Builder, org.tensorflow.proto.CondContextDefOrBuilder> 
-        getCondCtxtFieldBuilder() {
+        internalGetCondCtxtFieldBuilder() {
       if (condCtxtBuilder_ == null) {
         if (!(ctxtCase_ == 1)) {
           ctxt_ = org.tensorflow.proto.CondContextDef.getDefaultInstance();
@@ -775,7 +776,7 @@ public Builder clearWhileCtxt() {
      * .tensorflow.WhileContextDef while_ctxt = 2;
      */
     public org.tensorflow.proto.WhileContextDef.Builder getWhileCtxtBuilder() {
-      return getWhileCtxtFieldBuilder().getBuilder();
+      return internalGetWhileCtxtFieldBuilder().getBuilder();
     }
     /**
      * .tensorflow.WhileContextDef while_ctxt = 2;
@@ -796,7 +797,7 @@ public org.tensorflow.proto.WhileContextDefOrBuilder getWhileCtxtOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.WhileContextDef, org.tensorflow.proto.WhileContextDef.Builder, org.tensorflow.proto.WhileContextDefOrBuilder> 
-        getWhileCtxtFieldBuilder() {
+        internalGetWhileCtxtFieldBuilder() {
       if (whileCtxtBuilder_ == null) {
         if (!(ctxtCase_ == 2)) {
           ctxt_ = org.tensorflow.proto.WhileContextDef.getDefaultInstance();
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ControlFlowContextDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ControlFlowContextDefOrBuilder.java
index 0fba58feb04..7c4e3c7c6e5 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ControlFlowContextDefOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ControlFlowContextDefOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/control_flow.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface ControlFlowContextDefOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.ControlFlowContextDef)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ControlFlowProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ControlFlowProtos.java
index 522e46a72f2..223599edb56 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ControlFlowProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ControlFlowProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/control_flow.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class ControlFlowProtos {
   private ControlFlowProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       ControlFlowProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CoordinationConfig.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CoordinationConfig.java
index f032747ea8e..b7c591e06ce 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CoordinationConfig.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CoordinationConfig.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/coordination_config.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class CoordinationConfig {
   private CoordinationConfig() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       CoordinationConfig.class.getName());
   }
@@ -64,8 +65,8 @@ public static final class CoordinatedJob extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         CoordinatedJob.class.getName());
     }
@@ -867,8 +868,8 @@ public static final class CoordinationServiceConfig extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         CoordinationServiceConfig.class.getName());
     }
@@ -1756,7 +1757,7 @@ public Builder mergeFrom(org.tensorflow.proto.CoordinationConfig.CoordinationSer
               bitField0_ = (bitField0_ & ~0x00000040);
               coordinatedJobListBuilder_ = 
                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                   getCoordinatedJobListFieldBuilder() : null;
+                   internalGetCoordinatedJobListFieldBuilder() : null;
             } else {
               coordinatedJobListBuilder_.addAllMessages(other.coordinatedJobList_);
             }
@@ -2474,7 +2475,7 @@ public Builder removeCoordinatedJobList(int index) {
        */
       public org.tensorflow.proto.CoordinationConfig.CoordinatedJob.Builder getCoordinatedJobListBuilder(
           int index) {
-        return getCoordinatedJobListFieldBuilder().getBuilder(index);
+        return internalGetCoordinatedJobListFieldBuilder().getBuilder(index);
       }
       /**
        * repeated .tensorflow.CoordinatedJob coordinated_job_list = 10;
@@ -2501,7 +2502,7 @@ public org.tensorflow.proto.CoordinationConfig.CoordinatedJobOrBuilder getCoordi
        * repeated .tensorflow.CoordinatedJob coordinated_job_list = 10;
        */
       public org.tensorflow.proto.CoordinationConfig.CoordinatedJob.Builder addCoordinatedJobListBuilder() {
-        return getCoordinatedJobListFieldBuilder().addBuilder(
+        return internalGetCoordinatedJobListFieldBuilder().addBuilder(
             org.tensorflow.proto.CoordinationConfig.CoordinatedJob.getDefaultInstance());
       }
       /**
@@ -2509,7 +2510,7 @@ public org.tensorflow.proto.CoordinationConfig.CoordinatedJob.Builder addCoordin
        */
       public org.tensorflow.proto.CoordinationConfig.CoordinatedJob.Builder addCoordinatedJobListBuilder(
           int index) {
-        return getCoordinatedJobListFieldBuilder().addBuilder(
+        return internalGetCoordinatedJobListFieldBuilder().addBuilder(
             index, org.tensorflow.proto.CoordinationConfig.CoordinatedJob.getDefaultInstance());
       }
       /**
@@ -2517,11 +2518,11 @@ public org.tensorflow.proto.CoordinationConfig.CoordinatedJob.Builder addCoordin
        */
       public java.util.List 
            getCoordinatedJobListBuilderList() {
-        return getCoordinatedJobListFieldBuilder().getBuilderList();
+        return internalGetCoordinatedJobListFieldBuilder().getBuilderList();
       }
       private com.google.protobuf.RepeatedFieldBuilder<
           org.tensorflow.proto.CoordinationConfig.CoordinatedJob, org.tensorflow.proto.CoordinationConfig.CoordinatedJob.Builder, org.tensorflow.proto.CoordinationConfig.CoordinatedJobOrBuilder> 
-          getCoordinatedJobListFieldBuilder() {
+          internalGetCoordinatedJobListFieldBuilder() {
         if (coordinatedJobListBuilder_ == null) {
           coordinatedJobListBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.CoordinationConfig.CoordinatedJob, org.tensorflow.proto.CoordinationConfig.CoordinatedJob.Builder, org.tensorflow.proto.CoordinationConfig.CoordinatedJobOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CostGraphDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CostGraphDef.java
index c1b43631e02..1f2c3a454d9 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CostGraphDef.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CostGraphDef.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/cost_graph.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.CostGraphDef}
  */
+@com.google.protobuf.Generated
 public final class CostGraphDef extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.CostGraphDef)
@@ -17,8 +18,8 @@ public final class CostGraphDef extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       CostGraphDef.class.getName());
   }
@@ -286,8 +287,8 @@ public static final class Node extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         Node.class.getName());
     }
@@ -350,8 +351,8 @@ public static final class InputInfo extends
         com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
           com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
           /* major= */ 4,
-          /* minor= */ 28,
-          /* patch= */ 3,
+          /* minor= */ 31,
+          /* patch= */ 1,
           /* suffix= */ "",
           InputInfo.class.getName());
       }
@@ -898,8 +899,8 @@ public static final class OutputInfo extends
         com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
           com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
           /* major= */ 4,
-          /* minor= */ 28,
-          /* patch= */ 3,
+          /* minor= */ 31,
+          /* patch= */ 1,
           /* suffix= */ "",
           OutputInfo.class.getName());
       }
@@ -1230,7 +1231,7 @@ private Builder(
         private void maybeForceBuilderInitialization() {
           if (com.google.protobuf.GeneratedMessage
                   .alwaysUseFieldBuilders) {
-            getShapeFieldBuilder();
+            internalGetShapeFieldBuilder();
           }
         }
         @java.lang.Override
@@ -1359,7 +1360,7 @@ public Builder mergeFrom(
                 } // case 16
                 case 26: {
                   input.readMessage(
-                      getShapeFieldBuilder().getBuilder(),
+                      internalGetShapeFieldBuilder().getBuilder(),
                       extensionRegistry);
                   bitField0_ |= 0x00000004;
                   break;
@@ -1559,7 +1560,7 @@ public Builder clearShape() {
         public org.tensorflow.proto.TensorShapeProto.Builder getShapeBuilder() {
           bitField0_ |= 0x00000004;
           onChanged();
-          return getShapeFieldBuilder().getBuilder();
+          return internalGetShapeFieldBuilder().getBuilder();
         }
         /**
          * .tensorflow.TensorShapeProto shape = 3;
@@ -1577,7 +1578,7 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
          */
         private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> 
-            getShapeFieldBuilder() {
+            internalGetShapeFieldBuilder() {
           if (shapeBuilder_ == null) {
             shapeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder>(
@@ -1623,9 +1624,7 @@ public org.tensorflow.proto.DataType getDtype() {
          * @return This builder for chaining.
          */
         public Builder setDtype(org.tensorflow.proto.DataType value) {
-          if (value == null) {
-            throw new NullPointerException();
-          }
+          if (value == null) { throw new NullPointerException(); }
           bitField0_ |= 0x00000008;
           dtype_ = value.getNumber();
           onChanged();
@@ -2633,7 +2632,7 @@ public Builder mergeFrom(org.tensorflow.proto.CostGraphDef.Node other) {
               bitField0_ = (bitField0_ & ~0x00000008);
               inputInfoBuilder_ = 
                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                   getInputInfoFieldBuilder() : null;
+                   internalGetInputInfoFieldBuilder() : null;
             } else {
               inputInfoBuilder_.addAllMessages(other.inputInfo_);
             }
@@ -2659,7 +2658,7 @@ public Builder mergeFrom(org.tensorflow.proto.CostGraphDef.Node other) {
               bitField0_ = (bitField0_ & ~0x00000010);
               outputInfoBuilder_ = 
                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                   getOutputInfoFieldBuilder() : null;
+                   internalGetOutputInfoFieldBuilder() : null;
             } else {
               outputInfoBuilder_.addAllMessages(other.outputInfo_);
             }
@@ -3269,7 +3268,7 @@ public Builder removeInputInfo(int index) {
        */
       public org.tensorflow.proto.CostGraphDef.Node.InputInfo.Builder getInputInfoBuilder(
           int index) {
-        return getInputInfoFieldBuilder().getBuilder(index);
+        return internalGetInputInfoFieldBuilder().getBuilder(index);
       }
       /**
        * repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;
@@ -3296,7 +3295,7 @@ public org.tensorflow.proto.CostGraphDef.Node.InputInfoOrBuilder getInputInfoOrB
        * repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;
        */
       public org.tensorflow.proto.CostGraphDef.Node.InputInfo.Builder addInputInfoBuilder() {
-        return getInputInfoFieldBuilder().addBuilder(
+        return internalGetInputInfoFieldBuilder().addBuilder(
             org.tensorflow.proto.CostGraphDef.Node.InputInfo.getDefaultInstance());
       }
       /**
@@ -3304,7 +3303,7 @@ public org.tensorflow.proto.CostGraphDef.Node.InputInfo.Builder addInputInfoBuil
        */
       public org.tensorflow.proto.CostGraphDef.Node.InputInfo.Builder addInputInfoBuilder(
           int index) {
-        return getInputInfoFieldBuilder().addBuilder(
+        return internalGetInputInfoFieldBuilder().addBuilder(
             index, org.tensorflow.proto.CostGraphDef.Node.InputInfo.getDefaultInstance());
       }
       /**
@@ -3312,11 +3311,11 @@ public org.tensorflow.proto.CostGraphDef.Node.InputInfo.Builder addInputInfoBuil
        */
       public java.util.List 
            getInputInfoBuilderList() {
-        return getInputInfoFieldBuilder().getBuilderList();
+        return internalGetInputInfoFieldBuilder().getBuilderList();
       }
       private com.google.protobuf.RepeatedFieldBuilder<
           org.tensorflow.proto.CostGraphDef.Node.InputInfo, org.tensorflow.proto.CostGraphDef.Node.InputInfo.Builder, org.tensorflow.proto.CostGraphDef.Node.InputInfoOrBuilder> 
-          getInputInfoFieldBuilder() {
+          internalGetInputInfoFieldBuilder() {
         if (inputInfoBuilder_ == null) {
           inputInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.CostGraphDef.Node.InputInfo, org.tensorflow.proto.CostGraphDef.Node.InputInfo.Builder, org.tensorflow.proto.CostGraphDef.Node.InputInfoOrBuilder>(
@@ -3509,7 +3508,7 @@ public Builder removeOutputInfo(int index) {
        */
       public org.tensorflow.proto.CostGraphDef.Node.OutputInfo.Builder getOutputInfoBuilder(
           int index) {
-        return getOutputInfoFieldBuilder().getBuilder(index);
+        return internalGetOutputInfoFieldBuilder().getBuilder(index);
       }
       /**
        * repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;
@@ -3536,7 +3535,7 @@ public org.tensorflow.proto.CostGraphDef.Node.OutputInfoOrBuilder getOutputInfoO
        * repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;
        */
       public org.tensorflow.proto.CostGraphDef.Node.OutputInfo.Builder addOutputInfoBuilder() {
-        return getOutputInfoFieldBuilder().addBuilder(
+        return internalGetOutputInfoFieldBuilder().addBuilder(
             org.tensorflow.proto.CostGraphDef.Node.OutputInfo.getDefaultInstance());
       }
       /**
@@ -3544,7 +3543,7 @@ public org.tensorflow.proto.CostGraphDef.Node.OutputInfo.Builder addOutputInfoBu
        */
       public org.tensorflow.proto.CostGraphDef.Node.OutputInfo.Builder addOutputInfoBuilder(
           int index) {
-        return getOutputInfoFieldBuilder().addBuilder(
+        return internalGetOutputInfoFieldBuilder().addBuilder(
             index, org.tensorflow.proto.CostGraphDef.Node.OutputInfo.getDefaultInstance());
       }
       /**
@@ -3552,11 +3551,11 @@ public org.tensorflow.proto.CostGraphDef.Node.OutputInfo.Builder addOutputInfoBu
        */
       public java.util.List 
            getOutputInfoBuilderList() {
-        return getOutputInfoFieldBuilder().getBuilderList();
+        return internalGetOutputInfoFieldBuilder().getBuilderList();
       }
       private com.google.protobuf.RepeatedFieldBuilder<
           org.tensorflow.proto.CostGraphDef.Node.OutputInfo, org.tensorflow.proto.CostGraphDef.Node.OutputInfo.Builder, org.tensorflow.proto.CostGraphDef.Node.OutputInfoOrBuilder> 
-          getOutputInfoFieldBuilder() {
+          internalGetOutputInfoFieldBuilder() {
         if (outputInfoBuilder_ == null) {
           outputInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.CostGraphDef.Node.OutputInfo, org.tensorflow.proto.CostGraphDef.Node.OutputInfo.Builder, org.tensorflow.proto.CostGraphDef.Node.OutputInfoOrBuilder>(
@@ -4213,8 +4212,8 @@ public static final class AggregatedCost extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         AggregatedCost.class.getName());
     }
@@ -4563,7 +4562,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) {
 
       public Builder mergeFrom(org.tensorflow.proto.CostGraphDef.AggregatedCost other) {
         if (other == org.tensorflow.proto.CostGraphDef.AggregatedCost.getDefaultInstance()) return this;
-        if (other.getCost() != 0F) {
+        if (java.lang.Float.floatToRawIntBits(other.getCost()) != 0) {
           setCost(other.getCost());
         }
         if (!other.getDimension().isEmpty()) {
@@ -5202,7 +5201,7 @@ public Builder mergeFrom(org.tensorflow.proto.CostGraphDef other) {
             bitField0_ = (bitField0_ & ~0x00000001);
             nodeBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getNodeFieldBuilder() : null;
+                 internalGetNodeFieldBuilder() : null;
           } else {
             nodeBuilder_.addAllMessages(other.node_);
           }
@@ -5228,7 +5227,7 @@ public Builder mergeFrom(org.tensorflow.proto.CostGraphDef other) {
             bitField0_ = (bitField0_ & ~0x00000002);
             costBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getCostFieldBuilder() : null;
+                 internalGetCostFieldBuilder() : null;
           } else {
             costBuilder_.addAllMessages(other.cost_);
           }
@@ -5483,7 +5482,7 @@ public Builder removeNode(int index) {
      */
     public org.tensorflow.proto.CostGraphDef.Node.Builder getNodeBuilder(
         int index) {
-      return getNodeFieldBuilder().getBuilder(index);
+      return internalGetNodeFieldBuilder().getBuilder(index);
     }
     /**
      * repeated .tensorflow.CostGraphDef.Node node = 1;
@@ -5510,7 +5509,7 @@ public org.tensorflow.proto.CostGraphDef.NodeOrBuilder getNodeOrBuilder(
      * repeated .tensorflow.CostGraphDef.Node node = 1;
      */
     public org.tensorflow.proto.CostGraphDef.Node.Builder addNodeBuilder() {
-      return getNodeFieldBuilder().addBuilder(
+      return internalGetNodeFieldBuilder().addBuilder(
           org.tensorflow.proto.CostGraphDef.Node.getDefaultInstance());
     }
     /**
@@ -5518,7 +5517,7 @@ public org.tensorflow.proto.CostGraphDef.Node.Builder addNodeBuilder() {
      */
     public org.tensorflow.proto.CostGraphDef.Node.Builder addNodeBuilder(
         int index) {
-      return getNodeFieldBuilder().addBuilder(
+      return internalGetNodeFieldBuilder().addBuilder(
           index, org.tensorflow.proto.CostGraphDef.Node.getDefaultInstance());
     }
     /**
@@ -5526,11 +5525,11 @@ public org.tensorflow.proto.CostGraphDef.Node.Builder addNodeBuilder(
      */
     public java.util.List 
          getNodeBuilderList() {
-      return getNodeFieldBuilder().getBuilderList();
+      return internalGetNodeFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.CostGraphDef.Node, org.tensorflow.proto.CostGraphDef.Node.Builder, org.tensorflow.proto.CostGraphDef.NodeOrBuilder> 
-        getNodeFieldBuilder() {
+        internalGetNodeFieldBuilder() {
       if (nodeBuilder_ == null) {
         nodeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.CostGraphDef.Node, org.tensorflow.proto.CostGraphDef.Node.Builder, org.tensorflow.proto.CostGraphDef.NodeOrBuilder>(
@@ -5723,7 +5722,7 @@ public Builder removeCost(int index) {
      */
     public org.tensorflow.proto.CostGraphDef.AggregatedCost.Builder getCostBuilder(
         int index) {
-      return getCostFieldBuilder().getBuilder(index);
+      return internalGetCostFieldBuilder().getBuilder(index);
     }
     /**
      * repeated .tensorflow.CostGraphDef.AggregatedCost cost = 2;
@@ -5750,7 +5749,7 @@ public org.tensorflow.proto.CostGraphDef.AggregatedCostOrBuilder getCostOrBuilde
      * repeated .tensorflow.CostGraphDef.AggregatedCost cost = 2;
      */
     public org.tensorflow.proto.CostGraphDef.AggregatedCost.Builder addCostBuilder() {
-      return getCostFieldBuilder().addBuilder(
+      return internalGetCostFieldBuilder().addBuilder(
           org.tensorflow.proto.CostGraphDef.AggregatedCost.getDefaultInstance());
     }
     /**
@@ -5758,7 +5757,7 @@ public org.tensorflow.proto.CostGraphDef.AggregatedCost.Builder addCostBuilder()
      */
     public org.tensorflow.proto.CostGraphDef.AggregatedCost.Builder addCostBuilder(
         int index) {
-      return getCostFieldBuilder().addBuilder(
+      return internalGetCostFieldBuilder().addBuilder(
           index, org.tensorflow.proto.CostGraphDef.AggregatedCost.getDefaultInstance());
     }
     /**
@@ -5766,11 +5765,11 @@ public org.tensorflow.proto.CostGraphDef.AggregatedCost.Builder addCostBuilder(
      */
     public java.util.List 
          getCostBuilderList() {
-      return getCostFieldBuilder().getBuilderList();
+      return internalGetCostFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.CostGraphDef.AggregatedCost, org.tensorflow.proto.CostGraphDef.AggregatedCost.Builder, org.tensorflow.proto.CostGraphDef.AggregatedCostOrBuilder> 
-        getCostFieldBuilder() {
+        internalGetCostFieldBuilder() {
       if (costBuilder_ == null) {
         costBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.CostGraphDef.AggregatedCost, org.tensorflow.proto.CostGraphDef.AggregatedCost.Builder, org.tensorflow.proto.CostGraphDef.AggregatedCostOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CostGraphDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CostGraphDefOrBuilder.java
index ad2f98d6283..b025bbdfa9b 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CostGraphDefOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CostGraphDefOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/cost_graph.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface CostGraphDefOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.CostGraphDef)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CostGraphProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CostGraphProtos.java
index b99348c8a2e..4425070ae69 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CostGraphProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/CostGraphProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/cost_graph.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class CostGraphProtos {
   private CostGraphProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       CostGraphProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DataClass.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DataClass.java
index 829ae281b70..d1d0247468b 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DataClass.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DataClass.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/summary.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf enum {@code tensorflow.DataClass}
  */
+@com.google.protobuf.Generated
 public enum DataClass
     implements com.google.protobuf.ProtocolMessageEnum {
   /**
@@ -55,8 +56,8 @@ public enum DataClass
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       DataClass.class.getName());
   }
@@ -156,7 +157,7 @@ public DataClass findValueByNumber(int number) {
       getDescriptorForType() {
     return getDescriptor();
   }
-  public static final com.google.protobuf.Descriptors.EnumDescriptor
+  public static com.google.protobuf.Descriptors.EnumDescriptor
       getDescriptor() {
     return org.tensorflow.proto.SummaryProtos.getDescriptor().getEnumTypes().get(0);
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DataType.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DataType.java
index efc05c83db4..b8fa6c1a154 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DataType.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DataType.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/types.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -13,6 +13,7 @@
  *
  * Protobuf enum {@code tensorflow.DataType}
  */
+@com.google.protobuf.Generated
 public enum DataType
     implements com.google.protobuf.ProtocolMessageEnum {
   /**
@@ -198,6 +199,10 @@ public enum DataType
    */
   DT_FLOAT8_E5M2FNUZ(28),
   /**
+   * 
+   * with NaN.
+   * 
+ * * DT_INT4 = 29; */ DT_INT4(29), @@ -213,6 +218,14 @@ public enum DataType * DT_UINT2 = 32; */ DT_UINT2(32), + /** + *
+   * 2 exponent bits, 1 mantissa bit, finite-only
+   * 
+ * + * DT_FLOAT4_E2M1FN = 33; + */ + DT_FLOAT4_E2M1FN(33), /** *
    * Do not use!  These are only for TF1's obsolete reference Variables.
@@ -347,6 +360,10 @@ public enum DataType
    * DT_UINT2_REF = 132;
    */
   DT_UINT2_REF(132),
+  /**
+   * DT_FLOAT4_E2M1FN_REF = 133;
+   */
+  DT_FLOAT4_E2M1FN_REF(133),
   UNRECOGNIZED(-1),
   ;
 
@@ -354,8 +371,8 @@ public enum DataType
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       DataType.class.getName());
   }
@@ -542,6 +559,10 @@ public enum DataType
    */
   public static final int DT_FLOAT8_E5M2FNUZ_VALUE = 28;
   /**
+   * 
+   * with NaN.
+   * 
+ * * DT_INT4 = 29; */ public static final int DT_INT4_VALUE = 29; @@ -557,6 +578,14 @@ public enum DataType * DT_UINT2 = 32; */ public static final int DT_UINT2_VALUE = 32; + /** + *
+   * 2 exponent bits, 1 mantissa bit, finite-only
+   * 
+ * + * DT_FLOAT4_E2M1FN = 33; + */ + public static final int DT_FLOAT4_E2M1FN_VALUE = 33; /** *
    * Do not use!  These are only for TF1's obsolete reference Variables.
@@ -691,6 +720,10 @@ public enum DataType
    * DT_UINT2_REF = 132;
    */
   public static final int DT_UINT2_REF_VALUE = 132;
+  /**
+   * DT_FLOAT4_E2M1FN_REF = 133;
+   */
+  public static final int DT_FLOAT4_E2M1FN_REF_VALUE = 133;
 
 
   public final int getNumber() {
@@ -750,6 +783,7 @@ public static DataType forNumber(int value) {
       case 30: return DT_UINT4;
       case 31: return DT_INT2;
       case 32: return DT_UINT2;
+      case 33: return DT_FLOAT4_E2M1FN;
       case 101: return DT_FLOAT_REF;
       case 102: return DT_DOUBLE_REF;
       case 103: return DT_INT32_REF;
@@ -782,6 +816,7 @@ public static DataType forNumber(int value) {
       case 130: return DT_UINT4_REF;
       case 131: return DT_INT2_REF;
       case 132: return DT_UINT2_REF;
+      case 133: return DT_FLOAT4_E2M1FN_REF;
       default: return null;
     }
   }
@@ -810,7 +845,7 @@ public DataType findValueByNumber(int number) {
       getDescriptorForType() {
     return getDescriptor();
   }
-  public static final com.google.protobuf.Descriptors.EnumDescriptor
+  public static com.google.protobuf.Descriptors.EnumDescriptor
       getDescriptor() {
     return org.tensorflow.proto.TypesProtos.getDescriptor().getEnumTypes().get(0);
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugEvent.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugEvent.java
index 8b27fc51240..0067d5cb280 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugEvent.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugEvent.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/debug_event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.DebugEvent}
  */
+@com.google.protobuf.Generated
 public final class DebugEvent extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.DebugEvent)
@@ -21,8 +22,8 @@ public final class DebugEvent extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       DebugEvent.class.getName());
   }
@@ -1023,7 +1024,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) {
 
     public Builder mergeFrom(org.tensorflow.proto.DebugEvent other) {
       if (other == org.tensorflow.proto.DebugEvent.getDefaultInstance()) return this;
-      if (other.getWallTime() != 0D) {
+      if (java.lang.Double.doubleToRawLongBits(other.getWallTime()) != 0) {
         setWallTime(other.getWallTime());
       }
       if (other.getStep() != 0L) {
@@ -1110,49 +1111,49 @@ public Builder mergeFrom(
             } // case 16
             case 26: {
               input.readMessage(
-                  getDebugMetadataFieldBuilder().getBuilder(),
+                  internalGetDebugMetadataFieldBuilder().getBuilder(),
                   extensionRegistry);
               whatCase_ = 3;
               break;
             } // case 26
             case 34: {
               input.readMessage(
-                  getSourceFileFieldBuilder().getBuilder(),
+                  internalGetSourceFileFieldBuilder().getBuilder(),
                   extensionRegistry);
               whatCase_ = 4;
               break;
             } // case 34
             case 50: {
               input.readMessage(
-                  getStackFrameWithIdFieldBuilder().getBuilder(),
+                  internalGetStackFrameWithIdFieldBuilder().getBuilder(),
                   extensionRegistry);
               whatCase_ = 6;
               break;
             } // case 50
             case 58: {
               input.readMessage(
-                  getGraphOpCreationFieldBuilder().getBuilder(),
+                  internalGetGraphOpCreationFieldBuilder().getBuilder(),
                   extensionRegistry);
               whatCase_ = 7;
               break;
             } // case 58
             case 66: {
               input.readMessage(
-                  getDebuggedGraphFieldBuilder().getBuilder(),
+                  internalGetDebuggedGraphFieldBuilder().getBuilder(),
                   extensionRegistry);
               whatCase_ = 8;
               break;
             } // case 66
             case 74: {
               input.readMessage(
-                  getExecutionFieldBuilder().getBuilder(),
+                  internalGetExecutionFieldBuilder().getBuilder(),
                   extensionRegistry);
               whatCase_ = 9;
               break;
             } // case 74
             case 82: {
               input.readMessage(
-                  getGraphExecutionTraceFieldBuilder().getBuilder(),
+                  internalGetGraphExecutionTraceFieldBuilder().getBuilder(),
                   extensionRegistry);
               whatCase_ = 10;
               break;
@@ -1165,7 +1166,7 @@ public Builder mergeFrom(
             } // case 90
             case 98: {
               input.readMessage(
-                  getDebuggedDeviceFieldBuilder().getBuilder(),
+                  internalGetDebuggedDeviceFieldBuilder().getBuilder(),
                   extensionRegistry);
               whatCase_ = 12;
               break;
@@ -1422,7 +1423,7 @@ public Builder clearDebugMetadata() {
      * .tensorflow.DebugMetadata debug_metadata = 3;
      */
     public org.tensorflow.proto.DebugMetadata.Builder getDebugMetadataBuilder() {
-      return getDebugMetadataFieldBuilder().getBuilder();
+      return internalGetDebugMetadataFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -1451,7 +1452,7 @@ public org.tensorflow.proto.DebugMetadataOrBuilder getDebugMetadataOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.DebugMetadata, org.tensorflow.proto.DebugMetadata.Builder, org.tensorflow.proto.DebugMetadataOrBuilder> 
-        getDebugMetadataFieldBuilder() {
+        internalGetDebugMetadataFieldBuilder() {
       if (debugMetadataBuilder_ == null) {
         if (!(whatCase_ == 3)) {
           what_ = org.tensorflow.proto.DebugMetadata.getDefaultInstance();
@@ -1600,7 +1601,7 @@ public Builder clearSourceFile() {
      * .tensorflow.SourceFile source_file = 4;
      */
     public org.tensorflow.proto.SourceFile.Builder getSourceFileBuilder() {
-      return getSourceFileFieldBuilder().getBuilder();
+      return internalGetSourceFileFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -1629,7 +1630,7 @@ public org.tensorflow.proto.SourceFileOrBuilder getSourceFileOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.SourceFile, org.tensorflow.proto.SourceFile.Builder, org.tensorflow.proto.SourceFileOrBuilder> 
-        getSourceFileFieldBuilder() {
+        internalGetSourceFileFieldBuilder() {
       if (sourceFileBuilder_ == null) {
         if (!(whatCase_ == 4)) {
           what_ = org.tensorflow.proto.SourceFile.getDefaultInstance();
@@ -1785,7 +1786,7 @@ public Builder clearStackFrameWithId() {
      * .tensorflow.StackFrameWithId stack_frame_with_id = 6;
      */
     public org.tensorflow.proto.StackFrameWithId.Builder getStackFrameWithIdBuilder() {
-      return getStackFrameWithIdFieldBuilder().getBuilder();
+      return internalGetStackFrameWithIdFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -1816,7 +1817,7 @@ public org.tensorflow.proto.StackFrameWithIdOrBuilder getStackFrameWithIdOrBuild
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.StackFrameWithId, org.tensorflow.proto.StackFrameWithId.Builder, org.tensorflow.proto.StackFrameWithIdOrBuilder> 
-        getStackFrameWithIdFieldBuilder() {
+        internalGetStackFrameWithIdFieldBuilder() {
       if (stackFrameWithIdBuilder_ == null) {
         if (!(whatCase_ == 6)) {
           what_ = org.tensorflow.proto.StackFrameWithId.getDefaultInstance();
@@ -1972,7 +1973,7 @@ public Builder clearGraphOpCreation() {
      * .tensorflow.GraphOpCreation graph_op_creation = 7;
      */
     public org.tensorflow.proto.GraphOpCreation.Builder getGraphOpCreationBuilder() {
-      return getGraphOpCreationFieldBuilder().getBuilder();
+      return internalGetGraphOpCreationFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -2003,7 +2004,7 @@ public org.tensorflow.proto.GraphOpCreationOrBuilder getGraphOpCreationOrBuilder
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.GraphOpCreation, org.tensorflow.proto.GraphOpCreation.Builder, org.tensorflow.proto.GraphOpCreationOrBuilder> 
-        getGraphOpCreationFieldBuilder() {
+        internalGetGraphOpCreationFieldBuilder() {
       if (graphOpCreationBuilder_ == null) {
         if (!(whatCase_ == 7)) {
           what_ = org.tensorflow.proto.GraphOpCreation.getDefaultInstance();
@@ -2152,7 +2153,7 @@ public Builder clearDebuggedGraph() {
      * .tensorflow.DebuggedGraph debugged_graph = 8;
      */
     public org.tensorflow.proto.DebuggedGraph.Builder getDebuggedGraphBuilder() {
-      return getDebuggedGraphFieldBuilder().getBuilder();
+      return internalGetDebuggedGraphFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -2181,7 +2182,7 @@ public org.tensorflow.proto.DebuggedGraphOrBuilder getDebuggedGraphOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.DebuggedGraph, org.tensorflow.proto.DebuggedGraph.Builder, org.tensorflow.proto.DebuggedGraphOrBuilder> 
-        getDebuggedGraphFieldBuilder() {
+        internalGetDebuggedGraphFieldBuilder() {
       if (debuggedGraphBuilder_ == null) {
         if (!(whatCase_ == 8)) {
           what_ = org.tensorflow.proto.DebuggedGraph.getDefaultInstance();
@@ -2330,7 +2331,7 @@ public Builder clearExecution() {
      * .tensorflow.Execution execution = 9;
      */
     public org.tensorflow.proto.Execution.Builder getExecutionBuilder() {
-      return getExecutionFieldBuilder().getBuilder();
+      return internalGetExecutionFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -2359,7 +2360,7 @@ public org.tensorflow.proto.ExecutionOrBuilder getExecutionOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.Execution, org.tensorflow.proto.Execution.Builder, org.tensorflow.proto.ExecutionOrBuilder> 
-        getExecutionFieldBuilder() {
+        internalGetExecutionFieldBuilder() {
       if (executionBuilder_ == null) {
         if (!(whatCase_ == 9)) {
           what_ = org.tensorflow.proto.Execution.getDefaultInstance();
@@ -2515,7 +2516,7 @@ public Builder clearGraphExecutionTrace() {
      * .tensorflow.GraphExecutionTrace graph_execution_trace = 10;
      */
     public org.tensorflow.proto.GraphExecutionTrace.Builder getGraphExecutionTraceBuilder() {
-      return getGraphExecutionTraceFieldBuilder().getBuilder();
+      return internalGetGraphExecutionTraceFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -2546,7 +2547,7 @@ public org.tensorflow.proto.GraphExecutionTraceOrBuilder getGraphExecutionTraceO
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.GraphExecutionTrace, org.tensorflow.proto.GraphExecutionTrace.Builder, org.tensorflow.proto.GraphExecutionTraceOrBuilder> 
-        getGraphExecutionTraceFieldBuilder() {
+        internalGetGraphExecutionTraceFieldBuilder() {
       if (graphExecutionTraceBuilder_ == null) {
         if (!(whatCase_ == 10)) {
           what_ = org.tensorflow.proto.GraphExecutionTrace.getDefaultInstance();
@@ -2818,7 +2819,7 @@ public Builder clearDebuggedDevice() {
      * .tensorflow.DebuggedDevice debugged_device = 12;
      */
     public org.tensorflow.proto.DebuggedDevice.Builder getDebuggedDeviceBuilder() {
-      return getDebuggedDeviceFieldBuilder().getBuilder();
+      return internalGetDebuggedDeviceFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -2847,7 +2848,7 @@ public org.tensorflow.proto.DebuggedDeviceOrBuilder getDebuggedDeviceOrBuilder()
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.DebuggedDevice, org.tensorflow.proto.DebuggedDevice.Builder, org.tensorflow.proto.DebuggedDeviceOrBuilder> 
-        getDebuggedDeviceFieldBuilder() {
+        internalGetDebuggedDeviceFieldBuilder() {
       if (debuggedDeviceBuilder_ == null) {
         if (!(whatCase_ == 12)) {
           what_ = org.tensorflow.proto.DebuggedDevice.getDefaultInstance();
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugEventOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugEventOrBuilder.java
index 1b36f8a0ba4..1f5da61b01d 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugEventOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugEventOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/debug_event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface DebugEventOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.DebugEvent)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugEventProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugEventProtos.java
index 1c92bcac9f3..ec50e35462a 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugEventProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugEventProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/debug_event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class DebugEventProtos {
   private DebugEventProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       DebugEventProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugMetadata.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugMetadata.java
index 8f70d7c9067..bc5c7374b7a 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugMetadata.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugMetadata.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/debug_event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.DebugMetadata}
  */
+@com.google.protobuf.Generated
 public final class DebugMetadata extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.DebugMetadata)
@@ -21,8 +22,8 @@ public final class DebugMetadata extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       DebugMetadata.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugMetadataOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugMetadataOrBuilder.java
index 20d753b7194..db91a5a141d 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugMetadataOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugMetadataOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/debug_event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface DebugMetadataOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.DebugMetadata)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugOptions.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugOptions.java
index 2e7f0fdfeda..35e866f33dc 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugOptions.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugOptions.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/debug.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.DebugOptions}
  */
+@com.google.protobuf.Generated
 public final class DebugOptions extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.DebugOptions)
@@ -21,8 +22,8 @@ public final class DebugOptions extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       DebugOptions.class.getName());
   }
@@ -459,7 +460,7 @@ public Builder mergeFrom(org.tensorflow.proto.DebugOptions other) {
             bitField0_ = (bitField0_ & ~0x00000001);
             debugTensorWatchOptsBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getDebugTensorWatchOptsFieldBuilder() : null;
+                 internalGetDebugTensorWatchOptsFieldBuilder() : null;
           } else {
             debugTensorWatchOptsBuilder_.addAllMessages(other.debugTensorWatchOpts_);
           }
@@ -769,7 +770,7 @@ public Builder removeDebugTensorWatchOpts(int index) {
      */
     public org.tensorflow.proto.DebugTensorWatch.Builder getDebugTensorWatchOptsBuilder(
         int index) {
-      return getDebugTensorWatchOptsFieldBuilder().getBuilder(index);
+      return internalGetDebugTensorWatchOptsFieldBuilder().getBuilder(index);
     }
     /**
      * 
@@ -808,7 +809,7 @@ public org.tensorflow.proto.DebugTensorWatchOrBuilder getDebugTensorWatchOptsOrB
      * repeated .tensorflow.DebugTensorWatch debug_tensor_watch_opts = 4;
      */
     public org.tensorflow.proto.DebugTensorWatch.Builder addDebugTensorWatchOptsBuilder() {
-      return getDebugTensorWatchOptsFieldBuilder().addBuilder(
+      return internalGetDebugTensorWatchOptsFieldBuilder().addBuilder(
           org.tensorflow.proto.DebugTensorWatch.getDefaultInstance());
     }
     /**
@@ -820,7 +821,7 @@ public org.tensorflow.proto.DebugTensorWatch.Builder addDebugTensorWatchOptsBuil
      */
     public org.tensorflow.proto.DebugTensorWatch.Builder addDebugTensorWatchOptsBuilder(
         int index) {
-      return getDebugTensorWatchOptsFieldBuilder().addBuilder(
+      return internalGetDebugTensorWatchOptsFieldBuilder().addBuilder(
           index, org.tensorflow.proto.DebugTensorWatch.getDefaultInstance());
     }
     /**
@@ -832,11 +833,11 @@ public org.tensorflow.proto.DebugTensorWatch.Builder addDebugTensorWatchOptsBuil
      */
     public java.util.List 
          getDebugTensorWatchOptsBuilderList() {
-      return getDebugTensorWatchOptsFieldBuilder().getBuilderList();
+      return internalGetDebugTensorWatchOptsFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.DebugTensorWatch, org.tensorflow.proto.DebugTensorWatch.Builder, org.tensorflow.proto.DebugTensorWatchOrBuilder> 
-        getDebugTensorWatchOptsFieldBuilder() {
+        internalGetDebugTensorWatchOptsFieldBuilder() {
       if (debugTensorWatchOptsBuilder_ == null) {
         debugTensorWatchOptsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.DebugTensorWatch, org.tensorflow.proto.DebugTensorWatch.Builder, org.tensorflow.proto.DebugTensorWatchOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugOptionsOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugOptionsOrBuilder.java
index ac859a7de1d..be8ba808a36 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugOptionsOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugOptionsOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/debug.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface DebugOptionsOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.DebugOptions)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugProtos.java
index ca250aff759..a168f9e8a9d 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/debug.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class DebugProtos {
   private DebugProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       DebugProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugTensorWatch.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugTensorWatch.java
index e1fc459a203..2631b9ebfa4 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugTensorWatch.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugTensorWatch.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/debug.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.DebugTensorWatch}
  */
+@com.google.protobuf.Generated
 public final class DebugTensorWatch extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.DebugTensorWatch)
@@ -21,8 +22,8 @@ public final class DebugTensorWatch extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       DebugTensorWatch.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugTensorWatchOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugTensorWatchOrBuilder.java
index 842457cd90f..32d7b9baf9c 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugTensorWatchOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebugTensorWatchOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/debug.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface DebugTensorWatchOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.DebugTensorWatch)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedDevice.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedDevice.java
index d8d0b77e13c..d06521c0dae 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedDevice.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedDevice.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/debug_event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.DebuggedDevice}
  */
+@com.google.protobuf.Generated
 public final class DebuggedDevice extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.DebuggedDevice)
@@ -21,8 +22,8 @@ public final class DebuggedDevice extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       DebuggedDevice.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedDeviceOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedDeviceOrBuilder.java
index 4544692e491..77634a9e020 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedDeviceOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedDeviceOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/debug_event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface DebuggedDeviceOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.DebuggedDevice)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedGraph.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedGraph.java
index d56c83a856d..80346c1e57f 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedGraph.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedGraph.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/debug_event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.DebuggedGraph}
  */
+@com.google.protobuf.Generated
 public final class DebuggedGraph extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.DebuggedGraph)
@@ -21,8 +22,8 @@ public final class DebuggedGraph extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       DebuggedGraph.class.getName());
   }
@@ -630,10 +631,10 @@ public Builder mergeFrom(org.tensorflow.proto.DebuggedGraph other) {
         }
         onChanged();
       }
-      if (other.getOriginalGraphDef() != com.google.protobuf.ByteString.EMPTY) {
+      if (!other.getOriginalGraphDef().isEmpty()) {
         setOriginalGraphDef(other.getOriginalGraphDef());
       }
-      if (other.getInstrumentedGraphDef() != com.google.protobuf.ByteString.EMPTY) {
+      if (!other.getInstrumentedGraphDef().isEmpty()) {
         setInstrumentedGraphDef(other.getInstrumentedGraphDef());
       }
       if (!other.getOuterContextId().isEmpty()) {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedGraphOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedGraphOrBuilder.java
index e4115e8f5f5..c154cdedf8b 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedGraphOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedGraphOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/debug_event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface DebuggedGraphOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.DebuggedGraph)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedSourceFile.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedSourceFile.java
index 66704f19966..a92a9b3d253 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedSourceFile.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedSourceFile.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/debug.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.DebuggedSourceFile}
  */
+@com.google.protobuf.Generated
 public final class DebuggedSourceFile extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.DebuggedSourceFile)
@@ -17,8 +18,8 @@ public final class DebuggedSourceFile extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       DebuggedSourceFile.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedSourceFileOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedSourceFileOrBuilder.java
index 7ef7f4bae46..041ba744404 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedSourceFileOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedSourceFileOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/debug.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface DebuggedSourceFileOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.DebuggedSourceFile)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedSourceFiles.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedSourceFiles.java
index 878ca2718a3..974faa68e74 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedSourceFiles.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedSourceFiles.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/debug.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.DebuggedSourceFiles}
  */
+@com.google.protobuf.Generated
 public final class DebuggedSourceFiles extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.DebuggedSourceFiles)
@@ -17,8 +18,8 @@ public final class DebuggedSourceFiles extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       DebuggedSourceFiles.class.getName());
   }
@@ -384,7 +385,7 @@ public Builder mergeFrom(org.tensorflow.proto.DebuggedSourceFiles other) {
             bitField0_ = (bitField0_ & ~0x00000001);
             sourceFilesBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getSourceFilesFieldBuilder() : null;
+                 internalGetSourceFilesFieldBuilder() : null;
           } else {
             sourceFilesBuilder_.addAllMessages(other.sourceFiles_);
           }
@@ -678,7 +679,7 @@ public Builder removeSourceFiles(int index) {
      */
     public org.tensorflow.proto.DebuggedSourceFile.Builder getSourceFilesBuilder(
         int index) {
-      return getSourceFilesFieldBuilder().getBuilder(index);
+      return internalGetSourceFilesFieldBuilder().getBuilder(index);
     }
     /**
      * 
@@ -717,7 +718,7 @@ public org.tensorflow.proto.DebuggedSourceFileOrBuilder getSourceFilesOrBuilder(
      * repeated .tensorflow.DebuggedSourceFile source_files = 1;
      */
     public org.tensorflow.proto.DebuggedSourceFile.Builder addSourceFilesBuilder() {
-      return getSourceFilesFieldBuilder().addBuilder(
+      return internalGetSourceFilesFieldBuilder().addBuilder(
           org.tensorflow.proto.DebuggedSourceFile.getDefaultInstance());
     }
     /**
@@ -729,7 +730,7 @@ public org.tensorflow.proto.DebuggedSourceFile.Builder addSourceFilesBuilder() {
      */
     public org.tensorflow.proto.DebuggedSourceFile.Builder addSourceFilesBuilder(
         int index) {
-      return getSourceFilesFieldBuilder().addBuilder(
+      return internalGetSourceFilesFieldBuilder().addBuilder(
           index, org.tensorflow.proto.DebuggedSourceFile.getDefaultInstance());
     }
     /**
@@ -741,11 +742,11 @@ public org.tensorflow.proto.DebuggedSourceFile.Builder addSourceFilesBuilder(
      */
     public java.util.List 
          getSourceFilesBuilderList() {
-      return getSourceFilesFieldBuilder().getBuilderList();
+      return internalGetSourceFilesFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.DebuggedSourceFile, org.tensorflow.proto.DebuggedSourceFile.Builder, org.tensorflow.proto.DebuggedSourceFileOrBuilder> 
-        getSourceFilesFieldBuilder() {
+        internalGetSourceFilesFieldBuilder() {
       if (sourceFilesBuilder_ == null) {
         sourceFilesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.DebuggedSourceFile, org.tensorflow.proto.DebuggedSourceFile.Builder, org.tensorflow.proto.DebuggedSourceFileOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedSourceFilesOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedSourceFilesOrBuilder.java
index 143f2983d0f..79a506c35e2 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedSourceFilesOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DebuggedSourceFilesOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/debug.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface DebuggedSourceFilesOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.DebuggedSourceFiles)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceAttributes.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceAttributes.java
index 47dfd9b5b6f..7c636b032fa 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceAttributes.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceAttributes.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/device_attributes.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.DeviceAttributes}
  */
+@com.google.protobuf.Generated
 public final class DeviceAttributes extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.DeviceAttributes)
@@ -17,8 +18,8 @@ public final class DeviceAttributes extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       DeviceAttributes.class.getName());
   }
@@ -537,7 +538,7 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getLocalityFieldBuilder();
+        internalGetLocalityFieldBuilder();
       }
     }
     @java.lang.Override
@@ -698,7 +699,7 @@ public Builder mergeFrom(
             } // case 32
             case 42: {
               input.readMessage(
-                  getLocalityFieldBuilder().getBuilder(),
+                  internalGetLocalityFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000008;
               break;
@@ -1089,7 +1090,7 @@ public Builder clearLocality() {
     public org.tensorflow.proto.DeviceLocality.Builder getLocalityBuilder() {
       bitField0_ |= 0x00000008;
       onChanged();
-      return getLocalityFieldBuilder().getBuilder();
+      return internalGetLocalityFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -1117,7 +1118,7 @@ public org.tensorflow.proto.DeviceLocalityOrBuilder getLocalityOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.DeviceLocality, org.tensorflow.proto.DeviceLocality.Builder, org.tensorflow.proto.DeviceLocalityOrBuilder> 
-        getLocalityFieldBuilder() {
+        internalGetLocalityFieldBuilder() {
       if (localityBuilder_ == null) {
         localityBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.DeviceLocality, org.tensorflow.proto.DeviceLocality.Builder, org.tensorflow.proto.DeviceLocalityOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceAttributesOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceAttributesOrBuilder.java
index 4215a2a77bf..db7baaa0240 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceAttributesOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceAttributesOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/device_attributes.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface DeviceAttributesOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.DeviceAttributes)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceAttributesProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceAttributesProtos.java
index fcfebe652af..50efb1c833c 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceAttributesProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceAttributesProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/device_attributes.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class DeviceAttributesProtos {
   private DeviceAttributesProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       DeviceAttributesProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceFiltersProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceFiltersProtos.java
index c8e12f949a0..9f2522f447a 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceFiltersProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceFiltersProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/device_filters.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class DeviceFiltersProtos {
   private DeviceFiltersProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       DeviceFiltersProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceLocality.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceLocality.java
index 518cc8fd33b..b9abfe9391d 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceLocality.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceLocality.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/device_attributes.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.DeviceLocality}
  */
+@com.google.protobuf.Generated
 public final class DeviceLocality extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.DeviceLocality)
@@ -17,8 +18,8 @@ public final class DeviceLocality extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       DeviceLocality.class.getName());
   }
@@ -329,7 +330,7 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getLinksFieldBuilder();
+        internalGetLinksFieldBuilder();
       }
     }
     @java.lang.Override
@@ -451,7 +452,7 @@ public Builder mergeFrom(
             } // case 16
             case 26: {
               input.readMessage(
-                  getLinksFieldBuilder().getBuilder(),
+                  internalGetLinksFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000004;
               break;
@@ -683,7 +684,7 @@ public Builder clearLinks() {
     public org.tensorflow.proto.LocalLinks.Builder getLinksBuilder() {
       bitField0_ |= 0x00000004;
       onChanged();
-      return getLinksFieldBuilder().getBuilder();
+      return internalGetLinksFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -709,7 +710,7 @@ public org.tensorflow.proto.LocalLinksOrBuilder getLinksOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.LocalLinks, org.tensorflow.proto.LocalLinks.Builder, org.tensorflow.proto.LocalLinksOrBuilder> 
-        getLinksFieldBuilder() {
+        internalGetLinksFieldBuilder() {
       if (linksBuilder_ == null) {
         linksBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.LocalLinks, org.tensorflow.proto.LocalLinks.Builder, org.tensorflow.proto.LocalLinksOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceLocalityOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceLocalityOrBuilder.java
index b236260b347..459d276a622 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceLocalityOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceLocalityOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/device_attributes.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface DeviceLocalityOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.DeviceLocality)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DevicePropertiesProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DevicePropertiesProtos.java
index c02de359e02..31ffb4fd5c7 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DevicePropertiesProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DevicePropertiesProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/device_properties.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class DevicePropertiesProtos {
   private DevicePropertiesProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       DevicePropertiesProtos.class.getName());
   }
@@ -251,8 +252,8 @@ public static final class DeviceProperties extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         DeviceProperties.class.getName());
     }
@@ -2217,8 +2218,8 @@ public static final class NamedDevice extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         NamedDevice.class.getName());
     }
@@ -2514,7 +2515,7 @@ private Builder(
       private void maybeForceBuilderInitialization() {
         if (com.google.protobuf.GeneratedMessage
                 .alwaysUseFieldBuilders) {
-          getPropertiesFieldBuilder();
+          internalGetPropertiesFieldBuilder();
         }
       }
       @java.lang.Override
@@ -2626,7 +2627,7 @@ public Builder mergeFrom(
               } // case 10
               case 18: {
                 input.readMessage(
-                    getPropertiesFieldBuilder().getBuilder(),
+                    internalGetPropertiesFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000002;
                 break;
@@ -2811,7 +2812,7 @@ public Builder clearProperties() {
       public org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties.Builder getPropertiesBuilder() {
         bitField0_ |= 0x00000002;
         onChanged();
-        return getPropertiesFieldBuilder().getBuilder();
+        return internalGetPropertiesFieldBuilder().getBuilder();
       }
       /**
        * .tensorflow.DeviceProperties properties = 2;
@@ -2829,7 +2830,7 @@ public org.tensorflow.proto.DevicePropertiesProtos.DevicePropertiesOrBuilder get
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties, org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties.Builder, org.tensorflow.proto.DevicePropertiesProtos.DevicePropertiesOrBuilder> 
-          getPropertiesFieldBuilder() {
+          internalGetPropertiesFieldBuilder() {
         if (propertiesBuilder_ == null) {
           propertiesBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties, org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties.Builder, org.tensorflow.proto.DevicePropertiesProtos.DevicePropertiesOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceStepStats.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceStepStats.java
index 5796f59a3a5..9f8c3496443 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceStepStats.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceStepStats.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/step_stats.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.DeviceStepStats}
  */
+@com.google.protobuf.Generated
 public final class DeviceStepStats extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.DeviceStepStats)
@@ -17,8 +18,8 @@ public final class DeviceStepStats extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       DeviceStepStats.class.getName());
   }
@@ -579,7 +580,7 @@ public Builder mergeFrom(org.tensorflow.proto.DeviceStepStats other) {
             bitField0_ = (bitField0_ & ~0x00000002);
             nodeStatsBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getNodeStatsFieldBuilder() : null;
+                 internalGetNodeStatsFieldBuilder() : null;
           } else {
             nodeStatsBuilder_.addAllMessages(other.nodeStats_);
           }
@@ -910,7 +911,7 @@ public Builder removeNodeStats(int index) {
      */
     public org.tensorflow.proto.NodeExecStats.Builder getNodeStatsBuilder(
         int index) {
-      return getNodeStatsFieldBuilder().getBuilder(index);
+      return internalGetNodeStatsFieldBuilder().getBuilder(index);
     }
     /**
      * repeated .tensorflow.NodeExecStats node_stats = 2;
@@ -937,7 +938,7 @@ public org.tensorflow.proto.NodeExecStatsOrBuilder getNodeStatsOrBuilder(
      * repeated .tensorflow.NodeExecStats node_stats = 2;
      */
     public org.tensorflow.proto.NodeExecStats.Builder addNodeStatsBuilder() {
-      return getNodeStatsFieldBuilder().addBuilder(
+      return internalGetNodeStatsFieldBuilder().addBuilder(
           org.tensorflow.proto.NodeExecStats.getDefaultInstance());
     }
     /**
@@ -945,7 +946,7 @@ public org.tensorflow.proto.NodeExecStats.Builder addNodeStatsBuilder() {
      */
     public org.tensorflow.proto.NodeExecStats.Builder addNodeStatsBuilder(
         int index) {
-      return getNodeStatsFieldBuilder().addBuilder(
+      return internalGetNodeStatsFieldBuilder().addBuilder(
           index, org.tensorflow.proto.NodeExecStats.getDefaultInstance());
     }
     /**
@@ -953,11 +954,11 @@ public org.tensorflow.proto.NodeExecStats.Builder addNodeStatsBuilder(
      */
     public java.util.List 
          getNodeStatsBuilderList() {
-      return getNodeStatsFieldBuilder().getBuilderList();
+      return internalGetNodeStatsFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.NodeExecStats, org.tensorflow.proto.NodeExecStats.Builder, org.tensorflow.proto.NodeExecStatsOrBuilder> 
-        getNodeStatsFieldBuilder() {
+        internalGetNodeStatsFieldBuilder() {
       if (nodeStatsBuilder_ == null) {
         nodeStatsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.NodeExecStats, org.tensorflow.proto.NodeExecStats.Builder, org.tensorflow.proto.NodeExecStatsOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceStepStatsOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceStepStatsOrBuilder.java
index 40b250d1ab8..24478a72115 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceStepStatsOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/DeviceStepStatsOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/step_stats.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface DeviceStepStatsOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.DeviceStepStats)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/EntryValue.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/EntryValue.java
index 95d9ec9af7c..c968a695ad0 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/EntryValue.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/EntryValue.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/test_log.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.EntryValue}
  */
+@com.google.protobuf.Generated
 public final class EntryValue extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.EntryValue)
@@ -17,8 +18,8 @@ public final class EntryValue extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       EntryValue.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/EntryValueOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/EntryValueOrBuilder.java
index 19578965697..850e78aa0f2 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/EntryValueOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/EntryValueOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/test_log.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface EntryValueOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.EntryValue)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ErrorCodes.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ErrorCodes.java
index c717a8b23e5..08d04f1623d 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ErrorCodes.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ErrorCodes.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/lib/core/error_codes.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class ErrorCodes {
   private ErrorCodes() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       ErrorCodes.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Event.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Event.java
index f8700f4727a..6c6f3f6a986 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Event.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Event.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/util/event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -13,6 +13,7 @@
  *
  * Protobuf type {@code tensorflow.Event}
  */
+@com.google.protobuf.Generated
 public final class Event extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.Event)
@@ -22,8 +23,8 @@ public final class Event extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       Event.class.getName());
   }
@@ -826,7 +827,7 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getSourceMetadataFieldBuilder();
+        internalGetSourceMetadataFieldBuilder();
       }
     }
     @java.lang.Override
@@ -937,7 +938,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) {
 
     public Builder mergeFrom(org.tensorflow.proto.Event other) {
       if (other == org.tensorflow.proto.Event.getDefaultInstance()) return this;
-      if (other.getWallTime() != 0D) {
+      if (java.lang.Double.doubleToRawLongBits(other.getWallTime()) != 0) {
         setWallTime(other.getWallTime());
       }
       if (other.getStep() != 0L) {
@@ -1030,28 +1031,28 @@ public Builder mergeFrom(
             } // case 34
             case 42: {
               input.readMessage(
-                  getSummaryFieldBuilder().getBuilder(),
+                  internalGetSummaryFieldBuilder().getBuilder(),
                   extensionRegistry);
               whatCase_ = 5;
               break;
             } // case 42
             case 50: {
               input.readMessage(
-                  getLogMessageFieldBuilder().getBuilder(),
+                  internalGetLogMessageFieldBuilder().getBuilder(),
                   extensionRegistry);
               whatCase_ = 6;
               break;
             } // case 50
             case 58: {
               input.readMessage(
-                  getSessionLogFieldBuilder().getBuilder(),
+                  internalGetSessionLogFieldBuilder().getBuilder(),
                   extensionRegistry);
               whatCase_ = 7;
               break;
             } // case 58
             case 66: {
               input.readMessage(
-                  getTaggedRunMetadataFieldBuilder().getBuilder(),
+                  internalGetTaggedRunMetadataFieldBuilder().getBuilder(),
                   extensionRegistry);
               whatCase_ = 8;
               break;
@@ -1063,7 +1064,7 @@ public Builder mergeFrom(
             } // case 74
             case 82: {
               input.readMessage(
-                  getSourceMetadataFieldBuilder().getBuilder(),
+                  internalGetSourceMetadataFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000200;
               break;
@@ -1513,7 +1514,7 @@ public Builder clearSummary() {
      * .tensorflow.Summary summary = 5;
      */
     public org.tensorflow.proto.Summary.Builder getSummaryBuilder() {
-      return getSummaryFieldBuilder().getBuilder();
+      return internalGetSummaryFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -1542,7 +1543,7 @@ public org.tensorflow.proto.SummaryOrBuilder getSummaryOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.Summary, org.tensorflow.proto.Summary.Builder, org.tensorflow.proto.SummaryOrBuilder> 
-        getSummaryFieldBuilder() {
+        internalGetSummaryFieldBuilder() {
       if (summaryBuilder_ == null) {
         if (!(whatCase_ == 5)) {
           what_ = org.tensorflow.proto.Summary.getDefaultInstance();
@@ -1709,7 +1710,7 @@ public org.tensorflow.proto.SummaryOrBuilder getSummaryOrBuilder() {
      * .tensorflow.LogMessage log_message = 6 [deprecated = true];
      */
     @java.lang.Deprecated public org.tensorflow.proto.LogMessage.Builder getLogMessageBuilder() {
-      return getLogMessageFieldBuilder().getBuilder();
+      return internalGetLogMessageFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -1742,7 +1743,7 @@ public org.tensorflow.proto.SummaryOrBuilder getSummaryOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.LogMessage, org.tensorflow.proto.LogMessage.Builder, org.tensorflow.proto.LogMessageOrBuilder> 
-        getLogMessageFieldBuilder() {
+        internalGetLogMessageFieldBuilder() {
       if (logMessageBuilder_ == null) {
         if (!(whatCase_ == 6)) {
           what_ = org.tensorflow.proto.LogMessage.getDefaultInstance();
@@ -1891,7 +1892,7 @@ public Builder clearSessionLog() {
      * .tensorflow.SessionLog session_log = 7;
      */
     public org.tensorflow.proto.SessionLog.Builder getSessionLogBuilder() {
-      return getSessionLogFieldBuilder().getBuilder();
+      return internalGetSessionLogFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -1920,7 +1921,7 @@ public org.tensorflow.proto.SessionLogOrBuilder getSessionLogOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.SessionLog, org.tensorflow.proto.SessionLog.Builder, org.tensorflow.proto.SessionLogOrBuilder> 
-        getSessionLogFieldBuilder() {
+        internalGetSessionLogFieldBuilder() {
       if (sessionLogBuilder_ == null) {
         if (!(whatCase_ == 7)) {
           what_ = org.tensorflow.proto.SessionLog.getDefaultInstance();
@@ -2069,7 +2070,7 @@ public Builder clearTaggedRunMetadata() {
      * .tensorflow.TaggedRunMetadata tagged_run_metadata = 8;
      */
     public org.tensorflow.proto.TaggedRunMetadata.Builder getTaggedRunMetadataBuilder() {
-      return getTaggedRunMetadataFieldBuilder().getBuilder();
+      return internalGetTaggedRunMetadataFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -2098,7 +2099,7 @@ public org.tensorflow.proto.TaggedRunMetadataOrBuilder getTaggedRunMetadataOrBui
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.TaggedRunMetadata, org.tensorflow.proto.TaggedRunMetadata.Builder, org.tensorflow.proto.TaggedRunMetadataOrBuilder> 
-        getTaggedRunMetadataFieldBuilder() {
+        internalGetTaggedRunMetadataFieldBuilder() {
       if (taggedRunMetadataBuilder_ == null) {
         if (!(whatCase_ == 8)) {
           what_ = org.tensorflow.proto.TaggedRunMetadata.getDefaultInstance();
@@ -2299,7 +2300,7 @@ public Builder clearSourceMetadata() {
     public org.tensorflow.proto.SourceMetadata.Builder getSourceMetadataBuilder() {
       bitField0_ |= 0x00000200;
       onChanged();
-      return getSourceMetadataFieldBuilder().getBuilder();
+      return internalGetSourceMetadataFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -2327,7 +2328,7 @@ public org.tensorflow.proto.SourceMetadataOrBuilder getSourceMetadataOrBuilder()
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.SourceMetadata, org.tensorflow.proto.SourceMetadata.Builder, org.tensorflow.proto.SourceMetadataOrBuilder> 
-        getSourceMetadataFieldBuilder() {
+        internalGetSourceMetadataFieldBuilder() {
       if (sourceMetadataBuilder_ == null) {
         sourceMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.SourceMetadata, org.tensorflow.proto.SourceMetadata.Builder, org.tensorflow.proto.SourceMetadataOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/EventOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/EventOrBuilder.java
index 61a590cfd66..e0fdef099d8 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/EventOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/EventOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/util/event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface EventOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.Event)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/EventProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/EventProtos.java
index ec026ec2e7f..5267510c984 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/EventProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/EventProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/util/event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class EventProtos {
   private EventProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       EventProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Example.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Example.java
index 4f1f03853ec..c2ae5727c17 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Example.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Example.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/example/example.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.Example}
  */
+@com.google.protobuf.Generated
 public final class Example extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.Example)
@@ -17,8 +18,8 @@ public final class Example extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       Example.class.getName());
   }
@@ -264,7 +265,7 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getFeaturesFieldBuilder();
+        internalGetFeaturesFieldBuilder();
       }
     }
     @java.lang.Override
@@ -362,7 +363,7 @@ public Builder mergeFrom(
               break;
             case 10: {
               input.readMessage(
-                  getFeaturesFieldBuilder().getBuilder(),
+                  internalGetFeaturesFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000001;
               break;
@@ -475,7 +476,7 @@ public Builder clearFeatures() {
     public org.tensorflow.proto.Features.Builder getFeaturesBuilder() {
       bitField0_ |= 0x00000001;
       onChanged();
-      return getFeaturesFieldBuilder().getBuilder();
+      return internalGetFeaturesFieldBuilder().getBuilder();
     }
     /**
      * .tensorflow.Features features = 1;
@@ -493,7 +494,7 @@ public org.tensorflow.proto.FeaturesOrBuilder getFeaturesOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.Features, org.tensorflow.proto.Features.Builder, org.tensorflow.proto.FeaturesOrBuilder> 
-        getFeaturesFieldBuilder() {
+        internalGetFeaturesFieldBuilder() {
       if (featuresBuilder_ == null) {
         featuresBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.Features, org.tensorflow.proto.Features.Builder, org.tensorflow.proto.FeaturesOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleOrBuilder.java
index 090e50da446..1f0843d7916 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/example/example.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface ExampleOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.Example)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleParserConfiguration.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleParserConfiguration.java
index a74f6f6df59..fc934df1058 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleParserConfiguration.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleParserConfiguration.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/example/example_parser_configuration.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.ExampleParserConfiguration}
  */
+@com.google.protobuf.Generated
 public final class ExampleParserConfiguration extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.ExampleParserConfiguration)
@@ -17,8 +18,8 @@ public final class ExampleParserConfiguration extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       ExampleParserConfiguration.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleParserConfigurationOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleParserConfigurationOrBuilder.java
index 1f35e0642bc..3ac9adb8f96 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleParserConfigurationOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleParserConfigurationOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/example/example_parser_configuration.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface ExampleParserConfigurationOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.ExampleParserConfiguration)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleParserConfigurationProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleParserConfigurationProtos.java
index 4d14ee3d4b8..ac8699f1db1 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleParserConfigurationProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleParserConfigurationProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/example/example_parser_configuration.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class ExampleParserConfigurationProtos {
   private ExampleParserConfigurationProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       ExampleParserConfigurationProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleProtos.java
index 46f3017c277..0ff3d47f443 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExampleProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/example/example.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class ExampleProtos {
   private ExampleProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       ExampleProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Execution.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Execution.java
index 46793096670..62957f78f92 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Execution.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Execution.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/debug_event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -14,6 +14,7 @@
  *
  * Protobuf type {@code tensorflow.Execution}
  */
+@com.google.protobuf.Generated
 public final class Execution extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.Execution)
@@ -23,8 +24,8 @@ public final class Execution extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       Execution.class.getName());
   }
@@ -771,8 +772,8 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getTensorProtosFieldBuilder();
-        getCodeLocationFieldBuilder();
+        internalGetTensorProtosFieldBuilder();
+        internalGetCodeLocationFieldBuilder();
       }
     }
     @java.lang.Override
@@ -948,7 +949,7 @@ public Builder mergeFrom(org.tensorflow.proto.Execution other) {
             bitField0_ = (bitField0_ & ~0x00000040);
             tensorProtosBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getTensorProtosFieldBuilder() : null;
+                 internalGetTensorProtosFieldBuilder() : null;
           } else {
             tensorProtosBuilder_.addAllMessages(other.tensorProtos_);
           }
@@ -1061,7 +1062,7 @@ public Builder mergeFrom(
             } // case 58
             case 66: {
               input.readMessage(
-                  getCodeLocationFieldBuilder().getBuilder(),
+                  internalGetCodeLocationFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000080;
               break;
@@ -1618,9 +1619,7 @@ public org.tensorflow.proto.TensorDebugMode getTensorDebugMode() {
      * @return This builder for chaining.
      */
     public Builder setTensorDebugMode(org.tensorflow.proto.TensorDebugMode value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000020;
       tensorDebugMode_ = value.getNumber();
       onChanged();
@@ -1886,7 +1885,7 @@ public Builder removeTensorProtos(int index) {
      */
     public org.tensorflow.proto.TensorProto.Builder getTensorProtosBuilder(
         int index) {
-      return getTensorProtosFieldBuilder().getBuilder(index);
+      return internalGetTensorProtosFieldBuilder().getBuilder(index);
     }
     /**
      * 
@@ -1928,7 +1927,7 @@ public org.tensorflow.proto.TensorProtoOrBuilder getTensorProtosOrBuilder(
      * repeated .tensorflow.TensorProto tensor_protos = 7;
      */
     public org.tensorflow.proto.TensorProto.Builder addTensorProtosBuilder() {
-      return getTensorProtosFieldBuilder().addBuilder(
+      return internalGetTensorProtosFieldBuilder().addBuilder(
           org.tensorflow.proto.TensorProto.getDefaultInstance());
     }
     /**
@@ -1941,7 +1940,7 @@ public org.tensorflow.proto.TensorProto.Builder addTensorProtosBuilder() {
      */
     public org.tensorflow.proto.TensorProto.Builder addTensorProtosBuilder(
         int index) {
-      return getTensorProtosFieldBuilder().addBuilder(
+      return internalGetTensorProtosFieldBuilder().addBuilder(
           index, org.tensorflow.proto.TensorProto.getDefaultInstance());
     }
     /**
@@ -1954,11 +1953,11 @@ public org.tensorflow.proto.TensorProto.Builder addTensorProtosBuilder(
      */
     public java.util.List 
          getTensorProtosBuilderList() {
-      return getTensorProtosFieldBuilder().getBuilderList();
+      return internalGetTensorProtosFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> 
-        getTensorProtosFieldBuilder() {
+        internalGetTensorProtosFieldBuilder() {
       if (tensorProtosBuilder_ == null) {
         tensorProtosBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder>(
@@ -2090,7 +2089,7 @@ public Builder clearCodeLocation() {
     public org.tensorflow.proto.CodeLocation.Builder getCodeLocationBuilder() {
       bitField0_ |= 0x00000080;
       onChanged();
-      return getCodeLocationFieldBuilder().getBuilder();
+      return internalGetCodeLocationFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -2116,7 +2115,7 @@ public org.tensorflow.proto.CodeLocationOrBuilder getCodeLocationOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.CodeLocation, org.tensorflow.proto.CodeLocation.Builder, org.tensorflow.proto.CodeLocationOrBuilder> 
-        getCodeLocationFieldBuilder() {
+        internalGetCodeLocationFieldBuilder() {
       if (codeLocationBuilder_ == null) {
         codeLocationBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.CodeLocation, org.tensorflow.proto.CodeLocation.Builder, org.tensorflow.proto.CodeLocationOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExecutionOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExecutionOrBuilder.java
index 1e95b376148..77a7e477043 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExecutionOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ExecutionOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/debug_event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface ExecutionOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.Execution)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Feature.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Feature.java
index 000c9bda934..d706b797f2c 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Feature.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Feature.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/example/feature.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.Feature}
  */
+@com.google.protobuf.Generated
 public final class Feature extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.Feature)
@@ -21,8 +22,8 @@ public final class Feature extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       Feature.class.getName());
   }
@@ -542,21 +543,21 @@ public Builder mergeFrom(
               break;
             case 10: {
               input.readMessage(
-                  getBytesListFieldBuilder().getBuilder(),
+                  internalGetBytesListFieldBuilder().getBuilder(),
                   extensionRegistry);
               kindCase_ = 1;
               break;
             } // case 10
             case 18: {
               input.readMessage(
-                  getFloatListFieldBuilder().getBuilder(),
+                  internalGetFloatListFieldBuilder().getBuilder(),
                   extensionRegistry);
               kindCase_ = 2;
               break;
             } // case 18
             case 26: {
               input.readMessage(
-                  getInt64ListFieldBuilder().getBuilder(),
+                  internalGetInt64ListFieldBuilder().getBuilder(),
                   extensionRegistry);
               kindCase_ = 3;
               break;
@@ -697,7 +698,7 @@ public Builder clearBytesList() {
      * .tensorflow.BytesList bytes_list = 1;
      */
     public org.tensorflow.proto.BytesList.Builder getBytesListBuilder() {
-      return getBytesListFieldBuilder().getBuilder();
+      return internalGetBytesListFieldBuilder().getBuilder();
     }
     /**
      * .tensorflow.BytesList bytes_list = 1;
@@ -718,7 +719,7 @@ public org.tensorflow.proto.BytesListOrBuilder getBytesListOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.BytesList, org.tensorflow.proto.BytesList.Builder, org.tensorflow.proto.BytesListOrBuilder> 
-        getBytesListFieldBuilder() {
+        internalGetBytesListFieldBuilder() {
       if (bytesListBuilder_ == null) {
         if (!(kindCase_ == 1)) {
           kind_ = org.tensorflow.proto.BytesList.getDefaultInstance();
@@ -839,7 +840,7 @@ public Builder clearFloatList() {
      * .tensorflow.FloatList float_list = 2;
      */
     public org.tensorflow.proto.FloatList.Builder getFloatListBuilder() {
-      return getFloatListFieldBuilder().getBuilder();
+      return internalGetFloatListFieldBuilder().getBuilder();
     }
     /**
      * .tensorflow.FloatList float_list = 2;
@@ -860,7 +861,7 @@ public org.tensorflow.proto.FloatListOrBuilder getFloatListOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.FloatList, org.tensorflow.proto.FloatList.Builder, org.tensorflow.proto.FloatListOrBuilder> 
-        getFloatListFieldBuilder() {
+        internalGetFloatListFieldBuilder() {
       if (floatListBuilder_ == null) {
         if (!(kindCase_ == 2)) {
           kind_ = org.tensorflow.proto.FloatList.getDefaultInstance();
@@ -981,7 +982,7 @@ public Builder clearInt64List() {
      * .tensorflow.Int64List int64_list = 3;
      */
     public org.tensorflow.proto.Int64List.Builder getInt64ListBuilder() {
-      return getInt64ListFieldBuilder().getBuilder();
+      return internalGetInt64ListFieldBuilder().getBuilder();
     }
     /**
      * .tensorflow.Int64List int64_list = 3;
@@ -1002,7 +1003,7 @@ public org.tensorflow.proto.Int64ListOrBuilder getInt64ListOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.Int64List, org.tensorflow.proto.Int64List.Builder, org.tensorflow.proto.Int64ListOrBuilder> 
-        getInt64ListFieldBuilder() {
+        internalGetInt64ListFieldBuilder() {
       if (int64ListBuilder_ == null) {
         if (!(kindCase_ == 3)) {
           kind_ = org.tensorflow.proto.Int64List.getDefaultInstance();
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureConfiguration.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureConfiguration.java
index 98a591ecedb..fc684bbc742 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureConfiguration.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureConfiguration.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/example/example_parser_configuration.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.FeatureConfiguration}
  */
+@com.google.protobuf.Generated
 public final class FeatureConfiguration extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.FeatureConfiguration)
@@ -17,8 +18,8 @@ public final class FeatureConfiguration extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       FeatureConfiguration.class.getName());
   }
@@ -475,14 +476,14 @@ public Builder mergeFrom(
               break;
             case 10: {
               input.readMessage(
-                  getFixedLenFeatureFieldBuilder().getBuilder(),
+                  internalGetFixedLenFeatureFieldBuilder().getBuilder(),
                   extensionRegistry);
               configCase_ = 1;
               break;
             } // case 10
             case 18: {
               input.readMessage(
-                  getVarLenFeatureFieldBuilder().getBuilder(),
+                  internalGetVarLenFeatureFieldBuilder().getBuilder(),
                   extensionRegistry);
               configCase_ = 2;
               break;
@@ -623,7 +624,7 @@ public Builder clearFixedLenFeature() {
      * .tensorflow.FixedLenFeatureProto fixed_len_feature = 1;
      */
     public org.tensorflow.proto.FixedLenFeatureProto.Builder getFixedLenFeatureBuilder() {
-      return getFixedLenFeatureFieldBuilder().getBuilder();
+      return internalGetFixedLenFeatureFieldBuilder().getBuilder();
     }
     /**
      * .tensorflow.FixedLenFeatureProto fixed_len_feature = 1;
@@ -644,7 +645,7 @@ public org.tensorflow.proto.FixedLenFeatureProtoOrBuilder getFixedLenFeatureOrBu
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.FixedLenFeatureProto, org.tensorflow.proto.FixedLenFeatureProto.Builder, org.tensorflow.proto.FixedLenFeatureProtoOrBuilder> 
-        getFixedLenFeatureFieldBuilder() {
+        internalGetFixedLenFeatureFieldBuilder() {
       if (fixedLenFeatureBuilder_ == null) {
         if (!(configCase_ == 1)) {
           config_ = org.tensorflow.proto.FixedLenFeatureProto.getDefaultInstance();
@@ -765,7 +766,7 @@ public Builder clearVarLenFeature() {
      * .tensorflow.VarLenFeatureProto var_len_feature = 2;
      */
     public org.tensorflow.proto.VarLenFeatureProto.Builder getVarLenFeatureBuilder() {
-      return getVarLenFeatureFieldBuilder().getBuilder();
+      return internalGetVarLenFeatureFieldBuilder().getBuilder();
     }
     /**
      * .tensorflow.VarLenFeatureProto var_len_feature = 2;
@@ -786,7 +787,7 @@ public org.tensorflow.proto.VarLenFeatureProtoOrBuilder getVarLenFeatureOrBuilde
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.VarLenFeatureProto, org.tensorflow.proto.VarLenFeatureProto.Builder, org.tensorflow.proto.VarLenFeatureProtoOrBuilder> 
-        getVarLenFeatureFieldBuilder() {
+        internalGetVarLenFeatureFieldBuilder() {
       if (varLenFeatureBuilder_ == null) {
         if (!(configCase_ == 2)) {
           config_ = org.tensorflow.proto.VarLenFeatureProto.getDefaultInstance();
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureConfigurationOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureConfigurationOrBuilder.java
index 7b6b97b7815..dc99e9be9c2 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureConfigurationOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureConfigurationOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/example/example_parser_configuration.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface FeatureConfigurationOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.FeatureConfiguration)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureList.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureList.java
index ee7c362045d..0e4713576a6 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureList.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureList.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/example/feature.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -18,6 +18,7 @@
  *
  * Protobuf type {@code tensorflow.FeatureList}
  */
+@com.google.protobuf.Generated
 public final class FeatureList extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.FeatureList)
@@ -27,8 +28,8 @@ public final class FeatureList extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       FeatureList.class.getName());
   }
@@ -384,7 +385,7 @@ public Builder mergeFrom(org.tensorflow.proto.FeatureList other) {
             bitField0_ = (bitField0_ & ~0x00000001);
             featureBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getFeatureFieldBuilder() : null;
+                 internalGetFeatureFieldBuilder() : null;
           } else {
             featureBuilder_.addAllMessages(other.feature_);
           }
@@ -626,7 +627,7 @@ public Builder removeFeature(int index) {
      */
     public org.tensorflow.proto.Feature.Builder getFeatureBuilder(
         int index) {
-      return getFeatureFieldBuilder().getBuilder(index);
+      return internalGetFeatureFieldBuilder().getBuilder(index);
     }
     /**
      * repeated .tensorflow.Feature feature = 1;
@@ -653,7 +654,7 @@ public org.tensorflow.proto.FeatureOrBuilder getFeatureOrBuilder(
      * repeated .tensorflow.Feature feature = 1;
      */
     public org.tensorflow.proto.Feature.Builder addFeatureBuilder() {
-      return getFeatureFieldBuilder().addBuilder(
+      return internalGetFeatureFieldBuilder().addBuilder(
           org.tensorflow.proto.Feature.getDefaultInstance());
     }
     /**
@@ -661,7 +662,7 @@ public org.tensorflow.proto.Feature.Builder addFeatureBuilder() {
      */
     public org.tensorflow.proto.Feature.Builder addFeatureBuilder(
         int index) {
-      return getFeatureFieldBuilder().addBuilder(
+      return internalGetFeatureFieldBuilder().addBuilder(
           index, org.tensorflow.proto.Feature.getDefaultInstance());
     }
     /**
@@ -669,11 +670,11 @@ public org.tensorflow.proto.Feature.Builder addFeatureBuilder(
      */
     public java.util.List 
          getFeatureBuilderList() {
-      return getFeatureFieldBuilder().getBuilderList();
+      return internalGetFeatureFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.Feature, org.tensorflow.proto.Feature.Builder, org.tensorflow.proto.FeatureOrBuilder> 
-        getFeatureFieldBuilder() {
+        internalGetFeatureFieldBuilder() {
       if (featureBuilder_ == null) {
         featureBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.Feature, org.tensorflow.proto.Feature.Builder, org.tensorflow.proto.FeatureOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureListOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureListOrBuilder.java
index c777d2f0a4d..af771775506 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureListOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureListOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/example/feature.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface FeatureListOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.FeatureList)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureLists.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureLists.java
index f69d92ebbcb..9efbe19fe5d 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureLists.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureLists.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/example/feature.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.FeatureLists}
  */
+@com.google.protobuf.Generated
 public final class FeatureLists extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.FeatureLists)
@@ -17,8 +18,8 @@ public final class FeatureLists extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       FeatureLists.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureListsOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureListsOrBuilder.java
index d42e63918ef..cd690175ece 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureListsOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureListsOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/example/feature.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface FeatureListsOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.FeatureLists)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureOrBuilder.java
index 04375d60edf..d9027454c79 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/example/feature.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface FeatureOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.Feature)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureProtos.java
index 056432bdb1a..30f5cc4ded1 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeatureProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/example/feature.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class FeatureProtos {
   private FeatureProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       FeatureProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Features.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Features.java
index 09565c43a05..5e649f2f1c2 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Features.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Features.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/example/feature.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.Features}
  */
+@com.google.protobuf.Generated
 public final class Features extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.Features)
@@ -17,8 +18,8 @@ public final class Features extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       Features.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeaturesOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeaturesOrBuilder.java
index ccc86b2da95..6ce738f7dc3 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeaturesOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FeaturesOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/example/feature.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface FeaturesOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.Features)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FingerprintDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FingerprintDef.java
index d26cf3ac830..e9879da74df 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FingerprintDef.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FingerprintDef.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/fingerprint.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -15,6 +15,7 @@
  *
  * Protobuf type {@code tensorflow.FingerprintDef}
  */
+@com.google.protobuf.Generated
 public final class FingerprintDef extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.FingerprintDef)
@@ -24,8 +25,8 @@ public final class FingerprintDef extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       FingerprintDef.class.getName());
   }
@@ -483,7 +484,7 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getVersionFieldBuilder();
+        internalGetVersionFieldBuilder();
       }
     }
     @java.lang.Override
@@ -650,7 +651,7 @@ public Builder mergeFrom(
             } // case 40
             case 50: {
               input.readMessage(
-                  getVersionFieldBuilder().getBuilder(),
+                  internalGetVersionFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000040;
               break;
@@ -1108,7 +1109,7 @@ public Builder clearVersion() {
     public org.tensorflow.proto.VersionDef.Builder getVersionBuilder() {
       bitField0_ |= 0x00000040;
       onChanged();
-      return getVersionFieldBuilder().getBuilder();
+      return internalGetVersionFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -1134,7 +1135,7 @@ public org.tensorflow.proto.VersionDefOrBuilder getVersionOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.VersionDef, org.tensorflow.proto.VersionDef.Builder, org.tensorflow.proto.VersionDefOrBuilder> 
-        getVersionFieldBuilder() {
+        internalGetVersionFieldBuilder() {
       if (versionBuilder_ == null) {
         versionBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.VersionDef, org.tensorflow.proto.VersionDef.Builder, org.tensorflow.proto.VersionDefOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FingerprintDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FingerprintDefOrBuilder.java
index 1dc0c870f7d..a99b0af331f 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FingerprintDefOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FingerprintDefOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/fingerprint.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface FingerprintDefOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.FingerprintDef)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FingerprintProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FingerprintProtos.java
index 734b9b30e63..be59b539b1f 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FingerprintProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FingerprintProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/fingerprint.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class FingerprintProtos {
   private FingerprintProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       FingerprintProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FixedLenFeatureProto.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FixedLenFeatureProto.java
index 70708dadbba..67af2093b60 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FixedLenFeatureProto.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FixedLenFeatureProto.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/example/example_parser_configuration.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.FixedLenFeatureProto}
  */
+@com.google.protobuf.Generated
 public final class FixedLenFeatureProto extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.FixedLenFeatureProto)
@@ -17,8 +18,8 @@ public final class FixedLenFeatureProto extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       FixedLenFeatureProto.class.getName());
   }
@@ -385,8 +386,8 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getShapeFieldBuilder();
-        getDefaultValueFieldBuilder();
+        internalGetShapeFieldBuilder();
+        internalGetDefaultValueFieldBuilder();
       }
     }
     @java.lang.Override
@@ -519,14 +520,14 @@ public Builder mergeFrom(
             } // case 8
             case 18: {
               input.readMessage(
-                  getShapeFieldBuilder().getBuilder(),
+                  internalGetShapeFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000002;
               break;
             } // case 18
             case 26: {
               input.readMessage(
-                  getDefaultValueFieldBuilder().getBuilder(),
+                  internalGetDefaultValueFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000004;
               break;
@@ -587,9 +588,7 @@ public org.tensorflow.proto.DataType getDtype() {
      * @return This builder for chaining.
      */
     public Builder setDtype(org.tensorflow.proto.DataType value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000001;
       dtype_ = value.getNumber();
       onChanged();
@@ -697,7 +696,7 @@ public Builder clearShape() {
     public org.tensorflow.proto.TensorShapeProto.Builder getShapeBuilder() {
       bitField0_ |= 0x00000002;
       onChanged();
-      return getShapeFieldBuilder().getBuilder();
+      return internalGetShapeFieldBuilder().getBuilder();
     }
     /**
      * .tensorflow.TensorShapeProto shape = 2;
@@ -715,7 +714,7 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> 
-        getShapeFieldBuilder() {
+        internalGetShapeFieldBuilder() {
       if (shapeBuilder_ == null) {
         shapeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder>(
@@ -818,7 +817,7 @@ public Builder clearDefaultValue() {
     public org.tensorflow.proto.TensorProto.Builder getDefaultValueBuilder() {
       bitField0_ |= 0x00000004;
       onChanged();
-      return getDefaultValueFieldBuilder().getBuilder();
+      return internalGetDefaultValueFieldBuilder().getBuilder();
     }
     /**
      * .tensorflow.TensorProto default_value = 3;
@@ -836,7 +835,7 @@ public org.tensorflow.proto.TensorProtoOrBuilder getDefaultValueOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> 
-        getDefaultValueFieldBuilder() {
+        internalGetDefaultValueFieldBuilder() {
       if (defaultValueBuilder_ == null) {
         defaultValueBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FixedLenFeatureProtoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FixedLenFeatureProtoOrBuilder.java
index e49042cfcae..b77c144a866 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FixedLenFeatureProtoOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FixedLenFeatureProtoOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/example/example_parser_configuration.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface FixedLenFeatureProtoOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.FixedLenFeatureProto)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FloatList.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FloatList.java
index 5997a988c59..3bc26b42509 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FloatList.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FloatList.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/example/feature.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.FloatList}
  */
+@com.google.protobuf.Generated
 public final class FloatList extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.FloatList)
@@ -17,8 +18,8 @@ public final class FloatList extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       FloatList.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FloatListOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FloatListOrBuilder.java
index 3a09beb22bb..b78de4b90be 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FloatListOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FloatListOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/example/feature.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface FloatListOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.FloatList)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FullTypeDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FullTypeDef.java
index 52b9cac7116..d841e4d94d2 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FullTypeDef.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FullTypeDef.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/full_type.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -15,6 +15,7 @@
  *
  * Protobuf type {@code tensorflow.FullTypeDef}
  */
+@com.google.protobuf.Generated
 public final class FullTypeDef extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.FullTypeDef)
@@ -24,8 +25,8 @@ public final class FullTypeDef extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       FullTypeDef.class.getName());
   }
@@ -598,7 +599,7 @@ public Builder mergeFrom(org.tensorflow.proto.FullTypeDef other) {
             bitField0_ = (bitField0_ & ~0x00000002);
             argsBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getArgsFieldBuilder() : null;
+                 internalGetArgsFieldBuilder() : null;
           } else {
             argsBuilder_.addAllMessages(other.args_);
           }
@@ -764,9 +765,7 @@ public org.tensorflow.proto.FullTypeId getTypeId() {
      * @return This builder for chaining.
      */
     public Builder setTypeId(org.tensorflow.proto.FullTypeId value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000001;
       typeId_ = value.getNumber();
       onChanged();
@@ -969,7 +968,7 @@ public Builder removeArgs(int index) {
      */
     public org.tensorflow.proto.FullTypeDef.Builder getArgsBuilder(
         int index) {
-      return getArgsFieldBuilder().getBuilder(index);
+      return internalGetArgsFieldBuilder().getBuilder(index);
     }
     /**
      * repeated .tensorflow.FullTypeDef args = 2;
@@ -996,7 +995,7 @@ public org.tensorflow.proto.FullTypeDefOrBuilder getArgsOrBuilder(
      * repeated .tensorflow.FullTypeDef args = 2;
      */
     public org.tensorflow.proto.FullTypeDef.Builder addArgsBuilder() {
-      return getArgsFieldBuilder().addBuilder(
+      return internalGetArgsFieldBuilder().addBuilder(
           org.tensorflow.proto.FullTypeDef.getDefaultInstance());
     }
     /**
@@ -1004,7 +1003,7 @@ public org.tensorflow.proto.FullTypeDef.Builder addArgsBuilder() {
      */
     public org.tensorflow.proto.FullTypeDef.Builder addArgsBuilder(
         int index) {
-      return getArgsFieldBuilder().addBuilder(
+      return internalGetArgsFieldBuilder().addBuilder(
           index, org.tensorflow.proto.FullTypeDef.getDefaultInstance());
     }
     /**
@@ -1012,11 +1011,11 @@ public org.tensorflow.proto.FullTypeDef.Builder addArgsBuilder(
      */
     public java.util.List 
          getArgsBuilderList() {
-      return getArgsFieldBuilder().getBuilderList();
+      return internalGetArgsFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.FullTypeDef, org.tensorflow.proto.FullTypeDef.Builder, org.tensorflow.proto.FullTypeDefOrBuilder> 
-        getArgsFieldBuilder() {
+        internalGetArgsFieldBuilder() {
       if (argsBuilder_ == null) {
         argsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.FullTypeDef, org.tensorflow.proto.FullTypeDef.Builder, org.tensorflow.proto.FullTypeDefOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FullTypeDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FullTypeDefOrBuilder.java
index 7c071d4dcde..567d68d0f41 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FullTypeDefOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FullTypeDefOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/full_type.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface FullTypeDefOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.FullTypeDef)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FullTypeId.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FullTypeId.java
index 5f532bfd4e5..4ddb172107b 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FullTypeId.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FullTypeId.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/full_type.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -13,6 +13,7 @@
  *
  * Protobuf enum {@code tensorflow.FullTypeId}
  */
+@com.google.protobuf.Generated
 public enum FullTypeId
     implements com.google.protobuf.ProtocolMessageEnum {
   /**
@@ -428,8 +429,8 @@ public enum FullTypeId
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       FullTypeId.class.getName());
   }
@@ -927,7 +928,7 @@ public FullTypeId findValueByNumber(int number) {
       getDescriptorForType() {
     return getDescriptor();
   }
-  public static final com.google.protobuf.Descriptors.EnumDescriptor
+  public static com.google.protobuf.Descriptors.EnumDescriptor
       getDescriptor() {
     return org.tensorflow.proto.FullTypeProtos.getDescriptor().getEnumTypes().get(0);
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FullTypeProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FullTypeProtos.java
index 83bd2f467bd..a4c611a87b4 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FullTypeProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FullTypeProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/full_type.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class FullTypeProtos {
   private FullTypeProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       FullTypeProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionDef.java
index aa45a3eb8d2..7f3a766b3c9 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionDef.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionDef.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/function.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -17,6 +17,7 @@
  *
  * Protobuf type {@code tensorflow.FunctionDef}
  */
+@com.google.protobuf.Generated
 public final class FunctionDef extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.FunctionDef)
@@ -26,8 +27,8 @@ public final class FunctionDef extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       FunctionDef.class.getName());
   }
@@ -127,8 +128,8 @@ public static final class ArgAttrs extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         ArgAttrs.class.getName());
     }
@@ -1759,8 +1760,8 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getSignatureFieldBuilder();
-        getNodeDefFieldBuilder();
+        internalGetSignatureFieldBuilder();
+        internalGetNodeDefFieldBuilder();
       }
     }
     @java.lang.Override
@@ -1902,7 +1903,7 @@ public Builder mergeFrom(org.tensorflow.proto.FunctionDef other) {
             bitField0_ = (bitField0_ & ~0x00000010);
             nodeDefBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getNodeDefFieldBuilder() : null;
+                 internalGetNodeDefFieldBuilder() : null;
           } else {
             nodeDefBuilder_.addAllMessages(other.nodeDef_);
           }
@@ -1942,7 +1943,7 @@ public Builder mergeFrom(
               break;
             case 10: {
               input.readMessage(
-                  getSignatureFieldBuilder().getBuilder(),
+                  internalGetSignatureFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000001;
               break;
@@ -2148,7 +2149,7 @@ public Builder clearSignature() {
     public org.tensorflow.proto.OpDef.Builder getSignatureBuilder() {
       bitField0_ |= 0x00000001;
       onChanged();
-      return getSignatureFieldBuilder().getBuilder();
+      return internalGetSignatureFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -2176,7 +2177,7 @@ public org.tensorflow.proto.OpDefOrBuilder getSignatureOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.OpDef, org.tensorflow.proto.OpDef.Builder, org.tensorflow.proto.OpDefOrBuilder> 
-        getSignatureFieldBuilder() {
+        internalGetSignatureFieldBuilder() {
       if (signatureBuilder_ == null) {
         signatureBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.OpDef, org.tensorflow.proto.OpDef.Builder, org.tensorflow.proto.OpDefOrBuilder>(
@@ -2997,7 +2998,7 @@ public Builder removeNodeDef(int index) {
      */
     public org.tensorflow.proto.NodeDef.Builder getNodeDefBuilder(
         int index) {
-      return getNodeDefFieldBuilder().getBuilder(index);
+      return internalGetNodeDefFieldBuilder().getBuilder(index);
     }
     /**
      * 
@@ -3042,7 +3043,7 @@ public org.tensorflow.proto.NodeDefOrBuilder getNodeDefOrBuilder(
      * repeated .tensorflow.NodeDef node_def = 3;
      */
     public org.tensorflow.proto.NodeDef.Builder addNodeDefBuilder() {
-      return getNodeDefFieldBuilder().addBuilder(
+      return internalGetNodeDefFieldBuilder().addBuilder(
           org.tensorflow.proto.NodeDef.getDefaultInstance());
     }
     /**
@@ -3056,7 +3057,7 @@ public org.tensorflow.proto.NodeDef.Builder addNodeDefBuilder() {
      */
     public org.tensorflow.proto.NodeDef.Builder addNodeDefBuilder(
         int index) {
-      return getNodeDefFieldBuilder().addBuilder(
+      return internalGetNodeDefFieldBuilder().addBuilder(
           index, org.tensorflow.proto.NodeDef.getDefaultInstance());
     }
     /**
@@ -3070,11 +3071,11 @@ public org.tensorflow.proto.NodeDef.Builder addNodeDefBuilder(
      */
     public java.util.List 
          getNodeDefBuilderList() {
-      return getNodeDefFieldBuilder().getBuilderList();
+      return internalGetNodeDefFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.NodeDef, org.tensorflow.proto.NodeDef.Builder, org.tensorflow.proto.NodeDefOrBuilder> 
-        getNodeDefFieldBuilder() {
+        internalGetNodeDefFieldBuilder() {
       if (nodeDefBuilder_ == null) {
         nodeDefBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.NodeDef, org.tensorflow.proto.NodeDef.Builder, org.tensorflow.proto.NodeDefOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionDefLibrary.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionDefLibrary.java
index 13f92728ca4..8d6264b2a50 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionDefLibrary.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionDefLibrary.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/function.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.FunctionDefLibrary}
  */
+@com.google.protobuf.Generated
 public final class FunctionDefLibrary extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.FunctionDefLibrary)
@@ -21,8 +22,8 @@ public final class FunctionDefLibrary extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       FunctionDefLibrary.class.getName());
   }
@@ -514,7 +515,7 @@ public Builder mergeFrom(org.tensorflow.proto.FunctionDefLibrary other) {
             bitField0_ = (bitField0_ & ~0x00000001);
             functionBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getFunctionFieldBuilder() : null;
+                 internalGetFunctionFieldBuilder() : null;
           } else {
             functionBuilder_.addAllMessages(other.function_);
           }
@@ -540,7 +541,7 @@ public Builder mergeFrom(org.tensorflow.proto.FunctionDefLibrary other) {
             bitField0_ = (bitField0_ & ~0x00000002);
             gradientBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getGradientFieldBuilder() : null;
+                 internalGetGradientFieldBuilder() : null;
           } else {
             gradientBuilder_.addAllMessages(other.gradient_);
           }
@@ -566,7 +567,7 @@ public Builder mergeFrom(org.tensorflow.proto.FunctionDefLibrary other) {
             bitField0_ = (bitField0_ & ~0x00000004);
             registeredGradientsBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getRegisteredGradientsFieldBuilder() : null;
+                 internalGetRegisteredGradientsFieldBuilder() : null;
           } else {
             registeredGradientsBuilder_.addAllMessages(other.registeredGradients_);
           }
@@ -834,7 +835,7 @@ public Builder removeFunction(int index) {
      */
     public org.tensorflow.proto.FunctionDef.Builder getFunctionBuilder(
         int index) {
-      return getFunctionFieldBuilder().getBuilder(index);
+      return internalGetFunctionFieldBuilder().getBuilder(index);
     }
     /**
      * repeated .tensorflow.FunctionDef function = 1;
@@ -861,7 +862,7 @@ public org.tensorflow.proto.FunctionDefOrBuilder getFunctionOrBuilder(
      * repeated .tensorflow.FunctionDef function = 1;
      */
     public org.tensorflow.proto.FunctionDef.Builder addFunctionBuilder() {
-      return getFunctionFieldBuilder().addBuilder(
+      return internalGetFunctionFieldBuilder().addBuilder(
           org.tensorflow.proto.FunctionDef.getDefaultInstance());
     }
     /**
@@ -869,7 +870,7 @@ public org.tensorflow.proto.FunctionDef.Builder addFunctionBuilder() {
      */
     public org.tensorflow.proto.FunctionDef.Builder addFunctionBuilder(
         int index) {
-      return getFunctionFieldBuilder().addBuilder(
+      return internalGetFunctionFieldBuilder().addBuilder(
           index, org.tensorflow.proto.FunctionDef.getDefaultInstance());
     }
     /**
@@ -877,11 +878,11 @@ public org.tensorflow.proto.FunctionDef.Builder addFunctionBuilder(
      */
     public java.util.List 
          getFunctionBuilderList() {
-      return getFunctionFieldBuilder().getBuilderList();
+      return internalGetFunctionFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.FunctionDef, org.tensorflow.proto.FunctionDef.Builder, org.tensorflow.proto.FunctionDefOrBuilder> 
-        getFunctionFieldBuilder() {
+        internalGetFunctionFieldBuilder() {
       if (functionBuilder_ == null) {
         functionBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.FunctionDef, org.tensorflow.proto.FunctionDef.Builder, org.tensorflow.proto.FunctionDefOrBuilder>(
@@ -1074,7 +1075,7 @@ public Builder removeGradient(int index) {
      */
     public org.tensorflow.proto.GradientDef.Builder getGradientBuilder(
         int index) {
-      return getGradientFieldBuilder().getBuilder(index);
+      return internalGetGradientFieldBuilder().getBuilder(index);
     }
     /**
      * repeated .tensorflow.GradientDef gradient = 2;
@@ -1101,7 +1102,7 @@ public org.tensorflow.proto.GradientDefOrBuilder getGradientOrBuilder(
      * repeated .tensorflow.GradientDef gradient = 2;
      */
     public org.tensorflow.proto.GradientDef.Builder addGradientBuilder() {
-      return getGradientFieldBuilder().addBuilder(
+      return internalGetGradientFieldBuilder().addBuilder(
           org.tensorflow.proto.GradientDef.getDefaultInstance());
     }
     /**
@@ -1109,7 +1110,7 @@ public org.tensorflow.proto.GradientDef.Builder addGradientBuilder() {
      */
     public org.tensorflow.proto.GradientDef.Builder addGradientBuilder(
         int index) {
-      return getGradientFieldBuilder().addBuilder(
+      return internalGetGradientFieldBuilder().addBuilder(
           index, org.tensorflow.proto.GradientDef.getDefaultInstance());
     }
     /**
@@ -1117,11 +1118,11 @@ public org.tensorflow.proto.GradientDef.Builder addGradientBuilder(
      */
     public java.util.List 
          getGradientBuilderList() {
-      return getGradientFieldBuilder().getBuilderList();
+      return internalGetGradientFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.GradientDef, org.tensorflow.proto.GradientDef.Builder, org.tensorflow.proto.GradientDefOrBuilder> 
-        getGradientFieldBuilder() {
+        internalGetGradientFieldBuilder() {
       if (gradientBuilder_ == null) {
         gradientBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.GradientDef, org.tensorflow.proto.GradientDef.Builder, org.tensorflow.proto.GradientDefOrBuilder>(
@@ -1314,7 +1315,7 @@ public Builder removeRegisteredGradients(int index) {
      */
     public org.tensorflow.proto.RegisteredGradient.Builder getRegisteredGradientsBuilder(
         int index) {
-      return getRegisteredGradientsFieldBuilder().getBuilder(index);
+      return internalGetRegisteredGradientsFieldBuilder().getBuilder(index);
     }
     /**
      * repeated .tensorflow.RegisteredGradient registered_gradients = 3;
@@ -1341,7 +1342,7 @@ public org.tensorflow.proto.RegisteredGradientOrBuilder getRegisteredGradientsOr
      * repeated .tensorflow.RegisteredGradient registered_gradients = 3;
      */
     public org.tensorflow.proto.RegisteredGradient.Builder addRegisteredGradientsBuilder() {
-      return getRegisteredGradientsFieldBuilder().addBuilder(
+      return internalGetRegisteredGradientsFieldBuilder().addBuilder(
           org.tensorflow.proto.RegisteredGradient.getDefaultInstance());
     }
     /**
@@ -1349,7 +1350,7 @@ public org.tensorflow.proto.RegisteredGradient.Builder addRegisteredGradientsBui
      */
     public org.tensorflow.proto.RegisteredGradient.Builder addRegisteredGradientsBuilder(
         int index) {
-      return getRegisteredGradientsFieldBuilder().addBuilder(
+      return internalGetRegisteredGradientsFieldBuilder().addBuilder(
           index, org.tensorflow.proto.RegisteredGradient.getDefaultInstance());
     }
     /**
@@ -1357,11 +1358,11 @@ public org.tensorflow.proto.RegisteredGradient.Builder addRegisteredGradientsBui
      */
     public java.util.List 
          getRegisteredGradientsBuilderList() {
-      return getRegisteredGradientsFieldBuilder().getBuilderList();
+      return internalGetRegisteredGradientsFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.RegisteredGradient, org.tensorflow.proto.RegisteredGradient.Builder, org.tensorflow.proto.RegisteredGradientOrBuilder> 
-        getRegisteredGradientsFieldBuilder() {
+        internalGetRegisteredGradientsFieldBuilder() {
       if (registeredGradientsBuilder_ == null) {
         registeredGradientsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.RegisteredGradient, org.tensorflow.proto.RegisteredGradient.Builder, org.tensorflow.proto.RegisteredGradientOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionDefLibraryOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionDefLibraryOrBuilder.java
index 5dfb6aefc69..d937e48c9df 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionDefLibraryOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionDefLibraryOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/function.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface FunctionDefLibraryOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.FunctionDefLibrary)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionDefOrBuilder.java
index cd87f92a585..c44dec7f9a7 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionDefOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionDefOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/function.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface FunctionDefOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.FunctionDef)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionProtos.java
index 202accf0318..311c14a2c07 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/FunctionProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/function.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class FunctionProtos {
   private FunctionProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       FunctionProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GPUInfo.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GPUInfo.java
index 32cf218ca81..ddef9651a3e 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GPUInfo.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GPUInfo.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/test_log.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.GPUInfo}
  */
+@com.google.protobuf.Generated
 public final class GPUInfo extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.GPUInfo)
@@ -17,8 +18,8 @@ public final class GPUInfo extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       GPUInfo.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GPUInfoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GPUInfoOrBuilder.java
index 0520a0f68fb..dbc920fd741 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GPUInfoOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GPUInfoOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/test_log.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface GPUInfoOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.GPUInfo)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GPUOptions.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GPUOptions.java
index b63a758033d..f9fc065f8d2 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GPUOptions.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GPUOptions.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/config.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.GPUOptions}
  */
+@com.google.protobuf.Generated
 public final class GPUOptions extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.GPUOptions)
@@ -17,8 +18,8 @@ public final class GPUOptions extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       GPUOptions.class.getName());
   }
@@ -533,8 +534,8 @@ public static final class Experimental extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         Experimental.class.getName());
     }
@@ -725,8 +726,8 @@ public static final class VirtualDevices extends
         com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
           com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
           /* major= */ 4,
-          /* minor= */ 28,
-          /* patch= */ 3,
+          /* minor= */ 31,
+          /* patch= */ 1,
           /* suffix= */ "",
           VirtualDevices.class.getName());
       }
@@ -1978,8 +1979,8 @@ public static final class StreamMergeOptions extends
         com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
           com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
           /* major= */ 4,
-          /* minor= */ 28,
-          /* patch= */ 3,
+          /* minor= */ 31,
+          /* patch= */ 1,
           /* suffix= */ "",
           StreamMergeOptions.class.getName());
       }
@@ -3619,8 +3620,8 @@ private Builder(
       private void maybeForceBuilderInitialization() {
         if (com.google.protobuf.GeneratedMessage
                 .alwaysUseFieldBuilders) {
-          getVirtualDevicesFieldBuilder();
-          getStreamMergeOptionsFieldBuilder();
+          internalGetVirtualDevicesFieldBuilder();
+          internalGetStreamMergeOptionsFieldBuilder();
         }
       }
       @java.lang.Override
@@ -3791,7 +3792,7 @@ public Builder mergeFrom(org.tensorflow.proto.GPUOptions.Experimental other) {
               bitField0_ = (bitField0_ & ~0x00000001);
               virtualDevicesBuilder_ = 
                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                   getVirtualDevicesFieldBuilder() : null;
+                   internalGetVirtualDevicesFieldBuilder() : null;
             } else {
               virtualDevicesBuilder_.addAllMessages(other.virtualDevices_);
             }
@@ -3823,7 +3824,7 @@ public Builder mergeFrom(org.tensorflow.proto.GPUOptions.Experimental other) {
         if (other.getKernelTrackerMaxPending() != 0) {
           setKernelTrackerMaxPending(other.getKernelTrackerMaxPending());
         }
-        if (other.getInternalFragmentationFraction() != 0D) {
+        if (java.lang.Double.doubleToRawLongBits(other.getInternalFragmentationFraction()) != 0) {
           setInternalFragmentationFraction(other.getInternalFragmentationFraction());
         }
         if (other.getUseCudaMallocAsync() != false) {
@@ -3832,7 +3833,7 @@ public Builder mergeFrom(org.tensorflow.proto.GPUOptions.Experimental other) {
         if (other.getDisallowRetryOnAllocationFailure() != false) {
           setDisallowRetryOnAllocationFailure(other.getDisallowRetryOnAllocationFailure());
         }
-        if (other.getGpuHostMemLimitInMb() != 0F) {
+        if (java.lang.Float.floatToRawIntBits(other.getGpuHostMemLimitInMb()) != 0) {
           setGpuHostMemLimitInMb(other.getGpuHostMemLimitInMb());
         }
         if (other.getGpuHostMemDisallowGrowth() != false) {
@@ -3971,7 +3972,7 @@ public Builder mergeFrom(
               } // case 144
               case 154: {
                 input.readMessage(
-                    getStreamMergeOptionsFieldBuilder().getBuilder(),
+                    internalGetStreamMergeOptionsFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00020000;
                 break;
@@ -4706,7 +4707,7 @@ public Builder removeVirtualDevices(int index) {
        */
       public org.tensorflow.proto.GPUOptions.Experimental.VirtualDevices.Builder getVirtualDevicesBuilder(
           int index) {
-        return getVirtualDevicesFieldBuilder().getBuilder(index);
+        return internalGetVirtualDevicesFieldBuilder().getBuilder(index);
       }
       /**
        * 
@@ -4856,7 +4857,7 @@ public org.tensorflow.proto.GPUOptions.Experimental.VirtualDevicesOrBuilder getV
        * repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1;
        */
       public org.tensorflow.proto.GPUOptions.Experimental.VirtualDevices.Builder addVirtualDevicesBuilder() {
-        return getVirtualDevicesFieldBuilder().addBuilder(
+        return internalGetVirtualDevicesFieldBuilder().addBuilder(
             org.tensorflow.proto.GPUOptions.Experimental.VirtualDevices.getDefaultInstance());
       }
       /**
@@ -4905,7 +4906,7 @@ public org.tensorflow.proto.GPUOptions.Experimental.VirtualDevices.Builder addVi
        */
       public org.tensorflow.proto.GPUOptions.Experimental.VirtualDevices.Builder addVirtualDevicesBuilder(
           int index) {
-        return getVirtualDevicesFieldBuilder().addBuilder(
+        return internalGetVirtualDevicesFieldBuilder().addBuilder(
             index, org.tensorflow.proto.GPUOptions.Experimental.VirtualDevices.getDefaultInstance());
       }
       /**
@@ -4954,11 +4955,11 @@ public org.tensorflow.proto.GPUOptions.Experimental.VirtualDevices.Builder addVi
        */
       public java.util.List 
            getVirtualDevicesBuilderList() {
-        return getVirtualDevicesFieldBuilder().getBuilderList();
+        return internalGetVirtualDevicesFieldBuilder().getBuilderList();
       }
       private com.google.protobuf.RepeatedFieldBuilder<
           org.tensorflow.proto.GPUOptions.Experimental.VirtualDevices, org.tensorflow.proto.GPUOptions.Experimental.VirtualDevices.Builder, org.tensorflow.proto.GPUOptions.Experimental.VirtualDevicesOrBuilder> 
-          getVirtualDevicesFieldBuilder() {
+          internalGetVirtualDevicesFieldBuilder() {
         if (virtualDevicesBuilder_ == null) {
           virtualDevicesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.GPUOptions.Experimental.VirtualDevices, org.tensorflow.proto.GPUOptions.Experimental.VirtualDevices.Builder, org.tensorflow.proto.GPUOptions.Experimental.VirtualDevicesOrBuilder>(
@@ -5986,7 +5987,7 @@ public Builder clearStreamMergeOptions() {
       public org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptions.Builder getStreamMergeOptionsBuilder() {
         bitField0_ |= 0x00020000;
         onChanged();
-        return getStreamMergeOptionsFieldBuilder().getBuilder();
+        return internalGetStreamMergeOptionsFieldBuilder().getBuilder();
       }
       /**
        * .tensorflow.GPUOptions.Experimental.StreamMergeOptions stream_merge_options = 19;
@@ -6004,7 +6005,7 @@ public org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptionsOrBuilder
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptions, org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptions.Builder, org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptionsOrBuilder> 
-          getStreamMergeOptionsFieldBuilder() {
+          internalGetStreamMergeOptionsFieldBuilder() {
         if (streamMergeOptionsBuilder_ == null) {
           streamMergeOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptions, org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptions.Builder, org.tensorflow.proto.GPUOptions.Experimental.StreamMergeOptionsOrBuilder>(
@@ -6676,7 +6677,7 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getExperimentalFieldBuilder();
+        internalGetExperimentalFieldBuilder();
       }
     }
     @java.lang.Override
@@ -6775,7 +6776,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) {
 
     public Builder mergeFrom(org.tensorflow.proto.GPUOptions other) {
       if (other == org.tensorflow.proto.GPUOptions.getDefaultInstance()) return this;
-      if (other.getPerProcessGpuMemoryFraction() != 0D) {
+      if (java.lang.Double.doubleToRawLongBits(other.getPerProcessGpuMemoryFraction()) != 0) {
         setPerProcessGpuMemoryFraction(other.getPerProcessGpuMemoryFraction());
       }
       if (other.getAllowGrowth() != false) {
@@ -6874,7 +6875,7 @@ public Builder mergeFrom(
             } // case 64
             case 74: {
               input.readMessage(
-                  getExperimentalFieldBuilder().getBuilder(),
+                  internalGetExperimentalFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000100;
               break;
@@ -7727,7 +7728,7 @@ public Builder clearExperimental() {
     public org.tensorflow.proto.GPUOptions.Experimental.Builder getExperimentalBuilder() {
       bitField0_ |= 0x00000100;
       onChanged();
-      return getExperimentalFieldBuilder().getBuilder();
+      return internalGetExperimentalFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -7757,7 +7758,7 @@ public org.tensorflow.proto.GPUOptions.ExperimentalOrBuilder getExperimentalOrBu
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.GPUOptions.Experimental, org.tensorflow.proto.GPUOptions.Experimental.Builder, org.tensorflow.proto.GPUOptions.ExperimentalOrBuilder> 
-        getExperimentalFieldBuilder() {
+        internalGetExperimentalFieldBuilder() {
       if (experimentalBuilder_ == null) {
         experimentalBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.GPUOptions.Experimental, org.tensorflow.proto.GPUOptions.Experimental.Builder, org.tensorflow.proto.GPUOptions.ExperimentalOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GPUOptionsOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GPUOptionsOrBuilder.java
index a1d86d2d9c9..b336fa861cd 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GPUOptionsOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GPUOptionsOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/config.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface GPUOptionsOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.GPUOptions)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GradientDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GradientDef.java
index c7c4781cb88..50f6dd2f0fc 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GradientDef.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GradientDef.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/function.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -29,6 +29,7 @@
  *
  * Protobuf type {@code tensorflow.GradientDef}
  */
+@com.google.protobuf.Generated
 public final class GradientDef extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.GradientDef)
@@ -38,8 +39,8 @@ public final class GradientDef extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       GradientDef.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GradientDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GradientDefOrBuilder.java
index 4d6181be00b..5f60d84e00f 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GradientDefOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GradientDefOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/function.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface GradientDefOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.GradientDef)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDebugInfo.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDebugInfo.java
index 0c193e2f6eb..2122b658714 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDebugInfo.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDebugInfo.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/graph_debug_info.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.GraphDebugInfo}
  */
+@com.google.protobuf.Generated
 public final class GraphDebugInfo extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.GraphDebugInfo)
@@ -17,8 +18,8 @@ public final class GraphDebugInfo extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       GraphDebugInfo.class.getName());
   }
@@ -199,8 +200,8 @@ public static final class FileLineCol extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         FileLineCol.class.getName());
     }
@@ -1367,8 +1368,8 @@ public static final class StackTrace extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         StackTrace.class.getName());
     }
@@ -1799,7 +1800,7 @@ public Builder mergeFrom(org.tensorflow.proto.GraphDebugInfo.StackTrace other) {
               bitField0_ = (bitField0_ & ~0x00000001);
               fileLineColsBuilder_ = 
                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                   getFileLineColsFieldBuilder() : null;
+                   internalGetFileLineColsFieldBuilder() : null;
             } else {
               fileLineColsBuilder_.addAllMessages(other.fileLineCols_);
             }
@@ -2121,7 +2122,7 @@ public Builder removeFileLineCols(int index) {
        */
       public org.tensorflow.proto.GraphDebugInfo.FileLineCol.Builder getFileLineColsBuilder(
           int index) {
-        return getFileLineColsFieldBuilder().getBuilder(index);
+        return internalGetFileLineColsFieldBuilder().getBuilder(index);
       }
       /**
        * 
@@ -2160,7 +2161,7 @@ public org.tensorflow.proto.GraphDebugInfo.FileLineColOrBuilder getFileLineColsO
        * repeated .tensorflow.GraphDebugInfo.FileLineCol file_line_cols = 1;
        */
       public org.tensorflow.proto.GraphDebugInfo.FileLineCol.Builder addFileLineColsBuilder() {
-        return getFileLineColsFieldBuilder().addBuilder(
+        return internalGetFileLineColsFieldBuilder().addBuilder(
             org.tensorflow.proto.GraphDebugInfo.FileLineCol.getDefaultInstance());
       }
       /**
@@ -2172,7 +2173,7 @@ public org.tensorflow.proto.GraphDebugInfo.FileLineCol.Builder addFileLineColsBu
        */
       public org.tensorflow.proto.GraphDebugInfo.FileLineCol.Builder addFileLineColsBuilder(
           int index) {
-        return getFileLineColsFieldBuilder().addBuilder(
+        return internalGetFileLineColsFieldBuilder().addBuilder(
             index, org.tensorflow.proto.GraphDebugInfo.FileLineCol.getDefaultInstance());
       }
       /**
@@ -2184,11 +2185,11 @@ public org.tensorflow.proto.GraphDebugInfo.FileLineCol.Builder addFileLineColsBu
        */
       public java.util.List 
            getFileLineColsBuilderList() {
-        return getFileLineColsFieldBuilder().getBuilderList();
+        return internalGetFileLineColsFieldBuilder().getBuilderList();
       }
       private com.google.protobuf.RepeatedFieldBuilder<
           org.tensorflow.proto.GraphDebugInfo.FileLineCol, org.tensorflow.proto.GraphDebugInfo.FileLineCol.Builder, org.tensorflow.proto.GraphDebugInfo.FileLineColOrBuilder> 
-          getFileLineColsFieldBuilder() {
+          internalGetFileLineColsFieldBuilder() {
         if (fileLineColsBuilder_ == null) {
           fileLineColsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.GraphDebugInfo.FileLineCol, org.tensorflow.proto.GraphDebugInfo.FileLineCol.Builder, org.tensorflow.proto.GraphDebugInfo.FileLineColOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDebugInfoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDebugInfoOrBuilder.java
index 1219fa49740..d240fd75f73 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDebugInfoOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDebugInfoOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/graph_debug_info.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface GraphDebugInfoOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.GraphDebugInfo)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDebugInfoProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDebugInfoProtos.java
index 65504f7b57b..3b34271c634 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDebugInfoProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDebugInfoProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/graph_debug_info.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class GraphDebugInfoProtos {
   private GraphDebugInfoProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       GraphDebugInfoProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDef.java
index 412913cf499..2211a52e0fe 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDef.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDef.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/graph.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.GraphDef}
  */
+@com.google.protobuf.Generated
 public final class GraphDef extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.GraphDef)
@@ -21,8 +22,8 @@ public final class GraphDef extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       GraphDef.class.getName());
   }
@@ -558,10 +559,10 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getNodeFieldBuilder();
-        getVersionsFieldBuilder();
-        getLibraryFieldBuilder();
-        getDebugInfoFieldBuilder();
+        internalGetNodeFieldBuilder();
+        internalGetVersionsFieldBuilder();
+        internalGetLibraryFieldBuilder();
+        internalGetDebugInfoFieldBuilder();
       }
     }
     @java.lang.Override
@@ -694,7 +695,7 @@ public Builder mergeFrom(org.tensorflow.proto.GraphDef other) {
             bitField0_ = (bitField0_ & ~0x00000001);
             nodeBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getNodeFieldBuilder() : null;
+                 internalGetNodeFieldBuilder() : null;
           } else {
             nodeBuilder_.addAllMessages(other.node_);
           }
@@ -753,7 +754,7 @@ public Builder mergeFrom(
             } // case 10
             case 18: {
               input.readMessage(
-                  getLibraryFieldBuilder().getBuilder(),
+                  internalGetLibraryFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000008;
               break;
@@ -765,14 +766,14 @@ public Builder mergeFrom(
             } // case 24
             case 34: {
               input.readMessage(
-                  getVersionsFieldBuilder().getBuilder(),
+                  internalGetVersionsFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000002;
               break;
             } // case 34
             case 42: {
               input.readMessage(
-                  getDebugInfoFieldBuilder().getBuilder(),
+                  internalGetDebugInfoFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000010;
               break;
@@ -974,7 +975,7 @@ public Builder removeNode(int index) {
      */
     public org.tensorflow.proto.NodeDef.Builder getNodeBuilder(
         int index) {
-      return getNodeFieldBuilder().getBuilder(index);
+      return internalGetNodeFieldBuilder().getBuilder(index);
     }
     /**
      * repeated .tensorflow.NodeDef node = 1;
@@ -1001,7 +1002,7 @@ public org.tensorflow.proto.NodeDefOrBuilder getNodeOrBuilder(
      * repeated .tensorflow.NodeDef node = 1;
      */
     public org.tensorflow.proto.NodeDef.Builder addNodeBuilder() {
-      return getNodeFieldBuilder().addBuilder(
+      return internalGetNodeFieldBuilder().addBuilder(
           org.tensorflow.proto.NodeDef.getDefaultInstance());
     }
     /**
@@ -1009,7 +1010,7 @@ public org.tensorflow.proto.NodeDef.Builder addNodeBuilder() {
      */
     public org.tensorflow.proto.NodeDef.Builder addNodeBuilder(
         int index) {
-      return getNodeFieldBuilder().addBuilder(
+      return internalGetNodeFieldBuilder().addBuilder(
           index, org.tensorflow.proto.NodeDef.getDefaultInstance());
     }
     /**
@@ -1017,11 +1018,11 @@ public org.tensorflow.proto.NodeDef.Builder addNodeBuilder(
      */
     public java.util.List 
          getNodeBuilderList() {
-      return getNodeFieldBuilder().getBuilderList();
+      return internalGetNodeFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.NodeDef, org.tensorflow.proto.NodeDef.Builder, org.tensorflow.proto.NodeDefOrBuilder> 
-        getNodeFieldBuilder() {
+        internalGetNodeFieldBuilder() {
       if (nodeBuilder_ == null) {
         nodeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.NodeDef, org.tensorflow.proto.NodeDef.Builder, org.tensorflow.proto.NodeDefOrBuilder>(
@@ -1167,7 +1168,7 @@ public Builder clearVersions() {
     public org.tensorflow.proto.VersionDef.Builder getVersionsBuilder() {
       bitField0_ |= 0x00000002;
       onChanged();
-      return getVersionsFieldBuilder().getBuilder();
+      return internalGetVersionsFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -1197,7 +1198,7 @@ public org.tensorflow.proto.VersionDefOrBuilder getVersionsOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.VersionDef, org.tensorflow.proto.VersionDef.Builder, org.tensorflow.proto.VersionDefOrBuilder> 
-        getVersionsFieldBuilder() {
+        internalGetVersionsFieldBuilder() {
       if (versionsBuilder_ == null) {
         versionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.VersionDef, org.tensorflow.proto.VersionDef.Builder, org.tensorflow.proto.VersionDefOrBuilder>(
@@ -1559,7 +1560,7 @@ public Builder clearLibrary() {
     public org.tensorflow.proto.FunctionDefLibrary.Builder getLibraryBuilder() {
       bitField0_ |= 0x00000008;
       onChanged();
-      return getLibraryFieldBuilder().getBuilder();
+      return internalGetLibraryFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -1635,7 +1636,7 @@ public org.tensorflow.proto.FunctionDefLibraryOrBuilder getLibraryOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.FunctionDefLibrary, org.tensorflow.proto.FunctionDefLibrary.Builder, org.tensorflow.proto.FunctionDefLibraryOrBuilder> 
-        getLibraryFieldBuilder() {
+        internalGetLibraryFieldBuilder() {
       if (libraryBuilder_ == null) {
         libraryBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.FunctionDefLibrary, org.tensorflow.proto.FunctionDefLibrary.Builder, org.tensorflow.proto.FunctionDefLibraryOrBuilder>(
@@ -1766,7 +1767,7 @@ public Builder clearDebugInfo() {
     public org.tensorflow.proto.GraphDebugInfo.Builder getDebugInfoBuilder() {
       bitField0_ |= 0x00000010;
       onChanged();
-      return getDebugInfoFieldBuilder().getBuilder();
+      return internalGetDebugInfoFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -1792,7 +1793,7 @@ public org.tensorflow.proto.GraphDebugInfoOrBuilder getDebugInfoOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.GraphDebugInfo, org.tensorflow.proto.GraphDebugInfo.Builder, org.tensorflow.proto.GraphDebugInfoOrBuilder> 
-        getDebugInfoFieldBuilder() {
+        internalGetDebugInfoFieldBuilder() {
       if (debugInfoBuilder_ == null) {
         debugInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.GraphDebugInfo, org.tensorflow.proto.GraphDebugInfo.Builder, org.tensorflow.proto.GraphDebugInfoOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDefOrBuilder.java
index aae20baf2ed..8cd0bd41038 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDefOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphDefOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/graph.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface GraphDefOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.GraphDef)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphExecutionTrace.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphExecutionTrace.java
index 6295c31c0b3..1f70a962e83 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphExecutionTrace.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphExecutionTrace.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/debug_event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -17,6 +17,7 @@
  *
  * Protobuf type {@code tensorflow.GraphExecutionTrace}
  */
+@com.google.protobuf.Generated
 public final class GraphExecutionTrace extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.GraphExecutionTrace)
@@ -26,8 +27,8 @@ public final class GraphExecutionTrace extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       GraphExecutionTrace.class.getName());
   }
@@ -542,7 +543,7 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getTensorProtoFieldBuilder();
+        internalGetTensorProtoFieldBuilder();
       }
     }
     @java.lang.Override
@@ -701,7 +702,7 @@ public Builder mergeFrom(
             } // case 32
             case 42: {
               input.readMessage(
-                  getTensorProtoFieldBuilder().getBuilder(),
+                  internalGetTensorProtoFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000010;
               break;
@@ -1019,9 +1020,7 @@ public org.tensorflow.proto.TensorDebugMode getTensorDebugMode() {
      * @return This builder for chaining.
      */
     public Builder setTensorDebugMode(org.tensorflow.proto.TensorDebugMode value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000008;
       tensorDebugMode_ = value.getNumber();
       onChanged();
@@ -1175,7 +1174,7 @@ public Builder clearTensorProto() {
     public org.tensorflow.proto.TensorProto.Builder getTensorProtoBuilder() {
       bitField0_ |= 0x00000010;
       onChanged();
-      return getTensorProtoFieldBuilder().getBuilder();
+      return internalGetTensorProtoFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -1205,7 +1204,7 @@ public org.tensorflow.proto.TensorProtoOrBuilder getTensorProtoOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> 
-        getTensorProtoFieldBuilder() {
+        internalGetTensorProtoFieldBuilder() {
       if (tensorProtoBuilder_ == null) {
         tensorProtoBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphExecutionTraceOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphExecutionTraceOrBuilder.java
index 8ee56f2d353..a37071770aa 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphExecutionTraceOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphExecutionTraceOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/debug_event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface GraphExecutionTraceOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.GraphExecutionTrace)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphOpCreation.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphOpCreation.java
index 1cfdf8f521b..06d13fb6309 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphOpCreation.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphOpCreation.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/debug_event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.GraphOpCreation}
  */
+@com.google.protobuf.Generated
 public final class GraphOpCreation extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.GraphOpCreation)
@@ -21,8 +22,8 @@ public final class GraphOpCreation extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       GraphOpCreation.class.getName());
   }
@@ -745,7 +746,7 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getCodeLocationFieldBuilder();
+        internalGetCodeLocationFieldBuilder();
       }
     }
     @java.lang.Override
@@ -963,7 +964,7 @@ public Builder mergeFrom(
             } // case 56
             case 66: {
               input.readMessage(
-                  getCodeLocationFieldBuilder().getBuilder(),
+                  internalGetCodeLocationFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000080;
               break;
@@ -1776,7 +1777,7 @@ public Builder clearCodeLocation() {
     public org.tensorflow.proto.CodeLocation.Builder getCodeLocationBuilder() {
       bitField0_ |= 0x00000080;
       onChanged();
-      return getCodeLocationFieldBuilder().getBuilder();
+      return internalGetCodeLocationFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -1802,7 +1803,7 @@ public org.tensorflow.proto.CodeLocationOrBuilder getCodeLocationOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.CodeLocation, org.tensorflow.proto.CodeLocation.Builder, org.tensorflow.proto.CodeLocationOrBuilder> 
-        getCodeLocationFieldBuilder() {
+        internalGetCodeLocationFieldBuilder() {
       if (codeLocationBuilder_ == null) {
         codeLocationBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.CodeLocation, org.tensorflow.proto.CodeLocation.Builder, org.tensorflow.proto.CodeLocationOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphOpCreationOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphOpCreationOrBuilder.java
index f2a77fe07be..202caa3828b 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphOpCreationOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphOpCreationOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/debug_event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface GraphOpCreationOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.GraphOpCreation)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphOptions.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphOptions.java
index db16e305ded..3d31142c482 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphOptions.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphOptions.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/config.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.GraphOptions}
  */
+@com.google.protobuf.Generated
 public final class GraphOptions extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.GraphOptions)
@@ -17,8 +18,8 @@ public final class GraphOptions extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       GraphOptions.class.getName());
   }
@@ -536,8 +537,8 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getOptimizerOptionsFieldBuilder();
-        getRewriteOptionsFieldBuilder();
+        internalGetOptimizerOptionsFieldBuilder();
+        internalGetRewriteOptionsFieldBuilder();
       }
     }
     @java.lang.Override
@@ -703,7 +704,7 @@ public Builder mergeFrom(
             } // case 16
             case 26: {
               input.readMessage(
-                  getOptimizerOptionsFieldBuilder().getBuilder(),
+                  internalGetOptimizerOptionsFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000002;
               break;
@@ -740,7 +741,7 @@ public Builder mergeFrom(
             } // case 72
             case 82: {
               input.readMessage(
-                  getRewriteOptionsFieldBuilder().getBuilder(),
+                  internalGetRewriteOptionsFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000100;
               break;
@@ -928,7 +929,7 @@ public Builder clearOptimizerOptions() {
     public org.tensorflow.proto.OptimizerOptions.Builder getOptimizerOptionsBuilder() {
       bitField0_ |= 0x00000002;
       onChanged();
-      return getOptimizerOptionsFieldBuilder().getBuilder();
+      return internalGetOptimizerOptionsFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -954,7 +955,7 @@ public org.tensorflow.proto.OptimizerOptionsOrBuilder getOptimizerOptionsOrBuild
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.OptimizerOptions, org.tensorflow.proto.OptimizerOptions.Builder, org.tensorflow.proto.OptimizerOptionsOrBuilder> 
-        getOptimizerOptionsFieldBuilder() {
+        internalGetOptimizerOptionsFieldBuilder() {
       if (optimizerOptionsBuilder_ == null) {
         optimizerOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.OptimizerOptions, org.tensorflow.proto.OptimizerOptions.Builder, org.tensorflow.proto.OptimizerOptionsOrBuilder>(
@@ -1396,7 +1397,7 @@ public Builder clearRewriteOptions() {
     public org.tensorflow.proto.RewriterConfig.Builder getRewriteOptionsBuilder() {
       bitField0_ |= 0x00000100;
       onChanged();
-      return getRewriteOptionsFieldBuilder().getBuilder();
+      return internalGetRewriteOptionsFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -1426,7 +1427,7 @@ public org.tensorflow.proto.RewriterConfigOrBuilder getRewriteOptionsOrBuilder()
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.RewriterConfig, org.tensorflow.proto.RewriterConfig.Builder, org.tensorflow.proto.RewriterConfigOrBuilder> 
-        getRewriteOptionsFieldBuilder() {
+        internalGetRewriteOptionsFieldBuilder() {
       if (rewriteOptionsBuilder_ == null) {
         rewriteOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.RewriterConfig, org.tensorflow.proto.RewriterConfig.Builder, org.tensorflow.proto.RewriterConfigOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphOptionsOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphOptionsOrBuilder.java
index 7f2113d9509..54446eac7c4 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphOptionsOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphOptionsOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/config.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface GraphOptionsOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.GraphOptions)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphProtos.java
index 213acdde175..0ff800c8759 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/graph.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class GraphProtos {
   private GraphProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       GraphProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferConstNodeInfo.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferConstNodeInfo.java
index 4c40a27b902..8cd972db9e5 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferConstNodeInfo.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferConstNodeInfo.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/graph_transfer_info.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.GraphTransferConstNodeInfo}
  */
+@com.google.protobuf.Generated
 public final class GraphTransferConstNodeInfo extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.GraphTransferConstNodeInfo)
@@ -17,8 +18,8 @@ public final class GraphTransferConstNodeInfo extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       GraphTransferConstNodeInfo.class.getName());
   }
@@ -492,7 +493,7 @@ public Builder mergeFrom(org.tensorflow.proto.GraphTransferConstNodeInfo other)
         }
         onChanged();
       }
-      if (other.getData() != com.google.protobuf.ByteString.EMPTY) {
+      if (!other.getData().isEmpty()) {
         setData(other.getData());
       }
       if (other.dtype_ != 0) {
@@ -831,9 +832,7 @@ public org.tensorflow.proto.DataType getDtype() {
      * @return This builder for chaining.
      */
     public Builder setDtype(org.tensorflow.proto.DataType value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000010;
       dtype_ = value.getNumber();
       onChanged();
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferConstNodeInfoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferConstNodeInfoOrBuilder.java
index 642428d772f..84fdc19b827 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferConstNodeInfoOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferConstNodeInfoOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/graph_transfer_info.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface GraphTransferConstNodeInfoOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.GraphTransferConstNodeInfo)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferGraphInputNodeInfo.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferGraphInputNodeInfo.java
index 2c57c86a711..d65b9179a84 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferGraphInputNodeInfo.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferGraphInputNodeInfo.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/graph_transfer_info.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.GraphTransferGraphInputNodeInfo}
  */
+@com.google.protobuf.Generated
 public final class GraphTransferGraphInputNodeInfo extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.GraphTransferGraphInputNodeInfo)
@@ -17,8 +18,8 @@ public final class GraphTransferGraphInputNodeInfo extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       GraphTransferGraphInputNodeInfo.class.getName());
   }
@@ -698,9 +699,7 @@ public org.tensorflow.proto.DataType getDtype() {
      * @return This builder for chaining.
      */
     public Builder setDtype(org.tensorflow.proto.DataType value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000004;
       dtype_ = value.getNumber();
       onChanged();
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferGraphInputNodeInfoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferGraphInputNodeInfoOrBuilder.java
index 3b063adca63..8e692d073c6 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferGraphInputNodeInfoOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferGraphInputNodeInfoOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/graph_transfer_info.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface GraphTransferGraphInputNodeInfoOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.GraphTransferGraphInputNodeInfo)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferGraphOutputNodeInfo.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferGraphOutputNodeInfo.java
index 2968ce25539..4cafe553aa2 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferGraphOutputNodeInfo.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferGraphOutputNodeInfo.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/graph_transfer_info.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.GraphTransferGraphOutputNodeInfo}
  */
+@com.google.protobuf.Generated
 public final class GraphTransferGraphOutputNodeInfo extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.GraphTransferGraphOutputNodeInfo)
@@ -17,8 +18,8 @@ public final class GraphTransferGraphOutputNodeInfo extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       GraphTransferGraphOutputNodeInfo.class.getName());
   }
@@ -698,9 +699,7 @@ public org.tensorflow.proto.DataType getDtype() {
      * @return This builder for chaining.
      */
     public Builder setDtype(org.tensorflow.proto.DataType value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000004;
       dtype_ = value.getNumber();
       onChanged();
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferGraphOutputNodeInfoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferGraphOutputNodeInfoOrBuilder.java
index f645fdf04f7..f33549ee92d 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferGraphOutputNodeInfoOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferGraphOutputNodeInfoOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/graph_transfer_info.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface GraphTransferGraphOutputNodeInfoOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.GraphTransferGraphOutputNodeInfo)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferInfo.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferInfo.java
index b5bf73cd37c..a1de23840ff 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferInfo.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferInfo.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/graph_transfer_info.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -14,6 +14,7 @@
  *
  * Protobuf type {@code tensorflow.GraphTransferInfo}
  */
+@com.google.protobuf.Generated
 public final class GraphTransferInfo extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.GraphTransferInfo)
@@ -23,8 +24,8 @@ public final class GraphTransferInfo extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       GraphTransferInfo.class.getName());
   }
@@ -75,8 +76,8 @@ public enum Destination
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         Destination.class.getName());
     }
@@ -144,7 +145,7 @@ public Destination findValueByNumber(int number) {
         getDescriptorForType() {
       return getDescriptor();
     }
-    public static final com.google.protobuf.Descriptors.EnumDescriptor
+    public static com.google.protobuf.Descriptors.EnumDescriptor
         getDescriptor() {
       return org.tensorflow.proto.GraphTransferInfo.getDescriptor().getEnumTypes().get(0);
     }
@@ -909,7 +910,7 @@ public Builder mergeFrom(org.tensorflow.proto.GraphTransferInfo other) {
             bitField0_ = (bitField0_ & ~0x00000001);
             nodeInfoBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getNodeInfoFieldBuilder() : null;
+                 internalGetNodeInfoFieldBuilder() : null;
           } else {
             nodeInfoBuilder_.addAllMessages(other.nodeInfo_);
           }
@@ -935,7 +936,7 @@ public Builder mergeFrom(org.tensorflow.proto.GraphTransferInfo other) {
             bitField0_ = (bitField0_ & ~0x00000002);
             constNodeInfoBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getConstNodeInfoFieldBuilder() : null;
+                 internalGetConstNodeInfoFieldBuilder() : null;
           } else {
             constNodeInfoBuilder_.addAllMessages(other.constNodeInfo_);
           }
@@ -961,7 +962,7 @@ public Builder mergeFrom(org.tensorflow.proto.GraphTransferInfo other) {
             bitField0_ = (bitField0_ & ~0x00000004);
             nodeInputInfoBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getNodeInputInfoFieldBuilder() : null;
+                 internalGetNodeInputInfoFieldBuilder() : null;
           } else {
             nodeInputInfoBuilder_.addAllMessages(other.nodeInputInfo_);
           }
@@ -987,7 +988,7 @@ public Builder mergeFrom(org.tensorflow.proto.GraphTransferInfo other) {
             bitField0_ = (bitField0_ & ~0x00000008);
             nodeOutputInfoBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getNodeOutputInfoFieldBuilder() : null;
+                 internalGetNodeOutputInfoFieldBuilder() : null;
           } else {
             nodeOutputInfoBuilder_.addAllMessages(other.nodeOutputInfo_);
           }
@@ -1013,7 +1014,7 @@ public Builder mergeFrom(org.tensorflow.proto.GraphTransferInfo other) {
             bitField0_ = (bitField0_ & ~0x00000010);
             graphInputNodeInfoBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getGraphInputNodeInfoFieldBuilder() : null;
+                 internalGetGraphInputNodeInfoFieldBuilder() : null;
           } else {
             graphInputNodeInfoBuilder_.addAllMessages(other.graphInputNodeInfo_);
           }
@@ -1039,7 +1040,7 @@ public Builder mergeFrom(org.tensorflow.proto.GraphTransferInfo other) {
             bitField0_ = (bitField0_ & ~0x00000020);
             graphOutputNodeInfoBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getGraphOutputNodeInfoFieldBuilder() : null;
+                 internalGetGraphOutputNodeInfoFieldBuilder() : null;
           } else {
             graphOutputNodeInfoBuilder_.addAllMessages(other.graphOutputNodeInfo_);
           }
@@ -1354,7 +1355,7 @@ public Builder removeNodeInfo(int index) {
      */
     public org.tensorflow.proto.GraphTransferNodeInfo.Builder getNodeInfoBuilder(
         int index) {
-      return getNodeInfoFieldBuilder().getBuilder(index);
+      return internalGetNodeInfoFieldBuilder().getBuilder(index);
     }
     /**
      * repeated .tensorflow.GraphTransferNodeInfo node_info = 1;
@@ -1381,7 +1382,7 @@ public org.tensorflow.proto.GraphTransferNodeInfoOrBuilder getNodeInfoOrBuilder(
      * repeated .tensorflow.GraphTransferNodeInfo node_info = 1;
      */
     public org.tensorflow.proto.GraphTransferNodeInfo.Builder addNodeInfoBuilder() {
-      return getNodeInfoFieldBuilder().addBuilder(
+      return internalGetNodeInfoFieldBuilder().addBuilder(
           org.tensorflow.proto.GraphTransferNodeInfo.getDefaultInstance());
     }
     /**
@@ -1389,7 +1390,7 @@ public org.tensorflow.proto.GraphTransferNodeInfo.Builder addNodeInfoBuilder() {
      */
     public org.tensorflow.proto.GraphTransferNodeInfo.Builder addNodeInfoBuilder(
         int index) {
-      return getNodeInfoFieldBuilder().addBuilder(
+      return internalGetNodeInfoFieldBuilder().addBuilder(
           index, org.tensorflow.proto.GraphTransferNodeInfo.getDefaultInstance());
     }
     /**
@@ -1397,11 +1398,11 @@ public org.tensorflow.proto.GraphTransferNodeInfo.Builder addNodeInfoBuilder(
      */
     public java.util.List 
          getNodeInfoBuilderList() {
-      return getNodeInfoFieldBuilder().getBuilderList();
+      return internalGetNodeInfoFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.GraphTransferNodeInfo, org.tensorflow.proto.GraphTransferNodeInfo.Builder, org.tensorflow.proto.GraphTransferNodeInfoOrBuilder> 
-        getNodeInfoFieldBuilder() {
+        internalGetNodeInfoFieldBuilder() {
       if (nodeInfoBuilder_ == null) {
         nodeInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.GraphTransferNodeInfo, org.tensorflow.proto.GraphTransferNodeInfo.Builder, org.tensorflow.proto.GraphTransferNodeInfoOrBuilder>(
@@ -1594,7 +1595,7 @@ public Builder removeConstNodeInfo(int index) {
      */
     public org.tensorflow.proto.GraphTransferConstNodeInfo.Builder getConstNodeInfoBuilder(
         int index) {
-      return getConstNodeInfoFieldBuilder().getBuilder(index);
+      return internalGetConstNodeInfoFieldBuilder().getBuilder(index);
     }
     /**
      * repeated .tensorflow.GraphTransferConstNodeInfo const_node_info = 2;
@@ -1621,7 +1622,7 @@ public org.tensorflow.proto.GraphTransferConstNodeInfoOrBuilder getConstNodeInfo
      * repeated .tensorflow.GraphTransferConstNodeInfo const_node_info = 2;
      */
     public org.tensorflow.proto.GraphTransferConstNodeInfo.Builder addConstNodeInfoBuilder() {
-      return getConstNodeInfoFieldBuilder().addBuilder(
+      return internalGetConstNodeInfoFieldBuilder().addBuilder(
           org.tensorflow.proto.GraphTransferConstNodeInfo.getDefaultInstance());
     }
     /**
@@ -1629,7 +1630,7 @@ public org.tensorflow.proto.GraphTransferConstNodeInfo.Builder addConstNodeInfoB
      */
     public org.tensorflow.proto.GraphTransferConstNodeInfo.Builder addConstNodeInfoBuilder(
         int index) {
-      return getConstNodeInfoFieldBuilder().addBuilder(
+      return internalGetConstNodeInfoFieldBuilder().addBuilder(
           index, org.tensorflow.proto.GraphTransferConstNodeInfo.getDefaultInstance());
     }
     /**
@@ -1637,11 +1638,11 @@ public org.tensorflow.proto.GraphTransferConstNodeInfo.Builder addConstNodeInfoB
      */
     public java.util.List 
          getConstNodeInfoBuilderList() {
-      return getConstNodeInfoFieldBuilder().getBuilderList();
+      return internalGetConstNodeInfoFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.GraphTransferConstNodeInfo, org.tensorflow.proto.GraphTransferConstNodeInfo.Builder, org.tensorflow.proto.GraphTransferConstNodeInfoOrBuilder> 
-        getConstNodeInfoFieldBuilder() {
+        internalGetConstNodeInfoFieldBuilder() {
       if (constNodeInfoBuilder_ == null) {
         constNodeInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.GraphTransferConstNodeInfo, org.tensorflow.proto.GraphTransferConstNodeInfo.Builder, org.tensorflow.proto.GraphTransferConstNodeInfoOrBuilder>(
@@ -1834,7 +1835,7 @@ public Builder removeNodeInputInfo(int index) {
      */
     public org.tensorflow.proto.GraphTransferNodeInputInfo.Builder getNodeInputInfoBuilder(
         int index) {
-      return getNodeInputInfoFieldBuilder().getBuilder(index);
+      return internalGetNodeInputInfoFieldBuilder().getBuilder(index);
     }
     /**
      * repeated .tensorflow.GraphTransferNodeInputInfo node_input_info = 3;
@@ -1861,7 +1862,7 @@ public org.tensorflow.proto.GraphTransferNodeInputInfoOrBuilder getNodeInputInfo
      * repeated .tensorflow.GraphTransferNodeInputInfo node_input_info = 3;
      */
     public org.tensorflow.proto.GraphTransferNodeInputInfo.Builder addNodeInputInfoBuilder() {
-      return getNodeInputInfoFieldBuilder().addBuilder(
+      return internalGetNodeInputInfoFieldBuilder().addBuilder(
           org.tensorflow.proto.GraphTransferNodeInputInfo.getDefaultInstance());
     }
     /**
@@ -1869,7 +1870,7 @@ public org.tensorflow.proto.GraphTransferNodeInputInfo.Builder addNodeInputInfoB
      */
     public org.tensorflow.proto.GraphTransferNodeInputInfo.Builder addNodeInputInfoBuilder(
         int index) {
-      return getNodeInputInfoFieldBuilder().addBuilder(
+      return internalGetNodeInputInfoFieldBuilder().addBuilder(
           index, org.tensorflow.proto.GraphTransferNodeInputInfo.getDefaultInstance());
     }
     /**
@@ -1877,11 +1878,11 @@ public org.tensorflow.proto.GraphTransferNodeInputInfo.Builder addNodeInputInfoB
      */
     public java.util.List 
          getNodeInputInfoBuilderList() {
-      return getNodeInputInfoFieldBuilder().getBuilderList();
+      return internalGetNodeInputInfoFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.GraphTransferNodeInputInfo, org.tensorflow.proto.GraphTransferNodeInputInfo.Builder, org.tensorflow.proto.GraphTransferNodeInputInfoOrBuilder> 
-        getNodeInputInfoFieldBuilder() {
+        internalGetNodeInputInfoFieldBuilder() {
       if (nodeInputInfoBuilder_ == null) {
         nodeInputInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.GraphTransferNodeInputInfo, org.tensorflow.proto.GraphTransferNodeInputInfo.Builder, org.tensorflow.proto.GraphTransferNodeInputInfoOrBuilder>(
@@ -2074,7 +2075,7 @@ public Builder removeNodeOutputInfo(int index) {
      */
     public org.tensorflow.proto.GraphTransferNodeOutputInfo.Builder getNodeOutputInfoBuilder(
         int index) {
-      return getNodeOutputInfoFieldBuilder().getBuilder(index);
+      return internalGetNodeOutputInfoFieldBuilder().getBuilder(index);
     }
     /**
      * repeated .tensorflow.GraphTransferNodeOutputInfo node_output_info = 4;
@@ -2101,7 +2102,7 @@ public org.tensorflow.proto.GraphTransferNodeOutputInfoOrBuilder getNodeOutputIn
      * repeated .tensorflow.GraphTransferNodeOutputInfo node_output_info = 4;
      */
     public org.tensorflow.proto.GraphTransferNodeOutputInfo.Builder addNodeOutputInfoBuilder() {
-      return getNodeOutputInfoFieldBuilder().addBuilder(
+      return internalGetNodeOutputInfoFieldBuilder().addBuilder(
           org.tensorflow.proto.GraphTransferNodeOutputInfo.getDefaultInstance());
     }
     /**
@@ -2109,7 +2110,7 @@ public org.tensorflow.proto.GraphTransferNodeOutputInfo.Builder addNodeOutputInf
      */
     public org.tensorflow.proto.GraphTransferNodeOutputInfo.Builder addNodeOutputInfoBuilder(
         int index) {
-      return getNodeOutputInfoFieldBuilder().addBuilder(
+      return internalGetNodeOutputInfoFieldBuilder().addBuilder(
           index, org.tensorflow.proto.GraphTransferNodeOutputInfo.getDefaultInstance());
     }
     /**
@@ -2117,11 +2118,11 @@ public org.tensorflow.proto.GraphTransferNodeOutputInfo.Builder addNodeOutputInf
      */
     public java.util.List 
          getNodeOutputInfoBuilderList() {
-      return getNodeOutputInfoFieldBuilder().getBuilderList();
+      return internalGetNodeOutputInfoFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.GraphTransferNodeOutputInfo, org.tensorflow.proto.GraphTransferNodeOutputInfo.Builder, org.tensorflow.proto.GraphTransferNodeOutputInfoOrBuilder> 
-        getNodeOutputInfoFieldBuilder() {
+        internalGetNodeOutputInfoFieldBuilder() {
       if (nodeOutputInfoBuilder_ == null) {
         nodeOutputInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.GraphTransferNodeOutputInfo, org.tensorflow.proto.GraphTransferNodeOutputInfo.Builder, org.tensorflow.proto.GraphTransferNodeOutputInfoOrBuilder>(
@@ -2366,7 +2367,7 @@ public Builder removeGraphInputNodeInfo(int index) {
      */
     public org.tensorflow.proto.GraphTransferGraphInputNodeInfo.Builder getGraphInputNodeInfoBuilder(
         int index) {
-      return getGraphInputNodeInfoFieldBuilder().getBuilder(index);
+      return internalGetGraphInputNodeInfoFieldBuilder().getBuilder(index);
     }
     /**
      * 
@@ -2405,7 +2406,7 @@ public org.tensorflow.proto.GraphTransferGraphInputNodeInfoOrBuilder getGraphInp
      * repeated .tensorflow.GraphTransferGraphInputNodeInfo graph_input_node_info = 5;
      */
     public org.tensorflow.proto.GraphTransferGraphInputNodeInfo.Builder addGraphInputNodeInfoBuilder() {
-      return getGraphInputNodeInfoFieldBuilder().addBuilder(
+      return internalGetGraphInputNodeInfoFieldBuilder().addBuilder(
           org.tensorflow.proto.GraphTransferGraphInputNodeInfo.getDefaultInstance());
     }
     /**
@@ -2417,7 +2418,7 @@ public org.tensorflow.proto.GraphTransferGraphInputNodeInfo.Builder addGraphInpu
      */
     public org.tensorflow.proto.GraphTransferGraphInputNodeInfo.Builder addGraphInputNodeInfoBuilder(
         int index) {
-      return getGraphInputNodeInfoFieldBuilder().addBuilder(
+      return internalGetGraphInputNodeInfoFieldBuilder().addBuilder(
           index, org.tensorflow.proto.GraphTransferGraphInputNodeInfo.getDefaultInstance());
     }
     /**
@@ -2429,11 +2430,11 @@ public org.tensorflow.proto.GraphTransferGraphInputNodeInfo.Builder addGraphInpu
      */
     public java.util.List 
          getGraphInputNodeInfoBuilderList() {
-      return getGraphInputNodeInfoFieldBuilder().getBuilderList();
+      return internalGetGraphInputNodeInfoFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.GraphTransferGraphInputNodeInfo, org.tensorflow.proto.GraphTransferGraphInputNodeInfo.Builder, org.tensorflow.proto.GraphTransferGraphInputNodeInfoOrBuilder> 
-        getGraphInputNodeInfoFieldBuilder() {
+        internalGetGraphInputNodeInfoFieldBuilder() {
       if (graphInputNodeInfoBuilder_ == null) {
         graphInputNodeInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.GraphTransferGraphInputNodeInfo, org.tensorflow.proto.GraphTransferGraphInputNodeInfo.Builder, org.tensorflow.proto.GraphTransferGraphInputNodeInfoOrBuilder>(
@@ -2626,7 +2627,7 @@ public Builder removeGraphOutputNodeInfo(int index) {
      */
     public org.tensorflow.proto.GraphTransferGraphOutputNodeInfo.Builder getGraphOutputNodeInfoBuilder(
         int index) {
-      return getGraphOutputNodeInfoFieldBuilder().getBuilder(index);
+      return internalGetGraphOutputNodeInfoFieldBuilder().getBuilder(index);
     }
     /**
      * repeated .tensorflow.GraphTransferGraphOutputNodeInfo graph_output_node_info = 6;
@@ -2653,7 +2654,7 @@ public org.tensorflow.proto.GraphTransferGraphOutputNodeInfoOrBuilder getGraphOu
      * repeated .tensorflow.GraphTransferGraphOutputNodeInfo graph_output_node_info = 6;
      */
     public org.tensorflow.proto.GraphTransferGraphOutputNodeInfo.Builder addGraphOutputNodeInfoBuilder() {
-      return getGraphOutputNodeInfoFieldBuilder().addBuilder(
+      return internalGetGraphOutputNodeInfoFieldBuilder().addBuilder(
           org.tensorflow.proto.GraphTransferGraphOutputNodeInfo.getDefaultInstance());
     }
     /**
@@ -2661,7 +2662,7 @@ public org.tensorflow.proto.GraphTransferGraphOutputNodeInfo.Builder addGraphOut
      */
     public org.tensorflow.proto.GraphTransferGraphOutputNodeInfo.Builder addGraphOutputNodeInfoBuilder(
         int index) {
-      return getGraphOutputNodeInfoFieldBuilder().addBuilder(
+      return internalGetGraphOutputNodeInfoFieldBuilder().addBuilder(
           index, org.tensorflow.proto.GraphTransferGraphOutputNodeInfo.getDefaultInstance());
     }
     /**
@@ -2669,11 +2670,11 @@ public org.tensorflow.proto.GraphTransferGraphOutputNodeInfo.Builder addGraphOut
      */
     public java.util.List 
          getGraphOutputNodeInfoBuilderList() {
-      return getGraphOutputNodeInfoFieldBuilder().getBuilderList();
+      return internalGetGraphOutputNodeInfoFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.GraphTransferGraphOutputNodeInfo, org.tensorflow.proto.GraphTransferGraphOutputNodeInfo.Builder, org.tensorflow.proto.GraphTransferGraphOutputNodeInfoOrBuilder> 
-        getGraphOutputNodeInfoFieldBuilder() {
+        internalGetGraphOutputNodeInfoFieldBuilder() {
       if (graphOutputNodeInfoBuilder_ == null) {
         graphOutputNodeInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.GraphTransferGraphOutputNodeInfo, org.tensorflow.proto.GraphTransferGraphOutputNodeInfo.Builder, org.tensorflow.proto.GraphTransferGraphOutputNodeInfoOrBuilder>(
@@ -2736,9 +2737,7 @@ public org.tensorflow.proto.GraphTransferInfo.Destination getDestination() {
      * @return This builder for chaining.
      */
     public Builder setDestination(org.tensorflow.proto.GraphTransferInfo.Destination value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000040;
       destination_ = value.getNumber();
       onChanged();
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferInfoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferInfoOrBuilder.java
index 037aa6c37d2..9ea5a731b42 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferInfoOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferInfoOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/graph_transfer_info.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface GraphTransferInfoOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.GraphTransferInfo)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferInfoProto.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferInfoProto.java
index 2bc9df9dcf6..7bc67dac367 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferInfoProto.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferInfoProto.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/graph_transfer_info.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class GraphTransferInfoProto {
   private GraphTransferInfoProto() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       GraphTransferInfoProto.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInfo.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInfo.java
index 9dba76360d4..6807082f903 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInfo.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInfo.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/graph_transfer_info.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.GraphTransferNodeInfo}
  */
+@com.google.protobuf.Generated
 public final class GraphTransferNodeInfo extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.GraphTransferNodeInfo)
@@ -17,8 +18,8 @@ public final class GraphTransferNodeInfo extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       GraphTransferNodeInfo.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInfoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInfoOrBuilder.java
index 01ef2545a87..38c56b2add4 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInfoOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInfoOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/graph_transfer_info.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface GraphTransferNodeInfoOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.GraphTransferNodeInfo)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInput.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInput.java
index 0400ad21f83..02d7f4d8b47 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInput.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInput.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/graph_transfer_info.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.GraphTransferNodeInput}
  */
+@com.google.protobuf.Generated
 public final class GraphTransferNodeInput extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.GraphTransferNodeInput)
@@ -17,8 +18,8 @@ public final class GraphTransferNodeInput extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       GraphTransferNodeInput.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInputInfo.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInputInfo.java
index 93f82e0e8c8..889d8457658 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInputInfo.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInputInfo.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/graph_transfer_info.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.GraphTransferNodeInputInfo}
  */
+@com.google.protobuf.Generated
 public final class GraphTransferNodeInputInfo extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.GraphTransferNodeInputInfo)
@@ -17,8 +18,8 @@ public final class GraphTransferNodeInputInfo extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       GraphTransferNodeInputInfo.class.getName());
   }
@@ -393,7 +394,7 @@ public Builder mergeFrom(org.tensorflow.proto.GraphTransferNodeInputInfo other)
             bitField0_ = (bitField0_ & ~0x00000002);
             nodeInputBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getNodeInputFieldBuilder() : null;
+                 internalGetNodeInputFieldBuilder() : null;
           } else {
             nodeInputBuilder_.addAllMessages(other.nodeInput_);
           }
@@ -672,7 +673,7 @@ public Builder removeNodeInput(int index) {
      */
     public org.tensorflow.proto.GraphTransferNodeInput.Builder getNodeInputBuilder(
         int index) {
-      return getNodeInputFieldBuilder().getBuilder(index);
+      return internalGetNodeInputFieldBuilder().getBuilder(index);
     }
     /**
      * repeated .tensorflow.GraphTransferNodeInput node_input = 2;
@@ -699,7 +700,7 @@ public org.tensorflow.proto.GraphTransferNodeInputOrBuilder getNodeInputOrBuilde
      * repeated .tensorflow.GraphTransferNodeInput node_input = 2;
      */
     public org.tensorflow.proto.GraphTransferNodeInput.Builder addNodeInputBuilder() {
-      return getNodeInputFieldBuilder().addBuilder(
+      return internalGetNodeInputFieldBuilder().addBuilder(
           org.tensorflow.proto.GraphTransferNodeInput.getDefaultInstance());
     }
     /**
@@ -707,7 +708,7 @@ public org.tensorflow.proto.GraphTransferNodeInput.Builder addNodeInputBuilder()
      */
     public org.tensorflow.proto.GraphTransferNodeInput.Builder addNodeInputBuilder(
         int index) {
-      return getNodeInputFieldBuilder().addBuilder(
+      return internalGetNodeInputFieldBuilder().addBuilder(
           index, org.tensorflow.proto.GraphTransferNodeInput.getDefaultInstance());
     }
     /**
@@ -715,11 +716,11 @@ public org.tensorflow.proto.GraphTransferNodeInput.Builder addNodeInputBuilder(
      */
     public java.util.List 
          getNodeInputBuilderList() {
-      return getNodeInputFieldBuilder().getBuilderList();
+      return internalGetNodeInputFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.GraphTransferNodeInput, org.tensorflow.proto.GraphTransferNodeInput.Builder, org.tensorflow.proto.GraphTransferNodeInputOrBuilder> 
-        getNodeInputFieldBuilder() {
+        internalGetNodeInputFieldBuilder() {
       if (nodeInputBuilder_ == null) {
         nodeInputBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.GraphTransferNodeInput, org.tensorflow.proto.GraphTransferNodeInput.Builder, org.tensorflow.proto.GraphTransferNodeInputOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInputInfoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInputInfoOrBuilder.java
index 391ca3f1e24..0606ab53849 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInputInfoOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInputInfoOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/graph_transfer_info.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface GraphTransferNodeInputInfoOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.GraphTransferNodeInputInfo)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInputOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInputOrBuilder.java
index dd8ac32649e..ec985c3cf47 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInputOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeInputOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/graph_transfer_info.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface GraphTransferNodeInputOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.GraphTransferNodeInput)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeOutputInfo.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeOutputInfo.java
index b42b3fb547c..b62eeb24215 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeOutputInfo.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeOutputInfo.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/graph_transfer_info.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.GraphTransferNodeOutputInfo}
  */
+@com.google.protobuf.Generated
 public final class GraphTransferNodeOutputInfo extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.GraphTransferNodeOutputInfo)
@@ -17,8 +18,8 @@ public final class GraphTransferNodeOutputInfo extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       GraphTransferNodeOutputInfo.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeOutputInfoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeOutputInfoOrBuilder.java
index 562283cc21f..07fea662c7c 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeOutputInfoOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/GraphTransferNodeOutputInfoOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/graph_transfer_info.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface GraphTransferNodeOutputInfoOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.GraphTransferNodeOutputInfo)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Histogram.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Histogram.java
index 5567c346630..a49d6d603c7 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Histogram.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Histogram.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/histogram.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class Histogram {
   private Histogram() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       Histogram.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/HistogramProto.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/HistogramProto.java
index 669741c85a8..7d28e3b1310 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/HistogramProto.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/HistogramProto.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/histogram.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -13,6 +13,7 @@
  *
  * Protobuf type {@code tensorflow.HistogramProto}
  */
+@com.google.protobuf.Generated
 public final class HistogramProto extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.HistogramProto)
@@ -22,8 +23,8 @@ public final class HistogramProto extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       HistogramProto.class.getName());
   }
@@ -564,19 +565,19 @@ public Builder mergeFrom(com.google.protobuf.Message other) {
 
     public Builder mergeFrom(org.tensorflow.proto.HistogramProto other) {
       if (other == org.tensorflow.proto.HistogramProto.getDefaultInstance()) return this;
-      if (other.getMin() != 0D) {
+      if (java.lang.Double.doubleToRawLongBits(other.getMin()) != 0) {
         setMin(other.getMin());
       }
-      if (other.getMax() != 0D) {
+      if (java.lang.Double.doubleToRawLongBits(other.getMax()) != 0) {
         setMax(other.getMax());
       }
-      if (other.getNum() != 0D) {
+      if (java.lang.Double.doubleToRawLongBits(other.getNum()) != 0) {
         setNum(other.getNum());
       }
-      if (other.getSum() != 0D) {
+      if (java.lang.Double.doubleToRawLongBits(other.getSum()) != 0) {
         setSum(other.getSum());
       }
-      if (other.getSumSquares() != 0D) {
+      if (java.lang.Double.doubleToRawLongBits(other.getSumSquares()) != 0) {
         setSumSquares(other.getSumSquares());
       }
       if (!other.bucketLimit_.isEmpty()) {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/HistogramProtoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/HistogramProtoOrBuilder.java
index 9c644fa0611..c3cb6f012ab 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/HistogramProtoOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/HistogramProtoOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/histogram.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface HistogramProtoOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.HistogramProto)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Int64List.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Int64List.java
index 82bf09b381d..bdd94d1214b 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Int64List.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Int64List.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/example/feature.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.Int64List}
  */
+@com.google.protobuf.Generated
 public final class Int64List extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.Int64List)
@@ -17,8 +18,8 @@ public final class Int64List extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       Int64List.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Int64ListOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Int64ListOrBuilder.java
index e1d8271d30d..58a7a5af0b9 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Int64ListOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Int64ListOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/example/feature.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface Int64ListOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.Int64List)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/InterconnectLink.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/InterconnectLink.java
index e544fdbcd0e..8b2a0b6dcf6 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/InterconnectLink.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/InterconnectLink.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/device_attributes.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.InterconnectLink}
  */
+@com.google.protobuf.Generated
 public final class InterconnectLink extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.InterconnectLink)
@@ -17,8 +18,8 @@ public final class InterconnectLink extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       InterconnectLink.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/InterconnectLinkOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/InterconnectLinkOrBuilder.java
index fa3786c27ca..746003b3dc1 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/InterconnectLinkOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/InterconnectLinkOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/device_attributes.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface InterconnectLinkOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.InterconnectLink)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/JobDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/JobDef.java
index 0e6e8660937..b2443d86cd4 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/JobDef.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/JobDef.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/cluster.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.JobDef}
  */
+@com.google.protobuf.Generated
 public final class JobDef extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.JobDef)
@@ -21,8 +22,8 @@ public final class JobDef extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       JobDef.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/JobDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/JobDefOrBuilder.java
index 3de76e91c40..63d7e4e09de 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/JobDefOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/JobDefOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/cluster.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface JobDefOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.JobDef)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/JobDeviceFilters.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/JobDeviceFilters.java
index cbddbbfd0d0..6a65fbc6360 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/JobDeviceFilters.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/JobDeviceFilters.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/device_filters.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.JobDeviceFilters}
  */
+@com.google.protobuf.Generated
 public final class JobDeviceFilters extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.JobDeviceFilters)
@@ -21,8 +22,8 @@ public final class JobDeviceFilters extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       JobDeviceFilters.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/JobDeviceFiltersOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/JobDeviceFiltersOrBuilder.java
index 3988b3ef971..cdfa8ba62b3 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/JobDeviceFiltersOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/JobDeviceFiltersOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/device_filters.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface JobDeviceFiltersOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.JobDeviceFilters)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelDef.java
index 8efe1c1e228..085d0329dd7 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelDef.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelDef.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/kernel_def.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.KernelDef}
  */
+@com.google.protobuf.Generated
 public final class KernelDef extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.KernelDef)
@@ -17,8 +18,8 @@ public final class KernelDef extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       KernelDef.class.getName());
   }
@@ -114,8 +115,8 @@ public static final class AttrConstraint extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         AttrConstraint.class.getName());
     }
@@ -434,7 +435,7 @@ private Builder(
       private void maybeForceBuilderInitialization() {
         if (com.google.protobuf.GeneratedMessage
                 .alwaysUseFieldBuilders) {
-          getAllowedValuesFieldBuilder();
+          internalGetAllowedValuesFieldBuilder();
         }
       }
       @java.lang.Override
@@ -546,7 +547,7 @@ public Builder mergeFrom(
               } // case 10
               case 18: {
                 input.readMessage(
-                    getAllowedValuesFieldBuilder().getBuilder(),
+                    internalGetAllowedValuesFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000002;
                 break;
@@ -786,7 +787,7 @@ public Builder clearAllowedValues() {
       public org.tensorflow.proto.AttrValue.Builder getAllowedValuesBuilder() {
         bitField0_ |= 0x00000002;
         onChanged();
-        return getAllowedValuesFieldBuilder().getBuilder();
+        return internalGetAllowedValuesFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -814,7 +815,7 @@ public org.tensorflow.proto.AttrValueOrBuilder getAllowedValuesOrBuilder() {
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.AttrValue, org.tensorflow.proto.AttrValue.Builder, org.tensorflow.proto.AttrValueOrBuilder> 
-          getAllowedValuesFieldBuilder() {
+          internalGetAllowedValuesFieldBuilder() {
         if (allowedValuesBuilder_ == null) {
           allowedValuesBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.AttrValue, org.tensorflow.proto.AttrValue.Builder, org.tensorflow.proto.AttrValueOrBuilder>(
@@ -1507,7 +1508,7 @@ public Builder mergeFrom(org.tensorflow.proto.KernelDef other) {
             bitField0_ = (bitField0_ & ~0x00000004);
             constraintBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getConstraintFieldBuilder() : null;
+                 internalGetConstraintFieldBuilder() : null;
           } else {
             constraintBuilder_.addAllMessages(other.constraint_);
           }
@@ -1977,7 +1978,7 @@ public Builder removeConstraint(int index) {
      */
     public org.tensorflow.proto.KernelDef.AttrConstraint.Builder getConstraintBuilder(
         int index) {
-      return getConstraintFieldBuilder().getBuilder(index);
+      return internalGetConstraintFieldBuilder().getBuilder(index);
     }
     /**
      * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3;
@@ -2004,7 +2005,7 @@ public org.tensorflow.proto.KernelDef.AttrConstraintOrBuilder getConstraintOrBui
      * repeated .tensorflow.KernelDef.AttrConstraint constraint = 3;
      */
     public org.tensorflow.proto.KernelDef.AttrConstraint.Builder addConstraintBuilder() {
-      return getConstraintFieldBuilder().addBuilder(
+      return internalGetConstraintFieldBuilder().addBuilder(
           org.tensorflow.proto.KernelDef.AttrConstraint.getDefaultInstance());
     }
     /**
@@ -2012,7 +2013,7 @@ public org.tensorflow.proto.KernelDef.AttrConstraint.Builder addConstraintBuilde
      */
     public org.tensorflow.proto.KernelDef.AttrConstraint.Builder addConstraintBuilder(
         int index) {
-      return getConstraintFieldBuilder().addBuilder(
+      return internalGetConstraintFieldBuilder().addBuilder(
           index, org.tensorflow.proto.KernelDef.AttrConstraint.getDefaultInstance());
     }
     /**
@@ -2020,11 +2021,11 @@ public org.tensorflow.proto.KernelDef.AttrConstraint.Builder addConstraintBuilde
      */
     public java.util.List 
          getConstraintBuilderList() {
-      return getConstraintFieldBuilder().getBuilderList();
+      return internalGetConstraintFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.KernelDef.AttrConstraint, org.tensorflow.proto.KernelDef.AttrConstraint.Builder, org.tensorflow.proto.KernelDef.AttrConstraintOrBuilder> 
-        getConstraintFieldBuilder() {
+        internalGetConstraintFieldBuilder() {
       if (constraintBuilder_ == null) {
         constraintBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.KernelDef.AttrConstraint, org.tensorflow.proto.KernelDef.AttrConstraint.Builder, org.tensorflow.proto.KernelDef.AttrConstraintOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelDefOrBuilder.java
index 33d6bc783ed..1d901c14ec0 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelDefOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelDefOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/kernel_def.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface KernelDefOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.KernelDef)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelDefProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelDefProtos.java
index 6186e35bccd..1570609cd71 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelDefProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelDefProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/kernel_def.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class KernelDefProtos {
   private KernelDefProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       KernelDefProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelList.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelList.java
index add0709c673..0de3d64ddcc 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelList.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelList.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/kernel_def.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.KernelList}
  */
+@com.google.protobuf.Generated
 public final class KernelList extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.KernelList)
@@ -21,8 +22,8 @@ public final class KernelList extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       KernelList.class.getName());
   }
@@ -372,7 +373,7 @@ public Builder mergeFrom(org.tensorflow.proto.KernelList other) {
             bitField0_ = (bitField0_ & ~0x00000001);
             kernelBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getKernelFieldBuilder() : null;
+                 internalGetKernelFieldBuilder() : null;
           } else {
             kernelBuilder_.addAllMessages(other.kernel_);
           }
@@ -614,7 +615,7 @@ public Builder removeKernel(int index) {
      */
     public org.tensorflow.proto.KernelDef.Builder getKernelBuilder(
         int index) {
-      return getKernelFieldBuilder().getBuilder(index);
+      return internalGetKernelFieldBuilder().getBuilder(index);
     }
     /**
      * repeated .tensorflow.KernelDef kernel = 1;
@@ -641,7 +642,7 @@ public org.tensorflow.proto.KernelDefOrBuilder getKernelOrBuilder(
      * repeated .tensorflow.KernelDef kernel = 1;
      */
     public org.tensorflow.proto.KernelDef.Builder addKernelBuilder() {
-      return getKernelFieldBuilder().addBuilder(
+      return internalGetKernelFieldBuilder().addBuilder(
           org.tensorflow.proto.KernelDef.getDefaultInstance());
     }
     /**
@@ -649,7 +650,7 @@ public org.tensorflow.proto.KernelDef.Builder addKernelBuilder() {
      */
     public org.tensorflow.proto.KernelDef.Builder addKernelBuilder(
         int index) {
-      return getKernelFieldBuilder().addBuilder(
+      return internalGetKernelFieldBuilder().addBuilder(
           index, org.tensorflow.proto.KernelDef.getDefaultInstance());
     }
     /**
@@ -657,11 +658,11 @@ public org.tensorflow.proto.KernelDef.Builder addKernelBuilder(
      */
     public java.util.List 
          getKernelBuilderList() {
-      return getKernelFieldBuilder().getBuilderList();
+      return internalGetKernelFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.KernelDef, org.tensorflow.proto.KernelDef.Builder, org.tensorflow.proto.KernelDefOrBuilder> 
-        getKernelFieldBuilder() {
+        internalGetKernelFieldBuilder() {
       if (kernelBuilder_ == null) {
         kernelBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.KernelDef, org.tensorflow.proto.KernelDef.Builder, org.tensorflow.proto.KernelDefOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelListOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelListOrBuilder.java
index ef703603a2b..358f99fb2b8 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelListOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/KernelListOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/kernel_def.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface KernelListOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.KernelList)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LocalLinks.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LocalLinks.java
index d17b6ea169f..0a3429a5d9f 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LocalLinks.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LocalLinks.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/device_attributes.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.LocalLinks}
  */
+@com.google.protobuf.Generated
 public final class LocalLinks extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.LocalLinks)
@@ -17,8 +18,8 @@ public final class LocalLinks extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       LocalLinks.class.getName());
   }
@@ -364,7 +365,7 @@ public Builder mergeFrom(org.tensorflow.proto.LocalLinks other) {
             bitField0_ = (bitField0_ & ~0x00000001);
             linkBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getLinkFieldBuilder() : null;
+                 internalGetLinkFieldBuilder() : null;
           } else {
             linkBuilder_.addAllMessages(other.link_);
           }
@@ -606,7 +607,7 @@ public Builder removeLink(int index) {
      */
     public org.tensorflow.proto.InterconnectLink.Builder getLinkBuilder(
         int index) {
-      return getLinkFieldBuilder().getBuilder(index);
+      return internalGetLinkFieldBuilder().getBuilder(index);
     }
     /**
      * repeated .tensorflow.InterconnectLink link = 1;
@@ -633,7 +634,7 @@ public org.tensorflow.proto.InterconnectLinkOrBuilder getLinkOrBuilder(
      * repeated .tensorflow.InterconnectLink link = 1;
      */
     public org.tensorflow.proto.InterconnectLink.Builder addLinkBuilder() {
-      return getLinkFieldBuilder().addBuilder(
+      return internalGetLinkFieldBuilder().addBuilder(
           org.tensorflow.proto.InterconnectLink.getDefaultInstance());
     }
     /**
@@ -641,7 +642,7 @@ public org.tensorflow.proto.InterconnectLink.Builder addLinkBuilder() {
      */
     public org.tensorflow.proto.InterconnectLink.Builder addLinkBuilder(
         int index) {
-      return getLinkFieldBuilder().addBuilder(
+      return internalGetLinkFieldBuilder().addBuilder(
           index, org.tensorflow.proto.InterconnectLink.getDefaultInstance());
     }
     /**
@@ -649,11 +650,11 @@ public org.tensorflow.proto.InterconnectLink.Builder addLinkBuilder(
      */
     public java.util.List 
          getLinkBuilderList() {
-      return getLinkFieldBuilder().getBuilderList();
+      return internalGetLinkFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.InterconnectLink, org.tensorflow.proto.InterconnectLink.Builder, org.tensorflow.proto.InterconnectLinkOrBuilder> 
-        getLinkFieldBuilder() {
+        internalGetLinkFieldBuilder() {
       if (linkBuilder_ == null) {
         linkBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.InterconnectLink, org.tensorflow.proto.InterconnectLink.Builder, org.tensorflow.proto.InterconnectLinkOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LocalLinksOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LocalLinksOrBuilder.java
index 408b99a6c97..6818e4ff68e 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LocalLinksOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LocalLinksOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/device_attributes.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface LocalLinksOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.LocalLinks)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LogMemoryProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LogMemoryProtos.java
index 847171ae16e..a8865ed44f1 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LogMemoryProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LogMemoryProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/log_memory.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class LogMemoryProtos {
   private LogMemoryProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       LogMemoryProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LogMessage.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LogMessage.java
index d18b8648fbd..e34f5ea5f07 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LogMessage.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LogMessage.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/util/event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -15,6 +15,7 @@
  *
  * Protobuf type {@code tensorflow.LogMessage}
  */
+@com.google.protobuf.Generated
 @java.lang.Deprecated public final class LogMessage extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.LogMessage)
@@ -24,8 +25,8 @@
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       LogMessage.class.getName());
   }
@@ -94,8 +95,8 @@ private LogMessage() {
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         Level.class.getName());
     }
@@ -190,7 +191,7 @@ public Level findValueByNumber(int number) {
         getDescriptorForType() {
       return getDescriptor();
     }
-    public static final com.google.protobuf.Descriptors.EnumDescriptor
+    public static com.google.protobuf.Descriptors.EnumDescriptor
         getDescriptor() {
       return org.tensorflow.proto.LogMessage.getDescriptor().getEnumTypes().get(0);
     }
@@ -632,9 +633,7 @@ public org.tensorflow.proto.LogMessage.Level getLevel() {
      * @return This builder for chaining.
      */
     public Builder setLevel(org.tensorflow.proto.LogMessage.Level value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000001;
       level_ = value.getNumber();
       onChanged();
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LogMessageOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LogMessageOrBuilder.java
index 4174158b973..c48bff00105 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LogMessageOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/LogMessageOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/util/event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 @java.lang.Deprecated public interface LogMessageOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.LogMessage)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MachineConfiguration.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MachineConfiguration.java
index 9d7cc47a571..642a05e4b5e 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MachineConfiguration.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MachineConfiguration.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/test_log.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.MachineConfiguration}
  */
+@com.google.protobuf.Generated
 public final class MachineConfiguration extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.MachineConfiguration)
@@ -17,8 +18,8 @@ public final class MachineConfiguration extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       MachineConfiguration.class.getName());
   }
@@ -638,11 +639,11 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getPlatformInfoFieldBuilder();
-        getCpuInfoFieldBuilder();
-        getDeviceInfoFieldBuilder();
-        getAvailableDeviceInfoFieldBuilder();
-        getMemoryInfoFieldBuilder();
+        internalGetPlatformInfoFieldBuilder();
+        internalGetCpuInfoFieldBuilder();
+        internalGetDeviceInfoFieldBuilder();
+        internalGetAvailableDeviceInfoFieldBuilder();
+        internalGetMemoryInfoFieldBuilder();
       }
     }
     @java.lang.Override
@@ -811,7 +812,7 @@ public Builder mergeFrom(org.tensorflow.proto.MachineConfiguration other) {
             bitField0_ = (bitField0_ & ~0x00000010);
             deviceInfoBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getDeviceInfoFieldBuilder() : null;
+                 internalGetDeviceInfoFieldBuilder() : null;
           } else {
             deviceInfoBuilder_.addAllMessages(other.deviceInfo_);
           }
@@ -837,7 +838,7 @@ public Builder mergeFrom(org.tensorflow.proto.MachineConfiguration other) {
             bitField0_ = (bitField0_ & ~0x00000020);
             availableDeviceInfoBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getAvailableDeviceInfoFieldBuilder() : null;
+                 internalGetAvailableDeviceInfoFieldBuilder() : null;
           } else {
             availableDeviceInfoBuilder_.addAllMessages(other.availableDeviceInfo_);
           }
@@ -879,14 +880,14 @@ public Builder mergeFrom(
             } // case 10
             case 18: {
               input.readMessage(
-                  getPlatformInfoFieldBuilder().getBuilder(),
+                  internalGetPlatformInfoFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000004;
               break;
             } // case 18
             case 26: {
               input.readMessage(
-                  getCpuInfoFieldBuilder().getBuilder(),
+                  internalGetCpuInfoFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000008;
               break;
@@ -919,7 +920,7 @@ public Builder mergeFrom(
             } // case 42
             case 50: {
               input.readMessage(
-                  getMemoryInfoFieldBuilder().getBuilder(),
+                  internalGetMemoryInfoFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000040;
               break;
@@ -1249,7 +1250,7 @@ public Builder clearPlatformInfo() {
     public org.tensorflow.proto.PlatformInfo.Builder getPlatformInfoBuilder() {
       bitField0_ |= 0x00000004;
       onChanged();
-      return getPlatformInfoFieldBuilder().getBuilder();
+      return internalGetPlatformInfoFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -1275,7 +1276,7 @@ public org.tensorflow.proto.PlatformInfoOrBuilder getPlatformInfoOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.PlatformInfo, org.tensorflow.proto.PlatformInfo.Builder, org.tensorflow.proto.PlatformInfoOrBuilder> 
-        getPlatformInfoFieldBuilder() {
+        internalGetPlatformInfoFieldBuilder() {
       if (platformInfoBuilder_ == null) {
         platformInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.PlatformInfo, org.tensorflow.proto.PlatformInfo.Builder, org.tensorflow.proto.PlatformInfoOrBuilder>(
@@ -1406,7 +1407,7 @@ public Builder clearCpuInfo() {
     public org.tensorflow.proto.CPUInfo.Builder getCpuInfoBuilder() {
       bitField0_ |= 0x00000008;
       onChanged();
-      return getCpuInfoFieldBuilder().getBuilder();
+      return internalGetCpuInfoFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -1432,7 +1433,7 @@ public org.tensorflow.proto.CPUInfoOrBuilder getCpuInfoOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.CPUInfo, org.tensorflow.proto.CPUInfo.Builder, org.tensorflow.proto.CPUInfoOrBuilder> 
-        getCpuInfoFieldBuilder() {
+        internalGetCpuInfoFieldBuilder() {
       if (cpuInfoBuilder_ == null) {
         cpuInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.CPUInfo, org.tensorflow.proto.CPUInfo.Builder, org.tensorflow.proto.CPUInfoOrBuilder>(
@@ -1676,7 +1677,7 @@ public Builder removeDeviceInfo(int index) {
      */
     public com.google.protobuf.Any.Builder getDeviceInfoBuilder(
         int index) {
-      return getDeviceInfoFieldBuilder().getBuilder(index);
+      return internalGetDeviceInfoFieldBuilder().getBuilder(index);
     }
     /**
      * 
@@ -1715,7 +1716,7 @@ public com.google.protobuf.AnyOrBuilder getDeviceInfoOrBuilder(
      * repeated .google.protobuf.Any device_info = 4;
      */
     public com.google.protobuf.Any.Builder addDeviceInfoBuilder() {
-      return getDeviceInfoFieldBuilder().addBuilder(
+      return internalGetDeviceInfoFieldBuilder().addBuilder(
           com.google.protobuf.Any.getDefaultInstance());
     }
     /**
@@ -1727,7 +1728,7 @@ public com.google.protobuf.Any.Builder addDeviceInfoBuilder() {
      */
     public com.google.protobuf.Any.Builder addDeviceInfoBuilder(
         int index) {
-      return getDeviceInfoFieldBuilder().addBuilder(
+      return internalGetDeviceInfoFieldBuilder().addBuilder(
           index, com.google.protobuf.Any.getDefaultInstance());
     }
     /**
@@ -1739,11 +1740,11 @@ public com.google.protobuf.Any.Builder addDeviceInfoBuilder(
      */
     public java.util.List 
          getDeviceInfoBuilderList() {
-      return getDeviceInfoFieldBuilder().getBuilderList();
+      return internalGetDeviceInfoFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> 
-        getDeviceInfoFieldBuilder() {
+        internalGetDeviceInfoFieldBuilder() {
       if (deviceInfoBuilder_ == null) {
         deviceInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>(
@@ -1988,7 +1989,7 @@ public Builder removeAvailableDeviceInfo(int index) {
      */
     public org.tensorflow.proto.AvailableDeviceInfo.Builder getAvailableDeviceInfoBuilder(
         int index) {
-      return getAvailableDeviceInfoFieldBuilder().getBuilder(index);
+      return internalGetAvailableDeviceInfoFieldBuilder().getBuilder(index);
     }
     /**
      * 
@@ -2027,7 +2028,7 @@ public org.tensorflow.proto.AvailableDeviceInfoOrBuilder getAvailableDeviceInfoO
      * repeated .tensorflow.AvailableDeviceInfo available_device_info = 5;
      */
     public org.tensorflow.proto.AvailableDeviceInfo.Builder addAvailableDeviceInfoBuilder() {
-      return getAvailableDeviceInfoFieldBuilder().addBuilder(
+      return internalGetAvailableDeviceInfoFieldBuilder().addBuilder(
           org.tensorflow.proto.AvailableDeviceInfo.getDefaultInstance());
     }
     /**
@@ -2039,7 +2040,7 @@ public org.tensorflow.proto.AvailableDeviceInfo.Builder addAvailableDeviceInfoBu
      */
     public org.tensorflow.proto.AvailableDeviceInfo.Builder addAvailableDeviceInfoBuilder(
         int index) {
-      return getAvailableDeviceInfoFieldBuilder().addBuilder(
+      return internalGetAvailableDeviceInfoFieldBuilder().addBuilder(
           index, org.tensorflow.proto.AvailableDeviceInfo.getDefaultInstance());
     }
     /**
@@ -2051,11 +2052,11 @@ public org.tensorflow.proto.AvailableDeviceInfo.Builder addAvailableDeviceInfoBu
      */
     public java.util.List 
          getAvailableDeviceInfoBuilderList() {
-      return getAvailableDeviceInfoFieldBuilder().getBuilderList();
+      return internalGetAvailableDeviceInfoFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.AvailableDeviceInfo, org.tensorflow.proto.AvailableDeviceInfo.Builder, org.tensorflow.proto.AvailableDeviceInfoOrBuilder> 
-        getAvailableDeviceInfoFieldBuilder() {
+        internalGetAvailableDeviceInfoFieldBuilder() {
       if (availableDeviceInfoBuilder_ == null) {
         availableDeviceInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.AvailableDeviceInfo, org.tensorflow.proto.AvailableDeviceInfo.Builder, org.tensorflow.proto.AvailableDeviceInfoOrBuilder>(
@@ -2159,7 +2160,7 @@ public Builder clearMemoryInfo() {
     public org.tensorflow.proto.MemoryInfo.Builder getMemoryInfoBuilder() {
       bitField0_ |= 0x00000040;
       onChanged();
-      return getMemoryInfoFieldBuilder().getBuilder();
+      return internalGetMemoryInfoFieldBuilder().getBuilder();
     }
     /**
      * .tensorflow.MemoryInfo memory_info = 6;
@@ -2177,7 +2178,7 @@ public org.tensorflow.proto.MemoryInfoOrBuilder getMemoryInfoOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.MemoryInfo, org.tensorflow.proto.MemoryInfo.Builder, org.tensorflow.proto.MemoryInfoOrBuilder> 
-        getMemoryInfoFieldBuilder() {
+        internalGetMemoryInfoFieldBuilder() {
       if (memoryInfoBuilder_ == null) {
         memoryInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.MemoryInfo, org.tensorflow.proto.MemoryInfo.Builder, org.tensorflow.proto.MemoryInfoOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MachineConfigurationOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MachineConfigurationOrBuilder.java
index 05929ab4e94..cd6529a9510 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MachineConfigurationOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MachineConfigurationOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/test_log.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface MachineConfigurationOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.MachineConfiguration)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemmappedFileSystem.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemmappedFileSystem.java
index e76113f6643..5e86ba312d4 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemmappedFileSystem.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemmappedFileSystem.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/util/memmapped_file_system.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class MemmappedFileSystem {
   private MemmappedFileSystem() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       MemmappedFileSystem.class.getName());
   }
@@ -69,8 +70,8 @@ public static final class MemmappedFileSystemDirectoryElement extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         MemmappedFileSystemDirectoryElement.class.getName());
     }
@@ -733,8 +734,8 @@ public static final class MemmappedFileSystemDirectory extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         MemmappedFileSystemDirectory.class.getName());
     }
@@ -1084,7 +1085,7 @@ public Builder mergeFrom(org.tensorflow.proto.MemmappedFileSystem.MemmappedFileS
               bitField0_ = (bitField0_ & ~0x00000001);
               elementBuilder_ = 
                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                   getElementFieldBuilder() : null;
+                   internalGetElementFieldBuilder() : null;
             } else {
               elementBuilder_.addAllMessages(other.element_);
             }
@@ -1326,7 +1327,7 @@ public Builder removeElement(int index) {
        */
       public org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryElement.Builder getElementBuilder(
           int index) {
-        return getElementFieldBuilder().getBuilder(index);
+        return internalGetElementFieldBuilder().getBuilder(index);
       }
       /**
        * repeated .tensorflow.MemmappedFileSystemDirectoryElement element = 1;
@@ -1353,7 +1354,7 @@ public org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryElem
        * repeated .tensorflow.MemmappedFileSystemDirectoryElement element = 1;
        */
       public org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryElement.Builder addElementBuilder() {
-        return getElementFieldBuilder().addBuilder(
+        return internalGetElementFieldBuilder().addBuilder(
             org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryElement.getDefaultInstance());
       }
       /**
@@ -1361,7 +1362,7 @@ public org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryElem
        */
       public org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryElement.Builder addElementBuilder(
           int index) {
-        return getElementFieldBuilder().addBuilder(
+        return internalGetElementFieldBuilder().addBuilder(
             index, org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryElement.getDefaultInstance());
       }
       /**
@@ -1369,11 +1370,11 @@ public org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryElem
        */
       public java.util.List 
            getElementBuilderList() {
-        return getElementFieldBuilder().getBuilderList();
+        return internalGetElementFieldBuilder().getBuilderList();
       }
       private com.google.protobuf.RepeatedFieldBuilder<
           org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryElement, org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryElement.Builder, org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryElementOrBuilder> 
-          getElementFieldBuilder() {
+          internalGetElementFieldBuilder() {
         if (elementBuilder_ == null) {
           elementBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryElement, org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryElement.Builder, org.tensorflow.proto.MemmappedFileSystem.MemmappedFileSystemDirectoryElementOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryInfo.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryInfo.java
index 7154821aa85..4f459e7bea5 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryInfo.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryInfo.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/test_log.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.MemoryInfo}
  */
+@com.google.protobuf.Generated
 public final class MemoryInfo extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.MemoryInfo)
@@ -17,8 +18,8 @@ public final class MemoryInfo extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       MemoryInfo.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryInfoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryInfoOrBuilder.java
index 15da16855ac..3d14ee2a939 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryInfoOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryInfoOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/test_log.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface MemoryInfoOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.MemoryInfo)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogRawAllocation.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogRawAllocation.java
index 1f7d254c4cd..4edd02f318b 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogRawAllocation.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogRawAllocation.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/log_memory.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.MemoryLogRawAllocation}
  */
+@com.google.protobuf.Generated
 public final class MemoryLogRawAllocation extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.MemoryLogRawAllocation)
@@ -17,8 +18,8 @@ public final class MemoryLogRawAllocation extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       MemoryLogRawAllocation.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogRawAllocationOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogRawAllocationOrBuilder.java
index 82a9160572d..d00b738da50 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogRawAllocationOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogRawAllocationOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/log_memory.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface MemoryLogRawAllocationOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.MemoryLogRawAllocation)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogRawDeallocation.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogRawDeallocation.java
index 1215138ec89..51e389f37ff 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogRawDeallocation.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogRawDeallocation.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/log_memory.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.MemoryLogRawDeallocation}
  */
+@com.google.protobuf.Generated
 public final class MemoryLogRawDeallocation extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.MemoryLogRawDeallocation)
@@ -17,8 +18,8 @@ public final class MemoryLogRawDeallocation extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       MemoryLogRawDeallocation.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogRawDeallocationOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogRawDeallocationOrBuilder.java
index 485bb3ff60d..1181180b3a3 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogRawDeallocationOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogRawDeallocationOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/log_memory.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface MemoryLogRawDeallocationOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.MemoryLogRawDeallocation)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogStep.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogStep.java
index 0f191d9751d..f58a1378608 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogStep.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogStep.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/log_memory.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.MemoryLogStep}
  */
+@com.google.protobuf.Generated
 public final class MemoryLogStep extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.MemoryLogStep)
@@ -17,8 +18,8 @@ public final class MemoryLogStep extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       MemoryLogStep.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogStepOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogStepOrBuilder.java
index 39d7ad3312b..7f6d77ffdb8 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogStepOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogStepOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/log_memory.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface MemoryLogStepOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.MemoryLogStep)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorAllocation.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorAllocation.java
index a2f153d0515..af4b580aef2 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorAllocation.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorAllocation.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/log_memory.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.MemoryLogTensorAllocation}
  */
+@com.google.protobuf.Generated
 public final class MemoryLogTensorAllocation extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.MemoryLogTensorAllocation)
@@ -17,8 +18,8 @@ public final class MemoryLogTensorAllocation extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       MemoryLogTensorAllocation.class.getName());
   }
@@ -363,7 +364,7 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getTensorFieldBuilder();
+        internalGetTensorFieldBuilder();
       }
     }
     @java.lang.Override
@@ -487,7 +488,7 @@ public Builder mergeFrom(
             } // case 18
             case 26: {
               input.readMessage(
-                  getTensorFieldBuilder().getBuilder(),
+                  internalGetTensorFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000004;
               break;
@@ -769,7 +770,7 @@ public Builder clearTensor() {
     public org.tensorflow.proto.TensorDescription.Builder getTensorBuilder() {
       bitField0_ |= 0x00000004;
       onChanged();
-      return getTensorFieldBuilder().getBuilder();
+      return internalGetTensorFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -795,7 +796,7 @@ public org.tensorflow.proto.TensorDescriptionOrBuilder getTensorOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.TensorDescription, org.tensorflow.proto.TensorDescription.Builder, org.tensorflow.proto.TensorDescriptionOrBuilder> 
-        getTensorFieldBuilder() {
+        internalGetTensorFieldBuilder() {
       if (tensorBuilder_ == null) {
         tensorBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorDescription, org.tensorflow.proto.TensorDescription.Builder, org.tensorflow.proto.TensorDescriptionOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorAllocationOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorAllocationOrBuilder.java
index c8c3c7dd79f..5d6c5cec84c 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorAllocationOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorAllocationOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/log_memory.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface MemoryLogTensorAllocationOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.MemoryLogTensorAllocation)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorDeallocation.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorDeallocation.java
index 2cd7114b7f1..b551a4d3d5a 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorDeallocation.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorDeallocation.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/log_memory.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.MemoryLogTensorDeallocation}
  */
+@com.google.protobuf.Generated
 public final class MemoryLogTensorDeallocation extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.MemoryLogTensorDeallocation)
@@ -17,8 +18,8 @@ public final class MemoryLogTensorDeallocation extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       MemoryLogTensorDeallocation.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorDeallocationOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorDeallocationOrBuilder.java
index e3e45595114..55421e91e96 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorDeallocationOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorDeallocationOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/log_memory.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface MemoryLogTensorDeallocationOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.MemoryLogTensorDeallocation)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorOutput.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorOutput.java
index 2916c4a1637..2312f92469f 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorOutput.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorOutput.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/log_memory.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.MemoryLogTensorOutput}
  */
+@com.google.protobuf.Generated
 public final class MemoryLogTensorOutput extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.MemoryLogTensorOutput)
@@ -17,8 +18,8 @@ public final class MemoryLogTensorOutput extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       MemoryLogTensorOutput.class.getName());
   }
@@ -389,7 +390,7 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getTensorFieldBuilder();
+        internalGetTensorFieldBuilder();
       }
     }
     @java.lang.Override
@@ -525,7 +526,7 @@ public Builder mergeFrom(
             } // case 24
             case 34: {
               input.readMessage(
-                  getTensorFieldBuilder().getBuilder(),
+                  internalGetTensorFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000008;
               break;
@@ -851,7 +852,7 @@ public Builder clearTensor() {
     public org.tensorflow.proto.TensorDescription.Builder getTensorBuilder() {
       bitField0_ |= 0x00000008;
       onChanged();
-      return getTensorFieldBuilder().getBuilder();
+      return internalGetTensorFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -877,7 +878,7 @@ public org.tensorflow.proto.TensorDescriptionOrBuilder getTensorOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.TensorDescription, org.tensorflow.proto.TensorDescription.Builder, org.tensorflow.proto.TensorDescriptionOrBuilder> 
-        getTensorFieldBuilder() {
+        internalGetTensorFieldBuilder() {
       if (tensorBuilder_ == null) {
         tensorBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorDescription, org.tensorflow.proto.TensorDescription.Builder, org.tensorflow.proto.TensorDescriptionOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorOutputOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorOutputOrBuilder.java
index b85bb1491aa..d400174ba56 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorOutputOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryLogTensorOutputOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/log_memory.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface MemoryLogTensorOutputOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.MemoryLogTensorOutput)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryStats.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryStats.java
index dbb3b986b34..52c705e0633 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryStats.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryStats.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/step_stats.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.MemoryStats}
  */
+@com.google.protobuf.Generated
 public final class MemoryStats extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.MemoryStats)
@@ -21,8 +22,8 @@ public final class MemoryStats extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       MemoryStats.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryStatsOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryStatsOrBuilder.java
index 3c04e6831dd..54962ebf3a3 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryStatsOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MemoryStatsOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/step_stats.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface MemoryStatsOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.MemoryStats)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetaGraphDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetaGraphDef.java
index 8dfe44e7a05..419c6e9ec7e 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetaGraphDef.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetaGraphDef.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/meta_graph.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -22,6 +22,7 @@
  *
  * Protobuf type {@code tensorflow.MetaGraphDef}
  */
+@com.google.protobuf.Generated
 public final class MetaGraphDef extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.MetaGraphDef)
@@ -31,8 +32,8 @@ public final class MetaGraphDef extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       MetaGraphDef.class.getName());
   }
@@ -348,8 +349,8 @@ public static final class MetaInfoDef extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         MetaInfoDef.class.getName());
     }
@@ -1127,8 +1128,8 @@ private Builder(
       private void maybeForceBuilderInitialization() {
         if (com.google.protobuf.GeneratedMessage
                 .alwaysUseFieldBuilders) {
-          getStrippedOpListFieldBuilder();
-          getAnyInfoFieldBuilder();
+          internalGetStrippedOpListFieldBuilder();
+          internalGetAnyInfoFieldBuilder();
         }
       }
       @java.lang.Override
@@ -1303,14 +1304,14 @@ public Builder mergeFrom(
               } // case 10
               case 18: {
                 input.readMessage(
-                    getStrippedOpListFieldBuilder().getBuilder(),
+                    internalGetStrippedOpListFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000002;
                 break;
               } // case 18
               case 26: {
                 input.readMessage(
-                    getAnyInfoFieldBuilder().getBuilder(),
+                    internalGetAnyInfoFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000004;
                 break;
@@ -1585,7 +1586,7 @@ public Builder clearStrippedOpList() {
       public org.tensorflow.proto.OpList.Builder getStrippedOpListBuilder() {
         bitField0_ |= 0x00000002;
         onChanged();
-        return getStrippedOpListFieldBuilder().getBuilder();
+        return internalGetStrippedOpListFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -1613,7 +1614,7 @@ public org.tensorflow.proto.OpListOrBuilder getStrippedOpListOrBuilder() {
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.OpList, org.tensorflow.proto.OpList.Builder, org.tensorflow.proto.OpListOrBuilder> 
-          getStrippedOpListFieldBuilder() {
+          internalGetStrippedOpListFieldBuilder() {
         if (strippedOpListBuilder_ == null) {
           strippedOpListBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.OpList, org.tensorflow.proto.OpList.Builder, org.tensorflow.proto.OpListOrBuilder>(
@@ -1751,7 +1752,7 @@ public Builder clearAnyInfo() {
       public com.google.protobuf.Any.Builder getAnyInfoBuilder() {
         bitField0_ |= 0x00000004;
         onChanged();
-        return getAnyInfoFieldBuilder().getBuilder();
+        return internalGetAnyInfoFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -1779,7 +1780,7 @@ public com.google.protobuf.AnyOrBuilder getAnyInfoOrBuilder() {
        */
       private com.google.protobuf.SingleFieldBuilder<
           com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> 
-          getAnyInfoFieldBuilder() {
+          internalGetAnyInfoFieldBuilder() {
         if (anyInfoBuilder_ == null) {
           anyInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>(
@@ -3180,11 +3181,11 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getMetaInfoDefFieldBuilder();
-        getGraphDefFieldBuilder();
-        getSaverDefFieldBuilder();
-        getAssetFileDefFieldBuilder();
-        getObjectGraphDefFieldBuilder();
+        internalGetMetaInfoDefFieldBuilder();
+        internalGetGraphDefFieldBuilder();
+        internalGetSaverDefFieldBuilder();
+        internalGetAssetFileDefFieldBuilder();
+        internalGetObjectGraphDefFieldBuilder();
       }
     }
     @java.lang.Override
@@ -3347,7 +3348,7 @@ public Builder mergeFrom(org.tensorflow.proto.MetaGraphDef other) {
             bitField0_ = (bitField0_ & ~0x00000020);
             assetFileDefBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getAssetFileDefFieldBuilder() : null;
+                 internalGetAssetFileDefFieldBuilder() : null;
           } else {
             assetFileDefBuilder_.addAllMessages(other.assetFileDef_);
           }
@@ -3384,21 +3385,21 @@ public Builder mergeFrom(
               break;
             case 10: {
               input.readMessage(
-                  getMetaInfoDefFieldBuilder().getBuilder(),
+                  internalGetMetaInfoDefFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000001;
               break;
             } // case 10
             case 18: {
               input.readMessage(
-                  getGraphDefFieldBuilder().getBuilder(),
+                  internalGetGraphDefFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000002;
               break;
             } // case 18
             case 26: {
               input.readMessage(
-                  getSaverDefFieldBuilder().getBuilder(),
+                  internalGetSaverDefFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000004;
               break;
@@ -3436,7 +3437,7 @@ public Builder mergeFrom(
             } // case 50
             case 58: {
               input.readMessage(
-                  getObjectGraphDefFieldBuilder().getBuilder(),
+                  internalGetObjectGraphDefFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000040;
               break;
@@ -3549,7 +3550,7 @@ public Builder clearMetaInfoDef() {
     public org.tensorflow.proto.MetaGraphDef.MetaInfoDef.Builder getMetaInfoDefBuilder() {
       bitField0_ |= 0x00000001;
       onChanged();
-      return getMetaInfoDefFieldBuilder().getBuilder();
+      return internalGetMetaInfoDefFieldBuilder().getBuilder();
     }
     /**
      * .tensorflow.MetaGraphDef.MetaInfoDef meta_info_def = 1;
@@ -3567,7 +3568,7 @@ public org.tensorflow.proto.MetaGraphDef.MetaInfoDefOrBuilder getMetaInfoDefOrBu
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.MetaGraphDef.MetaInfoDef, org.tensorflow.proto.MetaGraphDef.MetaInfoDef.Builder, org.tensorflow.proto.MetaGraphDef.MetaInfoDefOrBuilder> 
-        getMetaInfoDefFieldBuilder() {
+        internalGetMetaInfoDefFieldBuilder() {
       if (metaInfoDefBuilder_ == null) {
         metaInfoDefBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.MetaGraphDef.MetaInfoDef, org.tensorflow.proto.MetaGraphDef.MetaInfoDef.Builder, org.tensorflow.proto.MetaGraphDef.MetaInfoDefOrBuilder>(
@@ -3698,7 +3699,7 @@ public Builder clearGraphDef() {
     public org.tensorflow.proto.GraphDef.Builder getGraphDefBuilder() {
       bitField0_ |= 0x00000002;
       onChanged();
-      return getGraphDefFieldBuilder().getBuilder();
+      return internalGetGraphDefFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -3724,7 +3725,7 @@ public org.tensorflow.proto.GraphDefOrBuilder getGraphDefOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.GraphDef, org.tensorflow.proto.GraphDef.Builder, org.tensorflow.proto.GraphDefOrBuilder> 
-        getGraphDefFieldBuilder() {
+        internalGetGraphDefFieldBuilder() {
       if (graphDefBuilder_ == null) {
         graphDefBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.GraphDef, org.tensorflow.proto.GraphDef.Builder, org.tensorflow.proto.GraphDefOrBuilder>(
@@ -3855,7 +3856,7 @@ public Builder clearSaverDef() {
     public org.tensorflow.proto.SaverDef.Builder getSaverDefBuilder() {
       bitField0_ |= 0x00000004;
       onChanged();
-      return getSaverDefFieldBuilder().getBuilder();
+      return internalGetSaverDefFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -3881,7 +3882,7 @@ public org.tensorflow.proto.SaverDefOrBuilder getSaverDefOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.SaverDef, org.tensorflow.proto.SaverDef.Builder, org.tensorflow.proto.SaverDefOrBuilder> 
-        getSaverDefFieldBuilder() {
+        internalGetSaverDefFieldBuilder() {
       if (saverDefBuilder_ == null) {
         saverDefBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.SaverDef, org.tensorflow.proto.SaverDef.Builder, org.tensorflow.proto.SaverDefOrBuilder>(
@@ -4515,7 +4516,7 @@ public Builder removeAssetFileDef(int index) {
      */
     public org.tensorflow.proto.AssetFileDef.Builder getAssetFileDefBuilder(
         int index) {
-      return getAssetFileDefFieldBuilder().getBuilder(index);
+      return internalGetAssetFileDefFieldBuilder().getBuilder(index);
     }
     /**
      * 
@@ -4554,7 +4555,7 @@ public org.tensorflow.proto.AssetFileDefOrBuilder getAssetFileDefOrBuilder(
      * repeated .tensorflow.AssetFileDef asset_file_def = 6;
      */
     public org.tensorflow.proto.AssetFileDef.Builder addAssetFileDefBuilder() {
-      return getAssetFileDefFieldBuilder().addBuilder(
+      return internalGetAssetFileDefFieldBuilder().addBuilder(
           org.tensorflow.proto.AssetFileDef.getDefaultInstance());
     }
     /**
@@ -4566,7 +4567,7 @@ public org.tensorflow.proto.AssetFileDef.Builder addAssetFileDefBuilder() {
      */
     public org.tensorflow.proto.AssetFileDef.Builder addAssetFileDefBuilder(
         int index) {
-      return getAssetFileDefFieldBuilder().addBuilder(
+      return internalGetAssetFileDefFieldBuilder().addBuilder(
           index, org.tensorflow.proto.AssetFileDef.getDefaultInstance());
     }
     /**
@@ -4578,11 +4579,11 @@ public org.tensorflow.proto.AssetFileDef.Builder addAssetFileDefBuilder(
      */
     public java.util.List 
          getAssetFileDefBuilderList() {
-      return getAssetFileDefFieldBuilder().getBuilderList();
+      return internalGetAssetFileDefFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.AssetFileDef, org.tensorflow.proto.AssetFileDef.Builder, org.tensorflow.proto.AssetFileDefOrBuilder> 
-        getAssetFileDefFieldBuilder() {
+        internalGetAssetFileDefFieldBuilder() {
       if (assetFileDefBuilder_ == null) {
         assetFileDefBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.AssetFileDef, org.tensorflow.proto.AssetFileDef.Builder, org.tensorflow.proto.AssetFileDefOrBuilder>(
@@ -4714,7 +4715,7 @@ public Builder clearObjectGraphDef() {
     public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraph.Builder getObjectGraphDefBuilder() {
       bitField0_ |= 0x00000040;
       onChanged();
-      return getObjectGraphDefFieldBuilder().getBuilder();
+      return internalGetObjectGraphDefFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -4740,7 +4741,7 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraphOrBuilder
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraph, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraph.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraphOrBuilder> 
-        getObjectGraphDefFieldBuilder() {
+        internalGetObjectGraphDefFieldBuilder() {
       if (objectGraphDefBuilder_ == null) {
         objectGraphDefBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraph, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraph.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectGraphOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetaGraphDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetaGraphDefOrBuilder.java
index 510b6c87bbc..3c2ac6969a9 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetaGraphDefOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetaGraphDefOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/meta_graph.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface MetaGraphDefOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.MetaGraphDef)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetaGraphProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetaGraphProtos.java
index eb8242aed48..d6d502bb186 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetaGraphProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetaGraphProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/meta_graph.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class MetaGraphProtos {
   private MetaGraphProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       MetaGraphProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetricEntry.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetricEntry.java
index b0190343737..9d7dcefa51b 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetricEntry.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetricEntry.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/test_log.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.MetricEntry}
  */
+@com.google.protobuf.Generated
 public final class MetricEntry extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.MetricEntry)
@@ -17,8 +18,8 @@ public final class MetricEntry extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       MetricEntry.class.getName());
   }
@@ -416,8 +417,8 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getMinValueFieldBuilder();
-        getMaxValueFieldBuilder();
+        internalGetMinValueFieldBuilder();
+        internalGetMaxValueFieldBuilder();
       }
     }
     @java.lang.Override
@@ -508,7 +509,7 @@ public Builder mergeFrom(org.tensorflow.proto.MetricEntry other) {
         bitField0_ |= 0x00000001;
         onChanged();
       }
-      if (other.getValue() != 0D) {
+      if (java.lang.Double.doubleToRawLongBits(other.getValue()) != 0) {
         setValue(other.getValue());
       }
       if (other.hasMinValue()) {
@@ -555,14 +556,14 @@ public Builder mergeFrom(
             } // case 17
             case 26: {
               input.readMessage(
-                  getMinValueFieldBuilder().getBuilder(),
+                  internalGetMinValueFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000004;
               break;
             } // case 26
             case 34: {
               input.readMessage(
-                  getMaxValueFieldBuilder().getBuilder(),
+                  internalGetMaxValueFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000008;
               break;
@@ -839,7 +840,7 @@ public Builder clearMinValue() {
     public com.google.protobuf.DoubleValue.Builder getMinValueBuilder() {
       bitField0_ |= 0x00000004;
       onChanged();
-      return getMinValueFieldBuilder().getBuilder();
+      return internalGetMinValueFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -865,7 +866,7 @@ public com.google.protobuf.DoubleValueOrBuilder getMinValueOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         com.google.protobuf.DoubleValue, com.google.protobuf.DoubleValue.Builder, com.google.protobuf.DoubleValueOrBuilder> 
-        getMinValueFieldBuilder() {
+        internalGetMinValueFieldBuilder() {
       if (minValueBuilder_ == null) {
         minValueBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             com.google.protobuf.DoubleValue, com.google.protobuf.DoubleValue.Builder, com.google.protobuf.DoubleValueOrBuilder>(
@@ -996,7 +997,7 @@ public Builder clearMaxValue() {
     public com.google.protobuf.DoubleValue.Builder getMaxValueBuilder() {
       bitField0_ |= 0x00000008;
       onChanged();
-      return getMaxValueFieldBuilder().getBuilder();
+      return internalGetMaxValueFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -1022,7 +1023,7 @@ public com.google.protobuf.DoubleValueOrBuilder getMaxValueOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         com.google.protobuf.DoubleValue, com.google.protobuf.DoubleValue.Builder, com.google.protobuf.DoubleValueOrBuilder> 
-        getMaxValueFieldBuilder() {
+        internalGetMaxValueFieldBuilder() {
       if (maxValueBuilder_ == null) {
         maxValueBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             com.google.protobuf.DoubleValue, com.google.protobuf.DoubleValue.Builder, com.google.protobuf.DoubleValueOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetricEntryOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetricEntryOrBuilder.java
index 3d0eec363a3..a82f618e920 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetricEntryOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/MetricEntryOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/test_log.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface MetricEntryOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.MetricEntry)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NameAttrList.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NameAttrList.java
index b79641012af..3dcce10e93c 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NameAttrList.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NameAttrList.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/attr_value.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -13,6 +13,7 @@
  *
  * Protobuf type {@code tensorflow.NameAttrList}
  */
+@com.google.protobuf.Generated
 public final class NameAttrList extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.NameAttrList)
@@ -22,8 +23,8 @@ public final class NameAttrList extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       NameAttrList.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NameAttrListOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NameAttrListOrBuilder.java
index 132bb9b6aa8..7ffeb9a4e86 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NameAttrListOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NameAttrListOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/attr_value.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface NameAttrListOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.NameAttrList)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NamedTensorProto.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NamedTensorProto.java
index ac9667ae7b8..a97e16f19a0 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NamedTensorProto.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NamedTensorProto.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/named_tensor.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.NamedTensorProto}
  */
+@com.google.protobuf.Generated
 public final class NamedTensorProto extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.NamedTensorProto)
@@ -21,8 +22,8 @@ public final class NamedTensorProto extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       NamedTensorProto.class.getName());
   }
@@ -357,7 +358,7 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getTensorFieldBuilder();
+        internalGetTensorFieldBuilder();
       }
     }
     @java.lang.Override
@@ -469,7 +470,7 @@ public Builder mergeFrom(
             } // case 10
             case 18: {
               input.readMessage(
-                  getTensorFieldBuilder().getBuilder(),
+                  internalGetTensorFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000002;
               break;
@@ -737,7 +738,7 @@ public Builder clearTensor() {
     public org.tensorflow.proto.TensorProto.Builder getTensorBuilder() {
       bitField0_ |= 0x00000002;
       onChanged();
-      return getTensorFieldBuilder().getBuilder();
+      return internalGetTensorFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -773,7 +774,7 @@ public org.tensorflow.proto.TensorProtoOrBuilder getTensorOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> 
-        getTensorFieldBuilder() {
+        internalGetTensorFieldBuilder() {
       if (tensorBuilder_ == null) {
         tensorBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NamedTensorProtoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NamedTensorProtoOrBuilder.java
index 236bd5974fe..92f9a20a1ea 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NamedTensorProtoOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NamedTensorProtoOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/named_tensor.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface NamedTensorProtoOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.NamedTensorProto)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NamedTensorProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NamedTensorProtos.java
index bbc43be0671..05b0410623b 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NamedTensorProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NamedTensorProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/named_tensor.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class NamedTensorProtos {
   private NamedTensorProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       NamedTensorProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeDef.java
index c6490a052ac..ff5a03ee424 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeDef.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeDef.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/node_def.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.NodeDef}
  */
+@com.google.protobuf.Generated
 public final class NodeDef extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.NodeDef)
@@ -17,8 +18,8 @@ public final class NodeDef extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       NodeDef.class.getName());
   }
@@ -205,8 +206,8 @@ public static final class ExperimentalDebugInfo extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         ExperimentalDebugInfo.class.getName());
     }
@@ -1970,8 +1971,8 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getExperimentalDebugInfoFieldBuilder();
-        getExperimentalTypeFieldBuilder();
+        internalGetExperimentalDebugInfoFieldBuilder();
+        internalGetExperimentalTypeFieldBuilder();
       }
     }
     @java.lang.Override
@@ -2163,14 +2164,14 @@ public Builder mergeFrom(
             } // case 42
             case 50: {
               input.readMessage(
-                  getExperimentalDebugInfoFieldBuilder().getBuilder(),
+                  internalGetExperimentalDebugInfoFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000020;
               break;
             } // case 50
             case 58: {
               input.readMessage(
-                  getExperimentalTypeFieldBuilder().getBuilder(),
+                  internalGetExperimentalTypeFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000040;
               break;
@@ -3155,7 +3156,7 @@ public Builder clearExperimentalDebugInfo() {
     public org.tensorflow.proto.NodeDef.ExperimentalDebugInfo.Builder getExperimentalDebugInfoBuilder() {
       bitField0_ |= 0x00000020;
       onChanged();
-      return getExperimentalDebugInfoFieldBuilder().getBuilder();
+      return internalGetExperimentalDebugInfoFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -3181,7 +3182,7 @@ public org.tensorflow.proto.NodeDef.ExperimentalDebugInfoOrBuilder getExperiment
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.NodeDef.ExperimentalDebugInfo, org.tensorflow.proto.NodeDef.ExperimentalDebugInfo.Builder, org.tensorflow.proto.NodeDef.ExperimentalDebugInfoOrBuilder> 
-        getExperimentalDebugInfoFieldBuilder() {
+        internalGetExperimentalDebugInfoFieldBuilder() {
       if (experimentalDebugInfoBuilder_ == null) {
         experimentalDebugInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.NodeDef.ExperimentalDebugInfo, org.tensorflow.proto.NodeDef.ExperimentalDebugInfo.Builder, org.tensorflow.proto.NodeDef.ExperimentalDebugInfoOrBuilder>(
@@ -3333,7 +3334,7 @@ public Builder clearExperimentalType() {
     public org.tensorflow.proto.FullTypeDef.Builder getExperimentalTypeBuilder() {
       bitField0_ |= 0x00000040;
       onChanged();
-      return getExperimentalTypeFieldBuilder().getBuilder();
+      return internalGetExperimentalTypeFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -3365,7 +3366,7 @@ public org.tensorflow.proto.FullTypeDefOrBuilder getExperimentalTypeOrBuilder()
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.FullTypeDef, org.tensorflow.proto.FullTypeDef.Builder, org.tensorflow.proto.FullTypeDefOrBuilder> 
-        getExperimentalTypeFieldBuilder() {
+        internalGetExperimentalTypeFieldBuilder() {
       if (experimentalTypeBuilder_ == null) {
         experimentalTypeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.FullTypeDef, org.tensorflow.proto.FullTypeDef.Builder, org.tensorflow.proto.FullTypeDefOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeDefOrBuilder.java
index 481d28e251a..769ab3d9a34 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeDefOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeDefOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/node_def.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface NodeDefOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.NodeDef)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeExecStats.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeExecStats.java
index 64c5fad07c0..2c6ec004178 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeExecStats.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeExecStats.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/step_stats.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.NodeExecStats}
  */
+@com.google.protobuf.Generated
 public final class NodeExecStats extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.NodeExecStats)
@@ -21,8 +22,8 @@ public final class NodeExecStats extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       NodeExecStats.class.getName());
   }
@@ -803,10 +804,10 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getMemoryFieldBuilder();
-        getOutputFieldBuilder();
-        getReferencedTensorFieldBuilder();
-        getMemoryStatsFieldBuilder();
+        internalGetMemoryFieldBuilder();
+        internalGetOutputFieldBuilder();
+        internalGetReferencedTensorFieldBuilder();
+        internalGetMemoryStatsFieldBuilder();
       }
     }
     @java.lang.Override
@@ -1014,7 +1015,7 @@ public Builder mergeFrom(org.tensorflow.proto.NodeExecStats other) {
             bitField0_ = (bitField0_ & ~0x00000020);
             memoryBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getMemoryFieldBuilder() : null;
+                 internalGetMemoryFieldBuilder() : null;
           } else {
             memoryBuilder_.addAllMessages(other.memory_);
           }
@@ -1040,7 +1041,7 @@ public Builder mergeFrom(org.tensorflow.proto.NodeExecStats other) {
             bitField0_ = (bitField0_ & ~0x00000040);
             outputBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getOutputFieldBuilder() : null;
+                 internalGetOutputFieldBuilder() : null;
           } else {
             outputBuilder_.addAllMessages(other.output_);
           }
@@ -1077,7 +1078,7 @@ public Builder mergeFrom(org.tensorflow.proto.NodeExecStats other) {
             bitField0_ = (bitField0_ & ~0x00000400);
             referencedTensorBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getReferencedTensorFieldBuilder() : null;
+                 internalGetReferencedTensorFieldBuilder() : null;
           } else {
             referencedTensorBuilder_.addAllMessages(other.referencedTensor_);
           }
@@ -1208,7 +1209,7 @@ public Builder mergeFrom(
             } // case 90
             case 98: {
               input.readMessage(
-                  getMemoryStatsFieldBuilder().getBuilder(),
+                  internalGetMemoryStatsFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000800;
               break;
@@ -1670,7 +1671,7 @@ public Builder removeMemory(int index) {
      */
     public org.tensorflow.proto.AllocatorMemoryUsed.Builder getMemoryBuilder(
         int index) {
-      return getMemoryFieldBuilder().getBuilder(index);
+      return internalGetMemoryFieldBuilder().getBuilder(index);
     }
     /**
      * repeated .tensorflow.AllocatorMemoryUsed memory = 6;
@@ -1697,7 +1698,7 @@ public org.tensorflow.proto.AllocatorMemoryUsedOrBuilder getMemoryOrBuilder(
      * repeated .tensorflow.AllocatorMemoryUsed memory = 6;
      */
     public org.tensorflow.proto.AllocatorMemoryUsed.Builder addMemoryBuilder() {
-      return getMemoryFieldBuilder().addBuilder(
+      return internalGetMemoryFieldBuilder().addBuilder(
           org.tensorflow.proto.AllocatorMemoryUsed.getDefaultInstance());
     }
     /**
@@ -1705,7 +1706,7 @@ public org.tensorflow.proto.AllocatorMemoryUsed.Builder addMemoryBuilder() {
      */
     public org.tensorflow.proto.AllocatorMemoryUsed.Builder addMemoryBuilder(
         int index) {
-      return getMemoryFieldBuilder().addBuilder(
+      return internalGetMemoryFieldBuilder().addBuilder(
           index, org.tensorflow.proto.AllocatorMemoryUsed.getDefaultInstance());
     }
     /**
@@ -1713,11 +1714,11 @@ public org.tensorflow.proto.AllocatorMemoryUsed.Builder addMemoryBuilder(
      */
     public java.util.List 
          getMemoryBuilderList() {
-      return getMemoryFieldBuilder().getBuilderList();
+      return internalGetMemoryFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.AllocatorMemoryUsed, org.tensorflow.proto.AllocatorMemoryUsed.Builder, org.tensorflow.proto.AllocatorMemoryUsedOrBuilder> 
-        getMemoryFieldBuilder() {
+        internalGetMemoryFieldBuilder() {
       if (memoryBuilder_ == null) {
         memoryBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.AllocatorMemoryUsed, org.tensorflow.proto.AllocatorMemoryUsed.Builder, org.tensorflow.proto.AllocatorMemoryUsedOrBuilder>(
@@ -1910,7 +1911,7 @@ public Builder removeOutput(int index) {
      */
     public org.tensorflow.proto.NodeOutput.Builder getOutputBuilder(
         int index) {
-      return getOutputFieldBuilder().getBuilder(index);
+      return internalGetOutputFieldBuilder().getBuilder(index);
     }
     /**
      * repeated .tensorflow.NodeOutput output = 7;
@@ -1937,7 +1938,7 @@ public org.tensorflow.proto.NodeOutputOrBuilder getOutputOrBuilder(
      * repeated .tensorflow.NodeOutput output = 7;
      */
     public org.tensorflow.proto.NodeOutput.Builder addOutputBuilder() {
-      return getOutputFieldBuilder().addBuilder(
+      return internalGetOutputFieldBuilder().addBuilder(
           org.tensorflow.proto.NodeOutput.getDefaultInstance());
     }
     /**
@@ -1945,7 +1946,7 @@ public org.tensorflow.proto.NodeOutput.Builder addOutputBuilder() {
      */
     public org.tensorflow.proto.NodeOutput.Builder addOutputBuilder(
         int index) {
-      return getOutputFieldBuilder().addBuilder(
+      return internalGetOutputFieldBuilder().addBuilder(
           index, org.tensorflow.proto.NodeOutput.getDefaultInstance());
     }
     /**
@@ -1953,11 +1954,11 @@ public org.tensorflow.proto.NodeOutput.Builder addOutputBuilder(
      */
     public java.util.List 
          getOutputBuilderList() {
-      return getOutputFieldBuilder().getBuilderList();
+      return internalGetOutputFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.NodeOutput, org.tensorflow.proto.NodeOutput.Builder, org.tensorflow.proto.NodeOutputOrBuilder> 
-        getOutputFieldBuilder() {
+        internalGetOutputFieldBuilder() {
       if (outputBuilder_ == null) {
         outputBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.NodeOutput, org.tensorflow.proto.NodeOutput.Builder, org.tensorflow.proto.NodeOutputOrBuilder>(
@@ -2286,7 +2287,7 @@ public Builder removeReferencedTensor(int index) {
      */
     public org.tensorflow.proto.AllocationDescription.Builder getReferencedTensorBuilder(
         int index) {
-      return getReferencedTensorFieldBuilder().getBuilder(index);
+      return internalGetReferencedTensorFieldBuilder().getBuilder(index);
     }
     /**
      * repeated .tensorflow.AllocationDescription referenced_tensor = 11;
@@ -2313,7 +2314,7 @@ public org.tensorflow.proto.AllocationDescriptionOrBuilder getReferencedTensorOr
      * repeated .tensorflow.AllocationDescription referenced_tensor = 11;
      */
     public org.tensorflow.proto.AllocationDescription.Builder addReferencedTensorBuilder() {
-      return getReferencedTensorFieldBuilder().addBuilder(
+      return internalGetReferencedTensorFieldBuilder().addBuilder(
           org.tensorflow.proto.AllocationDescription.getDefaultInstance());
     }
     /**
@@ -2321,7 +2322,7 @@ public org.tensorflow.proto.AllocationDescription.Builder addReferencedTensorBui
      */
     public org.tensorflow.proto.AllocationDescription.Builder addReferencedTensorBuilder(
         int index) {
-      return getReferencedTensorFieldBuilder().addBuilder(
+      return internalGetReferencedTensorFieldBuilder().addBuilder(
           index, org.tensorflow.proto.AllocationDescription.getDefaultInstance());
     }
     /**
@@ -2329,11 +2330,11 @@ public org.tensorflow.proto.AllocationDescription.Builder addReferencedTensorBui
      */
     public java.util.List 
          getReferencedTensorBuilderList() {
-      return getReferencedTensorFieldBuilder().getBuilderList();
+      return internalGetReferencedTensorFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.AllocationDescription, org.tensorflow.proto.AllocationDescription.Builder, org.tensorflow.proto.AllocationDescriptionOrBuilder> 
-        getReferencedTensorFieldBuilder() {
+        internalGetReferencedTensorFieldBuilder() {
       if (referencedTensorBuilder_ == null) {
         referencedTensorBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.AllocationDescription, org.tensorflow.proto.AllocationDescription.Builder, org.tensorflow.proto.AllocationDescriptionOrBuilder>(
@@ -2437,7 +2438,7 @@ public Builder clearMemoryStats() {
     public org.tensorflow.proto.MemoryStats.Builder getMemoryStatsBuilder() {
       bitField0_ |= 0x00000800;
       onChanged();
-      return getMemoryStatsFieldBuilder().getBuilder();
+      return internalGetMemoryStatsFieldBuilder().getBuilder();
     }
     /**
      * .tensorflow.MemoryStats memory_stats = 12;
@@ -2455,7 +2456,7 @@ public org.tensorflow.proto.MemoryStatsOrBuilder getMemoryStatsOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.MemoryStats, org.tensorflow.proto.MemoryStats.Builder, org.tensorflow.proto.MemoryStatsOrBuilder> 
-        getMemoryStatsFieldBuilder() {
+        internalGetMemoryStatsFieldBuilder() {
       if (memoryStatsBuilder_ == null) {
         memoryStatsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.MemoryStats, org.tensorflow.proto.MemoryStats.Builder, org.tensorflow.proto.MemoryStatsOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeExecStatsOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeExecStatsOrBuilder.java
index 96407c0f8eb..8efcf2ec56c 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeExecStatsOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeExecStatsOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/step_stats.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface NodeExecStatsOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.NodeExecStats)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeOutput.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeOutput.java
index d7d647f0d7c..c1c2dc52f5a 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeOutput.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeOutput.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/step_stats.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.NodeOutput}
  */
+@com.google.protobuf.Generated
 public final class NodeOutput extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.NodeOutput)
@@ -21,8 +22,8 @@ public final class NodeOutput extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       NodeOutput.class.getName());
   }
@@ -294,7 +295,7 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getTensorDescriptionFieldBuilder();
+        internalGetTensorDescriptionFieldBuilder();
       }
     }
     @java.lang.Override
@@ -404,7 +405,7 @@ public Builder mergeFrom(
             } // case 8
             case 26: {
               input.readMessage(
-                  getTensorDescriptionFieldBuilder().getBuilder(),
+                  internalGetTensorDescriptionFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000002;
               break;
@@ -549,7 +550,7 @@ public Builder clearTensorDescription() {
     public org.tensorflow.proto.TensorDescription.Builder getTensorDescriptionBuilder() {
       bitField0_ |= 0x00000002;
       onChanged();
-      return getTensorDescriptionFieldBuilder().getBuilder();
+      return internalGetTensorDescriptionFieldBuilder().getBuilder();
     }
     /**
      * .tensorflow.TensorDescription tensor_description = 3;
@@ -567,7 +568,7 @@ public org.tensorflow.proto.TensorDescriptionOrBuilder getTensorDescriptionOrBui
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.TensorDescription, org.tensorflow.proto.TensorDescription.Builder, org.tensorflow.proto.TensorDescriptionOrBuilder> 
-        getTensorDescriptionFieldBuilder() {
+        internalGetTensorDescriptionFieldBuilder() {
       if (tensorDescriptionBuilder_ == null) {
         tensorDescriptionBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorDescription, org.tensorflow.proto.TensorDescription.Builder, org.tensorflow.proto.TensorDescriptionOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeOutputOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeOutputOrBuilder.java
index 544c48d05df..25a95789e0d 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeOutputOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeOutputOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/step_stats.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface NodeOutputOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.NodeOutput)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeProto.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeProto.java
index 8e3f1a3aed9..9f0093a5875 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeProto.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/NodeProto.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/node_def.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class NodeProto {
   private NodeProto() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       NodeProto.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDef.java
index e24a3dd5e36..5ae8e38d07f 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDef.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDef.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/op_def.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -14,6 +14,7 @@
  *
  * Protobuf type {@code tensorflow.OpDef}
  */
+@com.google.protobuf.Generated
 public final class OpDef extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.OpDef)
@@ -23,8 +24,8 @@ public final class OpDef extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       OpDef.class.getName());
   }
@@ -322,8 +323,8 @@ public static final class ArgDef extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         ArgDef.class.getName());
     }
@@ -1060,8 +1061,8 @@ private Builder(
       private void maybeForceBuilderInitialization() {
         if (com.google.protobuf.GeneratedMessage
                 .alwaysUseFieldBuilders) {
-          getHandleDataFieldBuilder();
-          getExperimentalFullTypeFieldBuilder();
+          internalGetHandleDataFieldBuilder();
+          internalGetExperimentalFullTypeFieldBuilder();
         }
       }
       @java.lang.Override
@@ -1224,7 +1225,7 @@ public Builder mergeFrom(org.tensorflow.proto.OpDef.ArgDef other) {
               bitField0_ = (bitField0_ & ~0x00000040);
               handleDataBuilder_ = 
                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                   getHandleDataFieldBuilder() : null;
+                   internalGetHandleDataFieldBuilder() : null;
             } else {
               handleDataBuilder_.addAllMessages(other.handleData_);
             }
@@ -1312,7 +1313,7 @@ public Builder mergeFrom(
               } // case 128
               case 138: {
                 input.readMessage(
-                    getExperimentalFullTypeFieldBuilder().getBuilder(),
+                    internalGetExperimentalFullTypeFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000100;
                 break;
@@ -1604,9 +1605,7 @@ public org.tensorflow.proto.DataType getType() {
        * @return This builder for chaining.
        */
       public Builder setType(org.tensorflow.proto.DataType value) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
+        if (value == null) { throw new NullPointerException(); }
         bitField0_ |= 0x00000004;
         type_ = value.getNumber();
         onChanged();
@@ -2149,7 +2148,7 @@ public Builder removeHandleData(int index) {
        */
       public org.tensorflow.proto.ResourceHandleProto.DtypeAndShape.Builder getHandleDataBuilder(
           int index) {
-        return getHandleDataFieldBuilder().getBuilder(index);
+        return internalGetHandleDataFieldBuilder().getBuilder(index);
       }
       /**
        * 
@@ -2188,7 +2187,7 @@ public org.tensorflow.proto.ResourceHandleProto.DtypeAndShapeOrBuilder getHandle
        * repeated .tensorflow.ResourceHandleProto.DtypeAndShape handle_data = 7;
        */
       public org.tensorflow.proto.ResourceHandleProto.DtypeAndShape.Builder addHandleDataBuilder() {
-        return getHandleDataFieldBuilder().addBuilder(
+        return internalGetHandleDataFieldBuilder().addBuilder(
             org.tensorflow.proto.ResourceHandleProto.DtypeAndShape.getDefaultInstance());
       }
       /**
@@ -2200,7 +2199,7 @@ public org.tensorflow.proto.ResourceHandleProto.DtypeAndShape.Builder addHandleD
        */
       public org.tensorflow.proto.ResourceHandleProto.DtypeAndShape.Builder addHandleDataBuilder(
           int index) {
-        return getHandleDataFieldBuilder().addBuilder(
+        return internalGetHandleDataFieldBuilder().addBuilder(
             index, org.tensorflow.proto.ResourceHandleProto.DtypeAndShape.getDefaultInstance());
       }
       /**
@@ -2212,11 +2211,11 @@ public org.tensorflow.proto.ResourceHandleProto.DtypeAndShape.Builder addHandleD
        */
       public java.util.List 
            getHandleDataBuilderList() {
-        return getHandleDataFieldBuilder().getBuilderList();
+        return internalGetHandleDataFieldBuilder().getBuilderList();
       }
       private com.google.protobuf.RepeatedFieldBuilder<
           org.tensorflow.proto.ResourceHandleProto.DtypeAndShape, org.tensorflow.proto.ResourceHandleProto.DtypeAndShape.Builder, org.tensorflow.proto.ResourceHandleProto.DtypeAndShapeOrBuilder> 
-          getHandleDataFieldBuilder() {
+          internalGetHandleDataFieldBuilder() {
         if (handleDataBuilder_ == null) {
           handleDataBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.ResourceHandleProto.DtypeAndShape, org.tensorflow.proto.ResourceHandleProto.DtypeAndShape.Builder, org.tensorflow.proto.ResourceHandleProto.DtypeAndShapeOrBuilder>(
@@ -2454,7 +2453,7 @@ public Builder clearExperimentalFullType() {
       public org.tensorflow.proto.FullTypeDef.Builder getExperimentalFullTypeBuilder() {
         bitField0_ |= 0x00000100;
         onChanged();
-        return getExperimentalFullTypeFieldBuilder().getBuilder();
+        return internalGetExperimentalFullTypeFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -2496,7 +2495,7 @@ public org.tensorflow.proto.FullTypeDefOrBuilder getExperimentalFullTypeOrBuilde
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.FullTypeDef, org.tensorflow.proto.FullTypeDef.Builder, org.tensorflow.proto.FullTypeDefOrBuilder> 
-          getExperimentalFullTypeFieldBuilder() {
+          internalGetExperimentalFullTypeFieldBuilder() {
         if (experimentalFullTypeBuilder_ == null) {
           experimentalFullTypeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.FullTypeDef, org.tensorflow.proto.FullTypeDef.Builder, org.tensorflow.proto.FullTypeDefOrBuilder>(
@@ -2736,8 +2735,8 @@ public static final class AttrDef extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         AttrDef.class.getName());
     }
@@ -3304,8 +3303,8 @@ private Builder(
       private void maybeForceBuilderInitialization() {
         if (com.google.protobuf.GeneratedMessage
                 .alwaysUseFieldBuilders) {
-          getDefaultValueFieldBuilder();
-          getAllowedValuesFieldBuilder();
+          internalGetDefaultValueFieldBuilder();
+          internalGetAllowedValuesFieldBuilder();
         }
       }
       @java.lang.Override
@@ -3468,7 +3467,7 @@ public Builder mergeFrom(
               } // case 18
               case 26: {
                 input.readMessage(
-                    getDefaultValueFieldBuilder().getBuilder(),
+                    internalGetDefaultValueFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000004;
                 break;
@@ -3490,7 +3489,7 @@ public Builder mergeFrom(
               } // case 48
               case 58: {
                 input.readMessage(
-                    getAllowedValuesFieldBuilder().getBuilder(),
+                    internalGetAllowedValuesFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000040;
                 break;
@@ -3837,7 +3836,7 @@ public Builder clearDefaultValue() {
       public org.tensorflow.proto.AttrValue.Builder getDefaultValueBuilder() {
         bitField0_ |= 0x00000004;
         onChanged();
-        return getDefaultValueFieldBuilder().getBuilder();
+        return internalGetDefaultValueFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -3865,7 +3864,7 @@ public org.tensorflow.proto.AttrValueOrBuilder getDefaultValueOrBuilder() {
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.AttrValue, org.tensorflow.proto.AttrValue.Builder, org.tensorflow.proto.AttrValueOrBuilder> 
-          getDefaultValueFieldBuilder() {
+          internalGetDefaultValueFieldBuilder() {
         if (defaultValueBuilder_ == null) {
           defaultValueBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.AttrValue, org.tensorflow.proto.AttrValue.Builder, org.tensorflow.proto.AttrValueOrBuilder>(
@@ -4202,7 +4201,7 @@ public Builder clearAllowedValues() {
       public org.tensorflow.proto.AttrValue.Builder getAllowedValuesBuilder() {
         bitField0_ |= 0x00000040;
         onChanged();
-        return getAllowedValuesFieldBuilder().getBuilder();
+        return internalGetAllowedValuesFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -4238,7 +4237,7 @@ public org.tensorflow.proto.AttrValueOrBuilder getAllowedValuesOrBuilder() {
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.AttrValue, org.tensorflow.proto.AttrValue.Builder, org.tensorflow.proto.AttrValueOrBuilder> 
-          getAllowedValuesFieldBuilder() {
+          internalGetAllowedValuesFieldBuilder() {
         if (allowedValuesBuilder_ == null) {
           allowedValuesBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.AttrValue, org.tensorflow.proto.AttrValue.Builder, org.tensorflow.proto.AttrValueOrBuilder>(
@@ -5147,10 +5146,10 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getInputArgFieldBuilder();
-        getOutputArgFieldBuilder();
-        getAttrFieldBuilder();
-        getDeprecationFieldBuilder();
+        internalGetInputArgFieldBuilder();
+        internalGetOutputArgFieldBuilder();
+        internalGetAttrFieldBuilder();
+        internalGetDeprecationFieldBuilder();
       }
     }
     @java.lang.Override
@@ -5332,7 +5331,7 @@ public Builder mergeFrom(org.tensorflow.proto.OpDef other) {
             bitField0_ = (bitField0_ & ~0x00000002);
             inputArgBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getInputArgFieldBuilder() : null;
+                 internalGetInputArgFieldBuilder() : null;
           } else {
             inputArgBuilder_.addAllMessages(other.inputArg_);
           }
@@ -5358,7 +5357,7 @@ public Builder mergeFrom(org.tensorflow.proto.OpDef other) {
             bitField0_ = (bitField0_ & ~0x00000004);
             outputArgBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getOutputArgFieldBuilder() : null;
+                 internalGetOutputArgFieldBuilder() : null;
           } else {
             outputArgBuilder_.addAllMessages(other.outputArg_);
           }
@@ -5394,7 +5393,7 @@ public Builder mergeFrom(org.tensorflow.proto.OpDef other) {
             bitField0_ = (bitField0_ & ~0x00000010);
             attrBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getAttrFieldBuilder() : null;
+                 internalGetAttrFieldBuilder() : null;
           } else {
             attrBuilder_.addAllMessages(other.attr_);
           }
@@ -5510,7 +5509,7 @@ public Builder mergeFrom(
             } // case 50
             case 66: {
               input.readMessage(
-                  getDeprecationFieldBuilder().getBuilder(),
+                  internalGetDeprecationFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000020;
               break;
@@ -5892,7 +5891,7 @@ public Builder removeInputArg(int index) {
      */
     public org.tensorflow.proto.OpDef.ArgDef.Builder getInputArgBuilder(
         int index) {
-      return getInputArgFieldBuilder().getBuilder(index);
+      return internalGetInputArgFieldBuilder().getBuilder(index);
     }
     /**
      * 
@@ -5931,7 +5930,7 @@ public org.tensorflow.proto.OpDef.ArgDefOrBuilder getInputArgOrBuilder(
      * repeated .tensorflow.OpDef.ArgDef input_arg = 2;
      */
     public org.tensorflow.proto.OpDef.ArgDef.Builder addInputArgBuilder() {
-      return getInputArgFieldBuilder().addBuilder(
+      return internalGetInputArgFieldBuilder().addBuilder(
           org.tensorflow.proto.OpDef.ArgDef.getDefaultInstance());
     }
     /**
@@ -5943,7 +5942,7 @@ public org.tensorflow.proto.OpDef.ArgDef.Builder addInputArgBuilder() {
      */
     public org.tensorflow.proto.OpDef.ArgDef.Builder addInputArgBuilder(
         int index) {
-      return getInputArgFieldBuilder().addBuilder(
+      return internalGetInputArgFieldBuilder().addBuilder(
           index, org.tensorflow.proto.OpDef.ArgDef.getDefaultInstance());
     }
     /**
@@ -5955,11 +5954,11 @@ public org.tensorflow.proto.OpDef.ArgDef.Builder addInputArgBuilder(
      */
     public java.util.List 
          getInputArgBuilderList() {
-      return getInputArgFieldBuilder().getBuilderList();
+      return internalGetInputArgFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.OpDef.ArgDef, org.tensorflow.proto.OpDef.ArgDef.Builder, org.tensorflow.proto.OpDef.ArgDefOrBuilder> 
-        getInputArgFieldBuilder() {
+        internalGetInputArgFieldBuilder() {
       if (inputArgBuilder_ == null) {
         inputArgBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.OpDef.ArgDef, org.tensorflow.proto.OpDef.ArgDef.Builder, org.tensorflow.proto.OpDef.ArgDefOrBuilder>(
@@ -6204,7 +6203,7 @@ public Builder removeOutputArg(int index) {
      */
     public org.tensorflow.proto.OpDef.ArgDef.Builder getOutputArgBuilder(
         int index) {
-      return getOutputArgFieldBuilder().getBuilder(index);
+      return internalGetOutputArgFieldBuilder().getBuilder(index);
     }
     /**
      * 
@@ -6243,7 +6242,7 @@ public org.tensorflow.proto.OpDef.ArgDefOrBuilder getOutputArgOrBuilder(
      * repeated .tensorflow.OpDef.ArgDef output_arg = 3;
      */
     public org.tensorflow.proto.OpDef.ArgDef.Builder addOutputArgBuilder() {
-      return getOutputArgFieldBuilder().addBuilder(
+      return internalGetOutputArgFieldBuilder().addBuilder(
           org.tensorflow.proto.OpDef.ArgDef.getDefaultInstance());
     }
     /**
@@ -6255,7 +6254,7 @@ public org.tensorflow.proto.OpDef.ArgDef.Builder addOutputArgBuilder() {
      */
     public org.tensorflow.proto.OpDef.ArgDef.Builder addOutputArgBuilder(
         int index) {
-      return getOutputArgFieldBuilder().addBuilder(
+      return internalGetOutputArgFieldBuilder().addBuilder(
           index, org.tensorflow.proto.OpDef.ArgDef.getDefaultInstance());
     }
     /**
@@ -6267,11 +6266,11 @@ public org.tensorflow.proto.OpDef.ArgDef.Builder addOutputArgBuilder(
      */
     public java.util.List 
          getOutputArgBuilderList() {
-      return getOutputArgFieldBuilder().getBuilderList();
+      return internalGetOutputArgFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.OpDef.ArgDef, org.tensorflow.proto.OpDef.ArgDef.Builder, org.tensorflow.proto.OpDef.ArgDefOrBuilder> 
-        getOutputArgFieldBuilder() {
+        internalGetOutputArgFieldBuilder() {
       if (outputArgBuilder_ == null) {
         outputArgBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.OpDef.ArgDef, org.tensorflow.proto.OpDef.ArgDef.Builder, org.tensorflow.proto.OpDef.ArgDefOrBuilder>(
@@ -6620,7 +6619,7 @@ public Builder removeAttr(int index) {
      */
     public org.tensorflow.proto.OpDef.AttrDef.Builder getAttrBuilder(
         int index) {
-      return getAttrFieldBuilder().getBuilder(index);
+      return internalGetAttrFieldBuilder().getBuilder(index);
     }
     /**
      * repeated .tensorflow.OpDef.AttrDef attr = 4;
@@ -6647,7 +6646,7 @@ public org.tensorflow.proto.OpDef.AttrDefOrBuilder getAttrOrBuilder(
      * repeated .tensorflow.OpDef.AttrDef attr = 4;
      */
     public org.tensorflow.proto.OpDef.AttrDef.Builder addAttrBuilder() {
-      return getAttrFieldBuilder().addBuilder(
+      return internalGetAttrFieldBuilder().addBuilder(
           org.tensorflow.proto.OpDef.AttrDef.getDefaultInstance());
     }
     /**
@@ -6655,7 +6654,7 @@ public org.tensorflow.proto.OpDef.AttrDef.Builder addAttrBuilder() {
      */
     public org.tensorflow.proto.OpDef.AttrDef.Builder addAttrBuilder(
         int index) {
-      return getAttrFieldBuilder().addBuilder(
+      return internalGetAttrFieldBuilder().addBuilder(
           index, org.tensorflow.proto.OpDef.AttrDef.getDefaultInstance());
     }
     /**
@@ -6663,11 +6662,11 @@ public org.tensorflow.proto.OpDef.AttrDef.Builder addAttrBuilder(
      */
     public java.util.List 
          getAttrBuilderList() {
-      return getAttrFieldBuilder().getBuilderList();
+      return internalGetAttrFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.OpDef.AttrDef, org.tensorflow.proto.OpDef.AttrDef.Builder, org.tensorflow.proto.OpDef.AttrDefOrBuilder> 
-        getAttrFieldBuilder() {
+        internalGetAttrFieldBuilder() {
       if (attrBuilder_ == null) {
         attrBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.OpDef.AttrDef, org.tensorflow.proto.OpDef.AttrDef.Builder, org.tensorflow.proto.OpDef.AttrDefOrBuilder>(
@@ -6799,7 +6798,7 @@ public Builder clearDeprecation() {
     public org.tensorflow.proto.OpDeprecation.Builder getDeprecationBuilder() {
       bitField0_ |= 0x00000020;
       onChanged();
-      return getDeprecationFieldBuilder().getBuilder();
+      return internalGetDeprecationFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -6825,7 +6824,7 @@ public org.tensorflow.proto.OpDeprecationOrBuilder getDeprecationOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.OpDeprecation, org.tensorflow.proto.OpDeprecation.Builder, org.tensorflow.proto.OpDeprecationOrBuilder> 
-        getDeprecationFieldBuilder() {
+        internalGetDeprecationFieldBuilder() {
       if (deprecationBuilder_ == null) {
         deprecationBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.OpDeprecation, org.tensorflow.proto.OpDeprecation.Builder, org.tensorflow.proto.OpDeprecationOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDefOrBuilder.java
index 598ed6ae27c..188bc64caeb 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDefOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDefOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/op_def.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface OpDefOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.OpDef)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDefProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDefProtos.java
index a840147d89e..80ff14300cf 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDefProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDefProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/op_def.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class OpDefProtos {
   private OpDefProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       OpDefProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDeprecation.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDeprecation.java
index 984020421f7..58c2bc66b27 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDeprecation.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDeprecation.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/op_def.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.OpDeprecation}
  */
+@com.google.protobuf.Generated
 public final class OpDeprecation extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.OpDeprecation)
@@ -21,8 +22,8 @@ public final class OpDeprecation extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       OpDeprecation.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDeprecationOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDeprecationOrBuilder.java
index e88fe5daf67..767d33998c2 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDeprecationOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpDeprecationOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/op_def.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface OpDeprecationOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.OpDeprecation)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpList.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpList.java
index 6af1a400c7c..3692219e0f4 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpList.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpList.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/op_def.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.OpList}
  */
+@com.google.protobuf.Generated
 public final class OpList extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.OpList)
@@ -21,8 +22,8 @@ public final class OpList extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       OpList.class.getName());
   }
@@ -372,7 +373,7 @@ public Builder mergeFrom(org.tensorflow.proto.OpList other) {
             bitField0_ = (bitField0_ & ~0x00000001);
             opBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getOpFieldBuilder() : null;
+                 internalGetOpFieldBuilder() : null;
           } else {
             opBuilder_.addAllMessages(other.op_);
           }
@@ -614,7 +615,7 @@ public Builder removeOp(int index) {
      */
     public org.tensorflow.proto.OpDef.Builder getOpBuilder(
         int index) {
-      return getOpFieldBuilder().getBuilder(index);
+      return internalGetOpFieldBuilder().getBuilder(index);
     }
     /**
      * repeated .tensorflow.OpDef op = 1;
@@ -641,7 +642,7 @@ public org.tensorflow.proto.OpDefOrBuilder getOpOrBuilder(
      * repeated .tensorflow.OpDef op = 1;
      */
     public org.tensorflow.proto.OpDef.Builder addOpBuilder() {
-      return getOpFieldBuilder().addBuilder(
+      return internalGetOpFieldBuilder().addBuilder(
           org.tensorflow.proto.OpDef.getDefaultInstance());
     }
     /**
@@ -649,7 +650,7 @@ public org.tensorflow.proto.OpDef.Builder addOpBuilder() {
      */
     public org.tensorflow.proto.OpDef.Builder addOpBuilder(
         int index) {
-      return getOpFieldBuilder().addBuilder(
+      return internalGetOpFieldBuilder().addBuilder(
           index, org.tensorflow.proto.OpDef.getDefaultInstance());
     }
     /**
@@ -657,11 +658,11 @@ public org.tensorflow.proto.OpDef.Builder addOpBuilder(
      */
     public java.util.List 
          getOpBuilderList() {
-      return getOpFieldBuilder().getBuilderList();
+      return internalGetOpFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.OpDef, org.tensorflow.proto.OpDef.Builder, org.tensorflow.proto.OpDefOrBuilder> 
-        getOpFieldBuilder() {
+        internalGetOpFieldBuilder() {
       if (opBuilder_ == null) {
         opBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.OpDef, org.tensorflow.proto.OpDef.Builder, org.tensorflow.proto.OpDefOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpListOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpListOrBuilder.java
index 5e13bc021f6..ac44459fe5c 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpListOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpListOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/op_def.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface OpListOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.OpList)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpPerformanceData.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpPerformanceData.java
index a6c88007b41..2f79bf0f068 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpPerformanceData.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OpPerformanceData.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/grappler/costs/op_performance_data.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class OpPerformanceData {
   private OpPerformanceData() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       OpPerformanceData.class.getName());
   }
@@ -51,8 +52,8 @@ public static final class SessionInfo extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         SessionInfo.class.getName());
     }
@@ -685,8 +686,8 @@ public static final class OpInfo extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         OpInfo.class.getName());
     }
@@ -786,8 +787,8 @@ public static final class TensorProperties extends
         com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
           com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
           /* major= */ 4,
-          /* minor= */ 28,
-          /* patch= */ 3,
+          /* minor= */ 31,
+          /* patch= */ 1,
           /* suffix= */ "",
           TensorProperties.class.getName());
       }
@@ -1108,8 +1109,8 @@ private Builder(
         private void maybeForceBuilderInitialization() {
           if (com.google.protobuf.GeneratedMessage
                   .alwaysUseFieldBuilders) {
-            getShapeFieldBuilder();
-            getValueFieldBuilder();
+            internalGetShapeFieldBuilder();
+            internalGetValueFieldBuilder();
           }
         }
         @java.lang.Override
@@ -1233,14 +1234,14 @@ public Builder mergeFrom(
                 } // case 8
                 case 18: {
                   input.readMessage(
-                      getShapeFieldBuilder().getBuilder(),
+                      internalGetShapeFieldBuilder().getBuilder(),
                       extensionRegistry);
                   bitField0_ |= 0x00000002;
                   break;
                 } // case 18
                 case 26: {
                   input.readMessage(
-                      getValueFieldBuilder().getBuilder(),
+                      internalGetValueFieldBuilder().getBuilder(),
                       extensionRegistry);
                   bitField0_ |= 0x00000004;
                   break;
@@ -1296,9 +1297,7 @@ public org.tensorflow.proto.DataType getDtype() {
          * @return This builder for chaining.
          */
         public Builder setDtype(org.tensorflow.proto.DataType value) {
-          if (value == null) {
-            throw new NullPointerException();
-          }
+          if (value == null) { throw new NullPointerException(); }
           bitField0_ |= 0x00000001;
           dtype_ = value.getNumber();
           onChanged();
@@ -1406,7 +1405,7 @@ public Builder clearShape() {
         public org.tensorflow.proto.TensorShapeProto.Builder getShapeBuilder() {
           bitField0_ |= 0x00000002;
           onChanged();
-          return getShapeFieldBuilder().getBuilder();
+          return internalGetShapeFieldBuilder().getBuilder();
         }
         /**
          * .tensorflow.TensorShapeProto shape = 2;
@@ -1424,7 +1423,7 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
          */
         private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> 
-            getShapeFieldBuilder() {
+            internalGetShapeFieldBuilder() {
           if (shapeBuilder_ == null) {
             shapeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder>(
@@ -1527,7 +1526,7 @@ public Builder clearValue() {
         public org.tensorflow.proto.TensorProto.Builder getValueBuilder() {
           bitField0_ |= 0x00000004;
           onChanged();
-          return getValueFieldBuilder().getBuilder();
+          return internalGetValueFieldBuilder().getBuilder();
         }
         /**
          * .tensorflow.TensorProto value = 3;
@@ -1545,7 +1544,7 @@ public org.tensorflow.proto.TensorProtoOrBuilder getValueOrBuilder() {
          */
         private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> 
-            getValueFieldBuilder() {
+            internalGetValueFieldBuilder() {
           if (valueBuilder_ == null) {
             valueBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder>(
@@ -2225,10 +2224,10 @@ private Builder(
       private void maybeForceBuilderInitialization() {
         if (com.google.protobuf.GeneratedMessage
                 .alwaysUseFieldBuilders) {
-          getInputsFieldBuilder();
-          getOutputsFieldBuilder();
-          getDeviceFieldBuilder();
-          getSessionInfoFieldBuilder();
+          internalGetInputsFieldBuilder();
+          internalGetOutputsFieldBuilder();
+          internalGetDeviceFieldBuilder();
+          internalGetSessionInfoFieldBuilder();
         }
       }
       @java.lang.Override
@@ -2378,7 +2377,7 @@ public Builder mergeFrom(org.tensorflow.proto.OpPerformanceData.OpInfo other) {
               bitField0_ = (bitField0_ & ~0x00000004);
               inputsBuilder_ = 
                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                   getInputsFieldBuilder() : null;
+                   internalGetInputsFieldBuilder() : null;
             } else {
               inputsBuilder_.addAllMessages(other.inputs_);
             }
@@ -2404,7 +2403,7 @@ public Builder mergeFrom(org.tensorflow.proto.OpPerformanceData.OpInfo other) {
               bitField0_ = (bitField0_ & ~0x00000008);
               outputsBuilder_ = 
                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                   getOutputsFieldBuilder() : null;
+                   internalGetOutputsFieldBuilder() : null;
             } else {
               outputsBuilder_.addAllMessages(other.outputs_);
             }
@@ -2471,7 +2470,7 @@ public Builder mergeFrom(
               } // case 26
               case 34: {
                 input.readMessage(
-                    getDeviceFieldBuilder().getBuilder(),
+                    internalGetDeviceFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000010;
                 break;
@@ -2491,7 +2490,7 @@ public Builder mergeFrom(
               } // case 42
               case 50: {
                 input.readMessage(
-                    getSessionInfoFieldBuilder().getBuilder(),
+                    internalGetSessionInfoFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000020;
                 break;
@@ -2972,7 +2971,7 @@ public Builder removeInputs(int index) {
        */
       public org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties.Builder getInputsBuilder(
           int index) {
-        return getInputsFieldBuilder().getBuilder(index);
+        return internalGetInputsFieldBuilder().getBuilder(index);
       }
       /**
        * repeated .tensorflow.OpInfo.TensorProperties inputs = 3;
@@ -2999,7 +2998,7 @@ public org.tensorflow.proto.OpPerformanceData.OpInfo.TensorPropertiesOrBuilder g
        * repeated .tensorflow.OpInfo.TensorProperties inputs = 3;
        */
       public org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties.Builder addInputsBuilder() {
-        return getInputsFieldBuilder().addBuilder(
+        return internalGetInputsFieldBuilder().addBuilder(
             org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties.getDefaultInstance());
       }
       /**
@@ -3007,7 +3006,7 @@ public org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties.Builder ad
        */
       public org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties.Builder addInputsBuilder(
           int index) {
-        return getInputsFieldBuilder().addBuilder(
+        return internalGetInputsFieldBuilder().addBuilder(
             index, org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties.getDefaultInstance());
       }
       /**
@@ -3015,11 +3014,11 @@ public org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties.Builder ad
        */
       public java.util.List 
            getInputsBuilderList() {
-        return getInputsFieldBuilder().getBuilderList();
+        return internalGetInputsFieldBuilder().getBuilderList();
       }
       private com.google.protobuf.RepeatedFieldBuilder<
           org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties, org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties.Builder, org.tensorflow.proto.OpPerformanceData.OpInfo.TensorPropertiesOrBuilder> 
-          getInputsFieldBuilder() {
+          internalGetInputsFieldBuilder() {
         if (inputsBuilder_ == null) {
           inputsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties, org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties.Builder, org.tensorflow.proto.OpPerformanceData.OpInfo.TensorPropertiesOrBuilder>(
@@ -3264,7 +3263,7 @@ public Builder removeOutputs(int index) {
        */
       public org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties.Builder getOutputsBuilder(
           int index) {
-        return getOutputsFieldBuilder().getBuilder(index);
+        return internalGetOutputsFieldBuilder().getBuilder(index);
       }
       /**
        * 
@@ -3303,7 +3302,7 @@ public org.tensorflow.proto.OpPerformanceData.OpInfo.TensorPropertiesOrBuilder g
        * repeated .tensorflow.OpInfo.TensorProperties outputs = 5;
        */
       public org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties.Builder addOutputsBuilder() {
-        return getOutputsFieldBuilder().addBuilder(
+        return internalGetOutputsFieldBuilder().addBuilder(
             org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties.getDefaultInstance());
       }
       /**
@@ -3315,7 +3314,7 @@ public org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties.Builder ad
        */
       public org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties.Builder addOutputsBuilder(
           int index) {
-        return getOutputsFieldBuilder().addBuilder(
+        return internalGetOutputsFieldBuilder().addBuilder(
             index, org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties.getDefaultInstance());
       }
       /**
@@ -3327,11 +3326,11 @@ public org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties.Builder ad
        */
       public java.util.List 
            getOutputsBuilderList() {
-        return getOutputsFieldBuilder().getBuilderList();
+        return internalGetOutputsFieldBuilder().getBuilderList();
       }
       private com.google.protobuf.RepeatedFieldBuilder<
           org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties, org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties.Builder, org.tensorflow.proto.OpPerformanceData.OpInfo.TensorPropertiesOrBuilder> 
-          getOutputsFieldBuilder() {
+          internalGetOutputsFieldBuilder() {
         if (outputsBuilder_ == null) {
           outputsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties, org.tensorflow.proto.OpPerformanceData.OpInfo.TensorProperties.Builder, org.tensorflow.proto.OpPerformanceData.OpInfo.TensorPropertiesOrBuilder>(
@@ -3463,7 +3462,7 @@ public Builder clearDevice() {
       public org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties.Builder getDeviceBuilder() {
         bitField0_ |= 0x00000010;
         onChanged();
-        return getDeviceFieldBuilder().getBuilder();
+        return internalGetDeviceFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -3489,7 +3488,7 @@ public org.tensorflow.proto.DevicePropertiesProtos.DevicePropertiesOrBuilder get
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties, org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties.Builder, org.tensorflow.proto.DevicePropertiesProtos.DevicePropertiesOrBuilder> 
-          getDeviceFieldBuilder() {
+          internalGetDeviceFieldBuilder() {
         if (deviceBuilder_ == null) {
           deviceBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties, org.tensorflow.proto.DevicePropertiesProtos.DeviceProperties.Builder, org.tensorflow.proto.DevicePropertiesProtos.DevicePropertiesOrBuilder>(
@@ -3620,7 +3619,7 @@ public Builder clearSessionInfo() {
       public org.tensorflow.proto.OpPerformanceData.SessionInfo.Builder getSessionInfoBuilder() {
         bitField0_ |= 0x00000020;
         onChanged();
-        return getSessionInfoFieldBuilder().getBuilder();
+        return internalGetSessionInfoFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -3646,7 +3645,7 @@ public org.tensorflow.proto.OpPerformanceData.SessionInfoOrBuilder getSessionInf
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.OpPerformanceData.SessionInfo, org.tensorflow.proto.OpPerformanceData.SessionInfo.Builder, org.tensorflow.proto.OpPerformanceData.SessionInfoOrBuilder> 
-          getSessionInfoFieldBuilder() {
+          internalGetSessionInfoFieldBuilder() {
         if (sessionInfoBuilder_ == null) {
           sessionInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.OpPerformanceData.SessionInfo, org.tensorflow.proto.OpPerformanceData.SessionInfo.Builder, org.tensorflow.proto.OpPerformanceData.SessionInfoOrBuilder>(
@@ -3737,8 +3736,8 @@ public static final class NormalDistribution extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         NormalDistribution.class.getName());
     }
@@ -4045,10 +4044,10 @@ public Builder mergeFrom(com.google.protobuf.Message other) {
 
       public Builder mergeFrom(org.tensorflow.proto.OpPerformanceData.NormalDistribution other) {
         if (other == org.tensorflow.proto.OpPerformanceData.NormalDistribution.getDefaultInstance()) return this;
-        if (other.getMu() != 0D) {
+        if (java.lang.Double.doubleToRawLongBits(other.getMu()) != 0) {
           setMu(other.getMu());
         }
-        if (other.getSigma() != 0D) {
+        if (java.lang.Double.doubleToRawLongBits(other.getSigma()) != 0) {
           setSigma(other.getSigma());
         }
         this.mergeUnknownFields(other.getUnknownFields());
@@ -4247,8 +4246,8 @@ public static final class LogNormalDistribution extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         LogNormalDistribution.class.getName());
     }
@@ -4555,10 +4554,10 @@ public Builder mergeFrom(com.google.protobuf.Message other) {
 
       public Builder mergeFrom(org.tensorflow.proto.OpPerformanceData.LogNormalDistribution other) {
         if (other == org.tensorflow.proto.OpPerformanceData.LogNormalDistribution.getDefaultInstance()) return this;
-        if (other.getMu() != 0D) {
+        if (java.lang.Double.doubleToRawLongBits(other.getMu()) != 0) {
           setMu(other.getMu());
         }
-        if (other.getSigma() != 0D) {
+        if (java.lang.Double.doubleToRawLongBits(other.getSigma()) != 0) {
           setSigma(other.getSigma());
         }
         this.mergeUnknownFields(other.getUnknownFields());
@@ -4936,8 +4935,8 @@ public static final class OpPerformance extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         OpPerformance.class.getName());
     }
@@ -5043,8 +5042,8 @@ public static final class OpMemory extends
         com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
           com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
           /* major= */ 4,
-          /* minor= */ 28,
-          /* patch= */ 3,
+          /* minor= */ 31,
+          /* patch= */ 1,
           /* suffix= */ "",
           OpMemory.class.getName());
       }
@@ -6612,9 +6611,9 @@ private Builder(
       private void maybeForceBuilderInitialization() {
         if (com.google.protobuf.GeneratedMessage
                 .alwaysUseFieldBuilders) {
-          getOpFieldBuilder();
-          getSessionInfoFieldBuilder();
-          getOpMemoryFieldBuilder();
+          internalGetOpFieldBuilder();
+          internalGetSessionInfoFieldBuilder();
+          internalGetOpMemoryFieldBuilder();
         }
       }
       @java.lang.Override
@@ -6776,10 +6775,10 @@ public Builder mergeFrom(org.tensorflow.proto.OpPerformanceData.OpPerformance ot
         if (other.getMemoryTime() != 0L) {
           setMemoryTime(other.getMemoryTime());
         }
-        if (other.getComputeEfficiency() != 0D) {
+        if (java.lang.Double.doubleToRawLongBits(other.getComputeEfficiency()) != 0) {
           setComputeEfficiency(other.getComputeEfficiency());
         }
-        if (other.getMemoryEfficiency() != 0D) {
+        if (java.lang.Double.doubleToRawLongBits(other.getMemoryEfficiency()) != 0) {
           setMemoryEfficiency(other.getMemoryEfficiency());
         }
         if (other.hasOpMemory()) {
@@ -6826,7 +6825,7 @@ public Builder mergeFrom(
                 break;
               case 10: {
                 input.readMessage(
-                    getOpFieldBuilder().getBuilder(),
+                    internalGetOpFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000001;
                 break;
@@ -6868,28 +6867,28 @@ public Builder mergeFrom(
               } // case 65
               case 74: {
                 input.readMessage(
-                    getOpMemoryFieldBuilder().getBuilder(),
+                    internalGetOpMemoryFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000800;
                 break;
               } // case 74
               case 82: {
                 input.readMessage(
-                    getExecutionTimeNormalFieldBuilder().getBuilder(),
+                    internalGetExecutionTimeNormalFieldBuilder().getBuilder(),
                     extensionRegistry);
                 executionTimeCase_ = 10;
                 break;
               } // case 82
               case 90: {
                 input.readMessage(
-                    getExecutionTimeLogNormalFieldBuilder().getBuilder(),
+                    internalGetExecutionTimeLogNormalFieldBuilder().getBuilder(),
                     extensionRegistry);
                 executionTimeCase_ = 11;
                 break;
               } // case 90
               case 98: {
                 input.readMessage(
-                    getSessionInfoFieldBuilder().getBuilder(),
+                    internalGetSessionInfoFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000002;
                 break;
@@ -7045,7 +7044,7 @@ public Builder clearOp() {
       public org.tensorflow.proto.OpPerformanceData.OpInfo.Builder getOpBuilder() {
         bitField0_ |= 0x00000001;
         onChanged();
-        return getOpFieldBuilder().getBuilder();
+        return internalGetOpFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -7071,7 +7070,7 @@ public org.tensorflow.proto.OpPerformanceData.OpInfoOrBuilder getOpOrBuilder() {
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.OpPerformanceData.OpInfo, org.tensorflow.proto.OpPerformanceData.OpInfo.Builder, org.tensorflow.proto.OpPerformanceData.OpInfoOrBuilder> 
-          getOpFieldBuilder() {
+          internalGetOpFieldBuilder() {
         if (opBuilder_ == null) {
           opBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.OpPerformanceData.OpInfo, org.tensorflow.proto.OpPerformanceData.OpInfo.Builder, org.tensorflow.proto.OpPerformanceData.OpInfoOrBuilder>(
@@ -7206,7 +7205,7 @@ public org.tensorflow.proto.OpPerformanceData.OpInfoOrBuilder getOpOrBuilder() {
       @java.lang.Deprecated public org.tensorflow.proto.OpPerformanceData.SessionInfo.Builder getSessionInfoBuilder() {
         bitField0_ |= 0x00000002;
         onChanged();
-        return getSessionInfoFieldBuilder().getBuilder();
+        return internalGetSessionInfoFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -7232,7 +7231,7 @@ public org.tensorflow.proto.OpPerformanceData.OpInfoOrBuilder getOpOrBuilder() {
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.OpPerformanceData.SessionInfo, org.tensorflow.proto.OpPerformanceData.SessionInfo.Builder, org.tensorflow.proto.OpPerformanceData.SessionInfoOrBuilder> 
-          getSessionInfoFieldBuilder() {
+          internalGetSessionInfoFieldBuilder() {
         if (sessionInfoBuilder_ == null) {
           sessionInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.OpPerformanceData.SessionInfo, org.tensorflow.proto.OpPerformanceData.SessionInfo.Builder, org.tensorflow.proto.OpPerformanceData.SessionInfoOrBuilder>(
@@ -7709,7 +7708,7 @@ public Builder clearExecutionTimeNormal() {
        * .tensorflow.NormalDistribution execution_time_normal = 10;
        */
       public org.tensorflow.proto.OpPerformanceData.NormalDistribution.Builder getExecutionTimeNormalBuilder() {
-        return getExecutionTimeNormalFieldBuilder().getBuilder();
+        return internalGetExecutionTimeNormalFieldBuilder().getBuilder();
       }
       /**
        * .tensorflow.NormalDistribution execution_time_normal = 10;
@@ -7730,7 +7729,7 @@ public org.tensorflow.proto.OpPerformanceData.NormalDistributionOrBuilder getExe
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.OpPerformanceData.NormalDistribution, org.tensorflow.proto.OpPerformanceData.NormalDistribution.Builder, org.tensorflow.proto.OpPerformanceData.NormalDistributionOrBuilder> 
-          getExecutionTimeNormalFieldBuilder() {
+          internalGetExecutionTimeNormalFieldBuilder() {
         if (executionTimeNormalBuilder_ == null) {
           if (!(executionTimeCase_ == 10)) {
             executionTime_ = org.tensorflow.proto.OpPerformanceData.NormalDistribution.getDefaultInstance();
@@ -7851,7 +7850,7 @@ public Builder clearExecutionTimeLogNormal() {
        * .tensorflow.LogNormalDistribution execution_time_log_normal = 11;
        */
       public org.tensorflow.proto.OpPerformanceData.LogNormalDistribution.Builder getExecutionTimeLogNormalBuilder() {
-        return getExecutionTimeLogNormalFieldBuilder().getBuilder();
+        return internalGetExecutionTimeLogNormalFieldBuilder().getBuilder();
       }
       /**
        * .tensorflow.LogNormalDistribution execution_time_log_normal = 11;
@@ -7872,7 +7871,7 @@ public org.tensorflow.proto.OpPerformanceData.LogNormalDistributionOrBuilder get
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.OpPerformanceData.LogNormalDistribution, org.tensorflow.proto.OpPerformanceData.LogNormalDistribution.Builder, org.tensorflow.proto.OpPerformanceData.LogNormalDistributionOrBuilder> 
-          getExecutionTimeLogNormalFieldBuilder() {
+          internalGetExecutionTimeLogNormalFieldBuilder() {
         if (executionTimeLogNormalBuilder_ == null) {
           if (!(executionTimeCase_ == 11)) {
             executionTime_ = org.tensorflow.proto.OpPerformanceData.LogNormalDistribution.getDefaultInstance();
@@ -7980,7 +7979,7 @@ public Builder clearOpMemory() {
       public org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemory.Builder getOpMemoryBuilder() {
         bitField0_ |= 0x00000800;
         onChanged();
-        return getOpMemoryFieldBuilder().getBuilder();
+        return internalGetOpMemoryFieldBuilder().getBuilder();
       }
       /**
        * .tensorflow.OpPerformance.OpMemory op_memory = 9;
@@ -7998,7 +7997,7 @@ public org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemoryOrBuilder ge
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemory, org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemory.Builder, org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemoryOrBuilder> 
-          getOpMemoryFieldBuilder() {
+          internalGetOpMemoryFieldBuilder() {
         if (opMemoryBuilder_ == null) {
           opMemoryBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemory, org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemory.Builder, org.tensorflow.proto.OpPerformanceData.OpPerformance.OpMemoryOrBuilder>(
@@ -8105,8 +8104,8 @@ public static final class OpPerformanceList extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         OpPerformanceList.class.getName());
     }
@@ -8456,7 +8455,7 @@ public Builder mergeFrom(org.tensorflow.proto.OpPerformanceData.OpPerformanceLis
               bitField0_ = (bitField0_ & ~0x00000001);
               opPerformanceBuilder_ = 
                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                   getOpPerformanceFieldBuilder() : null;
+                   internalGetOpPerformanceFieldBuilder() : null;
             } else {
               opPerformanceBuilder_.addAllMessages(other.opPerformance_);
             }
@@ -8698,7 +8697,7 @@ public Builder removeOpPerformance(int index) {
        */
       public org.tensorflow.proto.OpPerformanceData.OpPerformance.Builder getOpPerformanceBuilder(
           int index) {
-        return getOpPerformanceFieldBuilder().getBuilder(index);
+        return internalGetOpPerformanceFieldBuilder().getBuilder(index);
       }
       /**
        * repeated .tensorflow.OpPerformance op_performance = 1;
@@ -8725,7 +8724,7 @@ public org.tensorflow.proto.OpPerformanceData.OpPerformanceOrBuilder getOpPerfor
        * repeated .tensorflow.OpPerformance op_performance = 1;
        */
       public org.tensorflow.proto.OpPerformanceData.OpPerformance.Builder addOpPerformanceBuilder() {
-        return getOpPerformanceFieldBuilder().addBuilder(
+        return internalGetOpPerformanceFieldBuilder().addBuilder(
             org.tensorflow.proto.OpPerformanceData.OpPerformance.getDefaultInstance());
       }
       /**
@@ -8733,7 +8732,7 @@ public org.tensorflow.proto.OpPerformanceData.OpPerformance.Builder addOpPerform
        */
       public org.tensorflow.proto.OpPerformanceData.OpPerformance.Builder addOpPerformanceBuilder(
           int index) {
-        return getOpPerformanceFieldBuilder().addBuilder(
+        return internalGetOpPerformanceFieldBuilder().addBuilder(
             index, org.tensorflow.proto.OpPerformanceData.OpPerformance.getDefaultInstance());
       }
       /**
@@ -8741,11 +8740,11 @@ public org.tensorflow.proto.OpPerformanceData.OpPerformance.Builder addOpPerform
        */
       public java.util.List 
            getOpPerformanceBuilderList() {
-        return getOpPerformanceFieldBuilder().getBuilderList();
+        return internalGetOpPerformanceFieldBuilder().getBuilderList();
       }
       private com.google.protobuf.RepeatedFieldBuilder<
           org.tensorflow.proto.OpPerformanceData.OpPerformance, org.tensorflow.proto.OpPerformanceData.OpPerformance.Builder, org.tensorflow.proto.OpPerformanceData.OpPerformanceOrBuilder> 
-          getOpPerformanceFieldBuilder() {
+          internalGetOpPerformanceFieldBuilder() {
         if (opPerformanceBuilder_ == null) {
           opPerformanceBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.OpPerformanceData.OpPerformance, org.tensorflow.proto.OpPerformanceData.OpPerformance.Builder, org.tensorflow.proto.OpPerformanceData.OpPerformanceOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OptimizedFunctionGraphOuterClass.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OptimizedFunctionGraphOuterClass.java
index 324e2a3431c..5f675abbcae 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OptimizedFunctionGraphOuterClass.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OptimizedFunctionGraphOuterClass.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/optimized_function_graph.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class OptimizedFunctionGraphOuterClass {
   private OptimizedFunctionGraphOuterClass() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       OptimizedFunctionGraphOuterClass.class.getName());
   }
@@ -269,8 +270,8 @@ public static final class OptimizedFunctionGraph extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         OptimizedFunctionGraph.class.getName());
     }
@@ -343,8 +344,8 @@ public enum OptimizationSource
         com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
           com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
           /* major= */ 4,
-          /* minor= */ 28,
-          /* patch= */ 3,
+          /* minor= */ 31,
+          /* patch= */ 1,
           /* suffix= */ "",
           OptimizationSource.class.getName());
       }
@@ -417,7 +418,7 @@ public OptimizationSource findValueByNumber(int number) {
           getDescriptorForType() {
         return getDescriptor();
       }
-      public static final com.google.protobuf.Descriptors.EnumDescriptor
+      public static com.google.protobuf.Descriptors.EnumDescriptor
           getDescriptor() {
         return org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFunctionGraph.getDescriptor().getEnumTypes().get(0);
       }
@@ -634,8 +635,9 @@ public java.lang.String getNodeNameToControlRetOrThrow(
 
     public static final int RET_TYPES_FIELD_NUMBER = 4;
     @SuppressWarnings("serial")
-    private com.google.protobuf.Internal.IntList retTypes_;
-    private static final com.google.protobuf.Internal.IntListAdapter.IntConverter<
+    private com.google.protobuf.Internal.IntList retTypes_ =
+        emptyIntList();
+    private static final     com.google.protobuf.Internal.IntListAdapter.IntConverter<
         org.tensorflow.proto.DataType> retTypes_converter_ =
             new com.google.protobuf.Internal.IntListAdapter.IntConverter<
                 org.tensorflow.proto.DataType>() {
@@ -1120,7 +1122,7 @@ private Builder(
       private void maybeForceBuilderInitialization() {
         if (com.google.protobuf.GeneratedMessage
                 .alwaysUseFieldBuilders) {
-          getFunctionGraphFieldBuilder();
+          internalGetFunctionGraphFieldBuilder();
         }
       }
       @java.lang.Override
@@ -1135,7 +1137,6 @@ public Builder clear() {
         }
         internalGetMutableNodeNameToControlRet().clear();
         retTypes_ = emptyIntList();
-        bitField0_ = (bitField0_ & ~0x00000008);
         numReturnNodes_ = 0;
         source_ = 0;
         optimizationTimeUsecs_ = 0L;
@@ -1165,20 +1166,11 @@ public org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFunctionGr
       @java.lang.Override
       public org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFunctionGraph buildPartial() {
         org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFunctionGraph result = new org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFunctionGraph(this);
-        buildPartialRepeatedFields(result);
         if (bitField0_ != 0) { buildPartial0(result); }
         onBuilt();
         return result;
       }
 
-      private void buildPartialRepeatedFields(org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFunctionGraph result) {
-        if (((bitField0_ & 0x00000008) != 0)) {
-          retTypes_.makeImmutable();
-          bitField0_ = (bitField0_ & ~0x00000008);
-        }
-        result.retTypes_ = retTypes_;
-      }
-
       private void buildPartial0(org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFunctionGraph result) {
         int from_bitField0_ = bitField0_;
         if (((from_bitField0_ & 0x00000001) != 0)) {
@@ -1195,6 +1187,10 @@ private void buildPartial0(org.tensorflow.proto.OptimizedFunctionGraphOuterClass
           result.nodeNameToControlRet_ = internalGetNodeNameToControlRet();
           result.nodeNameToControlRet_.makeImmutable();
         }
+        if (((from_bitField0_ & 0x00000008) != 0)) {
+          retTypes_.makeImmutable();
+          result.retTypes_ = retTypes_;
+        }
         if (((from_bitField0_ & 0x00000010) != 0)) {
           result.numReturnNodes_ = numReturnNodes_;
         }
@@ -1235,7 +1231,8 @@ public Builder mergeFrom(org.tensorflow.proto.OptimizedFunctionGraphOuterClass.O
         if (!other.retTypes_.isEmpty()) {
           if (retTypes_.isEmpty()) {
             retTypes_ = other.retTypes_;
-            bitField0_ = (bitField0_ & ~0x00000008);
+            retTypes_.makeImmutable();
+            bitField0_ |= 0x00000008;
           } else {
             ensureRetTypesIsMutable();
             retTypes_.addAll(other.retTypes_);
@@ -1246,7 +1243,7 @@ public Builder mergeFrom(org.tensorflow.proto.OptimizedFunctionGraphOuterClass.O
           setNumReturnNodes(other.getNumReturnNodes());
         }
         if (other.hasSource()) {
-          setSource(other.getSource());
+          setSourceValue(other.getSourceValue());
         }
         if (other.hasOptimizationTimeUsecs()) {
           setOptimizationTimeUsecs(other.getOptimizationTimeUsecs());
@@ -1284,7 +1281,7 @@ public Builder mergeFrom(
               } // case 10
               case 18: {
                 input.readMessage(
-                    getFunctionGraphFieldBuilder().getBuilder(),
+                    internalGetFunctionGraphFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000002;
                 break;
@@ -1306,13 +1303,12 @@ public Builder mergeFrom(
               } // case 32
               case 34: {
                 int length = input.readRawVarint32();
-                int oldLimit = input.pushLimit(length);
-                while(input.getBytesUntilLimit() > 0) {
-                  int tmpRaw = input.readEnum();
-                  ensureRetTypesIsMutable();
-                  retTypes_.addInt(tmpRaw);
+                int limit = input.pushLimit(length);
+                ensureRetTypesIsMutable();
+                while (input.getBytesUntilLimit() > 0) {
+                  retTypes_.addInt(input.readEnum());
                 }
-                input.popLimit(oldLimit);
+                input.popLimit(limit);
                 break;
               } // case 34
               case 40: {
@@ -1563,7 +1559,7 @@ public Builder clearFunctionGraph() {
       public org.tensorflow.proto.GraphDef.Builder getFunctionGraphBuilder() {
         bitField0_ |= 0x00000002;
         onChanged();
-        return getFunctionGraphFieldBuilder().getBuilder();
+        return internalGetFunctionGraphFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -1589,7 +1585,7 @@ public org.tensorflow.proto.GraphDefOrBuilder getFunctionGraphOrBuilder() {
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.GraphDef, org.tensorflow.proto.GraphDef.Builder, org.tensorflow.proto.GraphDefOrBuilder> 
-          getFunctionGraphFieldBuilder() {
+          internalGetFunctionGraphFieldBuilder() {
         if (functionGraphBuilder_ == null) {
           functionGraphBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.GraphDef, org.tensorflow.proto.GraphDef.Builder, org.tensorflow.proto.GraphDefOrBuilder>(
@@ -1763,13 +1759,12 @@ public Builder putAllNodeNameToControlRet(
         return this;
       }
 
-      private com.google.protobuf.Internal.IntList retTypes_ =
-        emptyIntList();
+      private com.google.protobuf.Internal.IntList retTypes_ = emptyIntList();
       private void ensureRetTypesIsMutable() {
-        if (!((bitField0_ & 0x00000008) != 0)) {
+        if (!retTypes_.isModifiable()) {
           retTypes_ = makeMutableCopy(retTypes_);
-          bitField0_ |= 0x00000008;
         }
+        bitField0_ |= 0x00000008;
       }
       /**
        * 
@@ -1822,9 +1817,7 @@ public org.tensorflow.proto.DataType getRetTypes(int index) {
        */
       public Builder setRetTypes(
           int index, org.tensorflow.proto.DataType value) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
+        if (value == null) { throw new NullPointerException(); }
         ensureRetTypesIsMutable();
         retTypes_.setInt(index, value.getNumber());
         onChanged();
@@ -1841,9 +1834,7 @@ public Builder setRetTypes(
        * @return This builder for chaining.
        */
       public Builder addRetTypes(org.tensorflow.proto.DataType value) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
+        if (value == null) { throw new NullPointerException(); }
         ensureRetTypesIsMutable();
         retTypes_.addInt(value.getNumber());
         onChanged();
@@ -1894,7 +1885,8 @@ public Builder clearRetTypes() {
        */
       public java.util.List
       getRetTypesValueList() {
-        return java.util.Collections.unmodifiableList(retTypes_);
+        retTypes_.makeImmutable();
+        return retTypes_;
       }
       /**
        * 
@@ -2068,9 +2060,7 @@ public org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFunctionGr
        * @return This builder for chaining.
        */
       public Builder setSource(org.tensorflow.proto.OptimizedFunctionGraphOuterClass.OptimizedFunctionGraph.OptimizationSource value) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
+        if (value == null) { throw new NullPointerException(); }
         bitField0_ |= 0x00000020;
         source_ = value.getNumber();
         onChanged();
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OptimizerOptions.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OptimizerOptions.java
index 3db93f28f92..4d3a2413a58 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OptimizerOptions.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OptimizerOptions.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/config.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.OptimizerOptions}
  */
+@com.google.protobuf.Generated
 public final class OptimizerOptions extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.OptimizerOptions)
@@ -21,8 +22,8 @@ public final class OptimizerOptions extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       OptimizerOptions.class.getName());
   }
@@ -83,8 +84,8 @@ public enum Level
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         Level.class.getName());
     }
@@ -163,7 +164,7 @@ public Level findValueByNumber(int number) {
         getDescriptorForType() {
       return getDescriptor();
     }
-    public static final com.google.protobuf.Descriptors.EnumDescriptor
+    public static com.google.protobuf.Descriptors.EnumDescriptor
         getDescriptor() {
       return org.tensorflow.proto.OptimizerOptions.getDescriptor().getEnumTypes().get(0);
     }
@@ -234,8 +235,8 @@ public enum GlobalJitLevel
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         GlobalJitLevel.class.getName());
     }
@@ -324,7 +325,7 @@ public GlobalJitLevel findValueByNumber(int number) {
         getDescriptorForType() {
       return getDescriptor();
     }
-    public static final com.google.protobuf.Descriptors.EnumDescriptor
+    public static com.google.protobuf.Descriptors.EnumDescriptor
         getDescriptor() {
       return org.tensorflow.proto.OptimizerOptions.getDescriptor().getEnumTypes().get(1);
     }
@@ -1179,9 +1180,7 @@ public org.tensorflow.proto.OptimizerOptions.Level getOptLevel() {
      * @return This builder for chaining.
      */
     public Builder setOptLevel(org.tensorflow.proto.OptimizerOptions.Level value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000010;
       optLevel_ = value.getNumber();
       onChanged();
@@ -1237,9 +1236,7 @@ public org.tensorflow.proto.OptimizerOptions.GlobalJitLevel getGlobalJitLevel()
      * @return This builder for chaining.
      */
     public Builder setGlobalJitLevel(org.tensorflow.proto.OptimizerOptions.GlobalJitLevel value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000020;
       globalJitLevel_ = value.getNumber();
       onChanged();
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OptimizerOptionsOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OptimizerOptionsOrBuilder.java
index 0f08f0071ec..fce5d81b94c 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OptimizerOptionsOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/OptimizerOptionsOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/config.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface OptimizerOptionsOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.OptimizerOptions)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/PlatformInfo.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/PlatformInfo.java
index 1f78bab992e..fcc9121c4c6 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/PlatformInfo.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/PlatformInfo.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/test_log.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.PlatformInfo}
  */
+@com.google.protobuf.Generated
 public final class PlatformInfo extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.PlatformInfo)
@@ -17,8 +18,8 @@ public final class PlatformInfo extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       PlatformInfo.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/PlatformInfoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/PlatformInfoOrBuilder.java
index 28ee5913d54..4d22b446489 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/PlatformInfoOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/PlatformInfoOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/test_log.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface PlatformInfoOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.PlatformInfo)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ProfilerOptions.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ProfilerOptions.java
index aaf846a8472..89ad80f553b 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ProfilerOptions.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ProfilerOptions.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tsl/profiler/protobuf/profiler_options.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class ProfilerOptions {
   private ProfilerOptions() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       ProfilerOptions.class.getName());
   }
@@ -290,10 +291,52 @@ org.tensorflow.proto.ProfilerOptions.ProfileOptions.AdvancedConfigValue getAdvan
      * @return The raiseErrorOnStartFailure.
      */
     boolean getRaiseErrorOnStartFailure();
+
+    /**
+     * 
+     * Identifier of the profiling session. This will be used as the subdirectory
+     * under the repository path. If not set, the current timestamp will be used.
+     * 
+ * + * string session_id = 14; + * @return The sessionId. + */ + java.lang.String getSessionId(); + /** + *
+     * Identifier of the profiling session. This will be used as the subdirectory
+     * under the repository path. If not set, the current timestamp will be used.
+     * 
+ * + * string session_id = 14; + * @return The bytes for sessionId. + */ + com.google.protobuf.ByteString + getSessionIdBytes(); + + /** + *
+     * If set, this hostname will be used to name the profile file.
+     * 
+ * + * string override_hostname = 15; + * @return The overrideHostname. + */ + java.lang.String getOverrideHostname(); + /** + *
+     * If set, this hostname will be used to name the profile file.
+     * 
+ * + * string override_hostname = 15; + * @return The bytes for overrideHostname. + */ + com.google.protobuf.ByteString + getOverrideHostnameBytes(); } /** *
-   * Next ID: 14
+   * Next ID: 16
    * 
* * Protobuf type {@code tensorflow.ProfileOptions} @@ -307,8 +350,8 @@ public static final class ProfileOptions extends com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, /* major= */ 4, - /* minor= */ 28, - /* patch= */ 3, + /* minor= */ 31, + /* patch= */ 1, /* suffix= */ "", ProfileOptions.class.getName()); } @@ -319,6 +362,8 @@ private ProfileOptions(com.google.protobuf.GeneratedMessage.Builder builder) private ProfileOptions() { deviceType_ = 0; repositoryPath_ = ""; + sessionId_ = ""; + overrideHostname_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor @@ -378,8 +423,8 @@ public enum DeviceType com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, /* major= */ 4, - /* minor= */ 28, - /* patch= */ 3, + /* minor= */ 31, + /* patch= */ 1, /* suffix= */ "", DeviceType.class.getName()); } @@ -462,7 +507,7 @@ public DeviceType findValueByNumber(int number) { getDescriptorForType() { return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return org.tensorflow.proto.ProfilerOptions.ProfileOptions.getDescriptor().getEnumTypes().get(0); } @@ -519,8 +564,8 @@ public static final class TraceOptions extends com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, /* major= */ 4, - /* minor= */ 28, - /* patch= */ 3, + /* minor= */ 31, + /* patch= */ 1, /* suffix= */ "", TraceOptions.class.getName()); } @@ -1022,8 +1067,8 @@ public static final class AdvancedConfigValue extends com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, /* major= */ 4, - /* minor= */ 28, - /* patch= */ 3, + /* minor= */ 31, + /* patch= */ 1, /* suffix= */ "", AdvancedConfigValue.class.getName()); } @@ -2191,6 +2236,102 @@ public boolean getRaiseErrorOnStartFailure() { return raiseErrorOnStartFailure_; } + public static final int SESSION_ID_FIELD_NUMBER = 14; + @SuppressWarnings("serial") + private volatile java.lang.Object sessionId_ = ""; + /** + *
+     * Identifier of the profiling session. This will be used as the subdirectory
+     * under the repository path. If not set, the current timestamp will be used.
+     * 
+ * + * string session_id = 14; + * @return The sessionId. + */ + @java.lang.Override + public java.lang.String getSessionId() { + java.lang.Object ref = sessionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sessionId_ = s; + return s; + } + } + /** + *
+     * Identifier of the profiling session. This will be used as the subdirectory
+     * under the repository path. If not set, the current timestamp will be used.
+     * 
+ * + * string session_id = 14; + * @return The bytes for sessionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSessionIdBytes() { + java.lang.Object ref = sessionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sessionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OVERRIDE_HOSTNAME_FIELD_NUMBER = 15; + @SuppressWarnings("serial") + private volatile java.lang.Object overrideHostname_ = ""; + /** + *
+     * If set, this hostname will be used to name the profile file.
+     * 
+ * + * string override_hostname = 15; + * @return The overrideHostname. + */ + @java.lang.Override + public java.lang.String getOverrideHostname() { + java.lang.Object ref = overrideHostname_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + overrideHostname_ = s; + return s; + } + } + /** + *
+     * If set, this hostname will be used to name the profile file.
+     * 
+ * + * string override_hostname = 15; + * @return The bytes for overrideHostname. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOverrideHostnameBytes() { + java.lang.Object ref = overrideHostname_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + overrideHostname_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -2247,6 +2388,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (raiseErrorOnStartFailure_ != false) { output.writeBool(13, raiseErrorOnStartFailure_); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sessionId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 14, sessionId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(overrideHostname_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 15, overrideHostname_); + } getUnknownFields().writeTo(output); } @@ -2313,6 +2460,12 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBoolSize(13, raiseErrorOnStartFailure_); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sessionId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(14, sessionId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(overrideHostname_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(15, overrideHostname_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2356,6 +2509,10 @@ public boolean equals(final java.lang.Object obj) { other.internalGetAdvancedConfiguration())) return false; if (getRaiseErrorOnStartFailure() != other.getRaiseErrorOnStartFailure()) return false; + if (!getSessionId() + .equals(other.getSessionId())) return false; + if (!getOverrideHostname() + .equals(other.getOverrideHostname())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2402,6 +2559,10 @@ public int hashCode() { hash = (37 * hash) + RAISE_ERROR_ON_START_FAILURE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getRaiseErrorOnStartFailure()); + hash = (37 * hash) + SESSION_ID_FIELD_NUMBER; + hash = (53 * hash) + getSessionId().hashCode(); + hash = (37 * hash) + OVERRIDE_HOSTNAME_FIELD_NUMBER; + hash = (53 * hash) + getOverrideHostname().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -2501,7 +2662,7 @@ protected Builder newBuilderForType( } /** *
-     * Next ID: 14
+     * Next ID: 16
      * 
* * Protobuf type {@code tensorflow.ProfileOptions} @@ -2558,7 +2719,7 @@ private Builder( private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage .alwaysUseFieldBuilders) { - getTraceOptionsFieldBuilder(); + internalGetTraceOptionsFieldBuilder(); } } @java.lang.Override @@ -2582,6 +2743,8 @@ public Builder clear() { } internalGetMutableAdvancedConfiguration().clear(); raiseErrorOnStartFailure_ = false; + sessionId_ = ""; + overrideHostname_ = ""; return this; } @@ -2658,6 +2821,12 @@ private void buildPartial0(org.tensorflow.proto.ProfilerOptions.ProfileOptions r if (((from_bitField0_ & 0x00001000) != 0)) { result.raiseErrorOnStartFailure_ = raiseErrorOnStartFailure_; } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.sessionId_ = sessionId_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.overrideHostname_ = overrideHostname_; + } result.bitField0_ |= to_bitField0_; } @@ -2714,6 +2883,16 @@ public Builder mergeFrom(org.tensorflow.proto.ProfilerOptions.ProfileOptions oth if (other.getRaiseErrorOnStartFailure() != false) { setRaiseErrorOnStartFailure(other.getRaiseErrorOnStartFailure()); } + if (!other.getSessionId().isEmpty()) { + sessionId_ = other.sessionId_; + bitField0_ |= 0x00002000; + onChanged(); + } + if (!other.getOverrideHostname().isEmpty()) { + overrideHostname_ = other.overrideHostname_; + bitField0_ |= 0x00004000; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2792,7 +2971,7 @@ public Builder mergeFrom( } // case 82 case 90: { input.readMessage( - getTraceOptionsFieldBuilder().getBuilder(), + internalGetTraceOptionsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000400; break; @@ -2811,6 +2990,16 @@ public Builder mergeFrom( bitField0_ |= 0x00001000; break; } // case 104 + case 114: { + sessionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 114 + case 122: { + overrideHostname_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00004000; + break; + } // case 122 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -2952,9 +3141,7 @@ public org.tensorflow.proto.ProfilerOptions.ProfileOptions.DeviceType getDeviceT * @return This builder for chaining. */ public Builder setDeviceType(org.tensorflow.proto.ProfilerOptions.ProfileOptions.DeviceType value) { - if (value == null) { - throw new NullPointerException(); - } + if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; deviceType_ = value.getNumber(); onChanged(); @@ -3514,7 +3701,7 @@ public Builder clearTraceOptions() { public org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions.Builder getTraceOptionsBuilder() { bitField0_ |= 0x00000400; onChanged(); - return getTraceOptionsFieldBuilder().getBuilder(); + return internalGetTraceOptionsFieldBuilder().getBuilder(); } /** * .tensorflow.ProfileOptions.TraceOptions trace_options = 11; @@ -3532,7 +3719,7 @@ public org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptionsOrBuilder */ private com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions, org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions.Builder, org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptionsOrBuilder> - getTraceOptionsFieldBuilder() { + internalGetTraceOptionsFieldBuilder() { if (traceOptionsBuilder_ == null) { traceOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions, org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptions.Builder, org.tensorflow.proto.ProfilerOptions.ProfileOptions.TraceOptionsOrBuilder>( @@ -3827,6 +4014,195 @@ public Builder clearRaiseErrorOnStartFailure() { return this; } + private java.lang.Object sessionId_ = ""; + /** + *
+       * Identifier of the profiling session. This will be used as the subdirectory
+       * under the repository path. If not set, the current timestamp will be used.
+       * 
+ * + * string session_id = 14; + * @return The sessionId. + */ + public java.lang.String getSessionId() { + java.lang.Object ref = sessionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sessionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Identifier of the profiling session. This will be used as the subdirectory
+       * under the repository path. If not set, the current timestamp will be used.
+       * 
+ * + * string session_id = 14; + * @return The bytes for sessionId. + */ + public com.google.protobuf.ByteString + getSessionIdBytes() { + java.lang.Object ref = sessionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sessionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Identifier of the profiling session. This will be used as the subdirectory
+       * under the repository path. If not set, the current timestamp will be used.
+       * 
+ * + * string session_id = 14; + * @param value The sessionId to set. + * @return This builder for chaining. + */ + public Builder setSessionId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + sessionId_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + *
+       * Identifier of the profiling session. This will be used as the subdirectory
+       * under the repository path. If not set, the current timestamp will be used.
+       * 
+ * + * string session_id = 14; + * @return This builder for chaining. + */ + public Builder clearSessionId() { + sessionId_ = getDefaultInstance().getSessionId(); + bitField0_ = (bitField0_ & ~0x00002000); + onChanged(); + return this; + } + /** + *
+       * Identifier of the profiling session. This will be used as the subdirectory
+       * under the repository path. If not set, the current timestamp will be used.
+       * 
+ * + * string session_id = 14; + * @param value The bytes for sessionId to set. + * @return This builder for chaining. + */ + public Builder setSessionIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + sessionId_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + private java.lang.Object overrideHostname_ = ""; + /** + *
+       * If set, this hostname will be used to name the profile file.
+       * 
+ * + * string override_hostname = 15; + * @return The overrideHostname. + */ + public java.lang.String getOverrideHostname() { + java.lang.Object ref = overrideHostname_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + overrideHostname_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * If set, this hostname will be used to name the profile file.
+       * 
+ * + * string override_hostname = 15; + * @return The bytes for overrideHostname. + */ + public com.google.protobuf.ByteString + getOverrideHostnameBytes() { + java.lang.Object ref = overrideHostname_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + overrideHostname_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * If set, this hostname will be used to name the profile file.
+       * 
+ * + * string override_hostname = 15; + * @param value The overrideHostname to set. + * @return This builder for chaining. + */ + public Builder setOverrideHostname( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + overrideHostname_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + *
+       * If set, this hostname will be used to name the profile file.
+       * 
+ * + * string override_hostname = 15; + * @return This builder for chaining. + */ + public Builder clearOverrideHostname() { + overrideHostname_ = getDefaultInstance().getOverrideHostname(); + bitField0_ = (bitField0_ & ~0x00004000); + onChanged(); + return this; + } + /** + *
+       * If set, this hostname will be used to name the profile file.
+       * 
+ * + * string override_hostname = 15; + * @param value The bytes for overrideHostname to set. + * @return This builder for chaining. + */ + public Builder setOverrideHostnameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + overrideHostname_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:tensorflow.ProfileOptions) } @@ -4000,8 +4376,8 @@ public static final class RemoteProfilerSessionManagerOptions extends com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, /* major= */ 4, - /* minor= */ 28, - /* patch= */ 3, + /* minor= */ 31, + /* patch= */ 1, /* suffix= */ "", RemoteProfilerSessionManagerOptions.class.getName()); } @@ -4420,7 +4796,7 @@ private Builder( private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage .alwaysUseFieldBuilders) { - getProfilerOptionsFieldBuilder(); + internalGetProfilerOptionsFieldBuilder(); } } @java.lang.Override @@ -4555,7 +4931,7 @@ public Builder mergeFrom( break; case 10: { input.readMessage( - getProfilerOptionsFieldBuilder().getBuilder(), + internalGetProfilerOptionsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; @@ -4717,7 +5093,7 @@ public Builder clearProfilerOptions() { public org.tensorflow.proto.ProfilerOptions.ProfileOptions.Builder getProfilerOptionsBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getProfilerOptionsFieldBuilder().getBuilder(); + return internalGetProfilerOptionsFieldBuilder().getBuilder(); } /** *
@@ -4743,7 +5119,7 @@ public org.tensorflow.proto.ProfilerOptions.ProfileOptionsOrBuilder getProfilerO
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.ProfilerOptions.ProfileOptions, org.tensorflow.proto.ProfilerOptions.ProfileOptions.Builder, org.tensorflow.proto.ProfilerOptions.ProfileOptionsOrBuilder> 
-          getProfilerOptionsFieldBuilder() {
+          internalGetProfilerOptionsFieldBuilder() {
         if (profilerOptionsBuilder_ == null) {
           profilerOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.ProfilerOptions.ProfileOptions, org.tensorflow.proto.ProfilerOptions.ProfileOptions.Builder, org.tensorflow.proto.ProfilerOptions.ProfileOptionsOrBuilder>(
@@ -5129,7 +5505,7 @@ public org.tensorflow.proto.ProfilerOptions.RemoteProfilerSessionManagerOptions
   static {
     java.lang.String[] descriptorData = {
       "\n,tsl/profiler/protobuf/profiler_options" +
-      ".proto\022\ntensorflow\"\305\006\n\016ProfileOptions\022\017\n" +
+      ".proto\022\ntensorflow\"\364\006\n\016ProfileOptions\022\017\n" +
       "\007version\030\005 \001(\r\022:\n\013device_type\030\006 \001(\0162%.te" +
       "nsorflow.ProfileOptions.DeviceType\022\033\n\023in" +
       "clude_dataset_ops\030\001 \001(\010\022\031\n\021host_tracer_l" +
@@ -5141,22 +5517,23 @@ public org.tensorflow.proto.ProfilerOptions.RemoteProfilerSessionManagerOptions
       "flow.ProfileOptions.TraceOptions\022U\n\026adva" +
       "nced_configuration\030\014 \003(\01325.tensorflow.Pr" +
       "ofileOptions.AdvancedConfigurationEntry\022" +
-      "$\n\034raise_error_on_start_failure\030\r \001(\010\0320\n" +
-      "\014TraceOptions\022 \n\030host_traceme_filter_mas" +
-      "k\030\001 \001(\004\032c\n\023AdvancedConfigValue\022\026\n\014string" +
-      "_value\030\001 \001(\tH\000\022\024\n\nbool_value\030\002 \001(\010H\000\022\025\n\013" +
-      "int64_value\030\003 \001(\003H\000B\007\n\005value\032l\n\032Advanced" +
-      "ConfigurationEntry\022\013\n\003key\030\001 \001(\t\022=\n\005value" +
-      "\030\002 \001(\0132..tensorflow.ProfileOptions.Advan" +
-      "cedConfigValue:\0028\001\"N\n\nDeviceType\022\017\n\013UNSP" +
-      "ECIFIED\020\000\022\007\n\003CPU\020\001\022\007\n\003GPU\020\002\022\007\n\003TPU\020\003\022\024\n\020" +
-      "PLUGGABLE_DEVICE\020\004\"\320\001\n#RemoteProfilerSes" +
-      "sionManagerOptions\0224\n\020profiler_options\030\001" +
-      " \001(\0132\032.tensorflow.ProfileOptions\022\031\n\021serv" +
-      "ice_addresses\030\002 \003(\t\022%\n\035session_creation_" +
-      "timestamp_ns\030\003 \001(\004\022\037\n\027max_session_durati" +
-      "on_ms\030\004 \001(\004\022\020\n\010delay_ms\030\005 \001(\004B\026\n\024org.ten" +
-      "sorflow.protob\006proto3"
+      "$\n\034raise_error_on_start_failure\030\r \001(\010\022\022\n" +
+      "\nsession_id\030\016 \001(\t\022\031\n\021override_hostname\030\017" +
+      " \001(\t\0320\n\014TraceOptions\022 \n\030host_traceme_fil" +
+      "ter_mask\030\001 \001(\004\032c\n\023AdvancedConfigValue\022\026\n" +
+      "\014string_value\030\001 \001(\tH\000\022\024\n\nbool_value\030\002 \001(" +
+      "\010H\000\022\025\n\013int64_value\030\003 \001(\003H\000B\007\n\005value\032l\n\032A" +
+      "dvancedConfigurationEntry\022\013\n\003key\030\001 \001(\t\022=" +
+      "\n\005value\030\002 \001(\0132..tensorflow.ProfileOption" +
+      "s.AdvancedConfigValue:\0028\001\"N\n\nDeviceType\022" +
+      "\017\n\013UNSPECIFIED\020\000\022\007\n\003CPU\020\001\022\007\n\003GPU\020\002\022\007\n\003TP" +
+      "U\020\003\022\024\n\020PLUGGABLE_DEVICE\020\004\"\320\001\n#RemoteProf" +
+      "ilerSessionManagerOptions\0224\n\020profiler_op" +
+      "tions\030\001 \001(\0132\032.tensorflow.ProfileOptions\022" +
+      "\031\n\021service_addresses\030\002 \003(\t\022%\n\035session_cr" +
+      "eation_timestamp_ns\030\003 \001(\004\022\037\n\027max_session" +
+      "_duration_ms\030\004 \001(\004\022\020\n\010delay_ms\030\005 \001(\004B\026\n\024" +
+      "org.tensorflow.protob\006proto3"
     };
     descriptor = com.google.protobuf.Descriptors.FileDescriptor
       .internalBuildGeneratedFileFrom(descriptorData,
@@ -5167,7 +5544,7 @@ public org.tensorflow.proto.ProfilerOptions.RemoteProfilerSessionManagerOptions
     internal_static_tensorflow_ProfileOptions_fieldAccessorTable = new
       com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_tensorflow_ProfileOptions_descriptor,
-        new java.lang.String[] { "Version", "DeviceType", "IncludeDatasetOps", "HostTracerLevel", "DeviceTracerLevel", "PythonTracerLevel", "EnableHloProto", "StartTimestampNs", "DurationMs", "RepositoryPath", "TraceOptions", "AdvancedConfiguration", "RaiseErrorOnStartFailure", });
+        new java.lang.String[] { "Version", "DeviceType", "IncludeDatasetOps", "HostTracerLevel", "DeviceTracerLevel", "PythonTracerLevel", "EnableHloProto", "StartTimestampNs", "DurationMs", "RepositoryPath", "TraceOptions", "AdvancedConfiguration", "RaiseErrorOnStartFailure", "SessionId", "OverrideHostname", });
     internal_static_tensorflow_ProfileOptions_TraceOptions_descriptor =
       internal_static_tensorflow_ProfileOptions_descriptor.getNestedTypes().get(0);
     internal_static_tensorflow_ProfileOptions_TraceOptions_fieldAccessorTable = new
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/QueueRunnerDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/QueueRunnerDef.java
index 550c1c55a0b..ac9c8a22959 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/QueueRunnerDef.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/QueueRunnerDef.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/queue_runner.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.QueueRunnerDef}
  */
+@com.google.protobuf.Generated
 public final class QueueRunnerDef extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.QueueRunnerDef)
@@ -21,8 +22,8 @@ public final class QueueRunnerDef extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       QueueRunnerDef.class.getName());
   }
@@ -248,8 +249,9 @@ public java.lang.String getCancelOpName() {
 
   public static final int QUEUE_CLOSED_EXCEPTION_TYPES_FIELD_NUMBER = 5;
   @SuppressWarnings("serial")
-  private com.google.protobuf.Internal.IntList queueClosedExceptionTypes_;
-  private static final com.google.protobuf.Internal.IntListAdapter.IntConverter<
+  private com.google.protobuf.Internal.IntList queueClosedExceptionTypes_ =
+      emptyIntList();
+  private static final     com.google.protobuf.Internal.IntListAdapter.IntConverter<
       org.tensorflow.proto.error.Code> queueClosedExceptionTypes_converter_ =
           new com.google.protobuf.Internal.IntListAdapter.IntConverter<
               org.tensorflow.proto.error.Code>() {
@@ -591,7 +593,6 @@ public Builder clear() {
       closeOpName_ = "";
       cancelOpName_ = "";
       queueClosedExceptionTypes_ = emptyIntList();
-      bitField0_ = (bitField0_ & ~0x00000010);
       return this;
     }
 
@@ -618,20 +619,11 @@ public org.tensorflow.proto.QueueRunnerDef build() {
     @java.lang.Override
     public org.tensorflow.proto.QueueRunnerDef buildPartial() {
       org.tensorflow.proto.QueueRunnerDef result = new org.tensorflow.proto.QueueRunnerDef(this);
-      buildPartialRepeatedFields(result);
       if (bitField0_ != 0) { buildPartial0(result); }
       onBuilt();
       return result;
     }
 
-    private void buildPartialRepeatedFields(org.tensorflow.proto.QueueRunnerDef result) {
-      if (((bitField0_ & 0x00000010) != 0)) {
-        queueClosedExceptionTypes_.makeImmutable();
-        bitField0_ = (bitField0_ & ~0x00000010);
-      }
-      result.queueClosedExceptionTypes_ = queueClosedExceptionTypes_;
-    }
-
     private void buildPartial0(org.tensorflow.proto.QueueRunnerDef result) {
       int from_bitField0_ = bitField0_;
       if (((from_bitField0_ & 0x00000001) != 0)) {
@@ -647,6 +639,10 @@ private void buildPartial0(org.tensorflow.proto.QueueRunnerDef result) {
       if (((from_bitField0_ & 0x00000008) != 0)) {
         result.cancelOpName_ = cancelOpName_;
       }
+      if (((from_bitField0_ & 0x00000010) != 0)) {
+        queueClosedExceptionTypes_.makeImmutable();
+        result.queueClosedExceptionTypes_ = queueClosedExceptionTypes_;
+      }
     }
 
     @java.lang.Override
@@ -689,7 +685,8 @@ public Builder mergeFrom(org.tensorflow.proto.QueueRunnerDef other) {
       if (!other.queueClosedExceptionTypes_.isEmpty()) {
         if (queueClosedExceptionTypes_.isEmpty()) {
           queueClosedExceptionTypes_ = other.queueClosedExceptionTypes_;
-          bitField0_ = (bitField0_ & ~0x00000010);
+          queueClosedExceptionTypes_.makeImmutable();
+          bitField0_ |= 0x00000010;
         } else {
           ensureQueueClosedExceptionTypesIsMutable();
           queueClosedExceptionTypes_.addAll(other.queueClosedExceptionTypes_);
@@ -751,13 +748,12 @@ public Builder mergeFrom(
             } // case 40
             case 42: {
               int length = input.readRawVarint32();
-              int oldLimit = input.pushLimit(length);
-              while(input.getBytesUntilLimit() > 0) {
-                int tmpRaw = input.readEnum();
-                ensureQueueClosedExceptionTypesIsMutable();
-                queueClosedExceptionTypes_.addInt(tmpRaw);
+              int limit = input.pushLimit(length);
+              ensureQueueClosedExceptionTypesIsMutable();
+              while (input.getBytesUntilLimit() > 0) {
+                queueClosedExceptionTypes_.addInt(input.readEnum());
               }
-              input.popLimit(oldLimit);
+              input.popLimit(limit);
               break;
             } // case 42
             default: {
@@ -1200,13 +1196,12 @@ public Builder setCancelOpNameBytes(
       return this;
     }
 
-    private com.google.protobuf.Internal.IntList queueClosedExceptionTypes_ =
-      emptyIntList();
+    private com.google.protobuf.Internal.IntList queueClosedExceptionTypes_ = emptyIntList();
     private void ensureQueueClosedExceptionTypesIsMutable() {
-      if (!((bitField0_ & 0x00000010) != 0)) {
+      if (!queueClosedExceptionTypes_.isModifiable()) {
         queueClosedExceptionTypes_ = makeMutableCopy(queueClosedExceptionTypes_);
-        bitField0_ |= 0x00000010;
       }
+      bitField0_ |= 0x00000010;
     }
     /**
      * 
@@ -1259,9 +1254,7 @@ public org.tensorflow.proto.error.Code getQueueClosedExceptionTypes(int index) {
      */
     public Builder setQueueClosedExceptionTypes(
         int index, org.tensorflow.proto.error.Code value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       ensureQueueClosedExceptionTypesIsMutable();
       queueClosedExceptionTypes_.setInt(index, value.getNumber());
       onChanged();
@@ -1278,9 +1271,7 @@ public Builder setQueueClosedExceptionTypes(
      * @return This builder for chaining.
      */
     public Builder addQueueClosedExceptionTypes(org.tensorflow.proto.error.Code value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       ensureQueueClosedExceptionTypesIsMutable();
       queueClosedExceptionTypes_.addInt(value.getNumber());
       onChanged();
@@ -1331,7 +1322,8 @@ public Builder clearQueueClosedExceptionTypes() {
      */
     public java.util.List
     getQueueClosedExceptionTypesValueList() {
-      return java.util.Collections.unmodifiableList(queueClosedExceptionTypes_);
+      queueClosedExceptionTypes_.makeImmutable();
+      return queueClosedExceptionTypes_;
     }
     /**
      * 
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/QueueRunnerDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/QueueRunnerDefOrBuilder.java
index c4f232bf15d..b58a49f65aa 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/QueueRunnerDefOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/QueueRunnerDefOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/queue_runner.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface QueueRunnerDefOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.QueueRunnerDef)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/QueueRunnerProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/QueueRunnerProtos.java
index 23c75114991..ae3907806be 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/QueueRunnerProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/QueueRunnerProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/queue_runner.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class QueueRunnerProtos {
   private QueueRunnerProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       QueueRunnerProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ReaderBaseProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ReaderBaseProtos.java
index 07c85d130a3..d318baa070c 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ReaderBaseProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ReaderBaseProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/reader_base.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class ReaderBaseProtos {
   private ReaderBaseProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       ReaderBaseProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ReaderBaseState.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ReaderBaseState.java
index 4e619b9297c..09f993cd493 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ReaderBaseState.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ReaderBaseState.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/reader_base.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -13,6 +13,7 @@
  *
  * Protobuf type {@code tensorflow.ReaderBaseState}
  */
+@com.google.protobuf.Generated
 public final class ReaderBaseState extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.ReaderBaseState)
@@ -22,8 +23,8 @@ public final class ReaderBaseState extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       ReaderBaseState.class.getName());
   }
@@ -396,7 +397,7 @@ public Builder mergeFrom(org.tensorflow.proto.ReaderBaseState other) {
       if (other.getNumRecordsProduced() != 0L) {
         setNumRecordsProduced(other.getNumRecordsProduced());
       }
-      if (other.getCurrentWork() != com.google.protobuf.ByteString.EMPTY) {
+      if (!other.getCurrentWork().isEmpty()) {
         setCurrentWork(other.getCurrentWork());
       }
       this.mergeUnknownFields(other.getUnknownFields());
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ReaderBaseStateOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ReaderBaseStateOrBuilder.java
index e6b3261fb44..b597b1b081d 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ReaderBaseStateOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ReaderBaseStateOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/reader_base.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface ReaderBaseStateOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.ReaderBaseState)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RegisteredGradient.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RegisteredGradient.java
index 9131e5c26b6..a2f1e445f48 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RegisteredGradient.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RegisteredGradient.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/function.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -15,6 +15,7 @@
  *
  * Protobuf type {@code tensorflow.RegisteredGradient}
  */
+@com.google.protobuf.Generated
 public final class RegisteredGradient extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.RegisteredGradient)
@@ -24,8 +25,8 @@ public final class RegisteredGradient extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       RegisteredGradient.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RegisteredGradientOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RegisteredGradientOrBuilder.java
index 4ea34c7f055..23d1daa67c3 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RegisteredGradientOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RegisteredGradientOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/function.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface RegisteredGradientOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.RegisteredGradient)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RequestedExitCode.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RequestedExitCode.java
index f092bc9bf5a..1379877e05f 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RequestedExitCode.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RequestedExitCode.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/util/event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.RequestedExitCode}
  */
+@com.google.protobuf.Generated
 public final class RequestedExitCode extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.RequestedExitCode)
@@ -17,8 +18,8 @@ public final class RequestedExitCode extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       RequestedExitCode.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RequestedExitCodeOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RequestedExitCodeOrBuilder.java
index 787bd99ff65..d67e09fdbed 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RequestedExitCodeOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RequestedExitCodeOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/util/event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface RequestedExitCodeOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.RequestedExitCode)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ResourceHandle.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ResourceHandle.java
index e9469d731c9..bf9fae0049e 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ResourceHandle.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ResourceHandle.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/resource_handle.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class ResourceHandle {
   private ResourceHandle() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       ResourceHandle.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ResourceHandleProto.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ResourceHandleProto.java
index db1b56da824..3a36d30ad4e 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ResourceHandleProto.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ResourceHandleProto.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/resource_handle.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -14,6 +14,7 @@
  *
  * Protobuf type {@code tensorflow.ResourceHandleProto}
  */
+@com.google.protobuf.Generated
 public final class ResourceHandleProto extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.ResourceHandleProto)
@@ -23,8 +24,8 @@ public final class ResourceHandleProto extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       ResourceHandleProto.class.getName());
   }
@@ -119,8 +120,8 @@ public static final class DtypeAndShape extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         DtypeAndShape.class.getName());
     }
@@ -419,7 +420,7 @@ private Builder(
       private void maybeForceBuilderInitialization() {
         if (com.google.protobuf.GeneratedMessage
                 .alwaysUseFieldBuilders) {
-          getShapeFieldBuilder();
+          internalGetShapeFieldBuilder();
         }
       }
       @java.lang.Override
@@ -529,7 +530,7 @@ public Builder mergeFrom(
               } // case 8
               case 18: {
                 input.readMessage(
-                    getShapeFieldBuilder().getBuilder(),
+                    internalGetShapeFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000002;
                 break;
@@ -601,9 +602,7 @@ public org.tensorflow.proto.DataType getDtype() {
        * @return This builder for chaining.
        */
       public Builder setDtype(org.tensorflow.proto.DataType value) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
+        if (value == null) { throw new NullPointerException(); }
         bitField0_ |= 0x00000001;
         dtype_ = value.getNumber();
         onChanged();
@@ -743,7 +742,7 @@ public Builder clearShape() {
       public org.tensorflow.proto.TensorShapeProto.Builder getShapeBuilder() {
         bitField0_ |= 0x00000002;
         onChanged();
-        return getShapeFieldBuilder().getBuilder();
+        return internalGetShapeFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -769,7 +768,7 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> 
-          getShapeFieldBuilder() {
+          internalGetShapeFieldBuilder() {
         if (shapeBuilder_ == null) {
           shapeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder>(
@@ -1480,7 +1479,7 @@ public Builder mergeFrom(org.tensorflow.proto.ResourceHandleProto other) {
             bitField0_ = (bitField0_ & ~0x00000020);
             dtypesAndShapesBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getDtypesAndShapesFieldBuilder() : null;
+                 internalGetDtypesAndShapesFieldBuilder() : null;
           } else {
             dtypesAndShapesBuilder_.addAllMessages(other.dtypesAndShapes_);
           }
@@ -2219,7 +2218,7 @@ public Builder removeDtypesAndShapes(int index) {
      */
     public org.tensorflow.proto.ResourceHandleProto.DtypeAndShape.Builder getDtypesAndShapesBuilder(
         int index) {
-      return getDtypesAndShapesFieldBuilder().getBuilder(index);
+      return internalGetDtypesAndShapesFieldBuilder().getBuilder(index);
     }
     /**
      * 
@@ -2258,7 +2257,7 @@ public org.tensorflow.proto.ResourceHandleProto.DtypeAndShapeOrBuilder getDtypes
      * repeated .tensorflow.ResourceHandleProto.DtypeAndShape dtypes_and_shapes = 6;
      */
     public org.tensorflow.proto.ResourceHandleProto.DtypeAndShape.Builder addDtypesAndShapesBuilder() {
-      return getDtypesAndShapesFieldBuilder().addBuilder(
+      return internalGetDtypesAndShapesFieldBuilder().addBuilder(
           org.tensorflow.proto.ResourceHandleProto.DtypeAndShape.getDefaultInstance());
     }
     /**
@@ -2270,7 +2269,7 @@ public org.tensorflow.proto.ResourceHandleProto.DtypeAndShape.Builder addDtypesA
      */
     public org.tensorflow.proto.ResourceHandleProto.DtypeAndShape.Builder addDtypesAndShapesBuilder(
         int index) {
-      return getDtypesAndShapesFieldBuilder().addBuilder(
+      return internalGetDtypesAndShapesFieldBuilder().addBuilder(
           index, org.tensorflow.proto.ResourceHandleProto.DtypeAndShape.getDefaultInstance());
     }
     /**
@@ -2282,11 +2281,11 @@ public org.tensorflow.proto.ResourceHandleProto.DtypeAndShape.Builder addDtypesA
      */
     public java.util.List 
          getDtypesAndShapesBuilderList() {
-      return getDtypesAndShapesFieldBuilder().getBuilderList();
+      return internalGetDtypesAndShapesFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.ResourceHandleProto.DtypeAndShape, org.tensorflow.proto.ResourceHandleProto.DtypeAndShape.Builder, org.tensorflow.proto.ResourceHandleProto.DtypeAndShapeOrBuilder> 
-        getDtypesAndShapesFieldBuilder() {
+        internalGetDtypesAndShapesFieldBuilder() {
       if (dtypesAndShapesBuilder_ == null) {
         dtypesAndShapesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.ResourceHandleProto.DtypeAndShape, org.tensorflow.proto.ResourceHandleProto.DtypeAndShape.Builder, org.tensorflow.proto.ResourceHandleProto.DtypeAndShapeOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ResourceHandleProtoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ResourceHandleProtoOrBuilder.java
index 3add868cb14..993258a370a 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ResourceHandleProtoOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ResourceHandleProtoOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/resource_handle.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface ResourceHandleProtoOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.ResourceHandleProto)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RewriterConfig.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RewriterConfig.java
index f5a2645ffb1..b6491bc0edd 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RewriterConfig.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RewriterConfig.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/rewriter_config.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -13,6 +13,7 @@
  *
  * Protobuf type {@code tensorflow.RewriterConfig}
  */
+@com.google.protobuf.Generated
 public final class RewriterConfig extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.RewriterConfig)
@@ -22,8 +23,8 @@ public final class RewriterConfig extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       RewriterConfig.class.getName());
   }
@@ -126,8 +127,8 @@ public enum Toggle
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         Toggle.class.getName());
     }
@@ -232,7 +233,7 @@ public Toggle findValueByNumber(int number) {
         getDescriptorForType() {
       return getDescriptor();
     }
-    public static final com.google.protobuf.Descriptors.EnumDescriptor
+    public static com.google.protobuf.Descriptors.EnumDescriptor
         getDescriptor() {
       return org.tensorflow.proto.RewriterConfig.getDescriptor().getEnumTypes().get(0);
     }
@@ -288,8 +289,8 @@ public enum CpuLayout
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         CpuLayout.class.getName());
     }
@@ -362,7 +363,7 @@ public CpuLayout findValueByNumber(int number) {
         getDescriptorForType() {
       return getDescriptor();
     }
-    public static final com.google.protobuf.Descriptors.EnumDescriptor
+    public static com.google.protobuf.Descriptors.EnumDescriptor
         getDescriptor() {
       return org.tensorflow.proto.RewriterConfig.getDescriptor().getEnumTypes().get(1);
     }
@@ -419,8 +420,8 @@ public enum NumIterationsType
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         NumIterationsType.class.getName());
     }
@@ -493,7 +494,7 @@ public NumIterationsType findValueByNumber(int number) {
         getDescriptorForType() {
       return getDescriptor();
     }
-    public static final com.google.protobuf.Descriptors.EnumDescriptor
+    public static com.google.protobuf.Descriptors.EnumDescriptor
         getDescriptor() {
       return org.tensorflow.proto.RewriterConfig.getDescriptor().getEnumTypes().get(2);
     }
@@ -592,8 +593,8 @@ public enum MemOptType
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         MemOptType.class.getName());
     }
@@ -717,7 +718,7 @@ public MemOptType findValueByNumber(int number) {
         getDescriptorForType() {
       return getDescriptor();
     }
-    public static final com.google.protobuf.Descriptors.EnumDescriptor
+    public static com.google.protobuf.Descriptors.EnumDescriptor
         getDescriptor() {
       return org.tensorflow.proto.RewriterConfig.getDescriptor().getEnumTypes().get(3);
     }
@@ -811,8 +812,8 @@ public static final class CustomGraphOptimizer extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         CustomGraphOptimizer.class.getName());
     }
@@ -3331,11 +3332,11 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getAutoParallelFieldBuilder();
-        getScopedAllocatorOptsFieldBuilder();
-        getCustomOptimizersFieldBuilder();
-        getInterOptimizerVerifierConfigFieldBuilder();
-        getPostOptimizationVerifierConfigFieldBuilder();
+        internalGetAutoParallelFieldBuilder();
+        internalGetScopedAllocatorOptsFieldBuilder();
+        internalGetCustomOptimizersFieldBuilder();
+        internalGetInterOptimizerVerifierConfigFieldBuilder();
+        internalGetPostOptimizationVerifierConfigFieldBuilder();
       }
     }
     @java.lang.Override
@@ -3724,7 +3725,7 @@ public Builder mergeFrom(org.tensorflow.proto.RewriterConfig other) {
             bitField1_ = (bitField1_ & ~0x00000004);
             customOptimizersBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getCustomOptimizersFieldBuilder() : null;
+                 internalGetCustomOptimizersFieldBuilder() : null;
           } else {
             customOptimizersBuilder_.addAllMessages(other.customOptimizers_);
           }
@@ -3784,7 +3785,7 @@ public Builder mergeFrom(
             } // case 32
             case 42: {
               input.readMessage(
-                  getAutoParallelFieldBuilder().getBuilder(),
+                  internalGetAutoParallelFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x40000000;
               break;
@@ -3841,7 +3842,7 @@ public Builder mergeFrom(
             } // case 120
             case 130: {
               input.readMessage(
-                  getScopedAllocatorOptsFieldBuilder().getBuilder(),
+                  internalGetScopedAllocatorOptsFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField1_ |= 0x00000001;
               break;
@@ -3952,14 +3953,14 @@ public Builder mergeFrom(
             } // case 1602
             case 2402: {
               input.readMessage(
-                  getInterOptimizerVerifierConfigFieldBuilder().getBuilder(),
+                  internalGetInterOptimizerVerifierConfigFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField1_ |= 0x00000008;
               break;
             } // case 2402
             case 2410: {
               input.readMessage(
-                  getPostOptimizationVerifierConfigFieldBuilder().getBuilder(),
+                  internalGetPostOptimizationVerifierConfigFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField1_ |= 0x00000010;
               break;
@@ -4032,9 +4033,7 @@ public org.tensorflow.proto.RewriterConfig.CpuLayout getCpuLayoutConversion() {
      * @return This builder for chaining.
      */
     public Builder setCpuLayoutConversion(org.tensorflow.proto.RewriterConfig.CpuLayout value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000001;
       cpuLayoutConversion_ = value.getNumber();
       onChanged();
@@ -4109,9 +4108,7 @@ public org.tensorflow.proto.RewriterConfig.Toggle getLayoutOptimizer() {
      * @return This builder for chaining.
      */
     public Builder setLayoutOptimizer(org.tensorflow.proto.RewriterConfig.Toggle value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000002;
       layoutOptimizer_ = value.getNumber();
       onChanged();
@@ -4191,9 +4188,7 @@ public org.tensorflow.proto.RewriterConfig.Toggle getConstantFolding() {
      * @return This builder for chaining.
      */
     public Builder setConstantFolding(org.tensorflow.proto.RewriterConfig.Toggle value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000004;
       constantFolding_ = value.getNumber();
       onChanged();
@@ -4270,9 +4265,7 @@ public org.tensorflow.proto.RewriterConfig.Toggle getShapeOptimization() {
      * @return This builder for chaining.
      */
     public Builder setShapeOptimization(org.tensorflow.proto.RewriterConfig.Toggle value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000008;
       shapeOptimization_ = value.getNumber();
       onChanged();
@@ -4348,9 +4341,7 @@ public org.tensorflow.proto.RewriterConfig.Toggle getRemapping() {
      * @return This builder for chaining.
      */
     public Builder setRemapping(org.tensorflow.proto.RewriterConfig.Toggle value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000010;
       remapping_ = value.getNumber();
       onChanged();
@@ -4426,9 +4417,7 @@ public org.tensorflow.proto.RewriterConfig.Toggle getCommonSubgraphElimination()
      * @return This builder for chaining.
      */
     public Builder setCommonSubgraphElimination(org.tensorflow.proto.RewriterConfig.Toggle value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000020;
       commonSubgraphElimination_ = value.getNumber();
       onChanged();
@@ -4504,9 +4493,7 @@ public org.tensorflow.proto.RewriterConfig.Toggle getArithmeticOptimization() {
      * @return This builder for chaining.
      */
     public Builder setArithmeticOptimization(org.tensorflow.proto.RewriterConfig.Toggle value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000040;
       arithmeticOptimization_ = value.getNumber();
       onChanged();
@@ -4582,9 +4569,7 @@ public org.tensorflow.proto.RewriterConfig.Toggle getDependencyOptimization() {
      * @return This builder for chaining.
      */
     public Builder setDependencyOptimization(org.tensorflow.proto.RewriterConfig.Toggle value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000080;
       dependencyOptimization_ = value.getNumber();
       onChanged();
@@ -4656,9 +4641,7 @@ public org.tensorflow.proto.RewriterConfig.Toggle getLoopOptimization() {
      * @return This builder for chaining.
      */
     public Builder setLoopOptimization(org.tensorflow.proto.RewriterConfig.Toggle value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000100;
       loopOptimization_ = value.getNumber();
       onChanged();
@@ -4729,9 +4712,7 @@ public org.tensorflow.proto.RewriterConfig.Toggle getFunctionOptimization() {
      * @return This builder for chaining.
      */
     public Builder setFunctionOptimization(org.tensorflow.proto.RewriterConfig.Toggle value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000200;
       functionOptimization_ = value.getNumber();
       onChanged();
@@ -4802,9 +4783,7 @@ public org.tensorflow.proto.RewriterConfig.Toggle getDebugStripper() {
      * @return This builder for chaining.
      */
     public Builder setDebugStripper(org.tensorflow.proto.RewriterConfig.Toggle value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000400;
       debugStripper_ = value.getNumber();
       onChanged();
@@ -4923,9 +4902,7 @@ public org.tensorflow.proto.RewriterConfig.Toggle getScopedAllocatorOptimization
      * @return This builder for chaining.
      */
     public Builder setScopedAllocatorOptimization(org.tensorflow.proto.RewriterConfig.Toggle value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00001000;
       scopedAllocatorOptimization_ = value.getNumber();
       onChanged();
@@ -4997,9 +4974,7 @@ public org.tensorflow.proto.RewriterConfig.Toggle getPinToHostOptimization() {
      * @return This builder for chaining.
      */
     public Builder setPinToHostOptimization(org.tensorflow.proto.RewriterConfig.Toggle value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00002000;
       pinToHostOptimization_ = value.getNumber();
       onChanged();
@@ -5074,9 +5049,7 @@ public org.tensorflow.proto.RewriterConfig.Toggle getImplementationSelector() {
      * @return This builder for chaining.
      */
     public Builder setImplementationSelector(org.tensorflow.proto.RewriterConfig.Toggle value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00004000;
       implementationSelector_ = value.getNumber();
       onChanged();
@@ -5160,9 +5133,7 @@ public org.tensorflow.proto.RewriterConfig.Toggle getAutoMixedPrecision() {
      * @return This builder for chaining.
      */
     public Builder setAutoMixedPrecision(org.tensorflow.proto.RewriterConfig.Toggle value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00008000;
       autoMixedPrecision_ = value.getNumber();
       onChanged();
@@ -5252,9 +5223,7 @@ public org.tensorflow.proto.RewriterConfig.Toggle getAutoMixedPrecisionMkl() {
      * @return This builder for chaining.
      */
     public Builder setAutoMixedPrecisionMkl(org.tensorflow.proto.RewriterConfig.Toggle value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00010000;
       autoMixedPrecisionMkl_ = value.getNumber();
       onChanged();
@@ -5341,9 +5310,7 @@ public org.tensorflow.proto.RewriterConfig.Toggle getAutoMixedPrecisionOnednnBfl
      * @return This builder for chaining.
      */
     public Builder setAutoMixedPrecisionOnednnBfloat16(org.tensorflow.proto.RewriterConfig.Toggle value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00020000;
       autoMixedPrecisionOnednnBfloat16_ = value.getNumber();
       onChanged();
@@ -5433,9 +5400,7 @@ public org.tensorflow.proto.RewriterConfig.Toggle getAutoMixedPrecisionCpu() {
      * @return This builder for chaining.
      */
     public Builder setAutoMixedPrecisionCpu(org.tensorflow.proto.RewriterConfig.Toggle value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00040000;
       autoMixedPrecisionCpu_ = value.getNumber();
       onChanged();
@@ -5598,9 +5563,7 @@ public org.tensorflow.proto.RewriterConfig.Toggle getUsePluginOptimizers() {
      * @return This builder for chaining.
      */
     public Builder setUsePluginOptimizers(org.tensorflow.proto.RewriterConfig.Toggle value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00200000;
       usePluginOptimizers_ = value.getNumber();
       onChanged();
@@ -5671,9 +5634,7 @@ public org.tensorflow.proto.RewriterConfig.Toggle getExperimentalConditionalCode
      * @return This builder for chaining.
      */
     public Builder setExperimentalConditionalCodeMotion(org.tensorflow.proto.RewriterConfig.Toggle value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00400000;
       experimentalConditionalCodeMotion_ = value.getNumber();
       onChanged();
@@ -5748,9 +5709,7 @@ public org.tensorflow.proto.RewriterConfig.NumIterationsType getMetaOptimizerIte
      * @return This builder for chaining.
      */
     public Builder setMetaOptimizerIterations(org.tensorflow.proto.RewriterConfig.NumIterationsType value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00800000;
       metaOptimizerIterations_ = value.getNumber();
       onChanged();
@@ -5989,9 +5948,7 @@ public org.tensorflow.proto.RewriterConfig.MemOptType getMemoryOptimization() {
      * @return This builder for chaining.
      */
     public Builder setMemoryOptimization(org.tensorflow.proto.RewriterConfig.MemOptType value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x08000000;
       memoryOptimization_ = value.getNumber();
       onChanged();
@@ -6317,7 +6274,7 @@ public Builder clearAutoParallel() {
     public org.tensorflow.proto.AutoParallelOptions.Builder getAutoParallelBuilder() {
       bitField0_ |= 0x40000000;
       onChanged();
-      return getAutoParallelFieldBuilder().getBuilder();
+      return internalGetAutoParallelFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -6345,7 +6302,7 @@ public org.tensorflow.proto.AutoParallelOptionsOrBuilder getAutoParallelOrBuilde
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.AutoParallelOptions, org.tensorflow.proto.AutoParallelOptions.Builder, org.tensorflow.proto.AutoParallelOptionsOrBuilder> 
-        getAutoParallelFieldBuilder() {
+        internalGetAutoParallelFieldBuilder() {
       if (autoParallelBuilder_ == null) {
         autoParallelBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.AutoParallelOptions, org.tensorflow.proto.AutoParallelOptions.Builder, org.tensorflow.proto.AutoParallelOptionsOrBuilder>(
@@ -6498,7 +6455,7 @@ public Builder clearScopedAllocatorOpts() {
     public org.tensorflow.proto.ScopedAllocatorOptions.Builder getScopedAllocatorOptsBuilder() {
       bitField1_ |= 0x00000001;
       onChanged();
-      return getScopedAllocatorOptsFieldBuilder().getBuilder();
+      return internalGetScopedAllocatorOptsFieldBuilder().getBuilder();
     }
     /**
      * .tensorflow.ScopedAllocatorOptions scoped_allocator_opts = 16;
@@ -6516,7 +6473,7 @@ public org.tensorflow.proto.ScopedAllocatorOptionsOrBuilder getScopedAllocatorOp
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.ScopedAllocatorOptions, org.tensorflow.proto.ScopedAllocatorOptions.Builder, org.tensorflow.proto.ScopedAllocatorOptionsOrBuilder> 
-        getScopedAllocatorOptsFieldBuilder() {
+        internalGetScopedAllocatorOptsFieldBuilder() {
       if (scopedAllocatorOptsBuilder_ == null) {
         scopedAllocatorOptsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.ScopedAllocatorOptions, org.tensorflow.proto.ScopedAllocatorOptions.Builder, org.tensorflow.proto.ScopedAllocatorOptionsOrBuilder>(
@@ -7006,7 +6963,7 @@ public Builder removeCustomOptimizers(int index) {
      */
     public org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer.Builder getCustomOptimizersBuilder(
         int index) {
-      return getCustomOptimizersFieldBuilder().getBuilder(index);
+      return internalGetCustomOptimizersFieldBuilder().getBuilder(index);
     }
     /**
      * 
@@ -7045,7 +7002,7 @@ public org.tensorflow.proto.RewriterConfig.CustomGraphOptimizerOrBuilder getCust
      * repeated .tensorflow.RewriterConfig.CustomGraphOptimizer custom_optimizers = 200;
      */
     public org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer.Builder addCustomOptimizersBuilder() {
-      return getCustomOptimizersFieldBuilder().addBuilder(
+      return internalGetCustomOptimizersFieldBuilder().addBuilder(
           org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer.getDefaultInstance());
     }
     /**
@@ -7057,7 +7014,7 @@ public org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer.Builder addCusto
      */
     public org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer.Builder addCustomOptimizersBuilder(
         int index) {
-      return getCustomOptimizersFieldBuilder().addBuilder(
+      return internalGetCustomOptimizersFieldBuilder().addBuilder(
           index, org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer.getDefaultInstance());
     }
     /**
@@ -7069,11 +7026,11 @@ public org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer.Builder addCusto
      */
     public java.util.List 
          getCustomOptimizersBuilderList() {
-      return getCustomOptimizersFieldBuilder().getBuilderList();
+      return internalGetCustomOptimizersFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer, org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer.Builder, org.tensorflow.proto.RewriterConfig.CustomGraphOptimizerOrBuilder> 
-        getCustomOptimizersFieldBuilder() {
+        internalGetCustomOptimizersFieldBuilder() {
       if (customOptimizersBuilder_ == null) {
         customOptimizersBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer, org.tensorflow.proto.RewriterConfig.CustomGraphOptimizer.Builder, org.tensorflow.proto.RewriterConfig.CustomGraphOptimizerOrBuilder>(
@@ -7205,7 +7162,7 @@ public Builder clearInterOptimizerVerifierConfig() {
     public org.tensorflow.proto.VerifierConfig.Builder getInterOptimizerVerifierConfigBuilder() {
       bitField1_ |= 0x00000008;
       onChanged();
-      return getInterOptimizerVerifierConfigFieldBuilder().getBuilder();
+      return internalGetInterOptimizerVerifierConfigFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -7231,7 +7188,7 @@ public org.tensorflow.proto.VerifierConfigOrBuilder getInterOptimizerVerifierCon
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.VerifierConfig, org.tensorflow.proto.VerifierConfig.Builder, org.tensorflow.proto.VerifierConfigOrBuilder> 
-        getInterOptimizerVerifierConfigFieldBuilder() {
+        internalGetInterOptimizerVerifierConfigFieldBuilder() {
       if (interOptimizerVerifierConfigBuilder_ == null) {
         interOptimizerVerifierConfigBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.VerifierConfig, org.tensorflow.proto.VerifierConfig.Builder, org.tensorflow.proto.VerifierConfigOrBuilder>(
@@ -7369,7 +7326,7 @@ public Builder clearPostOptimizationVerifierConfig() {
     public org.tensorflow.proto.VerifierConfig.Builder getPostOptimizationVerifierConfigBuilder() {
       bitField1_ |= 0x00000010;
       onChanged();
-      return getPostOptimizationVerifierConfigFieldBuilder().getBuilder();
+      return internalGetPostOptimizationVerifierConfigFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -7397,7 +7354,7 @@ public org.tensorflow.proto.VerifierConfigOrBuilder getPostOptimizationVerifierC
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.VerifierConfig, org.tensorflow.proto.VerifierConfig.Builder, org.tensorflow.proto.VerifierConfigOrBuilder> 
-        getPostOptimizationVerifierConfigFieldBuilder() {
+        internalGetPostOptimizationVerifierConfigFieldBuilder() {
       if (postOptimizationVerifierConfigBuilder_ == null) {
         postOptimizationVerifierConfigBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.VerifierConfig, org.tensorflow.proto.VerifierConfig.Builder, org.tensorflow.proto.VerifierConfigOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RewriterConfigOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RewriterConfigOrBuilder.java
index b7e13584dda..340eebac55a 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RewriterConfigOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RewriterConfigOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/rewriter_config.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface RewriterConfigOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.RewriterConfig)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RewriterConfigProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RewriterConfigProtos.java
index d445dbfc551..c84d98e1201 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RewriterConfigProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RewriterConfigProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/rewriter_config.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class RewriterConfigProtos {
   private RewriterConfigProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       RewriterConfigProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RpcOptions.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RpcOptions.java
index 9dec7784f93..b314d4638ab 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RpcOptions.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RpcOptions.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/rpc_options.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class RpcOptions {
   private RpcOptions() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       RpcOptions.class.getName());
   }
@@ -130,8 +131,8 @@ public static final class RPCOptions extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         RPCOptions.class.getName());
     }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunConfiguration.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunConfiguration.java
index 801a0e56dd3..4cfc4883d11 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunConfiguration.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunConfiguration.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/test_log.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.RunConfiguration}
  */
+@com.google.protobuf.Generated
 public final class RunConfiguration extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.RunConfiguration)
@@ -21,8 +22,8 @@ public final class RunConfiguration extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       RunConfiguration.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunConfigurationOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunConfigurationOrBuilder.java
index 1183f95dccd..904df62a1f8 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunConfigurationOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunConfigurationOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/test_log.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface RunConfigurationOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.RunConfiguration)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunMetadata.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunMetadata.java
index 6fca6234f49..66e3a511947 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunMetadata.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunMetadata.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/config.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.RunMetadata}
  */
+@com.google.protobuf.Generated
 public final class RunMetadata extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.RunMetadata)
@@ -21,8 +22,8 @@ public final class RunMetadata extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       RunMetadata.class.getName());
   }
@@ -138,8 +139,8 @@ public static final class FunctionGraphs extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         FunctionGraphs.class.getName());
     }
@@ -502,9 +503,9 @@ private Builder(
       private void maybeForceBuilderInitialization() {
         if (com.google.protobuf.GeneratedMessage
                 .alwaysUseFieldBuilders) {
-          getPartitionGraphsFieldBuilder();
-          getPreOptimizationGraphFieldBuilder();
-          getPostOptimizationGraphFieldBuilder();
+          internalGetPartitionGraphsFieldBuilder();
+          internalGetPreOptimizationGraphFieldBuilder();
+          internalGetPostOptimizationGraphFieldBuilder();
         }
       }
       @java.lang.Override
@@ -622,7 +623,7 @@ public Builder mergeFrom(org.tensorflow.proto.RunMetadata.FunctionGraphs other)
               bitField0_ = (bitField0_ & ~0x00000001);
               partitionGraphsBuilder_ = 
                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                   getPartitionGraphsFieldBuilder() : null;
+                   internalGetPartitionGraphsFieldBuilder() : null;
             } else {
               partitionGraphsBuilder_.addAllMessages(other.partitionGraphs_);
             }
@@ -675,14 +676,14 @@ public Builder mergeFrom(
               } // case 10
               case 18: {
                 input.readMessage(
-                    getPreOptimizationGraphFieldBuilder().getBuilder(),
+                    internalGetPreOptimizationGraphFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000002;
                 break;
               } // case 18
               case 26: {
                 input.readMessage(
-                    getPostOptimizationGraphFieldBuilder().getBuilder(),
+                    internalGetPostOptimizationGraphFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000004;
                 break;
@@ -936,7 +937,7 @@ public Builder removePartitionGraphs(int index) {
        */
       public org.tensorflow.proto.GraphDef.Builder getPartitionGraphsBuilder(
           int index) {
-        return getPartitionGraphsFieldBuilder().getBuilder(index);
+        return internalGetPartitionGraphsFieldBuilder().getBuilder(index);
       }
       /**
        * 
@@ -975,7 +976,7 @@ public org.tensorflow.proto.GraphDefOrBuilder getPartitionGraphsOrBuilder(
        * repeated .tensorflow.GraphDef partition_graphs = 1;
        */
       public org.tensorflow.proto.GraphDef.Builder addPartitionGraphsBuilder() {
-        return getPartitionGraphsFieldBuilder().addBuilder(
+        return internalGetPartitionGraphsFieldBuilder().addBuilder(
             org.tensorflow.proto.GraphDef.getDefaultInstance());
       }
       /**
@@ -987,7 +988,7 @@ public org.tensorflow.proto.GraphDef.Builder addPartitionGraphsBuilder() {
        */
       public org.tensorflow.proto.GraphDef.Builder addPartitionGraphsBuilder(
           int index) {
-        return getPartitionGraphsFieldBuilder().addBuilder(
+        return internalGetPartitionGraphsFieldBuilder().addBuilder(
             index, org.tensorflow.proto.GraphDef.getDefaultInstance());
       }
       /**
@@ -999,11 +1000,11 @@ public org.tensorflow.proto.GraphDef.Builder addPartitionGraphsBuilder(
        */
       public java.util.List 
            getPartitionGraphsBuilderList() {
-        return getPartitionGraphsFieldBuilder().getBuilderList();
+        return internalGetPartitionGraphsFieldBuilder().getBuilderList();
       }
       private com.google.protobuf.RepeatedFieldBuilder<
           org.tensorflow.proto.GraphDef, org.tensorflow.proto.GraphDef.Builder, org.tensorflow.proto.GraphDefOrBuilder> 
-          getPartitionGraphsFieldBuilder() {
+          internalGetPartitionGraphsFieldBuilder() {
         if (partitionGraphsBuilder_ == null) {
           partitionGraphsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.GraphDef, org.tensorflow.proto.GraphDef.Builder, org.tensorflow.proto.GraphDefOrBuilder>(
@@ -1107,7 +1108,7 @@ public Builder clearPreOptimizationGraph() {
       public org.tensorflow.proto.GraphDef.Builder getPreOptimizationGraphBuilder() {
         bitField0_ |= 0x00000002;
         onChanged();
-        return getPreOptimizationGraphFieldBuilder().getBuilder();
+        return internalGetPreOptimizationGraphFieldBuilder().getBuilder();
       }
       /**
        * .tensorflow.GraphDef pre_optimization_graph = 2;
@@ -1125,7 +1126,7 @@ public org.tensorflow.proto.GraphDefOrBuilder getPreOptimizationGraphOrBuilder()
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.GraphDef, org.tensorflow.proto.GraphDef.Builder, org.tensorflow.proto.GraphDefOrBuilder> 
-          getPreOptimizationGraphFieldBuilder() {
+          internalGetPreOptimizationGraphFieldBuilder() {
         if (preOptimizationGraphBuilder_ == null) {
           preOptimizationGraphBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.GraphDef, org.tensorflow.proto.GraphDef.Builder, org.tensorflow.proto.GraphDefOrBuilder>(
@@ -1228,7 +1229,7 @@ public Builder clearPostOptimizationGraph() {
       public org.tensorflow.proto.GraphDef.Builder getPostOptimizationGraphBuilder() {
         bitField0_ |= 0x00000004;
         onChanged();
-        return getPostOptimizationGraphFieldBuilder().getBuilder();
+        return internalGetPostOptimizationGraphFieldBuilder().getBuilder();
       }
       /**
        * .tensorflow.GraphDef post_optimization_graph = 3;
@@ -1246,7 +1247,7 @@ public org.tensorflow.proto.GraphDefOrBuilder getPostOptimizationGraphOrBuilder(
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.GraphDef, org.tensorflow.proto.GraphDef.Builder, org.tensorflow.proto.GraphDefOrBuilder> 
-          getPostOptimizationGraphFieldBuilder() {
+          internalGetPostOptimizationGraphFieldBuilder() {
         if (postOptimizationGraphBuilder_ == null) {
           postOptimizationGraphBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.GraphDef, org.tensorflow.proto.GraphDef.Builder, org.tensorflow.proto.GraphDefOrBuilder>(
@@ -1854,11 +1855,11 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getStepStatsFieldBuilder();
-        getCostGraphFieldBuilder();
-        getPartitionGraphsFieldBuilder();
-        getFunctionGraphsFieldBuilder();
-        getSessionMetadataFieldBuilder();
+        internalGetStepStatsFieldBuilder();
+        internalGetCostGraphFieldBuilder();
+        internalGetPartitionGraphsFieldBuilder();
+        internalGetFunctionGraphsFieldBuilder();
+        internalGetSessionMetadataFieldBuilder();
       }
     }
     @java.lang.Override
@@ -2009,7 +2010,7 @@ public Builder mergeFrom(org.tensorflow.proto.RunMetadata other) {
             bitField0_ = (bitField0_ & ~0x00000004);
             partitionGraphsBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getPartitionGraphsFieldBuilder() : null;
+                 internalGetPartitionGraphsFieldBuilder() : null;
           } else {
             partitionGraphsBuilder_.addAllMessages(other.partitionGraphs_);
           }
@@ -2035,7 +2036,7 @@ public Builder mergeFrom(org.tensorflow.proto.RunMetadata other) {
             bitField0_ = (bitField0_ & ~0x00000008);
             functionGraphsBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getFunctionGraphsFieldBuilder() : null;
+                 internalGetFunctionGraphsFieldBuilder() : null;
           } else {
             functionGraphsBuilder_.addAllMessages(other.functionGraphs_);
           }
@@ -2072,14 +2073,14 @@ public Builder mergeFrom(
               break;
             case 10: {
               input.readMessage(
-                  getStepStatsFieldBuilder().getBuilder(),
+                  internalGetStepStatsFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000001;
               break;
             } // case 10
             case 18: {
               input.readMessage(
-                  getCostGraphFieldBuilder().getBuilder(),
+                  internalGetCostGraphFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000002;
               break;
@@ -2112,7 +2113,7 @@ public Builder mergeFrom(
             } // case 34
             case 42: {
               input.readMessage(
-                  getSessionMetadataFieldBuilder().getBuilder(),
+                  internalGetSessionMetadataFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000010;
               break;
@@ -2267,7 +2268,7 @@ public Builder clearStepStats() {
     public org.tensorflow.proto.StepStats.Builder getStepStatsBuilder() {
       bitField0_ |= 0x00000001;
       onChanged();
-      return getStepStatsFieldBuilder().getBuilder();
+      return internalGetStepStatsFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -2297,7 +2298,7 @@ public org.tensorflow.proto.StepStatsOrBuilder getStepStatsOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.StepStats, org.tensorflow.proto.StepStats.Builder, org.tensorflow.proto.StepStatsOrBuilder> 
-        getStepStatsFieldBuilder() {
+        internalGetStepStatsFieldBuilder() {
       if (stepStatsBuilder_ == null) {
         stepStatsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.StepStats, org.tensorflow.proto.StepStats.Builder, org.tensorflow.proto.StepStatsOrBuilder>(
@@ -2428,7 +2429,7 @@ public Builder clearCostGraph() {
     public org.tensorflow.proto.CostGraphDef.Builder getCostGraphBuilder() {
       bitField0_ |= 0x00000002;
       onChanged();
-      return getCostGraphFieldBuilder().getBuilder();
+      return internalGetCostGraphFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -2454,7 +2455,7 @@ public org.tensorflow.proto.CostGraphDefOrBuilder getCostGraphOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.CostGraphDef, org.tensorflow.proto.CostGraphDef.Builder, org.tensorflow.proto.CostGraphDefOrBuilder> 
-        getCostGraphFieldBuilder() {
+        internalGetCostGraphFieldBuilder() {
       if (costGraphBuilder_ == null) {
         costGraphBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.CostGraphDef, org.tensorflow.proto.CostGraphDef.Builder, org.tensorflow.proto.CostGraphDefOrBuilder>(
@@ -2698,7 +2699,7 @@ public Builder removePartitionGraphs(int index) {
      */
     public org.tensorflow.proto.GraphDef.Builder getPartitionGraphsBuilder(
         int index) {
-      return getPartitionGraphsFieldBuilder().getBuilder(index);
+      return internalGetPartitionGraphsFieldBuilder().getBuilder(index);
     }
     /**
      * 
@@ -2737,7 +2738,7 @@ public org.tensorflow.proto.GraphDefOrBuilder getPartitionGraphsOrBuilder(
      * repeated .tensorflow.GraphDef partition_graphs = 3;
      */
     public org.tensorflow.proto.GraphDef.Builder addPartitionGraphsBuilder() {
-      return getPartitionGraphsFieldBuilder().addBuilder(
+      return internalGetPartitionGraphsFieldBuilder().addBuilder(
           org.tensorflow.proto.GraphDef.getDefaultInstance());
     }
     /**
@@ -2749,7 +2750,7 @@ public org.tensorflow.proto.GraphDef.Builder addPartitionGraphsBuilder() {
      */
     public org.tensorflow.proto.GraphDef.Builder addPartitionGraphsBuilder(
         int index) {
-      return getPartitionGraphsFieldBuilder().addBuilder(
+      return internalGetPartitionGraphsFieldBuilder().addBuilder(
           index, org.tensorflow.proto.GraphDef.getDefaultInstance());
     }
     /**
@@ -2761,11 +2762,11 @@ public org.tensorflow.proto.GraphDef.Builder addPartitionGraphsBuilder(
      */
     public java.util.List 
          getPartitionGraphsBuilderList() {
-      return getPartitionGraphsFieldBuilder().getBuilderList();
+      return internalGetPartitionGraphsFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.GraphDef, org.tensorflow.proto.GraphDef.Builder, org.tensorflow.proto.GraphDefOrBuilder> 
-        getPartitionGraphsFieldBuilder() {
+        internalGetPartitionGraphsFieldBuilder() {
       if (partitionGraphsBuilder_ == null) {
         partitionGraphsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.GraphDef, org.tensorflow.proto.GraphDef.Builder, org.tensorflow.proto.GraphDefOrBuilder>(
@@ -3127,7 +3128,7 @@ public Builder removeFunctionGraphs(int index) {
      */
     public org.tensorflow.proto.RunMetadata.FunctionGraphs.Builder getFunctionGraphsBuilder(
         int index) {
-      return getFunctionGraphsFieldBuilder().getBuilder(index);
+      return internalGetFunctionGraphsFieldBuilder().getBuilder(index);
     }
     /**
      * 
@@ -3193,7 +3194,7 @@ public org.tensorflow.proto.RunMetadata.FunctionGraphsOrBuilder getFunctionGraph
      * repeated .tensorflow.RunMetadata.FunctionGraphs function_graphs = 4;
      */
     public org.tensorflow.proto.RunMetadata.FunctionGraphs.Builder addFunctionGraphsBuilder() {
-      return getFunctionGraphsFieldBuilder().addBuilder(
+      return internalGetFunctionGraphsFieldBuilder().addBuilder(
           org.tensorflow.proto.RunMetadata.FunctionGraphs.getDefaultInstance());
     }
     /**
@@ -3214,7 +3215,7 @@ public org.tensorflow.proto.RunMetadata.FunctionGraphs.Builder addFunctionGraphs
      */
     public org.tensorflow.proto.RunMetadata.FunctionGraphs.Builder addFunctionGraphsBuilder(
         int index) {
-      return getFunctionGraphsFieldBuilder().addBuilder(
+      return internalGetFunctionGraphsFieldBuilder().addBuilder(
           index, org.tensorflow.proto.RunMetadata.FunctionGraphs.getDefaultInstance());
     }
     /**
@@ -3235,11 +3236,11 @@ public org.tensorflow.proto.RunMetadata.FunctionGraphs.Builder addFunctionGraphs
      */
     public java.util.List 
          getFunctionGraphsBuilderList() {
-      return getFunctionGraphsFieldBuilder().getBuilderList();
+      return internalGetFunctionGraphsFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.RunMetadata.FunctionGraphs, org.tensorflow.proto.RunMetadata.FunctionGraphs.Builder, org.tensorflow.proto.RunMetadata.FunctionGraphsOrBuilder> 
-        getFunctionGraphsFieldBuilder() {
+        internalGetFunctionGraphsFieldBuilder() {
       if (functionGraphsBuilder_ == null) {
         functionGraphsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.RunMetadata.FunctionGraphs, org.tensorflow.proto.RunMetadata.FunctionGraphs.Builder, org.tensorflow.proto.RunMetadata.FunctionGraphsOrBuilder>(
@@ -3371,7 +3372,7 @@ public Builder clearSessionMetadata() {
     public org.tensorflow.proto.SessionMetadata.Builder getSessionMetadataBuilder() {
       bitField0_ |= 0x00000010;
       onChanged();
-      return getSessionMetadataFieldBuilder().getBuilder();
+      return internalGetSessionMetadataFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -3397,7 +3398,7 @@ public org.tensorflow.proto.SessionMetadataOrBuilder getSessionMetadataOrBuilder
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.SessionMetadata, org.tensorflow.proto.SessionMetadata.Builder, org.tensorflow.proto.SessionMetadataOrBuilder> 
-        getSessionMetadataFieldBuilder() {
+        internalGetSessionMetadataFieldBuilder() {
       if (sessionMetadataBuilder_ == null) {
         sessionMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.SessionMetadata, org.tensorflow.proto.SessionMetadata.Builder, org.tensorflow.proto.SessionMetadataOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunMetadataOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunMetadataOrBuilder.java
index 4c7e97243da..95d9c2c40cb 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunMetadataOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunMetadataOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/config.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface RunMetadataOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.RunMetadata)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunOptions.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunOptions.java
index f7bbbdee26c..ebd5e10bcbd 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunOptions.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunOptions.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/config.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.RunOptions}
  */
+@com.google.protobuf.Generated
 public final class RunOptions extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.RunOptions)
@@ -21,8 +22,8 @@ public final class RunOptions extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       RunOptions.class.getName());
   }
@@ -80,8 +81,8 @@ public enum TraceLevel
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         TraceLevel.class.getName());
     }
@@ -159,7 +160,7 @@ public TraceLevel findValueByNumber(int number) {
         getDescriptorForType() {
       return getDescriptor();
     }
-    public static final com.google.protobuf.Descriptors.EnumDescriptor
+    public static com.google.protobuf.Descriptors.EnumDescriptor
         getDescriptor() {
       return org.tensorflow.proto.RunOptions.getDescriptor().getEnumTypes().get(0);
     }
@@ -250,8 +251,8 @@ public static final class Experimental extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         Experimental.class.getName());
     }
@@ -306,8 +307,8 @@ public static final class RunHandlerPoolOptions extends
         com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
           com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
           /* major= */ 4,
-          /* minor= */ 28,
-          /* patch= */ 3,
+          /* minor= */ 31,
+          /* patch= */ 1,
           /* suffix= */ "",
           RunHandlerPoolOptions.class.getName());
       }
@@ -1031,7 +1032,7 @@ private Builder(
       private void maybeForceBuilderInitialization() {
         if (com.google.protobuf.GeneratedMessage
                 .alwaysUseFieldBuilders) {
-          getRunHandlerPoolOptionsFieldBuilder();
+          internalGetRunHandlerPoolOptionsFieldBuilder();
         }
       }
       @java.lang.Override
@@ -1153,7 +1154,7 @@ public Builder mergeFrom(
               } // case 16
               case 26: {
                 input.readMessage(
-                    getRunHandlerPoolOptionsFieldBuilder().getBuilder(),
+                    internalGetRunHandlerPoolOptionsFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000004;
                 break;
@@ -1372,7 +1373,7 @@ public Builder clearRunHandlerPoolOptions() {
       public org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptions.Builder getRunHandlerPoolOptionsBuilder() {
         bitField0_ |= 0x00000004;
         onChanged();
-        return getRunHandlerPoolOptionsFieldBuilder().getBuilder();
+        return internalGetRunHandlerPoolOptionsFieldBuilder().getBuilder();
       }
       /**
        * .tensorflow.RunOptions.Experimental.RunHandlerPoolOptions run_handler_pool_options = 3;
@@ -1390,7 +1391,7 @@ public org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptionsOrBuild
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptions, org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptions.Builder, org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptionsOrBuilder> 
-          getRunHandlerPoolOptionsFieldBuilder() {
+          internalGetRunHandlerPoolOptionsFieldBuilder() {
         if (runHandlerPoolOptionsBuilder_ == null) {
           runHandlerPoolOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptions, org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptions.Builder, org.tensorflow.proto.RunOptions.Experimental.RunHandlerPoolOptionsOrBuilder>(
@@ -1878,8 +1879,8 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getDebugOptionsFieldBuilder();
-        getExperimentalFieldBuilder();
+        internalGetDebugOptionsFieldBuilder();
+        internalGetExperimentalFieldBuilder();
       }
     }
     @java.lang.Override
@@ -2046,7 +2047,7 @@ public Builder mergeFrom(
             } // case 40
             case 50: {
               input.readMessage(
-                  getDebugOptionsFieldBuilder().getBuilder(),
+                  internalGetDebugOptionsFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000010;
               break;
@@ -2058,7 +2059,7 @@ public Builder mergeFrom(
             } // case 56
             case 66: {
               input.readMessage(
-                  getExperimentalFieldBuilder().getBuilder(),
+                  internalGetExperimentalFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000040;
               break;
@@ -2114,9 +2115,7 @@ public org.tensorflow.proto.RunOptions.TraceLevel getTraceLevel() {
      * @return This builder for chaining.
      */
     public Builder setTraceLevel(org.tensorflow.proto.RunOptions.TraceLevel value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000001;
       traceLevel_ = value.getNumber();
       onChanged();
@@ -2402,7 +2401,7 @@ public Builder clearDebugOptions() {
     public org.tensorflow.proto.DebugOptions.Builder getDebugOptionsBuilder() {
       bitField0_ |= 0x00000010;
       onChanged();
-      return getDebugOptionsFieldBuilder().getBuilder();
+      return internalGetDebugOptionsFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -2428,7 +2427,7 @@ public org.tensorflow.proto.DebugOptionsOrBuilder getDebugOptionsOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.DebugOptions, org.tensorflow.proto.DebugOptions.Builder, org.tensorflow.proto.DebugOptionsOrBuilder> 
-        getDebugOptionsFieldBuilder() {
+        internalGetDebugOptionsFieldBuilder() {
       if (debugOptionsBuilder_ == null) {
         debugOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.DebugOptions, org.tensorflow.proto.DebugOptions.Builder, org.tensorflow.proto.DebugOptionsOrBuilder>(
@@ -2587,7 +2586,7 @@ public Builder clearExperimental() {
     public org.tensorflow.proto.RunOptions.Experimental.Builder getExperimentalBuilder() {
       bitField0_ |= 0x00000040;
       onChanged();
-      return getExperimentalFieldBuilder().getBuilder();
+      return internalGetExperimentalFieldBuilder().getBuilder();
     }
     /**
      * .tensorflow.RunOptions.Experimental experimental = 8;
@@ -2605,7 +2604,7 @@ public org.tensorflow.proto.RunOptions.ExperimentalOrBuilder getExperimentalOrBu
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.RunOptions.Experimental, org.tensorflow.proto.RunOptions.Experimental.Builder, org.tensorflow.proto.RunOptions.ExperimentalOrBuilder> 
-        getExperimentalFieldBuilder() {
+        internalGetExperimentalFieldBuilder() {
       if (experimentalBuilder_ == null) {
         experimentalBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.RunOptions.Experimental, org.tensorflow.proto.RunOptions.Experimental.Builder, org.tensorflow.proto.RunOptions.ExperimentalOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunOptionsOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunOptionsOrBuilder.java
index 7127867def4..e084a2a22e1 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunOptionsOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/RunOptionsOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/config.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface RunOptionsOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.RunOptions)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaveSliceInfoDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaveSliceInfoDef.java
index 94488b4eaab..43cae5c2367 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaveSliceInfoDef.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaveSliceInfoDef.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/variable.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.SaveSliceInfoDef}
  */
+@com.google.protobuf.Generated
 public final class SaveSliceInfoDef extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.SaveSliceInfoDef)
@@ -17,8 +18,8 @@ public final class SaveSliceInfoDef extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       SaveSliceInfoDef.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaveSliceInfoDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaveSliceInfoDefOrBuilder.java
index b4cb42c9a44..158592a36a9 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaveSliceInfoDefOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaveSliceInfoDefOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/variable.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface SaveSliceInfoDefOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.SaveSliceInfoDef)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedModel.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedModel.java
index ff3c386eb60..5bc9c9fb0f1 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedModel.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedModel.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/saved_model.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -13,6 +13,7 @@
  *
  * Protobuf type {@code tensorflow.SavedModel}
  */
+@com.google.protobuf.Generated
 public final class SavedModel extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.SavedModel)
@@ -22,8 +23,8 @@ public final class SavedModel extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       SavedModel.class.getName());
   }
@@ -430,7 +431,7 @@ public Builder mergeFrom(org.tensorflow.proto.SavedModel other) {
             bitField0_ = (bitField0_ & ~0x00000002);
             metaGraphsBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getMetaGraphsFieldBuilder() : null;
+                 internalGetMetaGraphsFieldBuilder() : null;
           } else {
             metaGraphsBuilder_.addAllMessages(other.metaGraphs_);
           }
@@ -779,7 +780,7 @@ public Builder removeMetaGraphs(int index) {
      */
     public org.tensorflow.proto.MetaGraphDef.Builder getMetaGraphsBuilder(
         int index) {
-      return getMetaGraphsFieldBuilder().getBuilder(index);
+      return internalGetMetaGraphsFieldBuilder().getBuilder(index);
     }
     /**
      * 
@@ -818,7 +819,7 @@ public org.tensorflow.proto.MetaGraphDefOrBuilder getMetaGraphsOrBuilder(
      * repeated .tensorflow.MetaGraphDef meta_graphs = 2;
      */
     public org.tensorflow.proto.MetaGraphDef.Builder addMetaGraphsBuilder() {
-      return getMetaGraphsFieldBuilder().addBuilder(
+      return internalGetMetaGraphsFieldBuilder().addBuilder(
           org.tensorflow.proto.MetaGraphDef.getDefaultInstance());
     }
     /**
@@ -830,7 +831,7 @@ public org.tensorflow.proto.MetaGraphDef.Builder addMetaGraphsBuilder() {
      */
     public org.tensorflow.proto.MetaGraphDef.Builder addMetaGraphsBuilder(
         int index) {
-      return getMetaGraphsFieldBuilder().addBuilder(
+      return internalGetMetaGraphsFieldBuilder().addBuilder(
           index, org.tensorflow.proto.MetaGraphDef.getDefaultInstance());
     }
     /**
@@ -842,11 +843,11 @@ public org.tensorflow.proto.MetaGraphDef.Builder addMetaGraphsBuilder(
      */
     public java.util.List 
          getMetaGraphsBuilderList() {
-      return getMetaGraphsFieldBuilder().getBuilderList();
+      return internalGetMetaGraphsFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.MetaGraphDef, org.tensorflow.proto.MetaGraphDef.Builder, org.tensorflow.proto.MetaGraphDefOrBuilder> 
-        getMetaGraphsFieldBuilder() {
+        internalGetMetaGraphsFieldBuilder() {
       if (metaGraphsBuilder_ == null) {
         metaGraphsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.MetaGraphDef, org.tensorflow.proto.MetaGraphDef.Builder, org.tensorflow.proto.MetaGraphDefOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedModelOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedModelOrBuilder.java
index eb43e5ed042..46cfcbf42f9 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedModelOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedModelOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/saved_model.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface SavedModelOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.SavedModel)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedModelProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedModelProtos.java
index 8ccc28afce4..7a8d56a7788 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedModelProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedModelProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/saved_model.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class SavedModelProtos {
   private SavedModelProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       SavedModelProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedObjectGraphOuterClass.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedObjectGraphOuterClass.java
index b0a72357785..47523432355 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedObjectGraphOuterClass.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedObjectGraphOuterClass.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/saved_object_graph.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class SavedObjectGraphOuterClass {
   private SavedObjectGraphOuterClass() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       SavedObjectGraphOuterClass.class.getName());
   }
@@ -159,8 +160,8 @@ public static final class SavedObjectGraph extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         SavedObjectGraph.class.getName());
     }
@@ -700,7 +701,7 @@ public Builder mergeFrom(org.tensorflow.proto.SavedObjectGraphOuterClass.SavedOb
               bitField0_ = (bitField0_ & ~0x00000001);
               nodesBuilder_ = 
                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                   getNodesFieldBuilder() : null;
+                   internalGetNodesFieldBuilder() : null;
             } else {
               nodesBuilder_.addAllMessages(other.nodes_);
             }
@@ -1045,7 +1046,7 @@ public Builder removeNodes(int index) {
        */
       public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject.Builder getNodesBuilder(
           int index) {
-        return getNodesFieldBuilder().getBuilder(index);
+        return internalGetNodesFieldBuilder().getBuilder(index);
       }
       /**
        * 
@@ -1093,7 +1094,7 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectOrBuilder getN
        * repeated .tensorflow.SavedObject nodes = 1;
        */
       public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject.Builder addNodesBuilder() {
-        return getNodesFieldBuilder().addBuilder(
+        return internalGetNodesFieldBuilder().addBuilder(
             org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject.getDefaultInstance());
       }
       /**
@@ -1108,7 +1109,7 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject.Builder addNo
        */
       public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject.Builder addNodesBuilder(
           int index) {
-        return getNodesFieldBuilder().addBuilder(
+        return internalGetNodesFieldBuilder().addBuilder(
             index, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject.getDefaultInstance());
       }
       /**
@@ -1123,11 +1124,11 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject.Builder addNo
        */
       public java.util.List 
            getNodesBuilderList() {
-        return getNodesFieldBuilder().getBuilderList();
+        return internalGetNodesFieldBuilder().getBuilderList();
       }
       private com.google.protobuf.RepeatedFieldBuilder<
           org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectOrBuilder> 
-          getNodesFieldBuilder() {
+          internalGetNodesFieldBuilder() {
         if (nodesBuilder_ == null) {
           nodesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObject.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedObjectOrBuilder>(
@@ -1852,8 +1853,8 @@ public static final class SavedObject extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         SavedObject.class.getName());
     }
@@ -3106,10 +3107,10 @@ private Builder(
       private void maybeForceBuilderInitialization() {
         if (com.google.protobuf.GeneratedMessage
                 .alwaysUseFieldBuilders) {
-          getChildrenFieldBuilder();
-          getDependenciesFieldBuilder();
-          getSlotVariablesFieldBuilder();
-          getSerializedUserProtoFieldBuilder();
+          internalGetChildrenFieldBuilder();
+          internalGetDependenciesFieldBuilder();
+          internalGetSlotVariablesFieldBuilder();
+          internalGetSerializedUserProtoFieldBuilder();
         }
       }
       @java.lang.Override
@@ -3324,7 +3325,7 @@ public Builder mergeFrom(org.tensorflow.proto.SavedObjectGraphOuterClass.SavedOb
               bitField0_ = (bitField0_ & ~0x00000001);
               childrenBuilder_ = 
                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                   getChildrenFieldBuilder() : null;
+                   internalGetChildrenFieldBuilder() : null;
             } else {
               childrenBuilder_.addAllMessages(other.children_);
             }
@@ -3350,7 +3351,7 @@ public Builder mergeFrom(org.tensorflow.proto.SavedObjectGraphOuterClass.SavedOb
               bitField0_ = (bitField0_ & ~0x00000002);
               dependenciesBuilder_ = 
                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                   getDependenciesFieldBuilder() : null;
+                   internalGetDependenciesFieldBuilder() : null;
             } else {
               dependenciesBuilder_.addAllMessages(other.dependencies_);
             }
@@ -3376,7 +3377,7 @@ public Builder mergeFrom(org.tensorflow.proto.SavedObjectGraphOuterClass.SavedOb
               bitField0_ = (bitField0_ & ~0x00000004);
               slotVariablesBuilder_ = 
                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                   getSlotVariablesFieldBuilder() : null;
+                   internalGetSlotVariablesFieldBuilder() : null;
             } else {
               slotVariablesBuilder_.addAllMessages(other.slotVariables_);
             }
@@ -3489,49 +3490,49 @@ public Builder mergeFrom(
               } // case 26
               case 34: {
                 input.readMessage(
-                    getUserObjectFieldBuilder().getBuilder(),
+                    internalGetUserObjectFieldBuilder().getBuilder(),
                     extensionRegistry);
                 kindCase_ = 4;
                 break;
               } // case 34
               case 42: {
                 input.readMessage(
-                    getAssetFieldBuilder().getBuilder(),
+                    internalGetAssetFieldBuilder().getBuilder(),
                     extensionRegistry);
                 kindCase_ = 5;
                 break;
               } // case 42
               case 50: {
                 input.readMessage(
-                    getFunctionFieldBuilder().getBuilder(),
+                    internalGetFunctionFieldBuilder().getBuilder(),
                     extensionRegistry);
                 kindCase_ = 6;
                 break;
               } // case 50
               case 58: {
                 input.readMessage(
-                    getVariableFieldBuilder().getBuilder(),
+                    internalGetVariableFieldBuilder().getBuilder(),
                     extensionRegistry);
                 kindCase_ = 7;
                 break;
               } // case 58
               case 66: {
                 input.readMessage(
-                    getBareConcreteFunctionFieldBuilder().getBuilder(),
+                    internalGetBareConcreteFunctionFieldBuilder().getBuilder(),
                     extensionRegistry);
                 kindCase_ = 8;
                 break;
               } // case 66
               case 74: {
                 input.readMessage(
-                    getConstantFieldBuilder().getBuilder(),
+                    internalGetConstantFieldBuilder().getBuilder(),
                     extensionRegistry);
                 kindCase_ = 9;
                 break;
               } // case 74
               case 82: {
                 input.readMessage(
-                    getResourceFieldBuilder().getBuilder(),
+                    internalGetResourceFieldBuilder().getBuilder(),
                     extensionRegistry);
                 kindCase_ = 10;
                 break;
@@ -3547,7 +3548,7 @@ public Builder mergeFrom(
               } // case 90
               case 98: {
                 input.readMessage(
-                    getCapturedTensorFieldBuilder().getBuilder(),
+                    internalGetCapturedTensorFieldBuilder().getBuilder(),
                     extensionRegistry);
                 kindCase_ = 12;
                 break;
@@ -3559,7 +3560,7 @@ public Builder mergeFrom(
               } // case 106
               case 114: {
                 input.readMessage(
-                    getSerializedUserProtoFieldBuilder().getBuilder(),
+                    internalGetSerializedUserProtoFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00002000;
                 break;
@@ -3898,7 +3899,7 @@ public Builder removeChildren(int index) {
        */
       public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference.Builder getChildrenBuilder(
           int index) {
-        return getChildrenFieldBuilder().getBuilder(index);
+        return internalGetChildrenFieldBuilder().getBuilder(index);
       }
       /**
        * 
@@ -3949,7 +3950,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.
        * repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1;
        */
       public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference.Builder addChildrenBuilder() {
-        return getChildrenFieldBuilder().addBuilder(
+        return internalGetChildrenFieldBuilder().addBuilder(
             org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference.getDefaultInstance());
       }
       /**
@@ -3965,7 +3966,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.
        */
       public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference.Builder addChildrenBuilder(
           int index) {
-        return getChildrenFieldBuilder().addBuilder(
+        return internalGetChildrenFieldBuilder().addBuilder(
             index, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference.getDefaultInstance());
       }
       /**
@@ -3981,11 +3982,11 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.
        */
       public java.util.List 
            getChildrenBuilderList() {
-        return getChildrenFieldBuilder().getBuilderList();
+        return internalGetChildrenFieldBuilder().getBuilderList();
       }
       private com.google.protobuf.RepeatedFieldBuilder<
           org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReferenceOrBuilder> 
-          getChildrenFieldBuilder() {
+          internalGetChildrenFieldBuilder() {
         if (childrenBuilder_ == null) {
           childrenBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReferenceOrBuilder>(
@@ -4256,7 +4257,7 @@ public Builder removeDependencies(int index) {
        */
       public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference.Builder getDependenciesBuilder(
           int index) {
-        return getDependenciesFieldBuilder().getBuilder(index);
+        return internalGetDependenciesFieldBuilder().getBuilder(index);
       }
       /**
        * 
@@ -4301,7 +4302,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.
        * repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference dependencies = 15;
        */
       public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference.Builder addDependenciesBuilder() {
-        return getDependenciesFieldBuilder().addBuilder(
+        return internalGetDependenciesFieldBuilder().addBuilder(
             org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference.getDefaultInstance());
       }
       /**
@@ -4315,7 +4316,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.
        */
       public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference.Builder addDependenciesBuilder(
           int index) {
-        return getDependenciesFieldBuilder().addBuilder(
+        return internalGetDependenciesFieldBuilder().addBuilder(
             index, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference.getDefaultInstance());
       }
       /**
@@ -4329,11 +4330,11 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.
        */
       public java.util.List 
            getDependenciesBuilderList() {
-        return getDependenciesFieldBuilder().getBuilderList();
+        return internalGetDependenciesFieldBuilder().getBuilderList();
       }
       private com.google.protobuf.RepeatedFieldBuilder<
           org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReferenceOrBuilder> 
-          getDependenciesFieldBuilder() {
+          internalGetDependenciesFieldBuilder() {
         if (dependenciesBuilder_ == null) {
           dependenciesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReferenceOrBuilder>(
@@ -4630,7 +4631,7 @@ public Builder removeSlotVariables(int index) {
        */
       public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference.Builder getSlotVariablesBuilder(
           int index) {
-        return getSlotVariablesFieldBuilder().getBuilder(index);
+        return internalGetSlotVariablesFieldBuilder().getBuilder(index);
       }
       /**
        * 
@@ -4681,7 +4682,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.
        * repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3;
        */
       public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference.Builder addSlotVariablesBuilder() {
-        return getSlotVariablesFieldBuilder().addBuilder(
+        return internalGetSlotVariablesFieldBuilder().addBuilder(
             org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference.getDefaultInstance());
       }
       /**
@@ -4697,7 +4698,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.
        */
       public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference.Builder addSlotVariablesBuilder(
           int index) {
-        return getSlotVariablesFieldBuilder().addBuilder(
+        return internalGetSlotVariablesFieldBuilder().addBuilder(
             index, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference.getDefaultInstance());
       }
       /**
@@ -4713,11 +4714,11 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.
        */
       public java.util.List 
            getSlotVariablesBuilderList() {
-        return getSlotVariablesFieldBuilder().getBuilderList();
+        return internalGetSlotVariablesFieldBuilder().getBuilderList();
       }
       private com.google.protobuf.RepeatedFieldBuilder<
           org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReferenceOrBuilder> 
-          getSlotVariablesFieldBuilder() {
+          internalGetSlotVariablesFieldBuilder() {
         if (slotVariablesBuilder_ == null) {
           slotVariablesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReferenceOrBuilder>(
@@ -4834,7 +4835,7 @@ public Builder clearUserObject() {
        * .tensorflow.SavedUserObject user_object = 4;
        */
       public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedUserObject.Builder getUserObjectBuilder() {
-        return getUserObjectFieldBuilder().getBuilder();
+        return internalGetUserObjectFieldBuilder().getBuilder();
       }
       /**
        * .tensorflow.SavedUserObject user_object = 4;
@@ -4855,7 +4856,7 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedUserObjectOrBuilder
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.SavedObjectGraphOuterClass.SavedUserObject, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedUserObject.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedUserObjectOrBuilder> 
-          getUserObjectFieldBuilder() {
+          internalGetUserObjectFieldBuilder() {
         if (userObjectBuilder_ == null) {
           if (!(kindCase_ == 4)) {
             kind_ = org.tensorflow.proto.SavedObjectGraphOuterClass.SavedUserObject.getDefaultInstance();
@@ -4976,7 +4977,7 @@ public Builder clearAsset() {
        * .tensorflow.SavedAsset asset = 5;
        */
       public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedAsset.Builder getAssetBuilder() {
-        return getAssetFieldBuilder().getBuilder();
+        return internalGetAssetFieldBuilder().getBuilder();
       }
       /**
        * .tensorflow.SavedAsset asset = 5;
@@ -4997,7 +4998,7 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedAssetOrBuilder getAs
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.SavedObjectGraphOuterClass.SavedAsset, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedAsset.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedAssetOrBuilder> 
-          getAssetFieldBuilder() {
+          internalGetAssetFieldBuilder() {
         if (assetBuilder_ == null) {
           if (!(kindCase_ == 5)) {
             kind_ = org.tensorflow.proto.SavedObjectGraphOuterClass.SavedAsset.getDefaultInstance();
@@ -5118,7 +5119,7 @@ public Builder clearFunction() {
        * .tensorflow.SavedFunction function = 6;
        */
       public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedFunction.Builder getFunctionBuilder() {
-        return getFunctionFieldBuilder().getBuilder();
+        return internalGetFunctionFieldBuilder().getBuilder();
       }
       /**
        * .tensorflow.SavedFunction function = 6;
@@ -5139,7 +5140,7 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedFunctionOrBuilder ge
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.SavedObjectGraphOuterClass.SavedFunction, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedFunction.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedFunctionOrBuilder> 
-          getFunctionFieldBuilder() {
+          internalGetFunctionFieldBuilder() {
         if (functionBuilder_ == null) {
           if (!(kindCase_ == 6)) {
             kind_ = org.tensorflow.proto.SavedObjectGraphOuterClass.SavedFunction.getDefaultInstance();
@@ -5260,7 +5261,7 @@ public Builder clearVariable() {
        * .tensorflow.SavedVariable variable = 7;
        */
       public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable.Builder getVariableBuilder() {
-        return getVariableFieldBuilder().getBuilder();
+        return internalGetVariableFieldBuilder().getBuilder();
       }
       /**
        * .tensorflow.SavedVariable variable = 7;
@@ -5281,7 +5282,7 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariableOrBuilder ge
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariableOrBuilder> 
-          getVariableFieldBuilder() {
+          internalGetVariableFieldBuilder() {
         if (variableBuilder_ == null) {
           if (!(kindCase_ == 7)) {
             kind_ = org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable.getDefaultInstance();
@@ -5402,7 +5403,7 @@ public Builder clearBareConcreteFunction() {
        * .tensorflow.SavedBareConcreteFunction bare_concrete_function = 8;
        */
       public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedBareConcreteFunction.Builder getBareConcreteFunctionBuilder() {
-        return getBareConcreteFunctionFieldBuilder().getBuilder();
+        return internalGetBareConcreteFunctionFieldBuilder().getBuilder();
       }
       /**
        * .tensorflow.SavedBareConcreteFunction bare_concrete_function = 8;
@@ -5423,7 +5424,7 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedBareConcreteFunction
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.SavedObjectGraphOuterClass.SavedBareConcreteFunction, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedBareConcreteFunction.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedBareConcreteFunctionOrBuilder> 
-          getBareConcreteFunctionFieldBuilder() {
+          internalGetBareConcreteFunctionFieldBuilder() {
         if (bareConcreteFunctionBuilder_ == null) {
           if (!(kindCase_ == 8)) {
             kind_ = org.tensorflow.proto.SavedObjectGraphOuterClass.SavedBareConcreteFunction.getDefaultInstance();
@@ -5544,7 +5545,7 @@ public Builder clearConstant() {
        * .tensorflow.SavedConstant constant = 9;
        */
       public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConstant.Builder getConstantBuilder() {
-        return getConstantFieldBuilder().getBuilder();
+        return internalGetConstantFieldBuilder().getBuilder();
       }
       /**
        * .tensorflow.SavedConstant constant = 9;
@@ -5565,7 +5566,7 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConstantOrBuilder ge
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConstant, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConstant.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConstantOrBuilder> 
-          getConstantFieldBuilder() {
+          internalGetConstantFieldBuilder() {
         if (constantBuilder_ == null) {
           if (!(kindCase_ == 9)) {
             kind_ = org.tensorflow.proto.SavedObjectGraphOuterClass.SavedConstant.getDefaultInstance();
@@ -5686,7 +5687,7 @@ public Builder clearResource() {
        * .tensorflow.SavedResource resource = 10;
        */
       public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedResource.Builder getResourceBuilder() {
-        return getResourceFieldBuilder().getBuilder();
+        return internalGetResourceFieldBuilder().getBuilder();
       }
       /**
        * .tensorflow.SavedResource resource = 10;
@@ -5707,7 +5708,7 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedResourceOrBuilder ge
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.SavedObjectGraphOuterClass.SavedResource, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedResource.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedResourceOrBuilder> 
-          getResourceFieldBuilder() {
+          internalGetResourceFieldBuilder() {
         if (resourceBuilder_ == null) {
           if (!(kindCase_ == 10)) {
             kind_ = org.tensorflow.proto.SavedObjectGraphOuterClass.SavedResource.getDefaultInstance();
@@ -5828,7 +5829,7 @@ public Builder clearCapturedTensor() {
        * .tensorflow.CapturedTensor captured_tensor = 12;
        */
       public org.tensorflow.proto.SavedObjectGraphOuterClass.CapturedTensor.Builder getCapturedTensorBuilder() {
-        return getCapturedTensorFieldBuilder().getBuilder();
+        return internalGetCapturedTensorFieldBuilder().getBuilder();
       }
       /**
        * .tensorflow.CapturedTensor captured_tensor = 12;
@@ -5849,7 +5850,7 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.CapturedTensorOrBuilder g
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.SavedObjectGraphOuterClass.CapturedTensor, org.tensorflow.proto.SavedObjectGraphOuterClass.CapturedTensor.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.CapturedTensorOrBuilder> 
-          getCapturedTensorFieldBuilder() {
+          internalGetCapturedTensorFieldBuilder() {
         if (capturedTensorBuilder_ == null) {
           if (!(kindCase_ == 12)) {
             kind_ = org.tensorflow.proto.SavedObjectGraphOuterClass.CapturedTensor.getDefaultInstance();
@@ -6307,7 +6308,7 @@ public Builder clearSerializedUserProto() {
       public com.google.protobuf.Any.Builder getSerializedUserProtoBuilder() {
         bitField0_ |= 0x00002000;
         onChanged();
-        return getSerializedUserProtoFieldBuilder().getBuilder();
+        return internalGetSerializedUserProtoFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -6337,7 +6338,7 @@ public com.google.protobuf.AnyOrBuilder getSerializedUserProtoOrBuilder() {
        */
       private com.google.protobuf.SingleFieldBuilder<
           com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> 
-          getSerializedUserProtoFieldBuilder() {
+          internalGetSerializedUserProtoFieldBuilder() {
         if (serializedUserProtoBuilder_ == null) {
           serializedUserProtoBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>(
@@ -6601,8 +6602,8 @@ public static final class SavedUserObject extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         SavedUserObject.class.getName());
     }
@@ -6997,7 +6998,7 @@ private Builder(
       private void maybeForceBuilderInitialization() {
         if (com.google.protobuf.GeneratedMessage
                 .alwaysUseFieldBuilders) {
-          getVersionFieldBuilder();
+          internalGetVersionFieldBuilder();
         }
       }
       @java.lang.Override
@@ -7118,7 +7119,7 @@ public Builder mergeFrom(
               } // case 10
               case 18: {
                 input.readMessage(
-                    getVersionFieldBuilder().getBuilder(),
+                    internalGetVersionFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000002;
                 break;
@@ -7356,7 +7357,7 @@ public Builder clearVersion() {
       public org.tensorflow.proto.VersionDef.Builder getVersionBuilder() {
         bitField0_ |= 0x00000002;
         onChanged();
-        return getVersionFieldBuilder().getBuilder();
+        return internalGetVersionFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -7382,7 +7383,7 @@ public org.tensorflow.proto.VersionDefOrBuilder getVersionOrBuilder() {
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.VersionDef, org.tensorflow.proto.VersionDef.Builder, org.tensorflow.proto.VersionDefOrBuilder> 
-          getVersionFieldBuilder() {
+          internalGetVersionFieldBuilder() {
         if (versionBuilder_ == null) {
           versionBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.VersionDef, org.tensorflow.proto.VersionDef.Builder, org.tensorflow.proto.VersionDefOrBuilder>(
@@ -7604,8 +7605,8 @@ public static final class SavedAsset extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         SavedAsset.class.getName());
     }
@@ -8112,8 +8113,8 @@ public static final class SavedFunction extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         SavedFunction.class.getName());
     }
@@ -8419,7 +8420,7 @@ private Builder(
       private void maybeForceBuilderInitialization() {
         if (com.google.protobuf.GeneratedMessage
                 .alwaysUseFieldBuilders) {
-          getFunctionSpecFieldBuilder();
+          internalGetFunctionSpecFieldBuilder();
         }
       }
       @java.lang.Override
@@ -8539,7 +8540,7 @@ public Builder mergeFrom(
               } // case 10
               case 18: {
                 input.readMessage(
-                    getFunctionSpecFieldBuilder().getBuilder(),
+                    internalGetFunctionSpecFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000002;
                 break;
@@ -8763,7 +8764,7 @@ public Builder clearFunctionSpec() {
       public org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec.Builder getFunctionSpecBuilder() {
         bitField0_ |= 0x00000002;
         onChanged();
-        return getFunctionSpecFieldBuilder().getBuilder();
+        return internalGetFunctionSpecFieldBuilder().getBuilder();
       }
       /**
        * .tensorflow.FunctionSpec function_spec = 2;
@@ -8781,7 +8782,7 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpecOrBuilder get
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec, org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpecOrBuilder> 
-          getFunctionSpecFieldBuilder() {
+          internalGetFunctionSpecFieldBuilder() {
         if (functionSpecBuilder_ == null) {
           functionSpecBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec, org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpecOrBuilder>(
@@ -8900,8 +8901,8 @@ public static final class CapturedTensor extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         CapturedTensor.class.getName());
     }
@@ -9675,8 +9676,8 @@ public static final class SavedConcreteFunction extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         SavedConcreteFunction.class.getName());
     }
@@ -10061,8 +10062,8 @@ private Builder(
       private void maybeForceBuilderInitialization() {
         if (com.google.protobuf.GeneratedMessage
                 .alwaysUseFieldBuilders) {
-          getCanonicalizedInputSignatureFieldBuilder();
-          getOutputSignatureFieldBuilder();
+          internalGetCanonicalizedInputSignatureFieldBuilder();
+          internalGetOutputSignatureFieldBuilder();
         }
       }
       @java.lang.Override
@@ -10206,14 +10207,14 @@ public Builder mergeFrom(
               } // case 18
               case 26: {
                 input.readMessage(
-                    getCanonicalizedInputSignatureFieldBuilder().getBuilder(),
+                    internalGetCanonicalizedInputSignatureFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000002;
                 break;
               } // case 26
               case 34: {
                 input.readMessage(
-                    getOutputSignatureFieldBuilder().getBuilder(),
+                    internalGetOutputSignatureFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000004;
                 break;
@@ -10445,7 +10446,7 @@ public Builder clearCanonicalizedInputSignature() {
       public org.tensorflow.proto.Struct.StructuredValue.Builder getCanonicalizedInputSignatureBuilder() {
         bitField0_ |= 0x00000002;
         onChanged();
-        return getCanonicalizedInputSignatureFieldBuilder().getBuilder();
+        return internalGetCanonicalizedInputSignatureFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -10473,7 +10474,7 @@ public org.tensorflow.proto.Struct.StructuredValueOrBuilder getCanonicalizedInpu
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder> 
-          getCanonicalizedInputSignatureFieldBuilder() {
+          internalGetCanonicalizedInputSignatureFieldBuilder() {
         if (canonicalizedInputSignatureBuilder_ == null) {
           canonicalizedInputSignatureBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder>(
@@ -10618,7 +10619,7 @@ public Builder clearOutputSignature() {
       public org.tensorflow.proto.Struct.StructuredValue.Builder getOutputSignatureBuilder() {
         bitField0_ |= 0x00000004;
         onChanged();
-        return getOutputSignatureFieldBuilder().getBuilder();
+        return internalGetOutputSignatureFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -10648,7 +10649,7 @@ public org.tensorflow.proto.Struct.StructuredValueOrBuilder getOutputSignatureOr
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder> 
-          getOutputSignatureFieldBuilder() {
+          internalGetOutputSignatureFieldBuilder() {
         if (outputSignatureBuilder_ == null) {
           outputSignatureBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder>(
@@ -10840,8 +10841,8 @@ public static final class SavedBareConcreteFunction extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         SavedBareConcreteFunction.class.getName());
     }
@@ -11271,7 +11272,7 @@ private Builder(
       private void maybeForceBuilderInitialization() {
         if (com.google.protobuf.GeneratedMessage
                 .alwaysUseFieldBuilders) {
-          getFunctionSpecFieldBuilder();
+          internalGetFunctionSpecFieldBuilder();
         }
       }
       @java.lang.Override
@@ -11417,7 +11418,7 @@ public Builder mergeFrom(
               } // case 24
               case 34: {
                 input.readMessage(
-                    getFunctionSpecFieldBuilder().getBuilder(),
+                    internalGetFunctionSpecFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000008;
                 break;
@@ -11876,7 +11877,7 @@ public Builder clearFunctionSpec() {
       public org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec.Builder getFunctionSpecBuilder() {
         bitField0_ |= 0x00000008;
         onChanged();
-        return getFunctionSpecFieldBuilder().getBuilder();
+        return internalGetFunctionSpecFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -11912,7 +11913,7 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpecOrBuilder get
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec, org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpecOrBuilder> 
-          getFunctionSpecFieldBuilder() {
+          internalGetFunctionSpecFieldBuilder() {
         if (functionSpecBuilder_ == null) {
           functionSpecBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec, org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpecOrBuilder>(
@@ -12011,8 +12012,8 @@ public static final class SavedConstant extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         SavedConstant.class.getName());
     }
@@ -12689,8 +12690,8 @@ public static final class SavedVariable extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         SavedVariable.class.getName());
     }
@@ -13251,8 +13252,8 @@ private Builder(
       private void maybeForceBuilderInitialization() {
         if (com.google.protobuf.GeneratedMessage
                 .alwaysUseFieldBuilders) {
-          getShapeFieldBuilder();
-          getExperimentalDistributedVariableComponentsFieldBuilder();
+          internalGetShapeFieldBuilder();
+          internalGetExperimentalDistributedVariableComponentsFieldBuilder();
         }
       }
       @java.lang.Override
@@ -13408,7 +13409,7 @@ public Builder mergeFrom(org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVa
               bitField0_ = (bitField0_ & ~0x00000080);
               experimentalDistributedVariableComponentsBuilder_ = 
                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                   getExperimentalDistributedVariableComponentsFieldBuilder() : null;
+                   internalGetExperimentalDistributedVariableComponentsFieldBuilder() : null;
             } else {
               experimentalDistributedVariableComponentsBuilder_.addAllMessages(other.experimentalDistributedVariableComponents_);
             }
@@ -13447,7 +13448,7 @@ public Builder mergeFrom(
               } // case 8
               case 18: {
                 input.readMessage(
-                    getShapeFieldBuilder().getBuilder(),
+                    internalGetShapeFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000002;
                 break;
@@ -13541,9 +13542,7 @@ public org.tensorflow.proto.DataType getDtype() {
        * @return This builder for chaining.
        */
       public Builder setDtype(org.tensorflow.proto.DataType value) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
+        if (value == null) { throw new NullPointerException(); }
         bitField0_ |= 0x00000001;
         dtype_ = value.getNumber();
         onChanged();
@@ -13651,7 +13650,7 @@ public Builder clearShape() {
       public org.tensorflow.proto.TensorShapeProto.Builder getShapeBuilder() {
         bitField0_ |= 0x00000002;
         onChanged();
-        return getShapeFieldBuilder().getBuilder();
+        return internalGetShapeFieldBuilder().getBuilder();
       }
       /**
        * .tensorflow.TensorShapeProto shape = 2;
@@ -13669,7 +13668,7 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> 
-          getShapeFieldBuilder() {
+          internalGetShapeFieldBuilder() {
         if (shapeBuilder_ == null) {
           shapeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder>(
@@ -13747,9 +13746,7 @@ public org.tensorflow.proto.VariableSynchronization getSynchronization() {
        * @return This builder for chaining.
        */
       public Builder setSynchronization(org.tensorflow.proto.VariableSynchronization value) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
+        if (value == null) { throw new NullPointerException(); }
         bitField0_ |= 0x00000008;
         synchronization_ = value.getNumber();
         onChanged();
@@ -13800,9 +13797,7 @@ public org.tensorflow.proto.VariableAggregation getAggregation() {
        * @return This builder for chaining.
        */
       public Builder setAggregation(org.tensorflow.proto.VariableAggregation value) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
+        if (value == null) { throw new NullPointerException(); }
         bitField0_ |= 0x00000010;
         aggregation_ = value.getNumber();
         onChanged();
@@ -14260,7 +14255,7 @@ public Builder removeExperimentalDistributedVariableComponents(int index) {
        */
       public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable.Builder getExperimentalDistributedVariableComponentsBuilder(
           int index) {
-        return getExperimentalDistributedVariableComponentsFieldBuilder().getBuilder(index);
+        return internalGetExperimentalDistributedVariableComponentsFieldBuilder().getBuilder(index);
       }
       /**
        * 
@@ -14314,7 +14309,7 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariableOrBuilder ge
        * repeated .tensorflow.SavedVariable experimental_distributed_variable_components = 8;
        */
       public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable.Builder addExperimentalDistributedVariableComponentsBuilder() {
-        return getExperimentalDistributedVariableComponentsFieldBuilder().addBuilder(
+        return internalGetExperimentalDistributedVariableComponentsFieldBuilder().addBuilder(
             org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable.getDefaultInstance());
       }
       /**
@@ -14331,7 +14326,7 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable.Builder add
        */
       public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable.Builder addExperimentalDistributedVariableComponentsBuilder(
           int index) {
-        return getExperimentalDistributedVariableComponentsFieldBuilder().addBuilder(
+        return internalGetExperimentalDistributedVariableComponentsFieldBuilder().addBuilder(
             index, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable.getDefaultInstance());
       }
       /**
@@ -14348,11 +14343,11 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable.Builder add
        */
       public java.util.List 
            getExperimentalDistributedVariableComponentsBuilderList() {
-        return getExperimentalDistributedVariableComponentsFieldBuilder().getBuilderList();
+        return internalGetExperimentalDistributedVariableComponentsFieldBuilder().getBuilderList();
       }
       private com.google.protobuf.RepeatedFieldBuilder<
           org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariableOrBuilder> 
-          getExperimentalDistributedVariableComponentsFieldBuilder() {
+          internalGetExperimentalDistributedVariableComponentsFieldBuilder() {
         if (experimentalDistributedVariableComponentsBuilder_ == null) {
           experimentalDistributedVariableComponentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariable.Builder, org.tensorflow.proto.SavedObjectGraphOuterClass.SavedVariableOrBuilder>(
@@ -14512,8 +14507,8 @@ public static final class FunctionSpec extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         FunctionSpec.class.getName());
     }
@@ -14573,8 +14568,8 @@ public enum JitCompile
         com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
           com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
           /* major= */ 4,
-          /* minor= */ 28,
-          /* patch= */ 3,
+          /* minor= */ 31,
+          /* patch= */ 1,
           /* suffix= */ "",
           JitCompile.class.getName());
       }
@@ -14647,7 +14642,7 @@ public JitCompile findValueByNumber(int number) {
           getDescriptorForType() {
         return getDescriptor();
       }
-      public static final com.google.protobuf.Descriptors.EnumDescriptor
+      public static com.google.protobuf.Descriptors.EnumDescriptor
           getDescriptor() {
         return org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec.getDescriptor().getEnumTypes().get(0);
       }
@@ -15023,8 +15018,8 @@ private Builder(
       private void maybeForceBuilderInitialization() {
         if (com.google.protobuf.GeneratedMessage
                 .alwaysUseFieldBuilders) {
-          getFullargspecFieldBuilder();
-          getInputSignatureFieldBuilder();
+          internalGetFullargspecFieldBuilder();
+          internalGetInputSignatureFieldBuilder();
         }
       }
       @java.lang.Override
@@ -15150,7 +15145,7 @@ public Builder mergeFrom(
                 break;
               case 10: {
                 input.readMessage(
-                    getFullargspecFieldBuilder().getBuilder(),
+                    internalGetFullargspecFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000001;
                 break;
@@ -15162,7 +15157,7 @@ public Builder mergeFrom(
               } // case 16
               case 42: {
                 input.readMessage(
-                    getInputSignatureFieldBuilder().getBuilder(),
+                    internalGetInputSignatureFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000004;
                 break;
@@ -15308,7 +15303,7 @@ public Builder clearFullargspec() {
       public org.tensorflow.proto.Struct.StructuredValue.Builder getFullargspecBuilder() {
         bitField0_ |= 0x00000001;
         onChanged();
-        return getFullargspecFieldBuilder().getBuilder();
+        return internalGetFullargspecFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -15334,7 +15329,7 @@ public org.tensorflow.proto.Struct.StructuredValueOrBuilder getFullargspecOrBuil
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder> 
-          getFullargspecFieldBuilder() {
+          internalGetFullargspecFieldBuilder() {
         if (fullargspecBuilder_ == null) {
           fullargspecBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder>(
@@ -15509,7 +15504,7 @@ public Builder clearInputSignature() {
       public org.tensorflow.proto.Struct.StructuredValue.Builder getInputSignatureBuilder() {
         bitField0_ |= 0x00000004;
         onChanged();
-        return getInputSignatureFieldBuilder().getBuilder();
+        return internalGetInputSignatureFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -15535,7 +15530,7 @@ public org.tensorflow.proto.Struct.StructuredValueOrBuilder getInputSignatureOrB
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder> 
-          getInputSignatureFieldBuilder() {
+          internalGetInputSignatureFieldBuilder() {
         if (inputSignatureBuilder_ == null) {
           inputSignatureBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder>(
@@ -15581,9 +15576,7 @@ public org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec.JitCompile g
        * @return This builder for chaining.
        */
       public Builder setJitCompile(org.tensorflow.proto.SavedObjectGraphOuterClass.FunctionSpec.JitCompile value) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
+        if (value == null) { throw new NullPointerException(); }
         bitField0_ |= 0x00000008;
         jitCompile_ = value.getNumber();
         onChanged();
@@ -15697,8 +15690,8 @@ public static final class SavedResource extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         SavedResource.class.getName());
     }
@@ -16260,8 +16253,8 @@ public static final class SaveableObject extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         SaveableObject.class.getName());
     }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedSlice.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedSlice.java
index f25165bb36a..6d1e6a11820 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedSlice.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedSlice.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/util/saved_tensor_slice.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -13,6 +13,7 @@
  *
  * Protobuf type {@code tensorflow.SavedSlice}
  */
+@com.google.protobuf.Generated
 public final class SavedSlice extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.SavedSlice)
@@ -22,8 +23,8 @@ public final class SavedSlice extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       SavedSlice.class.getName());
   }
@@ -406,8 +407,8 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getSliceFieldBuilder();
-        getDataFieldBuilder();
+        internalGetSliceFieldBuilder();
+        internalGetDataFieldBuilder();
       }
     }
     @java.lang.Override
@@ -533,14 +534,14 @@ public Builder mergeFrom(
             } // case 10
             case 18: {
               input.readMessage(
-                  getSliceFieldBuilder().getBuilder(),
+                  internalGetSliceFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000002;
               break;
             } // case 18
             case 26: {
               input.readMessage(
-                  getDataFieldBuilder().getBuilder(),
+                  internalGetDataFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000004;
               break;
@@ -785,7 +786,7 @@ public Builder clearSlice() {
     public org.tensorflow.proto.TensorSliceProto.Builder getSliceBuilder() {
       bitField0_ |= 0x00000002;
       onChanged();
-      return getSliceFieldBuilder().getBuilder();
+      return internalGetSliceFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -813,7 +814,7 @@ public org.tensorflow.proto.TensorSliceProtoOrBuilder getSliceOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.TensorSliceProto, org.tensorflow.proto.TensorSliceProto.Builder, org.tensorflow.proto.TensorSliceProtoOrBuilder> 
-        getSliceFieldBuilder() {
+        internalGetSliceFieldBuilder() {
       if (sliceBuilder_ == null) {
         sliceBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorSliceProto, org.tensorflow.proto.TensorSliceProto.Builder, org.tensorflow.proto.TensorSliceProtoOrBuilder>(
@@ -951,7 +952,7 @@ public Builder clearData() {
     public org.tensorflow.proto.TensorProto.Builder getDataBuilder() {
       bitField0_ |= 0x00000004;
       onChanged();
-      return getDataFieldBuilder().getBuilder();
+      return internalGetDataFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -979,7 +980,7 @@ public org.tensorflow.proto.TensorProtoOrBuilder getDataOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> 
-        getDataFieldBuilder() {
+        internalGetDataFieldBuilder() {
       if (dataBuilder_ == null) {
         dataBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedSliceMeta.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedSliceMeta.java
index 6718d0c6493..49cf5eb182a 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedSliceMeta.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedSliceMeta.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/util/saved_tensor_slice.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -13,6 +13,7 @@
  *
  * Protobuf type {@code tensorflow.SavedSliceMeta}
  */
+@com.google.protobuf.Generated
 public final class SavedSliceMeta extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.SavedSliceMeta)
@@ -22,8 +23,8 @@ public final class SavedSliceMeta extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       SavedSliceMeta.class.getName());
   }
@@ -456,8 +457,8 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getShapeFieldBuilder();
-        getSliceFieldBuilder();
+        internalGetShapeFieldBuilder();
+        internalGetSliceFieldBuilder();
       }
     }
     @java.lang.Override
@@ -583,7 +584,7 @@ public Builder mergeFrom(org.tensorflow.proto.SavedSliceMeta other) {
             bitField0_ = (bitField0_ & ~0x00000008);
             sliceBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getSliceFieldBuilder() : null;
+                 internalGetSliceFieldBuilder() : null;
           } else {
             sliceBuilder_.addAllMessages(other.slice_);
           }
@@ -622,7 +623,7 @@ public Builder mergeFrom(
             } // case 10
             case 18: {
               input.readMessage(
-                  getShapeFieldBuilder().getBuilder(),
+                  internalGetShapeFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000002;
               break;
@@ -873,7 +874,7 @@ public Builder clearShape() {
     public org.tensorflow.proto.TensorShapeProto.Builder getShapeBuilder() {
       bitField0_ |= 0x00000002;
       onChanged();
-      return getShapeFieldBuilder().getBuilder();
+      return internalGetShapeFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -899,7 +900,7 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> 
-        getShapeFieldBuilder() {
+        internalGetShapeFieldBuilder() {
       if (shapeBuilder_ == null) {
         shapeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder>(
@@ -961,9 +962,7 @@ public org.tensorflow.proto.DataType getType() {
      * @return This builder for chaining.
      */
     public Builder setType(org.tensorflow.proto.DataType value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000004;
       type_ = value.getNumber();
       onChanged();
@@ -1216,7 +1215,7 @@ public Builder removeSlice(int index) {
      */
     public org.tensorflow.proto.TensorSliceProto.Builder getSliceBuilder(
         int index) {
-      return getSliceFieldBuilder().getBuilder(index);
+      return internalGetSliceFieldBuilder().getBuilder(index);
     }
     /**
      * 
@@ -1255,7 +1254,7 @@ public org.tensorflow.proto.TensorSliceProtoOrBuilder getSliceOrBuilder(
      * repeated .tensorflow.TensorSliceProto slice = 4;
      */
     public org.tensorflow.proto.TensorSliceProto.Builder addSliceBuilder() {
-      return getSliceFieldBuilder().addBuilder(
+      return internalGetSliceFieldBuilder().addBuilder(
           org.tensorflow.proto.TensorSliceProto.getDefaultInstance());
     }
     /**
@@ -1267,7 +1266,7 @@ public org.tensorflow.proto.TensorSliceProto.Builder addSliceBuilder() {
      */
     public org.tensorflow.proto.TensorSliceProto.Builder addSliceBuilder(
         int index) {
-      return getSliceFieldBuilder().addBuilder(
+      return internalGetSliceFieldBuilder().addBuilder(
           index, org.tensorflow.proto.TensorSliceProto.getDefaultInstance());
     }
     /**
@@ -1279,11 +1278,11 @@ public org.tensorflow.proto.TensorSliceProto.Builder addSliceBuilder(
      */
     public java.util.List 
          getSliceBuilderList() {
-      return getSliceFieldBuilder().getBuilderList();
+      return internalGetSliceFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.TensorSliceProto, org.tensorflow.proto.TensorSliceProto.Builder, org.tensorflow.proto.TensorSliceProtoOrBuilder> 
-        getSliceFieldBuilder() {
+        internalGetSliceFieldBuilder() {
       if (sliceBuilder_ == null) {
         sliceBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.TensorSliceProto, org.tensorflow.proto.TensorSliceProto.Builder, org.tensorflow.proto.TensorSliceProtoOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedSliceMetaOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedSliceMetaOrBuilder.java
index b16e0be04c9..652da6151dd 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedSliceMetaOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedSliceMetaOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/util/saved_tensor_slice.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface SavedSliceMetaOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.SavedSliceMeta)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedSliceOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedSliceOrBuilder.java
index 0b485f9caca..eab28692d36 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedSliceOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedSliceOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/util/saved_tensor_slice.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface SavedSliceOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.SavedSlice)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSliceMeta.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSliceMeta.java
index ebe9c66228b..e6ca5f2964d 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSliceMeta.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSliceMeta.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/util/saved_tensor_slice.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -13,6 +13,7 @@
  *
  * Protobuf type {@code tensorflow.SavedTensorSliceMeta}
  */
+@com.google.protobuf.Generated
 public final class SavedTensorSliceMeta extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.SavedTensorSliceMeta)
@@ -22,8 +23,8 @@ public final class SavedTensorSliceMeta extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       SavedTensorSliceMeta.class.getName());
   }
@@ -364,8 +365,8 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getTensorFieldBuilder();
-        getVersionsFieldBuilder();
+        internalGetTensorFieldBuilder();
+        internalGetVersionsFieldBuilder();
       }
     }
     @java.lang.Override
@@ -472,7 +473,7 @@ public Builder mergeFrom(org.tensorflow.proto.SavedTensorSliceMeta other) {
             bitField0_ = (bitField0_ & ~0x00000001);
             tensorBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getTensorFieldBuilder() : null;
+                 internalGetTensorFieldBuilder() : null;
           } else {
             tensorBuilder_.addAllMessages(other.tensor_);
           }
@@ -522,7 +523,7 @@ public Builder mergeFrom(
             } // case 10
             case 18: {
               input.readMessage(
-                  getVersionsFieldBuilder().getBuilder(),
+                  internalGetVersionsFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000002;
               break;
@@ -776,7 +777,7 @@ public Builder removeTensor(int index) {
      */
     public org.tensorflow.proto.SavedSliceMeta.Builder getTensorBuilder(
         int index) {
-      return getTensorFieldBuilder().getBuilder(index);
+      return internalGetTensorFieldBuilder().getBuilder(index);
     }
     /**
      * 
@@ -815,7 +816,7 @@ public org.tensorflow.proto.SavedSliceMetaOrBuilder getTensorOrBuilder(
      * repeated .tensorflow.SavedSliceMeta tensor = 1;
      */
     public org.tensorflow.proto.SavedSliceMeta.Builder addTensorBuilder() {
-      return getTensorFieldBuilder().addBuilder(
+      return internalGetTensorFieldBuilder().addBuilder(
           org.tensorflow.proto.SavedSliceMeta.getDefaultInstance());
     }
     /**
@@ -827,7 +828,7 @@ public org.tensorflow.proto.SavedSliceMeta.Builder addTensorBuilder() {
      */
     public org.tensorflow.proto.SavedSliceMeta.Builder addTensorBuilder(
         int index) {
-      return getTensorFieldBuilder().addBuilder(
+      return internalGetTensorFieldBuilder().addBuilder(
           index, org.tensorflow.proto.SavedSliceMeta.getDefaultInstance());
     }
     /**
@@ -839,11 +840,11 @@ public org.tensorflow.proto.SavedSliceMeta.Builder addTensorBuilder(
      */
     public java.util.List 
          getTensorBuilderList() {
-      return getTensorFieldBuilder().getBuilderList();
+      return internalGetTensorFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.SavedSliceMeta, org.tensorflow.proto.SavedSliceMeta.Builder, org.tensorflow.proto.SavedSliceMetaOrBuilder> 
-        getTensorFieldBuilder() {
+        internalGetTensorFieldBuilder() {
       if (tensorBuilder_ == null) {
         tensorBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.SavedSliceMeta, org.tensorflow.proto.SavedSliceMeta.Builder, org.tensorflow.proto.SavedSliceMetaOrBuilder>(
@@ -982,7 +983,7 @@ public Builder clearVersions() {
     public org.tensorflow.proto.VersionDef.Builder getVersionsBuilder() {
       bitField0_ |= 0x00000002;
       onChanged();
-      return getVersionsFieldBuilder().getBuilder();
+      return internalGetVersionsFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -1010,7 +1011,7 @@ public org.tensorflow.proto.VersionDefOrBuilder getVersionsOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.VersionDef, org.tensorflow.proto.VersionDef.Builder, org.tensorflow.proto.VersionDefOrBuilder> 
-        getVersionsFieldBuilder() {
+        internalGetVersionsFieldBuilder() {
       if (versionsBuilder_ == null) {
         versionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.VersionDef, org.tensorflow.proto.VersionDef.Builder, org.tensorflow.proto.VersionDefOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSliceMetaOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSliceMetaOrBuilder.java
index bb69dc63e26..e173f37068b 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSliceMetaOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSliceMetaOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/util/saved_tensor_slice.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface SavedTensorSliceMetaOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.SavedTensorSliceMeta)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSliceProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSliceProtos.java
index 57c5be9c252..bb451fb39ef 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSliceProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSliceProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/util/saved_tensor_slice.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class SavedTensorSliceProtos {
   private SavedTensorSliceProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       SavedTensorSliceProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSlices.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSlices.java
index 73a6edbc8d1..4faaa93dd81 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSlices.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSlices.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/util/saved_tensor_slice.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -13,6 +13,7 @@
  *
  * Protobuf type {@code tensorflow.SavedTensorSlices}
  */
+@com.google.protobuf.Generated
 public final class SavedTensorSlices extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.SavedTensorSlices)
@@ -22,8 +23,8 @@ public final class SavedTensorSlices extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       SavedTensorSlices.class.getName());
   }
@@ -343,8 +344,8 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getMetaFieldBuilder();
-        getDataFieldBuilder();
+        internalGetMetaFieldBuilder();
+        internalGetDataFieldBuilder();
       }
     }
     @java.lang.Override
@@ -456,14 +457,14 @@ public Builder mergeFrom(
               break;
             case 10: {
               input.readMessage(
-                  getMetaFieldBuilder().getBuilder(),
+                  internalGetMetaFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000001;
               break;
             } // case 10
             case 18: {
               input.readMessage(
-                  getDataFieldBuilder().getBuilder(),
+                  internalGetDataFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000002;
               break;
@@ -611,7 +612,7 @@ public Builder clearMeta() {
     public org.tensorflow.proto.SavedTensorSliceMeta.Builder getMetaBuilder() {
       bitField0_ |= 0x00000001;
       onChanged();
-      return getMetaFieldBuilder().getBuilder();
+      return internalGetMetaFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -639,7 +640,7 @@ public org.tensorflow.proto.SavedTensorSliceMetaOrBuilder getMetaOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.SavedTensorSliceMeta, org.tensorflow.proto.SavedTensorSliceMeta.Builder, org.tensorflow.proto.SavedTensorSliceMetaOrBuilder> 
-        getMetaFieldBuilder() {
+        internalGetMetaFieldBuilder() {
       if (metaBuilder_ == null) {
         metaBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.SavedTensorSliceMeta, org.tensorflow.proto.SavedTensorSliceMeta.Builder, org.tensorflow.proto.SavedTensorSliceMetaOrBuilder>(
@@ -770,7 +771,7 @@ public Builder clearData() {
     public org.tensorflow.proto.SavedSlice.Builder getDataBuilder() {
       bitField0_ |= 0x00000002;
       onChanged();
-      return getDataFieldBuilder().getBuilder();
+      return internalGetDataFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -796,7 +797,7 @@ public org.tensorflow.proto.SavedSliceOrBuilder getDataOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.SavedSlice, org.tensorflow.proto.SavedSlice.Builder, org.tensorflow.proto.SavedSliceOrBuilder> 
-        getDataFieldBuilder() {
+        internalGetDataFieldBuilder() {
       if (dataBuilder_ == null) {
         dataBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.SavedSlice, org.tensorflow.proto.SavedSlice.Builder, org.tensorflow.proto.SavedSliceOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSlicesOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSlicesOrBuilder.java
index b22a704bc31..d07fe976b75 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSlicesOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SavedTensorSlicesOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/util/saved_tensor_slice.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface SavedTensorSlicesOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.SavedTensorSlices)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaverDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaverDef.java
index c7940c18c50..9e3ecf281b7 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaverDef.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaverDef.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/saver.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.SaverDef}
  */
+@com.google.protobuf.Generated
 public final class SaverDef extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.SaverDef)
@@ -21,8 +22,8 @@ public final class SaverDef extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       SaverDef.class.getName());
   }
@@ -93,8 +94,8 @@ public enum CheckpointFormatVersion
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         CheckpointFormatVersion.class.getName());
     }
@@ -179,7 +180,7 @@ public CheckpointFormatVersion findValueByNumber(int number) {
         getDescriptorForType() {
       return getDescriptor();
     }
-    public static final com.google.protobuf.Descriptors.EnumDescriptor
+    public static com.google.protobuf.Descriptors.EnumDescriptor
         getDescriptor() {
       return org.tensorflow.proto.SaverDef.getDescriptor().getEnumTypes().get(0);
     }
@@ -772,7 +773,7 @@ public Builder mergeFrom(org.tensorflow.proto.SaverDef other) {
       if (other.getSharded() != false) {
         setSharded(other.getSharded());
       }
-      if (other.getKeepCheckpointEveryNHours() != 0F) {
+      if (java.lang.Float.floatToRawIntBits(other.getKeepCheckpointEveryNHours()) != 0) {
         setKeepCheckpointEveryNHours(other.getKeepCheckpointEveryNHours());
       }
       if (other.version_ != 0) {
@@ -1312,9 +1313,7 @@ public org.tensorflow.proto.SaverDef.CheckpointFormatVersion getVersion() {
      * @return This builder for chaining.
      */
     public Builder setVersion(org.tensorflow.proto.SaverDef.CheckpointFormatVersion value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000040;
       version_ = value.getNumber();
       onChanged();
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaverDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaverDefOrBuilder.java
index 22751b6cd6c..40ae0df10c2 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaverDefOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaverDefOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/saver.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface SaverDefOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.SaverDef)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaverProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaverProtos.java
index 09a24e9951c..ccd192469f9 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaverProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SaverProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/saver.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class SaverProtos {
   private SaverProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       SaverProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ScopedAllocatorOptions.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ScopedAllocatorOptions.java
index 688a251a612..fbb56be20dc 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ScopedAllocatorOptions.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ScopedAllocatorOptions.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/rewriter_config.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.ScopedAllocatorOptions}
  */
+@com.google.protobuf.Generated
 public final class ScopedAllocatorOptions extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.ScopedAllocatorOptions)
@@ -17,8 +18,8 @@ public final class ScopedAllocatorOptions extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       ScopedAllocatorOptions.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ScopedAllocatorOptionsOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ScopedAllocatorOptionsOrBuilder.java
index 34a7e2c7eaf..2d8b8b1740d 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ScopedAllocatorOptionsOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ScopedAllocatorOptionsOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/rewriter_config.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface ScopedAllocatorOptionsOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.ScopedAllocatorOptions)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SequenceExample.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SequenceExample.java
index 37deaaff1a8..1ae3d7db4f0 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SequenceExample.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SequenceExample.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/example/example.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.SequenceExample}
  */
+@com.google.protobuf.Generated
 public final class SequenceExample extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.SequenceExample)
@@ -17,8 +18,8 @@ public final class SequenceExample extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       SequenceExample.class.getName());
   }
@@ -306,8 +307,8 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getContextFieldBuilder();
-        getFeatureListsFieldBuilder();
+        internalGetContextFieldBuilder();
+        internalGetFeatureListsFieldBuilder();
       }
     }
     @java.lang.Override
@@ -419,14 +420,14 @@ public Builder mergeFrom(
               break;
             case 10: {
               input.readMessage(
-                  getContextFieldBuilder().getBuilder(),
+                  internalGetContextFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000001;
               break;
             } // case 10
             case 18: {
               input.readMessage(
-                  getFeatureListsFieldBuilder().getBuilder(),
+                  internalGetFeatureListsFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000002;
               break;
@@ -539,7 +540,7 @@ public Builder clearContext() {
     public org.tensorflow.proto.Features.Builder getContextBuilder() {
       bitField0_ |= 0x00000001;
       onChanged();
-      return getContextFieldBuilder().getBuilder();
+      return internalGetContextFieldBuilder().getBuilder();
     }
     /**
      * .tensorflow.Features context = 1;
@@ -557,7 +558,7 @@ public org.tensorflow.proto.FeaturesOrBuilder getContextOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.Features, org.tensorflow.proto.Features.Builder, org.tensorflow.proto.FeaturesOrBuilder> 
-        getContextFieldBuilder() {
+        internalGetContextFieldBuilder() {
       if (contextBuilder_ == null) {
         contextBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.Features, org.tensorflow.proto.Features.Builder, org.tensorflow.proto.FeaturesOrBuilder>(
@@ -660,7 +661,7 @@ public Builder clearFeatureLists() {
     public org.tensorflow.proto.FeatureLists.Builder getFeatureListsBuilder() {
       bitField0_ |= 0x00000002;
       onChanged();
-      return getFeatureListsFieldBuilder().getBuilder();
+      return internalGetFeatureListsFieldBuilder().getBuilder();
     }
     /**
      * .tensorflow.FeatureLists feature_lists = 2;
@@ -678,7 +679,7 @@ public org.tensorflow.proto.FeatureListsOrBuilder getFeatureListsOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.FeatureLists, org.tensorflow.proto.FeatureLists.Builder, org.tensorflow.proto.FeatureListsOrBuilder> 
-        getFeatureListsFieldBuilder() {
+        internalGetFeatureListsFieldBuilder() {
       if (featureListsBuilder_ == null) {
         featureListsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.FeatureLists, org.tensorflow.proto.FeatureLists.Builder, org.tensorflow.proto.FeatureListsOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SequenceExampleOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SequenceExampleOrBuilder.java
index e38f99c7f8f..ee00bcfadba 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SequenceExampleOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SequenceExampleOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/example/example.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface SequenceExampleOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.SequenceExample)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SerializedDType.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SerializedDType.java
index a1c9bf8580b..8ebc8dd4236 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SerializedDType.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SerializedDType.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/types.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.SerializedDType}
  */
+@com.google.protobuf.Generated
 public final class SerializedDType extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.SerializedDType)
@@ -21,8 +22,8 @@ public final class SerializedDType extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       SerializedDType.class.getName());
   }
@@ -395,9 +396,7 @@ public org.tensorflow.proto.DataType getDatatype() {
      * @return This builder for chaining.
      */
     public Builder setDatatype(org.tensorflow.proto.DataType value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000001;
       datatype_ = value.getNumber();
       onChanged();
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SerializedDTypeOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SerializedDTypeOrBuilder.java
index ffadd4ef5f2..34bbb08782f 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SerializedDTypeOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SerializedDTypeOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/types.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface SerializedDTypeOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.SerializedDType)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ServerDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ServerDef.java
index 961f896b0c1..68f0e6421e9 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ServerDef.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ServerDef.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/tensorflow_server.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.ServerDef}
  */
+@com.google.protobuf.Generated
 public final class ServerDef extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.ServerDef)
@@ -21,8 +22,8 @@ public final class ServerDef extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       ServerDef.class.getName());
   }
@@ -602,9 +603,9 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getClusterFieldBuilder();
-        getDefaultSessionConfigFieldBuilder();
-        getClusterDeviceFiltersFieldBuilder();
+        internalGetClusterFieldBuilder();
+        internalGetDefaultSessionConfigFieldBuilder();
+        internalGetClusterDeviceFiltersFieldBuilder();
       }
     }
     @java.lang.Override
@@ -769,7 +770,7 @@ public Builder mergeFrom(
               break;
             case 10: {
               input.readMessage(
-                  getClusterFieldBuilder().getBuilder(),
+                  internalGetClusterFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000001;
               break;
@@ -786,7 +787,7 @@ public Builder mergeFrom(
             } // case 24
             case 34: {
               input.readMessage(
-                  getDefaultSessionConfigFieldBuilder().getBuilder(),
+                  internalGetDefaultSessionConfigFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000010;
               break;
@@ -803,7 +804,7 @@ public Builder mergeFrom(
             } // case 48
             case 58: {
               input.readMessage(
-                  getClusterDeviceFiltersFieldBuilder().getBuilder(),
+                  internalGetClusterDeviceFiltersFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000080;
               break;
@@ -949,7 +950,7 @@ public Builder clearCluster() {
     public org.tensorflow.proto.ClusterDef.Builder getClusterBuilder() {
       bitField0_ |= 0x00000001;
       onChanged();
-      return getClusterFieldBuilder().getBuilder();
+      return internalGetClusterFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -975,7 +976,7 @@ public org.tensorflow.proto.ClusterDefOrBuilder getClusterOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.ClusterDef, org.tensorflow.proto.ClusterDef.Builder, org.tensorflow.proto.ClusterDefOrBuilder> 
-        getClusterFieldBuilder() {
+        internalGetClusterFieldBuilder() {
       if (clusterBuilder_ == null) {
         clusterBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.ClusterDef, org.tensorflow.proto.ClusterDef.Builder, org.tensorflow.proto.ClusterDefOrBuilder>(
@@ -1310,7 +1311,7 @@ public Builder clearDefaultSessionConfig() {
     public org.tensorflow.proto.ConfigProto.Builder getDefaultSessionConfigBuilder() {
       bitField0_ |= 0x00000010;
       onChanged();
-      return getDefaultSessionConfigFieldBuilder().getBuilder();
+      return internalGetDefaultSessionConfigFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -1336,7 +1337,7 @@ public org.tensorflow.proto.ConfigProtoOrBuilder getDefaultSessionConfigOrBuilde
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.ConfigProto, org.tensorflow.proto.ConfigProto.Builder, org.tensorflow.proto.ConfigProtoOrBuilder> 
-        getDefaultSessionConfigFieldBuilder() {
+        internalGetDefaultSessionConfigFieldBuilder() {
       if (defaultSessionConfigBuilder_ == null) {
         defaultSessionConfigBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.ConfigProto, org.tensorflow.proto.ConfigProto.Builder, org.tensorflow.proto.ConfigProtoOrBuilder>(
@@ -1620,7 +1621,7 @@ public Builder clearClusterDeviceFilters() {
     public org.tensorflow.proto.ClusterDeviceFilters.Builder getClusterDeviceFiltersBuilder() {
       bitField0_ |= 0x00000080;
       onChanged();
-      return getClusterDeviceFiltersFieldBuilder().getBuilder();
+      return internalGetClusterDeviceFiltersFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -1648,7 +1649,7 @@ public org.tensorflow.proto.ClusterDeviceFiltersOrBuilder getClusterDeviceFilter
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.ClusterDeviceFilters, org.tensorflow.proto.ClusterDeviceFilters.Builder, org.tensorflow.proto.ClusterDeviceFiltersOrBuilder> 
-        getClusterDeviceFiltersFieldBuilder() {
+        internalGetClusterDeviceFiltersFieldBuilder() {
       if (clusterDeviceFiltersBuilder_ == null) {
         clusterDeviceFiltersBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.ClusterDeviceFilters, org.tensorflow.proto.ClusterDeviceFilters.Builder, org.tensorflow.proto.ClusterDeviceFiltersOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ServerDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ServerDefOrBuilder.java
index b6f191e3c59..c0265dacefa 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ServerDefOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ServerDefOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/tensorflow_server.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface ServerDefOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.ServerDef)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ServerProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ServerProtos.java
index 56fff5364e9..d196a7dd790 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ServerProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ServerProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/tensorflow_server.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class ServerProtos {
   private ServerProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       ServerProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SessionLog.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SessionLog.java
index 1bcf1d93e9a..66e91e3385b 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SessionLog.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SessionLog.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/util/event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.SessionLog}
  */
+@com.google.protobuf.Generated
 public final class SessionLog extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.SessionLog)
@@ -21,8 +22,8 @@ public final class SessionLog extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       SessionLog.class.getName());
   }
@@ -77,8 +78,8 @@ public enum SessionStatus
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         SessionStatus.class.getName());
     }
@@ -156,7 +157,7 @@ public SessionStatus findValueByNumber(int number) {
         getDescriptorForType() {
       return getDescriptor();
     }
-    public static final com.google.protobuf.Descriptors.EnumDescriptor
+    public static com.google.protobuf.Descriptors.EnumDescriptor
         getDescriptor() {
       return org.tensorflow.proto.SessionLog.getDescriptor().getEnumTypes().get(0);
     }
@@ -666,9 +667,7 @@ public org.tensorflow.proto.SessionLog.SessionStatus getStatus() {
      * @return This builder for chaining.
      */
     public Builder setStatus(org.tensorflow.proto.SessionLog.SessionStatus value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000001;
       status_ = value.getNumber();
       onChanged();
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SessionLogOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SessionLogOrBuilder.java
index 1c97f0c82e8..95cc3cb40e1 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SessionLogOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SessionLogOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/util/event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface SessionLogOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.SessionLog)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SessionMetadata.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SessionMetadata.java
index 3031e8e58cb..af2bd937259 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SessionMetadata.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SessionMetadata.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/config.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -19,6 +19,7 @@
  *
  * Protobuf type {@code tensorflow.SessionMetadata}
  */
+@com.google.protobuf.Generated
 public final class SessionMetadata extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.SessionMetadata)
@@ -28,8 +29,8 @@ public final class SessionMetadata extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       SessionMetadata.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SessionMetadataOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SessionMetadataOrBuilder.java
index 2401495d7e2..e6e64d9984d 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SessionMetadataOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SessionMetadataOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/config.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface SessionMetadataOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.SessionMetadata)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SignatureDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SignatureDef.java
index 6e0faf13917..3fd15f42a30 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SignatureDef.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SignatureDef.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/meta_graph.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -13,6 +13,7 @@
  *
  * Protobuf type {@code tensorflow.SignatureDef}
  */
+@com.google.protobuf.Generated
 public final class SignatureDef extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.SignatureDef)
@@ -22,8 +23,8 @@ public final class SignatureDef extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       SignatureDef.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SignatureDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SignatureDefOrBuilder.java
index 0e581154587..2b6c915b66f 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SignatureDefOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SignatureDefOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/meta_graph.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface SignatureDefOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.SignatureDef)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SourceFile.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SourceFile.java
index ea02bfde086..96d4c6bde11 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SourceFile.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SourceFile.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/debug_event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -13,6 +13,7 @@
  *
  * Protobuf type {@code tensorflow.SourceFile}
  */
+@com.google.protobuf.Generated
 public final class SourceFile extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.SourceFile)
@@ -22,8 +23,8 @@ public final class SourceFile extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       SourceFile.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SourceFileOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SourceFileOrBuilder.java
index b4ba2c5003a..eedf018ca17 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SourceFileOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SourceFileOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/debug_event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface SourceFileOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.SourceFile)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SourceMetadata.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SourceMetadata.java
index 4ba484f32c5..01fd1cd7c07 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SourceMetadata.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SourceMetadata.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/util/event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.SourceMetadata}
  */
+@com.google.protobuf.Generated
 public final class SourceMetadata extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.SourceMetadata)
@@ -21,8 +22,8 @@ public final class SourceMetadata extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       SourceMetadata.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SourceMetadataOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SourceMetadataOrBuilder.java
index 7517f9cb4b6..c4098278141 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SourceMetadataOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SourceMetadataOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/util/event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface SourceMetadataOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.SourceMetadata)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StackFrameWithId.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StackFrameWithId.java
index cb50e0e9abd..143c28f4f06 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StackFrameWithId.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StackFrameWithId.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/debug_event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.StackFrameWithId}
  */
+@com.google.protobuf.Generated
 public final class StackFrameWithId extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.StackFrameWithId)
@@ -21,8 +22,8 @@ public final class StackFrameWithId extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       StackFrameWithId.class.getName());
   }
@@ -348,7 +349,7 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getFileLineColFieldBuilder();
+        internalGetFileLineColFieldBuilder();
       }
     }
     @java.lang.Override
@@ -460,7 +461,7 @@ public Builder mergeFrom(
             } // case 10
             case 18: {
               input.readMessage(
-                  getFileLineColFieldBuilder().getBuilder(),
+                  internalGetFileLineColFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000002;
               break;
@@ -707,7 +708,7 @@ public Builder clearFileLineCol() {
     public org.tensorflow.proto.GraphDebugInfo.FileLineCol.Builder getFileLineColBuilder() {
       bitField0_ |= 0x00000002;
       onChanged();
-      return getFileLineColFieldBuilder().getBuilder();
+      return internalGetFileLineColFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -737,7 +738,7 @@ public org.tensorflow.proto.GraphDebugInfo.FileLineColOrBuilder getFileLineColOr
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.GraphDebugInfo.FileLineCol, org.tensorflow.proto.GraphDebugInfo.FileLineCol.Builder, org.tensorflow.proto.GraphDebugInfo.FileLineColOrBuilder> 
-        getFileLineColFieldBuilder() {
+        internalGetFileLineColFieldBuilder() {
       if (fileLineColBuilder_ == null) {
         fileLineColBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.GraphDebugInfo.FileLineCol, org.tensorflow.proto.GraphDebugInfo.FileLineCol.Builder, org.tensorflow.proto.GraphDebugInfo.FileLineColOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StackFrameWithIdOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StackFrameWithIdOrBuilder.java
index a75ee48a314..604e49cf7dc 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StackFrameWithIdOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StackFrameWithIdOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/debug_event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface StackFrameWithIdOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.StackFrameWithId)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Status.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Status.java
index 39e89e7969d..3eb5602e79c 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Status.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Status.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/status.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class Status {
   private Status() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       Status.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StatusProto.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StatusProto.java
index 43cb0aec28b..590608f8c3d 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StatusProto.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StatusProto.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/status.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -13,6 +13,7 @@
  *
  * Protobuf type {@code tensorflow.StatusProto}
  */
+@com.google.protobuf.Generated
 public final class StatusProto extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.StatusProto)
@@ -22,8 +23,8 @@ public final class StatusProto extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       StatusProto.class.getName());
   }
@@ -667,9 +668,7 @@ public org.tensorflow.proto.error.Code getCode() {
      * @return This builder for chaining.
      */
     public Builder setCode(org.tensorflow.proto.error.Code value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000001;
       code_ = value.getNumber();
       onChanged();
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StatusProtoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StatusProtoOrBuilder.java
index ca1ada631f8..63e08cd05b2 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StatusProtoOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StatusProtoOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/status.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface StatusProtoOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.StatusProto)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StepStats.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StepStats.java
index 2625199ba7b..0519ae8ff78 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StepStats.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StepStats.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/step_stats.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.StepStats}
  */
+@com.google.protobuf.Generated
 public final class StepStats extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.StepStats)
@@ -17,8 +18,8 @@ public final class StepStats extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       StepStats.class.getName());
   }
@@ -364,7 +365,7 @@ public Builder mergeFrom(org.tensorflow.proto.StepStats other) {
             bitField0_ = (bitField0_ & ~0x00000001);
             devStatsBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getDevStatsFieldBuilder() : null;
+                 internalGetDevStatsFieldBuilder() : null;
           } else {
             devStatsBuilder_.addAllMessages(other.devStats_);
           }
@@ -606,7 +607,7 @@ public Builder removeDevStats(int index) {
      */
     public org.tensorflow.proto.DeviceStepStats.Builder getDevStatsBuilder(
         int index) {
-      return getDevStatsFieldBuilder().getBuilder(index);
+      return internalGetDevStatsFieldBuilder().getBuilder(index);
     }
     /**
      * repeated .tensorflow.DeviceStepStats dev_stats = 1;
@@ -633,7 +634,7 @@ public org.tensorflow.proto.DeviceStepStatsOrBuilder getDevStatsOrBuilder(
      * repeated .tensorflow.DeviceStepStats dev_stats = 1;
      */
     public org.tensorflow.proto.DeviceStepStats.Builder addDevStatsBuilder() {
-      return getDevStatsFieldBuilder().addBuilder(
+      return internalGetDevStatsFieldBuilder().addBuilder(
           org.tensorflow.proto.DeviceStepStats.getDefaultInstance());
     }
     /**
@@ -641,7 +642,7 @@ public org.tensorflow.proto.DeviceStepStats.Builder addDevStatsBuilder() {
      */
     public org.tensorflow.proto.DeviceStepStats.Builder addDevStatsBuilder(
         int index) {
-      return getDevStatsFieldBuilder().addBuilder(
+      return internalGetDevStatsFieldBuilder().addBuilder(
           index, org.tensorflow.proto.DeviceStepStats.getDefaultInstance());
     }
     /**
@@ -649,11 +650,11 @@ public org.tensorflow.proto.DeviceStepStats.Builder addDevStatsBuilder(
      */
     public java.util.List 
          getDevStatsBuilderList() {
-      return getDevStatsFieldBuilder().getBuilderList();
+      return internalGetDevStatsFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.DeviceStepStats, org.tensorflow.proto.DeviceStepStats.Builder, org.tensorflow.proto.DeviceStepStatsOrBuilder> 
-        getDevStatsFieldBuilder() {
+        internalGetDevStatsFieldBuilder() {
       if (devStatsBuilder_ == null) {
         devStatsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.DeviceStepStats, org.tensorflow.proto.DeviceStepStats.Builder, org.tensorflow.proto.DeviceStepStatsOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StepStatsOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StepStatsOrBuilder.java
index 3accebd26e9..dacdc84a7d2 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StepStatsOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StepStatsOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/step_stats.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface StepStatsOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.StepStats)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StepStatsProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StepStatsProtos.java
index 859a9f24f42..adad8e326fc 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StepStatsProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/StepStatsProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/step_stats.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class StepStatsProtos {
   private StepStatsProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       StepStatsProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Struct.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Struct.java
index 4c87522127d..7a9688c7f99 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Struct.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Struct.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/struct.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class Struct {
   private Struct() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       Struct.class.getName());
   }
@@ -498,8 +499,8 @@ public static final class StructuredValue extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         StructuredValue.class.getName());
     }
@@ -1973,7 +1974,7 @@ public Builder mergeFrom(
                 break;
               case 10: {
                 input.readMessage(
-                    getNoneValueFieldBuilder().getBuilder(),
+                    internalGetNoneValueFieldBuilder().getBuilder(),
                     extensionRegistry);
                 kindCase_ = 1;
                 break;
@@ -2001,7 +2002,7 @@ public Builder mergeFrom(
               } // case 112
               case 250: {
                 input.readMessage(
-                    getTensorShapeValueFieldBuilder().getBuilder(),
+                    internalGetTensorShapeValueFieldBuilder().getBuilder(),
                     extensionRegistry);
                 kindCase_ = 31;
                 break;
@@ -2014,63 +2015,63 @@ public Builder mergeFrom(
               } // case 256
               case 266: {
                 input.readMessage(
-                    getTensorSpecValueFieldBuilder().getBuilder(),
+                    internalGetTensorSpecValueFieldBuilder().getBuilder(),
                     extensionRegistry);
                 kindCase_ = 33;
                 break;
               } // case 266
               case 274: {
                 input.readMessage(
-                    getTypeSpecValueFieldBuilder().getBuilder(),
+                    internalGetTypeSpecValueFieldBuilder().getBuilder(),
                     extensionRegistry);
                 kindCase_ = 34;
                 break;
               } // case 274
               case 282: {
                 input.readMessage(
-                    getBoundedTensorSpecValueFieldBuilder().getBuilder(),
+                    internalGetBoundedTensorSpecValueFieldBuilder().getBuilder(),
                     extensionRegistry);
                 kindCase_ = 35;
                 break;
               } // case 282
               case 410: {
                 input.readMessage(
-                    getListValueFieldBuilder().getBuilder(),
+                    internalGetListValueFieldBuilder().getBuilder(),
                     extensionRegistry);
                 kindCase_ = 51;
                 break;
               } // case 410
               case 418: {
                 input.readMessage(
-                    getTupleValueFieldBuilder().getBuilder(),
+                    internalGetTupleValueFieldBuilder().getBuilder(),
                     extensionRegistry);
                 kindCase_ = 52;
                 break;
               } // case 418
               case 426: {
                 input.readMessage(
-                    getDictValueFieldBuilder().getBuilder(),
+                    internalGetDictValueFieldBuilder().getBuilder(),
                     extensionRegistry);
                 kindCase_ = 53;
                 break;
               } // case 426
               case 434: {
                 input.readMessage(
-                    getNamedTupleValueFieldBuilder().getBuilder(),
+                    internalGetNamedTupleValueFieldBuilder().getBuilder(),
                     extensionRegistry);
                 kindCase_ = 54;
                 break;
               } // case 434
               case 442: {
                 input.readMessage(
-                    getTensorValueFieldBuilder().getBuilder(),
+                    internalGetTensorValueFieldBuilder().getBuilder(),
                     extensionRegistry);
                 kindCase_ = 55;
                 break;
               } // case 442
               case 450: {
                 input.readMessage(
-                    getNumpyValueFieldBuilder().getBuilder(),
+                    internalGetNumpyValueFieldBuilder().getBuilder(),
                     extensionRegistry);
                 kindCase_ = 56;
                 break;
@@ -2239,7 +2240,7 @@ public Builder clearNoneValue() {
        * .tensorflow.NoneValue none_value = 1;
        */
       public org.tensorflow.proto.Struct.NoneValue.Builder getNoneValueBuilder() {
-        return getNoneValueFieldBuilder().getBuilder();
+        return internalGetNoneValueFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -2268,7 +2269,7 @@ public org.tensorflow.proto.Struct.NoneValueOrBuilder getNoneValueOrBuilder() {
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.Struct.NoneValue, org.tensorflow.proto.Struct.NoneValue.Builder, org.tensorflow.proto.Struct.NoneValueOrBuilder> 
-          getNoneValueFieldBuilder() {
+          internalGetNoneValueFieldBuilder() {
         if (noneValueBuilder_ == null) {
           if (!(kindCase_ == 1)) {
             kind_ = org.tensorflow.proto.Struct.NoneValue.getDefaultInstance();
@@ -2742,7 +2743,7 @@ public Builder clearTensorShapeValue() {
        * .tensorflow.TensorShapeProto tensor_shape_value = 31;
        */
       public org.tensorflow.proto.TensorShapeProto.Builder getTensorShapeValueBuilder() {
-        return getTensorShapeValueFieldBuilder().getBuilder();
+        return internalGetTensorShapeValueFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -2771,7 +2772,7 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getTensorShapeValueOrBuild
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> 
-          getTensorShapeValueFieldBuilder() {
+          internalGetTensorShapeValueFieldBuilder() {
         if (tensorShapeValueBuilder_ == null) {
           if (!(kindCase_ == 31)) {
             kind_ = org.tensorflow.proto.TensorShapeProto.getDefaultInstance();
@@ -2857,9 +2858,7 @@ public org.tensorflow.proto.DataType getTensorDtypeValue() {
        * @return This builder for chaining.
        */
       public Builder setTensorDtypeValue(org.tensorflow.proto.DataType value) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
+        if (value == null) { throw new NullPointerException(); }
         kindCase_ = 32;
         kind_ = value.getNumber();
         onChanged();
@@ -3014,7 +3013,7 @@ public Builder clearTensorSpecValue() {
        * .tensorflow.TensorSpecProto tensor_spec_value = 33;
        */
       public org.tensorflow.proto.Struct.TensorSpecProto.Builder getTensorSpecValueBuilder() {
-        return getTensorSpecValueFieldBuilder().getBuilder();
+        return internalGetTensorSpecValueFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -3043,7 +3042,7 @@ public org.tensorflow.proto.Struct.TensorSpecProtoOrBuilder getTensorSpecValueOr
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.Struct.TensorSpecProto, org.tensorflow.proto.Struct.TensorSpecProto.Builder, org.tensorflow.proto.Struct.TensorSpecProtoOrBuilder> 
-          getTensorSpecValueFieldBuilder() {
+          internalGetTensorSpecValueFieldBuilder() {
         if (tensorSpecValueBuilder_ == null) {
           if (!(kindCase_ == 33)) {
             kind_ = org.tensorflow.proto.Struct.TensorSpecProto.getDefaultInstance();
@@ -3192,7 +3191,7 @@ public Builder clearTypeSpecValue() {
        * .tensorflow.TypeSpecProto type_spec_value = 34;
        */
       public org.tensorflow.proto.Struct.TypeSpecProto.Builder getTypeSpecValueBuilder() {
-        return getTypeSpecValueFieldBuilder().getBuilder();
+        return internalGetTypeSpecValueFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -3221,7 +3220,7 @@ public org.tensorflow.proto.Struct.TypeSpecProtoOrBuilder getTypeSpecValueOrBuil
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.Struct.TypeSpecProto, org.tensorflow.proto.Struct.TypeSpecProto.Builder, org.tensorflow.proto.Struct.TypeSpecProtoOrBuilder> 
-          getTypeSpecValueFieldBuilder() {
+          internalGetTypeSpecValueFieldBuilder() {
         if (typeSpecValueBuilder_ == null) {
           if (!(kindCase_ == 34)) {
             kind_ = org.tensorflow.proto.Struct.TypeSpecProto.getDefaultInstance();
@@ -3370,7 +3369,7 @@ public Builder clearBoundedTensorSpecValue() {
        * .tensorflow.BoundedTensorSpecProto bounded_tensor_spec_value = 35;
        */
       public org.tensorflow.proto.Struct.BoundedTensorSpecProto.Builder getBoundedTensorSpecValueBuilder() {
-        return getBoundedTensorSpecValueFieldBuilder().getBuilder();
+        return internalGetBoundedTensorSpecValueFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -3399,7 +3398,7 @@ public org.tensorflow.proto.Struct.BoundedTensorSpecProtoOrBuilder getBoundedTen
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.Struct.BoundedTensorSpecProto, org.tensorflow.proto.Struct.BoundedTensorSpecProto.Builder, org.tensorflow.proto.Struct.BoundedTensorSpecProtoOrBuilder> 
-          getBoundedTensorSpecValueFieldBuilder() {
+          internalGetBoundedTensorSpecValueFieldBuilder() {
         if (boundedTensorSpecValueBuilder_ == null) {
           if (!(kindCase_ == 35)) {
             kind_ = org.tensorflow.proto.Struct.BoundedTensorSpecProto.getDefaultInstance();
@@ -3548,7 +3547,7 @@ public Builder clearListValue() {
        * .tensorflow.ListValue list_value = 51;
        */
       public org.tensorflow.proto.Struct.ListValue.Builder getListValueBuilder() {
-        return getListValueFieldBuilder().getBuilder();
+        return internalGetListValueFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -3577,7 +3576,7 @@ public org.tensorflow.proto.Struct.ListValueOrBuilder getListValueOrBuilder() {
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.Struct.ListValue, org.tensorflow.proto.Struct.ListValue.Builder, org.tensorflow.proto.Struct.ListValueOrBuilder> 
-          getListValueFieldBuilder() {
+          internalGetListValueFieldBuilder() {
         if (listValueBuilder_ == null) {
           if (!(kindCase_ == 51)) {
             kind_ = org.tensorflow.proto.Struct.ListValue.getDefaultInstance();
@@ -3726,7 +3725,7 @@ public Builder clearTupleValue() {
        * .tensorflow.TupleValue tuple_value = 52;
        */
       public org.tensorflow.proto.Struct.TupleValue.Builder getTupleValueBuilder() {
-        return getTupleValueFieldBuilder().getBuilder();
+        return internalGetTupleValueFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -3755,7 +3754,7 @@ public org.tensorflow.proto.Struct.TupleValueOrBuilder getTupleValueOrBuilder()
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.Struct.TupleValue, org.tensorflow.proto.Struct.TupleValue.Builder, org.tensorflow.proto.Struct.TupleValueOrBuilder> 
-          getTupleValueFieldBuilder() {
+          internalGetTupleValueFieldBuilder() {
         if (tupleValueBuilder_ == null) {
           if (!(kindCase_ == 52)) {
             kind_ = org.tensorflow.proto.Struct.TupleValue.getDefaultInstance();
@@ -3904,7 +3903,7 @@ public Builder clearDictValue() {
        * .tensorflow.DictValue dict_value = 53;
        */
       public org.tensorflow.proto.Struct.DictValue.Builder getDictValueBuilder() {
-        return getDictValueFieldBuilder().getBuilder();
+        return internalGetDictValueFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -3933,7 +3932,7 @@ public org.tensorflow.proto.Struct.DictValueOrBuilder getDictValueOrBuilder() {
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.Struct.DictValue, org.tensorflow.proto.Struct.DictValue.Builder, org.tensorflow.proto.Struct.DictValueOrBuilder> 
-          getDictValueFieldBuilder() {
+          internalGetDictValueFieldBuilder() {
         if (dictValueBuilder_ == null) {
           if (!(kindCase_ == 53)) {
             kind_ = org.tensorflow.proto.Struct.DictValue.getDefaultInstance();
@@ -4082,7 +4081,7 @@ public Builder clearNamedTupleValue() {
        * .tensorflow.NamedTupleValue named_tuple_value = 54;
        */
       public org.tensorflow.proto.Struct.NamedTupleValue.Builder getNamedTupleValueBuilder() {
-        return getNamedTupleValueFieldBuilder().getBuilder();
+        return internalGetNamedTupleValueFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -4111,7 +4110,7 @@ public org.tensorflow.proto.Struct.NamedTupleValueOrBuilder getNamedTupleValueOr
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.Struct.NamedTupleValue, org.tensorflow.proto.Struct.NamedTupleValue.Builder, org.tensorflow.proto.Struct.NamedTupleValueOrBuilder> 
-          getNamedTupleValueFieldBuilder() {
+          internalGetNamedTupleValueFieldBuilder() {
         if (namedTupleValueBuilder_ == null) {
           if (!(kindCase_ == 54)) {
             kind_ = org.tensorflow.proto.Struct.NamedTupleValue.getDefaultInstance();
@@ -4260,7 +4259,7 @@ public Builder clearTensorValue() {
        * .tensorflow.TensorProto tensor_value = 55;
        */
       public org.tensorflow.proto.TensorProto.Builder getTensorValueBuilder() {
-        return getTensorValueFieldBuilder().getBuilder();
+        return internalGetTensorValueFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -4289,7 +4288,7 @@ public org.tensorflow.proto.TensorProtoOrBuilder getTensorValueOrBuilder() {
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> 
-          getTensorValueFieldBuilder() {
+          internalGetTensorValueFieldBuilder() {
         if (tensorValueBuilder_ == null) {
           if (!(kindCase_ == 55)) {
             kind_ = org.tensorflow.proto.TensorProto.getDefaultInstance();
@@ -4438,7 +4437,7 @@ public Builder clearNumpyValue() {
        * .tensorflow.TensorProto numpy_value = 56;
        */
       public org.tensorflow.proto.TensorProto.Builder getNumpyValueBuilder() {
-        return getNumpyValueFieldBuilder().getBuilder();
+        return internalGetNumpyValueFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -4467,7 +4466,7 @@ public org.tensorflow.proto.TensorProtoOrBuilder getNumpyValueOrBuilder() {
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> 
-          getNumpyValueFieldBuilder() {
+          internalGetNumpyValueFieldBuilder() {
         if (numpyValueBuilder_ == null) {
           if (!(kindCase_ == 56)) {
             kind_ = org.tensorflow.proto.TensorProto.getDefaultInstance();
@@ -4555,8 +4554,8 @@ public static final class NoneValue extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         NoneValue.class.getName());
     }
@@ -4942,8 +4941,8 @@ public static final class ListValue extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         ListValue.class.getName());
     }
@@ -5293,7 +5292,7 @@ public Builder mergeFrom(org.tensorflow.proto.Struct.ListValue other) {
               bitField0_ = (bitField0_ & ~0x00000001);
               valuesBuilder_ = 
                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                   getValuesFieldBuilder() : null;
+                   internalGetValuesFieldBuilder() : null;
             } else {
               valuesBuilder_.addAllMessages(other.values_);
             }
@@ -5535,7 +5534,7 @@ public Builder removeValues(int index) {
        */
       public org.tensorflow.proto.Struct.StructuredValue.Builder getValuesBuilder(
           int index) {
-        return getValuesFieldBuilder().getBuilder(index);
+        return internalGetValuesFieldBuilder().getBuilder(index);
       }
       /**
        * repeated .tensorflow.StructuredValue values = 1;
@@ -5562,7 +5561,7 @@ public org.tensorflow.proto.Struct.StructuredValueOrBuilder getValuesOrBuilder(
        * repeated .tensorflow.StructuredValue values = 1;
        */
       public org.tensorflow.proto.Struct.StructuredValue.Builder addValuesBuilder() {
-        return getValuesFieldBuilder().addBuilder(
+        return internalGetValuesFieldBuilder().addBuilder(
             org.tensorflow.proto.Struct.StructuredValue.getDefaultInstance());
       }
       /**
@@ -5570,7 +5569,7 @@ public org.tensorflow.proto.Struct.StructuredValue.Builder addValuesBuilder() {
        */
       public org.tensorflow.proto.Struct.StructuredValue.Builder addValuesBuilder(
           int index) {
-        return getValuesFieldBuilder().addBuilder(
+        return internalGetValuesFieldBuilder().addBuilder(
             index, org.tensorflow.proto.Struct.StructuredValue.getDefaultInstance());
       }
       /**
@@ -5578,11 +5577,11 @@ public org.tensorflow.proto.Struct.StructuredValue.Builder addValuesBuilder(
        */
       public java.util.List 
            getValuesBuilderList() {
-        return getValuesFieldBuilder().getBuilderList();
+        return internalGetValuesFieldBuilder().getBuilderList();
       }
       private com.google.protobuf.RepeatedFieldBuilder<
           org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder> 
-          getValuesFieldBuilder() {
+          internalGetValuesFieldBuilder() {
         if (valuesBuilder_ == null) {
           valuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder>(
@@ -5690,8 +5689,8 @@ public static final class TupleValue extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         TupleValue.class.getName());
     }
@@ -6041,7 +6040,7 @@ public Builder mergeFrom(org.tensorflow.proto.Struct.TupleValue other) {
               bitField0_ = (bitField0_ & ~0x00000001);
               valuesBuilder_ = 
                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                   getValuesFieldBuilder() : null;
+                   internalGetValuesFieldBuilder() : null;
             } else {
               valuesBuilder_.addAllMessages(other.values_);
             }
@@ -6283,7 +6282,7 @@ public Builder removeValues(int index) {
        */
       public org.tensorflow.proto.Struct.StructuredValue.Builder getValuesBuilder(
           int index) {
-        return getValuesFieldBuilder().getBuilder(index);
+        return internalGetValuesFieldBuilder().getBuilder(index);
       }
       /**
        * repeated .tensorflow.StructuredValue values = 1;
@@ -6310,7 +6309,7 @@ public org.tensorflow.proto.Struct.StructuredValueOrBuilder getValuesOrBuilder(
        * repeated .tensorflow.StructuredValue values = 1;
        */
       public org.tensorflow.proto.Struct.StructuredValue.Builder addValuesBuilder() {
-        return getValuesFieldBuilder().addBuilder(
+        return internalGetValuesFieldBuilder().addBuilder(
             org.tensorflow.proto.Struct.StructuredValue.getDefaultInstance());
       }
       /**
@@ -6318,7 +6317,7 @@ public org.tensorflow.proto.Struct.StructuredValue.Builder addValuesBuilder() {
        */
       public org.tensorflow.proto.Struct.StructuredValue.Builder addValuesBuilder(
           int index) {
-        return getValuesFieldBuilder().addBuilder(
+        return internalGetValuesFieldBuilder().addBuilder(
             index, org.tensorflow.proto.Struct.StructuredValue.getDefaultInstance());
       }
       /**
@@ -6326,11 +6325,11 @@ public org.tensorflow.proto.Struct.StructuredValue.Builder addValuesBuilder(
        */
       public java.util.List 
            getValuesBuilderList() {
-        return getValuesFieldBuilder().getBuilderList();
+        return internalGetValuesFieldBuilder().getBuilderList();
       }
       private com.google.protobuf.RepeatedFieldBuilder<
           org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder> 
-          getValuesFieldBuilder() {
+          internalGetValuesFieldBuilder() {
         if (valuesBuilder_ == null) {
           valuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder>(
@@ -6449,8 +6448,8 @@ public static final class DictValue extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         DictValue.class.getName());
     }
@@ -7153,8 +7152,8 @@ public static final class PairValue extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         PairValue.class.getName());
     }
@@ -7454,7 +7453,7 @@ private Builder(
       private void maybeForceBuilderInitialization() {
         if (com.google.protobuf.GeneratedMessage
                 .alwaysUseFieldBuilders) {
-          getValueFieldBuilder();
+          internalGetValueFieldBuilder();
         }
       }
       @java.lang.Override
@@ -7566,7 +7565,7 @@ public Builder mergeFrom(
               } // case 10
               case 18: {
                 input.readMessage(
-                    getValueFieldBuilder().getBuilder(),
+                    internalGetValueFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000002;
                 break;
@@ -7751,7 +7750,7 @@ public Builder clearValue() {
       public org.tensorflow.proto.Struct.StructuredValue.Builder getValueBuilder() {
         bitField0_ |= 0x00000002;
         onChanged();
-        return getValueFieldBuilder().getBuilder();
+        return internalGetValueFieldBuilder().getBuilder();
       }
       /**
        * .tensorflow.StructuredValue value = 2;
@@ -7769,7 +7768,7 @@ public org.tensorflow.proto.Struct.StructuredValueOrBuilder getValueOrBuilder()
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder> 
-          getValueFieldBuilder() {
+          internalGetValueFieldBuilder() {
         if (valueBuilder_ == null) {
           valueBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder>(
@@ -7888,8 +7887,8 @@ public static final class NamedTupleValue extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         NamedTupleValue.class.getName());
     }
@@ -8298,7 +8297,7 @@ public Builder mergeFrom(org.tensorflow.proto.Struct.NamedTupleValue other) {
               bitField0_ = (bitField0_ & ~0x00000002);
               valuesBuilder_ = 
                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                   getValuesFieldBuilder() : null;
+                   internalGetValuesFieldBuilder() : null;
             } else {
               valuesBuilder_.addAllMessages(other.values_);
             }
@@ -8617,7 +8616,7 @@ public Builder removeValues(int index) {
        */
       public org.tensorflow.proto.Struct.PairValue.Builder getValuesBuilder(
           int index) {
-        return getValuesFieldBuilder().getBuilder(index);
+        return internalGetValuesFieldBuilder().getBuilder(index);
       }
       /**
        * repeated .tensorflow.PairValue values = 2;
@@ -8644,7 +8643,7 @@ public org.tensorflow.proto.Struct.PairValueOrBuilder getValuesOrBuilder(
        * repeated .tensorflow.PairValue values = 2;
        */
       public org.tensorflow.proto.Struct.PairValue.Builder addValuesBuilder() {
-        return getValuesFieldBuilder().addBuilder(
+        return internalGetValuesFieldBuilder().addBuilder(
             org.tensorflow.proto.Struct.PairValue.getDefaultInstance());
       }
       /**
@@ -8652,7 +8651,7 @@ public org.tensorflow.proto.Struct.PairValue.Builder addValuesBuilder() {
        */
       public org.tensorflow.proto.Struct.PairValue.Builder addValuesBuilder(
           int index) {
-        return getValuesFieldBuilder().addBuilder(
+        return internalGetValuesFieldBuilder().addBuilder(
             index, org.tensorflow.proto.Struct.PairValue.getDefaultInstance());
       }
       /**
@@ -8660,11 +8659,11 @@ public org.tensorflow.proto.Struct.PairValue.Builder addValuesBuilder(
        */
       public java.util.List 
            getValuesBuilderList() {
-        return getValuesFieldBuilder().getBuilderList();
+        return internalGetValuesFieldBuilder().getBuilderList();
       }
       private com.google.protobuf.RepeatedFieldBuilder<
           org.tensorflow.proto.Struct.PairValue, org.tensorflow.proto.Struct.PairValue.Builder, org.tensorflow.proto.Struct.PairValueOrBuilder> 
-          getValuesFieldBuilder() {
+          internalGetValuesFieldBuilder() {
         if (valuesBuilder_ == null) {
           valuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.Struct.PairValue, org.tensorflow.proto.Struct.PairValue.Builder, org.tensorflow.proto.Struct.PairValueOrBuilder>(
@@ -8786,8 +8785,8 @@ public static final class TensorSpecProto extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         TensorSpecProto.class.getName());
     }
@@ -9116,7 +9115,7 @@ private Builder(
       private void maybeForceBuilderInitialization() {
         if (com.google.protobuf.GeneratedMessage
                 .alwaysUseFieldBuilders) {
-          getShapeFieldBuilder();
+          internalGetShapeFieldBuilder();
         }
       }
       @java.lang.Override
@@ -9235,7 +9234,7 @@ public Builder mergeFrom(
               } // case 10
               case 18: {
                 input.readMessage(
-                    getShapeFieldBuilder().getBuilder(),
+                    internalGetShapeFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000002;
                 break;
@@ -9425,7 +9424,7 @@ public Builder clearShape() {
       public org.tensorflow.proto.TensorShapeProto.Builder getShapeBuilder() {
         bitField0_ |= 0x00000002;
         onChanged();
-        return getShapeFieldBuilder().getBuilder();
+        return internalGetShapeFieldBuilder().getBuilder();
       }
       /**
        * .tensorflow.TensorShapeProto shape = 2;
@@ -9443,7 +9442,7 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> 
-          getShapeFieldBuilder() {
+          internalGetShapeFieldBuilder() {
         if (shapeBuilder_ == null) {
           shapeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder>(
@@ -9489,9 +9488,7 @@ public org.tensorflow.proto.DataType getDtype() {
        * @return This builder for chaining.
        */
       public Builder setDtype(org.tensorflow.proto.DataType value) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
+        if (value == null) { throw new NullPointerException(); }
         bitField0_ |= 0x00000004;
         dtype_ = value.getNumber();
         onChanged();
@@ -9647,8 +9644,8 @@ public static final class BoundedTensorSpecProto extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         BoundedTensorSpecProto.class.getName());
     }
@@ -10061,9 +10058,9 @@ private Builder(
       private void maybeForceBuilderInitialization() {
         if (com.google.protobuf.GeneratedMessage
                 .alwaysUseFieldBuilders) {
-          getShapeFieldBuilder();
-          getMinimumFieldBuilder();
-          getMaximumFieldBuilder();
+          internalGetShapeFieldBuilder();
+          internalGetMinimumFieldBuilder();
+          internalGetMaximumFieldBuilder();
         }
       }
       @java.lang.Override
@@ -10210,7 +10207,7 @@ public Builder mergeFrom(
               } // case 10
               case 18: {
                 input.readMessage(
-                    getShapeFieldBuilder().getBuilder(),
+                    internalGetShapeFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000002;
                 break;
@@ -10222,14 +10219,14 @@ public Builder mergeFrom(
               } // case 24
               case 34: {
                 input.readMessage(
-                    getMinimumFieldBuilder().getBuilder(),
+                    internalGetMinimumFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000008;
                 break;
               } // case 34
               case 42: {
                 input.readMessage(
-                    getMaximumFieldBuilder().getBuilder(),
+                    internalGetMaximumFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000010;
                 break;
@@ -10414,7 +10411,7 @@ public Builder clearShape() {
       public org.tensorflow.proto.TensorShapeProto.Builder getShapeBuilder() {
         bitField0_ |= 0x00000002;
         onChanged();
-        return getShapeFieldBuilder().getBuilder();
+        return internalGetShapeFieldBuilder().getBuilder();
       }
       /**
        * .tensorflow.TensorShapeProto shape = 2;
@@ -10432,7 +10429,7 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> 
-          getShapeFieldBuilder() {
+          internalGetShapeFieldBuilder() {
         if (shapeBuilder_ == null) {
           shapeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder>(
@@ -10478,9 +10475,7 @@ public org.tensorflow.proto.DataType getDtype() {
        * @return This builder for chaining.
        */
       public Builder setDtype(org.tensorflow.proto.DataType value) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
+        if (value == null) { throw new NullPointerException(); }
         bitField0_ |= 0x00000004;
         dtype_ = value.getNumber();
         onChanged();
@@ -10588,7 +10583,7 @@ public Builder clearMinimum() {
       public org.tensorflow.proto.TensorProto.Builder getMinimumBuilder() {
         bitField0_ |= 0x00000008;
         onChanged();
-        return getMinimumFieldBuilder().getBuilder();
+        return internalGetMinimumFieldBuilder().getBuilder();
       }
       /**
        * .tensorflow.TensorProto minimum = 4;
@@ -10606,7 +10601,7 @@ public org.tensorflow.proto.TensorProtoOrBuilder getMinimumOrBuilder() {
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> 
-          getMinimumFieldBuilder() {
+          internalGetMinimumFieldBuilder() {
         if (minimumBuilder_ == null) {
           minimumBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder>(
@@ -10709,7 +10704,7 @@ public Builder clearMaximum() {
       public org.tensorflow.proto.TensorProto.Builder getMaximumBuilder() {
         bitField0_ |= 0x00000010;
         onChanged();
-        return getMaximumFieldBuilder().getBuilder();
+        return internalGetMaximumFieldBuilder().getBuilder();
       }
       /**
        * .tensorflow.TensorProto maximum = 5;
@@ -10727,7 +10722,7 @@ public org.tensorflow.proto.TensorProtoOrBuilder getMaximumOrBuilder() {
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> 
-          getMaximumFieldBuilder() {
+          internalGetMaximumFieldBuilder() {
         if (maximumBuilder_ == null) {
           maximumBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder>(
@@ -10892,8 +10887,8 @@ public static final class TypeSpecProto extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         TypeSpecProto.class.getName());
     }
@@ -11031,8 +11026,8 @@ public enum TypeSpecClass
         com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
           com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
           /* major= */ 4,
-          /* minor= */ 28,
-          /* patch= */ 3,
+          /* minor= */ 31,
+          /* patch= */ 1,
           /* suffix= */ "",
           TypeSpecClass.class.getName());
       }
@@ -11203,7 +11198,7 @@ public TypeSpecClass findValueByNumber(int number) {
           getDescriptorForType() {
         return getDescriptor();
       }
-      public static final com.google.protobuf.Descriptors.EnumDescriptor
+      public static com.google.protobuf.Descriptors.EnumDescriptor
           getDescriptor() {
         return org.tensorflow.proto.Struct.TypeSpecProto.getDescriptor().getEnumTypes().get(0);
       }
@@ -11594,7 +11589,7 @@ private Builder(
       private void maybeForceBuilderInitialization() {
         if (com.google.protobuf.GeneratedMessage
                 .alwaysUseFieldBuilders) {
-          getTypeStateFieldBuilder();
+          internalGetTypeStateFieldBuilder();
         }
       }
       @java.lang.Override
@@ -11720,7 +11715,7 @@ public Builder mergeFrom(
               } // case 8
               case 18: {
                 input.readMessage(
-                    getTypeStateFieldBuilder().getBuilder(),
+                    internalGetTypeStateFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000002;
                 break;
@@ -11786,9 +11781,7 @@ public org.tensorflow.proto.Struct.TypeSpecProto.TypeSpecClass getTypeSpecClass(
        * @return This builder for chaining.
        */
       public Builder setTypeSpecClass(org.tensorflow.proto.Struct.TypeSpecProto.TypeSpecClass value) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
+        if (value == null) { throw new NullPointerException(); }
         bitField0_ |= 0x00000001;
         typeSpecClass_ = value.getNumber();
         onChanged();
@@ -11924,7 +11917,7 @@ public Builder clearTypeState() {
       public org.tensorflow.proto.Struct.StructuredValue.Builder getTypeStateBuilder() {
         bitField0_ |= 0x00000002;
         onChanged();
-        return getTypeStateFieldBuilder().getBuilder();
+        return internalGetTypeStateFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -11950,7 +11943,7 @@ public org.tensorflow.proto.Struct.StructuredValueOrBuilder getTypeStateOrBuilde
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder> 
-          getTypeStateFieldBuilder() {
+          internalGetTypeStateFieldBuilder() {
         if (typeStateBuilder_ == null) {
           typeStateBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Struct.StructuredValue, org.tensorflow.proto.Struct.StructuredValue.Builder, org.tensorflow.proto.Struct.StructuredValueOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Summary.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Summary.java
index ee1bb65c4cd..9724d988908 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Summary.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/Summary.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/summary.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -17,6 +17,7 @@
  *
  * Protobuf type {@code tensorflow.Summary}
  */
+@com.google.protobuf.Generated
 public final class Summary extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.Summary)
@@ -26,8 +27,8 @@ public final class Summary extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       Summary.class.getName());
   }
@@ -111,8 +112,8 @@ public static final class Image extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         Image.class.getName());
     }
@@ -496,7 +497,7 @@ public Builder mergeFrom(org.tensorflow.proto.Summary.Image other) {
         if (other.getColorspace() != 0) {
           setColorspace(other.getColorspace());
         }
-        if (other.getEncodedImageString() != com.google.protobuf.ByteString.EMPTY) {
+        if (!other.getEncodedImageString().isEmpty()) {
           setEncodedImageString(other.getEncodedImageString());
         }
         this.mergeUnknownFields(other.getUnknownFields());
@@ -867,8 +868,8 @@ public static final class Audio extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         Audio.class.getName());
     }
@@ -1299,7 +1300,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) {
 
       public Builder mergeFrom(org.tensorflow.proto.Summary.Audio other) {
         if (other == org.tensorflow.proto.Summary.Audio.getDefaultInstance()) return this;
-        if (other.getSampleRate() != 0F) {
+        if (java.lang.Float.floatToRawIntBits(other.getSampleRate()) != 0) {
           setSampleRate(other.getSampleRate());
         }
         if (other.getNumChannels() != 0L) {
@@ -1308,7 +1309,7 @@ public Builder mergeFrom(org.tensorflow.proto.Summary.Audio other) {
         if (other.getLengthFrames() != 0L) {
           setLengthFrames(other.getLengthFrames());
         }
-        if (other.getEncodedAudioString() != com.google.protobuf.ByteString.EMPTY) {
+        if (!other.getEncodedAudioString().isEmpty()) {
           setEncodedAudioString(other.getEncodedAudioString());
         }
         if (!other.getContentType().isEmpty()) {
@@ -1869,8 +1870,8 @@ public static final class Value extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         Value.class.getName());
     }
@@ -2581,7 +2582,7 @@ private Builder(
       private void maybeForceBuilderInitialization() {
         if (com.google.protobuf.GeneratedMessage
                 .alwaysUseFieldBuilders) {
-          getMetadataFieldBuilder();
+          internalGetMetadataFieldBuilder();
         }
       }
       @java.lang.Override
@@ -2777,21 +2778,21 @@ public Builder mergeFrom(
               } // case 26
               case 34: {
                 input.readMessage(
-                    getImageFieldBuilder().getBuilder(),
+                    internalGetImageFieldBuilder().getBuilder(),
                     extensionRegistry);
                 valueCase_ = 4;
                 break;
               } // case 34
               case 42: {
                 input.readMessage(
-                    getHistoFieldBuilder().getBuilder(),
+                    internalGetHistoFieldBuilder().getBuilder(),
                     extensionRegistry);
                 valueCase_ = 5;
                 break;
               } // case 42
               case 50: {
                 input.readMessage(
-                    getAudioFieldBuilder().getBuilder(),
+                    internalGetAudioFieldBuilder().getBuilder(),
                     extensionRegistry);
                 valueCase_ = 6;
                 break;
@@ -2803,14 +2804,14 @@ public Builder mergeFrom(
               } // case 58
               case 66: {
                 input.readMessage(
-                    getTensorFieldBuilder().getBuilder(),
+                    internalGetTensorFieldBuilder().getBuilder(),
                     extensionRegistry);
                 valueCase_ = 8;
                 break;
               } // case 66
               case 74: {
                 input.readMessage(
-                    getMetadataFieldBuilder().getBuilder(),
+                    internalGetMetadataFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000004;
                 break;
@@ -3188,7 +3189,7 @@ public Builder clearMetadata() {
       public org.tensorflow.proto.SummaryMetadata.Builder getMetadataBuilder() {
         bitField0_ |= 0x00000004;
         onChanged();
-        return getMetadataFieldBuilder().getBuilder();
+        return internalGetMetadataFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -3222,7 +3223,7 @@ public org.tensorflow.proto.SummaryMetadataOrBuilder getMetadataOrBuilder() {
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.SummaryMetadata, org.tensorflow.proto.SummaryMetadata.Builder, org.tensorflow.proto.SummaryMetadataOrBuilder> 
-          getMetadataFieldBuilder() {
+          internalGetMetadataFieldBuilder() {
         if (metadataBuilder_ == null) {
           metadataBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.SummaryMetadata, org.tensorflow.proto.SummaryMetadata.Builder, org.tensorflow.proto.SummaryMetadataOrBuilder>(
@@ -3422,7 +3423,7 @@ public Builder clearImage() {
        * .tensorflow.Summary.Image image = 4;
        */
       public org.tensorflow.proto.Summary.Image.Builder getImageBuilder() {
-        return getImageFieldBuilder().getBuilder();
+        return internalGetImageFieldBuilder().getBuilder();
       }
       /**
        * .tensorflow.Summary.Image image = 4;
@@ -3443,7 +3444,7 @@ public org.tensorflow.proto.Summary.ImageOrBuilder getImageOrBuilder() {
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.Summary.Image, org.tensorflow.proto.Summary.Image.Builder, org.tensorflow.proto.Summary.ImageOrBuilder> 
-          getImageFieldBuilder() {
+          internalGetImageFieldBuilder() {
         if (imageBuilder_ == null) {
           if (!(valueCase_ == 4)) {
             value_ = org.tensorflow.proto.Summary.Image.getDefaultInstance();
@@ -3564,7 +3565,7 @@ public Builder clearHisto() {
        * .tensorflow.HistogramProto histo = 5;
        */
       public org.tensorflow.proto.HistogramProto.Builder getHistoBuilder() {
-        return getHistoFieldBuilder().getBuilder();
+        return internalGetHistoFieldBuilder().getBuilder();
       }
       /**
        * .tensorflow.HistogramProto histo = 5;
@@ -3585,7 +3586,7 @@ public org.tensorflow.proto.HistogramProtoOrBuilder getHistoOrBuilder() {
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.HistogramProto, org.tensorflow.proto.HistogramProto.Builder, org.tensorflow.proto.HistogramProtoOrBuilder> 
-          getHistoFieldBuilder() {
+          internalGetHistoFieldBuilder() {
         if (histoBuilder_ == null) {
           if (!(valueCase_ == 5)) {
             value_ = org.tensorflow.proto.HistogramProto.getDefaultInstance();
@@ -3706,7 +3707,7 @@ public Builder clearAudio() {
        * .tensorflow.Summary.Audio audio = 6;
        */
       public org.tensorflow.proto.Summary.Audio.Builder getAudioBuilder() {
-        return getAudioFieldBuilder().getBuilder();
+        return internalGetAudioFieldBuilder().getBuilder();
       }
       /**
        * .tensorflow.Summary.Audio audio = 6;
@@ -3727,7 +3728,7 @@ public org.tensorflow.proto.Summary.AudioOrBuilder getAudioOrBuilder() {
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.Summary.Audio, org.tensorflow.proto.Summary.Audio.Builder, org.tensorflow.proto.Summary.AudioOrBuilder> 
-          getAudioFieldBuilder() {
+          internalGetAudioFieldBuilder() {
         if (audioBuilder_ == null) {
           if (!(valueCase_ == 6)) {
             value_ = org.tensorflow.proto.Summary.Audio.getDefaultInstance();
@@ -3848,7 +3849,7 @@ public Builder clearTensor() {
        * .tensorflow.TensorProto tensor = 8;
        */
       public org.tensorflow.proto.TensorProto.Builder getTensorBuilder() {
-        return getTensorFieldBuilder().getBuilder();
+        return internalGetTensorFieldBuilder().getBuilder();
       }
       /**
        * .tensorflow.TensorProto tensor = 8;
@@ -3869,7 +3870,7 @@ public org.tensorflow.proto.TensorProtoOrBuilder getTensorOrBuilder() {
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> 
-          getTensorFieldBuilder() {
+          internalGetTensorFieldBuilder() {
         if (tensorBuilder_ == null) {
           if (!(valueCase_ == 8)) {
             value_ = org.tensorflow.proto.TensorProto.getDefaultInstance();
@@ -4287,7 +4288,7 @@ public Builder mergeFrom(org.tensorflow.proto.Summary other) {
             bitField0_ = (bitField0_ & ~0x00000001);
             valueBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getValueFieldBuilder() : null;
+                 internalGetValueFieldBuilder() : null;
           } else {
             valueBuilder_.addAllMessages(other.value_);
           }
@@ -4581,7 +4582,7 @@ public Builder removeValue(int index) {
      */
     public org.tensorflow.proto.Summary.Value.Builder getValueBuilder(
         int index) {
-      return getValueFieldBuilder().getBuilder(index);
+      return internalGetValueFieldBuilder().getBuilder(index);
     }
     /**
      * 
@@ -4620,7 +4621,7 @@ public org.tensorflow.proto.Summary.ValueOrBuilder getValueOrBuilder(
      * repeated .tensorflow.Summary.Value value = 1;
      */
     public org.tensorflow.proto.Summary.Value.Builder addValueBuilder() {
-      return getValueFieldBuilder().addBuilder(
+      return internalGetValueFieldBuilder().addBuilder(
           org.tensorflow.proto.Summary.Value.getDefaultInstance());
     }
     /**
@@ -4632,7 +4633,7 @@ public org.tensorflow.proto.Summary.Value.Builder addValueBuilder() {
      */
     public org.tensorflow.proto.Summary.Value.Builder addValueBuilder(
         int index) {
-      return getValueFieldBuilder().addBuilder(
+      return internalGetValueFieldBuilder().addBuilder(
           index, org.tensorflow.proto.Summary.Value.getDefaultInstance());
     }
     /**
@@ -4644,11 +4645,11 @@ public org.tensorflow.proto.Summary.Value.Builder addValueBuilder(
      */
     public java.util.List 
          getValueBuilderList() {
-      return getValueFieldBuilder().getBuilderList();
+      return internalGetValueFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.Summary.Value, org.tensorflow.proto.Summary.Value.Builder, org.tensorflow.proto.Summary.ValueOrBuilder> 
-        getValueFieldBuilder() {
+        internalGetValueFieldBuilder() {
       if (valueBuilder_ == null) {
         valueBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.Summary.Value, org.tensorflow.proto.Summary.Value.Builder, org.tensorflow.proto.Summary.ValueOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryDescription.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryDescription.java
index 40843246261..f841b7e29ba 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryDescription.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryDescription.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/summary.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.SummaryDescription}
  */
+@com.google.protobuf.Generated
 public final class SummaryDescription extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.SummaryDescription)
@@ -21,8 +22,8 @@ public final class SummaryDescription extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       SummaryDescription.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryDescriptionOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryDescriptionOrBuilder.java
index d1b59f7cd9c..e15762efbc6 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryDescriptionOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryDescriptionOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/summary.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface SummaryDescriptionOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.SummaryDescription)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryMetadata.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryMetadata.java
index 5991e77f41c..866b4f4be63 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryMetadata.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryMetadata.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/summary.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -13,6 +13,7 @@
  *
  * Protobuf type {@code tensorflow.SummaryMetadata}
  */
+@com.google.protobuf.Generated
 public final class SummaryMetadata extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.SummaryMetadata)
@@ -22,8 +23,8 @@ public final class SummaryMetadata extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       SummaryMetadata.class.getName());
   }
@@ -97,8 +98,8 @@ public static final class PluginData extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         PluginData.class.getName());
     }
@@ -448,7 +449,7 @@ public Builder mergeFrom(org.tensorflow.proto.SummaryMetadata.PluginData other)
           bitField0_ |= 0x00000001;
           onChanged();
         }
-        if (other.getContent() != com.google.protobuf.ByteString.EMPTY) {
+        if (!other.getContent().isEmpty()) {
           setContent(other.getContent());
         }
         this.mergeUnknownFields(other.getUnknownFields());
@@ -1089,7 +1090,7 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getPluginDataFieldBuilder();
+        internalGetPluginDataFieldBuilder();
       }
     }
     @java.lang.Override
@@ -1212,7 +1213,7 @@ public Builder mergeFrom(
               break;
             case 10: {
               input.readMessage(
-                  getPluginDataFieldBuilder().getBuilder(),
+                  internalGetPluginDataFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000001;
               break;
@@ -1368,7 +1369,7 @@ public Builder clearPluginData() {
     public org.tensorflow.proto.SummaryMetadata.PluginData.Builder getPluginDataBuilder() {
       bitField0_ |= 0x00000001;
       onChanged();
-      return getPluginDataFieldBuilder().getBuilder();
+      return internalGetPluginDataFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -1394,7 +1395,7 @@ public org.tensorflow.proto.SummaryMetadata.PluginDataOrBuilder getPluginDataOrB
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.SummaryMetadata.PluginData, org.tensorflow.proto.SummaryMetadata.PluginData.Builder, org.tensorflow.proto.SummaryMetadata.PluginDataOrBuilder> 
-        getPluginDataFieldBuilder() {
+        internalGetPluginDataFieldBuilder() {
       if (pluginDataBuilder_ == null) {
         pluginDataBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.SummaryMetadata.PluginData, org.tensorflow.proto.SummaryMetadata.PluginData.Builder, org.tensorflow.proto.SummaryMetadata.PluginDataOrBuilder>(
@@ -1652,9 +1653,7 @@ public org.tensorflow.proto.DataClass getDataClass() {
      * @return This builder for chaining.
      */
     public Builder setDataClass(org.tensorflow.proto.DataClass value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000008;
       dataClass_ = value.getNumber();
       onChanged();
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryMetadataOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryMetadataOrBuilder.java
index a7c7adb8253..607e819d618 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryMetadataOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryMetadataOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/summary.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface SummaryMetadataOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.SummaryMetadata)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryOrBuilder.java
index 1477e151a96..eec7ed6ed7a 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/summary.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface SummaryOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.Summary)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryProtos.java
index 17ee633adc7..44216fcace2 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/SummaryProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/summary.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class SummaryProtos {
   private SummaryProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       SummaryProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TaggedRunMetadata.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TaggedRunMetadata.java
index 8fabbf0cbcf..4b7779b12c3 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TaggedRunMetadata.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TaggedRunMetadata.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/util/event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.TaggedRunMetadata}
  */
+@com.google.protobuf.Generated
 public final class TaggedRunMetadata extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.TaggedRunMetadata)
@@ -21,8 +22,8 @@ public final class TaggedRunMetadata extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       TaggedRunMetadata.class.getName());
   }
@@ -376,7 +377,7 @@ public Builder mergeFrom(org.tensorflow.proto.TaggedRunMetadata other) {
         bitField0_ |= 0x00000001;
         onChanged();
       }
-      if (other.getRunMetadata() != com.google.protobuf.ByteString.EMPTY) {
+      if (!other.getRunMetadata().isEmpty()) {
         setRunMetadata(other.getRunMetadata());
       }
       this.mergeUnknownFields(other.getUnknownFields());
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TaggedRunMetadataOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TaggedRunMetadataOrBuilder.java
index a1b394e2b14..5a1bc45999d 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TaggedRunMetadataOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TaggedRunMetadataOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/util/event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface TaggedRunMetadataOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.TaggedRunMetadata)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TaskDeviceFilters.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TaskDeviceFilters.java
index cb5547127cc..9d8a5cde47a 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TaskDeviceFilters.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TaskDeviceFilters.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/device_filters.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.TaskDeviceFilters}
  */
+@com.google.protobuf.Generated
 public final class TaskDeviceFilters extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.TaskDeviceFilters)
@@ -21,8 +22,8 @@ public final class TaskDeviceFilters extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       TaskDeviceFilters.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TaskDeviceFiltersOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TaskDeviceFiltersOrBuilder.java
index abc76e76f7a..c8cbe95c73b 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TaskDeviceFiltersOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TaskDeviceFiltersOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/device_filters.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface TaskDeviceFiltersOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.TaskDeviceFilters)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorBundleProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorBundleProtos.java
index ccdfaa8353b..69107ae67cf 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorBundleProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorBundleProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/tensor_bundle.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class TensorBundleProtos {
   private TensorBundleProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       TensorBundleProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorConnection.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorConnection.java
index 56f3100ea90..a3c2601eea5 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorConnection.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorConnection.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/config.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.TensorConnection}
  */
+@com.google.protobuf.Generated
 public final class TensorConnection extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.TensorConnection)
@@ -21,8 +22,8 @@ public final class TensorConnection extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       TensorConnection.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorConnectionOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorConnectionOrBuilder.java
index a13b5780996..2bc0005ad60 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorConnectionOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorConnectionOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/config.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface TensorConnectionOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.TensorConnection)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorDebugMode.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorDebugMode.java
index 982460ab7de..026d3c5b8d1 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorDebugMode.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorDebugMode.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/debug_event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -14,6 +14,7 @@
  *
  * Protobuf enum {@code tensorflow.TensorDebugMode}
  */
+@com.google.protobuf.Generated
 public enum TensorDebugMode
     implements com.google.protobuf.ProtocolMessageEnum {
   /**
@@ -114,8 +115,8 @@ public enum TensorDebugMode
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       TensorDebugMode.class.getName());
   }
@@ -273,7 +274,7 @@ public TensorDebugMode findValueByNumber(int number) {
       getDescriptorForType() {
     return getDescriptor();
   }
-  public static final com.google.protobuf.Descriptors.EnumDescriptor
+  public static com.google.protobuf.Descriptors.EnumDescriptor
       getDescriptor() {
     return org.tensorflow.proto.DebugEventProtos.getDescriptor().getEnumTypes().get(0);
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorDescription.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorDescription.java
index b91793b6788..19200f6fa59 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorDescription.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorDescription.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/tensor_description.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.TensorDescription}
  */
+@com.google.protobuf.Generated
 public final class TensorDescription extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.TensorDescription)
@@ -17,8 +18,8 @@ public final class TensorDescription extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       TensorDescription.class.getName());
   }
@@ -367,8 +368,8 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getShapeFieldBuilder();
-        getAllocationDescriptionFieldBuilder();
+        internalGetShapeFieldBuilder();
+        internalGetAllocationDescriptionFieldBuilder();
       }
     }
     @java.lang.Override
@@ -492,14 +493,14 @@ public Builder mergeFrom(
             } // case 8
             case 18: {
               input.readMessage(
-                  getShapeFieldBuilder().getBuilder(),
+                  internalGetShapeFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000002;
               break;
             } // case 18
             case 34: {
               input.readMessage(
-                  getAllocationDescriptionFieldBuilder().getBuilder(),
+                  internalGetAllocationDescriptionFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000004;
               break;
@@ -571,9 +572,7 @@ public org.tensorflow.proto.DataType getDtype() {
      * @return This builder for chaining.
      */
     public Builder setDtype(org.tensorflow.proto.DataType value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000001;
       dtype_ = value.getNumber();
       onChanged();
@@ -713,7 +712,7 @@ public Builder clearShape() {
     public org.tensorflow.proto.TensorShapeProto.Builder getShapeBuilder() {
       bitField0_ |= 0x00000002;
       onChanged();
-      return getShapeFieldBuilder().getBuilder();
+      return internalGetShapeFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -739,7 +738,7 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> 
-        getShapeFieldBuilder() {
+        internalGetShapeFieldBuilder() {
       if (shapeBuilder_ == null) {
         shapeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder>(
@@ -870,7 +869,7 @@ public Builder clearAllocationDescription() {
     public org.tensorflow.proto.AllocationDescription.Builder getAllocationDescriptionBuilder() {
       bitField0_ |= 0x00000004;
       onChanged();
-      return getAllocationDescriptionFieldBuilder().getBuilder();
+      return internalGetAllocationDescriptionFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -896,7 +895,7 @@ public org.tensorflow.proto.AllocationDescriptionOrBuilder getAllocationDescript
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.AllocationDescription, org.tensorflow.proto.AllocationDescription.Builder, org.tensorflow.proto.AllocationDescriptionOrBuilder> 
-        getAllocationDescriptionFieldBuilder() {
+        internalGetAllocationDescriptionFieldBuilder() {
       if (allocationDescriptionBuilder_ == null) {
         allocationDescriptionBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.AllocationDescription, org.tensorflow.proto.AllocationDescription.Builder, org.tensorflow.proto.AllocationDescriptionOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorDescriptionOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorDescriptionOrBuilder.java
index 42e8478aab8..9f726e14878 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorDescriptionOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorDescriptionOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/tensor_description.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface TensorDescriptionOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.TensorDescription)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorDescriptionProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorDescriptionProtos.java
index 52dfca9d9b3..9352abdb810 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorDescriptionProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorDescriptionProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/tensor_description.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class TensorDescriptionProtos {
   private TensorDescriptionProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       TensorDescriptionProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorInfo.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorInfo.java
index 1c2f1251ff7..a84a8c04c42 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorInfo.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorInfo.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/meta_graph.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.TensorInfo}
  */
+@com.google.protobuf.Generated
 public final class TensorInfo extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.TensorInfo)
@@ -21,8 +22,8 @@ public final class TensorInfo extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       TensorInfo.class.getName());
   }
@@ -132,8 +133,8 @@ public static final class CooSparse extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         CooSparse.class.getName());
     }
@@ -1080,8 +1081,8 @@ public static final class CompositeTensor extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         CompositeTensor.class.getName());
     }
@@ -1418,8 +1419,8 @@ private Builder(
       private void maybeForceBuilderInitialization() {
         if (com.google.protobuf.GeneratedMessage
                 .alwaysUseFieldBuilders) {
-          getTypeSpecFieldBuilder();
-          getComponentsFieldBuilder();
+          internalGetTypeSpecFieldBuilder();
+          internalGetComponentsFieldBuilder();
         }
       }
       @java.lang.Override
@@ -1529,7 +1530,7 @@ public Builder mergeFrom(org.tensorflow.proto.TensorInfo.CompositeTensor other)
               bitField0_ = (bitField0_ & ~0x00000002);
               componentsBuilder_ = 
                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                   getComponentsFieldBuilder() : null;
+                   internalGetComponentsFieldBuilder() : null;
             } else {
               componentsBuilder_.addAllMessages(other.components_);
             }
@@ -1563,7 +1564,7 @@ public Builder mergeFrom(
                 break;
               case 10: {
                 input.readMessage(
-                    getTypeSpecFieldBuilder().getBuilder(),
+                    internalGetTypeSpecFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000001;
                 break;
@@ -1717,7 +1718,7 @@ public Builder clearTypeSpec() {
       public org.tensorflow.proto.Struct.TypeSpecProto.Builder getTypeSpecBuilder() {
         bitField0_ |= 0x00000001;
         onChanged();
-        return getTypeSpecFieldBuilder().getBuilder();
+        return internalGetTypeSpecFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -1743,7 +1744,7 @@ public org.tensorflow.proto.Struct.TypeSpecProtoOrBuilder getTypeSpecOrBuilder()
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.Struct.TypeSpecProto, org.tensorflow.proto.Struct.TypeSpecProto.Builder, org.tensorflow.proto.Struct.TypeSpecProtoOrBuilder> 
-          getTypeSpecFieldBuilder() {
+          internalGetTypeSpecFieldBuilder() {
         if (typeSpecBuilder_ == null) {
           typeSpecBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.Struct.TypeSpecProto, org.tensorflow.proto.Struct.TypeSpecProto.Builder, org.tensorflow.proto.Struct.TypeSpecProtoOrBuilder>(
@@ -1987,7 +1988,7 @@ public Builder removeComponents(int index) {
        */
       public org.tensorflow.proto.TensorInfo.Builder getComponentsBuilder(
           int index) {
-        return getComponentsFieldBuilder().getBuilder(index);
+        return internalGetComponentsFieldBuilder().getBuilder(index);
       }
       /**
        * 
@@ -2026,7 +2027,7 @@ public org.tensorflow.proto.TensorInfoOrBuilder getComponentsOrBuilder(
        * repeated .tensorflow.TensorInfo components = 2;
        */
       public org.tensorflow.proto.TensorInfo.Builder addComponentsBuilder() {
-        return getComponentsFieldBuilder().addBuilder(
+        return internalGetComponentsFieldBuilder().addBuilder(
             org.tensorflow.proto.TensorInfo.getDefaultInstance());
       }
       /**
@@ -2038,7 +2039,7 @@ public org.tensorflow.proto.TensorInfo.Builder addComponentsBuilder() {
        */
       public org.tensorflow.proto.TensorInfo.Builder addComponentsBuilder(
           int index) {
-        return getComponentsFieldBuilder().addBuilder(
+        return internalGetComponentsFieldBuilder().addBuilder(
             index, org.tensorflow.proto.TensorInfo.getDefaultInstance());
       }
       /**
@@ -2050,11 +2051,11 @@ public org.tensorflow.proto.TensorInfo.Builder addComponentsBuilder(
        */
       public java.util.List 
            getComponentsBuilderList() {
-        return getComponentsFieldBuilder().getBuilderList();
+        return internalGetComponentsFieldBuilder().getBuilderList();
       }
       private com.google.protobuf.RepeatedFieldBuilder<
           org.tensorflow.proto.TensorInfo, org.tensorflow.proto.TensorInfo.Builder, org.tensorflow.proto.TensorInfoOrBuilder> 
-          getComponentsFieldBuilder() {
+          internalGetComponentsFieldBuilder() {
         if (componentsBuilder_ == null) {
           componentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.TensorInfo, org.tensorflow.proto.TensorInfo.Builder, org.tensorflow.proto.TensorInfoOrBuilder>(
@@ -2646,7 +2647,7 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getTensorShapeFieldBuilder();
+        internalGetTensorShapeFieldBuilder();
       }
     }
     @java.lang.Override
@@ -2803,21 +2804,21 @@ public Builder mergeFrom(
             } // case 16
             case 26: {
               input.readMessage(
-                  getTensorShapeFieldBuilder().getBuilder(),
+                  internalGetTensorShapeFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000010;
               break;
             } // case 26
             case 34: {
               input.readMessage(
-                  getCooSparseFieldBuilder().getBuilder(),
+                  internalGetCooSparseFieldBuilder().getBuilder(),
                   extensionRegistry);
               encodingCase_ = 4;
               break;
             } // case 34
             case 42: {
               input.readMessage(
-                  getCompositeTensorFieldBuilder().getBuilder(),
+                  internalGetCompositeTensorFieldBuilder().getBuilder(),
                   extensionRegistry);
               encodingCase_ = 5;
               break;
@@ -3124,7 +3125,7 @@ public Builder clearCooSparse() {
      * .tensorflow.TensorInfo.CooSparse coo_sparse = 4;
      */
     public org.tensorflow.proto.TensorInfo.CooSparse.Builder getCooSparseBuilder() {
-      return getCooSparseFieldBuilder().getBuilder();
+      return internalGetCooSparseFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -3159,7 +3160,7 @@ public org.tensorflow.proto.TensorInfo.CooSparseOrBuilder getCooSparseOrBuilder(
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.TensorInfo.CooSparse, org.tensorflow.proto.TensorInfo.CooSparse.Builder, org.tensorflow.proto.TensorInfo.CooSparseOrBuilder> 
-        getCooSparseFieldBuilder() {
+        internalGetCooSparseFieldBuilder() {
       if (cooSparseBuilder_ == null) {
         if (!(encodingCase_ == 4)) {
           encoding_ = org.tensorflow.proto.TensorInfo.CooSparse.getDefaultInstance();
@@ -3308,7 +3309,7 @@ public Builder clearCompositeTensor() {
      * .tensorflow.TensorInfo.CompositeTensor composite_tensor = 5;
      */
     public org.tensorflow.proto.TensorInfo.CompositeTensor.Builder getCompositeTensorBuilder() {
-      return getCompositeTensorFieldBuilder().getBuilder();
+      return internalGetCompositeTensorFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -3337,7 +3338,7 @@ public org.tensorflow.proto.TensorInfo.CompositeTensorOrBuilder getCompositeTens
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.TensorInfo.CompositeTensor, org.tensorflow.proto.TensorInfo.CompositeTensor.Builder, org.tensorflow.proto.TensorInfo.CompositeTensorOrBuilder> 
-        getCompositeTensorFieldBuilder() {
+        internalGetCompositeTensorFieldBuilder() {
       if (compositeTensorBuilder_ == null) {
         if (!(encodingCase_ == 5)) {
           encoding_ = org.tensorflow.proto.TensorInfo.CompositeTensor.getDefaultInstance();
@@ -3388,9 +3389,7 @@ public org.tensorflow.proto.DataType getDtype() {
      * @return This builder for chaining.
      */
     public Builder setDtype(org.tensorflow.proto.DataType value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000008;
       dtype_ = value.getNumber();
       onChanged();
@@ -3540,7 +3539,7 @@ public Builder clearTensorShape() {
     public org.tensorflow.proto.TensorShapeProto.Builder getTensorShapeBuilder() {
       bitField0_ |= 0x00000010;
       onChanged();
-      return getTensorShapeFieldBuilder().getBuilder();
+      return internalGetTensorShapeFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -3570,7 +3569,7 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getTensorShapeOrBuilder()
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> 
-        getTensorShapeFieldBuilder() {
+        internalGetTensorShapeFieldBuilder() {
       if (tensorShapeBuilder_ == null) {
         tensorShapeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorInfoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorInfoOrBuilder.java
index e6f8bc5266b..cf716078ac8 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorInfoOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorInfoOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/meta_graph.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface TensorInfoOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.TensorInfo)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorProto.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorProto.java
index 16963543fb5..ead31631e57 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorProto.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorProto.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/tensor.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.TensorProto}
  */
+@com.google.protobuf.Generated
 public final class TensorProto extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.TensorProto)
@@ -21,8 +22,8 @@ public final class TensorProto extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       TensorProto.class.getName());
   }
@@ -1315,9 +1316,9 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getTensorShapeFieldBuilder();
-        getResourceHandleValFieldBuilder();
-        getVariantValFieldBuilder();
+        internalGetTensorShapeFieldBuilder();
+        internalGetResourceHandleValFieldBuilder();
+        internalGetVariantValFieldBuilder();
       }
     }
     @java.lang.Override
@@ -1500,7 +1501,7 @@ public Builder mergeFrom(org.tensorflow.proto.TensorProto other) {
       if (other.getVersionNumber() != 0) {
         setVersionNumber(other.getVersionNumber());
       }
-      if (other.getTensorContent() != com.google.protobuf.ByteString.EMPTY) {
+      if (!other.getTensorContent().isEmpty()) {
         setTensorContent(other.getTensorContent());
       }
       if (!other.halfVal_.isEmpty()) {
@@ -1622,7 +1623,7 @@ public Builder mergeFrom(org.tensorflow.proto.TensorProto other) {
             bitField0_ = (bitField0_ & ~0x00002000);
             resourceHandleValBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getResourceHandleValFieldBuilder() : null;
+                 internalGetResourceHandleValFieldBuilder() : null;
           } else {
             resourceHandleValBuilder_.addAllMessages(other.resourceHandleVal_);
           }
@@ -1648,7 +1649,7 @@ public Builder mergeFrom(org.tensorflow.proto.TensorProto other) {
             bitField0_ = (bitField0_ & ~0x00004000);
             variantValBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getVariantValFieldBuilder() : null;
+                 internalGetVariantValFieldBuilder() : null;
           } else {
             variantValBuilder_.addAllMessages(other.variantVal_);
           }
@@ -1676,7 +1677,7 @@ public Builder mergeFrom(org.tensorflow.proto.TensorProto other) {
         }
         onChanged();
       }
-      if (other.getFloat8Val() != com.google.protobuf.ByteString.EMPTY) {
+      if (!other.getFloat8Val().isEmpty()) {
         setFloat8Val(other.getFloat8Val());
       }
       this.mergeUnknownFields(other.getUnknownFields());
@@ -1712,7 +1713,7 @@ public Builder mergeFrom(
             } // case 8
             case 18: {
               input.readMessage(
-                  getTensorShapeFieldBuilder().getBuilder(),
+                  internalGetTensorShapeFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000002;
               break;
@@ -1996,9 +1997,7 @@ public org.tensorflow.proto.DataType getDtype() {
      * @return This builder for chaining.
      */
     public Builder setDtype(org.tensorflow.proto.DataType value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000001;
       dtype_ = value.getNumber();
       onChanged();
@@ -2138,7 +2137,7 @@ public Builder clearTensorShape() {
     public org.tensorflow.proto.TensorShapeProto.Builder getTensorShapeBuilder() {
       bitField0_ |= 0x00000002;
       onChanged();
-      return getTensorShapeFieldBuilder().getBuilder();
+      return internalGetTensorShapeFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -2164,7 +2163,7 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getTensorShapeOrBuilder()
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> 
-        getTensorShapeFieldBuilder() {
+        internalGetTensorShapeFieldBuilder() {
       if (tensorShapeBuilder_ == null) {
         tensorShapeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder>(
@@ -3579,7 +3578,7 @@ public Builder removeResourceHandleVal(int index) {
      */
     public org.tensorflow.proto.ResourceHandleProto.Builder getResourceHandleValBuilder(
         int index) {
-      return getResourceHandleValFieldBuilder().getBuilder(index);
+      return internalGetResourceHandleValFieldBuilder().getBuilder(index);
     }
     /**
      * 
@@ -3618,7 +3617,7 @@ public org.tensorflow.proto.ResourceHandleProtoOrBuilder getResourceHandleValOrB
      * repeated .tensorflow.ResourceHandleProto resource_handle_val = 14;
      */
     public org.tensorflow.proto.ResourceHandleProto.Builder addResourceHandleValBuilder() {
-      return getResourceHandleValFieldBuilder().addBuilder(
+      return internalGetResourceHandleValFieldBuilder().addBuilder(
           org.tensorflow.proto.ResourceHandleProto.getDefaultInstance());
     }
     /**
@@ -3630,7 +3629,7 @@ public org.tensorflow.proto.ResourceHandleProto.Builder addResourceHandleValBuil
      */
     public org.tensorflow.proto.ResourceHandleProto.Builder addResourceHandleValBuilder(
         int index) {
-      return getResourceHandleValFieldBuilder().addBuilder(
+      return internalGetResourceHandleValFieldBuilder().addBuilder(
           index, org.tensorflow.proto.ResourceHandleProto.getDefaultInstance());
     }
     /**
@@ -3642,11 +3641,11 @@ public org.tensorflow.proto.ResourceHandleProto.Builder addResourceHandleValBuil
      */
     public java.util.List 
          getResourceHandleValBuilderList() {
-      return getResourceHandleValFieldBuilder().getBuilderList();
+      return internalGetResourceHandleValFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.ResourceHandleProto, org.tensorflow.proto.ResourceHandleProto.Builder, org.tensorflow.proto.ResourceHandleProtoOrBuilder> 
-        getResourceHandleValFieldBuilder() {
+        internalGetResourceHandleValFieldBuilder() {
       if (resourceHandleValBuilder_ == null) {
         resourceHandleValBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.ResourceHandleProto, org.tensorflow.proto.ResourceHandleProto.Builder, org.tensorflow.proto.ResourceHandleProtoOrBuilder>(
@@ -3891,7 +3890,7 @@ public Builder removeVariantVal(int index) {
      */
     public org.tensorflow.proto.VariantTensorDataProto.Builder getVariantValBuilder(
         int index) {
-      return getVariantValFieldBuilder().getBuilder(index);
+      return internalGetVariantValFieldBuilder().getBuilder(index);
     }
     /**
      * 
@@ -3930,7 +3929,7 @@ public org.tensorflow.proto.VariantTensorDataProtoOrBuilder getVariantValOrBuild
      * repeated .tensorflow.VariantTensorDataProto variant_val = 15;
      */
     public org.tensorflow.proto.VariantTensorDataProto.Builder addVariantValBuilder() {
-      return getVariantValFieldBuilder().addBuilder(
+      return internalGetVariantValFieldBuilder().addBuilder(
           org.tensorflow.proto.VariantTensorDataProto.getDefaultInstance());
     }
     /**
@@ -3942,7 +3941,7 @@ public org.tensorflow.proto.VariantTensorDataProto.Builder addVariantValBuilder(
      */
     public org.tensorflow.proto.VariantTensorDataProto.Builder addVariantValBuilder(
         int index) {
-      return getVariantValFieldBuilder().addBuilder(
+      return internalGetVariantValFieldBuilder().addBuilder(
           index, org.tensorflow.proto.VariantTensorDataProto.getDefaultInstance());
     }
     /**
@@ -3954,11 +3953,11 @@ public org.tensorflow.proto.VariantTensorDataProto.Builder addVariantValBuilder(
      */
     public java.util.List 
          getVariantValBuilderList() {
-      return getVariantValFieldBuilder().getBuilderList();
+      return internalGetVariantValFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.VariantTensorDataProto, org.tensorflow.proto.VariantTensorDataProto.Builder, org.tensorflow.proto.VariantTensorDataProtoOrBuilder> 
-        getVariantValFieldBuilder() {
+        internalGetVariantValFieldBuilder() {
       if (variantValBuilder_ == null) {
         variantValBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.VariantTensorDataProto, org.tensorflow.proto.VariantTensorDataProto.Builder, org.tensorflow.proto.VariantTensorDataProtoOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorProtoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorProtoOrBuilder.java
index 193c60a945a..68bfb7f709e 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorProtoOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorProtoOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/tensor.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface TensorProtoOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.TensorProto)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorProtos.java
index 5641fea4fdc..b006dd9173a 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/tensor.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class TensorProtos {
   private TensorProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       TensorProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorShapeProto.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorShapeProto.java
index 3e0f3a3387c..4ab49a50c04 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorShapeProto.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorShapeProto.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/tensor_shape.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.TensorShapeProto}
  */
+@com.google.protobuf.Generated
 public final class TensorShapeProto extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.TensorShapeProto)
@@ -21,8 +22,8 @@ public final class TensorShapeProto extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       TensorShapeProto.class.getName());
   }
@@ -101,8 +102,8 @@ public static final class Dim extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         Dim.class.getName());
     }
@@ -1152,7 +1153,7 @@ public Builder mergeFrom(org.tensorflow.proto.TensorShapeProto other) {
             bitField0_ = (bitField0_ & ~0x00000001);
             dimBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getDimFieldBuilder() : null;
+                 internalGetDimFieldBuilder() : null;
           } else {
             dimBuilder_.addAllMessages(other.dim_);
           }
@@ -1610,7 +1611,7 @@ public Builder removeDim(int index) {
      */
     public org.tensorflow.proto.TensorShapeProto.Dim.Builder getDimBuilder(
         int index) {
-      return getDimFieldBuilder().getBuilder(index);
+      return internalGetDimFieldBuilder().getBuilder(index);
     }
     /**
      * 
@@ -1685,7 +1686,7 @@ public org.tensorflow.proto.TensorShapeProto.DimOrBuilder getDimOrBuilder(
      * repeated .tensorflow.TensorShapeProto.Dim dim = 2;
      */
     public org.tensorflow.proto.TensorShapeProto.Dim.Builder addDimBuilder() {
-      return getDimFieldBuilder().addBuilder(
+      return internalGetDimFieldBuilder().addBuilder(
           org.tensorflow.proto.TensorShapeProto.Dim.getDefaultInstance());
     }
     /**
@@ -1709,7 +1710,7 @@ public org.tensorflow.proto.TensorShapeProto.Dim.Builder addDimBuilder() {
      */
     public org.tensorflow.proto.TensorShapeProto.Dim.Builder addDimBuilder(
         int index) {
-      return getDimFieldBuilder().addBuilder(
+      return internalGetDimFieldBuilder().addBuilder(
           index, org.tensorflow.proto.TensorShapeProto.Dim.getDefaultInstance());
     }
     /**
@@ -1733,11 +1734,11 @@ public org.tensorflow.proto.TensorShapeProto.Dim.Builder addDimBuilder(
      */
     public java.util.List 
          getDimBuilderList() {
-      return getDimFieldBuilder().getBuilderList();
+      return internalGetDimFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.TensorShapeProto.Dim, org.tensorflow.proto.TensorShapeProto.Dim.Builder, org.tensorflow.proto.TensorShapeProto.DimOrBuilder> 
-        getDimFieldBuilder() {
+        internalGetDimFieldBuilder() {
       if (dimBuilder_ == null) {
         dimBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.TensorShapeProto.Dim, org.tensorflow.proto.TensorShapeProto.Dim.Builder, org.tensorflow.proto.TensorShapeProto.DimOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorShapeProtoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorShapeProtoOrBuilder.java
index abdb7c2a2dc..73e07c47dd1 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorShapeProtoOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorShapeProtoOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/tensor_shape.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface TensorShapeProtoOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.TensorShapeProto)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorShapeProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorShapeProtos.java
index 0d6cdfd8d58..1d5fb8b81b8 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorShapeProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorShapeProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/tensor_shape.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class TensorShapeProtos {
   private TensorShapeProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       TensorShapeProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorSliceProto.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorSliceProto.java
index dde6d3207de..e7f3b3081bd 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorSliceProto.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorSliceProto.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/tensor_slice.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.TensorSliceProto}
  */
+@com.google.protobuf.Generated
 public final class TensorSliceProto extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.TensorSliceProto)
@@ -21,8 +22,8 @@ public final class TensorSliceProto extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       TensorSliceProto.class.getName());
   }
@@ -72,7 +73,7 @@ public interface ExtentOrBuilder extends
      */
     long getLength();
 
-    org.tensorflow.proto.TensorSliceProto.Extent.HasLengthCase getHasLengthCase();
+    org.tensorflow.proto.TensorSliceProto.Extent.HasLengthHackCase getHasLengthHackCase();
   }
   /**
    * 
@@ -90,8 +91,8 @@ public static final class Extent extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         Extent.class.getName());
     }
@@ -115,16 +116,16 @@ private Extent() {
               org.tensorflow.proto.TensorSliceProto.Extent.class, org.tensorflow.proto.TensorSliceProto.Extent.Builder.class);
     }
 
-    private int hasLengthCase_ = 0;
+    private int hasLengthHackCase_ = 0;
     @SuppressWarnings("serial")
-    private java.lang.Object hasLength_;
-    public enum HasLengthCase
+    private java.lang.Object hasLengthHack_;
+    public enum HasLengthHackCase
         implements com.google.protobuf.Internal.EnumLite,
             com.google.protobuf.AbstractMessage.InternalOneOfEnum {
       LENGTH(2),
-      HASLENGTH_NOT_SET(0);
+      HASLENGTHHACK_NOT_SET(0);
       private final int value;
-      private HasLengthCase(int value) {
+      private HasLengthHackCase(int value) {
         this.value = value;
       }
       /**
@@ -133,14 +134,14 @@ private HasLengthCase(int value) {
        * @deprecated Use {@link #forNumber(int)} instead.
        */
       @java.lang.Deprecated
-      public static HasLengthCase valueOf(int value) {
+      public static HasLengthHackCase valueOf(int value) {
         return forNumber(value);
       }
 
-      public static HasLengthCase forNumber(int value) {
+      public static HasLengthHackCase forNumber(int value) {
         switch (value) {
           case 2: return LENGTH;
-          case 0: return HASLENGTH_NOT_SET;
+          case 0: return HASLENGTHHACK_NOT_SET;
           default: return null;
         }
       }
@@ -149,10 +150,10 @@ public int getNumber() {
       }
     };
 
-    public HasLengthCase
-    getHasLengthCase() {
-      return HasLengthCase.forNumber(
-          hasLengthCase_);
+    public HasLengthHackCase
+    getHasLengthHackCase() {
+      return HasLengthHackCase.forNumber(
+          hasLengthHackCase_);
     }
 
     public static final int START_FIELD_NUMBER = 1;
@@ -177,7 +178,7 @@ public long getStart() {
      */
     @java.lang.Override
     public boolean hasLength() {
-      return hasLengthCase_ == 2;
+      return hasLengthHackCase_ == 2;
     }
     /**
      * int64 length = 2;
@@ -185,8 +186,8 @@ public boolean hasLength() {
      */
     @java.lang.Override
     public long getLength() {
-      if (hasLengthCase_ == 2) {
-        return (java.lang.Long) hasLength_;
+      if (hasLengthHackCase_ == 2) {
+        return (java.lang.Long) hasLengthHack_;
       }
       return 0L;
     }
@@ -208,9 +209,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
       if (start_ != 0L) {
         output.writeInt64(1, start_);
       }
-      if (hasLengthCase_ == 2) {
+      if (hasLengthHackCase_ == 2) {
         output.writeInt64(
-            2, (long)((java.lang.Long) hasLength_));
+            2, (long)((java.lang.Long) hasLengthHack_));
       }
       getUnknownFields().writeTo(output);
     }
@@ -225,10 +226,10 @@ public int getSerializedSize() {
         size += com.google.protobuf.CodedOutputStream
           .computeInt64Size(1, start_);
       }
-      if (hasLengthCase_ == 2) {
+      if (hasLengthHackCase_ == 2) {
         size += com.google.protobuf.CodedOutputStream
           .computeInt64Size(
-              2, (long)((java.lang.Long) hasLength_));
+              2, (long)((java.lang.Long) hasLengthHack_));
       }
       size += getUnknownFields().getSerializedSize();
       memoizedSize = size;
@@ -247,8 +248,8 @@ public boolean equals(final java.lang.Object obj) {
 
       if (getStart()
           != other.getStart()) return false;
-      if (!getHasLengthCase().equals(other.getHasLengthCase())) return false;
-      switch (hasLengthCase_) {
+      if (!getHasLengthHackCase().equals(other.getHasLengthHackCase())) return false;
+      switch (hasLengthHackCase_) {
         case 2:
           if (getLength()
               != other.getLength()) return false;
@@ -270,7 +271,7 @@ public int hashCode() {
       hash = (37 * hash) + START_FIELD_NUMBER;
       hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
           getStart());
-      switch (hasLengthCase_) {
+      switch (hasLengthHackCase_) {
         case 2:
           hash = (37 * hash) + LENGTH_FIELD_NUMBER;
           hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
@@ -415,8 +416,8 @@ public Builder clear() {
         super.clear();
         bitField0_ = 0;
         start_ = 0L;
-        hasLengthCase_ = 0;
-        hasLength_ = null;
+        hasLengthHackCase_ = 0;
+        hasLengthHack_ = null;
         return this;
       }
 
@@ -457,8 +458,8 @@ private void buildPartial0(org.tensorflow.proto.TensorSliceProto.Extent result)
       }
 
       private void buildPartialOneofs(org.tensorflow.proto.TensorSliceProto.Extent result) {
-        result.hasLengthCase_ = hasLengthCase_;
-        result.hasLength_ = this.hasLength_;
+        result.hasLengthHackCase_ = hasLengthHackCase_;
+        result.hasLengthHack_ = this.hasLengthHack_;
       }
 
       @java.lang.Override
@@ -476,12 +477,12 @@ public Builder mergeFrom(org.tensorflow.proto.TensorSliceProto.Extent other) {
         if (other.getStart() != 0L) {
           setStart(other.getStart());
         }
-        switch (other.getHasLengthCase()) {
+        switch (other.getHasLengthHackCase()) {
           case LENGTH: {
             setLength(other.getLength());
             break;
           }
-          case HASLENGTH_NOT_SET: {
+          case HASLENGTHHACK_NOT_SET: {
             break;
           }
         }
@@ -517,8 +518,8 @@ public Builder mergeFrom(
                 break;
               } // case 8
               case 16: {
-                hasLength_ = input.readInt64();
-                hasLengthCase_ = 2;
+                hasLengthHack_ = input.readInt64();
+                hasLengthHackCase_ = 2;
                 break;
               } // case 16
               default: {
@@ -536,17 +537,17 @@ public Builder mergeFrom(
         } // finally
         return this;
       }
-      private int hasLengthCase_ = 0;
-      private java.lang.Object hasLength_;
-      public HasLengthCase
-          getHasLengthCase() {
-        return HasLengthCase.forNumber(
-            hasLengthCase_);
+      private int hasLengthHackCase_ = 0;
+      private java.lang.Object hasLengthHack_;
+      public HasLengthHackCase
+          getHasLengthHackCase() {
+        return HasLengthHackCase.forNumber(
+            hasLengthHackCase_);
       }
 
-      public Builder clearHasLength() {
-        hasLengthCase_ = 0;
-        hasLength_ = null;
+      public Builder clearHasLengthHack() {
+        hasLengthHackCase_ = 0;
+        hasLengthHack_ = null;
         onChanged();
         return this;
       }
@@ -602,15 +603,15 @@ public Builder clearStart() {
        * @return Whether the length field is set.
        */
       public boolean hasLength() {
-        return hasLengthCase_ == 2;
+        return hasLengthHackCase_ == 2;
       }
       /**
        * int64 length = 2;
        * @return The length.
        */
       public long getLength() {
-        if (hasLengthCase_ == 2) {
-          return (java.lang.Long) hasLength_;
+        if (hasLengthHackCase_ == 2) {
+          return (java.lang.Long) hasLengthHack_;
         }
         return 0L;
       }
@@ -621,8 +622,8 @@ public long getLength() {
        */
       public Builder setLength(long value) {
 
-        hasLengthCase_ = 2;
-        hasLength_ = value;
+        hasLengthHackCase_ = 2;
+        hasLengthHack_ = value;
         onChanged();
         return this;
       }
@@ -631,9 +632,9 @@ public Builder setLength(long value) {
        * @return This builder for chaining.
        */
       public Builder clearLength() {
-        if (hasLengthCase_ == 2) {
-          hasLengthCase_ = 0;
-          hasLength_ = null;
+        if (hasLengthHackCase_ == 2) {
+          hasLengthHackCase_ = 0;
+          hasLengthHack_ = null;
           onChanged();
         }
         return this;
@@ -1055,7 +1056,7 @@ public Builder mergeFrom(org.tensorflow.proto.TensorSliceProto other) {
             bitField0_ = (bitField0_ & ~0x00000001);
             extentBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getExtentFieldBuilder() : null;
+                 internalGetExtentFieldBuilder() : null;
           } else {
             extentBuilder_.addAllMessages(other.extent_);
           }
@@ -1401,7 +1402,7 @@ public Builder removeExtent(int index) {
      */
     public org.tensorflow.proto.TensorSliceProto.Extent.Builder getExtentBuilder(
         int index) {
-      return getExtentFieldBuilder().getBuilder(index);
+      return internalGetExtentFieldBuilder().getBuilder(index);
     }
     /**
      * 
@@ -1452,7 +1453,7 @@ public org.tensorflow.proto.TensorSliceProto.ExtentOrBuilder getExtentOrBuilder(
      * repeated .tensorflow.TensorSliceProto.Extent extent = 1;
      */
     public org.tensorflow.proto.TensorSliceProto.Extent.Builder addExtentBuilder() {
-      return getExtentFieldBuilder().addBuilder(
+      return internalGetExtentFieldBuilder().addBuilder(
           org.tensorflow.proto.TensorSliceProto.Extent.getDefaultInstance());
     }
     /**
@@ -1468,7 +1469,7 @@ public org.tensorflow.proto.TensorSliceProto.Extent.Builder addExtentBuilder() {
      */
     public org.tensorflow.proto.TensorSliceProto.Extent.Builder addExtentBuilder(
         int index) {
-      return getExtentFieldBuilder().addBuilder(
+      return internalGetExtentFieldBuilder().addBuilder(
           index, org.tensorflow.proto.TensorSliceProto.Extent.getDefaultInstance());
     }
     /**
@@ -1484,11 +1485,11 @@ public org.tensorflow.proto.TensorSliceProto.Extent.Builder addExtentBuilder(
      */
     public java.util.List 
          getExtentBuilderList() {
-      return getExtentFieldBuilder().getBuilderList();
+      return internalGetExtentFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.TensorSliceProto.Extent, org.tensorflow.proto.TensorSliceProto.Extent.Builder, org.tensorflow.proto.TensorSliceProto.ExtentOrBuilder> 
-        getExtentFieldBuilder() {
+        internalGetExtentFieldBuilder() {
       if (extentBuilder_ == null) {
         extentBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.TensorSliceProto.Extent, org.tensorflow.proto.TensorSliceProto.Extent.Builder, org.tensorflow.proto.TensorSliceProto.ExtentOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorSliceProtoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorSliceProtoOrBuilder.java
index c288cadbbf0..481afc588a9 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorSliceProtoOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorSliceProtoOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/tensor_slice.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface TensorSliceProtoOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.TensorSliceProto)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorSliceProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorSliceProtos.java
index fbbde962a98..1fa7781c471 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorSliceProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TensorSliceProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/tensor_slice.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class TensorSliceProtos {
   private TensorSliceProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       TensorSliceProtos.class.getName());
   }
@@ -45,14 +46,14 @@ public static void registerAllExtensions(
   static {
     java.lang.String[] descriptorData = {
       "\n,tensorflow/core/framework/tensor_slice" +
-      ".proto\022\ntensorflow\"\200\001\n\020TensorSliceProto\022" +
+      ".proto\022\ntensorflow\"\205\001\n\020TensorSliceProto\022" +
       "3\n\006extent\030\001 \003(\0132#.tensorflow.TensorSlice" +
-      "Proto.Extent\0327\n\006Extent\022\r\n\005start\030\001 \001(\003\022\020\n" +
-      "\006length\030\002 \001(\003H\000B\014\n\nhas_lengthB\203\001\n\024org.te" +
-      "nsorflow.protoB\021TensorSliceProtosP\001ZSgit" +
-      "hub.com/tensorflow/tensorflow/tensorflow" +
-      "/go/core/framework/tensor_slice_go_proto" +
-      "\370\001\001b\006proto3"
+      "Proto.Extent\032<\n\006Extent\022\r\n\005start\030\001 \001(\003\022\020\n" +
+      "\006length\030\002 \001(\003H\000B\021\n\017has_length_hackB\203\001\n\024o" +
+      "rg.tensorflow.protoB\021TensorSliceProtosP\001" +
+      "ZSgithub.com/tensorflow/tensorflow/tenso" +
+      "rflow/go/core/framework/tensor_slice_go_" +
+      "proto\370\001\001b\006proto3"
     };
     descriptor = com.google.protobuf.Descriptors.FileDescriptor
       .internalBuildGeneratedFileFrom(descriptorData,
@@ -69,7 +70,7 @@ public static void registerAllExtensions(
     internal_static_tensorflow_TensorSliceProto_Extent_fieldAccessorTable = new
       com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_tensorflow_TensorSliceProto_Extent_descriptor,
-        new java.lang.String[] { "Start", "Length", "HasLength", });
+        new java.lang.String[] { "Start", "Length", "HasLengthHack", });
     descriptor.resolveAllFeaturesImmutable();
   }
 
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TestLogProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TestLogProtos.java
index 4e6ef7c4896..fe4194be65f 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TestLogProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TestLogProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/test_log.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class TestLogProtos {
   private TestLogProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       TestLogProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TestResults.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TestResults.java
index 673f570f56a..400dad43483 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TestResults.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TestResults.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/test_log.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -18,6 +18,7 @@
  *
  * Protobuf type {@code tensorflow.TestResults}
  */
+@com.google.protobuf.Generated
 public final class TestResults extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.TestResults)
@@ -27,8 +28,8 @@ public final class TestResults extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       TestResults.class.getName());
   }
@@ -101,8 +102,8 @@ public enum BenchmarkType
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         BenchmarkType.class.getName());
     }
@@ -194,7 +195,7 @@ public BenchmarkType findValueByNumber(int number) {
         getDescriptorForType() {
       return getDescriptor();
     }
-    public static final com.google.protobuf.Descriptors.EnumDescriptor
+    public static com.google.protobuf.Descriptors.EnumDescriptor
         getDescriptor() {
       return org.tensorflow.proto.TestResults.getDescriptor().getEnumTypes().get(0);
     }
@@ -1005,11 +1006,11 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getEntriesFieldBuilder();
-        getBuildConfigurationFieldBuilder();
-        getCommitIdFieldBuilder();
-        getMachineConfigurationFieldBuilder();
-        getRunConfigurationFieldBuilder();
+        internalGetEntriesFieldBuilder();
+        internalGetBuildConfigurationFieldBuilder();
+        internalGetCommitIdFieldBuilder();
+        internalGetMachineConfigurationFieldBuilder();
+        internalGetRunConfigurationFieldBuilder();
       }
     }
     @java.lang.Override
@@ -1165,7 +1166,7 @@ public Builder mergeFrom(org.tensorflow.proto.TestResults other) {
       if (other.getStartTime() != 0L) {
         setStartTime(other.getStartTime());
       }
-      if (other.getRunTime() != 0D) {
+      if (java.lang.Double.doubleToRawLongBits(other.getRunTime()) != 0) {
         setRunTime(other.getRunTime());
       }
       if (other.hasMachineConfiguration()) {
@@ -1225,21 +1226,21 @@ public Builder mergeFrom(
             } // case 10
             case 18: {
               input.readMessage(
-                  getEntriesFieldBuilder().getBuilder(),
+                  internalGetEntriesFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000002;
               break;
             } // case 18
             case 26: {
               input.readMessage(
-                  getBuildConfigurationFieldBuilder().getBuilder(),
+                  internalGetBuildConfigurationFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000004;
               break;
             } // case 26
             case 34: {
               input.readMessage(
-                  getCommitIdFieldBuilder().getBuilder(),
+                  internalGetCommitIdFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000008;
               break;
@@ -1256,14 +1257,14 @@ public Builder mergeFrom(
             } // case 49
             case 58: {
               input.readMessage(
-                  getMachineConfigurationFieldBuilder().getBuilder(),
+                  internalGetMachineConfigurationFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000040;
               break;
             } // case 58
             case 66: {
               input.readMessage(
-                  getRunConfigurationFieldBuilder().getBuilder(),
+                  internalGetRunConfigurationFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000080;
               break;
@@ -1521,7 +1522,7 @@ public Builder clearEntries() {
     public org.tensorflow.proto.BenchmarkEntries.Builder getEntriesBuilder() {
       bitField0_ |= 0x00000002;
       onChanged();
-      return getEntriesFieldBuilder().getBuilder();
+      return internalGetEntriesFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -1547,7 +1548,7 @@ public org.tensorflow.proto.BenchmarkEntriesOrBuilder getEntriesOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.BenchmarkEntries, org.tensorflow.proto.BenchmarkEntries.Builder, org.tensorflow.proto.BenchmarkEntriesOrBuilder> 
-        getEntriesFieldBuilder() {
+        internalGetEntriesFieldBuilder() {
       if (entriesBuilder_ == null) {
         entriesBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.BenchmarkEntries, org.tensorflow.proto.BenchmarkEntries.Builder, org.tensorflow.proto.BenchmarkEntriesOrBuilder>(
@@ -1678,7 +1679,7 @@ public Builder clearBuildConfiguration() {
     public org.tensorflow.proto.BuildConfiguration.Builder getBuildConfigurationBuilder() {
       bitField0_ |= 0x00000004;
       onChanged();
-      return getBuildConfigurationFieldBuilder().getBuilder();
+      return internalGetBuildConfigurationFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -1704,7 +1705,7 @@ public org.tensorflow.proto.BuildConfigurationOrBuilder getBuildConfigurationOrB
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.BuildConfiguration, org.tensorflow.proto.BuildConfiguration.Builder, org.tensorflow.proto.BuildConfigurationOrBuilder> 
-        getBuildConfigurationFieldBuilder() {
+        internalGetBuildConfigurationFieldBuilder() {
       if (buildConfigurationBuilder_ == null) {
         buildConfigurationBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.BuildConfiguration, org.tensorflow.proto.BuildConfiguration.Builder, org.tensorflow.proto.BuildConfigurationOrBuilder>(
@@ -1835,7 +1836,7 @@ public Builder clearCommitId() {
     public org.tensorflow.proto.CommitId.Builder getCommitIdBuilder() {
       bitField0_ |= 0x00000008;
       onChanged();
-      return getCommitIdFieldBuilder().getBuilder();
+      return internalGetCommitIdFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -1861,7 +1862,7 @@ public org.tensorflow.proto.CommitIdOrBuilder getCommitIdOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.CommitId, org.tensorflow.proto.CommitId.Builder, org.tensorflow.proto.CommitIdOrBuilder> 
-        getCommitIdFieldBuilder() {
+        internalGetCommitIdFieldBuilder() {
       if (commitIdBuilder_ == null) {
         commitIdBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.CommitId, org.tensorflow.proto.CommitId.Builder, org.tensorflow.proto.CommitIdOrBuilder>(
@@ -2080,7 +2081,7 @@ public Builder clearMachineConfiguration() {
     public org.tensorflow.proto.MachineConfiguration.Builder getMachineConfigurationBuilder() {
       bitField0_ |= 0x00000040;
       onChanged();
-      return getMachineConfigurationFieldBuilder().getBuilder();
+      return internalGetMachineConfigurationFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -2106,7 +2107,7 @@ public org.tensorflow.proto.MachineConfigurationOrBuilder getMachineConfiguratio
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.MachineConfiguration, org.tensorflow.proto.MachineConfiguration.Builder, org.tensorflow.proto.MachineConfigurationOrBuilder> 
-        getMachineConfigurationFieldBuilder() {
+        internalGetMachineConfigurationFieldBuilder() {
       if (machineConfigurationBuilder_ == null) {
         machineConfigurationBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.MachineConfiguration, org.tensorflow.proto.MachineConfiguration.Builder, org.tensorflow.proto.MachineConfigurationOrBuilder>(
@@ -2237,7 +2238,7 @@ public Builder clearRunConfiguration() {
     public org.tensorflow.proto.RunConfiguration.Builder getRunConfigurationBuilder() {
       bitField0_ |= 0x00000080;
       onChanged();
-      return getRunConfigurationFieldBuilder().getBuilder();
+      return internalGetRunConfigurationFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -2263,7 +2264,7 @@ public org.tensorflow.proto.RunConfigurationOrBuilder getRunConfigurationOrBuild
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.RunConfiguration, org.tensorflow.proto.RunConfiguration.Builder, org.tensorflow.proto.RunConfigurationOrBuilder> 
-        getRunConfigurationFieldBuilder() {
+        internalGetRunConfigurationFieldBuilder() {
       if (runConfigurationBuilder_ == null) {
         runConfigurationBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.RunConfiguration, org.tensorflow.proto.RunConfiguration.Builder, org.tensorflow.proto.RunConfigurationOrBuilder>(
@@ -2401,9 +2402,7 @@ public org.tensorflow.proto.TestResults.BenchmarkType getBenchmarkType() {
      * @return This builder for chaining.
      */
     public Builder setBenchmarkType(org.tensorflow.proto.TestResults.BenchmarkType value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000200;
       benchmarkType_ = value.getNumber();
       onChanged();
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TestResultsOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TestResultsOrBuilder.java
index ec051f94716..2a44cf9c866 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TestResultsOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TestResultsOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/test_log.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface TestResultsOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.TestResults)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ThreadPoolOptionProto.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ThreadPoolOptionProto.java
index b5618ce9bed..a7192b7207e 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ThreadPoolOptionProto.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ThreadPoolOptionProto.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/config.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.ThreadPoolOptionProto}
  */
+@com.google.protobuf.Generated
 public final class ThreadPoolOptionProto extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.ThreadPoolOptionProto)
@@ -17,8 +18,8 @@ public final class ThreadPoolOptionProto extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       ThreadPoolOptionProto.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ThreadPoolOptionProtoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ThreadPoolOptionProtoOrBuilder.java
index 293e6914f9f..37bfff07f7b 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ThreadPoolOptionProtoOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ThreadPoolOptionProtoOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/config.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface ThreadPoolOptionProtoOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.ThreadPoolOptionProto)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TrackableObjectGraphOuterClass.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TrackableObjectGraphOuterClass.java
index 4ab6b3965d8..7b2e4aaf8fe 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TrackableObjectGraphOuterClass.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TrackableObjectGraphOuterClass.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/trackable_object_graph.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class TrackableObjectGraphOuterClass {
   private TrackableObjectGraphOuterClass() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       TrackableObjectGraphOuterClass.class.getName());
   }
@@ -65,8 +66,8 @@ public static final class TrackableObjectGraph extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         TrackableObjectGraph.class.getName());
     }
@@ -305,8 +306,8 @@ public static final class TrackableObject extends
         com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
           com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
           /* major= */ 4,
-          /* minor= */ 28,
-          /* patch= */ 3,
+          /* minor= */ 31,
+          /* patch= */ 1,
           /* suffix= */ "",
           TrackableObject.class.getName());
       }
@@ -380,8 +381,8 @@ public static final class ObjectReference extends
           com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
             com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
             /* major= */ 4,
-            /* minor= */ 28,
-            /* patch= */ 3,
+            /* minor= */ 31,
+            /* patch= */ 1,
             /* suffix= */ "",
             ObjectReference.class.getName());
         }
@@ -1062,8 +1063,8 @@ public static final class SerializedTensor extends
           com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
             com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
             /* major= */ 4,
-            /* minor= */ 28,
-            /* patch= */ 3,
+            /* minor= */ 31,
+            /* patch= */ 1,
             /* suffix= */ "",
             SerializedTensor.class.getName());
         }
@@ -1993,8 +1994,8 @@ public static final class SlotVariableReference extends
           com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
             com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
             /* major= */ 4,
-            /* minor= */ 28,
-            /* patch= */ 3,
+            /* minor= */ 31,
+            /* patch= */ 1,
             /* suffix= */ "",
             SlotVariableReference.class.getName());
         }
@@ -3197,11 +3198,11 @@ private Builder(
         private void maybeForceBuilderInitialization() {
           if (com.google.protobuf.GeneratedMessage
                   .alwaysUseFieldBuilders) {
-            getChildrenFieldBuilder();
-            getAttributesFieldBuilder();
-            getSlotVariablesFieldBuilder();
-            getRegisteredSaverFieldBuilder();
-            getHasCheckpointValuesFieldBuilder();
+            internalGetChildrenFieldBuilder();
+            internalGetAttributesFieldBuilder();
+            internalGetSlotVariablesFieldBuilder();
+            internalGetRegisteredSaverFieldBuilder();
+            internalGetHasCheckpointValuesFieldBuilder();
           }
         }
         @java.lang.Override
@@ -3351,7 +3352,7 @@ public Builder mergeFrom(org.tensorflow.proto.TrackableObjectGraphOuterClass.Tra
                 bitField0_ = (bitField0_ & ~0x00000001);
                 childrenBuilder_ = 
                   com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                     getChildrenFieldBuilder() : null;
+                     internalGetChildrenFieldBuilder() : null;
               } else {
                 childrenBuilder_.addAllMessages(other.children_);
               }
@@ -3377,7 +3378,7 @@ public Builder mergeFrom(org.tensorflow.proto.TrackableObjectGraphOuterClass.Tra
                 bitField0_ = (bitField0_ & ~0x00000002);
                 attributesBuilder_ = 
                   com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                     getAttributesFieldBuilder() : null;
+                     internalGetAttributesFieldBuilder() : null;
               } else {
                 attributesBuilder_.addAllMessages(other.attributes_);
               }
@@ -3403,7 +3404,7 @@ public Builder mergeFrom(org.tensorflow.proto.TrackableObjectGraphOuterClass.Tra
                 bitField0_ = (bitField0_ & ~0x00000004);
                 slotVariablesBuilder_ = 
                   com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                     getSlotVariablesFieldBuilder() : null;
+                     internalGetSlotVariablesFieldBuilder() : null;
               } else {
                 slotVariablesBuilder_.addAllMessages(other.slotVariables_);
               }
@@ -3482,14 +3483,14 @@ public Builder mergeFrom(
                 } // case 26
                 case 34: {
                   input.readMessage(
-                      getRegisteredSaverFieldBuilder().getBuilder(),
+                      internalGetRegisteredSaverFieldBuilder().getBuilder(),
                       extensionRegistry);
                   bitField0_ |= 0x00000008;
                   break;
                 } // case 34
                 case 42: {
                   input.readMessage(
-                      getHasCheckpointValuesFieldBuilder().getBuilder(),
+                      internalGetHasCheckpointValuesFieldBuilder().getBuilder(),
                       extensionRegistry);
                   bitField0_ |= 0x00000010;
                   break;
@@ -3743,7 +3744,7 @@ public Builder removeChildren(int index) {
          */
         public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference.Builder getChildrenBuilder(
             int index) {
-          return getChildrenFieldBuilder().getBuilder(index);
+          return internalGetChildrenFieldBuilder().getBuilder(index);
         }
         /**
          * 
@@ -3782,7 +3783,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.
          * repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1;
          */
         public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference.Builder addChildrenBuilder() {
-          return getChildrenFieldBuilder().addBuilder(
+          return internalGetChildrenFieldBuilder().addBuilder(
               org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference.getDefaultInstance());
         }
         /**
@@ -3794,7 +3795,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.
          */
         public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference.Builder addChildrenBuilder(
             int index) {
-          return getChildrenFieldBuilder().addBuilder(
+          return internalGetChildrenFieldBuilder().addBuilder(
               index, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference.getDefaultInstance());
         }
         /**
@@ -3806,11 +3807,11 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.
          */
         public java.util.List 
              getChildrenBuilderList() {
-          return getChildrenFieldBuilder().getBuilderList();
+          return internalGetChildrenFieldBuilder().getBuilderList();
         }
         private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReferenceOrBuilder> 
-            getChildrenFieldBuilder() {
+            internalGetChildrenFieldBuilder() {
           if (childrenBuilder_ == null) {
             childrenBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReference.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.ObjectReferenceOrBuilder>(
@@ -4055,7 +4056,7 @@ public Builder removeAttributes(int index) {
          */
         public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SerializedTensor.Builder getAttributesBuilder(
             int index) {
-          return getAttributesFieldBuilder().getBuilder(index);
+          return internalGetAttributesFieldBuilder().getBuilder(index);
         }
         /**
          * 
@@ -4094,7 +4095,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.
          * repeated .tensorflow.TrackableObjectGraph.TrackableObject.SerializedTensor attributes = 2;
          */
         public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SerializedTensor.Builder addAttributesBuilder() {
-          return getAttributesFieldBuilder().addBuilder(
+          return internalGetAttributesFieldBuilder().addBuilder(
               org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SerializedTensor.getDefaultInstance());
         }
         /**
@@ -4106,7 +4107,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.
          */
         public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SerializedTensor.Builder addAttributesBuilder(
             int index) {
-          return getAttributesFieldBuilder().addBuilder(
+          return internalGetAttributesFieldBuilder().addBuilder(
               index, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SerializedTensor.getDefaultInstance());
         }
         /**
@@ -4118,11 +4119,11 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.
          */
         public java.util.List 
              getAttributesBuilderList() {
-          return getAttributesFieldBuilder().getBuilderList();
+          return internalGetAttributesFieldBuilder().getBuilderList();
         }
         private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SerializedTensor, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SerializedTensor.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SerializedTensorOrBuilder> 
-            getAttributesFieldBuilder() {
+            internalGetAttributesFieldBuilder() {
           if (attributesBuilder_ == null) {
             attributesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SerializedTensor, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SerializedTensor.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SerializedTensorOrBuilder>(
@@ -4367,7 +4368,7 @@ public Builder removeSlotVariables(int index) {
          */
         public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference.Builder getSlotVariablesBuilder(
             int index) {
-          return getSlotVariablesFieldBuilder().getBuilder(index);
+          return internalGetSlotVariablesFieldBuilder().getBuilder(index);
         }
         /**
          * 
@@ -4406,7 +4407,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.
          * repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3;
          */
         public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference.Builder addSlotVariablesBuilder() {
-          return getSlotVariablesFieldBuilder().addBuilder(
+          return internalGetSlotVariablesFieldBuilder().addBuilder(
               org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference.getDefaultInstance());
         }
         /**
@@ -4418,7 +4419,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.
          */
         public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference.Builder addSlotVariablesBuilder(
             int index) {
-          return getSlotVariablesFieldBuilder().addBuilder(
+          return internalGetSlotVariablesFieldBuilder().addBuilder(
               index, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference.getDefaultInstance());
         }
         /**
@@ -4430,11 +4431,11 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.
          */
         public java.util.List 
              getSlotVariablesBuilderList() {
-          return getSlotVariablesFieldBuilder().getBuilderList();
+          return internalGetSlotVariablesFieldBuilder().getBuilderList();
         }
         private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReferenceOrBuilder> 
-            getSlotVariablesFieldBuilder() {
+            internalGetSlotVariablesFieldBuilder() {
           if (slotVariablesBuilder_ == null) {
             slotVariablesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReference.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.SlotVariableReferenceOrBuilder>(
@@ -4573,7 +4574,7 @@ public Builder clearRegisteredSaver() {
         public org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaver.Builder getRegisteredSaverBuilder() {
           bitField0_ |= 0x00000008;
           onChanged();
-          return getRegisteredSaverFieldBuilder().getBuilder();
+          return internalGetRegisteredSaverFieldBuilder().getBuilder();
         }
         /**
          * 
@@ -4601,7 +4602,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaverOrBuil
          */
         private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaver, org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaver.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaverOrBuilder> 
-            getRegisteredSaverFieldBuilder() {
+            internalGetRegisteredSaverFieldBuilder() {
           if (registeredSaverBuilder_ == null) {
             registeredSaverBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaver, org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaver.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.RegisteredSaverOrBuilder>(
@@ -4753,7 +4754,7 @@ public Builder clearHasCheckpointValues() {
         public com.google.protobuf.BoolValue.Builder getHasCheckpointValuesBuilder() {
           bitField0_ |= 0x00000010;
           onChanged();
-          return getHasCheckpointValuesFieldBuilder().getBuilder();
+          return internalGetHasCheckpointValuesFieldBuilder().getBuilder();
         }
         /**
          * 
@@ -4785,7 +4786,7 @@ public com.google.protobuf.BoolValueOrBuilder getHasCheckpointValuesOrBuilder()
          */
         private com.google.protobuf.SingleFieldBuilder<
             com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> 
-            getHasCheckpointValuesFieldBuilder() {
+            internalGetHasCheckpointValuesFieldBuilder() {
           if (hasCheckpointValuesBuilder_ == null) {
             hasCheckpointValuesBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>(
@@ -5169,7 +5170,7 @@ public Builder mergeFrom(org.tensorflow.proto.TrackableObjectGraphOuterClass.Tra
               bitField0_ = (bitField0_ & ~0x00000001);
               nodesBuilder_ = 
                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                   getNodesFieldBuilder() : null;
+                   internalGetNodesFieldBuilder() : null;
             } else {
               nodesBuilder_.addAllMessages(other.nodes_);
             }
@@ -5411,7 +5412,7 @@ public Builder removeNodes(int index) {
        */
       public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.Builder getNodesBuilder(
           int index) {
-        return getNodesFieldBuilder().getBuilder(index);
+        return internalGetNodesFieldBuilder().getBuilder(index);
       }
       /**
        * repeated .tensorflow.TrackableObjectGraph.TrackableObject nodes = 1;
@@ -5438,7 +5439,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.
        * repeated .tensorflow.TrackableObjectGraph.TrackableObject nodes = 1;
        */
       public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.Builder addNodesBuilder() {
-        return getNodesFieldBuilder().addBuilder(
+        return internalGetNodesFieldBuilder().addBuilder(
             org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.getDefaultInstance());
       }
       /**
@@ -5446,7 +5447,7 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.
        */
       public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.Builder addNodesBuilder(
           int index) {
-        return getNodesFieldBuilder().addBuilder(
+        return internalGetNodesFieldBuilder().addBuilder(
             index, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.getDefaultInstance());
       }
       /**
@@ -5454,11 +5455,11 @@ public org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.
        */
       public java.util.List 
            getNodesBuilderList() {
-        return getNodesFieldBuilder().getBuilderList();
+        return internalGetNodesFieldBuilder().getBuilderList();
       }
       private com.google.protobuf.RepeatedFieldBuilder<
           org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObjectOrBuilder> 
-          getNodesFieldBuilder() {
+          internalGetNodesFieldBuilder() {
         if (nodesBuilder_ == null) {
           nodesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObject.Builder, org.tensorflow.proto.TrackableObjectGraphOuterClass.TrackableObjectGraph.TrackableObjectOrBuilder>(
@@ -5578,8 +5579,8 @@ public static final class RegisteredSaver extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         RegisteredSaver.class.getName());
     }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TransportOptions.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TransportOptions.java
index 6f2d3dbb71d..8f67cda0582 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TransportOptions.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TransportOptions.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/transport_options.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class TransportOptions {
   private TransportOptions() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       TransportOptions.class.getName());
   }
@@ -62,8 +63,8 @@ public static final class RecvBufRespExtra extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         RecvBufRespExtra.class.getName());
     }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TypesProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TypesProtos.java
index 262c275afad..59cba392efa 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TypesProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/TypesProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/types.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class TypesProtos {
   private TypesProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       TypesProtos.class.getName());
   }
@@ -41,7 +42,7 @@ public static void registerAllExtensions(
     java.lang.String[] descriptorData = {
       "\n%tensorflow/core/framework/types.proto\022" +
       "\ntensorflow\"9\n\017SerializedDType\022&\n\010dataty" +
-      "pe\030\001 \001(\0162\024.tensorflow.DataType*\251\t\n\010DataT" +
+      "pe\030\001 \001(\0162\024.tensorflow.DataType*\332\t\n\010DataT" +
       "ype\022\016\n\nDT_INVALID\020\000\022\014\n\010DT_FLOAT\020\001\022\r\n\tDT_" +
       "DOUBLE\020\002\022\014\n\010DT_INT32\020\003\022\014\n\010DT_UINT8\020\004\022\014\n\010" +
       "DT_INT16\020\005\022\013\n\007DT_INT8\020\006\022\r\n\tDT_STRING\020\007\022\020" +
@@ -55,26 +56,28 @@ public static void registerAllExtensions(
       "4M3FN\020\031\022\026\n\022DT_FLOAT8_E4M3FNUZ\020\032\022\031\n\025DT_FL" +
       "OAT8_E4M3B11FNUZ\020\033\022\026\n\022DT_FLOAT8_E5M2FNUZ" +
       "\020\034\022\013\n\007DT_INT4\020\035\022\014\n\010DT_UINT4\020\036\022\013\n\007DT_INT2" +
-      "\020\037\022\014\n\010DT_UINT2\020 \022\020\n\014DT_FLOAT_REF\020e\022\021\n\rDT" +
-      "_DOUBLE_REF\020f\022\020\n\014DT_INT32_REF\020g\022\020\n\014DT_UI" +
-      "NT8_REF\020h\022\020\n\014DT_INT16_REF\020i\022\017\n\013DT_INT8_R" +
-      "EF\020j\022\021\n\rDT_STRING_REF\020k\022\024\n\020DT_COMPLEX64_" +
-      "REF\020l\022\020\n\014DT_INT64_REF\020m\022\017\n\013DT_BOOL_REF\020n" +
-      "\022\020\n\014DT_QINT8_REF\020o\022\021\n\rDT_QUINT8_REF\020p\022\021\n" +
-      "\rDT_QINT32_REF\020q\022\023\n\017DT_BFLOAT16_REF\020r\022\021\n" +
-      "\rDT_QINT16_REF\020s\022\022\n\016DT_QUINT16_REF\020t\022\021\n\r" +
-      "DT_UINT16_REF\020u\022\025\n\021DT_COMPLEX128_REF\020v\022\017" +
-      "\n\013DT_HALF_REF\020w\022\023\n\017DT_RESOURCE_REF\020x\022\022\n\016" +
-      "DT_VARIANT_REF\020y\022\021\n\rDT_UINT32_REF\020z\022\021\n\rD" +
-      "T_UINT64_REF\020{\022\026\n\022DT_FLOAT8_E5M2_REF\020|\022\030" +
-      "\n\024DT_FLOAT8_E4M3FN_REF\020}\022\032\n\026DT_FLOAT8_E4" +
-      "M3FNUZ_REF\020~\022\035\n\031DT_FLOAT8_E4M3B11FNUZ_RE" +
-      "F\020\177\022\033\n\026DT_FLOAT8_E5M2FNUZ_REF\020\200\001\022\020\n\013DT_I" +
-      "NT4_REF\020\201\001\022\021\n\014DT_UINT4_REF\020\202\001\022\020\n\013DT_INT2" +
-      "_REF\020\203\001\022\021\n\014DT_UINT2_REF\020\204\001Bv\n\024org.tensor" +
-      "flow.protoB\013TypesProtosP\001ZLgithub.com/te" +
-      "nsorflow/tensorflow/tensorflow/go/core/f" +
-      "ramework/types_go_proto\370\001\001b\006proto3"
+      "\020\037\022\014\n\010DT_UINT2\020 \022\024\n\020DT_FLOAT4_E2M1FN\020!\022\020" +
+      "\n\014DT_FLOAT_REF\020e\022\021\n\rDT_DOUBLE_REF\020f\022\020\n\014D" +
+      "T_INT32_REF\020g\022\020\n\014DT_UINT8_REF\020h\022\020\n\014DT_IN" +
+      "T16_REF\020i\022\017\n\013DT_INT8_REF\020j\022\021\n\rDT_STRING_" +
+      "REF\020k\022\024\n\020DT_COMPLEX64_REF\020l\022\020\n\014DT_INT64_" +
+      "REF\020m\022\017\n\013DT_BOOL_REF\020n\022\020\n\014DT_QINT8_REF\020o" +
+      "\022\021\n\rDT_QUINT8_REF\020p\022\021\n\rDT_QINT32_REF\020q\022\023" +
+      "\n\017DT_BFLOAT16_REF\020r\022\021\n\rDT_QINT16_REF\020s\022\022" +
+      "\n\016DT_QUINT16_REF\020t\022\021\n\rDT_UINT16_REF\020u\022\025\n" +
+      "\021DT_COMPLEX128_REF\020v\022\017\n\013DT_HALF_REF\020w\022\023\n" +
+      "\017DT_RESOURCE_REF\020x\022\022\n\016DT_VARIANT_REF\020y\022\021" +
+      "\n\rDT_UINT32_REF\020z\022\021\n\rDT_UINT64_REF\020{\022\026\n\022" +
+      "DT_FLOAT8_E5M2_REF\020|\022\030\n\024DT_FLOAT8_E4M3FN" +
+      "_REF\020}\022\032\n\026DT_FLOAT8_E4M3FNUZ_REF\020~\022\035\n\031DT" +
+      "_FLOAT8_E4M3B11FNUZ_REF\020\177\022\033\n\026DT_FLOAT8_E" +
+      "5M2FNUZ_REF\020\200\001\022\020\n\013DT_INT4_REF\020\201\001\022\021\n\014DT_U" +
+      "INT4_REF\020\202\001\022\020\n\013DT_INT2_REF\020\203\001\022\021\n\014DT_UINT" +
+      "2_REF\020\204\001\022\031\n\024DT_FLOAT4_E2M1FN_REF\020\205\001Bv\n\024o" +
+      "rg.tensorflow.protoB\013TypesProtosP\001ZLgith" +
+      "ub.com/tensorflow/tensorflow/tensorflow/" +
+      "go/core/framework/types_go_proto\370\001\001b\006pro" +
+      "to3"
     };
     descriptor = com.google.protobuf.Descriptors.FileDescriptor
       .internalBuildGeneratedFileFrom(descriptorData,
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/UniformQuantOpsAttr.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/UniformQuantOpsAttr.java
index 91595e4d9c8..cc7b31ec2ae 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/UniformQuantOpsAttr.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/UniformQuantOpsAttr.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/util/quantization/uniform_quant_ops_attr.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class UniformQuantOpsAttr {
   private UniformQuantOpsAttr() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       UniformQuantOpsAttr.class.getName());
   }
@@ -202,8 +203,8 @@ public static final class UniformQuantizedConvolutionDimensionNumbersAttr extend
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         UniformQuantizedConvolutionDimensionNumbersAttr.class.getName());
     }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ValuesDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ValuesDef.java
index 6245af89c8c..e099426eeb0 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ValuesDef.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ValuesDef.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/control_flow.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.ValuesDef}
  */
+@com.google.protobuf.Generated
 public final class ValuesDef extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.ValuesDef)
@@ -21,8 +22,8 @@ public final class ValuesDef extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       ValuesDef.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ValuesDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ValuesDefOrBuilder.java
index a664cecce7c..10be83b3e0b 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ValuesDefOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/ValuesDefOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/control_flow.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface ValuesDefOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.ValuesDef)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VarLenFeatureProto.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VarLenFeatureProto.java
index 15f8a3ade51..02e932de3e1 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VarLenFeatureProto.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VarLenFeatureProto.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/example/example_parser_configuration.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.VarLenFeatureProto}
  */
+@com.google.protobuf.Generated
 public final class VarLenFeatureProto extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.VarLenFeatureProto)
@@ -17,8 +18,8 @@ public final class VarLenFeatureProto extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       VarLenFeatureProto.class.getName());
   }
@@ -579,9 +580,7 @@ public org.tensorflow.proto.DataType getDtype() {
      * @return This builder for chaining.
      */
     public Builder setDtype(org.tensorflow.proto.DataType value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000001;
       dtype_ = value.getNumber();
       onChanged();
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VarLenFeatureProtoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VarLenFeatureProtoOrBuilder.java
index dfd0c8e932d..5943d90f83f 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VarLenFeatureProtoOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VarLenFeatureProtoOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/example/example_parser_configuration.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface VarLenFeatureProtoOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.VarLenFeatureProto)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableAggregation.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableAggregation.java
index 1b2f657469d..afe1af2dbc6 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableAggregation.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableAggregation.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/variable.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf enum {@code tensorflow.VariableAggregation}
  */
+@com.google.protobuf.Generated
 public enum VariableAggregation
     implements com.google.protobuf.ProtocolMessageEnum {
   /**
@@ -57,8 +58,8 @@ public enum VariableAggregation
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       VariableAggregation.class.getName());
   }
@@ -156,7 +157,7 @@ public VariableAggregation findValueByNumber(int number) {
       getDescriptorForType() {
     return getDescriptor();
   }
-  public static final com.google.protobuf.Descriptors.EnumDescriptor
+  public static com.google.protobuf.Descriptors.EnumDescriptor
       getDescriptor() {
     return org.tensorflow.proto.VariableProtos.getDescriptor().getEnumTypes().get(1);
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableDef.java
index 05fa166a1a0..306965f9a79 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableDef.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableDef.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/variable.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.VariableDef}
  */
+@com.google.protobuf.Generated
 public final class VariableDef extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.VariableDef)
@@ -21,8 +22,8 @@ public final class VariableDef extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       VariableDef.class.getName());
   }
@@ -644,7 +645,7 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getSaveSliceInfoDefFieldBuilder();
+        internalGetSaveSliceInfoDefFieldBuilder();
       }
     }
     @java.lang.Override
@@ -821,7 +822,7 @@ public Builder mergeFrom(
             } // case 26
             case 34: {
               input.readMessage(
-                  getSaveSliceInfoDefFieldBuilder().getBuilder(),
+                  internalGetSaveSliceInfoDefFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000010;
               break;
@@ -1355,7 +1356,7 @@ public Builder clearSaveSliceInfoDef() {
     public org.tensorflow.proto.SaveSliceInfoDef.Builder getSaveSliceInfoDefBuilder() {
       bitField0_ |= 0x00000010;
       onChanged();
-      return getSaveSliceInfoDefFieldBuilder().getBuilder();
+      return internalGetSaveSliceInfoDefFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -1381,7 +1382,7 @@ public org.tensorflow.proto.SaveSliceInfoDefOrBuilder getSaveSliceInfoDefOrBuild
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.SaveSliceInfoDef, org.tensorflow.proto.SaveSliceInfoDef.Builder, org.tensorflow.proto.SaveSliceInfoDefOrBuilder> 
-        getSaveSliceInfoDefFieldBuilder() {
+        internalGetSaveSliceInfoDefFieldBuilder() {
       if (saveSliceInfoDefBuilder_ == null) {
         saveSliceInfoDefBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.SaveSliceInfoDef, org.tensorflow.proto.SaveSliceInfoDef.Builder, org.tensorflow.proto.SaveSliceInfoDefOrBuilder>(
@@ -1531,9 +1532,7 @@ public org.tensorflow.proto.VariableSynchronization getSynchronization() {
      * @return This builder for chaining.
      */
     public Builder setSynchronization(org.tensorflow.proto.VariableSynchronization value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000080;
       synchronization_ = value.getNumber();
       onChanged();
@@ -1604,9 +1603,7 @@ public org.tensorflow.proto.VariableAggregation getAggregation() {
      * @return This builder for chaining.
      */
     public Builder setAggregation(org.tensorflow.proto.VariableAggregation value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000100;
       aggregation_ = value.getNumber();
       onChanged();
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableDefOrBuilder.java
index c21be5ee951..0c431defece 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableDefOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableDefOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/variable.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface VariableDefOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.VariableDef)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableProtos.java
index 0fcca6df742..e6454b6baf0 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/variable.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class VariableProtos {
   private VariableProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       VariableProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableSynchronization.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableSynchronization.java
index 3a618d402ac..ac4a0286826 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableSynchronization.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariableSynchronization.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/variable.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf enum {@code tensorflow.VariableSynchronization}
  */
+@com.google.protobuf.Generated
 public enum VariableSynchronization
     implements com.google.protobuf.ProtocolMessageEnum {
   /**
@@ -59,8 +60,8 @@ public enum VariableSynchronization
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       VariableSynchronization.class.getName());
   }
@@ -160,7 +161,7 @@ public VariableSynchronization findValueByNumber(int number) {
       getDescriptorForType() {
     return getDescriptor();
   }
-  public static final com.google.protobuf.Descriptors.EnumDescriptor
+  public static com.google.protobuf.Descriptors.EnumDescriptor
       getDescriptor() {
     return org.tensorflow.proto.VariableProtos.getDescriptor().getEnumTypes().get(0);
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariantTensorDataProto.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariantTensorDataProto.java
index 50181e54d12..79cee5ba7f7 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariantTensorDataProto.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariantTensorDataProto.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/tensor.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.VariantTensorDataProto}
  */
+@com.google.protobuf.Generated
 public final class VariantTensorDataProto extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.VariantTensorDataProto)
@@ -21,8 +22,8 @@ public final class VariantTensorDataProto extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       VariantTensorDataProto.class.getName());
   }
@@ -470,7 +471,7 @@ public Builder mergeFrom(org.tensorflow.proto.VariantTensorDataProto other) {
         bitField0_ |= 0x00000001;
         onChanged();
       }
-      if (other.getMetadata() != com.google.protobuf.ByteString.EMPTY) {
+      if (!other.getMetadata().isEmpty()) {
         setMetadata(other.getMetadata());
       }
       if (tensorsBuilder_ == null) {
@@ -493,7 +494,7 @@ public Builder mergeFrom(org.tensorflow.proto.VariantTensorDataProto other) {
             bitField0_ = (bitField0_ & ~0x00000004);
             tensorsBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getTensorsFieldBuilder() : null;
+                 internalGetTensorsFieldBuilder() : null;
           } else {
             tensorsBuilder_.addAllMessages(other.tensors_);
           }
@@ -933,7 +934,7 @@ public Builder removeTensors(int index) {
      */
     public org.tensorflow.proto.TensorProto.Builder getTensorsBuilder(
         int index) {
-      return getTensorsFieldBuilder().getBuilder(index);
+      return internalGetTensorsFieldBuilder().getBuilder(index);
     }
     /**
      * 
@@ -972,7 +973,7 @@ public org.tensorflow.proto.TensorProtoOrBuilder getTensorsOrBuilder(
      * repeated .tensorflow.TensorProto tensors = 3;
      */
     public org.tensorflow.proto.TensorProto.Builder addTensorsBuilder() {
-      return getTensorsFieldBuilder().addBuilder(
+      return internalGetTensorsFieldBuilder().addBuilder(
           org.tensorflow.proto.TensorProto.getDefaultInstance());
     }
     /**
@@ -984,7 +985,7 @@ public org.tensorflow.proto.TensorProto.Builder addTensorsBuilder() {
      */
     public org.tensorflow.proto.TensorProto.Builder addTensorsBuilder(
         int index) {
-      return getTensorsFieldBuilder().addBuilder(
+      return internalGetTensorsFieldBuilder().addBuilder(
           index, org.tensorflow.proto.TensorProto.getDefaultInstance());
     }
     /**
@@ -996,11 +997,11 @@ public org.tensorflow.proto.TensorProto.Builder addTensorsBuilder(
      */
     public java.util.List 
          getTensorsBuilderList() {
-      return getTensorsFieldBuilder().getBuilderList();
+      return internalGetTensorsFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> 
-        getTensorsFieldBuilder() {
+        internalGetTensorsFieldBuilder() {
       if (tensorsBuilder_ == null) {
         tensorsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariantTensorDataProtoOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariantTensorDataProtoOrBuilder.java
index 35d2a7a341b..10c26d16de8 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariantTensorDataProtoOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VariantTensorDataProtoOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/tensor.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface VariantTensorDataProtoOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.VariantTensorDataProto)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VerifierConfig.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VerifierConfig.java
index c505dd32bab..35959c5be18 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VerifierConfig.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VerifierConfig.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/verifier_config.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.VerifierConfig}
  */
+@com.google.protobuf.Generated
 public final class VerifierConfig extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.VerifierConfig)
@@ -21,8 +22,8 @@ public final class VerifierConfig extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       VerifierConfig.class.getName());
   }
@@ -71,8 +72,8 @@ public enum Toggle
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         Toggle.class.getName());
     }
@@ -145,7 +146,7 @@ public Toggle findValueByNumber(int number) {
         getDescriptorForType() {
       return getDescriptor();
     }
-    public static final com.google.protobuf.Descriptors.EnumDescriptor
+    public static com.google.protobuf.Descriptors.EnumDescriptor
         getDescriptor() {
       return org.tensorflow.proto.VerifierConfig.getDescriptor().getEnumTypes().get(0);
     }
@@ -632,9 +633,7 @@ public org.tensorflow.proto.VerifierConfig.Toggle getStructureVerifier() {
      * @return This builder for chaining.
      */
     public Builder setStructureVerifier(org.tensorflow.proto.VerifierConfig.Toggle value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000002;
       structureVerifier_ = value.getNumber();
       onChanged();
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VerifierConfigOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VerifierConfigOrBuilder.java
index 73d458cfcba..5d65c2efa74 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VerifierConfigOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VerifierConfigOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/verifier_config.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface VerifierConfigOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.VerifierConfig)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VerifierConfigProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VerifierConfigProtos.java
index 90bb0857380..545f83f98df 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VerifierConfigProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VerifierConfigProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/verifier_config.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class VerifierConfigProtos {
   private VerifierConfigProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       VerifierConfigProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VersionDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VersionDef.java
index b9d81a5d931..310cf0152ea 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VersionDef.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VersionDef.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/versions.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -23,6 +23,7 @@
  *
  * Protobuf type {@code tensorflow.VersionDef}
  */
+@com.google.protobuf.Generated
 public final class VersionDef extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.VersionDef)
@@ -32,8 +33,8 @@ public final class VersionDef extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       VersionDef.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VersionDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VersionDefOrBuilder.java
index 46a49c23fd2..148c52854e7 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VersionDefOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VersionDefOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/versions.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface VersionDefOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.VersionDef)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VersionsProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VersionsProtos.java
index 4ab034a3ac6..5680bc42783 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VersionsProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/VersionsProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/versions.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public final class VersionsProtos {
   private VersionsProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       VersionsProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WatchdogConfig.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WatchdogConfig.java
index af3277bb62a..3e3655d4e0a 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WatchdogConfig.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WatchdogConfig.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/util/event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.WatchdogConfig}
  */
+@com.google.protobuf.Generated
 public final class WatchdogConfig extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.WatchdogConfig)
@@ -17,8 +18,8 @@ public final class WatchdogConfig extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       WatchdogConfig.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WatchdogConfigOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WatchdogConfigOrBuilder.java
index 8f35890f360..09f61146db5 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WatchdogConfigOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WatchdogConfigOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/util/event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface WatchdogConfigOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.WatchdogConfig)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WhileContextDef.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WhileContextDef.java
index dde2953f58a..444fa8ac23a 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WhileContextDef.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WhileContextDef.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/control_flow.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf type {@code tensorflow.WhileContextDef}
  */
+@com.google.protobuf.Generated
 public final class WhileContextDef extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.WhileContextDef)
@@ -21,8 +22,8 @@ public final class WhileContextDef extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       WhileContextDef.class.getName());
   }
@@ -873,8 +874,8 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getValuesDefFieldBuilder();
-        getNestedContextsFieldBuilder();
+        internalGetValuesDefFieldBuilder();
+        internalGetNestedContextsFieldBuilder();
       }
     }
     @java.lang.Override
@@ -1082,7 +1083,7 @@ public Builder mergeFrom(org.tensorflow.proto.WhileContextDef other) {
             bitField0_ = (bitField0_ & ~0x00000800);
             nestedContextsBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getNestedContextsFieldBuilder() : null;
+                 internalGetNestedContextsFieldBuilder() : null;
           } else {
             nestedContextsBuilder_.addAllMessages(other.nestedContexts_);
           }
@@ -1157,7 +1158,7 @@ public Builder mergeFrom(
             } // case 66
             case 74: {
               input.readMessage(
-                  getValuesDefFieldBuilder().getBuilder(),
+                  internalGetValuesDefFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000200;
               break;
@@ -2116,7 +2117,7 @@ public Builder clearValuesDef() {
     public org.tensorflow.proto.ValuesDef.Builder getValuesDefBuilder() {
       bitField0_ |= 0x00000200;
       onChanged();
-      return getValuesDefFieldBuilder().getBuilder();
+      return internalGetValuesDefFieldBuilder().getBuilder();
     }
     /**
      * 
@@ -2142,7 +2143,7 @@ public org.tensorflow.proto.ValuesDefOrBuilder getValuesDefOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.ValuesDef, org.tensorflow.proto.ValuesDef.Builder, org.tensorflow.proto.ValuesDefOrBuilder> 
-        getValuesDefFieldBuilder() {
+        internalGetValuesDefFieldBuilder() {
       if (valuesDefBuilder_ == null) {
         valuesDefBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.ValuesDef, org.tensorflow.proto.ValuesDef.Builder, org.tensorflow.proto.ValuesDefOrBuilder>(
@@ -2478,7 +2479,7 @@ public Builder removeNestedContexts(int index) {
      */
     public org.tensorflow.proto.ControlFlowContextDef.Builder getNestedContextsBuilder(
         int index) {
-      return getNestedContextsFieldBuilder().getBuilder(index);
+      return internalGetNestedContextsFieldBuilder().getBuilder(index);
     }
     /**
      * 
@@ -2517,7 +2518,7 @@ public org.tensorflow.proto.ControlFlowContextDefOrBuilder getNestedContextsOrBu
      * repeated .tensorflow.ControlFlowContextDef nested_contexts = 12;
      */
     public org.tensorflow.proto.ControlFlowContextDef.Builder addNestedContextsBuilder() {
-      return getNestedContextsFieldBuilder().addBuilder(
+      return internalGetNestedContextsFieldBuilder().addBuilder(
           org.tensorflow.proto.ControlFlowContextDef.getDefaultInstance());
     }
     /**
@@ -2529,7 +2530,7 @@ public org.tensorflow.proto.ControlFlowContextDef.Builder addNestedContextsBuild
      */
     public org.tensorflow.proto.ControlFlowContextDef.Builder addNestedContextsBuilder(
         int index) {
-      return getNestedContextsFieldBuilder().addBuilder(
+      return internalGetNestedContextsFieldBuilder().addBuilder(
           index, org.tensorflow.proto.ControlFlowContextDef.getDefaultInstance());
     }
     /**
@@ -2541,11 +2542,11 @@ public org.tensorflow.proto.ControlFlowContextDef.Builder addNestedContextsBuild
      */
     public java.util.List 
          getNestedContextsBuilderList() {
-      return getNestedContextsFieldBuilder().getBuilderList();
+      return internalGetNestedContextsFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.ControlFlowContextDef, org.tensorflow.proto.ControlFlowContextDef.Builder, org.tensorflow.proto.ControlFlowContextDefOrBuilder> 
-        getNestedContextsFieldBuilder() {
+        internalGetNestedContextsFieldBuilder() {
       if (nestedContextsBuilder_ == null) {
         nestedContextsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.ControlFlowContextDef, org.tensorflow.proto.ControlFlowContextDef.Builder, org.tensorflow.proto.ControlFlowContextDefOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WhileContextDefOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WhileContextDefOrBuilder.java
index 1a2e27ced0e..c1bcab53658 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WhileContextDefOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WhileContextDefOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/control_flow.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface WhileContextDefOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.WhileContextDef)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHealth.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHealth.java
index 842c0e8ac3a..960ffd45905 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHealth.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHealth.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/util/event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -12,6 +12,7 @@
  *
  * Protobuf enum {@code tensorflow.WorkerHealth}
  */
+@com.google.protobuf.Generated
 public enum WorkerHealth
     implements com.google.protobuf.ProtocolMessageEnum {
   /**
@@ -45,8 +46,8 @@ public enum WorkerHealth
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       WorkerHealth.class.getName());
   }
@@ -132,7 +133,7 @@ public WorkerHealth findValueByNumber(int number) {
       getDescriptorForType() {
     return getDescriptor();
   }
-  public static final com.google.protobuf.Descriptors.EnumDescriptor
+  public static com.google.protobuf.Descriptors.EnumDescriptor
       getDescriptor() {
     return org.tensorflow.proto.EventProtos.getDescriptor().getEnumTypes().get(0);
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHeartbeatRequest.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHeartbeatRequest.java
index 6459105c36b..d4eb44883a3 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHeartbeatRequest.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHeartbeatRequest.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/util/event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.WorkerHeartbeatRequest}
  */
+@com.google.protobuf.Generated
 public final class WorkerHeartbeatRequest extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.WorkerHeartbeatRequest)
@@ -17,8 +18,8 @@ public final class WorkerHeartbeatRequest extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       WorkerHeartbeatRequest.class.getName());
   }
@@ -335,8 +336,8 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getWatchdogConfigFieldBuilder();
-        getExitCodeFieldBuilder();
+        internalGetWatchdogConfigFieldBuilder();
+        internalGetExitCodeFieldBuilder();
       }
     }
     @java.lang.Override
@@ -460,14 +461,14 @@ public Builder mergeFrom(
             } // case 8
             case 18: {
               input.readMessage(
-                  getWatchdogConfigFieldBuilder().getBuilder(),
+                  internalGetWatchdogConfigFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000002;
               break;
             } // case 18
             case 26: {
               input.readMessage(
-                  getExitCodeFieldBuilder().getBuilder(),
+                  internalGetExitCodeFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000004;
               break;
@@ -523,9 +524,7 @@ public org.tensorflow.proto.WorkerShutdownMode getShutdownMode() {
      * @return This builder for chaining.
      */
     public Builder setShutdownMode(org.tensorflow.proto.WorkerShutdownMode value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000001;
       shutdownMode_ = value.getNumber();
       onChanged();
@@ -633,7 +632,7 @@ public Builder clearWatchdogConfig() {
     public org.tensorflow.proto.WatchdogConfig.Builder getWatchdogConfigBuilder() {
       bitField0_ |= 0x00000002;
       onChanged();
-      return getWatchdogConfigFieldBuilder().getBuilder();
+      return internalGetWatchdogConfigFieldBuilder().getBuilder();
     }
     /**
      * .tensorflow.WatchdogConfig watchdog_config = 2;
@@ -651,7 +650,7 @@ public org.tensorflow.proto.WatchdogConfigOrBuilder getWatchdogConfigOrBuilder()
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.WatchdogConfig, org.tensorflow.proto.WatchdogConfig.Builder, org.tensorflow.proto.WatchdogConfigOrBuilder> 
-        getWatchdogConfigFieldBuilder() {
+        internalGetWatchdogConfigFieldBuilder() {
       if (watchdogConfigBuilder_ == null) {
         watchdogConfigBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.WatchdogConfig, org.tensorflow.proto.WatchdogConfig.Builder, org.tensorflow.proto.WatchdogConfigOrBuilder>(
@@ -754,7 +753,7 @@ public Builder clearExitCode() {
     public org.tensorflow.proto.RequestedExitCode.Builder getExitCodeBuilder() {
       bitField0_ |= 0x00000004;
       onChanged();
-      return getExitCodeFieldBuilder().getBuilder();
+      return internalGetExitCodeFieldBuilder().getBuilder();
     }
     /**
      * .tensorflow.RequestedExitCode exit_code = 3;
@@ -772,7 +771,7 @@ public org.tensorflow.proto.RequestedExitCodeOrBuilder getExitCodeOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.RequestedExitCode, org.tensorflow.proto.RequestedExitCode.Builder, org.tensorflow.proto.RequestedExitCodeOrBuilder> 
-        getExitCodeFieldBuilder() {
+        internalGetExitCodeFieldBuilder() {
       if (exitCodeBuilder_ == null) {
         exitCodeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.RequestedExitCode, org.tensorflow.proto.RequestedExitCode.Builder, org.tensorflow.proto.RequestedExitCodeOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHeartbeatRequestOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHeartbeatRequestOrBuilder.java
index c6acadaba4d..ef02bdf14fd 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHeartbeatRequestOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHeartbeatRequestOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/util/event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface WorkerHeartbeatRequestOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.WorkerHeartbeatRequest)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHeartbeatResponse.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHeartbeatResponse.java
index fcaeeb0419c..94864762479 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHeartbeatResponse.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHeartbeatResponse.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/util/event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
 /**
  * Protobuf type {@code tensorflow.WorkerHeartbeatResponse}
  */
+@com.google.protobuf.Generated
 public final class WorkerHeartbeatResponse extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.WorkerHeartbeatResponse)
@@ -17,8 +18,8 @@ public final class WorkerHeartbeatResponse extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       WorkerHeartbeatResponse.class.getName());
   }
@@ -454,7 +455,7 @@ public Builder mergeFrom(org.tensorflow.proto.WorkerHeartbeatResponse other) {
             bitField0_ = (bitField0_ & ~0x00000002);
             workerLogBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getWorkerLogFieldBuilder() : null;
+                 internalGetWorkerLogFieldBuilder() : null;
           } else {
             workerLogBuilder_.addAllMessages(other.workerLog_);
           }
@@ -565,9 +566,7 @@ public org.tensorflow.proto.WorkerHealth getHealthStatus() {
      * @return This builder for chaining.
      */
     public Builder setHealthStatus(org.tensorflow.proto.WorkerHealth value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000001;
       healthStatus_ = value.getNumber();
       onChanged();
@@ -764,7 +763,7 @@ public Builder removeWorkerLog(int index) {
      */
     public org.tensorflow.proto.Event.Builder getWorkerLogBuilder(
         int index) {
-      return getWorkerLogFieldBuilder().getBuilder(index);
+      return internalGetWorkerLogFieldBuilder().getBuilder(index);
     }
     /**
      * repeated .tensorflow.Event worker_log = 2;
@@ -791,7 +790,7 @@ public org.tensorflow.proto.EventOrBuilder getWorkerLogOrBuilder(
      * repeated .tensorflow.Event worker_log = 2;
      */
     public org.tensorflow.proto.Event.Builder addWorkerLogBuilder() {
-      return getWorkerLogFieldBuilder().addBuilder(
+      return internalGetWorkerLogFieldBuilder().addBuilder(
           org.tensorflow.proto.Event.getDefaultInstance());
     }
     /**
@@ -799,7 +798,7 @@ public org.tensorflow.proto.Event.Builder addWorkerLogBuilder() {
      */
     public org.tensorflow.proto.Event.Builder addWorkerLogBuilder(
         int index) {
-      return getWorkerLogFieldBuilder().addBuilder(
+      return internalGetWorkerLogFieldBuilder().addBuilder(
           index, org.tensorflow.proto.Event.getDefaultInstance());
     }
     /**
@@ -807,11 +806,11 @@ public org.tensorflow.proto.Event.Builder addWorkerLogBuilder(
      */
     public java.util.List 
          getWorkerLogBuilderList() {
-      return getWorkerLogFieldBuilder().getBuilderList();
+      return internalGetWorkerLogFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.Event, org.tensorflow.proto.Event.Builder, org.tensorflow.proto.EventOrBuilder> 
-        getWorkerLogFieldBuilder() {
+        internalGetWorkerLogFieldBuilder() {
       if (workerLogBuilder_ == null) {
         workerLogBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.Event, org.tensorflow.proto.Event.Builder, org.tensorflow.proto.EventOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHeartbeatResponseOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHeartbeatResponseOrBuilder.java
index e3265649d84..2c68d7b604d 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHeartbeatResponseOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerHeartbeatResponseOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/util/event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
+@com.google.protobuf.Generated
 public interface WorkerHeartbeatResponseOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.WorkerHeartbeatResponse)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerShutdownMode.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerShutdownMode.java
index 13ac914fc60..83ab55e4b52 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerShutdownMode.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/WorkerShutdownMode.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/util/event.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto;
 
@@ -13,6 +13,7 @@
  *
  * Protobuf enum {@code tensorflow.WorkerShutdownMode}
  */
+@com.google.protobuf.Generated
 public enum WorkerShutdownMode
     implements com.google.protobuf.ProtocolMessageEnum {
   /**
@@ -38,8 +39,8 @@ public enum WorkerShutdownMode
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       WorkerShutdownMode.class.getName());
   }
@@ -117,7 +118,7 @@ public WorkerShutdownMode findValueByNumber(int number) {
       getDescriptorForType() {
     return getDescriptor();
   }
-  public static final com.google.protobuf.Descriptors.EnumDescriptor
+  public static com.google.protobuf.Descriptors.EnumDescriptor
       getDescriptor() {
     return org.tensorflow.proto.EventProtos.getDescriptor().getEnumTypes().get(1);
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/core/CppShapeInference.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/core/CppShapeInference.java
index 4e2e3d02615..501d1a1ce4d 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/core/CppShapeInference.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/core/CppShapeInference.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/cpp_shape_inference.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto.core;
 
+@com.google.protobuf.Generated
 public final class CppShapeInference {
   private CppShapeInference() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       CppShapeInference.class.getName());
   }
@@ -71,8 +72,8 @@ public static final class CppShapeInferenceResult extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         CppShapeInferenceResult.class.getName());
     }
@@ -153,8 +154,8 @@ public static final class HandleShapeAndType extends
         com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
           com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
           /* major= */ 4,
-          /* minor= */ 28,
-          /* patch= */ 3,
+          /* minor= */ 31,
+          /* patch= */ 1,
           /* suffix= */ "",
           HandleShapeAndType.class.getName());
       }
@@ -471,8 +472,8 @@ private Builder(
         private void maybeForceBuilderInitialization() {
           if (com.google.protobuf.GeneratedMessage
                   .alwaysUseFieldBuilders) {
-            getShapeFieldBuilder();
-            getTypeFieldBuilder();
+            internalGetShapeFieldBuilder();
+            internalGetTypeFieldBuilder();
           }
         }
         @java.lang.Override
@@ -591,7 +592,7 @@ public Builder mergeFrom(
                   break;
                 case 10: {
                   input.readMessage(
-                      getShapeFieldBuilder().getBuilder(),
+                      internalGetShapeFieldBuilder().getBuilder(),
                       extensionRegistry);
                   bitField0_ |= 0x00000001;
                   break;
@@ -603,7 +604,7 @@ public Builder mergeFrom(
                 } // case 16
                 case 34: {
                   input.readMessage(
-                      getTypeFieldBuilder().getBuilder(),
+                      internalGetTypeFieldBuilder().getBuilder(),
                       extensionRegistry);
                   bitField0_ |= 0x00000004;
                   break;
@@ -716,7 +717,7 @@ public Builder clearShape() {
         public org.tensorflow.proto.TensorShapeProto.Builder getShapeBuilder() {
           bitField0_ |= 0x00000001;
           onChanged();
-          return getShapeFieldBuilder().getBuilder();
+          return internalGetShapeFieldBuilder().getBuilder();
         }
         /**
          * .tensorflow.TensorShapeProto shape = 1;
@@ -734,7 +735,7 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
          */
         private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> 
-            getShapeFieldBuilder() {
+            internalGetShapeFieldBuilder() {
           if (shapeBuilder_ == null) {
             shapeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder>(
@@ -780,9 +781,7 @@ public org.tensorflow.proto.DataType getDtype() {
          * @return This builder for chaining.
          */
         public Builder setDtype(org.tensorflow.proto.DataType value) {
-          if (value == null) {
-            throw new NullPointerException();
-          }
+          if (value == null) { throw new NullPointerException(); }
           bitField0_ |= 0x00000002;
           dtype_ = value.getNumber();
           onChanged();
@@ -890,7 +889,7 @@ public Builder clearType() {
         public org.tensorflow.proto.FullTypeDef.Builder getTypeBuilder() {
           bitField0_ |= 0x00000004;
           onChanged();
-          return getTypeFieldBuilder().getBuilder();
+          return internalGetTypeFieldBuilder().getBuilder();
         }
         /**
          * .tensorflow.FullTypeDef type = 4;
@@ -908,7 +907,7 @@ public org.tensorflow.proto.FullTypeDefOrBuilder getTypeOrBuilder() {
          */
         private com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.FullTypeDef, org.tensorflow.proto.FullTypeDef.Builder, org.tensorflow.proto.FullTypeDefOrBuilder> 
-            getTypeFieldBuilder() {
+            internalGetTypeFieldBuilder() {
           if (typeBuilder_ == null) {
             typeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.tensorflow.proto.FullTypeDef, org.tensorflow.proto.FullTypeDef.Builder, org.tensorflow.proto.FullTypeDefOrBuilder>(
@@ -1037,8 +1036,8 @@ public static final class HandleData extends
         com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
           com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
           /* major= */ 4,
-          /* minor= */ 28,
-          /* patch= */ 3,
+          /* minor= */ 31,
+          /* patch= */ 1,
           /* suffix= */ "",
           HandleData.class.getName());
       }
@@ -1434,7 +1433,7 @@ public Builder mergeFrom(org.tensorflow.proto.core.CppShapeInference.CppShapeInf
                 bitField0_ = (bitField0_ & ~0x00000002);
                 shapeAndTypeBuilder_ = 
                   com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                     getShapeAndTypeFieldBuilder() : null;
+                     internalGetShapeAndTypeFieldBuilder() : null;
               } else {
                 shapeAndTypeBuilder_.addAllMessages(other.shapeAndType_);
               }
@@ -1765,7 +1764,7 @@ public Builder removeShapeAndType(int index) {
          */
         public org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleShapeAndType.Builder getShapeAndTypeBuilder(
             int index) {
-          return getShapeAndTypeFieldBuilder().getBuilder(index);
+          return internalGetShapeAndTypeFieldBuilder().getBuilder(index);
         }
         /**
          * 
@@ -1804,7 +1803,7 @@ public org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.Handl
          * repeated .tensorflow.core.CppShapeInferenceResult.HandleShapeAndType shape_and_type = 2;
          */
         public org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleShapeAndType.Builder addShapeAndTypeBuilder() {
-          return getShapeAndTypeFieldBuilder().addBuilder(
+          return internalGetShapeAndTypeFieldBuilder().addBuilder(
               org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleShapeAndType.getDefaultInstance());
         }
         /**
@@ -1816,7 +1815,7 @@ public org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.Handl
          */
         public org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleShapeAndType.Builder addShapeAndTypeBuilder(
             int index) {
-          return getShapeAndTypeFieldBuilder().addBuilder(
+          return internalGetShapeAndTypeFieldBuilder().addBuilder(
               index, org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleShapeAndType.getDefaultInstance());
         }
         /**
@@ -1828,11 +1827,11 @@ public org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.Handl
          */
         public java.util.List 
              getShapeAndTypeBuilderList() {
-          return getShapeAndTypeFieldBuilder().getBuilderList();
+          return internalGetShapeAndTypeFieldBuilder().getBuilderList();
         }
         private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleShapeAndType, org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleShapeAndType.Builder, org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleShapeAndTypeOrBuilder> 
-            getShapeAndTypeFieldBuilder() {
+            internalGetShapeAndTypeFieldBuilder() {
           if (shapeAndTypeBuilder_ == null) {
             shapeAndTypeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleShapeAndType, org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleShapeAndType.Builder, org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleShapeAndTypeOrBuilder>(
@@ -2160,8 +2159,8 @@ private Builder(
       private void maybeForceBuilderInitialization() {
         if (com.google.protobuf.GeneratedMessage
                 .alwaysUseFieldBuilders) {
-          getShapeFieldBuilder();
-          getHandleDataFieldBuilder();
+          internalGetShapeFieldBuilder();
+          internalGetHandleDataFieldBuilder();
         }
       }
       @java.lang.Override
@@ -2273,14 +2272,14 @@ public Builder mergeFrom(
                 break;
               case 10: {
                 input.readMessage(
-                    getShapeFieldBuilder().getBuilder(),
+                    internalGetShapeFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000001;
                 break;
               } // case 10
               case 34: {
                 input.readMessage(
-                    getHandleDataFieldBuilder().getBuilder(),
+                    internalGetHandleDataFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000002;
                 break;
@@ -2393,7 +2392,7 @@ public Builder clearShape() {
       public org.tensorflow.proto.TensorShapeProto.Builder getShapeBuilder() {
         bitField0_ |= 0x00000001;
         onChanged();
-        return getShapeFieldBuilder().getBuilder();
+        return internalGetShapeFieldBuilder().getBuilder();
       }
       /**
        * .tensorflow.TensorShapeProto shape = 1;
@@ -2411,7 +2410,7 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> 
-          getShapeFieldBuilder() {
+          internalGetShapeFieldBuilder() {
         if (shapeBuilder_ == null) {
           shapeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder>(
@@ -2514,7 +2513,7 @@ public Builder clearHandleData() {
       public org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleData.Builder getHandleDataBuilder() {
         bitField0_ |= 0x00000002;
         onChanged();
-        return getHandleDataFieldBuilder().getBuilder();
+        return internalGetHandleDataFieldBuilder().getBuilder();
       }
       /**
        * .tensorflow.core.CppShapeInferenceResult.HandleData handle_data = 4;
@@ -2532,7 +2531,7 @@ public org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.Handl
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleData, org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleData.Builder, org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleDataOrBuilder> 
-          getHandleDataFieldBuilder() {
+          internalGetHandleDataFieldBuilder() {
         if (handleDataBuilder_ == null) {
           handleDataBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleData, org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleData.Builder, org.tensorflow.proto.core.CppShapeInference.CppShapeInferenceResult.HandleDataOrBuilder>(
@@ -2645,8 +2644,8 @@ public static final class CppShapeInferenceInputsNeeded extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         CppShapeInferenceInputsNeeded.class.getName());
     }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/core/platform/CorePlatformPayloads.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/core/platform/CorePlatformPayloads.java
index 9495889ac7d..3e4af931c34 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/core/platform/CorePlatformPayloads.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/core/platform/CorePlatformPayloads.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/core_platform_payloads.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto.core.platform;
 
+@com.google.protobuf.Generated
 public final class CorePlatformPayloads {
   private CorePlatformPayloads() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       CorePlatformPayloads.class.getName());
   }
@@ -58,8 +59,8 @@ public static final class ErrorSourceProto extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         ErrorSourceProto.class.getName());
     }
@@ -136,8 +137,8 @@ public enum ErrorSource
         com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
           com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
           /* major= */ 4,
-          /* minor= */ 28,
-          /* patch= */ 3,
+          /* minor= */ 31,
+          /* patch= */ 1,
           /* suffix= */ "",
           ErrorSource.class.getName());
       }
@@ -241,7 +242,7 @@ public ErrorSource findValueByNumber(int number) {
           getDescriptorForType() {
         return getDescriptor();
       }
-      public static final com.google.protobuf.Descriptors.EnumDescriptor
+      public static com.google.protobuf.Descriptors.EnumDescriptor
           getDescriptor() {
         return org.tensorflow.proto.core.platform.CorePlatformPayloads.ErrorSourceProto.getDescriptor().getEnumTypes().get(0);
       }
@@ -619,9 +620,7 @@ public org.tensorflow.proto.core.platform.CorePlatformPayloads.ErrorSourceProto.
        * @return This builder for chaining.
        */
       public Builder setErrorSource(org.tensorflow.proto.core.platform.CorePlatformPayloads.ErrorSourceProto.ErrorSource value) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
+        if (value == null) { throw new NullPointerException(); }
         bitField0_ |= 0x00000001;
         errorSource_ = value.getNumber();
         onChanged();
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/DataService.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/DataService.java
index 1896f0356f2..e77bab6d10d 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/DataService.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/DataService.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/data_service.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto.data;
 
+@com.google.protobuf.Generated
 public final class DataService {
   private DataService() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       DataService.class.getName());
   }
@@ -70,8 +71,8 @@ public enum DeploymentMode
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         DeploymentMode.class.getName());
     }
@@ -162,7 +163,7 @@ public DeploymentMode findValueByNumber(int number) {
         getDescriptorForType() {
       return getDescriptor();
     }
-    public static final com.google.protobuf.Descriptors.EnumDescriptor
+    public static com.google.protobuf.Descriptors.EnumDescriptor
         getDescriptor() {
       return org.tensorflow.proto.data.DataService.getDescriptor().getEnumTypes().get(0);
     }
@@ -221,8 +222,8 @@ public static final class ProcessingModeDef extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         ProcessingModeDef.class.getName());
     }
@@ -330,8 +331,8 @@ public enum ShardingPolicy
         com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
           com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
           /* major= */ 4,
-          /* minor= */ 28,
-          /* patch= */ 3,
+          /* minor= */ 31,
+          /* patch= */ 1,
           /* suffix= */ "",
           ShardingPolicy.class.getName());
       }
@@ -462,7 +463,7 @@ public ShardingPolicy findValueByNumber(int number) {
           getDescriptorForType() {
         return getDescriptor();
       }
-      public static final com.google.protobuf.Descriptors.EnumDescriptor
+      public static com.google.protobuf.Descriptors.EnumDescriptor
           getDescriptor() {
         return org.tensorflow.proto.data.DataService.ProcessingModeDef.getDescriptor().getEnumTypes().get(0);
       }
@@ -838,9 +839,7 @@ public org.tensorflow.proto.data.DataService.ProcessingModeDef.ShardingPolicy ge
        * @return This builder for chaining.
        */
       public Builder setShardingPolicy(org.tensorflow.proto.data.DataService.ProcessingModeDef.ShardingPolicy value) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
+        if (value == null) { throw new NullPointerException(); }
         bitField0_ |= 0x00000001;
         shardingPolicy_ = value.getNumber();
         onChanged();
@@ -971,8 +970,8 @@ public static final class DataServiceMetadata extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         DataServiceMetadata.class.getName());
     }
@@ -1038,8 +1037,8 @@ public enum Compression
         com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
           com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
           /* major= */ 4,
-          /* minor= */ 28,
-          /* patch= */ 3,
+          /* minor= */ 31,
+          /* patch= */ 1,
           /* suffix= */ "",
           Compression.class.getName());
       }
@@ -1130,7 +1129,7 @@ public Compression findValueByNumber(int number) {
           getDescriptorForType() {
         return getDescriptor();
       }
-      public static final com.google.protobuf.Descriptors.EnumDescriptor
+      public static com.google.protobuf.Descriptors.EnumDescriptor
           getDescriptor() {
         return org.tensorflow.proto.data.DataService.DataServiceMetadata.getDescriptor().getEnumTypes().get(0);
       }
@@ -1736,9 +1735,7 @@ public org.tensorflow.proto.data.DataService.DataServiceMetadata.Compression get
        * @return This builder for chaining.
        */
       public Builder setCompression(org.tensorflow.proto.data.DataService.DataServiceMetadata.Compression value) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
+        if (value == null) { throw new NullPointerException(); }
         bitField0_ |= 0x00000002;
         compression_ = value.getNumber();
         onChanged();
@@ -1878,8 +1875,8 @@ public static final class CrossTrainerCacheOptions extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         CrossTrainerCacheOptions.class.getName());
     }
@@ -2392,8 +2389,8 @@ public static final class DataServiceConfig extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         DataServiceConfig.class.getName());
     }
@@ -2767,9 +2764,7 @@ public org.tensorflow.proto.data.DataService.DeploymentMode getDeploymentMode()
        * @return This builder for chaining.
        */
       public Builder setDeploymentMode(org.tensorflow.proto.data.DataService.DeploymentMode value) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
+        if (value == null) { throw new NullPointerException(); }
         bitField0_ |= 0x00000001;
         deploymentMode_ = value.getNumber();
         onChanged();
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/Dataset.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/Dataset.java
index c381a210b70..cf9263ba4d4 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/Dataset.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/Dataset.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/dataset.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto.data;
 
+@com.google.protobuf.Generated
 public final class Dataset {
   private Dataset() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       Dataset.class.getName());
   }
@@ -132,8 +133,8 @@ public static final class CompressedComponentMetadata extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         CompressedComponentMetadata.class.getName());
     }
@@ -515,7 +516,7 @@ private Builder(
       private void maybeForceBuilderInitialization() {
         if (com.google.protobuf.GeneratedMessage
                 .alwaysUseFieldBuilders) {
-          getTensorShapeFieldBuilder();
+          internalGetTensorShapeFieldBuilder();
         }
       }
       @java.lang.Override
@@ -641,7 +642,7 @@ public Builder mergeFrom(
               } // case 8
               case 18: {
                 input.readMessage(
-                    getTensorShapeFieldBuilder().getBuilder(),
+                    internalGetTensorShapeFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000002;
                 break;
@@ -729,9 +730,7 @@ public org.tensorflow.proto.DataType getDtype() {
        * @return This builder for chaining.
        */
       public Builder setDtype(org.tensorflow.proto.DataType value) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
+        if (value == null) { throw new NullPointerException(); }
         bitField0_ |= 0x00000001;
         dtype_ = value.getNumber();
         onChanged();
@@ -871,7 +870,7 @@ public Builder clearTensorShape() {
       public org.tensorflow.proto.TensorShapeProto.Builder getTensorShapeBuilder() {
         bitField0_ |= 0x00000002;
         onChanged();
-        return getTensorShapeFieldBuilder().getBuilder();
+        return internalGetTensorShapeFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -897,7 +896,7 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getTensorShapeOrBuilder()
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> 
-          getTensorShapeFieldBuilder() {
+          internalGetTensorShapeFieldBuilder() {
         if (tensorShapeBuilder_ == null) {
           tensorShapeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder>(
@@ -1184,8 +1183,8 @@ public static final class CompressedElement extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         CompressedElement.class.getName());
     }
@@ -1596,7 +1595,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) {
 
       public Builder mergeFrom(org.tensorflow.proto.data.Dataset.CompressedElement other) {
         if (other == org.tensorflow.proto.data.Dataset.CompressedElement.getDefaultInstance()) return this;
-        if (other.getData() != com.google.protobuf.ByteString.EMPTY) {
+        if (!other.getData().isEmpty()) {
           setData(other.getData());
         }
         if (componentMetadataBuilder_ == null) {
@@ -1619,7 +1618,7 @@ public Builder mergeFrom(org.tensorflow.proto.data.Dataset.CompressedElement oth
               bitField0_ = (bitField0_ & ~0x00000002);
               componentMetadataBuilder_ = 
                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                   getComponentMetadataFieldBuilder() : null;
+                   internalGetComponentMetadataFieldBuilder() : null;
             } else {
               componentMetadataBuilder_.addAllMessages(other.componentMetadata_);
             }
@@ -1970,7 +1969,7 @@ public Builder removeComponentMetadata(int index) {
        */
       public org.tensorflow.proto.data.Dataset.CompressedComponentMetadata.Builder getComponentMetadataBuilder(
           int index) {
-        return getComponentMetadataFieldBuilder().getBuilder(index);
+        return internalGetComponentMetadataFieldBuilder().getBuilder(index);
       }
       /**
        * 
@@ -2009,7 +2008,7 @@ public org.tensorflow.proto.data.Dataset.CompressedComponentMetadataOrBuilder ge
        * repeated .tensorflow.data.CompressedComponentMetadata component_metadata = 2;
        */
       public org.tensorflow.proto.data.Dataset.CompressedComponentMetadata.Builder addComponentMetadataBuilder() {
-        return getComponentMetadataFieldBuilder().addBuilder(
+        return internalGetComponentMetadataFieldBuilder().addBuilder(
             org.tensorflow.proto.data.Dataset.CompressedComponentMetadata.getDefaultInstance());
       }
       /**
@@ -2021,7 +2020,7 @@ public org.tensorflow.proto.data.Dataset.CompressedComponentMetadata.Builder add
        */
       public org.tensorflow.proto.data.Dataset.CompressedComponentMetadata.Builder addComponentMetadataBuilder(
           int index) {
-        return getComponentMetadataFieldBuilder().addBuilder(
+        return internalGetComponentMetadataFieldBuilder().addBuilder(
             index, org.tensorflow.proto.data.Dataset.CompressedComponentMetadata.getDefaultInstance());
       }
       /**
@@ -2033,11 +2032,11 @@ public org.tensorflow.proto.data.Dataset.CompressedComponentMetadata.Builder add
        */
       public java.util.List 
            getComponentMetadataBuilderList() {
-        return getComponentMetadataFieldBuilder().getBuilderList();
+        return internalGetComponentMetadataFieldBuilder().getBuilderList();
       }
       private com.google.protobuf.RepeatedFieldBuilder<
           org.tensorflow.proto.data.Dataset.CompressedComponentMetadata, org.tensorflow.proto.data.Dataset.CompressedComponentMetadata.Builder, org.tensorflow.proto.data.Dataset.CompressedComponentMetadataOrBuilder> 
-          getComponentMetadataFieldBuilder() {
+          internalGetComponentMetadataFieldBuilder() {
         if (componentMetadataBuilder_ == null) {
           componentMetadataBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.data.Dataset.CompressedComponentMetadata, org.tensorflow.proto.data.Dataset.CompressedComponentMetadata.Builder, org.tensorflow.proto.data.Dataset.CompressedComponentMetadataOrBuilder>(
@@ -2201,8 +2200,8 @@ public static final class UncompressedElement extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         UncompressedElement.class.getName());
     }
@@ -2552,7 +2551,7 @@ public Builder mergeFrom(org.tensorflow.proto.data.Dataset.UncompressedElement o
               bitField0_ = (bitField0_ & ~0x00000001);
               componentsBuilder_ = 
                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                   getComponentsFieldBuilder() : null;
+                   internalGetComponentsFieldBuilder() : null;
             } else {
               componentsBuilder_.addAllMessages(other.components_);
             }
@@ -2794,7 +2793,7 @@ public Builder removeComponents(int index) {
        */
       public org.tensorflow.proto.TensorProto.Builder getComponentsBuilder(
           int index) {
-        return getComponentsFieldBuilder().getBuilder(index);
+        return internalGetComponentsFieldBuilder().getBuilder(index);
       }
       /**
        * repeated .tensorflow.TensorProto components = 1;
@@ -2821,7 +2820,7 @@ public org.tensorflow.proto.TensorProtoOrBuilder getComponentsOrBuilder(
        * repeated .tensorflow.TensorProto components = 1;
        */
       public org.tensorflow.proto.TensorProto.Builder addComponentsBuilder() {
-        return getComponentsFieldBuilder().addBuilder(
+        return internalGetComponentsFieldBuilder().addBuilder(
             org.tensorflow.proto.TensorProto.getDefaultInstance());
       }
       /**
@@ -2829,7 +2828,7 @@ public org.tensorflow.proto.TensorProto.Builder addComponentsBuilder() {
        */
       public org.tensorflow.proto.TensorProto.Builder addComponentsBuilder(
           int index) {
-        return getComponentsFieldBuilder().addBuilder(
+        return internalGetComponentsFieldBuilder().addBuilder(
             index, org.tensorflow.proto.TensorProto.getDefaultInstance());
       }
       /**
@@ -2837,11 +2836,11 @@ public org.tensorflow.proto.TensorProto.Builder addComponentsBuilder(
        */
       public java.util.List 
            getComponentsBuilderList() {
-        return getComponentsFieldBuilder().getBuilderList();
+        return internalGetComponentsFieldBuilder().getBuilderList();
       }
       private com.google.protobuf.RepeatedFieldBuilder<
           org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> 
-          getComponentsFieldBuilder() {
+          internalGetComponentsFieldBuilder() {
         if (componentsBuilder_ == null) {
           componentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/DatasetMetadata.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/DatasetMetadata.java
index 984536f55e7..763d82f05a5 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/DatasetMetadata.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/DatasetMetadata.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/dataset_metadata.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto.data;
 
+@com.google.protobuf.Generated
 public final class DatasetMetadata {
   private DatasetMetadata() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       DatasetMetadata.class.getName());
   }
@@ -63,8 +64,8 @@ public static final class Metadata extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         Metadata.class.getName());
     }
@@ -400,7 +401,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) {
 
       public Builder mergeFrom(org.tensorflow.proto.data.DatasetMetadata.Metadata other) {
         if (other == org.tensorflow.proto.data.DatasetMetadata.Metadata.getDefaultInstance()) return this;
-        if (other.getName() != com.google.protobuf.ByteString.EMPTY) {
+        if (!other.getName().isEmpty()) {
           setName(other.getName());
         }
         if (!other.getDataServiceAddress().isEmpty()) {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/DatasetOptions.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/DatasetOptions.java
index da4fbd9787b..b1c18ef2cd4 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/DatasetOptions.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/DatasetOptions.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/dataset_options.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto.data;
 
+@com.google.protobuf.Generated
 public final class DatasetOptions {
   private DatasetOptions() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       DatasetOptions.class.getName());
   }
@@ -88,8 +89,8 @@ public enum AutoShardPolicy
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         AutoShardPolicy.class.getName());
     }
@@ -199,7 +200,7 @@ public AutoShardPolicy findValueByNumber(int number) {
         getDescriptorForType() {
       return getDescriptor();
     }
-    public static final com.google.protobuf.Descriptors.EnumDescriptor
+    public static com.google.protobuf.Descriptors.EnumDescriptor
         getDescriptor() {
       return org.tensorflow.proto.data.DatasetOptions.getDescriptor().getEnumTypes().get(0);
     }
@@ -255,8 +256,8 @@ public enum ExternalStatePolicy
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         ExternalStatePolicy.class.getName());
     }
@@ -329,7 +330,7 @@ public ExternalStatePolicy findValueByNumber(int number) {
         getDescriptorForType() {
       return getDescriptor();
     }
-    public static final com.google.protobuf.Descriptors.EnumDescriptor
+    public static com.google.protobuf.Descriptors.EnumDescriptor
         getDescriptor() {
       return org.tensorflow.proto.data.DatasetOptions.getDescriptor().getEnumTypes().get(1);
     }
@@ -460,8 +461,8 @@ public static final class AutotuneOptions extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         AutotuneOptions.class.getName());
     }
@@ -1671,9 +1672,7 @@ public org.tensorflow.proto.data.model.Model.AutotuneAlgorithm getAutotuneAlgori
        * @return This builder for chaining.
        */
       public Builder setAutotuneAlgorithm(org.tensorflow.proto.data.model.Model.AutotuneAlgorithm value) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
+        if (value == null) { throw new NullPointerException(); }
         optionalAutotuneAlgorithmCase_ = 4;
         optionalAutotuneAlgorithm_ = value.getNumber();
         onChanged();
@@ -1858,8 +1857,8 @@ public static final class CardinalityOptions extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         CardinalityOptions.class.getName());
     }
@@ -1921,8 +1920,8 @@ public enum ComputeLevel
         com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
           com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
           /* major= */ 4,
-          /* minor= */ 28,
-          /* patch= */ 3,
+          /* minor= */ 31,
+          /* patch= */ 1,
           /* suffix= */ "",
           ComputeLevel.class.getName());
       }
@@ -2008,7 +2007,7 @@ public ComputeLevel findValueByNumber(int number) {
           getDescriptorForType() {
         return getDescriptor();
       }
-      public static final com.google.protobuf.Descriptors.EnumDescriptor
+      public static com.google.protobuf.Descriptors.EnumDescriptor
           getDescriptor() {
         return org.tensorflow.proto.data.DatasetOptions.CardinalityOptions.getDescriptor().getEnumTypes().get(0);
       }
@@ -2384,9 +2383,7 @@ public org.tensorflow.proto.data.DatasetOptions.CardinalityOptions.ComputeLevel
        * @return This builder for chaining.
        */
       public Builder setComputeLevel(org.tensorflow.proto.data.DatasetOptions.CardinalityOptions.ComputeLevel value) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
+        if (value == null) { throw new NullPointerException(); }
         bitField0_ |= 0x00000001;
         computeLevel_ = value.getNumber();
         onChanged();
@@ -2498,8 +2495,8 @@ public static final class DistributeOptions extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         DistributeOptions.class.getName());
     }
@@ -2996,9 +2993,7 @@ public org.tensorflow.proto.data.DatasetOptions.AutoShardPolicy getAutoShardPoli
        * @return This builder for chaining.
        */
       public Builder setAutoShardPolicy(org.tensorflow.proto.data.DatasetOptions.AutoShardPolicy value) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
+        if (value == null) { throw new NullPointerException(); }
         bitField0_ |= 0x00000001;
         autoShardPolicy_ = value.getNumber();
         onChanged();
@@ -3284,8 +3279,8 @@ public static final class OptimizationOptions extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         OptimizationOptions.class.getName());
     }
@@ -5627,8 +5622,8 @@ public static final class ServiceOptions extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         ServiceOptions.class.getName());
     }
@@ -6190,8 +6185,8 @@ public static final class ThreadingOptions extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         ThreadingOptions.class.getName());
     }
@@ -7156,8 +7151,8 @@ public static final class Options extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         Options.class.getName());
     }
@@ -8272,11 +8267,11 @@ private Builder(
       private void maybeForceBuilderInitialization() {
         if (com.google.protobuf.GeneratedMessage
                 .alwaysUseFieldBuilders) {
-          getAutotuneOptionsFieldBuilder();
-          getDistributeOptionsFieldBuilder();
-          getOptimizationOptionsFieldBuilder();
-          getServiceOptionsFieldBuilder();
-          getThreadingOptionsFieldBuilder();
+          internalGetAutotuneOptionsFieldBuilder();
+          internalGetDistributeOptionsFieldBuilder();
+          internalGetOptimizationOptionsFieldBuilder();
+          internalGetServiceOptionsFieldBuilder();
+          internalGetThreadingOptionsFieldBuilder();
         }
       }
       @java.lang.Override
@@ -8535,14 +8530,14 @@ public Builder mergeFrom(
               } // case 8
               case 18: {
                 input.readMessage(
-                    getDistributeOptionsFieldBuilder().getBuilder(),
+                    internalGetDistributeOptionsFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000010;
                 break;
               } // case 18
               case 26: {
                 input.readMessage(
-                    getOptimizationOptionsFieldBuilder().getBuilder(),
+                    internalGetOptimizationOptionsFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000020;
                 break;
@@ -8554,7 +8549,7 @@ public Builder mergeFrom(
               } // case 32
               case 42: {
                 input.readMessage(
-                    getThreadingOptionsFieldBuilder().getBuilder(),
+                    internalGetThreadingOptionsFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000100;
                 break;
@@ -8567,7 +8562,7 @@ public Builder mergeFrom(
               } // case 48
               case 58: {
                 input.readMessage(
-                    getAutotuneOptionsFieldBuilder().getBuilder(),
+                    internalGetAutotuneOptionsFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000008;
                 break;
@@ -8596,7 +8591,7 @@ public Builder mergeFrom(
               } // case 90
               case 98: {
                 input.readMessage(
-                    getServiceOptionsFieldBuilder().getBuilder(),
+                    internalGetServiceOptionsFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000040;
                 break;
@@ -9109,7 +9104,7 @@ public Builder clearAutotuneOptions() {
       public org.tensorflow.proto.data.DatasetOptions.AutotuneOptions.Builder getAutotuneOptionsBuilder() {
         bitField0_ |= 0x00000008;
         onChanged();
-        return getAutotuneOptionsFieldBuilder().getBuilder();
+        return internalGetAutotuneOptionsFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -9135,7 +9130,7 @@ public org.tensorflow.proto.data.DatasetOptions.AutotuneOptionsOrBuilder getAuto
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.data.DatasetOptions.AutotuneOptions, org.tensorflow.proto.data.DatasetOptions.AutotuneOptions.Builder, org.tensorflow.proto.data.DatasetOptions.AutotuneOptionsOrBuilder> 
-          getAutotuneOptionsFieldBuilder() {
+          internalGetAutotuneOptionsFieldBuilder() {
         if (autotuneOptionsBuilder_ == null) {
           autotuneOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.data.DatasetOptions.AutotuneOptions, org.tensorflow.proto.data.DatasetOptions.AutotuneOptions.Builder, org.tensorflow.proto.data.DatasetOptions.AutotuneOptionsOrBuilder>(
@@ -9266,7 +9261,7 @@ public Builder clearDistributeOptions() {
       public org.tensorflow.proto.data.DatasetOptions.DistributeOptions.Builder getDistributeOptionsBuilder() {
         bitField0_ |= 0x00000010;
         onChanged();
-        return getDistributeOptionsFieldBuilder().getBuilder();
+        return internalGetDistributeOptionsFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -9292,7 +9287,7 @@ public org.tensorflow.proto.data.DatasetOptions.DistributeOptionsOrBuilder getDi
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.data.DatasetOptions.DistributeOptions, org.tensorflow.proto.data.DatasetOptions.DistributeOptions.Builder, org.tensorflow.proto.data.DatasetOptions.DistributeOptionsOrBuilder> 
-          getDistributeOptionsFieldBuilder() {
+          internalGetDistributeOptionsFieldBuilder() {
         if (distributeOptionsBuilder_ == null) {
           distributeOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.data.DatasetOptions.DistributeOptions, org.tensorflow.proto.data.DatasetOptions.DistributeOptions.Builder, org.tensorflow.proto.data.DatasetOptions.DistributeOptionsOrBuilder>(
@@ -9423,7 +9418,7 @@ public Builder clearOptimizationOptions() {
       public org.tensorflow.proto.data.DatasetOptions.OptimizationOptions.Builder getOptimizationOptionsBuilder() {
         bitField0_ |= 0x00000020;
         onChanged();
-        return getOptimizationOptionsFieldBuilder().getBuilder();
+        return internalGetOptimizationOptionsFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -9449,7 +9444,7 @@ public org.tensorflow.proto.data.DatasetOptions.OptimizationOptionsOrBuilder get
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.data.DatasetOptions.OptimizationOptions, org.tensorflow.proto.data.DatasetOptions.OptimizationOptions.Builder, org.tensorflow.proto.data.DatasetOptions.OptimizationOptionsOrBuilder> 
-          getOptimizationOptionsFieldBuilder() {
+          internalGetOptimizationOptionsFieldBuilder() {
         if (optimizationOptionsBuilder_ == null) {
           optimizationOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.data.DatasetOptions.OptimizationOptions, org.tensorflow.proto.data.DatasetOptions.OptimizationOptions.Builder, org.tensorflow.proto.data.DatasetOptions.OptimizationOptionsOrBuilder>(
@@ -9580,7 +9575,7 @@ public Builder clearServiceOptions() {
       public org.tensorflow.proto.data.DatasetOptions.ServiceOptions.Builder getServiceOptionsBuilder() {
         bitField0_ |= 0x00000040;
         onChanged();
-        return getServiceOptionsFieldBuilder().getBuilder();
+        return internalGetServiceOptionsFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -9606,7 +9601,7 @@ public org.tensorflow.proto.data.DatasetOptions.ServiceOptionsOrBuilder getServi
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.data.DatasetOptions.ServiceOptions, org.tensorflow.proto.data.DatasetOptions.ServiceOptions.Builder, org.tensorflow.proto.data.DatasetOptions.ServiceOptionsOrBuilder> 
-          getServiceOptionsFieldBuilder() {
+          internalGetServiceOptionsFieldBuilder() {
         if (serviceOptionsBuilder_ == null) {
           serviceOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.data.DatasetOptions.ServiceOptions, org.tensorflow.proto.data.DatasetOptions.ServiceOptions.Builder, org.tensorflow.proto.data.DatasetOptions.ServiceOptionsOrBuilder>(
@@ -9779,7 +9774,7 @@ public Builder clearThreadingOptions() {
       public org.tensorflow.proto.data.DatasetOptions.ThreadingOptions.Builder getThreadingOptionsBuilder() {
         bitField0_ |= 0x00000100;
         onChanged();
-        return getThreadingOptionsFieldBuilder().getBuilder();
+        return internalGetThreadingOptionsFieldBuilder().getBuilder();
       }
       /**
        * 
@@ -9805,7 +9800,7 @@ public org.tensorflow.proto.data.DatasetOptions.ThreadingOptionsOrBuilder getThr
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.data.DatasetOptions.ThreadingOptions, org.tensorflow.proto.data.DatasetOptions.ThreadingOptions.Builder, org.tensorflow.proto.data.DatasetOptions.ThreadingOptionsOrBuilder> 
-          getThreadingOptionsFieldBuilder() {
+          internalGetThreadingOptionsFieldBuilder() {
         if (threadingOptionsBuilder_ == null) {
           threadingOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.data.DatasetOptions.ThreadingOptions, org.tensorflow.proto.data.DatasetOptions.ThreadingOptions.Builder, org.tensorflow.proto.data.DatasetOptions.ThreadingOptionsOrBuilder>(
@@ -9866,9 +9861,7 @@ public org.tensorflow.proto.data.DatasetOptions.ExternalStatePolicy getExternalS
        * @return This builder for chaining.
        */
       public Builder setExternalStatePolicy(org.tensorflow.proto.data.DatasetOptions.ExternalStatePolicy value) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
+        if (value == null) { throw new NullPointerException(); }
         optionalExternalStatePolicyCase_ = 6;
         optionalExternalStatePolicy_ = value.getNumber();
         onChanged();
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/experimental/ServiceConfig.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/experimental/ServiceConfig.java
index 1da009dbcf5..b89b9ee12f9 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/experimental/ServiceConfig.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/experimental/ServiceConfig.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/service_config.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto.data.experimental;
 
+@com.google.protobuf.Generated
 public final class ServiceConfig {
   private ServiceConfig() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       ServiceConfig.class.getName());
   }
@@ -260,8 +261,8 @@ public static final class DispatcherConfig extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         DispatcherConfig.class.getName());
     }
@@ -1704,9 +1705,7 @@ public org.tensorflow.proto.data.DataService.DeploymentMode getDeploymentMode()
        * @return This builder for chaining.
        */
       public Builder setDeploymentMode(org.tensorflow.proto.data.DataService.DeploymentMode value) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
+        if (value == null) { throw new NullPointerException(); }
         bitField0_ |= 0x00000020;
         deploymentMode_ = value.getNumber();
         onChanged();
@@ -2362,8 +2361,8 @@ public static final class WorkerConfig extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         WorkerConfig.class.getName());
     }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/experimental/Snapshot.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/experimental/Snapshot.java
index f21a9672404..a4ce8b8b47f 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/experimental/Snapshot.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/experimental/Snapshot.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/snapshot.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto.data.experimental;
 
+@com.google.protobuf.Generated
 public final class Snapshot {
   private Snapshot() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       Snapshot.class.getName());
   }
@@ -71,8 +72,8 @@ public static final class SnapshotRecord extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         SnapshotRecord.class.getName());
     }
@@ -424,7 +425,7 @@ public Builder mergeFrom(org.tensorflow.proto.data.experimental.Snapshot.Snapsho
               bitField0_ = (bitField0_ & ~0x00000001);
               tensorBuilder_ = 
                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                   getTensorFieldBuilder() : null;
+                   internalGetTensorFieldBuilder() : null;
             } else {
               tensorBuilder_.addAllMessages(other.tensor_);
             }
@@ -666,7 +667,7 @@ public Builder removeTensor(int index) {
        */
       public org.tensorflow.proto.TensorProto.Builder getTensorBuilder(
           int index) {
-        return getTensorFieldBuilder().getBuilder(index);
+        return internalGetTensorFieldBuilder().getBuilder(index);
       }
       /**
        * repeated .tensorflow.TensorProto tensor = 1;
@@ -693,7 +694,7 @@ public org.tensorflow.proto.TensorProtoOrBuilder getTensorOrBuilder(
        * repeated .tensorflow.TensorProto tensor = 1;
        */
       public org.tensorflow.proto.TensorProto.Builder addTensorBuilder() {
-        return getTensorFieldBuilder().addBuilder(
+        return internalGetTensorFieldBuilder().addBuilder(
             org.tensorflow.proto.TensorProto.getDefaultInstance());
       }
       /**
@@ -701,7 +702,7 @@ public org.tensorflow.proto.TensorProto.Builder addTensorBuilder() {
        */
       public org.tensorflow.proto.TensorProto.Builder addTensorBuilder(
           int index) {
-        return getTensorFieldBuilder().addBuilder(
+        return internalGetTensorFieldBuilder().addBuilder(
             index, org.tensorflow.proto.TensorProto.getDefaultInstance());
       }
       /**
@@ -709,11 +710,11 @@ public org.tensorflow.proto.TensorProto.Builder addTensorBuilder(
        */
       public java.util.List 
            getTensorBuilderList() {
-        return getTensorFieldBuilder().getBuilderList();
+        return internalGetTensorFieldBuilder().getBuilderList();
       }
       private com.google.protobuf.RepeatedFieldBuilder<
           org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder> 
-          getTensorFieldBuilder() {
+          internalGetTensorFieldBuilder() {
         if (tensorBuilder_ == null) {
           tensorBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.TensorProto, org.tensorflow.proto.TensorProto.Builder, org.tensorflow.proto.TensorProtoOrBuilder>(
@@ -924,8 +925,8 @@ public static final class SnapshotMetadataRecord extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         SnapshotMetadataRecord.class.getName());
     }
@@ -1080,8 +1081,9 @@ public long getVersion() {
 
     public static final int DTYPE_FIELD_NUMBER = 5;
     @SuppressWarnings("serial")
-    private com.google.protobuf.Internal.IntList dtype_;
-    private static final com.google.protobuf.Internal.IntListAdapter.IntConverter<
+    private com.google.protobuf.Internal.IntList dtype_ =
+        emptyIntList();
+    private static final     com.google.protobuf.Internal.IntListAdapter.IntConverter<
         org.tensorflow.proto.DataType> dtype_converter_ =
             new com.google.protobuf.Internal.IntListAdapter.IntConverter<
                 org.tensorflow.proto.DataType>() {
@@ -1464,7 +1466,6 @@ public Builder clear() {
         creationTimestamp_ = 0L;
         version_ = 0L;
         dtype_ = emptyIntList();
-        bitField0_ = (bitField0_ & ~0x00000010);
         numElements_ = 0L;
         finalized_ = false;
         return this;
@@ -1493,20 +1494,11 @@ public org.tensorflow.proto.data.experimental.Snapshot.SnapshotMetadataRecord bu
       @java.lang.Override
       public org.tensorflow.proto.data.experimental.Snapshot.SnapshotMetadataRecord buildPartial() {
         org.tensorflow.proto.data.experimental.Snapshot.SnapshotMetadataRecord result = new org.tensorflow.proto.data.experimental.Snapshot.SnapshotMetadataRecord(this);
-        buildPartialRepeatedFields(result);
         if (bitField0_ != 0) { buildPartial0(result); }
         onBuilt();
         return result;
       }
 
-      private void buildPartialRepeatedFields(org.tensorflow.proto.data.experimental.Snapshot.SnapshotMetadataRecord result) {
-        if (((bitField0_ & 0x00000010) != 0)) {
-          dtype_.makeImmutable();
-          bitField0_ = (bitField0_ & ~0x00000010);
-        }
-        result.dtype_ = dtype_;
-      }
-
       private void buildPartial0(org.tensorflow.proto.data.experimental.Snapshot.SnapshotMetadataRecord result) {
         int from_bitField0_ = bitField0_;
         if (((from_bitField0_ & 0x00000001) != 0)) {
@@ -1521,6 +1513,10 @@ private void buildPartial0(org.tensorflow.proto.data.experimental.Snapshot.Snaps
         if (((from_bitField0_ & 0x00000008) != 0)) {
           result.version_ = version_;
         }
+        if (((from_bitField0_ & 0x00000010) != 0)) {
+          dtype_.makeImmutable();
+          result.dtype_ = dtype_;
+        }
         if (((from_bitField0_ & 0x00000020) != 0)) {
           result.numElements_ = numElements_;
         }
@@ -1560,7 +1556,8 @@ public Builder mergeFrom(org.tensorflow.proto.data.experimental.Snapshot.Snapsho
         if (!other.dtype_.isEmpty()) {
           if (dtype_.isEmpty()) {
             dtype_ = other.dtype_;
-            bitField0_ = (bitField0_ & ~0x00000010);
+            dtype_.makeImmutable();
+            bitField0_ |= 0x00000010;
           } else {
             ensureDtypeIsMutable();
             dtype_.addAll(other.dtype_);
@@ -1627,13 +1624,12 @@ public Builder mergeFrom(
               } // case 40
               case 42: {
                 int length = input.readRawVarint32();
-                int oldLimit = input.pushLimit(length);
-                while(input.getBytesUntilLimit() > 0) {
-                  int tmpRaw = input.readEnum();
-                  ensureDtypeIsMutable();
-                  dtype_.addInt(tmpRaw);
+                int limit = input.pushLimit(length);
+                ensureDtypeIsMutable();
+                while (input.getBytesUntilLimit() > 0) {
+                  dtype_.addInt(input.readEnum());
                 }
-                input.popLimit(oldLimit);
+                input.popLimit(limit);
                 break;
               } // case 42
               case 48: {
@@ -1940,13 +1936,12 @@ public Builder clearVersion() {
         return this;
       }
 
-      private com.google.protobuf.Internal.IntList dtype_ =
-        emptyIntList();
+      private com.google.protobuf.Internal.IntList dtype_ = emptyIntList();
       private void ensureDtypeIsMutable() {
-        if (!((bitField0_ & 0x00000010) != 0)) {
+        if (!dtype_.isModifiable()) {
           dtype_ = makeMutableCopy(dtype_);
-          bitField0_ |= 0x00000010;
         }
+        bitField0_ |= 0x00000010;
       }
       /**
        * 
@@ -1995,9 +1990,7 @@ public org.tensorflow.proto.DataType getDtype(int index) {
        */
       public Builder setDtype(
           int index, org.tensorflow.proto.DataType value) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
+        if (value == null) { throw new NullPointerException(); }
         ensureDtypeIsMutable();
         dtype_.setInt(index, value.getNumber());
         onChanged();
@@ -2013,9 +2006,7 @@ public Builder setDtype(
        * @return This builder for chaining.
        */
       public Builder addDtype(org.tensorflow.proto.DataType value) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
+        if (value == null) { throw new NullPointerException(); }
         ensureDtypeIsMutable();
         dtype_.addInt(value.getNumber());
         onChanged();
@@ -2063,7 +2054,8 @@ public Builder clearDtype() {
        */
       public java.util.List
       getDtypeValueList() {
-        return java.util.Collections.unmodifiableList(dtype_);
+        dtype_.makeImmutable();
+        return dtype_;
       }
       /**
        * 
@@ -2300,8 +2292,8 @@ public static final class TensorMetadata extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         TensorMetadata.class.getName());
     }
@@ -2578,7 +2570,7 @@ private Builder(
       private void maybeForceBuilderInitialization() {
         if (com.google.protobuf.GeneratedMessage
                 .alwaysUseFieldBuilders) {
-          getTensorShapeFieldBuilder();
+          internalGetTensorShapeFieldBuilder();
         }
       }
       @java.lang.Override
@@ -2683,7 +2675,7 @@ public Builder mergeFrom(
                 break;
               case 18: {
                 input.readMessage(
-                    getTensorShapeFieldBuilder().getBuilder(),
+                    internalGetTensorShapeFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000001;
                 break;
@@ -2801,7 +2793,7 @@ public Builder clearTensorShape() {
       public org.tensorflow.proto.TensorShapeProto.Builder getTensorShapeBuilder() {
         bitField0_ |= 0x00000001;
         onChanged();
-        return getTensorShapeFieldBuilder().getBuilder();
+        return internalGetTensorShapeFieldBuilder().getBuilder();
       }
       /**
        * .tensorflow.TensorShapeProto tensor_shape = 2;
@@ -2819,7 +2811,7 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getTensorShapeOrBuilder()
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> 
-          getTensorShapeFieldBuilder() {
+          internalGetTensorShapeFieldBuilder() {
         if (tensorShapeBuilder_ == null) {
           tensorShapeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder>(
@@ -2970,8 +2962,8 @@ public static final class SnapshotTensorMetadata extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         SnapshotTensorMetadata.class.getName());
     }
@@ -3321,7 +3313,7 @@ public Builder mergeFrom(org.tensorflow.proto.data.experimental.Snapshot.Snapsho
               bitField0_ = (bitField0_ & ~0x00000001);
               tensorMetadataBuilder_ = 
                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                   getTensorMetadataFieldBuilder() : null;
+                   internalGetTensorMetadataFieldBuilder() : null;
             } else {
               tensorMetadataBuilder_.addAllMessages(other.tensorMetadata_);
             }
@@ -3563,7 +3555,7 @@ public Builder removeTensorMetadata(int index) {
        */
       public org.tensorflow.proto.data.experimental.Snapshot.TensorMetadata.Builder getTensorMetadataBuilder(
           int index) {
-        return getTensorMetadataFieldBuilder().getBuilder(index);
+        return internalGetTensorMetadataFieldBuilder().getBuilder(index);
       }
       /**
        * repeated .tensorflow.data.experimental.TensorMetadata tensor_metadata = 1;
@@ -3590,7 +3582,7 @@ public org.tensorflow.proto.data.experimental.Snapshot.TensorMetadataOrBuilder g
        * repeated .tensorflow.data.experimental.TensorMetadata tensor_metadata = 1;
        */
       public org.tensorflow.proto.data.experimental.Snapshot.TensorMetadata.Builder addTensorMetadataBuilder() {
-        return getTensorMetadataFieldBuilder().addBuilder(
+        return internalGetTensorMetadataFieldBuilder().addBuilder(
             org.tensorflow.proto.data.experimental.Snapshot.TensorMetadata.getDefaultInstance());
       }
       /**
@@ -3598,7 +3590,7 @@ public org.tensorflow.proto.data.experimental.Snapshot.TensorMetadata.Builder ad
        */
       public org.tensorflow.proto.data.experimental.Snapshot.TensorMetadata.Builder addTensorMetadataBuilder(
           int index) {
-        return getTensorMetadataFieldBuilder().addBuilder(
+        return internalGetTensorMetadataFieldBuilder().addBuilder(
             index, org.tensorflow.proto.data.experimental.Snapshot.TensorMetadata.getDefaultInstance());
       }
       /**
@@ -3606,11 +3598,11 @@ public org.tensorflow.proto.data.experimental.Snapshot.TensorMetadata.Builder ad
        */
       public java.util.List 
            getTensorMetadataBuilderList() {
-        return getTensorMetadataFieldBuilder().getBuilderList();
+        return internalGetTensorMetadataFieldBuilder().getBuilderList();
       }
       private com.google.protobuf.RepeatedFieldBuilder<
           org.tensorflow.proto.data.experimental.Snapshot.TensorMetadata, org.tensorflow.proto.data.experimental.Snapshot.TensorMetadata.Builder, org.tensorflow.proto.data.experimental.Snapshot.TensorMetadataOrBuilder> 
-          getTensorMetadataFieldBuilder() {
+          internalGetTensorMetadataFieldBuilder() {
         if (tensorMetadataBuilder_ == null) {
           tensorMetadataBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.data.experimental.Snapshot.TensorMetadata, org.tensorflow.proto.data.experimental.Snapshot.TensorMetadata.Builder, org.tensorflow.proto.data.experimental.Snapshot.TensorMetadataOrBuilder>(
@@ -3728,8 +3720,8 @@ public static final class DistributedSnapshotMetadata extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         DistributedSnapshotMetadata.class.getName());
     }
@@ -4081,7 +4073,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) {
 
       public Builder mergeFrom(org.tensorflow.proto.data.experimental.Snapshot.DistributedSnapshotMetadata other) {
         if (other == org.tensorflow.proto.data.experimental.Snapshot.DistributedSnapshotMetadata.getDefaultInstance()) return this;
-        if (other.getElementSpec() != com.google.protobuf.ByteString.EMPTY) {
+        if (!other.getElementSpec().isEmpty()) {
           setElementSpec(other.getElementSpec());
         }
         if (!other.getCompression().isEmpty()) {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/model/Model.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/model/Model.java
index 871c4585112..7c1e5fd447b 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/model/Model.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/data/model/Model.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/framework/model.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto.data.model;
 
+@com.google.protobuf.Generated
 public final class Model {
   private Model() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       Model.class.getName());
   }
@@ -69,8 +70,8 @@ public enum NodeClass
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         NodeClass.class.getName());
     }
@@ -163,7 +164,7 @@ public NodeClass findValueByNumber(int number) {
         getDescriptorForType() {
       return getDescriptor();
     }
-    public static final com.google.protobuf.Descriptors.EnumDescriptor
+    public static com.google.protobuf.Descriptors.EnumDescriptor
         getDescriptor() {
       return org.tensorflow.proto.data.model.Model.getDescriptor().getEnumTypes().get(0);
     }
@@ -227,8 +228,8 @@ public enum AutotuneAlgorithm
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         AutotuneAlgorithm.class.getName());
     }
@@ -311,7 +312,7 @@ public AutotuneAlgorithm findValueByNumber(int number) {
         getDescriptorForType() {
       return getDescriptor();
     }
-    public static final com.google.protobuf.Descriptors.EnumDescriptor
+    public static com.google.protobuf.Descriptors.EnumDescriptor
         getDescriptor() {
       return org.tensorflow.proto.data.model.Model.getDescriptor().getEnumTypes().get(1);
     }
@@ -486,8 +487,8 @@ public static final class ModelProto extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         ModelProto.class.getName());
     }
@@ -786,8 +787,8 @@ public static final class Node extends
         com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
           com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
           /* major= */ 4,
-          /* minor= */ 28,
-          /* patch= */ 3,
+          /* minor= */ 31,
+          /* patch= */ 1,
           /* suffix= */ "",
           Node.class.getName());
       }
@@ -906,8 +907,8 @@ public static final class Parameter extends
           com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
             com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
             /* major= */ 4,
-            /* minor= */ 28,
-            /* patch= */ 3,
+            /* minor= */ 31,
+            /* patch= */ 1,
             /* suffix= */ "",
             Parameter.class.getName());
         }
@@ -1389,16 +1390,16 @@ public Builder mergeFrom(org.tensorflow.proto.data.model.Model.ModelProto.Node.P
               bitField0_ |= 0x00000001;
               onChanged();
             }
-            if (other.getValue() != 0D) {
+            if (java.lang.Double.doubleToRawLongBits(other.getValue()) != 0) {
               setValue(other.getValue());
             }
-            if (other.getStateValue() != 0D) {
+            if (java.lang.Double.doubleToRawLongBits(other.getStateValue()) != 0) {
               setStateValue(other.getStateValue());
             }
-            if (other.getMin() != 0D) {
+            if (java.lang.Double.doubleToRawLongBits(other.getMin()) != 0) {
               setMin(other.getMin());
             }
-            if (other.getMax() != 0D) {
+            if (java.lang.Double.doubleToRawLongBits(other.getMax()) != 0) {
               setMax(other.getMax());
             }
             if (other.getTunable() != false) {
@@ -2801,13 +2802,13 @@ public Builder mergeFrom(org.tensorflow.proto.data.model.Model.ModelProto.Node o
                 bitField0_ = (bitField0_ & ~0x00000400);
                 parametersBuilder_ = 
                   com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                     getParametersFieldBuilder() : null;
+                     internalGetParametersFieldBuilder() : null;
               } else {
                 parametersBuilder_.addAllMessages(other.parameters_);
               }
             }
           }
-          if (other.getInputProcessingTimeSum() != 0D) {
+          if (java.lang.Double.doubleToRawLongBits(other.getInputProcessingTimeSum()) != 0) {
             setInputProcessingTimeSum(other.getInputProcessingTimeSum());
           }
           if (other.getInputProcessingTimeCount() != 0L) {
@@ -2827,10 +2828,10 @@ public Builder mergeFrom(org.tensorflow.proto.data.model.Model.ModelProto.Node o
           if (other.nodeClass_ != 0) {
             setNodeClassValue(other.getNodeClassValue());
           }
-          if (other.getRatio() != 0D) {
+          if (java.lang.Double.doubleToRawLongBits(other.getRatio()) != 0) {
             setRatio(other.getRatio());
           }
-          if (other.getMemoryRatio() != 0D) {
+          if (java.lang.Double.doubleToRawLongBits(other.getMemoryRatio()) != 0) {
             setMemoryRatio(other.getMemoryRatio());
           }
           this.mergeUnknownFields(other.getUnknownFields());
@@ -3703,7 +3704,7 @@ public Builder removeParameters(int index) {
          */
         public org.tensorflow.proto.data.model.Model.ModelProto.Node.Parameter.Builder getParametersBuilder(
             int index) {
-          return getParametersFieldBuilder().getBuilder(index);
+          return internalGetParametersFieldBuilder().getBuilder(index);
         }
         /**
          * 
@@ -3742,7 +3743,7 @@ public org.tensorflow.proto.data.model.Model.ModelProto.Node.ParameterOrBuilder
          * repeated .tensorflow.data.model.ModelProto.Node.Parameter parameters = 11;
          */
         public org.tensorflow.proto.data.model.Model.ModelProto.Node.Parameter.Builder addParametersBuilder() {
-          return getParametersFieldBuilder().addBuilder(
+          return internalGetParametersFieldBuilder().addBuilder(
               org.tensorflow.proto.data.model.Model.ModelProto.Node.Parameter.getDefaultInstance());
         }
         /**
@@ -3754,7 +3755,7 @@ public org.tensorflow.proto.data.model.Model.ModelProto.Node.Parameter.Builder a
          */
         public org.tensorflow.proto.data.model.Model.ModelProto.Node.Parameter.Builder addParametersBuilder(
             int index) {
-          return getParametersFieldBuilder().addBuilder(
+          return internalGetParametersFieldBuilder().addBuilder(
               index, org.tensorflow.proto.data.model.Model.ModelProto.Node.Parameter.getDefaultInstance());
         }
         /**
@@ -3766,11 +3767,11 @@ public org.tensorflow.proto.data.model.Model.ModelProto.Node.Parameter.Builder a
          */
         public java.util.List 
              getParametersBuilderList() {
-          return getParametersFieldBuilder().getBuilderList();
+          return internalGetParametersFieldBuilder().getBuilderList();
         }
         private com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.data.model.Model.ModelProto.Node.Parameter, org.tensorflow.proto.data.model.Model.ModelProto.Node.Parameter.Builder, org.tensorflow.proto.data.model.Model.ModelProto.Node.ParameterOrBuilder> 
-            getParametersFieldBuilder() {
+            internalGetParametersFieldBuilder() {
           if (parametersBuilder_ == null) {
             parametersBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
                 org.tensorflow.proto.data.model.Model.ModelProto.Node.Parameter, org.tensorflow.proto.data.model.Model.ModelProto.Node.Parameter.Builder, org.tensorflow.proto.data.model.Model.ModelProto.Node.ParameterOrBuilder>(
@@ -4021,9 +4022,7 @@ public org.tensorflow.proto.data.model.Model.NodeClass getNodeClass() {
          * @return This builder for chaining.
          */
         public Builder setNodeClass(org.tensorflow.proto.data.model.Model.NodeClass value) {
-          if (value == null) {
-            throw new NullPointerException();
-          }
+          if (value == null) { throw new NullPointerException(); }
           bitField0_ |= 0x00004000;
           nodeClass_ = value.getNumber();
           onChanged();
@@ -4259,8 +4258,8 @@ public static final class OptimizationParams extends
         com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
           com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
           /* major= */ 4,
-          /* minor= */ 28,
-          /* patch= */ 3,
+          /* minor= */ 31,
+          /* patch= */ 1,
           /* suffix= */ "",
           OptimizationParams.class.getName());
       }
@@ -4660,7 +4659,7 @@ public Builder mergeFrom(org.tensorflow.proto.data.model.Model.ModelProto.Optimi
           if (other.getRamBudget() != 0L) {
             setRamBudget(other.getRamBudget());
           }
-          if (other.getModelInputTime() != 0D) {
+          if (java.lang.Double.doubleToRawLongBits(other.getModelInputTime()) != 0) {
             setModelInputTime(other.getModelInputTime());
           }
           this.mergeUnknownFields(other.getUnknownFields());
@@ -4776,9 +4775,7 @@ public org.tensorflow.proto.data.model.Model.AutotuneAlgorithm getAlgorithm() {
          * @return This builder for chaining.
          */
         public Builder setAlgorithm(org.tensorflow.proto.data.model.Model.AutotuneAlgorithm value) {
-          if (value == null) {
-            throw new NullPointerException();
-          }
+          if (value == null) { throw new NullPointerException(); }
           bitField0_ |= 0x00000001;
           algorithm_ = value.getNumber();
           onChanged();
@@ -5520,7 +5517,7 @@ private Builder(
       private void maybeForceBuilderInitialization() {
         if (com.google.protobuf.GeneratedMessage
                 .alwaysUseFieldBuilders) {
-          getOptimizationParamsFieldBuilder();
+          internalGetOptimizationParamsFieldBuilder();
         }
       }
       @java.lang.Override
@@ -5683,7 +5680,7 @@ public Builder mergeFrom(
               } // case 24
               case 42: {
                 input.readMessage(
-                    getOptimizationParamsFieldBuilder().getBuilder(),
+                    internalGetOptimizationParamsFieldBuilder().getBuilder(),
                     extensionRegistry);
                 bitField0_ |= 0x00000010;
                 break;
@@ -6184,7 +6181,7 @@ public Builder clearOptimizationParams() {
       public org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParams.Builder getOptimizationParamsBuilder() {
         bitField0_ |= 0x00000010;
         onChanged();
-        return getOptimizationParamsFieldBuilder().getBuilder();
+        return internalGetOptimizationParamsFieldBuilder().getBuilder();
       }
       /**
        * .tensorflow.data.model.ModelProto.OptimizationParams optimization_params = 5;
@@ -6202,7 +6199,7 @@ public org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParamsOrBuil
        */
       private com.google.protobuf.SingleFieldBuilder<
           org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParams, org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParams.Builder, org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParamsOrBuilder> 
-          getOptimizationParamsFieldBuilder() {
+          internalGetOptimizationParamsFieldBuilder() {
         if (optimizationParamsBuilder_ == null) {
           optimizationParamsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParams, org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParams.Builder, org.tensorflow.proto.data.model.Model.ModelProto.OptimizationParamsOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/distributed_runtime/DistributedRuntimePayloads.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/distributed_runtime/DistributedRuntimePayloads.java
index a7c20819032..9098121e915 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/distributed_runtime/DistributedRuntimePayloads.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/distributed_runtime/DistributedRuntimePayloads.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/distributed_runtime_payloads.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto.distributed_runtime;
 
+@com.google.protobuf.Generated
 public final class DistributedRuntimePayloads {
   private DistributedRuntimePayloads() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       DistributedRuntimePayloads.class.getName());
   }
@@ -81,8 +82,8 @@ public static final class GrpcPayloadContainer extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         GrpcPayloadContainer.class.getName());
     }
@@ -734,8 +735,8 @@ public static final class GrpcPayloadsLost extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         GrpcPayloadsLost.class.getName());
     }
@@ -1102,8 +1103,8 @@ public static final class WorkerPossiblyRestarted extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         WorkerPossiblyRestarted.class.getName());
     }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/dummy/BfcMemoryMap.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/dummy/BfcMemoryMap.java
index 4b3d1af6d6d..9500c2dbb6a 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/dummy/BfcMemoryMap.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/dummy/BfcMemoryMap.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/bfc_memory_map.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto.dummy;
 
+@com.google.protobuf.Generated
 public final class BfcMemoryMap {
   private BfcMemoryMap() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       BfcMemoryMap.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/dummy/ProfilerOptions.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/dummy/ProfilerOptions.java
index 518b9303262..24966977559 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/dummy/ProfilerOptions.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/dummy/ProfilerOptions.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/profiler/profiler_options.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto.dummy;
 
+@com.google.protobuf.Generated
 public final class ProfilerOptions {
   private ProfilerOptions() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       ProfilerOptions.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/dummy/RpcOptions.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/dummy/RpcOptions.java
index 46945c26c20..debbb775f9c 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/dummy/RpcOptions.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/dummy/RpcOptions.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/rpc_options.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto.dummy;
 
+@com.google.protobuf.Generated
 public final class RpcOptions {
   private RpcOptions() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       RpcOptions.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/dummy/Status.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/dummy/Status.java
index 1bc9df42c5f..a116f82b454 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/dummy/Status.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/dummy/Status.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/status.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto.dummy;
 
+@com.google.protobuf.Generated
 public final class Status {
   private Status() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       Status.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/dummy/TestLog.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/dummy/TestLog.java
index a0200811eab..93ce1b1479d 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/dummy/TestLog.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/dummy/TestLog.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/util/test_log.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto.dummy;
 
+@com.google.protobuf.Generated
 public final class TestLog {
   private TestLog() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       TestLog.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/eager/RemoteTensorHandle.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/eager/RemoteTensorHandle.java
index 9fce46e568f..645818ef5c8 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/eager/RemoteTensorHandle.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/eager/RemoteTensorHandle.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/remote_tensor_handle.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto.eager;
 
 /**
  * Protobuf type {@code tensorflow.eager.RemoteTensorHandle}
  */
+@com.google.protobuf.Generated
 public final class RemoteTensorHandle extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.eager.RemoteTensorHandle)
@@ -17,8 +18,8 @@ public final class RemoteTensorHandle extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       RemoteTensorHandle.class.getName());
   }
@@ -633,7 +634,7 @@ public Builder mergeFrom(org.tensorflow.proto.eager.RemoteTensorHandle other) {
             bitField0_ = (bitField0_ & ~0x00000020);
             resourceDtypesAndShapesBuilder_ = 
               com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                 getResourceDtypesAndShapesFieldBuilder() : null;
+                 internalGetResourceDtypesAndShapesFieldBuilder() : null;
           } else {
             resourceDtypesAndShapesBuilder_.addAllMessages(other.resourceDtypesAndShapes_);
           }
@@ -1052,9 +1053,7 @@ public org.tensorflow.proto.DataType getDtype() {
      * @return This builder for chaining.
      */
     public Builder setDtype(org.tensorflow.proto.DataType value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000010;
       dtype_ = value.getNumber();
       onChanged();
@@ -1307,7 +1306,7 @@ public Builder removeResourceDtypesAndShapes(int index) {
      */
     public org.tensorflow.proto.eager.ResourceDtypeAndShape.Builder getResourceDtypesAndShapesBuilder(
         int index) {
-      return getResourceDtypesAndShapesFieldBuilder().getBuilder(index);
+      return internalGetResourceDtypesAndShapesFieldBuilder().getBuilder(index);
     }
     /**
      * 
@@ -1346,7 +1345,7 @@ public org.tensorflow.proto.eager.ResourceDtypeAndShapeOrBuilder getResourceDtyp
      * repeated .tensorflow.eager.ResourceDtypeAndShape resource_dtypes_and_shapes = 6;
      */
     public org.tensorflow.proto.eager.ResourceDtypeAndShape.Builder addResourceDtypesAndShapesBuilder() {
-      return getResourceDtypesAndShapesFieldBuilder().addBuilder(
+      return internalGetResourceDtypesAndShapesFieldBuilder().addBuilder(
           org.tensorflow.proto.eager.ResourceDtypeAndShape.getDefaultInstance());
     }
     /**
@@ -1358,7 +1357,7 @@ public org.tensorflow.proto.eager.ResourceDtypeAndShape.Builder addResourceDtype
      */
     public org.tensorflow.proto.eager.ResourceDtypeAndShape.Builder addResourceDtypesAndShapesBuilder(
         int index) {
-      return getResourceDtypesAndShapesFieldBuilder().addBuilder(
+      return internalGetResourceDtypesAndShapesFieldBuilder().addBuilder(
           index, org.tensorflow.proto.eager.ResourceDtypeAndShape.getDefaultInstance());
     }
     /**
@@ -1370,11 +1369,11 @@ public org.tensorflow.proto.eager.ResourceDtypeAndShape.Builder addResourceDtype
      */
     public java.util.List 
          getResourceDtypesAndShapesBuilderList() {
-      return getResourceDtypesAndShapesFieldBuilder().getBuilderList();
+      return internalGetResourceDtypesAndShapesFieldBuilder().getBuilderList();
     }
     private com.google.protobuf.RepeatedFieldBuilder<
         org.tensorflow.proto.eager.ResourceDtypeAndShape, org.tensorflow.proto.eager.ResourceDtypeAndShape.Builder, org.tensorflow.proto.eager.ResourceDtypeAndShapeOrBuilder> 
-        getResourceDtypesAndShapesFieldBuilder() {
+        internalGetResourceDtypesAndShapesFieldBuilder() {
       if (resourceDtypesAndShapesBuilder_ == null) {
         resourceDtypesAndShapesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             org.tensorflow.proto.eager.ResourceDtypeAndShape, org.tensorflow.proto.eager.ResourceDtypeAndShape.Builder, org.tensorflow.proto.eager.ResourceDtypeAndShapeOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/eager/RemoteTensorHandleOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/eager/RemoteTensorHandleOrBuilder.java
index 9eb4ee66050..affa36e46b8 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/eager/RemoteTensorHandleOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/eager/RemoteTensorHandleOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/remote_tensor_handle.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto.eager;
 
+@com.google.protobuf.Generated
 public interface RemoteTensorHandleOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.eager.RemoteTensorHandle)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/eager/RemoteTensorHandleProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/eager/RemoteTensorHandleProtos.java
index 45419a5c2bc..e3d17367a28 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/eager/RemoteTensorHandleProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/eager/RemoteTensorHandleProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/remote_tensor_handle.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto.eager;
 
+@com.google.protobuf.Generated
 public final class RemoteTensorHandleProtos {
   private RemoteTensorHandleProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       RemoteTensorHandleProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/eager/ResourceDtypeAndShape.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/eager/ResourceDtypeAndShape.java
index 5612cb28e21..4c3fe8f7d67 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/eager/ResourceDtypeAndShape.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/eager/ResourceDtypeAndShape.java
@@ -1,13 +1,14 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/remote_tensor_handle.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto.eager;
 
 /**
  * Protobuf type {@code tensorflow.eager.ResourceDtypeAndShape}
  */
+@com.google.protobuf.Generated
 public final class ResourceDtypeAndShape extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:tensorflow.eager.ResourceDtypeAndShape)
@@ -17,8 +18,8 @@ public final class ResourceDtypeAndShape extends
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       ResourceDtypeAndShape.class.getName());
   }
@@ -293,7 +294,7 @@ private Builder(
     private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessage
               .alwaysUseFieldBuilders) {
-        getShapeFieldBuilder();
+        internalGetShapeFieldBuilder();
       }
     }
     @java.lang.Override
@@ -403,7 +404,7 @@ public Builder mergeFrom(
             } // case 8
             case 18: {
               input.readMessage(
-                  getShapeFieldBuilder().getBuilder(),
+                  internalGetShapeFieldBuilder().getBuilder(),
                   extensionRegistry);
               bitField0_ |= 0x00000002;
               break;
@@ -459,9 +460,7 @@ public org.tensorflow.proto.DataType getDtype() {
      * @return This builder for chaining.
      */
     public Builder setDtype(org.tensorflow.proto.DataType value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
+      if (value == null) { throw new NullPointerException(); }
       bitField0_ |= 0x00000001;
       dtype_ = value.getNumber();
       onChanged();
@@ -569,7 +568,7 @@ public Builder clearShape() {
     public org.tensorflow.proto.TensorShapeProto.Builder getShapeBuilder() {
       bitField0_ |= 0x00000002;
       onChanged();
-      return getShapeFieldBuilder().getBuilder();
+      return internalGetShapeFieldBuilder().getBuilder();
     }
     /**
      * .tensorflow.TensorShapeProto shape = 2;
@@ -587,7 +586,7 @@ public org.tensorflow.proto.TensorShapeProtoOrBuilder getShapeOrBuilder() {
      */
     private com.google.protobuf.SingleFieldBuilder<
         org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder> 
-        getShapeFieldBuilder() {
+        internalGetShapeFieldBuilder() {
       if (shapeBuilder_ == null) {
         shapeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
             org.tensorflow.proto.TensorShapeProto, org.tensorflow.proto.TensorShapeProto.Builder, org.tensorflow.proto.TensorShapeProtoOrBuilder>(
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/eager/ResourceDtypeAndShapeOrBuilder.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/eager/ResourceDtypeAndShapeOrBuilder.java
index 62bf875b768..eedd96d6d9c 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/eager/ResourceDtypeAndShapeOrBuilder.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/eager/ResourceDtypeAndShapeOrBuilder.java
@@ -1,10 +1,11 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/remote_tensor_handle.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto.eager;
 
+@com.google.protobuf.Generated
 public interface ResourceDtypeAndShapeOrBuilder extends
     // @@protoc_insertion_point(interface_extends:tensorflow.eager.ResourceDtypeAndShape)
     com.google.protobuf.MessageOrBuilder {
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/error/Code.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/error/Code.java
index ccc93676255..a084605e64e 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/error/Code.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/error/Code.java
@@ -1,7 +1,7 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/error_codes.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto.error;
 
@@ -26,6 +26,7 @@
  *
  * Protobuf enum {@code tensorflow.error.Code}
  */
+@com.google.protobuf.Generated
 public enum Code
     implements com.google.protobuf.ProtocolMessageEnum {
   /**
@@ -251,8 +252,8 @@ public enum Code
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       Code.class.getName());
   }
@@ -544,7 +545,7 @@ public Code findValueByNumber(int number) {
       getDescriptorForType() {
     return getDescriptor();
   }
-  public static final com.google.protobuf.Descriptors.EnumDescriptor
+  public static com.google.protobuf.Descriptors.EnumDescriptor
       getDescriptor() {
     return org.tensorflow.proto.error.ErrorCodesProtos.getDescriptor().getEnumTypes().get(0);
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/error/ErrorCodesProtos.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/error/ErrorCodesProtos.java
index 929653c772d..8aea4b1b115 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/error/ErrorCodesProtos.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/error/ErrorCodesProtos.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: xla/tsl/protobuf/error_codes.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto.error;
 
+@com.google.protobuf.Generated
 public final class ErrorCodesProtos {
   private ErrorCodesProtos() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       ErrorCodesProtos.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/error/dummy/ErrorCodes.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/error/dummy/ErrorCodes.java
index 508d4b92941..1e18a8ca40d 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/error/dummy/ErrorCodes.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/error/dummy/ErrorCodes.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tensorflow/core/protobuf/error_codes.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto.error.dummy;
 
+@com.google.protobuf.Generated
 public final class ErrorCodes {
   private ErrorCodes() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       ErrorCodes.class.getName());
   }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/profiler/Xplane.java b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/profiler/Xplane.java
index 957746c4e45..c6314ca0125 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/profiler/Xplane.java
+++ b/tensorflow-core/tensorflow-core-native/src/gen/java/org/tensorflow/proto/profiler/Xplane.java
@@ -1,18 +1,19 @@
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // NO CHECKED-IN PROTOBUF GENCODE
 // source: tsl/profiler/protobuf/xplane.proto
-// Protobuf Java Version: 4.28.3
+// Protobuf Java Version: 4.31.1
 
 package org.tensorflow.proto.profiler;
 
+@com.google.protobuf.Generated
 public final class Xplane {
   private Xplane() {}
   static {
     com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
       com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
       /* major= */ 4,
-      /* minor= */ 28,
-      /* patch= */ 3,
+      /* minor= */ 31,
+      /* patch= */ 1,
       /* suffix= */ "",
       Xplane.class.getName());
   }
@@ -193,8 +194,8 @@ public static final class XSpace extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         XSpace.class.getName());
     }
@@ -779,7 +780,7 @@ public Builder mergeFrom(org.tensorflow.proto.profiler.Xplane.XSpace other) {
               bitField0_ = (bitField0_ & ~0x00000001);
               planesBuilder_ = 
                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                   getPlanesFieldBuilder() : null;
+                   internalGetPlanesFieldBuilder() : null;
             } else {
               planesBuilder_.addAllMessages(other.planes_);
             }
@@ -1069,7 +1070,7 @@ public Builder removePlanes(int index) {
        */
       public org.tensorflow.proto.profiler.Xplane.XPlane.Builder getPlanesBuilder(
           int index) {
-        return getPlanesFieldBuilder().getBuilder(index);
+        return internalGetPlanesFieldBuilder().getBuilder(index);
       }
       /**
        * repeated .tensorflow.profiler.XPlane planes = 1;
@@ -1096,7 +1097,7 @@ public org.tensorflow.proto.profiler.Xplane.XPlaneOrBuilder getPlanesOrBuilder(
        * repeated .tensorflow.profiler.XPlane planes = 1;
        */
       public org.tensorflow.proto.profiler.Xplane.XPlane.Builder addPlanesBuilder() {
-        return getPlanesFieldBuilder().addBuilder(
+        return internalGetPlanesFieldBuilder().addBuilder(
             org.tensorflow.proto.profiler.Xplane.XPlane.getDefaultInstance());
       }
       /**
@@ -1104,7 +1105,7 @@ public org.tensorflow.proto.profiler.Xplane.XPlane.Builder addPlanesBuilder() {
        */
       public org.tensorflow.proto.profiler.Xplane.XPlane.Builder addPlanesBuilder(
           int index) {
-        return getPlanesFieldBuilder().addBuilder(
+        return internalGetPlanesFieldBuilder().addBuilder(
             index, org.tensorflow.proto.profiler.Xplane.XPlane.getDefaultInstance());
       }
       /**
@@ -1112,11 +1113,11 @@ public org.tensorflow.proto.profiler.Xplane.XPlane.Builder addPlanesBuilder(
        */
       public java.util.List 
            getPlanesBuilderList() {
-        return getPlanesFieldBuilder().getBuilderList();
+        return internalGetPlanesFieldBuilder().getBuilderList();
       }
       private com.google.protobuf.RepeatedFieldBuilder<
           org.tensorflow.proto.profiler.Xplane.XPlane, org.tensorflow.proto.profiler.Xplane.XPlane.Builder, org.tensorflow.proto.profiler.Xplane.XPlaneOrBuilder> 
-          getPlanesFieldBuilder() {
+          internalGetPlanesFieldBuilder() {
         if (planesBuilder_ == null) {
           planesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.profiler.Xplane.XPlane, org.tensorflow.proto.profiler.Xplane.XPlane.Builder, org.tensorflow.proto.profiler.Xplane.XPlaneOrBuilder>(
@@ -1885,8 +1886,8 @@ public static final class XPlane extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         XPlane.class.getName());
     }
@@ -2746,7 +2747,7 @@ public Builder mergeFrom(org.tensorflow.proto.profiler.Xplane.XPlane other) {
               bitField0_ = (bitField0_ & ~0x00000004);
               linesBuilder_ = 
                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                   getLinesFieldBuilder() : null;
+                   internalGetLinesFieldBuilder() : null;
             } else {
               linesBuilder_.addAllMessages(other.lines_);
             }
@@ -2778,7 +2779,7 @@ public Builder mergeFrom(org.tensorflow.proto.profiler.Xplane.XPlane other) {
               bitField0_ = (bitField0_ & ~0x00000020);
               statsBuilder_ = 
                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                   getStatsFieldBuilder() : null;
+                   internalGetStatsFieldBuilder() : null;
             } else {
               statsBuilder_.addAllMessages(other.stats_);
             }
@@ -3250,7 +3251,7 @@ public Builder removeLines(int index) {
        */
       public org.tensorflow.proto.profiler.Xplane.XLine.Builder getLinesBuilder(
           int index) {
-        return getLinesFieldBuilder().getBuilder(index);
+        return internalGetLinesFieldBuilder().getBuilder(index);
       }
       /**
        * 
@@ -3292,7 +3293,7 @@ public org.tensorflow.proto.profiler.Xplane.XLineOrBuilder getLinesOrBuilder(
        * repeated .tensorflow.profiler.XLine lines = 3;
        */
       public org.tensorflow.proto.profiler.Xplane.XLine.Builder addLinesBuilder() {
-        return getLinesFieldBuilder().addBuilder(
+        return internalGetLinesFieldBuilder().addBuilder(
             org.tensorflow.proto.profiler.Xplane.XLine.getDefaultInstance());
       }
       /**
@@ -3305,7 +3306,7 @@ public org.tensorflow.proto.profiler.Xplane.XLine.Builder addLinesBuilder() {
        */
       public org.tensorflow.proto.profiler.Xplane.XLine.Builder addLinesBuilder(
           int index) {
-        return getLinesFieldBuilder().addBuilder(
+        return internalGetLinesFieldBuilder().addBuilder(
             index, org.tensorflow.proto.profiler.Xplane.XLine.getDefaultInstance());
       }
       /**
@@ -3318,11 +3319,11 @@ public org.tensorflow.proto.profiler.Xplane.XLine.Builder addLinesBuilder(
        */
       public java.util.List 
            getLinesBuilderList() {
-        return getLinesFieldBuilder().getBuilderList();
+        return internalGetLinesFieldBuilder().getBuilderList();
       }
       private com.google.protobuf.RepeatedFieldBuilder<
           org.tensorflow.proto.profiler.Xplane.XLine, org.tensorflow.proto.profiler.Xplane.XLine.Builder, org.tensorflow.proto.profiler.Xplane.XLineOrBuilder> 
-          getLinesFieldBuilder() {
+          internalGetLinesFieldBuilder() {
         if (linesBuilder_ == null) {
           linesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.profiler.Xplane.XLine, org.tensorflow.proto.profiler.Xplane.XLine.Builder, org.tensorflow.proto.profiler.Xplane.XLineOrBuilder>(
@@ -3970,7 +3971,7 @@ public Builder removeStats(int index) {
        */
       public org.tensorflow.proto.profiler.Xplane.XStat.Builder getStatsBuilder(
           int index) {
-        return getStatsFieldBuilder().getBuilder(index);
+        return internalGetStatsFieldBuilder().getBuilder(index);
       }
       /**
        * 
@@ -4012,7 +4013,7 @@ public org.tensorflow.proto.profiler.Xplane.XStatOrBuilder getStatsOrBuilder(
        * repeated .tensorflow.profiler.XStat stats = 6;
        */
       public org.tensorflow.proto.profiler.Xplane.XStat.Builder addStatsBuilder() {
-        return getStatsFieldBuilder().addBuilder(
+        return internalGetStatsFieldBuilder().addBuilder(
             org.tensorflow.proto.profiler.Xplane.XStat.getDefaultInstance());
       }
       /**
@@ -4025,7 +4026,7 @@ public org.tensorflow.proto.profiler.Xplane.XStat.Builder addStatsBuilder() {
        */
       public org.tensorflow.proto.profiler.Xplane.XStat.Builder addStatsBuilder(
           int index) {
-        return getStatsFieldBuilder().addBuilder(
+        return internalGetStatsFieldBuilder().addBuilder(
             index, org.tensorflow.proto.profiler.Xplane.XStat.getDefaultInstance());
       }
       /**
@@ -4038,11 +4039,11 @@ public org.tensorflow.proto.profiler.Xplane.XStat.Builder addStatsBuilder(
        */
       public java.util.List 
            getStatsBuilderList() {
-        return getStatsFieldBuilder().getBuilderList();
+        return internalGetStatsFieldBuilder().getBuilderList();
       }
       private com.google.protobuf.RepeatedFieldBuilder<
           org.tensorflow.proto.profiler.Xplane.XStat, org.tensorflow.proto.profiler.Xplane.XStat.Builder, org.tensorflow.proto.profiler.Xplane.XStatOrBuilder> 
-          getStatsFieldBuilder() {
+          internalGetStatsFieldBuilder() {
         if (statsBuilder_ == null) {
           statsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.profiler.Xplane.XStat, org.tensorflow.proto.profiler.Xplane.XStat.Builder, org.tensorflow.proto.profiler.Xplane.XStatOrBuilder>(
@@ -4195,8 +4196,8 @@ public interface XLineOrBuilder extends
 
     /**
      * 
-     * XEvents within the same XLine should not overlap in time, but they can be
-     * nested.
+     * XEvents within the same XLine should not partially overlap in time,
+     * but they can be nested.
      * 
* * repeated .tensorflow.profiler.XEvent events = 4; @@ -4205,8 +4206,8 @@ public interface XLineOrBuilder extends getEventsList(); /** *
-     * XEvents within the same XLine should not overlap in time, but they can be
-     * nested.
+     * XEvents within the same XLine should not partially overlap in time,
+     * but they can be nested.
      * 
* * repeated .tensorflow.profiler.XEvent events = 4; @@ -4214,8 +4215,8 @@ public interface XLineOrBuilder extends org.tensorflow.proto.profiler.Xplane.XEvent getEvents(int index); /** *
-     * XEvents within the same XLine should not overlap in time, but they can be
-     * nested.
+     * XEvents within the same XLine should not partially overlap in time,
+     * but they can be nested.
      * 
* * repeated .tensorflow.profiler.XEvent events = 4; @@ -4223,8 +4224,8 @@ public interface XLineOrBuilder extends int getEventsCount(); /** *
-     * XEvents within the same XLine should not overlap in time, but they can be
-     * nested.
+     * XEvents within the same XLine should not partially overlap in time,
+     * but they can be nested.
      * 
* * repeated .tensorflow.profiler.XEvent events = 4; @@ -4233,8 +4234,8 @@ public interface XLineOrBuilder extends getEventsOrBuilderList(); /** *
-     * XEvents within the same XLine should not overlap in time, but they can be
-     * nested.
+     * XEvents within the same XLine should not partially overlap in time,
+     * but they can be nested.
      * 
* * repeated .tensorflow.profiler.XEvent events = 4; @@ -4259,8 +4260,8 @@ public static final class XLine extends com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, /* major= */ 4, - /* minor= */ 28, - /* patch= */ 3, + /* minor= */ 31, + /* patch= */ 1, /* suffix= */ "", XLine.class.getName()); } @@ -4449,8 +4450,8 @@ public long getDurationPs() { private java.util.List events_; /** *
-     * XEvents within the same XLine should not overlap in time, but they can be
-     * nested.
+     * XEvents within the same XLine should not partially overlap in time,
+     * but they can be nested.
      * 
* * repeated .tensorflow.profiler.XEvent events = 4; @@ -4461,8 +4462,8 @@ public java.util.List getEventsList } /** *
-     * XEvents within the same XLine should not overlap in time, but they can be
-     * nested.
+     * XEvents within the same XLine should not partially overlap in time,
+     * but they can be nested.
      * 
* * repeated .tensorflow.profiler.XEvent events = 4; @@ -4474,8 +4475,8 @@ public java.util.List getEventsList } /** *
-     * XEvents within the same XLine should not overlap in time, but they can be
-     * nested.
+     * XEvents within the same XLine should not partially overlap in time,
+     * but they can be nested.
      * 
* * repeated .tensorflow.profiler.XEvent events = 4; @@ -4486,8 +4487,8 @@ public int getEventsCount() { } /** *
-     * XEvents within the same XLine should not overlap in time, but they can be
-     * nested.
+     * XEvents within the same XLine should not partially overlap in time,
+     * but they can be nested.
      * 
* * repeated .tensorflow.profiler.XEvent events = 4; @@ -4498,8 +4499,8 @@ public org.tensorflow.proto.profiler.Xplane.XEvent getEvents(int index) { } /** *
-     * XEvents within the same XLine should not overlap in time, but they can be
-     * nested.
+     * XEvents within the same XLine should not partially overlap in time,
+     * but they can be nested.
      * 
* * repeated .tensorflow.profiler.XEvent events = 4; @@ -4909,7 +4910,7 @@ public Builder mergeFrom(org.tensorflow.proto.profiler.Xplane.XLine other) { bitField0_ = (bitField0_ & ~0x00000040); eventsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getEventsFieldBuilder() : null; + internalGetEventsFieldBuilder() : null; } else { eventsBuilder_.addAllMessages(other.events_); } @@ -5384,8 +5385,8 @@ private void ensureEventsIsMutable() { /** *
-       * XEvents within the same XLine should not overlap in time, but they can be
-       * nested.
+       * XEvents within the same XLine should not partially overlap in time,
+       * but they can be nested.
        * 
* * repeated .tensorflow.profiler.XEvent events = 4; @@ -5399,8 +5400,8 @@ public java.util.List getEventsList } /** *
-       * XEvents within the same XLine should not overlap in time, but they can be
-       * nested.
+       * XEvents within the same XLine should not partially overlap in time,
+       * but they can be nested.
        * 
* * repeated .tensorflow.profiler.XEvent events = 4; @@ -5414,8 +5415,8 @@ public int getEventsCount() { } /** *
-       * XEvents within the same XLine should not overlap in time, but they can be
-       * nested.
+       * XEvents within the same XLine should not partially overlap in time,
+       * but they can be nested.
        * 
* * repeated .tensorflow.profiler.XEvent events = 4; @@ -5429,8 +5430,8 @@ public org.tensorflow.proto.profiler.Xplane.XEvent getEvents(int index) { } /** *
-       * XEvents within the same XLine should not overlap in time, but they can be
-       * nested.
+       * XEvents within the same XLine should not partially overlap in time,
+       * but they can be nested.
        * 
* * repeated .tensorflow.profiler.XEvent events = 4; @@ -5451,8 +5452,8 @@ public Builder setEvents( } /** *
-       * XEvents within the same XLine should not overlap in time, but they can be
-       * nested.
+       * XEvents within the same XLine should not partially overlap in time,
+       * but they can be nested.
        * 
* * repeated .tensorflow.profiler.XEvent events = 4; @@ -5470,8 +5471,8 @@ public Builder setEvents( } /** *
-       * XEvents within the same XLine should not overlap in time, but they can be
-       * nested.
+       * XEvents within the same XLine should not partially overlap in time,
+       * but they can be nested.
        * 
* * repeated .tensorflow.profiler.XEvent events = 4; @@ -5491,8 +5492,8 @@ public Builder addEvents(org.tensorflow.proto.profiler.Xplane.XEvent value) { } /** *
-       * XEvents within the same XLine should not overlap in time, but they can be
-       * nested.
+       * XEvents within the same XLine should not partially overlap in time,
+       * but they can be nested.
        * 
* * repeated .tensorflow.profiler.XEvent events = 4; @@ -5513,8 +5514,8 @@ public Builder addEvents( } /** *
-       * XEvents within the same XLine should not overlap in time, but they can be
-       * nested.
+       * XEvents within the same XLine should not partially overlap in time,
+       * but they can be nested.
        * 
* * repeated .tensorflow.profiler.XEvent events = 4; @@ -5532,8 +5533,8 @@ public Builder addEvents( } /** *
-       * XEvents within the same XLine should not overlap in time, but they can be
-       * nested.
+       * XEvents within the same XLine should not partially overlap in time,
+       * but they can be nested.
        * 
* * repeated .tensorflow.profiler.XEvent events = 4; @@ -5551,8 +5552,8 @@ public Builder addEvents( } /** *
-       * XEvents within the same XLine should not overlap in time, but they can be
-       * nested.
+       * XEvents within the same XLine should not partially overlap in time,
+       * but they can be nested.
        * 
* * repeated .tensorflow.profiler.XEvent events = 4; @@ -5571,8 +5572,8 @@ public Builder addAllEvents( } /** *
-       * XEvents within the same XLine should not overlap in time, but they can be
-       * nested.
+       * XEvents within the same XLine should not partially overlap in time,
+       * but they can be nested.
        * 
* * repeated .tensorflow.profiler.XEvent events = 4; @@ -5589,8 +5590,8 @@ public Builder clearEvents() { } /** *
-       * XEvents within the same XLine should not overlap in time, but they can be
-       * nested.
+       * XEvents within the same XLine should not partially overlap in time,
+       * but they can be nested.
        * 
* * repeated .tensorflow.profiler.XEvent events = 4; @@ -5607,20 +5608,20 @@ public Builder removeEvents(int index) { } /** *
-       * XEvents within the same XLine should not overlap in time, but they can be
-       * nested.
+       * XEvents within the same XLine should not partially overlap in time,
+       * but they can be nested.
        * 
* * repeated .tensorflow.profiler.XEvent events = 4; */ public org.tensorflow.proto.profiler.Xplane.XEvent.Builder getEventsBuilder( int index) { - return getEventsFieldBuilder().getBuilder(index); + return internalGetEventsFieldBuilder().getBuilder(index); } /** *
-       * XEvents within the same XLine should not overlap in time, but they can be
-       * nested.
+       * XEvents within the same XLine should not partially overlap in time,
+       * but they can be nested.
        * 
* * repeated .tensorflow.profiler.XEvent events = 4; @@ -5634,8 +5635,8 @@ public org.tensorflow.proto.profiler.Xplane.XEventOrBuilder getEventsOrBuilder( } /** *
-       * XEvents within the same XLine should not overlap in time, but they can be
-       * nested.
+       * XEvents within the same XLine should not partially overlap in time,
+       * but they can be nested.
        * 
* * repeated .tensorflow.profiler.XEvent events = 4; @@ -5650,44 +5651,44 @@ public org.tensorflow.proto.profiler.Xplane.XEventOrBuilder getEventsOrBuilder( } /** *
-       * XEvents within the same XLine should not overlap in time, but they can be
-       * nested.
+       * XEvents within the same XLine should not partially overlap in time,
+       * but they can be nested.
        * 
* * repeated .tensorflow.profiler.XEvent events = 4; */ public org.tensorflow.proto.profiler.Xplane.XEvent.Builder addEventsBuilder() { - return getEventsFieldBuilder().addBuilder( + return internalGetEventsFieldBuilder().addBuilder( org.tensorflow.proto.profiler.Xplane.XEvent.getDefaultInstance()); } /** *
-       * XEvents within the same XLine should not overlap in time, but they can be
-       * nested.
+       * XEvents within the same XLine should not partially overlap in time,
+       * but they can be nested.
        * 
* * repeated .tensorflow.profiler.XEvent events = 4; */ public org.tensorflow.proto.profiler.Xplane.XEvent.Builder addEventsBuilder( int index) { - return getEventsFieldBuilder().addBuilder( + return internalGetEventsFieldBuilder().addBuilder( index, org.tensorflow.proto.profiler.Xplane.XEvent.getDefaultInstance()); } /** *
-       * XEvents within the same XLine should not overlap in time, but they can be
-       * nested.
+       * XEvents within the same XLine should not partially overlap in time,
+       * but they can be nested.
        * 
* * repeated .tensorflow.profiler.XEvent events = 4; */ public java.util.List getEventsBuilderList() { - return getEventsFieldBuilder().getBuilderList(); + return internalGetEventsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.profiler.Xplane.XEvent, org.tensorflow.proto.profiler.Xplane.XEvent.Builder, org.tensorflow.proto.profiler.Xplane.XEventOrBuilder> - getEventsFieldBuilder() { + internalGetEventsFieldBuilder() { if (eventsBuilder_ == null) { eventsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.tensorflow.proto.profiler.Xplane.XEvent, org.tensorflow.proto.profiler.Xplane.XEvent.Builder, org.tensorflow.proto.profiler.Xplane.XEventOrBuilder>( @@ -5883,8 +5884,8 @@ public static final class XEvent extends com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, /* major= */ 4, - /* minor= */ 28, - /* patch= */ 3, + /* minor= */ 31, + /* patch= */ 1, /* suffix= */ "", XEvent.class.getName()); } @@ -6483,7 +6484,7 @@ public Builder mergeFrom(org.tensorflow.proto.profiler.Xplane.XEvent other) { bitField0_ = (bitField0_ & ~0x00000010); statsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getStatsFieldBuilder() : null; + internalGetStatsFieldBuilder() : null; } else { statsBuilder_.addAllMessages(other.stats_); } @@ -7046,7 +7047,7 @@ public Builder removeStats(int index) { */ public org.tensorflow.proto.profiler.Xplane.XStat.Builder getStatsBuilder( int index) { - return getStatsFieldBuilder().getBuilder(index); + return internalGetStatsFieldBuilder().getBuilder(index); } /** *
@@ -7088,7 +7089,7 @@ public org.tensorflow.proto.profiler.Xplane.XStatOrBuilder getStatsOrBuilder(
        * repeated .tensorflow.profiler.XStat stats = 4;
        */
       public org.tensorflow.proto.profiler.Xplane.XStat.Builder addStatsBuilder() {
-        return getStatsFieldBuilder().addBuilder(
+        return internalGetStatsFieldBuilder().addBuilder(
             org.tensorflow.proto.profiler.Xplane.XStat.getDefaultInstance());
       }
       /**
@@ -7101,7 +7102,7 @@ public org.tensorflow.proto.profiler.Xplane.XStat.Builder addStatsBuilder() {
        */
       public org.tensorflow.proto.profiler.Xplane.XStat.Builder addStatsBuilder(
           int index) {
-        return getStatsFieldBuilder().addBuilder(
+        return internalGetStatsFieldBuilder().addBuilder(
             index, org.tensorflow.proto.profiler.Xplane.XStat.getDefaultInstance());
       }
       /**
@@ -7114,11 +7115,11 @@ public org.tensorflow.proto.profiler.Xplane.XStat.Builder addStatsBuilder(
        */
       public java.util.List 
            getStatsBuilderList() {
-        return getStatsFieldBuilder().getBuilderList();
+        return internalGetStatsFieldBuilder().getBuilderList();
       }
       private com.google.protobuf.RepeatedFieldBuilder<
           org.tensorflow.proto.profiler.Xplane.XStat, org.tensorflow.proto.profiler.Xplane.XStat.Builder, org.tensorflow.proto.profiler.Xplane.XStatOrBuilder> 
-          getStatsFieldBuilder() {
+          internalGetStatsFieldBuilder() {
         if (statsBuilder_ == null) {
           statsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.profiler.Xplane.XStat, org.tensorflow.proto.profiler.Xplane.XStat.Builder, org.tensorflow.proto.profiler.Xplane.XStatOrBuilder>(
@@ -7297,8 +7298,8 @@ public static final class XStat extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         XStat.class.getName());
     }
@@ -8625,8 +8626,8 @@ public static final class XEventMetadata extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         XEventMetadata.class.getName());
     }
@@ -9258,7 +9259,7 @@ public Builder mergeFrom(org.tensorflow.proto.profiler.Xplane.XEventMetadata oth
           bitField0_ |= 0x00000004;
           onChanged();
         }
-        if (other.getMetadata() != com.google.protobuf.ByteString.EMPTY) {
+        if (!other.getMetadata().isEmpty()) {
           setMetadata(other.getMetadata());
         }
         if (statsBuilder_ == null) {
@@ -9281,7 +9282,7 @@ public Builder mergeFrom(org.tensorflow.proto.profiler.Xplane.XEventMetadata oth
               bitField0_ = (bitField0_ & ~0x00000010);
               statsBuilder_ = 
                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
-                   getStatsFieldBuilder() : null;
+                   internalGetStatsFieldBuilder() : null;
             } else {
               statsBuilder_.addAllMessages(other.stats_);
             }
@@ -9907,7 +9908,7 @@ public Builder removeStats(int index) {
        */
       public org.tensorflow.proto.profiler.Xplane.XStat.Builder getStatsBuilder(
           int index) {
-        return getStatsFieldBuilder().getBuilder(index);
+        return internalGetStatsFieldBuilder().getBuilder(index);
       }
       /**
        * 
@@ -9949,7 +9950,7 @@ public org.tensorflow.proto.profiler.Xplane.XStatOrBuilder getStatsOrBuilder(
        * repeated .tensorflow.profiler.XStat stats = 5;
        */
       public org.tensorflow.proto.profiler.Xplane.XStat.Builder addStatsBuilder() {
-        return getStatsFieldBuilder().addBuilder(
+        return internalGetStatsFieldBuilder().addBuilder(
             org.tensorflow.proto.profiler.Xplane.XStat.getDefaultInstance());
       }
       /**
@@ -9962,7 +9963,7 @@ public org.tensorflow.proto.profiler.Xplane.XStat.Builder addStatsBuilder() {
        */
       public org.tensorflow.proto.profiler.Xplane.XStat.Builder addStatsBuilder(
           int index) {
-        return getStatsFieldBuilder().addBuilder(
+        return internalGetStatsFieldBuilder().addBuilder(
             index, org.tensorflow.proto.profiler.Xplane.XStat.getDefaultInstance());
       }
       /**
@@ -9975,11 +9976,11 @@ public org.tensorflow.proto.profiler.Xplane.XStat.Builder addStatsBuilder(
        */
       public java.util.List 
            getStatsBuilderList() {
-        return getStatsFieldBuilder().getBuilderList();
+        return internalGetStatsFieldBuilder().getBuilderList();
       }
       private com.google.protobuf.RepeatedFieldBuilder<
           org.tensorflow.proto.profiler.Xplane.XStat, org.tensorflow.proto.profiler.Xplane.XStat.Builder, org.tensorflow.proto.profiler.Xplane.XStatOrBuilder> 
-          getStatsFieldBuilder() {
+          internalGetStatsFieldBuilder() {
         if (statsBuilder_ == null) {
           statsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
               org.tensorflow.proto.profiler.Xplane.XStat, org.tensorflow.proto.profiler.Xplane.XStat.Builder, org.tensorflow.proto.profiler.Xplane.XStatOrBuilder>(
@@ -10229,8 +10230,8 @@ public static final class XStatMetadata extends
       com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
         com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
         /* major= */ 4,
-        /* minor= */ 28,
-        /* patch= */ 3,
+        /* minor= */ 31,
+        /* patch= */ 1,
         /* suffix= */ "",
         XStatMetadata.class.getName());
     }
diff --git a/tensorflow-core/tensorflow-core-native/src/gen/resources/org/tensorflow/base_api/api_def_AsString.pbtxt b/tensorflow-core/tensorflow-core-native/src/gen/resources/org/tensorflow/base_api/api_def_AsString.pbtxt
index 5b066f8b132..78ed2b87c20 100644
--- a/tensorflow-core/tensorflow-core-native/src/gen/resources/org/tensorflow/base_api/api_def_AsString.pbtxt
+++ b/tensorflow-core/tensorflow-core-native/src/gen/resources/org/tensorflow/base_api/api_def_AsString.pbtxt
@@ -11,6 +11,7 @@ END
     name: "scientific"
     description: <